[
  {
    "path": ".editorconfig",
    "content": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.ts]\nquote_type = single\nij_typescript_use_double_quotes = false\n\n[*.md]\nmax_line_length = off\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".gitignore",
    "content": "# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.\n\n# Compiled output\n/dist\n/tmp\n/out-tsc\n/bazel-out\n\n# Node\n/node_modules\nnpm-debug.log\nyarn-error.log\n\n# IDEs and editors\n.idea/\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# Visual Studio Code\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n.history/*\n\n# Miscellaneous\n/.angular/cache\n.sass-cache/\n/connect.lock\n/coverage\n/libpeerconnection.log\ntestem.log\n/typings\n\n# System files\n.DS_Store\nThumbs.db\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846\n  \"recommendations\": [\"angular.ng-template\"]\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"ng serve\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: start\",\n      \"url\": \"http://localhost:4200/\"\n    },\n    {\n      \"name\": \"ng test\",\n      \"type\": \"chrome\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"npm: test\",\n      \"url\": \"http://localhost:9876/debug.html\"\n    }\n  ]\n}\n"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "{\n  // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"start\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    },\n    {\n      \"type\": \"npm\",\n      \"script\": \"test\",\n      \"isBackground\": true,\n      \"problemMatcher\": {\n        \"owner\": \"typescript\",\n        \"pattern\": \"$tsc\",\n        \"background\": {\n          \"activeOnStart\": true,\n          \"beginsPattern\": {\n            \"regexp\": \"(.*?)\"\n          },\n          \"endsPattern\": {\n            \"regexp\": \"bundle generation complete\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "README.md",
    "content": "## ✨ Características\n\n- Ordenar productos por nombre, precio (ascendente y descendente).\n- Búsqueda instantánea por nombre del producto.\n- Filtrar productos por categorías, rango de precios, disponibilidad y más filtros personalizados.\n- Agregar productos al carrito de compras.\n- Ver detalles y administrar el carrito de compras.\n- Cargar tus propios datos a través de la aplicación:\n  - Verás un botón rojo con un ícono de **enlace**, haz clic en él y pega la URL.\n  - El archivo **JSON** debe seguir un formato específico ([ejemplo aquí](http://carlosroso.com/angular2-shop-json/)).\n  - ⚠️ **Importante:** asegúrate de configurar correctamente el encabezado `Access-Control-Allow-Methods` en tu respuesta HTTP JSON.\n- **UI atractiva** con animaciones que mejoran la experiencia de usuario (UX).\n\n---\n\n## 🚀 Instalación\n\nClona el repositorio:\n\n```bash\ngit clone https://github.com/jlozoya/angular-shop\n```\n\nInstala las dependencias dentro de la carpeta del proyecto:\n\n```bash\ncd angular-shop\nnpm install\n```\n\nAsegúrate de tener instalada la última versión de Angular CLI:\n\n```bash\nnpm install -g @angular/cli\n```\n\nInicia la aplicación en modo desarrollo:\n\n```bash\nng serve\n```\n\nAbre tu navegador en [http://localhost:4200](http://localhost:4200).\n\n---\n\n### 🧪 Pruebas unitarias\n\n```bash\nng test\n```\n\nEjecuta las pruebas unitarias con [Karma](https://karma-runner.github.io).\n\n---\n\n## 📌 Notas\n\n- Este proyecto es ideal como **proyecto de aprendizaje** y permite explorar conceptos clave de Angular como:\n  - Componentes\n  - Data binding\n  - Formularios\n  - Servicios\n  - Rutas\n  - Pipes personalizados\n"
  },
  {
    "path": "angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n  \"version\": 1,\n  \"cli\": {\n    \"packageManager\": \"npm\"\n  },\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"angular-shop2\": {\n      \"projectType\": \"application\",\n      \"schematics\": {\n        \"@schematics/angular:component\": {\n          \"style\": \"scss\"\n        }\n      },\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"prefix\": \"app\",\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular/build:application\",\n          \"options\": {\n            \"browser\": \"src/main.ts\",\n            \"polyfills\": [\n              \"zone.js\"\n            ],\n            \"tsConfig\": \"tsconfig.app.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\n              \"src/styles.scss\"\n            ]\n          },\n          \"configurations\": {\n            \"production\": {\n              \"budgets\": [\n                {\n                  \"type\": \"initial\",\n                  \"maximumWarning\": \"500kB\",\n                  \"maximumError\": \"1MB\"\n                },\n                {\n                  \"type\": \"anyComponentStyle\",\n                  \"maximumWarning\": \"4kB\",\n                  \"maximumError\": \"8kB\"\n                }\n              ],\n              \"outputHashing\": \"all\"\n            },\n            \"development\": {\n              \"optimization\": false,\n              \"extractLicenses\": false,\n              \"sourceMap\": true\n            }\n          },\n          \"defaultConfiguration\": \"production\"\n        },\n        \"serve\": {\n          \"builder\": \"@angular/build:dev-server\",\n          \"configurations\": {\n            \"production\": {\n              \"buildTarget\": \"angular-shop2:build:production\"\n            },\n            \"development\": {\n              \"buildTarget\": \"angular-shop2:build:development\"\n            }\n          },\n          \"defaultConfiguration\": \"development\"\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular/build:extract-i18n\"\n        },\n        \"test\": {\n          \"builder\": \"@angular/build:karma\",\n          \"options\": {\n            \"polyfills\": [\n              \"zone.js\",\n              \"zone.js/testing\"\n            ],\n            \"tsConfig\": \"tsconfig.spec.json\",\n            \"inlineStyleLanguage\": \"scss\",\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"public\"\n              }\n            ],\n            \"styles\": [\n              \"src/styles.scss\"\n            ]\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"angular-shop2\",\n  \"version\": \"0.0.0\",\n  \"scripts\": {\n    \"ng\": \"ng\",\n    \"start\": \"ng serve\",\n    \"build\": \"ng build\",\n    \"watch\": \"ng build --watch --configuration development\",\n    \"test\": \"ng test\"\n  },\n  \"prettier\": {\n    \"printWidth\": 100,\n    \"singleQuote\": true,\n    \"overrides\": [\n      {\n        \"files\": \"*.html\",\n        \"options\": {\n          \"parser\": \"angular\"\n        }\n      }\n    ]\n  },\n  \"private\": true,\n  \"dependencies\": {\n    \"@angular/common\": \"^20.3.0\",\n    \"@angular/compiler\": \"^20.3.0\",\n    \"@angular/core\": \"^20.3.0\",\n    \"@angular/forms\": \"^20.3.0\",\n    \"@angular/platform-browser\": \"^20.3.0\",\n    \"@angular/router\": \"^20.3.0\",\n    \"rxjs\": \"~7.8.0\",\n    \"tslib\": \"^2.3.0\",\n    \"zone.js\": \"~0.15.0\"\n  },\n  \"devDependencies\": {\n    \"@angular/build\": \"^20.3.2\",\n    \"@angular/cli\": \"^20.3.2\",\n    \"@angular/compiler-cli\": \"^20.3.0\",\n    \"@types/jasmine\": \"~5.1.0\",\n    \"jasmine-core\": \"~5.9.0\",\n    \"karma\": \"~6.4.0\",\n    \"karma-chrome-launcher\": \"~3.2.0\",\n    \"karma-coverage\": \"~2.2.0\",\n    \"karma-jasmine\": \"~5.1.0\",\n    \"karma-jasmine-html-reporter\": \"~2.1.0\",\n    \"typescript\": \"~5.9.2\"\n  }\n}"
  },
  {
    "path": "public/assets/.gitkeep",
    "content": ""
  },
  {
    "path": "public/assets/.npmignore",
    "content": ""
  },
  {
    "path": "public/assets/data.json",
    "content": "{\n  \"categories\": [\n    {\n      \"categori_id\": 1,\n      \"name\": \"drinks\"\n    },\n    {\n      \"categori_id\": 2,\n      \"name\": \"lunch\"\n    },\n    {\n      \"categori_id\": 3,\n      \"name\": \"food\"\n    },\n    {\n      \"categori_id\": 4,\n      \"name\": \"sea\"\n    }\n  ],\n  \"products\": [\n    {\n      \"id\": 1,\n      \"name\": \"Lorem\",\n      \"price\": \"60.000\",\n      \"available\": true,\n      \"best_seller\": true,\n      \"categories\": [\n        1,\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"ipsum\",\n      \"price\": \"20.000\",\n      \"available\": false,\n      \"best_seller\": false,\n      \"categories\": [\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 3,\n      \"name\": \"dolor\",\n      \"price\": \"10.000\",\n      \"available\": true,\n      \"best_seller\": true,\n      \"categories\": [\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 4,\n      \"name\": \"sit\",\n      \"price\": \"35.000\",\n      \"available\": false,\n      \"best_seller\": false,\n      \"categories\": [\n        1,\n        2\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 5,\n      \"name\": \"amet\",\n      \"price\": \"12.000\",\n      \"available\": true,\n      \"best_seller\": true,\n      \"categories\": [\n        1,\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 6,\n      \"name\": \"consectetur\",\n      \"price\": \"120.000\",\n      \"available\": true,\n      \"best_seller\": false,\n      \"categories\": [\n        1,\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 7,\n      \"name\": \"adipiscing\",\n      \"price\": \"50.000\",\n      \"available\": false,\n      \"best_seller\": false,\n      \"categories\": [\n        1,\n        3\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 8,\n      \"name\": \"elit\",\n      \"price\": \"2000\",\n      \"available\": true,\n      \"best_seller\": false,\n      \"categories\": [\n        1,\n        3\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 9,\n      \"name\": \"Maecenas\",\n      \"price\": \"150.000\",\n      \"available\": true,\n      \"best_seller\": true,\n      \"categories\": [\n        2,\n        4\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    },\n    {\n      \"id\": 10,\n      \"name\": \"eu\",\n      \"price\": \"200.000\",\n      \"available\": false,\n      \"best_seller\": true,\n      \"categories\": [\n        2,\n        3\n      ],\n      \"img\": \"https://placehold.co/200x100\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.\"\n    }\n  ]\n}\n"
  },
  {
    "path": "src/app/app.component.html",
    "content": "<div class=\"main-container\">\n  <div class=\"container\">\n    <div class=\"row\">\n      <div class=\"col-3\">\n        <div class=\"filters-wrapper\">\n          <app-url-form (urlChange)='onURLChange($event)'></app-url-form>\n          <app-cart></app-cart>\n          <app-filters #filtersComponent [categories]='originalData.categories' [customFilters]='customFilters' [priceFilters]='priceFilters' (filterChange)='onFilterChange($event)'></app-filters>\n        </div>\n      </div>\n      <div class=\"col-9\">\n        <div class=\"row\">\n          <div class=\"col-8\">\n            <div class=\"sort-filters-wrapper\">\n              <app-sort-filters [filters]='sortFilters' (sortChange)='sortProducts($event)'></app-sort-filters>\n            </div>\n          </div>\n          <div class=\"col-4\">\n            <app-search-bar #searchComponent (searchChange)='onSearchChange($event)'></app-search-bar>\n          </div>\n        </div>\n        <div class=\"row\">\n          <div class=\"col-12\">\n\n          </div>\n        </div>\n        <div class=\"row\">\n          <div class=\"col-12\">\n            <app-showcase [products]='products'></app-showcase>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n"
  },
  {
    "path": "src/app/app.component.scss",
    "content": "@use \"./shared/colors\" as *;\n@use \"./shared/mixins\" as *;\n\n.main-container{\n  padding-top: 100px;\n}\n\n.filters-wrapper{\n  position: relative;\n  z-index: 90000;\n}\n\nsort-filters{\n  position: relative;\n  z-index: 20;\n}\n\ncart{\n  position: absolute;\n  top: -23px;\n  right: -57px;\n  z-index: 99999999;\n}\n\nsearch-bar{\n  position: relative;\n  top: -8px;\n}\n\nshowcase{\n  position: relative;\n  top: -39px;\n  z-index: 10\n}\n\n.sort-filters-wrapper{\n  position: relative;\n}\n\nurl-form{\n  position: absolute;\n  top: -55px;\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    url-form{\n        position: fixed;\n        bottom: 20px;\n        left: 10px;\n    }\n\n    filters{\n      position: fixed;\n      top: 44px;\n      right: -100%;\n      width: 100%;\n      height: 100%;\n    }\n    .sort-filters-wrapper{\n      position: fixed;\n      top: 44px;\n      left: 0;\n      width: 100%;\n      box-shadow: 0px 3px 16px rgba(0,0,0,0.3);\n      padding-top: 10px;\n      background: $primary-color;\n      z-index: 200;\n    }\n\n    .main-container{\n      padding-top: 34px;\n    }\n    search-bar{\n      position: fixed;\n      top: 0;\n      width: 100%;\n      left: 0;\n      z-index: 9000;\n    }\n\n  }\n"
  },
  {
    "path": "src/app/app.component.ts",
    "content": "import { Component, OnInit } from '@angular/core';\nimport { Product } from './shared/product.model';\nimport { DataService } from './data.service';\nimport { CartService } from './cart.service';\nimport { ViewChild } from '@angular/core';\n\nimport { FiltersComponent } from './filters/filters.component';\nimport { SearchBarComponent } from './search-bar/search-bar.component';\nimport { ShowcaseComponent } from './showcase/showcase.component';\nimport { CartComponent } from './cart/cart.component';\nimport { SortFiltersComponent } from './sort-filters/sort-filters.component';\nimport { UrlFormComponent } from './url-form/url-form.component';\n\n\n@Component({\n  selector: 'app-root',\n  standalone: true,\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss'],\n  imports: [\n    SearchBarComponent,\n    FiltersComponent,\n    ShowcaseComponent,\n    CartComponent,\n    SortFiltersComponent,\n    UrlFormComponent,\n  ],\n  providers: [DataService, CartService]\n})\nexport class AppComponent implements OnInit {\n\n  products: Product[] = [];\n\n  mainFilter: any;\n\n  currentSorting: string = '';\n\n  @ViewChild('filtersComponent')\n  filtersComponent!: FiltersComponent;\n\n  @ViewChild('searchComponent')\n  searchComponent!: SearchBarComponent;\n\n  sortFilters: any[] = [\n    { name: 'Nombre (A to Z)', value: 'name' },\n    { name: 'Precio (low to high)', value: 'priceAsc' },\n    { name: 'Precio (high to low)', value: 'priceDes' }\n  ];\n\n  customFilters: any[] = [\n    { name: 'Todo', value: 'all', checked: true },\n    { name: 'Disponible', value: 'available', checked: false },\n    { name: 'No disponible', value: 'unavailable', checked: false },\n    { name: 'Mejor vendido', value: 'bestseller', checked: false }\n  ];\n\n  priceFilters: any[] = [\n    { name: 'Todo', value: 'all', checked: true },\n    { name: 'Precio > 30.000', value: 'more_30000', checked: false },\n    { name: 'Precio < 10.000', value: 'less_10000', checked: false }\n  ];\n\n  originalData: any = [];\n\n  constructor(private dataService: DataService, private cartService: CartService) {  }\n\n  ngOnInit() {\n\n\n    this.dataService.getData().then(data => {\n      this.originalData = data;\n      this.mainFilter = {\n        search: '',\n        categories: this.originalData.categories.slice(0),\n        customFilter: this.customFilters[0],\n        priceFilter: this.priceFilters[0]\n      };\n\n      // Make a deep copy of the original data to keep it immutable\n      this.products = this.originalData.products.slice(0);\n      this.sortProducts('name');\n    });\n  }\n\n  onURLChange(url: string) {\n    this.dataService.getRemoteData(url).subscribe((data: any) => {\n      this.originalData = data;\n      this.mainFilter = {\n        search: '',\n        categories: this.originalData.categories.slice(0),\n        customFilter: this.customFilters[0],\n        priceFilter: this.priceFilters[0]\n      };\n\n      // Make a deep copy of the original data to keep it immutable\n      this.products = this.originalData.products.slice(0);\n      this.sortProducts('name');\n      this.filtersComponent.reset(this.customFilters, this.priceFilters);\n      this.searchComponent.reset();\n      this.cartService.flushCart();\n    });\n  }\n\n\n\n  onSearchChange(search: any) {\n    this.mainFilter.search = search.search;\n    this.updateProducts({\n      type: 'search',\n      change: search.change\n    });\n  }\n\n  onFilterChange(data: any) {\n    if (data.type === 'category') {\n      if (data.isChecked) {\n        this.mainFilter.categories.push(data.filter);\n      } else {\n        this.mainFilter.categories = this.mainFilter.categories.filter(\n          (category: any) => {\n            return category.categori_id !== data.filter.categori_id;\n          });\n      }\n    } else if (data.type === 'custom') {\n      this.mainFilter.customFilter = data.filter;\n    } else if (data.type === 'price') {\n      this.mainFilter.priceFilter = data.filter;\n    }\n    this.updateProducts({\n      type: data.type,\n      change: data.change\n    });\n  }\n\n  updateProducts(filter: any) {\n    let productsSource = this.originalData.products;\n    const prevProducts = this.products;\n    let filterAllData = true;\n    if ((filter.type === 'search' && filter.change === 1) || (filter.type === 'category' && filter.change === -1)) {\n      productsSource = this.products;\n      filterAllData = false;\n    }\n    // console.log('filtering ' + productsSource.length + ' products')\n\n    this.products = productsSource.filter((product: any) => {\n      // Filter by search\n      if (filterAllData || filter.type === 'search') {\n        if (!product.name.match(new RegExp(this.mainFilter.search, 'i'))) {\n          return false;\n        }\n      }\n\n      // Filter by categories\n      if (filterAllData || filter.type === 'category') {\n        let passCategoryFilter = false;\n        product.categories.forEach((product_category: any) => {\n          if (!passCategoryFilter) {\n            passCategoryFilter = this.mainFilter.categories.reduce((found: any, category: any) => {\n                return found || product_category === category.categori_id;\n            }, false);\n          }\n        });\n        if (!passCategoryFilter) {\n          return false;\n        }\n      }\n\n      // Filter by custom filters\n      if (filterAllData || filter.type === 'custom') {\n        let passCustomFilter = false;\n        const customFilter = this.mainFilter.customFilter.value;\n        if (customFilter === 'all') {\n          passCustomFilter = true;\n        } else if (customFilter === 'available' && product.available) {\n          passCustomFilter = true;\n        } else if (customFilter === 'unavailable' && !product.available) {\n          passCustomFilter = true;\n        } else if (customFilter === 'bestseller' && product.best_seller) {\n          passCustomFilter = true;\n        }\n        if (!passCustomFilter) {\n          return false;\n        }\n      }\n\n      // Filter by price filters\n      if (filterAllData || filter.type === 'price') {\n        let passPriceFilter = false;\n        const customFilter = this.mainFilter.priceFilter.value;\n        const productPrice = parseFloat(product.price.replace(/\\./g, '').replace(',', '.'));\n        if (customFilter === 'all') {\n          passPriceFilter = true;\n        } else if (customFilter === 'more_30000' && productPrice > 30000) {\n          passPriceFilter = true;\n        } else if (customFilter === 'less_10000' && productPrice < 10000) {\n          passPriceFilter = true;\n        }\n        if (!passPriceFilter) {\n          return false;\n        }\n      }\n\n      return true;\n    });\n\n    // If the number of products increased after the filter has been applied then sort again\n    // If the number of products remained equal, there's a high chance that the items have been reordered.\n    if (prevProducts.length <= this.products.length && this.products.length > 1) {\n      this.sortProducts(this.currentSorting);\n    }\n\n    // These two types of filters usually add new data to the products showcase so a sort is necessary\n    if (filter.type === 'custom' || filter.type === 'price') {\n      this.sortProducts(this.currentSorting);\n    }\n  }\n\n  sortProducts(criteria: any) {\n    // console.log('sorting ' + this.products.length + ' products')\n    this.products.sort((a, b) => {\n      const priceComparison = parseFloat(a.price.replace(/\\./g, '')\n      .replace(',', '.')) - parseFloat(b.price.replace(/\\./g, '').replace(',', '.'));\n      if (criteria === 'priceDes') {\n        return -priceComparison;\n      } else if (criteria === 'priceAsc') {\n        return  priceComparison;\n      } else if (criteria === 'name') {\n        const nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();\n        if (nameA < nameB) {\n          return -1;\n        }\n        if (nameA > nameB) {\n          return 1;\n        }\n        return 0;\n      } else {\n        // Keep the same order in case of any unexpected sort criteria\n        return -1;\n      }\n    });\n    this.currentSorting = criteria;\n  }\n}\n"
  },
  {
    "path": "src/app/app.config.ts",
    "content": "import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\n\nimport { routes } from './app.routes';\nimport { provideHttpClient } from '@angular/common/http';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideHttpClient(),\n    provideBrowserGlobalErrorListeners(),\n    provideZoneChangeDetection({ eventCoalescing: true }),\n    provideRouter(routes)\n  ]\n};\n"
  },
  {
    "path": "src/app/app.html",
    "content": "<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->\n<!-- * * * * * * * to get started with your project! * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n<style>\n  :host {\n    --bright-blue: oklch(51.01% 0.274 263.83);\n    --electric-violet: oklch(53.18% 0.28 296.97);\n    --french-violet: oklch(47.66% 0.246 305.88);\n    --vivid-pink: oklch(69.02% 0.277 332.77);\n    --hot-red: oklch(61.42% 0.238 15.34);\n    --orange-red: oklch(63.32% 0.24 31.68);\n\n    --gray-900: oklch(19.37% 0.006 300.98);\n    --gray-700: oklch(36.98% 0.014 302.71);\n    --gray-400: oklch(70.9% 0.015 304.04);\n\n    --red-to-pink-to-purple-vertical-gradient: linear-gradient(\n      180deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --red-to-pink-to-purple-horizontal-gradient: linear-gradient(\n      90deg,\n      var(--orange-red) 0%,\n      var(--vivid-pink) 50%,\n      var(--electric-violet) 100%\n    );\n\n    --pill-accent: var(--bright-blue);\n\n    font-family: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n      Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n      \"Segoe UI Symbol\";\n    box-sizing: border-box;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  h1 {\n    font-size: 3.125rem;\n    color: var(--gray-900);\n    font-weight: 500;\n    line-height: 100%;\n    letter-spacing: -0.125rem;\n    margin: 0;\n    font-family: \"Inter Tight\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n      Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n      \"Segoe UI Symbol\";\n  }\n\n  p {\n    margin: 0;\n    color: var(--gray-700);\n  }\n\n  main {\n    width: 100%;\n    min-height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 1rem;\n    box-sizing: inherit;\n    position: relative;\n  }\n\n  .angular-logo {\n    max-width: 9.2rem;\n  }\n\n  .content {\n    display: flex;\n    justify-content: space-around;\n    width: 100%;\n    max-width: 700px;\n    margin-bottom: 3rem;\n  }\n\n  .content h1 {\n    margin-top: 1.75rem;\n  }\n\n  .content p {\n    margin-top: 1.5rem;\n  }\n\n  .divider {\n    width: 1px;\n    background: var(--red-to-pink-to-purple-vertical-gradient);\n    margin-inline: 0.5rem;\n  }\n\n  .pill-group {\n    display: flex;\n    flex-direction: column;\n    align-items: start;\n    flex-wrap: wrap;\n    gap: 1.25rem;\n  }\n\n  .pill {\n    display: flex;\n    align-items: center;\n    --pill-accent: var(--bright-blue);\n    background: color-mix(in srgb, var(--pill-accent) 5%, transparent);\n    color: var(--pill-accent);\n    padding-inline: 0.75rem;\n    padding-block: 0.375rem;\n    border-radius: 2.75rem;\n    border: 0;\n    transition: background 0.3s ease;\n    font-family: var(--inter-font);\n    font-size: 0.875rem;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 1.4rem;\n    letter-spacing: -0.00875rem;\n    text-decoration: none;\n    white-space: nowrap;\n  }\n\n  .pill:hover {\n    background: color-mix(in srgb, var(--pill-accent) 15%, transparent);\n  }\n\n  .pill-group .pill:nth-child(6n + 1) {\n    --pill-accent: var(--bright-blue);\n  }\n  .pill-group .pill:nth-child(6n + 2) {\n    --pill-accent: var(--electric-violet);\n  }\n  .pill-group .pill:nth-child(6n + 3) {\n    --pill-accent: var(--french-violet);\n  }\n\n  .pill-group .pill:nth-child(6n + 4),\n  .pill-group .pill:nth-child(6n + 5),\n  .pill-group .pill:nth-child(6n + 6) {\n    --pill-accent: var(--hot-red);\n  }\n\n  .pill-group svg {\n    margin-inline-start: 0.25rem;\n  }\n\n  .social-links {\n    display: flex;\n    align-items: center;\n    gap: 0.73rem;\n    margin-top: 1.5rem;\n  }\n\n  .social-links path {\n    transition: fill 0.3s ease;\n    fill: var(--gray-400);\n  }\n\n  .social-links a:hover svg path {\n    fill: var(--gray-900);\n  }\n\n  @media screen and (max-width: 650px) {\n    .content {\n      flex-direction: column;\n      width: max-content;\n    }\n\n    .divider {\n      height: 1px;\n      width: 100%;\n      background: var(--red-to-pink-to-purple-horizontal-gradient);\n      margin-block: 1.5rem;\n    }\n  }\n</style>\n\n<main class=\"main\">\n  <div class=\"content\">\n    <div class=\"left-side\">\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        viewBox=\"0 0 982 239\"\n        fill=\"none\"\n        class=\"angular-logo\"\n      >\n        <g clip-path=\"url(#a)\">\n          <path\n            fill=\"url(#b)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n          <path\n            fill=\"url(#c)\"\n            d=\"M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z\"\n          />\n        </g>\n        <defs>\n          <radialGradient\n            id=\"c\"\n            cx=\"0\"\n            cy=\"0\"\n            r=\"1\"\n            gradientTransform=\"rotate(118.122 171.182 60.81) scale(205.794)\"\n            gradientUnits=\"userSpaceOnUse\"\n          >\n            <stop stop-color=\"#FF41F8\" />\n            <stop offset=\".707\" stop-color=\"#FF41F8\" stop-opacity=\".5\" />\n            <stop offset=\"1\" stop-color=\"#FF41F8\" stop-opacity=\"0\" />\n          </radialGradient>\n          <linearGradient\n            id=\"b\"\n            x1=\"0\"\n            x2=\"982\"\n            y1=\"192\"\n            y2=\"192\"\n            gradientUnits=\"userSpaceOnUse\"\n          >\n            <stop stop-color=\"#F0060B\" />\n            <stop offset=\"0\" stop-color=\"#F0070C\" />\n            <stop offset=\".526\" stop-color=\"#CC26D5\" />\n            <stop offset=\"1\" stop-color=\"#7702FF\" />\n          </linearGradient>\n          <clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h982v239H0z\" /></clipPath>\n        </defs>\n      </svg>\n      <h1>Hello, {{ title() }}</h1>\n      <p>Congratulations! Your app is running. 🎉</p>\n    </div>\n    <div class=\"divider\" role=\"separator\" aria-label=\"Divider\"></div>\n    <div class=\"right-side\">\n      <div class=\"pill-group\">\n        @for (item of [\n          { title: 'Explore the Docs', link: 'https://angular.dev' },\n          { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },\n          { title: 'Prompt and best practices for AI', link: 'https://angular.dev/ai/develop-with-ai'},\n          { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },\n          { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' },\n          { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },\n        ]; track item.title) {\n          <a\n            class=\"pill\"\n            [href]=\"item.link\"\n            target=\"_blank\"\n            rel=\"noopener\"\n          >\n            <span>{{ item.title }}</span>\n            <svg\n              xmlns=\"http://www.w3.org/2000/svg\"\n              height=\"14\"\n              viewBox=\"0 -960 960 960\"\n              width=\"14\"\n              fill=\"currentColor\"\n            >\n              <path\n                d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z\"\n              />\n            </svg>\n          </a>\n        }\n      </div>\n      <div class=\"social-links\">\n        <a\n          href=\"https://github.com/angular/angular\"\n          aria-label=\"Github\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"25\"\n            height=\"24\"\n            viewBox=\"0 0 25 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Github\"\n          >\n            <path\n              d=\"M12.3047 0C5.50634 0 0 5.50942 0 12.3047C0 17.7423 3.52529 22.3535 8.41332 23.9787C9.02856 24.0946 9.25414 23.7142 9.25414 23.3871C9.25414 23.0949 9.24389 22.3207 9.23876 21.2953C5.81601 22.0377 5.09414 19.6444 5.09414 19.6444C4.53427 18.2243 3.72524 17.8449 3.72524 17.8449C2.61064 17.082 3.81137 17.0973 3.81137 17.0973C5.04697 17.1835 5.69604 18.3647 5.69604 18.3647C6.79321 20.2463 8.57636 19.7029 9.27978 19.3881C9.39052 18.5924 9.70736 18.0499 10.0591 17.7423C7.32641 17.4347 4.45429 16.3765 4.45429 11.6618C4.45429 10.3185 4.9311 9.22133 5.72065 8.36C5.58222 8.04931 5.16694 6.79833 5.82831 5.10337C5.82831 5.10337 6.85883 4.77319 9.2121 6.36459C10.1965 6.09082 11.2424 5.95546 12.2883 5.94931C13.3342 5.95546 14.3801 6.09082 15.3644 6.36459C17.7023 4.77319 18.7328 5.10337 18.7328 5.10337C19.3942 6.79833 18.9789 8.04931 18.8559 8.36C19.6403 9.22133 20.1171 10.3185 20.1171 11.6618C20.1171 16.3888 17.2409 17.4296 14.5031 17.7321C14.9338 18.1012 15.3337 18.8559 15.3337 20.0084C15.3337 21.6552 15.3183 22.978 15.3183 23.3779C15.3183 23.7009 15.5336 24.0854 16.1642 23.9623C21.0871 22.3484 24.6094 17.7341 24.6094 12.3047C24.6094 5.50942 19.0999 0 12.3047 0Z\"\n            />\n          </svg>\n        </a>\n        <a\n          href=\"https://twitter.com/angular\"\n          aria-label=\"Twitter\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Twitter\"\n          >\n            <path\n              d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"\n            />\n          </svg>\n        </a>\n        <a\n          href=\"https://www.youtube.com/channel/UCbn1OgGei-DV7aSRo_HaAiw\"\n          aria-label=\"Youtube\"\n          target=\"_blank\"\n          rel=\"noopener\"\n        >\n          <svg\n            width=\"29\"\n            height=\"20\"\n            viewBox=\"0 0 29 20\"\n            fill=\"none\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            alt=\"Youtube\"\n          >\n            <path\n              fill-rule=\"evenodd\"\n              clip-rule=\"evenodd\"\n              d=\"M27.4896 1.52422C27.9301 1.96749 28.2463 2.51866 28.4068 3.12258C29.0004 5.35161 29.0004 10 29.0004 10C29.0004 10 29.0004 14.6484 28.4068 16.8774C28.2463 17.4813 27.9301 18.0325 27.4896 18.4758C27.0492 18.9191 26.5 19.2389 25.8972 19.4032C23.6778 20 14.8068 20 14.8068 20C14.8068 20 5.93586 20 3.71651 19.4032C3.11363 19.2389 2.56449 18.9191 2.12405 18.4758C1.68361 18.0325 1.36732 17.4813 1.20683 16.8774C0.613281 14.6484 0.613281 10 0.613281 10C0.613281 10 0.613281 5.35161 1.20683 3.12258C1.36732 2.51866 1.68361 1.96749 2.12405 1.52422C2.56449 1.08095 3.11363 0.76113 3.71651 0.596774C5.93586 0 14.8068 0 14.8068 0C14.8068 0 23.6778 0 25.8972 0.596774C26.5 0.76113 27.0492 1.08095 27.4896 1.52422ZM19.3229 10L11.9036 5.77905V14.221L19.3229 10Z\"\n            />\n          </svg>\n        </a>\n      </div>\n    </div>\n  </div>\n</main>\n\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content above * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced.  * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * End of Placeholder  * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n\n\n<router-outlet />\n"
  },
  {
    "path": "src/app/app.module.ts",
    "content": "\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\nimport { SearchBarComponent } from './search-bar/search-bar.component';\nimport { FiltersComponent } from './filters/filters.component';\nimport { ShowcaseComponent } from './showcase/showcase.component';\nimport { CartComponent } from './cart/cart.component';\nimport { ProductThumbnailComponent } from './product-thumbnail/product-thumbnail.component';\nimport { SortFiltersComponent } from './sort-filters/sort-filters.component';\n\nimport { DataService } from './data.service';\nimport { CartService } from './cart.service';\nimport { UrlFormComponent } from './url-form/url-form.component';\n\n@NgModule({\n  providers: [\n    CartService\n  ],\n})\nexport class AppModule { }\n"
  },
  {
    "path": "src/app/app.routes.ts",
    "content": "import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"
  },
  {
    "path": "src/app/app.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\nimport { App } from './app';\n\ndescribe('App', () => {\n  beforeEach(async () => {\n    await TestBed.configureTestingModule({\n      imports: [App],\n    }).compileComponents();\n  });\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(App);\n    const app = fixture.componentInstance;\n    expect(app).toBeTruthy();\n  });\n\n  it('should render title', () => {\n    const fixture = TestBed.createComponent(App);\n    fixture.detectChanges();\n    const compiled = fixture.nativeElement as HTMLElement;\n    expect(compiled.querySelector('h1')?.textContent).toContain('Hello, angular-shop2');\n  });\n});\n"
  },
  {
    "path": "src/app/app.ts",
    "content": "import { Component, OnInit } from '@angular/core';\nimport { Product } from './shared/product.model';\nimport { DataService } from './data.service';\nimport { CartService } from './cart.service';\nimport { ViewChild } from '@angular/core';\n\nimport { FiltersComponent } from './filters/filters.component';\nimport { SearchBarComponent } from './search-bar/search-bar.component';\nimport { ShowcaseComponent } from './showcase/showcase.component';\nimport { CartComponent } from './cart/cart.component';\nimport { SortFiltersComponent } from './sort-filters/sort-filters.component';\nimport { UrlFormComponent } from './url-form/url-form.component';\n\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss'],\n  imports: [\n    SearchBarComponent,\n    FiltersComponent,\n    ShowcaseComponent,\n    CartComponent,\n    SortFiltersComponent,\n    UrlFormComponent,\n  ],\n  providers: [DataService, CartService]\n})\nexport class App implements OnInit {\n\n  products: Product[] = [];\n\n  mainFilter: any;\n\n  currentSorting: string = '';\n\n  @ViewChild('filtersComponent')\n  filtersComponent!: FiltersComponent;\n\n  @ViewChild('searchComponent')\n  searchComponent!: SearchBarComponent;\n\n  sortFilters: any[] = [\n    { name: 'Nombre (A to Z)', value: 'name' },\n    { name: 'Precio (low to high)', value: 'priceAsc' },\n    { name: 'Precio (high to low)', value: 'priceDes' }\n  ];\n\n  customFilters: any[] = [\n    { name: 'Todo', value: 'all', checked: true },\n    { name: 'Disponible', value: 'available', checked: false },\n    { name: 'No disponible', value: 'unavailable', checked: false },\n    { name: 'Mejor vendido', value: 'bestseller', checked: false }\n  ];\n\n  priceFilters: any[] = [\n    { name: 'Todo', value: 'all', checked: true },\n    { name: 'Precio > 30.000', value: 'more_30000', checked: false },\n    { name: 'Precio < 10.000', value: 'less_10000', checked: false }\n  ];\n\n  originalData: any = [];\n\n  constructor(private dataService: DataService, private cartService: CartService) {  }\n\n  ngOnInit() {\n\n\n    this.dataService.getData().then(data => {\n      this.originalData = data;\n      this.mainFilter = {\n        search: '',\n        categories: this.originalData.categories.slice(0),\n        customFilter: this.customFilters[0],\n        priceFilter: this.priceFilters[0]\n      };\n\n      // Make a deep copy of the original data to keep it immutable\n      this.products = this.originalData.products.slice(0);\n      this.sortProducts('name');\n    });\n  }\n\n  onURLChange(url: string) {\n    this.dataService.getRemoteData(url).subscribe((data: any) => {\n      this.originalData = data;\n      this.mainFilter = {\n        search: '',\n        categories: this.originalData.categories.slice(0),\n        customFilter: this.customFilters[0],\n        priceFilter: this.priceFilters[0]\n      };\n\n      // Make a deep copy of the original data to keep it immutable\n      this.products = this.originalData.products.slice(0);\n      this.sortProducts('name');\n      this.filtersComponent.reset(this.customFilters, this.priceFilters);\n      this.searchComponent.reset();\n      this.cartService.flushCart();\n    });\n  }\n\n\n\n  onSearchChange(search: any) {\n    this.mainFilter.search = search.search;\n    this.updateProducts({\n      type: 'search',\n      change: search.change\n    });\n  }\n\n  onFilterChange(data: any) {\n    if (data.type === 'category') {\n      if (data.isChecked) {\n        this.mainFilter.categories.push(data.filter);\n      } else {\n        this.mainFilter.categories = this.mainFilter.categories.filter(\n          (category: any) => {\n            return category.categori_id !== data.filter.categori_id;\n          });\n      }\n    } else if (data.type === 'custom') {\n      this.mainFilter.customFilter = data.filter;\n    } else if (data.type === 'price') {\n      this.mainFilter.priceFilter = data.filter;\n    }\n    this.updateProducts({\n      type: data.type,\n      change: data.change\n    });\n  }\n\n  updateProducts(filter: any) {\n    let productsSource = this.originalData.products;\n    const prevProducts = this.products;\n    let filterAllData = true;\n    if ((filter.type === 'search' && filter.change === 1) || (filter.type === 'category' && filter.change === -1)) {\n      productsSource = this.products;\n      filterAllData = false;\n    }\n    // console.log('filtering ' + productsSource.length + ' products')\n\n    this.products = productsSource.filter((product: any) => {\n      // Filter by search\n      if (filterAllData || filter.type === 'search') {\n        if (!product.name.match(new RegExp(this.mainFilter.search, 'i'))) {\n          return false;\n        }\n      }\n\n      // Filter by categories\n      if (filterAllData || filter.type === 'category') {\n        let passCategoryFilter = false;\n        product.categories.forEach((product_category: any) => {\n          if (!passCategoryFilter) {\n            passCategoryFilter = this.mainFilter.categories.reduce((found: any, category: any) => {\n                return found || product_category === category.categori_id;\n            }, false);\n          }\n        });\n        if (!passCategoryFilter) {\n          return false;\n        }\n      }\n\n      // Filter by custom filters\n      if (filterAllData || filter.type === 'custom') {\n        let passCustomFilter = false;\n        const customFilter = this.mainFilter.customFilter.value;\n        if (customFilter === 'all') {\n          passCustomFilter = true;\n        } else if (customFilter === 'available' && product.available) {\n          passCustomFilter = true;\n        } else if (customFilter === 'unavailable' && !product.available) {\n          passCustomFilter = true;\n        } else if (customFilter === 'bestseller' && product.best_seller) {\n          passCustomFilter = true;\n        }\n        if (!passCustomFilter) {\n          return false;\n        }\n      }\n\n      // Filter by price filters\n      if (filterAllData || filter.type === 'price') {\n        let passPriceFilter = false;\n        const customFilter = this.mainFilter.priceFilter.value;\n        const productPrice = parseFloat(product.price.replace(/\\./g, '').replace(',', '.'));\n        if (customFilter === 'all') {\n          passPriceFilter = true;\n        } else if (customFilter === 'more_30000' && productPrice > 30000) {\n          passPriceFilter = true;\n        } else if (customFilter === 'less_10000' && productPrice < 10000) {\n          passPriceFilter = true;\n        }\n        if (!passPriceFilter) {\n          return false;\n        }\n      }\n\n      return true;\n    });\n\n    // If the number of products increased after the filter has been applied then sort again\n    // If the number of products remained equal, there's a high chance that the items have been reordered.\n    if (prevProducts.length <= this.products.length && this.products.length > 1) {\n      this.sortProducts(this.currentSorting);\n    }\n\n    // These two types of filters usually add new data to the products showcase so a sort is necessary\n    if (filter.type === 'custom' || filter.type === 'price') {\n      this.sortProducts(this.currentSorting);\n    }\n  }\n\n  sortProducts(criteria: any) {\n    // console.log('sorting ' + this.products.length + ' products')\n    this.products.sort((a, b) => {\n      const priceComparison = parseFloat(a.price.replace(/\\./g, '')\n      .replace(',', '.')) - parseFloat(b.price.replace(/\\./g, '').replace(',', '.'));\n      if (criteria === 'priceDes') {\n        return -priceComparison;\n      } else if (criteria === 'priceAsc') {\n        return  priceComparison;\n      } else if (criteria === 'name') {\n        const nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();\n        if (nameA < nameB) {\n          return -1;\n        }\n        if (nameA > nameB) {\n          return 1;\n        }\n        return 0;\n      } else {\n        // Keep the same order in case of any unexpected sort criteria\n        return -1;\n      }\n    });\n    this.currentSorting = criteria;\n  }\n}\n"
  },
  {
    "path": "src/app/cart/cart.component.html",
    "content": "<div class=\"preview\" [class.expanded]='expanded'>\n  <button [class.not-shown]='!products.length || expanded' type=\"button\" class=\"circle\" (click)=\"onCartClick()\">\n    <img src=\"assets/cart_white.svg\" alt=\"cart\" />\n    <div class=\"indicator\"><span>{{numProducts}}</span></div>\n  </button>\n  <div class=\"fill\" [style.height]=\"expanded ? expandedHeight : inherit\" [class.not-shown]='!products.length' [class.animate-plop]='animatePlop' [class.shown]='animatePopout && !expanded'>\n    <div class=\"expanded-info\" [class.shown]='expanded'>\n      <h3>Esta es tu lista de compras:</h3>\n      @for (item of products; track item.id) {\n        <div class=\"product\">\n          <div class=\"row\">\n            <div class=\"col-6-sm description\">\n              <p>{{item.quantity}} x {{item.product.name}}</p>\n            </div>\n            <div class=\"col-6-sm price\">\n              <p>{{item.quantity * item.product.parsedPrice}}</p>\n            </div>\n          </div>\n          <button class=\"delete-btn\" (click)='deleteProduct(item.product)'>x</button>\n        </div>\n      }\n      <button type=\"button\" class=\"pay-btn\">Pagar {{cartTotal}}</button>\n    </div>\n    @if (expanded) {\n      <button type=\"button\" class=\"close-btn\" (click)=\"onCartClick()\">Cerrar</button>\n    }\n  </div>\n</div>\n<div class=\"overlay\" [class.shown]='expanded'>\n\n</div>\n"
  },
  {
    "path": "src/app/cart/cart.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n.preview {\n  position: relative;\n  .fill {\n    position: absolute;\n    top: 0;\n    left: 0;\n  }\n}\n\n.close-btn {\n  position: absolute;\n  top: 6px;\n  right: 5px;\n  background: none;\n  border: none;\n  color: white;\n  font-size: 0.7em;\n  font-weight: 600;\n  text-decoration: underline;\n  opacity: 0.8;\n  &:hover {\n    opacity: 1;\n  }\n}\n\n.pay-btn {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n  border-radius: 44px;\n  height: 44px;\n  padding: 0 25px;\n  border: none;\n  background-color: #EF364C;\n  box-shadow: 0 2px 19px rgba(0, 0, 0, 0.32);\n  color: white;\n  font-weight: 600;\n  margin-top: 20px;\n}\n\n.expanded-info {\n  opacity: 0;\n  z-index: -1;\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  color: white;\n  width: 80%;\n  margin: 0 auto;\n  .product, h3, .pay-btn{\n    opacity: 0;\n    transform: translateY(10px);\n    -webkit-transform: translateY(10px);\n    @include transition-fade(0.5s);\n  }\n  .price {\n    text-align: right;\n  }\n  &.shown {\n    opacity: 1;\n    z-index: 3;\n    .product, h3, .pay-btn {\n      transform: translateY(0);\n      -webkit-transform: translateY(0);\n    }\n    h3 {\n      -webkit-transition-delay: 0.2s;\n      transition-delay: 0.2s;\n      opacity: 0.43;\n    }\n\n    .product {\n      -webkit-transition-delay: 0.4s;\n      transition-delay: 0.4s;\n      opacity: 1;\n    }\n\n    .pay-btn {\n      -webkit-transition-delay: 0.6s;\n      transition-delay: 0.6s;\n      opacity: 1;\n    }\n  }\n  h3 {\n    font-weight: 400;\n    font-size: 16px;\n    margin-top: 30px;\n  }\n  .product {\n    position: relative;\n    width: 95%;\n    p {\n      margin: 0;\n    }\n    &:not(:last-child) {\n      border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n    }\n    .delete-btn {\n      position: absolute;\n      right: -28px;\n      top: 14px;\n      background: none;\n      border: none;\n      opacity: 0.6;\n      color: white;\n      font-weight: 600;\n      font-size: 0.8em;\n      &:hover {\n        opacity: 0.8;\n      }\n    }\n  }\n}\n\n.preview.expanded {\n  .fill {\n    width: 460px;\n    border-radius: 3px;\n    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.49);\n    &.animate-plop {\n      -webkit-transform: scale(1.02);\n      transform: scale(1.02);\n    }\n  }\n}\n\n\n.preview:not(.expanded) .fill:hover {\n  box-shadow: 0 2px 13px rgba(49, 46, 82, 0.65);\n}\n\n\n.preview {\n  .fill {\n    height: 40px;\n    width: 40px;\n    box-shadow: 0 2px 13px rgba(93, 78, 240, 0.55);\n    background: $primary-color;\n    border-radius: 50px;\n    z-index: 4;\n    @include transition-fade-circ(0.35s);\n\n    &.not-shown {\n      -webkit-transform: scale(0);\n      transform: scale(0);\n    }\n    &.shown {\n      -webkit-transform: scale(1.3);\n      transform: scale(1.3);\n    }\n    &.animate-plop {\n      -webkit-transform: scale(1.35);\n      transform: scale(1.35);\n    }\n  }\n  .circle {\n    height: 40px;\n    width: 40px;\n    border: none;\n    padding: 0;\n    border-radius: 50px;\n    position: relative;\n    z-index: 5;\n    background: none;\n    @include transition-fade-circ(0.2s);\n    img {\n      position: relative;\n      top: 3px;\n      left: -1px;\n    }\n    &.not-shown {\n      -webkit-transform: scale(0);\n      transform: scale(0);\n    }\n  }\n  .indicator {\n    background-color: #EF364C;\n    height: 14px;\n    width: 14px;\n    border-radius: 50%;\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);\n    color: white;\n    position: absolute;\n    top: -3px;\n    font-size: 0.6em;\n    right: 0;\n    font-weight: 700;\n    text-align: center;\n    span {\n      position: relative;\n      top: 1px;\n    }\n  }\n}\n\n.overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 0;\n  opacity: 0;\n  @include transition-fade-circ(0.4s);\n  background-color: rgba(0, 0, 0, 0.7);\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n\n    .overlay.shown {\n        height: 100%;\n        opacity: 1;\n        z-index: 9;\n    }\n\n    .pay-btn {\n      margin-top: 35px;\n    }\n    .close-btn {\n      z-index: 90;\n    }\n    .description, .price {\n      p {\n        font-size: 1em;\n      }\n    }\n    .expanded-info {\n      width: 90%;\n      h3 {\n        font-size: 0.9em;\n      }\n      .product .delete-btn {\n        right: -21px;\n        top: 10px;\n      }\n    }\n    .preview {\n      position: fixed;\n      bottom: 3%;\n      right: 5%;\n      width: 13%;\n      @include transition-fade-circ(0.3s);\n      .fill {\n        box-shadow: 0 2px 13px rgba(93, 78, 240, 0.75);\n      }\n      &.expanded {\n        width: 90%;\n        margin: 0 auto;\n        bottom: 75%;\n        z-index: 800;\n        .fill {\n          width: 100%;\n        }\n      }\n    }\n  }\n"
  },
  {
    "path": "src/app/cart/cart.component.ts",
    "content": "import { Component, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { CartService } from '../cart.service';\nimport { CommonModule } from '@angular/common';\n\nconst OFFSET_HEIGHT = 170;\nconst PRODUCT_HEIGHT = 48;\n\n@Component({\n  selector: 'app-cart',\n  templateUrl: './cart.component.html',\n  styleUrls: ['./cart.component.scss'],\n  imports: [CommonModule]\n})\nexport class CartComponent implements OnInit {\n\n  products: any[] = [];\n  numProducts = 0;\n  animatePlop = false;\n  animatePopout = false;\n  expanded = false;\n  expandedHeight: string = '';\n  cartTotal = 0;\n  inherit: string = '';\n\n  changeDetectorRef: ChangeDetectorRef;\n\n\n  constructor(private cartService: CartService, changeDetectorRef: ChangeDetectorRef) {\n    this.changeDetectorRef = changeDetectorRef;\n  }\n\n  ngOnInit() {\n    this.expandedHeight = '0';\n    this.cartService.productAdded$.subscribe((data: any) => {\n      this.products = data.products;\n      this.cartTotal = data.cartTotal;\n      this.numProducts = data.products.reduce((acc: any, product: any) => {\n        acc += product.quantity;\n        return acc;\n      }, 0);\n\n      // Make a plop animation\n      if (this.numProducts > 1) {\n        this.animatePlop = true;\n        setTimeout(() => {\n          this.animatePlop = false;\n        }, 160);\n      } else if (this.numProducts === 1) {\n        this.animatePopout = true;\n        setTimeout(() => {\n          this.animatePopout = false;\n        }, 300);\n      }\n      this.expandedHeight = (this.products.length * PRODUCT_HEIGHT + OFFSET_HEIGHT) + 'px';\n      if (!this.products.length) {\n        this.expanded = false;\n      }\n      this.changeDetectorRef.detectChanges();\n    });\n  }\n\n  deleteProduct(product: any) {\n    this.cartService.deleteProductFromCart(product);\n  }\n\n  onCartClick() {\n    this.expanded = !this.expanded;\n  }\n\n}\n"
  },
  {
    "path": "src/app/cart.service.ts",
    "content": "import { Injectable } from '@angular/core';\nimport { Product } from './shared/product.model';\nimport { Subject } from 'rxjs';\n\n\n@Injectable()\nexport class CartService {\n\n  products: any[] = [];\n  cartTotal = 0;\n\n  private productAddedSource = new Subject<any>();\n\n\n  productAdded$ = this.productAddedSource.asObservable();\n\n  constructor() { }\n\n  addProductToCart(product: any) {\n    let exists = false;\n    const parsedPrice = parseFloat(product.price.replace(/\\./g, '').replace(',', '.'));\n    this.cartTotal += parsedPrice;\n    // Search this product on the cart and increment the quantity\n    this.products = this.products.map(_product => {\n      if (_product.product.id === product.id) {\n        _product.quantity++;\n        exists = true;\n      }\n      return _product;\n    });\n    // Add a new product to the cart if it's a new product\n    if (!exists) {\n      product.parsedPrice = parsedPrice;\n      this.products.push({\n        product: product,\n        quantity: 1\n      });\n    }\n\n    this.productAddedSource.next({ products: this.products, cartTotal: this.cartTotal });\n  }\n\n  deleteProductFromCart(product: any) {\n    this.products = this.products.filter(_product => {\n      if (_product.product.id === product.id) {\n        this.cartTotal -= _product.product.parsedPrice * _product.quantity;\n        return false;\n      }\n      return true;\n     });\n    this.productAddedSource.next({ products: this.products, cartTotal: this.cartTotal });\n  }\n\n\n  flushCart() {\n    this.products = [];\n    this.cartTotal = 0;\n    this.productAddedSource.next({ products: this.products, cartTotal: this.cartTotal });\n  }\n}\n"
  },
  {
    "path": "src/app/data.service.ts",
    "content": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { Observable, of, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { DATA } from './mock-data';\n\n@Injectable({ providedIn: 'root' })\nexport class DataService {\n  constructor(private http: HttpClient) {}\n\n  /** Local mock data — use Observable for consistency */\n  getData(): Promise<any> {\n    return Promise.resolve(DATA);\n  }\n\n  /** Remote data — HttpClient already parses JSON */\n  getRemoteData<T = any>(url: string): Observable<T> {\n    return this.http.get<T>(url).pipe(\n      catchError(this.handleError)\n    );\n  }\n\n  private handleError(error: HttpErrorResponse) {\n    const message =\n      error.error?.message ||\n      (typeof error.error === 'string' && error.error) ||\n      `${error.status} - ${error.statusText || 'Server error'}`;\n    console.error('HTTP error:', error);\n    return throwError(() => new Error(message));\n  }\n}\n"
  },
  {
    "path": "src/app/filters/filters.component.html",
    "content": "<button type=\"button\" class=\"toggle-btn\" (click)=\"sideShown = true\">Filtros</button>\n<div class=\"filters\" [class.side-shown]=\"sideShown\">\n  <button type=\"button\" class=\"close-side-btn\" (click)=\"sideShown = false\">x</button>\n  <h5>Filtrar por categoría</h5>\n  @if (showFilters) {\n    <form>\n      @for (filter of categories; track $index) {\n        <div class=\"category-filter filter-wrapper\">\n          <label class=\"fake-checkbox\">\n            <input type=\"checkbox\" checked (change)='onInputChange($event, filter, \"category\")'>\n            <span class=\"square\"><span class=\"fill\"></span></span>\n            <span class=\"label\">{{filter.name}}</span>\n            <span></span>\n          </label>\n        </div>\n      }\n    </form>\n  }\n  <h5>Filtrar por precio</h5>\n\n  @if (showFilters) {\n    <form>\n      @for (filter of priceFilters; track $index) {\n        <div class=\"custom-filter filter-wrapper\">\n            <label class=\"fake-checkbox\">\n              <input type=\"radio\" name=\"price\" [checked]='filter.checked' (click)='onInputChange($event, filter, \"price\")'>\n              <span class=\"circle\"><span class=\"fill\"></span></span>\n              <span class=\"label\">{{filter.name}}</span>\n              <span></span>\n            </label>\n        </div>\n      }\n    </form>\n  }\n  <h5>Filtros personalizados</h5>\n  @if (showFilters) {\n    <form>\n      @for (filter of customFilters; track $index) {\n        <div class=\"custom-filter filter-wrapper\">\n            <label class=\"fake-checkbox\">\n              <input type=\"radio\" name=\"custom\" [checked]='filter.checked' (click)='onInputChange($event, filter, \"custom\")'>\n              <span class=\"circle\"><span class=\"fill\"></span></span>\n              <span class=\"label\">{{filter.name}}</span>\n              <span></span>\n            </label>\n        </div>\n      }\n    </form>\n  }\n</div>\n"
  },
  {
    "path": "src/app/filters/filters.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n.filters{\n  border: 1px solid #333333;\n  padding: 20px;\n  width: 100%;\n  box-shadow: 0 5px 15px rgba(0,0,0,0.1);\n  background-color: white;\n  border: none;\n  border-radius: 4px;\n  padding-top: 1px;\n  position: relative;\n}\n\n.filter{\n  width: 100%;\n  background: #999999;\n  border-radius: 3px;\n  margin-bottom: 10px;\n  height: 35px;\n}\n\n.fake-checkbox{\n  position: relative;\n}\n\n.filter-wrapper{\n  margin-bottom: 8px;\n  label{\n    cursor: pointer;\n    &:hover .label{\n\n    }\n  }\n  input[type=checkbox], input[type=radio]{\n    display: none;\n    &:checked + .square, &:checked + .circle{\n      opacity: 1;\n    }\n    &:checked + .square .fill, &:checked + .circle .fill{\n      opacity: 1;\n    }\n    &:checked ~ .label{\n      opacity: 1;\n    }\n  }\n  .square, .circle, .fill{\n    display: inline-block;\n  }\n  .square, .circle{\n    height: 16px;\n    width: 16px;\n    border: 1px solid $primary-color;\n    position: relative;\n    opacity: 0.4;\n    .fill{\n      height: 10px;\n      width: 10px;\n      background-color: $primary-color;\n      @include transition-fade-circ(0.25s);\n      position: absolute;\n      opacity: 0;\n    }\n  }\n  .square{\n    border-radius: 3px;\n    .fill{\n      border-radius: 2px;\n    }\n  }\n  .circle{\n    border-radius: 50%;\n    .fill{\n      border-radius: 50%;\n    }\n  }\n  .fill{\n    top: 3px;\n    left: 3px;\n  }\n  .label{\n    text-transform: capitalize;\n    position: relative;\n    top: -4px;\n    margin-left: 7px;\n    opacity: 0.6;\n    @include transition-fade(0.4s);\n  }\n}\n\nh5{\n  text-transform: uppercase;\n  color: #bababa;\n  font-size: 0.8em;\n  font-weight: 600;\n  &:after{\n    content: \"\";\n    display: block;\n    width: 100%;\n    height: 1px;\n    margin-top: 3px;\n    background-color: #e8e8e8;\n  }\n}\n\n.toggle-btn{\n  display: none;\n}\n\n.close-side-btn{\n  display: none;\n  background: none;\n  border: none;\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    .close-side-btn{\n      display: block;\n      position: absolute;\n      color: #aaaaaa;\n      font-size: 1.2em;\n      font-weight: 300;\n      right: 18px;\n      top: 6px;\n      opacity: 0.7;\n    }\n    .toggle-btn{\n      display: inline-block;\n      position: absolute;\n      left: -69px;\n      top: 11px;\n      background: white;\n      border-radius: 3px;\n      color: #5D4EF0;\n      padding: 4px 11px;\n      border: none;\n      font-size: 0.8em;\n      font-weight: 600;\n      box-shadow: 0 2px 15px rgba(0,0,0,0.4);\n    }\n    .filters{\n      width: initial;\n      position: relative;\n      box-shadow: none;\n      border-radius: 0;\n      height: 100%;\n      @include transition-fade-circ(0.35s);\n      &.side-shown{\n        -webkit-transform: translateX(-100%);\n        transform: translateX(-100%);\n      }\n    }\n  }\n"
  },
  {
    "path": "src/app/filters/filters.component.ts",
    "content": "import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { Category } from '../shared/category.model';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n  selector: 'app-filters',\n  templateUrl: './filters.component.html',\n  styleUrls: ['./filters.component.scss'],\n  imports: [CommonModule]\n})\nexport class FiltersComponent implements OnInit {\n\n  @Input()\n  categories: Category[] = [];\n\n  @Input()\n  customFilters: any[] = [];\n\n  @Input()\n  priceFilters: any[] = [];\n\n  @Input()\n  filter: any = {};\n\n  @Output()\n  filterChange = new EventEmitter<any>();\n\n\n  showFilters = true;\n\n  sideShown = false;\n\n  constructor() { }\n\n  ngOnInit() {\n  }\n\n  reset(customFilters: any, priceFilters: any) {\n    this.customFilters = customFilters;\n    this.priceFilters = priceFilters;\n    this.showFilters = false;\n    setTimeout(() => {\n      this.showFilters = true;\n    });\n  }\n\n  onInputChange($event: any, filter: any, type: any) {\n    const change = $event.target.checked ? 1 : -1;\n    this.filterChange.emit({\n      type: type,\n      filter: filter,\n      isChecked: $event.target.checked,\n      change: change\n    });\n  }\n}\n"
  },
  {
    "path": "src/app/index.ts",
    "content": "export * from './app.component';\nexport * from './app.module';\n"
  },
  {
    "path": "src/app/mock-data.ts",
    "content": "export const DATA: any  = {\n  'categories': [\n    {\n      'categori_id': 1,\n      'name': 'bebidas'\n    },\n    {\n      'categori_id': 2,\n      'name': 'almuerzo'\n    },\n    {\n      'categori_id': 3,\n      'name': 'comida'\n    },\n    {\n      'categori_id': 4,\n      'name': 'mar'\n    }\n  ],\n  'products': [\n    {\n      'id': 1,\n      'name': 'Lorem',\n      'price': '60.000',\n      'available': true,\n      'best_seller': true,\n      'categories': [\n        1,\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 2,\n      'name': 'ipsum',\n      'price': '20.000',\n      'available': false,\n      'best_seller': false,\n      'categories': [\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 3,\n      'name': 'dolor',\n      'price': '10.000',\n      'available': true,\n      'best_seller': true,\n      'categories': [\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 4,\n      'name': 'sit',\n      'price': '35.000',\n      'available': false,\n      'best_seller': false,\n      'categories': [\n        1,\n        2\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 5,\n      'name': 'amet',\n      'price': '12.000',\n      'available': true,\n      'best_seller': true,\n      'categories': [\n        1,\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 6,\n      'name': 'consectetur',\n      'price': '120.000',\n      'available': true,\n      'best_seller': false,\n      'categories': [\n        1,\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 7,\n      'name': 'adipiscing',\n      'price': '50.000',\n      'available': false,\n      'best_seller': false,\n      'categories': [\n        1,\n        3\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 8,\n      'name': 'elit',\n      'price': '2000',\n      'available': true,\n      'best_seller': false,\n      'categories': [\n        1,\n        3\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 9,\n      'name': 'Maecenas',\n      'price': '150.000',\n      'available': true,\n      'best_seller': true,\n      'categories': [\n        2,\n        4\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    },\n    {\n      'id': 10,\n      'name': 'eu',\n      'price': '200.000',\n      'available': false,\n      'best_seller': true,\n      'categories': [\n        2,\n        3\n      ],\n      'img': 'https://placehold.co/200x100',\n      'description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu.'\n    }\n  ]\n};\n"
  },
  {
    "path": "src/app/product-thumbnail/product-thumbnail.component.html",
    "content": "<div class=\"wrapper\" [class.unavailable]='!product.available'>\n  <div class=\"info\" >\n    <div class=\"img-wrapper\">\n      <img class=\"img\" [src]='product.img'>\n      <div class=\"img-placeholder\"></div>\n    </div>\n    <h5 class=\"title\">{{product.name}}</h5>\n    <p class=\"price\">$<span>{{product.price}}</span></p>\n    <div class=\"details\">\n      @if (product.available) {\n        <div class=\"available\">\n          <hr>\n          <div class=\"row\">\n            <div class=\"col-8-sm view-details-wrapper\">\n              <button type=\"button\" class=\"view\" (click)='onProductClick()'>Ver detalles</button>\n            </div>\n            <div class=\"col-4-sm add-cart-wrapper\">\n              <button type=\"button\" class=\"cart\" (click)=\"onAddToCart()\"><img src=\"assets/cart_primary.svg\" alt=\"\" /></button>\n            </div>\n          </div>\n        </div>\n      }\n      @if (!product.available) {\n        <div class=\"not-available\">\n          <hr>\n          <p>No disponible</p>\n        </div>\n      }\n    </div>\n    <div class=\"detail-view\" [class.active]='detailViewActive'>\n      <div class=\"bg\" [class.shown]='detailViewActive'></div>\n      <div class=\"info-wrapper\">\n        <p class=\"d-holder d-title\">{{product.name}}</p>\n        <p class=\"d-holder d-price\">$ {{product.price}}</p>\n        <p class=\"d-holder d-description\">{{product.description}}</p>\n      </div>\n      <button type=\"button\" class=\"hide-detail-btn\" (click)='onProductClick()'>Ocultar</button>\n    </div>\n  </div>\n  @if (product.best_seller) {\n    <div class=\"bestseller-badge\" [class.in-detailed]='detailViewActive'>\n      <span class=\"star left\">&nbsp;</span>\n      <span class=\"txt\">Bestseller</span>\n      <span class=\"star right\">&nbsp;</span>\n    </div>\n  }\n</div>\n"
  },
  {
    "path": "src/app/product-thumbnail/product-thumbnail.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n:host {\n  display: block;\n  height: 210px;\n}\n\n.wrapper{\n  border-radius: 5px;\n  box-shadow: 0 5px 5px;\n  position: relative;\n  text-align: center;\n  display: block;\n  background-color: white;\n  box-shadow: 0 6px 17px rgba(0,0,0,0.07);\n}\n\n.add-cart-wrapper, .view-details-wrapper{\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.view-details-wrapper{\n  position: relative;\n  &:after{\n    content: \"\";\n    width: 1px;\n    display: block;\n    position: absolute;\n    height: 28px;\n    background-color: #5D4EF0;\n    right: -3px;\n    top: -4px;\n    opacity: 0.2;\n  }\n}\n\n.hide-detail-btn{\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  text-align: center;\n  width: 100%;\n  z-index: 20;\n  background: none;\n  border: none;\n  color: white;\n  opacity: 0.6;\n  font-size: 0.7em;\n  font-weight: 600;\n  cursor: pointer;\n  background: rgba(255, 255, 255, 0.1);\n  @include transition-fade-circ(0.5s);\n  -webkit-transform: translateY(15px);\n  transform: translateY(15px);\n  -webkit-transition-delay: 1.2s;\n  transition-delay: 1.2s;\n  &:hover{\n    background: rgba(255, 255, 255, 0.2);\n  }\n}\n\n.img-wrapper{\n  height: 85px;\n  position: relative;\n  overflow: hidden;\n\n}\n\n::-webkit-scrollbar {\n  display: none;\n}\n\n.details{\n  padding-bottom: 7px;\n  hr{\n    width: 90%;\n    height: 0;\n    border-top: 1px solid $primary-color;\n  }\n  button{\n    background: none;\n    border: none;\n    cursor: pointer;\n  }\n  .view:hover, .cart:hover{\n    opacity: 0.8;\n  }\n  .view{\n    text-transform: uppercase;\n    color: $primary-color;\n    font-size: 0.85em;\n    font-weight: 500;\n    position: relative;\n    top: -1px;\n    left: -2px;\n  }\n  .cart{\n    position: relative;\n    top: 2px;\n  }\n  .not-available{\n    hr{\n      border-top: 1px solid #999999;\n    }\n    p{\n      margin: 0;\n      margin-top: -7px;\n      position: relative;\n      top: 2px;\n      text-transform: uppercase;\n      font-size: 0.85em;\n      font-weight: 500;\n      padding-top: 5px;\n      padding-bottom: 3px;\n    }\n  }\n}\n\n.img-placeholder, .img{\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  border-radius: 5px 5px 0 0;\n}\n\n.img-placeholder{\n  z-index: 3;\n  height: 100%;\n  background: #dddddd;\n}\n\n.detail-view{\n  position: absolute;\n  z-index: 30;\n  border-radius: 5px;\n  overflow: hidden;\n  top: 0;\n  height: 100%;\n  width: 100%;\n  pointer-events: none;\n\n  &.active{\n    pointer-events: all;\n    .hide-detail-btn{\n      -webkit-transform: translateY(0);\n      transform: translateY(0);\n    }\n\n    .info-wrapper{\n      opacity: 1;\n    }\n    .bg{\n      -webkit-transform: scale(232);\n      transform: scale(232);\n    }\n    .d-holder{\n      opacity: 1;\n      -webkit-transform: translate(0);\n      transform: translate(0);\n      @include transition-fade(0.5s);\n    }\n    .d-title{\n    -webkit-transition-delay: 0.8;\n      transition-delay: 0.4s;\n    }\n    .d-price{\n    -webkit-transition-delay: 0.8;\n      transition-delay: 0.5s;\n    }\n    .d-description{\n    -webkit-transition-delay: 0.8;\n      transition-delay: 0.6s;\n    }\n\n  }\n  .d-holder{\n    opacity: 0;\n    -webkit-transform: translateY(10px);\n    transform: translateY(10px);\n    @include transition-fade(0.1s);\n  }\n  .d-title{\n    font-size: 1.3em;\n    font-weight: 600;\n    margin-bottom: 0;\n    margin-top: 5px;\n  }\n  .d-price{\n    margin-top: -7px;\n    font-size: 0.9em;\n  }\n  .d-description{\n    font-size: 0.9em;\n    line-height: 1.4em;\n  }\n  .info-wrapper{\n    position: relative;\n    z-index: 30;\n    color: white;\n    text-align: left;\n    padding-left: 14px;\n    padding-right: 14px;\n    height: 90%;\n    overflow: scroll;\n  }\n  .bg{\n    position: absolute;\n    bottom: -9px;\n    left: 43px;\n    height: 3px;\n    width: 3px;\n    border-radius: 50%;\n    z-index: 20;\n    background: $primary-color;\n    @include transition-fade-circ(0.4s);\n  }\n}\n\n.info{\n  position: relative;\n}\n\n.unavailable{\n  opacity: 0.3;\n}\n\n.img{\n  z-index: 5;\n  height: auto;\n  background-color: #eeeeee;\n}\n\n.title{\n  font-size: 1em;\n  margin-top: 18px;\n  font-weight: 600;\n  margin-bottom: 3px;\n}\n\n.price{\n  margin-bottom: 10px;\n  color: #999999;\n  font-size: 18px;\n  font-weight: 300;\n  margin-top: 0;\n}\n\n.bestseller-badge{\n  position: absolute;\n  top: -10px;\n  border-radius: 10px;\n  background-color: #EF364C;\n  color: white;\n  font-size: 0.7em;\n  left: 0;\n  right: 0;\n  margin: 0 auto;\n  width: 70%;\n  z-index: 40;\n  text-transform: uppercase;\n  font-weight: 600;\n  letter-spacing: 0.1em;\n  overflow: hidden;\n  height: 20px;\n  @include transition-fade-circ(0.35s);\n  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.48);\n  .txt, .star{\n      @include transition-fade(0.35s);\n  }\n  .txt{\n    position: relative;\n    top: 4px;\n  }\n  .star{\n    position: absolute;\n    top: 2px;\n    &.left{\n      left: 8px;\n    }\n    &.right{\n      right: 14px;\n    }\n  }\n  &.in-detailed{\n    box-shadow: 0 2px 7px rgba(0, 0, 0, 0);\n    width: 20px;\n    height: 20px;\n    padding: 0;\n    top: 9px;\n    right: -80%;\n    background-color: $primary-color;\n    .right, .txt{\n      opacity: 0;\n    }\n    .left{\n      left: 5px;\n      top: 2px;\n    }\n  }\n}\n\n.sad-face{\n  border-radius: 50%;\n  background-color: #aaaaaa;\n  height: 90px;\n  width: 90px;\n}\n\n.category-name{\n  display: inline-block;\n  margin-right: 10px;\n}\n\n.star{\n  &:before{\n    content: \"\\2605\";\n    position: absolute;\n    color: white;\n  }\n}\n\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    .detail-view.active .bg{\n      -webkit-transform: translateY(0);\n      transform: translateY(0);\n    }\n    .hide-detail-btn{\n      height: 32px;\n      -webkit-transform: translateY(32px);\n      transform: translateY(32px);\n    }\n    .wrapper{\n      margin-bottom: -22px;\n    }\n    .img-wrapper{\n      height: 123px;\n    }\n\n    .detail-view{\n      .bg{\n        width: 100%;\n        height: 100%;\n        border-radius: 0;\n        left: 0;\n        bottom: 0;\n        -webkit-transform: translateY(100%);\n        transform: translateY(100%);\n      }\n      .info-wrapper{\n        padding: 10px 25px;\n        height: 78%;\n      }\n    }\n}\n"
  },
  {
    "path": "src/app/product-thumbnail/product-thumbnail.component.ts",
    "content": "import { Component, OnInit, Input } from '@angular/core';\nimport { Product } from '../shared/product.model';\nimport { CartService } from '../cart.service';\n\n@Component({\n  selector: 'app-product-thumbnail',\n  templateUrl: './product-thumbnail.component.html',\n  styleUrls: ['./product-thumbnail.component.scss']\n})\nexport class ProductThumbnailComponent implements OnInit {\n\n  @Input() product: Product = {\n    id: 0,\n    name: '',\n    price: '',\n    available: false,\n    best_seller: false,\n    categories: [0],\n    img: '',\n    description: '',\n  };\n\n  detailViewActive: boolean = false;\n\n  constructor(private cartService: CartService) {\n\n  }\n\n  ngOnInit() {\n    this.detailViewActive = false;\n  }\n\n  onProductClick() {\n    this.detailViewActive = !this.detailViewActive;\n  }\n\n  onAddToCart() {\n    this.cartService.addProductToCart(this.product);\n  }\n\n}\n"
  },
  {
    "path": "src/app/search-bar/search-bar.component.html",
    "content": "<div class=\"wrapper\">\n  @if (showSearch) {\n    <input type=\"text\" name=\"name\" value=\"\" placeholder=\"Buscar...\" class=\"search-bar\" #search (keyup)='onSearchKeyup(search.value)' (keydown)='plop()'>\n  }\n  <svg [class.animate-plop]=\"animatePlop\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" opacity=\"0.227028918\">\n          <g id=\"Desktop-Copy\" transform=\"translate(-1056.000000, -215.000000)\" fill=\"#000000\">\n              <path d=\"M1071.89258,230.111648 L1067.68711,225.905991 C1068.66447,224.751345 1069.25486,223.2587 1069.25486,221.627431 C1069.25486,217.967248 1066.28761,215 1062.62743,215 C1058.96725,215 1056,217.967248 1056,221.627431 C1056,225.287614 1058.96725,228.254863 1062.62743,228.254863 C1064.2587,228.254863 1065.75134,227.664469 1066.90599,226.686923 L1071.11165,230.89258 C1071.25487,231.035807 1071.48923,231.035807 1071.63227,230.89258 L1071.89258,230.63227 C1072.03581,230.489043 1072.03581,230.254874 1071.89258,230.111648 L1071.89258,230.111648 Z M1057.10457,221.627431 C1057.10457,218.582127 1059.58213,216.104572 1062.62743,216.104572 C1065.67274,216.104572 1068.15029,218.582127 1068.15029,221.627431 C1068.15029,224.672736 1065.67274,227.150291 1062.62743,227.150291 C1059.58213,227.150291 1057.10457,224.672736 1057.10457,221.627431 L1057.10457,221.627431 Z\" id=\"Shape\"></path>\n          </g>\n      </g>\n  </svg>\n</div>\n"
  },
  {
    "path": "src/app/search-bar/search-bar.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n@-webkit-keyframes plop-glass{\n  50%{\n    -webkit-transform: scale(1.35);\n    transform: scale(1.35);\n  }\n  100%{\n    -webkit-transform: scale(1.2);\n    transform: scale(1.2);\n  }\n}\n\n@keyframes plop-glass{\n  50%{\n    -webkit-transform: scale(1.35);\n    transform: scale(1.35);\n  }\n  100%{\n    -webkit-transform: scale(1.2);\n    transform: scale(1.2);\n  }\n}\n\n.wrapper{\n  position: relative;\n  display: block;\n  margin-left: auto;\n}\n\n.search-bar{\n  width: 100%;\n  display: block;\n  margin: 0 auto;\n  height: 35px;\n  border-radius: 20px;\n  border: none;\n  padding-left: 20px;\n  box-shadow: 0 3px 14px rgba(25, 25, 25, 0.05);\n  font-weight: 500;\n  position: relative;\n  left: -33px;\n  color: #999999;\n  @include transition-fade-circ(0.4s);\n  &:focus{\n    box-shadow: 0 4px 11px rgba(93, 78, 240, 0.09);\n    font-weight: 500;\n    color: $primary-color;\n    width: 120%;\n    -webkit-transform: translateX(-15%);\n    transform: translateX(-15%);\n    & + svg path{\n        fill: $primary-color;\n    }\n    & + svg{\n      -webkit-transform: scale(1.2);\n      transform: scale(1.2);\n    }\n  }\n}\n\nsvg.animate-plop{\n  -webkit-animation: plop-glass 0.1s ease forwards;\n          animation: plop-glass 0.1s ease forwards;\n}\n\n::-webkit-input-placeholder {\n  color: #cccccc;\n}\n\n:-moz-placeholder { /* Firefox 18- */\n   color: #cccccc;\n}\n\n::-moz-placeholder {  /* Firefox 19+ */\n   color: #cccccc\n}\n:-ms-input-placeholder {\n   color: #cccccc;\n}\n\nsvg{\n  position: absolute;\n  right: 24px;\n  top: 3px;\n  height: 31px;\n  width: 15px;\n  @include transition-fade(0.3s);\n  path{\n    fill: #333333;\n  }\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    .search-bar{\n      left: 0;\n      border-radius: 0;\n      height: 43px;\n      &:focus{\n        width: 100%;\n        -webkit-transform: translateX(0);\n        transform: translateX(0);\n      }\n    }\n    svg{\n      top: 8px;\n    }\n  }\n"
  },
  {
    "path": "src/app/search-bar/search-bar.component.ts",
    "content": "import { Component, OnInit, EventEmitter, Output } from '@angular/core';\n\n@Component({\n  selector: 'app-search-bar',\n  standalone: true,\n  templateUrl: './search-bar.component.html',\n  styleUrls: ['./search-bar.component.scss']\n})\nexport class SearchBarComponent implements OnInit {\n\n  previousSearch: string = '';\n\n  animatePlop = false;\n\n  showSearch = true;\n\n  @Output()\n  searchChange = new EventEmitter<any>();\n\n  constructor() { }\n\n  ngOnInit() {\n    this.previousSearch = '';\n  }\n\n  /*\n    This event will emit an object indicating the new search term, and:\n      -1 if the search term length has descreased\n      1 if the search term length has increased\n      0 if the search term remained equal\n  */\n  onSearchKeyup(search: string) {\n    let change = 0;\n    if (search.length > this.previousSearch.length) {\n      change = 1;\n    } else if (search.length < this.previousSearch.length) {\n      change = -1;\n    }\n    this.previousSearch = search;\n    if (change !== 0) {\n      this.searchChange.emit({search, change});\n    }\n  }\n\n  // Perform a plop animation on the search icon. This animation is executed on keydown just for visual reasons\n  plop() {\n    this.animatePlop = true;\n    setTimeout(() => {\n      this.animatePlop = false;\n    }, 110);\n  }\n\n  reset() {\n    this.showSearch = false;\n    setTimeout(() => {\n      this.showSearch = true;\n    });\n  }\n}\n"
  },
  {
    "path": "src/app/shared/_colors.scss",
    "content": "$primary-color: #5D4EF0;\n$text-color: #444444;\n$secondary-color: #EF364C;\n"
  },
  {
    "path": "src/app/shared/_grid.scss",
    "content": "// SIMPLE GRID - SASS/SCSS (deprecation-safe)\n\n// 1) Load Sass math for division\n@use \"sass:math\";\n\n// 2) (Recommended) Load Google Fonts in HTML instead of Sass:\n// <link href=\"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap\" rel=\"stylesheet\" />\n\n// colors\n$dark-grey: #333447;\n$dark-gray: #333447; // alias\n\n// universal\nhtml,\nbody {\n  height: 100%;\n  width: 100%;\n  margin: 0;\n  padding: 0;\n  left: 0;\n  top: 0;\n}\n\n// typography\nh1 { font-size: 2.5rem; }\nh2 { font-size: 2rem; }\nh3 { font-size: 1.375rem; }\nh4 { font-size: 1.125rem; }\nh5 { font-size: 1rem; }\nh6 { font-size: 0.875rem; }\np  { font-size: 1.125rem; line-height: 1.8; }\n\n// utility\n.left   { text-align: left; }\n.right  { text-align: right; }\n.center { text-align: center; margin-left: auto; margin-right: auto; }\n.justify{ text-align: justify; }\n.hidden-sm { display: none; }\n\n// grid\n$width: 96%;\n$gutter: 4%;\n$breakpoint-small: 33.75em; // 540px\n$breakpoint-med:   45em;    // 720px\n$breakpoint-large: 60em;    // 960px\n\n.container {\n  width: 90%;\n  margin-left: auto;\n  margin-right: auto;\n\n  @media only screen and (min-width: $breakpoint-small) {\n    width: 80%;\n  }\n\n  @media only screen and (min-width: $breakpoint-large) {\n    width: 75%;\n    max-width: 60rem;\n  }\n}\n\n.row {\n  position: relative;\n  width: 100%;\n}\n\n.row [class^=\"col\"] {\n  float: left;\n  margin: 0.5rem 2%;\n  min-height: 0.125rem;\n}\n\n.row::after {\n  content: \"\";\n  display: table;\n  clear: both;\n}\n\n.col-1,\n.col-2,\n.col-3,\n.col-4,\n.col-5,\n.col-6,\n.col-7,\n.col-8,\n.col-9,\n.col-10,\n.col-11,\n.col-12 {\n  width: $width;\n}\n\n// Helper to compute column width without deprecated `/`\n@function col-width($n) {\n  // (($width / (12 / $n)) - ($gutter * (12 - $n) / 12))\n  @return math.div($width, math.div(12, $n)) - math.div($gutter * (12 - $n), 12);\n}\n\n/* Small (default) cols */\n.col-1-sm  { width: col-width(1); }\n.col-2-sm  { width: col-width(2); }\n.col-3-sm  { width: col-width(3); }\n.col-4-sm  { width: col-width(4); }\n.col-5-sm  { width: col-width(5); }\n.col-6-sm  { width: col-width(6); }\n.col-7-sm  { width: col-width(7); }\n.col-8-sm  { width: col-width(8); }\n.col-9-sm  { width: col-width(9); }\n.col-10-sm { width: col-width(10); }\n.col-11-sm { width: col-width(11); }\n.col-12-sm { width: $width; }\n\n/* Medium+ cols */\n@media only screen and (min-width: $breakpoint-med) {\n  .col-1  { width: col-width(1); }\n  .col-2  { width: col-width(2); }\n  .col-3  { width: col-width(3); }\n  .col-4  { width: col-width(4); }\n  .col-5  { width: col-width(5); }\n  .col-6  { width: col-width(6); }\n  .col-7  { width: col-width(7); }\n  .col-8  { width: col-width(8); }\n  .col-9  { width: col-width(9); }\n  .col-10 { width: col-width(10); }\n  .col-11 { width: col-width(11); }\n  .col-12 { width: $width; }\n\n  .hidden-sm { display: block; }\n}\n"
  },
  {
    "path": "src/app/shared/_mixins.scss",
    "content": "@mixin transition-fade($time) {\n  -webkit-transition: all $time ease;\n  transition: all $time ease;\n}\n\n@mixin transition-fade-circ($time) {\n  -webkit-transition: all $time cubic-bezier(0.785, 0.135, 0.15, 0.86);\n  transition:         all $time cubic-bezier(0.785, 0.135, 0.15, 0.86);\n}\n"
  },
  {
    "path": "src/app/shared/category.model.ts",
    "content": "export class Category {\n  categori_id: number = 0;\n  name: string = '';\n}\n"
  },
  {
    "path": "src/app/shared/index.ts",
    "content": ""
  },
  {
    "path": "src/app/shared/product.model.ts",
    "content": "export class Product {\n  id: number = 0;\n  name: string = '';\n  price: string = '';\n  available: boolean = false;\n  best_seller: boolean = false;\n  categories: number[] = [0];\n  img: string = '';\n  description: string = '';\n}\n"
  },
  {
    "path": "src/app/showcase/showcase.component.html",
    "content": "<div class=\"row\">\n  @for (product of products; track product.id) {\n    <app-product-thumbnail [product]=\"product\"\n      class=\"col-4 product-thumbnail\">\n    </app-product-thumbnail>\n  }\n</div>\n"
  },
  {
    "path": "src/app/showcase/showcase.component.scss",
    "content": ".row .product-thumbnail{\n  margin-bottom: 2rem;\n}\n"
  },
  {
    "path": "src/app/showcase/showcase.component.ts",
    "content": "import { Component, OnInit, Input } from '@angular/core';\nimport { Product } from '../shared/product.model';\nimport { CartService } from '../cart.service';\nimport { ProductThumbnailComponent } from '../product-thumbnail/product-thumbnail.component';\n\n@Component({\n  selector: 'app-showcase',\n  templateUrl: './showcase.component.html',\n  styleUrls: ['./showcase.component.scss'],\n  imports: [\n    ProductThumbnailComponent,\n  ]\n})\nexport class ShowcaseComponent implements OnInit {\n\n  @Input() products: Product[] = [];\n\n  constructor(private cartService: CartService) {\n\n  }\n\n  ngOnInit() {\n  }\n}\n"
  },
  {
    "path": "src/app/sort-filters/sort-filters.component.html",
    "content": "<div class=\"wrapper\">\n  <label for=\"\">Ordenar por</label>\n  <select (change)='onSelectChange($event)'>\n    @for (filter of filters; track $index) {\n      <option [value]=\"filter.value\">{{filter.name}}</option>\n    }\n  </select>\n  <div class=\"triangle\"></div>\n</div>\n"
  },
  {
    "path": "src/app/sort-filters/sort-filters.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n.wrapper{\n  display: block;\n  height: 35px;\n  background: none;\n  font-size: 14px;\n  padding-left: 11px;\n  position: relative;\n  top: 4px;\n  label{\n    opacity: 0.8;\n  }\n  select{\n    color: $primary-color;\n    background: none;\n    border: none;\n    font-size: 13px;\n    margin-left: 2px;\n    font-weight: 500;\n    cursor: pointer;\n    width: 130px;\n  }\n  .triangle{\n    height: 0;\n    width: 0;\n    border-top: 4px solid $primary-color;\n    border-left: 4px solid transparent;\n    border-right: 4px solid transparent;\n    display: inline-block;\n    position: relative;\n    top: -2px;\n    right: 14px;\n    pointer-events: none;\n    opacity: 0.3;\n  }\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    .wrapper{\n      label{\n        color: white;\n      }\n      select{\n        color: white;\n      }\n      .triangle{\n            border-top: 4px solid white;\n      }\n    }\n\n  }\n"
  },
  {
    "path": "src/app/sort-filters/sort-filters.component.ts",
    "content": "import { CommonModule } from '@angular/common';\nimport { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n  selector: 'app-sort-filters',\n  templateUrl: './sort-filters.component.html',\n  styleUrls: ['./sort-filters.component.scss'],\n  imports: [\n    CommonModule\n  ],\n})\nexport class SortFiltersComponent implements OnInit {\n\n  @Input()\n  filter: any = {};\n\n  @Input()\n  filters: any[] = [];\n\n  @Output()\n  sortChange = new EventEmitter<string>();\n\n  constructor() { }\n\n  ngOnInit() {\n  }\n\n  onSelectChange($event: any) {\n    this.sortChange.emit($event.target.value);\n  }\n\n}\n"
  },
  {
    "path": "src/app/url-form/url-form.component.html",
    "content": "<div class=\"wrapper\">\n  <div class=\"fill\" [class.expanded]=\"expanded\">\n    <button type=\"button\" class=\"url-btn\" (click)=\"expanded = !expanded\">\n      <svg width=\"32px\" height=\"16px\" viewBox=\"0 0 32 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n          <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n              <path d=\"M31.409,3.798 L24.406,10.8 C23.633,11.573 22.379,11.573 21.604,10.8 L20.202,9.398 L27.209,2.395 L21.605,-3.209 L14.603,3.798 L13.2,2.395 C12.426,1.622 12.426,0.367 13.2,-0.407 L20.203,-7.41 C20.98,-8.187 22.231,-8.187 23.005,-7.41 L31.41,0.996 C32.188,1.77 32.188,3.021 31.409,3.798 L31.409,3.798 Z M17.4,12.204 L10.397,19.211 L4.79,13.603 L11.8,6.6 L10.397,5.197 C9.62,4.423 8.369,4.423 7.595,5.197 L0.588,12.204 C-0.189,12.977 -0.189,14.228 0.588,15.002 L8.998,23.411 C9.772,24.185 11.022,24.185 11.8,23.411 L18.802,16.404 C19.575,15.631 19.575,14.381 18.802,13.602 L17.4,12.204 L17.4,12.204 Z M10.397,13.603 C11.171,14.381 12.425,14.381 13.199,13.603 L21.604,5.198 C22.378,4.424 22.378,3.17 21.604,2.396 C20.831,1.623 19.576,1.623 18.802,2.396 L10.396,10.802 C9.62,11.574 9.62,12.829 10.397,13.603 L10.397,13.603 Z\" id=\"Shape\" fill=\"#FFFFFF\" transform=\"translate(15.999313, 7.999375) rotate(-315.000000) translate(-15.999313, -7.999375) \"></path>\n          </g>\n      </svg>\n    </button>\n    <input type=\"text\" #url placeholder=\"JSON Archivo URL...\" class=\"url-input\">\n    <button type=\"button\" (click)='onSend(url.value)' class=\"send-btn\">\n      <svg width=\"33px\" height=\"33px\" viewBox=\"0 0 33 33\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n          <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n              <path d=\"M0.0377951225,31.4431498 L2.82385037,19.3824633 C2.93382623,18.8692426 3.37372969,18.4659978 3.92360902,18.3926805 L19.5035232,16.7797012 C19.9434267,16.7430425 19.9434267,16.0831873 19.5035232,16.0098701 L3.92360902,14.5068666 C3.37372969,14.470208 2.93382623,14.0669632 2.82385037,13.5537425 L0.0377951225,1.52971456 C-0.218815229,0.503273155 0.88094342,-0.339875143 1.83406758,0.136686938 L32.2973822,15.3866735 C33.2138477,15.8632356 33.2138477,17.182946 32.2973822,17.6595081 L1.83406758,32.8361774 C0.88094342,33.3127395 -0.218815229,32.4695912 0.0377951225,31.4431498 L0.0377951225,31.4431498 Z\" id=\"Shape\" fill=\"#FFFFFF\"></path>\n          </g>\n      </svg>\n    </button>\n  </div>\n</div>\n"
  },
  {
    "path": "src/app/url-form/url-form.component.scss",
    "content": "@use \"../shared/colors\" as *;\n@use \"../shared/mixins\" as *;\n\n.wrapper{\n  margin-bottom: 20px;\n  position: relative;\n}\n.url-btn{\n  background: $secondary-color;\n  border: none;\n  padding: 0;\n  height: 36px;\n  width: 36px;\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 100;\n  svg{\n    height: 9px;\n  }\n}\n\n.fill{\n  width: 0px;\n  height: 36px;\n  width: 36px;\n  border-radius: 3px;\n  background-color: $secondary-color;\n  box-shadow: 0 2px 13px rgba(0, 0, 0, 0.3);\n  position: relative;\n  overflow: hidden;\n  @include transition-fade-circ(0.2s);\n  &.expanded{\n    width: 400px;\n    .url-input{\n      width: 80%;\n      color: white;\n      margin-left: 34px;\n    }\n  }\n}\n\n.url-input{\n  width: 0px;\n  position: absolute;\n  background: none;\n  border: none;\n  border-radius: 0;\n  margin-left: 0;\n  margin-left: 44px;\n  border-bottom: 1px solid rgba(255, 255, 255, 0.27);\n  background: rgba(255,255,255,0.1);\n  position: relative;\n  top: 7px;\n  padding-left: 4px;\n  @include transition-fade(0.5s);\n  &:focus{\n    border-bottom: 1px solid rgba(255, 255, 255, 1);\n  }\n}\n\n.send-btn{\n  width: 0;\n  position: absolute;\n  height: 36px;\n  width: 36px;\n  z-index: 50;\n  top:0;\n  border: none;\n  background: none;\n  svg{\n    height: 14px;\n    position: relative;\n    top: 3px;\n  }\n}\n\n\n::-webkit-input-placeholder {\n  color: rgba(255,255,255,0.4);\n}\n\n:-moz-placeholder { /* Firefox 18- */\n   color: rgba(255,255,255,0.4);\n}\n\n::-moz-placeholder {  /* Firefox 19+ */\n   color: rgba(255,255,255,0.4)\n}\n:-ms-input-placeholder {\n   color: rgba(255,255,255,0.4);\n}\n\n/** Media queries **/\n@media only screen\n  and (min-device-width: 320px)\n  and (max-device-width: 480px) {\n    .wrapper{\n      margin-bottom: 20px;\n      position: absolute;\n      top: 152px;\n    }\n    .fill{\n      &.expanded{\n          width: 250px;\n          .url-input{\n            width: 168px;\n            top: 2px;\n          }\n          .send-btn{\n            padding: 0;\n          }\n      }\n  }\n}\n"
  },
  {
    "path": "src/app/url-form/url-form.component.ts",
    "content": "import { Component, OnInit, EventEmitter, Output } from '@angular/core';\n\n@Component({\n  selector: 'app-url-form',\n  templateUrl: './url-form.component.html',\n  styleUrls: ['./url-form.component.scss']\n})\nexport class UrlFormComponent implements OnInit {\n\n  @Output()\n  urlChange = new EventEmitter<string>();\n\n  expanded = false;\n\n  constructor() { }\n\n  ngOnInit() {\n  }\n\n  onSend(url: string) {\n      this.expanded = false;\n      this.urlChange.emit(url);\n  }\n\n}\n"
  },
  {
    "path": "src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>AngularShop2</title>\n  <base href=\"/\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\">\n</head>\n<body>\n  <app-root></app-root>\n</body>\n</html>\n"
  },
  {
    "path": "src/main.ts",
    "content": "import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { App } from './app/app';\n\nbootstrapApplication(App, appConfig)\n  .catch((err) => console.error(err));\n"
  },
  {
    "path": "src/styles.scss",
    "content": "/* You can add global styles to this file, and also import other style files */\n/* You can add global styles to this file, and also import other style files */\n@use \"./app/shared/grid\" as *;\n@use \"./app/shared/colors\" as *;\n\n$font-family: 'Roboto', Helvetica, sans-serif;\n\nhtml, body {\n  font-family: $font-family;\n  color: #444444;\n  -webkit-font-smoothing: antialiased;\n  -webkit-overflow-scrolling: touch;\n  height: 100%;\n  margin: 0;\n  font-size: 16px;\n  font-weight: 400;\n  background-color: #f2f2f2;\n}\n\ninput, textarea, button {\n  font-family: inherit;\n  font-size: 1em;\n}\n\ninput:not([type=checkbox]):not([type=radio]), textarea {\n  -webkit-appearance: none !important;\n}\n\n* {\n  outline: none;\n}\n\nselect::-ms-expand {\n  display: none;\n}\n\nselect {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  text-indent: -1px;\n  text-overflow: '';\n}\n\nbutton {\n  cursor: pointer;\n}\n"
  },
  {
    "path": "tsconfig.app.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/app\",\n    \"types\": []\n  },\n  \"include\": [\n    \"src/**/*.ts\"\n  ],\n  \"exclude\": [\n    \"src/**/*.spec.ts\"\n  ]\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitOverride\": true,\n    \"noPropertyAccessFromIndexSignature\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true,\n    \"isolatedModules\": true,\n    \"experimentalDecorators\": true,\n    \"importHelpers\": true,\n    \"target\": \"ES2022\",\n    \"module\": \"preserve\"\n  },\n  \"angularCompilerOptions\": {\n    \"enableI18nLegacyMessageIdFormat\": false,\n    \"strictInjectionParameters\": true,\n    \"strictInputAccessModifiers\": true,\n    \"typeCheckHostBindings\": true,\n    \"strictTemplates\": true\n  },\n  \"files\": [],\n  \"references\": [\n    {\n      \"path\": \"./tsconfig.app.json\"\n    },\n    {\n      \"path\": \"./tsconfig.spec.json\"\n    }\n  ]\n}\n"
  },
  {
    "path": "tsconfig.spec.json",
    "content": "/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */\n/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"./out-tsc/spec\",\n    \"types\": [\n      \"jasmine\"\n    ]\n  },\n  \"include\": [\n    \"src/**/*.ts\"\n  ]\n}\n"
  }
]