{"version":3,"sources":["webpack:///main.bundle.js","webpack:///./src/+app/shared/mapping.ts","webpack:///./src/+app/services/core/seo.service.ts","webpack:///./src/+app/services/cms/article.service.ts","webpack:///./src/+app/services/cms/header.service.ts","webpack:///./src/+app/services/core/application.service.ts","webpack:///./src/+app/services/core/company.service.ts","webpack:///./src/+app/services/core/api.service.ts","webpack:///./src/+app/services/core/messages.service.ts","webpack:///./src/+app/services/core/validation.service.ts","webpack:///./src/+app/services/inventory/product.service.ts","webpack:///./src/+app/services/cms/script.service.ts","webpack:///./src/+app/models/document/quoting-submit-model.ts","webpack:///./src/+app/models/core/cart.ts","webpack:///./src/+app/services/cms/login.service.ts","webpack:///./src/+app/services/inventory/shopping-cart.service.ts","webpack:///./src/+app/services/core/cache.service.ts","webpack:///./src/+app/services/cms/breadcrumbs.service.ts","webpack:///./src/+app/models/cms/register.ts","webpack:///./src/+app/models/core/company.ts","webpack:///./src/+app/models/inventory/inventory.ts","webpack:///./src/+app/services/cms/check-existence.service.ts","webpack:///./src/+app/services/cms/order-payment.service.ts","webpack:///./src/+app/services/cms/recover-password.service.ts","webpack:///./src/+app/services/core/configuration.service.ts","webpack:///./src/+app/services/core/crypto.service.ts","webpack:///./src/+app/services/core/node-logger.service.ts","webpack:///./src/+app/services/core/paypal.service.ts","webpack:///./src/+app/services/inventory/category.service.ts","webpack:///./src/+app/services/inventory/search.service.ts","webpack:///./src/+app/services/cms/currency.service.ts","webpack:///./src/+app/services/cms/language.service.ts","webpack:///./src/+app/services/settings/template.service.ts","webpack:///./src/+app/app.component.ts","webpack:///./src/+app/components/cms/article/sys/article-category.component.ts","webpack:///./src/+app/components/cms/article/sys/blog-page.component.ts","webpack:///./src/+app/components/cms/article/sys/news-page.component.ts","webpack:///./src/+app/components/cms/header/widget/search.component.ts","webpack:///./src/+app/components/cms/homepage/sys/home.component.ts","webpack:///./src/+app/components/cms/page/sys/cms-page.component.ts","webpack:///./src/+app/components/cms/page/sys/cookie-policy.component.ts","webpack:///./src/+app/components/cms/page/sys/faq.component.ts","webpack:///./src/+app/components/cms/page/sys/info-request.component.ts","webpack:///./src/+app/components/cms/page/sys/newsletter-confirmation-page.component.ts","webpack:///./src/+app/components/cms/page/sys/newsletter-page.component.ts","webpack:///./src/+app/components/cms/page/sys/privacy-policy.component.ts","webpack:///./src/+app/components/cms/page/sys/purchase-condition.component.ts","webpack:///./src/+app/components/core/sys/cart-empty-page.component.ts","webpack:///./src/+app/components/core/sys/not-found-page.component.ts","webpack:///./src/+app/components/core/sys/offline-page.component.ts","webpack:///./src/+app/components/document/sys/client-area-order-list.component.ts","webpack:///./src/+app/components/inventory/category/sys/category.component.ts","webpack:///./src/+app/components/inventory/product/sys/other-product.component.ts","webpack:///./src/+app/components/inventory/product/sys/product-details.component.ts","webpack:///./src/+app/components/inventory/product/sys/product-page-list.component.ts","webpack:///./src/+app/components/inventory/product/sys/promotions.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart-cash.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart-submitted.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-catalog-private.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-home.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-invoices.component.ts","webpack:///./src/+app/services/core/component-helper.service.ts","webpack:///./src/+app/services/core/bootbox.service.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-order-details.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-profile.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-banca-sella-confirmation.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-confirmation.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-nexi-confirmation.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-unicredit-confirmation.component.ts","webpack:///./src/+app/components/settings/user/sys/quick-registration.component.ts","webpack:///./src/+app/components/settings/user/sys/register.component.ts","webpack:///./src/+app/components/settings/user/sys/registration-complete.component.ts","webpack:///./src/+app/components/settings/user/sys/registration-confirmation.component.ts","webpack:///./src/+app/components/settings/user/sys/user-login.component.ts","webpack:///./src/+app/components/settings/user/sys/user-password.component.ts","webpack:///./src/+app/models/cms/news-list.ts","webpack:///./src/+app/services/cms/cms-content.service.ts","webpack:///./src/+app/services/cms/cms-menu-list.service.ts","webpack:///./src/+app/services/cms/faq.service.ts","webpack:///./src/+app/services/cms/info-request.service.ts","webpack:///./src/+app/services/cms/slider.service.ts","webpack:///./src/+app/services/cms/trustpilot.service.ts","webpack:///./src/+app/services/core/cookie-policy.service.ts","webpack:///./src/+app/services/core/cookie/cookie-options.ts","webpack:///./src/+app/services/core/privacy-policy.service.ts","webpack:///./src/+app/services/core/purchase-condition.service.ts","webpack:///./src/+app/services/core/system-configuration.service.ts","webpack:///./src/+app/services/inventory/customerscanvas.service.ts","webpack:///./src async","webpack:///./src/__workaround.browser.ts","webpack:///./src/browser.module.ts","webpack:///./src/+app/services/core/helper.service.ts","webpack:///./src/+app/services/core/routes.service.ts","webpack:///./src/+app/models/document/quoting-model.ts","webpack:///./src/+app/app.module.ts","webpack:///./src/+app/components/cms/article/widget/news-list.component.ts","webpack:///./src/+app/components/cms/footer/widget/footer.component.ts","webpack:///./src/+app/components/cms/footer/widget/newsletter.component.ts","webpack:///./src/+app/components/cms/header/widget/header.component.ts","webpack:///./src/+app/components/cms/homepage/sys/home.module.ts","webpack:///./src/+app/components/cms/homepage/widget/side-bar-menu.component.ts","webpack:///./src/+app/components/cms/page/sys/cms-page.module.ts","webpack:///./src/+app/components/core/widget/canvas-widget.components.ts","webpack:///./src/+app/components/core/widget/slider-widget.component.ts","webpack:///./src/+app/components/core/widget/trustpilot-widget.component.ts","webpack:///./src/+app/components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component.ts","webpack:///./src/+app/components/document/widget/quoting/other-product-form.component.ts","webpack:///./src/+app/components/document/widget/quoting/quoting-main.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-adesivi.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-banner.component.ts","webpack:///./src/+app/services/document/quoting.service.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-buste.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-commerciale.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-editoria.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-etichette.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-stampa.component.ts","webpack:///./src/+app/components/inventory/category/sys/inventory-category.module.ts","webpack:///./src/+app/components/inventory/product/sys/inventory-product.module.ts","webpack:///./src/+app/components/settings/user/sys/settings.module.ts","webpack:///./src/+app/models/cms/breadcrumbs.ts","webpack:///./src/+app/models/cms/info-request.ts","webpack:///./src/+app/services/settings/client-area.service.ts","webpack:///./src/+app/models/constants/quoting-constants.ts","webpack:///./src/+app/models/constants/shared-constants.ts","webpack:///./src/+app/services/core/cookie/cookie-browser.service.ts","webpack:///./src/+app/services/core/cookie/cookie-node.service.ts","webpack:///./src/+app/services/core/default-request-options.ts","webpack:///./src/+app/services/core/loading-overlay.service.ts","webpack:///./src/+app/services/core/local-storage.ts","webpack:///./src/+app/services/core/routes-browser.service.ts","webpack:///./src/+app/services/multi-language/browser/index.ts","webpack:///./src/+app/services/multi-language/browser/translate-static-loader.service.ts","webpack:///./src/+app/shared/model/model.service.ts","webpack:///./src/+app/app.component.html","webpack:///./src/+app/components/document/widget/quoting/quoting-excluding.component.ts","webpack:///./src/+app/models/cms/user-login.ts","webpack:///./src/+app/services/cms/cms-component.service.ts","webpack:///./src/+app/services/cms/newsletter.service.ts","webpack:///./src/+app/services/core/cookie/index.ts","webpack:///./src/+app/shared/shared.module.ts","webpack:///./src/client.prod.ts","webpack:///./src/+app/services/core/auth.service.ts","webpack:///./src/+app/models/settings/client-area.ts","webpack:///./src/+app/services/cms/register.service.ts","webpack:///./src/+app/services/core/angular2-meta.ts"],"names":["webpackJsonp","10","module","exports","__webpack_require__","core_1","application_service_1","Mappings","application","this","Web_Api_Base_Url","config","apiUrl","Google_Maps_Key","Web_Api_Get_Token_Url","Web_Api_Menu_GetCmsPageByUrl","Web_Api_Menu_GetCmsPageById","Web_Api_Get_Template_Url","Web_Api_Get_Default_Company","Web_Api_Get_Article_List","Web_Api_Get_News_Details","Web_Api_Get_Article_By_Url","Web_Api_Get_Article_Category_By_Id","Web_Api_Get_Article_Category_By_Url","Web_Api_Get_Article_List_Category","Web_Api_Get_Article_By_Category_Id","Web_Api_Get_Blog_Data","Web_Api_Get_Cms_Menu_List","Web_Api_Get_FaqData","Web_Api_Post_Newsletter_Subscribe","Web_Api_Get_Newsletter_Page_Data","Web_Api_Get_Newsletter_Confirmation_Page_Data","Web_Api_Get_Wizard_Data_Address","Web_Api_Get_Category_Details","Web_Api_Get_Catalog_Categories_Data","Web_Api_Get_Catalog_Categories_Price_Data","Web_Api_Get_Category_By_Url","Web_Api_Post_Send_Category_Info_Request","Web_Api_Get_Product_Details","Web_Api_Get_Price_Data","Web_Api_Get_Products_In_Promotion_Data","Web_Api_Get_Product_By_Url","Web_Api_Post_Send_Info_Request","Web_Api_Post_Send_Login_Request","Web_Api_Post_User_Authentification","Web_Api_Recover_Password","Web_Api_Get_Recover_Password_Data","Web_Api_Post_Register","Web_Api_Get_Register_Data","Web_Api_Get_Registration_Complete_Page_Data","Web_Api_Post_Confirm_Registration","Web_Api_Get_Save_Cart","Web_Api_Set_Cart_Voucher","Web_Api_Set_Job_Name","Web_Api_Set_Cart_Address","Web_Api_Post_Cart_Confirm_Order","Web_Api_Get_Cart_Payment_Shipment","Web_Api_Get_Client_Area_Details","Web_Api_Get_Client_Area_User_Profile","Web_Api_Post_Client_Area_Add_New_Address","Web_Api_Post_Client_Area_Update_User_Password","Web_Api_Post_Client_Area_Update_User_Profile","Web_Api_Post_Client_Area_Update_User_Address","Web_Api_Post_Client_Area_Remove_Address","Web_Api_Get_Client_Area_Order_Details","Web_Api_Get_Client_Area_Catalog_Private","Web_Api_Get_Client_Area_Order_List","Web_Api_Get_Client_Area_Invoices","Web_Api_Get_Client_Area_Order_Send_Message","Web_Api_Get_Client_Area_Proccess_Order_File","Web_Api_Get_Client_Area_Update_Bonifico_Payment","Web_Api_Get_Configuration","Web_Api_Get_Routes","Web_Api_Get_Header_Data","Web_Api_Get_Footer_Data","Web_Api_Get_Side_Menu_Data","Web_Api_Get_Home_Page_Data","Web_Api_Get_Home_Page_Data_Optimized","Web_Api_Get_Home_HilightPromoProduct","Web_Api_Get_Info_Request_Data","Web_Api_Get_Privacy_Policy_Data","Web_Api_Get_Cookie_Policy_Data","Web_Api_Get_Purchase_Condition_Data","Web_Api_Get_Slider_Data","Web_Api_Get_Seo_Data","Web_Api_Get_Shopping_Cart_Data","Web_Api_Get_Shopping_Cart_Cash_Data","Web_Api_Get_Shopping_Cart_Submitted_Data","Web_Api_Get_Client_Area_Messages","Web_Api_Add_Static_Product_To_Cart","Web_Api_Add_Static_Product_Scontistica_To_Cart","Web_Api_Add_Matrix_Product_To_Cart","Web_Api_Get_Offline_Page_Data","Web_Api_Get_Login_Page_Data","Web_Api_Set_Cart_Payment","Web_Api_Empty_Cart_Page","Web_Api_Set_Cart_Shipment","Web_Api_Remove_From_Cart","Web_Api_Post_Cancel_Order","Web_Api_Post_Get_Bonifico_Uploaded_Files","Web_Api_Add_Wizard_Calcolato_To_Cart","Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart","Web_Api_Add_Wizard_Listino_To_Cart","Web_Api_Add_Wizard_Listino_Scontistica_To_Cart","Web_Api_Update_Prev_Canvas_Info","Web_Api_Add_Other_Product_Listino_To_Cart","Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart","Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart","Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart","Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart","Web_Api_Get_Other_Product_Form_Data","Web_Api_Get_Script","Web_Api_Get_Wizard_Editoria_Data","Web_Api_Get_Wizard_Commerciale_Data","Web_Api_Check_If_Param_Exists_In_Db","Web_Api_Set_Order_As_Payed","Web_Api_Get_Head_Foot_Data","Web_Api_Get_Wizard_Etichette_Data","Web_Api_Post_Get_Wizard_Price_Estimation","Web_Api_Post_Send_Request_Info_Wizard","Web_Api_Get_Wizard_Buste_Data","Web_Api_Get_Wizard_Adesivi_Data","Web_Api_Get_Wizard_Banner_Data","Web_Api_Get_Wizard_Stampa_Data","Web_Api_Post_Get_Ap_Price_Estimation","Web_Api_Add_Wizard_Buste_Listino_To_Cart","Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart","Web_Api_Check_Is_Order_Payed_Unicredit","Web_Api_Get_Product_And_Categories","Web_Api_Get_Script_Head","Web_Api_Get_Information_ThankYouPage_Paypal_Url","Web_Api_Get_Information_ThankYouPage_PagOnline_Url","Web_Api_Get_Information_ThankYouPage_Nexi_Url","Web_Api_Get_Information_ThankYouPage_BancaSella_Url","Web_Api_Get_Template_Url_Page_Not_Found","Web_Api_Delete_Customers_Canvas_State","Web_Api_Create_Paypal_Payment","Web_Api_Execute_Paypal_Payment","Web_Api_Get_Trustpilot_Data","Web_Api_Get_DefaultCurrency","Web_Api_Get_Client_Area_Riorder_List","Web_Api_Get_Client_Area_CalculatePrice_Riorder","Web_Api_Get_Client_Area_Get_Cart_Riorder","Web_Api_Get_Client_Area_Add_Product_To_Cart_Riorder","Canvas_Web_Api_Base_Url","Paypal_JS_Lirary_Url","Auth_User_Cookie","WscPrinter_Lang","Default_Lang","Offers_Image_Url","Products_Image_Url","WizardCheck_Image_Url","WizardAlert_Image_Url","UserLoginImg_Url","__decorate","Injectable","__metadata","_a","ApplicationService","Object","11","angular2_meta_1","dom_adapter_1","platform_browser_1","core_2","SeoService","_document","metaService","translate","_dom","getDOM","prototype","setSeoInformation","seoInformation","updateTag","name","content","Keywords","Description","property","Title","SeoRobots","setTitle","updateCanonicalTag","rel","href","Url","setSeoUserArea","url","title","getLabel","label","message","get","subscribe","res","getCanonicalLink","selector","query","tag","canonical","_prepareLinkElement","_addInternalCanonical","generateSeoDomServerSide","document","renderer","seoData","rootElement","h1","h2","h3","nodeList","description","createElement","body","setElementClass","H1","createText","push","H2","H3","includes","ShortDescription","setElementProperty","LongDescription","projectNodes","generateSiteMapList","SiteMapList","siteMapHtml","stringToInject","forEach","element","appendHtmlString","el","template","div","setInnerHTML","insertAllBefore","lastChild","childNodes","appendScriptsToDOM","_this","childNodesAsList","insertAfter","setSeoMetaData","imgLink","updateMetaDataTitle","createMetaTagUniversalAttribute","createMetaTagUniversalProperty","length","value","setText","selectRootElement","elementType","propertyNameFirst","valueFirst","propertyNameSecond","valueSecond","elem","head","setElementAttribute","_createLinkElement","_appendLinkElement","keys","prop","setAttribute","meta","appendChild","__param","Inject","DOCUMENT","Meta","_b","TranslateService","126","cache_service_1","api_service_1","mapping_1","language_service_1","shopping_cart_service_1","auth_service_1","ArticleService","_api","_cache","mappings","languageService","cartService","authService","getArticleList","category","listtype","lang","getLongLang","replace","getArticleDetails","id","customerId","GetUserId","cartId","getCartId","toString","getArticleByUrl","seoUrl","GetArticleByCategoryIdandRows","categoryId","startRowIndex","maxRows","getBlogData","getArticleListCategory","getCategoryArticleById","getArticleCategoryByUrl","categoryUrl","ApiService","CacheService","_c","_d","LanguageService","_e","ShoppingCartService","_f","AuthService","127","rxjs_1","HeaderService","toShowQuickRegistration","loginInfo","GetData","loggedInUser","BehaviorSubject","getLoggedInUser","asObservable","setLoggedInUser","user","next","setToShowQuickRegistration","toShow","128","http_1","cookie_1","node_logger_service_1","api","isNode","cookie","cache","nodeLogger","getConfig","defineProperty","ACCESS_TOKEN_KEY","enumerable","configurable","getToken","params","Date","getCredentialsParams","headers","Headers","append","post","do","access_token","set","put","URLSearchParams","credentials","username","password","fs","JSON","parse","readFileSync","setConfigToCache","APPLICATION_CONFIG","privateKeys","configForCache","key","hasOwnProperty","indexOf","Boolean","CookieService","NodeLoggerService","129","CompanyService","getCompany","13","Observable_1","responseStatuses","noContent","authRequired","http","isBrowser","clientSideCaching","options","has","obs","Observable","of","clear","createAuthorizationHeader","map","extractData","json","catch","err","handleError","startDate","AddLogWithTime","endDate","timeDiff","Math","abs","getTime","diffMs","ceil","getUniversalCached","token","status","empty","handleUnauthorized","throw","window","location","Http","130","router_1","MessagesService","router","setMessagesAsRead","Router","131","ValidationService","validatePhoneNumber","event","pattern","inputChar","String","fromCharCode","charCode","test","preventDefault","132","currency_service_1","ProductService","currencyService","getProductDetails","productId","productType","getCurrentUserId","curr","getCurrency","templateBuilderId","getTemplBuilderId","getProductsPromotionsData","getProductDetailsBySeoUrl","getPriceData","CurrencyService","14","seo_service_1","ScriptService","language","seo","typeSystemPage","typeArticleCategory","typeArticle","typeCmsPage","typeCatalogCategory","typeCatalogOtherProduct","typeCatalogProduct","infoRequestId","userAreaId","privacyPolicyId","purchaseConditionsId","faqsId","cookiesId","homeId","loginId","blogHomeId","productsCatalogId","promotionsId","cartCashId","cartSubmittedId","userRegistrationId","userRecoverPasswordId","subscriptionId","cartEmptyId","ThankYouPagePaypalId","ThankYouPagePagOnlineId","ThankYouNexiId","subscriptionConfirmationId","registrationCompletePageId","SearchPageId","SearchWithPagingPageId","getScript","type","rowId","longLang","getScriptHead","checkIfScriptResponseIsValid","retVal","getSystemPageRowId_OrderId","PageRowId","OrderId","setupExternalScripts","result","pageType","SeoInformation","HasScripts","response","setGoogleScripts","seoInfo","countRecursive","AnalyticsId","gtag","page_path","UrlForSeo","error","17","wizardFormEditoriaModel","numCopie","idCopie","tipoCopie","numFacciate","idFacciate","tipoFacciate","idFormati","idColori1","idCarte1","nomeCarte1","nomeCarte2","idGrammature1","nomeGrammature1","idPlastificazioni1","idCopertine","idColori2","idCarte2","idGrammature2","nomeGrammature2","idPlastificazioni2","idRilegature","taglio","sezione","tipoStampaInternoSoloFronte","stampa1_colori_fronte","stampa1_colori_retro","stampa2_colori_fronte","stampa2_colori_retro","wizardId","tipoStampaCopertinaSoloFronte","macrocategoryWizardId","richiestaName","richiestaSubName","richiestaEmail","isRichiestaEmailValid","richiestaTelephone","richiestaSocieta","richiestaJobname","richiestaCondizioni","richiestaNote","idPiegature","soggettiMultipli","numSoggetti","baseFormato","altezzaFormato","idTagli","idBusta","idMaterialiFlessibili","idSupportiRigidi","idOcchielli","idAsole","idCuciture","idElettrosaldature","disposizione_occhielli_id","distanza_occhielli","diametro_asola","disposizione_asola_id","disposizione_cucitura_id","disposizione_elettrosaldatura_id","tipoBifacciale","idBiancoCoprente","currency","idPantoneFronte1","idPantoneFronte2","idPantoneRetro1","idPantoneRetro2","idCartoncino","nomeCartoncino","idGrammatureCartoncino","nomeGrammatureCartoncino","numDiametroInternoAnimaLabel","numDiametroMassimoEsternoAnimaLabel","numEtichette","idAvvolgimento","idFustella","idFormatoTipo","idTipoLavoroLabel","subSection","isFormatoMultiploEnabled","FormatiMultipliObj","copieIsValid","copieMessage","widthIsValid","widthMessage","heightIsValid","heightMessage","MatrixModelCalculation","LavorazioniAccessorieModel","valoreLavorazione","numWidthFormValue","numHeightFormValue","numDepthFormValue","tipo","PriceEstimationModel","Currency","UnitPrice","Imponibile","Iva","Total","TotalAmount","WeightUm","Weight","DayName","TimePickup","DayNumber","Quantity","AltezzaDorso","PrezzoOriginaleimporto","DayDescriptionName","iShowHourForDay","FileCombinationModel","wizardFormAdesiviModel","wizardFormBandieraModel","wizardFormBannerModel","wizardFormBusteModel","fronte","wizardFormCommercialeModel","wizarFormEtichetteModel","wizardFormStampaModel","178","CartInfo","CartProductModel","CartAddressModel","CartPaymentModel","CartShipmentModel","UnitaId","179","LoginService","langService","sendLoginRequest","email","Email","toLowerCase","Password","btoa","CartID","authentificateUser","firstName","lastName","FirstName","LastName","Lang","quickRegister","userInfo","EmailRegister","CustomerGroup","CodiceFiscale","PartitaIva","Newsletter","20","cookie_service_1","cart_1","cookieService","customizationData","isProductCanvasEdited","saveCart","userId","paymentId","shipmentId","applyVoucher","voucherCode","getCustomerId","getLang","param","CustomerID","Voucher","Language","setJobName","jobName","ProductID","JobName","setAddress","addressObject","AddressCity","City","AddressID","Id","AddressMobile","Mobile","AddressPhone","Phone","AddressPostalCode","ZipCode","AddressProvince","Province","AddressRecipient","Recipient","AddressStreet","Address","confirmOrder","clearCartAfterConfirmation","remove","cartData","Products","Addresses","Payments","Shipments","getCartPaymentShipment","addWizardCalcolatoToCart","lavId","colType","canvasData","getIfProductIsCanvasEdited","getCustomizationCanvasData","isCanvasEdited","LavID","CanvasStateId","stateId","CanvasHiResOutputUrls","hiResOutputUrls","ColType","addApProductToCart","getRiorderCart","addWizardCalcolatoScontisticaToCart","dateId","DateID","addWizardListinoToCart","quantityId","QuantityID","addOtherProductListinoToCart","combinationId","CombinationId","addOtherProductListinoScontisticaToCart","addOtherProductCalcolatoListinoToCart","strVariantiCalcolate","StrVariantiCalcolate","addOtherProductCalcolatoListinoScontisticaToCart","addOtherProductCalcolatoScontisticaToCart","addWizardListinoScontisticaBusteToCart","IdPantoneFronte1","IdPantoneFronte2","IdPantoneRetro1","IdPantoneRetro2","addWizardListinoBusteToCart","addWizardListinoScontisticaToCart","addStaticProductToCart","addStaticProductScontisticaToCart","addMatrixProductToCart","Type","setCartId","updateCart","getCart","initCart","setPayment","PaymentID","setShipment","ShippmentID","removeFromCart","isCartValid","flagPayment","_i","Selected","flagShipment","addProductRiorderToCart","getEmptyCartPageData","setIfProductIsCanvasEdited","isEdited","setCustomizationCanvasData","newData","resetCanvasData","emptyObj","_g","21","_key","normalizeKey","_escapedHtml","encodeURIComponent","decodeURIComponent","delete","clearAll","dehydrate","rehydrate","toJSON","isDevMode","_isInvalidValue","Error","Number","isNaN","KEY","22","breadcrumbs_1","BreadcrumbsService","translateService","homeIsInit","setHomeBreadcrumb","breadcrumbsList","Level","getShortLang","homeLink","bread","Breadcrumbs","BreadcrumbLink","BreadcrumbName","unshift","setBreadcrumbs","breadcrumbs","x","toLocaleLowerCase","getBreadcrumbs","252","Register","Nation","QuickRegister","emailRepeat","telephone","customerGroup","CF","PIVA","oldGroup","EmailRepeat","Telephone","info_privacy","IsQuickRegistered","controlFormReset","253","Company","254","Product","PhotoGalleryViewModel","Category","SliderViewModel","MegaMenu","255","CheckIfExistService","emailType","partitaIvaType","codiceFiscaleType","checkIfEmailExistsInDb","checkIfPartitaIvaExistsInDb","checkIfCodiceFiscaleExistsInDb","256","OrderPaymentService","setOrderAsPayed","orderId","orderID","parseInt","CheckIsOrderPayedUnicredit","257","RecoverPasswordService","recoverPasswordRequest","share","getRecoverPasswordData","258","ConfigurationService","getConfiguration","getRoutes","259","CryptoService","encryptNumber","output","Exception","decryptNumber","encryptedString","stringWithoutPrefix","substring","stringwithoutSufix","decryptString","text","decryptedText","text_1","c","unicode","charCodeAt","260","isLogActive","logFilepath","mex","dateObj","year","getFullYear","month","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","appendFile","261","PaypalService","isPaypalScriptLoaded","isError","errMessage","loadPaypalService","externalScriptLink","createPaypalPaymentAPI","executePaypalPaymentAPI","data","paypalBtnStyle","UsePaypalProduction","renderPaypalBtn","loadExternalScript","then","scriptUrl","Promise","resolve","reject","scriptElement","src","onload","styleObj","getPaypalBtnStyle","paypal","Button","render","env","commit","locale","style","payment","request","onAuthorize","orderData","actions","executePaymentObj","paymentID","payerID","intent","paymentToken","returnUrl","CustomerId","CustomerOrderId","IsError","height","getPaypalBtnHeight","PaypalButtonHeight","color","PaypalButtonColor","shape","PaypalButtonShape","PaypalButtonLabel","tagline","PaypalButtonTagline","size","PaypalButtonSize","paypalButtonHeight","262","CategoryService","getCategory","getCatalogCategoriesData","getCategoryByUrl","getCategoryInfo","parameters","getCategoryPriceData","263","SearchService","queryText","getCategoriesAndProducts","startRow","endRow","getQueryValue","setQueryValue","newQuery","setQueryPlainTextValue","getQueryPlainTextValue","29","currencyVal","getCurrencyBackend","getDefaultCurrency","setDefaultCurrency","3","appService","currentLang","getCurrentLanguage","LanguageObj","35","TemplateService","getThankYouPagePaypalInfo","componentType","getThankYouPagOnlineInfo","getThankYouNexiInfo","messaggio","orario","getThankYouBancaSellaInfo","getComponentTemplate","getComponentTemplatePageNotFound","getHeadFootData","371","Subscription_1","template_service_1","routes_service_1","router_2","AppComponent","route","routesService","subManager","Subscription","sub","events","navigationInterceptor","currencysub","add","NavigationStart","showPageLoader","NavigationEnd","snapshot","queryParams","tempBuildId","setTemplBuilderId","_ngOnInit","NavigationCancel","hidePageLoader","NavigationError","ngOnInit","templateSub","headFootData","HeadTemplateHtml","FootTemplateHtml","clearMemory","unsubscribe","ngOnDestroy","Component","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","Emulated","ActivatedRoute","_h","RoutesService","372","breadcrumbs_service_1","cms_component_service_1","news_list_1","article_service_1","component_helper_service_1","script_service_1","helper_service_1","ArticleCategoryComponent","_compiler","componentHelper","_elementRef","articleService","cmsComponentService","scriptService","articleCategory","ArticleCategory","routeReuseStrategy","shouldReuseRoute","routeSub","pageNumber","page","header","headDataSub","getHeaderData","SideMenuData","getSideMenuData","result1","Categories","categoryId_1","categorySubId","onGetArticleSuccess","pageNumber_1","slice","lastIndexOf","categorySubUrl","CategoryDetails","currentPage","subComponent","createSubComponent","injectComponent","ChildComponent","seoService","helperService","breadcrumbsService","blogs","ArticleCategoryList","pageIsInit","blogCategoryPageName","blogCategoryPageNumber","blogPageName","homePageName","currentPageNumber","disablePreviousPage","disableNextPage","numberOfPages","NumberOfArticles","pages","createRange","zeroPage","BreadcrumbsInfo","footerData","FooterData","headerData","setTimeout","articleCategories","ArticleCategories","getRoutePath","imageTitle","imgPath","GetFileNameFromPath","number","items","i","showClickedPage","index","navigate","showPreviousPage","previousPage","showNextPage","nextPage","ngAfterViewChecked","TemplateHtml","HelperService","ViewContainerRef","_j","Compiler","ComponentHelperService","CmsComponentService","_k","Renderer","_l","373","BlogPageComponent","activatedRoute","paramsSub","blogSub","company","blogPageNumber","374","newsletter_service_1","ArticleComponent","templateService","newsDetails","NewsDetails","paramSub","Id_1","subArticleId","onGetPageSuccess","HeaderImage","subArticleUrl","newsResult","newsObj","newsletterService","slidesNews","SliderImages","model","Checkbox","privacyPageNameArticle","setupSocialNetworks","layoutTheme","initCarousel","initLightbox","shareurl","encodeURI","$","click","open","onSubmit","form","spinnerNewslatterArticle","subNewsletter","newsletterSubscribe","alreadySubscribedArticle","successfullySubscribedArticle","NewsletterService","_m","375","search_service_1","SearchComponent","searchService","decodedQuery","decoded","catAndProdSub","SearchResult","handleSearchError","defaultImageUrl","redirectUrlNone","NumberOfResults","searchResultsPage","searchResultsPageWithPagination","numberOfResult","SearchModelList","searchResults","ImageUrl","RedirectUrl","376","customerscanvas_service_1","HomeComponent","clearCache","requestDataFromMultipleSources","response1","response2","response3","getproductHilightpromo","response4","getHomePageDataOptimized","forkJoin","homePageInfo","SideMenu","promo","highlith","fork","Promotions","Highlights","canvasService","productsPageName","promotionsPageName","categories","highlights","promotions","articles","sideMenuData","sliderData","SliderData","newsletterSubmitted","privacySubmitted","alreadySubscribed","successfullySubscribed","spinnerNewslatter","CheckboxSubscribe","filteraArticleOfType","numReturn","count","Array","filter","Code_Category","res_1","item","newsSub","initAnimate","nullifyAllReferences","doSomething","CustomersCanvasService","377","cms_content_service_1","cms_menu_list_service_1","CmsPageComponent","cmsContentService","longLangCode","subParams","pageId_1","cmsIdSub","getCmsPageById","TopImage","cmsUrlSub","getCmsPageByUrl","IdLevel","cmsResult","cmsPageObj","cmsMenuListService","cmspage","menuItems","CmsMenuListService","CmsContentService","378","cookie_policy_service_1","CookiePolicyComponent","cookiePolicyService","cookieSub","getCookiePolicyData","configuration","ConfigurationInfo","CookiePolicyService","379","faq_service_1","company_service_1","FaqComponent","faqlistService","faqSub","getFaqData","companyService","faqlist","FaqList","initToggle","FaqListService","380","info_request_service_1","info_request_1","InfoRequestComponent","infoRequestService","infoSub","getInfoRequestData","componentInfo","spinnerContact","valid","sendInfoRequest","infoRequestSuccess","infoRequestFailed","InfoRequest","Where","initMap","google","geocoder","maps","Geocoder","street","StreetAddress","address","PostalCode","htmlCode","Name","geocode","results","initLongitude","geometry","lng","initLatitude","lat","mapMarkers","html","icon","image","iconsize","iconanchor","popup","mapSettings","controls","draggable","panControl","zoomControl","mapTypeControl","scaleControl","streetViewControl","overviewMapControl","scrollwheel","markers","latitude","longitude","zoom","gMap","InfoRequestService","381","NewsletterConfirmationPageComponent","newsConfirmSub","getNewsletterConfirmationPageData","382","NewsletterPageComponent","newsPageSub","getNewsletterPageData","newsletterCompletePage","console","log","383","privacy_policy_service_1","PrivacyPolicyComponent","privacyPolicyService","privacySub","getPrivacyPolicyData","PrivacyPolicyService","384","purchase_condition_service_1","PurchaseConditionComponent","purchaseConditionService","conditionSub","getPurchaseConditionServiceData","PurchaseConditionService","385","CartEmptyPageComponent","emptyCartSub","EmptyCartData","userLoginImg","386","NotFoundPageComponent","notFoundSub","headerClass","setAutoHeightAndWeightToLogo","hasClass","attr","387","OfflinePageComponent","offlinePageData","offlineSub","getOfflinePageData","pageData","OfflineMessage","388","client_area_service_1","bootbox_service_1","messages_service_1","ClientAreaOrderListComponent","clientAreaService","isAuthenticated","ClientAreaOrderListTemplate_1","header_1","showAll","orderListSub","getClientAreaOrdersList1","ClientAreaOrderListTemplate","apiService","messagesService","bootboxService","rows","rowsRiorder","columns","orderNumber","shortLang","modalTitle","modalBody","numberOfMessages","bodyMod","isSettedFilter","load","loadReorder","multipleShipmentActive","isActiveMultipleShipment","areaClientiHome","areaClientiOrdini","areaChangeProfile","areaClientiInvoices","areaClientiCatalogoRiservato","isActiveInvoicesModule","isCatalogPrivateActive","isRiordinaActive","italianLang","sProcessing","sLengthMenu","sZeroRecords","sInfo","sInfoEmpty","sInfoFiltered","sInfoPostFix","sUrl","oPaginate","sPrevious","sNext","englishLang","translateTableColumnTitle","columnTitle","ClientAreaOrderList","DataTable","searching","ordering","sDom","oLanguage","not","hide","datetimepicker","format","useCurrent","on","e","minDate","date","maxDate","onClick","indexRow","columnName","orderDetailsPage","loginRoute","order","OrderNoteList","messReadSub","showModal","orderId_1","getRiOrdersList","messagesDetails","modal","hideModal","getOrdersList","dateFrom","dateTo","orderStatus","resetTable","tableData","destroy","resetFilter","from","to","val","filterOrdersList","numberOfOrder","changeDate","stringDate","getClassforMenuClientArea","showModalRiordina","hideModalRiordina","resetTableReorder","popover","riordina","valueReorderList","selectedCount","stringInputCheck","each","elementcheck","tipoCalcolo","tipoProdotto","riorderListSub","removeAttr","i18nAlert","alertForRiorderFail","getClientAreaRiorderList","calculatePrice","idRow","qta","riga","newQta","newQtaOther","OldQta","OldQtaOther","queryLavorazione2","LavorazioneQuery","queryLavorazione3","queryLavorazione","IdRow","CalculatePriceRiorder","ProdId","resultType","showPriceCalcolatoScontistica","TablePriceList","RowId","TipoProdotto","showPriceCalcolato","cart","prodId","rowIdCalcolo","rowTipoProdotto","resultFiltered","Price","lenghtRes","price","QuantityId","StrPrice","Input","ClientAreaService","_o","BootboxService","_p","_q","_r","389","inventory_1","category_service_1","CategoryComponent","categoryService","catIdSub","onGetCategorySuccess","catUrlSub","categoryResult","Active","createSubComponentRedirect","notFoundPage","categoryObj","SubCategories","products","SubProducts","prodottiCorrelati","ProductCorrelati","showProdottiCorrelati","loginPageName","registerPageName","spinnerForm","contactFormSent","contactFormFailed","showSpinner","showTable","Lastname","Amount","Message","Configuration","TipoVisualizzazione","catPriceSub","PriceData","catInfoSub","showedFileBoxWizard","IdWizardMaster","ManageAttachmentWizard","addMatrixCommercialeProductToCart","IsHour","addToCartSub","addMatrixEditoriaProductToCart","addMatEdToCartSub","addMatToCartSub","initThumbGallery","390","product_service_1","OtherProductComponent","productService","product","productId_1","productByIdSub","onGetProductSuccess","Thumbnail","productByUrlSub","productResult","otherproductObj","shareOnFacebook","shareOnTwitter","showedFileBox","ManageAttachment","391","ProductDetailsComponent","prodByIdSub","prodByUrlSub","productDetails","isProductPrivateActiveAndShow","productObj","showSpinnerClick","currentRowIndex","currentColumnIndex","facebookShareUrl","IsWizard","productId_2","pricesSub","staticProdSub","dayId","isHour","statProdScontSub","isRowSelected","rowIndex","isColumnSelected","columnIndex","setSelectedIndex","clearSelectedIndex","isPriceDiscounted","priceDiscounted","priceInt","parseFloat","priceDiscountedInt","392","ProductPageListComponent","categoriesSub","CatalogCategories","393","PromotionsComponent","promotionsSub","ProductPromotionList","394","cart_2","cart_3","validation_service_1","CartCashComponent","cmsSub","getShoppingCartCashData","shoppingCartCashData","shoppingCartService","validationService","currentAddress","carrello","ShoppingCart","selectedAddress","selectedPayment","selectedShipment","showValidationLabels","cartCashAccepted","selectedTipoSpedizione","isVoucherValid","isVoucherInvalid","isVoucherApplied","disableButtonCart","spinnerCartCash","pageIsOnDestroy","pageIsInitAfter","carrelloPageName","spinnerCart","checkTipoSpedizione","payments","shipments","shipment","CurrentAddress","completeAddress","lastIndex","addressStreet","addressNumber","AddressNumber","tipoSped","arr","findIndex","t","TipoTrasporto","TipoTrasportoShipmentToFilter","validatePhone","addAddressVerificationScripts","addressKey","before","removeAddressVerificationScripts","checkAddressValidation","setAddressValue","streetTypeId","startsWith","updateCartAddress","currentStreet","trim","cartSub","changeAddress","addressId","shopCartSub","jobNameSub","coupon","voucherSub","validProducts","confirmOrderSub","cartOrderDetailPageUrl","ngAfterViewInit","altezza","outerHeight","margintop","css","paddingntop","altezza1","margintop1","paddingntop1","altezzaHead","margintopHead","paddingntopHead","sticky","topSpacing","bottomSpacing","isActiveAddressVerificationModule","addressVerificationKey","AddressVerificationCode","395","md5_1","paypal_service_1","CartSubmittedComponent","getShoppingCartSubmittedData","scriptId","cartSubmittedData","sanitizer","paypalService","areaClientiName","authentication","clientArea","OrderDetail","criptedOrderID","Md5","hashStr","isTipologiaPagamentoBonifico","numeroTrnInvalid","numeroCroInvalid","bonificoUploadUrl","bypassSecurityTrustResourceUrl","BonificoUploadUrl","bonificoUploadedFiles","BonificoUploadedFilesNames","pageIsAfterViewInit","paymentUrl","PaymentDoneUrl","paymentCompleteUrl","CurrencyCode","ProcessingOrderList","confirmBonificoDetails","BonificoTrn","updateBonificoPaymentDetails","BonificoCro","hideBonificoModal","checkNumeroTrn","inputText","checkNumeroCro","inputNumber","getBonificoUploadedFiles","showBonificoModal","orderDetailsRedirect","fileUploadRedirect","payWithPaypal","paypalText","translatePaypal","formHtml","GatewayUrl","GatewayAccount","OrderNumber","TotalCost","submit","payWithNexi","NexiForm","NexiText","NexiModel","requestUrl","alias","importo","divisa","codTrans","url_back_ultimoStepCarrello","mac","num_contratto","gruppo","payWithBancaSella","axerve","lightBox","BancaSellaModel","payload","callback","responseURL","PaymentType","PaymentStatus","StrTotalBeforeTax","shop","shopId","IsNewPaypalIntegration","PaypalButtonStyle","DomSanitizer","396","register_service_1","user_login_1","company_1","CartComponent","isChangeShipment","isChangeShipmentParam","cartDataSub","getShoppingCartData","shoppingCartData","registerService","selectedPaymentId","selectedShipmentId","locations","userLogin","UserLogin","hasPickUpActive","hasShipmentActive","hasDeliveryActive","disableModalCartButtons","showProceedBtn","parentWidgetData","CanvasInfo","mapZoom","MapZoom","clickedProductId","trasportoLabel","ritiroLabel","consegnaLabel","countInitMap","cartStep1","cartStep2","canvasSub","isCanvasModalOpened$","isModalOpened","scrollTo","canvasEditedSub","isCanvasProductDesignApproved$","isDesignApproved","canvasData_1","RowIdPrev","updateCanvas","updatePrevCanvasInfo","find","obj","TipiSpedizione","valore","chiave","isVisible","UserData","isCompletedRegistration","IsCompletedRegistration","userData","isUserAuthenticated","sort","a","b","OrderSort","Sort","Latitudine","Longitudine","Id_User_Group","CodiceDestinatarioSDL","PecEmail","scroll","getElementById","scrollIntoView","gotoToStep1Cart","gotoToStep2Cart","changeTipoSpedizioneValue","isUpdate","isRemovingCart","showAllType","DeliveryTime","shipmentToShow","DefaultShipment","selectRadioShipment","shipmentToSelect","shipentToSelect","openCanvasEditor","CanvasUrl","canvasConfigData","setCanvasConfig","TemplateImagesFolderPath","CustomerCanvasUserName","Watermark","WatermarkText","CanvasApiKey","ApiKey","toShowCanvasButton","isModuleActive","IsActiveCanvasModule","removeCustomersCanvasState","selectedProduct","deleteCustomerCanvasState","goRegistrationPage","quickRegistration","registerRoute","setFacebookLoginData","goLoginPage","goToConfirmPurchasePage","goToModifyProfile","saveCartSub","selectRadioPayment","paymentSub","isOnMap","isOnRemove","shipmentSub","SelectValueMap","removeCartSub","idOfProduct","those","removeClass","addClass","pt","LatLng","Map","center","mapTypeId","MapTypeId","ROADMAP","setCenter","marker","infowindow","InfoWindow","Marker","position","setContent","addListener","selectInfoWindow","close","RegisterService","397","ClientAreaCatalogPrivateComponent","UserId","getClientAreaCatalogPrivate","PageInfo_1","SideMenu_1","UserId_1","orderNotFoundSub","ProductPrivateList","398","client_area_1","ClientAreaHomeComponent","clientDetailsSub","getDetailsClientArea","ClientAreaHomeTemplate","ClientAreaDetails","messagesList","lastOrderDetailsPage","userName","NewNoteOrdersCount","lastOrderId","LastOrderId","setMessSub","399","ClientAreaInvoicesComponent","ClientAreaInvoicesListTemplate","invoicesSub","getClientAreaInvoicesList","redirectToHomepage","documentTypeSelect","invoiceNumber","ClientAreaInvoicesList","getInvoicesList","documentType","filterInvoicesList","filterOrderNumber","filterInvoiceNumber","4","shared_module_1","compiler","containterRef","componentToInject","DynamicModule","NgModule","imports","SharedModule","declarations","compileModuleAndAllComponentsAsync","moduleWithFactories","compFactory","componentFactories","cmpRef","createComponent","40","procededToBuy","goToCart","bot_1","bootbox","dialog","backdrop","buttons","confirm","cancel","navigateToCart","className","alert","alertReorderDone","bot_2","400","client_area_2","client_area_3","ClientAreaOrderDetailsComponent","ClientAreaOrderDetails","templateHtml","orderIdSub","getClientAreaOrderDetails","ProcessOrder","processingSubject","clientAreaList","orderProcessMessageList","ClientAreaProcessingOrders","idord","upload","info","comunicazioni","noMessages","checkValues","waitingDetails","startTrnValue","startCroValue","len","nameLast","translatedName","routeParamsSub","pagefrom","url_back_dettaglioOrdine","process","FileUploadSecuredUrl","FileUploadUrl","PreflightUploadSecuredUrl","PreflightUploadUrl","TrackingUrl","cancelOrders","cancelOrdSub","Status","isDisabled","processMessage","postMessageSub","postClientAreaSendProcessOrderMessageint","UserCreated","OrderProcessMessageList","ClientAreaOrderProcessMessages","CreatedBy","StringDateCreated","From","Subject","refreshProcessFiles","processFilesSub","getProcessOrderFiles","ListOfFiles","Size","endsWith","FileState","Files","401","register_1","ClientAreaProfileComponent","templateHtmlUserProfile","userProfileSub","getUserAreaProfile","userProfile","onCreate","EventEmitter","Prov","Cap","CompanyName","Piva","TaxCode","SubName","CodiceDestinatario","CurrentPassword","PasswordRepeat","AddressRadio","DefaultAddress","modelAddAndRemoveAddress","AddressId","clientAreaProfile","ClientAreaUserProfile","addresses","clientAddress","ClientAreaUserAddress","register","isExist","decryptedUserId","GetDecryptedUserId","userGroup","UserGroup","ContactFirstName","ContactLastName","AreaCode","ContactPhone","DefaultAddressId","ContactMobile","id1","isCodDestRequired","isPecEmailRequired","cap","changeUserProfile","updateProfileSub","updateUserProfile","updateSuccessful","updateFailed","addNewAddress","newAddressSub","SubmitPassword","updatePassSub","updateUserPassword","changePasswordSuccessful","changePasswordFailed","setDefaultAddress","resetAddress","updateUserAddresses","updateAddressSub","updateAddresses","defaultFound","updateAddressFailed","updateAddressSuccessful","removeAddress","removeAddressSub","splice","exception","Output","402","PaymentBancaSellaConfirmationComponent","orderid","orderCheckout","thankYouSub","typeId","success","errorMessage","failed","serverError","createScript","403","order_payment_service_1","PaymentConfirmationComponent","paramsObj","isNewPaypalImplementation","urlParams","orderPaymentService","item_number","hashedOrderId","paramsRouteSub","encryptedOrder","st","setOrderAsPaid","orderPaySub","404","PaymentNexiConfirmationComponent","405","PaymentUnicreditConfirmationComponent","resultPagOnline","split","406","login_service_1","check_existence_service_1","configuration_service_1","header_service_1","QuickRegistrationComponent","companyInfo","quickRegistrationData","loginService","checkExists","activeRoute","configurationService","headerService","isEmailValid","emailExists","isPivaValid","pivaExists","isCFValid","CFExists","pageFrom","modelRegistration","paramPageFrom","setConfiguration","finishQuickRegistration","submitButton","nativeElement","disabled","quickRegisterUserObj","setQuickRegisterObject","putObject","sendInfoSub","hideModalQuickRegistration","Id_User_Dettail","Login","showQuickRegistrationSuccessModal","QuickEmailUser","QuickPartitaIva","QuickCodiceFiscale","QuickClientType","QuickTelephone","hideModalQuickRegistrationEmail","showModalQuickRegistration","checkEmail","checkEmailSub","checkPiva","field","checkCF","resultConfiguration","companySub","resultCompany","Privacy","join","onCustomerGroupChange","setValuesOnCustomerGroupChange","saveOldGroup","resetForm","showModalQuickRegistrationEmail","hideQuickRegistrationSuccessModal","hideModalQuickRegistrationEmailAndResetEmail","modalId","querySelector","zIndex","ViewChild","ElementRef","407","RegisterComponent","isQuickRegistration","registerSub","getRegisterPageData","IsActiveQuickRegistration","isQuickRegistrationActive","siteKey","theme","emailError","passwordError","validEmail","showEmailInvalid","showPivaInvalid","showCFInvalid","isValidCodDest","isValidPecEmail","isRequiredPecEmail","quickRegisteredUser","registerViaFbData","getFacebookLoginData","disableFbDataFields","cartRoute","homepageRoute","nationCode","nationList","customerTypeList","UserTypes","onNationTypeChange","DefaultNation","CustomerType","getObject","setModelDataFromCookies","setModelDataFromFb","isItalyNation","isPrivateCustomer","isQuickRegistered","disableFieldsFilledFromFbData","reg","emailValid","piva","selected","navigateToCorespondingPage","isRegisterFailed","registrationCompletePage","setVerified","isCaptchaInvalid","onCustomerTypeChange","Code","currentModel","_s","_t","_u","_v","408","RegistrationConfirmationPageComponent","registrationDoneSub","getRegistrationCompletePageData","isRegisteredViaFacebook","409","RegistrationConfirmationComponent","registrationConfirmation","compTemplateSub","active","userid","checkActivation","confirmRegSub","confirmationRegistration","410","recover_password_service_1","UserLoginComponent","cmsService","loginData","loginSub","getLoginPageData","recoverPasswordService","countFb","userLoginUrl","emailErrorRecover","constructorIsInit","isActiveFacebookModule","modelRecover","onFacebookLoginClick","FB","login","getUserInfoFromFb","scope","getUserFromFb","authSub","userNotActive","userNotFound","first_name","last_name","loginDataSub","fbCode","FacebookAppID","initFacebook","init","appId","xfbml","version","recoverPassword","recoverPassSub","recoverPasswordFailed","recoverPasswordSuccess","411","UserPasswordComponent","412","News","UrlRedirect","413","pageId","pageUrl","414","setPageUrl","menus","SeoUrl","Children","LoadData","415","416","417","SliderService","418","TrustpilotService","getTrustpilotData","419","420","CookieOptions","path","domain","expires","secure","isPresent","merge","421","422","423","home_component_1","faq_component_1","cookie_policy_component_1","privacy_policy_component_1","purchase_condition_component_1","info_request_component_1","user_login_component_1","user_password_component_1","register_component_1","cms_page_component_1","category_component_1","product_details_component_1","product_page_list_component_1","promotions_component_1","news_page_component_1","other_product_component_1","blog_page_component_1","article_category_component_1","client_area_home_component_1","client_area_order_list_component_1","client_area_profile_component_1","cart_component_1","cart_cash_component_1","cart_submitted_component_1","cart_empty_page_component_1","client_area_order_details_component_1","client_area_catalog_private_component_1","registration_confirmation_component_1","offline_page_component_1","payment_confirmation_component_1","payment_unicredit_confirmation_component_1","payment_nexi_confirmation_component_1","payment_banca_sella_confirmation_component_1","not_found_page_component_1","search_component_1","client_area_invoices_component_1","newsletter_confirmation_page_component_1","newsletter_page_component_1","registration_complete_component_1","quick_registration_component_1","SysConfig","getComponentByName","componentName","component","getAllComponents","43","crypto_service_1","common_1","cryptoService","isCanvasModalOpenedSource","isCanvasProductDesignApprovedSource","toShowCanvasContainer","approveData","renderData","saveData","editor","loadData","workflowPages","documentLinks","setCanvasState","isOpened","setCanvasProductDesignState","isApproved","canvasInfo","isStateId","canvasUrl","canvasScript","node","async","charset","instanciateIframe","getElementsByTagName","productDefinition","templateImagesFolderPath","canvasUserUsername","watermark","surfaces","editorFrame","initialMode","opacity","widgets","FinishButton","mode","GalleryDialog","defaultTabName","tabs","translationKey","canEdit","canUpload","subFolderName","CustomersCanvas","IframeApi","loadEditor","saveCanvasProduct","saveProduct","getImagesLinks","editorPage","approvePage","finishOrderPage","design","elements","approve","finish","getProofImages","proofImageUrls","setupPage","setBackgroundImagesUrl","sliderImageElements","differenceItems","parentLi","parents","link","foundDomElement","finishProductCustomization","finishProductDesign","setupPageAfterProductCustomization","openDocumentInNewTab","sliderElements","openNewProductInEditor","revertProduct","reopenProductInEditor","destPageData","generatedIdHide","fadeOut","generatedIdShow","show","decryptedApiKey","baseUrl","apiKeyFinal","PlatformLocation","466","webpackEmptyContext","req","469","__compiler__","__core_private__","ViewUtils","view_utils","SelectorMatcher","CssSelector","o","__compiler_private__","470","getLRU","lru","getRequest","getResponse","TranslateStaticLoaderFactory","browser_2","TranslateStaticLoader","forms_1","browser_1","idle_preload_1","app_module_1","default_request_options_1","routes_browser_service_1","UNIVERSAL_KEY","MainModule","routes","doRehydrate","use","loadRoutes","defaultValue","serverCache","_getCacheValue","win","bootstrap","UniversalModule","FormsModule","TranslateModule","forRoot","loader","provide","TranslateLoader","useFactory","deps","RouterModule","useHash","preloadingStrategy","IdlePreload","IdlePreloadModule","AppModule","providers","RequestOptions","useClass","DefaultRequestOptions","CookieBrowserService","RoutesBrowserService","useValue","48","filePath","fileName","pop","5","system_configuration_service_1","visiblePageLoader","getRoutesWithComponents","rawRoutes","assign","getOnlyOfflineRoutes","offlineRawRoutes","rawRoutes_1","rowRoute","redirectToRoute","redirectTo","pathMatch","offlineRoute","fallBackRoute","locales","langFromUrlMatch","langFromUrl","match","cookieLang","COOKIE_LANG_KEY","existLang","_loop_1","existBrowserLang","this_1","browserLangs","state_1","routeName","routePath","getPage","Location","56","QuotingModel","categorieCarteCount","categorieCarteCopertinaCount","carte1Count","carte2Count","colori1Count","colori2Count","grammature1Count","grammature2Count","plastificazioni1Count","plastificazioni2Count","piegatureCount","materialiFlessibiliCount","copieCount","supportiRigidiCount","elettrosaldatureCount","tagliCount","copertineCount","rilegatureCount","facciateCount","tipologieBustaCount","multiploFacciate","facciateIsValid","formatiIsValid","carte1IsValid","grammature1IsValid","carte2IsValid","grammature2IsValid","copertineIsValid","rilegatureIsValid","lavorazioniIsValid","taglioShowed","isTaglioVisible","copieOrder","facciateOrder","formatiOrder","stampaInternoFronteOrder","stampaInternoOrder","carteInternoOrder","plastificazioniInternoOrder","copertineOrder","stampaCopertinaFronteOrder","stampaCopertinaOrder","cartaCopertinaOrder","plastificazioniCopertinaOrder","cartoncinoOrder","rilegatureOrder","rifiloOrder","lavorazioniAccessorieOrder","piegatureIsValid","plastificazione1IsValid","plastificazione2IsValid","soggettiOrder","soggettiIsValid","baseFormatoIsValid","baseFormatoMessage","altezzaFormatoIsValid","altezzaFormatoMessage","formatiMultipliIsValid","formatiVisual","stampaInternoVisual","carteInternoVisual","plastificazioniInternoVisual","copertineVisual","stampaCopertinaVisual","cartaCopertinaVisual","plastificazioniCopertinaVisual","rilegatureVisual","lavorazioniAccessorieVisual","piegatureVisual","taglioOrder","taglioIsValid","bustaOrder","bustaIsValid","materialeOrder","materialeIsValid","supportoOrder","supportoIsValid","idGruppo","occhiellaturaOrder","occhiellaturaIsValid","occhielliCount","occhielliDisposizioneCount","asolaOrder","asolaIsValid","asoleCount","asoleDisposizioniCount","cucituraOrder","cucituraIsValid","cucitureCount","cucitureDisposizioniCount","elettroOrder","elettroIsValid","elettrosaldatureDisposizioniCount","bifaccialeOrder","biancoCoprenteOrder","biancoCoprenteCount","distanzaOcchielliIsValid","diametroAsolaIsValid","pantoniCount","colori1IsValid","cartoncinoIsValid","cartoncinoVisual","cartonciniCount","grammatureCartoncinoIsValid","grammatureCartoncinoCount","basePackagingIsValid","profonditaPackagingIsValid","idBasePackaging","idProfonditaPackaging","formatiCount","gapLabel","diametroInterno","diametroMassimoEsterno","formatiTipoLabelCount","formatiTipoLabelIsValid","fustelleLabelCount","fustellaLabelIsValid","avvolgimentiCount","avvolgimentiIsValid","numEtichetteIsValid","DiametroInternoAnimaEditabileLabel","DiametroInternoAnimaIsValid","DiametroMassimoEsternoAnimaEditabile","DiametroMassimoEsternoAnimaIsValid","WizardListinoScontistica","SelectObject","MyVarianteMatrice","MyLavorazioneAccessoria","isValid","valoriCount","Regola","MyLavorazioneAccessoriaReturn","LavorazioniComponents","checkBox","inputBox","selectBox","594","app_component_1","home_module_1","cms_page_module_1","inventory_product_module_1","inventory_category_module_1","settings_module_1","ng2_table_1","entryComponents","HomeModule","CmsPageModule","InventoryProductModule","InventoryCategoryModule","SettingsModule","Ng2TableModule","app_component_2","595","NewsListComponent","subComponentTemplateUrl","newsOrientation","templateData","headerTypeNews","inputItems","inputCategory","inputNewsOrientation","inputHeaderTypeNews","inputColumns","ArticleList","596","FooterComponent","parentFooterData","footerData_1","footerSub","getFooterData","loggedIdUser","isActiveQuickRegistration","faqPageName","privacyPageName","cookiePageName","purchasePageName","contactPageName","passwordPageName","areaClientiPageName","isArrayInit","linkStart","linkSecuredStart","Facebook","Youtube","Twitter","Website","Instagram","newsletterSub","597","NewsletterComponent","pageTemplateSub","CheckboxFooter","privacyPageNameNewsletter","598","router_state_1","HeaderComponent","parentHeaderData","headerInfo_1","headerInfo","headerIsInit","MenuList","megaMenuItems","QuickRegistrationData","isLazyLoadActive","isEnableLAzyLoad","languagesList","Languages","currentLanguage","shoppingCart","disableModalButtons","spinner","entry","ShortCode","setLanguage","logout","Logout","getSearchResults","inputVal","subParam","encodedQuery","uriString","searchRoute","plainSearchText","keyup","keyCode","initNavMenu","initStickyHeader","initLazy","webStoreStatus","initVideo","599","60","600","SideBarMenuComponent","sideType","parentSideMenuData","bredcrumpInfo","601","602","CanvasWidgetComponent","canvasWidgetComponent","finishDesign","isCanvasModalOpened","initSlider","603","slider_service_1","SliderWidgetComponent","parentSliderData","sliderData_1","sliderDataSub","getSliderData","sliderService","elementRef","slides","Slides","sliderIsInit","setElementStyle","goToUrl","604","trustpilot_service_1","TrustpilotWidgetComponent","trustpilotService","trustpilotType","trustpilotSub","trustpilotData","trustboxesRef","querySelectorAll","singleTrustboxInstance","Trustpilot","loadFromElement","605","QuotingOrderTotalsComponent","orderTotalSub","_elementChildRef","606","quoting_service_1","quoting_submit_model_1","quoting_submit_model_2","quoting_submit_model_3","quoting_constants_1","quoting_excluding_component_1","shared_constants_1","quoting_model_1","OtherProductFormComponent","autentification","otherProdSub","getOtherProductData","formInfo","InputresourceId","_quotingService","formData","FormData","resourceId","resultPrice","resultCalculation","isDataInitialized","requestInfoSuccess","showErrorMessage","companyInformation","CompanyInfo","isFormValid","sumQtaMatrix","totalQtaForMatrix","isCalculatedProduct","isVisibleMatrixLav","ExcludingRules","ExcludingComponent","responseModel","array","TableScontisticaPriceList","typePriceResult","gruppi","group","varianti","VarianteMatrix","createMatriceObj","setMacrocategory","SharedConstants","OTHER_PRODUCTS_TYPE","convertLogicalToViewQuotingModel","checkValidation","setInterval","checkFirstDayForHour","priceList","priceList_1","priceRow","listaRegole","calculationType","companyCondizioni","lavorazioniAccessorie","lavAcc","convertLogicalToViewModelVarianti","obbligatorio","hasInfo","showInfo","valori","lavorazioneCheckValue","isCalculated","tipoSelezione","idVarianteMatriceOrizzontale","idVarianteMatriceVerticale","intFormValue","variante","varianteMatrice","VarianteVerticale","VarianteOrizzontale","isMatrix","option","varianteMatverticale","nome","colore","colorExaForMatrix","mostraPerVariantiMatrice","varianti2","option2","varianteMat2","option3","varianteMat3","checkRegoleOtherProducts","lavAccArray_1","lav","lavorazioneId","ResetRegole","ApplicaRegoleLavorazioniAccessorie","count_1","lavorazione","lavAccArray_2","lavorazioneOld","dropDownChange","checkBoxChanged","isrules","descrizione","lavorazioniAccessorieComboVisualChange","checkForm","getCalculationModel","checkFormRichiestaPrevIsValid","QuotingConstants","WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO","isCustomerLoggedIn","sendRequestInfo","showHideLavDescription","isCalculationTypeCalcolato","isCalculationTypeCalcolatoScontistica","quantity","minCopie","minimo_quantita","maxCopie","maximo_quantita","isQuantityValidated","copie","ismatrixPresent","attribute","minQta","minQtaInput","maxQta","maxQtaInput","isValidated","lavorazioneMessage","convertedWidth","convertedHeight","convertedDepth","isWidthValidated","isHeightValidated","isDepthValidated","widthErrorMex","max_base","min_base","heightErrorMex","max_altezza","min_altezza","hasDepth","depthErrorMex","max_profondita","min_profondita","isQuantityMatrixValidated","MatrixMessage","StrCustomerId","lavorazione_1","matrixValues","matrix","quantita","lavorazioneOrizzontaleId","lavorazioneVerticaleId","calculationSub_1","getCalculatedAp","scontisticaTable","setPriceResult","isCalculationTypeListino","isCalculationTypeCalcolatoListino","isCalculationTypeCalcolatoListinoFornitori","tableScontisticaPriceListSliced","slicedPriceRow","setListinoPriceResult","isCalculationTypeListinoScontistica","isCalculationTypeCalcolatoListinoScontistica","isCalculationTypeCalcolatoListinoFornitoriScontistica","breakFlag","tableScontisticaPriceListSliced_1","reverse","reverse_1","setListinoScontisticaPriceResult","isCalculationTypeCalcolatoQuotigPrev","WIZARD_CALCULATION_TYPE_CALCOLATO","WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA","WIZARD_CALCULATION_TYPE_LISTINO","WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA","checkEmailIsValid","EMAIL_REGEXP","RowIndex","ColumnIndex","isRowSelectedListino","isCellSelectedListino","isCellSelected","isColumnSelectedListino","IsSelected","StrDiscountedPrice","DataId","DayId","DayDescriptionStatus","StrUnitPrice","StrIva","StrDiscountedPriceWithTax","StrWeight","StrWeightUm","PrezzoOriginalestato","setTypePriceResult","setSelectedIndexListino","addToCartApProduct","addToCartOtherProductCalcolatoScontistica","addToCartWizardListino","addToCartWizardListinoScontistica","Varianti","textAreaCheck","setPopoverVariableForMAtrix","QuotingService","607","QuotingMainComponent","compSub","QResourceId","QMacroCat","QType","InputMacroCatId","InputTypeId","ParentComponent","608","quoting_submit_model_4","quoting_submit_model_5","WizardAdesiviComponent","wizardSub","getWizardAdesiviData","waiting","carteValue","blockquoting","formatiMultipliList","isCalculatedWizard","addToCartWizardCalcolato","addToCartWizardCalcolatoScontistica","valueStampaInternoSoloFronte","valueStampaCopertinaSoloFronte","isFormatiMultiliEnabled","aggiungiFormatoMultiplo","parameterValidation","firstLoad","fileObj","lastId","Copie","Width","minimoBase","Height","minimoAltezza","deleteFormatoMultiplo","isUserLoggedIn","CheckRegoleAdesivi","oldMateriale","oldSupporto","oldFormato","oldPlastificazione","lavAccArray","idFormato","ApplicaRegole","onFormatiChange","onPlastificationInternoChange","onMaterialeChange","onSuportoChange","lavorazioniAccessorieComboChange","CheckRegoleManifesti","CheckRegolePannelli","lavAccArray_3","validationFormatiMultipli","validationCopie","validationSoggetti","validationFormati","validationBaseFormati","validationAltezzaFormati","validationMateriali","validationSupporti","countPlastificazioni","validationLavorazioneAccessoria","selectFileCombination","plastificazioni1","listaFile","FilesCombinazioniObj","listaFilesCombinazioni","file","FormatId","PathFile","NomeFile","FileName","PathIstruzioni","NomeIstruzioni","FileIstructionName","checkZero","listaFormatiMultipli","lavorazioneAccessoria","calcWizSub","getCalculatedWizard","$wrapper","dataset","appendTo","base","minBase","maxBase","massimoBase","minAltezza","maxAltezza","massimoAltezza","soggettiMessage","minimoCopie","massimoCopie","formati","formatiMessage","validationBaseFormatiMultipli","baseInput","validationAltezzaFormatiMultipli","altezzaInput","validationCopieFormatiMultipli","copieInput","heighMessage","materialiFlessibili","materialeMessage","supportiRigidi","supportoMessage","transSub","checkIsPlastificazioneInternoIsShowed","isPlastificazioneRequired","isAttributeFixed","tipoLavorazione","checkIsLavorazioneAccessoriaCheckShowed","checkIsLavorazioneAccessoriaNumericShowed","checkIsLavorazioneAccessoriaTextAreaShowed","InputNumberCheck","checkIsLavorazioneAccessoriaComboShowed","selectedValue","checkIsLavorazioneAccessoriaDescrittivoShowed","formato","formatoDescription","formatoImage","formatiHasInfo","formatiShowInfo","onFormatiVisualChange","formatId","materiale","materialeDescription","materialeImage","materialeHasInfo","materialeShowInfo","onMaterialeVisualChange","materialeId","supporto","supportoDescription","supportoImage","supportoHasInfo","supportoShowInfo","onSuportoVisualChange","supportoId","plastification","plastificazioni1Description","plastificazioni1Image","plastificazioni1HasInfo","plastificazioni1ShowInfo","onPlastificationInternoViasualChange","plastificationId","showHideFormatDescription","showHideMaterialeDescription","showHideSupportoDescription","showHidePlastficationInternoDescription","wizCalSub","wizSconSub","wizLisSub","wizLisSconSub","609","WizardBannerComponent","getWizardBannerData","CheckRegoleBanner","oldAsola","oldElettro","oldOcchielli","onOcchielliChange","onAsoleChange","onElettrosaldatureChange","checkIsAsolaIsShowed","asole","checkIsCucituraIsShowed","cuciture","checkIsElettroIsShowed","elettrosaldature","checkIsOcchielliIsShowed","occhielli","CheckRegoleBandiere","oldCucitura","onCucitureChange","isBannerQuotingForm","isBandiereQuotingForm","validationElettro","validationCuciture","validationAsole","validationDiametroAsole","validationOcchielli","validationDistanzaOcchielli","countOcchielliDisposizione","countAsoleDisposizioni","countTelettrosaldature","countTelettrosaldatureDisposizioni","countCucitureDisposizioni","occhielliDisposizione","asoleDisposizioni","elettrosaldatureDisposizioni","cucitureDisposizioni","occhiellaturaMessage","asolaMessage","diametro","diametroAsolaMessage","distanza","distanzaOcchielliMessage","elettroMessage","cucituraMessage","occhiellatura","occhiellaturaDescription","occhiellaturaImage","occhiellaturaHasInfo","occhiellaturaShowInfo","onOcchielliVisualChange","occhielliId","asola","asolaDescription","asolaImage","asolaHasInfo","asolaShowInfo","onAsoleVisualChange","asoleId","elettro","elettroDescription","elettroImage","elettroHasInfo","elettroShowInfo","onElettrosaldatureVisualChange","elettroId","cucitura","cucituraDescription","cucituraImage","cucituraHasInfo","cucituraShowInfo","onCucitureVisualChange","cucituraId","showHideOcchiellaturaDescription","showHideAsolaDescription","showHideElettrosaldatureDescription","showHideCucitureDescription","61","getWizardStampaData","modelType","getWizardBusteData","getWizardEtichetteData","getWizardCommercialeData","getWizardEditoriaData","getWizardDataRequest","610","WizardBusteComponent","resultPriceQuantity","resultPriceImponibile","resultPriceCurrency","tipoTaglio","getTableValues","onStampaRetroChangeDocta","colori1","col","onStampaFronteChangeDocta","colori2","validationBusta","validationColori","countPantoni","pantoni","sub_1","colori1Message","tipologieBusta","bustaMessage","onBustaChange","busta","bustaDescription","bustaImage","bustaHasInfo","bustaShowInfo","onBustaVisualChange","bustaId","onPantoneFronte1VisualChange","pantoneValue","onPantoneFronte1Change","pantone","pantoneFronte1Description","pantoneFronte1Image","pantoneFronte1HasInfo","pantoneFronte1ShowInfo","onPantoneFronte2VisualChange","onPantoneFronte2Change","pantoneFronte2Description","pantoneFronte2Image","pantoneFronte2HasInfo","pantoneFronte2ShowInfo","onPantoneRetro1VisualChange","onPantoneRetro1Change","pantoneRetro1Description","pantoneRetro1Image","pantoneRetro1HasInfo","pantoneRetro1ShowInfo","onPantoneRetro2VisualChange","onPantoneRetro2Change","pantoneRetro2Description","pantoneRetro2Image","pantoneRetro2HasInfo","pantoneRetro2ShowInfo","onStampaInternoVisualChange","stampaInternoValue","onStampaRetroVisualChange","stampaCopertinaValue","showHideBusteDescription","showHidePantoneFronte1Description","showHidePantoneFronte2Description","showHidePantoneRetro1Description","showHidePantoneRetro2Description","isPantoneFronte1Showed","isPantoneFronte2Showed","isPantoneRetro1Showed","isPantoneRetro2Showed","611","WizardCommercialeComponent","listaProfonditaPackaging","listaFormatiFull","packangingProfonditaChange","packangingBaseChange","IsPackagingWizard","onBasePackagingChange","CheckRegoleCommerciale","oldCarta","oldPiegature","idCarta","isTaglioCalculated","onCartaInternoFieldChanged","onPiegaturaChange","validationBasePackaging","validationProfonditaPackaging","validationCarteInterno","validationGrammatureCarteInterno","validationPiegatura","validationPlastificazione","countCartaCategories","categorieCarte","carte1","carta","grammature1","grammatureInterno","basePackagingMessage","profonditaPackagingMessage","carte1Message","grammature1Message","piegature","piegatureMessage","plastificazione1Message","tipoCalcoloTaglio","checkIsTaglioShowed","onCategoriaCartaInternoFieldChanged","selectedPaper","carte","idCategorieCarte1","parentId","carte1Description","carte1Image","carte1HasInfo","carte1ShowInfo","subElements","wrap_valore","grammature","onCartaInternoVisualFieldChanged","paperId","listaPackagingParameter","IdBase","listPackagingRelProfondita","IdProfondita","onProfonditaPackagingChange","firstFormato_1","profondita","listPackagingRelFormato","idFIrstFormat_1","formatiRel","stringId","IdFormato","onGrammatureInternoVisualFieldChanged","grammatureId","piegatura","piegatureDescription","piegatureImage","piegatureHasInfo","piegatureShowInfo","onPiegaturaVisualChange","piegaturaId","showHidePiegatureDescription","showHidePaperInternoDescription","setActive","PiegaId","612","quoting_model_2","WizardEditoriaComponent","resourceType","InputresourceType","components","EditioriaCopertinaSelect","carte2","cartaCopertina","grammature2","grammatureCopertina","cartoncini","cartaCartoncino","grammatureCartoncino","dorsoString","dorso","toFixed","checkIsCopertinaShowed","checkIsCartoncinoShowed","checkIsPlastificazioneCopertinaIsShowed","plastificazioni2","lavIsVisible","onCartoncinoFieldChanged","cartoncinoDescription","cartoncinoImage","cartoncinoHasInfo","cartoncinoShowInfo","onCartoncinoVisualFieldChanged","onCategoriaCartaCopertinaFieldChanged","carteCopertina","idCategorieCarte2","carte2Description","carte2Image","carte2HasInfo","carte2ShowInfo","onCartaCopertinaFieldChanged","grammatureCartaCopertina","onCopertineFieldChange","onCopertineFieldVisualChange","copertinaId","onCartaCopertinaVisualFieldChanged","onStampaCopertinaVisualChange","onGrammatureCartoncinoVisualFieldChanged","onGrammatureCopertinaVisualFieldChanged","onPlastificationCopertinaChange","plastificazioni2Description","plastificazioni2Image","plastificazioni2HasInfo","plastificazioni2ShowInfo","onPlastificationCopertinaVisualChange","onRilegaturaChange","rilegature","rilegatureDescription","rilegatureImage","rilegatureHasInfo","rilegatureShowInfo","onRilegaturaVisualChange","rilegaturaId","showHidePaperCartoncinoDescription","showHidePaperCopertinaDescription","showHidePlastficationCopertinaDescription","showHideRilegatureDescription","CheckRegoleEditoria","oldCartaCopertina","oldPlastificazioneCopertina","oldCopertina","oldRilegatura","validationFacciate","validationPlastificazioneInterno","validationCopertina","validationCarteCopertina","validationGrammatureCarteCopertina","validationPlastificazioneCopertina","validationCartoncino","validationGrammatureCartoncino","validationRilegatura","countCategorieCarteCopertina","categorieCarteCopertina","minFacciate","minimoFacciate","maxFacciate","massimoFacciate","objGrammaturaFacciateValidation","checkValidationRulesGrammatureFacciate","Facciate","MassimoFacciate","facciate","facciateMessage","cartoncinoMessage","grammatureCartoncinoMessage","plastificazione2Message","carte2Message","grammature2Message","copertine","copertineMessage","umLavorazione","facciata","checkFacciateNum","percentualePagineTotEditoria","rilegatureMessage","idGrammatura","listaRegoleGrammaturaFacciate","IdGrammatura","613","WizardEtichetteComponent","enableAltezzaLabel","CheckRegoleEtichette","oldTaglio","onTaglioChange","isLabelField","validationNumEtichetteLabel","validationDiametroInternoAnimaLabel","validationDiametroMassimoEsternoAnimaLabel","enableOrDisableAltezzaLabelByTipoFormato","countTagli","countFustelle","countFormatiTipoLabel","tagli","ListafustelleLabel","TipologiaFormatiLabel","minDistEtichette","minimaDistanzaEtichetteLabel","maxDistEtichette","massimaDistanzaEtichetteLabel","numEtichetteMessage","numDiametroInternoAnimaCustomer","numDiametroInternoAnima","numDiametroInternoAnimaEditabileLabel","DiametroInternoAnimaMessage","numDiametroMassimoEsternoCustomer","numDiametroMassimoEsterno","numDiametroMassimoEsternoAnimaEditabile","DiametroMassimoEsternoAnimaMessage","checkIsTaglioIsShowed","taglioDescription","taglioImage","taglioHasInfo","taglioShowInfo","onTaglioVisualChange","taglioId","onFormatiTipoLabelChange","formatoTipo","formatiTipoImage","formatiTipoHasInfo","formatiTipoLabelShowInfo","tipoFormato","onFormatiTipoLabelVisualChange","fotmatoTipoId","onAvvolgimentiChange","avvolgimentiLabel","avvolgimento","avvolgimentiImage","avvolgimentiHasInfo","avvolgimentiShowInfo","onAvvolgimentiVisualChange","avvolgimentoId","showHideTaglioDescription","showHideFormatiTipoLabelDescription","showHideAvvolgimentiDescription","614","WizardStampaComponent","isStampaBifaccialeNoHide","isStampaBifaccialeSiHide","CheckRegoleStampa","countBiancoCoprente","biancoCoprente","stampaBifacciale","checkIsBifaccialeShowed","615","616","617","618","619","62","collection","defaultAddress","getClientAreaOrdersList","toTimeString","lavorazioneQuery","dictionary","orderRowId","sendTo","messageObject","OrderRowId","SendTo","MessageObject","processId","ProcessId","numeroCro","numeroTrn","IdOrder","620","621","622","cookie_options_1","setOptions","defaultOptions","cookieReader","getAll","cookieWriter","stringify","removeAll","cookies","cookieArray","rawDocument","lastCookies","lastCookieString","that","currentCookieString","safeDecodeURIComponent","isBlank","buildCookieString","str","cookiePath","defaultOpts","opts","mergeOptions","isString","toUTCString","cookieLength","providedOpts","newOpts","623","CookieNodeService","generateOptions","clearCookie","624","625","_super","apply","arguments","Content-Type","__extends","BaseRequestOptions","626","LoadingOverlayService","showPageLoadingOverlay","jQuery","hidePageLoadingOverlay","627","LocalStorageService","Write","localStorage","setItem","Read","getItem","Helper","toInstance","Remove","removeItem","jsonObj","fromJSON","propName","628","call","getBrowserLangs","resetConfig","navigator","languages","browserLanguage","userLanguage","629","__export","m","p","630","getTranslation","observable$","appConfig","templateName","finally","631","hashCodeString","hash","ModelService","create","640","72","getMacrocategory","Macrocategory","macrocategory","getModelItemName","removeSelectRules","getLowerCase","lavorazioneKey","subKey","isArray","removeRuleFromComponent","valoriSubKey","removeSelectRuleFromList","regoles","regoleKey","Categoria_2","Id_Elemento_2","Sezione_2","list","returnList","getRegole","regolesList","categoria","allRegoles","categoryRegoles","regolesKey","getLavorazioneValue","hideFinituraValue","regole","macro","hideLavorazioneValue","Id_Elemento_Sottochiave_2","hideSelectValue","elemento","sezioneInput","Categoria_1","Id_Elemento_1","Id_Elemento_Sottochiave_1","inputString","outString","setSelectRules","rulesList","sotoelemento","regoleList","macroCategoria","sottoElemento","responseModelOtherProduct","flagReset","regoleToReset","FindRegole","regoleToReset_1","regola","CheckMacroCategoria","ApplicaRegola","regoleToApply","regoleToApply_1","hideOrShow","Tipo_Regola","idElemento","idSottoElemento","hideOrShowComboItem","idElemento_1","hideOrShowAttribute","idLavorazione","idVariante","hideOrShowLavorazioneAccessoria","attributo","hideOrShowRadComboItem","hideOrShowAllRadComboItems","parameterList","emptyValue","parameterList_1","parameter","parameterList_2","Tipo","Sezione_1","Macro_Categoria_1","Macro_Categoria_2","toUpperCase","tipoLavorazioneAccessoria","getComboValue","display","idLav","comboItemNumber","firstVariableVisible","reflectChangesOnOtherProducts","isFoundElement","responseModelOtherProduct_1","comboOption","73","8","getSeoData","84","85","86","model_service_1","local_storage_1","loading_overlay_service_1","header_component_1","footer_component_1","news_list_component_1","side_bar_menu_component_1","newsletter_component_1","quoting_main_component_1","wizard_form_commerciale_component_1","wizard_form_editoria_component_1","wizard_form_adesivi_component_1","wizard_form_banner_component_1","wizard_form_buste_component_1","wizard_form_etichette_component_1","wizard_form_stampa_component_1","other_product_form_component_1","quoting_order_totals_component_1","slider_widget_component_1","angular2_material_datepicker_1","ng2_bs3_modal_1","canvas_widget_components_1","trustpilot_widget_component_1","MODULES","CommonModule","ReactiveFormsModule","DatepickerModule","Ng2Bs3ModalModule","PIPES","COMPONENTS","PROVIDERS","ngModule","concat","897","898","main","webfontloader_1","families","platformRef","bootstrapModule","browser_module_1","bootloader_1","enableProdMode","platformUniversalDynamic","bootloader","9","regUser","registeredUser","encryptedUserId","cryptedUserId","reload","navigateByUrl","97","ClientAreaOrderNote","PaypalButtonStyleModel","ClientAreaOrderProcessFile","98","CartId","registerData","facebookLoginData","99","addTags","tags","presentTags","_flattenArray","_addInternal","getTag","_prepareMetaElement","removeTagBySelector","removeTagElement","_removeMetaElement","_createMetaElement","_appendMetaElement","parentElement","removeChild","input","out"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAASC,GAEjC,YCJA,IAAAC,GAAAD,EAA2B,GAC3BE,EAAAF,EAAmC,KAGnCG,EAAA,WAOE,QAAAA,GAAoBC,GAAAC,KAAAD,cALbC,KAAAC,iBAA2BD,KAAKD,YAAYG,OAAOC,OAGnDH,KAAAI,gBAAkB,0CAOl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AAMmE,GAAwBjQ,KAAKsyH,oBAGnC,OAFAtyH,MAAKkyH,oBAAoBpmH,EAAKmE,GAC9BjQ,KAAKuyH,mBAAmBtiH,GACjBA,GAGDK,EAAApG,UAAAooH,mBAAR,WACE,MAAOtyH,MAAKgK,KAAK4C,cAAc,SAGzB0D,EAAApG,UAAAgoH,oBAAR,SAA4BpmH,EAAqBkC,GAAjD,GAAAQ,GAAAxO,IAEE,OADAsJ,QAAOwG,KAAKhE,GAAK+B,QAAQ,SAACkC,GAAiB,MAAAvB,GAAKxE,KAAKgG,aAAahC,EAAI+B,EAAMjE,EAAIiE,MACzE/B,GAGDsC,EAAApG,UAAAqoH,mBAAR,SAA2BtiH,GACzB,GAAMP,GAAO1P,KAAK6J,UAAU6F,IAC5B1P,MAAKgK,KAAKkG,YAAYR,EAAMO,IAGtBK,EAAApG,UAAAmoH,mBAAR,SAA2BpiH,GACzB,GAAMP,GAAO1P,KAAKgK,KAAKwoH,cAAcviH,EACrCjQ,MAAKgK,KAAKyoH,YAAY/iH,EAAMO,IAGtBK,EAAApG,UAAA6nH,cAAR,SAAsBW,EAAcC,GAClC,YADkCA,UAC9BD,EACF,IAAK,GAAI5tF,GAAI,EAAGA,EAAI4tF,EAAM1jH,OAAQ81B,IAAK,CACrC,GAAM6H,GAAY+lF,EAAM5tF,EACpByH,OAAMk8E,QAAQ97E,GAChB3sC,KAAK+xH,cAAcplF,EAAMgmF,GAChBhmF,GACTgmF,EAAI1lH,KAAK0/B,GAIf,MAAOgmF,IAjJXriH,EAAArH,YAACrJ,EAAAsJ,ajJ+zhCOiH,QAAQ,EiJ7zhCHvQ,EAAAwQ,OAAO1G,EAAA2G,WjJ8zhCZlH,WAAW,qBAAsBG,UAClCgH,KiJh0hCM5Q,GAAA4Q,KAAIA,KjJw0hCd","file":"main.bundle.js","sourcesContent":["webpackJsonp([0],{\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar application_service_1 = __webpack_require__(128);\r\nvar Mappings = (function () {\r\n    function Mappings(application) {\r\n        this.application = application;\r\n        /* base urls */\r\n        this.Web_Api_Base_Url = this.application.config.apiUrl;\r\n        /* Google key for map */\r\n        this.Google_Maps_Key = \"AIzaSyBXymPQfgG39aceYOuzkdVynFoFRf3lMKc\";\r\n        this.Web_Api_Get_Token_Url = this.Web_Api_Base_Url + \"/token\";\r\n        this.Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n        this.Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n        this.Web_Api_Get_Template_Url = this.Web_Api_Base_Url + \"/template/getTemplateHtml/{type}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Default_Company = this.Web_Api_Base_Url + \"/company/getdefault\";\r\n        this.Web_Api_Get_Article_List = this.Web_Api_Base_Url + \"/article/getarticlelist/{category}/{listtype}/{lang}\";\r\n        this.Web_Api_Get_News_Details = this.Web_Api_Base_Url + \"/article/getarticledetailsbyid/{lang}/{id}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Article_By_Url = this.Web_Api_Base_Url + \"/article/getarticledetailsbyseourl/{lang}/{userid}/{cartid}/{seoUrl}\";\r\n        this.Web_Api_Get_Article_Category_By_Id = this.Web_Api_Base_Url + \"/article/getcategorybyid/{categoryId}/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Article_Category_By_Url = this.Web_Api_Base_Url + \"/article/getcategorybyurl/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid/{categoryUrl}\";\r\n        this.Web_Api_Get_Article_List_Category = this.Web_Api_Base_Url + \"/article/getarticlelistcategory/{lang}\";\r\n        this.Web_Api_Get_Article_By_Category_Id = this.Web_Api_Base_Url + \"/article/getarticledetailsbycategoryid/{categoryId}/{lang}/{startRowIndex}/{maxRows}\";\r\n        this.Web_Api_Get_Blog_Data = this.Web_Api_Base_Url + \"/article/getblogdata/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Cms_Menu_List = this.Web_Api_Base_Url + \"/menu/getcmsmenus/{id}/{lang}\";\r\n        this.Web_Api_Get_FaqData = this.Web_Api_Base_Url + \"/article/getfaqdata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Post_Newsletter_Subscribe = this.Web_Api_Base_Url + \"/newsletter/subscribe/{email}/{lang}\";\r\n        this.Web_Api_Get_Newsletter_Page_Data = this.Web_Api_Base_Url + \"/newsletter/pagedata/{lang}\";\r\n        this.Web_Api_Get_Newsletter_Confirmation_Page_Data = this.Web_Api_Base_Url + \"/newsletter/confirmationpage/{lang}\";\r\n        this.Web_Api_Get_Wizard_Data_Address = this.Web_Api_Base_Url + \"/quoting/getwizarddata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n        this.Web_Api_Get_Category_Details = this.Web_Api_Base_Url + \"/inventory/getcategory/{categoryId}/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Catalog_Categories_Data = this.Web_Api_Base_Url + \"/inventory/getcatalogcategoriesdata/{lang}/{currency}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Catalog_Categories_Price_Data = this.Web_Api_Base_Url + \"/inventory/getcategorypricedata/{categoryId}/{customerid}/{lang}/{currency}\";\r\n        this.Web_Api_Get_Category_By_Url = this.Web_Api_Base_Url + \"/inventory/getcategorybyseourl/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}/{seoUrl}\";\r\n        this.Web_Api_Post_Send_Category_Info_Request = this.Web_Api_Base_Url + \"/inventory/getcategoryinfo\";\r\n        this.Web_Api_Get_Product_Details = this.Web_Api_Base_Url + \"/inventory/getproduct/{productType}/{productId}/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Price_Data = this.Web_Api_Base_Url + \"/inventory/getproductpricedata/{productId}/{lang}/{customerid}/{currency}\";\r\n        this.Web_Api_Get_Products_In_Promotion_Data = this.Web_Api_Base_Url + \"/inventory/getproductsinpromotiondata/{lang}/{currency}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Product_By_Url = this.Web_Api_Base_Url + \"/inventory/getproductbyseourl/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}/{seoUrl}\";\r\n        this.Web_Api_Post_Send_Info_Request = this.Web_Api_Base_Url + \"/info/contactrequest\";\r\n        this.Web_Api_Post_Send_Login_Request = this.Web_Api_Base_Url + \"/account/login\";\r\n        this.Web_Api_Post_User_Authentification = this.Web_Api_Base_Url + \"/account/authentificateuser\";\r\n        this.Web_Api_Recover_Password = this.Web_Api_Base_Url + \"/account/passwordrequest\";\r\n        this.Web_Api_Get_Recover_Password_Data = this.Web_Api_Base_Url + \"/account/getrecoverpassworddata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Post_Register = this.Web_Api_Base_Url + \"/account/register\";\r\n        this.Web_Api_Get_Register_Data = this.Web_Api_Base_Url + \"/account/registerdata/{lang}/{userid}/{cartid}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Registration_Complete_Page_Data = this.Web_Api_Base_Url + \"/registration/confirmationpage/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Post_Confirm_Registration = this.Web_Api_Base_Url + \"/account/activate/{id}\";\r\n        this.Web_Api_Get_Save_Cart = this.Web_Api_Base_Url + \"/cart/postsavecartinfo/{userId}/{cartId}/{paymentId}/{shipmentId}\";\r\n        this.Web_Api_Set_Cart_Voucher = this.Web_Api_Base_Url + \"/cart/setvoucher\";\r\n        this.Web_Api_Set_Job_Name = this.Web_Api_Base_Url + \"/cart/setcartjobname\";\r\n        this.Web_Api_Set_Cart_Address = this.Web_Api_Base_Url + \"/cart/setcartaddress\";\r\n        this.Web_Api_Post_Cart_Confirm_Order = this.Web_Api_Base_Url + \"/cart/confirmorder\";\r\n        this.Web_Api_Get_Cart_Payment_Shipment = this.Web_Api_Base_Url + \"/cart/getcartpaymentshipment/{userId}/{cartId}/{lang}/{currency}\";\r\n        this.Web_Api_Get_Client_Area_Details = this.Web_Api_Base_Url + \"/clientarea/getdetails/{id}/{lang}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_User_Profile = this.Web_Api_Base_Url + \"/clientarea/getuserprofile/{userId}/{lang}/{cartid}\";\r\n        this.Web_Api_Post_Client_Area_Add_New_Address = this.Web_Api_Base_Url + \"/clientarea/adduseraddress\";\r\n        this.Web_Api_Post_Client_Area_Update_User_Password = this.Web_Api_Base_Url + \"/clientarea/updateuserpassword\";\r\n        this.Web_Api_Post_Client_Area_Update_User_Profile = this.Web_Api_Base_Url + \"/clientarea/updateuserprofile\";\r\n        this.Web_Api_Post_Client_Area_Update_User_Address = this.Web_Api_Base_Url + \"/clientarea/updateuseraddresses\";\r\n        this.Web_Api_Post_Client_Area_Remove_Address = this.Web_Api_Base_Url + \"/clientarea/removeuseraddress\";\r\n        this.Web_Api_Get_Client_Area_Order_Details = this.Web_Api_Base_Url + \"/clientarea/getorderdetails/{userId}/{orderId}/{lang}/{currency}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_Catalog_Private = this.Web_Api_Base_Url + \"/clientarea/getcatalogprivate/{userId}/{lang}/{currency}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_Order_List = this.Web_Api_Base_Url + \"/clientarea/getorderlist/{userId}/{dateFrom}/{dateTo}/{orderNumber}/{orderStatus}/{lang}/{currency}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_Invoices = this.Web_Api_Base_Url + \"/clientarea/getinvoiceslist/{userId}/{orderNumber}/{invoiceNumber}/{documentType}/{lang}/{currency}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_Order_Send_Message = this.Web_Api_Base_Url + \"/clientarea/postsendprocessordermessage\";\r\n        this.Web_Api_Get_Client_Area_Proccess_Order_File = this.Web_Api_Base_Url + \"/clientarea/getorderprocessfiles\";\r\n        this.Web_Api_Get_Client_Area_Update_Bonifico_Payment = this.Web_Api_Base_Url + \"/clientarea/updatebonificopaymentdetails\";\r\n        this.Web_Api_Get_Configuration = this.Web_Api_Base_Url + \"/config/getconfiguration/{lang}\";\r\n        this.Web_Api_Get_Routes = this.Web_Api_Base_Url + \"/config/getroutes/{lang}\";\r\n        this.Web_Api_Get_Header_Data = this.Web_Api_Base_Url + \"/cms/getheaderdata/{lang}/{userid}/{cartid}/{currency}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Footer_Data = this.Web_Api_Base_Url + \"/cms/getfooterdata/{lang}/{currency}\";\r\n        this.Web_Api_Get_Side_Menu_Data = this.Web_Api_Base_Url + \"/cms/getsidemenudata/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Home_Page_Data = this.Web_Api_Base_Url + \"/cms/gethomepagedata/{lang}\";\r\n        this.Web_Api_Get_Home_Page_Data_Optimized = this.Web_Api_Base_Url + \"/cms/gethomepagedataoptimized/{lang}/{userid}/{cartid}/{currency}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Home_HilightPromoProduct = this.Web_Api_Base_Url + \"/cms/getproducthilightpromo/{lang}\";\r\n        this.Web_Api_Get_Info_Request_Data = this.Web_Api_Base_Url + \"/cms/getinforequestdata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Privacy_Policy_Data = this.Web_Api_Base_Url + \"/privacypolicy/getprivacypolicydata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Cookie_Policy_Data = this.Web_Api_Base_Url + \"/cookiepolicy/getcookiepolicydata/{lang}/{cartid}/{userid}\";\r\n        this.Web_Api_Get_Purchase_Condition_Data = this.Web_Api_Base_Url + \"/puchasecondition/puchaseconditiondata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Slider_Data = this.Web_Api_Base_Url + \"/slider/getsliderdata/{lang}/{id}/{type}\";\r\n        this.Web_Api_Get_Seo_Data = this.Web_Api_Base_Url + \"/cms/gethomepageseodata/{lang}\";\r\n        this.Web_Api_Get_Shopping_Cart_Data = this.Web_Api_Base_Url + \"/cms/getcartdata/{userid}/{cartid}/{lang}/{currency}\";\r\n        this.Web_Api_Get_Shopping_Cart_Cash_Data = this.Web_Api_Base_Url + \"/cms/getcartcashdata/{userid}/{cartid}/{lang}/{currency}\";\r\n        this.Web_Api_Get_Shopping_Cart_Submitted_Data = this.Web_Api_Base_Url + \"/cms/getcartsubmitteddata/{userid}/{orderid}/{lang}/{currency}/{cartid}\";\r\n        this.Web_Api_Get_Client_Area_Messages = this.Web_Api_Base_Url + \"/clientarea/setmessagesasread\";\r\n        this.Web_Api_Add_Static_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproducttocart\";\r\n        this.Web_Api_Add_Static_Product_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproductscontisticatocart\";\r\n        this.Web_Api_Add_Matrix_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addmatrixproducttocart\";\r\n        this.Web_Api_Get_Offline_Page_Data = this.Web_Api_Base_Url + \"/cms/getofflinepagedata/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Get_Login_Page_Data = this.Web_Api_Base_Url + \"/cms/loginpage/{lang}/{userid}/{cartid}/{templatebuilderid}\";\r\n        this.Web_Api_Set_Cart_Payment = this.Web_Api_Base_Url + \"/cart/setcartpayment\";\r\n        this.Web_Api_Empty_Cart_Page = this.Web_Api_Base_Url + \"/cart/emptycartpage/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Set_Cart_Shipment = this.Web_Api_Base_Url + \"/cart/setcartshipping\";\r\n        this.Web_Api_Remove_From_Cart = this.Web_Api_Base_Url + \"/cart/removefromcart\";\r\n        this.Web_Api_Post_Cancel_Order = this.Web_Api_Base_Url + \"/clientarea/postcancelorder/{userId}/{orderId}\";\r\n        this.Web_Api_Post_Get_Bonifico_Uploaded_Files = this.Web_Api_Base_Url + \"/clientarea/getorderbonificofiles\";\r\n        this.Web_Api_Add_Wizard_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoproducttocart\";\r\n        this.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoscontisticaproducttocart\";\r\n        this.Web_Api_Add_Wizard_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinostandardproducttocart\";\r\n        this.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticaproducttocart\";\r\n        this.Web_Api_Update_Prev_Canvas_Info = this.Web_Api_Base_Url + \"/cart/updateprevcanvasinfo\";\r\n        this.Web_Api_Add_Other_Product_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinotocart\";\r\n        this.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinoscontisticatocart\";\r\n        this.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductcalcolatoscontisticatocart\";\r\n        this.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatotocart\";\r\n        this.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatoscontisticatocart\";\r\n        this.Web_Api_Get_Other_Product_Form_Data = this.Web_Api_Base_Url + \"/quoting/getotherproductformdata/{lang}/{productid}/{userId}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Script = this.Web_Api_Base_Url + \"/cms/getscript/{rowid}/{type}/{lang}\";\r\n        this.Web_Api_Get_Wizard_Editoria_Data = this.Web_Api_Base_Url + \"/quoting/getwizardeditoriadata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Wizard_Commerciale_Data = this.Web_Api_Base_Url + \"/quoting/getwizardcommercialedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Check_If_Param_Exists_In_Db = this.Web_Api_Base_Url + \"/account/checkifexists/{type}/{value}\";\r\n        this.Web_Api_Set_Order_As_Payed = this.Web_Api_Base_Url + \"/clientarea/setorderaspaid\";\r\n        this.Web_Api_Get_Head_Foot_Data = this.Web_Api_Base_Url + \"/template/getheadfootdata/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Wizard_Etichette_Data = this.Web_Api_Base_Url + \"/quoting/getwizardetichettedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Post_Get_Wizard_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getwizardpriceestimation\";\r\n        this.Web_Api_Post_Send_Request_Info_Wizard = this.Web_Api_Base_Url + \"/quoting/sendrequestinfo\";\r\n        this.Web_Api_Get_Wizard_Buste_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbustedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Wizard_Adesivi_Data = this.Web_Api_Base_Url + \"/quoting/getwizardadesividata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Wizard_Banner_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbannerdata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Get_Wizard_Stampa_Data = this.Web_Api_Base_Url + \"/quoting/getwizardstampadata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n        this.Web_Api_Post_Get_Ap_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getappriceestimation\";\r\n        this.Web_Api_Add_Wizard_Buste_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinobustetocart\";\r\n        this.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticabustetocart\";\r\n        this.Web_Api_Check_Is_Order_Payed_Unicredit = this.Web_Api_Base_Url + \"/pagonline/verifyunicreditpayment/{orderId}\";\r\n        this.Web_Api_Get_Product_And_Categories = this.Web_Api_Base_Url + \"/article/getsearchresults/{startRowIndex}/{maxRows}/{lang}/{query}\";\r\n        this.Web_Api_Get_Script_Head = this.Web_Api_Base_Url + \"/cms/getscripthead/{rowid}/{type}/{lang}\";\r\n        this.Web_Api_Get_Information_ThankYouPage_Paypal_Url = this.Web_Api_Base_Url + \"/template/getthankyoupagepaypalinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n        this.Web_Api_Get_Information_ThankYouPage_PagOnline_Url = this.Web_Api_Base_Url + \"/pagonline/getthankyoupagepagonlineinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n        this.Web_Api_Get_Information_ThankYouPage_Nexi_Url = this.Web_Api_Base_Url + \"/nexi/getthankyoupagenexiinfo/{type}/{orderid}/{messaggio}/{data}/{orario}/{lang}/{cartid}/{userid}\";\r\n        this.Web_Api_Get_Information_ThankYouPage_BancaSella_Url = this.Web_Api_Base_Url + \"/bancasella/getthankyoupagebancasellainfo/{type}/{orderid}/{messaggio}/{lang}/{cartid}/{userid}\";\r\n        this.Web_Api_Get_Template_Url_Page_Not_Found = this.Web_Api_Base_Url + \"/template/getcomponenttemplatepagenotfound/{type}/{lang}/{userid}/{cartid}\";\r\n        this.Web_Api_Delete_Customers_Canvas_State = \"/api/users/{userId}/states/{stateId}\";\r\n        this.Web_Api_Create_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/createpaypalpayment\";\r\n        this.Web_Api_Execute_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/executepaypalpayment\";\r\n        this.Web_Api_Get_Trustpilot_Data = this.Web_Api_Base_Url + \"/gettrustpilotdata/{type}/{lang}\";\r\n        this.Web_Api_Get_DefaultCurrency = this.Web_Api_Base_Url + \"/config/getdefaultcurrency\";\r\n        this.Web_Api_Get_Client_Area_Riorder_List = this.Web_Api_Base_Url + \"/clientarea/getriorderlist/{orderid}/{lang}/{currency}\";\r\n        this.Web_Api_Get_Client_Area_CalculatePrice_Riorder = this.Web_Api_Base_Url + \"/clientarea/calculatepriceriorder\";\r\n        this.Web_Api_Get_Client_Area_Get_Cart_Riorder = this.Web_Api_Base_Url + \"/cart/getcartforriorder/{userId}/{cartId}/{lang}\";\r\n        this.Web_Api_Get_Client_Area_Add_Product_To_Cart_Riorder = this.Web_Api_Base_Url + \"/cart/addproductriordertocart\";\r\n        this.Canvas_Web_Api_Base_Url = \"https://h.customerscanvas.com/Users/{apiKey}/SimplePolygraphy\";\r\n        this.Paypal_JS_Lirary_Url = \"https://www.paypalobjects.com/api/checkout.js\";\r\n        /* constants */\r\n        this.Auth_User_Cookie = \"Auth_User\";\r\n        this.WscPrinter_Lang = \"WscPrinter_Lang\";\r\n        this.Default_Lang = \"it\";\r\n        /* images */\r\n        this.Offers_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/OFFERTE.jpg\";\r\n        this.Products_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/prodotti.jpg\";\r\n        this.WizardCheck_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Check-icon.png\";\r\n        this.WizardAlert_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Alert-icon.png\";\r\n        this.UserLoginImg_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/customer.jpg\";\r\n    }\r\n    /* web api urls */\r\n    Mappings.Web_Api_Get_Token_Url = \"/token\";\r\n    Mappings = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _a) || Object])\r\n    ], Mappings);\r\n    return Mappings;\r\n    var _a;\r\n}());\r\nexports.Mappings = Mappings;\r\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar dom_adapter_1 = __webpack_require__(32);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar core_2 = __webpack_require__(27);\r\nvar SeoService = (function () {\r\n    function SeoService(_document, metaService, translate) {\r\n        this._document = _document;\r\n        this.metaService = metaService;\r\n        this.translate = translate;\r\n        this._dom = dom_adapter_1.getDOM();\r\n    }\r\n    SeoService.prototype.setSeoInformation = function (seoInformation) {\r\n        this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: seoInformation.Keywords });\r\n        this.metaService.updateTag('name=Description', { name: 'Description', content: seoInformation.Description });\r\n        this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: seoInformation.Description });\r\n        this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: seoInformation.Title });\r\n        this.metaService.updateTag('name=Robots', { name: 'Robots', content: seoInformation.SeoRobots });\r\n        this.metaService.setTitle(seoInformation.Title);\r\n        this.updateCanonicalTag('link', { rel: 'canonical', href: seoInformation.Url });\r\n    };\r\n    SeoService.prototype.setSeoUserArea = function (url) {\r\n        this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: \"\" });\r\n        this.metaService.updateTag('name=Description', { name: 'Description', content: \"\" });\r\n        this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: \"\" });\r\n        this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: \"\" });\r\n        this.metaService.updateTag('name=Robots', { name: 'Robots', content: \"index,follow\" });\r\n        var title = this.getLabel(\"user_area\");\r\n        this.metaService.setTitle(title);\r\n        this.updateCanonicalTag('link', { rel: 'canonical', href: url });\r\n    };\r\n    SeoService.prototype.getLabel = function (label) {\r\n        var message;\r\n        this.translate.get(label, this.translate).subscribe(function (res) {\r\n            message = res;\r\n        });\r\n        return message;\r\n    };\r\n    SeoService.prototype.getCanonicalLink = function (selector) {\r\n        if (!selector)\r\n            return null;\r\n        return this._dom.query(selector);\r\n    };\r\n    SeoService.prototype.updateCanonicalTag = function (selector, tag) {\r\n        var canonical = this.getCanonicalLink(selector);\r\n        if (!canonical) {\r\n            //create element if it doesn't exist\r\n            return this._addInternalCanonical(tag);\r\n        }\r\n        return this._prepareLinkElement(tag, canonical);\r\n    };\r\n    //-- *********************************** ANGULAR SERVER SIDE SEO SETUP START ***********************************\r\n    SeoService.prototype.generateSeoDomServerSide = function (document, renderer, seoData) {\r\n        var rootElement, h1, h2, h3, linkEl, nodeList, description;\r\n        if (!seoData)\r\n            return;\r\n        //-- Creating root element which will be hidden, but available for crawling\r\n        rootElement = renderer.createElement(document.body, 'div');\r\n        renderer.setElementClass(rootElement, 'd-none', true);\r\n        nodeList = [];\r\n        //-- Creating h1 element\r\n        if (seoData.H1) {\r\n            h1 = renderer.createElement(document.body, 'h1');\r\n            renderer.createText(h1, seoData.H1);\r\n            nodeList.push(h1);\r\n        }\r\n        //-- Creating h2 element\r\n        if (seoData.H2) {\r\n            h2 = renderer.createElement(document.body, 'h2');\r\n            renderer.createText(h2, seoData.H2);\r\n            nodeList.push(h2);\r\n        }\r\n        //-- Creating h3 element\r\n        if (seoData.H3) {\r\n            //console.log(\"qui\")\r\n            if (!seoData.H3.includes(\"<iframe\")) {\r\n                h3 = renderer.createElement(document.body, 'h3');\r\n                renderer.createText(h3, seoData.H3);\r\n                nodeList.push(h3);\r\n            }\r\n        }\r\n        //-- Creating p short description element\r\n        if (seoData.ShortDescription) {\r\n            description = renderer.createElement(document.body, 'p');\r\n            renderer.setElementProperty(description, 'innerHTML', seoData.ShortDescription);\r\n            nodeList.push(description);\r\n        }\r\n        //-- Creating p short description element\r\n        if (seoData.LongDescription) {\r\n            description = renderer.createElement(document.body, 'p');\r\n            renderer.setElementProperty(description, 'innerHTML', seoData.LongDescription);\r\n            nodeList.push(description);\r\n        }\r\n        //-- Appending all elements to the root element as a children\r\n        renderer.projectNodes(rootElement, nodeList);\r\n        //generate sitemap list for all pages\r\n        this.generateSiteMapList(document, seoData.SiteMapList);\r\n    };\r\n    SeoService.prototype.generateSiteMapList = function (document, siteMapHtml) {\r\n        var stringToInject = \"<ul class='d-none'>\";\r\n        //this.appendHtmlString(document.body,\"<ul>\");\r\n        siteMapHtml.forEach(function (element) {\r\n            stringToInject += \"<li>\" + element + \"</li>\";\r\n        });\r\n        stringToInject += \"</ul>\";\r\n        //this.appendHtmlString(document.body,\"</ul>\");\r\n        this.appendHtmlString(document.body, stringToInject);\r\n    };\r\n    SeoService.prototype.appendHtmlString = function (el, template) {\r\n        var div = this._dom.createElement('');\r\n        this._dom.setInnerHTML(div, template);\r\n        this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n    };\r\n    SeoService.prototype.appendScriptsToDOM = function (el, template) {\r\n        var _this = this;\r\n        var div = this._dom.createElement('div');\r\n        this._dom.setInnerHTML(div, template);\r\n        var listEl = this._dom.childNodesAsList(div);\r\n        listEl.forEach(function (element) { return _this._dom.insertAfter(el.lastChild, element); });\r\n    };\r\n    SeoService.prototype.setSeoMetaData = function (document, renderer, seoData, imgLink) {\r\n        if (imgLink === void 0) { imgLink = \"\"; }\r\n        //console.log( seoData)\r\n        if (!seoData)\r\n            return;\r\n        //console.log( seoData.Title)\r\n        this.updateMetaDataTitle(renderer, seoData.Title || '');\r\n        //-- Setting canonicals\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'link', 'rel', 'canonical', 'href', seoData.Url || '');\r\n        //-- Setting meta tags and open graph tags\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Keywords', 'content', seoData.Keywords || '');\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Robots', 'content', seoData.SeoRobots || '');\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'description', 'content', seoData.Description || '');\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:description', 'content', seoData.Description || '');\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:title', 'content', seoData.Title || '');\r\n        if (imgLink != null && imgLink.length > 0) {\r\n            this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:image', 'content', imgLink || '');\r\n        }\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:type', 'content', 'article');\r\n    };\r\n    //-- Updating of title for seo optimization\r\n    SeoService.prototype.updateMetaDataTitle = function (renderer, value) {\r\n        if (renderer && value)\r\n            renderer.setText(renderer.selectRootElement('title'), value);\r\n    };\r\n    //-- Creating meta attributes for seo\r\n    SeoService.prototype.createMetaTagUniversalAttribute = function (document, renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond, valueSecond) {\r\n        if (propertyNameSecond === void 0) { propertyNameSecond = \"\"; }\r\n        if (valueSecond === void 0) { valueSecond = \"\"; }\r\n        var elem = renderer.createElement(document.head, elementType);\r\n        if (propertyNameFirst && valueFirst) {\r\n            renderer.setElementAttribute(elem, propertyNameFirst, valueFirst);\r\n        }\r\n        if (propertyNameSecond && valueSecond)\r\n            renderer.setElementAttribute(elem, propertyNameSecond, valueSecond);\r\n    };\r\n    //-- Creating meta properties for social networks seo\r\n    SeoService.prototype.createMetaTagUniversalProperty = function (document, renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond, valueSecond) {\r\n        if (propertyNameSecond === void 0) { propertyNameSecond = \"\"; }\r\n        if (valueSecond === void 0) { valueSecond = \"\"; }\r\n        var elem = renderer.createElement(document.head, elementType);\r\n        if (propertyNameFirst && valueFirst) {\r\n            renderer.setElementProperty(elem, propertyNameFirst, valueFirst);\r\n        }\r\n        if (propertyNameSecond && valueSecond)\r\n            renderer.setElementProperty(elem, propertyNameSecond, valueSecond);\r\n    };\r\n    //-- ************************************ ANGULAR SERVER SIDE SEO SETUP END*************************************\r\n    SeoService.prototype._addInternalCanonical = function (tag) {\r\n        var canonical = this._createLinkElement();\r\n        this._prepareLinkElement(tag, canonical);\r\n        this._appendLinkElement(canonical);\r\n        return canonical;\r\n    };\r\n    SeoService.prototype._prepareLinkElement = function (tag, el) {\r\n        var _this = this;\r\n        Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\r\n        return el;\r\n    };\r\n    SeoService.prototype._appendLinkElement = function (meta) {\r\n        var head = this._document.head;\r\n        this._dom.appendChild(head, meta);\r\n    };\r\n    SeoService.prototype._createLinkElement = function () {\r\n        return this._dom.createElement('link');\r\n    };\r\n    SeoService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [Object, (typeof (_a = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object])\r\n    ], SeoService);\r\n    return SeoService;\r\n    var _a, _b;\r\n}());\r\nexports.SeoService = SeoService;\r\n\n\n/***/ }),\n\n/***/ 126:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar ArticleService = (function () {\r\n    function ArticleService(_api, _cache, mappings, languageService, cartService, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.languageService = languageService;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    ArticleService.prototype.getArticleList = function (category, listtype) {\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Article_List.replace('{category}', category).replace('{listtype}', listtype).replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getArticleDetails = function (id, lang) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_News_Details.replace('{lang}', lang).replace('{id}', id.toString()).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getArticleByUrl = function (lang, seoUrl) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Article_By_Url.replace('{lang}', lang).replace('{seoUrl}', seoUrl).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.GetArticleByCategoryIdandRows = function (categoryId, lang, startRowIndex, maxRows) {\r\n        var url = this.mappings.Web_Api_Get_Article_By_Category_Id.replace('{categoryId}', categoryId.toString()).replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString());\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getBlogData = function (lang, startRowIndex, maxRows) {\r\n        var numberOfItems = 15;\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Blog_Data.replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString()).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getArticleListCategory = function (lang) {\r\n        var url = this.mappings.Web_Api_Get_Article_List_Category.replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getCategoryArticleById = function (categoryId, lang, startRowIndex, maxRows) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Article_Category_By_Id\r\n            .replace('{categoryId}', categoryId)\r\n            .replace('{lang}', lang)\r\n            .replace('{startRowIndex}', startRowIndex.toString())\r\n            .replace('{maxRows}', maxRows.toString())\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService.prototype.getArticleCategoryByUrl = function (lang, categoryUrl, startRowIndex, maxRows) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Article_Category_By_Url\r\n            .replace('{lang}', lang)\r\n            .replace('{startRowIndex}', startRowIndex.toString())\r\n            .replace('{maxRows}', maxRows.toString())\r\n            .replace('{categoryUrl}', categoryUrl)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ArticleService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n    ], ArticleService);\r\n    return ArticleService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ArticleService = ArticleService;\r\n\n\n/***/ }),\n\n/***/ 127:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar HeaderService = (function () {\r\n    function HeaderService(_api, authService) {\r\n        this._api = _api;\r\n        this.authService = authService;\r\n        this.toShowQuickRegistration = false;\r\n        // Observable source of logged in user\r\n        this.loginInfo = this.authService.GetData();\r\n        this.loggedInUser = new rxjs_1.BehaviorSubject(this.loginInfo);\r\n    }\r\n    HeaderService.prototype.getLoggedInUser = function () {\r\n        return this.loggedInUser.asObservable();\r\n    };\r\n    HeaderService.prototype.setLoggedInUser = function (user) {\r\n        this.loggedInUser.next(user);\r\n    };\r\n    HeaderService.prototype.setToShowQuickRegistration = function (toShow) {\r\n        this.toShowQuickRegistration = toShow;\r\n    };\r\n    HeaderService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object])\r\n    ], HeaderService);\r\n    return HeaderService;\r\n    var _a, _b;\r\n}());\r\nexports.HeaderService = HeaderService;\r\n\n\n/***/ }),\n\n/***/ 128:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(95);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\nvar ApplicationService = (function () {\r\n    function ApplicationService(api, isNode, cookie, cache, nodeLogger) {\r\n        this.api = api;\r\n        this.isNode = isNode;\r\n        this.cookie = cookie;\r\n        this.cache = cache;\r\n        this.nodeLogger = nodeLogger;\r\n        this.getConfig();\r\n    }\r\n    Object.defineProperty(ApplicationService.prototype, \"accessToken\", {\r\n        get: function () {\r\n            return this.cookie.get(ApplicationService.ACCESS_TOKEN_KEY);\r\n        },\r\n        enumerable: true,\r\n        configurable: true\r\n    });\r\n    ApplicationService.prototype.getToken = function () {\r\n        var _this = this;\r\n        if (!this.isNode /*|| 'string' === typeof this.accessToken*/) {\r\n            return;\r\n        }\r\n        var startDate = new Date();\r\n        var params = this.getCredentialsParams();\r\n        var headers = new http_1.Headers();\r\n        headers.append('Content-Type', 'application/x-www-form-urlencoded');\r\n        return this.api\r\n            .post(\"\" + this.config.apiUrl + mapping_1.Mappings.Web_Api_Get_Token_Url, params, { headers: headers })\r\n            .do(function (_a) {\r\n            var access_token = _a.access_token;\r\n            if (access_token) {\r\n                _this.cache.set('__ACCESS_TOKEN__', access_token);\r\n                _this.cookie.put(ApplicationService.ACCESS_TOKEN_KEY, access_token);\r\n            }\r\n        });\r\n    };\r\n    ApplicationService.prototype.getCredentialsParams = function () {\r\n        var config = this.getConfig();\r\n        var params = new http_1.URLSearchParams();\r\n        params.set('grant_type', 'password');\r\n        params.set('username', config.credentials.username);\r\n        params.set('password', config.credentials.password);\r\n        return params;\r\n    };\r\n    ApplicationService.prototype.getConfig = function () {\r\n        if (this.config) {\r\n            return this.config;\r\n        }\r\n        if (this.isNode) {\r\n            var fs = __webpack_require__(429);\r\n            this.config = JSON.parse(fs.readFileSync('src/assets/config.json', 'utf8'));\r\n            this.setConfigToCache();\r\n        }\r\n        else {\r\n            this.config = this.cache.get(ApplicationService.APPLICATION_CONFIG);\r\n        }\r\n        return this.config;\r\n    };\r\n    ApplicationService.prototype.setConfigToCache = function () {\r\n        var privateKeys = ['credentials'];\r\n        var configForCache = {};\r\n        for (var key in this.config)\r\n            if (this.config.hasOwnProperty(key)) {\r\n                if (privateKeys.indexOf(key) === -1) {\r\n                    configForCache[key] = this.config[key];\r\n                }\r\n            }\r\n        this.cache.set(ApplicationService.APPLICATION_CONFIG, configForCache);\r\n    };\r\n    ApplicationService.ACCESS_TOKEN_KEY = 'accessToken';\r\n    ApplicationService.APPLICATION_CONFIG = 'ApplicationConfig';\r\n    ApplicationService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(1, core_1.Inject('isNode')),\r\n        __param(2, core_1.Inject('CookieService')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _b) || Object, (typeof (_c = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _c) || Object, (typeof (_d = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _d) || Object])\r\n    ], ApplicationService);\r\n    return ApplicationService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.ApplicationService = ApplicationService;\r\n\n\n/***/ }),\n\n/***/ 129:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n//Angular\r\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//System\r\nvar mapping_1 = __webpack_require__(10);\r\n//Services\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar CompanyService = (function () {\r\n    function CompanyService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n    }\r\n    CompanyService.prototype.getCompany = function () {\r\n        var url = this.mappings.Web_Api_Get_Default_Company;\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CompanyService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], CompanyService);\r\n    return CompanyService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.CompanyService = CompanyService;\r\n\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(95);\r\nvar Observable_1 = __webpack_require__(1);\r\n__webpack_require__(434);\r\n__webpack_require__(186);\r\n__webpack_require__(435);\r\n__webpack_require__(432);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar responseStatuses = {\r\n    noContent: 204,\r\n    authRequired: 401\r\n};\r\nvar ApiService = (function () {\r\n    function ApiService(http, cache, nodeLogger, isBrowser, cookie) {\r\n        this.http = http;\r\n        this.cache = cache;\r\n        this.nodeLogger = nodeLogger;\r\n        this.isBrowser = isBrowser;\r\n        this.cookie = cookie;\r\n        this.clientSideCaching = true;\r\n    }\r\n    /**\r\n     * whatever domain/feature method name\r\n     */\r\n    ApiService.prototype.get = function (url, options) {\r\n        var _this = this;\r\n        if (this.clientSideCaching == false) {\r\n            if (this.isBrowser && this.cache.has(url)) {\r\n                var obs = Observable_1.Observable.of(this.cache.get(url));\r\n                this.cache.clear(url);\r\n                return obs;\r\n            }\r\n            options = this.createAuthorizationHeader(options);\r\n            return this.http\r\n                .get(url, options)\r\n                .map(ApiService.extractData)\r\n                .do(function (json) {\r\n                if (!_this.isBrowser) {\r\n                    _this.cache.set(url, json);\r\n                }\r\n            })\r\n                .catch(function (err) { return _this.handleError(err); });\r\n        }\r\n        else {\r\n            if (this.cache.has(url)) {\r\n                var obs = Observable_1.Observable.of(this.cache.get(url));\r\n                return obs;\r\n            }\r\n            options = this.createAuthorizationHeader(options);\r\n            var startDate = new Date();\r\n            this.nodeLogger.AddLogWithTime(\"START REQUEST \" + url);\r\n            return this.http\r\n                .get(url, options)\r\n                .map(ApiService.extractData)\r\n                .do(function (json) {\r\n                var endDate = new Date();\r\n                var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n                var diffMs = Math.ceil(timeDiff);\r\n                _this.nodeLogger.AddLogWithTime(\"END REQUEST \" + url + \"(\" + diffMs + \")\");\r\n                _this.cache.set(url, json);\r\n            })\r\n                .catch(function (err) { return _this.handleError(err); });\r\n        }\r\n    };\r\n    /**\r\n   * whatever domain/feature method name\r\n   */\r\n    ApiService.prototype.getUniversalCached = function (url, options) {\r\n        var _this = this;\r\n        if (this.isBrowser && this.cache.has(url)) {\r\n            var obs = Observable_1.Observable.of(this.cache.get(url));\r\n            this.cache.clear(url);\r\n            return obs;\r\n        }\r\n        options = this.createAuthorizationHeader(options);\r\n        return this.http\r\n            .get(url, options)\r\n            .map(ApiService.extractData)\r\n            .do(function (json) {\r\n            if (!_this.isBrowser) {\r\n                _this.cache.set(url, json);\r\n            }\r\n        })\r\n            .catch(function (err) { return _this.handleError(err); });\r\n    };\r\n    ApiService.prototype.post = function (url, body, options) {\r\n        var _this = this;\r\n        options = this.createAuthorizationHeader(options);\r\n        return this.http\r\n            .post(url, body, options)\r\n            .map(ApiService.extractData)\r\n            .catch(function (err) { return _this.handleError(err); });\r\n    };\r\n    ApiService.prototype.createAuthorizationHeader = function (options) {\r\n        if (options === void 0) { options = {}; }\r\n        //Token is read from cache and not cookie. \r\n        //Note: Before it was read form cookie and it was not containing the last token.\r\n        //Because the set cookie is done on the response and the get cookie is done on the request.\r\n        var token = this.cache.get('__ACCESS_TOKEN__');\r\n        if (token) {\r\n            if (!options.headers) {\r\n                options.headers = new http_1.Headers();\r\n            }\r\n            options.headers.append('Authorization', \"Bearer \" + token);\r\n        }\r\n        return options;\r\n    };\r\n    ApiService.extractData = function (res) {\r\n        if (res.status === responseStatuses.noContent) {\r\n            return {};\r\n        }\r\n        var body = res.json();\r\n        return body || {};\r\n    };\r\n    ApiService.prototype.handleError = function (err) {\r\n        this.nodeLogger.AddLogWithTime(\"Error: \" + err);\r\n        var cookieToken = this.cookie.get('accessToken');\r\n        var cacheToken = this.cache.get('__ACCESS_TOKEN__');\r\n        if (!this.isBrowser) {\r\n            return Observable_1.Observable.empty();\r\n        }\r\n        switch (err.status) {\r\n            case 401:\r\n                this.handleUnauthorized();\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n        return Observable_1.Observable.throw(err);\r\n    };\r\n    ApiService.prototype.handleUnauthorized = function () {\r\n        //If the token expires while using the application, the user is redirected to home page to get a new token and start navigation from there.\r\n        if (this.isBrowser) {\r\n            window.location.href = \"/\";\r\n        }\r\n    };\r\n    ApiService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(3, core_1.Inject('isBrowser')),\r\n        __param(4, core_1.Inject('CookieService')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof http_1.Http !== 'undefined' && http_1.Http) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _d) || Object])\r\n    ], ApiService);\r\n    return ApiService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.ApiService = ApiService;\r\n\n\n/***/ }),\n\n/***/ 130:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar router_1 = __webpack_require__(12);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar MessagesService = (function () {\r\n    function MessagesService(router, _api, mappings) {\r\n        this.router = router;\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n    }\r\n    MessagesService.prototype.setMessagesAsRead = function (params) {\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Messages;\r\n        return this._api.post(url, params);\r\n    };\r\n    MessagesService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], MessagesService);\r\n    return MessagesService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.MessagesService = MessagesService;\r\n\n\n/***/ }),\n\n/***/ 131:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar router_1 = __webpack_require__(12);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar ValidationService = (function () {\r\n    function ValidationService(router, _api, mappings) {\r\n        this.router = router;\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n    }\r\n    //validation of phone numbers, disable writing any characters in input except of numbers    \r\n    ValidationService.prototype.validatePhoneNumber = function (event) {\r\n        var pattern = /[0-9]/;\r\n        var inputChar = String.fromCharCode(event.charCode);\r\n        if (!pattern.test(inputChar)) {\r\n            // invalid character, prevent input\r\n            event.preventDefault();\r\n        }\r\n    };\r\n    ValidationService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], ValidationService);\r\n    return ValidationService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.ValidationService = ValidationService;\r\n\n\n/***/ }),\n\n/***/ 132:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ProductService = (function () {\r\n    function ProductService(_api, _cache, currencyService, ShoppingCartService, mappings, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.currencyService = currencyService;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n        this.mappings = mappings;\r\n        this.authService = authService;\r\n    }\r\n    ProductService.prototype.getProductDetails = function (productId, productType, lang) {\r\n        //Reading userId\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Product_Details\r\n            .replace('{productId}', productId.toString())\r\n            .replace('{productType}', productType)\r\n            .replace('{lang}', lang)\r\n            .replace('{customerid}', customerId)\r\n            .replace('{currency}', curr)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ProductService.prototype.getProductsPromotionsData = function (lang) {\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Products_In_Promotion_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ProductService.prototype.getProductDetailsBySeoUrl = function (lang, seoUrl) {\r\n        //Reading userId\r\n        var customerId = this.authService.GetUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Product_By_Url\r\n            .replace('{lang}', lang)\r\n            .replace('{customerid}', customerId)\r\n            .replace('{currency}', curr)\r\n            .replace('{seoUrl}', seoUrl)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ProductService.prototype.getPriceData = function (productId, lang) {\r\n        //Reading userId\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Price_Data\r\n            .replace('{productId}', productId.toString())\r\n            .replace('{lang}', lang)\r\n            .replace('{customerid}', customerId)\r\n            .replace('{currency}', curr);\r\n        return this._api.get(url);\r\n    };\r\n    ProductService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n    ], ProductService);\r\n    return ProductService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ProductService = ProductService;\r\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar dom_adapter_1 = __webpack_require__(32);\r\nvar platform_browser_1 = __webpack_require__(7);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar ScriptService = (function () {\r\n    function ScriptService(_api, document, mappings, language, seo, metaService) {\r\n        this._api = _api;\r\n        this.document = document;\r\n        this.mappings = mappings;\r\n        this.language = language;\r\n        this.seo = seo;\r\n        this.metaService = metaService;\r\n        this._dom = dom_adapter_1.getDOM();\r\n        this.typeSystemPage = \"systemPage\";\r\n        this.typeArticleCategory = \"articleCategory\";\r\n        this.typeArticle = \"article\";\r\n        this.typeCmsPage = \"page\";\r\n        this.typeCatalogCategory = \"category\";\r\n        this.typeCatalogOtherProduct = \"otherProduct\";\r\n        this.typeCatalogProduct = \"product\";\r\n        this.infoRequestId = \"26\";\r\n        this.userAreaId = \"18\";\r\n        this.privacyPolicyId = \"36\";\r\n        this.purchaseConditionsId = \"37\";\r\n        this.faqsId = \"38\";\r\n        this.cookiesId = \"35\";\r\n        this.homeId = \"1\";\r\n        this.loginId = \"2\";\r\n        this.blogHomeId = \"40\";\r\n        this.productsCatalogId = \"29\";\r\n        this.promotionsId = \"16\";\r\n        this.cartId = \"12\";\r\n        this.cartCashId = \"15\";\r\n        this.cartSubmittedId = \"43\";\r\n        this.userRegistrationId = \"5\";\r\n        this.userRecoverPasswordId = \"7\";\r\n        this.subscriptionId = \"45\";\r\n        this.cartEmptyId = \"42\";\r\n        this.ThankYouPagePaypalId = \"47\";\r\n        this.ThankYouPagePagOnlineId = \"48\";\r\n        this.ThankYouNexiId = \"52\";\r\n        this.subscriptionConfirmationId = \"46\";\r\n        this.registrationCompletePageId = \"49\";\r\n        this.SearchPageId = \"50\";\r\n        this.SearchWithPagingPageId = \"51\";\r\n    }\r\n    ScriptService.prototype.getScript = function (type, rowId) {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Script\r\n            .replace('{rowid}', rowId)\r\n            .replace('{type}', type)\r\n            .replace('{lang}', longLang);\r\n        return this._api.get(url);\r\n    };\r\n    ScriptService.prototype.getScriptHead = function (type, rowId) {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Script_Head\r\n            .replace('{rowid}', rowId)\r\n            .replace('{type}', type)\r\n            .replace('{lang}', longLang);\r\n        return this._api.get(url);\r\n    };\r\n    ScriptService.prototype.checkIfScriptResponseIsValid = function (content) {\r\n        var retVal = true;\r\n        if (typeof content === 'object') {\r\n            retVal = false;\r\n        }\r\n        else if (typeof content === 'string') {\r\n            if (!content) {\r\n                retVal = false;\r\n            }\r\n        }\r\n        else {\r\n            retVal = false;\r\n        }\r\n        return retVal;\r\n    };\r\n    ScriptService.prototype.getSystemPageRowId_OrderId = function (PageRowId, OrderId) {\r\n        return PageRowId + \"_\" + OrderId;\r\n    };\r\n    ScriptService.prototype.setupExternalScripts = function (result, pageType, id) {\r\n        var _this = this;\r\n        //-- Retrieving the script to append\r\n        if (result.SeoInformation.HasScripts) {\r\n            this.getScriptHead(pageType, id).subscribe(function (response) {\r\n                var isValidResponse = _this.checkIfScriptResponseIsValid(response);\r\n                if (isValidResponse) {\r\n                    _this.seo.appendScriptsToDOM(_this.document.head, response);\r\n                }\r\n            });\r\n            this.getScript(pageType, id).subscribe(function (response) {\r\n                var isValidResponse = _this.checkIfScriptResponseIsValid(response);\r\n                if (isValidResponse) {\r\n                    _this.seo.appendScriptsToDOM(_this.document.body, response);\r\n                }\r\n            });\r\n        }\r\n    };\r\n    ScriptService.prototype.setGoogleScripts = function (seoInfo, countRecursive) {\r\n        if (countRecursive === void 0) { countRecursive = 0; }\r\n        if (!seoInfo)\r\n            return;\r\n        //-- Updating title on client side\r\n        if (seoInfo.Title)\r\n            this.metaService.setTitle(seoInfo.Title);\r\n        //-- Update google analytics\r\n        if (seoInfo.HasScripts && seoInfo.AnalyticsId) {\r\n            try {\r\n                gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\r\n            }\r\n            catch (error) {\r\n                if (countRecursive > 3) {\r\n                    return;\r\n                }\r\n                countRecursive++;\r\n                this.setGoogleScripts(seoInfo, countRecursive);\r\n            }\r\n        }\r\n    };\r\n    ScriptService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(1, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _d) || Object, (typeof (_e = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _e) || Object])\r\n    ], ScriptService);\r\n    return ScriptService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.ScriptService = ScriptService;\r\n\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar wizardFormEditoriaModel = (function () {\r\n    function wizardFormEditoriaModel() {\r\n        this.numCopie = \"\";\r\n        this.idCopie = \"\";\r\n        this.tipoCopie = \"\";\r\n        this.numFacciate = \"\";\r\n        this.idFacciate = \"\";\r\n        this.tipoFacciate = \"\";\r\n        this.idFormati = \"\";\r\n        this.idColori1 = \"\";\r\n        this.idCarte1 = \"\";\r\n        this.nomeCarte1 = \"\";\r\n        this.nomeCarte2 = \"\";\r\n        this.idGrammature1 = \"\";\r\n        this.nomeGrammature1 = \"\";\r\n        this.idPlastificazioni1 = \"\";\r\n        this.idCopertine = \"\";\r\n        this.idColori2 = \"\";\r\n        this.idCarte2 = \"\";\r\n        this.idGrammature2 = \"\";\r\n        this.nomeGrammature2 = \"\";\r\n        this.idPlastificazioni2 = \"\";\r\n        this.idRilegature = \"\";\r\n        this.taglio = false;\r\n        this.sezione = \"\";\r\n        this.tipoStampaInternoSoloFronte = false;\r\n        this.stampa1_colori_fronte = \"\";\r\n        this.stampa1_colori_retro = \"\";\r\n        this.stampa2_colori_fronte = \"\";\r\n        this.stampa2_colori_retro = \"\";\r\n        this.wizardId = 0;\r\n        this.tipoStampaCopertinaSoloFronte = false;\r\n        this.macrocategoryWizardId = 0;\r\n        this.richiestaName = \"\";\r\n        this.richiestaSubName = \"\";\r\n        this.richiestaEmail = \"\";\r\n        this.isRichiestaEmailValid = false;\r\n        this.richiestaTelephone = \"\";\r\n        this.richiestaSocieta = \"\";\r\n        this.richiestaJobname = \"\";\r\n        this.richiestaCondizioni = false;\r\n        this.richiestaNote = \"\";\r\n        this.idPiegature = \"\";\r\n        this.soggettiMultipli = false;\r\n        this.numSoggetti = \"\";\r\n        this.baseFormato = \"\";\r\n        this.altezzaFormato = \"\";\r\n        this.idTagli = \"\";\r\n        this.idBusta = \"\";\r\n        this.idMaterialiFlessibili = \"\";\r\n        this.idSupportiRigidi = \"\";\r\n        this.idOcchielli = \"\";\r\n        this.idAsole = \"\";\r\n        this.idCuciture = \"\";\r\n        this.idElettrosaldature = \"\";\r\n        this.disposizione_occhielli_id = \"\";\r\n        this.distanza_occhielli = \"\";\r\n        this.diametro_asola = \"\";\r\n        this.disposizione_asola_id = \"\";\r\n        this.disposizione_cucitura_id = \"\";\r\n        this.disposizione_elettrosaldatura_id = \"\";\r\n        this.tipoBifacciale = \"\";\r\n        this.idBiancoCoprente = \"\";\r\n        this.language = \"\";\r\n        this.currency = \"\";\r\n        this.idPantoneFronte1 = \"\";\r\n        this.idPantoneFronte2 = \"\";\r\n        this.idPantoneRetro1 = \"\";\r\n        this.idPantoneRetro2 = \"\";\r\n        this.idCartoncino = \"\";\r\n        this.nomeCartoncino = \"\";\r\n        this.idGrammatureCartoncino = \"\";\r\n        this.nomeGrammatureCartoncino = \"\";\r\n        this.numDiametroInternoAnimaLabel = 0;\r\n        this.numDiametroMassimoEsternoAnimaLabel = 0;\r\n        this.numEtichette = \"\";\r\n        this.idAvvolgimento = \"\";\r\n        this.idFustella = \"\";\r\n        this.idFormatoTipo = \"\";\r\n        this.idTipoLavoroLabel = \"\";\r\n        this.subSection = \"\";\r\n        this.isFormatoMultiploEnabled = false;\r\n    }\r\n    return wizardFormEditoriaModel;\r\n}());\r\nexports.wizardFormEditoriaModel = wizardFormEditoriaModel;\r\nvar FormatiMultipliObj = (function () {\r\n    function FormatiMultipliObj() {\r\n        this.copieIsValid = true;\r\n        this.copieMessage = \"\";\r\n        this.widthIsValid = true;\r\n        this.widthMessage = \"\";\r\n        this.heightIsValid = true;\r\n        this.heightMessage = \"\";\r\n    }\r\n    ;\r\n    ;\r\n    ;\r\n    ;\r\n    ;\r\n    return FormatiMultipliObj;\r\n}());\r\nexports.FormatiMultipliObj = FormatiMultipliObj;\r\nvar MatrixModelCalculation = (function () {\r\n    function MatrixModelCalculation() {\r\n    }\r\n    return MatrixModelCalculation;\r\n}());\r\nexports.MatrixModelCalculation = MatrixModelCalculation;\r\nvar LavorazioniAccessorieModel = (function () {\r\n    function LavorazioniAccessorieModel() {\r\n        this.valoreLavorazione = \"\";\r\n        this.numWidthFormValue = \"\";\r\n        this.numHeightFormValue = \"\";\r\n        this.numDepthFormValue = \"\";\r\n        this.tipo = 0;\r\n    }\r\n    return LavorazioniAccessorieModel;\r\n}());\r\nexports.LavorazioniAccessorieModel = LavorazioniAccessorieModel;\r\nvar PriceEstimationModel = (function () {\r\n    function PriceEstimationModel() {\r\n        this.Currency = \"€\";\r\n        this.UnitPrice = \"0,00\";\r\n        this.Imponibile = \"0,00\";\r\n        this.Iva = \"0,00\";\r\n        this.Total = \"0,00\";\r\n        this.TotalAmount = \"0,00\";\r\n        this.WeightUm = \"Kg\";\r\n        this.Weight = \"0,00\";\r\n        this.DayName = \"\";\r\n        this.TimePickup = \"\";\r\n        this.DayNumber = \"\";\r\n        this.Quantity = 0;\r\n        this.AltezzaDorso = 0.00;\r\n        this.PrezzoOriginaleimporto = 0.00;\r\n        this.DayDescriptionName = \"\";\r\n        this.iShowHourForDay = false;\r\n    }\r\n    return PriceEstimationModel;\r\n}());\r\nexports.PriceEstimationModel = PriceEstimationModel;\r\nvar FileCombinationModel = (function () {\r\n    function FileCombinationModel() {\r\n    }\r\n    return FileCombinationModel;\r\n}());\r\nexports.FileCombinationModel = FileCombinationModel;\r\nvar wizardFormAdesiviModel = (function () {\r\n    function wizardFormAdesiviModel() {\r\n    }\r\n    return wizardFormAdesiviModel;\r\n}());\r\nexports.wizardFormAdesiviModel = wizardFormAdesiviModel;\r\nvar wizardFormBandieraModel = (function () {\r\n    function wizardFormBandieraModel() {\r\n    }\r\n    return wizardFormBandieraModel;\r\n}());\r\nexports.wizardFormBandieraModel = wizardFormBandieraModel;\r\nvar wizardFormBannerModel = (function () {\r\n    function wizardFormBannerModel() {\r\n    }\r\n    return wizardFormBannerModel;\r\n}());\r\nexports.wizardFormBannerModel = wizardFormBannerModel;\r\nvar wizardFormBusteModel = (function () {\r\n    function wizardFormBusteModel() {\r\n        this.fronte = \"\";\r\n    }\r\n    return wizardFormBusteModel;\r\n}());\r\nexports.wizardFormBusteModel = wizardFormBusteModel;\r\nvar wizardFormCommercialeModel = (function () {\r\n    function wizardFormCommercialeModel() {\r\n    }\r\n    return wizardFormCommercialeModel;\r\n}());\r\nexports.wizardFormCommercialeModel = wizardFormCommercialeModel;\r\nvar wizarFormEtichetteModel = (function () {\r\n    function wizarFormEtichetteModel() {\r\n        this.fronte = \"\";\r\n    }\r\n    return wizarFormEtichetteModel;\r\n}());\r\nexports.wizarFormEtichetteModel = wizarFormEtichetteModel;\r\nvar wizardFormStampaModel = (function () {\r\n    function wizardFormStampaModel() {\r\n    }\r\n    return wizardFormStampaModel;\r\n}());\r\nexports.wizardFormStampaModel = wizardFormStampaModel;\r\n\n\n/***/ }),\n\n/***/ 178:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar CartInfo = (function () {\r\n    function CartInfo() {\r\n    }\r\n    return CartInfo;\r\n}());\r\nexports.CartInfo = CartInfo;\r\nvar CartProductModel = (function () {\r\n    function CartProductModel() {\r\n    }\r\n    return CartProductModel;\r\n}());\r\nexports.CartProductModel = CartProductModel;\r\nvar CartAddressModel = (function () {\r\n    function CartAddressModel() {\r\n    }\r\n    return CartAddressModel;\r\n}());\r\nexports.CartAddressModel = CartAddressModel;\r\nvar CartPaymentModel = (function () {\r\n    function CartPaymentModel() {\r\n    }\r\n    return CartPaymentModel;\r\n}());\r\nexports.CartPaymentModel = CartPaymentModel;\r\nvar CartShipmentModel = (function () {\r\n    function CartShipmentModel() {\r\n        this.UnitaId = 0;\r\n    }\r\n    return CartShipmentModel;\r\n}());\r\nexports.CartShipmentModel = CartShipmentModel;\r\n\n\n/***/ }),\n\n/***/ 179:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar language_service_1 = __webpack_require__(3);\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar LoginService = (function () {\r\n    function LoginService(_api, _cache, mappings, cartService, langService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.langService = langService;\r\n    }\r\n    LoginService.prototype.sendLoginRequest = function (email, password) {\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Post_Send_Login_Request;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            Email: email.toLowerCase(),\r\n            Password: btoa(password),\r\n            CartID: cartId\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    LoginService.prototype.authentificateUser = function (email, firstName, lastName) {\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Post_User_Authentification;\r\n        var lang = this.langService.getLongLang();\r\n        var key = url;\r\n        var params = {\r\n            Email: email.toLowerCase(),\r\n            Password: \"\",\r\n            FirstName: firstName,\r\n            LastName: lastName,\r\n            CartID: cartId,\r\n            Lang: lang\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    LoginService.prototype.quickRegister = function (userInfo) {\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Post_User_Authentification;\r\n        var lang = this.langService.getLongLang();\r\n        var key = url;\r\n        var params = {\r\n            Email: userInfo.EmailRegister != null ? userInfo.EmailRegister.toLowerCase() : '',\r\n            Password: userInfo.Password,\r\n            FirstName: '',\r\n            LastName: '',\r\n            CustomerGroup: userInfo.CustomerGroup,\r\n            CartID: cartId,\r\n            Lang: lang,\r\n            CodiceFiscale: userInfo.CodiceFiscale,\r\n            PartitaIva: userInfo.PartitaIva,\r\n            Newsletter: userInfo.Newsletter\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    LoginService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object])\r\n    ], LoginService);\r\n    return LoginService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.LoginService = LoginService;\r\n\n\n/***/ }),\n\n/***/ 20:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//Services\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar cookie_service_1 = __webpack_require__(60);\r\n//Models\r\nvar mapping_1 = __webpack_require__(10);\r\nvar cart_1 = __webpack_require__(178);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ShoppingCartService = (function () {\r\n    function ShoppingCartService(_api, _cache, mappings, authService, languageService, currencyService, cookieService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.currencyService = currencyService;\r\n        this.cookieService = cookieService;\r\n        this.cartId = 0;\r\n        // value of customizationData is set from canvas-widget component after editing is approved. After we can get that data inside of parent component and send it to a server\r\n        this.customizationData = null;\r\n        this.isProductCanvasEdited = false;\r\n    }\r\n    ShoppingCartService.prototype.saveCart = function (userId, cartId, paymentId, shipmentId) {\r\n        var url = this.mappings.Web_Api_Get_Save_Cart.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{paymentId}', paymentId.toString()).replace('{shipmentId}', shipmentId.toString());\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ShoppingCartService.prototype.applyVoucher = function (voucherCode) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Set_Cart_Voucher;\r\n        var param = {\r\n            CartID: cartId,\r\n            CustomerID: customerId,\r\n            Voucher: voucherCode,\r\n            Language: lang,\r\n            Currency: curr\r\n        };\r\n        var key = url;\r\n        return this._api.post(url, param);\r\n    };\r\n    ShoppingCartService.prototype.setJobName = function (rowId, jobName) {\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Set_Job_Name;\r\n        var param = {\r\n            CartID: cartId,\r\n            ProductID: rowId,\r\n            JobName: jobName\r\n        };\r\n        var key = url;\r\n        return this._api.post(url, param);\r\n    };\r\n    ShoppingCartService.prototype.setAddress = function (addressObject) {\r\n        var cartId = this.getCartId();\r\n        var url = this.mappings.Web_Api_Set_Cart_Address;\r\n        var param = {\r\n            CartID: cartId,\r\n            AddressCity: addressObject.City,\r\n            AddressID: addressObject.Id,\r\n            AddressMobile: addressObject.Mobile,\r\n            AddressPhone: addressObject.Phone,\r\n            AddressPostalCode: addressObject.ZipCode,\r\n            AddressProvince: addressObject.Province,\r\n            AddressRecipient: addressObject.Recipient,\r\n            AddressStreet: addressObject.Address,\r\n            CustomerID: addressObject.CustomerID,\r\n            Language: addressObject.Language\r\n        };\r\n        var key = url;\r\n        return this._api.post(url, param);\r\n    };\r\n    ShoppingCartService.prototype.confirmOrder = function () {\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var param = {\r\n            CartID: cartId,\r\n            Language: lang\r\n        };\r\n        var url = this.mappings.Web_Api_Post_Cart_Confirm_Order;\r\n        return this._api.post(url, param);\r\n    };\r\n    ShoppingCartService.prototype.clearCartAfterConfirmation = function () {\r\n        this.cookieService.remove(\"cartId\");\r\n        this.cartData = new cart_1.CartInfo();\r\n        this.cartData.Products = [];\r\n        this.cartData.Addresses = [];\r\n        this.cartData.Payments = [];\r\n        this.cartData.Shipments = [];\r\n    };\r\n    ShoppingCartService.prototype.getCartPaymentShipment = function (cartId, lang) {\r\n        var userId = this.getCustomerId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Cart_Payment_Shipment.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{lang}', lang).replace('{currency}', curr);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ShoppingCartService.prototype.addWizardCalcolatoToCart = function (wizardId, lavId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n        var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            LavID: lavId.toString(),\r\n            Currency: curr,\r\n            isCanvasEdited: isCanvasEdited,\r\n            CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n            CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addApProductToCart = function (productId, lavId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: productId.toString(),\r\n            LavID: lavId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.getRiorderCart = function () {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Get_Cart_Riorder\r\n            .replace('{userId}', customerId)\r\n            .replace('{cartId}', cartId.toString())\r\n            .replace('{lang}', lang);\r\n        return this._api.get(url);\r\n    };\r\n    ShoppingCartService.prototype.addWizardCalcolatoScontisticaToCart = function (wizardId, dateId, lavId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n        var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            LavID: lavId.toString(),\r\n            DateID: dateId.toString(),\r\n            Currency: curr,\r\n            isCanvasEdited: isCanvasEdited,\r\n            CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n            CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoToCart = function (wizardId, quantityId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Listino_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductListinoToCart = function (combinationId, quantityId, wizardId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Other_Product_Listino_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            CombinationId: combinationId.toString(),\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            CombinationId: combinationId.toString(),\r\n            DateID: dateId.toString(),\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoListinoToCart = function (combinationId, quantityId, wizardId, strVariantiCalcolate, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            CombinationId: combinationId.toString(),\r\n            StrVariantiCalcolate: strVariantiCalcolate,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId, strVariantiCalcolate, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            CombinationId: combinationId.toString(),\r\n            DateID: dateId.toString(),\r\n            StrVariantiCalcolate: strVariantiCalcolate,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoScontisticaToCart = function (productId, lavId, dateId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: productId.toString(),\r\n            LavID: lavId.toString(),\r\n            DateID: dateId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoScontisticaBusteToCart = function (wizardId, quantityId, dateId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n        var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n        var key = url;\r\n        var x = 0;\r\n        if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n            idPantoneFronte1 = \"0\";\r\n        }\r\n        if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n            idPantoneFronte2 = \"0\";\r\n        }\r\n        if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n            idPantoneRetro1 = \"0\";\r\n        }\r\n        if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n            idPantoneRetro2 = \"0\";\r\n        }\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            DateID: dateId.toString(),\r\n            IdPantoneFronte1: idPantoneFronte1.toString(),\r\n            IdPantoneFronte2: idPantoneFronte2.toString(),\r\n            IdPantoneRetro1: idPantoneRetro1.toString(),\r\n            IdPantoneRetro2: idPantoneRetro2.toString(),\r\n            Currency: curr,\r\n            isCanvasEdited: isCanvasEdited,\r\n            CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n            CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoBusteToCart = function (wizardId, quantityId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n        var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n        var key = url;\r\n        var x = 0;\r\n        if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n            idPantoneFronte1 = \"0\";\r\n        }\r\n        if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n            idPantoneFronte2 = \"0\";\r\n        }\r\n        if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n            idPantoneRetro1 = \"0\";\r\n        }\r\n        if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n            idPantoneRetro2 = \"0\";\r\n        }\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            IdPantoneFronte1: idPantoneFronte1.toString(),\r\n            IdPantoneFronte2: idPantoneFronte2.toString(),\r\n            IdPantoneRetro1: idPantoneRetro1.toString(),\r\n            IdPantoneRetro2: idPantoneRetro2.toString(),\r\n            Currency: curr,\r\n            isCanvasEdited: isCanvasEdited,\r\n            CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n            CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoScontisticaToCart = function (wizardId, quantityId, dateId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var url = this.mappings.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart;\r\n        var curr = this.currencyService.getCurrency();\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: wizardId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            DateID: dateId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addStaticProductToCart = function (productId, quantityId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Add_Static_Product_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: productId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addStaticProductScontisticaToCart = function (productId, quantityId, dateId, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Add_Static_Product_Scontistica_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: productId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            DateID: dateId.toString(),\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addMatrixProductToCart = function (productId, quantityId, type, colType) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Add_Matrix_Product_To_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            ProductID: productId.toString(),\r\n            QuantityID: quantityId.toString(),\r\n            Type: type,\r\n            Currency: curr,\r\n            ColType: colType\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.getCartId = function () {\r\n        //Reading cartId from cookie\r\n        var cartId = this.cookieService.get(\"cartId\");\r\n        if (cartId == null || cartId == \"\") {\r\n            cartId = \"0\";\r\n        }\r\n        return cartId;\r\n    };\r\n    ShoppingCartService.prototype.setCartId = function (cartId) {\r\n        this.cookieService.put(\"cartId\", cartId.toString());\r\n        this.cartId = cartId;\r\n    };\r\n    ShoppingCartService.prototype.getCustomerId = function () {\r\n        var userId = this.authService.GetUserId();\r\n        return userId;\r\n    };\r\n    ShoppingCartService.prototype.getLang = function () {\r\n        var lang = this.languageService.getLongLang();\r\n        return lang;\r\n    };\r\n    ShoppingCartService.prototype.updateCart = function (cartData) {\r\n        var currentCartId = this.getCartId();\r\n        if (currentCartId == \"0\") {\r\n            this.setCartId(cartData.CartID);\r\n        }\r\n        //refreshing cart data\r\n        this.cartData = cartData;\r\n    };\r\n    ShoppingCartService.prototype.getCart = function () {\r\n        return this.cartData;\r\n    };\r\n    ShoppingCartService.prototype.initCart = function (cartData) {\r\n        if (this.cartData == null) {\r\n            this.cartData = cartData;\r\n        }\r\n    };\r\n    ShoppingCartService.prototype.setPayment = function (paymentId) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Set_Cart_Payment;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            PaymentID: paymentId,\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            Currency: curr\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.setShipment = function (shipmentId) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Set_Cart_Shipment;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            ShippmentID: shipmentId,\r\n            CustomerID: customerId,\r\n            Language: lang,\r\n            Currency: curr\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.removeFromCart = function (rowId) {\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var lang = this.getLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Remove_From_Cart;\r\n        var key = url;\r\n        var x = 0;\r\n        var params = {\r\n            CartID: cartId.toString(),\r\n            ProductID: rowId,\r\n            CustomerID: customerId.toString(),\r\n            Language: lang,\r\n            Currency: curr\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    //Check if the cart data is valid to access to the second step\r\n    ShoppingCartService.prototype.isCartValid = function () {\r\n        var res = false;\r\n        var cartId = this.getCartId();\r\n        var customerId = this.getCustomerId();\r\n        //Checking if user is logged-ing\r\n        if (customerId != null && customerId != \"\" && customerId != \"0\") {\r\n            //Checking if there is a cart set\r\n            if (cartId != null && cartId != \"\" && cartId != \"0\") {\r\n                //Checking if there are products\r\n                if (this.cartData.Products != null && this.cartData.Products.length > 0) {\r\n                    //Checking if there is a payment set\r\n                    if (this.cartData.Payments != null && this.cartData.Payments.length > 0) {\r\n                        var flagPayment = false;\r\n                        for (var _i = 0, _a = this.cartData.Payments; _i < _a.length; _i++) {\r\n                            var payment = _a[_i];\r\n                            if (payment.Selected == true) {\r\n                                flagPayment = true;\r\n                                break;\r\n                            }\r\n                        }\r\n                        //Checking if there is a shipment set\r\n                        if (flagPayment == true) {\r\n                            if (this.cartData.Shipments != null && this.cartData.Shipments.length > 0) {\r\n                                var flagShipment = false;\r\n                                for (var _b = 0, _c = this.cartData.Shipments; _b < _c.length; _b++) {\r\n                                    var shipment = _c[_b];\r\n                                    if (shipment.Selected == true) {\r\n                                        flagShipment = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (flagShipment == true) {\r\n                                    res = true;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return res;\r\n    };\r\n    ShoppingCartService.prototype.addProductRiorderToCart = function (params) {\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Add_Product_To_Cart_Riorder;\r\n        var key = url;\r\n        var x = 0;\r\n        return this._api.post(url, params);\r\n    };\r\n    //Getting Empty cart page data\r\n    ShoppingCartService.prototype.getEmptyCartPageData = function () {\r\n        var lang = this.getLang();\r\n        var customerId = this.getCustomerId();\r\n        var cartId = this.getCartId();\r\n        var url = this.mappings.Web_Api_Empty_Cart_Page.replace(\"{lang}\", lang).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    ShoppingCartService.prototype.setIfProductIsCanvasEdited = function (isEdited) {\r\n        this.isProductCanvasEdited = isEdited;\r\n    };\r\n    ShoppingCartService.prototype.getIfProductIsCanvasEdited = function () {\r\n        return this.isProductCanvasEdited;\r\n    };\r\n    ShoppingCartService.prototype.getCustomizationCanvasData = function () {\r\n        return this.customizationData;\r\n    };\r\n    ShoppingCartService.prototype.setCustomizationCanvasData = function (newData) {\r\n        this.customizationData = newData;\r\n    };\r\n    // reset canvas state because of next adding to a cart\r\n    ShoppingCartService.prototype.resetCanvasData = function () {\r\n        var emptyObj = {};\r\n        this.setIfProductIsCanvasEdited(false);\r\n        this.setCustomizationCanvasData(emptyObj);\r\n    };\r\n    ShoppingCartService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(6, core_1.Inject('CookieService')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _g) || Object])\r\n    ], ShoppingCartService);\r\n    return ShoppingCartService;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.ShoppingCartService = ShoppingCartService;\r\n\n\n/***/ }),\n\n/***/ 21:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CacheService = (function () {\r\n    function CacheService(_cache) {\r\n        this._cache = _cache;\r\n    }\r\n    /**\r\n     * check if there is a value in our store\r\n     */\r\n    CacheService.prototype.has = function (key) {\r\n        var _key = this.normalizeKey(key);\r\n        return this._cache.has(_key);\r\n    };\r\n    /**\r\n     * store our state\r\n     */\r\n    CacheService.prototype.set = function (key, value) {\r\n        var _key = this.normalizeKey(key);\r\n        if (value && 'string' === typeof value && (/<[a-z][\\s\\S]*>/i).test(value)) {\r\n            value = {\r\n                _escapedHtml: encodeURIComponent(value)\r\n            };\r\n        }\r\n        this._cache.set(_key, value);\r\n    };\r\n    /**\r\n     * get our cached value\r\n     */\r\n    CacheService.prototype.get = function (key) {\r\n        var _key = this.normalizeKey(key);\r\n        var value = this._cache.get(_key);\r\n        if (value && 'object' === typeof value && value._escapedHtml) {\r\n            value = decodeURIComponent(value._escapedHtml);\r\n        }\r\n        return value;\r\n    };\r\n    /**\r\n     * release memory ref\r\n     */\r\n    CacheService.prototype.clear = function (key) {\r\n        this._cache.delete(key);\r\n    };\r\n    /**\r\n     * release memory all refs\r\n     */\r\n    CacheService.prototype.clearAll = function () {\r\n        this._cache.clear();\r\n    };\r\n    /**\r\n     * convert to json for the client\r\n     */\r\n    CacheService.prototype.dehydrate = function () {\r\n        var json = {};\r\n        this._cache.forEach(function (value, key) { return json[key] = value; });\r\n        return json;\r\n    };\r\n    /**\r\n     * convert server json into out initial state\r\n     */\r\n    CacheService.prototype.rehydrate = function (json) {\r\n        var _this = this;\r\n        Object.keys(json).forEach(function (key) {\r\n            var _key = _this.normalizeKey(key);\r\n            var value = json[_key];\r\n            _this._cache.set(_key, value);\r\n        });\r\n    };\r\n    /**\r\n     * allow JSON.stringify to work\r\n     */\r\n    CacheService.prototype.toJSON = function () {\r\n        return this.dehydrate();\r\n    };\r\n    /**\r\n     * convert numbers into strings\r\n     */\r\n    CacheService.prototype.normalizeKey = function (key) {\r\n        if (core_1.isDevMode() && this._isInvalidValue(key)) {\r\n            throw new Error('Please provide a valid key to save in the CacheService');\r\n        }\r\n        return key + '';\r\n    };\r\n    CacheService.prototype._isInvalidValue = function (key) {\r\n        return key === null ||\r\n            key === undefined ||\r\n            key === 0 ||\r\n            key === '' ||\r\n            typeof key === 'boolean' ||\r\n            Number.isNaN(key);\r\n    };\r\n    CacheService.KEY = 'CacheService';\r\n    CacheService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject('LRU')), \r\n        __metadata('design:paramtypes', [Object])\r\n    ], CacheService);\r\n    return CacheService;\r\n}());\r\nexports.CacheService = CacheService;\r\n\n\n/***/ }),\n\n/***/ 22:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar core_2 = __webpack_require__(27);\r\nvar breadcrumbs_1 = __webpack_require__(618);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar BreadcrumbsService = (function () {\r\n    function BreadcrumbsService(router, languageService, translateService, isBrowser) {\r\n        this.router = router;\r\n        this.languageService = languageService;\r\n        this.translateService = translateService;\r\n        this.isBrowser = isBrowser;\r\n        this.homeIsInit = false;\r\n    }\r\n    BreadcrumbsService.prototype.setHomeBreadcrumb = function () {\r\n        if (this.breadcrumbsList != null && this.breadcrumbsList.length > 0) {\r\n            if (this.breadcrumbsList[0].Level == 0) {\r\n                return;\r\n            }\r\n        }\r\n        var lang = this.languageService.getShortLang();\r\n        var homeLink = \"/home\";\r\n        if (lang != null && lang != \"\") {\r\n            homeLink = lang + homeLink;\r\n        }\r\n        else {\r\n            homeLink = homeLink;\r\n        }\r\n        var bread = new breadcrumbs_1.Breadcrumbs();\r\n        bread.BreadcrumbLink = homeLink;\r\n        bread.BreadcrumbName = this.translateService.get(\"home_area_message_home\")[\"value\"];\r\n        bread.Level = 0;\r\n        this.breadcrumbsList.unshift(bread);\r\n        this.homeIsInit = true;\r\n    };\r\n    BreadcrumbsService.prototype.setBreadcrumbs = function (breadcrumbs, type) {\r\n        this.breadcrumbsList = [];\r\n        if (type != \"cmspage\") {\r\n            if (breadcrumbs != null && breadcrumbs.length > 0) {\r\n                breadcrumbs.forEach(function (x) {\r\n                    x.BreadcrumbLink = x.BreadcrumbLink.toLocaleLowerCase();\r\n                });\r\n            }\r\n        }\r\n        this.breadcrumbsList = breadcrumbs;\r\n        // this.setHomeBreadcrumb();\r\n    };\r\n    BreadcrumbsService.prototype.getBreadcrumbs = function () {\r\n        var breadcrumbs = this.breadcrumbsList;\r\n        return breadcrumbs;\r\n    };\r\n    BreadcrumbsService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(3, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _c) || Object, Boolean])\r\n    ], BreadcrumbsService);\r\n    return BreadcrumbsService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.BreadcrumbsService = BreadcrumbsService;\r\n\n\n/***/ }),\n\n/***/ 252:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Register = (function () {\r\n    function Register() {\r\n    }\r\n    return Register;\r\n}());\r\nexports.Register = Register;\r\nvar Nation = (function () {\r\n    function Nation() {\r\n    }\r\n    return Nation;\r\n}());\r\nexports.Nation = Nation;\r\nvar QuickRegister = (function () {\r\n    function QuickRegister(email, emailRepeat, password, telephone, customerGroup, CF, PIVA, oldGroup) {\r\n        if (email === void 0) { email = ''; }\r\n        if (emailRepeat === void 0) { emailRepeat = ''; }\r\n        if (password === void 0) { password = ''; }\r\n        if (telephone === void 0) { telephone = ''; }\r\n        if (customerGroup === void 0) { customerGroup = '5'; }\r\n        if (CF === void 0) { CF = ''; }\r\n        if (PIVA === void 0) { PIVA = ''; }\r\n        if (oldGroup === void 0) { oldGroup = '5'; }\r\n        this.EmailRegister = '';\r\n        this.EmailRepeat = '';\r\n        this.Password = '';\r\n        this.PartitaIva = '';\r\n        this.CodiceFiscale = '';\r\n        this.Telephone = '';\r\n        this.CustomerGroup = '5';\r\n        this.info_privacy = '';\r\n        this.IsQuickRegistered = false;\r\n        this.CustomerGroup = customerGroup;\r\n        this.controlFormReset(oldGroup, CF, PIVA);\r\n        this.EmailRegister = email;\r\n        this.EmailRepeat = emailRepeat;\r\n        this.Password = password;\r\n        this.Telephone = telephone;\r\n    }\r\n    //-- If client type is changed inside of form from societa to dita individuale, we don't want to reset a PIVA field value also\r\n    //-- If client type is changed inside of form from privato to associazione, we don't want to reset a CF field value also\r\n    QuickRegister.prototype.controlFormReset = function (oldGroup, CF, PIVA) {\r\n        if (((this.CustomerGroup === '5' || this.CustomerGroup === '6') && (oldGroup === '5' || oldGroup === '6')))\r\n            this.PartitaIva = PIVA;\r\n        else\r\n            this.PartitaIva = '';\r\n        if (((this.CustomerGroup === '4' || this.CustomerGroup === '7') && (oldGroup === '4' || oldGroup === '7')))\r\n            this.CodiceFiscale = CF;\r\n        else\r\n            this.CodiceFiscale = '';\r\n    };\r\n    return QuickRegister;\r\n}());\r\nexports.QuickRegister = QuickRegister;\r\n\n\n/***/ }),\n\n/***/ 253:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Company = (function () {\r\n    function Company() {\r\n    }\r\n    return Company;\r\n}());\r\nexports.Company = Company;\r\n\n\n/***/ }),\n\n/***/ 254:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Product = (function () {\r\n    function Product() {\r\n    }\r\n    return Product;\r\n}());\r\nexports.Product = Product;\r\nvar PhotoGalleryViewModel = (function () {\r\n    function PhotoGalleryViewModel() {\r\n    }\r\n    return PhotoGalleryViewModel;\r\n}());\r\nexports.PhotoGalleryViewModel = PhotoGalleryViewModel;\r\nvar AtachmentViewModel = (function () {\r\n    function AtachmentViewModel() {\r\n    }\r\n    return AtachmentViewModel;\r\n}());\r\nvar Category = (function () {\r\n    function Category() {\r\n    }\r\n    return Category;\r\n}());\r\nexports.Category = Category;\r\nvar SliderViewModel = (function () {\r\n    function SliderViewModel() {\r\n    }\r\n    return SliderViewModel;\r\n}());\r\nexports.SliderViewModel = SliderViewModel;\r\nvar MegaMenu = (function () {\r\n    function MegaMenu() {\r\n    }\r\n    return MegaMenu;\r\n}());\r\nexports.MegaMenu = MegaMenu;\r\n\n\n/***/ }),\n\n/***/ 255:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar CheckIfExistService = (function () {\r\n    function CheckIfExistService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        //for sending of checking type, because we are using same method on server side for all checking\r\n        this.emailType = \"email\";\r\n        this.partitaIvaType = \"partitaIva\";\r\n        this.codiceFiscaleType = \"codiceFiscale\";\r\n    }\r\n    CheckIfExistService.prototype.checkIfEmailExistsInDb = function (value) {\r\n        var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.emailType).replace('{value}', value);\r\n        return this._api.get(url);\r\n    };\r\n    CheckIfExistService.prototype.checkIfPartitaIvaExistsInDb = function (value) {\r\n        var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.partitaIvaType).replace('{value}', value);\r\n        return this._api.get(url);\r\n    };\r\n    CheckIfExistService.prototype.checkIfCodiceFiscaleExistsInDb = function (value) {\r\n        var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.codiceFiscaleType).replace('{value}', value);\r\n        return this._api.get(url);\r\n    };\r\n    CheckIfExistService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], CheckIfExistService);\r\n    return CheckIfExistService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.CheckIfExistService = CheckIfExistService;\r\n\n\n/***/ }),\n\n/***/ 256:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar OrderPaymentService = (function () {\r\n    function OrderPaymentService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n    }\r\n    OrderPaymentService.prototype.setOrderAsPayed = function (orderId) {\r\n        var url = this.mappings.Web_Api_Set_Order_As_Payed;\r\n        var orderID = {\r\n            OrderId: parseInt(orderId)\r\n        };\r\n        return this._api.post(url, orderID);\r\n    };\r\n    OrderPaymentService.prototype.CheckIsOrderPayedUnicredit = function (orderId) {\r\n        var url = this.mappings.Web_Api_Check_Is_Order_Payed_Unicredit.replace('{orderId}', orderId.toString());\r\n        return this._api.post(url);\r\n    };\r\n    OrderPaymentService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], OrderPaymentService);\r\n    return OrderPaymentService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.OrderPaymentService = OrderPaymentService;\r\n\n\n/***/ }),\n\n/***/ 257:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar RecoverPasswordService = (function () {\r\n    function RecoverPasswordService(_api, language, _cache, mappings, cartService, authService) {\r\n        this._api = _api;\r\n        this.language = language;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    RecoverPasswordService.prototype.recoverPasswordRequest = function (email) {\r\n        email = email.toLowerCase();\r\n        var lang = this.language.getLongLang();\r\n        return this._api.post(this.mappings.Web_Api_Recover_Password, { Email: email, Lang: lang })\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    RecoverPasswordService.prototype.getRecoverPasswordData = function (lang) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Recover_Password_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    RecoverPasswordService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n    ], RecoverPasswordService);\r\n    return RecoverPasswordService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.RecoverPasswordService = RecoverPasswordService;\r\n\n\n/***/ }),\n\n/***/ 258:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//System\r\nvar mapping_1 = __webpack_require__(10);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar ConfigurationService = (function () {\r\n    function ConfigurationService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n    }\r\n    ConfigurationService.prototype.getConfiguration = function (lang) {\r\n        var url = this.mappings.Web_Api_Get_Configuration.replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    //Return the routes for a given language\r\n    ConfigurationService.prototype.getRoutes = function (lang) {\r\n        var url = this.mappings.Web_Api_Get_Routes.replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ConfigurationService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], ConfigurationService);\r\n    return ConfigurationService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.ConfigurationService = ConfigurationService;\r\n\n\n/***/ }),\n\n/***/ 259:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CryptoService = (function () {\r\n    function CryptoService() {\r\n    }\r\n    CryptoService.prototype.encryptNumber = function (param) {\r\n        var prefix = \"xyZ\";\r\n        var sufix = \"xpNw\";\r\n        var output = \"\";\r\n        try {\r\n            if (param != null) {\r\n                var newNumber = param + 1264;\r\n                output = prefix + newNumber.toString() + sufix;\r\n            }\r\n        }\r\n        catch (Exception) {\r\n            throw Exception;\r\n        }\r\n        return output;\r\n    };\r\n    CryptoService.prototype.decryptNumber = function (encryptedString) {\r\n        var output = -1;\r\n        try {\r\n            if (encryptedString != null || encryptedString != \"\") {\r\n                var stringWithoutPrefix = encryptedString.substring(3, encryptedString.length);\r\n                var stringwithoutSufix = stringWithoutPrefix.substring(0, stringWithoutPrefix.length - 4);\r\n                output = Number(stringwithoutSufix) - 1264;\r\n            }\r\n        }\r\n        catch (Exception) {\r\n            throw Exception;\r\n        }\r\n        return output;\r\n    };\r\n    CryptoService.prototype.decryptString = function (text) {\r\n        text = text.substring(4, text.length);\r\n        text = text.substring(0, text.length - 4);\r\n        var decryptedText = '';\r\n        for (var _i = 0, text_1 = text; _i < text_1.length; _i++) {\r\n            var c = text_1[_i];\r\n            var unicode = c.charCodeAt(0);\r\n            unicode -= 5;\r\n            decryptedText += String.fromCharCode(unicode);\r\n        }\r\n        return decryptedText;\r\n    };\r\n    CryptoService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], CryptoService);\r\n    return CryptoService;\r\n}());\r\nexports.CryptoService = CryptoService;\r\n\n\n/***/ }),\n\n/***/ 260:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar NodeLoggerService = (function () {\r\n    function NodeLoggerService(isNode) {\r\n        this.isNode = isNode;\r\n        this.isLogActive = false; //Defines if the log is active or not\r\n        this.logFilepath = \"src/assets/log.txt\"; //logfile\r\n    }\r\n    NodeLoggerService.prototype.AddLogWithTime = function (mex) {\r\n        if (this.isNode) {\r\n            if (this.isLogActive == false) {\r\n                return;\r\n            }\r\n            var fs = __webpack_require__(429);\r\n            var dateObj = new Date();\r\n            var year = dateObj.getFullYear();\r\n            var month = dateObj.getMonth() + 1;\r\n            var day = dateObj.getDate();\r\n            var hour = dateObj.getHours();\r\n            var minutes = dateObj.getMinutes();\r\n            var seconds = dateObj.getSeconds();\r\n            var milliseconds = dateObj.getMilliseconds();\r\n            var dateStr = day + \"/\" + month + \"/\" + year + \" \" + hour + \":\" + minutes + \":\" + seconds + \":\" + milliseconds;\r\n            //Prepending date to message\r\n            mex = dateStr + \": \" + mex + \"\\n\";\r\n            fs.appendFile('src/assets/log.txt', mex, 'utf8', function (err) {\r\n                if (err) {\r\n                }\r\n                else {\r\n                }\r\n            });\r\n        }\r\n    };\r\n    NodeLoggerService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject('isNode')), \r\n        __metadata('design:paramtypes', [Boolean])\r\n    ], NodeLoggerService);\r\n    return NodeLoggerService;\r\n}());\r\nexports.NodeLoggerService = NodeLoggerService;\r\n\n\n/***/ }),\n\n/***/ 261:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar PaypalService = (function () {\r\n    function PaypalService() {\r\n        this.isPaypalScriptLoaded = false;\r\n        this.isError = false;\r\n        this.errMessage = \"\";\r\n    }\r\n    PaypalService.prototype.loadPaypalService = function (externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction) {\r\n        var _this = this;\r\n        if (UsePaypalProduction === void 0) { UsePaypalProduction = true; }\r\n        //-- Load paypal script if it is not already loaded, else only render a paypal button\r\n        if (!this.isPaypalScriptLoaded) {\r\n            this.loadExternalScript(externalScriptLink).then(function () {\r\n                _this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n            });\r\n        }\r\n        else {\r\n            this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n        }\r\n    };\r\n    PaypalService.prototype.loadExternalScript = function (scriptUrl) {\r\n        var _this = this;\r\n        return new Promise(function (resolve, reject) {\r\n            var scriptElement = document.createElement('script');\r\n            scriptElement.src = scriptUrl;\r\n            scriptElement.onload = resolve;\r\n            document.body.appendChild(scriptElement);\r\n            _this.isPaypalScriptLoaded = true;\r\n        });\r\n    };\r\n    PaypalService.prototype.renderPaypalBtn = function (externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction) {\r\n        var styleObj = this.getPaypalBtnStyle(paypalBtnStyle);\r\n        paypal.Button.render({\r\n            env: UsePaypalProduction ? 'production' : 'sandbox',\r\n            /* Show the buyer a 'Pay Now' button in the checkout flow */\r\n            commit: true,\r\n            locale: 'it_IT',\r\n            style: styleObj,\r\n            /* payment() is called when the button is clicked */\r\n            payment: function () {\r\n                /* Make a call to your server to set up the payment */\r\n                return paypal.request.post(createPaypalPaymentAPI, data)\r\n                    .then(function (response) {\r\n                    return response.id;\r\n                });\r\n            },\r\n            /* onAuthorize() is called when the buyer approves the payment */\r\n            onAuthorize: function (orderData, actions) {\r\n                var _this = this;\r\n                //-- Generating of execute payment object that we need on server side\r\n                var executePaymentObj = {\r\n                    paymentID: orderData.paymentID,\r\n                    payerID: orderData.payerID,\r\n                    intent: orderData.intent,\r\n                    orderID: orderData.orderID,\r\n                    paymentToken: orderData.paymentToken,\r\n                    returnUrl: orderData.returnUrl,\r\n                    CustomerId: data.CustomerId,\r\n                    //-- This is our orderId paypal also returns property with same name, so we renamed our OrderId property\r\n                    CustomerOrderId: data.OrderId,\r\n                    Lang: data.Lang\r\n                };\r\n                /* Make a call to your server to execute the payment */\r\n                return paypal.request.post(executePaypalPaymentAPI, executePaymentObj)\r\n                    .then(function (res) {\r\n                    _this.isError = res.IsError;\r\n                    if (!res.IsError)\r\n                        _this.isError = false;\r\n                    _this.errMessage = res.message;\r\n                    if (!res.message)\r\n                        _this.errMessage = \"\";\r\n                    if (_this.isError) {\r\n                        window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=\" + _this.isError + \"&message=\" + _this.errMessage;\r\n                    }\r\n                    else {\r\n                        window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=\" + _this.isError;\r\n                    }\r\n                }).catch(function (err) {\r\n                    window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=true&message=\" + err.message;\r\n                });\r\n            }\r\n        }, '#paypal-btn');\r\n    };\r\n    PaypalService.prototype.getPaypalBtnStyle = function (paypalBtnStyle) {\r\n        var styleObj = {};\r\n        if (paypalBtnStyle) {\r\n            var height = this.getPaypalBtnHeight(paypalBtnStyle.PaypalButtonHeight);\r\n            styleObj = {\r\n                color: paypalBtnStyle.PaypalButtonColor || 'gold',\r\n                shape: paypalBtnStyle.PaypalButtonShape || 'rect',\r\n                label: paypalBtnStyle.PaypalButtonLabel || 'paypal',\r\n                height: height || 40,\r\n                tagline: paypalBtnStyle.PaypalButtonTagline || false,\r\n                size: paypalBtnStyle.PaypalButtonSize || 'responsive'\r\n            };\r\n        }\r\n        else {\r\n            styleObj = {\r\n                color: 'gold',\r\n                shape: 'rect',\r\n                label: 'paypal',\r\n                height: 40,\r\n                tagline: false,\r\n                size: \"responsive\"\r\n            };\r\n        }\r\n        return styleObj;\r\n    };\r\n    PaypalService.prototype.getPaypalBtnHeight = function (paypalButtonHeight) {\r\n        var retVal = 40;\r\n        if (paypalButtonHeight) {\r\n            if (paypalButtonHeight === 'small')\r\n                retVal = 30;\r\n            else if (paypalButtonHeight === 'large')\r\n                retVal = 50;\r\n        }\r\n        return retVal;\r\n    };\r\n    PaypalService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], PaypalService);\r\n    return PaypalService;\r\n}());\r\nexports.PaypalService = PaypalService;\r\n\n\n/***/ }),\n\n/***/ 262:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar CategoryService = (function () {\r\n    function CategoryService(_api, _cache, currencyService, mappings, authService, languageService, ShoppingCartService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.currencyService = currencyService;\r\n        this.mappings = mappings;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n    }\r\n    CategoryService.prototype.getCategory = function (categoryId, lang) {\r\n        //Reading userId\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Category_Details\r\n            .replace('{categoryId}', categoryId.toString())\r\n            .replace('{lang}', lang)\r\n            .replace('{customerid}', customerId)\r\n            .replace('{currency}', curr)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CategoryService.prototype.getCatalogCategoriesData = function (lang) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var url = this.mappings.Web_Api_Get_Catalog_Categories_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CategoryService.prototype.getCategoryByUrl = function (lang, seoUrl) {\r\n        //Reading userId\r\n        var customerId = this.authService.GetUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Category_By_Url\r\n            .replace('{lang}', lang)\r\n            .replace('{customerid}', customerId)\r\n            .replace('{currency}', curr)\r\n            .replace('{seoUrl}', seoUrl)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CategoryService.prototype.getCategoryInfo = function (parameters) {\r\n        return this._api.post(this.mappings.Web_Api_Post_Send_Category_Info_Request, parameters);\r\n    };\r\n    CategoryService.prototype.getCategoryPriceData = function (categoryId) {\r\n        //Reading userId\r\n        var customerId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Catalog_Categories_Price_Data\r\n            .replace('{categoryId}', categoryId.toString())\r\n            .replace('{customerid}', customerId)\r\n            .replace('{lang}', lang)\r\n            .replace('{currency}', curr);\r\n        return this._api.get(url);\r\n    };\r\n    CategoryService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _g) || Object])\r\n    ], CategoryService);\r\n    return CategoryService;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.CategoryService = CategoryService;\r\n\n\n/***/ }),\n\n/***/ 263:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar SearchService = (function () {\r\n    function SearchService(_api, _cache, currencyService, mappings, authService, languageService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.currencyService = currencyService;\r\n        this.mappings = mappings;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.queryText = \"\";\r\n    }\r\n    SearchService.prototype.getCategoriesAndProducts = function (query, startRow, endRow) {\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Product_And_Categories\r\n            .replace('{startRowIndex}', startRow)\r\n            .replace('{maxRows}', endRow)\r\n            .replace('{lang}', lang)\r\n            .replace('{query}', query);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    SearchService.prototype.getQueryValue = function () {\r\n        var response = this.query;\r\n        return response;\r\n    };\r\n    SearchService.prototype.setQueryValue = function (newQuery) {\r\n        this.query = newQuery;\r\n    };\r\n    SearchService.prototype.setQueryPlainTextValue = function (newQuery) {\r\n        this.queryText = newQuery;\r\n    };\r\n    SearchService.prototype.getQueryPlainTextValue = function () {\r\n        var response = this.queryText;\r\n        return response;\r\n    };\r\n    SearchService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object])\r\n    ], SearchService);\r\n    return SearchService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.SearchService = SearchService;\r\n\n\n/***/ }),\n\n/***/ 29:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar CurrencyService = (function () {\r\n    function CurrencyService(_api, mappings) {\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n        this.currencyVal = \"\";\r\n    }\r\n    CurrencyService.prototype.getCurrency = function () {\r\n        var param = '$';\r\n        switch (param) {\r\n            case '$': return 'USD';\r\n            case '€': return 'EUR';\r\n            default: return 'EUR';\r\n        }\r\n    };\r\n    CurrencyService.prototype.getCurrencyBackend = function () {\r\n        var url = this.mappings.Web_Api_Get_DefaultCurrency;\r\n        return this._api.get(url);\r\n    };\r\n    CurrencyService.prototype.getDefaultCurrency = function () {\r\n        return this.currencyVal;\r\n    };\r\n    CurrencyService.prototype.setDefaultCurrency = function (currency) {\r\n        this.currencyVal = currency;\r\n    };\r\n    CurrencyService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object])\r\n    ], CurrencyService);\r\n    return CurrencyService;\r\n    var _a, _b;\r\n}());\r\nexports.CurrencyService = CurrencyService;\r\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\nvar application_service_1 = __webpack_require__(128);\r\nvar LanguageService = (function () {\r\n    function LanguageService(translate, appService) {\r\n        this.translate = translate;\r\n        this.appService = appService;\r\n        this.lang = this.translate.currentLang;\r\n    }\r\n    LanguageService.prototype.getLongLang = function () {\r\n        var lang = 'it-IT';\r\n        switch (this.lang) {\r\n            case 'it':\r\n                lang = 'it-IT';\r\n                break;\r\n            case 'en':\r\n                lang = 'en-GB';\r\n                break;\r\n            case 'al':\r\n                lang = 'sq-AL';\r\n                break;\r\n            case 'de':\r\n                lang = 'de-DE';\r\n                break;\r\n            case 'sl':\r\n                lang = 'sl-SI';\r\n                break;\r\n            case 'hr':\r\n                lang = 'hr-HR';\r\n                break;\r\n            case 'pt':\r\n                lang = 'pt-PT';\r\n                break;\r\n            case 'es':\r\n                lang = 'es-ES';\r\n                break;\r\n        }\r\n        return lang;\r\n    };\r\n    LanguageService.prototype.getShortLang = function () {\r\n        return this.lang;\r\n    };\r\n    //Return an object containing all the information for the current language (eg. code, lable, icon etc.)\r\n    LanguageService.prototype.getCurrentLanguage = function () {\r\n        var result = new LanguageObj();\r\n        switch (this.lang) {\r\n            case \"it\":\r\n        }\r\n        return result;\r\n    };\r\n    LanguageService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _b) || Object])\r\n    ], LanguageService);\r\n    return LanguageService;\r\n    var _a, _b;\r\n}());\r\nexports.LanguageService = LanguageService;\r\nvar LanguageObj = (function () {\r\n    function LanguageObj() {\r\n    }\r\n    return LanguageObj;\r\n}());\r\nexports.LanguageObj = LanguageObj;\r\n\n\n/***/ }),\n\n/***/ 35:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar TemplateService = (function () {\r\n    function TemplateService(_api, _cache, mappings, language, cache, cartService, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.language = language;\r\n        this.cache = cache;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    TemplateService.prototype.getThankYouPagePaypalInfo = function (componentType, id) {\r\n        var currentLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Information_ThankYouPage_Paypal_Url\r\n            .replace('{type}', componentType)\r\n            .replace('{orderid}', id)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{userid}', customerId);\r\n        return this._api.get(url);\r\n    };\r\n    TemplateService.prototype.getThankYouPagOnlineInfo = function (componentType, id) {\r\n        var currentLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Information_ThankYouPage_PagOnline_Url\r\n            .replace('{type}', componentType)\r\n            .replace('{orderid}', id)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{userid}', customerId);\r\n        return this._api.get(url);\r\n    };\r\n    TemplateService.prototype.getThankYouNexiInfo = function (componentType, id, messaggio, data, orario) {\r\n        var currentLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        //remove special char\r\n        messaggio = messaggio.replace('%2B', ' ');\r\n        messaggio = messaggio.replace('+', ' ');\r\n        var url = this.mappings.Web_Api_Get_Information_ThankYouPage_Nexi_Url\r\n            .replace('{type}', componentType)\r\n            .replace('{orderid}', id)\r\n            .replace('{messaggio}', messaggio)\r\n            .replace('{data}', data)\r\n            .replace('{orario}', orario)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{userid}', customerId);\r\n        return this._api.get(url);\r\n    };\r\n    TemplateService.prototype.getThankYouBancaSellaInfo = function (componentType, id, messaggio) {\r\n        var currentLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        //remove special char\r\n        var url = this.mappings.Web_Api_Get_Information_ThankYouPage_BancaSella_Url\r\n            .replace('{type}', componentType)\r\n            .replace('{orderid}', id)\r\n            .replace('{messaggio}', messaggio)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{userid}', customerId);\r\n        return this._api.get(url);\r\n    };\r\n    /**\r\n     * return the html template for a given component\r\n    */\r\n    TemplateService.prototype.getComponentTemplate = function (componentType) {\r\n        var currentLang = this.language.getLongLang();\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Template_Url\r\n            .replace('{type}', componentType)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        return this._api.get(url);\r\n    };\r\n    TemplateService.prototype.getComponentTemplatePageNotFound = function (componentType) {\r\n        var currentLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Template_Url_Page_Not_Found\r\n            .replace('{type}', componentType)\r\n            .replace('{lang}', currentLang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        ;\r\n        return this._api.get(url);\r\n    };\r\n    TemplateService.prototype.getHeadFootData = function (templateBuilderId) {\r\n        var _this = this;\r\n        var currentLang = this.language.getLongLang();\r\n        //reading template builder id\r\n        if (templateBuilderId == undefined || templateBuilderId == \"undefined\") {\r\n            templateBuilderId = \"0\";\r\n        }\r\n        var url = this.mappings.Web_Api_Get_Head_Foot_Data\r\n            .replace('{lang}', currentLang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        return this._api.get(url).do(function (json) {\r\n            _this.cache.clear(url);\r\n        });\r\n    };\r\n    TemplateService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _g) || Object])\r\n    ], TemplateService);\r\n    return TemplateService;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.TemplateService = TemplateService;\r\n\n\n/***/ }),\n\n/***/ 371:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar core_1 = __webpack_require__(0);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar dom_adapter_1 = __webpack_require__(32);\r\nvar router_1 = __webpack_require__(12);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar router_2 = __webpack_require__(12);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar AppComponent = (function () {\r\n    function AppComponent(template, document, isNode, cache, mappings, router, authService, route, currency, routesService) {\r\n        var _this = this;\r\n        this.template = template;\r\n        this.document = document;\r\n        this.isNode = isNode;\r\n        this.cache = cache;\r\n        this.mappings = mappings;\r\n        this.router = router;\r\n        this.authService = authService;\r\n        this.route = route;\r\n        this.currency = currency;\r\n        this.routesService = routesService;\r\n        this._dom = dom_adapter_1.getDOM();\r\n        this.subManager = new Subscription_1.Subscription();\r\n        var sub = router.events.subscribe(function (event) {\r\n            _this.navigationInterceptor(event);\r\n        });\r\n        var currencysub = currency.getCurrencyBackend().subscribe(function (result) {\r\n            currency.setDefaultCurrency(result);\r\n        });\r\n        this.subManager.add(sub);\r\n        this.subManager.add(currencysub);\r\n    }\r\n    // Shows and hides the loading spinner during RouterEvent changes\r\n    AppComponent.prototype.navigationInterceptor = function (event) {\r\n        if (event instanceof router_2.NavigationStart) {\r\n            this.routesService.showPageLoader();\r\n        }\r\n        if (event instanceof router_1.NavigationEnd) {\r\n            var templateBuilderId = this.route.snapshot.queryParams[\"tempBuildId\"];\r\n            //console.log(templateBuilderId, \"templateBuilderId\")\r\n            if (templateBuilderId != \"undefined\" && templateBuilderId != undefined && templateBuilderId != \"0\") {\r\n                this.authService.setTemplBuilderId(templateBuilderId);\r\n            }\r\n            else {\r\n                templateBuilderId = this.authService.getTemplBuilderId();\r\n            }\r\n            this._ngOnInit(templateBuilderId);\r\n        }\r\n        // Set loading state to false in both of the below events to hide the spinner in case a request fails\r\n        if (event instanceof router_2.NavigationCancel) {\r\n            this.routesService.hidePageLoader();\r\n        }\r\n        if (event instanceof router_2.NavigationError) {\r\n            this.routesService.hidePageLoader();\r\n        }\r\n    };\r\n    AppComponent.prototype.ngOnInit = function () {\r\n    };\r\n    AppComponent.prototype._ngOnInit = function (templateBuilderId) {\r\n        var _this = this;\r\n        if (!this.isNode) {\r\n            return;\r\n        }\r\n        var templateSub = this.template.getHeadFootData(templateBuilderId)\r\n            .subscribe(function (headFootData) {\r\n            //Dynamically adding head css, js to the page (head.html)\r\n            _this.appendHtmlString(_this.document.head, headFootData.HeadTemplateHtml);\r\n            //Dynamically adding head css, js to the page (foot.html)\r\n            _this.appendHtmlString(_this.document.body, headFootData.FootTemplateHtml);\r\n        });\r\n        this.subManager.add(templateSub);\r\n    };\r\n    AppComponent.prototype.appendHtmlString = function (el, template) {\r\n        var div = this._dom.createElement('div');\r\n        this._dom.setInnerHTML(div, template);\r\n        this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n    };\r\n    AppComponent.prototype.clearMemory = function () {\r\n        this._dom = null;\r\n        this.subManager.unsubscribe();\r\n        this.cache.clearAll();\r\n        this.document = null;\r\n    };\r\n    AppComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.clearMemory();\r\n    };\r\n    AppComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            selector: 'app',\r\n            template: __webpack_require__(640)\r\n        }),\r\n        __param(1, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n        __param(2, core_1.Inject('isNode')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _a) || Object, Object, Boolean, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _h) || Object])\r\n    ], AppComponent);\r\n    return AppComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.AppComponent = AppComponent;\r\n\n\n/***/ }),\n\n/***/ 372:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar news_list_1 = __webpack_require__(412);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(126);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ArticleCategoryComponent = (function () {\r\n    function ArticleCategoryComponent(_compiler, componentHelper, _elementRef, articleService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.articleService = articleService;\r\n        this.languageService = languageService;\r\n        this.route = route;\r\n        this.router = router;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.articleCategory = new news_list_1.ArticleCategory();\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    ArticleCategoryComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var lang = this.languageService.getLongLang();\r\n        //Reading id from url\r\n        //If id is set, then the information is retrived by id, else by url\r\n        var routeSub = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            var pageNumber = params['page'];\r\n            var startRowIndex = 0;\r\n            var maxRows = 15;\r\n            if (pageNumber == undefined) {\r\n                pageNumber = 0;\r\n                startRowIndex = pageNumber * maxRows;\r\n            }\r\n            else if (pageNumber < 0) {\r\n                pageNumber = 0;\r\n                startRowIndex = pageNumber * maxRows;\r\n            }\r\n            else {\r\n                startRowIndex = (pageNumber - 1) * maxRows;\r\n            }\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            if (id !== undefined) {\r\n                var categoryId_1 = id;\r\n                var categorySubId = _this.articleService.getCategoryArticleById(categoryId_1, lang, startRowIndex, maxRows)\r\n                    .subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetArticleSuccess(result, pageNumber, maxRows, header, categoryId_1);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticleCategory, categoryId_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(categorySubId);\r\n            }\r\n            else {\r\n                var url = _this.router.url;\r\n                var pageNumber_1 = params['page'];\r\n                if (pageNumber_1 != undefined) {\r\n                    url = url.slice(0, url.lastIndexOf('/'));\r\n                }\r\n                else {\r\n                    pageNumber_1 = 0;\r\n                }\r\n                var categorySubUrl = _this.articleService.getArticleCategoryByUrl(lang, url, startRowIndex, maxRows).subscribe(function (result) {\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetArticleSuccess(result, pageNumber_1, maxRows, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticleCategory, result.CategoryDetails.Id);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(categorySubUrl);\r\n            }\r\n        });\r\n        this.subManager.add(routeSub);\r\n    };\r\n    ArticleCategoryComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ArticleCategoryComponent.prototype.onGetArticleSuccess = function (result, currentPage, maxRows, header, categoryId) {\r\n        ////Creating sub-component with the returned information\r\n        var subComponent = this.createSubComponent(result, currentPage, maxRows, header, categoryId);\r\n        ////Injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    };\r\n    ArticleCategoryComponent.prototype.createSubComponent = function (result, currentPage, maxRows, header, categoryId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, scriptService, helperService, isBrowser, _elementRef, languageService, articleService, routesService, router, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.languageService = languageService;\r\n                this.articleService = articleService;\r\n                this.routesService = routesService;\r\n                this.router = router;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.articleCategory = result.CategoryDetails;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.blogs = result.ArticleCategoryList;\r\n                this.pageIsInit = false;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.categoryId = 0;\r\n                this.startRowIndex = 0;\r\n                this.maxRows = maxRows;\r\n                this.blogCategoryPageName = [];\r\n                this.blogCategoryPageNumber = [];\r\n                this.blogPageName = [];\r\n                this.homePageName = [];\r\n                this.currentPageNumber = currentPage;\r\n                this.disablePreviousPage = false;\r\n                this.disableNextPage = false;\r\n                this.numberOfPages = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n                this.pages = this.createRange(this.numberOfPages);\r\n                this.zeroPage = 0;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.currentPageNumber == 0) {\r\n                    this.zeroPage = 1;\r\n                }\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n                this.articleCategories = result.ArticleCategories;\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n                if (categoryId != undefined) {\r\n                    this.blogCategoryPageName = this.routesService.getRoutePath('ArticleCategoryPage');\r\n                    this.blogCategoryPageNumber = this.routesService.getRoutePath('ArticleCategoryPageWithPaging');\r\n                }\r\n                else {\r\n                    this.blogCategoryPageName.push(this.router.url);\r\n                }\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.createRange = function (number) {\r\n                var items = [];\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n                return items;\r\n            };\r\n            ChildComponent.prototype.showClickedPage = function (index) {\r\n                var page = index + 1;\r\n                var url;\r\n                if (categoryId != undefined) {\r\n                    url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', page.toString());\r\n                }\r\n                else {\r\n                    if (this.currentPageNumber == 0) {\r\n                        url = this.blogCategoryPageName + \"/\" + page.toString();\r\n                    }\r\n                    else {\r\n                        url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + page.toString();\r\n                    }\r\n                }\r\n                this.router.navigate([url]);\r\n            };\r\n            ChildComponent.prototype.showPreviousPage = function () {\r\n                var previousPage = this.currentPageNumber - 1;\r\n                if (previousPage > 0) {\r\n                    var url = void 0;\r\n                    if (categoryId != undefined) {\r\n                        url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', previousPage.toString());\r\n                    }\r\n                    else {\r\n                        if (this.currentPageNumber == 0) {\r\n                            url = this.blogCategoryPageName + \"/\" + previousPage.toString();\r\n                        }\r\n                        else {\r\n                            url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + previousPage.toString();\r\n                        }\r\n                    }\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            ChildComponent.prototype.showNextPage = function () {\r\n                var page = Number(this.currentPageNumber);\r\n                if (this.currentPageNumber == 0) {\r\n                    page = 1;\r\n                }\r\n                var nextPage = page + 1;\r\n                var url;\r\n                if (nextPage <= this.numberOfPages) {\r\n                    if (categoryId != undefined) {\r\n                        url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', nextPage.toString());\r\n                    }\r\n                    else {\r\n                        if (this.currentPageNumber == 0) {\r\n                            url = this.blogCategoryPageName + \"/\" + nextPage.toString();\r\n                        }\r\n                        else {\r\n                            url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + nextPage.toString();\r\n                        }\r\n                    }\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(3, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _b) || Object, (typeof (_c = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ArticleCategoryComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n    ], ArticleCategoryComponent);\r\n    return ArticleCategoryComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ArticleCategoryComponent = ArticleCategoryComponent;\r\n\n\n/***/ }),\n\n/***/ 373:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar article_service_1 = __webpack_require__(126);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar BlogPageComponent = (function () {\r\n    function BlogPageComponent(_compiler, componentHelper, _elementRef, articleService, languageService, activatedRoute, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.articleService = articleService;\r\n        this.languageService = languageService;\r\n        this.activatedRoute = activatedRoute;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.categoryId = 0;\r\n        this.startRowIndex = 0;\r\n        this.maxRows = 15;\r\n        this.currentPageNumber = 0;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    BlogPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var paramsSub = this.activatedRoute.params.subscribe(function (params) {\r\n            _this.currentPageNumber = params['page'];\r\n            if (_this.currentPageNumber == undefined) {\r\n                _this.currentPageNumber = 1;\r\n                _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n            }\r\n            else if (_this.currentPageNumber < 1) {\r\n                _this.currentPageNumber = 1;\r\n                _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n            }\r\n            else {\r\n                _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n            }\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            var blogSub = _this.articleService.getBlogData(_this.lang, _this.startRowIndex, _this.maxRows).subscribe(function (result) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                if (_this.isBrowser) {\r\n                    //Creating subcomponent whith the blog information to inject\r\n                    var subComponent = _this.createSubComponent(result, _this.currentPageNumber, _this.maxRows, header);\r\n                    //injecting created component (OK)\r\n                    _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                }\r\n                else {\r\n                    //-- Get head and body scripts\r\n                    _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.blogHomeId);\r\n                    //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                    _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                    _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                }\r\n            });\r\n            _this.subManager.add(blogSub);\r\n        });\r\n        this.subManager.add(paramsSub);\r\n    };\r\n    BlogPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    BlogPageComponent.prototype.createSubComponent = function (result, currentPage, maxRows, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, helperService, languageService, articleService, routesService, router, activatedRoute, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.languageService = languageService;\r\n                this.articleService = articleService;\r\n                this.routesService = routesService;\r\n                this.router = router;\r\n                this.activatedRoute = activatedRoute;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.blogs = result.ArticleCategoryList;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.company = result.Company;\r\n                this.pageIsInit = false;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.categoryId = 0;\r\n                this.startRowIndex = 0;\r\n                this.maxRows = maxRows;\r\n                this.blogPageName = [];\r\n                this.blogPageNumber = [];\r\n                this.numberOfPages = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n                this.pages = this.createRange(this.numberOfPages);\r\n                this.currentPageNumber = currentPage;\r\n                this.disableNextPage = false;\r\n                this.disablePreviousPage = false;\r\n                this.homePageName = [];\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.articleCategories = result.ArticleCategories;\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.blogPageNumber = this.routesService.getRoutePath('BLOG_WITH_PAGINATION');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            //PAGINATION START************************************************************\r\n            ChildComponent.prototype.createRange = function (number) {\r\n                var items = [];\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n                return items;\r\n            };\r\n            ChildComponent.prototype.showClickedPage = function (index) {\r\n                var page = index + 1;\r\n                var url = this.blogPageNumber[0].replace(':page', page.toString());\r\n                this.router.navigate([url]);\r\n            };\r\n            ChildComponent.prototype.showPreviousPage = function () {\r\n                var previousPage = this.currentPageNumber - 1;\r\n                if (previousPage > 0) {\r\n                    var url = this.blogPageNumber[0].replace(':page', previousPage.toString());\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            ChildComponent.prototype.showNextPage = function () {\r\n                var nextPage = Number(this.currentPageNumber) + 1;\r\n                if (nextPage <= this.numberOfPages) {\r\n                    var url = this.blogPageNumber[0].replace(':page', nextPage.toString());\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            //PAGINATION END************************************************************\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _h) || Object, (typeof (_j = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _j) || Object, (typeof (_k = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _k) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    BlogPageComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(7, core_1.Inject('isBrowser')),\r\n        __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object])\r\n    ], BlogPageComponent);\r\n    return BlogPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.BlogPageComponent = BlogPageComponent;\r\n\n\n/***/ }),\n\n/***/ 374:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(126);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar news_list_1 = __webpack_require__(412);\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ArticleComponent = (function () {\r\n    function ArticleComponent(_elementRef, _compiler, componentHelper, languageService, router, route, articleService, templateService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._elementRef = _elementRef;\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this.languageService = languageService;\r\n        this.router = router;\r\n        this.route = route;\r\n        this.articleService = articleService;\r\n        this.templateService = templateService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.newsDetails = new news_list_1.NewsDetails();\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    ArticleComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var lang = this.languageService.getLongLang();\r\n        var paramSub = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            //Reading id from url\r\n            //If id is set, then the page is retrived by id, else by url\r\n            if (id !== undefined) {\r\n                var Id_1 = id;\r\n                var subArticleId = _this.articleService.getArticleDetails(Id_1, lang).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticle, Id_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.HeaderImage);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(subArticleId);\r\n            }\r\n            else {\r\n                var url = _this.router.url;\r\n                var subArticleUrl = _this.articleService.getArticleByUrl(lang, url).subscribe(function (result) {\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticle, result.Id);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.HeaderImage);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(subArticleUrl);\r\n            }\r\n        });\r\n        this.subManager.add(paramSub);\r\n    };\r\n    ArticleComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ArticleComponent.prototype.onGetPageSuccess = function (newsResult, header) {\r\n        ////Creating sub-component with the returned information\r\n        var subComponent = this.createSubComponent(newsResult, header);\r\n        ////Injecting dynamically created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    };\r\n    ArticleComponent.prototype.createSubComponent = function (newsObj, header) {\r\n        if (newsObj.Id == 0) {\r\n            var templateSub = this.templateService.getComponentTemplate(\"newsletterConfirmationTemplate\").subscribe(function (result) {\r\n                newsObj.TemplateHtml = result;\r\n            });\r\n            this.subManager.add(templateSub);\r\n        }\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, newsletterService, routesService, articleService, languageService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.newsletterService = newsletterService;\r\n                this.routesService = routesService;\r\n                this.articleService = articleService;\r\n                this.languageService = languageService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.newsDetails = newsObj;\r\n                this.slidesNews = newsObj.SliderImages;\r\n                this.pageIsInit = false;\r\n                this.seoInfo = newsObj.SeoInformation;\r\n                this.model = {\r\n                    Email: \"\",\r\n                    Checkbox: false\r\n                };\r\n                this.privacyPageNameArticle = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.lang = this.languageService.getLongLang();\r\n                this.categoryId = 0;\r\n                this.startRowIndex = 0;\r\n                this.maxRows = 999999;\r\n                this.blogPageName = [];\r\n                this.homePageName = [];\r\n                this.breadcrumbs = newsObj.BreadcrumbsInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.footerData = newsObj.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.articleCategories = newsObj.ArticleCategories;\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                this.setupSocialNetworks();\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initLightbox();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.setupSocialNetworks = function () {\r\n                var shareurl = window.location.href;\r\n                var title = this.newsDetails.Title;\r\n                var text = encodeURI(title);\r\n                /********************************** SET THIS PART DYNAMICALY **************************************** */\r\n                //setting twitter profile name \r\n                var companyTwitterProfile = \"DynamicsoftSrl\";\r\n                //setting linkedin profile name\r\n                var companyLinkedinProfile = \"DynamicsoftSrl\";\r\n                /**************************************************************************************************** */\r\n                //encoded current page\r\n                var currentPage = encodeURI(shareurl);\r\n                //sharing of current page on Facebook\r\n                $('.fbsharelink').click(function () {\r\n                    window.open('https://www.facebook.com/sharer/sharer.php?u=' + shareurl + '&t=' + document.title, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n                    return false;\r\n                });\r\n                //sharing of current page on LinkedIn\r\n                $('.linkedinsharelink').click(function () {\r\n                    window.open('https://www.linkedin.com/shareArticle?mini=true&url=' + shareurl + '&title=' + document.title +\r\n                        '&summary=' + text + '&source=' + companyLinkedinProfile, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n                });\r\n                //sharing of currentpage on Twitter\r\n                $('.twitter-share-button').click(function () {\r\n                    window.open('https://twitter.com/intent/tweet?text=' + text + '&url=' + currentPage + '&via=' + companyTwitterProfile, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n                });\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerNewslatterArticle = true;\r\n                if (form) {\r\n                    var subNewsletter = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n                        if (result == \"-1\") {\r\n                            _this.alreadySubscribedArticle = true;\r\n                            _this.successfullySubscribedArticle = false;\r\n                            _this.spinnerNewslatterArticle = false;\r\n                        }\r\n                        else {\r\n                            _this.alreadySubscribedArticle = false;\r\n                            _this.successfullySubscribedArticle = true;\r\n                            _this.spinnerNewslatterArticle = false;\r\n                        }\r\n                    });\r\n                    this.subManager.add(subNewsletter);\r\n                }\r\n                else {\r\n                    this.spinnerNewslatterArticle = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: newsObj.TemplateHtml\r\n                }),\r\n                __param(1, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _g) || Object, (typeof (_h = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ArticleComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(9, core_1.Inject('isBrowser')),\r\n        __param(12, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _a) || Object, (typeof (_b = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _g) || Object, (typeof (_h = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _h) || Object, (typeof (_j = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _l) || Object, Object, (typeof (_m = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _m) || Object])\r\n    ], ArticleComponent);\r\n    return ArticleComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n}());\r\nexports.ArticleComponent = ArticleComponent;\r\n\n\n/***/ }),\n\n/***/ 375:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar search_service_1 = __webpack_require__(263);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar router_1 = __webpack_require__(12);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar SearchComponent = (function () {\r\n    function SearchComponent(_compiler, componentHelper, _elementRef, searchService, cmsComponentService, activatedRoute, isBrowser, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.searchService = searchService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.activatedRoute = activatedRoute;\r\n        this.isBrowser = isBrowser;\r\n        this.scriptService = scriptService;\r\n        this.startRow = 0;\r\n        this.endRow = 10;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    SearchComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var paramSub = this.activatedRoute.params.subscribe(function (params) {\r\n            var decodedQuery = params['query'];\r\n            var decoded = decodeURIComponent(decodedQuery);\r\n            _this.query = encodeURIComponent(decoded);\r\n            _this.currentPageNumber = params['page'];\r\n            if (_this.currentPageNumber == undefined) {\r\n                _this.currentPageNumber = 1;\r\n                _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n            }\r\n            else if (_this.currentPageNumber < 1) {\r\n                _this.currentPageNumber = 1;\r\n                _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n            }\r\n            else {\r\n                _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n            }\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            var catAndProdSub = _this.searchService.getCategoriesAndProducts(_this.query, _this.startRow, _this.endRow).subscribe(function (result) {\r\n                _this.SearchResult = result;\r\n                if (_this.isBrowser) {\r\n                    // Creating subcomponent whith the selected template to inject\r\n                    var subComponent = _this.createSubComponent(header, _this.SearchResult, _this.query, _this.currentPageNumber, _this.endRow);\r\n                    //injecting created component (OK)\r\n                    _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                }\r\n                else {\r\n                    //Eventually retrieving the script to append\r\n                    if (_this.currentPageNumber == 0 || _this.currentPageNumber == 1) {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchPageId);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchWithPagingPageId);\r\n                    }\r\n                }\r\n            }, function (err) { return _this.handleSearchError(); });\r\n            _this.subManager.add(catAndProdSub);\r\n        });\r\n        this.subManager.add(paramSub);\r\n    };\r\n    SearchComponent.prototype.handleSearchError = function () {\r\n        var _this = this;\r\n        this.query = null;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(function (result) {\r\n            _this.SearchResult = result;\r\n            if (_this.isBrowser) {\r\n                // Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(header, _this.SearchResult, _this.query, _this.currentPageNumber, _this.endRow);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //Eventually retrieving the script to append\r\n                if (_this.currentPageNumber == 0 || _this.currentPageNumber == 1) {\r\n                    //-- Get head and body scripts\r\n                    _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchPageId);\r\n                }\r\n                else {\r\n                    //-- Get head and body scripts\r\n                    _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchWithPagingPageId);\r\n                }\r\n            }\r\n        });\r\n    };\r\n    SearchComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    SearchComponent.prototype.createSubComponent = function (header, SearchResult, query, currentPage, endRow) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(isBrowser, routesService, searchService, router, seoService, scriptService, _elementRef) {\r\n                this.isBrowser = isBrowser;\r\n                this.routesService = routesService;\r\n                this.searchService = searchService;\r\n                this.router = router;\r\n                this.seoService = seoService;\r\n                this.scriptService = scriptService;\r\n                this._elementRef = _elementRef;\r\n                this.seoInfo = SearchResult.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.defaultImageUrl = \"/global_app/img/noimage.jpg\";\r\n                this.redirectUrlNone = \"javascript:void(0)\";\r\n                //pagination\r\n                this.query = query;\r\n                this.currentPageNumber = currentPage;\r\n                this.disablePreviousPage = false;\r\n                this.disableNextPage = false;\r\n                this.numberOfPages = Math.ceil(SearchResult.NumberOfResults / endRow);\r\n                this.searchResultsPage = [];\r\n                this.searchResultsPageWithPagination = [];\r\n                this.pages = this.createRange(this.numberOfPages);\r\n                this.numberOfResult = SearchResult.NumberOfResults;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                if (SearchResult.SearchModelList != null) {\r\n                    this.searchResults = SearchResult.SearchModelList;\r\n                }\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n                this.searchResultsPage = this.routesService.getRoutePath('SEARCH - RESULTS');\r\n                this.searchResultsPageWithPagination = this.routesService.getRoutePath('SEARCH RESULTS - PAGINATION');\r\n                if (this.searchResults != null && this.searchResults != undefined) {\r\n                    for (var i = 0; i < this.searchResults.length; i++) {\r\n                        //setting of default image if image url is not defined\r\n                        if (this.searchResults[i].ImageUrl == null || this.searchResults[i].ImageUrl == \"\") {\r\n                            this.searchResults[i].ImageUrl = this.defaultImageUrl;\r\n                        }\r\n                        //setting of url href not to do nothing if url is not defined\r\n                        if (this.searchResults[i].RedirectUrl == null || this.searchResults[i].RedirectUrl == \"\") {\r\n                            this.searchResults[i].RedirectUrl = this.redirectUrlNone;\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            //Pagination start\r\n            ChildComponent.prototype.createRange = function (number) {\r\n                var items = [];\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n                return items;\r\n            };\r\n            ChildComponent.prototype.showClickedPage = function (index) {\r\n                var page = index + 1;\r\n                var url = this.searchResultsPageWithPagination[0]\r\n                    .replace(':query', query)\r\n                    .replace(':page', page.toString());\r\n                this.router.navigate([url]);\r\n            };\r\n            ChildComponent.prototype.showPreviousPage = function () {\r\n                var previousPage = this.currentPageNumber - 1;\r\n                if (previousPage > 0) {\r\n                    var url = this.searchResultsPageWithPagination[0]\r\n                        .replace(':query', query)\r\n                        .replace(':page', previousPage.toString());\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            ChildComponent.prototype.showNextPage = function () {\r\n                var nextPage = Number(this.currentPageNumber) + 1;\r\n                if (nextPage <= this.numberOfPages) {\r\n                    var url = this.searchResultsPageWithPagination[0]\r\n                        .replace(':query', query)\r\n                        .replace(':page', nextPage.toString());\r\n                    this.router.navigate([url]);\r\n                }\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: SearchResult.TemplateHtml\r\n                }),\r\n                __param(0, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [Boolean, (typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _f) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    SearchComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            selector: \"\",\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n    ], SearchComponent);\r\n    return SearchComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.SearchComponent = SearchComponent;\r\n\n\n/***/ }),\n\n/***/ 376:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\n//Services\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar Observable_1 = __webpack_require__(1);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar HomeComponent = (function () {\r\n    function HomeComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, scriptService, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.scriptService = scriptService;\r\n        this.document = document;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this._compiler.clearCache();\r\n    }\r\n    HomeComponent.prototype.requestDataFromMultipleSources = function () {\r\n        var response1 = this.cmsComponentService.getHeaderData();\r\n        var response2 = this.cmsComponentService.getSideMenuData();\r\n        var response3 = this.cmsComponentService.getproductHilightpromo();\r\n        var response4 = this.cmsComponentService.getHomePageDataOptimized();\r\n        // Observable.forkJoin (RxJS 5) changes to just forkJoin() in RxJS 6\r\n        return Observable_1.Observable.forkJoin([response1, response2, response3, response4]);\r\n    };\r\n    HomeComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var homePageInfo;\r\n        var header;\r\n        var SideMenu;\r\n        var promo;\r\n        var highlith;\r\n        var fork = this.requestDataFromMultipleSources().subscribe(function (result) {\r\n            header = result[0];\r\n            if (result[1].Categories) {\r\n                header.Categories = result[1].Categories;\r\n                SideMenu = result[1];\r\n            }\r\n            if (result[2].Promotions) {\r\n                promo = result[2].Promotions;\r\n            }\r\n            if (result[2].Highlights) {\r\n                highlith = result[2].Highlights;\r\n            }\r\n            if (result[3].SeoInformation) {\r\n                result[3].SeoInformation.ShortDescription = result[3].ShortDescription ? result[3].ShortDescription : '';\r\n                result[3].SeoInformation.LongDescription = result[3].LongDescription ? result[3].LongDescription : '';\r\n            }\r\n            if (SideMenu) {\r\n                result[3].SideMenuData = SideMenu;\r\n            }\r\n            if (promo) {\r\n                result[3].Promotions = promo;\r\n            }\r\n            if (highlith) {\r\n                result[3].Highlights = highlith;\r\n            }\r\n            if (_this.isBrowser) {\r\n                homePageInfo = result[3];\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(homePageInfo, header);\r\n                //let subComponent = this.createSubComponent(homePageInfo);\r\n                _this._elementRef.clear();\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result[3], _this.scriptService.typeSystemPage, _this.scriptService.homeId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result[3].SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result[3].SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(fork);\r\n    };\r\n    HomeComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n        // this.cache.clearAll();\r\n    };\r\n    //Creates component to inject\r\n    //private createSubComponent(homePageInfo: any) {\r\n    HomeComponent.prototype.createSubComponent = function (homePageInfo, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, seoService, isBrowser, _elementRef, scriptService, helperService, currency, languageService, newsletterService, componentHelper, cache, canvasService, metaService) {\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.currency = currency;\r\n                this.languageService = languageService;\r\n                this.newsletterService = newsletterService;\r\n                this.componentHelper = componentHelper;\r\n                this.cache = cache;\r\n                this.canvasService = canvasService;\r\n                this.metaService = metaService;\r\n                this.homeIsInit = false;\r\n                this.productsPageName = [];\r\n                this.promotionsPageName = [];\r\n                this.categories = homePageInfo.Categories;\r\n                this.highlights = homePageInfo.Highlights;\r\n                this.promotions = homePageInfo.Promotions;\r\n                this.seoInfo = homePageInfo.SeoInformation;\r\n                this.articles = homePageInfo.ArticleCategoryList;\r\n                //private headerData: any = homePageInfo.HeaderData;\r\n                this.headerData = header;\r\n                this.footerData = homePageInfo.FooterData;\r\n                this.sideMenuData = homePageInfo.SideMenuData;\r\n                this.sliderData = homePageInfo.SliderData;\r\n                //newsletter subsciption\r\n                this.newsletterSubmitted = false;\r\n                this.privacySubmitted = false;\r\n                this.alreadySubscribed = false;\r\n                this.successfullySubscribed = false;\r\n                this.spinnerNewslatter = false;\r\n                this.lang = this.languageService.getShortLang();\r\n                this.model = {\r\n                    Email: \"\",\r\n                    CheckboxSubscribe: false\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            // private breadcrumbs : Breadcrumbs[] = homePageInfo.BreadcrumbsInfo;\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                // setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.sideMenuData.Categories = this.headerData.Categories;\r\n                this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n                this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n            };\r\n            ChildComponent.prototype.filteraArticleOfType = function (type, numReturn) {\r\n                var count = 1;\r\n                var result = new Array();\r\n                var res = this.articles.filter(function (x) { return x.Code_Category == type; });\r\n                for (var _i = 0, res_1 = res; _i < res_1.length; _i++) {\r\n                    var item = res_1[_i];\r\n                    if (count > numReturn) {\r\n                        return result;\r\n                    }\r\n                    result.push(item);\r\n                    count++;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerNewslatter = true;\r\n                if (form) {\r\n                    var newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n                        if (result == \"-1\") {\r\n                            _this.alreadySubscribed = true;\r\n                            _this.successfullySubscribed = false;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                        else {\r\n                            _this.alreadySubscribed = false;\r\n                            _this.successfullySubscribed = true;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                    });\r\n                    this.subManager.add(newsSub);\r\n                }\r\n                else {\r\n                    this.spinnerNewslatter = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.homeIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //layoutTheme.initCarousel();\r\n                layoutTheme.initAnimate();\r\n                //Eventually retrieving the script to append\r\n                // if (this.seoInfo.HasScripts == true) {\r\n                //     this.scriptService.appendHomeScript(this._elementRef.element.nativeElement);\r\n                // }\r\n                this.homeIsInit = true;\r\n            };\r\n            ChildComponent.prototype.nullifyAllReferences = function () {\r\n                homePageInfo = null;\r\n                this.productsPageName = null;\r\n                this.promotionsPageName = null;\r\n                this.categories = null;\r\n                this.articles = null;\r\n                this.highlights = null;\r\n                this.promotions = null;\r\n                this.seoInfo = null;\r\n                this.headerData = null;\r\n                this.footerData = null;\r\n                this.sideMenuData = null;\r\n                this.sliderData = null;\r\n                this.model.CheckboxSubscribe = null;\r\n                this.model.Email = null;\r\n            };\r\n            ChildComponent.prototype.doSomething = function () {\r\n                this.nullifyAllReferences();\r\n                this.subManager.unsubscribe();\r\n                this.componentHelper.clearMemory();\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.nullifyAllReferences();\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: homePageInfo.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _g) || Object, (typeof (_h = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _h) || Object, (typeof (_j = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _j) || Object, (typeof (_k = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _k) || Object, (typeof (_l = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _l) || Object, (typeof (_m = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _m) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    HomeComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object, Object])\r\n    ], HomeComponent);\r\n    return HomeComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.HomeComponent = HomeComponent;\r\n\n\n/***/ }),\n\n/***/ 377:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar dom_adapter_1 = __webpack_require__(32);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_content_service_1 = __webpack_require__(413);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cms_menu_list_service_1 = __webpack_require__(414);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar CmsPageComponent = (function () {\r\n    function CmsPageComponent(_compiler, componentHelper, _elementRef, cmsContentService, route, languageService, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsContentService = cmsContentService;\r\n        this.route = route;\r\n        this.languageService = languageService;\r\n        this.router = router;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    CmsPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var longLangCode = this.languageService.getLongLang();\r\n        var shortLangCode = this.languageService.getShortLang();\r\n        var subParams = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            //Reading id from url\r\n            //If id is set, then the page is retrived by id, else by url\r\n            if (id !== undefined) {\r\n                var pageId_1 = '' + id;\r\n                var cmsIdSub = _this.cmsContentService.getCmsPageById(longLangCode, pageId_1).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCmsPage, pageId_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.TopImage);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(cmsIdSub);\r\n            }\r\n            else {\r\n                var url = _this.router.url;\r\n                var cmsUrlSub = _this.cmsContentService.getCmsPageByUrl(longLangCode, url).subscribe(function (result) {\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCmsPage, result.IdLevel);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.TopImage);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(cmsUrlSub);\r\n            }\r\n        });\r\n        this.subManager.add(subParams);\r\n    };\r\n    CmsPageComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CmsPageComponent.prototype.onGetPageSuccess = function (cmsResult, header) {\r\n        //Creating subcomponent whith the object get from server\r\n        var subComponent = this.createSubComponent(cmsResult, header);\r\n        //injecting created component\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    };\r\n    //Creates component to inject \r\n    CmsPageComponent.prototype.createSubComponent = function (cmsPageObj, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, document, isBrowser, _elementRef, scriptService, helperService, cmsMenuListService, languageService, routesService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.document = document;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.cmsMenuListService = cmsMenuListService;\r\n                this.languageService = languageService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this._dom = dom_adapter_1.getDOM();\r\n                this.cmspage = cmsPageObj;\r\n                this.seoInfo = cmsPageObj.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.menuItems = [];\r\n                this.headerData = header;\r\n                this.footerData = cmsPageObj.footerData;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.breadcrumbs = [];\r\n                //private breadcrumbs: Breadcrumbs[] = cmsPageObj.BreadcrumbsInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var paramPage = \"cmspage\";\r\n                //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n                this.breadcrumbs = cmsPageObj.BreadcrumbsInfo;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.isBrowser == true) {\r\n                    setTimeout(function (x) { return _this.menuItems = cmsPageObj.menuItems; }, 1);\r\n                }\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: cmsPageObj.TemplateHtml\r\n                }),\r\n                __param(1, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof cms_menu_list_service_1.CmsMenuListService !== 'undefined' && cms_menu_list_service_1.CmsMenuListService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CmsPageComponent = __decorate([\r\n        core_1.Component({\r\n            template: \"\",\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_content_service_1.CmsContentService !== 'undefined' && cms_content_service_1.CmsContentService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n    ], CmsPageComponent);\r\n    return CmsPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.CmsPageComponent = CmsPageComponent;\r\n\n\n/***/ }),\n\n/***/ 378:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar cookie_policy_service_1 = __webpack_require__(419);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CookiePolicyComponent = (function () {\r\n    function CookiePolicyComponent(_compiler, componentHelper, _elementRef, languageService, cookiePolicyService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.cookiePolicyService = cookiePolicyService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    CookiePolicyComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var cookieSub = this.cookiePolicyService.getCookiePolicyData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cookiesId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(cookieSub);\r\n    };\r\n    CookiePolicyComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CookiePolicyComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.configuration = result.ConfigurationInfo;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml,\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CookiePolicyComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof cookie_policy_service_1.CookiePolicyService !== 'undefined' && cookie_policy_service_1.CookiePolicyService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], CookiePolicyComponent);\r\n    return CookiePolicyComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.CookiePolicyComponent = CookiePolicyComponent;\r\n\n\n/***/ }),\n\n/***/ 379:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar faq_service_1 = __webpack_require__(415);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar company_service_1 = __webpack_require__(129);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar FaqComponent = (function () {\r\n    function FaqComponent(_compiler, componentHelper, _elementRef, faqlistService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.faqlistService = faqlistService;\r\n        this.languageService = languageService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    FaqComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var faqSub = this.faqlistService.getFaqData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the faq data to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.faqsId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(faqSub);\r\n    };\r\n    FaqComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    FaqComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(companyService, _elementRef, seoService, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n                this.companyService = companyService;\r\n                this._elementRef = _elementRef;\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.faqlist = result.FaqList;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n                this.pageIsInit = false;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                layoutTheme.initToggle();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(3, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    FaqComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof faq_service_1.FaqListService !== 'undefined' && faq_service_1.FaqListService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], FaqComponent);\r\n    return FaqComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.FaqComponent = FaqComponent;\r\n\n\n/***/ }),\n\n/***/ 380:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar info_request_service_1 = __webpack_require__(416);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar info_request_1 = __webpack_require__(619);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar InfoRequestComponent = (function () {\r\n    function InfoRequestComponent(_compiler, componentHelper, _elementRef, languageService, infoRequestService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.infoRequestService = infoRequestService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    InfoRequestComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var templateHtml;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var infoSub = this.infoRequestService.getInfoRequestData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //templateHtml = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.infoRequestId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(infoSub);\r\n    };\r\n    InfoRequestComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    InfoRequestComponent.prototype.createSubComponent = function (componentInfo, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(infoRequestService, seoService, router, _elementRef, scriptService, isBrowser, routesService, breadcrumbsService) {\r\n                this.infoRequestService = infoRequestService;\r\n                this.seoService = seoService;\r\n                this.router = router;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.company = componentInfo.Company;\r\n                this.pageIsInit = false;\r\n                this.spinnerContact = false;\r\n                this.breadcrumbs = componentInfo.BreadcrumbsInfo;\r\n                this.footerData = componentInfo.footerData;\r\n                this.headerData = header;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.seoInfo = componentInfo.SeoInformation;\r\n            }\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerContact = true;\r\n                if (form.valid) {\r\n                    var infoSub = this.infoRequestService.sendInfoRequest(this.model).subscribe(function (result) {\r\n                        if (result) {\r\n                            _this.infoRequestSuccess = true;\r\n                            _this.infoRequestFailed = false;\r\n                            _this.spinnerContact = false;\r\n                        }\r\n                        else {\r\n                            _this.infoRequestFailed = true;\r\n                            _this.infoRequestSuccess = false;\r\n                            _this.spinnerContact = false;\r\n                        }\r\n                    });\r\n                    this.subManager.add(infoSub);\r\n                }\r\n                else {\r\n                    this.infoRequestFailed = true;\r\n                    this.infoRequestSuccess = false;\r\n                    this.spinnerContact = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.model = new info_request_1.InfoRequest();\r\n                this.model.Where = \"motoriDiRicerca\";\r\n                this.configuration = componentInfo.ConfigurationInfo;\r\n            };\r\n            ChildComponent.prototype.initMap = function () {\r\n                if (google == undefined || google == null || !google) {\r\n                    this.initMap();\r\n                }\r\n                else {\r\n                    var geocoder = new google.maps.Geocoder();\r\n                    var street = this.company.StreetAddress.replace(\",\", \"\");\r\n                    var address = street + \" - \" + this.company.PostalCode + \", \" + this.company.City + \" (\" + this.company.Province + \")\";\r\n                    var htmlCode = \"<strong>\" + this.company.Name + \"</strong><br>\" + address + \"<br> <strong>Telefono:</strong> \" + this.company.Phone;\r\n                    geocoder.geocode({ 'address': address }, function (results, status) {\r\n                        var initLongitude = results[0].geometry.location.lng();\r\n                        var initLatitude = results[0].geometry.location.lat();\r\n                        var mapMarkers = [{\r\n                                address: address,\r\n                                html: htmlCode,\r\n                                icon: {\r\n                                    image: \"/global_app/writefolder/img/pin.png\",\r\n                                    iconsize: [100, 100],\r\n                                    iconanchor: [50, 100]\r\n                                },\r\n                                popup: true\r\n                            }];\r\n                        // Map Initial Location\r\n                        // Map Extended Settings\r\n                        var mapSettings = {\r\n                            controls: {\r\n                                draggable: true,\r\n                                panControl: true,\r\n                                zoomControl: true,\r\n                                mapTypeControl: true,\r\n                                scaleControl: true,\r\n                                streetViewControl: true,\r\n                                overviewMapControl: true\r\n                            },\r\n                            scrollwheel: false,\r\n                            markers: mapMarkers,\r\n                            latitude: initLatitude,\r\n                            longitude: initLongitude,\r\n                            zoom: 18\r\n                        };\r\n                        var map = $(\"#map\").gMap(mapSettings);\r\n                        // Map Center At\r\n                        var mapCenterAt = function (options, e) {\r\n                            e.preventDefault();\r\n                            $(\"#map\").gMap(\"centerAt\", options);\r\n                        };\r\n                    });\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //this.initMap();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: componentInfo.TemplateHtml\r\n                }),\r\n                __param(5, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof info_request_service_1.InfoRequestService !== 'undefined' && info_request_service_1.InfoRequestService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    InfoRequestComponent = __decorate([\r\n        core_1.Component({\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof info_request_service_1.InfoRequestService !== 'undefined' && info_request_service_1.InfoRequestService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], InfoRequestComponent);\r\n    return InfoRequestComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.InfoRequestComponent = InfoRequestComponent;\r\n\n\n/***/ }),\n\n/***/ 381:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NewsletterConfirmationPageComponent = (function () {\r\n    function NewsletterConfirmationPageComponent(_compiler, componentHelper, _elementRef, languageService, newsletterService, isBrowser, seo, renderer, cmsComponentService, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.newsletterService = newsletterService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    NewsletterConfirmationPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var templateHtml;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var newsConfirmSub = this.newsletterService.getNewsletterConfirmationPageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.subscriptionConfirmationId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(newsConfirmSub);\r\n    };\r\n    NewsletterConfirmationPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    NewsletterConfirmationPageComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, newsletterService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.newsletterService = newsletterService;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.headerData = header;\r\n                //newsletter subscription\r\n                this.newsletterSubmitted = false;\r\n                this.privacySubmitted = false;\r\n                this.alreadySubscribed = false;\r\n                this.successfullySubscribed = false;\r\n                this.spinnerNewslatter = false;\r\n                this.model = {\r\n                    Email: \"\",\r\n                    CheckboxSubscribe: false\r\n                };\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _f) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    NewsletterConfirmationPageComponent = __decorate([\r\n        core_1.Component({\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], NewsletterConfirmationPageComponent);\r\n    return NewsletterConfirmationPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.NewsletterConfirmationPageComponent = NewsletterConfirmationPageComponent;\r\n\n\n/***/ }),\n\n/***/ 382:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NewsletterPageComponent = (function () {\r\n    function NewsletterPageComponent(_compiler, componentHelper, _elementRef, languageService, newsletterService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.newsletterService = newsletterService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    NewsletterPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var templateHtml;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var newsPageSub = this.newsletterService.getNewsletterPageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.subscriptionId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(newsPageSub);\r\n    };\r\n    NewsletterPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    NewsletterPageComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, newsletterService, router) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.newsletterService = newsletterService;\r\n                this.router = router;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.headerData = header;\r\n                //newsletter subscription\r\n                this.newsletterSubmitted = false;\r\n                this.privacySubmitted = false;\r\n                this.alreadySubscribed = false;\r\n                this.successfullySubscribed = false;\r\n                this.spinnerNewslatter = false;\r\n                this.model = {\r\n                    Email: \"\",\r\n                    CheckboxSubscribe: false\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerNewslatter = true;\r\n                if (form) {\r\n                    var newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n                        if (result == \"-1\") {\r\n                            _this.alreadySubscribed = true;\r\n                            _this.successfullySubscribed = false;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                        else {\r\n                            var newsletterCompletePage = _this.routesService.getRoutePath('NEWSLETTER - CONFIRMATION')[0];\r\n                            _this.router.navigate([newsletterCompletePage]);\r\n                            _this.alreadySubscribed = false;\r\n                            _this.successfullySubscribed = true;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                    }, function (err) {\r\n                        console.log(err);\r\n                    });\r\n                    this.subManager.add(newsSub);\r\n                }\r\n                else {\r\n                    this.spinnerNewslatter = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    NewsletterPageComponent = __decorate([\r\n        core_1.Component({\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], NewsletterPageComponent);\r\n    return NewsletterPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.NewsletterPageComponent = NewsletterPageComponent;\r\n\n\n/***/ }),\n\n/***/ 383:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar privacy_policy_service_1 = __webpack_require__(421);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PrivacyPolicyComponent = (function () {\r\n    function PrivacyPolicyComponent(_compiler, componentHelper, _elementRef, languageService, privacyPolicyService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.privacyPolicyService = privacyPolicyService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PrivacyPolicyComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var privacySub = this.privacyPolicyService.getPrivacyPolicyData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result information  to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.privacyPolicyId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(privacySub);\r\n    };\r\n    PrivacyPolicyComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    PrivacyPolicyComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.configuration = result.ConfigurationInfo;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PrivacyPolicyComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof privacy_policy_service_1.PrivacyPolicyService !== 'undefined' && privacy_policy_service_1.PrivacyPolicyService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PrivacyPolicyComponent);\r\n    return PrivacyPolicyComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PrivacyPolicyComponent = PrivacyPolicyComponent;\r\n\n\n/***/ }),\n\n/***/ 384:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar purchase_condition_service_1 = __webpack_require__(422);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PurchaseConditionComponent = (function () {\r\n    function PurchaseConditionComponent(_compiler, componentHelper, _elementRef, languageService, purchaseConditionService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.purchaseConditionService = purchaseConditionService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PurchaseConditionComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var templateHtml;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var conditionSub = this.purchaseConditionService.getPurchaseConditionServiceData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.purchaseConditionsId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(conditionSub);\r\n    };\r\n    PurchaseConditionComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    PurchaseConditionComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.configuration = result.ConfigurationInfo;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PurchaseConditionComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof purchase_condition_service_1.PurchaseConditionService !== 'undefined' && purchase_condition_service_1.PurchaseConditionService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PurchaseConditionComponent);\r\n    return PurchaseConditionComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PurchaseConditionComponent = PurchaseConditionComponent;\r\n\n\n/***/ }),\n\n/***/ 385:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//System\r\nvar mapping_1 = __webpack_require__(10);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar company_service_1 = __webpack_require__(129);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(14);\r\n//Models\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartEmptyPageComponent = (function () {\r\n    function CartEmptyPageComponent(_compiler, componentHelper, _elementRef, cartService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cartService = cartService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    CartEmptyPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var emptyCartSub = this.cartService.getEmptyCartPageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                var EmptyCartData = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(EmptyCartData, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cartEmptyId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(emptyCartSub);\r\n    };\r\n    CartEmptyPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CartEmptyPageComponent.prototype.createSubComponent = function (EmptyCartData, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(companyService, mappings, _elementRef, routesService, scriptService, isBrowser, breadcrumbsService, seoService) {\r\n                this.companyService = companyService;\r\n                this.mappings = mappings;\r\n                this._elementRef = _elementRef;\r\n                this.routesService = routesService;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.seoService = seoService;\r\n                this.userLoginImg = this.mappings.UserLoginImg_Url;\r\n                this.pageIsInit = false;\r\n                this.seoInfo = EmptyCartData.SeoInformation;\r\n                this.breadcrumbs = EmptyCartData.BreadcrumbsInfo;\r\n                this.footerData = EmptyCartData.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: EmptyCartData.TemplateHtml\r\n                }),\r\n                __param(5, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CartEmptyPageComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n    ], CartEmptyPageComponent);\r\n    return CartEmptyPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.CartEmptyPageComponent = CartEmptyPageComponent;\r\n\n\n/***/ }),\n\n/***/ 386:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NotFoundPageComponent = (function () {\r\n    function NotFoundPageComponent(_compiler, componentHelper, _elementRef, templateService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    NotFoundPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var notFoundSub = this.templateService.getComponentTemplatePageNotFound(\"notfoundPageTemplate\").subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        }, \r\n        //setting 404 page status code\r\n        function (err) {\r\n            if (!_this.isBrowser)\r\n                return;\r\n            //converting response to json\r\n            var response = err.json();\r\n            //Creating subcomponent whith the selected template to inject                \r\n            var subComponent = _this.createSubComponent(response.TemplateHtml, header);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(notFoundSub);\r\n    };\r\n    NotFoundPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    NotFoundPageComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(isBrowser, routesService) {\r\n                this.isBrowser = isBrowser;\r\n                this.routesService = routesService;\r\n                this.pageIsInit = false;\r\n                this.headerClass = false;\r\n                this.footerData = result.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n            };\r\n            ChildComponent.prototype.setAutoHeightAndWeightToLogo = function () {\r\n                this.headerClass = $(\"div\").hasClass(\"header-logo\");\r\n                if (this.headerClass == false) {\r\n                }\r\n                else {\r\n                    $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n                    $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.setAutoHeightAndWeightToLogo();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result\r\n                }),\r\n                __param(0, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [Boolean, (typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    NotFoundPageComponent = __decorate([\r\n        core_1.Component({\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object])\r\n    ], NotFoundPageComponent);\r\n    return NotFoundPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.NotFoundPageComponent = NotFoundPageComponent;\r\n\n\n/***/ }),\n\n/***/ 387:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar OfflinePageComponent = (function () {\r\n    function OfflinePageComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    OfflinePageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var offlinePageData;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var offlineSub = this.cmsComponentService.getOfflinePageData().subscribe(function (result) {\r\n            offlinePageData = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(offlinePageData, header);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(offlineSub);\r\n    };\r\n    OfflinePageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    OfflinePageComponent.prototype.createSubComponent = function (pageData, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(translateService, routesService, isBrowser) {\r\n                this.translateService = translateService;\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this.company = pageData.Company;\r\n                this.pageIsInit = false;\r\n                this.OfflineMessage = pageData.OfflineMessage;\r\n                this.footerData = pageData.footerData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: pageData.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object, Boolean])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    OfflinePageComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')),\r\n        __param(7, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Object])\r\n    ], OfflinePageComponent);\r\n    return OfflinePageComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.OfflinePageComponent = OfflinePageComponent;\r\n\n\n/***/ }),\n\n/***/ 388:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar router_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar messages_service_1 = __webpack_require__(130);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ClientAreaOrderListComponent = (function () {\r\n    function ClientAreaOrderListComponent(_compiler, componentHelper, _elementRef, templateService, authService, router, clientAreaService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.authService = authService;\r\n        this.router = router;\r\n        this.clientAreaService = clientAreaService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaOrderListComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        else {\r\n            var ClientAreaOrderListTemplate_1;\r\n            var userId = this.authService.GetUserId();\r\n            var showAll = \"-1\";\r\n            var registrationConfirmation = void 0;\r\n            var header_1;\r\n            var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header_1 = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header_1.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n            var orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, showAll, showAll, showAll, showAll).subscribe(function (result) {\r\n                ClientAreaOrderListTemplate_1 = result;\r\n                // Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(ClientAreaOrderListTemplate_1, header_1);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            });\r\n            this.subManager.add(orderListSub);\r\n        }\r\n    };\r\n    ClientAreaOrderListComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ClientAreaOrderListComponent.prototype.createSubComponent = function (ClientAreaOrderListTemplate, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(cookie, clientAreaService, router, authService, routesService, apiService, messagesService, mappings, cartService, currency, languageService, translateService, bootboxService, isBrowser, seoService, breadcrumbsService, scriptService) {\r\n                this.cookie = cookie;\r\n                this.clientAreaService = clientAreaService;\r\n                this.router = router;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.apiService = apiService;\r\n                this.messagesService = messagesService;\r\n                this.mappings = mappings;\r\n                this.cartService = cartService;\r\n                this.currency = currency;\r\n                this.languageService = languageService;\r\n                this.translateService = translateService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.scriptService = scriptService;\r\n                this.pageIsInit = false;\r\n                this.rows = [];\r\n                this.rowsRiorder = [];\r\n                this.columns = [];\r\n                this.status = \"0\";\r\n                this.orderNumber = \"\";\r\n                this.lang = this.languageService.getLongLang();\r\n                this.shortLang = this.languageService.getShortLang();\r\n                this.modalTitle = \"MESSAGES:\";\r\n                this.modalBody = \"\";\r\n                this.numberOfMessages = 0;\r\n                this.bodyMod = [];\r\n                this.isSettedFilter = false;\r\n                this.load = true;\r\n                this.loadReorder = true;\r\n                //checking if invoices and multiple shipment modules are active\r\n                this.multipleShipmentActive = ClientAreaOrderListTemplate.isActiveMultipleShipment;\r\n                this.breadcrumbs = ClientAreaOrderListTemplate.BreadcrumbsInfo;\r\n                //Routes for menu-tabs\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.isActiveInvoicesModule = ClientAreaOrderListTemplate.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = ClientAreaOrderListTemplate.isCatalogPrivateActive;\r\n                this.isRiordinaActive = ClientAreaOrderListTemplate.isRiordinaActive;\r\n                this.italianLang = {\r\n                    \"sProcessing\": \"Attendere...\",\r\n                    \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n                    \"sZeroRecords\": \"Niente trovato\",\r\n                    \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n                    \"sInfoEmpty\": \"Non ci sono record\",\r\n                    \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n                    \"sInfoPostFix\": \"\",\r\n                    \"sUrl\": \"\",\r\n                    \"oPaginate\": {\r\n                        \"sPrevious\": \"«\",\r\n                        \"sNext\": \"»\"\r\n                    }\r\n                };\r\n                this.englishLang = {\r\n                    \"oPaginate\": {\r\n                        \"sPrevious\": \"«\",\r\n                        \"sNext\": \"»\"\r\n                    }\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.footerData = ClientAreaOrderListTemplate.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            //translating of header columns titles\r\n            ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n                var translation = this.translateService.get(columnTitle)[\"value\"];\r\n                return translation;\r\n            };\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.multipleShipmentActive == false && this.isRiordinaActive == false) {\r\n                    this.columns = [\r\n                        { title: '' },\r\n                        { title: this.translateTableColumnTitle(\"Jobname\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n                        { title: this.translateTableColumnTitle(\"PriceTotalCell\") },\r\n                        { title: this.translateTableColumnTitle(\"Status\") },\r\n                        { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n                        { title: this.translateTableColumnTitle(\"Payment\") },\r\n                        { title: this.translateTableColumnTitle(\"Shipment\") },\r\n                        { title: '' },\r\n                        { title: '' },\r\n                    ];\r\n                }\r\n                else if (this.isRiordinaActive == false) {\r\n                    this.columns = [\r\n                        { title: '' },\r\n                        { title: this.translateTableColumnTitle(\"Jobname\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n                        { title: this.translateTableColumnTitle(\"PriceTotalCell\") },\r\n                        { title: this.translateTableColumnTitle(\"Status\") },\r\n                        { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n                        { title: this.translateTableColumnTitle(\"Payment\") },\r\n                        { title: '' },\r\n                        { title: '' },\r\n                    ];\r\n                }\r\n                else {\r\n                    this.columns = [\r\n                        { title: '' },\r\n                        { title: this.translateTableColumnTitle(\"Jobname\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n                        { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n                        { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n                        { title: this.translateTableColumnTitle(\"Status\") },\r\n                        { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n                        { title: this.translateTableColumnTitle(\"Payment\") },\r\n                        { title: '' },\r\n                        { title: '' },\r\n                        { title: '' },\r\n                    ];\r\n                }\r\n                //getting of Datatable data\r\n                this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n                this.load = false;\r\n                this.loadReorder = false;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                if (this.shortLang == 'en') {\r\n                    this.currentLang = this.englishLang;\r\n                }\r\n                else {\r\n                    this.currentLang = this.italianLang;\r\n                }\r\n                //initialization of datatable\r\n                $('#datatable').DataTable({\r\n                    searching: false,\r\n                    ordering: false,\r\n                    sDom: 'Rlfrtlip',\r\n                    oLanguage: this.currentLang\r\n                });\r\n                //hiding of first 'per page' section, because we added it on the bottom of the table\r\n                $('.dataTables_length').not(':eq(1)').hide();\r\n                //initialization of datetime picker from and to\r\n                $('#fromDate').datetimepicker({\r\n                    locale: this.shortLang,\r\n                    format: 'DD/MM/YYYY'\r\n                });\r\n                $('#toDate').datetimepicker({\r\n                    locale: this.shortLang,\r\n                    useCurrent: false,\r\n                    format: 'DD/MM/YYYY'\r\n                });\r\n                $(\"#fromDate\").on(\"dp.change\", function (e) {\r\n                    $('#toDate').data(\"DateTimePicker\").minDate(e.date);\r\n                });\r\n                $(\"#toDate\").on(\"dp.change\", function (e) {\r\n                    $('#fromDate').data(\"DateTimePicker\").maxDate(e.date);\r\n                });\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.onClick = function (indexRow, columnName) {\r\n                var indexColumn;\r\n                var orderId = this.rows[indexRow].OrderId;\r\n                if (columnName == undefined) {\r\n                    var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n                    orderDetailsPage = orderDetailsPage.replace(':id', orderId.toString());\r\n                    this.router.navigate([orderDetailsPage]);\r\n                }\r\n                else if (columnName == 'Upload') {\r\n                    var loginRoute = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n                    loginRoute = loginRoute.replace(\":id\", orderId);\r\n                    loginRoute = loginRoute.replace(\":pagefrom\", \"section_upload\");\r\n                    this.router.navigate([loginRoute]);\r\n                }\r\n                else if (columnName == 'OrderNotesCell') {\r\n                    var order = this.rows[indexRow];\r\n                    //Reading only the messsages for the selected order\r\n                    this.bodyMod = order.OrderNoteList;\r\n                    this.numberOfMessages = this.bodyMod.length;\r\n                    //The modal is showed only if there are messages\r\n                    if (this.bodyMod.length > 0) {\r\n                        var userId = this.authService.GetUserId();\r\n                        var params = {\r\n                            CustomerId: userId.toString(),\r\n                            OrderId: orderId.toString(),\r\n                            Lang: this.lang\r\n                        };\r\n                        //setting messages as read\r\n                        var messReadSub = this.messagesService.setMessagesAsRead(params)\r\n                            .subscribe(function (result) { });\r\n                        this.subManager.add(messReadSub);\r\n                        this.showModal();\r\n                        //reseting of value of OrderNoteList\r\n                        order.OrderNoteList = [];\r\n                    }\r\n                }\r\n                else if (columnName == \"Reorder\") {\r\n                    var orderId_1 = this.rows[indexRow].OrderId;\r\n                    this.getRiOrdersList(orderId_1);\r\n                }\r\n            };\r\n            ChildComponent.prototype.messagesDetails = function (orderId) {\r\n                $(\"#messagesModal\").modal(\"hide\");\r\n                var id = orderId;\r\n                var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n                orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n                this.router.navigate([orderDetailsPage]);\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.showModal = function () {\r\n                $(\"#messagesModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#basic').modal('hide');\r\n                this.bodyMod = [];\r\n            };\r\n            ChildComponent.prototype.getOrdersList = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n                var _this = this;\r\n                this.load = true;\r\n                var orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, dateFrom, dateTo, orderNumber, orderStatus)\r\n                    .subscribe(function (result) {\r\n                    _this.rows = result.ClientAreaOrderList;\r\n                    _this.load = false;\r\n                    _this.resetTable(_this.rows);\r\n                });\r\n                this.subManager.add(orderListSub);\r\n            };\r\n            //destroying of current context of table and creating a new one with new data\r\n            ChildComponent.prototype.resetTable = function (tableData) {\r\n                $('#datatable').DataTable().destroy();\r\n                var currentLang = this.currentLang;\r\n                setTimeout(function () {\r\n                    $('#datatable').DataTable({\r\n                        data: this.rows,\r\n                        searching: false,\r\n                        ordering: false,\r\n                        sDom: 'Rlfrtlip',\r\n                        oLanguage: currentLang\r\n                    });\r\n                }, 0);\r\n                setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide(); }, 0);\r\n            };\r\n            ChildComponent.prototype.resetFilter = function () {\r\n                this.from = \"\";\r\n                this.to = \"\";\r\n                $('#fromDate').val(\"\");\r\n                $('#toDate').val(\"\");\r\n                this.status = \"0\";\r\n                this.orderNumber = \"\";\r\n                if (this.isSettedFilter == true) {\r\n                    this.isSettedFilter = false;\r\n                    //this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n                    var userId = this.authService.GetUserId();\r\n                    var showAll = \"-1\";\r\n                    this.getOrdersList(userId, showAll, showAll, showAll, showAll);\r\n                }\r\n            };\r\n            ChildComponent.prototype.filterOrdersList = function () {\r\n                this.isSettedFilter = true;\r\n                var orderStatus;\r\n                var numberOfOrder;\r\n                var userId = this.authService.GetUserId();\r\n                this.from = $('#fromDate').val();\r\n                this.to = $('#toDate').val();\r\n                var dateFrom = this.changeDate(this.from);\r\n                var dateTo = this.changeDate(this.to);\r\n                if (dateFrom == \"\") {\r\n                    dateFrom = \"-1\";\r\n                }\r\n                if (dateTo == \"\") {\r\n                    dateTo = \"-1\";\r\n                }\r\n                if (dateFrom == \"Invalid date\" || null) {\r\n                    dateFrom = \"-1\";\r\n                }\r\n                if (dateTo == \"Invalid date\" || null) {\r\n                    dateTo = \"-1\";\r\n                }\r\n                if (this.status == \"0\") {\r\n                    orderStatus = \"-1\";\r\n                }\r\n                else {\r\n                    orderStatus = this.status;\r\n                }\r\n                if (this.orderNumber == \"\") {\r\n                    numberOfOrder = \"-1\";\r\n                }\r\n                else {\r\n                    numberOfOrder = this.orderNumber;\r\n                }\r\n                ;\r\n                this.getOrdersList(userId, dateFrom, dateTo, numberOfOrder, orderStatus);\r\n            };\r\n            ChildComponent.prototype.changeDate = function (stringDate) {\r\n                var date = stringDate.replace(/\\//g, \"-\");\r\n                return date;\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.showModalRiordina = function (orderId) {\r\n                this.getRiOrdersList(orderId);\r\n            };\r\n            ChildComponent.prototype.hideModalRiordina = function () {\r\n                $(\"#ReorderModal\").modal(\"hide\");\r\n            };\r\n            ChildComponent.prototype.resetTableReorder = function () {\r\n                var currentLang = this.currentLang;\r\n                $(\"#ReorderModal\").modal(\"show\");\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n            };\r\n            ChildComponent.prototype.riordina = function () {\r\n                var _this = this;\r\n                //let valueReorderList: Array<{ QuantityID: number, ProductID: number, tipoCalcolo: string, DateID: number, tipoProdotto: string, CustomerID: string, CartID: string, Language: string, Currency: string }> = [];\r\n                var valueReorderList = [];\r\n                //this.cartService.setCartId(cart.CartId)\r\n                var selectedCount = $('input[name=\"selectAllItems\"]:checked').length;\r\n                var selectedCountCheck = 0;\r\n                var stringInputCheck = \"\";\r\n                if (selectedCount > 0) {\r\n                    var CustomerID = this.cartService.getCustomerId();\r\n                    var CartID = this.cartService.getCartId();\r\n                    var Language = this.cartService.getLang();\r\n                    var Currency = this.currency.getCurrency();\r\n                    $('.disableInputReorder').attr('disabled', true);\r\n                    this.loadReorder = true;\r\n                    $('input[name=\"selectAllItems\"]:checked').each(function (index, element) {\r\n                        var id = parseInt(element.id.replace(\"check_\", \"\"));\r\n                        stringInputCheck = 'input[name=\"priceresult_' + id + '\"]:checked';\r\n                        $(stringInputCheck).each(function (index, elementcheck) {\r\n                            var ProductID = parseInt($(elementcheck).attr(\"prodId\"));\r\n                            var QuantityID = parseInt($(elementcheck).attr(\"rowidcalcolo\"));\r\n                            var LavID = $(elementcheck).attr(\"rowidcalcolo\");\r\n                            var tipoCalcolo = $(elementcheck).attr(\"tipocalcolo\");\r\n                            var DateID = parseInt($(elementcheck).attr(\"idDay\"));\r\n                            var tipoProdotto = $(elementcheck).attr(\"tipoprodotto\");\r\n                            valueReorderList.push({ CartID: CartID, CustomerID: CustomerID, Language: Language, ProductID: ProductID, LavID: LavID, DateID: DateID, Currency: Currency, tipoProdotto: tipoProdotto, tipoCalcolo: tipoCalcolo });\r\n                        });\r\n                    });\r\n                    var lenghtReorderList = valueReorderList.length;\r\n                    if (lenghtReorderList > 0) {\r\n                        var riorderListSub = this.cartService.addProductRiorderToCart(valueReorderList)\r\n                            .subscribe(function (result) {\r\n                            _this.cartService.updateCart(result);\r\n                            _this.hideModalRiordina();\r\n                            $('.disableInputReorder').removeAttr('disabled');\r\n                            _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                            _this.loadReorder = false;\r\n                        }, function (err) {\r\n                            $('.disableInputReorder').removeAttr('disabled');\r\n                            _this.bootboxService.i18nAlert(\"errorMex\");\r\n                            _this.loadReorder = false;\r\n                        });\r\n                        this.subManager.add(riorderListSub);\r\n                    }\r\n                    else {\r\n                        this.bootboxService.alertForRiorderFail(\"reorder_seleziona_almeno_una_qta\");\r\n                        $('.disableInputReorder').removeAttr('disabled');\r\n                        this.loadReorder = false;\r\n                    }\r\n                }\r\n                else {\r\n                    this.bootboxService.alertForRiorderFail(\"reorder_seleziona_almeno_una_riga\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.getRiOrdersList = function (orderId) {\r\n                var _this = this;\r\n                this.loadReorder = true;\r\n                var riorderListSub = this.clientAreaService.getClientAreaRiorderList(orderId)\r\n                    .subscribe(function (result) {\r\n                    _this.rowsRiorder = result;\r\n                    _this.loadReorder = false;\r\n                    //initialization of datatable\r\n                    _this.resetTableReorder();\r\n                });\r\n                this.subManager.add(riorderListSub);\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translateService.get(label, this.translateService).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.calculatePrice = function (idRow, index) {\r\n                var _this = this;\r\n                var qta = $('#riga_' + idRow).val();\r\n                var riga = this.rowsRiorder[index];\r\n                if (riga != null && qta > 0) {\r\n                    this.loadReorder = true;\r\n                    $('.disableInputReorder').attr('disabled', true);\r\n                    var newQta = \"&NumCopie=\" + qta + \"&\";\r\n                    var newQtaOther = \"&str_qt=\" + qta + \"&\";\r\n                    var OldQta = \"&NumCopie=\" + riga.Quantity + \"&\";\r\n                    var OldQtaOther = \"&str_qt=\" + riga.Quantity + \"&\";\r\n                    var queryLavorazione2 = riga.LavorazioneQuery.replace(OldQta, newQta);\r\n                    var queryLavorazione3 = queryLavorazione2.replace(OldQtaOther, newQtaOther);\r\n                    var substring = queryLavorazione3.indexOf(\"&Datetime\");\r\n                    var queryLavorazione = queryLavorazione3.slice(0, substring);\r\n                    queryLavorazione += \"&orderid=\" + riga.OrderId;\r\n                    queryLavorazione += \"&orderlavid=\" + riga.IdRow;\r\n                    if (queryLavorazione.indexOf(\"sezione=\") != -1) {\r\n                        var riorderListSub = this.clientAreaService.CalculatePriceRiorder(queryLavorazione, riga.ProdId)\r\n                            .subscribe(function (result) {\r\n                            //console.log(result)\r\n                            switch (result.resultType) {\r\n                                case \"calcolato_wizard_scontistica\":\r\n                                    _this.showPriceCalcolatoScontistica(idRow, result.TablePriceList, result.resultType, riga.ProdId, result.RowId, riga.TipoProdotto);\r\n                                    break;\r\n                                case \"calcolato_wizard\":\r\n                                case \"calcolato_wizard_altro_prodotto\":\r\n                                    _this.showPriceCalcolato(idRow, result, result.resultType, riga.ProdId, result.RowId);\r\n                                    break;\r\n                            }\r\n                            //this.rowsRiorder = result;\r\n                            _this.loadReorder = false;\r\n                        });\r\n                        this.subManager.add(riorderListSub);\r\n                        var getRiorderCart = this.cartService.getRiorderCart()\r\n                            .subscribe(function (cart) {\r\n                            var cartIdOld = _this.cartService.getCartId();\r\n                            if (cartIdOld == \"0\") {\r\n                                _this.cartService.setCartId(cart.CartID);\r\n                            }\r\n                        });\r\n                        this.subManager.add(getRiorderCart);\r\n                    }\r\n                }\r\n                else {\r\n                    $('#Prezzo_' + idRow).html(\"\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.showPriceCalcolatoScontistica = function (idRow, result, type, prodId, rowIdCalcolo, rowTipoProdotto) {\r\n                $('#Prezzo_' + idRow).html(\"\");\r\n                var html = \"\";\r\n                var resultFiltered = result.filter(function (x) { return x.Price != -1; });\r\n                var lenghtRes = resultFiltered.length - 1;\r\n                resultFiltered.forEach(function (price, index) {\r\n                    if (price.Price != -1) {\r\n                        html += \"<div>\";\r\n                        if (lenghtRes == index) {\r\n                            html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\" value=\\\"0\\\"  tipoprodotto=\\\"\" + rowTipoProdotto + \"\\\" tipocalcolo=\\\"\" + type + \"\\\"  prodId=\\\"\" + prodId + \"\\\" rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\"  idDay=\\\"\" + price.QuantityId + \"\\\" required checked>\";\r\n                        }\r\n                        else {\r\n                            html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\" value=\\\"0\\\"  tipoprodotto=\\\"\" + rowTipoProdotto + \"\\\" tipocalcolo=\\\"\" + type + \"\\\"  rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\" prodId=\\\"\" + prodId + \"\\\" idDay=\\\"\" + price.QuantityId + \"\\\" required>\";\r\n                        }\r\n                        html += \"<label class=\\\"riordinaLabel\\\" for=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\">\" + price.DayName + \" \" + price.DayNumber + \" - \" + price.Currency + \" \" + price.StrPrice + \"</label>\";\r\n                        html += \"</div>\";\r\n                    }\r\n                });\r\n                $('#Prezzo_' + idRow).html(html);\r\n                $('.disableInputReorder').removeAttr('disabled');\r\n            };\r\n            ChildComponent.prototype.showPriceCalcolato = function (idRow, price, type, prodId, rowIdCalcolo) {\r\n                $('#Prezzo_' + idRow).html(\"\");\r\n                var html = \"\";\r\n                html += \"<div>\";\r\n                html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"\\\" value=\\\"0\\\"  tipocalcolo=\\\"\" + type + \"\\\"  rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\" prodId=\\\"\" + prodId + \"\\\" checked required>\";\r\n                html += \"<label class=\\\"riordinaLabel\\\" for=\\\"\" + rowIdCalcolo + \"\\\">\" + price.Currency + \" \" + price.Imponibile + \"</label>\";\r\n                html += \"</div>\";\r\n                $('#Prezzo_' + idRow).html(html);\r\n                $('.disableInputReorder').removeAttr('disabled');\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            __decorate([\r\n                core_1.Input(), \r\n                __metadata('design:type', Object)\r\n            ], ChildComponent.prototype, \"clientModel\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: ClientAreaOrderListTemplate.TemplateHtml\r\n                }),\r\n                __param(0, core_1.Inject('CookieService')),\r\n                __param(13, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _f) || Object, (typeof (_g = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _g) || Object, (typeof (_h = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _h) || Object, (typeof (_j = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _j) || Object, (typeof (_k = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _k) || Object, (typeof (_l = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _l) || Object, (typeof (_m = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _m) || Object, (typeof (_o = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _o) || Object, Boolean, (typeof (_p = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _p) || Object, (typeof (_q = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _q) || Object, (typeof (_r = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _r) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaOrderListComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object])\r\n    ], ClientAreaOrderListComponent);\r\n    return ClientAreaOrderListComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.ClientAreaOrderListComponent = ClientAreaOrderListComponent;\r\n\n\n/***/ }),\n\n/***/ 389:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\n//Services\r\nvar category_service_1 = __webpack_require__(262);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar CategoryComponent = (function () {\r\n    function CategoryComponent(_compiler, _elementRef, componentHelper, categoryService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this._elementRef = _elementRef;\r\n        this.componentHelper = componentHelper;\r\n        this.categoryService = categoryService;\r\n        this.languageService = languageService;\r\n        this.route = route;\r\n        this.router = router;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.category = new inventory_1.Category();\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    CategoryComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var lang = this.languageService.getLongLang();\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //Reading id from url\r\n        //If id is set, then the information is retrived by id, else by url\r\n        var paramSub = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            if (id !== undefined) {\r\n                var categoryId_1 = id;\r\n                var catIdSub = _this.categoryService.getCategory(categoryId_1, lang).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetCategorySuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogCategory, categoryId_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(catIdSub);\r\n            }\r\n            else {\r\n                var seoUrl = _this.router.url;\r\n                var catUrlSub = _this.categoryService.getCategoryByUrl(lang, seoUrl).subscribe(function (result) {\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetCategorySuccess(result, header);\r\n                    }\r\n                    else {\r\n                        if (result.SeoInformation) {\r\n                            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                        }\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogCategory, result.Id);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(catUrlSub);\r\n            }\r\n        });\r\n        this.subManager.add(paramSub);\r\n    };\r\n    CategoryComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CategoryComponent.prototype.onGetCategorySuccess = function (categoryResult, header) {\r\n        if (categoryResult.Active != true) {\r\n            //Creating sub-component with the returned information\r\n            var subComponent = this.createSubComponentRedirect();\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            //Creating sub-component with the returned information\r\n            var subComponent = this.createSubComponent(categoryResult, header);\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    };\r\n    CategoryComponent.prototype.createSubComponentRedirect = function () {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, routesService) {\r\n                this.router = router;\r\n                this.routesService = routesService;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n                this.router.navigate(notFoundPage);\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: \"\"\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CategoryComponent.prototype.createSubComponent = function (categoryObj, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, cartService, bootboxService, routesService, isBrowser, scriptService, _elementRef, helperService, currency, categoryService, languageService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this._elementRef = _elementRef;\r\n                this.helperService = helperService;\r\n                this.currency = currency;\r\n                this.categoryService = categoryService;\r\n                this.languageService = languageService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.category = categoryObj;\r\n                this.categories = categoryObj.SubCategories;\r\n                this.products = categoryObj.SubProducts;\r\n                this.prodottiCorrelati = categoryObj.ProductCorrelati;\r\n                this.showProdottiCorrelati = false;\r\n                this.headerData = header;\r\n                this.footerData = categoryObj.footerData;\r\n                this.loginPageName = [];\r\n                this.registerPageName = [];\r\n                this.pageIsInit = false;\r\n                this.seoInfo = categoryObj.SeoInformation;\r\n                this.spinnerForm = false;\r\n                this.contactFormSent = false;\r\n                this.contactFormFailed = false;\r\n                this.showSpinner = true;\r\n                this.showTable = true;\r\n                this.model = {\r\n                    Company: \"\",\r\n                    Name: \"\",\r\n                    Lastname: \"\",\r\n                    Email: \"\",\r\n                    Amount: \"\",\r\n                    Mobile: \"\",\r\n                    Message: \"\",\r\n                    Lang: \"\",\r\n                    options: 0\r\n                };\r\n                this.lang = this.languageService.getLongLang();\r\n                this.breadcrumbs = [];\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n                this.breadcrumbs = categoryObj.BreadcrumbsInfo;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n                if (this.prodottiCorrelati.length > 0) {\r\n                    this.showProdottiCorrelati = true;\r\n                }\r\n                this.configuration = categoryObj.Configuration;\r\n                if (this.isBrowser == true) {\r\n                    //if type of category is matrix, get prices\r\n                    if (categoryObj.TipoVisualizzazione == \"matrice\") {\r\n                        var catPriceSub = this.categoryService.getCategoryPriceData(categoryObj.Id)\r\n                            .subscribe(function (result) {\r\n                            _this.category.PriceData = result;\r\n                            _this.showSpinner = false;\r\n                        });\r\n                        this.subManager.add(catPriceSub);\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.contactFormSent = false;\r\n                this.contactFormFailed = false;\r\n                this.spinnerForm = true;\r\n                this.model.Lang = this.languageService.getLongLang();\r\n                if (form.valid && this.model.options == 1) {\r\n                    this.model.Amount = this.model.Amount.toString();\r\n                    var catInfoSub = this.categoryService.getCategoryInfo(this.model)\r\n                        .subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.spinnerForm = false;\r\n                            _this.contactFormSent = true;\r\n                        }\r\n                        else {\r\n                            _this.spinnerForm = false;\r\n                            _this.contactFormFailed = true;\r\n                        }\r\n                    });\r\n                    this.subManager.add(catInfoSub);\r\n                }\r\n                else {\r\n                    this.spinnerForm = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showedFileBoxWizard = function () {\r\n                var result = true;\r\n                if (this.category.IdWizardMaster <= 0) {\r\n                    result = false;\r\n                }\r\n                else {\r\n                    if (this.category.ManageAttachmentWizard == \"Combinazioni\") {\r\n                        result = false;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addMatrixCommercialeProductToCart = function (productId, quantityId, IsHour) {\r\n                var _this = this;\r\n                var addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\", IsHour).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(addToCartSub);\r\n            };\r\n            ChildComponent.prototype.addMatrixEditoriaProductToCart = function (productId, quantityId, IsHour) {\r\n                var _this = this;\r\n                var addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\", IsHour).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(addMatEdToCartSub);\r\n            };\r\n            ChildComponent.prototype.addMatrixProductToCart = function (productId, quantityId, IsHour) {\r\n                var _this = this;\r\n                var addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\", IsHour).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(addMatToCartSub);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initLightbox();\r\n                setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n                    $('#containerVideo').html(this.seoInfo.H3);\r\n                }\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: categoryObj.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _f) || Object, (typeof (_g = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _g) || Object, (typeof (_h = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _h) || Object, (typeof (_j = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CategoryComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n    ], CategoryComponent);\r\n    return CategoryComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.CategoryComponent = CategoryComponent;\r\n\n\n/***/ }),\n\n/***/ 390:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar product_service_1 = __webpack_require__(132);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar OtherProductComponent = (function () {\r\n    function OtherProductComponent(_compiler, componentHelper, _elementRef, productService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.productService = productService;\r\n        this.languageService = languageService;\r\n        this.route = route;\r\n        this.router = router;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.product = new inventory_1.Product();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    OtherProductComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var lang = this.languageService.getLongLang();\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //Reading id from url\r\n        //If id is set, then the information is retrived by id, else by url\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            if (id !== undefined) {\r\n                var productId_1 = id;\r\n                var productByIdSub = _this.productService.getProductDetails(productId_1, \"altroProdotto\", lang).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetProductSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogOtherProduct, productId_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(productByIdSub);\r\n            }\r\n            else {\r\n                var url = _this.router.url;\r\n                var productByUrlSub = _this.productService.getProductDetailsBySeoUrl(lang, url).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetProductSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogOtherProduct, result.Id);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(productByUrlSub);\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n    };\r\n    OtherProductComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    OtherProductComponent.prototype.onGetProductSuccess = function (productResult, header) {\r\n        if (productResult.Active != true) {\r\n            //Creating sub-component with the returned information\r\n            var subComponent = this.createSubComponentRedirect();\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            var subComponent = this.createSubComponent(productResult, header);\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    };\r\n    OtherProductComponent.prototype.createSubComponentRedirect = function () {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, routesService) {\r\n                this.router = router;\r\n                this.routesService = routesService;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n                this.router.navigate(notFoundPage);\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: \"\"\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    OtherProductComponent.prototype.createSubComponent = function (otherproductObj, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, routesService, isBrowser, _elementRef, scriptService, currency, helperService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.currency = currency;\r\n                this.helperService = helperService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.product = otherproductObj;\r\n                this.seoInfo = otherproductObj.SeoInformation;\r\n                this.loginPageName = [];\r\n                this.registerPageName = [];\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = [];\r\n                this.prodottiCorrelati = otherproductObj.ProductCorrelati;\r\n                this.showProdottiCorrelati = false;\r\n                this.footerData = otherproductObj.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n                this.breadcrumbs = otherproductObj.BreadcrumbsInfo;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.prodottiCorrelati.length > 0) {\r\n                    this.showProdottiCorrelati = true;\r\n                }\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.shareOnFacebook = function () {\r\n                window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n            };\r\n            ChildComponent.prototype.shareOnTwitter = function () {\r\n                window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n            };\r\n            ChildComponent.prototype.showedFileBox = function () {\r\n                var result = true;\r\n                if (this.product.ManageAttachment == \"Combinazioni\") {\r\n                    result = false;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initLightbox();\r\n                setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n                if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n                    $('#containerVideo').html(this.seoInfo.H3);\r\n                }\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: otherproductObj.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    OtherProductComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n    ], OtherProductComponent);\r\n    return OtherProductComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.OtherProductComponent = OtherProductComponent;\r\n\n\n/***/ }),\n\n/***/ 391:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar core_1 = __webpack_require__(0);\r\n//Angular\r\nvar core_2 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar product_service_1 = __webpack_require__(132);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ProductDetailsComponent = (function () {\r\n    function ProductDetailsComponent(_elementRef, _compiler, componentHelper, productService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._elementRef = _elementRef;\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this.productService = productService;\r\n        this.languageService = languageService;\r\n        this.route = route;\r\n        this.router = router;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.product = new inventory_1.Product();\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    ProductDetailsComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Reading Language information\r\n        var lang = this.languageService.getLongLang();\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //Reading id from url\r\n        //If id is set, then the information is retrived by id, else by url\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            var id = params['id'];\r\n            if (id !== undefined) {\r\n                var productId_1 = id;\r\n                var prodByIdSub = _this.productService.getProductDetails(productId_1, \"prodotti\", lang).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetProductSuccess(result, id, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogProduct, productId_1);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(prodByIdSub);\r\n            }\r\n            else {\r\n                var seoUrl = _this.router.url;\r\n                var prodByUrlSub = _this.productService.getProductDetailsBySeoUrl(lang, seoUrl).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        _this.onGetProductSuccess(result, id, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogProduct, result.Id);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(prodByUrlSub);\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n    };\r\n    ProductDetailsComponent.prototype.ngOnDestroy = function () {\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ProductDetailsComponent.prototype.onGetProductSuccess = function (productDetails, productId, header) {\r\n        if (productDetails.Active != true || productDetails.isProductPrivateActiveAndShow != true) {\r\n            //Creating sub-component with the returned information\r\n            var subComponent = this.createSubComponentRedirect();\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            var subComponent = this.createSubComponent(productDetails, productId, header);\r\n            //Injecting dynamically created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    };\r\n    ProductDetailsComponent.prototype.createSubComponentRedirect = function () {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, routesService) {\r\n                this.router = router;\r\n                this.routesService = routesService;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n                this.router.navigate(notFoundPage);\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_2.Component({\r\n                    template: \"\"\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ProductDetailsComponent.prototype.createSubComponent = function (productObj, productId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, cartService, bootboxService, routesService, isBrowser, _elementRef, scriptService, currency, helperService, productService, languageService, breadcrumbsService, metaService) {\r\n                this.seoService = seoService;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.currency = currency;\r\n                this.helperService = helperService;\r\n                this.productService = productService;\r\n                this.languageService = languageService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.metaService = metaService;\r\n                this.showSpinner = true;\r\n                this.showSpinnerClick = false;\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.product = new inventory_1.Product();\r\n                this.loginPageName = [];\r\n                this.registerPageName = [];\r\n                this.facebookShareUrl = \"\";\r\n                this.pageIsInit = false;\r\n                this.seoInfo = productObj.SeoInformation;\r\n                this.breadcrumbs = [];\r\n                this.prodottiCorrelati = productObj.ProductCorrelati;\r\n                this.showProdottiCorrelati = false;\r\n                this.footerData = productObj.FooterData;\r\n                this.headerData = header;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n                this.breadcrumbs = productObj.BreadcrumbsInfo;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                var lang = this.languageService.getLongLang();\r\n                this.product = productObj;\r\n                if (this.prodottiCorrelati.length > 0) {\r\n                    this.showProdottiCorrelati = true;\r\n                }\r\n                // this.product.HeaderData = header;\r\n                if (this.isBrowser) {\r\n                    if (!this.product.IsWizard) {\r\n                        var productId_2 = this.product.Id;\r\n                        var pricesSub = this.productService.getPriceData(productId_2, lang).subscribe(function (response) {\r\n                            _this.product.PriceData = response;\r\n                            _this.showSpinner = false;\r\n                        });\r\n                        this.subManager.add(pricesSub);\r\n                    }\r\n                }\r\n                //console.log(this.product)\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n            };\r\n            ChildComponent.prototype.showedFileBox = function () {\r\n                var result = true;\r\n                if (this.product.ManageAttachment == \"Combinazioni\") {\r\n                    result = false;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.shareOnFacebook = function () {\r\n                window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n            };\r\n            ChildComponent.prototype.shareOnTwitter = function () {\r\n                window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n            };\r\n            ChildComponent.prototype.addStaticProductToCart = function (quantityId) {\r\n                var _this = this;\r\n                var productId = this.product.Id;\r\n                this.showSpinnerClick = true;\r\n                var staticProdSub = this.cartService.addStaticProductToCart(productId, quantityId, \"D\").subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.showSpinnerClick = false;\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(staticProdSub);\r\n            };\r\n            ChildComponent.prototype.addStaticProductScontisticaToCart = function (dayId, quantityId, isHour) {\r\n                var _this = this;\r\n                var productId = this.product.Id;\r\n                this.showSpinnerClick = true;\r\n                var colType = isHour == true ? \"H\" : \"D\";\r\n                var statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.showSpinnerClick = false;\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(statProdScontSub);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isPriceDiscounted = function (price, priceDiscounted) {\r\n                var priceInt = parseFloat(price);\r\n                var priceDiscountedInt = parseFloat(priceDiscounted);\r\n                var result = false;\r\n                if (priceDiscountedInt < priceInt) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initLightbox();\r\n                setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n                    $('#containerVideo').html(this.seoInfo.H3);\r\n                }\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_2.Component({\r\n                    template: productObj.TemplateHtml\r\n                }),\r\n                __param(4, core_2.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof core_2.ViewContainerRef !== 'undefined' && core_2.ViewContainerRef) === 'function' && _e) || Object, (typeof (_f = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _h) || Object, (typeof (_j = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _m) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ProductDetailsComponent = __decorate([\r\n        core_2.Component({\r\n            changeDetection: core_2.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_2.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_2.Inject('isBrowser')),\r\n        __param(11, core_2.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_2.ViewContainerRef !== 'undefined' && core_2.ViewContainerRef) === 'function' && _a) || Object, (typeof (_b = typeof core_2.Compiler !== 'undefined' && core_2.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n    ], ProductDetailsComponent);\r\n    return ProductDetailsComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ProductDetailsComponent = ProductDetailsComponent;\r\n\n\n/***/ }),\n\n/***/ 392:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar category_service_1 = __webpack_require__(262);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ProductPageListComponent = (function () {\r\n    function ProductPageListComponent(_compiler, componentHelper, _elementRef, categoryService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.categoryService = categoryService;\r\n        this.languageService = languageService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ProductPageListComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var categoriesSub = this.categoryService.getCatalogCategoriesData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the catalog catgories information to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.productsCatalogId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(categoriesSub);\r\n    };\r\n    ProductPageListComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ProductPageListComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, routesService, currency, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.routesService = routesService;\r\n                this.currency = currency;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.columns = 4;\r\n                this.pageIsInit = false;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.category == null) {\r\n                    this.items = result.CatalogCategories;\r\n                }\r\n                else {\r\n                    this.items = this.category.SubCategories;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(1, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ProductPageListComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], ProductPageListComponent);\r\n    return ProductPageListComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ProductPageListComponent = ProductPageListComponent;\r\n\n\n/***/ }),\n\n/***/ 393:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar product_service_1 = __webpack_require__(132);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar PromotionsComponent = (function () {\r\n    function PromotionsComponent(_compiler, componentHelper, _elementRef, productService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.productService = productService;\r\n        this.languageService = languageService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PromotionsComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var promotionsSub = this.productService.getProductsPromotionsData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the promotion page information to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.promotionsId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(promotionsSub);\r\n    };\r\n    PromotionsComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, currency, routesService, breadcrumbsService) {\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.helperService = helperService;\r\n                this.currency = currency;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.footerData = result.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.category == null) {\r\n                    //Reading data from server\r\n                    this.items = result.ProductPromotionList;\r\n                }\r\n                else {\r\n                    this.items = this.category.SubProducts;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.imageTitle = function (imgPath) {\r\n                var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(1, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PromotionsComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PromotionsComponent);\r\n    return PromotionsComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PromotionsComponent = PromotionsComponent;\r\n\n\n/***/ }),\n\n/***/ 394:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cart_1 = __webpack_require__(178);\r\nvar cart_2 = __webpack_require__(178);\r\nvar cart_3 = __webpack_require__(178);\r\nvar validation_service_1 = __webpack_require__(131);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartCashComponent = (function () {\r\n    function CartCashComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    CartCashComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var cmsSub = this.cmsComponentService.getShoppingCartCashData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cartCashId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(cmsSub);\r\n    };\r\n    CartCashComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CartCashComponent.prototype.createSubComponent = function (shoppingCartCashData, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, shoppingCartService, languageService, authService, clientAreaService, routesService, seoService, bootboxService, isBrowser, _elementRef, scriptService, breadcrumbsService, validationService) {\r\n                this.router = router;\r\n                this.shoppingCartService = shoppingCartService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.clientAreaService = clientAreaService;\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.validationService = validationService;\r\n                this.currentAddress = new cart_3.CartAddressModel();\r\n                this.carrello = shoppingCartCashData.ShoppingCart;\r\n                this.selectedAddress = new cart_3.CartAddressModel();\r\n                this.selectedPayment = new cart_1.CartPaymentModel();\r\n                this.selectedShipment = new cart_2.CartShipmentModel();\r\n                this.voucherCode = \"\";\r\n                this.showValidationLabels = false;\r\n                this.cartCashAccepted = false;\r\n                this.selectedTipoSpedizione = \"\";\r\n                this.lang = this.languageService.getLongLang();\r\n                this.isVoucherValid = false;\r\n                this.isVoucherInvalid = false;\r\n                this.isVoucherApplied = false;\r\n                this.disableButtonCart = false;\r\n                this.spinnerCartCash = false;\r\n                this.footerData = shoppingCartCashData.footerData;\r\n                this.headerData = header;\r\n                this.pageIsOnDestroy = false;\r\n                this.seoInfo = shoppingCartCashData.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.carrelloPageName = [];\r\n                this.userId = this.authService.GetUserId();\r\n                this.configuration = shoppingCartCashData.ConfigurationInfo;\r\n                this.breadcrumbs = shoppingCartCashData.BreadcrumbsInfo;\r\n                this.spinnerCart = false;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                //console.log(shoppingCartCashData)\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.shoppingCartService.initCart(this.carrello);\r\n                if (this.shoppingCartService.isCartValid() == false) {\r\n                    //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                    window.open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n                }\r\n                else {\r\n                    this.checkTipoSpedizione();\r\n                    //Reading selected payment method\r\n                    var payments = this.carrello.Payments;\r\n                    var count = payments.length;\r\n                    for (var i = 0; i < count; i++) {\r\n                        var payment = payments[i];\r\n                        if (payment.Selected == true) {\r\n                            this.selectedPayment = payment;\r\n                        }\r\n                    }\r\n                    //Reading selected shipment method\r\n                    var shipments = this.carrello.Shipments;\r\n                    count = shipments.length;\r\n                    for (var i = 0; i < count; i++) {\r\n                        var shipment = shipments[i];\r\n                        if (shipment.Selected == true) {\r\n                            this.selectedShipment = shipment;\r\n                        }\r\n                    }\r\n                    //Reading selected address\r\n                    var address = this.carrello.CurrentAddress;\r\n                    var completeAddress = address.Address;\r\n                    var lastIndex = completeAddress.lastIndexOf(\" \");\r\n                    var addressStreet = \"\";\r\n                    var addressNumber = \"\";\r\n                    if (lastIndex > -1) {\r\n                        addressStreet = completeAddress.slice(0, lastIndex);\r\n                        addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n                    }\r\n                    if (address != null) {\r\n                        this.currentAddress.Id = address.Id;\r\n                        this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n                        this.currentAddress.City = address.City;\r\n                        this.currentAddress.Recipient = address.Recipient;\r\n                        this.currentAddress.Province = address.Province;\r\n                        this.currentAddress.Phone = address.Phone;\r\n                        this.currentAddress.ZipCode = address.ZipCode;\r\n                        this.currentAddress.Mobile = address.Mobile;\r\n                        this.currentAddress.CustomerID = this.userId;\r\n                        this.currentAddress.Language = this.lang;\r\n                        this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n                    }\r\n                    this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkTipoSpedizione = function () {\r\n                if (this.carrello.Products.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    var tipoSped = this.carrello.Products.filter(function (item, i, arr) { return arr.findIndex(function (t) { return t.TipoTrasporto === item.TipoTrasporto; }) === i; });\r\n                    var TipoTrasportoShipmentToFilter = \"S\";\r\n                    if (tipoSped.length == 1) {\r\n                        TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                    }\r\n                    if (this.selectedTipoSpedizione == \"\") {\r\n                        this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                    }\r\n                }\r\n            };\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            ChildComponent.prototype.validatePhone = function (event) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            };\r\n            //adding all scripts and elements connected to address verification feature                \r\n            ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n                var suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n                var address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n                var jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n                $('body > universal-script').before(suggest);\r\n                $('body > universal-script').before(jquery);\r\n                $('body > universal-script').before(address);\r\n            };\r\n            //removing all scripts and elements connected to address verification feature                            \r\n            ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n                $(\"#suggestId\").remove();\r\n                $(\"#jqueryuicss\").remove();\r\n                $(\"#jqueryuijs\").remove();\r\n                $(\"#suggestcss\").remove();\r\n                $(\"#initui\").remove();\r\n                $(\"#inituicf\").remove();\r\n                $(\"#ui-id-1\").remove();\r\n                $(\"#ui-id-2\").remove();\r\n                $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n                $(\"#jqueryId\").remove();\r\n                $(\"#addressVerificationId\").remove();\r\n            };\r\n            ChildComponent.prototype.checkAddressValidation = function () {\r\n                this.currentAddress.Province = $(\"#Prov\").val();\r\n                this.currentAddress.ZipCode = $(\"#Cap\").val();\r\n                this.currentAddress.City = $(\"#City\").val();\r\n            };\r\n            ChildComponent.prototype.setAddressValue = function () {\r\n                var streetTypeId = $(\"#streetTypeId\").val();\r\n                var street = $(\"#Address\").val();\r\n                this.currentAddress.Address = street;\r\n                if (streetTypeId != null && streetTypeId != \"\") {\r\n                    if (!this.currentAddress.Address.startsWith(streetTypeId)) {\r\n                        this.currentAddress.Address = streetTypeId + \" \" + street;\r\n                    }\r\n                }\r\n                else {\r\n                    this.currentAddress.Address = street;\r\n                }\r\n            };\r\n            ChildComponent.prototype.updateCartAddress = function () {\r\n                var _this = this;\r\n                //concating address street and number\r\n                var model = this.currentAddress;\r\n                var currentStreet = model.Address;\r\n                model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n                var cartSub = this.shoppingCartService.setAddress(model).subscribe(function (result) {\r\n                    _this.shoppingCartService.updateCart(result);\r\n                    _this.carrello = _this.shoppingCartService.getCart();\r\n                    if (result == false) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    }\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(cartSub);\r\n                model.Address = currentStreet;\r\n            };\r\n            ChildComponent.prototype.changeAddress = function (addressId) {\r\n                //Reading selected address\r\n                // let addresses = this.carrello.Addresses;\r\n                // let count = addresses.length;\r\n                var _this = this;\r\n                // var addressVal = $('#idSelectedAdress option:selected').text();\r\n                // console.log(addressVal)\r\n                this.carrello.Addresses.filter(function (x) { return x.Id == addressId; }).forEach(function (address) {\r\n                    var completeAddress = address.Address;\r\n                    var lastIndex = completeAddress.lastIndexOf(\" \");\r\n                    var addressStreet = \"\";\r\n                    var addressNumber = \"\";\r\n                    if (lastIndex > -1) {\r\n                        addressStreet = completeAddress.slice(0, lastIndex);\r\n                        addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n                    }\r\n                    if (address.Id == addressId) {\r\n                        _this.currentAddress.Id = address.Id;\r\n                        _this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n                        _this.currentAddress.City = address.City;\r\n                        _this.currentAddress.Recipient = address.Recipient;\r\n                        _this.currentAddress.Province = address.Province;\r\n                        _this.currentAddress.Phone = address.Phone;\r\n                        _this.currentAddress.ZipCode = address.ZipCode;\r\n                        _this.currentAddress.Mobile = address.Mobile;\r\n                        _this.currentAddress.CustomerID = _this.userId;\r\n                        _this.currentAddress.Language = _this.lang;\r\n                        _this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n                    }\r\n                });\r\n                //concating address street and number to one property \"Address\"\r\n                var model = this.currentAddress;\r\n                model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n                var currentStreet = model.Address;\r\n                var shopCartSub = this.shoppingCartService.setAddress(model).subscribe(function (result) {\r\n                    if (result == null || result == undefined) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    }\r\n                    else {\r\n                        _this.shoppingCartService.updateCart(result);\r\n                        _this.carrello = _this.shoppingCartService.getCart();\r\n                    }\r\n                }, function (err) {\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(shopCartSub);\r\n                //reverting address text to previous value after sending request                \r\n                var lastIndex = currentStreet.lastIndexOf(\" \");\r\n                var addressStreet = currentStreet;\r\n                if (lastIndex > -1) {\r\n                    addressStreet = currentStreet.slice(0, lastIndex);\r\n                }\r\n                model.Address = addressStreet;\r\n            };\r\n            ;\r\n            ChildComponent.prototype.setJobName = function (rowId, jobName) {\r\n                var _this = this;\r\n                if (jobName != \"\") {\r\n                    var jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(function (result) {\r\n                        if (result == false) {\r\n                            _this.bootboxService.i18nAlert(\"errorMex\");\r\n                        }\r\n                    }, function (err) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    });\r\n                    this.subManager.add(jobNameSub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.applyVoucher = function (coupon) {\r\n                var _this = this;\r\n                if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n                    this.spinnerCartCash = true;\r\n                    var voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(function (result) {\r\n                        if (result.CartID != null) {\r\n                            _this.shoppingCartService.updateCart(result);\r\n                            _this.carrello = _this.shoppingCartService.getCart();\r\n                            _this.isVoucherValid = true;\r\n                            _this.isVoucherInvalid = false;\r\n                            _this.isVoucherApplied = true;\r\n                            _this.voucherCode = \"\";\r\n                        }\r\n                        else {\r\n                            _this.isVoucherValid = false;\r\n                            _this.isVoucherInvalid = true;\r\n                        }\r\n                        _this.spinnerCartCash = false;\r\n                    }, function (err) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                        _this.spinnerCartCash = false;\r\n                    });\r\n                    this.subManager.add(voucherSub);\r\n                }\r\n            };\r\n            ;\r\n            ChildComponent.prototype.showModal = function () {\r\n                this.disableButtonCart = false;\r\n                this.spinnerCartCash = false;\r\n                this.showValidationLabels = true;\r\n                //JobNames\r\n                var validProducts = true;\r\n                var count = this.carrello.Products.length;\r\n                for (var i = 0; i < count; i++) {\r\n                    var product = this.carrello.Products[i];\r\n                    //If one of the jobnames are not set then the validation fails\r\n                    if (product.JobName != null && product.JobName.trim().length == 0) {\r\n                        validProducts = false;\r\n                        break;\r\n                    }\r\n                }\r\n                var validAddress = true;\r\n                if (validProducts == false || this.cartCashAccepted == false || !validAddress) {\r\n                    return;\r\n                }\r\n                $(\"#cartCashModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#cartCashModal').modal('hide');\r\n                this.disableButtonCart = false;\r\n            };\r\n            ChildComponent.prototype.confirmOrder = function () {\r\n                var _this = this;\r\n                this.disableButtonCart = true;\r\n                this.spinnerCartCash = true;\r\n                //Checking if all fields are valid\r\n                var confirmOrderSub = this.shoppingCartService.confirmOrder().subscribe(function (result) {\r\n                    if (result > 0) {\r\n                        _this.shoppingCartService.clearCartAfterConfirmation();\r\n                        _this.OrderId = result;\r\n                        _this.hideModal();\r\n                        //Reading link of the page\r\n                        var cartOrderDetailPageUrl = _this.routesService.getRoutePath('CARRELLO ORDINE')[0];\r\n                        //Removing system parameter (id)\r\n                        cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n                        //Adding Order Id parameter\r\n                        cartOrderDetailPageUrl += _this.OrderId;\r\n                        //this.spinnerCartCash = false;\r\n                        //this.router.navigate([cartOrderDetailPageUrl]);\r\n                        window.open(cartOrderDetailPageUrl, \"_self\");\r\n                    }\r\n                    else {\r\n                        _this.hideModal();\r\n                        _this.spinnerCartCash = false;\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    }\r\n                }, function (err) {\r\n                    _this.hideModal();\r\n                    _this.spinnerCartCash = false;\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(confirmOrderSub);\r\n            };\r\n            ;\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                setTimeout(function () {\r\n                    var altezza = $(\"#footer\").outerHeight();\r\n                    var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                    var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                    altezza += margintop;\r\n                    altezza += paddingntop;\r\n                    var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                    var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                    var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                    altezza += altezza1;\r\n                    altezza += margintop1;\r\n                    altezza += paddingntop1;\r\n                    var altezzaHead = $(\".header-body\").outerHeight();\r\n                    var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                    var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                    altezzaHead += margintopHead;\r\n                    altezzaHead += paddingntopHead;\r\n                    $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                    $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n                    this.pageIsInit = true;\r\n                }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                if (shoppingCartCashData.isActiveAddressVerificationModule) {\r\n                    var addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n                    if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n                        this.addAddressVerificationScripts(addressVerificationKey);\r\n                        $(\"#Cap\").prop('disabled', true);\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#Cap\").prop('disabled', false);\r\n                }\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n                this.subManager.unsubscribe();\r\n                //this method is removing all scripts and elements connected to address verification feature\r\n                var addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n                this.removeAddressVerificationScripts(addressVerificationKey);\r\n                this.pageIsOnDestroy = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: shoppingCartCashData.TemplateHtml\r\n                }),\r\n                __param(8, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _m) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CartCashComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')),\r\n        __param(7, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Object, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n    ], CartCashComponent);\r\n    return CartCashComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.CartCashComponent = CartCashComponent;\r\n\n\n/***/ }),\n\n/***/ 395:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar core_2 = __webpack_require__(27);\r\nvar md5_1 = __webpack_require__(279);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar CartSubmittedComponent = (function () {\r\n    function CartSubmittedComponent(_compiler, componentHelper, _elementRef, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    CartSubmittedComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //Depending on the type of the list, a different template is used\r\n        var orderId;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //Reading order id from url\r\n        //If id is set, then the information is retrived by id, else the not found page is showed\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            var templateHtml;\r\n            var id = params['id'];\r\n            if (id !== undefined) {\r\n                orderId = id;\r\n                var cartSub = _this.cmsComponentService.getShoppingCartSubmittedData(orderId).subscribe(function (result) {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n                    if (_this.isBrowser) {\r\n                        //Creating subcomponent whith the selected template to inject\r\n                        var subComponent = _this.createSubComponent(result, header);\r\n                        //injecting created component (OK)\r\n                        _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                    }\r\n                    else {\r\n                        var scriptId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.cartSubmittedId, orderId);\r\n                        //-- Get head and body scripts\r\n                        _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, scriptId);\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                        _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n                _this.subManager.add(cartSub);\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n    };\r\n    CartSubmittedComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CartSubmittedComponent.prototype.createSubComponent = function (cartSubmittedData, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, clientAreaService, languageService, authService, routesService, seoService, isBrowser, _elementRef, scriptService, breadcrumbsService, translateService, sanitizer, paypalService, mappings) {\r\n                this.router = router;\r\n                this.clientAreaService = clientAreaService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.translateService = translateService;\r\n                this.sanitizer = sanitizer;\r\n                this.paypalService = paypalService;\r\n                this.mappings = mappings;\r\n                this.footerData = cartSubmittedData.footerData;\r\n                this.headerData = header;\r\n                this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.authentication = this.authService.GetData();\r\n                this.clientArea = cartSubmittedData.OrderDetail;\r\n                this.seoInfo = cartSubmittedData.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.language = this.languageService.getShortLang();\r\n                this.selectedTipoSpedizione = \"\";\r\n                //cripted orderID with Md5\r\n                this.criptedOrderID = md5_1.Md5.hashStr(this.clientArea.OrderId.toString());\r\n                this.isTipologiaPagamentoBonifico = cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico ? cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico : false;\r\n                this.numeroTrnInvalid = false;\r\n                this.numeroCroInvalid = false;\r\n                this.bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(cartSubmittedData.BonificoUploadUrl);\r\n                this.bonificoUploadedFiles = cartSubmittedData.OrderDetail.BonificoUploadedFilesNames;\r\n                this.pageIsAfterViewInit = false;\r\n                this.breadcrumbs = cartSubmittedData.BreadcrumbsInfo;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                //adding http before link because paypal redirection doesn't work without paypal\r\n                this.paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n                //url that the user will be redirected to after paying of order via paypal\r\n                this.paymentCompleteUrl = this.paymentUrl.replace('{lang}', this.language);\r\n                this.clientArea.CurrencyCode = \"EUR\";\r\n                if (this.clientArea.OrderId == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('HOME'));\r\n                }\r\n                this.checkTipoSpedizione();\r\n            };\r\n            ChildComponent.prototype.checkTipoSpedizione = function () {\r\n                if (this.clientArea.ProcessingOrderList.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    var tipoSped = this.clientArea.ProcessingOrderList.filter(function (item, i, arr) { return arr.findIndex(function (t) { return t.TipoTrasporto === item.TipoTrasporto; }) === i; });\r\n                    var TipoTrasportoShipmentToFilter = \"S\";\r\n                    if (tipoSped.length == 1) {\r\n                        TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                    }\r\n                    if (this.selectedTipoSpedizione == \"\") {\r\n                        this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.confirmBonificoDetails = function () {\r\n                var _this = this;\r\n                // trim value before sending it to a server\r\n                this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.updateBonificoPaymentDetails(cartSubmittedData.OrderDetail.OrderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n                    .subscribe(function (x) {\r\n                    //hiding of loading panel after we get all data we need\r\n                    _this.routesService.hidePageLoader();\r\n                    _this.hideBonificoModal();\r\n                }, function (err) {\r\n                });\r\n            };\r\n            // validate NumeroTrn input\r\n            ChildComponent.prototype.checkNumeroTrn = function (inputText) {\r\n                inputText = inputText.trim();\r\n                if (inputText.length < 31) {\r\n                    this.numeroTrnInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroTrnInvalid = true;\r\n                }\r\n            };\r\n            // validate NumeroCro input\r\n            ChildComponent.prototype.checkNumeroCro = function (inputNumber) {\r\n                if (inputNumber < 99999999999) {\r\n                    this.numeroCroInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroCroInvalid = true;\r\n                }\r\n            };\r\n            // getting uploaded files for this order and showing it inside of bonifico modal\r\n            ChildComponent.prototype.getBonificoUploadedFiles = function () {\r\n                var _this = this;\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.getBonificoUploadedFiles(cartSubmittedData.OrderDetail.OrderId).subscribe(function (x) {\r\n                    _this.bonificoUploadedFiles = x;\r\n                    //hiding of loading panel after we get all data we need\r\n                    _this.routesService.hidePageLoader();\r\n                });\r\n            };\r\n            ChildComponent.prototype.showBonificoModal = function () {\r\n                $(\"#bonificoModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideBonificoModal = function () {\r\n                $(\"#bonificoModal\").modal(\"hide\");\r\n            };\r\n            ChildComponent.prototype.orderDetailsRedirect = function () {\r\n                //Reading link of the page\r\n                var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n                //Removing system parameter (id)\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n                //Adding Order Id parameter\r\n                cartOrderDetailPageUrl += this.clientArea.OrderId;\r\n                //this.router.navigate([cartOrderDetailPageUrl]);\r\n                window.open(cartOrderDetailPageUrl, \"_self\");\r\n            };\r\n            ChildComponent.prototype.fileUploadRedirect = function () {\r\n                //Reading link of the page\r\n                var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n                //Removing system parameter (id)\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', this.clientArea.OrderId);\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':pagefrom', 'section_upload');\r\n                //this.router.navigate([cartOrderDetailPageUrl]);\r\n                window.open(cartOrderDetailPageUrl, \"_self\");\r\n            };\r\n            ChildComponent.prototype.payWithPaypal = function () {\r\n                var paypalText = \"pay_with_paypal\";\r\n                var translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n                var formHtml = '<form ngNoForm action=\\\"' + this.clientArea.GatewayUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"paypalForm\" id=\\'paypalForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">' +\r\n                    '<input type=\"hidden\" name=\"business\"  value=\\\"' + this.clientArea.GatewayAccount + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_name\"  value=\\\"' + this.clientArea.OrderNumber + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"currency_code\" value=\\\"' + this.clientArea.CurrencyCode + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"amount\" value=\\\"' + this.clientArea.TotalCost + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_number\"  value=\\\"' + this.clientArea.OrderId + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"return\" value=\\\"' + this.paymentCompleteUrl + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"rm\" value=\"2\">' +\r\n                    '<button (click)=\"payWithPaypal()\" *ngIf=\"clientArea.PaymentDoneUrl != null\" class=\"btn btn-primary  btn-lg\" type=\"button\"' +\r\n                    'id=\"paypal-button-container\" name=\"paypal-button-container\" style=\"width:100%\">' +\r\n                    '<i class=\"fa fa-credit-card\"></i> ' + translatePaypal +\r\n                    '</button>' +\r\n                    '</form>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                var completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n                $('#paypalForm').submit();\r\n            };\r\n            ChildComponent.prototype.payWithNexi = function () {\r\n                var NexiForm = $(\"#completeNexiFormId\").html();\r\n                var NexiText = \"pay_with_nexi\";\r\n                var translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n                var formHtml = '<form ngNoForm action=\\\"' + this.clientArea.NexiModel.requestUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"nexiForm\" id=\\'nexiForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"alias\"  value=\\\"' + this.clientArea.NexiModel.alias + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"importo\"  value=\\\"' + this.clientArea.NexiModel.importo + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"divisa\"  value=\\\"' + this.clientArea.NexiModel.divisa + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"codTrans\" value=\\\"' + this.clientArea.NexiModel.codTrans + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url\" value=\\\"' + this.clientArea.NexiModel.url + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url_back\"  value=\\\"' + this.clientArea.NexiModel.url_back_ultimoStepCarrello + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"mac\" value=\\\"' + this.clientArea.NexiModel.mac + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"tipo_servizio\" value=\"paga_1click\"/>' +\r\n                    '<input type=\"hidden\" name=\"num_contratto\" value=\\\"' + this.clientArea.NexiModel.num_contratto + '\\\"/>';\r\n                if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n                    formHtml += '<input type=\"hidden\" name=\"gruppo\" value=\\\"' + this.clientArea.NexiModel.gruppo + '\\\"/>';\r\n                }\r\n                formHtml += '</form>' + NexiForm;\r\n                // formHtml += '</form> <button (click)=\"payWithNexi()\" class=\"btn btn-primary btn-lg w100\" type=\"button\" id=\"nexi-button-container\" name=\"nexi-button-container\">' +\r\n                // '<i class=\"fa fa-credit-card\"></i> ' + translateNexi +\r\n                // '</button>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                var completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n                $('#nexiForm').submit();\r\n            };\r\n            ChildComponent.prototype.payWithBancaSella = function () {\r\n                axerve.lightBox.open(this.clientArea.BancaSellaModel.payload.paymentID, this.clientArea.BancaSellaModel.payload.paymentToken, this.callback);\r\n            };\r\n            ChildComponent.prototype.callback = function (result) {\r\n                if (result.responseURL != null && result.responseURL != undefined && result.responseURL != \"\") {\r\n                    window.open(result.responseURL, \"_self\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n                    return;\r\n                }\r\n                if (this.clientArea.PaymentType == 'BancaSella' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00') {\r\n                    axerve.lightBox.shop = this.clientArea.BancaSellaModel.payload.shopId;\r\n                }\r\n                //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n                if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n                    var userId = this.authService.GetUserId();\r\n                    var params = {\r\n                        CustomerId: userId.toString(),\r\n                        OrderId: this.clientArea.OrderId.toString(),\r\n                        Lang: this.languageService.getLongLang()\r\n                    };\r\n                    //-- Load paypal service and render a button for paypal payment\r\n                    this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url, this.mappings.Web_Api_Create_Paypal_Payment, this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n                }\r\n                this.pageIsAfterViewInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: cartSubmittedData.TemplateHtml\r\n                }),\r\n                __param(6, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _g) || Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object, (typeof (_k = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _k) || Object, (typeof (_l = typeof platform_browser_1.DomSanitizer !== 'undefined' && platform_browser_1.DomSanitizer) === 'function' && _l) || Object, (typeof (_m = typeof paypal_service_1.PaypalService !== 'undefined' && paypal_service_1.PaypalService) === 'function' && _m) || Object, (typeof (_o = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _o) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CartSubmittedComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n    ], CartSubmittedComponent);\r\n    return CartSubmittedComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.CartSubmittedComponent = CartSubmittedComponent;\r\n\n\n/***/ }),\n\n/***/ 396:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(98);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar core_2 = __webpack_require__(27);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar user_login_1 = __webpack_require__(73);\r\nvar company_1 = __webpack_require__(253);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartComponent = (function () {\r\n    function CartComponent(_compiler, componentHelper, _elementRef, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    CartComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var isChangeShipment = false;\r\n        var paramsSub = this.route.queryParams.subscribe(function (params) {\r\n            var isChangeShipmentParam = params['isChangeShipment'];\r\n            if (isChangeShipmentParam != undefined) {\r\n                isChangeShipment = isChangeShipmentParam;\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var cartDataSub = this.cmsComponentService.getShoppingCartData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, header, isChangeShipment);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var scriptId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.cartId, result.ShoppingCart.CartID);\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, scriptId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(cartDataSub);\r\n    };\r\n    CartComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    CartComponent.prototype.createSubComponent = function (shoppingCartData, header, isChangeShipment) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router, shoppingCartService, languageService, authService, routesService, seoService, translate, bootboxService, isBrowser, _elementRef, scriptService, breadcrumbsService, registerService, canvasService, cookie) {\r\n                var _this = this;\r\n                this.router = router;\r\n                this.shoppingCartService = shoppingCartService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this.translate = translate;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.registerService = registerService;\r\n                this.canvasService = canvasService;\r\n                this.cookie = cookie;\r\n                // model = {\r\n                //     selectedPayment: new CartPaymentModel(),\r\n                //     selectedShipment: new CartShipmentModel(),\r\n                //     selectedPickUp: new CartShipmentModel(),\r\n                //     selectedDelivery: new CartShipmentModel()\r\n                // }\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.carrello = shoppingCartData.ShoppingCart;\r\n                this.items = this.carrello.Payments;\r\n                this.selectedPaymentId = 0;\r\n                this.selectedShipmentId = 0;\r\n                this.locations = new Array();\r\n                this.footerData = shoppingCartData.footerData;\r\n                this.headerData = header;\r\n                this.userLogin = user_login_1.UserLogin;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.company = new company_1.Company();\r\n                this.authentication = this.authService.GetData();\r\n                this.userId = this.authService.GetUserId();\r\n                this.cartId = 0;\r\n                this.voucherCode = \"\";\r\n                this.isVoucherValid = false;\r\n                this.isVoucherInvalid = false;\r\n                this.isVoucherApplied = false;\r\n                this.hasPickUpActive = false;\r\n                this.hasShipmentActive = false;\r\n                this.hasDeliveryActive = false;\r\n                this.seoInfo = shoppingCartData.SeoInformation;\r\n                this.disableModalCartButtons = false;\r\n                this.spinnerCart = false;\r\n                this.breadcrumbs = shoppingCartData.BreadcrumbsInfo;\r\n                this.showProceedBtn = true;\r\n                this.parentWidgetData = shoppingCartData.CanvasInfo;\r\n                this.mapZoom = shoppingCartData.MapZoom;\r\n                this.clickedProductId = 0;\r\n                this.selectedTipoSpedizione = \"\";\r\n                this.trasportoLabel = \"\";\r\n                this.ritiroLabel = \"\";\r\n                this.consegnaLabel = \"\";\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.countInitMap = 0;\r\n                this.cartStep1 = true;\r\n                this.cartStep2 = false;\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        shoppingCartService.setIfProductIsCanvasEdited(true);\r\n                        // get row id of edited element\r\n                        var productId_1 = _this.clickedProductId;\r\n                        // get data which we get from customer canvas and saved in a cart service\r\n                        var canvasData_1 = shoppingCartService.getCustomizationCanvasData();\r\n                        canvasData_1[\"RowIdPrev\"] = productId_1;\r\n                        if (canvasData_1 && productId_1 && canvasData_1.status == \"success\") {\r\n                            var updateCanvas = canvasService.updatePrevCanvasInfo(canvasData_1).subscribe(function (x) {\r\n                                var objectToUpdateStateId = _this.carrello.Products.find(function (obj) {\r\n                                    return obj.Id === productId_1;\r\n                                });\r\n                                objectToUpdateStateId.CanvasStateId = canvasData_1.stateId;\r\n                            });\r\n                            _this.subManager.add(updateCanvas);\r\n                        }\r\n                        // reset editor view\r\n                        shoppingCartService.resetCanvasData();\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                this.trasportoLabel = this.getLabel('tipoTrasporto_shipment');\r\n                this.ritiroLabel = this.getLabel('tipoTrasporto_pickup');\r\n                this.consegnaLabel = this.getLabel('tipoTrasporto_delivery');\r\n                this.TipiSpedizione = [{\r\n                        valore: this.trasportoLabel,\r\n                        chiave: \"S\",\r\n                        isVisible: true\r\n                    }, {\r\n                        valore: this.ritiroLabel,\r\n                        chiave: \"P\",\r\n                        isVisible: true\r\n                    }, {\r\n                        valore: this.consegnaLabel,\r\n                        chiave: \"D\",\r\n                        isVisible: true\r\n                    }];\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (shoppingCartData.UserData != null) {\r\n                    this.isCompletedRegistration = shoppingCartData.UserData.IsCompletedRegistration;\r\n                    this.userData = shoppingCartData.UserData;\r\n                }\r\n                if (this.carrello.Products.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    this.shoppingCartService.updateCart(this.carrello);\r\n                    var userData = this.authService.GetData();\r\n                    this.isUserAuthenticated = userData.isAuthenticated;\r\n                    this.carrello.Payments = this.carrello.Payments.sort(function (a, b) { return a.OrderSort - b.OrderSort; });\r\n                    for (var _i = 0, _a = this.carrello.Payments; _i < _a.length; _i++) {\r\n                        var payment = _a[_i];\r\n                        if (payment.Selected == true) {\r\n                            this.selectedPaymentId = payment.Id;\r\n                            break;\r\n                        }\r\n                    }\r\n                    this.hasPickUpActive = this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == 'P'; }).length > 0 ? true : false;\r\n                    this.hasShipmentActive = this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == 'S'; }).length > 0 ? true : false;\r\n                    this.hasDeliveryActive = this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == 'D'; }).length > 0 ? true : false;\r\n                    this.checkTipoSpedizione();\r\n                    this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == 'P'; }).forEach(function (element) {\r\n                        var item = [element.Name, parseFloat(element.Latitudine), parseFloat(element.Longitudine), element.Id];\r\n                        _this.locations.push(item);\r\n                    });\r\n                }\r\n                if (this.userData != undefined && this.userData != null) {\r\n                    if (this.userData.Id_User_Group != 4) {\r\n                        if ((this.userData.CodiceDestinatarioSDL == \"\" || this.userData.CodiceDestinatarioSDL == \"0000000\" || this.userData.CodiceDestinatarioSDL == undefined) && (this.userData.PecEmail == \"\" || this.userData.PecEmail == undefined)) {\r\n                            this.showProceedBtn = false;\r\n                        }\r\n                    }\r\n                }\r\n                if (isChangeShipment) {\r\n                    this.cartStep1 = false;\r\n                    this.cartStep2 = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.scroll = function (id) {\r\n                var el = document.getElementById(id);\r\n                if (el != null) {\r\n                    el.scrollIntoView();\r\n                }\r\n            };\r\n            ChildComponent.prototype.gotoToStep1Cart = function () {\r\n                this.cartStep1 = true;\r\n                this.cartStep2 = false;\r\n            };\r\n            ChildComponent.prototype.gotoToStep2Cart = function () {\r\n                this.cartStep1 = false;\r\n                this.cartStep2 = true;\r\n            };\r\n            ChildComponent.prototype.changeTipoSpedizioneValue = function (valore) {\r\n                if (this.selectedTipoSpedizione == valore) {\r\n                    return;\r\n                }\r\n                this.selectedTipoSpedizione = valore;\r\n                if (valore == 'P') {\r\n                    this.initMap(this);\r\n                }\r\n                this.checkTipoSpedizione(true);\r\n            };\r\n            ChildComponent.prototype.checkTipoSpedizione = function (isUpdate, isRemovingCart) {\r\n                var _this = this;\r\n                if (isUpdate === void 0) { isUpdate = false; }\r\n                if (isRemovingCart === void 0) { isRemovingCart = false; }\r\n                if (this.carrello.Products.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    var tipoSped = this.carrello.Products.filter(function (item, i, arr) { return arr.findIndex(function (t) { return t.TipoTrasporto === item.TipoTrasporto; }) === i; });\r\n                    var TipoTrasportoShipmentToFilter = \"S\";\r\n                    if (tipoSped.length == 1) {\r\n                        TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                    }\r\n                    if (this.selectedTipoSpedizione == \"\") {\r\n                        this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                    }\r\n                    var showAllType = true;\r\n                    var haveRowTime = this.carrello.Products.filter(function (x) { return x.DeliveryTime != \"\"; });\r\n                    if (haveRowTime.length > 0) {\r\n                        showAllType = false;\r\n                    }\r\n                    //console.log(\"hasDeliveryActive = \"+this.hasDeliveryActive)\r\n                    //console.log(\"hasPickUpActive = \"+this.hasPickUpActive)\r\n                    //console.log(\"hasShipmentActive = \"+this.hasShipmentActive)\r\n                    this.TipiSpedizione.forEach(function (tipoSped) {\r\n                        tipoSped.isVisible = true;\r\n                        if (showAllType == false && (tipoSped.chiave == \"S\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                        if (_this.hasDeliveryActive == false && (tipoSped.chiave == \"D\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                        if (_this.hasPickUpActive == false && (tipoSped.chiave == \"P\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                        if (_this.hasShipmentActive == false && (tipoSped.chiave == \"S\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                    });\r\n                    if (isUpdate) {\r\n                        this.shipmentToShow = this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == _this.selectedTipoSpedizione && x.DefaultShipment == true; });\r\n                        this.selectRadioShipment(this.shipmentToShow[0].Id);\r\n                    }\r\n                    else {\r\n                        this.shipmentToShow = this.carrello.Shipments.sort(function (a, b) { return a.Sort - b.Sort; }).filter(function (x) { return x.TipoTrasporto == _this.selectedTipoSpedizione; });\r\n                        if (this.shipmentToShow.filter(function (x) { return x.Selected == true; }).length > 0) {\r\n                            this.selectedShipmentId = this.shipmentToShow.filter(function (x) { return x.Selected == true; })[0].Id;\r\n                        }\r\n                        else {\r\n                            if (isRemovingCart) {\r\n                                if (this.selectedShipmentId > 0) {\r\n                                    var shipmentToSelect = this.shipmentToShow.filter(function (x) { return x.Id == _this.selectedShipmentId; });\r\n                                    if (shipmentToSelect.length > 0) {\r\n                                        this.selectedShipmentId = 0;\r\n                                        this.selectRadioShipment(shipmentToSelect[0].Id, false, true);\r\n                                    }\r\n                                    else {\r\n                                        this.selectRadioShipment(this.shipmentToShow[0].Id, false, true);\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    var shipentToSelect = this.shipmentToShow[0].Id;\r\n                                    if (this.shipmentToShow.filter(function (x) { return x.DefaultShipment == true; }).length > 0) {\r\n                                        shipentToSelect = this.shipmentToShow[0].Id;\r\n                                    }\r\n                                    this.selectRadioShipment(shipentToSelect, false, true);\r\n                                }\r\n                            }\r\n                            else {\r\n                                var shipentToSelect = this.shipmentToShow[0].Id;\r\n                                if (this.shipmentToShow.filter(function (x) { return x.DefaultShipment == true; }).length > 0) {\r\n                                    shipentToSelect = this.shipmentToShow[0].Id;\r\n                                }\r\n                                this.selectRadioShipment(this.shipmentToShow[0].Id);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function (product) {\r\n                this.clickedProductId = product.Id;\r\n                if (shoppingCartData.CanvasInfo.CanvasUrl) {\r\n                    // we have a state id, because product is already edited, so we kept it's state id in a database\r\n                    var isStateId = true;\r\n                    var canvasConfigData = this.setCanvasConfig(product);\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function (product) {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: shoppingCartData.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: shoppingCartData.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: shoppingCartData.CanvasInfo.CustomerCanvasUserName,\r\n                    CanvasStateId: product.CanvasStateId,\r\n                    Watermark: shoppingCartData.CanvasInfo.WatermarkText,\r\n                    CanvasApiKey: shoppingCartData.CanvasInfo.ApiKey\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                if (shoppingCartData.CanvasInfo && shoppingCartData.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = shoppingCartData.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                toShow = isModuleActive && this.isUserAuthenticated ? true : false;\r\n                return toShow;\r\n            };\r\n            // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n            ChildComponent.prototype.removeCustomersCanvasState = function () {\r\n                if (this.toShowCanvasButton() && this.selectedProduct.CanvasStateId) {\r\n                    var canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n                    this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n                        .subscribe(function (x) { return x; }, function (err) {\r\n                        console.log(err);\r\n                    });\r\n                }\r\n            };\r\n            ChildComponent.prototype.goRegistrationPage = function () {\r\n                //-- If this parameter is inside of cookie, it means that user used quick registration feature\r\n                var quickRegistration = this.cookie.get(\"IsQuickRegistered\");\r\n                if (quickRegistration && Boolean(quickRegistration)) {\r\n                    var navigationExtras = {\r\n                        queryParams: { 'quickRegistration': true }\r\n                    };\r\n                    var registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n                    registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n                    registerRoute += \"?quickRegistration=true\";\r\n                    window.open(registerRoute, \"_self\");\r\n                }\r\n                else {\r\n                    if (this.isCompletedRegistration == false) {\r\n                        this.registerService.setFacebookLoginData(this.userData);\r\n                        var registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n                        registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n                        this.router.navigate([registerRoute]);\r\n                    }\r\n                    else {\r\n                        this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n                    }\r\n                }\r\n            };\r\n            ;\r\n            ChildComponent.prototype.goLoginPage = function () {\r\n                var loginRoute = this.routesService.getRoutePath('LOGIN_PAGE_FROM')[0];\r\n                loginRoute = loginRoute.replace(\":pagefrom\", \"cart\");\r\n                this.router.navigate([loginRoute]);\r\n            };\r\n            ;\r\n            ChildComponent.prototype.goToConfirmPurchasePage = function () {\r\n                if (this.selectedPaymentId == 0) {\r\n                    this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n                }\r\n                else if (this.selectedShipmentId == 0) {\r\n                    this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n                }\r\n                else {\r\n                    //this.router.navigateByUrl(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n                    window.open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.goToModifyProfile = function () {\r\n                this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI'));\r\n            };\r\n            ChildComponent.prototype.saveCart = function () {\r\n                var _this = this;\r\n                var saveCartSub = this.shoppingCartService.saveCart(this.userId, this.cartId, this.selectedPaymentId, this.selectedShipmentId).subscribe(function (result) {\r\n                    //this.router.navigate(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n                    window.open(_this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n                });\r\n                this.subManager.add(saveCartSub);\r\n            };\r\n            ChildComponent.prototype.selectRadioPayment = function (paymentId) {\r\n                if (this.selectedPaymentId != paymentId) {\r\n                    this.selectedPaymentId = paymentId;\r\n                    this.setPayment(paymentId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setPayment = function (paymentId) {\r\n                var _this = this;\r\n                this.spinnerCart = true;\r\n                var paymentSub = this.shoppingCartService.setPayment(paymentId).subscribe(function (result) {\r\n                    _this.bootboxService.i18nAlert(\"selectedPayment\", 'pagamento');\r\n                    _this.shoppingCartService.updateCart(result);\r\n                    _this.carrello = _this.shoppingCartService.getCart();\r\n                    _this.carrello.Payments = _this.carrello.Payments.sort(function (a, b) { return a.OrderSort - b.OrderSort; });\r\n                    _this.spinnerCart = false;\r\n                });\r\n                this.subManager.add(paymentSub);\r\n            };\r\n            ChildComponent.prototype.selectRadioShipment = function (shipmentId, isOnMap, isOnRemove) {\r\n                if (isOnMap === void 0) { isOnMap = false; }\r\n                if (isOnRemove === void 0) { isOnRemove = false; }\r\n                if (this.selectedShipmentId != shipmentId) {\r\n                    this.selectedShipmentId = shipmentId;\r\n                    this.setShipment(shipmentId, isOnMap, isOnRemove);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setShipment = function (shipmentId, isOnMap, isOnRemove) {\r\n                var _this = this;\r\n                if (isOnMap === void 0) { isOnMap = false; }\r\n                if (isOnRemove === void 0) { isOnRemove = false; }\r\n                this.spinnerCart = true;\r\n                var shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(function (result) {\r\n                    if (!isOnRemove) {\r\n                        _this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n                    }\r\n                    _this.shoppingCartService.updateCart(result);\r\n                    _this.carrello = _this.shoppingCartService.getCart();\r\n                    if (!isOnMap) {\r\n                        _this.SelectValueMap(_this);\r\n                    }\r\n                    _this.checkTipoSpedizione();\r\n                    _this.spinnerCart = false;\r\n                });\r\n                this.subManager.add(shipmentSub);\r\n            };\r\n            ChildComponent.prototype.removeFromCart = function () {\r\n                var _this = this;\r\n                this.disableModalCartButtons = true;\r\n                this.spinnerCart = true;\r\n                var removeCartSub = this.shoppingCartService.removeFromCart(this.idOfProduct).subscribe(function (result) {\r\n                    _this.shoppingCartService.updateCart(result);\r\n                    _this.carrello = _this.shoppingCartService.getCart();\r\n                    _this.spinnerCart = false;\r\n                    _this.disableModalCartButtons = false;\r\n                    _this.removeCustomersCanvasState();\r\n                    _this.checkTipoSpedizione(false, true);\r\n                    if (_this.carrello.Products != null && _this.carrello.Products.length == 0) {\r\n                        _this.router.navigate(_this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                    }\r\n                });\r\n                this.subManager.add(removeCartSub);\r\n                this.hideModal();\r\n            };\r\n            ChildComponent.prototype.showModal = function (product) {\r\n                this.disableModalCartButtons = false;\r\n                this.idOfProduct = product.Id;\r\n                this.selectedProduct = product;\r\n                $(\"#cartModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#cartModal').modal('hide');\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                setTimeout(function () {\r\n                    var altezza = $(\"#footer\").outerHeight();\r\n                    var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                    var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                    altezza += margintop;\r\n                    altezza += paddingntop;\r\n                    var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                    var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                    var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                    altezza += altezza1;\r\n                    altezza += margintop1;\r\n                    altezza += paddingntop1;\r\n                    var altezzaHead = $(\".header-body\").outerHeight();\r\n                    //console.log(\".header-body = \" + altezzaHead)\r\n                    var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                    var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                    altezzaHead += margintopHead;\r\n                    altezzaHead += paddingntopHead;\r\n                    $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                    $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n                    this.pageIsInit = true;\r\n                }, 1);\r\n            };\r\n            ChildComponent.prototype.applyVoucher = function (coupon) {\r\n                var _this = this;\r\n                if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n                    this.spinnerCart = true;\r\n                    var voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(function (result) {\r\n                        if (result.CartID != null) {\r\n                            _this.shoppingCartService.updateCart(result);\r\n                            _this.carrello = _this.shoppingCartService.getCart();\r\n                            _this.isVoucherValid = true;\r\n                            _this.isVoucherInvalid = false;\r\n                            _this.isVoucherApplied = true;\r\n                            _this.voucherCode = \"\";\r\n                        }\r\n                        else {\r\n                            _this.isVoucherValid = false;\r\n                            _this.isVoucherInvalid = true;\r\n                        }\r\n                        _this.spinnerCart = false;\r\n                    }, function (err) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                        _this.spinnerCart = false;\r\n                    });\r\n                    this.subManager.add(voucherSub);\r\n                }\r\n            };\r\n            ;\r\n            ChildComponent.prototype.setJobName = function (rowId, jobName) {\r\n                var _this = this;\r\n                if (jobName != \"\") {\r\n                    var jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(function (result) {\r\n                        if (result == false) {\r\n                            _this.bootboxService.i18nAlert(\"errorMex\");\r\n                        }\r\n                    }, function (err) {\r\n                        _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    });\r\n                    this.subManager.add(jobNameSub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                this.pageIsInitAfter = true;\r\n                this.initMap(this);\r\n            };\r\n            ChildComponent.prototype.initMap = function (those) {\r\n                if (those.locations.length > 0 && those.locations != null) {\r\n                    if (google == undefined || google == null || !google) {\r\n                        if (those.countInitMap > 3) {\r\n                            $(\"#map\").hide();\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            return;\r\n                        }\r\n                        those.countInitMap++;\r\n                        those.initMap(those);\r\n                    }\r\n                    else {\r\n                        if (those.locations[0][1] == \"\" || those.locations[0][1] == undefined || those.locations[0][1] == null || isNaN(those.locations[0][1])) {\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            $(\"#map\").hide();\r\n                            return;\r\n                        }\r\n                        var pt = new google.maps.LatLng(those.locations[0][1], those.locations[0][2]);\r\n                        var map = new google.maps.Map(document.getElementById('map'), {\r\n                            zoom: those.mapZoom,\r\n                            center: pt,\r\n                            mapTypeId: google.maps.MapTypeId.ROADMAP\r\n                        });\r\n                        map.setCenter(pt);\r\n                        those.map = map;\r\n                        var infowindow = new google.maps.InfoWindow();\r\n                        var marker, i;\r\n                        for (i = 0; i < those.locations.length; i++) {\r\n                            if (those.locations[i][1] == \"\" || those.locations[i][1] == undefined || those.locations[i][1] == null || isNaN(those.locations[i][1])) {\r\n                                $(\"#map\").hide();\r\n                                if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                    $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                    $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                }\r\n                                continue;\r\n                            }\r\n                            else if (those.locations[i][2] == \"\" || those.locations[i][2] == undefined || those.locations[i][2] == null || isNaN(those.locations[i][2])) {\r\n                                $(\"#map\").hide();\r\n                                if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                    $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                    $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                }\r\n                                continue;\r\n                            }\r\n                            marker = new google.maps.Marker({\r\n                                position: new google.maps.LatLng(those.locations[i][1], those.locations[i][2]),\r\n                                map: map\r\n                            });\r\n                            if (those.selectedShipmentId == those.locations[i][3]) {\r\n                                infowindow.setContent(those.locations[i][0]);\r\n                                infowindow.open(map, marker);\r\n                            }\r\n                            google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n                                return function () {\r\n                                    infowindow.setContent(those.locations[i][0]);\r\n                                    infowindow.open(map, marker);\r\n                                    those.selectRadioShipment(those.locations[i][3], true);\r\n                                    those.scroll(those.locations[i][3]);\r\n                                };\r\n                            })(marker, i));\r\n                        }\r\n                        those.selectInfoWindow = infowindow;\r\n                    }\r\n                }\r\n                else {\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.SelectValueMap = function (those) {\r\n                if (those.locations.length > 0 && those.locations != null) {\r\n                    if (google == undefined || google == null || !google) {\r\n                        if (those.countInitMap > 3) {\r\n                            $(\"#map\").hide();\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            return;\r\n                        }\r\n                        those.countInitMap++;\r\n                        those.SelectValueMap(those);\r\n                    }\r\n                    else {\r\n                        if (those.selectInfoWindow != \"\" && those.selectInfoWindow != undefined && those.selectInfoWindow != null) {\r\n                            those.selectInfoWindow.close();\r\n                            var infowindow = new google.maps.InfoWindow();\r\n                            those.selectInfoWindow = infowindow;\r\n                            var marker, i;\r\n                            for (i = 0; i < those.locations.length; i++) {\r\n                                if (those.locations[i][1] == \"\" || those.locations[i][1] == undefined || those.locations[i][1] == null || isNaN(those.locations[i][1])) {\r\n                                    $(\"#map\").hide();\r\n                                    if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                        $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                        $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                    }\r\n                                    continue;\r\n                                }\r\n                                else if (those.locations[i][2] == \"\" || those.locations[i][2] == undefined || those.locations[i][2] == null || isNaN(those.locations[i][2])) {\r\n                                    $(\"#map\").hide();\r\n                                    if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                        $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                        $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                    }\r\n                                    continue;\r\n                                }\r\n                                else {\r\n                                    marker = new google.maps.Marker({\r\n                                        position: new google.maps.LatLng(parseFloat(those.locations[i][1]), parseFloat(those.locations[i][2])),\r\n                                        map: those.map\r\n                                    });\r\n                                    if (those.selectedShipmentId == those.locations[i][3]) {\r\n                                        infowindow.setContent(those.locations[i][0]);\r\n                                        infowindow.open(those.map, marker);\r\n                                    }\r\n                                    google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n                                        return function () {\r\n                                            infowindow.setContent(those.locations[i][0]);\r\n                                            infowindow.open(those.map, marker);\r\n                                            those.selectRadioShipment(those.locations[i][3], true);\r\n                                            those.scroll(those.locations[i][3]);\r\n                                        };\r\n                                    })(marker, i));\r\n                                }\r\n                            }\r\n                            those.selectInfoWindow = infowindow;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: shoppingCartData.TemplateHtml\r\n                }),\r\n                __param(8, core_1.Inject('isBrowser')),\r\n                __param(14, core_1.Inject('CookieService')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _m) || Object, (typeof (_o = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _o) || Object, (typeof (_p = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _p) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    CartComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n    ], CartComponent);\r\n    return CartComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.CartComponent = CartComponent;\r\n\n\n/***/ }),\n\n/***/ 397:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar router_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar Observable_1 = __webpack_require__(1);\r\nvar ClientAreaCatalogPrivateComponent = (function () {\r\n    function ClientAreaCatalogPrivateComponent(_compiler, componentHelper, _elementRef, templateService, clientAreaService, cmsComponentService, authService, router, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.clientAreaService = clientAreaService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.authService = authService;\r\n        this.router = router;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaCatalogPrivateComponent.prototype.requestDataFromMultipleSources = function (UserId) {\r\n        var response1 = this.cmsComponentService.getHeaderData();\r\n        var response2 = this.cmsComponentService.getSideMenuData();\r\n        var response4 = this.clientAreaService.getClientAreaCatalogPrivate(UserId);\r\n        // Observable.forkJoin (RxJS 5) changes to just forkJoin() in RxJS 6\r\n        return Observable_1.Observable.forkJoin([response1, response2, response4]);\r\n    };\r\n    ClientAreaCatalogPrivateComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        if (this.isBrowser) {\r\n            var UserId_1 = this.authService.GetUserId();\r\n            var PageInfo_1;\r\n            var header_1;\r\n            var SideMenu_1;\r\n            var fork = this.requestDataFromMultipleSources(UserId_1).subscribe(function (result) {\r\n                //console.log(result)\r\n                header_1 = result[0];\r\n                if (result[1].Categories) {\r\n                    header_1.Categories = result[1].Categories;\r\n                    SideMenu_1 = result[1];\r\n                }\r\n                if (SideMenu_1) {\r\n                    result[2].SideMenuData = SideMenu_1;\r\n                }\r\n                if (UserId_1 !== undefined) {\r\n                    PageInfo_1 = result[2];\r\n                    //Creating subcomponent whith the selected template to inject\r\n                    var subComponent = _this.createSubComponent(PageInfo_1, UserId_1, header_1);\r\n                    _this._elementRef.clear();\r\n                    //injecting created component (OK)\r\n                    _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                }\r\n                else {\r\n                    var orderNotFoundSub = _this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(function (result) {\r\n                        PageInfo_1 = result;\r\n                        //Creating subcomponent whith the selected template to inject\r\n                        var subComponent = _this.createSubComponent(PageInfo_1, UserId_1, header_1);\r\n                        //injecting created component (OK)\r\n                        _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                    });\r\n                    _this.subManager.add(orderNotFoundSub);\r\n                }\r\n            });\r\n            this.subManager.add(fork);\r\n        }\r\n    };\r\n    ClientAreaCatalogPrivateComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ClientAreaCatalogPrivateComponent.prototype.createSubComponent = function (template, orderId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(languageService, authService, routesService, cookie, router, isBrowser, seoService, currency, translateService, breadcrumbsService, mappings, scriptService) {\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.cookie = cookie;\r\n                this.router = router;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.currency = currency;\r\n                this.translateService = translateService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.mappings = mappings;\r\n                this.scriptService = scriptService;\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.isActiveInvoicesModule = template.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = template.isCatalogPrivateActive;\r\n                this.footerData = template.footerData;\r\n                this.headerData = header;\r\n                this.pageIsInit = false;\r\n                this.pageIsAfterViewInit = false;\r\n                this.sideMenuData = template.SideMenuData;\r\n                this.breadcrumbs = template.BreadcrumbsInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.products = template.ProductPrivateList;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                this.sideMenuData.Categories = this.headerData.Categories;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n                    return;\r\n                }\r\n                this.pageIsAfterViewInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: template.TemplateHtml\r\n                }),\r\n                __param(3, core_1.Inject('CookieService')),\r\n                __param(5, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _c) || Object, (typeof (_d = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object, (typeof (_k = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _k) || Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaCatalogPrivateComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(8, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, (typeof (_g = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object])\r\n    ], ClientAreaCatalogPrivateComponent);\r\n    return ClientAreaCatalogPrivateComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.ClientAreaCatalogPrivateComponent = ClientAreaCatalogPrivateComponent;\r\n\n\n/***/ }),\n\n/***/ 398:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar messages_service_1 = __webpack_require__(130);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar client_area_1 = __webpack_require__(97);\r\nvar router_1 = __webpack_require__(12);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ClientAreaHomeComponent = (function () {\r\n    function ClientAreaHomeComponent(_compiler, componentHelper, _elementRef, clientAreaService, router, authService, cmsComponentService, isBrowser, seo, renderer, scriptService, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.clientAreaService = clientAreaService;\r\n        this.router = router;\r\n        this.authService = authService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.scriptService = scriptService;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaHomeComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        //console.log(this.authService.GetData().isAuthenticated)\r\n        if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        var userId = this.authService.GetUserId();\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var clientDetailsSub = this.clientAreaService.getDetailsClientArea(userId).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the catalog catgories information to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userAreaId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(clientDetailsSub);\r\n    };\r\n    ClientAreaHomeComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ClientAreaHomeComponent.prototype.createSubComponent = function (ClientAreaHomeTemplate, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(languageService, router, authService, routesService, messagesService, isBrowser, seoService, currency, breadcrumbsService, scriptService) {\r\n                this.languageService = languageService;\r\n                this.router = router;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.messagesService = messagesService;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.currency = currency;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.scriptService = scriptService;\r\n                this.footerData = ClientAreaHomeTemplate.FooterData;\r\n                this.headerData = header;\r\n                this.clientArea = new client_area_1.ClientAreaDetails();\r\n                this.lang = this.languageService.getLongLang();\r\n                this.messagesList = [];\r\n                this.numberOfMessages = 0;\r\n                this.bodyMod = [];\r\n                this.lastOrderDetailsPage = \"\";\r\n                this.userName = \"\";\r\n                this.pageIsInit = false;\r\n                //checking if invoices module is active\r\n                this.isActiveInvoicesModule = ClientAreaHomeTemplate.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = ClientAreaHomeTemplate.isCatalogPrivateActive;\r\n                this.breadcrumbs = ClientAreaHomeTemplate.BreadcrumbsInfo;\r\n                //Routes for menu-tabs\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.userName = this.authService.GetData().username;\r\n                this.clientArea = ClientAreaHomeTemplate.ClientAreaDetails;\r\n                this.messagesList = this.clientArea.OrderNoteList;\r\n                this.numberOfMessages = this.clientArea.NewNoteOrdersCount;\r\n                //getting of the link for details page of latest order\r\n                this.lastOrderId = String(this.clientArea[\"LastOrderId\"]);\r\n                var url = this.routesService.getRoutePath(\"AREA CLIENTI - ORDINE\")[0];\r\n                this.lastOrderDetailsPage = url.replace(':id', this.lastOrderId);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.showModal = function () {\r\n                var userId = this.authService.GetUserId();\r\n                var params = {\r\n                    CustomerId: userId,\r\n                    OrderId: \"0\",\r\n                    Lang: this.lang\r\n                };\r\n                var setMessSub = this.messagesService.setMessagesAsRead(params)\r\n                    .subscribe(function (result) { });\r\n                this.subManager.add(setMessSub);\r\n                $(\"#messagesModal\").modal(\"show\");\r\n                this.bodyMod = [];\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#basic').modal('hide');\r\n                this.numberOfMessages = 0;\r\n            };\r\n            ChildComponent.prototype.messagesDetails = function (orderId) {\r\n                $(\"#messagesModal\").modal(\"hide\");\r\n                var id = orderId;\r\n                var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n                orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n                this.router.navigate([orderDetailsPage]);\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: ClientAreaHomeTemplate.TemplateHtml\r\n                }),\r\n                __param(5, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _h) || Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaHomeComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(7, core_1.Inject('isBrowser')),\r\n        __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, Object])\r\n    ], ClientAreaHomeComponent);\r\n    return ClientAreaHomeComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.ClientAreaHomeComponent = ClientAreaHomeComponent;\r\n\n\n/***/ }),\n\n/***/ 399:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar router_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar messages_service_1 = __webpack_require__(130);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ClientAreaInvoicesComponent = (function () {\r\n    function ClientAreaInvoicesComponent(_compiler, componentHelper, _elementRef, authService, router, clientAreaService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.authService = authService;\r\n        this.router = router;\r\n        this.clientAreaService = clientAreaService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaInvoicesComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        var ClientAreaInvoicesListTemplate;\r\n        var userId = this.authService.GetUserId();\r\n        var showAll = \"-1\";\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, showAll, showAll, showAll).subscribe(function (result) {\r\n            ClientAreaInvoicesListTemplate = result;\r\n            if (ClientAreaInvoicesListTemplate.isActiveInvoicesModule) {\r\n                // Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(ClientAreaInvoicesListTemplate, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var subComponent = _this.redirectToHomepage(ClientAreaInvoicesListTemplate);\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n        });\r\n        this.subManager.add(invoicesSub);\r\n    };\r\n    ClientAreaInvoicesComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //if invoices module is not active, then redirect to homepage\r\n    ClientAreaInvoicesComponent.prototype.redirectToHomepage = function (ClientAreaInvoicesListTemplate) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(router) {\r\n                this.router = router;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                this.router.navigate([\"\"]);\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaInvoicesComponent.prototype.createSubComponent = function (ClientAreaInvoicesListTemplate, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(cookie, clientAreaService, router, authService, routesService, apiService, messagesService, mappings, currency, languageService, translateService, isBrowser, seoService, breadcrumbsService, scriptService) {\r\n                this.cookie = cookie;\r\n                this.clientAreaService = clientAreaService;\r\n                this.router = router;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.apiService = apiService;\r\n                this.messagesService = messagesService;\r\n                this.mappings = mappings;\r\n                this.currency = currency;\r\n                this.languageService = languageService;\r\n                this.translateService = translateService;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.scriptService = scriptService;\r\n                this.pageIsInit = false;\r\n                this.rows = [];\r\n                this.columns = [];\r\n                //filter fields\r\n                this.documentTypeSelect = \"-1\";\r\n                this.orderNumber = \"\";\r\n                this.invoiceNumber = \"\";\r\n                this.lang = this.languageService.getLongLang();\r\n                this.shortLang = this.languageService.getShortLang();\r\n                this.load = true;\r\n                this.footerData = ClientAreaInvoicesListTemplate.footerData;\r\n                this.headerData = header;\r\n                //Routes for menu-tabs\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.isActiveInvoicesModule = ClientAreaInvoicesListTemplate.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = ClientAreaInvoicesListTemplate.isCatalogPrivateActive;\r\n                this.breadcrumbs = ClientAreaInvoicesListTemplate.BreadcrumbsInfo;\r\n                this.italianLang = {\r\n                    \"sProcessing\": \"Attendere...\",\r\n                    \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n                    \"sZeroRecords\": \"Niente trovato\",\r\n                    \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n                    \"sInfoEmpty\": \"Non ci sono record\",\r\n                    \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n                    \"sInfoPostFix\": \"\",\r\n                    \"sUrl\": \"\",\r\n                    \"oPaginate\": {\r\n                        \"sPrevious\": \"«\",\r\n                        \"sNext\": \"»\"\r\n                    }\r\n                };\r\n                this.englishLang = {\r\n                    \"oPaginate\": {\r\n                        \"sPrevious\": \"«\",\r\n                        \"sNext\": \"»\"\r\n                    }\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            //translating of header columns titles\r\n            ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n                var translation = this.translateService.get(columnTitle)[\"value\"];\r\n                return translation;\r\n            };\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.columns = [\r\n                    { title: this.translateTableColumnTitle(\"OrderNumberInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"InvoiceNumberInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"CreationDateInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"TotalPriceInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"DocumentTypeInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"Download\") }\r\n                ];\r\n                //getting of Datatable data\r\n                this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n                this.load = false;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                if (this.shortLang == 'it') {\r\n                    this.currentLang = this.italianLang;\r\n                }\r\n                else {\r\n                    this.currentLang = this.englishLang;\r\n                }\r\n                //initialization of datatable\r\n                $('#datatable').DataTable({\r\n                    searching: false,\r\n                    ordering: false,\r\n                    sDom: 'Rlfrtlip',\r\n                    oLanguage: this.currentLang\r\n                });\r\n                //hiding of first 'per page' section, because we added it on the bottom of the table\r\n                $('.dataTables_length').not(':eq(1)').hide();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.getInvoicesList = function (userId, orderNumber, invoiceNumber, documentType) {\r\n                var _this = this;\r\n                var showAll = \"-1\";\r\n                this.load = true;\r\n                var invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, orderNumber, invoiceNumber, documentType)\r\n                    .subscribe(function (result) {\r\n                    _this.rows = result.ClientAreaInvoicesList;\r\n                    _this.load = false;\r\n                    _this.resetTable(_this.rows);\r\n                });\r\n                this.subManager.add(invoicesSub);\r\n            };\r\n            //destroying of current context of table and creating a new one with new data\r\n            ChildComponent.prototype.resetTable = function (tableData) {\r\n                $('#datatable').DataTable().destroy();\r\n                var currentLang = this.currentLang;\r\n                setTimeout(function () {\r\n                    $('#datatable').DataTable({\r\n                        data: this.rows,\r\n                        searching: false,\r\n                        ordering: false,\r\n                        sDom: 'Rlfrtlip',\r\n                        oLanguage: currentLang\r\n                    });\r\n                }, 0);\r\n                setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide(); }, 0);\r\n            };\r\n            ChildComponent.prototype.resetFilter = function () {\r\n                this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n                this.orderNumber = \"\";\r\n                this.invoiceNumber = \"\";\r\n                this.documentTypeSelect = \"-1\";\r\n                this.resetTable(this.rows);\r\n            };\r\n            ChildComponent.prototype.filterInvoicesList = function () {\r\n                var showAll = \"-1\";\r\n                var userId = this.authService.GetUserId();\r\n                //checking if inputs for filtering are empty, if they are, set them to \"show all\", which is '-1' value\r\n                var filterOrderNumber = this.orderNumber != \"\" ? this.orderNumber : showAll;\r\n                var filterInvoiceNumber = this.invoiceNumber != \"\" ? this.invoiceNumber : showAll;\r\n                //if all fields are empty, then don't send request to a server, but set rows value to start\r\n                if (filterOrderNumber == showAll && filterInvoiceNumber == showAll && this.documentTypeSelect == showAll) {\r\n                    this.resetFilter();\r\n                }\r\n                else {\r\n                    this.getInvoicesList(userId, filterOrderNumber, filterInvoiceNumber, this.documentTypeSelect);\r\n                }\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            __decorate([\r\n                core_1.Input(), \r\n                __metadata('design:type', Object)\r\n            ], ChildComponent.prototype, \"clientModel\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n                }),\r\n                __param(0, core_1.Inject('CookieService')),\r\n                __param(11, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _f) || Object, (typeof (_g = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _g) || Object, (typeof (_h = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _h) || Object, (typeof (_j = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _l) || Object, Boolean, (typeof (_m = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _p) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaInvoicesComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(7, core_1.Inject('isBrowser')),\r\n        __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object])\r\n    ], ClientAreaInvoicesComponent);\r\n    return ClientAreaInvoicesComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ClientAreaInvoicesComponent = ClientAreaInvoicesComponent;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar ComponentHelperService = (function () {\r\n    function ComponentHelperService(cache) {\r\n        this.cache = cache;\r\n    }\r\n    //Inject a component in the viewContainer\r\n    ComponentHelperService.prototype.injectComponent = function (compiler, containterRef, componentToInject) {\r\n        var _this = this;\r\n        var DynamicModule = (function () {\r\n            function DynamicModule() {\r\n            }\r\n            DynamicModule = __decorate([\r\n                core_1.NgModule({\r\n                    imports: [shared_module_1.SharedModule],\r\n                    declarations: [componentToInject]\r\n                }), \r\n                __metadata('design:paramtypes', [])\r\n            ], DynamicModule);\r\n            return DynamicModule;\r\n        }());\r\n        compiler.compileModuleAndAllComponentsAsync(DynamicModule)\r\n            .then(function (moduleWithFactories) {\r\n            _this.compFactory = moduleWithFactories.componentFactories.find(function (x) { return x.componentType === componentToInject; });\r\n            //from v5 - slow and brings in a lot of code. This line of code affects ram performance negatively\r\n            //https://angular.io/api/core/ReflectiveInjector\r\n            //const injector = ReflectiveInjector.fromResolvedProviders([], containterRef.parentInjector);\r\n            //Clearing current content before injecting new one\r\n            // containterRef.clear();\r\n            //containterRef.createComponent(compFactory, 0, injector);\r\n            _this.cmpRef = containterRef.createComponent(_this.compFactory, 0);\r\n            compiler.clearCache();\r\n            moduleWithFactories = null;\r\n        });\r\n    };\r\n    ComponentHelperService.prototype.clearMemory = function () {\r\n        if (this.cmpRef) {\r\n            this.cmpRef.destroy();\r\n        }\r\n        this.compFactory = null;\r\n        this.cache.clearAll();\r\n    };\r\n    ComponentHelperService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _a) || Object])\r\n    ], ComponentHelperService);\r\n    return ComponentHelperService;\r\n    var _a;\r\n}());\r\nexports.ComponentHelperService = ComponentHelperService;\r\n\n\n/***/ }),\n\n/***/ 40:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar BootboxService = (function () {\r\n    function BootboxService(translate, router, routesService, activatedRoute) {\r\n        this.translate = translate;\r\n        this.router = router;\r\n        this.routesService = routesService;\r\n        this.activatedRoute = activatedRoute;\r\n    }\r\n    BootboxService.prototype.i18nAlert = function (key, val) {\r\n        if (val === void 0) { val = ''; }\r\n        var mex = this.getLabel(key);\r\n        if (val == '') {\r\n            var procededToBuy = this.getLabel('continua_gli_acqisti');\r\n            var goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n            var res = void 0;\r\n            var bot_1 = this;\r\n            bootbox.dialog({\r\n                message: mex,\r\n                backdrop: true,\r\n                buttons: {\r\n                    confirm: {\r\n                        label: procededToBuy\r\n                    },\r\n                    cancel: {\r\n                        label: goToCart,\r\n                        callback: function () {\r\n                            bot_1.navigateToCart();\r\n                        },\r\n                        className: 'btn btn-primary'\r\n                    }\r\n                }\r\n            });\r\n        }\r\n        else {\r\n            bootbox.alert({\r\n                message: mex,\r\n                backdrop: true,\r\n            });\r\n        }\r\n    };\r\n    BootboxService.prototype.alertReorderDone = function (key, val) {\r\n        if (val === void 0) { val = ''; }\r\n        var mex = this.getLabel(key);\r\n        if (val == '') {\r\n            var procededToBuy = this.getLabel('continua_gli_acqisti');\r\n            var goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n            var res = void 0;\r\n            var bot_2 = this;\r\n            bootbox.dialog({\r\n                message: mex,\r\n                backdrop: true,\r\n                buttons: {\r\n                    confirm: {\r\n                        label: procededToBuy\r\n                    },\r\n                    cancel: {\r\n                        label: goToCart,\r\n                        callback: function () {\r\n                            bot_2.navigateToCart();\r\n                        },\r\n                        className: 'btn btn-primary'\r\n                    }\r\n                }\r\n            });\r\n        }\r\n        else {\r\n            bootbox.alert({\r\n                message: mex,\r\n                backdrop: true,\r\n            });\r\n        }\r\n    };\r\n    BootboxService.prototype.alertForRiorderFail = function (key) {\r\n        var mex = this.getLabel(key);\r\n        bootbox.alert({\r\n            message: mex,\r\n            backdrop: true,\r\n        });\r\n    };\r\n    BootboxService.prototype.navigateToCart = function () {\r\n        var Url = this.routesService.getRoutePath('CARRELLO')[0];\r\n        //this.router.navigate([Url]);\r\n        window.open(Url, \"_self\");\r\n    };\r\n    BootboxService.prototype.getLabel = function (label) {\r\n        var message;\r\n        this.translate.get(label, this.translate).subscribe(function (res) {\r\n            message = res;\r\n        });\r\n        return message;\r\n    };\r\n    BootboxService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _b) || Object, (typeof (_c = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _d) || Object])\r\n    ], BootboxService);\r\n    return BootboxService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.BootboxService = BootboxService;\r\n\n\n/***/ }),\n\n/***/ 400:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar messages_service_1 = __webpack_require__(130);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar core_2 = __webpack_require__(27);\r\n//Models\r\nvar user_login_1 = __webpack_require__(73);\r\nvar client_area_1 = __webpack_require__(97);\r\nvar client_area_2 = __webpack_require__(97);\r\nvar client_area_3 = __webpack_require__(97);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//import * as moment from 'moment'\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar md5_1 = __webpack_require__(279);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar ClientAreaOrderDetailsComponent = (function () {\r\n    function ClientAreaOrderDetailsComponent(_compiler, componentHelper, _elementRef, templateService, route, clientAreaService, cmsComponentService, authService, router, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.route = route;\r\n        this.clientAreaService = clientAreaService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.authService = authService;\r\n        this.router = router;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.clientArea = new client_area_1.ClientAreaOrderDetails();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaOrderDetailsComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        var subComponentTemplateUrl;\r\n        var orderId = 0;\r\n        var orderRowId = 0;\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            var templateHtml;\r\n            var id = params['id'];\r\n            var header;\r\n            var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                header = result;\r\n                var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n                    }\r\n                });\r\n                _this.subManager.add(SideMenuData);\r\n            });\r\n            _this.subManager.add(headDataSub);\r\n            if (id !== undefined) {\r\n                orderId = id;\r\n                var UserId = _this.authService.GetUserId();\r\n                var orderIdSub = _this.clientAreaService.getClientAreaOrderDetails(UserId, orderId).subscribe(function (result) {\r\n                    templateHtml = result;\r\n                    //Creating subcomponent whith the selected template to inject\r\n                    var subComponent = _this.createSubComponent(templateHtml, orderId, header);\r\n                    //injecting created component (OK)\r\n                    _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                });\r\n                _this.subManager.add(orderIdSub);\r\n            }\r\n            else {\r\n                var orderNotFoundSub = _this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(function (result) {\r\n                    templateHtml = result;\r\n                    //Creating subcomponent whith the selected template to inject\r\n                    var subComponent = _this.createSubComponent(templateHtml, orderId, header);\r\n                    //injecting created component (OK)\r\n                    _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                });\r\n                _this.subManager.add(orderNotFoundSub);\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n    };\r\n    ClientAreaOrderDetailsComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ClientAreaOrderDetailsComponent.prototype.createSubComponent = function (template, orderId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(clientAreaService, languageService, authService, routesService, cookie, router, activatedRoute, sanitizer, messagesService, isBrowser, seoService, currency, translateService, breadcrumbsService, paypalService, mappings, scriptService) {\r\n                this.clientAreaService = clientAreaService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.cookie = cookie;\r\n                this.router = router;\r\n                this.activatedRoute = activatedRoute;\r\n                this.sanitizer = sanitizer;\r\n                this.messagesService = messagesService;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.currency = currency;\r\n                this.translateService = translateService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.paypalService = paypalService;\r\n                this.mappings = mappings;\r\n                this.scriptService = scriptService;\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.isActiveInvoicesModule = template.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = template.isCatalogPrivateActive;\r\n                this.model = {\r\n                    ProcessOrder: \"\",\r\n                    processingSubject: \"\",\r\n                    Description: \"\"\r\n                };\r\n                this.footerData = template.footerData;\r\n                this.headerData = header;\r\n                this.clientArea = new client_area_1.ClientAreaOrderDetails();\r\n                this.selectedTipoSpedizione = \"\";\r\n                this.clientAreaList = new Array();\r\n                this.userLogin = user_login_1.UserLogin;\r\n                this.orderProcessMessageList = [];\r\n                this.message = new client_area_3.ClientAreaProcessingOrders();\r\n                this.lang = this.languageService.getLongLang();\r\n                this.authentication = this.authService.GetData();\r\n                this.userName = this.authentication.username;\r\n                this.userId = this.authService.GetUserId();\r\n                this.idord = new client_area_3.ClientAreaProcessingOrders();\r\n                this.upload = \"\";\r\n                this.info = \"active\";\r\n                this.comunicazioni = \"\";\r\n                this.noMessages = false;\r\n                this.checkValues = false;\r\n                this.waitingDetails = false;\r\n                this.pageIsInit = false;\r\n                this.pageIsAfterViewInit = false;\r\n                this.showSpinnerClick = false;\r\n                //checking if multiple shipment module is active\r\n                this.multipleShipmentActive = template.isActiveMultipleShipment;\r\n                this.isTipologiaPagamentoBonifico = template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico ? template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico : false;\r\n                this.numeroTrnInvalid = false;\r\n                this.numeroCroInvalid = false;\r\n                this.startTrnValue = template.ClientAreaOrderDetails.BonificoTrn;\r\n                this.startCroValue = template.ClientAreaOrderDetails.BonificoCro;\r\n                this.bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(template.BonificoUploadUrl);\r\n                this.bonificoUploadedFiles = template.ClientAreaOrderDetails.BonificoUploadedFilesNames;\r\n                this.breadcrumbs = template.BreadcrumbsInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                if (this.breadcrumbs != null) {\r\n                    var len = this.breadcrumbs.length;\r\n                    var nameLast = this.breadcrumbs[len - 1].BreadcrumbName;\r\n                    var translatedName = this.translateTableColumnTitle(nameLast);\r\n                    this.breadcrumbs[len - 1].BreadcrumbName = translatedName;\r\n                }\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.waitingDetails = false;\r\n                //if user from the page order list clicked on email\r\n                var routeParamsSub = this.activatedRoute.params.subscribe(function (params) {\r\n                    if (params[\"pagefrom\"] == \"section_upload\") {\r\n                        _this.upload = \"active\";\r\n                        _this.info = \"\";\r\n                        _this.comunicazioni = \"\";\r\n                    }\r\n                    else if (params[\"pagefrom\"] == \"section_comunicazioni\") {\r\n                        _this.comunicazioni = \"active\";\r\n                        _this.upload = \"\";\r\n                        _this.info = \"\";\r\n                        var orderId_1 = params[\"id\"];\r\n                        _this.setMessagesAsRead(orderId_1);\r\n                    }\r\n                    _this.waitingDetails = true;\r\n                    _this.clientArea = template.ClientAreaOrderDetails;\r\n                    _this.clientArea.CurrencyCode = \"EUR\";\r\n                    var language = _this.languageService.getShortLang();\r\n                    //cripted orderID with Md5\r\n                    _this.criptedOrderID = md5_1.Md5.hashStr(_this.clientArea.OrderId.toString());\r\n                    if (_this.clientArea.OrderNoteList.length > 0) {\r\n                        _this.noMessages = false;\r\n                    }\r\n                    else {\r\n                        _this.noMessages = true;\r\n                    }\r\n                    //url that the user will be redirected to after paying of order via paypal\r\n                    _this.paymentCompleteUrl = _this.clientArea.PaymentDoneUrl + _this.criptedOrderID;\r\n                    var paymentUrl = _this.clientArea.PaymentDoneUrl + _this.criptedOrderID;\r\n                    _this.paymentCompleteUrl = paymentUrl.replace('{lang}', language);\r\n                    if (_this.clientArea.NexiModel != null) {\r\n                        if (_this.clientArea.NexiModel.url_back_dettaglioOrdine != null) {\r\n                            _this.clientArea.NexiModel.url_back_dettaglioOrdine = _this.clientArea.NexiModel.url_back_dettaglioOrdine.replace('{lang}', language);\r\n                        }\r\n                    }\r\n                    //getting of link for upload files on order details page\r\n                    for (var _i = 0, _a = _this.clientArea.ProcessingOrderList; _i < _a.length; _i++) {\r\n                        var process = _a[_i];\r\n                        process.FileUploadSecuredUrl = _this.sanitizer.bypassSecurityTrustResourceUrl(process.FileUploadUrl);\r\n                        process.PreflightUploadSecuredUrl = _this.sanitizer.bypassSecurityTrustResourceUrl(process.PreflightUploadUrl);\r\n                    }\r\n                });\r\n                this.subManager.add(routeParamsSub);\r\n                if (this.clientArea.TrackingUrl != '' && this.clientArea.TrackingUrl != null) {\r\n                    if (this.clientArea.TrackingUrl.indexOf(\"http://\") == -1 && this.clientArea.TrackingUrl.indexOf(\"https://\") == -1) {\r\n                        this.clientArea.TrackingUrl = \"http://\" + this.clientArea.TrackingUrl;\r\n                    }\r\n                }\r\n                this.checkTipoSpedizione();\r\n            };\r\n            ChildComponent.prototype.checkTipoSpedizione = function () {\r\n                var tipoSped = this.clientArea.ProcessingOrderList.filter(function (item, i, arr) { return arr.findIndex(function (t) { return t.TipoTrasporto === item.TipoTrasporto; }) === i; });\r\n                var TipoTrasportoShipmentToFilter = \"S\";\r\n                if (tipoSped.length == 1) {\r\n                    TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                }\r\n                if (this.selectedTipoSpedizione == \"\") {\r\n                    this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //changing style of status bar(under detail order number) depending on multiple shipment module\r\n                if (this.multipleShipmentActive == true) {\r\n                    $(\"#paymentStatusBar\").addClass('col-md-5').addClass('tabs-style').removeClass('col-md-3').removeClass('tabs-styleNoAfter');\r\n                }\r\n                else {\r\n                    $(\"#paymentStatusBar\").addClass('col-md-3').addClass('tabs-styleNoAfter').removeClass('col-md-5').removeClass('tabs-style');\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n                    return;\r\n                }\r\n                if (this.clientArea.PaymentType == 'BancaSella' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00') {\r\n                    axerve.lightBox.shop = this.clientArea.BancaSellaModel.payload.shopId;\r\n                }\r\n                //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n                if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n                    var userId = this.authService.GetUserId();\r\n                    var params = {\r\n                        CustomerId: userId.toString(),\r\n                        OrderId: orderId.toString(),\r\n                        Lang: this.lang,\r\n                    };\r\n                    //-- Load paypal service and render a button for paypal payment\r\n                    this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url, this.mappings.Web_Api_Create_Paypal_Payment, this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n                }\r\n                this.pageIsAfterViewInit = true;\r\n            };\r\n            ChildComponent.prototype.confirmBonificoDetails = function () {\r\n                var _this = this;\r\n                // trim value before sending it to a server\r\n                this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.updateBonificoPaymentDetails(orderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n                    .subscribe(function (x) {\r\n                    _this.startTrnValue = _this.clientArea.BonificoTrn;\r\n                    _this.startCroValue = _this.clientArea.BonificoCro;\r\n                    //hiding of loading panel after we get all data we need\r\n                    _this.routesService.hidePageLoader();\r\n                    _this.hideBonificoModal();\r\n                }, function (err) {\r\n                    _this.clientArea.BonificoTrn = _this.startTrnValue;\r\n                    _this.clientArea.BonificoCro = _this.startCroValue;\r\n                });\r\n            };\r\n            // validate NumeroTrn input\r\n            ChildComponent.prototype.checkNumeroTrn = function (inputText) {\r\n                inputText = inputText.trim();\r\n                if (inputText.length < 31) {\r\n                    this.numeroTrnInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroTrnInvalid = true;\r\n                }\r\n            };\r\n            // validate NumeroCro input\r\n            ChildComponent.prototype.checkNumeroCro = function (inputNumber) {\r\n                if (inputNumber < 99999999999) {\r\n                    this.numeroCroInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroCroInvalid = true;\r\n                }\r\n            };\r\n            // getting uploaded files for this order and showing it inside of bonifico modal\r\n            ChildComponent.prototype.getBonificoUploadedFiles = function () {\r\n                var _this = this;\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.getBonificoUploadedFiles(orderId).subscribe(function (x) {\r\n                    _this.bonificoUploadedFiles = x;\r\n                    //hiding of loading panel after we get all data we need\r\n                    _this.routesService.hidePageLoader();\r\n                });\r\n            };\r\n            ChildComponent.prototype.showBonificoModal = function () {\r\n                $(\"#bonificoModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideBonificoModal = function () {\r\n                $(\"#bonificoModal\").modal(\"hide\");\r\n                this.clientArea.BonificoTrn = this.startTrnValue;\r\n                this.clientArea.BonificoCro = this.startCroValue;\r\n            };\r\n            //translating of header columns titles\r\n            ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n                var translation = this.translateService.get(columnTitle)[\"value\"];\r\n                return translation;\r\n            };\r\n            ChildComponent.prototype.payWithPaypal = function () {\r\n                var paypalText = \"pay_with_paypal\";\r\n                var translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n                var formHtml = '<form ngNoForm action=\\\"' + this.clientArea.GatewayUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"paypalForm\" id=\\'paypalForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">' +\r\n                    '<input type=\"hidden\" name=\"business\"  value=\\\"' + this.clientArea.GatewayAccount + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_name\"  value=\\\"' + this.clientArea.OrderNumber + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"currency_code\" value=\\\"' + this.clientArea.CurrencyCode + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"amount\" value=\\\"' + this.clientArea.TotalCost + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_number\"  value=\\\"' + this.clientArea.OrderId + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"return\" value=\\\"' + this.paymentCompleteUrl + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"rm\" value=\"2\">' +\r\n                    '<button (click)=\"payWithPaypal()\" class=\"btn btn-primary btn-lg\" type=\"button\" id=\"paypal-button-container\" name=\"paypal-button-container\">' +\r\n                    '<i class=\"fa fa-credit-card\"></i> ' + translatePaypal +\r\n                    '</button>' +\r\n                    '</form>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                var completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n                $('#paypalForm').submit();\r\n            };\r\n            ChildComponent.prototype.payWithNexi = function () {\r\n                var NexiForm = $(\"#completeNexiFormId\").html();\r\n                var NexiText = \"pay_with_nexi\";\r\n                var translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n                var formHtml = '<form ngNoForm action=\\\"' + this.clientArea.NexiModel.requestUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"nexiForm\" id=\\'nexiForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"alias\"  value=\\\"' + this.clientArea.NexiModel.alias + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"importo\"  value=\\\"' + this.clientArea.NexiModel.importo + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"divisa\"  value=\\\"' + this.clientArea.NexiModel.divisa + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"codTrans\" value=\\\"' + this.clientArea.NexiModel.codTrans + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url\" value=\\\"' + this.clientArea.NexiModel.url + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url_back\"  value=\\\"' + this.clientArea.NexiModel.url_back_ultimoStepCarrello + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"mac\" value=\\\"' + this.clientArea.NexiModel.mac + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"tipo_servizio\" value=\"paga_1click\"/>' +\r\n                    '<input type=\"hidden\" name=\"num_contratto\" value=\\\"' + this.clientArea.NexiModel.num_contratto + '\\\"/>';\r\n                if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n                    formHtml += '<input type=\"hidden\" name=\"gruppo\" value=\\\"' + this.clientArea.NexiModel.gruppo + '\\\"/>';\r\n                }\r\n                formHtml += '</form>' + NexiForm;\r\n                // formHtml += '</form> <button (click)=\"payWithNexi()\" class=\"btn btn-primary btn-lg w100\" type=\"button\" id=\"nexi-button-container\" name=\"nexi-button-container\">' +\r\n                // '<i class=\"fa fa-credit-card\"></i> ' + translateNexi +\r\n                // '</button>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                var completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n                $('#nexiForm').submit();\r\n            };\r\n            ChildComponent.prototype.payWithBancaSella = function () {\r\n                axerve.lightBox.open(this.clientArea.BancaSellaModel.payload.paymentID, this.clientArea.BancaSellaModel.payload.paymentToken, this.callback);\r\n            };\r\n            ChildComponent.prototype.callback = function (result) {\r\n                if (result.responseURL != null && result.responseURL != undefined && result.responseURL != \"\") {\r\n                    window.open(result.responseURL, \"_self\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setMessagesAsRead = function (orderId) {\r\n                var userId = this.authService.GetUserId();\r\n                var params = {\r\n                    CustomerId: userId.toString(),\r\n                    OrderId: orderId.toString(),\r\n                    Lang: this.lang\r\n                };\r\n                this.messagesService.setMessagesAsRead(params);\r\n            };\r\n            ChildComponent.prototype.showModal = function () {\r\n                $(\"#confirmModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#confirmModal').modal('hide');\r\n            };\r\n            //Canceling of orders with status in coda\r\n            ChildComponent.prototype.cancelOrders = function () {\r\n                var _this = this;\r\n                var userId = this.userId;\r\n                var cancelOrdSub = this.clientAreaService.cancelOrders(userId, orderId)\r\n                    .subscribe(function (response) {\r\n                    if (response == true) {\r\n                        _this.clientArea.Status = 4;\r\n                    }\r\n                });\r\n                this.subManager.add(cancelOrdSub);\r\n                this.hideModal();\r\n            };\r\n            ChildComponent.prototype.isDisabled = function (form) {\r\n                var res = false;\r\n                if (form.valid && this.model.ProcessOrder !== \"\") {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return res;\r\n                }\r\n            };\r\n            //sending of the message from the order details order\r\n            ChildComponent.prototype.processMessage = function () {\r\n                var _this = this;\r\n                this.showSpinnerClick = true;\r\n                var postMessageSub = this.clientAreaService.postClientAreaSendProcessOrderMessageint(this.userId, orderId, parseInt(this.model.ProcessOrder), this.clientArea.OrderNumber, this.clientArea.UserCreated, this.model.processingSubject, this.model.Description, this.lang)\r\n                    .subscribe(function (result) {\r\n                    if (_this.clientArea.OrderProcessMessageList == undefined || _this.clientArea.OrderProcessMessageList == null) {\r\n                        _this.clientArea.OrderProcessMessageList = [];\r\n                    }\r\n                    _this.clientArea.OrderProcessMessageList.push(new client_area_2.ClientAreaOrderProcessMessages(), { \"CreatedBy\": _this.clientArea.UserCreated, \"StringDateCreated\": result, \"Description\": _this.model.Description, \"From\": 2, \"Subject\": _this.model.processingSubject });\r\n                    _this.noMessages = false;\r\n                    _this.checkValues = false;\r\n                    _this.model.ProcessOrder = \"\";\r\n                    _this.model.processingSubject = \"\";\r\n                    _this.model.Description = \"\";\r\n                    _this.showSpinnerClick = false;\r\n                });\r\n                this.subManager.add(postMessageSub);\r\n            };\r\n            ChildComponent.prototype.refreshProcessFiles = function (process) {\r\n                var processFilesSub = this.clientAreaService.getProcessOrderFiles(process.Id, orderId).subscribe(function (result) {\r\n                    result.ListOfFiles.forEach(function (element) {\r\n                        if (element.Size.endsWith(\"byte\")) {\r\n                            element.Size = element.Size.substring(0, element.Size.length - 3);\r\n                        }\r\n                    });\r\n                    process.FileState = result.FileState;\r\n                    process.Files = result.ListOfFiles;\r\n                });\r\n                this.subManager.add(processFilesSub);\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: template.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('CookieService')),\r\n                __param(9, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _g) || Object, (typeof (_h = typeof platform_browser_1.DomSanitizer !== 'undefined' && platform_browser_1.DomSanitizer) === 'function' && _h) || Object, (typeof (_j = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _l) || Object, (typeof (_m = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof paypal_service_1.PaypalService !== 'undefined' && paypal_service_1.PaypalService) === 'function' && _p) || Object, (typeof (_q = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _q) || Object, (typeof (_r = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _r) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaOrderDetailsComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(9, core_1.Inject('isBrowser')),\r\n        __param(12, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, (typeof (_h = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _h) || Object, (typeof (_j = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _l) || Object, Object])\r\n    ], ClientAreaOrderDetailsComponent);\r\n    return ClientAreaOrderDetailsComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ClientAreaOrderDetailsComponent = ClientAreaOrderDetailsComponent;\r\n\n\n/***/ }),\n\n/***/ 401:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(14);\r\nvar validation_service_1 = __webpack_require__(131);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\n//Models\r\nvar client_area_1 = __webpack_require__(97);\r\nvar client_area_2 = __webpack_require__(97);\r\nvar register_1 = __webpack_require__(252);\r\nvar company_1 = __webpack_require__(253);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ClientAreaProfileComponent = (function () {\r\n    function ClientAreaProfileComponent(_compiler, componentHelper, _elementRef, clientAreaService, router, authService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.clientAreaService = clientAreaService;\r\n        this.router = router;\r\n        this.authService = authService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.authentication = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    ClientAreaProfileComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        var templateHtmlUserProfile;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(function (result) {\r\n            templateHtmlUserProfile = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(templateHtmlUserProfile, header);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(userProfileSub);\r\n    };\r\n    ClientAreaProfileComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    ClientAreaProfileComponent.prototype.createSubComponent = function (userProfile, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(clientAreaService, languageService, authService, routesService, isBrowser, seoService, breadcrumbsService, validationService, scriptService) {\r\n                this.clientAreaService = clientAreaService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this.seoService = seoService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.validationService = validationService;\r\n                this.scriptService = scriptService;\r\n                this.onCreate = new core_1.EventEmitter();\r\n                this.model = {\r\n                    UserId: 0,\r\n                    Address: \"\",\r\n                    City: \"\",\r\n                    Prov: \"\",\r\n                    Cap: \"\",\r\n                    CompanyName: \"\",\r\n                    Piva: \"\",\r\n                    TaxCode: \"\",\r\n                    Name: \"\",\r\n                    SubName: \"\",\r\n                    Telephone: \"\",\r\n                    Mobile: \"\",\r\n                    CF: \"\",\r\n                    PecEmail: \"\",\r\n                    CodiceDestinatario: \"\",\r\n                    CurrentPassword: \"\",\r\n                    Password: \"\",\r\n                    PasswordRepeat: \"\",\r\n                    AddressRadio: \"\",\r\n                    Language: \"\",\r\n                    AddressNumber: \"\",\r\n                    DefaultAddress: 999999\r\n                };\r\n                this.modelAddAndRemoveAddress = {\r\n                    UserId: \"\",\r\n                    AddressId: \"\"\r\n                };\r\n                this.footerData = userProfile.footerData;\r\n                this.headerData = header;\r\n                this.clientAreaProfile = new client_area_1.ClientAreaUserProfile();\r\n                this.addresses = [];\r\n                this.clientAddress = new client_area_2.ClientAreaUserAddress();\r\n                this.company = new company_1.Company();\r\n                this.register = new register_1.Register();\r\n                this.authentication = this.authService.GetData();\r\n                this.isExist = [];\r\n                this.pageIsInit = false;\r\n                this.userId = this.authService.GetUserId();\r\n                this.decryptedUserId = this.authService.GetDecryptedUserId();\r\n                this.user = userProfile.ClientAreaUserProfile;\r\n                this.userGroup = this.user.UserGroup;\r\n                this.showSpinnerClick = false;\r\n                this.breadcrumbs = userProfile.BreadcrumbsInfo;\r\n                this.pageIsOnDestroy = false;\r\n                this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n                this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n                this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n                this.areaClientiCatalogoRiservato = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n                this.isActiveInvoicesModule = userProfile.isActiveInvoicesModule;\r\n                this.isCatalogPrivateActive = userProfile.isCatalogPrivateActive;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                this.clientAreaProfile = this.user;\r\n                //spliting address street and number\r\n                var address = this.clientAreaProfile.Address;\r\n                var lastIndex = -1;\r\n                if (address) {\r\n                    lastIndex = address.lastIndexOf(\" \");\r\n                }\r\n                var addressStreet = \"\";\r\n                var addressNumber = \"\";\r\n                if (lastIndex > -1) {\r\n                    addressStreet = address.slice(0, lastIndex);\r\n                    addressNumber = address.slice(lastIndex, address.length).trim();\r\n                }\r\n                this.model.CompanyName = this.user.CompanyName;\r\n                this.model.Piva = this.user.Piva;\r\n                this.model.TaxCode = this.user.TaxCode;\r\n                this.model.Name = this.user.ContactFirstName;\r\n                this.model.SubName = this.user.ContactLastName;\r\n                this.model.Address = addressStreet;\r\n                this.model.AddressNumber = addressNumber;\r\n                this.model.City = this.user.City;\r\n                this.model.Prov = this.user.AreaCode;\r\n                this.model.Cap = this.user.ZipCode;\r\n                this.model.Telephone = this.user.ContactPhone;\r\n                this.model.DefaultAddress = this.user.DefaultAddressId;\r\n                this.model.Mobile = this.user.ContactMobile;\r\n                this.model.PecEmail = this.user.PecEmail;\r\n                this.model.CodiceDestinatario = this.user.CodiceDestinatario;\r\n                this.id1 = this.user.DefaultAddressId;\r\n                for (var key in this.clientAreaProfile.Addresses) {\r\n                    this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n                }\r\n                // if user group is 4, pec email and cod. destinatario are not required\r\n                if (this.userGroup == 4) {\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                if (userProfile.isActiveAddressVerificationModule) {\r\n                    var addressVerificationKey = userProfile.AddressVerificationCode;\r\n                    if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n                        this.addAddressVerificationScripts(addressVerificationKey);\r\n                        $(\"#Cap\").prop('disabled', true);\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#Cap\").prop('disabled', false);\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.isCodDestRequired = function () {\r\n                var retVal = false;\r\n                if (this.userGroup != \"4\") {\r\n                    if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isPecEmailRequired = function () {\r\n                var retVal = false;\r\n                if (this.userGroup != \"4\") {\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n                return retVal;\r\n            };\r\n            //adding all scripts and elements connected to address verification feature                \r\n            ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n                var suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n                var address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n                var jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n                $('body > universal-script').before(suggest);\r\n                $('body > universal-script').before(jquery);\r\n                $('body > universal-script').before(address);\r\n            };\r\n            //removing all scripts and elements connected to address verification feature                            \r\n            ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n                $(\"#suggestId\").remove();\r\n                $(\"#jqueryuicss\").remove();\r\n                $(\"#jqueryuijs\").remove();\r\n                $(\"#suggestcss\").remove();\r\n                $(\"#initui\").remove();\r\n                $(\"#inituicf\").remove();\r\n                $(\"#ui-id-1\").remove();\r\n                $(\"#ui-id-2\").remove();\r\n                $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n                $(\"#jqueryId\").remove();\r\n                $(\"#addressVerificationId\").remove();\r\n            };\r\n            ChildComponent.prototype.checkAddressValidation = function () {\r\n                this.model.Prov = $(\"#Prov\").val();\r\n                this.model.Cap = $(\"#Cap\").val();\r\n                this.model.City = $(\"#City\").val();\r\n            };\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            ChildComponent.prototype.validatePhone = function (event) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            };\r\n            ChildComponent.prototype.setAddressValue = function () {\r\n                var streetTypeId = $(\"#streetTypeId\").val();\r\n                var street = $(\"#Address\").val();\r\n                if (streetTypeId != null && streetTypeId != \"\") {\r\n                    this.model.Address = streetTypeId + \" \" + street;\r\n                }\r\n                else {\r\n                    this.model.Address = street;\r\n                }\r\n                var cap = $(\"#Cap\").val();\r\n                this.model.Cap = cap;\r\n            };\r\n            ChildComponent.prototype.changeUserProfile = function (valid, model) {\r\n                var _this = this;\r\n                model.UserId = this.authService.GetUserId();\r\n                var street = this.model.Address;\r\n                //concating of address street and number to one model field\r\n                this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n                this.showSpinnerClick = true;\r\n                var updateProfileSub = this.clientAreaService.updateUserProfile(model).subscribe(function (result) {\r\n                    if (result) {\r\n                        // show success message\r\n                        _this.updateSuccessful = true;\r\n                        _this.updateFailed = false;\r\n                    }\r\n                    else {\r\n                        // show error message\r\n                        _this.updateSuccessful = false;\r\n                        _this.updateFailed = true;\r\n                    }\r\n                    _this.model.Address = street;\r\n                    _this.showSpinnerClick = false;\r\n                });\r\n                this.subManager.add(updateProfileSub);\r\n            };\r\n            ;\r\n            ChildComponent.prototype.showModal = function (index, item) {\r\n                $(\"#editProfileModal\").modal(\"show\");\r\n                this.index = index;\r\n                this.item = item;\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#editProfileModal').modal('hide');\r\n            };\r\n            ChildComponent.prototype.addNewAddress = function () {\r\n                var _this = this;\r\n                this.modelAddAndRemoveAddress.UserId = this.userId;\r\n                var newAddressSub = this.clientAreaService.addNewAddress(this.modelAddAndRemoveAddress).subscribe(function (result) {\r\n                    _this.clientAreaProfile.Addresses.push(result);\r\n                    var userProfileSub = _this.clientAreaService.getUserAreaProfile(_this.userId).subscribe(function (result) {\r\n                        _this.clientAreaProfile = result.ClientAreaUserProfile;\r\n                        _this.model.CompanyName = result.ClientAreaUserProfile.CompanyName;\r\n                        _this.model.Piva = result.ClientAreaUserProfile.Piva;\r\n                        _this.model.TaxCode = result.ClientAreaUserProfile.TaxCode;\r\n                        _this.model.Name = result.ClientAreaUserProfile.ContactFirstName;\r\n                        _this.model.SubName = result.ClientAreaUserProfile.ContactLastName;\r\n                        _this.model.Address = result.ClientAreaUserProfile.Address;\r\n                        _this.model.City = result.ClientAreaUserProfile.City;\r\n                        _this.model.Prov = result.ClientAreaUserProfile.AreaCode;\r\n                        _this.model.Cap = result.ClientAreaUserProfile.ZipCode;\r\n                        _this.model.Telephone = result.ClientAreaUserProfile.ContactPhone;\r\n                        _this.model.DefaultAddress = result.ClientAreaUserProfile.DefaultAddressId;\r\n                        _this.model.Mobile = result.ClientAreaUserProfile.ContactMobile;\r\n                        _this.model.PecEmail = result.ClientAreaUserProfile.PecEmail;\r\n                        _this.model.CodiceDestinatario = result.ClientAreaUserProfile.CodiceDestinatario;\r\n                        _this.id1 = result.ClientAreaUserProfile.DefaultAddressId;\r\n                        for (var key in _this.clientAreaProfile.Addresses) {\r\n                            _this.isExist[_this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n                        }\r\n                    });\r\n                    _this.subManager.add(userProfileSub);\r\n                });\r\n                this.subManager.add(newAddressSub);\r\n            };\r\n            ChildComponent.prototype.SubmitPassword = function (model) {\r\n                var _this = this;\r\n                model.UserId = this.userId;\r\n                this.showSpinnerClick = true;\r\n                var updatePassSub = this.clientAreaService.updateUserPassword(model).subscribe(function (result) {\r\n                    if (result == true) {\r\n                        _this.changePasswordSuccessful = true;\r\n                        _this.changePasswordFailed = false;\r\n                    }\r\n                    else {\r\n                        // show error message\r\n                        _this.changePasswordSuccessful = false;\r\n                        _this.changePasswordFailed = true;\r\n                    }\r\n                    _this.showSpinnerClick = false;\r\n                });\r\n                this.subManager.add(updatePassSub);\r\n            };\r\n            ChildComponent.prototype.setDefaultAddress = function (index, item) {\r\n                this.clientAreaProfile.DefaultAddressId = 0;\r\n                for (var _i = 0, _a = this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n                    var address = _a[_i];\r\n                    if (address.AddressId === this.clientAreaProfile.Addresses[index].AddressId) {\r\n                        this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n                    }\r\n                    this.id1 = this.clientAreaProfile.DefaultAddressId;\r\n                }\r\n            };\r\n            ;\r\n            ChildComponent.prototype.resetAddress = function () {\r\n                for (var _i = 0, _a = this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n                    var address = _a[_i];\r\n                    this.clientAreaProfile.DefaultAddressId = 0;\r\n                    this.id1 = 0;\r\n                }\r\n                ;\r\n            };\r\n            ;\r\n            ChildComponent.prototype.updateUserAddresses = function (model, valid, item) {\r\n                var _this = this;\r\n                this.showSpinnerClick = true;\r\n                var updateAddressSub = this.clientAreaService.updateAddresses(this.clientAreaProfile.Addresses, this.userId, this.clientAreaProfile.DefaultAddressId)\r\n                    .subscribe(function (result) {\r\n                    var defaultFound = false;\r\n                    if (result) {\r\n                        for (var _i = 0, _a = _this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n                            var address = _a[_i];\r\n                            if (_this.clientAreaProfile.DefaultAddressId > 0) {\r\n                                _this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n                                defaultFound = true;\r\n                            }\r\n                        }\r\n                        _this.updateAddressFailed = false;\r\n                        _this.updateAddressSuccessful = true;\r\n                    }\r\n                    else {\r\n                        _this.updateAddressFailed = true;\r\n                        _this.updateAddressSuccessful = false;\r\n                    }\r\n                    if (defaultFound == false) {\r\n                        _this.clientAreaProfile.DefaultAddressId = 0;\r\n                    }\r\n                    _this.showSpinnerClick = false;\r\n                });\r\n                this.subManager.add(updateAddressSub);\r\n            };\r\n            ;\r\n            ChildComponent.prototype.removeAddress = function () {\r\n                var _this = this;\r\n                this.modelAddAndRemoveAddress.UserId = this.userId;\r\n                this.modelAddAndRemoveAddress.AddressId = this.item.AddressId;\r\n                var removeAddressSub = this.clientAreaService.removeAddress(this.modelAddAndRemoveAddress).subscribe(function (result) {\r\n                    _this.clientAreaProfile.Addresses.splice(_this.index, 1);\r\n                    try {\r\n                        _this.isExist[_this.item.AddressId] = false;\r\n                        _this.model.DefaultAddress = 0;\r\n                        _this.id1 = 0;\r\n                        _this.resetAddress();\r\n                        _this.hideModal();\r\n                    }\r\n                    catch (exception) { }\r\n                });\r\n                this.subManager.add(removeAddressSub);\r\n            };\r\n            ;\r\n            ChildComponent.prototype.isDisabled = function (form) {\r\n                var res = false;\r\n                if (form.valid && this.model.Password.length >= 4 && this.model.Password.length <= 10 && this.model.Password == this.model.PasswordRepeat) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return res;\r\n                }\r\n            };\r\n            ChildComponent.prototype.getClassforMenuClientArea = function () {\r\n                var result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\";\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\";\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n                //this method is removing all scripts and elements connected to address verification feature\r\n                var addressVerificationKey = userProfile.AddressVerificationCode;\r\n                this.removeAddressVerificationScripts(addressVerificationKey);\r\n                this.subManager.unsubscribe();\r\n                this.pageIsOnDestroy = true;\r\n            };\r\n            __decorate([\r\n                core_1.Output(), \r\n                __metadata('design:type', Object)\r\n            ], ChildComponent.prototype, \"onCreate\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: userProfile.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object, (typeof (_g = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _g) || Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    ClientAreaProfileComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(7, core_1.Inject('isBrowser')),\r\n        __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object])\r\n    ], ClientAreaProfileComponent);\r\n    return ClientAreaProfileComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ClientAreaProfileComponent = ClientAreaProfileComponent;\r\n\n\n/***/ }),\n\n/***/ 402:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentBancaSellaConfirmationComponent = (function () {\r\n    function PaymentBancaSellaConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PaymentBancaSellaConfirmationComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var id = 0;\r\n        var Status = \"\";\r\n        var paramsSub = this.route.queryParams.subscribe(function (params) {\r\n            id = params['orderid'];\r\n            Status = params['Status'];\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        var orderCheckout;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var thankYouSub = this.templateService.getThankYouBancaSellaInfo(\"orderBancaSellaPageTemplate\", id, Status).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(orderCheckout, id, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouNexiId, id);\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(thankYouSub);\r\n    };\r\n    PaymentBancaSellaConfirmationComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject\r\n    PaymentBancaSellaConfirmationComponent.prototype.createSubComponent = function (orderCheckout, OrderId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, translate) {\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.activatedRoute = activatedRoute;\r\n                this.languageService = languageService;\r\n                this.translate = translate;\r\n                this.success = false;\r\n                this.errorMessage = \"\";\r\n                this.failed = false;\r\n                this.serverError = false;\r\n                this.orderId = OrderId;\r\n                this.seoInfo = orderCheckout.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.createScript = 0;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.footerData = orderCheckout.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n                if (orderCheckout.result == false) {\r\n                    this.success = false;\r\n                    this.failed = true;\r\n                    this.serverError = false;\r\n                    this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n                    this.createScript = -1;\r\n                }\r\n                else {\r\n                    this.success = true;\r\n                    this.failed = false;\r\n                    this.serverError = false;\r\n                    this.createScript = 1;\r\n                }\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //Eventually retrieving the script to append\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: orderCheckout.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PaymentBancaSellaConfirmationComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PaymentBancaSellaConfirmationComponent);\r\n    return PaymentBancaSellaConfirmationComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentBancaSellaConfirmationComponent = PaymentBancaSellaConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 403:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar md5_1 = __webpack_require__(279);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentConfirmationComponent = (function () {\r\n    function PaymentConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.paramsObj = {};\r\n        this.isNewPaypalImplementation = false;\r\n    }\r\n    PaymentConfirmationComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var id = '0';\r\n        var orderCheckout;\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            id = params['orderid'] || 0;\r\n        });\r\n        var sub = this.route\r\n            .queryParams\r\n            .subscribe(function (params) {\r\n            if (id == '0') {\r\n                id = params['orderId'] ? md5_1.Md5.hashStr(params['orderId']).toString() : '0';\r\n                _this.isNewPaypalImplementation = true;\r\n            }\r\n            else {\r\n                _this.isNewPaypalImplementation = false;\r\n            }\r\n            _this.paramsObj = params;\r\n        });\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var thankYouSub = this.templateService.getThankYouPagePaypalInfo(\"orderCheckoutPageTemplate\", id).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(orderCheckout, _this.paramsObj, _this.isNewPaypalImplementation, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var typeId = '';\r\n                //-- Get Payment Confirmation row id + '_' + orderId, so we can use it for getting scripts\r\n                if (_this.isNewPaypalImplementation) {\r\n                    var OrderId = _this.paramsObj['orderId'];\r\n                    typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePaypalId, OrderId);\r\n                }\r\n                else {\r\n                    typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePaypalId, id);\r\n                }\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        this.subManager.add(sub);\r\n        this.subManager.add(thankYouSub);\r\n    };\r\n    PaymentConfirmationComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject\r\n    PaymentConfirmationComponent.prototype.createSubComponent = function (orderCheckout, urlParams, isNewPaypalImplementation, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, orderPaymentService, route) {\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.activatedRoute = activatedRoute;\r\n                this.languageService = languageService;\r\n                this.orderPaymentService = orderPaymentService;\r\n                this.route = route;\r\n                this.success = false;\r\n                this.failed = false;\r\n                this.serverError = false;\r\n                this.seoInfo = orderCheckout.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.createScript = 0;\r\n                this.footerData = orderCheckout.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n                //-- If paypal payment is implemented on new way, at this point, the order is already set as paid, else we need to set it\r\n                if (isNewPaypalImplementation) {\r\n                    this.orderId = urlParams['orderId'];\r\n                    if (urlParams.isError.toLowerCase() === 'true') {\r\n                        this.failed = true;\r\n                        this.success = false;\r\n                        this.serverError = false;\r\n                        this.createScript = -1;\r\n                    }\r\n                    else {\r\n                        this.failed = false;\r\n                        this.success = true;\r\n                        this.serverError = false;\r\n                        this.createScript = 1;\r\n                    }\r\n                }\r\n                else {\r\n                    var sub = this.route.queryParams.subscribe(function (parameters) {\r\n                        _this.orderId = parameters['item_number'] || 0;\r\n                        _this.hashedOrderId = md5_1.Md5.hashStr(_this.orderId);\r\n                        var paramsRouteSub = _this.activatedRoute.params.subscribe(function (params) {\r\n                            _this.encryptedOrder = params['orderid'] || 0;\r\n                        });\r\n                        _this.subManager.add(paramsRouteSub);\r\n                        //Checking of order and set it as paid\r\n                        if (parameters['st'] == \"Completed\" && _this.encryptedOrder == _this.hashedOrderId) {\r\n                            _this.setOrderAsPaid();\r\n                        }\r\n                        else {\r\n                            _this.failed = true;\r\n                            _this.success = false;\r\n                        }\r\n                    });\r\n                }\r\n            };\r\n            ChildComponent.prototype.setOrderAsPaid = function () {\r\n                var _this = this;\r\n                var orderPaySub = this.orderPaymentService.setOrderAsPayed(this.orderId)\r\n                    .subscribe(function (result) {\r\n                    if (result == 1) {\r\n                        _this.success = true;\r\n                        _this.failed = false;\r\n                        _this.serverError = false;\r\n                        _this.createScript = 1;\r\n                    }\r\n                    else if (result == -1) {\r\n                        _this.success = false;\r\n                        _this.failed = true;\r\n                        _this.serverError = false;\r\n                        _this.createScript = -1;\r\n                    }\r\n                    else {\r\n                        _this.success = false;\r\n                        _this.failed = false;\r\n                        _this.serverError = true;\r\n                        _this.createScript = -1;\r\n                    }\r\n                });\r\n                this.subManager.add(orderPaySub);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: orderCheckout.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof order_payment_service_1.OrderPaymentService !== 'undefined' && order_payment_service_1.OrderPaymentService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PaymentConfirmationComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PaymentConfirmationComponent);\r\n    return PaymentConfirmationComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentConfirmationComponent = PaymentConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 404:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentNexiConfirmationComponent = (function () {\r\n    function PaymentNexiConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PaymentNexiConfirmationComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var id = 0;\r\n        var messaggio = \"\";\r\n        var data = \"\";\r\n        var orario = \"\";\r\n        var paramsSub = this.route.queryParams.subscribe(function (params) {\r\n            id = params['orderid'];\r\n            messaggio = params['messaggio'];\r\n            data = params['data'];\r\n            orario = params['orario'];\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        var orderCheckout;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var thankYouSub = this.templateService.getThankYouNexiInfo(\"ordernexiPageTemplate\", id, messaggio, data, orario).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(orderCheckout, id, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouNexiId, id);\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(thankYouSub);\r\n    };\r\n    PaymentNexiConfirmationComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject\r\n    PaymentNexiConfirmationComponent.prototype.createSubComponent = function (orderCheckout, OrderId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, translate) {\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.activatedRoute = activatedRoute;\r\n                this.languageService = languageService;\r\n                this.translate = translate;\r\n                this.success = false;\r\n                this.errorMessage = \"\";\r\n                this.failed = false;\r\n                this.serverError = false;\r\n                this.orderId = OrderId;\r\n                this.seoInfo = orderCheckout.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.createScript = 0;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.footerData = orderCheckout.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n                if (orderCheckout.result == false) {\r\n                    this.success = false;\r\n                    this.failed = true;\r\n                    this.serverError = false;\r\n                    this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n                    this.createScript = -1;\r\n                }\r\n                else {\r\n                    this.success = true;\r\n                    this.failed = false;\r\n                    this.serverError = false;\r\n                    this.createScript = 1;\r\n                }\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //Eventually retrieving the script to append\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: orderCheckout.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PaymentNexiConfirmationComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PaymentNexiConfirmationComponent);\r\n    return PaymentNexiConfirmationComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentNexiConfirmationComponent = PaymentNexiConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 405:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentUnicreditConfirmationComponent = (function () {\r\n    function PaymentUnicreditConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    PaymentUnicreditConfirmationComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var id = 0;\r\n        var paramsSub = this.route.params.subscribe(function (params) {\r\n            id = params['orderid'];\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        var orderCheckout;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //console.log(\"sono qui\")\r\n        var thankYouSub = this.templateService.getThankYouPagOnlineInfo(\"orderUnicreditPageTemplate\", id).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(orderCheckout, id, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                var typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePagOnlineId, id);\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(thankYouSub);\r\n    };\r\n    PaymentUnicreditConfirmationComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject\r\n    PaymentUnicreditConfirmationComponent.prototype.createSubComponent = function (orderCheckout, OrderId, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, translate, orderPaymentService) {\r\n                this.routesService = routesService;\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.isBrowser = isBrowser;\r\n                this.activatedRoute = activatedRoute;\r\n                this.languageService = languageService;\r\n                this.translate = translate;\r\n                this.orderPaymentService = orderPaymentService;\r\n                this.success = false;\r\n                this.errorMessage = \"\";\r\n                this.failed = false;\r\n                this.serverError = false;\r\n                this.orderId = OrderId;\r\n                this.seoInfo = orderCheckout.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.createScript = 0;\r\n                //subManager = new Subscription();\r\n                this.resultPagOnline = orderCheckout.resultPagOnline;\r\n                this.footerData = orderCheckout.FooterData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n                if (this.orderId == -1) {\r\n                    this.success = false;\r\n                    this.failed = true;\r\n                    this.serverError = false;\r\n                    this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n                    this.createScript = -1;\r\n                }\r\n                else {\r\n                    //setting order as paid                                \r\n                    //let checkPaymentSub = this.orderPaymentService.CheckIsOrderPayedUnicredit(this.orderId)\r\n                    //.subscribe(result => {\r\n                    var res = this.resultPagOnline.split(\"|\");\r\n                    if (res[0] == \"1\") {\r\n                        this.success = true;\r\n                        this.failed = false;\r\n                        this.serverError = false;\r\n                        this.createScript = 1;\r\n                    }\r\n                    else if (res[0] == \"-1\") {\r\n                        this.success = false;\r\n                        this.failed = true;\r\n                        this.serverError = false;\r\n                        this.errorMessage = res[1];\r\n                        this.createScript = -1;\r\n                    }\r\n                    else {\r\n                        this.success = false;\r\n                        this.failed = false;\r\n                        this.serverError = true;\r\n                        this.errorMessage = res[1];\r\n                        this.createScript = -1;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //Eventually retrieving the script to append\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                //this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: orderCheckout.TemplateHtml\r\n                }),\r\n                __param(4, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, (typeof (_h = typeof order_payment_service_1.OrderPaymentService !== 'undefined' && order_payment_service_1.OrderPaymentService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    PaymentUnicreditConfirmationComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], PaymentUnicreditConfirmationComponent);\r\n    return PaymentUnicreditConfirmationComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentUnicreditConfirmationComponent = PaymentUnicreditConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 406:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar user_login_1 = __webpack_require__(73);\r\nvar validation_service_1 = __webpack_require__(131);\r\nvar login_service_1 = __webpack_require__(179);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar router_1 = __webpack_require__(12);\r\nvar register_1 = __webpack_require__(252);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar company_service_1 = __webpack_require__(129);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar header_service_1 = __webpack_require__(127);\r\nvar company_1 = __webpack_require__(253);\r\nvar QuickRegistrationComponent = (function () {\r\n    function QuickRegistrationComponent(_compiler, componentHelper, _elementRef, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.isBrowser = isBrowser;\r\n    }\r\n    QuickRegistrationComponent.prototype.ngOnInit = function () {\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentWidgetData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentWidgetData, this.companyInfo);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    };\r\n    QuickRegistrationComponent.prototype.createSubComponent = function (quickRegistrationData, companyInfo) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(isBrowser, loginService, checkExists, router, routesService, activeRoute, languageService, companyService, configurationService, cookie, validationService, authService, headerService) {\r\n                this.isBrowser = isBrowser;\r\n                this.loginService = loginService;\r\n                this.checkExists = checkExists;\r\n                this.router = router;\r\n                this.routesService = routesService;\r\n                this.activeRoute = activeRoute;\r\n                this.languageService = languageService;\r\n                this.companyService = companyService;\r\n                this.configurationService = configurationService;\r\n                this.cookie = cookie;\r\n                this.validationService = validationService;\r\n                this.authService = authService;\r\n                this.headerService = headerService;\r\n                this.pageIsInit = false;\r\n                //-- Email controls\r\n                this.isEmailValid = false;\r\n                this.emailExists = false;\r\n                //-- Partita iva controls\r\n                this.isPivaValid = false;\r\n                this.pivaExists = false;\r\n                //-- Codice Fiscale controls\r\n                this.isCFValid = false;\r\n                this.CFExists = false;\r\n                this.pageFrom = \"\";\r\n                this.load = false;\r\n                this.subManager = new rxjs_1.Subscription();\r\n                this.modelRegistration = new register_1.QuickRegister();\r\n                this.lang = this.languageService.getLongLang();\r\n                this.company = companyInfo;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var paramsSub = this.activeRoute.params.subscribe(function (params) {\r\n                    var paramPageFrom = params['pagefrom'];\r\n                    if (paramPageFrom !== undefined) {\r\n                        _this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n                this.subManager.add(paramsSub);\r\n                //-- Get configuration from server\r\n                this.setConfiguration();\r\n            };\r\n            ChildComponent.prototype.finishQuickRegistration = function () {\r\n                var _this = this;\r\n                this.load = true;\r\n                //-- After submiting form, we are disabling a button until we get a response\r\n                this.submitButton.nativeElement.disabled = true;\r\n                var quickRegisterUserObj = this.setQuickRegisterObject();\r\n                //-- Save quick registration user info in cookies so we can reuse it later\r\n                this.cookie.putObject(\"QuickRegisterUser\", quickRegisterUserObj);\r\n                var isQuickRegister = true;\r\n                this.cookie.put('IsQuickRegistered', isQuickRegister.toString());\r\n                var sendInfoSub = this.loginService.quickRegister(this.modelRegistration)\r\n                    .subscribe(function (response) {\r\n                    _this.load = false;\r\n                    _this.hideModalQuickRegistration();\r\n                    if (response.Id_User_Dettail > 0 && response.Active) {\r\n                        var name = response.Name ? response.Name : response.Email;\r\n                        _this.authService.Login(response.Id_User_Dettail, name);\r\n                    }\r\n                    if (response.IsCompletedRegistration == false) {\r\n                        if (response.Active) {\r\n                            var user = new user_login_1.UserLogin();\r\n                            user.isAuthenticated = true;\r\n                            user.username = response.Name ? response.Name : response.Email;\r\n                            //-- Call service to update header info, to set a logged in user\r\n                            _this.headerService.setLoggedInUser(user);\r\n                            //-- Hide quick registration component even after user is logged in, because we want to show an additional dialog modal\r\n                            _this.headerService.setToShowQuickRegistration(true);\r\n                            _this.showQuickRegistrationSuccessModal();\r\n                        }\r\n                    }\r\n                    else if (_this.pageFrom == \"cart\") {\r\n                        _this.router.navigate(_this.routesService.getRoutePath('CARRELLO'));\r\n                    }\r\n                    else {\r\n                        _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n                    }\r\n                });\r\n                this.subManager.add(sendInfoSub);\r\n            };\r\n            ChildComponent.prototype.setQuickRegisterObject = function () {\r\n                var quickRegisterObj = {\r\n                    QuickEmailUser: this.modelRegistration.EmailRegister.trim(),\r\n                    QuickPartitaIva: this.modelRegistration.PartitaIva.trim(),\r\n                    QuickCodiceFiscale: this.modelRegistration.CodiceFiscale.trim(),\r\n                    QuickClientType: this.modelRegistration.CustomerGroup.trim(),\r\n                    QuickTelephone: this.modelRegistration.Telephone.trim(),\r\n                };\r\n                return quickRegisterObj;\r\n            };\r\n            ChildComponent.prototype.quickRegister = function () {\r\n                if (this.isEmailValid) {\r\n                    this.hideModalQuickRegistrationEmail();\r\n                    this.showModalQuickRegistration();\r\n                }\r\n            };\r\n            //-- Checking after changing of focus if the email entered in form already exists in database\r\n            ChildComponent.prototype.checkEmail = function (form) {\r\n                var _this = this;\r\n                if (form.controls.EmailRegister.valid) {\r\n                    var checkEmailSub = this.checkExists.checkIfEmailExistsInDb(this.modelRegistration.EmailRegister)\r\n                        .subscribe(function (result) {\r\n                        if (result == 1) {\r\n                            _this.isEmailValid = true;\r\n                            _this.emailExists = false;\r\n                        }\r\n                        else {\r\n                            _this.isEmailValid = false;\r\n                            _this.emailExists = true;\r\n                        }\r\n                    });\r\n                    this.subManager.add(checkEmailSub);\r\n                }\r\n                else {\r\n                    this.isEmailValid = false;\r\n                    this.emailExists = false;\r\n                }\r\n            };\r\n            //-- Checking after changing of focus if the partita iva entered in form already exists in database\r\n            ChildComponent.prototype.checkPiva = function (field) {\r\n                var _this = this;\r\n                if (field.valid) {\r\n                    if (!field.value || !field.value.trim())\r\n                        return;\r\n                    this.checkExists.checkIfPartitaIvaExistsInDb(this.modelRegistration.PartitaIva)\r\n                        .subscribe(function (result) {\r\n                        if (result == 1) {\r\n                            _this.isPivaValid = true;\r\n                            _this.pivaExists = false;\r\n                        }\r\n                        else {\r\n                            if (_this.modelRegistration.CustomerGroup !== '7') {\r\n                                _this.isPivaValid = false;\r\n                                _this.pivaExists = true;\r\n                            }\r\n                            else {\r\n                                _this.isPivaValid = true;\r\n                                _this.pivaExists = false;\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n                else {\r\n                    if (this.modelRegistration.CustomerGroup !== '7') {\r\n                        this.isPivaValid = false;\r\n                        this.pivaExists = false;\r\n                    }\r\n                    else {\r\n                        this.isPivaValid = true;\r\n                        this.pivaExists = false;\r\n                    }\r\n                }\r\n            };\r\n            //-- Checking after changing of focus if the codice fiscale entered in form already exists in database\r\n            ChildComponent.prototype.checkCF = function (field) {\r\n                var _this = this;\r\n                if (!field.valid) {\r\n                    this.isPivaValid = false;\r\n                    this.pivaExists = false;\r\n                }\r\n                //-- Check if the CF already exists only when group is privato\r\n                if (this.modelRegistration.CustomerGroup === '4') {\r\n                    if (field.valid) {\r\n                        this.checkExists.checkIfCodiceFiscaleExistsInDb(this.modelRegistration.CodiceFiscale)\r\n                            .subscribe(function (result) {\r\n                            {\r\n                                if (result == 1) {\r\n                                    _this.isCFValid = true;\r\n                                    _this.CFExists = false;\r\n                                }\r\n                                else {\r\n                                    _this.isCFValid = false;\r\n                                    _this.CFExists = true;\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n                else {\r\n                    this.isCFValid = true;\r\n                    this.CFExists = false;\r\n                }\r\n            };\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            ChildComponent.prototype.validatePhone = function (event) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            };\r\n            ChildComponent.prototype.setConfiguration = function () {\r\n                var _this = this;\r\n                this.configurationService.getConfiguration(this.lang).subscribe(function (resultConfiguration) {\r\n                    var companySub = _this.companyService.getCompany().subscribe(function (resultCompany) {\r\n                        {\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n                            }\r\n                        }\r\n                        _this.configuration = resultConfiguration;\r\n                    });\r\n                    _this.subManager.add(companySub);\r\n                });\r\n            };\r\n            ChildComponent.prototype.onCustomerGroupChange = function (value) {\r\n                this.setValuesOnCustomerGroupChange();\r\n                this.modelRegistration.CustomerGroup = value;\r\n                if (this.modelRegistration.CustomerGroup == '4' || this.modelRegistration.CustomerGroup == '7') {\r\n                    this.isPivaValid = true;\r\n                }\r\n                else {\r\n                    this.isCFValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.saveOldGroup = function () {\r\n                this.oldGroup = this.modelRegistration.CustomerGroup;\r\n            };\r\n            ChildComponent.prototype.setValuesOnCustomerGroupChange = function () {\r\n                this.modelRegistration = new register_1.QuickRegister(this.modelRegistration.EmailRegister, this.modelRegistration.EmailRepeat, this.modelRegistration.Password, this.modelRegistration.Telephone, this.modelRegistration.CustomerGroup, this.modelRegistration.CodiceFiscale, this.modelRegistration.PartitaIva, this.oldGroup);\r\n            };\r\n            ChildComponent.prototype.resetForm = function () {\r\n                this.modelRegistration = new register_1.QuickRegister(this.modelRegistration.EmailRegister);\r\n            };\r\n            //-- Hiding and showing corresponding modals\r\n            ChildComponent.prototype.showModalQuickRegistration = function () {\r\n                this.showModal('quickRegistrationModal');\r\n            };\r\n            ChildComponent.prototype.hideModalQuickRegistration = function () {\r\n                this.hideModal('quickRegistrationModal');\r\n                this.modelRegistration.EmailRegister = '';\r\n                this.resetForm();\r\n            };\r\n            ChildComponent.prototype.showModalQuickRegistrationEmail = function () {\r\n                this.showModal('quickRegistrationEmailModal');\r\n            };\r\n            ChildComponent.prototype.showQuickRegistrationSuccessModal = function () {\r\n                this.showModal('quickRegistrationSuccessModal');\r\n            };\r\n            ChildComponent.prototype.hideQuickRegistrationSuccessModal = function () {\r\n                this.hideModal('quickRegistrationSuccessModal');\r\n                //-- Hide quick registration component\r\n                this.headerService.setToShowQuickRegistration(false);\r\n            };\r\n            ChildComponent.prototype.hideModalQuickRegistrationEmailAndResetEmail = function () {\r\n                this.hideModalQuickRegistrationEmail();\r\n                this.modelRegistration.EmailRegister = '';\r\n            };\r\n            ChildComponent.prototype.hideModalQuickRegistrationEmail = function () {\r\n                this.hideModal('quickRegistrationEmailModal');\r\n            };\r\n            ChildComponent.prototype.showModal = function (modalId) {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                document.querySelector('#header').style.zIndex = '1041';\r\n                $(\"#\" + modalId).modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.hideModal = function (modalId) {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                document.querySelector('#header').style.zIndex = '1041';\r\n                $(\"#\" + modalId).modal(\"hide\");\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                this.pageIsInit = true;\r\n            };\r\n            __decorate([\r\n                core_1.ViewChild('submitButton'), \r\n                __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n            ], ChildComponent.prototype, \"submitButton\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: quickRegistrationData.TemplateHtml\r\n                }),\r\n                __param(0, core_1.Inject('isBrowser')),\r\n                __param(9, core_1.Inject('CookieService')), \r\n                __metadata('design:paramtypes', [Boolean, (typeof (_b = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _b) || Object, (typeof (_c = typeof check_existence_service_1.CheckIfExistService !== 'undefined' && check_existence_service_1.CheckIfExistService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _g) || Object, (typeof (_h = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _h) || Object, (typeof (_j = typeof configuration_service_1.ConfigurationService !== 'undefined' && configuration_service_1.ConfigurationService) === 'function' && _j) || Object, (typeof (_k = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _k) || Object, (typeof (_l = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _l) || Object, (typeof (_m = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _m) || Object, (typeof (_o = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _o) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], QuickRegistrationComponent.prototype, \"parentWidgetData\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', (typeof (_a = typeof company_1.Company !== 'undefined' && company_1.Company) === 'function' && _a) || Object)\r\n    ], QuickRegistrationComponent.prototype, \"companyInfo\", void 0);\r\n    QuickRegistrationComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-quick-register\",\r\n            template: \"\"\r\n        }),\r\n        __param(3, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_b = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, Boolean])\r\n    ], QuickRegistrationComponent);\r\n    return QuickRegistrationComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.QuickRegistrationComponent = QuickRegistrationComponent;\r\n\n\n/***/ }),\n\n/***/ 407:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar validation_service_1 = __webpack_require__(131);\r\nvar cookie_service_1 = __webpack_require__(60);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar mapping_1 = __webpack_require__(10);\r\n//Services\r\nvar register_service_1 = __webpack_require__(98);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar company_service_1 = __webpack_require__(129);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar register_1 = __webpack_require__(252);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar login_service_1 = __webpack_require__(179);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar core_2 = __webpack_require__(27);\r\nvar RegisterComponent = (function () {\r\n    function RegisterComponent(_compiler, componentHelper, _elementRef, languageService, registerService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.registerService = registerService;\r\n        this.route = route;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    RegisterComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var isQuickRegistration = this.route.snapshot.queryParams[\"quickRegistration\"] || false;\r\n        var registerSub = this.registerService.getRegisterPageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                if (!result.IsActiveQuickRegistration) {\r\n                    isQuickRegistration = false;\r\n                }\r\n                //Creating subcomponent whith the register result information to inject\r\n                var subComponent = _this.createSubComponent(result, isQuickRegistration, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userRegistrationId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(registerSub);\r\n    };\r\n    RegisterComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    RegisterComponent.prototype.createSubComponent = function (result, isQuickRegistrationActive, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, registerService, languageService, router, mappings, checkExists, isBrowser, _elementRef, scriptService, companyService, configurationService, routesService, translate, breadcrumbsService, _compiler, route, validationService, cookie, authService, loginService) {\r\n                this.seoService = seoService;\r\n                this.registerService = registerService;\r\n                this.languageService = languageService;\r\n                this.router = router;\r\n                this.mappings = mappings;\r\n                this.checkExists = checkExists;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.companyService = companyService;\r\n                this.configurationService = configurationService;\r\n                this.routesService = routesService;\r\n                this.translate = translate;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this._compiler = _compiler;\r\n                this.route = route;\r\n                this.validationService = validationService;\r\n                this.cookie = cookie;\r\n                this.authService = authService;\r\n                this.loginService = loginService;\r\n                this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n                this.theme = \"light\";\r\n                this.seoInfo = result.SeoInformation;\r\n                this.emailError = false;\r\n                this.passwordError = false;\r\n                this.success = false;\r\n                this.load = false;\r\n                this.validEmail = \"\";\r\n                this.pageIsInit = false;\r\n                this.pageIsOnDestroy = false;\r\n                this.showEmailInvalid = false;\r\n                this.showPivaInvalid = false;\r\n                this.showCFInvalid = false;\r\n                this.isValidCodDest = \"\";\r\n                this.isValidPecEmail = \"\";\r\n                this.isRequiredPecEmail = true;\r\n                this.isQuickRegistration = isQuickRegistrationActive;\r\n                this.quickRegisteredUser = null;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.registerViaFbData = this.registerService.getFacebookLoginData();\r\n                this.disableFbDataFields = false;\r\n                this.cartRoute = this.routesService.getRoutePath('CARRELLO');\r\n                this.homepageRoute = this.routesService.getRoutePath('HOME');\r\n                this.pageFrom = \"\";\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n                this.nationCode = \"\";\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                var paramsSub = this.route.params.subscribe(function (params) {\r\n                    var paramPageFrom = params['pagefrom'];\r\n                    if (paramPageFrom !== undefined) {\r\n                        _this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n                this.subManager.add(paramsSub);\r\n                this.nationList = result.nationList;\r\n                this.model = new register_1.Register();\r\n                this.customerTypeList = result.UserTypes;\r\n                this.onNationTypeChange(result.DefaultNation);\r\n                this.model.CustomerGroup = \"5\";\r\n                this.model.CustomerType = \"\";\r\n                this.model.PecEmail = \"\";\r\n                this.model.CodiceDestinatario = \"\";\r\n                //-- If the user used quick registration feature, we can get it's data from the cookies\r\n                if (this.isQuickRegistration) {\r\n                    this.quickRegisteredUser = this.cookie.getObject(\"QuickRegisterUser\");\r\n                    this.setModelDataFromCookies();\r\n                }\r\n                this.showEmailInvalid = false;\r\n                if (this.registerViaFbData) {\r\n                    this.model.CustomerGroup = \"4\";\r\n                    this.setModelDataFromFb(this.registerViaFbData);\r\n                }\r\n                this.isCodDestRequired();\r\n                this.isPecEmailRequired();\r\n                this.configurationService.getConfiguration(this.lang).subscribe(function (resultConfiguration) {\r\n                    var companySub = _this.companyService.getCompany().subscribe(function (resultCompany) {\r\n                        {\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n                            }\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n                            }\r\n                        }\r\n                        _this.configuration = resultConfiguration;\r\n                    });\r\n                    _this.subManager.add(companySub);\r\n                });\r\n            };\r\n            ;\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isItalyNation = function () {\r\n                var result = false;\r\n                if (this.model.Nation == 8494) {\r\n                    result = true;\r\n                }\r\n                else {\r\n                    if (this.model.CustomerGroup != \"5\" && this.model.CustomerGroup != \"4\") {\r\n                        this.onCustomerGroupChange(\"5\");\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isPrivateCustomer = function () {\r\n                var result = false;\r\n                if (this.model.CustomerGroup == \"4\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setModelDataFromCookies = function () {\r\n                if (!this.quickRegisteredUser)\r\n                    return;\r\n                this.model.EmailRegister = this.quickRegisteredUser['QuickEmailUser'];\r\n                this.model.EmailRepeat = this.quickRegisteredUser['QuickEmailUser'];\r\n                this.model.CustomerGroup = this.quickRegisteredUser['QuickClientType'];\r\n                this.model.Telephone = this.quickRegisteredUser['QuickTelephone'];\r\n                var isQuickRegistered = this.cookie.get(\"IsQuickRegistered\") ? Boolean(this.cookie.get(\"IsQuickRegistered\")) : false;\r\n                this.model.IsQuickRegistered = isQuickRegistered;\r\n                //-- If customer group is privato or associazione, then CF was already set during registration, else Partita Iva was set\r\n                if (this.model.CustomerGroup === '4' || this.model.CustomerGroup === '7') {\r\n                    this.model.CF = this.quickRegisteredUser['QuickCodiceFiscale'];\r\n                }\r\n                else {\r\n                    this.model.Piva = this.quickRegisteredUser['QuickPartitaIva'];\r\n                }\r\n            };\r\n            ChildComponent.prototype.disableFieldsFilledFromFbData = function () {\r\n                this.disableFbDataFields = true;\r\n            };\r\n            ChildComponent.prototype.setModelDataFromFb = function (reg) {\r\n                this.model.Name = reg.Name;\r\n                this.model.SubName = reg.SubName;\r\n                this.model.EmailRegister = reg.Email;\r\n                this.model.EmailRepeat = reg.Email;\r\n                this.model.Password = reg.Password;\r\n                this.model.PasswordRepeat = reg.Password;\r\n                this.disableFieldsFilledFromFbData();\r\n            };\r\n            //adding all scripts and elements connected to address verification feature                \r\n            ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n                var suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n                var address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n                var jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n                $('body > universal-script').before(suggest);\r\n                $('body > universal-script').before(jquery);\r\n                $('body > universal-script').before(address);\r\n            };\r\n            //removing all scripts and elements connected to address verification feature                            \r\n            ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n                $(\"#suggestId\").remove();\r\n                $(\"#jqueryuicss\").remove();\r\n                $(\"#jqueryuijs\").remove();\r\n                $(\"#suggestcss\").remove();\r\n                $(\"#initui\").remove();\r\n                $(\"#inituicf\").remove();\r\n                $(\"#ui-id-1\").remove();\r\n                $(\"#ui-id-2\").remove();\r\n                $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n                $(\"#jqueryId\").remove();\r\n                $(\"#addressVerificationId\").remove();\r\n            };\r\n            ChildComponent.prototype.checkAddressValidation = function () {\r\n                this.model.Prov = $(\"#Prov\").val();\r\n                this.model.Cap = $(\"#Cap\").val();\r\n                this.model.City = $(\"#City\").val();\r\n            };\r\n            ChildComponent.prototype.setAddressValue = function () {\r\n                var streetTypeId = $(\"#streetTypeId\").val();\r\n                var street = $(\"#Address\").val();\r\n                if (streetTypeId != null && streetTypeId != \"\") {\r\n                    this.model.Address = streetTypeId + \" \" + street;\r\n                }\r\n                else {\r\n                    this.model.Address = street;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isDisabled = function (form) {\r\n                var res = false;\r\n                if (this.disableFbDataFields) {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat) {\r\n                        res = true;\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n                else if (this.isQuickRegistration && this.quickRegisteredUser) {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat) {\r\n                        res = true;\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat\r\n                        && this.emailValid == true && this.showCFInvalid == false) {\r\n                        if (this.model.CustomerGroup != '4') {\r\n                            if (this.showPivaInvalid == false) {\r\n                                res = true;\r\n                            }\r\n                            else {\r\n                                res = false;\r\n                            }\r\n                        }\r\n                        else {\r\n                            res = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n                return res;\r\n            };\r\n            //checking after changing of focus if the email entered in form already exists in database\r\n            ChildComponent.prototype.checkEmail = function (form) {\r\n                var _this = this;\r\n                var email = this.model.EmailRegister;\r\n                if (form.controls.EmailRegister.valid) {\r\n                    if (this.disableFbDataFields == false) {\r\n                        var checkEmailSub = this.checkExists.checkIfEmailExistsInDb(email)\r\n                            .subscribe(function (result) {\r\n                            _this.showEmailInvalid = false;\r\n                            if (result == 1) {\r\n                                _this.emailValid = true;\r\n                                _this.validEmail = \"ng-valid\";\r\n                            }\r\n                            else {\r\n                                _this.emailValid = false;\r\n                                _this.validEmail = \"ng-invalid\";\r\n                                _this.showEmailInvalid = true;\r\n                            }\r\n                        });\r\n                        this.subManager.add(checkEmailSub);\r\n                    }\r\n                }\r\n                else {\r\n                    this.emailValid = false;\r\n                    this.validEmail = \"ng-invalid\";\r\n                    this.showEmailInvalid = false;\r\n                }\r\n            };\r\n            //checking after changing of focus if the partita iva entered in form already exists in database\r\n            ChildComponent.prototype.checkPiva = function (field) {\r\n                var _this = this;\r\n                var piva = this.model.Piva;\r\n                if (field.valid) {\r\n                    if (!field.value || !field.value.trim())\r\n                        return;\r\n                    if (this.disableFbDataFields == false) {\r\n                        this.checkExists.checkIfPartitaIvaExistsInDb(piva)\r\n                            .subscribe(function (result) {\r\n                            _this.showPivaInvalid = false;\r\n                            if (result == 1) {\r\n                                _this.showPivaInvalid = false;\r\n                            }\r\n                            else {\r\n                                if (_this.model.CustomerGroup !== '7') {\r\n                                    _this.showPivaInvalid = true;\r\n                                }\r\n                            }\r\n                        });\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.model.CustomerGroup !== '7') {\r\n                        this.showPivaInvalid = true;\r\n                    }\r\n                }\r\n            };\r\n            //checking after changing of focus if the codice fiscale entered in form already exists in database\r\n            ChildComponent.prototype.checkCF = function (field) {\r\n                var _this = this;\r\n                var CF = this.model.CF;\r\n                //-- Check if the CF already exists only when group is privato\r\n                if (this.model.CustomerGroup === '4') {\r\n                    if (field.valid) {\r\n                        if (this.disableFbDataFields == false) {\r\n                            this.checkExists.checkIfCodiceFiscaleExistsInDb(CF)\r\n                                .subscribe(function (result) {\r\n                                _this.showCFInvalid = false;\r\n                                if (result == 1) {\r\n                                    _this.showCFInvalid = false;\r\n                                }\r\n                                else {\r\n                                    _this.showCFInvalid = true;\r\n                                }\r\n                            });\r\n                        }\r\n                    }\r\n                    else {\r\n                        this.showCFInvalid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.showCFInvalid = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.onSubmit = function () {\r\n                var _this = this;\r\n                //after submiting form, we are disabling a button until we get a response\r\n                this.submitButton.nativeElement.disabled = true;\r\n                this.load = true;\r\n                this.model.Language = this.languageService.getLongLang();\r\n                //converting CAP field to string\r\n                this.model.Cap = this.model.Cap.toString();\r\n                //concating of address street and number to one model field\r\n                this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.model.IsCompletedRegistration = false;\r\n                }\r\n                var sendInfoSub = this.registerService.sendInfoRequest(this.model)\r\n                    .subscribe(function (result) {\r\n                    if (result[\"selected\"]) {\r\n                        if (_this.isQuickRegistration) {\r\n                            var authSub = _this.loginService.authentificateUser(_this.model.EmailRegister, _this.model.Name, _this.model.Name).subscribe(function (response) {\r\n                                _this.cookie.remove('QuickRegisterUser');\r\n                                _this.cookie.remove('IsQuickRegistered');\r\n                                _this.authService.Login(response.Id_User_Dettail, response.Name);\r\n                                _this.navigateToCorespondingPage();\r\n                            });\r\n                        }\r\n                        else {\r\n                            _this.navigateToCorespondingPage();\r\n                        }\r\n                    }\r\n                    else {\r\n                        _this.emailError = false;\r\n                        _this.passwordError = false;\r\n                        _this.isRegisterFailed = true;\r\n                        _this.load = false;\r\n                        _this.success = false;\r\n                    }\r\n                });\r\n                this.subManager.add(sendInfoSub);\r\n            };\r\n            ChildComponent.prototype.navigateToCorespondingPage = function () {\r\n                if (this.pageFrom == \"cart\") {\r\n                    this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                }\r\n                else {\r\n                    var registrationCompletePage = this.routesService.getRoutePath('REGISTRATION - COMPLETE')[0];\r\n                    this.router.navigate([registrationCompletePage]);\r\n                    this.emailError = false;\r\n                    this.passwordError = false;\r\n                    this.isRegisterFailed = false;\r\n                    this.load = false;\r\n                    this.success = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setVerified = function (data) {\r\n                this.isCaptchaInvalid = data;\r\n            };\r\n            ChildComponent.prototype.onCustomerTypeChange = function (value) {\r\n                this.model.CustomerType = value;\r\n            };\r\n            ChildComponent.prototype.onNationTypeChange = function (value) {\r\n                this.model.Nation = value;\r\n                this.nationCode = this.nationList.filter(function (x) { return x.Id == value; })[0].Code;\r\n                this.onCustomerGroupChange(this.model.CustomerGroup);\r\n            };\r\n            ChildComponent.prototype.onCustomerGroupChange = function (value) {\r\n                var currentModel = this.model;\r\n                this.model = new register_1.Register();\r\n                this.model.CustomerGroup = value;\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.setModelDataFromFb(this.registerViaFbData);\r\n                }\r\n                this.model.Nation = currentModel.Nation;\r\n                this.model.CustomerType = currentModel.CustomerType;\r\n                this.model.Telephone = currentModel.Telephone;\r\n                this.model.Mobile = currentModel.Mobile;\r\n                this.model.EmailRegister = currentModel.EmailRegister;\r\n                this.model.EmailRepeat = currentModel.EmailRepeat;\r\n                this.model.PecEmail = currentModel.PecEmail;\r\n                if (value === '4') {\r\n                    this.model.CodiceDestinatario = \"0000000\";\r\n                }\r\n                else {\r\n                    if (this.isItalyNation() == false) {\r\n                        this.model.CodiceDestinatario = \"0000000\";\r\n                    }\r\n                    else {\r\n                        console.log(\"qui\");\r\n                        this.model.CodiceDestinatario = \"\";\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCodDestRequired = function () {\r\n                var retVal = false;\r\n                //console.log(this.model.CodiceDestinatario)\r\n                if (this.model.CustomerGroup != \"4\" && this.isItalyNation()) {\r\n                    if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        this.isRequiredPecEmail = true;\r\n                    }\r\n                    else {\r\n                        this.isRequiredPecEmail = false;\r\n                    }\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isPecEmailRequired = function () {\r\n                var retVal = false;\r\n                if (this.model.CustomerGroup != \"4\" && this.isItalyNation()) {\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n                return retVal;\r\n            };\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            ChildComponent.prototype.validatePhone = function (event) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                if (result.isActiveAddressVerificationModule) {\r\n                    var addressVerificationKey = result.AddressVerificationCode;\r\n                    if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n                        this.addAddressVerificationScripts(addressVerificationKey);\r\n                        $(\"#Cap\").prop('disabled', true);\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#Cap\").prop('disabled', false);\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n                //this method is removing all scripts and elements connected to address verification feature\r\n                var addressVerificationKey = result.AddressVerificationCode;\r\n                this.removeAddressVerificationScripts(addressVerificationKey);\r\n                this.subManager.unsubscribe();\r\n                // this.registerService.setFacebookLoginData(null);\r\n                this.pageIsOnDestroy = true;\r\n            };\r\n            __decorate([\r\n                core_1.ViewChild('submitButton'), \r\n                __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n            ], ChildComponent.prototype, \"submitButton\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(6, core_1.Inject('isBrowser')),\r\n                __param(17, core_1.Inject('CookieService')), \r\n                __metadata('design:paramtypes', [(typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _f) || Object, (typeof (_g = typeof check_existence_service_1.CheckIfExistService !== 'undefined' && check_existence_service_1.CheckIfExistService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _h) || Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object, (typeof (_k = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _k) || Object, (typeof (_l = typeof configuration_service_1.ConfigurationService !== 'undefined' && configuration_service_1.ConfigurationService) === 'function' && _l) || Object, (typeof (_m = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _m) || Object, (typeof (_o = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _o) || Object, (typeof (_p = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _p) || Object, (typeof (_q = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _q) || Object, (typeof (_r = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _r) || Object, (typeof (_s = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _s) || Object, (typeof (_t = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _t) || Object, (typeof (_u = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _u) || Object, (typeof (_v = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _v) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    RegisterComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(7, core_1.Inject('isBrowser')),\r\n        __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object])\r\n    ], RegisterComponent);\r\n    return RegisterComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.RegisterComponent = RegisterComponent;\r\n\n\n/***/ }),\n\n/***/ 408:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(98);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar RegistrationConfirmationPageComponent = (function () {\r\n    function RegistrationConfirmationPageComponent(_compiler, componentHelper, _elementRef, languageService, registerService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.languageService = languageService;\r\n        this.registerService = registerService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    RegistrationConfirmationPageComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var templateHtml;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var registrationDoneSub = this.registerService.getRegistrationCompletePageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.registrationCompletePageId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(registrationDoneSub);\r\n    };\r\n    RegistrationConfirmationPageComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    RegistrationConfirmationPageComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, registerService) {\r\n                this.seoService = seoService;\r\n                this._elementRef = _elementRef;\r\n                this.isBrowser = isBrowser;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.registerService = registerService;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                //newsletter subscription\r\n                this.newsletterSubmitted = false;\r\n                this.privacySubmitted = false;\r\n                this.alreadySubscribed = false;\r\n                this.successfullySubscribed = false;\r\n                this.spinnerNewslatter = false;\r\n                this.pageIsOnDestroy = false;\r\n                this.registerViaFbData = this.registerService.getFacebookLoginData();\r\n                this.isRegisteredViaFacebook = false;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.isRegisteredViaFacebook = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n                this.registerService.setFacebookLoginData(null);\r\n                this.pageIsOnDestroy = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _f) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    RegistrationConfirmationPageComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], RegistrationConfirmationPageComponent);\r\n    return RegistrationConfirmationPageComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.RegistrationConfirmationPageComponent = RegistrationConfirmationPageComponent;\r\n\n\n/***/ }),\n\n/***/ 409:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar router_1 = __webpack_require__(12);\r\nvar register_service_1 = __webpack_require__(98);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar RegistrationConfirmationComponent = (function () {\r\n    function RegistrationConfirmationComponent(_compiler, componentHelper, _elementRef, cmsComponentService, templateService, isBrowser, seo, renderer, document) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.templateService = templateService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    RegistrationConfirmationComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var registrationConfirmation;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var compTemplateSub = this.templateService.getComponentTemplate(\"registrationConfirmationPageTemplate\").subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                registrationConfirmation = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(registrationConfirmation, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(compTemplateSub);\r\n    };\r\n    RegistrationConfirmationComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject\r\n    RegistrationConfirmationComponent.prototype.createSubComponent = function (registrationConfirmation, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, isBrowser, activatedRoute, registerService) {\r\n                this.routesService = routesService;\r\n                this.isBrowser = isBrowser;\r\n                this.activatedRoute = activatedRoute;\r\n                this.registerService = registerService;\r\n                this.success = false;\r\n                this.failed = false;\r\n                this.active = false;\r\n                this.pageIsInit = false;\r\n                this.headerData = header;\r\n                this.footerData = registrationConfirmation.FooterData;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n                var paramsSub = this.activatedRoute.params.subscribe(function (params) {\r\n                    var userId = params['userid'];\r\n                    _this.checkActivation(userId);\r\n                });\r\n                this.subManager.add(paramsSub);\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n            };\r\n            ChildComponent.prototype.checkActivation = function (userId) {\r\n                var _this = this;\r\n                var confirmRegSub = this.registerService.confirmationRegistration(userId)\r\n                    .subscribe(function (response) {\r\n                    if (response == \"1\") {\r\n                        _this.success = true;\r\n                    }\r\n                    else if (response == \"-1\") {\r\n                        _this.active = true;\r\n                    }\r\n                    else {\r\n                        _this.failed = true;\r\n                    }\r\n                });\r\n                this.subManager.add(confirmRegSub);\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: registrationConfirmation\r\n                }),\r\n                __param(1, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _b) || Object, (typeof (_c = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _c) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    RegistrationConfirmationComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: ''\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')),\r\n        __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object])\r\n    ], RegistrationConfirmationComponent);\r\n    return RegistrationConfirmationComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.RegistrationConfirmationComponent = RegistrationConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 410:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(98);\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar api_service_1 = __webpack_require__(13);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar mapping_1 = __webpack_require__(10);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar login_service_1 = __webpack_require__(179);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar router_1 = __webpack_require__(12);\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar header_service_1 = __webpack_require__(127);\r\nvar user_login_1 = __webpack_require__(73);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar UserLoginComponent = (function () {\r\n    function UserLoginComponent(_compiler, componentHelper, _elementRef, cmsService, seo, document, renderer, isBrowser, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsService = cmsService;\r\n        this.seo = seo;\r\n        this.document = document;\r\n        this.renderer = renderer;\r\n        this.isBrowser = isBrowser;\r\n        this.scriptService = scriptService;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    UserLoginComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var loginData;\r\n        var header;\r\n        var headDataSub = this.cmsService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        // this.templateService.getComponentTemplate(\"userLoginPageTemplate\").subscribe(result =>\r\n        var loginSub = this.cmsService.getLoginPageData().subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                loginData = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(loginData, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.loginId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(loginSub);\r\n    };\r\n    UserLoginComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    UserLoginComponent.prototype.createSubComponent = function (loginData, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(mappings, loginService, _elementRef, authService, scriptService, routesService, router, route, seoService, recoverPasswordService, isBrowser, breadcrumbsService, api, cookie, registerService, headerService, metaService) {\r\n                this.mappings = mappings;\r\n                this.loginService = loginService;\r\n                this._elementRef = _elementRef;\r\n                this.authService = authService;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.router = router;\r\n                this.route = route;\r\n                this.seoService = seoService;\r\n                this.recoverPasswordService = recoverPasswordService;\r\n                this.isBrowser = isBrowser;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.api = api;\r\n                this.cookie = cookie;\r\n                this.registerService = registerService;\r\n                this.headerService = headerService;\r\n                this.metaService = metaService;\r\n                this.breadcrumbs = loginData.BreadcrumbsInfo;\r\n                this.footerData = loginData.footerData;\r\n                this.headerData = header;\r\n                this.countFb = 0;\r\n                this.showSpinnerClick = false;\r\n                this.userLoginUrl = this.mappings.UserLoginImg_Url;\r\n                this.pageFrom = \"\";\r\n                this.emailError = false;\r\n                this.passwordError = false;\r\n                this.seoInfo = loginData.SeoInformation;\r\n                this.emailErrorRecover = false;\r\n                this.pageIsInit = false;\r\n                this.constructorIsInit = false;\r\n                this.isActiveFacebookModule = loginData.isActiveFacebookModule;\r\n                this.model = {\r\n                    Email: \"\",\r\n                    Password: \"\"\r\n                };\r\n                this.modelRecover = {\r\n                    Email: \"\"\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n                if (!this.isBrowser || this.constructorIsInit) {\r\n                    return;\r\n                }\r\n                this.constructorIsInit = true;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n                var paramsSub = this.route.params.subscribe(function (params) {\r\n                    var paramPageFrom = params['pagefrom'];\r\n                    if (paramPageFrom !== undefined) {\r\n                        _this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n                this.subManager.add(paramsSub);\r\n            };\r\n            ChildComponent.prototype.onFacebookLoginClick = function () {\r\n                var _this = this;\r\n                FB.login(function (result) {\r\n                    _this.getUserInfoFromFb();\r\n                }, { scope: 'email' });\r\n                this.getUserFromFb();\r\n            };\r\n            ChildComponent.prototype.getUserFromFb = function () {\r\n                var _this = this;\r\n                var email = this.cookie.get(\"emailFbUser\");\r\n                var firstName = this.cookie.get(\"firstNameFbUser\");\r\n                var lastName = this.cookie.get(\"lastNameFbUser\");\r\n                if (email != undefined && firstName != undefined && lastName != undefined) {\r\n                    var authSub = this.loginService.authentificateUser(email, firstName, lastName).subscribe(function (response) {\r\n                        _this.cookie.remove(\"emailFbUser\");\r\n                        _this.cookie.remove(\"firstNameFbUser\");\r\n                        _this.cookie.remove(\"lastNameFbUser\");\r\n                        // if(response.Active)\r\n                        // {\r\n                        _this.authService.Login(response.Id_User_Dettail, response.Name);\r\n                        // }                        \r\n                        if (response.IsCompletedRegistration == false) {\r\n                            if (response.Active) {\r\n                                _this.registerService.setFacebookLoginData(response);\r\n                                //update after login the header information\r\n                                var user = new user_login_1.UserLogin();\r\n                                user.isAuthenticated = true;\r\n                                user.username = response.Name ? response.Name : _this.model.Email;\r\n                                _this.headerService.setLoggedInUser(user);\r\n                                _this.router.navigate(_this.routesService.getRoutePath('REGISTRAZIONE'));\r\n                            }\r\n                            else {\r\n                                _this.userNotActive = false;\r\n                                _this.userNotFound = false;\r\n                            }\r\n                        }\r\n                        else if (_this.pageFrom == \"cart\") {\r\n                            //update after login the header information\r\n                            var user = new user_login_1.UserLogin();\r\n                            user.isAuthenticated = true;\r\n                            user.username = response.Name ? response.Name : _this.model.Email;\r\n                            _this.headerService.setLoggedInUser(user);\r\n                            //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                            window.open(_this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n                        }\r\n                        else {\r\n                            _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n                        }\r\n                    });\r\n                    this.subManager.add(authSub);\r\n                }\r\n                else {\r\n                    setTimeout(function (x) { return _this.getUserFromFb(); }, 200);\r\n                }\r\n            };\r\n            ChildComponent.prototype.getUserInfoFromFb = function () {\r\n                FB.api('/me?fields=first_name,last_name,email', function (result) {\r\n                    if (result && !result.error) {\r\n                        var email = result.email;\r\n                        var firstName = result.first_name;\r\n                        var lastName = result.last_name;\r\n                        document.cookie = \"emailFbUser=\" + email + \";\";\r\n                        document.cookie = \"firstNameFbUser=\" + firstName + \";\";\r\n                        document.cookie = \"lastNameFbUser=\" + lastName + \";\";\r\n                    }\r\n                    else {\r\n                        console.log(result.error);\r\n                    }\r\n                });\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                if (form.valid) {\r\n                    this.showSpinnerClick = true;\r\n                    this.emailError = false;\r\n                    this.passwordError = false;\r\n                    var loginDataSub = this.loginService.sendLoginRequest(this.model.Email, this.model.Password).subscribe(function (result) {\r\n                        if (result.Id_User_Dettail > 0) {\r\n                            if (result.Active) {\r\n                                _this.authService.Login(result.Id_User_Dettail, result.Name);\r\n                                //update after login the header information\r\n                                var user = new user_login_1.UserLogin();\r\n                                user.isAuthenticated = true;\r\n                                user.username = result.Name ? result.Name : _this.model.Email;\r\n                                _this.headerService.setLoggedInUser(user);\r\n                                if (_this.pageFrom == \"cart\") {\r\n                                    //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                                    window.open(_this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n                                }\r\n                                else {\r\n                                    _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n                                }\r\n                            }\r\n                            else {\r\n                                _this.userNotActive = false;\r\n                                _this.userNotFound = false;\r\n                            }\r\n                        }\r\n                        else {\r\n                            _this.userNotActive = false;\r\n                            _this.userNotFound = true;\r\n                        }\r\n                        _this.showSpinnerClick = false;\r\n                    });\r\n                    this.subManager.add(loginDataSub);\r\n                }\r\n                else if (!form.valid) {\r\n                    if (form.form.controls.password.valid == false) {\r\n                        this.passwordError = true;\r\n                    }\r\n                    else if (form.form.controls.password.valid == true) {\r\n                        this.passwordError = false;\r\n                    }\r\n                    if (form.form.controls.email.valid == false) {\r\n                        this.emailError = true;\r\n                    }\r\n                    else if (form.form.controls.email.valid == true) {\r\n                        this.emailError = false;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                var fbCode = loginData.FacebookAppID;\r\n                this.initFacebook(fbCode);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                // Eventually retrieving the script to append\r\n                // if (this.seoInfo.HasScripts == true) {\r\n                //     this.scriptService.appendLoginScript(this._elementRef.element.nativeElement);\r\n                // }\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.initFacebook = function (fbCode) {\r\n                var _this = this;\r\n                try {\r\n                    this.countFb = this.countFb + 1;\r\n                    FB.init({\r\n                        appId: fbCode,\r\n                        cookie: false,\r\n                        xfbml: false,\r\n                        version: 'v2.5'\r\n                    });\r\n                }\r\n                catch (e) {\r\n                    if (this.countFb <= 5) {\r\n                        setTimeout(function (x) { return _this.initFacebook(fbCode); }, 1);\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.recoverPassword = function (form) {\r\n                var _this = this;\r\n                if (form.valid) {\r\n                    this.showSpinnerClick = true;\r\n                    this.emailErrorRecover = false;\r\n                    var recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.modelRecover.Email).subscribe(function (result) {\r\n                        if (result.selected) {\r\n                            _this.modelRecover.Email = \"\";\r\n                            _this.recoverPasswordFailed = false;\r\n                            _this.recoverPasswordSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.recoverPasswordFailed = true;\r\n                            _this.recoverPasswordSuccess = false;\r\n                        }\r\n                        _this.showSpinnerClick = false;\r\n                    });\r\n                    this.subManager.add(recoverPassSub);\r\n                }\r\n                else if (!form.valid) {\r\n                    if (form.form.controls.email.valid == false) {\r\n                        this.emailErrorRecover = true;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: loginData.TemplateHtml\r\n                }),\r\n                __param(10, core_1.Inject('isBrowser')),\r\n                __param(13, core_1.Inject('CookieService')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _a) || Object, (typeof (_b = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _h) || Object, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _k) || Object, Boolean, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _m) || Object, (typeof (_o = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _o) || Object, (typeof (_p = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _p) || Object, (typeof (_q = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _q) || Object, (typeof (_r = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _r) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    UserLoginComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n        __param(7, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n    ], UserLoginComponent);\r\n    return UserLoginComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.UserLoginComponent = UserLoginComponent;\r\n\n\n/***/ }),\n\n/***/ 411:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar UserPasswordComponent = (function () {\r\n    function UserPasswordComponent(_compiler, componentHelper, _elementRef, recoverPasswordService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.recoverPasswordService = recoverPasswordService;\r\n        this.languageService = languageService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.seo = seo;\r\n        this.renderer = renderer;\r\n        this.document = document;\r\n        this.scriptService = scriptService;\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    UserPasswordComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        var header;\r\n        var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n            header = result;\r\n            var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n                }\r\n            });\r\n            _this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        var recoverPassSub = this.recoverPasswordService.getRecoverPasswordData(this.lang).subscribe(function (result) {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (_this.isBrowser) {\r\n                //Creating subcomponent whith the result  to inject\r\n                var subComponent = _this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userRecoverPasswordId);\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n                _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(recoverPassSub);\r\n    };\r\n    UserPasswordComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    UserPasswordComponent.prototype.createSubComponent = function (result, header) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(recoverPasswordService, seoService, isBrowser, _elementRef, scriptService, routesService, breadcrumbsService) {\r\n                this.recoverPasswordService = recoverPasswordService;\r\n                this.seoService = seoService;\r\n                this.isBrowser = isBrowser;\r\n                this._elementRef = _elementRef;\r\n                this.scriptService = scriptService;\r\n                this.routesService = routesService;\r\n                this.breadcrumbsService = breadcrumbsService;\r\n                this.recoverPasswordFailed = false;\r\n                this.recoverPasswordSuccess = false;\r\n                this.seoInfo = result.SeoInformation;\r\n                this.pageIsInit = false;\r\n                this.breadcrumbs = result.BreadcrumbsInfo;\r\n                this.showSpinnerClick = false;\r\n                this.footerData = result.footerData;\r\n                this.headerData = header;\r\n                this.model = {\r\n                    Email: \"\"\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                //this.headerData.Categories=SideMenu.Categories;\r\n                this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs);\r\n                //setTimeout(x => , 1);\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                if (form.valid) {\r\n                    this.showSpinnerClick = true;\r\n                    var recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.model.Email).subscribe(function (result) {\r\n                        if (result.selected) {\r\n                            _this.recoverPasswordFailed = false;\r\n                            _this.recoverPasswordSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.recoverPasswordFailed = true;\r\n                            _this.recoverPasswordSuccess = false;\r\n                        }\r\n                        _this.showSpinnerClick = false;\r\n                    });\r\n                    this.subManager.add(recoverPassSub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.TemplateHtml\r\n                }),\r\n                __param(2, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    UserPasswordComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')),\r\n        __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n    ], UserPasswordComponent);\r\n    return UserPasswordComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.UserPasswordComponent = UserPasswordComponent;\r\n\n\n/***/ }),\n\n/***/ 412:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar News = (function () {\r\n    function News() {\r\n    }\r\n    return News;\r\n}());\r\nexports.News = News;\r\nvar NewsDetails = (function () {\r\n    function NewsDetails() {\r\n        this.UrlRedirect = \"\";\r\n    }\r\n    return NewsDetails;\r\n}());\r\nexports.NewsDetails = NewsDetails;\r\nvar SliderViewModel = (function () {\r\n    function SliderViewModel() {\r\n    }\r\n    return SliderViewModel;\r\n}());\r\nexports.SliderViewModel = SliderViewModel;\r\nvar ArticleCategory = (function () {\r\n    function ArticleCategory() {\r\n    }\r\n    return ArticleCategory;\r\n}());\r\nexports.ArticleCategory = ArticleCategory;\r\n\n\n/***/ }),\n\n/***/ 413:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar CmsContentService = (function () {\r\n    function CmsContentService(_api, _cache, authService, mappings, ShoppingCartService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.authService = authService;\r\n        this.mappings = mappings;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n    }\r\n    //whatever domain/feature method name\r\n    // public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n    CmsContentService.prototype.getCmsPageById = function (lang, pageId) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Menu_GetCmsPageById\r\n            .replace('{customerid}', customerId)\r\n            .replace('{lang}', lang)\r\n            .replace('{id}', pageId)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    // public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n    CmsContentService.prototype.getCmsPageByUrl = function (lang, pageUrl) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Menu_GetCmsPageByUrl\r\n            .replace('{customerid}', customerId)\r\n            .replace('{lang}', lang)\r\n            .replace('{url}', pageUrl)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    CmsContentService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object])\r\n    ], CmsContentService);\r\n    return CmsContentService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.CmsContentService = CmsContentService;\r\n\n\n/***/ }),\n\n/***/ 414:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar CmsMenuListService = (function () {\r\n    function CmsMenuListService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n    }\r\n    CmsMenuListService.prototype.setPageUrl = function (menus) {\r\n        for (var index in menus) {\r\n            if (menus[index].SeoUrl != undefined &&\r\n                menus[index].SeoUrl != null &&\r\n                menus[index].SeoUrl != \"\") {\r\n                menus[index].Url = \"/\" + menus[index].SeoUrl;\r\n            }\r\n            else {\r\n                menus[index].Url = '/cms/' + menus[index].Id;\r\n            }\r\n            if (menus[index].Children !== undefined && menus[index].Children.length > 0) {\r\n                this.setPageUrl(menus[index].Children);\r\n            }\r\n        }\r\n    };\r\n    CmsMenuListService.prototype.LoadData = function (pageId, lang) {\r\n        var url = this.mappings.Web_Api_Get_Cms_Menu_List\r\n            .replace('{id}', pageId)\r\n            .replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CmsMenuListService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], CmsMenuListService);\r\n    return CmsMenuListService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.CmsMenuListService = CmsMenuListService;\r\n\n\n/***/ }),\n\n/***/ 415:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar FaqListService = (function () {\r\n    function FaqListService(_api, _cache, mappings, ShoppingCartService, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n        this.authService = authService;\r\n    }\r\n    FaqListService.prototype.getFaqData = function (lang) {\r\n        var userid = this.authService.GetUserId();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_FaqData\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', userid)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    FaqListService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object])\r\n    ], FaqListService);\r\n    return FaqListService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.FaqListService = FaqListService;\r\n\n\n/***/ }),\n\n/***/ 416:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar InfoRequestService = (function () {\r\n    function InfoRequestService(_api, _cache, mappings, cartService, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    InfoRequestService.prototype.sendInfoRequest = function (parameters) {\r\n        return this._api.post(this.mappings.Web_Api_Post_Send_Info_Request, parameters)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    InfoRequestService.prototype.getInfoRequestData = function (lang) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Info_Request_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    InfoRequestService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object])\r\n    ], InfoRequestService);\r\n    return InfoRequestService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.InfoRequestService = InfoRequestService;\r\n\n\n/***/ }),\n\n/***/ 417:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar SliderService = (function () {\r\n    function SliderService(_api, _cache, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n    }\r\n    SliderService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n    ], SliderService);\r\n    return SliderService;\r\n    var _a, _b, _c;\r\n}());\r\nexports.SliderService = SliderService;\r\n\n\n/***/ }),\n\n/***/ 418:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar TrustpilotService = (function () {\r\n    function TrustpilotService(_api, _cache, mappings, languageService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.languageService = languageService;\r\n    }\r\n    TrustpilotService.prototype.getTrustpilotData = function (type) {\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Trustpilot_Data.replace('{type}', type).replace('{lang}', lang);\r\n        return this._api.get(url);\r\n    };\r\n    TrustpilotService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object])\r\n    ], TrustpilotService);\r\n    return TrustpilotService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.TrustpilotService = TrustpilotService;\r\n\n\n/***/ }),\n\n/***/ 419:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar CookiePolicyService = (function () {\r\n    function CookiePolicyService(_api, mappings, ShoppingCartService, authService) {\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n        this.authService = authService;\r\n    }\r\n    CookiePolicyService.prototype.getCookiePolicyData = function (lang) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var userId = this.authService.getCurrentUserId();\r\n        var url = this.mappings.Web_Api_Get_Cookie_Policy_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{userid}', userId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    CookiePolicyService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n    ], CookiePolicyService);\r\n    return CookiePolicyService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.CookiePolicyService = CookiePolicyService;\r\n\n\n/***/ }),\n\n/***/ 420:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar CookieOptions = (function () {\r\n    function CookieOptions(_a) {\r\n        var _b = _a === void 0 ? {} : _a, path = _b.path, domain = _b.domain, expires = _b.expires, secure = _b.secure;\r\n        this.path = this.isPresent(path) ? path : null;\r\n        this.domain = this.isPresent(domain) ? domain : null;\r\n        this.expires = this.isPresent(expires) ? expires : null;\r\n        this.secure = this.isPresent(secure) ? secure : false;\r\n    }\r\n    CookieOptions.prototype.merge = function (options) {\r\n        return new CookieOptions({\r\n            path: this.isPresent(options) && this.isPresent(options.path) ? options.path : this.path,\r\n            domain: this.isPresent(options) && this.isPresent(options.domain) ? options.domain : this.domain,\r\n            expires: this.isPresent(options) && this.isPresent(options.expires) ? options.expires : this.expires,\r\n            secure: this.isPresent(options) && this.isPresent(options.secure) ? options.secure : this.secure,\r\n        });\r\n    };\r\n    CookieOptions.prototype.isPresent = function (obj) {\r\n        return obj !== undefined && obj !== null;\r\n    };\r\n    return CookieOptions;\r\n}());\r\nexports.CookieOptions = CookieOptions;\r\n\n\n/***/ }),\n\n/***/ 421:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar PrivacyPolicyService = (function () {\r\n    function PrivacyPolicyService(_api, mappings, cartService, authService) {\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    PrivacyPolicyService.prototype.getPrivacyPolicyData = function (lang) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Privacy_Policy_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    PrivacyPolicyService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n    ], PrivacyPolicyService);\r\n    return PrivacyPolicyService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.PrivacyPolicyService = PrivacyPolicyService;\r\n\n\n/***/ }),\n\n/***/ 422:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar PurchaseConditionService = (function () {\r\n    function PurchaseConditionService(_api, mappings, cartService, authService) {\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.authService = authService;\r\n    }\r\n    PurchaseConditionService.prototype.getPurchaseConditionServiceData = function (lang) {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Purchase_Condition_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        ;\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    PurchaseConditionService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n    ], PurchaseConditionService);\r\n    return PurchaseConditionService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.PurchaseConditionService = PurchaseConditionService;\r\n\n\n/***/ }),\n\n/***/ 423:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Components\r\nvar home_component_1 = __webpack_require__(376);\r\nvar faq_component_1 = __webpack_require__(379);\r\nvar cookie_policy_component_1 = __webpack_require__(378);\r\nvar privacy_policy_component_1 = __webpack_require__(383);\r\nvar purchase_condition_component_1 = __webpack_require__(384);\r\nvar info_request_component_1 = __webpack_require__(380);\r\nvar user_login_component_1 = __webpack_require__(410);\r\nvar user_password_component_1 = __webpack_require__(411);\r\nvar register_component_1 = __webpack_require__(407);\r\nvar cms_page_component_1 = __webpack_require__(377);\r\nvar category_component_1 = __webpack_require__(389);\r\nvar product_details_component_1 = __webpack_require__(391);\r\nvar product_page_list_component_1 = __webpack_require__(392);\r\nvar promotions_component_1 = __webpack_require__(393);\r\nvar news_page_component_1 = __webpack_require__(374);\r\nvar other_product_component_1 = __webpack_require__(390);\r\nvar blog_page_component_1 = __webpack_require__(373);\r\nvar article_category_component_1 = __webpack_require__(372);\r\nvar client_area_home_component_1 = __webpack_require__(398);\r\nvar client_area_order_list_component_1 = __webpack_require__(388);\r\nvar client_area_profile_component_1 = __webpack_require__(401);\r\nvar cart_component_1 = __webpack_require__(396);\r\nvar cart_cash_component_1 = __webpack_require__(394);\r\nvar cart_submitted_component_1 = __webpack_require__(395);\r\nvar cart_empty_page_component_1 = __webpack_require__(385);\r\nvar client_area_order_details_component_1 = __webpack_require__(400);\r\nvar client_area_catalog_private_component_1 = __webpack_require__(397);\r\nvar registration_confirmation_component_1 = __webpack_require__(409);\r\nvar offline_page_component_1 = __webpack_require__(387);\r\nvar payment_confirmation_component_1 = __webpack_require__(403);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(405);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(404);\r\nvar payment_banca_sella_confirmation_component_1 = __webpack_require__(402);\r\nvar not_found_page_component_1 = __webpack_require__(386);\r\nvar search_component_1 = __webpack_require__(375);\r\nvar client_area_invoices_component_1 = __webpack_require__(399);\r\nvar newsletter_confirmation_page_component_1 = __webpack_require__(381);\r\nvar newsletter_page_component_1 = __webpack_require__(382);\r\nvar registration_complete_component_1 = __webpack_require__(408);\r\nvar quick_registration_component_1 = __webpack_require__(406);\r\nvar SysConfig = (function () {\r\n    function SysConfig() {\r\n    }\r\n    SysConfig.getComponentByName = function (componentName) {\r\n        var component;\r\n        switch (componentName) {\r\n            case 'HomeComponent':\r\n                component = home_component_1.HomeComponent;\r\n                break;\r\n            case 'FaqComponent':\r\n                component = faq_component_1.FaqComponent;\r\n                break;\r\n            case 'ClientAreaHomeComponent':\r\n                component = client_area_home_component_1.ClientAreaHomeComponent;\r\n                break;\r\n            case 'PrivacyPolicyComponent':\r\n                component = privacy_policy_component_1.PrivacyPolicyComponent;\r\n                break;\r\n            case 'CookiePolicyComponent':\r\n                component = cookie_policy_component_1.CookiePolicyComponent;\r\n                break;\r\n            case 'PurchaseConditionComponent':\r\n                component = purchase_condition_component_1.PurchaseConditionComponent;\r\n                break;\r\n            case 'InfoRequestComponent':\r\n                component = info_request_component_1.InfoRequestComponent;\r\n                break;\r\n            case 'UserLoginComponent':\r\n                component = user_login_component_1.UserLoginComponent;\r\n                break;\r\n            case 'UserPasswordComponent':\r\n                component = user_password_component_1.UserPasswordComponent;\r\n                break;\r\n            case 'RegisterComponent':\r\n                component = register_component_1.RegisterComponent;\r\n                break;\r\n            case 'CmsPageComponent':\r\n                component = cms_page_component_1.CmsPageComponent;\r\n                break;\r\n            case 'CategoryComponent':\r\n                component = category_component_1.CategoryComponent;\r\n                break;\r\n            case 'ProductDetailsComponent':\r\n                component = product_details_component_1.ProductDetailsComponent;\r\n                break;\r\n            case 'ProductPageListComponent':\r\n                component = product_page_list_component_1.ProductPageListComponent;\r\n                break;\r\n            case 'PromotionsComponent':\r\n                component = promotions_component_1.PromotionsComponent;\r\n                break;\r\n            case 'ArticleComponent':\r\n                component = news_page_component_1.ArticleComponent;\r\n                break;\r\n            case 'OtherProductComponent':\r\n                component = other_product_component_1.OtherProductComponent;\r\n                break;\r\n            case 'BlogPageComponent':\r\n                component = blog_page_component_1.BlogPageComponent;\r\n                break;\r\n            case 'ArticleCategoryComponent':\r\n                component = article_category_component_1.ArticleCategoryComponent;\r\n                break;\r\n            case 'ClientAreaOrderListComponent':\r\n                component = client_area_order_list_component_1.ClientAreaOrderListComponent;\r\n                break;\r\n            case 'ClientAreaInvoicesComponent':\r\n                component = client_area_invoices_component_1.ClientAreaInvoicesComponent;\r\n                break;\r\n            case 'ClientAreaProfileComponent':\r\n                component = client_area_profile_component_1.ClientAreaProfileComponent;\r\n                break;\r\n            case 'CartComponent':\r\n                component = cart_component_1.CartComponent;\r\n                break;\r\n            case 'CartCashComponent':\r\n                component = cart_cash_component_1.CartCashComponent;\r\n                break;\r\n            case 'CartSubmittedComponent':\r\n                component = cart_submitted_component_1.CartSubmittedComponent;\r\n                break;\r\n            case 'CartEmptyPageComponent':\r\n                component = cart_empty_page_component_1.CartEmptyPageComponent;\r\n                break;\r\n            case 'ClientAreaOrderDetailsComponent':\r\n                component = client_area_order_details_component_1.ClientAreaOrderDetailsComponent;\r\n                break;\r\n            case 'ClientAreaCatalogPrivateComponent':\r\n                component = client_area_catalog_private_component_1.ClientAreaCatalogPrivateComponent;\r\n                break;\r\n            case 'RegistrationConfirmationComponent':\r\n                component = registration_confirmation_component_1.RegistrationConfirmationComponent;\r\n                break;\r\n            case 'PaymentConfirmationComponent':\r\n                component = payment_confirmation_component_1.PaymentConfirmationComponent;\r\n                break;\r\n            case 'PaymentUnicreditConfirmationComponent':\r\n                component = payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent;\r\n                break;\r\n            case 'PaymentNexiConfirmationComponent':\r\n                component = payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent;\r\n                break;\r\n            case 'PaymentBancaSellaConfirmationComponent':\r\n                component = payment_banca_sella_confirmation_component_1.PaymentBancaSellaConfirmationComponent;\r\n                break;\r\n            case 'OfflinePageComponent':\r\n                component = offline_page_component_1.OfflinePageComponent;\r\n                break;\r\n            case \"NotFoundPageComponent\":\r\n                component = not_found_page_component_1.NotFoundPageComponent;\r\n                break;\r\n            case \"SearchComponent\":\r\n                component = search_component_1.SearchComponent;\r\n                break;\r\n            case \"NewsletterPageComponent\":\r\n                component = newsletter_page_component_1.NewsletterPageComponent;\r\n                break;\r\n            case \"NewsletterConfirmationPageComponent\":\r\n                component = newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent;\r\n                break;\r\n            case \"RegistrationConfirmationPageComponent\":\r\n                component = registration_complete_component_1.RegistrationConfirmationPageComponent;\r\n                break;\r\n            case \"QuickRegistrationComponent\":\r\n                component = quick_registration_component_1.QuickRegistrationComponent;\r\n                break;\r\n            default:\r\n                component = null;\r\n        }\r\n        return component;\r\n    };\r\n    SysConfig.getAllComponents = function () {\r\n        return [\r\n            home_component_1.HomeComponent,\r\n            faq_component_1.FaqComponent,\r\n            client_area_home_component_1.ClientAreaHomeComponent,\r\n            privacy_policy_component_1.PrivacyPolicyComponent,\r\n            cookie_policy_component_1.CookiePolicyComponent,\r\n            purchase_condition_component_1.PurchaseConditionComponent,\r\n            info_request_component_1.InfoRequestComponent,\r\n            user_login_component_1.UserLoginComponent,\r\n            user_password_component_1.UserPasswordComponent,\r\n            register_component_1.RegisterComponent,\r\n            cms_page_component_1.CmsPageComponent,\r\n            category_component_1.CategoryComponent,\r\n            product_details_component_1.ProductDetailsComponent,\r\n            product_page_list_component_1.ProductPageListComponent,\r\n            promotions_component_1.PromotionsComponent,\r\n            news_page_component_1.ArticleComponent,\r\n            other_product_component_1.OtherProductComponent,\r\n            blog_page_component_1.BlogPageComponent,\r\n            article_category_component_1.ArticleCategoryComponent,\r\n            client_area_order_list_component_1.ClientAreaOrderListComponent,\r\n            client_area_invoices_component_1.ClientAreaInvoicesComponent,\r\n            client_area_profile_component_1.ClientAreaProfileComponent,\r\n            cart_component_1.CartComponent,\r\n            cart_cash_component_1.CartCashComponent,\r\n            cart_submitted_component_1.CartSubmittedComponent,\r\n            cart_empty_page_component_1.CartEmptyPageComponent,\r\n            client_area_order_details_component_1.ClientAreaOrderDetailsComponent,\r\n            client_area_catalog_private_component_1.ClientAreaCatalogPrivateComponent,\r\n            registration_confirmation_component_1.RegistrationConfirmationComponent,\r\n            payment_confirmation_component_1.PaymentConfirmationComponent,\r\n            payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent,\r\n            payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent,\r\n            payment_banca_sella_confirmation_component_1.PaymentBancaSellaConfirmationComponent,\r\n            offline_page_component_1.OfflinePageComponent,\r\n            not_found_page_component_1.NotFoundPageComponent,\r\n            search_component_1.SearchComponent,\r\n            newsletter_page_component_1.NewsletterPageComponent,\r\n            newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent,\r\n            registration_complete_component_1.RegistrationConfirmationPageComponent,\r\n            quick_registration_component_1.QuickRegistrationComponent\r\n        ];\r\n    };\r\n    SysConfig = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], SysConfig);\r\n    return SysConfig;\r\n}());\r\nexports.SysConfig = SysConfig;\r\n\n\n/***/ }),\n\n/***/ 43:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar common_1 = __webpack_require__(44);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar http_1 = __webpack_require__(95);\r\nvar CustomersCanvasService = (function () {\r\n    function CustomersCanvasService(_api, location, mappings, http, cryptoService) {\r\n        this._api = _api;\r\n        this.location = location;\r\n        this.mappings = mappings;\r\n        this.http = http;\r\n        this.cryptoService = cryptoService;\r\n        // Observable string sources\r\n        this.isCanvasModalOpenedSource = new rxjs_1.Subject();\r\n        this.isCanvasProductDesignApprovedSource = new rxjs_1.Subject();\r\n        // Observable string streams\r\n        this.isCanvasModalOpened$ = this.isCanvasModalOpenedSource.asObservable();\r\n        this.isCanvasProductDesignApproved$ = this.isCanvasProductDesignApprovedSource.asObservable();\r\n        this.toShowCanvasContainer = false;\r\n        //Object containing data generated by getProofImages.\r\n        this.approveData = null;\r\n        //Object containing data generated by finishProductDesign.\r\n        this.renderData = null;\r\n        //Object containing data generated by saveProduct.\r\n        this.saveData = null;\r\n        this.editor = null;\r\n        this.loadData = null;\r\n        this.currentPage = \"design\";\r\n        this.workflowPages = {};\r\n        this.documentLinks = [\"\"];\r\n    }\r\n    // Service canvas state / if it is opened or closed \r\n    CustomersCanvasService.prototype.setCanvasState = function (isOpened) {\r\n        this.isCanvasModalOpenedSource.next(isOpened);\r\n    };\r\n    // Service canvas state / if product design is approved or not\r\n    CustomersCanvasService.prototype.setCanvasProductDesignState = function (isApproved) {\r\n        this.isCanvasProductDesignApprovedSource.next(isApproved);\r\n    };\r\n    //load a script and after it is loaded, instantiate an canvas iframe\r\n    CustomersCanvasService.prototype.openCanvasEditor = function (canvasInfo, isStateId) {\r\n        var _this = this;\r\n        var canvasUrl = this.cryptoService.decryptString(canvasInfo.CanvasUrl);\r\n        if (canvasUrl != \"\") {\r\n            var canvasScript = document.querySelector('script[src=\\\"' + canvasUrl + '\\\"]');\r\n            // set canvas state as opened, so inside of components we know when to stick and when unstick some divs\r\n            this.setCanvasState(true);\r\n            // if script is already loaded, don't append it again\r\n            if (canvasScript == null) {\r\n                var node = document.createElement('script');\r\n                node.src = canvasUrl;\r\n                node.setAttribute(\"id\", \"CcIframeApiScript\");\r\n                node.type = 'text/javascript';\r\n                node.async = true;\r\n                node.charset = 'utf-8';\r\n                // to display canvas container\r\n                this.toShowCanvasContainer = true;\r\n                // after script is loaded, instantiate canvas iframe\r\n                node.onload = function () {\r\n                    _this.instanciateIframe(canvasInfo, isStateId);\r\n                };\r\n                document.getElementsByTagName('head')[0].appendChild(node);\r\n            }\r\n            else {\r\n                this.instanciateIframe(canvasInfo, isStateId);\r\n            }\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.instanciateIframe = function (canvasInfo, isStateId) {\r\n        var _this = this;\r\n        var templateImagesFolderPath = canvasInfo.TemplateImagesFolderPath;\r\n        var canvasUserUsername = canvasInfo.CustomerCanvasUserName;\r\n        var watermark = canvasInfo.Watermark;\r\n        // defining product folder path\r\n        var productDefinition;\r\n        if (isStateId) {\r\n            // getting design by state id\r\n            productDefinition = canvasInfo.CanvasStateId;\r\n        }\r\n        else {\r\n            productDefinition = { surfaces: templateImagesFolderPath };\r\n        }\r\n        // const productDefinition = { surfaces: { designFolder: productFolderPath } };\r\n        var editorFrame = document.getElementById(\"editorFrame\");\r\n        var configuration = {\r\n            userId: canvasUserUsername,\r\n            initialMode: \"Advanced\",\r\n            watermark: {\r\n                text: {\r\n                    text: watermark,\r\n                    opacity: 0.3\r\n                }\r\n            },\r\n            widgets: {\r\n                // To disable a download button when the project is in the production\r\n                FinishButton: { mode: \"Disabled\" },\r\n                GalleryDialog: {\r\n                    defaultTabName: \"User\",\r\n                    tabs: [\r\n                        {\r\n                            name: \"User\",\r\n                            type: \"user\",\r\n                            translationKey: \"GalleryDialog.TAB_USER\",\r\n                            canEdit: true,\r\n                            canUpload: true\r\n                        },\r\n                        {\r\n                            name: \"Public\",\r\n                            type: \"public\",\r\n                            subFolderName: \"\",\r\n                            translationKey: \"GalleryDialog.TAB_PUBLIC\",\r\n                            canEdit: false\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        };\r\n        CustomersCanvas.IframeApi.loadEditor(editorFrame, productDefinition, configuration)\r\n            .then(function (e) {\r\n            _this.editor = e;\r\n        })\r\n            .catch(function (error) {\r\n            if (error != null) {\r\n                _this.loadData = _this.handleError(error, \"Load failed with exception: \");\r\n            }\r\n        });\r\n    };\r\n    CustomersCanvasService.prototype.saveCanvasProduct = function () {\r\n        var _this = this;\r\n        this.editor.saveProduct()\r\n            .then(function (result) {\r\n            //Saving the product state info.\r\n            _this.saveData = result;\r\n        })\r\n            .catch(function (error) {\r\n            _this.saveData = _this.handleError(error, \"Save failed with exception: \");\r\n        });\r\n    };\r\n    CustomersCanvasService.prototype.getImagesLinks = function (editorPage, approvePage, finishOrderPage) {\r\n        var _this = this;\r\n        this.workflowPages = {\r\n            \"design\": { elements: editorPage },\r\n            \"approve\": { elements: approvePage },\r\n            \"finish\": { elements: finishOrderPage }\r\n        };\r\n        this.documentLinks = [];\r\n        if (this.editor) {\r\n            this.editor.getProofImages()\r\n                .then(function (result) {\r\n                //Saving proof images info.\r\n                _this.approveData = result;\r\n                // add all links to images to the documentLinks, because we will use that list for element manipulation later\r\n                if (_this.approveData.proofImageUrls) {\r\n                    _this.approveData.proofImageUrls.forEach(function (element) {\r\n                        if (element.length > 0) {\r\n                            _this.documentLinks.push(element[0]);\r\n                        }\r\n                    });\r\n                }\r\n                //Go to the approval page.\r\n                _this.setupPage(\"approve\");\r\n                _this.setBackgroundImagesUrl();\r\n            })\r\n                .catch(function (error) {\r\n                _this.approveData = _this.handleError(error, \"Getting proof images failed with exception: \");\r\n            });\r\n        }\r\n    };\r\n    //img tags inside of slider are later changed to be divs with background image url property, so we need to manage that\r\n    CustomersCanvasService.prototype.setBackgroundImagesUrl = function () {\r\n        var sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n        // because we can't use *ngFor to create as many elements as we need, we need to remove one li element if there is actually only one element we get from customer canvas(we have 2 elements in html)\r\n        if (sliderImageElements.length > this.documentLinks.length) {\r\n            var differenceItems = sliderImageElements.length - this.documentLinks.length;\r\n            for (var index = 1; index <= differenceItems; index++) {\r\n                var element = sliderImageElements[sliderImageElements.length - index];\r\n                //remove li parent of element we found\r\n                var parentLi = $(element).parents(\"li\");\r\n                $(parentLi)[0].remove();\r\n            }\r\n        }\r\n        //because we can't use angular binding with slider plugin (plugin is initialized before service), we need to set url and src attributes of each slide\r\n        if (this.documentLinks && this.documentLinks.length > 0) {\r\n            sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n            for (var index = 0; index < this.documentLinks.length; index++) {\r\n                var link = this.documentLinks[index];\r\n                var foundDomElement = $(sliderImageElements)[index];\r\n                if (foundDomElement) {\r\n                    $(foundDomElement).css('background-image', 'url(' + link + ')');\r\n                    $(foundDomElement).attr(\"src\", link);\r\n                }\r\n            }\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.finishProductCustomization = function () {\r\n        return this.editor.finishProductDesign();\r\n    };\r\n    CustomersCanvasService.prototype.setupPageAfterProductCustomization = function (renderData, isError) {\r\n        if (!isError) {\r\n            this.renderData = renderData;\r\n        }\r\n        else {\r\n            this.renderData = this.handleError(renderData, \"Product customization completion failed with exception: \");\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.openDocumentInNewTab = function () {\r\n        var sliderElements = $(\"#approvePage ul li\");\r\n        if (sliderElements.length > 0) {\r\n            for (var index = 0; index < sliderElements.length; index++) {\r\n                var element = sliderElements[index];\r\n                //if element has this class, it means it is active inside of slider, so we want to open that element in a new tab\r\n                if ($(element).hasClass(\"active-revslide\")) {\r\n                    window.open(this.documentLinks[index], \"_blank\");\r\n                }\r\n            }\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.openNewProductInEditor = function () {\r\n        if (this.editor != null) {\r\n            this.editor.revertProduct();\r\n            this.setupPage(\"design\");\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.reopenProductInEditor = function () {\r\n        this.setupPage(\"design\");\r\n    };\r\n    // set details of view we want to show and set layout properties depending on view\r\n    CustomersCanvasService.prototype.setupPage = function (page) {\r\n        var _this = this;\r\n        var destPageData = this.workflowPages[page];\r\n        if (this.workflowPages[this.currentPage]) {\r\n            var elements = this.workflowPages[this.currentPage].elements;\r\n            if (elements && elements.nativeElement && elements.nativeElement.id) {\r\n                // getting id of element that needs to be hidden\r\n                var generatedIdHide = \"#\" + elements.nativeElement.id;\r\n                $(generatedIdHide).fadeOut(function () {\r\n                    if (destPageData && destPageData.elements && destPageData.elements.nativeElement && destPageData.elements.nativeElement.id) {\r\n                        // getting id of element that needs to be shown\r\n                        var generatedIdShow = \"#\" + destPageData.elements.nativeElement.id;\r\n                        $(generatedIdShow).show();\r\n                        _this.currentPage = page;\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    };\r\n    CustomersCanvasService.prototype.handleError = function (error, message) {\r\n        console.error(message, error);\r\n        return error;\r\n    };\r\n    ;\r\n    CustomersCanvasService.prototype.updatePrevCanvasInfo = function (canvasData) {\r\n        var url = this.mappings.Web_Api_Update_Prev_Canvas_Info;\r\n        var params = {\r\n            RowIdPrev: canvasData.RowIdPrev,\r\n            CanvasStateId: canvasData.stateId,\r\n            CanvasHiResOutputUrls: canvasData.hiResOutputUrls\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    // removing state from customers canvas\r\n    CustomersCanvasService.prototype.deleteCustomerCanvasState = function (canvasInfo) {\r\n        // const apiKey = '01b3ecc6-6423-4684-b469-f258afa87100';\r\n        var decryptedApiKey = this.cryptoService.decryptString(canvasInfo.CanvasApiKey);\r\n        var baseUrl = this.mappings.Canvas_Web_Api_Base_Url.replace('{apiKey}', decryptedApiKey);\r\n        var url = baseUrl + this.mappings.Web_Api_Delete_Customers_Canvas_State;\r\n        url = url.replace('{userId}', canvasInfo.CustomerCanvasUserName).replace('{stateId}', canvasInfo.CanvasStateId);\r\n        var apiKeyFinal = \"ApiKey_\" + decryptedApiKey;\r\n        // configure headers for creating a valid request\r\n        var options = {};\r\n        options.headers = new http_1.Headers();\r\n        options.headers.append('X-CustomersCanvasAPIKey', apiKeyFinal);\r\n        options.headers.append('Content-Type', 'application/json');\r\n        return this.http.delete(url, options);\r\n    };\r\n    CustomersCanvasService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof common_1.PlatformLocation !== 'undefined' && common_1.PlatformLocation) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof http_1.Http !== 'undefined' && http_1.Http) === 'function' && _d) || Object, (typeof (_e = typeof crypto_service_1.CryptoService !== 'undefined' && crypto_service_1.CryptoService) === 'function' && _e) || Object])\r\n    ], CustomersCanvasService);\r\n    return CustomersCanvasService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.CustomersCanvasService = CustomersCanvasService;\r\n\n\n/***/ }),\n\n/***/ 466:\n/***/ (function(module, exports) {\n\nfunction webpackEmptyContext(req) {\n\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 466;\n\n\n/***/ }),\n\n/***/ 469:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\r\n * THIS IS TEMPORARY TO PATCH 2.1.1+ Core bugs\r\n */\r\n\r\n/* tslint:disable */\r\nvar __compiler__ = __webpack_require__(103);\r\nvar core_1 = __webpack_require__(0);\r\nif (!core_1.__core_private__['ViewUtils']) {\r\n    core_1.__core_private__['ViewUtils'] = core_1.__core_private__['view_utils'];\r\n}\r\nif (__compiler__ && __compiler__.SelectorMatcher && __compiler__.CssSelector) {\r\n    (__compiler__).__compiler_private__ = {\r\n        SelectorMatcher: __compiler__.SelectorMatcher,\r\n        CssSelector: __compiler__.CssSelector\r\n    };\r\n}\r\n\n\n/***/ }),\n\n/***/ 470:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar forms_1 = __webpack_require__(228);\r\nvar router_1 = __webpack_require__(12);\r\nvar browser_1 = __webpack_require__(280); // for AoT we need to manually split universal packages\r\nvar idle_preload_1 = __webpack_require__(585);\r\nvar http_1 = __webpack_require__(95);\r\nvar core_2 = __webpack_require__(27);\r\nvar app_module_1 = __webpack_require__(594);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\n// Will be merged into @angular/platform-browser in a later release\r\n// see https://github.com/angular/angular/pull/12322\r\nvar angular2_meta_1 = __webpack_require__(99);\r\nvar default_request_options_1 = __webpack_require__(625);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar routes_browser_service_1 = __webpack_require__(628);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar application_service_1 = __webpack_require__(128);\r\nvar browser_2 = __webpack_require__(629);\r\n// import * as LRU from 'modern-lru';\r\nfunction getLRU(lru) {\r\n    // use LRU for node\r\n    // return lru || new LRU(10);\r\n    return lru || new Map();\r\n}\r\nexports.getLRU = getLRU;\r\nfunction getRequest() {\r\n    // the request object only lives on the server\r\n    return { cookie: document.cookie };\r\n}\r\nexports.getRequest = getRequest;\r\nfunction getResponse() {\r\n    // the response object is sent as the index.html and lives on the server\r\n    return {};\r\n}\r\nexports.getResponse = getResponse;\r\nfunction TranslateStaticLoaderFactory(http, cache) {\r\n    return new browser_2.TranslateStaticLoader(http, cache);\r\n}\r\nexports.TranslateStaticLoaderFactory = TranslateStaticLoaderFactory;\r\n// TODO(gdi2290): refactor into Universal\r\nexports.UNIVERSAL_KEY = 'UNIVERSAL_CACHE';\r\nvar MainModule = (function () {\r\n    function MainModule(cache, nodeLogger, routes, translate) {\r\n        this.cache = cache;\r\n        this.nodeLogger = nodeLogger;\r\n        this.routes = routes;\r\n        this.translate = translate;\r\n        // TODO(gdi2290): refactor into a lifecycle hook\r\n        this.doRehydrate();\r\n        this.translate.use(this.routes.getLang());\r\n        this.routes.loadRoutes();\r\n    }\r\n    MainModule.prototype.doRehydrate = function () {\r\n        var defaultValue = {};\r\n        var serverCache = this._getCacheValue(cache_service_1.CacheService.KEY, defaultValue);\r\n        this.cache.rehydrate(serverCache);\r\n    };\r\n    MainModule.prototype._getCacheValue = function (key, defaultValue) {\r\n        // browser\r\n        var win = window;\r\n        if (win[exports.UNIVERSAL_KEY] && win[exports.UNIVERSAL_KEY][key]) {\r\n            var serverCache = defaultValue;\r\n            try {\r\n                serverCache = JSON.parse(win[exports.UNIVERSAL_KEY][key]);\r\n                if (typeof serverCache !== typeof defaultValue) {\r\n                    console.log('Angular Universal: The type of data from the server is different from the default value type');\r\n                    serverCache = defaultValue;\r\n                }\r\n            }\r\n            catch (e) {\r\n                console.log('Angular Universal: There was a problem parsing the server data during rehydrate');\r\n                serverCache = defaultValue;\r\n            }\r\n            return serverCache;\r\n        }\r\n        else {\r\n            console.log('Angular Universal: UNIVERSAL_CACHE is missing');\r\n        }\r\n        return defaultValue;\r\n    };\r\n    MainModule = __decorate([\r\n        core_1.NgModule({\r\n            bootstrap: [app_module_1.AppComponent],\r\n            imports: [\r\n                browser_1.UniversalModule,\r\n                forms_1.FormsModule,\r\n                core_2.TranslateModule.forRoot({\r\n                    loader: {\r\n                        provide: core_2.TranslateLoader,\r\n                        useFactory: (TranslateStaticLoaderFactory),\r\n                        deps: [api_service_1.ApiService, application_service_1.ApplicationService]\r\n                    }\r\n                }),\r\n                router_1.RouterModule.forRoot([], { useHash: false, preloadingStrategy: idle_preload_1.IdlePreload }),\r\n                idle_preload_1.IdlePreloadModule.forRoot(),\r\n                shared_module_1.SharedModule.forRoot(),\r\n                app_module_1.AppModule\r\n            ],\r\n            providers: [\r\n                { provide: http_1.RequestOptions, useClass: default_request_options_1.DefaultRequestOptions },\r\n                { provide: 'CookieService', useClass: cookie_1.CookieBrowserService },\r\n                { provide: routes_service_1.RoutesService, useClass: routes_browser_service_1.RoutesBrowserService },\r\n                { provide: 'isBrowser', useValue: browser_1.isBrowser },\r\n                { provide: 'isNode', useValue: browser_1.isNode },\r\n                { provide: 'req', useFactory: getRequest },\r\n                { provide: 'res', useFactory: getResponse },\r\n                { provide: 'LRU', useFactory: getLRU, deps: [] },\r\n                node_logger_service_1.NodeLoggerService,\r\n                cache_service_1.CacheService,\r\n                angular2_meta_1.Meta\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _a) || Object, (typeof (_b = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _b) || Object, (typeof (_c = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object])\r\n    ], MainModule);\r\n    return MainModule;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.MainModule = MainModule;\r\n\n\n/***/ }),\n\n/***/ 48:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar HelperService = (function () {\r\n    function HelperService() {\r\n    }\r\n    //Return the name of a file, withouth extention, from a path \r\n    //Eg. \r\n    //Input:http://www.wscprinter.it/business-cards.jpg\r\n    //Output:business-cards\r\n    HelperService.prototype.GetFileNameFromPath = function (filePath) {\r\n        var fileName = \"\";\r\n        if (filePath != null) {\r\n            var split = filePath.split(\"/\");\r\n            if (split != null) {\r\n                var pop = split.pop();\r\n                if (pop != null) {\r\n                    fileName = pop.replace(/\\.[^/.]+$/, \"\");\r\n                }\r\n            }\r\n            return fileName;\r\n        }\r\n    };\r\n    HelperService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], HelperService);\r\n    return HelperService;\r\n}());\r\nexports.HelperService = HelperService;\r\n\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar common_1 = __webpack_require__(44);\r\nvar core_2 = __webpack_require__(27);\r\nvar system_configuration_service_1 = __webpack_require__(423);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar RoutesService = (function () {\r\n    function RoutesService(router, translate, cookie, location, isBrowser, cache) {\r\n        this.router = router;\r\n        this.translate = translate;\r\n        this.cookie = cookie;\r\n        this.location = location;\r\n        this.isBrowser = isBrowser;\r\n        this.cache = cache;\r\n        this.visiblePageLoader = false;\r\n    }\r\n    RoutesService.prototype.loadRoutes = function () {\r\n    };\r\n    RoutesService.prototype.getRoutesWithComponents = function (rawRoutes) {\r\n        return rawRoutes.map(function (route) {\r\n            if (route.component && 'string' === typeof route.component) {\r\n                return Object.assign({}, route, {\r\n                    component: system_configuration_service_1.SysConfig.getComponentByName(route.component)\r\n                });\r\n            }\r\n            return route;\r\n        });\r\n    };\r\n    RoutesService.prototype.getOnlyOfflineRoutes = function (rawRoutes) {\r\n        //Keeping only the offline route\r\n        var offlineRawRoutes = [];\r\n        for (var _i = 0, rawRoutes_1 = rawRoutes; _i < rawRoutes_1.length; _i++) {\r\n            var rowRoute = rawRoutes_1[_i];\r\n            if (rowRoute.name == \"OFFLINE\") {\r\n                var redirectToRoute = {\r\n                    path: \"\",\r\n                    redirectTo: rowRoute.path,\r\n                    pathMatch: \"full\"\r\n                };\r\n                offlineRawRoutes.push(redirectToRoute);\r\n                var offlineRoute = {\r\n                    path: rowRoute.path,\r\n                    component: rowRoute.component,\r\n                    name: rowRoute.name\r\n                };\r\n                offlineRawRoutes.push(offlineRoute);\r\n                var fallBackRoute = {\r\n                    path: \"**\",\r\n                    redirectTo: rowRoute.path\r\n                };\r\n                offlineRawRoutes.push(fallBackRoute);\r\n                break;\r\n            }\r\n            else {\r\n                continue;\r\n            }\r\n        }\r\n        return offlineRawRoutes;\r\n    };\r\n    RoutesService.prototype.getLang = function () {\r\n        if (!this.locales) {\r\n            this.locales = this.cache.get('Locales');\r\n        }\r\n        var langFromUrl = null;\r\n        var langFromUrlMatch;\r\n        if (langFromUrlMatch = this.location.path().match(/^\\/(\\w{2})\\//)) {\r\n            langFromUrl = langFromUrlMatch[1];\r\n        }\r\n        var cookieLang = this.cookie.get(RoutesService.COOKIE_LANG_KEY);\r\n        if (langFromUrl && this.locales.find(function (existLang) { return existLang === langFromUrl; })) {\r\n            return langFromUrl;\r\n        }\r\n        if (cookieLang && this.locales.find(function (existLang) { return existLang === cookieLang; })) {\r\n            return cookieLang;\r\n        }\r\n        var _loop_1 = function(existBrowserLang) {\r\n            if (this_1.locales.find(function (existLang) { return existLang === existBrowserLang; })) {\r\n                return { value: existBrowserLang };\r\n            }\r\n        };\r\n        var this_1 = this;\r\n        for (var _i = 0, _a = this.browserLangs; _i < _a.length; _i++) {\r\n            var existBrowserLang = _a[_i];\r\n            var state_1 = _loop_1(existBrowserLang);\r\n            if (typeof state_1 === \"object\") return state_1.value;\r\n        }\r\n        return this.locales[0];\r\n    };\r\n    RoutesService.prototype.getRoutes = function () {\r\n    };\r\n    RoutesService.prototype.getRoutePath = function (routeName) {\r\n        var routes = this.getRoutes();\r\n        var routePath = \"\";\r\n        if (routes != undefined && routes != null) {\r\n            routes.filter(function (x) { return x.name == routeName; }).forEach(function (route) {\r\n                routePath = \"/\" + route.path;\r\n            });\r\n        }\r\n        //console.log(routes);\r\n        //console.log(routes.filter(x => x.name == routeName));\r\n        // for (let route of routes) {\r\n        //     //if the name of the route match the one give in input then the relative route path is returned\r\n        //     if (route.name == routeName) {\r\n        //         routePath = \"/\" + route.path;\r\n        //         break;\r\n        //     }\r\n        // }\r\n        if (routePath === \"\") {\r\n            routePath = \"/\";\r\n        }\r\n        return [routePath];\r\n    };\r\n    RoutesService.prototype.getPage = function (routeName) {\r\n        var routePath = \"/\";\r\n        if (routeName != \"\" || routeName != undefined) {\r\n            var routes = this.getRoutes();\r\n            if (routes != undefined) {\r\n                if (routes != undefined && routes != null) {\r\n                    routes.filter(function (x) { return x.name == routeName; }).forEach(function (route) {\r\n                        routePath = \"/\" + route.path;\r\n                    });\r\n                }\r\n            }\r\n        }\r\n        return routePath;\r\n    };\r\n    RoutesService.prototype.showPageLoader = function () {\r\n        this.visiblePageLoader = true;\r\n    };\r\n    RoutesService.prototype.hidePageLoader = function () {\r\n        this.visiblePageLoader = false;\r\n        // window.setTimeout(() =>\r\n        // this.visiblePageLoader = false, 1)\r\n    };\r\n    RoutesService.COOKIE_LANG_KEY = 'CURRENT_LANG';\r\n    RoutesService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof common_1.Location !== 'undefined' && common_1.Location) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object])\r\n    ], RoutesService);\r\n    return RoutesService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.RoutesService = RoutesService;\r\n\n\n/***/ }),\n\n/***/ 56:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar QuotingModel = (function () {\r\n    function QuotingModel() {\r\n        this.categorieCarteCount = 0;\r\n        this.categorieCarteCopertinaCount = 0;\r\n        this.carte1Count = 0;\r\n        this.carte2Count = 0;\r\n        this.colori1Count = 0;\r\n        this.colori2Count = 0;\r\n        this.grammature1Count = 0;\r\n        this.grammature2Count = 0;\r\n        this.plastificazioni1Count = 0;\r\n        this.plastificazioni2Count = 0;\r\n        this.piegatureCount = 0;\r\n        this.materialiFlessibiliCount = 0;\r\n        this.copieCount = 0;\r\n        this.supportiRigidiCount = 0;\r\n        this.elettrosaldatureCount = 0;\r\n        this.tagliCount = 0;\r\n        this.copertineCount = 0;\r\n        this.rilegatureCount = 0;\r\n        this.facciateCount = 0;\r\n        this.tipologieBustaCount = 0;\r\n        this.multiploFacciate = 0;\r\n        this.copieIsValid = true;\r\n        this.facciateIsValid = true;\r\n        this.formatiIsValid = true;\r\n        this.carte1IsValid = true;\r\n        this.grammature1IsValid = true;\r\n        this.carte2IsValid = true;\r\n        this.grammature2IsValid = true;\r\n        this.copertineIsValid = true;\r\n        this.rilegatureIsValid = true;\r\n        this.lavorazioniIsValid = true;\r\n        this.taglioShowed = false;\r\n        this.isTaglioVisible = false;\r\n        this.copieOrder = 0;\r\n        this.facciateOrder = 0;\r\n        this.formatiOrder = 0;\r\n        this.stampaInternoFronteOrder = 0;\r\n        this.stampaInternoOrder = 0;\r\n        this.carteInternoOrder = 0;\r\n        this.plastificazioniInternoOrder = 0;\r\n        this.copertineOrder = 0;\r\n        this.stampaCopertinaFronteOrder = 0;\r\n        this.stampaCopertinaOrder = 0;\r\n        this.cartaCopertinaOrder = 0;\r\n        this.plastificazioniCopertinaOrder = 0;\r\n        this.cartoncinoOrder = 0;\r\n        this.rilegatureOrder = 0;\r\n        this.rifiloOrder = 0;\r\n        this.lavorazioniAccessorieOrder = 0;\r\n        this.piegatureIsValid = true;\r\n        this.plastificazione1IsValid = true;\r\n        this.plastificazione2IsValid = true;\r\n        this.soggettiOrder = 0;\r\n        this.soggettiIsValid = true;\r\n        this.baseFormatoIsValid = true;\r\n        this.baseFormatoMessage = \"\";\r\n        this.altezzaFormatoIsValid = true;\r\n        this.altezzaFormatoMessage = \"\";\r\n        this.formatiMultipliIsValid = true;\r\n        this.formatiVisual = false;\r\n        this.stampaInternoVisual = false;\r\n        this.carteInternoVisual = false;\r\n        this.plastificazioniInternoVisual = false;\r\n        this.copertineVisual = false;\r\n        this.stampaCopertinaVisual = false;\r\n        this.cartaCopertinaVisual = false;\r\n        this.plastificazioniCopertinaVisual = false;\r\n        this.rilegatureVisual = false;\r\n        this.lavorazioniAccessorieVisual = false;\r\n        this.piegatureVisual = false;\r\n        this.taglioOrder = 0;\r\n        this.taglioIsValid = true;\r\n        this.bustaOrder = 0;\r\n        this.bustaIsValid = true;\r\n        this.materialeOrder = 0;\r\n        this.materialeIsValid = true;\r\n        this.supportoOrder = 0;\r\n        this.supportoIsValid = true;\r\n        this.idGruppo = 0;\r\n        this.occhiellaturaOrder = 0;\r\n        this.occhiellaturaIsValid = true;\r\n        this.occhielliCount = 0;\r\n        this.occhielliDisposizioneCount = 0;\r\n        this.asolaOrder = 0;\r\n        this.asolaIsValid = true;\r\n        this.asoleCount = 0;\r\n        this.asoleDisposizioniCount = 0;\r\n        this.cucituraOrder = 0;\r\n        this.cucituraIsValid = true;\r\n        this.cucitureCount = 0;\r\n        this.cucitureDisposizioniCount = 0;\r\n        this.elettroOrder = 0;\r\n        this.elettroIsValid = true;\r\n        this.elettrosaldatureDisposizioniCount = 0;\r\n        this.bifaccialeOrder = 0;\r\n        this.biancoCoprenteOrder = 0;\r\n        this.biancoCoprenteCount = 0;\r\n        this.distanzaOcchielliIsValid = true;\r\n        this.diametroAsolaIsValid = true;\r\n        this.pantoniCount = 0;\r\n        this.colori1IsValid = true;\r\n        //Cartoncino\r\n        this.cartoncinoIsValid = true;\r\n        this.cartoncinoVisual = false;\r\n        this.cartonciniCount = 0;\r\n        this.grammatureCartoncinoIsValid = true;\r\n        this.grammatureCartoncinoCount = 0;\r\n        this.basePackagingIsValid = true;\r\n        this.profonditaPackagingIsValid = true;\r\n        this.idBasePackaging = 0;\r\n        this.idProfonditaPackaging = 0;\r\n        this.formatiCount = 0;\r\n        this.gapLabel = 0;\r\n        this.diametroInterno = 0;\r\n        this.diametroMassimoEsterno = 0;\r\n        this.formatiTipoLabelCount = 0;\r\n        this.formatiTipoLabelIsValid = true;\r\n        this.fustelleLabelCount = 0;\r\n        this.fustellaLabelIsValid = true;\r\n        this.avvolgimentiCount = 0;\r\n        this.avvolgimentiIsValid = true;\r\n        this.numEtichetteIsValid = true;\r\n        this.numEtichette = \"1\";\r\n        this.DiametroInternoAnimaEditabileLabel = false;\r\n        this.DiametroInternoAnimaIsValid = true;\r\n        this.DiametroMassimoEsternoAnimaEditabile = false;\r\n        this.DiametroMassimoEsternoAnimaIsValid = true;\r\n    }\r\n    return QuotingModel;\r\n}());\r\nexports.QuotingModel = QuotingModel;\r\nvar FileCombinationModel = (function () {\r\n    function FileCombinationModel() {\r\n    }\r\n    return FileCombinationModel;\r\n}());\r\nexports.FileCombinationModel = FileCombinationModel;\r\nvar Object = (function () {\r\n    function Object() {\r\n        this.isVisible = true;\r\n    }\r\n    return Object;\r\n}());\r\nexports.Object = Object;\r\nvar WizardListinoScontistica = (function () {\r\n    function WizardListinoScontistica() {\r\n    }\r\n    return WizardListinoScontistica;\r\n}());\r\nexports.WizardListinoScontistica = WizardListinoScontistica;\r\nvar SelectObject = (function () {\r\n    function SelectObject() {\r\n    }\r\n    return SelectObject;\r\n}());\r\nexports.SelectObject = SelectObject;\r\nvar MyVarianteMatrice = (function () {\r\n    function MyVarianteMatrice() {\r\n    }\r\n    return MyVarianteMatrice;\r\n}());\r\nexports.MyVarianteMatrice = MyVarianteMatrice;\r\nvar MyLavorazioneAccessoria = (function () {\r\n    function MyLavorazioneAccessoria() {\r\n        this.isValid = false;\r\n        this.isVisible = true;\r\n        this.valoriCount = 0;\r\n    }\r\n    return MyLavorazioneAccessoria;\r\n}());\r\nexports.MyLavorazioneAccessoria = MyLavorazioneAccessoria;\r\nvar Regola = (function () {\r\n    function Regola() {\r\n    }\r\n    return Regola;\r\n}());\r\nexports.Regola = Regola;\r\nvar MyLavorazioneAccessoriaReturn = (function () {\r\n    function MyLavorazioneAccessoriaReturn() {\r\n    }\r\n    return MyLavorazioneAccessoriaReturn;\r\n}());\r\nexports.MyLavorazioneAccessoriaReturn = MyLavorazioneAccessoriaReturn;\r\nvar LavorazioniComponents = (function () {\r\n    function LavorazioniComponents() {\r\n        this.checkBox = 0;\r\n        this.inputBox = 1;\r\n        this.selectBox = 2;\r\n    }\r\n    return LavorazioniComponents;\r\n}());\r\nexports.LavorazioniComponents = LavorazioniComponents;\r\n\n\n/***/ }),\n\n/***/ 594:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar app_component_1 = __webpack_require__(371);\r\nvar home_module_1 = __webpack_require__(599);\r\nvar cms_page_module_1 = __webpack_require__(601);\r\nvar inventory_product_module_1 = __webpack_require__(616);\r\nvar inventory_category_module_1 = __webpack_require__(615);\r\nvar settings_module_1 = __webpack_require__(617);\r\nvar system_configuration_service_1 = __webpack_require__(423);\r\nvar ng2_table_1 = __webpack_require__(428);\r\n// Need for defer included components by dynamic routing\r\nvar entryComponents = system_configuration_service_1.SysConfig.getAllComponents();\r\nvar AppModule = (function () {\r\n    function AppModule() {\r\n    }\r\n    AppModule = __decorate([\r\n        core_1.NgModule({\r\n            declarations: [app_component_1.AppComponent],\r\n            imports: [\r\n                shared_module_1.SharedModule,\r\n                home_module_1.HomeModule,\r\n                cms_page_module_1.CmsPageModule,\r\n                inventory_product_module_1.InventoryProductModule,\r\n                inventory_category_module_1.InventoryCategoryModule,\r\n                settings_module_1.SettingsModule,\r\n                ng2_table_1.Ng2TableModule,\r\n            ],\r\n            entryComponents: entryComponents.slice()\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], AppModule);\r\n    return AppModule;\r\n}());\r\nexports.AppModule = AppModule;\r\nvar app_component_2 = __webpack_require__(371);\r\nexports.AppComponent = app_component_2.AppComponent;\r\n\n\n/***/ }),\n\n/***/ 595:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(126);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar NewsListComponent = (function () {\r\n    function NewsListComponent(_compiler, componentHelper, _elementRef, templateService, articleService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.articleService = articleService;\r\n        this.isBrowser = isBrowser;\r\n        this.columns = 4;\r\n    }\r\n    NewsListComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        //Depending on the type of the list, a different template is used\r\n        var subComponentTemplateUrl;\r\n        switch (this.newsOrientation) {\r\n            case \"newsVertical\":\r\n                subComponentTemplateUrl = \"newsListVerticalPageTemplate\";\r\n                break;\r\n            case \"newsHorizontal\":\r\n                subComponentTemplateUrl = \"newsListHorizontalPageTemplate\";\r\n                break;\r\n            case \"newsVerticalBanner\":\r\n                subComponentTemplateUrl = \"newsListVerticalBannerPageTemplate\";\r\n                break;\r\n            case \"newsHorizontalBanner\":\r\n                subComponentTemplateUrl = \"newsListHorizontalBannerHomepageTemplate\";\r\n                break;\r\n        }\r\n        this.articleService.getArticleList(this.category, subComponentTemplateUrl).subscribe(function (result) {\r\n            var templateData = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(templateData, _this.items, _this.category, _this.newsOrientation, _this.headerTypeNews, _this.columns);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n    };\r\n    NewsListComponent.prototype.createSubComponent = function (response, inputItems, inputCategory, inputNewsOrientation, inputHeaderTypeNews, inputColumns) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(languageService, articleService) {\r\n                this.languageService = languageService;\r\n                this.articleService = articleService;\r\n                this.items = inputItems;\r\n                this.category = inputCategory;\r\n                this.newsOrientation = inputNewsOrientation;\r\n                this.headerTypeNews = inputHeaderTypeNews;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.columns = inputColumns;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                this.items = response.ArticleList;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: response.TemplateHtml\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _b) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], NewsListComponent.prototype, \"items\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], NewsListComponent.prototype, \"category\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], NewsListComponent.prototype, \"newsOrientation\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], NewsListComponent.prototype, \"headerTypeNews\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], NewsListComponent.prototype, \"columns\", void 0);\r\n    NewsListComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-article-list\",\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _e) || Object, Boolean])\r\n    ], NewsListComponent);\r\n    return NewsListComponent;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.NewsListComponent = NewsListComponent;\r\n\n\n/***/ }),\n\n/***/ 596:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar newsletter_service_1 = __webpack_require__(84);\r\n//Models\r\nvar user_login_1 = __webpack_require__(73);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar header_service_1 = __webpack_require__(127);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar FooterComponent = (function () {\r\n    function FooterComponent(_compiler, componentHelper, _elementRef, cmsComponentService, route, router, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.route = route;\r\n        this.router = router;\r\n        this.isBrowser = isBrowser;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n        this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n    }\r\n    FooterComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentFooterData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentFooterData);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            var footerData_1;\r\n            var footerSub = this.cmsComponentService.getFooterData().subscribe(function (result) {\r\n                footerData_1 = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(footerData_1);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            });\r\n            this.subManager.add(footerSub);\r\n        }\r\n    };\r\n    FooterComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject \r\n    FooterComponent.prototype.createSubComponent = function (footerData) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(routesService, authService, languageService, newsletterService, headerService) {\r\n                var _this = this;\r\n                this.routesService = routesService;\r\n                this.authService = authService;\r\n                this.languageService = languageService;\r\n                this.newsletterService = newsletterService;\r\n                this.headerService = headerService;\r\n                this.loggedIdUser = new user_login_1.UserLogin();\r\n                this.company = footerData.Company;\r\n                this.isActiveQuickRegistration = footerData.IsActiveQuickRegistration;\r\n                this.faqPageName = this.routesService.getRoutePath('FAQ');\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.cookiePageName = this.routesService.getRoutePath('INFO COOKIE');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.passwordPageName = this.routesService.getRoutePath('RECUPERA PASSWORD');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n                this.areaClientiPageName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.isCaptchaInvalid = true;\r\n                this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n                this.theme = \"light\";\r\n                this.lang = this.languageService.getShortLang();\r\n                this.isArrayInit = false;\r\n                this.spinnerNewslatter = false;\r\n                this.model = {\r\n                    Email: \"\"\r\n                };\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.headerService.getLoggedInUser().subscribe(function (user) {\r\n                    _this.loggedIdUser = user;\r\n                });\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                //setup of links, they must start with http to work properly\r\n                var linkStart = \"http://\";\r\n                var linkSecuredStart = \"https://\";\r\n                if (this.company.Facebook != null) {\r\n                    if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Facebook = linkStart + this.company.Facebook;\r\n                    }\r\n                }\r\n                if (this.company.Youtube != null) {\r\n                    if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Youtube = linkStart + this.company.Youtube;\r\n                    }\r\n                }\r\n                if (this.company.Twitter != null) {\r\n                    if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Twitter = linkStart + this.company.Twitter;\r\n                    }\r\n                }\r\n                if (this.company.Website != null) {\r\n                    if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Website = linkStart + this.company.Website;\r\n                    }\r\n                }\r\n                if (this.company.Instagram != null) {\r\n                    if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Instagram = linkStart + this.company.Instagram;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerNewslatter = true;\r\n                if (form) {\r\n                    var newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n                        if (result == \"-1\") {\r\n                            _this.alreadySubscribed = true;\r\n                            _this.successfullySubscribed = false;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                        else {\r\n                            _this.alreadySubscribed = false;\r\n                            _this.successfullySubscribed = true;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                    });\r\n                    this.subManager.add(newsletterSub);\r\n                }\r\n                else {\r\n                    this.spinnerNewslatter = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setVerified = function (data) {\r\n                this.isCaptchaInvalid = !data;\r\n            };\r\n            ChildComponent.prototype.showModalQuickRegistrationEmail = function () {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                document.querySelector('#header').style.zIndex = '1041';\r\n                $(\"#quickRegistrationEmailModal\").modal(\"show\");\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: footerData.TemplateHtml\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _d) || Object, (typeof (_e = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _e) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], FooterComponent.prototype, \"parentFooterData\", void 0);\r\n    FooterComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            selector: \"dy-footer\",\r\n            template: ''\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, Boolean])\r\n    ], FooterComponent);\r\n    return FooterComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.FooterComponent = FooterComponent;\r\n\n\n/***/ }),\n\n/***/ 597:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar NewsletterComponent = (function () {\r\n    function NewsletterComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.isBrowser = isBrowser;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    NewsletterComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var pageTemplateSub = this.templateService.getComponentTemplate(\"newsletterPageTemplate\").subscribe(function (result) {\r\n            var templateHtml = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(templateHtml);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(pageTemplateSub);\r\n    };\r\n    NewsletterComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    NewsletterComponent.prototype.createSubComponent = function (template) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(newsletterService, routesService) {\r\n                this.newsletterService = newsletterService;\r\n                this.routesService = routesService;\r\n                this.isCaptchaInvalid = true;\r\n                this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n                this.theme = \"light\";\r\n                this.spinnerNewslatter = false;\r\n                this.model = {\r\n                    Email: \"\",\r\n                    CheckboxFooter: false\r\n                };\r\n                this.privacyPageNameNewsletter = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n            };\r\n            ChildComponent.prototype.onSubmit = function (form) {\r\n                var _this = this;\r\n                this.spinnerNewslatter = true;\r\n                if (form) {\r\n                    var newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n                        if (result == \"-1\") {\r\n                            _this.alreadySubscribed = true;\r\n                            _this.successfullySubscribed = false;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                        else {\r\n                            _this.alreadySubscribed = false;\r\n                            _this.successfullySubscribed = true;\r\n                            _this.spinnerNewslatter = false;\r\n                        }\r\n                    });\r\n                    this.subManager.add(newsletterSub);\r\n                }\r\n                else {\r\n                    this.spinnerNewslatter = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setVerified = function (data) {\r\n                this.isCaptchaInvalid = !data;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: template\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    NewsletterComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-newsletter\",\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n    ], NewsletterComponent);\r\n    return NewsletterComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.NewsletterComponent = NewsletterComponent;\r\n\n\n/***/ }),\n\n/***/ 598:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar user_login_1 = __webpack_require__(73);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar router_1 = __webpack_require__(12);\r\nvar router_state_1 = __webpack_require__(82);\r\nvar application_service_1 = __webpack_require__(128);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar header_service_1 = __webpack_require__(127);\r\nvar HeaderComponent = (function () {\r\n    function HeaderComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.data = {};\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    HeaderComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentHeaderData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentHeaderData);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            //let templateHtml: string;\r\n            var headerInfo_1;\r\n            //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n            var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n                headerInfo_1 = result;\r\n                var startDate = new Date();\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(headerInfo_1);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n                // var endDate = new Date();\r\n                // this.nodeLogger.AddLogWithTime(\"injecting Header (\" + diffMs + \")\");\r\n            });\r\n            this.subManager.add(headDataSub);\r\n        }\r\n    };\r\n    HeaderComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //Creates component to inject \r\n    HeaderComponent.prototype.createSubComponent = function (headerInfo) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(language, authService, cartService, isBrowser, searchService, routesService, router, appService, activatedRoute, canvasService, headerService) {\r\n                var _this = this;\r\n                this.language = language;\r\n                this.authService = authService;\r\n                this.cartService = cartService;\r\n                this.isBrowser = isBrowser;\r\n                this.searchService = searchService;\r\n                this.routesService = routesService;\r\n                this.router = router;\r\n                this.appService = appService;\r\n                this.activatedRoute = activatedRoute;\r\n                this.canvasService = canvasService;\r\n                this.headerService = headerService;\r\n                this.headerIsInit = false;\r\n                this.company = headerInfo.Company;\r\n                this.menuItems = headerInfo.MenuList;\r\n                this.megaMenuItems = headerInfo.Categories;\r\n                this.isActiveQuickRegistration = headerInfo.IsActiveQuickRegistration;\r\n                this.quickRegistrationData = headerInfo.QuickRegistrationData;\r\n                this.isLazyLoadActive = headerInfo.isEnableLAzyLoad;\r\n                this.languagesList = headerInfo.Languages;\r\n                this.currentLanguage = {};\r\n                this.loggedIdUser = new user_login_1.UserLogin();\r\n                this.shoppingCart = headerInfo.CartInfo;\r\n                this.homePageName = [];\r\n                this.productsPageName = [];\r\n                this.promotionsPageName = [];\r\n                this.loginPageName = [];\r\n                this.registerPageName = [];\r\n                this.areaClientiName = [];\r\n                this.carrelloPageName = [];\r\n                this.blogPageName = [];\r\n                this.contactPageName = [];\r\n                this.disableModalButtons = false;\r\n                this.spinner = false;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.cartService.initCart(headerInfo.CartInfo);\r\n                this.headerService.getLoggedInUser().subscribe(function (user) {\r\n                    _this.loggedIdUser = user;\r\n                });\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var date = new Date();\r\n                var lang = this.language.getShortLang();\r\n                //Setting current language info\r\n                for (var _i = 0, _a = this.languagesList; _i < _a.length; _i++) {\r\n                    var entry = _a[_i];\r\n                    if (entry.ShortCode == lang) {\r\n                        this.currentLanguage = entry;\r\n                        break;\r\n                    }\r\n                }\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n                this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n                this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n                this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n                //setup of links, they must start with http to work properly\r\n                var linkStart = \"http://\";\r\n                var linkSecuredStart = \"https://\";\r\n                if (this.company.Facebook != null) {\r\n                    if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Facebook = linkStart + this.company.Facebook;\r\n                    }\r\n                }\r\n                if (this.company.Youtube != null) {\r\n                    if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Youtube = linkStart + this.company.Youtube;\r\n                    }\r\n                }\r\n                if (this.company.Twitter != null) {\r\n                    if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Twitter = linkStart + this.company.Twitter;\r\n                    }\r\n                }\r\n                if (this.company.Website != null) {\r\n                    if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Website = linkStart + this.company.Website;\r\n                    }\r\n                }\r\n                if (this.company.Instagram != null) {\r\n                    if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Instagram = linkStart + this.company.Instagram;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.showModal = function (product) {\r\n                this.disableModalButtons = false;\r\n                $(\"#headerModal\").modal(\"show\");\r\n                this.productId = product.Id;\r\n                this.selectedProduct = product;\r\n            };\r\n            ChildComponent.prototype.hideModal = function () {\r\n                $('#headerModal').modal('hide');\r\n                this.disableModalButtons = true;\r\n            };\r\n            // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n            ChildComponent.prototype.removeCustomersCanvasState = function () {\r\n                if (this.selectedProduct.isCanvasEdited && this.selectedProduct.CanvasStateId) {\r\n                    var canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n                    this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n                        .subscribe(function (x) { return x; }, function (err) {\r\n                        console.log(err);\r\n                    });\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function (product) {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: headerInfo.CanvasInfo.CanvasUrl,\r\n                    CustomerCanvasUserName: headerInfo.CanvasInfo.CustomerCanvasUserName,\r\n                    CanvasStateId: product.CanvasStateId,\r\n                    CanvasApiKey: headerInfo.CanvasInfo.ApiKey\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            //Redirect the user to the homepage for the selected language\r\n            ChildComponent.prototype.setLanguage = function (lang) {\r\n                window.location.href = \"/\" + lang + '/home';\r\n            };\r\n            ChildComponent.prototype.logout = function () {\r\n                this.authService.Logout();\r\n            };\r\n            ChildComponent.prototype.removeFromCart = function () {\r\n                var _this = this;\r\n                this.spinner = true;\r\n                this.disableModalButtons = true;\r\n                var removeCartSub = this.cartService.removeFromCart(this.productId).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.shoppingCart = _this.cartService.getCart();\r\n                    _this.removeCustomersCanvasState();\r\n                    _this.hideModal();\r\n                    _this.spinner = false;\r\n                });\r\n                this.subManager.add(removeCartSub);\r\n            };\r\n            //getting value of search input and redirecting to search result page\r\n            ChildComponent.prototype.getSearchResults = function (inputVal) {\r\n                var query = \"\";\r\n                inputVal = inputVal.trim();\r\n                if (inputVal == \"\") {\r\n                    return;\r\n                }\r\n                else {\r\n                    this.searchService.setQueryPlainTextValue(inputVal);\r\n                    if (inputVal != undefined) {\r\n                        query = inputVal;\r\n                    }\r\n                    else {\r\n                        var subParam = this.activatedRoute.params.subscribe(function (params) {\r\n                            var encodedQuery = params['query'];\r\n                            query = decodeURIComponent(encodedQuery);\r\n                        });\r\n                        this.subManager.add(subParam);\r\n                    }\r\n                }\r\n                query = decodeURIComponent(query);\r\n                var uriString = encodeURIComponent(query);\r\n                this.searchService.setQueryValue(uriString);\r\n                var searchRoute = this.routesService.getRoutePath('SEARCH - RESULTS')[0];\r\n                searchRoute = searchRoute.replace(\":query\", query);\r\n                this.router.navigate([searchRoute]);\r\n            };\r\n            ChildComponent.prototype.setAutoHeightAndWeightToLogo = function () {\r\n                var headerClass = $(\"div\").hasClass(\"header-logo\");\r\n                if (headerClass == false) {\r\n                }\r\n                else {\r\n                    $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n                    $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.headerIsInit) {\r\n                    return;\r\n                }\r\n                //setting value of search textbox to search condition value if the current page is search-result page, else, clean it's content\r\n                var documentUrl = window.location.href;\r\n                if (documentUrl.indexOf(\"search-results\") != -1) {\r\n                    var plainSearchText = this.searchService.getQueryPlainTextValue();\r\n                    if (plainSearchText != \"\") {\r\n                        $(\"#searchQuery\").val(plainSearchText);\r\n                    }\r\n                    else {\r\n                        this.activatedRoute.params.subscribe(function (params) {\r\n                            var encodedQuery = params['query'];\r\n                            var decodedQuery = decodeURIComponent(encodedQuery);\r\n                            $(\"#searchQuery\").val(decodedQuery);\r\n                        });\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#searchQuery\").val(\"\");\r\n                }\r\n                $(\"#searchQuery\").keyup(function (event) {\r\n                    if (event.keyCode === 13) {\r\n                        $(\"#searchQueryButton\").click();\r\n                    }\r\n                });\r\n                layoutTheme.initNavMenu();\r\n                layoutTheme.initStickyHeader();\r\n                if (this.isLazyLoadActive == true) {\r\n                    layoutTheme.initLazy();\r\n                }\r\n                var config = this.appService.getConfig();\r\n                if (config.webStoreStatus == \"offline\") {\r\n                    this.setAutoHeightAndWeightToLogo();\r\n                }\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initVideo();\r\n                this.headerIsInit = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: headerInfo.TemplateHtml\r\n                }),\r\n                __param(3, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _g) || Object, (typeof (_h = typeof router_state_1.ActivatedRoute !== 'undefined' && router_state_1.ActivatedRoute) === 'function' && _h) || Object, (typeof (_j = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _j) || Object, (typeof (_k = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _k) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], HeaderComponent.prototype, \"parentHeaderData\", void 0);\r\n    HeaderComponent = __decorate([\r\n        core_1.Component({\r\n            changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n            encapsulation: core_1.ViewEncapsulation.Emulated,\r\n            selector: \"dy-header\",\r\n            template: ''\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean])\r\n    ], HeaderComponent);\r\n    return HeaderComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.HeaderComponent = HeaderComponent;\r\n\n\n/***/ }),\n\n/***/ 599:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar home_component_1 = __webpack_require__(376);\r\nvar HomeModule = (function () {\r\n    function HomeModule() {\r\n    }\r\n    HomeModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: [],\r\n            declarations: [\r\n                home_component_1.HomeComponent\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], HomeModule);\r\n    return HomeModule;\r\n}());\r\nexports.HomeModule = HomeModule;\r\n\n\n/***/ }),\n\n/***/ 60:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 600:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar SideBarMenuComponent = (function () {\r\n    function SideBarMenuComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.sideType = \"sideBarMenu\";\r\n    }\r\n    SideBarMenuComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentSideMenuData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentSideMenuData, this.bredcrumpInfo);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            var subComponentTemplateUrl = \"sideBarMenuTemplate\";\r\n            this.cmsComponentService.getSideMenuData().subscribe(function (result) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(result, _this.bredcrumpInfo);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            });\r\n        }\r\n    };\r\n    SideBarMenuComponent.prototype.createSubComponent = function (data, breadcrumbs) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent() {\r\n                this.megaMenuItems = data.Categories;\r\n                this.breadcrumbsList = new Array();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                if (breadcrumbs != null) {\r\n                    this.breadcrumbsList = breadcrumbs;\r\n                }\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: data.TemplateHtml\r\n                }), \r\n                __metadata('design:paramtypes', [])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], SideBarMenuComponent.prototype, \"sideType\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], SideBarMenuComponent.prototype, \"parentSideMenuData\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], SideBarMenuComponent.prototype, \"bredcrumpInfo\", void 0);\r\n    SideBarMenuComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-side-bar\",\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean])\r\n    ], SideBarMenuComponent);\r\n    return SideBarMenuComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.SideBarMenuComponent = SideBarMenuComponent;\r\n\n\n/***/ }),\n\n/***/ 601:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar cms_page_component_1 = __webpack_require__(377);\r\nvar CmsPageModule = (function () {\r\n    function CmsPageModule() {\r\n    }\r\n    CmsPageModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: [\r\n                shared_module_1.SharedModule\r\n            ],\r\n            declarations: [\r\n                cms_page_component_1.CmsPageComponent\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], CmsPageModule);\r\n    return CmsPageModule;\r\n}());\r\nexports.CmsPageModule = CmsPageModule;\r\n\n\n/***/ }),\n\n/***/ 602:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar CanvasWidgetComponent = (function () {\r\n    function CanvasWidgetComponent(_compiler, componentHelper, _elementRef, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.isBrowser = isBrowser;\r\n    }\r\n    CanvasWidgetComponent.prototype.ngOnInit = function () {\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentWidgetData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentWidgetData);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    };\r\n    CanvasWidgetComponent.prototype.createSubComponent = function (canvasWidgetComponent) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(isBrowser, canvasService, shoppingCartService) {\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.shoppingCartService = shoppingCartService;\r\n                this.pageIsInit = false;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () { };\r\n            // when want to finish design, to move to the second step\r\n            ChildComponent.prototype.finishDesign = function () {\r\n                this.canvasService.getImagesLinks(this.editorPage, this.approvePage, this.finishOrderPage);\r\n            };\r\n            // when close a modal with canvas editor, set state to false, so from component we can know the modal is closed\r\n            ChildComponent.prototype.isCanvasModalOpened = function (isOpened) {\r\n                this.canvasService.openNewProductInEditor();\r\n                this.canvasService.setCanvasState(isOpened);\r\n            };\r\n            // when the product is successfully created and approved, and second step is done\r\n            ChildComponent.prototype.finishProductCustomization = function () {\r\n                var _this = this;\r\n                //If the product customization has been successfully completed.\r\n                this.canvasService.finishProductCustomization()\r\n                    .then(function (result) {\r\n                    // set canvas response to a property in service, so it can be available to a parent component\r\n                    _this.shoppingCartService.setCustomizationCanvasData(result);\r\n                    //Saving hi-res output info.\r\n                    _this.canvasService.setupPageAfterProductCustomization(result, false);\r\n                    /* Send notification to the service that we finished product customization, so from parent component we know it and can call method for adding to cart */\r\n                    _this.canvasService.setCanvasProductDesignState(true);\r\n                    _this.canvasService.openNewProductInEditor();\r\n                })\r\n                    .catch(function (error) {\r\n                    _this.canvasService.setupPageAfterProductCustomization(error, true);\r\n                });\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                layoutTheme.initSlider();\r\n                this.pageIsInit = true;\r\n            };\r\n            __decorate([\r\n                core_1.ViewChild('editorPage'), \r\n                __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n            ], ChildComponent.prototype, \"editorPage\", void 0);\r\n            __decorate([\r\n                core_1.ViewChild('approvePage'), \r\n                __metadata('design:type', (typeof (_b = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _b) || Object)\r\n            ], ChildComponent.prototype, \"approvePage\", void 0);\r\n            __decorate([\r\n                core_1.ViewChild('finishOrderPage'), \r\n                __metadata('design:type', (typeof (_c = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _c) || Object)\r\n            ], ChildComponent.prototype, \"finishOrderPage\", void 0);\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: canvasWidgetComponent.TemplateHtml\r\n                }),\r\n                __param(0, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [Boolean, (typeof (_d = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], CanvasWidgetComponent.prototype, \"parentWidgetData\", void 0);\r\n    CanvasWidgetComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"customer-canvas-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(3, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, Boolean])\r\n    ], CanvasWidgetComponent);\r\n    return CanvasWidgetComponent;\r\n    var _a, _b, _c;\r\n}());\r\nexports.CanvasWidgetComponent = CanvasWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 603:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar slider_service_1 = __webpack_require__(417);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar SliderWidgetComponent = (function () {\r\n    function SliderWidgetComponent(_compiler, componentHelper, _elementRef, templateService, cmsComponentService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    SliderWidgetComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        if (this.parentSliderData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = this.createSubComponent(this.parentSliderData);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n            var sliderData_1;\r\n            var sliderDataSub = this.cmsComponentService.getSliderData(this.type, this.id).subscribe(function (result) {\r\n                sliderData_1 = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                var subComponent = _this.createSubComponent(sliderData_1);\r\n                //injecting created component (OK)\r\n                _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n            });\r\n            this.subManager.add(sliderDataSub);\r\n        }\r\n    };\r\n    SliderWidgetComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    //private createSubComponent(template:string, sliderId: string, sliderType: string) {\r\n    SliderWidgetComponent.prototype.createSubComponent = function (sliderData) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(sliderService, isBrowser, elementRef, renderer) {\r\n                this.sliderService = sliderService;\r\n                this.isBrowser = isBrowser;\r\n                this.elementRef = elementRef;\r\n                this.renderer = renderer;\r\n                this.slides = sliderData.Slides;\r\n                this.sliderIsInit = false;\r\n                this.renderer.setElementStyle(this.elementRef.nativeElement, 'display', this.isBrowser ? 'block' : 'none');\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () { };\r\n            ChildComponent.prototype.goToUrl = function (url) {\r\n                if (url != null && url.length > 0) {\r\n                    window.location.href = url;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.sliderIsInit) {\r\n                    return;\r\n                }\r\n                layoutTheme.initSlider();\r\n                this.sliderIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: sliderData.TemplateHtml\r\n                }),\r\n                __param(1, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof slider_service_1.SliderService !== 'undefined' && slider_service_1.SliderService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _b) || Object, (typeof (_c = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _c) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], SliderWidgetComponent.prototype, \"id\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], SliderWidgetComponent.prototype, \"type\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Object)\r\n    ], SliderWidgetComponent.prototype, \"parentSliderData\", void 0);\r\n    SliderWidgetComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-slider\",\r\n            template: \"\"\r\n        }),\r\n        __param(5, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean])\r\n    ], SliderWidgetComponent);\r\n    return SliderWidgetComponent;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.SliderWidgetComponent = SliderWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 604:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar trustpilot_service_1 = __webpack_require__(418);\r\nvar TrustpilotWidgetComponent = (function () {\r\n    function TrustpilotWidgetComponent(_compiler, componentHelper, _elementRef, isBrowser, trustpilotService) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.isBrowser = isBrowser;\r\n        this.trustpilotService = trustpilotService;\r\n        this.sub = new Subscription_1.Subscription();\r\n    }\r\n    TrustpilotWidgetComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.trustpilotType)\r\n            this.trustpilotType = 'default';\r\n        var trustpilotSub = this.trustpilotService.getTrustpilotData(this.trustpilotType).subscribe(function (result) {\r\n            //-- If result is null, it means that trustpilot with given type doesn't exist, or trustpilot module is not active\r\n            var subComponent = _this.createSubComponent(result);\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.sub.add(trustpilotSub);\r\n    };\r\n    TrustpilotWidgetComponent.prototype.ngOnDestroy = function () {\r\n        this.sub.unsubscribe();\r\n    };\r\n    TrustpilotWidgetComponent.prototype.createSubComponent = function (trustpilotData) {\r\n        //-- If trustpilot module is not active, we are going to set a template to empty string \r\n        var ChildComponent = (function () {\r\n            function ChildComponent(isBrowser) {\r\n                this.isBrowser = isBrowser;\r\n                this.pageIsInit = false;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                //-- Initializing trustbox\r\n                var trustboxesRef = Array.from(document.querySelectorAll('.trustpilot-widget'));\r\n                //-- Initialize all trustbox instances on the page\r\n                if (trustboxesRef && trustboxesRef.length > 0)\r\n                    trustboxesRef.forEach(function (singleTrustboxInstance) { return Trustpilot.loadFromElement(singleTrustboxInstance); });\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: trustpilotData.TemplateHtml || \"\"\r\n                }),\r\n                __param(0, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [Boolean])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], TrustpilotWidgetComponent.prototype, \"trustpilotType\", void 0);\r\n    TrustpilotWidgetComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"trustpilot-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(3, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof trustpilot_service_1.TrustpilotService !== 'undefined' && trustpilot_service_1.TrustpilotService) === 'function' && _d) || Object])\r\n    ], TrustpilotWidgetComponent);\r\n    return TrustpilotWidgetComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.TrustpilotWidgetComponent = TrustpilotWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 605:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar product_service_1 = __webpack_require__(132);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar QuotingOrderTotalsComponent = (function () {\r\n    function QuotingOrderTotalsComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.isBrowser = isBrowser;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    QuotingOrderTotalsComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var templateHtml;\r\n        var orderTotalSub = this.templateService.getComponentTemplate(\"quotingOrderTotalsWidgetTemplate\").subscribe(function (result) {\r\n            templateHtml = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(templateHtml);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(orderTotalSub);\r\n    };\r\n    QuotingOrderTotalsComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    QuotingOrderTotalsComponent.prototype.createSubComponent = function (template) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(productService, languageService, cartService, _elementChildRef) {\r\n                this.productService = productService;\r\n                this.languageService = languageService;\r\n                this.cartService = cartService;\r\n                this._elementChildRef = _elementChildRef;\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () { };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: template\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    QuotingOrderTotalsComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-quoting-order-totals-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n    ], QuotingOrderTotalsComponent);\r\n    return QuotingOrderTotalsComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.QuotingOrderTotalsComponent = QuotingOrderTotalsComponent;\r\n\n\n/***/ }),\n\n/***/ 606:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Models\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_constants_1 = __webpack_require__(620);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\nvar shared_constants_1 = __webpack_require__(621);\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar OtherProductFormComponent = (function () {\r\n    function OtherProductFormComponent(_compiler, componentHelper, _elementRef, authService, languageService, cmsComponentService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.cmsComponentService = cmsComponentService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.userId = this.authService.GetUserId();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    OtherProductFormComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser) {\r\n            return;\r\n        }\r\n        //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n        var otherProdSub = this.cmsComponentService.getOtherProductData(this.productId, this.userId).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.productId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(otherProdSub);\r\n    };\r\n    OtherProductFormComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    OtherProductFormComponent.prototype.createSubComponent = function (formInfo, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, authService, translate, routesService, currency, cartService, bootboxService, isBrowser) {\r\n                this._quotingService = _quotingService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.routesService = routesService;\r\n                this.currency = currency;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.formData = formInfo.FormData;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.resourceId = InputresourceId;\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.resultCalculation = false;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.requestInfoSuccess = null;\r\n                this.showErrorMessage = false;\r\n                this.companyInformation = formInfo.CompanyInfo;\r\n                this.isFormValid = true;\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.sumQtaMatrix = 0;\r\n                this.totalQtaForMatrix = 0;\r\n                this.isCalculatedProduct = false;\r\n                this.isVisibleMatrixLav = false;\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                //isapplyingrules: boolean = false;\r\n                this.subManager = new Subscription_1.Subscription();\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.typePriceResult = \"no-tax\";\r\n                this.formData.gruppi.forEach(function (group) {\r\n                    group.varianti.forEach(function (varianti) {\r\n                        if (varianti.tipo == 7) {\r\n                            varianti.VarianteMatrix = _this.createMatriceObj(varianti);\r\n                            _this.isVisibleMatrixLav = true;\r\n                        }\r\n                    });\r\n                });\r\n                this.ExcludingRules.setMacrocategory(shared_constants_1.SharedConstants.OTHER_PRODUCTS_TYPE);\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                if (!this.isDataInitialized) {\r\n                    this.convertLogicalToViewQuotingModel();\r\n                    this.checkValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.convertLogicalToViewQuotingModel();\r\n                        _this.checkValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            //-- Create quoting object from form data object, because we need it for applying rules(regole)\r\n            ChildComponent.prototype.convertLogicalToViewQuotingModel = function () {\r\n                var _this = this;\r\n                this.responseModel.listaRegole = this.formData.listaRegole;\r\n                this.responseModel.calculationType = this.formData.calculationType;\r\n                this.responseModel.companyCondizioni = this.formData.companyCondizioni;\r\n                this.responseModel.lavorazioniAccessorie = [];\r\n                //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n                this.formData.gruppi.forEach(function (group) {\r\n                    group.varianti.forEach(function (varianti) {\r\n                        var lavAcc = _this.convertLogicalToViewModelVarianti(varianti);\r\n                        _this.responseModel.lavorazioniAccessorie.push(lavAcc);\r\n                    });\r\n                });\r\n            };\r\n            //-- Convert varianti model to lavorazioni accessorie model\r\n            ChildComponent.prototype.convertLogicalToViewModelVarianti = function (varianti) {\r\n                var lavAcc = new quoting_model_1.MyLavorazioneAccessoria();\r\n                lavAcc.id = varianti.id;\r\n                lavAcc.obbligatorio = varianti.obbligatorio;\r\n                lavAcc.tipo = varianti.tipo;\r\n                lavAcc.description = varianti.description;\r\n                lavAcc.hasInfo = varianti.hasInfo;\r\n                lavAcc.showInfo = varianti.showInfo;\r\n                lavAcc.isVisible = varianti.isVisible;\r\n                lavAcc.image = varianti.image;\r\n                lavAcc.value = varianti.value;\r\n                lavAcc.valori = varianti.valori;\r\n                lavAcc.lavorazioneCheckValue = (varianti.lavorazioneCheckValue == 'true');\r\n                lavAcc.isCalculated = varianti.isCalculated;\r\n                lavAcc.tipoSelezione = varianti.tipoSelezione;\r\n                lavAcc.idVarianteMatriceOrizzontale = varianti.idVarianteMatriceOrizzontale;\r\n                lavAcc.idVarianteMatriceVerticale = varianti.idVarianteMatriceVerticale;\r\n                if (varianti.tipo == 7) {\r\n                    //lavAcc.VarianteMatrix=this.createMatriceObj(varianti);\r\n                    lavAcc.VarianteMatrix = this.formData.VarianteMatrix;\r\n                }\r\n                //--If type is numeric or dropdown, valore is intFormValue, else it is valore\r\n                if (varianti.tipo == 1 || varianti.tipo == 2) {\r\n                    lavAcc.valore = varianti.intFormValue;\r\n                }\r\n                else {\r\n                    lavAcc.valore = varianti.valore;\r\n                }\r\n                return lavAcc;\r\n            };\r\n            ChildComponent.prototype.createMatriceObj = function (variante) {\r\n                var varianteMatrice = new quoting_model_1.MyVarianteMatrice();\r\n                varianteMatrice.VarianteVerticale = new Array();\r\n                varianteMatrice.VarianteOrizzontale = new Array();\r\n                this.formData.gruppi.forEach(function (group) {\r\n                    group.varianti.forEach(function (varianti) {\r\n                        if (variante.idVarianteMatriceVerticale == varianti.id) {\r\n                            varianti.isMatrix = true;\r\n                            varianti.valori.forEach(function (option) {\r\n                                var varianteMatverticale = new quoting_model_1.MyVarianteMatrice();\r\n                                varianteMatverticale.id = option.chiave;\r\n                                varianteMatverticale.nome = option.valore;\r\n                                varianteMatverticale.colore = option.colorExaForMatrix;\r\n                                varianteMatverticale.imgPath = option.image;\r\n                                varianteMatverticale.mostraPerVariantiMatrice = option.mostraPerVariantiMatrice;\r\n                                varianteMatverticale.popup = \"\";\r\n                                varianteMatverticale.VarianteOrizzontale = new Array();\r\n                                group.varianti.forEach(function (varianti2) {\r\n                                    if (variante.idVarianteMatriceOrizzontale == varianti2.id) {\r\n                                        varianti.isMatrix = true;\r\n                                        varianti2.valori.forEach(function (option2) {\r\n                                            var varianteMat2 = new quoting_model_1.MyVarianteMatrice();\r\n                                            varianteMat2.id = option2.chiave;\r\n                                            varianteMat2.nome = option2.valore;\r\n                                            varianteMat2.qta = 0;\r\n                                            varianteMat2.colore = option2.colorExaForMatrix;\r\n                                            varianteMat2.imgPath = option2.image;\r\n                                            varianteMat2.mostraPerVariantiMatrice = option2.mostraPerVariantiMatrice;\r\n                                            varianteMatverticale.VarianteOrizzontale.push(varianteMat2);\r\n                                        });\r\n                                    }\r\n                                });\r\n                                varianteMatrice.VarianteVerticale.push(varianteMatverticale);\r\n                            });\r\n                        }\r\n                        if (variante.idVarianteMatriceOrizzontale == varianti.id) {\r\n                            varianti.isMatrix = true;\r\n                            varianti.valori.forEach(function (option3) {\r\n                                var varianteMat3 = new quoting_model_1.MyVarianteMatrice();\r\n                                varianteMat3.id = option3.chiave;\r\n                                varianteMat3.nome = option3.valore;\r\n                                varianteMat3.qta = 0;\r\n                                varianteMat3.colore = option3.colorExaForMatrix;\r\n                                varianteMat3.imgPath = option3.image;\r\n                                varianteMat3.mostraPerVariantiMatrice = option3.mostraPerVariantiMatrice;\r\n                                varianteMatrice.VarianteOrizzontale.push(varianteMat3);\r\n                            });\r\n                        }\r\n                    });\r\n                });\r\n                return varianteMatrice;\r\n            };\r\n            ChildComponent.prototype.checkRegoleOtherProducts = function () {\r\n                var _this = this;\r\n                try {\r\n                    var lavAccArray_1 = new Array();\r\n                    this.formData.gruppi.forEach(function (group) {\r\n                        group.varianti.forEach(function (varianti) {\r\n                            //console.log(varianti)\r\n                            var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                            if (varianti.tipo == \"2\") {\r\n                                lav.lavorazioneId = varianti.id;\r\n                                lav.valoreLavorazione = varianti.intFormValue;\r\n                                lavAccArray_1.push(lav);\r\n                            }\r\n                        });\r\n                    });\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"AP\", \"ACCESSORIA\", \"\", \"ALTRO_PRODOTTO\", null, null, this.responseModel, this.formData.gruppi);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"AP\", \"ALTRO_PRODOTTO\", this.responseModel, this.formData.gruppi);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    var count_1 = 0;\r\n                    this.formData.gruppi.forEach(function (group) {\r\n                        group.varianti.forEach(function (lavorazione) {\r\n                            count_1 = 0;\r\n                            for (var _i = 0, lavAccArray_2 = lavAccArray_1; _i < lavAccArray_2.length; _i++) {\r\n                                var lavorazioneOld = lavAccArray_2[_i];\r\n                                if (count_1 > 0) {\r\n                                    continue;\r\n                                }\r\n                                else {\r\n                                    if (lavorazione.tipo == \"2\") {\r\n                                        if (lavorazione.isVisible == true) {\r\n                                            if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                                if ((lavorazione.intFormValue != lavorazioneOld.valoreLavorazione)) {\r\n                                                    _this.dropDownChange(lavorazione, true);\r\n                                                    count_1++;\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        });\r\n                    });\r\n                }\r\n                catch (error) {\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkBoxChanged = function (lavorazione) {\r\n                //-- Updating lavorazioniAccessorie model\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (variante.id == lavorazione.id) {\r\n                        variante.hasInfo = lavorazione.hasInfo;\r\n                        variante.lavorazioneCheckValue = (lavorazione.lavorazioneCheckValue == 'true');\r\n                        variante.valore = lavorazione.intFormValue;\r\n                        break;\r\n                    }\r\n                }\r\n                this.convertLogicalToViewQuotingModel();\r\n                this.checkValidation();\r\n            };\r\n            ChildComponent.prototype.dropDownChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                //this.isapplyingrules=true;\r\n                //-- Setting option description (if there is)\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.intFormValue == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                //-- Updating lavorazioniAccessorie model\r\n                for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                    var variante = _c[_b];\r\n                    if (variante.id == lavorazione.id) {\r\n                        variante.hasInfo = lavorazione.hasInfo;\r\n                        variante.valore = lavorazione.intFormValue;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.checkValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.intFormValue = lavorazioneId;\r\n                this.dropDownChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedProduct = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.checkRegoleOtherProducts();\r\n                //console.log(this.isapplyingrules)\r\n                //if (this.isapplyingrules == false) {\r\n                this.checkForm();\r\n                if (this.isFormValid) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n                // }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkForm = function () {\r\n                var _this = this;\r\n                if (this.isCalculationTypeCalcolato() || this.isCalculationTypeCalcolatoScontistica()) {\r\n                    this.isFormValid = true;\r\n                    var message = void 0;\r\n                    var numCopie = parseInt(this.formData.quantity);\r\n                    var minCopie = this.formData.minimo_quantita;\r\n                    var maxCopie = this.formData.maximo_quantita;\r\n                    if (this.formData.tipoCopie == 'libera') {\r\n                        //Quantity\r\n                        if (this.formData.quantity == null || numCopie <= 0) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            this.formData.isQuantityValidated = false;\r\n                            if (this.isFormValid == true) {\r\n                                this.isFormValid = false;\r\n                            }\r\n                        }\r\n                        else if (maxCopie == 0 || this.formData.maximo_quantita == null) {\r\n                            if (numCopie < minCopie) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minCopie;\r\n                                this.formData.isQuantityValidated = false;\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                            else {\r\n                                this.formData.isQuantityValidated = true;\r\n                                this.isFormValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                                this.formData.isQuantityValidated = true;\r\n                                this.isFormValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minCopie;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxCopie;\r\n                                this.formData.isQuantityValidated = false;\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                        }\r\n                        this.copieMessage = message;\r\n                    }\r\n                    else {\r\n                        if (this.formData.idCopie == \"-1\") {\r\n                            message = this.getLabel('mandatory_field');\r\n                            this.formData.isQuantityValidated = false;\r\n                            if (this.isFormValid == true) {\r\n                                this.isFormValid = false;\r\n                            }\r\n                        }\r\n                        else {\r\n                            this.formData.quantity = this.formData.idCopie;\r\n                            this.formData.isQuantityValidated = true;\r\n                        }\r\n                        if (this.formData.tipoCopie === 'fissa' && this.formData.copie != null) {\r\n                            this.formData.copieCount = this.formData.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (parseInt(this.formData.quantity) <= 0) {\r\n                        this.formData.quantity = 1;\r\n                    }\r\n                    this.isFormValid = true;\r\n                    this.formData.isQuantityValidated = true;\r\n                }\r\n                this.sumQtaMatrix = 0;\r\n                var ismatrixPresent = false;\r\n                //Attributes\r\n                for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n                    var group = _a[_i];\r\n                    for (var _b = 0, _c = group.varianti; _b < _c.length; _b++) {\r\n                        var attribute = _c[_b];\r\n                        if (!attribute.isVisible) {\r\n                            continue;\r\n                        }\r\n                        //-- Count all varianti options that should be visible\r\n                        if (attribute.valori != null) {\r\n                            attribute.valoriCount = attribute.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                        }\r\n                        if (attribute.tipo == 1) {\r\n                            var message = \"\";\r\n                            var qta = parseInt(attribute.intFormValue);\r\n                            var minQta = attribute.minQtaInput;\r\n                            var maxQta = attribute.maxQtaInput;\r\n                            if (attribute.intFormValue == null) {\r\n                                message = this.getLabel('inserisci_valore_valido');\r\n                                attribute.isValidated = false;\r\n                            }\r\n                            else if (maxQta == 0) {\r\n                                if (qta < minQta) {\r\n                                    message = this.getLabel('inserisci_valore_maggiore');\r\n                                    message += \" \" + minQta;\r\n                                    attribute.isValidated = false;\r\n                                }\r\n                                else {\r\n                                    attribute.isValidated = true;\r\n                                }\r\n                            }\r\n                            else {\r\n                                if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                    attribute.isValidated = true;\r\n                                }\r\n                                else {\r\n                                    message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                    message += \" \" + minQta;\r\n                                    message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                    message += \" \" + maxQta;\r\n                                    attribute.isValidated = false;\r\n                                }\r\n                            }\r\n                            if (attribute.isValidated == false) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                            attribute.lavorazioneMessage = message;\r\n                        }\r\n                        else if (attribute.tipo == 2) {\r\n                            //The value shall be greater than zero\r\n                            if (attribute.intFormValue < 0) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                                attribute.isValidated = false;\r\n                            }\r\n                            else {\r\n                                attribute.isValidated = true;\r\n                            }\r\n                        }\r\n                        else if (attribute.tipo == 5) {\r\n                            //Width validation\r\n                            var convertedWidth = Number(attribute.numWidthFormValue);\r\n                            var convertedHeight = Number(attribute.numHeightFormValue);\r\n                            var convertedDepth = Number(attribute.numDepthFormValue);\r\n                            //Checking if it is not mandatory\r\n                            if (attribute.obbligatorio == false) {\r\n                                //There is no validation if the three dimentions are not set\r\n                                if (convertedWidth == 0 && convertedHeight == 0 && convertedDepth == 0) {\r\n                                    attribute.isWidthValidated = true;\r\n                                    attribute.isHeightValidated = true;\r\n                                    attribute.isDepthValidated = true;\r\n                                    continue;\r\n                                }\r\n                            }\r\n                            //Checking if it is a valid number\r\n                            if (isNaN(convertedWidth)) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                                attribute.isWidthValidated = false;\r\n                                attribute.widthErrorMex = \"Inserisci un valore valido\";\r\n                            }\r\n                            else {\r\n                                if (attribute.max_base == 0) {\r\n                                    //The value shall be greater than the minimum\r\n                                    if (convertedWidth < attribute.min_base) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n                                        attribute.isWidthValidated = false;\r\n                                        attribute.widthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_base;\r\n                                    }\r\n                                    else {\r\n                                        attribute.isWidthValidated = true;\r\n                                        attribute.widthErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    //3 - minbase = 0 - maxbase N - inserisci un valore compresto tra 0 e N\r\n                                    //4 - minbase = N - maxbase M - inserisci un valore compresto tra 0 e N\r\n                                    if (convertedWidth < attribute.min_base || convertedWidth > attribute.max_base) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n                                        attribute.isWidthValidated = false;\r\n                                        attribute.widthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_base + \" e \" + attribute.max_base;\r\n                                    }\r\n                                    else {\r\n                                        attribute.isWidthValidated = true;\r\n                                        attribute.widthErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                            }\r\n                            //Height validation\r\n                            //Checking if it is a valid number\r\n                            if (isNaN(convertedHeight)) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                                attribute.isHeightValidated = false;\r\n                                attribute.heightErrorMex = \"Inserisci un valore valido\";\r\n                            }\r\n                            else {\r\n                                if (attribute.max_altezza == 0) {\r\n                                    //1 - min_altezza = 0 - max_altezza 0 - inserisci un valore maggiore id zero\r\n                                    //2 - min_altezza = N - max_altezza 0 - inserisci un valore maggiore id N                      \r\n                                    //The value shall be greater than the minimum\r\n                                    if (convertedHeight < attribute.min_altezza) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n                                        attribute.isHeightValidated = false;\r\n                                        attribute.heightErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_altezza;\r\n                                    }\r\n                                    else {\r\n                                        attribute.isHeightValidated = true;\r\n                                        attribute.heightErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    //3 - min_altezza = 0 - max_altezza N - inserisci un valore compresto tra 0 e N\r\n                                    //4 - min_altezza = N - max_altezza M - inserisci un valore compresto tra 0 e N\r\n                                    if (convertedHeight < attribute.min_altezza || convertedHeight > attribute.max_altezza) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n                                        attribute.isHeightValidated = false;\r\n                                        attribute.heightErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_altezza + \" e \" + attribute.max_altezza;\r\n                                    }\r\n                                    else {\r\n                                        attribute.isHeightValidated = true;\r\n                                        attribute.heightErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                            }\r\n                            //Depth\r\n                            if (attribute.hasDepth == true) {\r\n                                //Checking if it is a valid number\r\n                                if (isNaN(convertedDepth)) {\r\n                                    if (this.isFormValid == true) {\r\n                                        this.isFormValid = false;\r\n                                    }\r\n                                    attribute.isDepthValidated = false;\r\n                                    attribute.depthErrorMex = \"Inserisci un valore valido\";\r\n                                }\r\n                                else {\r\n                                    if (attribute.max_profondita == 0) {\r\n                                        //1 - min_profondita = 0 - max_profondita 0 - inserisci un valore maggiore id zero\r\n                                        //2 - min_profondita = N - max_profondita 0 - inserisci un valore maggiore id N                      \r\n                                        //The value shall be greater than the minimum\r\n                                        if (convertedDepth < attribute.min_profondita) {\r\n                                            if (this.isFormValid == true) {\r\n                                                this.isFormValid = false;\r\n                                            }\r\n                                            attribute.isDepthValidated = false;\r\n                                            attribute.depthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_profondita;\r\n                                        }\r\n                                        else {\r\n                                            attribute.isDepthValidated = true;\r\n                                            attribute.depthErrorMex = \"\";\r\n                                        }\r\n                                    }\r\n                                    else {\r\n                                        //3 - min_profondita = 0 - max_profondita N - inserisci un valore compresto tra 0 e N\r\n                                        //4 - min_profondita = N - max_profondita M - inserisci un valore compresto tra 0 e N\r\n                                        if (convertedDepth < attribute.min_profondita || convertedDepth > attribute.max_profondita) {\r\n                                            if (this.isFormValid == true) {\r\n                                                this.isFormValid = false;\r\n                                            }\r\n                                            attribute.isDepthValidated = false;\r\n                                            attribute.depthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_profondita + \" e \" + attribute.max_profondita;\r\n                                        }\r\n                                        else {\r\n                                            attribute.isDepthValidated = true;\r\n                                            attribute.depthErrorMex = \"\";\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (attribute.tipo == 7) {\r\n                            ismatrixPresent = true;\r\n                            attribute.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n                                varianti.VarianteOrizzontale.filter(function (x) { return x.qta > 0; }).forEach(function (varianti2) {\r\n                                    _this.sumQtaMatrix += varianti2.qta;\r\n                                });\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n                if (ismatrixPresent == true) {\r\n                    if (this.formData.tipoCopie == 'libera') {\r\n                        this.totalQtaForMatrix = this.formData.quantity;\r\n                    }\r\n                    else {\r\n                        this.totalQtaForMatrix = this.formData.idCopie;\r\n                    }\r\n                    if (this.totalQtaForMatrix != this.sumQtaMatrix) {\r\n                        this.formData.isQuantityMatrixValidated = false;\r\n                        if (this.isFormValid == true) {\r\n                            this.isFormValid = false;\r\n                        }\r\n                        var message = this.getLabel('matrix_message_qta');\r\n                        message += \" \" + this.totalQtaForMatrix;\r\n                        this.MatrixMessage = message;\r\n                    }\r\n                    else {\r\n                        this.formData.isQuantityMatrixValidated = true;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                if (this.formData.tipoCopie != 'libera') {\r\n                    this.model.numCopie = this.formData.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.formData.quantity;\r\n                }\r\n                this.model.macrocategoryWizardId = 13;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = parseInt(this.resourceId);\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n                    var gruppo = _a[_i];\r\n                    var _loop_1 = function(variante) {\r\n                        if (variante.isVisible == true) {\r\n                            var lavorazione_1 = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                            lavorazione_1.matrixValues = new Array();\r\n                            //checkbox\r\n                            if (parseInt(variante.tipo) == 0) {\r\n                                lavorazione_1.lavorazioneId = variante.id;\r\n                                if (variante.lavorazioneCheckValue.toString() == 'true') {\r\n                                    lavorazione_1.valoreLavorazione = \"1\";\r\n                                }\r\n                                else {\r\n                                    lavorazione_1.valoreLavorazione = \"0\";\r\n                                }\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 2) {\r\n                                if (!variante.isMatrix) {\r\n                                    if (variante.intFormValue == \"0\") {\r\n                                        lavorazione_1.lavorazioneId = variante.id;\r\n                                        lavorazione_1.valoreLavorazione = \"-1\";\r\n                                    }\r\n                                    else {\r\n                                        lavorazione_1.lavorazioneId = variante.id;\r\n                                        lavorazione_1.valoreLavorazione = variante.intFormValue;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 1) {\r\n                                if (variante.intFormValue != null) {\r\n                                    lavorazione_1.lavorazioneId = variante.id;\r\n                                    lavorazione_1.valoreLavorazione = variante.intFormValue;\r\n                                }\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 5) {\r\n                                if (variante.numWidthFormValue != null) {\r\n                                    lavorazione_1.lavorazioneId = variante.id;\r\n                                    lavorazione_1.tipo = variante.tipo;\r\n                                    if (variante.hasDepth == true) {\r\n                                        lavorazione_1.numWidthFormValue = variante.numWidthFormValue;\r\n                                        lavorazione_1.numHeightFormValue = variante.numHeightFormValue;\r\n                                        lavorazione_1.numDepthFormValue = variante.numDepthFormValue;\r\n                                    }\r\n                                    else {\r\n                                        lavorazione_1.numWidthFormValue = variante.numWidthFormValue;\r\n                                        lavorazione_1.numHeightFormValue = variante.numHeightFormValue;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 6) {\r\n                                lavorazione_1.lavorazioneId = variante.id;\r\n                                lavorazione_1.valoreLavorazione = variante.value;\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 7) {\r\n                                variante.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n                                    varianti.VarianteOrizzontale.filter(function (x) { return x.qta > 0; }).forEach(function (varianti2) {\r\n                                        var matrix = new quoting_submit_model_2.MatrixModelCalculation();\r\n                                        matrix.quantita = varianti2.qta;\r\n                                        matrix.lavorazioneOrizzontaleId = varianti2.id;\r\n                                        matrix.lavorazioneVerticaleId = varianti.id;\r\n                                        lavorazione_1.tipo = variante.tipo;\r\n                                        lavorazione_1.lavorazioneId = variante.id;\r\n                                        lavorazione_1.matrixValues.push(matrix);\r\n                                    });\r\n                                });\r\n                            }\r\n                            if ((lavorazione_1.lavorazioneId != null && lavorazione_1.valoreLavorazione != \"-1\") || parseInt(variante.tipo) == 7) {\r\n                                this_1.model.lavorazioniAccessorie.push(lavorazione_1);\r\n                            }\r\n                        }\r\n                    };\r\n                    var this_1 = this;\r\n                    for (var _b = 0, _c = gruppo.varianti; _b < _c.length; _b++) {\r\n                        var variante = _c[_b];\r\n                        _loop_1(variante);\r\n                    }\r\n                    this.isDataInitialized = true;\r\n                }\r\n                if (this.formData.calculationType != quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n                    var calculationSub_1 = this._quotingService.getCalculatedAp(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedProduct = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino() || _this.isCalculationTypeCalcolatoListino() || _this.isCalculationTypeCalcolatoListinoFornitori()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica() || _this.isCalculationTypeCalcolatoListinoScontistica() || _this.isCalculationTypeCalcolatoListinoFornitoriScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.subManager.add(calculationSub_1);\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedProduct = false;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                    this.subManager.add(calculationSub_1);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoListino = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoListinoFornitori = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoListinoScontistica = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoListinoFornitoriScontistica = function () {\r\n                var retVal = false;\r\n                if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n                return retVal;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.DayDescriptionName = price.DayDescriptionName;\r\n                this.resultPrice.DayDescriptionStatus = price.DayDescriptionStatus;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.addToCartApProduct = function () {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(addToCartSub);\r\n            };\r\n            ChildComponent.prototype.addToCartOtherProductCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addOtherProductCalcolatoListinoToCart = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addOtherProductCalcolatoListinoScontisticaToCart = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                setTimeout(function () {\r\n                    $('.popovers').popover();\r\n                }, 150);\r\n                layoutTheme.initToggle();\r\n                this.setPopoverVariableForMAtrix();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.setPopoverVariableForMAtrix = function () {\r\n                for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n                    var gruppo = _a[_i];\r\n                    for (var _b = 0, _c = gruppo.varianti; _b < _c.length; _b++) {\r\n                        var variante = _c[_b];\r\n                        if (parseInt(variante.tipo) == 7) {\r\n                            variante.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n                                varianti.popup = $('#popover_content_wrapper_' + varianti.id).html();\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: formInfo.TemplateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], OtherProductFormComponent.prototype, \"productId\", void 0);\r\n    OtherProductFormComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-other-product-quoting-form\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean])\r\n    ], OtherProductFormComponent);\r\n    return OtherProductFormComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.OtherProductFormComponent = OtherProductFormComponent;\r\n\n\n/***/ }),\n\n/***/ 607:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar QuotingMainComponent = (function () {\r\n    function QuotingMainComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this.templateService = templateService;\r\n        this.isBrowser = isBrowser;\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    QuotingMainComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var templateHtml;\r\n        var compSub = this.templateService.getComponentTemplate(\"quotingMainTemplate\").subscribe(function (result) {\r\n            templateHtml = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(templateHtml, _this.QResourceId, _this.QMacroCat, _this.QType);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(compSub);\r\n    };\r\n    QuotingMainComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    QuotingMainComponent.prototype.createSubComponent = function (template, InputresourceId, InputMacroCatId, InputTypeId) {\r\n        var ParentComponent = (function () {\r\n            function ParentComponent(languageService, authService) {\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.QResourceId = InputresourceId;\r\n                this.QMacroCat = InputMacroCatId;\r\n                this.QType = InputTypeId;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.autentification = this.authService.GetData();\r\n            }\r\n            ParentComponent.prototype.ngOnInit = function () {\r\n            };\r\n            ParentComponent = __decorate([\r\n                core_1.Component({\r\n                    template: template\r\n                }), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object])\r\n            ], ParentComponent);\r\n            return ParentComponent;\r\n            var _a, _b;\r\n        }());\r\n        return ParentComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], QuotingMainComponent.prototype, \"QResourceId\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], QuotingMainComponent.prototype, \"QMacroCat\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], QuotingMainComponent.prototype, \"QType\", void 0);\r\n    QuotingMainComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-quoting\",\r\n            template: \"\"\r\n        }),\r\n        __param(4, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n    ], QuotingMainComponent);\r\n    return QuotingMainComponent;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.QuotingMainComponent = QuotingMainComponent;\r\n\n\n/***/ }),\n\n/***/ 608:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar quoting_submit_model_5 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardAdesiviComponent = (function () {\r\n    function WizardAdesiviComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardAdesiviComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var wizardSub = this._quotingService.getWizardAdesiviData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(wizardSub);\r\n    };\r\n    WizardAdesiviComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardAdesiviComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, translate, routesService, cartService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.routesService = routesService;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.iShowHourForDay = false;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.formatiMultipliList = new Array();\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                if (this.responseModel.idGruppo == 6) {\r\n                    this.ExcludingRules.setMacrocategory(\"ADESIVI\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 8) {\r\n                    this.ExcludingRules.setMacrocategory(\"MANIFESTI\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 10) {\r\n                    this.ExcludingRules.setMacrocategory(\"PANNELLI\");\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.aggiungiFormatoMultiplo = function (firstLoad) {\r\n                if (firstLoad === void 0) { firstLoad = false; }\r\n                var fileObj = new quoting_submit_model_5.FormatiMultipliObj();\r\n                var lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(function (x) { return x.Id; }).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj);\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.deleteFormatoMultiplo = function (id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(function (e) { return e.Id === id; }), 1);\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleAdesivi = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    var oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"ADESIVI\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"ADESIVI\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, lavAccArray_1 = lavAccArray; _b < lavAccArray_1.length; _b++) {\r\n                        var lavorazioneOld = lavAccArray_1[_b];\r\n                        count = 0;\r\n                        for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n                            var lavorazione = _d[_c];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.CheckRegoleManifesti = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    var oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"MANIFESTI\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"MANIFESTI\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_2 = lavAccArray; _d < lavAccArray_2.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_2[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.CheckRegolePannelli = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    var oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"PANNELLI\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"PANNELLI\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, lavAccArray_3 = lavAccArray; _b < lavAccArray_3.length; _b++) {\r\n                        var lavorazioneOld = lavAccArray_3[_b];\r\n                        count = 0;\r\n                        for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n                            var lavorazione = _d[_c];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                if (this.responseModel.idGruppo == 6) {\r\n                    this.CheckRegoleAdesivi();\r\n                }\r\n                else if (this.responseModel.idGruppo == 8) {\r\n                    this.CheckRegoleManifesti();\r\n                }\r\n                else if (this.responseModel.idGruppo == 10) {\r\n                    this.CheckRegolePannelli();\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n                    //verify validation for all  parameters \r\n                    this.validationCopie();\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                    this.validationFormati();\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.validationMateriali();\r\n                this.validationSupporti();\r\n                this.countPlastificazioni();\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countPlastificazioni = function () {\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n                            var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n                this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n                this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioneAccessoria = _a[_i];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var calcWizSub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = true;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                    this.subManager.add(calcWizSub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.supportoIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.supportoIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationBaseFormatiMultipli = function (baseInput) {\r\n                var message = \"\";\r\n                var base = parseFloat(baseInput);\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormatiMultipli = function (altezzaInput) {\r\n                var message = \"\";\r\n                var altezza = parseFloat(altezzaInput);\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationCopieFormatiMultipli = function (copieInput) {\r\n                var message = \"\";\r\n                var numCopie = parseInt(copieInput);\r\n                var minCopie = this.responseModel.minimoCopie;\r\n                var maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationFormatiMultipli = function () {\r\n                var _this = this;\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                this.formatiMultipliList.forEach(function (x) {\r\n                    var copieMessage = _this.validationCopieFormatiMultipli(x.Copie);\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var heighMessage = _this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = _this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n            };\r\n            ChildComponent.prototype.validationMateriali = function () {\r\n                var message;\r\n                if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.materialeIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeIsValid = true;\r\n                }\r\n                if (this.responseModel.materialiFlessibili != null) {\r\n                    this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.materialeMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSupporti = function () {\r\n                var message;\r\n                if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.supportoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoIsValid = true;\r\n                }\r\n                if (this.responseModel.supportiRigidi != null) {\r\n                    this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.supportoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var transSub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(transSub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                    var formato = _a[_i];\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onMaterialeChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.materialiFlessibili; _i < _a.length; _i++) {\r\n                    var materiale = _a[_i];\r\n                    if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n                        this.responseModel.materialeDescription = materiale.descrizione;\r\n                        this.responseModel.materialeImage = materiale.image;\r\n                        this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n                        this.responseModel.materialeShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onMaterialeVisualChange = function (materialeId) {\r\n                this.responseModel.idMaterialiFlessibili = materialeId;\r\n                this.onMaterialeChange();\r\n            };\r\n            ChildComponent.prototype.onSuportoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.supportiRigidi; _i < _a.length; _i++) {\r\n                    var supporto = _a[_i];\r\n                    if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n                        this.responseModel.supportoDescription = supporto.descrizione;\r\n                        this.responseModel.supportoImage = supporto.image;\r\n                        this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n                        this.responseModel.supportoShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onSuportoVisualChange = function (supportoId) {\r\n                this.responseModel.idSupportiRigidi = supportoId;\r\n                this.onSuportoChange();\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n                    var plastification = _a[_i];\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideMaterialeDescription = function () {\r\n                if (this.responseModel.materialeShowInfo) {\r\n                    this.responseModel.materialeShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideSupportoDescription = function () {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(wizCalSub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(wizSconSub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(wizLisSub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(wizLisSconSub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardAdesiviComponent.prototype, \"resourceId\", void 0);\r\n    WizardAdesiviComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-adesivi-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardAdesiviComponent);\r\n    return WizardAdesiviComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardAdesiviComponent = WizardAdesiviComponent;\r\n\n\n/***/ }),\n\n/***/ 609:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar quoting_submit_model_5 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardBannerComponent = (function () {\r\n    function WizardBannerComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardBannerComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardBannerData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardBannerComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardBannerComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, translate, routesService, cartService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.routesService = routesService;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.formatiMultipliList = new Array();\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    this.ExcludingRules.setMacrocategory(\"BANNER\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 9) {\r\n                    this.ExcludingRules.setMacrocategory(\"BANDIERE\");\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.aggiungiFormatoMultiplo = function (firstLoad) {\r\n                if (firstLoad === void 0) { firstLoad = false; }\r\n                var fileObj = new quoting_submit_model_5.FormatiMultipliObj();\r\n                var lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(function (x) { return x.Id; }).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj);\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.deleteFormatoMultiplo = function (id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(function (e) { return e.Id === id; }), 1);\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleBanner = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldAsola = this.responseModel.idAsole;\r\n                    var oldElettro = this.responseModel.idElettrosaldature;\r\n                    var oldOcchielli = this.responseModel.idOcchielli;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole occhiellatura\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole asola\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole elettro\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANNER\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", this.responseModel.idElettrosaldature, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANNER\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldOcchielli != this.responseModel.idOcchielli) {\r\n                        this.onOcchielliChange(true);\r\n                    }\r\n                    if (oldAsola != this.responseModel.idAsole) {\r\n                        this.onAsoleChange(true);\r\n                    }\r\n                    if (oldElettro != this.responseModel.idElettrosaldature) {\r\n                        this.onElettrosaldatureChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_1[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkIsAsolaIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsCucituraIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsElettroIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsOcchielliIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleBandiere = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldAsola = this.responseModel.idAsole;\r\n                    var oldCucitura = this.responseModel.idCuciture;\r\n                    var oldOcchielli = this.responseModel.idOcchielli;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", null, null, this.responseModel);\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole occhiellatura\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole asola\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole elettro\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANDIERE\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", this.responseModel.idCuciture, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANDIERE\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldOcchielli != this.responseModel.idOcchielli) {\r\n                        this.onOcchielliChange(true);\r\n                    }\r\n                    if (oldAsola != this.responseModel.idAsole) {\r\n                        this.onAsoleChange(true);\r\n                    }\r\n                    if (oldCucitura != this.responseModel.idCuciture) {\r\n                        this.onCucitureChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, lavAccArray_2 = lavAccArray; _b < lavAccArray_2.length; _b++) {\r\n                        var lavorazioneOld = lavAccArray_2[_b];\r\n                        count = 0;\r\n                        for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n                            var lavorazione = _d[_c];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isBannerQuotingForm = function () {\r\n                result = false;\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isBandiereQuotingForm = function () {\r\n                result = false;\r\n                if (this.responseModel.idGruppo == 9) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    this.CheckRegoleBanner();\r\n                    if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n                        this.validationElettro();\r\n                    }\r\n                    else {\r\n                        this.responseModel.elettroIsValid = true;\r\n                    }\r\n                    this.responseModel.cucituraIsValid = true;\r\n                }\r\n                else if (this.responseModel.idGruppo == 9) {\r\n                    this.CheckRegoleBandiere();\r\n                    if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n                        this.validationCuciture();\r\n                    }\r\n                    else {\r\n                        this.responseModel.cucituraIsValid = true;\r\n                    }\r\n                    this.responseModel.elettroIsValid = true;\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n                    //verify validation for all  parameters\r\n                    this.validationCopie();\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                    this.validationFormati();\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n                    this.validationAsole();\r\n                    if (this.responseModel.idAsole != \"0\") {\r\n                        this.validationDiametroAsole();\r\n                    }\r\n                    else {\r\n                        this.responseModel.diametroAsolaIsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.diametroAsolaIsValid = true;\r\n                    this.responseModel.asolaIsValid = true;\r\n                }\r\n                if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n                    this.validationOcchielli();\r\n                    if (this.responseModel.idOcchielli != \"0\") {\r\n                        this.validationDistanzaOcchielli();\r\n                    }\r\n                    else {\r\n                        this.responseModel.distanzaOcchielliIsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaIsValid = true;\r\n                    this.responseModel.distanzaOcchielliIsValid = true;\r\n                }\r\n                this.validationMateriali();\r\n                this.countOcchielliDisposizione();\r\n                this.countAsoleDisposizioni();\r\n                this.countTelettrosaldature();\r\n                this.countTelettrosaldatureDisposizioni();\r\n                this.countCucitureDisposizioni();\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countOcchielliDisposizione = function () {\r\n                if (this.responseModel.occhielliDisposizione != null) {\r\n                    this.responseModel.occhielliDisposizioneCount = this.responseModel.occhielliDisposizione.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countAsoleDisposizioni = function () {\r\n                if (this.responseModel.asoleDisposizioni != null) {\r\n                    this.responseModel.asoleDisposizioniCount = this.responseModel.asoleDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countTelettrosaldature = function () {\r\n                if (this.responseModel.elettrosaldature != null) {\r\n                    this.responseModel.elettrosaldatureCount = this.responseModel.elettrosaldature.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countTelettrosaldatureDisposizioni = function () {\r\n                if (this.responseModel.elettrosaldatureDisposizioni != null) {\r\n                    this.responseModel.elettrosaldatureDisposizioniCount = this.responseModel.elettrosaldatureDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countCucitureDisposizioni = function () {\r\n                if (this.responseModel.cucitureDisposizioni != null) {\r\n                    this.responseModel.cucitureDisposizioniCount = this.responseModel.cucitureDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n                            var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n                this.model.idAsole = this.responseModel.idAsole;\r\n                if (this.responseModel.idAsole != \"0\") {\r\n                    this.model.disposizione_asola_id = this.responseModel.disposizione_asola_id;\r\n                    this.model.diametro_asola = this.responseModel.diametro_asola;\r\n                }\r\n                this.model.idCuciture = this.responseModel.idCuciture;\r\n                if (this.responseModel.idCuciture != \"0\") {\r\n                    this.model.disposizione_cucitura_id = this.responseModel.disposizione_cucitura_id;\r\n                }\r\n                this.model.idElettrosaldature = this.responseModel.idElettrosaldature;\r\n                if (this.responseModel.idElettrosaldature != \"0\") {\r\n                    this.model.disposizione_elettrosaldatura_id = this.responseModel.disposizione_elettrosaldatura_id;\r\n                }\r\n                this.model.idOcchielli = this.responseModel.idOcchielli;\r\n                if (this.responseModel.idOcchielli != \"0\") {\r\n                    this.model.disposizione_occhielli_id = this.responseModel.disposizione_occhielli_id;\r\n                    this.model.distanza_occhielli = this.responseModel.distanza_occhielli;\r\n                }\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioneAccessoria = _a[_i];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = true;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.occhiellaturaIsValid\r\n                        && this.responseModel.elettroIsValid\r\n                        && this.responseModel.asolaIsValid\r\n                        && this.responseModel.distanzaOcchielliIsValid\r\n                        && this.responseModel.diametroAsolaIsValid\r\n                        && this.responseModel.cucituraIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.occhiellaturaIsValid\r\n                        && this.responseModel.elettroIsValid\r\n                        && this.responseModel.asolaIsValid\r\n                        && this.responseModel.distanzaOcchielliIsValid\r\n                        && this.responseModel.diametroAsolaIsValid\r\n                        && this.responseModel.cucituraIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationBaseFormatiMultipli = function (baseInput) {\r\n                var message = \"\";\r\n                var base = parseFloat(baseInput);\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormatiMultipli = function (altezzaInput) {\r\n                var message = \"\";\r\n                var altezza = parseFloat(altezzaInput);\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationCopieFormatiMultipli = function (copieInput) {\r\n                var message = \"\";\r\n                var numCopie = parseInt(copieInput);\r\n                var minCopie = this.responseModel.minimoCopie;\r\n                var maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationFormatiMultipli = function () {\r\n                var _this = this;\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                this.formatiMultipliList.forEach(function (x) {\r\n                    var copieMessage = _this.validationCopieFormatiMultipli(x.Copie);\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var heighMessage = _this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = _this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n            };\r\n            ChildComponent.prototype.validationMateriali = function () {\r\n                var message;\r\n                if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.materialeIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeIsValid = true;\r\n                }\r\n                if (this.responseModel.materialiFlessibili != null) {\r\n                    this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.materialeMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationOcchielli = function () {\r\n                var message;\r\n                if (this.responseModel.idOcchielli == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.occhiellaturaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaIsValid = true;\r\n                }\r\n                if (this.responseModel.occhielli != null) {\r\n                    this.responseModel.occhielliCount = this.responseModel.occhielli.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.occhiellaturaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAsole = function () {\r\n                var message;\r\n                if (this.responseModel.idAsole == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.asolaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.asolaIsValid = true;\r\n                }\r\n                if (this.responseModel.asole != null) {\r\n                    this.responseModel.asoleCount = this.responseModel.asole.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.asolaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationDiametroAsole = function () {\r\n                var message;\r\n                var diametro = parseInt(this.responseModel.diametro_asola);\r\n                if (this.responseModel.diametro_asola == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.diametroAsolaIsValid = false;\r\n                }\r\n                else if (diametro <= 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" 0\";\r\n                    this.responseModel.diametroAsolaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.diametroAsolaIsValid = true;\r\n                }\r\n                this.responseModel.diametroAsolaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationDistanzaOcchielli = function () {\r\n                var message;\r\n                var distanza = parseInt(this.responseModel.distanza_occhielli);\r\n                if (this.responseModel.distanza_occhielli == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.distanzaOcchielliIsValid = false;\r\n                }\r\n                else if (distanza <= 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" 0\";\r\n                    this.responseModel.distanzaOcchielliIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.distanzaOcchielliIsValid = true;\r\n                }\r\n                this.responseModel.distanzaOcchielliMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationElettro = function () {\r\n                var message;\r\n                if (this.responseModel.idElettrosaldature == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.elettroIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.elettroIsValid = true;\r\n                }\r\n                this.responseModel.elettroMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCuciture = function () {\r\n                var message;\r\n                if (this.responseModel.idCuciture == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.cucituraIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cucituraIsValid = true;\r\n                }\r\n                if (this.responseModel.cuciture != null) {\r\n                    this.responseModel.cucitureCount = this.responseModel.cuciture.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.cucituraMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                    var formato = _a[_i];\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onOcchielliChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.occhielli; _i < _a.length; _i++) {\r\n                    var occhiellatura = _a[_i];\r\n                    if (occhiellatura.chiave == this.responseModel.idOcchielli) {\r\n                        this.responseModel.occhiellaturaDescription = occhiellatura.descrizione;\r\n                        this.responseModel.occhiellaturaImage = occhiellatura.image;\r\n                        this.responseModel.occhiellaturaHasInfo = occhiellatura.hasInfo;\r\n                        this.responseModel.occhiellaturaShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onOcchielliVisualChange = function (occhielliId) {\r\n                this.responseModel.idOcchielli = occhielliId;\r\n                this.onOcchielliChange();\r\n            };\r\n            ChildComponent.prototype.onAsoleChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.asole; _i < _a.length; _i++) {\r\n                    var asola = _a[_i];\r\n                    if (asola.chiave == this.responseModel.idAsole) {\r\n                        this.responseModel.asolaDescription = asola.descrizione;\r\n                        this.responseModel.asolaImage = asola.image;\r\n                        this.responseModel.asolaHasInfo = asola.hasInfo;\r\n                        this.responseModel.asolaShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onAsoleVisualChange = function (asoleId) {\r\n                this.responseModel.idAsole = asoleId;\r\n                this.onAsoleChange();\r\n            };\r\n            ChildComponent.prototype.onElettrosaldatureChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.elettrosaldature; _i < _a.length; _i++) {\r\n                    var elettro = _a[_i];\r\n                    if (elettro.chiave == this.responseModel.idElettrosaldature) {\r\n                        this.responseModel.elettroDescription = elettro.descrizione;\r\n                        this.responseModel.elettroImage = elettro.image;\r\n                        this.responseModel.elettroHasInfo = elettro.hasInfo;\r\n                        this.responseModel.elettroShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onElettrosaldatureVisualChange = function (elettroId) {\r\n                this.responseModel.idElettrosaldature = elettroId;\r\n                this.onElettrosaldatureChange();\r\n            };\r\n            ChildComponent.prototype.onCucitureChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.cuciture; _i < _a.length; _i++) {\r\n                    var cucitura = _a[_i];\r\n                    if (cucitura.chiave == this.responseModel.idCuciture) {\r\n                        this.responseModel.cucituraDescription = cucitura.descrizione;\r\n                        this.responseModel.cucituraImage = cucitura.image;\r\n                        this.responseModel.cucituraHasInfo = cucitura.hasInfo;\r\n                        this.responseModel.cucituraShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCucitureVisualChange = function (cucituraId) {\r\n                this.responseModel.idCuciture = cucituraId;\r\n                this.onCucitureChange();\r\n            };\r\n            ChildComponent.prototype.onMaterialeChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.materialiFlessibili; _i < _a.length; _i++) {\r\n                    var materiale = _a[_i];\r\n                    if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n                        this.responseModel.materialeDescription = materiale.descrizione;\r\n                        this.responseModel.materialeImage = materiale.image;\r\n                        this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n                        this.responseModel.materialeShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onMaterialeVisualChange = function (materialeId) {\r\n                this.responseModel.idMaterialiFlessibili = materialeId;\r\n                this.onMaterialeChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideOcchiellaturaDescription = function () {\r\n                if (this.responseModel.occhiellaturaShowInfo) {\r\n                    this.responseModel.occhiellaturaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideAsolaDescription = function () {\r\n                if (this.responseModel.asolaShowInfo) {\r\n                    this.responseModel.asolaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.asolaShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideElettrosaldatureDescription = function () {\r\n                if (this.responseModel.elettroShowInfo) {\r\n                    this.responseModel.elettroShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.elettroShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideCucitureDescription = function () {\r\n                if (this.responseModel.cucituraShowInfo) {\r\n                    this.responseModel.cucituraShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cucituraShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideMaterialeDescription = function () {\r\n                if (this.responseModel.materialeShowInfo) {\r\n                    this.responseModel.materialeShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideSupportoDescription = function () {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardBannerComponent.prototype, \"resourceId\", void 0);\r\n    WizardBannerComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-banner-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardBannerComponent);\r\n    return WizardBannerComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardBannerComponent = WizardBannerComponent;\r\n\n\n/***/ }),\n\n/***/ 61:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar QuotingService = (function () {\r\n    function QuotingService(_api, language, currency, _cache, mappings, authService) {\r\n        this._api = _api;\r\n        this.language = language;\r\n        this.currency = currency;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.authService = authService;\r\n    }\r\n    QuotingService.prototype.getWizardStampaData = function (modelType, resourceId, userId, lang) {\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Stampa_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardBannerData = function (modelType, resourceId, userId, lang) {\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Banner_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardAdesiviData = function (modelType, resourceId, userId, lang) {\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Adesivi_Data.\r\n            replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardBusteData = function (modelType, resourceId, userId, lang) {\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Buste_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardEtichetteData = function (modelType, resourceId, userId, lang) {\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Etichette_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardCommercialeData = function (modelType, resourceId, userId, lang) {\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Commerciale_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId\r\n            .toString()).replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardEditoriaData = function (modelType, resourceId, userId, lang) {\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Editoria_Data\r\n            .replace('{modelType}', modelType)\r\n            .replace('{resourceId}', resourceId.toString())\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getWizardDataRequest = function (modelType, resourceId, lang) {\r\n        var userId = this.authService.GetUserId();\r\n        var url = this.mappings.Web_Api_Get_Wizard_Data_Address.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    QuotingService.prototype.getCalculatedWizard = function (data) {\r\n        data.language = this.language.getLongLang();\r\n        data.currency = this.currency.getCurrency();\r\n        return this._api.post(this.mappings.Web_Api_Post_Get_Wizard_Price_Estimation, data)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    QuotingService.prototype.getCalculatedAp = function (data) {\r\n        data.language = this.language.getLongLang();\r\n        data.currency = this.currency.getCurrency();\r\n        return this._api.post(this.mappings.Web_Api_Post_Get_Ap_Price_Estimation, data)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    QuotingService.prototype.sendRequestInfo = function (data) {\r\n        data.language = this.language.getLongLang();\r\n        return this._api.post(this.mappings.Web_Api_Post_Send_Request_Info_Wizard, data)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    QuotingService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n    ], QuotingService);\r\n    return QuotingService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.QuotingService = QuotingService;\r\n\n\n/***/ }),\n\n/***/ 610:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar WizardBusteComponent = (function () {\r\n    function WizardBusteComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardBusteComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardBusteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardBusteComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardBusteComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, translate, routesService, currency, cartService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.routesService = routesService;\r\n                this.currency = currency;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                //blockquoting: boolean = false;\r\n                this.resultPriceQuantity = 0;\r\n                this.resultPriceImponibile = 0;\r\n                this.resultPriceCurrency = this.currency.getDefaultCurrency();\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.ExcludingRules.setMacrocategory(\"BUSTE\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.getTableValues = function (index) {\r\n                this.resultPriceQuantity = this.resultPrice.TablePriceList[index].Quantity;\r\n                this.resultPriceImponibile = this.resultPrice.TablePriceList[index].StrDiscountedPrice;\r\n                this.resultPriceCurrency = this.resultPrice.TablePriceList[index].Currency;\r\n            };\r\n            ChildComponent.prototype.onStampaRetroChangeDocta = function () {\r\n                if (this.responseModel.idColori2 == \"5\") {\r\n                    this.responseModel.idColori1 = \"5\";\r\n                    for (var _i = 0, _a = this.responseModel.colori1; _i < _a.length; _i++) {\r\n                        var col = _a[_i];\r\n                        if (col.chiave == \"5\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if (this.responseModel.idColori2 == \"4\") {\r\n                    this.responseModel.idColori1 = \"4\";\r\n                    for (var _b = 0, _c = this.responseModel.colori1; _b < _c.length; _b++) {\r\n                        var col = _c[_b];\r\n                        if (col.chiave == \"4\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if ((this.responseModel.idColori2 == \"0\" || this.responseModel.idColori2 == \"1\") && (this.responseModel.idColori1 == \"5\" || this.responseModel.idColori1 == \"4\")) {\r\n                    this.responseModel.idColori1 = this.responseModel.idColori2;\r\n                    for (var _d = 0, _e = this.responseModel.colori1; _d < _e.length; _d++) {\r\n                        var col = _e[_d];\r\n                        if (col.chiave == this.responseModel.idColori2) {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaFronteChangeDocta = function () {\r\n                if (this.responseModel.idColori1 == \"5\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n                    this.responseModel.idColori2 = \"5\";\r\n                    for (var _i = 0, _a = this.responseModel.colori2; _i < _a.length; _i++) {\r\n                        var col = _a[_i];\r\n                        if (col.chiave == \"5\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if (this.responseModel.idColori1 == \"4\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n                    this.responseModel.idColori2 = \"4\";\r\n                    for (var _b = 0, _c = this.responseModel.colori2; _b < _c.length; _b++) {\r\n                        var col = _c[_b];\r\n                        if (col.chiave == \"4\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if ((this.responseModel.idColori1 == \"0\" || this.responseModel.idColori1 == \"1\") && (this.responseModel.idColori2 == \"5\" || this.responseModel.idColori2 == \"4\")) {\r\n                    this.responseModel.idColori2 = this.responseModel.idColori1;\r\n                    for (var _d = 0, _e = this.responseModel.colori2; _d < _e.length; _d++) {\r\n                        var col = _e[_d];\r\n                        if (col.chiave == this.responseModel.idColori1) {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //verify validation for all  parameters \r\n                this.validationCopie();\r\n                if (this.responseModel.soggettiMultipli == true) {\r\n                    this.validationSoggetti();\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.validationBusta();\r\n                this.validationColori();\r\n                this.countPantoni();\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    //$('#quotingForm').hide();\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countPantoni = function () {\r\n                if (this.responseModel.pantoni != null) {\r\n                    this.responseModel.pantoniCount = this.responseModel.pantoni.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (this.responseModel.idBusta != null) {\r\n                        var data = this.responseModel.idBusta.split(\"_\");\r\n                        var idBusta = data[0];\r\n                        if (file.FormatId == idBusta) {\r\n                            var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = 15;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                if (this.responseModel.idBusta != \"-1\") {\r\n                    this.model.idBusta = this.responseModel.idBusta;\r\n                }\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n                this.model.idPantoneFronte1 = \"\";\r\n                this.model.idPantoneFronte2 = \"\";\r\n                this.model.idPantoneRetro1 = \"\";\r\n                this.model.idPantoneRetro2 = \"\";\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\" && this.model.idColori1 != \"4\" && this.model.idColori1 != \"5\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n                else if (this.model.idColori1 == \"4\") {\r\n                    this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n                }\r\n                else if (this.model.idColori1 == \"5\") {\r\n                    this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n                    this.model.idPantoneFronte2 = this.responseModel.idPantoneFronte2;\r\n                }\r\n                this.model.idColori2 = this.responseModel.idColori2;\r\n                if (this.model.idColori2 == \"4\") {\r\n                    this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n                }\r\n                else if (this.model.idColori2 == \"5\") {\r\n                    this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n                    this.model.idPantoneRetro2 = this.responseModel.idPantoneRetro2;\r\n                }\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioneAccessoria = _a[_i];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var sub_1 = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.subManager.add(sub_1);\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = true;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.bustaIsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.soggettiIsValid\r\n                    && this.responseModel.colori1IsValid) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationColori = function () {\r\n                var message;\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.colori1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationBusta = function () {\r\n                var message;\r\n                if (this.responseModel.idBusta == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.bustaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.bustaIsValid = true;\r\n                }\r\n                if (this.responseModel.tipologieBusta != null) {\r\n                    this.responseModel.tipologieBustaCount = this.responseModel.tipologieBusta.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.bustaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onBustaChange = function () {\r\n                for (var _i = 0, _a = this.responseModel.tipologieBusta; _i < _a.length; _i++) {\r\n                    var busta = _a[_i];\r\n                    if (busta.chiave == this.responseModel.idBusta) {\r\n                        this.responseModel.bustaDescription = busta.descrizione;\r\n                        this.responseModel.bustaImage = busta.image;\r\n                        this.responseModel.bustaHasInfo = busta.hasInfo;\r\n                        this.responseModel.bustaShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onBustaVisualChange = function (bustaId) {\r\n                this.responseModel.idBusta = bustaId;\r\n                this.onBustaChange();\r\n            };\r\n            ChildComponent.prototype.onPantoneFronte1VisualChange = function (pantoneValue) {\r\n                this.responseModel.idPantoneFronte1 = pantoneValue;\r\n                this.onPantoneFronte1Change();\r\n            };\r\n            ChildComponent.prototype.onPantoneFronte1Change = function () {\r\n                for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n                    var pantone = _a[_i];\r\n                    if (pantone.chiave == this.responseModel.idPantoneFronte1) {\r\n                        this.responseModel.pantoneFronte1Description = pantone.descrizione;\r\n                        this.responseModel.pantoneFronte1Image = pantone.image;\r\n                        this.responseModel.pantoneFronte1HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneFronte1ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPantoneFronte2VisualChange = function (pantoneValue) {\r\n                this.responseModel.idPantoneFronte2 = pantoneValue;\r\n                this.onPantoneFronte2Change();\r\n            };\r\n            ChildComponent.prototype.onPantoneFronte2Change = function () {\r\n                for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n                    var pantone = _a[_i];\r\n                    if (pantone.chiave == this.responseModel.idPantoneFronte2) {\r\n                        this.responseModel.pantoneFronte2Description = pantone.descrizione;\r\n                        this.responseModel.pantoneFronte2Image = pantone.image;\r\n                        this.responseModel.pantoneFronte2HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneFronte2ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPantoneRetro1VisualChange = function (pantoneValue) {\r\n                this.responseModel.idPantoneRetro1 = pantoneValue;\r\n                this.onPantoneRetro1Change();\r\n            };\r\n            ChildComponent.prototype.onPantoneRetro1Change = function () {\r\n                for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n                    var pantone = _a[_i];\r\n                    if (pantone.chiave == this.responseModel.idPantoneRetro1) {\r\n                        this.responseModel.pantoneRetro1Description = pantone.descrizione;\r\n                        this.responseModel.pantoneRetro1Image = pantone.image;\r\n                        this.responseModel.pantoneRetro1HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneRetro1ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPantoneRetro2VisualChange = function (pantoneValue) {\r\n                this.responseModel.idPantoneRetro2 = pantoneValue;\r\n                this.onPantoneRetro2Change();\r\n            };\r\n            ChildComponent.prototype.onPantoneRetro2Change = function () {\r\n                for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n                    var pantone = _a[_i];\r\n                    if (pantone.chiave == this.responseModel.idPantoneRetro2) {\r\n                        this.responseModel.pantoneRetro2Description = pantone.descrizione;\r\n                        this.responseModel.pantoneRetro2Image = pantone.image;\r\n                        this.responseModel.pantoneRetro2HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneRetro2ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione) {\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideBusteDescription = function () {\r\n                if (this.responseModel.bustaShowInfo) {\r\n                    this.responseModel.bustaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.bustaShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePantoneFronte1Description = function () {\r\n                if (this.responseModel.pantoneFronte1ShowInfo) {\r\n                    this.responseModel.pantoneFronte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneFronte1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePantoneFronte2Description = function () {\r\n                if (this.responseModel.pantoneFronte2ShowInfo) {\r\n                    this.responseModel.pantoneFronte2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneFronte2ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePantoneRetro1Description = function () {\r\n                if (this.responseModel.pantoneRetro1ShowInfo) {\r\n                    this.responseModel.pantoneRetro1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneRetro1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePantoneRetro2Description = function () {\r\n                if (this.responseModel.pantoneRetro2ShowInfo) {\r\n                    this.responseModel.pantoneRetro2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneRetro2ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isPantoneFronte1Showed = function () {\r\n                var result = false;\r\n                if (this.responseModel.idColori1 == \"4\" || this.responseModel.idColori1 == \"5\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isPantoneFronte2Showed = function () {\r\n                var result = false;\r\n                if (this.responseModel.idColori1 == \"5\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isPantoneRetro1Showed = function () {\r\n                var result = false;\r\n                if (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"5\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isPantoneRetro2Showed = function () {\r\n                var result = false;\r\n                if (this.responseModel.idColori2 == \"5\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.resetCanvasData();\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.resetCanvasData();\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2, colType).subscribe(function (result) {\r\n                    _this.cartService.resetCanvasData();\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2, colType).subscribe(function (result) {\r\n                    _this.cartService.resetCanvasData();\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                // set variable for check if product is canvas edited to a initial state, because of other products\r\n                this.cartService.setIfProductIsCanvasEdited(false);\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(8, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _j) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardBusteComponent.prototype, \"resourceId\", void 0);\r\n    WizardBusteComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-buste-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardBusteComponent);\r\n    return WizardBusteComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardBusteComponent = WizardBusteComponent;\r\n\n\n/***/ }),\n\n/***/ 611:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardCommercialeComponent = (function () {\r\n    function WizardCommercialeComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardCommercialeComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardCommercialeData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardCommercialeComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardCommercialeComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, translate, cartService, routesService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.cartService = cartService;\r\n                this.routesService = routesService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_4.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.listaProfonditaPackaging = new Array();\r\n                this.listaFormatiFull = new Array();\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                this.packangingProfonditaChange = false;\r\n                this.packangingBaseChange = false;\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.ExcludingRules.setMacrocategory(\"COMMERCIALE\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                this.listaFormatiFull = this.responseModel.formati;\r\n                if (this.responseModel.IsPackagingWizard == true) {\r\n                    this.onBasePackagingChange();\r\n                }\r\n                else {\r\n                    if (!this.isDataInitialized) {\r\n                        //check if the all values is validated\r\n                        this.parameterValidation();\r\n                    }\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleCommerciale = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldCarta = this.responseModel.idCarte1;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var oldPiegature = this.responseModel.idPiegature;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n                    //Reset regole carta e grammature\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", null, null, this.responseModel);\r\n                    //Reset regole taglio\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"COMMERCIALE\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", this.responseModel.idFormati, 0, this.responseModel);\r\n                    if (this.responseModel.idCarte1 != null) {\r\n                        var data = this.responseModel.idCarte1.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", this.responseModel.idPiegature, 0, this.responseModel);\r\n                    if (!this.isTaglioCalculated()) {\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 1, 0, this.responseModel);\r\n                    }\r\n                    else {\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 2, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldCarta != this.responseModel.idCarte1) {\r\n                        this.onCartaInternoFieldChanged(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldPiegature != this.responseModel.idPiegature) {\r\n                        this.onPiegaturaChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_1[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                this.CheckRegoleCommerciale();\r\n                //verify validation for all  parameters \r\n                this.validationCopie();\r\n                if (this.responseModel.soggettiMultipli == true) {\r\n                    this.validationSoggetti();\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                if (this.responseModel.IsPackagingWizard == true) {\r\n                    this.validationBasePackaging();\r\n                    this.validationProfonditaPackaging();\r\n                }\r\n                else {\r\n                    this.responseModel.basePackagingIsValid = true;\r\n                    this.responseModel.profonditaPackagingIsValid = true;\r\n                }\r\n                this.validationFormati();\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.validationBaseFormati();\r\n                    this.validationAltezzaFormati();\r\n                }\r\n                else {\r\n                    this.responseModel.baseFormatoIsValid = true;\r\n                    this.responseModel.altezzaFormatoIsValid = true;\r\n                }\r\n                this.validationColori();\r\n                this.validationCarteInterno();\r\n                this.validationGrammatureCarteInterno();\r\n                this.validationPiegatura();\r\n                this.validationPlastificazione();\r\n                this.validationLavorazioneAccessoria();\r\n                this.countCartaCategories();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countCartaCategories = function () {\r\n                if (this.responseModel.categorieCarte != null) {\r\n                    this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.idCarte1 = this.responseModel.idCarte1;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carta = _a[_i];\r\n                    if (this.model.idCarte1 == carta.chiave) {\r\n                        this.model.nomeCarte1 = carta.valore;\r\n                    }\r\n                }\r\n                this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n                for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n                    var grammatureInterno = _c[_b];\r\n                    if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n                        this.model.nomeGrammature1 = grammatureInterno.valore;\r\n                    }\r\n                }\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n                this.model.idColori2 = this.responseModel.idColori2;\r\n                if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    this.model.idPlastificazioni1 = \"\";\r\n                }\r\n                else {\r\n                    this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                }\r\n                this.model.taglio = this.isTaglioCalculated();\r\n                if (this.responseModel.idPiegature != \"-1\") {\r\n                    this.model.idPiegature = this.responseModel.idPiegature;\r\n                }\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _d = 0, _e = this.responseModel.lavorazioniAccessorie; _d < _e.length; _d++) {\r\n                    var lavorazioneAccessoria = _e[_d];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var sub_1 = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.subManager.add(sub_1);\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.showErrorMessage = true;\r\n                        _this.isCalculatedWizard = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.formatiIsValid\r\n                    && this.responseModel.carte1IsValid\r\n                    && this.responseModel.grammature1IsValid\r\n                    && this.responseModel.piegatureIsValid\r\n                    && this.responseModel.plastificazione1IsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.baseFormatoIsValid\r\n                    && this.responseModel.altezzaFormatoIsValid\r\n                    && this.responseModel.soggettiIsValid\r\n                    && this.responseModel.colori1IsValid\r\n                    && this.responseModel.basePackagingIsValid\r\n                    && this.responseModel.profonditaPackagingIsValid) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationColori = function () {\r\n                var message;\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.colori1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                //let base = parseFloat(this.responseModel.baseFormato)\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationBasePackaging = function () {\r\n                var message;\r\n                if (this.responseModel.idBasePackaging == 0 || this.responseModel.idBasePackaging == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.basePackagingIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.basePackagingIsValid = true;\r\n                }\r\n                this.responseModel.basePackagingMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationProfonditaPackaging = function () {\r\n                var message;\r\n                if (this.responseModel.idProfonditaPackaging == 0 || this.responseModel.idProfonditaPackaging == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.profonditaPackagingIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.profonditaPackagingIsValid = true;\r\n                }\r\n                this.responseModel.profonditaPackagingMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationCarteInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idCarte1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.carte1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1IsValid = true;\r\n                }\r\n                if (this.responseModel.carte1 != null) {\r\n                    this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.carte1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idGrammature1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.grammature1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.grammature1IsValid = true;\r\n                }\r\n                if (this.responseModel.grammature1 != null) {\r\n                    this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.grammature1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.validationPiegatura = function () {\r\n                var message;\r\n                if (this.responseModel.idPiegature == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.piegatureIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.piegatureIsValid = true;\r\n                }\r\n                if (this.responseModel.piegature != null) {\r\n                    this.responseModel.piegatureCount = this.responseModel.piegature.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.piegatureMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationPlastificazione = function () {\r\n                var message;\r\n                if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    if (this.responseModel.isPlastificazioneRequired == true) {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.plastificazione1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.plastificazione1IsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazione1IsValid = true;\r\n                }\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.plastificazione1Message = message;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isTaglioCalculated = function () {\r\n                var result = false;\r\n                if (this.responseModel.isTaglioVisible == false) {\r\n                    if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n                        result = true;\r\n                    }\r\n                    else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n                        result = false;\r\n                    }\r\n                    else if (this.responseModel.taglioShowed) {\r\n                        result = this.responseModel.tipoTaglio;\r\n                    }\r\n                }\r\n                else {\r\n                    result = false;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n                var selectedPaper = false;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carte = _a[_i];\r\n                    if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n                        if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n                            if (selectedPaper == false) {\r\n                                this.responseModel.idCarte1 = carte.chiave;\r\n                                this.model.idCarte1 = carte.chiave;\r\n                                this.responseModel.carte1Description = carte.descrizione;\r\n                                this.responseModel.carte1Image = carte.image;\r\n                                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                                this.responseModel.carte1ShowInfo = false;\r\n                                this.responseModel.grammature1 = carte.subElements;\r\n                                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                                this.model.idGrammature1 = carte.wrap_valore;\r\n                                selectedPaper = true;\r\n                            }\r\n                            carte.isVisible = true;\r\n                        }\r\n                        else {\r\n                            carte.isVisible = false;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selectedPaper == false) {\r\n                            this.responseModel.idCarte1 = carte.chiave;\r\n                            this.model.idCarte1 = carte.chiave;\r\n                            this.responseModel.carte1Description = carte.descrizione;\r\n                            this.responseModel.carte1Image = carte.image;\r\n                            this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                            this.responseModel.carte1ShowInfo = false;\r\n                            this.responseModel.grammature1 = carte.subElements;\r\n                            this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                            this.model.idGrammature1 = carte.wrap_valore;\r\n                            selectedPaper = true;\r\n                        }\r\n                        carte.isVisible = true;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var grammature = _a[_i];\r\n                    if (grammature.chiave == this.responseModel.idCarte1) {\r\n                        this.responseModel.carte1Description = grammature.descrizione;\r\n                        this.responseModel.carte1Image = grammature.image;\r\n                        this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n                        this.responseModel.carte1ShowInfo = false;\r\n                        this.responseModel.grammature1 = grammature.subElements;\r\n                        this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n                        this.model.idGrammature1 = grammature.wrap_valore;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n                this.responseModel.idCarte1 = paperId;\r\n                this.onCartaInternoFieldChanged();\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    this.responseModel.formatoDescription = \"\";\r\n                    this.responseModel.formatoImage = \"\";\r\n                    this.responseModel.formatiHasInfo = false;\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                        var formato = _a[_i];\r\n                        if (formato.chiave == this.responseModel.idFormati) {\r\n                            this.responseModel.formatoDescription = formato.descrizione;\r\n                            this.responseModel.formatoImage = formato.image;\r\n                            this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                            this.responseModel.formatiShowInfo = false;\r\n                        }\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onBasePackagingChange = function () {\r\n                this.packangingBaseChange = false;\r\n                this.packangingProfonditaChange = false;\r\n                if (this.responseModel.listaPackagingParameter.length > 0 && this.responseModel.listaPackagingParameter != null) {\r\n                    for (var _i = 0, _a = this.responseModel.listaPackagingParameter; _i < _a.length; _i++) {\r\n                        var base = _a[_i];\r\n                        if (base.IdBase == this.responseModel.idBasePackaging) {\r\n                            this.listaProfonditaPackaging = base.listPackagingRelProfondita;\r\n                            if (this.listaProfonditaPackaging != null && this.listaProfonditaPackaging.length > 0) {\r\n                                this.packangingProfonditaChange = true;\r\n                                this.packangingBaseChange = true;\r\n                                this.responseModel.idProfonditaPackaging = this.listaProfonditaPackaging[0].IdProfondita;\r\n                                this.onProfonditaPackagingChange();\r\n                            }\r\n                            else {\r\n                                this.responseModel.formati = new Array();\r\n                                this.responseModel.idProfonditaPackaging = 0;\r\n                                this.onFormatiVisualChange(\"-1\");\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.idBasePackaging = 0;\r\n                    this.responseModel.idProfonditaPackaging = 0;\r\n                    this.onFormatiVisualChange(\"-1\");\r\n                }\r\n                if (this.packangingProfonditaChange == false) {\r\n                    this.parameterValidation();\r\n                    this.packangingBaseChange = false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.onProfonditaPackagingChange = function () {\r\n                var _this = this;\r\n                if (this.listaProfonditaPackaging.length > 0 && this.listaProfonditaPackaging != null) {\r\n                    var firstFormato_1 = 0;\r\n                    var _loop_1 = function(profondita) {\r\n                        if (profondita.IdProfondita == this_1.responseModel.idProfonditaPackaging && profondita.IdBase == this_1.responseModel.idBasePackaging) {\r\n                            this_1.responseModel.formati = new Array();\r\n                            if (profondita.listPackagingRelFormato.length > 0 && profondita.listPackagingRelFormato != null) {\r\n                                var idFIrstFormat_1 = \"0\";\r\n                                profondita.listPackagingRelFormato.forEach(function (formatiRel) {\r\n                                    var stringId = formatiRel.IdFormato + \"\";\r\n                                    _this.listaFormatiFull.filter(function (x) { return x.chiave == stringId; }).forEach(function (formato) {\r\n                                        _this.responseModel.formati.push(formato);\r\n                                        if (firstFormato_1 == 0) {\r\n                                            firstFormato_1++;\r\n                                            idFIrstFormat_1 = formato.chiave;\r\n                                        }\r\n                                    });\r\n                                });\r\n                                //select firsformato\r\n                                if (idFIrstFormat_1 != \"0\") {\r\n                                    firstFormato_1++;\r\n                                    this_1.packangingProfonditaChange = true;\r\n                                    this_1.onFormatiVisualChange(idFIrstFormat_1);\r\n                                }\r\n                            }\r\n                            else {\r\n                                this_1.responseModel.formati = new Array();\r\n                                this_1.onFormatiVisualChange(\"-1\");\r\n                            }\r\n                            return \"break\";\r\n                        }\r\n                    };\r\n                    var this_1 = this;\r\n                    for (var _i = 0, _a = this.listaProfonditaPackaging; _i < _a.length; _i++) {\r\n                        var profondita = _a[_i];\r\n                        var state_1 = _loop_1(profondita);\r\n                        if (state_1 === \"break\") break;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.formati = new Array();\r\n                    this.onFormatiVisualChange(\"-1\");\r\n                }\r\n                // console.log(\"qui3\")\r\n                // if (this.packangingBaseChange == true ) {\r\n                //   this.parameterValidation();\r\n                // }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n                this.responseModel.idGrammature1 = grammatureId;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n                    var plastification = _a[_i];\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.onPiegaturaChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.piegature; _i < _a.length; _i++) {\r\n                    var piegatura = _a[_i];\r\n                    if (piegatura.chiave == this.responseModel.idPiegature) {\r\n                        this.responseModel.piegatureDescription = piegatura.descrizione;\r\n                        this.responseModel.piegatureImage = piegatura.image;\r\n                        this.responseModel.piegatureHasInfo = piegatura.hasInfo;\r\n                        this.responseModel.piegatureShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPiegaturaVisualChange = function (piegaturaId) {\r\n                this.responseModel.idPiegature = piegaturaId;\r\n                this.onPiegaturaChange();\r\n            };\r\n            ChildComponent.prototype.showHidePiegatureDescription = function () {\r\n                if (this.responseModel.piegatureShowInfo) {\r\n                    this.responseModel.piegatureShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.piegatureShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n                if (this.responseModel.carte1ShowInfo) {\r\n                    this.responseModel.carte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setActive = function (id) {\r\n                $(\".calendar-list\").removeClass(\"hoverActive\");\r\n                $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (file.FormatId == this.responseModel.idFormati) {\r\n                        if (this.responseModel.piegature != null) {\r\n                            if (file.PiegaId == this.responseModel.idPiegature) {\r\n                                var fileObj = new quoting_submit_model_3.FileCombinationModel();\r\n                                fileObj.PathFile = file.PathFile;\r\n                                if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                    fileObj.NomeFile = file.FileName;\r\n                                }\r\n                                else {\r\n                                    fileObj.NomeFile = file.NomeFile;\r\n                                }\r\n                                fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                                if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                    fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                                }\r\n                                else {\r\n                                    fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                                }\r\n                                this.listaFile.push(fileObj);\r\n                            }\r\n                        }\r\n                        else {\r\n                            var fileObj = new quoting_submit_model_3.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                // console.log(\"price1\")\r\n                // console.log(price)\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                // console.log(\"this.resultPrice\")\r\n                // console.log(this.resultPrice)\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                // console.log(\"price2\")\r\n                // console.log(price)\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardCommercialeComponent.prototype, \"resourceId\", void 0);\r\n    WizardCommercialeComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-commerciale-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardCommercialeComponent);\r\n    return WizardCommercialeComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardCommercialeComponent = WizardCommercialeComponent;\r\n\n\n/***/ }),\n\n/***/ 612:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\nvar quoting_model_1 = __webpack_require__(56);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_2 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardEditoriaComponent = (function () {\r\n    function WizardEditoriaComponent(_compiler, componentHelper, authService, _elementRef, _quotingService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this.authService = authService;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardEditoriaComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardEditoriaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId, _this.resourceType);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardEditoriaComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardEditoriaComponent.prototype.createSubComponent = function (result, InputresourceId, InputresourceType) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, cartService, routesService, bootboxService, translate, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.cartService = cartService;\r\n                this.routesService = routesService;\r\n                this.bootboxService = bootboxService;\r\n                this.translate = translate;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.model = new quoting_submit_model_2.wizardFormEditoriaModel();\r\n                this.components = new quoting_model_1.LavorazioniComponents();\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_2.QuotingModel();\r\n                this.resourceId = InputresourceId;\r\n                this.resourceType = InputresourceType;\r\n                this.EditioriaCopertinaSelect = \"-1\";\r\n                this.isValidated = false;\r\n                this.resultPrice = new quoting_submit_model_3.PriceEstimationModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.ExcludingRules.setMacrocategory(\"EDITORIA\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_2.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.stampa1_colori_fronte = \"1\";\r\n                this.responseModel.stampa1_colori_retro = \"1\";\r\n                this.responseModel.stampa2_colori_fronte = \"1\";\r\n                this.responseModel.stampa2_colori_retro = \"1\";\r\n                this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n                if (this.responseModel.idCopertine == null) {\r\n                    this.responseModel.idCopertine = \"-1\";\r\n                }\r\n                this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.tipoFacciate = this.responseModel.tipoFacciate;\r\n                if (this.responseModel.tipoFacciate != 'libera') {\r\n                    this.model.idFacciate = this.responseModel.idFacciate;\r\n                }\r\n                else {\r\n                    this.model.numFacciate = this.responseModel.numFacciate;\r\n                }\r\n                this.model.tipoStampaInternoSoloFronte = this.responseModel.valueStampaInternoSoloFronte;\r\n                this.model.tipoStampaCopertinaSoloFronte = this.responseModel.valueStampaCopertinaSoloFronte;\r\n                this.model.idCarte1 = this.responseModel.idCarte1;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carta = _a[_i];\r\n                    if (this.model.idCarte1 == carta.chiave) {\r\n                        this.model.nomeCarte1 = carta.valore;\r\n                    }\r\n                }\r\n                this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n                for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n                    var grammatureInterno = _c[_b];\r\n                    if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n                        this.model.nomeGrammature1 = grammatureInterno.valore;\r\n                    }\r\n                }\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n                if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    this.model.idPlastificazioni1 = \"\";\r\n                }\r\n                else {\r\n                    this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                }\r\n                if (this.EditioriaCopertinaSelect != \"0\" && this.EditioriaCopertinaSelect != \"-1\") {\r\n                    this.model.idCarte2 = this.responseModel.idCarte2;\r\n                    for (var _d = 0, _e = this.responseModel.carte2; _d < _e.length; _d++) {\r\n                        var cartaCopertina = _e[_d];\r\n                        if (this.model.idCarte2 == cartaCopertina.chiave) {\r\n                            this.model.nomeCarte2 = cartaCopertina.valore;\r\n                        }\r\n                    }\r\n                    this.model.idGrammature2 = this.responseModel.idGrammature2;\r\n                    for (var _f = 0, _g = this.responseModel.grammature2; _f < _g.length; _f++) {\r\n                        var grammatureCopertina = _g[_f];\r\n                        if (this.model.idGrammature2 == grammatureCopertina.chiave) {\r\n                            this.model.nomeGrammature2 = grammatureCopertina.valore;\r\n                        }\r\n                    }\r\n                    this.model.idCopertine = this.responseModel.idCopertine;\r\n                    if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni2 == \"-1\") {\r\n                        this.model.idPlastificazioni2 = \"\";\r\n                    }\r\n                    else {\r\n                        this.model.idPlastificazioni2 = this.responseModel.idPlastificazioni2;\r\n                    }\r\n                    this.model.idColori2 = this.responseModel.idColori2;\r\n                }\r\n                else {\r\n                    this.model.idGrammature2 = \"0\";\r\n                    this.model.idCarte2 = \"\";\r\n                    this.model.nomeCarte2 = \"\";\r\n                    this.model.nomeGrammature2 = \"0\";\r\n                    this.model.idCopertine = \"\";\r\n                    this.model.idPlastificazioni2 = \"\";\r\n                    this.model.idColori2 = \"\";\r\n                }\r\n                if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n                    this.model.idCartoncino = this.responseModel.idCartoncino;\r\n                    for (var _h = 0, _j = this.responseModel.cartoncini; _h < _j.length; _h++) {\r\n                        var cartaCartoncino = _j[_h];\r\n                        if (this.model.idCartoncino == cartaCartoncino.chiave) {\r\n                            this.model.nomeCartoncino = cartaCartoncino.valore;\r\n                        }\r\n                    }\r\n                    this.model.idGrammatureCartoncino = this.responseModel.idGrammatureCartoncino;\r\n                    for (var _k = 0, _l = this.responseModel.grammatureCartoncino; _k < _l.length; _k++) {\r\n                        var grammatureCartoncino = _l[_k];\r\n                        if (this.model.idGrammatureCartoncino == grammatureCartoncino.chiave) {\r\n                            this.model.nomeGrammatureCartoncino = grammatureCartoncino.valore;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    this.model.idGrammatureCartoncino = \"0\";\r\n                    this.model.idCartoncino = \"0\";\r\n                    this.model.nomeCartoncino = \"0\";\r\n                    this.model.nomeGrammatureCartoncino = \"0\";\r\n                }\r\n                this.model.taglio = this.isTaglioCalculated();\r\n                if (this.responseModel.idRilegature != \"-1\") {\r\n                    this.model.idRilegature = this.responseModel.idRilegature;\r\n                }\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _m = 0, _o = this.responseModel.lavorazioniAccessorie; _m < _o.length; _m++) {\r\n                    var lavorazioneAccessoria = _o[_m];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        var dorsoString = parseFloat(_this.resultPrice.AltezzaDorso.toString());\r\n                        var dorso = parseFloat(dorsoString.toFixed(2));\r\n                        _this.resultPrice.AltezzaDorso = dorso;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = true;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.isTaglioCalculated = function () {\r\n                var result = false;\r\n                if (this.responseModel.isTaglioVisible == false) {\r\n                    if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n                        result = true;\r\n                    }\r\n                    else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n                        result = false;\r\n                    }\r\n                    else if (this.responseModel.taglioShowed) {\r\n                        result = this.responseModel.tipoTaglio;\r\n                    }\r\n                }\r\n                else {\r\n                    result = false;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsCopertinaShowed = function () {\r\n                var result = false;\r\n                if (this.EditioriaCopertinaSelect != '0' && this.EditioriaCopertinaSelect != '-1') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsCartoncinoShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsPlastificazioneCopertinaIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.plastificazioni2 != null && this.responseModel.plastificazioni2.length > 0 && this.checkIsCopertinaShowed()) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni2.filter(function (x) { return x.isVisible == true; }).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId, lavIsVisible) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n                var selectedPaper = false;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carte = _a[_i];\r\n                    if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n                        if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n                            if (selectedPaper == false) {\r\n                                this.responseModel.idCarte1 = carte.chiave;\r\n                                this.model.idCarte1 = carte.chiave;\r\n                                this.responseModel.carte1Description = carte.descrizione;\r\n                                this.responseModel.carte1Image = carte.image;\r\n                                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                                this.responseModel.carte1ShowInfo = false;\r\n                                this.responseModel.grammature1 = carte.subElements;\r\n                                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                                this.model.idGrammature1 = carte.wrap_valore;\r\n                                selectedPaper = true;\r\n                            }\r\n                            carte.isVisible = true;\r\n                        }\r\n                        else {\r\n                            carte.isVisible = false;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selectedPaper == false) {\r\n                            this.responseModel.idCarte1 = carte.chiave;\r\n                            this.model.idCarte1 = carte.chiave;\r\n                            this.responseModel.carte1Description = carte.descrizione;\r\n                            this.responseModel.carte1Image = carte.image;\r\n                            this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                            this.responseModel.carte1ShowInfo = false;\r\n                            this.responseModel.grammature1 = carte.subElements;\r\n                            this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                            this.model.idGrammature1 = carte.wrap_valore;\r\n                            selectedPaper = true;\r\n                        }\r\n                        carte.isVisible = true;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var grammature = _a[_i];\r\n                    if (grammature.chiave == this.responseModel.idCarte1) {\r\n                        this.responseModel.carte1Description = grammature.descrizione;\r\n                        this.responseModel.carte1Image = grammature.image;\r\n                        this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n                        this.responseModel.carte1ShowInfo = false;\r\n                        this.responseModel.grammature1 = grammature.subElements;\r\n                        this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n                        this.model.idGrammature1 = grammature.wrap_valore;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCartoncinoFieldChanged = function () {\r\n                for (var _i = 0, _a = this.responseModel.cartoncini; _i < _a.length; _i++) {\r\n                    var grammature = _a[_i];\r\n                    if (grammature.chiave == this.responseModel.idCartoncino) {\r\n                        this.responseModel.cartoncinoDescription = grammature.descrizione;\r\n                        this.responseModel.cartoncinoImage = grammature.image;\r\n                        this.responseModel.cartoncinoHasInfo = grammature.hasInfo;\r\n                        this.responseModel.cartoncinoShowInfo = false;\r\n                        this.responseModel.grammatureCartoncino = grammature.subElements;\r\n                        this.responseModel.idGrammatureCartoncino = grammature.wrap_valore;\r\n                        this.model.idGrammatureCartoncino = grammature.wrap_valore;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n                this.responseModel.idCarte1 = paperId;\r\n                this.onCartaInternoFieldChanged();\r\n            };\r\n            ChildComponent.prototype.onCartoncinoVisualFieldChanged = function (paperId) {\r\n                this.responseModel.idCartoncino = paperId;\r\n                this.onCartoncinoFieldChanged();\r\n            };\r\n            ChildComponent.prototype.onCategoriaCartaCopertinaFieldChanged = function () {\r\n                var selectedPaper = false;\r\n                for (var _i = 0, _a = this.responseModel.carte2; _i < _a.length; _i++) {\r\n                    var carteCopertina = _a[_i];\r\n                    if (this.responseModel.idCategorieCarte2 != \"-1\") {\r\n                        if (carteCopertina.parentId == this.responseModel.idCategorieCarte2) {\r\n                            if (selectedPaper == false) {\r\n                                this.responseModel.idCarte2 = carteCopertina.chiave;\r\n                                this.model.idCarte2 = carteCopertina.chiave;\r\n                                this.responseModel.carte2Description = carteCopertina.descrizione;\r\n                                this.responseModel.carte2Image = carteCopertina.image;\r\n                                this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n                                this.responseModel.carte2ShowInfo = false;\r\n                                this.responseModel.grammature2 = carteCopertina.subElements;\r\n                                this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n                                this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n                                selectedPaper = true;\r\n                            }\r\n                            carteCopertina.isVisible = true;\r\n                        }\r\n                        else {\r\n                            carteCopertina.isVisible = false;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selectedPaper == false) {\r\n                            this.responseModel.idCarte2 = carteCopertina.chiave;\r\n                            this.model.idCarte2 = carteCopertina.chiave;\r\n                            this.responseModel.carte2Description = carteCopertina.descrizione;\r\n                            this.responseModel.carte2Image = carteCopertina.image;\r\n                            this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n                            this.responseModel.carte2ShowInfo = false;\r\n                            this.responseModel.grammature2 = carteCopertina.subElements;\r\n                            this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n                            this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n                            selectedPaper = true;\r\n                        }\r\n                        carteCopertina.isVisible = true;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onCartaCopertinaFieldChanged = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.carte2; _i < _a.length; _i++) {\r\n                    var grammatureCartaCopertina = _a[_i];\r\n                    if (grammatureCartaCopertina.chiave == this.responseModel.idCarte2) {\r\n                        this.responseModel.carte2Description = grammatureCartaCopertina.descrizione;\r\n                        this.responseModel.carte2Image = grammatureCartaCopertina.image;\r\n                        this.responseModel.carte2HasInfo = grammatureCartaCopertina.hasInfo;\r\n                        this.responseModel.carte2ShowInfo = false;\r\n                        this.responseModel.grammature2 = grammatureCartaCopertina.subElements;\r\n                        this.responseModel.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n                        this.model.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCopertineFieldChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCopertineFieldVisualChange = function (copertinaId) {\r\n                this.responseModel.idCopertine = copertinaId;\r\n                this.onCopertineFieldChange();\r\n            };\r\n            ChildComponent.prototype.onCartaCopertinaVisualFieldChanged = function (paperId) {\r\n                this.responseModel.idCarte2 = paperId;\r\n                this.onCartaCopertinaFieldChanged();\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                    var formato = _a[_i];\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaCopertinaVisualChange = function (stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n                    var plastification = _a[_i];\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            };\r\n            ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n                this.responseModel.idGrammature1 = grammatureId;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onGrammatureCartoncinoVisualFieldChanged = function (grammatureId) {\r\n                this.responseModel.idGrammatureCartoncino = grammatureId;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onGrammatureCopertinaVisualFieldChanged = function (grammatureId) {\r\n                this.responseModel.idGrammature2 = grammatureId;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPlastificationCopertinaChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.plastificazioni2; _i < _a.length; _i++) {\r\n                    var plastification = _a[_i];\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni2) {\r\n                        this.responseModel.plastificazioni2Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni2Image = plastification.image;\r\n                        this.responseModel.plastificazioni2HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni2ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPlastificationCopertinaVisualChange = function (plastificationId) {\r\n                this.responseModel.plastificazioni2 = plastificationId;\r\n                this.onPlastificationCopertinaChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.onRilegaturaChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.rilegature; _i < _a.length; _i++) {\r\n                    var rilegature = _a[_i];\r\n                    if (rilegature.chiave == this.responseModel.idRilegature) {\r\n                        this.responseModel.rilegatureDescription = rilegature.descrizione;\r\n                        this.responseModel.rilegatureImage = rilegature.image;\r\n                        this.responseModel.rilegatureHasInfo = rilegature.hasInfo;\r\n                        this.responseModel.rilegatureShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onRilegaturaVisualChange = function (rilegaturaId) {\r\n                this.responseModel.idRilegature = rilegaturaId;\r\n                this.onRilegaturaChange();\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n                if (this.responseModel.carte1ShowInfo) {\r\n                    this.responseModel.carte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePaperCartoncinoDescription = function () {\r\n                if (this.responseModel.cartoncinoShowInfo) {\r\n                    this.responseModel.cartoncinoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cartoncinoShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePaperCopertinaDescription = function () {\r\n                if (this.responseModel.carte2ShowInfo) {\r\n                    this.responseModel.carte2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte2ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationCopertinaDescription = function () {\r\n                if (this.responseModel.plastificazioni2ShowInfo) {\r\n                    this.responseModel.plastificazioni2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni2ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideRilegatureDescription = function () {\r\n                if (this.responseModel.rilegatureShowInfo) {\r\n                    this.responseModel.rilegatureShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.rilegatureShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.facciateIsValid\r\n                    && this.responseModel.formatiIsValid\r\n                    && this.responseModel.baseFormatoIsValid\r\n                    && this.responseModel.altezzaFormatoIsValid\r\n                    && this.responseModel.carte1IsValid\r\n                    && this.responseModel.grammature1IsValid\r\n                    && this.responseModel.plastificazione1IsValid\r\n                    && this.responseModel.carte2IsValid\r\n                    && this.responseModel.grammature2IsValid\r\n                    && this.responseModel.plastificazione2IsValid\r\n                    && this.responseModel.copertineIsValid\r\n                    && this.responseModel.cartoncinoIsValid\r\n                    && this.responseModel.rilegatureIsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.colori1IsValid) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.CheckRegoleEditoria = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldCarta = this.responseModel.idCarte1;\r\n                    var oldCartaCopertina = this.responseModel.idCarte2;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var oldPlastificazioneCopertina = this.responseModel.idPlastificazioni2;\r\n                    var oldCopertina = this.responseModel.idCopertine;\r\n                    var oldRilegatura = this.responseModel.idRilegature;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", null, null, this.responseModel);\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"EDITORIA\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", this.responseModel.idFormati, 0, this.responseModel);\r\n                    if (this.responseModel.idCarte1 != null) {\r\n                        var data = this.responseModel.idCarte1.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    if (this.responseModel.idCarte2 != null) {\r\n                        var data = this.responseModel.idCarte2.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, this.responseModel.idGrammature2, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"EDITORIA\", this.responseModel.idPlastificazioni2, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", this.responseModel.idCopertine, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", this.responseModel.idRilegature, 0, this.responseModel);\r\n                    if (!this.isTaglioCalculated()) {\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 1, 0, this.responseModel);\r\n                    }\r\n                    else {\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 2, 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"EDITORIA\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldCarta != this.responseModel.idCarte1) {\r\n                        this.onCartaInternoFieldChanged(true);\r\n                    }\r\n                    if (oldCartaCopertina != this.responseModel.idCarte2) {\r\n                        this.onCartaCopertinaFieldChanged(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldPlastificazioneCopertina != this.responseModel.idPlastificazioni2) {\r\n                        this.onPlastificationCopertinaChange(true);\r\n                    }\r\n                    if (oldCopertina != this.responseModel.idCopertine) {\r\n                        this.onCopertineFieldChange(true);\r\n                    }\r\n                    if (oldRilegatura != this.responseModel.idRilegature) {\r\n                        this.onRilegaturaChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_1[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            /// Check if all the value is validated\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                this.CheckRegoleEditoria();\r\n                if (this.pageIsInit) {\r\n                    this.pageIsInit = false;\r\n                }\r\n                this.validationCopie();\r\n                this.validationFacciate();\r\n                this.validationFormati();\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.validationBaseFormati();\r\n                    this.validationAltezzaFormati();\r\n                }\r\n                else {\r\n                    this.responseModel.baseFormatoIsValid = true;\r\n                    this.responseModel.altezzaFormatoIsValid = true;\r\n                }\r\n                this.validationColori();\r\n                this.validationCarteInterno();\r\n                this.validationGrammatureCarteInterno();\r\n                this.validationPlastificazioneInterno();\r\n                this.validationCopertina();\r\n                if (this.checkIsCopertinaShowed()) {\r\n                    this.validationCarteCopertina();\r\n                    this.validationGrammatureCarteCopertina();\r\n                    this.validationPlastificazioneCopertina();\r\n                }\r\n                else {\r\n                    this.responseModel.carte2IsValid = true;\r\n                    this.responseModel.grammature2IsValid = true;\r\n                    this.responseModel.plastificazione2IsValid = true;\r\n                }\r\n                if (this.checkIsCartoncinoShowed()) {\r\n                    this.validationCartoncino();\r\n                    this.validationGrammatureCartoncino();\r\n                }\r\n                else {\r\n                    this.responseModel.cartoncinoIsValid = true;\r\n                    this.responseModel.grammatureCartoncinoIsValid = true;\r\n                }\r\n                this.validationRilegatura();\r\n                this.validationLavorazioneAccessoria();\r\n                this.countCartaCategories();\r\n                this.countCategorieCarteCopertina();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countCartaCategories = function () {\r\n                if (this.responseModel.categorieCarte != null) {\r\n                    this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countCategorieCarteCopertina = function () {\r\n                if (this.responseModel.categorieCarteCopertina != null) {\r\n                    this.responseModel.categorieCarteCopertinaCount = this.responseModel.categorieCarteCopertina.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (file.FormatId == this.responseModel.idFormati) {\r\n                        var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                        fileObj.PathFile = file.PathFile;\r\n                        if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                            fileObj.NomeFile = file.FileName;\r\n                        }\r\n                        else {\r\n                            fileObj.NomeFile = file.NomeFile;\r\n                        }\r\n                        fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                        if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                            fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                        }\r\n                        else {\r\n                            fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                        }\r\n                        this.listaFile.push(fileObj);\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFacciate = function () {\r\n                var message;\r\n                if (this.responseModel.tipoFacciate == 'libera') {\r\n                    var numFacciate = parseInt(this.responseModel.numFacciate);\r\n                    var minFacciate = this.responseModel.minimoFacciate;\r\n                    var maxFacciate = this.responseModel.massimoFacciate;\r\n                    var multiploFacciate = this.responseModel.multiploFacciate;\r\n                    //If the weight for the inside currently selected is in the ones defined in the validation rules, then the max and min are read directly from the ones of the rule.\r\n                    //Else the ones on the wizard are used\r\n                    //Note: The max and min facciate defined on weight wins over the ones defined on the wizard\r\n                    var objGrammaturaFacciateValidation = this.checkValidationRulesGrammatureFacciate();\r\n                    if (objGrammaturaFacciateValidation != null) {\r\n                        minFacciate = objGrammaturaFacciateValidation.Facciate != null ? objGrammaturaFacciateValidation.Facciate : 0;\r\n                        maxFacciate = objGrammaturaFacciateValidation.MassimoFacciate != null ? objGrammaturaFacciateValidation.MassimoFacciate : 0;\r\n                    }\r\n                    if (this.responseModel.numFacciate == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.facciateIsValid = false;\r\n                    }\r\n                    else if ((maxFacciate == 0 && (numFacciate == 0 || numFacciate < minFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minFacciate;\r\n                        if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n                            message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n                            message += \" \" + multiploFacciate;\r\n                        }\r\n                        this.responseModel.facciateIsValid = false;\r\n                    }\r\n                    else if ((maxFacciate > 0 && (numFacciate == 0 || numFacciate < minFacciate || numFacciate > maxFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minFacciate;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxFacciate;\r\n                        if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n                            message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n                            message += \" \" + multiploFacciate;\r\n                        }\r\n                        this.responseModel.facciateIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.facciateIsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idFacciate == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.facciateIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.facciateIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoFacciate === 'fissa' && this.responseModel.facciate != null) {\r\n                        this.responseModel.facciateCount = this.responseModel.facciate.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.facciateMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationColori = function () {\r\n                var message;\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.colori1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCarteInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idCarte1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.carte1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1IsValid = true;\r\n                }\r\n                if (this.responseModel.carte1 != null) {\r\n                    this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.carte1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idGrammature1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.grammature1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.grammature1IsValid = true;\r\n                }\r\n                if (this.responseModel.grammature1 != null) {\r\n                    this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.grammature1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationCartoncino = function () {\r\n                var message;\r\n                if (this.responseModel.idCartoncino == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.cartoncinoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cartoncinoIsValid = true;\r\n                }\r\n                if (this.responseModel.cartoncini != null) {\r\n                    this.responseModel.cartonciniCount = this.responseModel.cartoncini.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.cartoncinoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationGrammatureCartoncino = function () {\r\n                var message;\r\n                if (this.responseModel.idGrammatureCartoncino == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.grammatureCartoncinoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.grammatureCartoncinoIsValid = true;\r\n                }\r\n                if (this.responseModel.grammatureCartoncino != null) {\r\n                    this.responseModel.grammatureCartoncinoCount = this.responseModel.grammatureCartoncino.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.grammatureCartoncinoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationPlastificazioneInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    if (this.responseModel.isPlastificazioneRequired == true) {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.plastificazione1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.plastificazione1IsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazione1IsValid = true;\r\n                }\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.plastificazione1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationPlastificazioneCopertina = function () {\r\n                var message;\r\n                if (this.responseModel.idPlastificazioni2 == \"-1\") {\r\n                    if (this.responseModel.isPlastificazioneRequired == true) {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.plastificazione2IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.plastificazione2IsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazione2IsValid = true;\r\n                }\r\n                if (this.responseModel.plastificazioni2 != null) {\r\n                    this.responseModel.plastificazioni2Count = this.responseModel.plastificazioni2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.plastificazione2Message = message;\r\n            };\r\n            ChildComponent.prototype.validationCarteCopertina = function () {\r\n                var message;\r\n                if (this.responseModel.idCarte2 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.carte2IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte2IsValid = true;\r\n                }\r\n                if (this.responseModel.carte2 != null) {\r\n                    this.responseModel.carte2Count = this.responseModel.carte2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.carte2Message = message;\r\n            };\r\n            ChildComponent.prototype.validationGrammatureCarteCopertina = function () {\r\n                var message;\r\n                if (this.responseModel.idGrammature2 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.grammature2IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.grammature2IsValid = true;\r\n                }\r\n                if (this.responseModel.grammature2 != null) {\r\n                    this.responseModel.grammature2Count = this.responseModel.grammature2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.grammature2Message = message;\r\n            };\r\n            ChildComponent.prototype.validationCopertina = function () {\r\n                var message;\r\n                if (this.responseModel.idCopertine == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.copertineIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.copertineIsValid = true;\r\n                }\r\n                if (this.responseModel.copertine != null) {\r\n                    this.responseModel.copertineCount = this.responseModel.copertine.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.copertineMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var _this = this;\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        if (lavorazione.umLavorazione == 84 && qta > 0) {\r\n                            var numFacciate = 0;\r\n                            if (this.responseModel.tipoFacciate != 'libera') {\r\n                                var facciata = this.responseModel.facciate.filter(function (x) { return x.chiave == _this.responseModel.idFacciate; });\r\n                                numFacciate = parseInt(facciata[0].valore);\r\n                            }\r\n                            else {\r\n                                numFacciate = parseInt(this.responseModel.numFacciate);\r\n                            }\r\n                            var checkFacciateNum = parseInt(((numFacciate * lavorazione.percentualePagineTotEditoria) / 100) + \"\");\r\n                            if (checkFacciateNum < qta) {\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                                message = this.getLabel('num_lower_or_equal_than');\r\n                                message += \" \" + checkFacciateNum;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.validationRilegatura = function () {\r\n                var message;\r\n                if (this.responseModel.idRilegature == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.rilegatureIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.rilegatureIsValid = true;\r\n                }\r\n                if (this.responseModel.rilegature != null) {\r\n                    this.responseModel.rilegatureCount = this.responseModel.rilegature.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.rilegatureMessage = message;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setActive = function (id) {\r\n                $(\".calendar-list\").removeClass(\"hoverActive\");\r\n                $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            //Check if the selected paper weight for the inside is in the ones defined in the validation rules for the facciate\r\n            ChildComponent.prototype.checkValidationRulesGrammatureFacciate = function () {\r\n                var output = null;\r\n                //Reading current paper weight\r\n                var idGrammatura = this.responseModel.idGrammature1;\r\n                for (var i = 0; i < this.responseModel.listaRegoleGrammaturaFacciate.length; i++) {\r\n                    var item = this.responseModel.listaRegoleGrammaturaFacciate[i];\r\n                    if (item.IdGrammatura == idGrammatura) {\r\n                        output = item;\r\n                        break;\r\n                    }\r\n                }\r\n                return output;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardEditoriaComponent.prototype, \"resourceId\", void 0);\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', String)\r\n    ], WizardEditoriaComponent.prototype, \"resourceType\", void 0);\r\n    WizardEditoriaComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-editoria-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardEditoriaComponent);\r\n    return WizardEditoriaComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardEditoriaComponent = WizardEditoriaComponent;\r\n\n\n/***/ }),\n\n/***/ 613:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardEtichetteComponent = (function () {\r\n    function WizardEtichetteComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardEtichetteComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardEtichetteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardEtichetteComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardEtichetteComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, routesService, translate, cartService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.routesService = routesService;\r\n                this.translate = translate;\r\n                this.cartService = cartService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.enableAltezzaLabel = true;\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.ExcludingRules.setMacrocategory(\"ETICHETTE\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleEtichette = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldCarta = this.responseModel.idCarte1;\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    var oldTaglio = this.responseModel.idTagli;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", null, null, this.responseModel);\r\n                    //Reset regole carta e grammature\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole taglio\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"ETICHETTE\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    if (this.responseModel.idCarte1 != null) {\r\n                        var data = this.responseModel.idCarte1.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"ETICHETTE\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldCarta != this.responseModel.idCarte1) {\r\n                        this.onCartaInternoFieldChanged(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldTaglio != this.responseModel.idTagli) {\r\n                        this.onTaglioChange(true);\r\n                    }\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_1[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                this.CheckRegoleEtichette();\r\n                //verify validation for all  parameters \r\n                this.validationCopie();\r\n                if (this.isLabelField()) {\r\n                    this.validationSoggetti();\r\n                    this.validationNumEtichetteLabel();\r\n                    this.validationDiametroInternoAnimaLabel();\r\n                    this.validationDiametroMassimoEsternoAnimaLabel();\r\n                }\r\n                else {\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n                this.validationFormati();\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.enableOrDisableAltezzaLabelByTipoFormato(this.responseModel.idFormatoTipo);\r\n                    this.validationBaseFormati();\r\n                    this.validationAltezzaFormati();\r\n                }\r\n                else {\r\n                    this.responseModel.baseFormatoIsValid = true;\r\n                    this.responseModel.altezzaFormatoIsValid = true;\r\n                }\r\n                this.validationColori();\r\n                this.validationCarteInterno();\r\n                this.validationGrammatureCarteInterno();\r\n                this.validationPlastificazione();\r\n                this.validationLavorazioneAccessoria();\r\n                this.countCartaCategories();\r\n                this.countTagli();\r\n                this.countFustelle();\r\n                this.countFormatiTipoLabel();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countCartaCategories = function () {\r\n                if (this.responseModel.categorieCarte != null) {\r\n                    this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countTagli = function () {\r\n                if (this.responseModel.tagli != null) {\r\n                    this.responseModel.tagliCount = this.responseModel.tagli.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countFustelle = function () {\r\n                if (this.responseModel.ListafustelleLabel != null) {\r\n                    this.responseModel.fustelleLabelCount = this.responseModel.ListafustelleLabel.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countFormatiTipoLabel = function () {\r\n                if (this.responseModel.TipologiaFormatiLabel != null) {\r\n                    this.responseModel.formatiTipoLabelCount = this.responseModel.TipologiaFormatiLabel.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n                            var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            /// Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.idCarte1 = this.responseModel.idCarte1;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carta = _a[_i];\r\n                    if (this.model.idCarte1 == carta.chiave) {\r\n                        this.model.nomeCarte1 = carta.valore;\r\n                    }\r\n                }\r\n                this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n                for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n                    var grammatureInterno = _c[_b];\r\n                    if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n                        this.model.nomeGrammature1 = grammatureInterno.valore;\r\n                    }\r\n                }\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n                this.model.idColori2 = this.responseModel.idColori2;\r\n                if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    this.model.idPlastificazioni1 = \"\";\r\n                }\r\n                else {\r\n                    this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                }\r\n                if (this.responseModel.idTagli != \"-1\") {\r\n                    this.model.idTagli = this.responseModel.idTagli;\r\n                }\r\n                if (this.responseModel.idFustella != \"-1\") {\r\n                    this.model.idFustella = this.responseModel.idFustella;\r\n                }\r\n                if (this.responseModel.idAvvolgimento != \"-1\") {\r\n                    this.model.idAvvolgimento = this.responseModel.idAvvolgimento;\r\n                }\r\n                if (this.responseModel.idTipoLavoroLabel != \"-1\") {\r\n                    this.model.idTipoLavoroLabel = this.responseModel.idTipoLavoroLabel;\r\n                }\r\n                if (this.responseModel.idFormatoTipo != \"-1\") {\r\n                    this.model.idFormatoTipo = this.responseModel.idFormatoTipo;\r\n                }\r\n                this.model.numDiametroInternoAnimaLabel = this.responseModel.numDiametroInternoAnimaLabel;\r\n                this.model.numDiametroMassimoEsternoAnimaLabel = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n                this.model.numEtichette = this.responseModel.numEtichette;\r\n                this.model.subSection = this.responseModel.subSection;\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _d = 0, _e = this.responseModel.lavorazioniAccessorie; _d < _e.length; _d++) {\r\n                    var lavorazioneAccessoria = _e[_d];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = false;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = false;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.formatiIsValid\r\n                    && this.responseModel.carte1IsValid\r\n                    && this.responseModel.grammature1IsValid\r\n                    && this.responseModel.plastificazione1IsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.baseFormatoIsValid\r\n                    && this.responseModel.altezzaFormatoIsValid\r\n                    && this.responseModel.soggettiIsValid\r\n                    && this.responseModel.colori1IsValid) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.isLabelField()) {\r\n                    var minDistEtichette = this.responseModel.minimaDistanzaEtichetteLabel;\r\n                    var maxDistEtichette = this.responseModel.massimaDistanzaEtichetteLabel;\r\n                    if (this.responseModel.numSoggetti == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else if (numSoggetti == 0) {\r\n                        message = this.getLabel('inserisci_valore_maggiore_0');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else {\r\n                        if (maxDistEtichette == 0) {\r\n                            if (numSoggetti < minDistEtichette) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minDistEtichette;\r\n                                this.responseModel.soggettiIsValid = false;\r\n                            }\r\n                            else {\r\n                                this.responseModel.soggettiIsValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((numSoggetti >= minDistEtichette) && (numSoggetti <= maxDistEtichette)) {\r\n                                this.responseModel.soggettiIsValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minDistEtichette;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxDistEtichette;\r\n                                this.responseModel.soggettiIsValid = false;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.numSoggetti == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else if (numSoggetti == 0) {\r\n                        message = this.getLabel('inserisci_valore_maggiore_0');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationNumEtichetteLabel = function () {\r\n                var message;\r\n                var numEtichette = parseInt(this.responseModel.numEtichette);\r\n                if (this.responseModel.numEtichette == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.numEtichetteIsValid = false;\r\n                }\r\n                else if (numEtichette == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.numEtichetteIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.numEtichetteIsValid = true;\r\n                }\r\n                this.responseModel.numEtichetteMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationDiametroInternoAnimaLabel = function () {\r\n                var message;\r\n                var numDiametroInternoAnimaCustomer = this.responseModel.numDiametroInternoAnimaLabel;\r\n                var numDiametroInternoAnima = this.responseModel.numDiametroInternoAnimaEditabileLabel;\r\n                if (this.responseModel.numDiametroInternoAnimaLabel == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                }\r\n                else if (numDiametroInternoAnimaCustomer == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                }\r\n                else {\r\n                    if (numDiametroInternoAnimaCustomer >= numDiametroInternoAnima) {\r\n                        this.responseModel.DiametroInternoAnimaIsValid = true;\r\n                    }\r\n                    else {\r\n                        message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n                        message += \" \" + numDiametroInternoAnima;\r\n                        this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                    }\r\n                }\r\n                this.responseModel.DiametroInternoAnimaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationDiametroMassimoEsternoAnimaLabel = function () {\r\n                var message;\r\n                var numDiametroMassimoEsternoCustomer = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n                var numDiametroMassimoEsterno = this.responseModel.numDiametroMassimoEsternoAnimaEditabile;\r\n                if (this.responseModel.numDiametroMassimoEsternoAnimaLabel == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                }\r\n                else if (numDiametroMassimoEsternoCustomer == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                }\r\n                else {\r\n                    if (numDiametroMassimoEsternoCustomer >= numDiametroMassimoEsterno) {\r\n                        this.responseModel.DiametroMassimoEsternoAnimaIsValid = true;\r\n                    }\r\n                    else {\r\n                        message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n                        message += \" \" + numDiametroMassimoEsterno;\r\n                        this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                    }\r\n                }\r\n                this.responseModel.DiametroMassimoEsternoAnimaMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationColori = function () {\r\n                var message;\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.colori1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCarteInterno = function () {\r\n                var message;\r\n                if (this.responseModel.idCarte1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.carte1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1IsValid = true;\r\n                }\r\n                if (this.responseModel.carte1 != null) {\r\n                    this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.carte1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n                var message;\r\n                if (this.isLabelField()) {\r\n                    this.responseModel.grammature1IsValid = true;\r\n                }\r\n                else {\r\n                    if (this.responseModel.idGrammature1 == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.grammature1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.grammature1IsValid = true;\r\n                    }\r\n                    if (this.responseModel.grammature1 != null) {\r\n                        this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.grammature1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationPlastificazione = function () {\r\n                var message;\r\n                if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    if (this.responseModel.isPlastificazioneRequired == true) {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.plastificazione1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.plastificazione1IsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazione1IsValid = true;\r\n                }\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.plastificazione1Message = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.isLabelField = function () {\r\n                var result = false;\r\n                if (this.responseModel.subSection == \"Label\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsTaglioIsShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.tagli != null && this.responseModel.tagli.length > 0) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n                var selectedPaper = false;\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var carte = _a[_i];\r\n                    if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n                        if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n                            if (selectedPaper == false) {\r\n                                this.responseModel.idCarte1 = carte.chiave;\r\n                                this.model.idCarte1 = carte.chiave;\r\n                                this.responseModel.carte1Description = carte.descrizione;\r\n                                this.responseModel.carte1Image = carte.image;\r\n                                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                                this.responseModel.carte1ShowInfo = false;\r\n                                this.responseModel.grammature1 = carte.subElements;\r\n                                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                                this.model.idGrammature1 = carte.wrap_valore;\r\n                                selectedPaper = true;\r\n                            }\r\n                            carte.isVisible = true;\r\n                        }\r\n                        else {\r\n                            carte.isVisible = false;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selectedPaper == false) {\r\n                            this.responseModel.idCarte1 = carte.chiave;\r\n                            this.model.idCarte1 = carte.chiave;\r\n                            this.responseModel.carte1Description = carte.descrizione;\r\n                            this.responseModel.carte1Image = carte.image;\r\n                            this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                            this.responseModel.carte1ShowInfo = false;\r\n                            this.responseModel.grammature1 = carte.subElements;\r\n                            this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                            this.model.idGrammature1 = carte.wrap_valore;\r\n                            selectedPaper = true;\r\n                        }\r\n                        carte.isVisible = true;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n                    var grammature = _a[_i];\r\n                    if (grammature.chiave == this.responseModel.idCarte1) {\r\n                        this.responseModel.carte1Description = grammature.descrizione;\r\n                        this.responseModel.carte1Image = grammature.image;\r\n                        this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n                        this.responseModel.carte1ShowInfo = false;\r\n                        this.responseModel.grammature1 = grammature.subElements;\r\n                        this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n                        this.model.idGrammature1 = grammature.wrap_valore;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n                this.responseModel.idCarte1 = paperId;\r\n                this.onCartaInternoFieldChanged();\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                    var formato = _a[_i];\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n                this.responseModel.idGrammature1 = grammatureId;\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n                    var plastification = _a[_i];\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.onTaglioChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.tagli; _i < _a.length; _i++) {\r\n                    var taglio = _a[_i];\r\n                    if (taglio.chiave == this.responseModel.idTagli) {\r\n                        this.responseModel.taglioDescription = taglio.descrizione;\r\n                        this.responseModel.taglioImage = taglio.image;\r\n                        this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n                        this.responseModel.taglioShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onTaglioVisualChange = function (taglioId) {\r\n                this.responseModel.idTagli = taglioId;\r\n                this.onTaglioChange();\r\n            };\r\n            ChildComponent.prototype.onFormatiTipoLabelChange = function () {\r\n                for (var _i = 0, _a = this.responseModel.TipologiaFormatiLabel; _i < _a.length; _i++) {\r\n                    var formatoTipo = _a[_i];\r\n                    if (formatoTipo.chiave == this.responseModel.idFormatoTipo) {\r\n                        this.responseModel.formatiTipoImage = formatoTipo.image;\r\n                        this.responseModel.formatiTipoHasInfo = formatoTipo.hasInfo;\r\n                        this.responseModel.formatiTipoLabelShowInfo = false;\r\n                        this.enableOrDisableAltezzaLabelByTipoFormato(formatoTipo.chiave);\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.enableOrDisableAltezzaLabelByTipoFormato = function (tipoFormato) {\r\n                //checking tipo formato for anable or disable height\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    switch (tipoFormato) {\r\n                        case \"1\":\r\n                            this.enableAltezzaLabel = true;\r\n                            break;\r\n                        case \"2\":\r\n                            this.enableAltezzaLabel = false;\r\n                            this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n                            break;\r\n                        case \"3\":\r\n                            this.enableAltezzaLabel = false;\r\n                            this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n                            break;\r\n                        case \"4\":\r\n                            this.enableAltezzaLabel = true;\r\n                            break;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiTipoLabelVisualChange = function (fotmatoTipoId) {\r\n                this.responseModel.idFormatoTipo = fotmatoTipoId;\r\n                this.onFormatiTipoLabelChange();\r\n            };\r\n            ChildComponent.prototype.onAvvolgimentiChange = function () {\r\n                for (var _i = 0, _a = this.responseModel.avvolgimentiLabel; _i < _a.length; _i++) {\r\n                    var avvolgimento = _a[_i];\r\n                    if (avvolgimento.chiave == this.responseModel.idAvvolgimento) {\r\n                        this.responseModel.avvolgimentiImage = avvolgimento.image;\r\n                        this.responseModel.avvolgimentiHasInfo = avvolgimento.hasInfo;\r\n                        this.responseModel.avvolgimentiShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            };\r\n            ChildComponent.prototype.onAvvolgimentiVisualChange = function (avvolgimentoId) {\r\n                this.responseModel.idAvvolgimento = avvolgimentoId;\r\n                this.onAvvolgimentiChange();\r\n            };\r\n            ChildComponent.prototype.showHideTaglioDescription = function () {\r\n                if (this.responseModel.taglioShowInfo) {\r\n                    this.responseModel.taglioShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.taglioShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatiTipoLabelDescription = function () {\r\n                if (this.responseModel.formatiTipoLabelShowInfo) {\r\n                    this.responseModel.formatiTipoLabelShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiTipoLabelShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideAvvolgimentiDescription = function () {\r\n                if (this.responseModel.avvolgimentiShowInfo) {\r\n                    this.responseModel.avvolgimentiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.avvolgimentiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n                if (this.responseModel.carte1ShowInfo) {\r\n                    this.responseModel.carte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardEtichetteComponent.prototype, \"resourceId\", void 0);\r\n    WizardEtichetteComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-etichette-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardEtichetteComponent);\r\n    return WizardEtichetteComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardEtichetteComponent = WizardEtichetteComponent;\r\n\n\n/***/ }),\n\n/***/ 614:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(72);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar quoting_submit_model_1 = __webpack_require__(17);\r\nvar quoting_submit_model_2 = __webpack_require__(17);\r\nvar quoting_submit_model_3 = __webpack_require__(17);\r\nvar quoting_submit_model_4 = __webpack_require__(17);\r\nvar quoting_submit_model_5 = __webpack_require__(17);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar WizardStampaComponent = (function () {\r\n    function WizardStampaComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n        this._compiler = _compiler;\r\n        this.componentHelper = componentHelper;\r\n        this._elementRef = _elementRef;\r\n        this._quotingService = _quotingService;\r\n        this.authService = authService;\r\n        this.languageService = languageService;\r\n        this.isBrowser = isBrowser;\r\n        this.autentification = this.authService.GetData();\r\n        this.userId = this.authService.GetUserId();\r\n        this.lang = this.languageService.getLongLang();\r\n        this.subManager = new Subscription_1.Subscription();\r\n    }\r\n    WizardStampaComponent.prototype.ngOnInit = function () {\r\n        var _this = this;\r\n        if (!this.isBrowser)\r\n            return;\r\n        var sub = this._quotingService.getWizardStampaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n            //injecting created component (OK)\r\n            _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n        });\r\n        this.subManager.add(sub);\r\n    };\r\n    WizardStampaComponent.prototype.ngOnDestroy = function () {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    };\r\n    WizardStampaComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n        var ChildComponent = (function () {\r\n            function ChildComponent(_quotingService, languageService, authService, translate, cartService, routesService, bootboxService, isBrowser, canvasService) {\r\n                var _this = this;\r\n                this._quotingService = _quotingService;\r\n                this.languageService = languageService;\r\n                this.authService = authService;\r\n                this.translate = translate;\r\n                this.cartService = cartService;\r\n                this.routesService = routesService;\r\n                this.bootboxService = bootboxService;\r\n                this.isBrowser = isBrowser;\r\n                this.canvasService = canvasService;\r\n                this.pageIsInit = false;\r\n                this.pageIsInitAfter = false;\r\n                this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n                this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n                this.waiting = false;\r\n                this.carteValue = -1;\r\n                this.lang = this.languageService.getLongLang();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.autentification = this.authService.GetData();\r\n                this.resourceId = InputresourceId;\r\n                this.isDataInitialized = false;\r\n                this.iShowHourForDay = false;\r\n                this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n                this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n                this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n                this.requestInfoSuccess = null;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.blockquoting = false;\r\n                this.formatiMultipliList = new Array();\r\n                this.isCalculatedWizard = false;\r\n                // sending info to a child component\r\n                this.parentWidgetData = result.CanvasInfo;\r\n                this.subManager = new Subscription_1.Subscription();\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                var canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(function (isModalOpened) {\r\n                    if (isModalOpened == false) {\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                    }\r\n                    else {\r\n                        // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                        window.scrollTo(0, 0);\r\n                        $('html').css(\"overflow\", \"hidden\");\r\n                    }\r\n                });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(function (isDesignApproved) {\r\n                    if (isDesignApproved) {\r\n                        $('#customerCanvasModal').modal('hide');\r\n                        $('html').css(\"overflow\", \"visible\");\r\n                        // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                        cartService.setIfProductIsCanvasEdited(true);\r\n                        if (_this.isCalculationTypeCalcolato()) {\r\n                            _this.addToCartWizardCalcolato(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            _this.addToCartWizardCalcolatoScontistica(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            _this.addToCartWizardListino(1);\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            _this.addToCartWizardListinoScontistica(1);\r\n                        }\r\n                    }\r\n                });\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n            ChildComponent.prototype.ngOnInit = function () {\r\n                var _this = this;\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new quoting_model_1.QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                this.ExcludingRules.setMacrocategory(\"STAMPA_DIRETTA\");\r\n                this.responseModel.isStampaBifaccialeNoHide = false;\r\n                this.responseModel.isStampaBifaccialeSiHide = false;\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\r\n                }\r\n                setInterval(function () {\r\n                    if (_this.isDataInitialized) {\r\n                        _this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            };\r\n            ChildComponent.prototype.checkFirstDayForHour = function (priceList) {\r\n                for (var _i = 0, priceList_1 = priceList; _i < priceList_1.length; _i++) {\r\n                    var priceRow = priceList_1[_i];\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            };\r\n            ChildComponent.prototype.aggiungiFormatoMultiplo = function (firstLoad) {\r\n                if (firstLoad === void 0) { firstLoad = false; }\r\n                var fileObj = new quoting_submit_model_5.FormatiMultipliObj();\r\n                var lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(function (x) { return x.Id; }).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj);\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.deleteFormatoMultiplo = function (id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(function (e) { return e.Id === id; }), 1);\r\n            };\r\n            ChildComponent.prototype.openCanvasEditor = function () {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n                    var canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    var isStateId = false;\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setCanvasConfig = function () {\r\n                var canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n                return canvasConfigData;\r\n            };\r\n            ChildComponent.prototype.toShowCanvasButton = function () {\r\n                var toShow = false;\r\n                var isModuleActive = false;\r\n                var isUserLoggedIn = false;\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n                return toShow;\r\n            };\r\n            ChildComponent.prototype.CheckRegoleStampa = function () {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    var oldFormato = this.responseModel.idFormati;\r\n                    var oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    var oldTaglio = this.responseModel.idTagli;\r\n                    var lavAccArray = new Array();\r\n                    for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                        var lavorazione = _a[_i];\r\n                        var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n                    //Reset regole supporto rigido\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n                    //Reset regole stampa bifacciale\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", null, null, this.responseModel);\r\n                    //Reset regole stampa bianco coprente\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", null, null, this.responseModel);\r\n                    //Reset regole taglio\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", idFormato, 0, this.responseModel);\r\n                    }\r\n                    if (this.responseModel.tipoBifacciale == \"0\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"1\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.tipoBifacciale == \"1\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"2\", 0, this.responseModel);\r\n                    }\r\n                    if (this.responseModel.idBiancoCoprente == \"0\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"1\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.idBiancoCoprente == \"1\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"2\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.idBiancoCoprente == \"2\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"3\", 0, this.responseModel);\r\n                    }\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"STAMPA_DIRETTA\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    if (oldTaglio != this.responseModel.idTagli) {\r\n                        this.onTaglioChange(true);\r\n                    }\r\n                    var count = 0;\r\n                    for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n                        var lavorazione = _c[_b];\r\n                        count = 0;\r\n                        for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n                            var lavorazioneOld = lavAccArray_1[_d];\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            };\r\n            ChildComponent.prototype.parameterValidation = function () {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n                //apply all rules\r\n                this.CheckRegoleStampa();\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n                    //verify validation for all  parameters \r\n                    this.validationCopie();\r\n                    this.validationFormati();\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n                this.countTagli();\r\n                this.countBiancoCoprente();\r\n                this.validationSupporti();\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countTagli = function () {\r\n                if (this.responseModel.tagli != null) {\r\n                    this.responseModel.tagliCount = this.responseModel.tagli.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.countBiancoCoprente = function () {\r\n                if (this.responseModel.biancoCoprente != null) {\r\n                    this.responseModel.biancoCoprenteCount = this.responseModel.biancoCoprente.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n            };\r\n            ChildComponent.prototype.selectFileCombination = function () {\r\n                this.listaFile = new Array();\r\n                for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n                    var file = _a[_i];\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        var idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n                            var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj);\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkZero = function (val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            };\r\n            ChildComponent.prototype.setTypePriceResult = function (type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            };\r\n            ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            };\r\n            ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            ChildComponent.prototype.clearSelectedIndex = function () {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            };\r\n            ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n                var result = false;\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n                var result = false;\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            };\r\n            // Create model for passed in input to the calculation method\r\n            ChildComponent.prototype.getCalculationModel = function () {\r\n                var _this = this;\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n                this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n                if (this.responseModel.stampaBifacciale == 1) {\r\n                    this.model.tipoBifacciale = this.responseModel.tipoBifacciale;\r\n                }\r\n                else {\r\n                    this.model.tipoBifacciale = \"0\";\r\n                }\r\n                if (this.responseModel.biancoCoprente != null && this.responseModel.biancoCoprente.length > 0) {\r\n                    this.model.idBiancoCoprente = this.responseModel.idBiancoCoprente;\r\n                }\r\n                else {\r\n                    this.model.idBiancoCoprente = \"0\";\r\n                }\r\n                if (this.responseModel.idTagli != \"-1\") {\r\n                    this.model.idTagli = this.responseModel.idTagli;\r\n                }\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array();\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioneAccessoria = _a[_i];\r\n                    var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n                this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n                        _this.resultPrice = result;\r\n                        _this.isCalculatedWizard = true;\r\n                        if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    var price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            var breakFlag = false;\r\n                            for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n                                var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n                                var slicedPriceRow = priceRow.slice(1);\r\n                                _this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n                                    var price = reverse_1[_a];\r\n                                    if (price.Price != -1) {\r\n                                        _this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (_this.isCalculationTypeListino()) {\r\n                            var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n                            _this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    _this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        _this.resultCalculation = true;\r\n                        _this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    }, function (err) {\r\n                        _this.isCalculatedWizard = true;\r\n                        _this.showErrorMessage = true;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            };\r\n            ChildComponent.prototype.ngAfterViewInit = function () {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n                var altezza = $(\"#footer\").outerHeight();\r\n                var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n                var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n                var altezzaHead = $(\".header-body\").outerHeight();\r\n                var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            };\r\n            ChildComponent.prototype.checkValidation = function () {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.supportoIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.supportoIsValid) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            };\r\n            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"));\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormati = function () {\r\n                var message;\r\n                var altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"));\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationSoggetti = function () {\r\n                var message;\r\n                var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationCopie = function () {\r\n                var message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    var numCopie = parseInt(this.responseModel.numCopie);\r\n                    var minCopie = this.responseModel.minimoCopie;\r\n                    var maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.copieMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationFormati = function () {\r\n                var message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.formatiMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationBaseFormatiMultipli = function (baseInput) {\r\n                var message = \"\";\r\n                var base = parseFloat(baseInput);\r\n                var minBase = this.responseModel.minimoBase;\r\n                var maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationAltezzaFormatiMultipli = function (altezzaInput) {\r\n                var message = \"\";\r\n                var altezza = parseFloat(altezzaInput);\r\n                var minAltezza = this.responseModel.minimoAltezza;\r\n                var maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationCopieFormatiMultipli = function (copieInput) {\r\n                var message = \"\";\r\n                var numCopie = parseInt(copieInput);\r\n                var minCopie = this.responseModel.minimoCopie;\r\n                var maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.validationFormatiMultipli = function () {\r\n                var _this = this;\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                console.log(this.formatiMultipliList);\r\n                this.formatiMultipliList.forEach(function (x) {\r\n                    var copieMessage = _this.validationCopieFormatiMultipli(x.Copie);\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var heighMessage = _this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = _this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        _this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n            };\r\n            ChildComponent.prototype.validationSupporti = function () {\r\n                var message;\r\n                if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.supportoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoIsValid = true;\r\n                }\r\n                if (this.responseModel.supportiRigidi != null) {\r\n                    this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(function (x) { return x.isVisible == true; }).length;\r\n                }\r\n                this.responseModel.supportoMessage = message;\r\n            };\r\n            ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n                var message = \"\";\r\n                var valid = true;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazione = _a[_i];\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        var qta = parseInt(lavorazione.value);\r\n                        var minQta = lavorazione.minQtaInput;\r\n                        var maxQta = lavorazione.maxQtaInput;\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            };\r\n            ChildComponent.prototype.getLabel = function (label) {\r\n                var message;\r\n                var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            };\r\n            ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n                var result = false;\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n                var result = false;\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.textAreaCheck = function (event) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            };\r\n            ChildComponent.prototype.InputNumberCheck = function (event) {\r\n                var result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n                var result = false;\r\n                var isVisible = false;\r\n                for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n                    var lavorazioniAccessorie = _a[_i];\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n                var result = false;\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n                    var formato = _a[_i];\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            };\r\n            ChildComponent.prototype.onSuportoChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.supportiRigidi; _i < _a.length; _i++) {\r\n                    var supporto = _a[_i];\r\n                    if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n                        this.responseModel.supportoDescription = supporto.descrizione;\r\n                        this.responseModel.supportoImage = supporto.image;\r\n                        this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n                        this.responseModel.supportoShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onSuportoVisualChange = function (supportoId) {\r\n                this.responseModel.idSupportiRigidi = supportoId;\r\n                this.onSuportoChange();\r\n            };\r\n            ChildComponent.prototype.onTaglioChange = function (isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = this.responseModel.tagli; _i < _a.length; _i++) {\r\n                    var taglio = _a[_i];\r\n                    if (taglio.chiave == this.responseModel.idTagli) {\r\n                        this.responseModel.taglioDescription = taglio.descrizione;\r\n                        this.responseModel.taglioImage = taglio.image;\r\n                        this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n                        this.responseModel.taglioShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.onTaglioVisualChange = function (taglioId) {\r\n                this.responseModel.idTagli = taglioId;\r\n                this.onTaglioChange();\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n                if (isrules === void 0) { isrules = false; }\r\n                for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n                    var variante = _a[_i];\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            };\r\n            ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            };\r\n            ChildComponent.prototype.checkIsBifaccialeShowed = function () {\r\n                var result = false;\r\n                if (this.responseModel.stampaBifacciale == 1 &&\r\n                    (this.responseModel.isStampaBifaccialeNoHide == false || this.responseModel.isStampaBifaccialeSiHide == false)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideFormatDescription = function () {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHideSupportoDescription = function () {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListino = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    _this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n                var _this = this;\r\n                var wizardId = this.resourceId;\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(function (result) {\r\n                    _this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    _this.resultCalculation = true;\r\n                }, function (err) {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    _this.bootboxService.i18nAlert(\"errorMex\");\r\n                    _this.resultCalculation = true;\r\n                });\r\n                this.subManager.add(sub);\r\n            };\r\n            ChildComponent.prototype.setPriceResult = function (price) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n                    var prices = _a[_i];\r\n                    prices.IsSelected = false;\r\n                }\r\n                price.IsSelected = true;\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            };\r\n            ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            };\r\n            ChildComponent.prototype.checkEmailIsValid = function () {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            };\r\n            ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n                var result = false;\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n                return result;\r\n            };\r\n            ChildComponent.prototype.sendRequestInfo = function () {\r\n                var _this = this;\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n                        if (result == true) {\r\n                            _this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            _this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    }, function (err) {\r\n                        _this.requestInfoSuccess = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        _this.resultCalculation = true;\r\n                    });\r\n                    this.subManager.add(sub);\r\n                }\r\n            };\r\n            ChildComponent.prototype.ngAfterViewChecked = function () {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            };\r\n            ChildComponent.prototype.ngOnDestroy = function () {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            };\r\n            ChildComponent = __decorate([\r\n                core_1.Component({\r\n                    template: result.templateHtml\r\n                }),\r\n                __param(7, core_1.Inject('isBrowser')), \r\n                __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n            ], ChildComponent);\r\n            return ChildComponent;\r\n            var _a, _b, _c, _d, _e, _f, _g, _h;\r\n        }());\r\n        return ChildComponent;\r\n    };\r\n    __decorate([\r\n        core_1.Input(), \r\n        __metadata('design:type', Number)\r\n    ], WizardStampaComponent.prototype, \"resourceId\", void 0);\r\n    WizardStampaComponent = __decorate([\r\n        core_1.Component({\r\n            selector: \"dy-wizard-stampa-widget\",\r\n            template: \"\"\r\n        }),\r\n        __param(6, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n    ], WizardStampaComponent);\r\n    return WizardStampaComponent;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardStampaComponent = WizardStampaComponent;\r\n\n\n/***/ }),\n\n/***/ 615:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar category_component_1 = __webpack_require__(389);\r\nvar InventoryCategoryModule = (function () {\r\n    function InventoryCategoryModule() {\r\n    }\r\n    InventoryCategoryModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: [\r\n                shared_module_1.SharedModule\r\n            ],\r\n            declarations: [\r\n                category_component_1.CategoryComponent\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], InventoryCategoryModule);\r\n    return InventoryCategoryModule;\r\n}());\r\nexports.InventoryCategoryModule = InventoryCategoryModule;\r\n\n\n/***/ }),\n\n/***/ 616:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar other_product_component_1 = __webpack_require__(390);\r\nvar product_page_list_component_1 = __webpack_require__(392);\r\nvar promotions_component_1 = __webpack_require__(393);\r\nvar product_details_component_1 = __webpack_require__(391);\r\nvar InventoryProductModule = (function () {\r\n    function InventoryProductModule() {\r\n    }\r\n    InventoryProductModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: [\r\n                shared_module_1.SharedModule\r\n            ],\r\n            declarations: [\r\n                other_product_component_1.OtherProductComponent,\r\n                product_page_list_component_1.ProductPageListComponent,\r\n                promotions_component_1.PromotionsComponent,\r\n                product_details_component_1.ProductDetailsComponent\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], InventoryProductModule);\r\n    return InventoryProductModule;\r\n}());\r\nexports.InventoryProductModule = InventoryProductModule;\r\n\n\n/***/ }),\n\n/***/ 617:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(86);\r\nvar register_component_1 = __webpack_require__(407);\r\nvar SettingsModule = (function () {\r\n    function SettingsModule() {\r\n    }\r\n    SettingsModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: [\r\n                shared_module_1.SharedModule\r\n            ],\r\n            declarations: [\r\n                register_component_1.RegisterComponent\r\n            ]\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], SettingsModule);\r\n    return SettingsModule;\r\n}());\r\nexports.SettingsModule = SettingsModule;\r\n\n\n/***/ }),\n\n/***/ 618:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Breadcrumbs = (function () {\r\n    function Breadcrumbs() {\r\n    }\r\n    return Breadcrumbs;\r\n}());\r\nexports.Breadcrumbs = Breadcrumbs;\r\n\n\n/***/ }),\n\n/***/ 619:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar InfoRequest = (function () {\r\n    function InfoRequest() {\r\n    }\r\n    return InfoRequest;\r\n}());\r\nexports.InfoRequest = InfoRequest;\r\n\n\n/***/ }),\n\n/***/ 62:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar ClientAreaService = (function () {\r\n    function ClientAreaService(_api, _cache, languageService, currencyService, mappings, ShoppingCartService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.languageService = languageService;\r\n        this.currencyService = currencyService;\r\n        this.mappings = mappings;\r\n        this.ShoppingCartService = ShoppingCartService;\r\n    }\r\n    ClientAreaService.prototype.getDetailsClientArea = function (id) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Details.replace('{id}', id.toString()).replace('{lang}', lang).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.getUserAreaProfile = function (userId) {\r\n        var lang = this.languageService.getLongLang();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_User_Profile.replace('{userId}', userId).replace('{lang}', lang).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ClientAreaService.prototype.updateUserPassword = function (param) {\r\n        param.Language = this.languageService.getLongLang();\r\n        return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Password, param)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.updateUserProfile = function (collection) {\r\n        return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Profile, collection)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.addNewAddress = function (param) {\r\n        return this._api.post(this.mappings.Web_Api_Post_Client_Area_Add_New_Address, param)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.updateAddresses = function (addresses, userId, defaultAddress) {\r\n        var param = {\r\n            Addresses: addresses,\r\n            UserId: userId,\r\n            DefaultAddress: defaultAddress\r\n        };\r\n        return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Address, param)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.removeAddress = function (param) {\r\n        return this._api.post(this.mappings.Web_Api_Post_Client_Area_Remove_Address, param)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.getClientAreaOrderDetails = function (userId, orderId) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var lang = this.languageService.getLongLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Order_Details.replace('{userId}', userId).replace('{orderId}', orderId.toString()).replace('{lang}', lang).replace('{currency}', curr).replace(\"{cartid}\", cartId);\r\n        var key = url;\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.getClientAreaCatalogPrivate = function (userId) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var lang = this.languageService.getLongLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Catalog_Private\r\n            .replace('{userId}', userId)\r\n            .replace('{lang}', lang)\r\n            .replace('{currency}', curr)\r\n            .replace(\"{cartid}\", cartId);\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.getClientAreaOrdersList = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId.toString()).replace('{dateFrom}', dateFrom.toTimeString()).replace('{dateTo}', dateTo.toTimeString()).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{currency}', curr);\r\n        var key = url;\r\n        return this._api.get(url);\r\n    };\r\n    ClientAreaService.prototype.getClientAreaOrdersList1 = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Order_List\r\n            .replace('{userId}', userId).replace('{dateFrom}', dateFrom)\r\n            .replace('{dateTo}', dateTo).replace('{orderNumber}', orderNumber)\r\n            .replace('{orderStatus}', orderStatus).replace('{lang}', lang)\r\n            .replace('{currency}', curr).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.getClientAreaRiorderList = function (orderId) {\r\n        var curr = this.currencyService.getCurrency();\r\n        var lang = this.languageService.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Riorder_List\r\n            .replace('{orderid}', orderId)\r\n            .replace('{lang}', lang)\r\n            .replace('{currency}', curr);\r\n        var key = url;\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.CalculatePriceRiorder = function (lavorazioneQuery, prodId) {\r\n        // let parameter: Array<any> = [];\r\n        var lang = this.languageService.getLongLang();\r\n        var dictionary = {\r\n            \"lang\": lang,\r\n            \"query\": lavorazioneQuery,\r\n            \"wizardId\": prodId,\r\n        };\r\n        return this._api.post(this.mappings.Web_Api_Get_Client_Area_CalculatePrice_Riorder, dictionary)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    ClientAreaService.prototype.getClientAreaInvoicesList = function (userId, orderNumber, invoiceNumber, documentType) {\r\n        var curr = this.currencyService.getCurrency();\r\n        var lang = this.languageService.getLongLang();\r\n        var cartId = this.ShoppingCartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Invoices.replace('{userId}', userId).replace('{orderNumber}', orderNumber).replace('{invoiceNumber}', invoiceNumber).replace('{documentType}', documentType).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n        var key = url;\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    ClientAreaService.prototype.postClientAreaSendProcessOrderMessageint = function (userId, orderId, orderRowId, orderNumber, sendTo, messageObject, message, lang) {\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Order_Send_Message;\r\n        var params = {\r\n            UserId: userId,\r\n            OrderId: orderId,\r\n            OrderRowId: orderRowId,\r\n            OrderNumber: orderNumber,\r\n            SendTo: sendTo,\r\n            MessageObject: messageObject,\r\n            Message: message,\r\n            Lang: lang\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ClientAreaService.prototype.getProcessOrderFiles = function (processId, orderId) {\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Proccess_Order_File;\r\n        var params = {\r\n            ProcessId: processId,\r\n            OrderId: orderId\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ClientAreaService.prototype.cancelOrders = function (userId, orderId) {\r\n        var url = this.mappings.Web_Api_Post_Cancel_Order.replace('{userId}', userId).replace('{orderId}', orderId.toString());\r\n        return this._api.post(url);\r\n    };\r\n    ClientAreaService.prototype.updateBonificoPaymentDetails = function (orderId, numeroCro, numeroTrn) {\r\n        var url = this.mappings.Web_Api_Get_Client_Area_Update_Bonifico_Payment;\r\n        var params = {\r\n            IdOrder: orderId,\r\n            numeroCro: numeroCro,\r\n            numeroTrn: numeroTrn\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ClientAreaService.prototype.getBonificoUploadedFiles = function (orderId) {\r\n        var url = this.mappings.Web_Api_Post_Get_Bonifico_Uploaded_Files;\r\n        var params = {\r\n            OrderId: orderId\r\n        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ClientAreaService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object])\r\n    ], ClientAreaService);\r\n    return ClientAreaService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ClientAreaService = ClientAreaService;\r\n\n\n/***/ }),\n\n/***/ 620:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar QuotingConstants = (function () {\r\n    function QuotingConstants() {\r\n    }\r\n    ;\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO = \"calcolato\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA = \"calcolato_scontistica\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO = \"listino\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA = \"listino_scontistica\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO = \"calcolato_richiesta_preventivo\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO = \"calcolato_listino_standard\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA = \"calcolato_listino_scontistica\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI = \"calcolato_listino_fornitori\";\r\n    QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA = \"calcolato_listino_fornitori_scontistica\";\r\n    return QuotingConstants;\r\n}());\r\nexports.QuotingConstants = QuotingConstants;\r\n\n\n/***/ }),\n\n/***/ 621:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar SharedConstants = (function () {\r\n    function SharedConstants() {\r\n    }\r\n    SharedConstants.OTHER_PRODUCTS_TYPE = \"ALTRO_PRODOTTO\";\r\n    return SharedConstants;\r\n}());\r\nexports.SharedConstants = SharedConstants;\r\n\n\n/***/ }),\n\n/***/ 622:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar cookie_options_1 = __webpack_require__(420);\r\nvar CookieBrowserService = (function () {\r\n    function CookieBrowserService(document) {\r\n        this.document = document;\r\n    }\r\n    CookieBrowserService.prototype.setOptions = function (options) {\r\n        this.defaultOptions = new cookie_options_1.CookieOptions(options);\r\n    };\r\n    CookieBrowserService.prototype.get = function (key) {\r\n        return this.cookieReader()[key];\r\n    };\r\n    CookieBrowserService.prototype.getObject = function (key) {\r\n        var value = this.get(key);\r\n        return value ? JSON.parse(value) : value;\r\n    };\r\n    CookieBrowserService.prototype.getAll = function () {\r\n        return this.cookieReader();\r\n    };\r\n    CookieBrowserService.prototype.put = function (key, value, options) {\r\n        this.cookieWriter()(key, value, options);\r\n    };\r\n    CookieBrowserService.prototype.putObject = function (key, value, options) {\r\n        this.put(key, JSON.stringify(value), options);\r\n    };\r\n    CookieBrowserService.prototype.remove = function (key, options) {\r\n        this.cookieWriter()(key, undefined, options);\r\n    };\r\n    CookieBrowserService.prototype.removeAll = function () {\r\n        var _this = this;\r\n        var cookies = this.getAll();\r\n        Object.keys(cookies).forEach(function (key) {\r\n            _this.remove(key);\r\n        });\r\n    };\r\n    CookieBrowserService.prototype.cookieReader = function () {\r\n        var rawDocument = this.document;\r\n        var lastCookies = {};\r\n        var lastCookieString = '';\r\n        var that = this;\r\n        var cookieArray, cookie, i, index, name;\r\n        var currentCookieString = rawDocument.cookie || '';\r\n        if (currentCookieString !== lastCookieString) {\r\n            lastCookieString = currentCookieString;\r\n            cookieArray = lastCookieString.split('; ');\r\n            lastCookies = {};\r\n            for (i = 0; i < cookieArray.length; i++) {\r\n                cookie = cookieArray[i];\r\n                index = cookie.indexOf('=');\r\n                if (index > 0) {\r\n                    name = that.safeDecodeURIComponent(cookie.substring(0, index));\r\n                    if (this.isBlank(lastCookies[name])) {\r\n                        lastCookies[name] = that.safeDecodeURIComponent(cookie.substring(index + 1));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return lastCookies;\r\n    };\r\n    CookieBrowserService.prototype.cookieWriter = function () {\r\n        var that = this;\r\n        var rawDocument = this.document;\r\n        return function (name, value, options) {\r\n            rawDocument.cookie = that.buildCookieString(name, value, options);\r\n        };\r\n    };\r\n    CookieBrowserService.prototype.safeDecodeURIComponent = function (str) {\r\n        try {\r\n            return decodeURIComponent(str);\r\n        }\r\n        catch (e) {\r\n            return str;\r\n        }\r\n    };\r\n    CookieBrowserService.prototype.buildCookieString = function (name, value, options) {\r\n        var cookiePath = '/';\r\n        var path, expires;\r\n        var defaultOpts = this.defaultOptions || new cookie_options_1.CookieOptions({ path: cookiePath });\r\n        var opts = this.mergeOptions(defaultOpts, options);\r\n        expires = opts.expires;\r\n        if (this.isBlank(value)) {\r\n            expires = 'Thu, 01 Jan 1970 00:00:00 GMT';\r\n            value = '';\r\n        }\r\n        if (this.isString(expires)) {\r\n            expires = new Date(expires);\r\n        }\r\n        var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);\r\n        str += opts.path ? ';path=' + opts.path : '';\r\n        str += opts.domain ? ';domain=' + opts.domain : '';\r\n        str += expires ? ';expires=' + expires.toUTCString() : '';\r\n        str += opts.secure ? ';secure' : '';\r\n        var cookieLength = str.length + 1;\r\n        if (cookieLength > 4096) {\r\n            console.log(\"Cookie '\" + name + \"' possibly not set or overflowed because it was too \\n      large (\" + cookieLength + \" > 4096 bytes)!\");\r\n        }\r\n        return str;\r\n    };\r\n    CookieBrowserService.prototype.mergeOptions = function (defaultOpts, providedOpts) {\r\n        var newOpts = defaultOpts;\r\n        if (this.isPresent(providedOpts)) {\r\n            return newOpts.merge(new cookie_options_1.CookieOptions(providedOpts));\r\n        }\r\n        return newOpts;\r\n    };\r\n    CookieBrowserService.prototype.isBlank = function (obj) {\r\n        return obj === undefined || obj === null;\r\n    };\r\n    CookieBrowserService.prototype.isPresent = function (obj) {\r\n        return obj !== undefined && obj !== null;\r\n    };\r\n    CookieBrowserService.prototype.isString = function (obj) {\r\n        return typeof obj === 'string';\r\n    };\r\n    CookieBrowserService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [Object])\r\n    ], CookieBrowserService);\r\n    return CookieBrowserService;\r\n}());\r\nexports.CookieBrowserService = CookieBrowserService;\r\n\n\n/***/ }),\n\n/***/ 623:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CookieNodeService = (function () {\r\n    function CookieNodeService(req, res) {\r\n        this.req = req;\r\n        this.res = res;\r\n    }\r\n    Object.defineProperty(CookieNodeService.prototype, \"cookies\", {\r\n        get: function () {\r\n            return this.req.cookies;\r\n        },\r\n        enumerable: true,\r\n        configurable: true\r\n    });\r\n    CookieNodeService.prototype.setOptions = function (options) {\r\n        this.defaultOptions = Object.assign(options);\r\n    };\r\n    CookieNodeService.prototype.get = function (key) {\r\n        return this.cookies[key];\r\n    };\r\n    CookieNodeService.prototype.getObject = function (key) {\r\n        var value = this.get(key);\r\n        var obj = value ? JSON.parse(value) : value;\r\n        return obj;\r\n    };\r\n    CookieNodeService.prototype.getAll = function () {\r\n        return this.cookies;\r\n    };\r\n    CookieNodeService.prototype.put = function (key, value, options) {\r\n        options = this.generateOptions();\r\n        this.res.cookie(key, value, options);\r\n    };\r\n    CookieNodeService.prototype.putObject = function (key, value, options) {\r\n        this.put(key, JSON.stringify(value), options);\r\n    };\r\n    CookieNodeService.prototype.remove = function (key, options) {\r\n        options = this.generateOptions();\r\n        this.res.clearCookie(key, options);\r\n    };\r\n    CookieNodeService.prototype.removeAll = function () {\r\n        this.res.clearCookie();\r\n    };\r\n    CookieNodeService.prototype.generateOptions = function (options) {\r\n        return Object.assign({}, options, { path: '/' }, this.defaultOptions);\r\n    };\r\n    CookieNodeService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject('req')),\r\n        __param(1, core_1.Inject('res')), \r\n        __metadata('design:paramtypes', [Object, Object])\r\n    ], CookieNodeService);\r\n    return CookieNodeService;\r\n}());\r\nexports.CookieNodeService = CookieNodeService;\r\n\n\n/***/ }),\n\n/***/ 624:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 625:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(95);\r\nvar DefaultRequestOptions = (function (_super) {\r\n    __extends(DefaultRequestOptions, _super);\r\n    function DefaultRequestOptions() {\r\n        _super.apply(this, arguments);\r\n        this.headers = new http_1.Headers({\r\n            'Content-Type': 'application/json; charset=utf-8'\r\n        });\r\n    }\r\n    DefaultRequestOptions = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], DefaultRequestOptions);\r\n    return DefaultRequestOptions;\r\n}(http_1.BaseRequestOptions));\r\nexports.DefaultRequestOptions = DefaultRequestOptions;\r\n\n\n/***/ }),\n\n/***/ 626:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar LoadingOverlayService = (function () {\r\n    function LoadingOverlayService(isBrowser) {\r\n        this.isBrowser = isBrowser;\r\n    }\r\n    LoadingOverlayService.prototype.showPageLoadingOverlay = function () {\r\n        if (this.isBrowser) {\r\n            jQuery('body').addClass('loading-overlay-showing');\r\n        }\r\n    };\r\n    LoadingOverlayService.prototype.hidePageLoadingOverlay = function () {\r\n        if (this.isBrowser) {\r\n            jQuery('body').removeClass('loading-overlay-showing');\r\n        }\r\n    };\r\n    LoadingOverlayService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject('isBrowser')), \r\n        __metadata('design:paramtypes', [Boolean])\r\n    ], LoadingOverlayService);\r\n    return LoadingOverlayService;\r\n}());\r\nexports.LoadingOverlayService = LoadingOverlayService;\r\n\n\n/***/ }),\n\n/***/ 627:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar user_login_1 = __webpack_require__(73);\r\nvar LocalStorageService = (function () {\r\n    function LocalStorageService() {\r\n    }\r\n    LocalStorageService.prototype.Write = function (key, value) {\r\n        if (value) {\r\n            value = JSON.stringify(value);\r\n        }\r\n        localStorage.setItem(key, value);\r\n    };\r\n    LocalStorageService.prototype.Read = function (key) {\r\n        var value = localStorage.getItem(key);\r\n        if (value && value != \"undefined\" && value != \"null\") {\r\n            var userLoginParsed = Helper.toInstance(new user_login_1.UserLogin(), JSON.parse(value));\r\n            return userLoginParsed;\r\n        }\r\n        return null;\r\n    };\r\n    LocalStorageService.prototype.Remove = function (key) {\r\n        localStorage.removeItem(key);\r\n    };\r\n    LocalStorageService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [])\r\n    ], LocalStorageService);\r\n    return LocalStorageService;\r\n}());\r\nexports.LocalStorageService = LocalStorageService;\r\nvar Helper = (function () {\r\n    function Helper() {\r\n    }\r\n    Helper.toInstance = function (obj, json) {\r\n        var jsonObj = JSON.parse(json);\r\n        if (typeof obj[\"fromJSON\"] === \"function\") {\r\n            obj[\"fromJSON\"](jsonObj);\r\n        }\r\n        else {\r\n            for (var propName in jsonObj) {\r\n                obj[propName] = jsonObj[propName];\r\n            }\r\n        }\r\n        return obj;\r\n    };\r\n    return Helper;\r\n}());\r\n\n\n/***/ }),\n\n/***/ 628:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(12);\r\nvar common_1 = __webpack_require__(44);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cookie_1 = __webpack_require__(85);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar RoutesBrowserService = (function (_super) {\r\n    __extends(RoutesBrowserService, _super);\r\n    function RoutesBrowserService(router, translate, cookie, location, cache) {\r\n        _super.call(this, router, translate, cookie, location, true, cache);\r\n        this.router = router;\r\n        this.translate = translate;\r\n        this.cookie = cookie;\r\n        this.location = location;\r\n        this.cache = cache;\r\n        this.browserLangs = RoutesBrowserService.getBrowserLangs();\r\n    }\r\n    RoutesBrowserService.prototype.loadRoutes = function () {\r\n        var lang = this.getLang();\r\n        var requestUrl = \"/assets/i18n-routes/\" + lang + \".json\";\r\n        var rawRoutes = this.cache.get(requestUrl);\r\n        var routes = this.getRoutesWithComponents(rawRoutes);\r\n        this.router.resetConfig(routes);\r\n        this.cache.set(requestUrl, rawRoutes);\r\n        this.cookie.put(routes_service_1.RoutesService.COOKIE_LANG_KEY, lang);\r\n    };\r\n    RoutesBrowserService.getBrowserLangs = function () {\r\n        var browserLangs = window.navigator['languages'] || null;\r\n        browserLangs = browserLangs ||\r\n            (window.navigator.language && [window.navigator.language]) ||\r\n            (window.navigator['browserLanguage'] && [window.navigator['browserLanguage']]) ||\r\n            (window.navigator['userLanguage'] && [window.navigator['userLanguage']]);\r\n        return browserLangs.map(function (lang) {\r\n            if (lang.indexOf('-') !== -1) {\r\n                return lang.split('-')[0];\r\n            }\r\n            if (lang.indexOf('_') !== -1) {\r\n                return lang.split('_')[0];\r\n            }\r\n            return lang;\r\n        });\r\n    };\r\n    RoutesBrowserService.prototype.getRoutes = function () {\r\n        var lang = this.getLang();\r\n        var requestUrl = \"/assets/i18n-routes/\" + lang + \".json\";\r\n        var rawRoutes = this.cache.get(requestUrl);\r\n        return rawRoutes;\r\n    };\r\n    RoutesBrowserService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(2, core_1.Inject('CookieService')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof common_1.Location !== 'undefined' && common_1.Location) === 'function' && _d) || Object, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object])\r\n    ], RoutesBrowserService);\r\n    return RoutesBrowserService;\r\n    var _a, _b, _c, _d, _e;\r\n}(routes_service_1.RoutesService));\r\nexports.RoutesBrowserService = RoutesBrowserService;\r\n\n\n/***/ }),\n\n/***/ 629:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nfunction __export(m) {\r\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n__export(__webpack_require__(630));\r\n\n\n/***/ }),\n\n/***/ 630:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n__webpack_require__(436);\r\nvar TranslateStaticLoader = (function () {\r\n    function TranslateStaticLoader(http, application) {\r\n        this.http = http;\r\n        this.application = application;\r\n    }\r\n    TranslateStaticLoader.prototype.getTranslation = function (lang) {\r\n        var _this = this;\r\n        if (!this.observable$) {\r\n            var appConfig = this.application.getConfig();\r\n            var templateName = appConfig.template;\r\n            this.observable$ = this.http\r\n                .get(\"/template/b2c/\" + templateName + \"/translations/\" + lang + \".json\")\r\n                .finally(function () { return _this.observable$ = null; });\r\n        }\r\n        return this.observable$;\r\n    };\r\n    return TranslateStaticLoader;\r\n}());\r\nexports.TranslateStaticLoader = TranslateStaticLoader;\r\n\n\n/***/ }),\n\n/***/ 631:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar Observable_1 = __webpack_require__(1);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nfunction hashCodeString(str) {\r\n    var hash = 0;\r\n    if (str.length === 0) {\r\n        return hash + '';\r\n    }\r\n    for (var i = 0; i < str.length; i++) {\r\n        var char = str.charCodeAt(i);\r\n        hash = ((hash << 5) - hash) + char;\r\n        hash = hash & hash; // Convert to 32bit integer\r\n    }\r\n    return hash + '';\r\n}\r\nexports.hashCodeString = hashCodeString;\r\n// domain/feature service\r\nvar ModelService = (function () {\r\n    // This is only one example of one Model depending on your domain\r\n    function ModelService(_api, _cache) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n    }\r\n    /**\r\n     * whatever domain/feature method name\r\n     */\r\n    ModelService.prototype.get = function (url) {\r\n        var _this = this;\r\n        // you want to return the cache if there is a response in it.\r\n        // This would cache the first response so if your API isn't idempotent\r\n        // you probably want to remove the item from the cache after you use it. LRU of 10\r\n        // you can use also hashCodeString here\r\n        var key = url;\r\n        if (this._cache.has(key)) {\r\n            return Observable_1.Observable.of(this._cache.get(key));\r\n        }\r\n        // you probably shouldn't .share() and you should write the correct logic\r\n        return this._api.get(url)\r\n            .do(function (json) {\r\n            _this._cache.set(key, json);\r\n        })\r\n            .share();\r\n    };\r\n    // don't cache here since we're creating\r\n    ModelService.prototype.create = function () {\r\n        // TODO\r\n    };\r\n    ModelService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object])\r\n    ], ModelService);\r\n    return ModelService;\r\n    var _a, _b;\r\n}());\r\nexports.ModelService = ModelService;\r\n\n\n/***/ }),\n\n/***/ 640:\n/***/ (function(module, exports) {\n\nmodule.exports = \"<div *ngIf=\\\"routesService.visiblePageLoader\\\" class=\\\"bounce-loader\\\" id=\\\"loading-dots\\\">\\r\\n    <div class=\\\"bounce1\\\"></div>\\r\\n    <div class=\\\"bounce2\\\"></div>\\r\\n    <div class=\\\"bounce3\\\"></div>\\r\\n</div>\\r\\n<router-outlet></router-outlet>\\r\\n<div (window:beforeunload)=\\\"clearMemory()\\\"></div>\"\n\n/***/ }),\n\n/***/ 72:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar quoting_model_1 = __webpack_require__(56);\r\nvar ExcludingComponent = (function () {\r\n    function ExcludingComponent() {\r\n        this.components = new quoting_model_1.LavorazioniComponents();\r\n    }\r\n    ExcludingComponent.prototype.getMacrocategory = function () {\r\n        return this.Macrocategory;\r\n    };\r\n    ExcludingComponent.prototype.setMacrocategory = function (macrocategory) {\r\n        this.Macrocategory = macrocategory;\r\n    };\r\n    ExcludingComponent.prototype.getModelItemName = function (sezione) {\r\n        switch (sezione) {\r\n            case \"formato\":\r\n                {\r\n                    return \"formato\";\r\n                }\r\n            case \"copertina\":\r\n                {\r\n                    return \"\";\r\n                }\r\n            case \"fustellatura\":\r\n                {\r\n                    return \"\";\r\n                }\r\n            case \"plastificazione\":\r\n                {\r\n                    return \"plastificazioni1\";\r\n                }\r\n            case \"plastificazione_copertina\":\r\n                {\r\n                    return \"plastificazioni2\";\r\n                }\r\n            case \"rilegatura\":\r\n                {\r\n                    return \"rilegature\";\r\n                }\r\n            case \"taglio\":\r\n                {\r\n                    return \"tagli\";\r\n                }\r\n            default:\r\n                {\r\n                    return \"\";\r\n                }\r\n        }\r\n    };\r\n    //remove all excluding rules from model\r\n    ExcludingComponent.prototype.removeSelectRules = function (model) {\r\n        for (var key in model) {\r\n            if (model[key] != null) {\r\n                if (this.getLowerCase(key) == \"lavorazioniaccessorie\") {\r\n                    for (var lavorazioneKey in model[key]) {\r\n                        model[key][lavorazioneKey].isVisible = true;\r\n                        for (var subKey in model[key][lavorazioneKey].valori) {\r\n                            try {\r\n                                model[key][lavorazioneKey].valori[subKey].isVisible = true;\r\n                            }\r\n                            catch (Exception) { }\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    for (var subKey in model[key]) {\r\n                        try {\r\n                            if (Array.isArray(model[key])) {\r\n                                model[key][subKey].isVisible = true;\r\n                            }\r\n                            model.tipoTaglio = true;\r\n                        }\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return model;\r\n    };\r\n    // remove excluding rules from one component\r\n    // if is lavorazione we need to remove rull from model.lavorazione not from model\r\n    ExcludingComponent.prototype.removeRuleFromComponent = function (model, component, lavorazione) {\r\n        if (lavorazione === void 0) { lavorazione = false; }\r\n        if (model != null && model != undefined) {\r\n            if (!lavorazione) {\r\n                for (var key in model[component]) {\r\n                    try {\r\n                        model[component][key].isVisible = true;\r\n                    }\r\n                    catch (Exception) { }\r\n                }\r\n            }\r\n            else {\r\n                for (var subKey in model.lavorazioniAccessorie) {\r\n                    for (var valoriSubKey in model.lavorazioniAccessorie[subKey].valori) {\r\n                        try {\r\n                            model.lavorazioniAccessorie[subKey].valori[valoriSubKey].isVisible = true;\r\n                        }\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return model;\r\n    };\r\n    // remove excluding rules list\r\n    ExcludingComponent.prototype.removeSelectRuleFromList = function (model, regoles) {\r\n        for (var regoleKey in regoles) {\r\n            switch (this.getLowerCase(regoles[regoleKey].Categoria_2)) {\r\n                case \"accessoria\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Id_Elemento_2));\r\n                        model = this.removeRuleFromComponent(model, component, true);\r\n                        break;\r\n                    }\r\n                case \"finitura\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Sezione_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n                case \"carte\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n                case \"carte_copertina\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n                default: { }\r\n            }\r\n        }\r\n        return model;\r\n    };\r\n    // return  rules list for certain category\r\n    ExcludingComponent.prototype.filter = function (list, field, value) {\r\n        var returnList = new Array();\r\n        for (var key in list) {\r\n            var text = \"\";\r\n            try {\r\n                text = this.getLowerCase(list[key][field]);\r\n            }\r\n            catch (exception) { }\r\n            if (text == this.getLowerCase(value)) {\r\n                returnList.push(list[key]);\r\n            }\r\n        }\r\n        return returnList;\r\n    };\r\n    // return excluding rules for custom categoria and sezione\r\n    ExcludingComponent.prototype.getRegole = function (regolesList, categoria, sezione) {\r\n        var allRegoles = regolesList;\r\n        var regoles = null;\r\n        if (allRegoles != null && allRegoles != undefined && allRegoles.length > 0) {\r\n            var categoryRegoles = this.filter(allRegoles, \"Categoria_1\", categoria); //get regoles for certain cattegory\r\n            if (categoryRegoles != null && categoryRegoles != undefined && categoryRegoles.length > 0) {\r\n                var regoles = null;\r\n                //get regoles for certain cattegory\r\n                switch (this.getLowerCase(categoria)) {\r\n                    case \"finiture\":\r\n                        {\r\n                            regoles = this.filter(categoryRegoles, \"Sezione_1\", sezione);\r\n                            for (var regolesKey in regoles) {\r\n                                var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2)); //return name for current rules \r\n                            }\r\n                            break;\r\n                        }\r\n                    case \"accessoria\":\r\n                        {\r\n                            regoles = this.filter(categoryRegoles, \"Id_Elemento_1\", sezione);\r\n                            for (var regolesKey in regoles) {\r\n                                var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2));\r\n                            }\r\n                            break;\r\n                        }\r\n                    default:\r\n                        {\r\n                            regoles = categoryRegoles;\r\n                        }\r\n                }\r\n                if (sezione == \"\") {\r\n                    regoles = categoryRegoles;\r\n                }\r\n                else { }\r\n            }\r\n        }\r\n        return regoles;\r\n    };\r\n    ExcludingComponent.prototype.getLavorazioneValue = function (lavorazione, tipo, id) {\r\n        try {\r\n            var tipoNum = parseInt(tipo);\r\n            switch (tipoNum) {\r\n                case this.components.checkBox:\r\n                    {\r\n                        if (lavorazione.value == null || lavorazione.value == undefined) {\r\n                            switch (lavorazione.tipoSelezione) {\r\n                                case \"non_selezionato\":\r\n                                    {\r\n                                        lavorazione.value = false;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                                case \"selezionato\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                                case \"fisso\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                                case \"nascosto\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                                default:\r\n                                    {\r\n                                        lavorazione.value = false;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                            }\r\n                        }\r\n                        else {\r\n                            return !lavorazione.value;\r\n                        }\r\n                    }\r\n                    ;\r\n                case this.components.selectBox:\r\n                    { }\r\n                    ;\r\n                case this.components.inputBox:\r\n                    { }\r\n                default:\r\n                    {\r\n                        return null;\r\n                    }\r\n            }\r\n        }\r\n        catch (exception) { }\r\n    };\r\n    // hidding field for finiture category\r\n    //regole - because we need element to hide.\r\n    ExcludingComponent.prototype.hideFinituraValue = function (model, component, regole, macro) {\r\n        switch (this.getLowerCase(macro)) {\r\n            case \"editoria\":\r\n                {\r\n                    for (var key in model[component]) {\r\n                        if (model[component][key].chiave == regole.Id_Elemento_2) {\r\n                            model[component][key].isVisible = false;\r\n                        }\r\n                    }\r\n                    if (component == \"taglio\") {\r\n                        model[component] = false;\r\n                        model.tipoTaglio = false;\r\n                    }\r\n                }\r\n        }\r\n        return model;\r\n    };\r\n    //not finished, method that hode lavorazine\r\n    ExcludingComponent.prototype.hideLavorazioneValue = function (model, component, regole, macro) {\r\n        switch (this.getLowerCase(macro)) {\r\n            case \"editoria\":\r\n                {\r\n                    for (var key in model.lavorazioniAccessorie) {\r\n                        try {\r\n                            if (model.lavorazioniAccessorie[key] != null) {\r\n                                if (model.lavorazioniAccessorie[key].id == component) {\r\n                                    if (parseInt(model.lavorazioniAccessorie[key].tipo) == this.components.selectBox) {\r\n                                        for (var subKey in model.lavorazioniAccessorie[key].valori) {\r\n                                            if (model.lavorazioniAccessorie[key].valori[subKey].chiave == regole.Id_Elemento_Sottochiave_2) {\r\n                                                model.lavorazioniAccessorie[key].valori[subKey].isVisible = false;\r\n                                                model.lavorazioniAccessorie[key].valori[subKey].chiave = 0;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                    else if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox) {\r\n                                        model.lavorazioniAccessorie[key].value = false;\r\n                                        model.lavorazioniAccessorie[key].isVisible = false;\r\n                                    }\r\n                                    else if (model.lavorazioniAccessorie[key].tipo == this.components.inputBox) {\r\n                                        model.lavorazioniAccessorie[key].value = \"\";\r\n                                        model.lavorazioniAccessorie[key].isVisible = false;\r\n                                        ;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n        }\r\n        return model;\r\n    };\r\n    /// hidding option from regole id_element2\r\n    ExcludingComponent.prototype.hideSelectValue = function (model, regole, macro, elemento) {\r\n        switch (this.getLowerCase(regole.Categoria_2)) {\r\n            case \"carta\":\r\n            case \"carta copertina\": { }\r\n            case \"finitura\":\r\n                {\r\n                    var sezioneInput = this.getModelItemName(this.getLowerCase(regole.Sezione_2));\r\n                    model = this.hideFinituraValue(model, sezioneInput, regole, macro);\r\n                }\r\n            case \"accessoria\":\r\n                {\r\n                    if (this.getLowerCase(regole.Categoria_1) == \"accessoria\") {\r\n                        for (var key in model.lavorazioniAccessorie) {\r\n                            if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox && model.lavorazioniAccessorie[key].id == regole.Id_Elemento_1) {\r\n                                if ((model.lavorazioniAccessorie[key].value == false && regole.Id_Elemento_Sottochiave_1 == 2) || (model.lavorazioniAccessorie[key].value == true && regole.Id_Elemento_Sottochiave_1 == 1) || regole.Id_Elemento_Sottochiave_1 == 0) {\r\n                                    model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n                                }\r\n                            }\r\n                            else if (model.lavorazioniAccessorie[key].tipo != this.components.checkBox) { }\r\n                        }\r\n                    }\r\n                    else {\r\n                        model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n                    }\r\n                }\r\n            case \"busta\": { }\r\n            default: { }\r\n        }\r\n        return model;\r\n    };\r\n    //method to get lower case in implement method we get error for null etc\r\n    ExcludingComponent.prototype.getLowerCase = function (inputString) {\r\n        var outString = \"\";\r\n        try {\r\n            outString = inputString.toLowerCase();\r\n        }\r\n        catch (Exception) {\r\n            outString = inputString;\r\n        }\r\n        return outString;\r\n    };\r\n    //     Get excluding rules for certain component, and from category_1 choise witch\r\n    ExcludingComponent.prototype.setSelectRules = function (model, rulesList, categoria, sezione, elemento, sotoelemento, macro) {\r\n        var regoleList = this.getRegole(rulesList, categoria, sezione);\r\n        if (regoleList) {\r\n            var regole = null;\r\n            if (this.getLowerCase(categoria) == \"accessoria\") {\r\n                if (elemento == true) {\r\n                    elemento = 1;\r\n                }\r\n                else {\r\n                    elemento = 0;\r\n                }\r\n                regole = regoleList;\r\n                if (!regole) {\r\n                    regole = this.filter(regoleList, \"Id_Elemento_Sottochiave_1\", \"\");\r\n                }\r\n            }\r\n            else {\r\n                regole = this.filter(regoleList, \"Id_Elemento_1\", elemento);\r\n                if (!regole) {\r\n                    regole = this.filter(regoleList, \"Id_Elemento_1\", \"\");\r\n                }\r\n            }\r\n            if (regole) {\r\n                for (var regoleKey in regole) {\r\n                    model = this.hideSelectValue(model, regole[regoleKey], macro, elemento);\r\n                }\r\n            }\r\n            else { }\r\n        }\r\n        else { }\r\n        return model;\r\n    };\r\n    /// <param name=\"tipo\">\"PF\" </param>\r\n    /// <param name=\"categoria\">\"FINITURA\"</param>\r\n    /// <param name=\"sezione\">\"FORMATO\"</param>\r\n    /// <param name=\"macroCategoria\">\"EDITORIA\"</param>\r\n    /// <param name=\"elemento\">null </param>\r\n    /// <param name=\"sottoElemento\">null</param>\r\n    ExcludingComponent.prototype.ResetRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct) {\r\n        if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n        var regoleToReset = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n        var flagReset;\r\n        for (var _i = 0, regoleToReset_1 = regoleToReset; _i < regoleToReset_1.length; _i++) {\r\n            var regola = regoleToReset_1[_i];\r\n            if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n                flagReset = true;\r\n                this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.ApplicaRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct) {\r\n        if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n        //console.log(\"ApplicaRegole\");\r\n        var regoleToApply = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n        var flagReset;\r\n        for (var _i = 0, regoleToApply_1 = regoleToApply; _i < regoleToApply_1.length; _i++) {\r\n            var regola = regoleToApply_1[_i];\r\n            //console.log(regola)\r\n            if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n                flagReset = false;\r\n                this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.ApplicaRegola = function (regola, flagReset, responseModel, responseModelOtherProduct) {\r\n        if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n        var hideOrShow;\r\n        if (flagReset == false) {\r\n            hideOrShow = \"hide\";\r\n        }\r\n        else {\r\n            hideOrShow = \"show\";\r\n        }\r\n        if (regola.Tipo_Regola == \"ESCLUDE\") {\r\n            if (regola.Categoria_2 == \"CARTA\") {\r\n                //In questo caso è stata esclusa una carta e/o grammatura\r\n                var idElemento = regola.Id_Elemento_2;\r\n                var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n                //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n                //altrimenti una singola grammatura (solo per la relativa carta)\r\n                if (idSottoElemento == null || idSottoElemento == 0) {\r\n                    var attributo = regola.Categoria_2;\r\n                    this.hideOrShowComboItem(\"CARTA\", idElemento, hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    if (responseModel.idCarte1 != null) {\r\n                        var data = responseModel.idCarte1.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n                        if (idCarta == idElemento) {\r\n                            this.hideOrShowComboItem(\"GRAMMATURA_CARTA\", idSottoElemento, hideOrShow, responseModel);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else if (regola.Categoria_2 == \"CARTA_COPERTINA\") {\r\n                //In questo caso è stata esclusa una carta e/o grammatura\r\n                var idElemento = regola.Id_Elemento_2;\r\n                var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n                //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n                //altrimenti una singola grammatura (solo per la relativa carta)\r\n                if (idSottoElemento == null || idSottoElemento == 0) {\r\n                    var attributo = regola.Categoria_2;\r\n                    this.hideOrShowComboItem(\"CARTA_COPERTINA\", idElemento, hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    if (responseModel.idCarte2 != null) {\r\n                        var data = responseModel.idCarte2.split(\"_\");\r\n                        var idCarta = data[0];\r\n                        //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n                        if (idCarta == idElemento) {\r\n                            this.hideOrShowComboItem(\"GRAMMATURA_CARTA_COPERTINA\", idSottoElemento, hideOrShow, responseModel);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else if (regola.Categoria_2 == \"FINITURA\") {\r\n                var sezione = regola.Sezione_2;\r\n                var idElemento_1 = regola.Id_Elemento_2;\r\n                if (sezione == \"TAGLIO\") {\r\n                    this.hideOrShowAttribute(\"TAGLIO\", hideOrShow, responseModel);\r\n                }\r\n                else if (sezione == \"STAMPA_BIFACCIALE\") {\r\n                    this.hideOrShowComboItem(sezione, idElemento_1, hideOrShow, responseModel);\r\n                }\r\n                else if (sezione == \"BIANCO_COPRENTE\") {\r\n                    if (idElemento_1 == \"1\") {\r\n                        this.hideOrShowComboItem(sezione, \"0\", hideOrShow, responseModel);\r\n                    }\r\n                    else if (idElemento_1 == \"2\") {\r\n                        this.hideOrShowComboItem(sezione, \"1\", hideOrShow, responseModel);\r\n                    }\r\n                    else if (idElemento_1 == \"3\") {\r\n                        this.hideOrShowComboItem(sezione, \"2\", hideOrShow, responseModel);\r\n                    }\r\n                }\r\n                else {\r\n                    this.hideOrShowComboItem(sezione, idElemento_1, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (regola.Categoria_2 == \"SUPPORTO_RIGIDO\") {\r\n                //In questo caso è stato escluso un supporto rigido\r\n                var idElemento = regola.Id_Elemento_2;\r\n                this.hideOrShowComboItem(\"SUPPORTO_RIGIDO\", idElemento, hideOrShow, responseModel);\r\n            }\r\n            else if (regola.Categoria_2 == \"MATERIALE_FLESSIBILE\") {\r\n                //In questo caso è stato escluso un supporto rigido\r\n                var idElemento = regola.Id_Elemento_2;\r\n                this.hideOrShowComboItem(\"MATERIALE_FLESSIBILE\", idElemento, hideOrShow, responseModel);\r\n            }\r\n            else if (regola.Categoria_2 == \"ACCESSORIA\") {\r\n                var idLavorazione = regola.Id_Elemento_2;\r\n                var idVariante = regola.Id_Elemento_Sottochiave_2;\r\n                this.hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.hideOrShowAttribute = function (attributo, hideOrShow, responseModel) {\r\n        if (attributo == \"TAGLIO\") {\r\n            if (hideOrShow == \"hide\") {\r\n                responseModel.isTaglioVisible = true;\r\n            }\r\n            else if (hideOrShow == \"show\") {\r\n                responseModel.isTaglioVisible = false;\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.hideOrShowComboItem = function (attributo, id, hideOrShow, responseModel) {\r\n        //console.log(\"hideOrShowComboItem\")\r\n        //console.log(this.Macrocategory)\r\n        //console.log(id)\r\n        //console.log(hideOrShow)\r\n        //console.log(attributo)\r\n        //console.log(\"finehideOrShowComboItem\")\r\n        if (this.Macrocategory == \"EDITORIA\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"CARTA_COPERTINA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte2, \"CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature2, \"GRAMMATURA_CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"COPERTINA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.copertine, \"COPERTINA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.copertine, \"COPERTINA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"RILEGATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.rilegature, \"RILEGATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.rilegature, \"RILEGATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"COMMERCIALE\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PIEGATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.piegature, \"PIEGATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.piegature, \"PIEGATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"ETICHETTE\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"FUSTELLATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"ADESIVI\" || this.Macrocategory == \"MANIFESTI\" || this.Macrocategory == \"PANNELLI\" || this.Macrocategory == \"STAMPA_DIRETTA\") {\r\n            if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"SUPPORTO_RIGIDO\") {\r\n                this.hideOrShowRadComboItem(responseModel.supportiRigidi, \"SUPPORTO_RIGIDO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n                this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"BIANCO_COPRENTE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutto il bianco coprente\r\n                this.hideOrShowRadComboItem(responseModel.biancoCoprente, \"BIANCO_COPRENTE\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"STAMPA_BIFACCIALE\") {\r\n                if (hideOrShow == \"hide\") {\r\n                    if (id == \"1\") {\r\n                        responseModel.isStampaBifaccialeNoHide = true;\r\n                        responseModel.tipoBifacciale = \"1\";\r\n                    }\r\n                    else {\r\n                        responseModel.isStampaBifaccialeSiHide = true;\r\n                        responseModel.tipoBifacciale = \"0\";\r\n                    }\r\n                }\r\n                else {\r\n                    responseModel.isStampaBifaccialeNoHide = false;\r\n                    responseModel.isStampaBifaccialeSiHide = false;\r\n                }\r\n            }\r\n            else if (attributo == \"FUSTELLATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"BANDIERE\" || this.Macrocategory == \"BANNER\") {\r\n            if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"OCCHIELLATURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.occhielli, \"OCCHIELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.occhielli, \"OCCHIELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"ASOLA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.asole, \"ASOLA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.asole, \"ASOLA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"CUCITURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.cuciture, \"CUCITURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.cuciture, \"CUCITURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"ELETTROSALDATURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.elettrosaldature, \"ELETTROSALDATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.elettrosaldature, \"ELETTROSALDATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n                this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.hideOrShowAllRadComboItems = function (parameterList, tipo, hideOrShow, responseModel) {\r\n        var emptyValue;\r\n        if (tipo == \"COPERTINA\") {\r\n            emptyValue = \"0\";\r\n        }\r\n        else {\r\n            emptyValue = \"-1\";\r\n        }\r\n        var selected = false;\r\n        for (var _i = 0, parameterList_1 = parameterList; _i < parameterList_1.length; _i++) {\r\n            var parameter = parameterList_1[_i];\r\n            if (hideOrShow == \"show\") {\r\n                parameter.isVisible = true;\r\n                if (selected == false) {\r\n                    if (tipo == \"RILEGATURA\") {\r\n                        if (responseModel.idRilegature == \"-1\") {\r\n                            responseModel.idRilegature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PIEGATURA\") {\r\n                        if (responseModel.idPiegature == \"-1\") {\r\n                            responseModel.idPiegature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"OCCHIELLATURA\") {\r\n                        if (responseModel.idOcchielli == \"-1\") {\r\n                            responseModel.idOcchielli = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"CUCITURA\") {\r\n                        if (responseModel.idCuciture == \"-1\") {\r\n                            responseModel.idCuciture = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"ELETTROSALDATURA\") {\r\n                        if (responseModel.idElettrosaldature == \"-1\") {\r\n                            responseModel.idElettrosaldature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"ASOLA\") {\r\n                        if (responseModel.idAsole == \"-1\") {\r\n                            responseModel.idAsole = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"FUSTELLATURA\") {\r\n                        if (responseModel.idTagli == \"-1\") {\r\n                            responseModel.idTagli = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PLASTIFICAZIONE\") {\r\n                        if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                            responseModel.idPlastificazioni1 = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                        if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                            responseModel.idPlastificazioni2 = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"COPERTINA\") {\r\n                        if (responseModel.idCopertine == \"-1\") {\r\n                            responseModel.idCopertine = parameter.chiave;\r\n                        }\r\n                    }\r\n                    selected = true;\r\n                }\r\n            }\r\n            else if (hideOrShow == \"hide\") {\r\n                if (parameter.chiave != emptyValue) {\r\n                    parameter.isVisible = false;\r\n                }\r\n                else {\r\n                    if (selected == false && parameter.isVisible == true) {\r\n                        if (tipo == \"RILEGATURA\") {\r\n                            if (responseModel.idRilegature == emptyValue) {\r\n                                responseModel.idRilegature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PIEGATURA\") {\r\n                            if (responseModel.idPiegature == emptyValue) {\r\n                                responseModel.idPiegature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"OCCHIELLATURA\") {\r\n                            if (responseModel.idOcchielli == emptyValue) {\r\n                                responseModel.idOcchielli = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"CUCITURA\") {\r\n                            if (responseModel.idCuciture == emptyValue) {\r\n                                responseModel.idCuciture = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"ELETTROSALDATURA\") {\r\n                            if (responseModel.idElettrosaldature == emptyValue) {\r\n                                responseModel.idElettrosaldature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"ASOLA\") {\r\n                            if (responseModel.idAsole == emptyValue) {\r\n                                responseModel.idAsole = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"FUSTELLATURA\") {\r\n                            if (responseModel.idTagli == emptyValue) {\r\n                                responseModel.idTagli = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PLASTIFICAZIONE\") {\r\n                            if (responseModel.idPlastificazioni1 == emptyValue) {\r\n                                responseModel.idPlastificazioni1 = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                            if (responseModel.idPlastificazioni2 == emptyValue) {\r\n                                responseModel.idPlastificazioni2 = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"COPERTINA\") {\r\n                            if (responseModel.idCopertine == emptyValue) {\r\n                                responseModel.idCopertine = parameter.chiave;\r\n                            }\r\n                        }\r\n                        selected = true;\r\n                    }\r\n                }\r\n            }\r\n            if (selected == false) {\r\n                if (tipo == \"RILEGATURA\") {\r\n                    responseModel.idRilegature = \"-1\";\r\n                }\r\n                else if (tipo == \"PIEGATURA\") {\r\n                    responseModel.idPiegature = \"-1\";\r\n                }\r\n                else if (tipo == \"FUSTELLATURA\") {\r\n                    responseModel.idTagli = \"-1\";\r\n                }\r\n                else if (tipo == \"OCCHIELLATURA\") {\r\n                    responseModel.idOcchielli = \"-1\";\r\n                }\r\n                else if (tipo == \"CUCITURA\") {\r\n                    responseModel.idCuciture = \"-1\";\r\n                }\r\n                else if (tipo == \"ELETTROSALDATURA\") {\r\n                    responseModel.idElettrosaldature = \"-1\";\r\n                }\r\n                else if (tipo == \"ASOLA\") {\r\n                    responseModel.idAsole = \"-1\";\r\n                }\r\n                else if (tipo == \"PLASTIFICAZIONE\") {\r\n                    responseModel.idPlastificazioni1 = \"-1\";\r\n                }\r\n                else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                    responseModel.idPlastificazioni2 = \"-1\";\r\n                }\r\n                else if (tipo == \"COPERTINA\") {\r\n                    responseModel.idCopertine = \"-1\";\r\n                }\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.hideOrShowRadComboItem = function (parameterList, tipo, id, hideOrShow, responseModel) {\r\n        //Recupero delle info sulla combo\r\n        var selected = false;\r\n        for (var _i = 0, parameterList_2 = parameterList; _i < parameterList_2.length; _i++) {\r\n            var parameter = parameterList_2[_i];\r\n            //Se l'elemento non è il valore 'Scegli' (-1) o vuoto, non bisogna considerarlo\r\n            //Tranne per la copertina, dove -1 corrisponde all'autocopertinato, che può essere escluso\r\n            if (tipo != \"COPERTINA\" && (parameter.chiave == \"-1\" || parameter.chiave == null)) {\r\n                continue;\r\n            }\r\n            else {\r\n                var idElemento;\r\n                if (tipo == \"CARTA\"\r\n                    || tipo == \"CARTA_COPERTINA\"\r\n                    || (this.Macrocategory == \"ETICHETTE\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"STAMPA_DIRETTA\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"PANNELLI\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"BANDIERE\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"MANIFESTI\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"BANNER\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"ADESIVI\" && tipo == \"FORMATO\")) {\r\n                    var data = parameter.chiave.split(\"_\");\r\n                    idElemento = data[0];\r\n                }\r\n                else if (tipo == \"COPERTINA\") {\r\n                    if (parameter.chiave == \"0\") {\r\n                        //Il value dell'option della combo per l'autocopertina è il valore vuoto,\r\n                        //inveCe per le regole il valore dell'autocopertinato è -1, quindi occorre una conversione\r\n                        idElemento = \"-1\";\r\n                    }\r\n                    else {\r\n                        idElemento = parameter.chiave;\r\n                    }\r\n                }\r\n                else {\r\n                    idElemento = parameter.chiave;\r\n                }\r\n                if (hideOrShow == \"show\") {\r\n                    if (idElemento == id) {\r\n                        parameter.isVisible = true;\r\n                        if (selected == false) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == \"-1\") {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == \"-1\") {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == \"-1\") {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == \"-1\") {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == \"-1\") {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == \"-1\") {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == \"-1\") {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == \"-1\") {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == \"-1\") {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == \"-1\") {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (responseModel.idFormati == \"-1\") {\r\n                                    responseModel.idFormati = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == \"-1\") {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                                if (responseModel.idBiancoCoprente == \"-1\") {\r\n                                    responseModel.idBiancoCoprente = parameter.chiave;\r\n                                }\r\n                            }\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selected == false) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == \"-1\") {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == \"-1\") {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == \"-1\") {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == \"-1\") {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == \"-1\") {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == \"-1\") {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == \"-1\") {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == \"-1\") {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == \"-1\") {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == \"-1\") {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (responseModel.idFormati == \"-1\") {\r\n                                    responseModel.idFormati = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == \"-1\") {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                }\r\n                else if (hideOrShow == \"hide\") {\r\n                    if (idElemento == id) {\r\n                        parameter.isVisible = false;\r\n                    }\r\n                    else {\r\n                        if (selected == false && parameter.isVisible == true) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == id) {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == id) {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == id) {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == id) {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == id) {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == id) {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == id) {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == id) {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == id) {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == id) {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == id) {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                var idCarta = data[0];\r\n                                if (idCarta == id) {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == id) {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (this.Macrocategory == \"ETICHETTE\"\r\n                                    || this.Macrocategory == \"ADESIVI\"\r\n                                    || this.Macrocategory == \"PANNELLI\"\r\n                                    || this.Macrocategory == \"MANIFESTI\"\r\n                                    || this.Macrocategory == \"STAMPA_DIRETTA\"\r\n                                    || this.Macrocategory == \"BANDIERE\"\r\n                                    || this.Macrocategory == \"BANNER\") {\r\n                                    var data = responseModel.idFormati.split(\"_\");\r\n                                    var idFormato = data[0];\r\n                                    if (idFormato == id) {\r\n                                        responseModel.idFormati = parameter.chiave;\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    if (responseModel.idFormati == id) {\r\n                                        responseModel.idFormati = parameter.chiave;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == id) {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == id) {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == id) {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                                if (responseModel.idBiancoCoprente == id) {\r\n                                    responseModel.idBiancoCoprente = parameter.chiave;\r\n                                }\r\n                            }\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        if (selected == false) {\r\n            if (tipo == \"RILEGATURA\") {\r\n                responseModel.idRilegature = \"-1\";\r\n            }\r\n            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                responseModel.idMaterialiFlessibili = \"-1\";\r\n            }\r\n            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                responseModel.idSupportiRigidi = \"-1\";\r\n            }\r\n            else if (tipo == \"OCCHIELLATURA\") {\r\n                responseModel.idOcchielli = \"-1\";\r\n            }\r\n            else if (tipo == \"CUCITURA\") {\r\n                responseModel.idCuciture = \"-1\";\r\n            }\r\n            else if (tipo == \"ELETTROSALDATURA\") {\r\n                responseModel.idElettrosaldature = \"-1\";\r\n            }\r\n            else if (tipo == \"ASOLA\") {\r\n                responseModel.idAsole = \"-1\";\r\n            }\r\n            else if (tipo == \"PIEGATURA\") {\r\n                responseModel.idPiegature = \"-1\";\r\n            }\r\n            else if (tipo == \"FUSTELLATURA\") {\r\n                responseModel.idTagli = \"-1\";\r\n            }\r\n            else if (tipo == \"CARTA\") {\r\n                responseModel.idCarte1 = \"-1\";\r\n                responseModel.grammature1 = new Array();\r\n                responseModel.idGrammature1 = \"-1\";\r\n            }\r\n            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                responseModel.idGrammature1 = \"-1\";\r\n            }\r\n            else if (tipo == \"CARTA_COPERTINA\") {\r\n                responseModel.idCarte2 = \"-1\";\r\n                responseModel.grammature2 = new Array();\r\n                responseModel.idGrammature2 = \"-1\";\r\n            }\r\n            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                responseModel.idGrammature2 = \"-1\";\r\n            }\r\n            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                responseModel.idPlastificazioni1 = \"-1\";\r\n            }\r\n            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                responseModel.idPlastificazioni2 = \"-1\";\r\n            }\r\n            else if (tipo == \"FORMATO\") {\r\n                responseModel.idFormati = \"-1\";\r\n            }\r\n            else if (tipo == \"COPERTINA\") {\r\n                responseModel.idCopertine = \"-1\";\r\n            }\r\n            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                responseModel.idBiancoCoprente = \"0\";\r\n            }\r\n        }\r\n    };\r\n    /// <param name=\"tipo\">\"PF\" </param>\r\n    /// <param name=\"categoria\">\"FINITURA\"</param>\r\n    /// <param name=\"sezione\">\"FORMATO\"</param>\r\n    /// <param name=\"macroCategoria\">\"EDITORIA\"</param>\r\n    /// <param name=\"elemento\">null </param>\r\n    /// <param name=\"sottoElemento\">null</param>\r\n    ExcludingComponent.prototype.FindRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel) {\r\n        var regole = new Array();\r\n        for (var _i = 0, _a = responseModel.listaRegole; _i < _a.length; _i++) {\r\n            var regola = _a[_i];\r\n            //console.log(\"FindRegole(\" + tipo + \",\" + categoria + \",\" + sezione + \",\" + macroCategoria + \",\" + elemento + \",\" + sottoElemento + \")\");\r\n            if (regola.Tipo == tipo\r\n                && regola.Categoria_1 == categoria && regola.Sezione_1 == sezione\r\n                && regola.Macro_Categoria_1 == macroCategoria) {\r\n                //console.log(\"regola (\" + regola.Tipo + \",\" + regola.Categoria_1 + \",\" + regola.Sezione_1 + \",\" + regola.Macro_Categoria_1 + \",\" + regola.Id_Elemento_1 + \",\" + regola.Id_Elemento_Sottochiave_1 + \")\");\r\n                if (elemento != null && regola.Id_Elemento_1 == elemento) {\r\n                    if (sottoElemento != null && regola.Id_Elemento_Sottochiave_1 == sottoElemento) {\r\n                        regole.push(regola);\r\n                    }\r\n                    else if (sottoElemento == null || regola.Id_Elemento_Sottochiave_1 == 0) {\r\n                        regole.push(regola);\r\n                    }\r\n                }\r\n                else if (elemento == null) {\r\n                    regole.push(regola);\r\n                }\r\n            }\r\n        }\r\n        //console.log(regole.length);\r\n        return regole;\r\n    };\r\n    ExcludingComponent.prototype.CheckMacroCategoria = function (regola, macroCategoria) {\r\n        var result = false;\r\n        if (regola.Macro_Categoria_2 == null || regola.Macro_Categoria_2 == \"\") {\r\n            result = true;\r\n        }\r\n        else if (regola.Macro_Categoria_2 != null && regola.Macro_Categoria_2.toUpperCase() == macroCategoria.toUpperCase()) {\r\n            result = true;\r\n        }\r\n        return result;\r\n    };\r\n    ExcludingComponent.prototype.ApplicaRegoleLavorazioniAccessorie = function (tipo, macroCategoria, responseModel, responseModelOtherProduct) {\r\n        if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n        var categoria = \"ACCESSORIA\";\r\n        var sezione = \"\";\r\n        var elemento;\r\n        var sottoElemento;\r\n        //Lettura della lista delle lavorazioni accessorie\r\n        //Vengono applicate le regole per ogni lavorazione accessoria\r\n        for (var _i = 0, _a = responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n            var lavorazioneAccessoria = _a[_i];\r\n            elemento = lavorazioneAccessoria.id;\r\n            var tipoLavorazioneAccessoria = void 0;\r\n            if (lavorazioneAccessoria.tipo == \"0\") {\r\n                tipoLavorazioneAccessoria = \"check\";\r\n            }\r\n            else if (lavorazioneAccessoria.tipo == \"2\") {\r\n                tipoLavorazioneAccessoria = \"select\";\r\n            }\r\n            else if (lavorazioneAccessoria.tipo == \"6\") {\r\n                tipoLavorazioneAccessoria = \"textarea\";\r\n            }\r\n            //Per le lavorazioni di tipo combo bisogna leggere il valore della select\r\n            //Invece se si tratta di una check bisogna vedere se è checkata o meno.\r\n            if (tipoLavorazioneAccessoria == \"check\") {\r\n                sottoElemento = null;\r\n                //se la lavorazione è stata checkata allora vengono applicate le eventuali regole associate\r\n                if (lavorazioneAccessoria.lavorazioneCheckValue == false || lavorazioneAccessoria.lavorazioneCheckValue == \"false\" || lavorazioneAccessoria.tipoSelezione == 'nascosto') {\r\n                    sottoElemento = \"1\"; //Corrispone a No nella regola\r\n                }\r\n                else if (lavorazioneAccessoria.lavorazioneCheckValue) {\r\n                    sottoElemento = \"2\"; //Corrispone a Si nella regola\r\n                }\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n            else if (tipoLavorazioneAccessoria == \"select\") {\r\n                sottoElemento = this.getComboValue(\"ACCESSORIA\", lavorazioneAccessoria.valore, lavorazioneAccessoria);\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n            else if (tipoLavorazioneAccessoria = \"textarea\") {\r\n                sottoElemento = '0';\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.getComboValue = function (attributo, id, lavorazioneAccessoria) {\r\n        var value = \"\";\r\n        //Controllo prima se si tratta di una lavorazione accessoria, dato che la loro gestione è uguale per tutte le macrocategorie\r\n        if (attributo == \"ACCESSORIA\") {\r\n            //Lettura di tutta la lista delle lavorazioni accessorie\r\n            for (var _i = 0, _a = lavorazioneAccessoria.valori; _i < _a.length; _i++) {\r\n                var varianti = _a[_i];\r\n                //console.log(varianti)\r\n                var item = varianti;\r\n                var display = varianti.isVisible;\r\n                //Lettura dell'id della lavorazione corrente\r\n                var idLav = item.chiave;\r\n                var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n                var idLavAcc = lavorazioneAccessoria.valore;\r\n                if (id == idLav) {\r\n                    //Se la riga non è mostrata viene considerata come non selezionata\r\n                    if (display == false) {\r\n                        value = \"-1\";\r\n                    }\r\n                    else {\r\n                        //Lettura del valore selezionato nella select\r\n                        value = idLav;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            return value;\r\n        }\r\n    };\r\n    ExcludingComponent.prototype.hideOrShowLavorazioneAccessoria = function (idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct) {\r\n        if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n        for (var _i = 0, _a = responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n            var lavorazioneAccessoria = _a[_i];\r\n            var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n            var idLavAcc = lavorazioneAccessoria.id;\r\n            if (idLavAcc == idLavorazione) {\r\n                if (tipoLavorazione == \"2\") {\r\n                    var comboItemNumber = -1;\r\n                    if (idVariante == null || idVariante == 0) {\r\n                        if (hideOrShow == \"hide\") {\r\n                            lavorazioneAccessoria.isVisible = false;\r\n                        }\r\n                        else if (hideOrShow == \"show\") {\r\n                            lavorazioneAccessoria.isVisible = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        var selected = false;\r\n                        for (var _b = 0, _c = lavorazioneAccessoria.valori; _b < _c.length; _b++) {\r\n                            var variante = _c[_b];\r\n                            if (hideOrShow == \"hide\") {\r\n                                if (variante.chiave == idVariante) {\r\n                                    variante.isVisible = false;\r\n                                    //-- If type is combobox and we want to hide just one combo option, we will send it's id\r\n                                    comboItemNumber = idVariante;\r\n                                }\r\n                            }\r\n                            else if (hideOrShow == \"show\") {\r\n                                variante.isVisible = true;\r\n                                if (selected == false) {\r\n                                    if (lavorazioneAccessoria.valore == \"-1\") {\r\n                                        lavorazioneAccessoria.valore = variante.chiave;\r\n                                    }\r\n                                    selected = true;\r\n                                }\r\n                            }\r\n                        }\r\n                        var firstVariableVisible = 0;\r\n                        for (var _d = 0, _e = lavorazioneAccessoria.valori; _d < _e.length; _d++) {\r\n                            var variante = _e[_d];\r\n                            if (firstVariableVisible == 0) {\r\n                                if (variante.isVisible == true) {\r\n                                    firstVariableVisible = variante.chiave;\r\n                                }\r\n                            }\r\n                            if (lavorazioneAccessoria.valore == variante.chiave) {\r\n                                if (variante.isVisible == true) {\r\n                                    selected = true;\r\n                                }\r\n                            }\r\n                        }\r\n                        if (selected == false && firstVariableVisible == 0) {\r\n                            lavorazioneAccessoria.valore = \"-1\";\r\n                        }\r\n                        else if (selected == false) {\r\n                            lavorazioneAccessoria.valore = firstVariableVisible;\r\n                        }\r\n                    }\r\n                    this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber);\r\n                }\r\n                else {\r\n                    if (hideOrShow == \"hide\") {\r\n                        lavorazioneAccessoria.isVisible = false;\r\n                    }\r\n                    else if (hideOrShow == \"show\") {\r\n                        lavorazioneAccessoria.isVisible = true;\r\n                    }\r\n                    this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria);\r\n                }\r\n            }\r\n        }\r\n    };\r\n    /*-- In other products we don't use lavorazzioniAccessorie object but gruppi,\r\n         so for every change on one object we need to reflect it on the another one */\r\n    ExcludingComponent.prototype.reflectChangesOnOtherProducts = function (responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber) {\r\n        if (comboItemNumber === void 0) { comboItemNumber = -1; }\r\n        if (responseModelOtherProduct === undefined || responseModelOtherProduct.length == 0)\r\n            return;\r\n        var idLavorazione = lavorazioneAccessoria.id;\r\n        var isFoundElement = false;\r\n        //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n        for (var _i = 0, responseModelOtherProduct_1 = responseModelOtherProduct; _i < responseModelOtherProduct_1.length; _i++) {\r\n            var group = responseModelOtherProduct_1[_i];\r\n            for (var _a = 0, _b = group.varianti; _a < _b.length; _a++) {\r\n                var variante = _b[_a];\r\n                if (variante.id == idLavorazione) {\r\n                    if (variante.tipo != '2' || comboItemNumber == -1) {\r\n                        variante.isVisible = hideOrShow == \"hide\" ? false : true;\r\n                        //-- If item from select we want to hide was selected before rule is applied on it, we are changing it's value\r\n                        if (!variante.isVisible && (lavorazioneAccessoria.valore || lavorazioneAccessoria.valore == 0)) {\r\n                            variante.intFormValue = lavorazioneAccessoria.valore;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (variante.valori) {\r\n                            var comboOption = variante.valori.filter(function (x) { return x.chiave == comboItemNumber; });\r\n                            if (comboOption) {\r\n                                comboOption.isVisible = hideOrShow == \"hide\" ? false : true;\r\n                                //-- If selected element need to be hidden because of regola, we are selecting first visible element\r\n                                if (!comboOption.isVisible) {\r\n                                    //  let value = lavorazioneAccessoria.valori.filter(x => x.isVisible == true)[0].chiave;\r\n                                    //  if(variante.intFormValue)\r\n                                    variante.intFormValue = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    isFoundElement = true;\r\n                    break;\r\n                }\r\n            }\r\n            //-- If variante is found, break both loops, because we don't need to look for any other variante\r\n            if (isFoundElement)\r\n                break;\r\n        }\r\n    };\r\n    return ExcludingComponent;\r\n}());\r\nexports.ExcludingComponent = ExcludingComponent;\r\n\n\n/***/ }),\n\n/***/ 73:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar UserLogin = (function () {\r\n    function UserLogin() {\r\n        // this.id = 0;\r\n        this.username = \"\";\r\n        this.isAuthenticated = false;\r\n    }\r\n    return UserLogin;\r\n}());\r\nexports.UserLogin = UserLogin;\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar CmsComponentService = (function () {\r\n    function CmsComponentService(_api, mappings, language, authService, cartService, currencyService) {\r\n        this._api = _api;\r\n        this.mappings = mappings;\r\n        this.language = language;\r\n        this.authService = authService;\r\n        this.cartService = cartService;\r\n        this.currencyService = currencyService;\r\n    }\r\n    CmsComponentService.prototype.getHeaderData = function () {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        console.log(longLang);\r\n        //reading userId\r\n        var userId = this.authService.getCurrentUserId();\r\n        var curr = this.currencyService.getCurrency();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        //reading cartId\r\n        var cartId = this.cartService.getCartId();\r\n        cartId = encodeURIComponent(cartId);\r\n        var url = this.mappings.Web_Api_Get_Header_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', userId)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{currency}', curr)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getSideMenuData = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Side_Menu_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getHomePageDataOptimized = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading userId\r\n        var userId = this.authService.getCurrentUserId();\r\n        //reading cartId\r\n        var cartId = this.cartService.getCartId();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        //reading currency\r\n        var curr = this.currencyService.getCurrency();\r\n        cartId = encodeURIComponent(cartId);\r\n        var url = this.mappings.Web_Api_Get_Home_Page_Data_Optimized\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', userId)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{currency}', curr)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getproductHilightpromo = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Home_HilightPromoProduct\r\n            .replace('{lang}', longLang);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getSeoData = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Seo_Data.replace('{lang}', longLang);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getSliderData = function (type, id) {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        var url = this.mappings.Web_Api_Get_Slider_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{id}', id)\r\n            .replace('{type}', type);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getFooterData = function () {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Footer_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{currency}', curr);\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getShoppingCartData = function () {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading userId\r\n        var userInfo = this.authService.GetData();\r\n        var userId;\r\n        if (userInfo != null) {\r\n            userId = this.authService.GetUserId();\r\n        }\r\n        //reading cartId\r\n        var cartId = this.cartService.getCartId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Shopping_Cart_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', userId.toString())\r\n            .replace('{cartid}', cartId)\r\n            .replace('{currency}', curr);\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    CmsComponentService.prototype.getShoppingCartCashData = function () {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading userId\r\n        var userInfo = this.authService.GetData();\r\n        var userId;\r\n        if (userInfo != null) {\r\n            userId = this.authService.GetUserId();\r\n        }\r\n        //reading cartId\r\n        var cartId = this.cartService.getCartId();\r\n        var curr = this.currencyService.getCurrency();\r\n        var url = this.mappings.Web_Api_Get_Shopping_Cart_Cash_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', userId.toString())\r\n            .replace('{cartid}', cartId.toString())\r\n            .replace('{currency}', curr);\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    CmsComponentService.prototype.getShoppingCartSubmittedData = function (orderId) {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading userId\r\n        var userInfo = this.authService.GetData();\r\n        var userId;\r\n        if (userInfo != null) {\r\n            userId = this.authService.GetUserId();\r\n        }\r\n        var curr = this.currencyService.getCurrency();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Shopping_Cart_Submitted_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', userId.toString())\r\n            .replace('{orderid}', orderId.toString())\r\n            .replace('{currency}', curr)\r\n            .replace(\"{cartid}\", cartId);\r\n        return this._api.getUniversalCached(url);\r\n    };\r\n    CmsComponentService.prototype.getOtherProductData = function (productId, userId) {\r\n        //reading language\r\n        var longLang = this.language.getLongLang();\r\n        //reading template builder id\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Other_Product_Form_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{productid}', productId)\r\n            .replace('{userId}', userId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getOfflinePageData = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Offline_Page_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService.prototype.getLoginPageData = function () {\r\n        //Reading language\r\n        var longLang = this.language.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Login_Page_Data\r\n            .replace('{lang}', longLang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        //Sending request to the server\r\n        return this._api.get(url);\r\n    };\r\n    CmsComponentService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object])\r\n    ], CmsComponentService);\r\n    return CmsComponentService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.CmsComponentService = CmsComponentService;\r\n\n\n/***/ }),\n\n/***/ 84:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar NewsletterService = (function () {\r\n    function NewsletterService(_api, _cache, languageService, mappings) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.languageService = languageService;\r\n        this.mappings = mappings;\r\n        //getting language\r\n        this.lang = this.languageService.getLongLang();\r\n    }\r\n    NewsletterService.prototype.newsletterSubscribe = function (email) {\r\n        var url = this.mappings.Web_Api_Post_Newsletter_Subscribe.replace('{email}', email).replace('{lang}', this.lang);\r\n        return this._api.get(url);\r\n    };\r\n    NewsletterService.prototype.getNewsletterPageData = function () {\r\n        var url = this.mappings.Web_Api_Get_Newsletter_Page_Data.replace('{lang}', this.lang);\r\n        return this._api.get(url);\r\n    };\r\n    NewsletterService.prototype.getNewsletterConfirmationPageData = function () {\r\n        var url = this.mappings.Web_Api_Get_Newsletter_Confirmation_Page_Data.replace('{lang}', this.lang);\r\n        return this._api.get(url);\r\n    };\r\n    NewsletterService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object])\r\n    ], NewsletterService);\r\n    return NewsletterService;\r\n    var _a, _b, _c, _d;\r\n}());\r\nexports.NewsletterService = NewsletterService;\r\n\n\n/***/ }),\n\n/***/ 85:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nfunction __export(m) {\r\n    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n__export(__webpack_require__(60));\r\n__export(__webpack_require__(622));\r\n__export(__webpack_require__(623));\r\n__export(__webpack_require__(420));\r\n__export(__webpack_require__(624));\r\n\n\n/***/ }),\n\n/***/ 86:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar trustpilot_service_1 = __webpack_require__(418);\r\nvar core_1 = __webpack_require__(0);\r\nvar common_1 = __webpack_require__(44);\r\nvar router_1 = __webpack_require__(12);\r\nvar forms_1 = __webpack_require__(228);\r\nvar core_2 = __webpack_require__(27);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar model_service_1 = __webpack_require__(631);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(35);\r\nvar cms_content_service_1 = __webpack_require__(413);\r\nvar company_service_1 = __webpack_require__(129);\r\nvar article_service_1 = __webpack_require__(126);\r\nvar cms_menu_list_service_1 = __webpack_require__(414);\r\nvar faq_service_1 = __webpack_require__(415);\r\nvar newsletter_service_1 = __webpack_require__(84);\r\nvar slider_service_1 = __webpack_require__(417);\r\nvar info_request_service_1 = __webpack_require__(416);\r\nvar login_service_1 = __webpack_require__(179);\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar register_service_1 = __webpack_require__(98);\r\nvar local_storage_1 = __webpack_require__(627);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar category_service_1 = __webpack_require__(262);\r\nvar product_service_1 = __webpack_require__(132);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar client_area_service_1 = __webpack_require__(62);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar seo_service_1 = __webpack_require__(11);\r\nvar privacy_policy_service_1 = __webpack_require__(421);\r\nvar cookie_policy_service_1 = __webpack_require__(419);\r\nvar purchase_condition_service_1 = __webpack_require__(422);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar loading_overlay_service_1 = __webpack_require__(626);\r\nvar script_service_1 = __webpack_require__(14);\r\nvar helper_service_1 = __webpack_require__(48);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar messages_service_1 = __webpack_require__(130);\r\nvar application_service_1 = __webpack_require__(128);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar validation_service_1 = __webpack_require__(131);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\n//Components  \r\nvar header_component_1 = __webpack_require__(598);\r\nvar footer_component_1 = __webpack_require__(596);\r\nvar article_category_component_1 = __webpack_require__(372);\r\nvar blog_page_component_1 = __webpack_require__(373);\r\nvar news_page_component_1 = __webpack_require__(374);\r\nvar news_list_component_1 = __webpack_require__(595);\r\nvar side_bar_menu_component_1 = __webpack_require__(600);\r\nvar newsletter_component_1 = __webpack_require__(597);\r\nvar quoting_main_component_1 = __webpack_require__(607);\r\nvar wizard_form_commerciale_component_1 = __webpack_require__(611);\r\nvar wizard_form_editoria_component_1 = __webpack_require__(612);\r\nvar wizard_form_adesivi_component_1 = __webpack_require__(608);\r\nvar wizard_form_banner_component_1 = __webpack_require__(609);\r\nvar wizard_form_buste_component_1 = __webpack_require__(610);\r\nvar wizard_form_etichette_component_1 = __webpack_require__(613);\r\nvar wizard_form_stampa_component_1 = __webpack_require__(614);\r\nvar other_product_form_component_1 = __webpack_require__(606);\r\nvar quoting_order_totals_component_1 = __webpack_require__(605);\r\nvar cookie_policy_component_1 = __webpack_require__(378);\r\nvar faq_component_1 = __webpack_require__(379);\r\nvar info_request_component_1 = __webpack_require__(380);\r\nvar privacy_policy_component_1 = __webpack_require__(383);\r\nvar purchase_condition_component_1 = __webpack_require__(384);\r\nvar cart_empty_page_component_1 = __webpack_require__(385);\r\nvar client_area_order_list_component_1 = __webpack_require__(388);\r\nvar user_login_component_1 = __webpack_require__(410);\r\nvar user_password_component_1 = __webpack_require__(411);\r\nvar cart_component_1 = __webpack_require__(396);\r\nvar client_area_home_component_1 = __webpack_require__(398);\r\nvar client_area_profile_component_1 = __webpack_require__(401);\r\nvar cart_cash_component_1 = __webpack_require__(394);\r\nvar cart_submitted_component_1 = __webpack_require__(395);\r\nvar slider_widget_component_1 = __webpack_require__(603);\r\nvar client_area_order_details_component_1 = __webpack_require__(400);\r\nvar client_area_catalog_private_component_1 = __webpack_require__(397);\r\nvar offline_page_component_1 = __webpack_require__(387);\r\nvar not_found_page_component_1 = __webpack_require__(386);\r\nvar registration_confirmation_component_1 = __webpack_require__(409);\r\nvar payment_confirmation_component_1 = __webpack_require__(403);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(405);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(404);\r\nvar payment_banca_sella_confirmation_component_1 = __webpack_require__(402);\r\nvar ng2_table_1 = __webpack_require__(428);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar angular2_material_datepicker_1 = __webpack_require__(591);\r\nvar ng2_bs3_modal_1 = __webpack_require__(636);\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar search_component_1 = __webpack_require__(375);\r\nvar client_area_invoices_component_1 = __webpack_require__(399);\r\nvar newsletter_page_component_1 = __webpack_require__(382);\r\nvar newsletter_confirmation_page_component_1 = __webpack_require__(381);\r\nvar registration_complete_component_1 = __webpack_require__(408);\r\nvar customerscanvas_service_1 = __webpack_require__(43);\r\nvar canvas_widget_components_1 = __webpack_require__(602);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar quick_registration_component_1 = __webpack_require__(406);\r\nvar trustpilot_widget_component_1 = __webpack_require__(604);\r\nvar header_service_1 = __webpack_require__(127);\r\nvar MODULES = [\r\n    // Do NOT include UniversalModule, HttpModule, or JsonpModule here\r\n    common_1.CommonModule,\r\n    router_1.RouterModule,\r\n    forms_1.FormsModule,\r\n    forms_1.ReactiveFormsModule,\r\n    core_2.TranslateModule,\r\n    ng2_table_1.Ng2TableModule,\r\n    angular2_material_datepicker_1.DatepickerModule,\r\n    ng2_bs3_modal_1.Ng2Bs3ModalModule,\r\n];\r\nvar PIPES = [];\r\nvar COMPONENTS = [\r\n    // put shared components here\r\n    header_component_1.HeaderComponent,\r\n    footer_component_1.FooterComponent,\r\n    article_category_component_1.ArticleCategoryComponent,\r\n    blog_page_component_1.BlogPageComponent,\r\n    news_page_component_1.ArticleComponent,\r\n    news_list_component_1.NewsListComponent,\r\n    side_bar_menu_component_1.SideBarMenuComponent,\r\n    newsletter_component_1.NewsletterComponent,\r\n    quoting_main_component_1.QuotingMainComponent,\r\n    wizard_form_commerciale_component_1.WizardCommercialeComponent,\r\n    wizard_form_editoria_component_1.WizardEditoriaComponent,\r\n    wizard_form_adesivi_component_1.WizardAdesiviComponent,\r\n    wizard_form_banner_component_1.WizardBannerComponent,\r\n    wizard_form_buste_component_1.WizardBusteComponent,\r\n    wizard_form_etichette_component_1.WizardEtichetteComponent,\r\n    wizard_form_stampa_component_1.WizardStampaComponent,\r\n    other_product_form_component_1.OtherProductFormComponent,\r\n    quoting_order_totals_component_1.QuotingOrderTotalsComponent,\r\n    cookie_policy_component_1.CookiePolicyComponent,\r\n    faq_component_1.FaqComponent,\r\n    info_request_component_1.InfoRequestComponent,\r\n    privacy_policy_component_1.PrivacyPolicyComponent,\r\n    purchase_condition_component_1.PurchaseConditionComponent,\r\n    cart_empty_page_component_1.CartEmptyPageComponent,\r\n    client_area_order_list_component_1.ClientAreaOrderListComponent,\r\n    client_area_invoices_component_1.ClientAreaInvoicesComponent,\r\n    user_login_component_1.UserLoginComponent,\r\n    user_password_component_1.UserPasswordComponent,\r\n    cart_component_1.CartComponent,\r\n    client_area_home_component_1.ClientAreaHomeComponent,\r\n    client_area_profile_component_1.ClientAreaProfileComponent,\r\n    cart_cash_component_1.CartCashComponent,\r\n    cart_submitted_component_1.CartSubmittedComponent,\r\n    slider_widget_component_1.SliderWidgetComponent,\r\n    client_area_order_details_component_1.ClientAreaOrderDetailsComponent,\r\n    client_area_catalog_private_component_1.ClientAreaCatalogPrivateComponent,\r\n    registration_confirmation_component_1.RegistrationConfirmationComponent,\r\n    payment_confirmation_component_1.PaymentConfirmationComponent,\r\n    payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent,\r\n    payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent,\r\n    payment_banca_sella_confirmation_component_1.PaymentBancaSellaConfirmationComponent,\r\n    offline_page_component_1.OfflinePageComponent,\r\n    not_found_page_component_1.NotFoundPageComponent,\r\n    search_component_1.SearchComponent,\r\n    newsletter_page_component_1.NewsletterPageComponent,\r\n    newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent,\r\n    registration_complete_component_1.RegistrationConfirmationPageComponent,\r\n    canvas_widget_components_1.CanvasWidgetComponent,\r\n    quick_registration_component_1.QuickRegistrationComponent,\r\n    trustpilot_widget_component_1.TrustpilotWidgetComponent\r\n];\r\nvar PROVIDERS = [\r\n    model_service_1.ModelService,\r\n    api_service_1.ApiService,\r\n    component_helper_service_1.ComponentHelperService,\r\n    template_service_1.TemplateService,\r\n    cms_content_service_1.CmsContentService,\r\n    company_service_1.CompanyService,\r\n    article_service_1.ArticleService,\r\n    cms_menu_list_service_1.CmsMenuListService,\r\n    faq_service_1.FaqListService,\r\n    newsletter_service_1.NewsletterService,\r\n    slider_service_1.SliderService,\r\n    info_request_service_1.InfoRequestService,\r\n    login_service_1.LoginService,\r\n    recover_password_service_1.RecoverPasswordService,\r\n    register_service_1.RegisterService,\r\n    local_storage_1.LocalStorageService,\r\n    quoting_service_1.QuotingService,\r\n    category_service_1.CategoryService,\r\n    product_service_1.ProductService,\r\n    shopping_cart_service_1.ShoppingCartService,\r\n    client_area_service_1.ClientAreaService,\r\n    auth_service_1.AuthService,\r\n    language_service_1.LanguageService,\r\n    configuration_service_1.ConfigurationService,\r\n    application_service_1.ApplicationService,\r\n    mapping_1.Mappings,\r\n    cms_component_service_1.CmsComponentService,\r\n    seo_service_1.SeoService,\r\n    privacy_policy_service_1.PrivacyPolicyService,\r\n    cookie_policy_service_1.CookiePolicyService,\r\n    purchase_condition_service_1.PurchaseConditionService,\r\n    bootbox_service_1.BootboxService,\r\n    loading_overlay_service_1.LoadingOverlayService,\r\n    messages_service_1.MessagesService,\r\n    check_existence_service_1.CheckIfExistService,\r\n    order_payment_service_1.OrderPaymentService,\r\n    script_service_1.ScriptService,\r\n    helper_service_1.HelperService,\r\n    currency_service_1.CurrencyService,\r\n    crypto_service_1.CryptoService,\r\n    search_service_1.SearchService,\r\n    breadcrumbs_service_1.BreadcrumbsService,\r\n    validation_service_1.ValidationService,\r\n    customerscanvas_service_1.CustomersCanvasService,\r\n    paypal_service_1.PaypalService,\r\n    trustpilot_service_1.TrustpilotService,\r\n    header_service_1.HeaderService\r\n];\r\nvar SharedModule = (function () {\r\n    function SharedModule() {\r\n    }\r\n    SharedModule.forRoot = function () {\r\n        return {\r\n            ngModule: SharedModule,\r\n            providers: PROVIDERS.slice()\r\n        };\r\n    };\r\n    SharedModule = __decorate([\r\n        core_1.NgModule({\r\n            imports: MODULES.slice(),\r\n            declarations: PIPES.concat(COMPONENTS),\r\n            exports: MODULES.concat(PIPES, COMPONENTS)\r\n        }), \r\n        __metadata('design:paramtypes', [])\r\n    ], SharedModule);\r\n    return SharedModule;\r\n}());\r\nexports.SharedModule = SharedModule;\r\n\n\n/***/ }),\n\n/***/ 897:\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n\n/***/ 898:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n// the polyfills must be the first thing imported\r\n__webpack_require__(468);\r\n__webpack_require__(471);\r\n__webpack_require__(469); // temporary until 2.1.1 things are patched in Core\r\n// Angular 2\r\nvar core_1 = __webpack_require__(0);\r\nvar browser_1 = __webpack_require__(280);\r\nvar bootloader_1 = __webpack_require__(467);\r\nvar webfontloader_1 = __webpack_require__(472);\r\n// enable prod for faster renders\r\ncore_1.enableProdMode();\r\nvar browser_module_1 = __webpack_require__(470);\r\nexports.platformRef = browser_1.platformUniversalDynamic();\r\n// on document ready bootstrap Angular 2\r\nfunction main() {\r\n    // Load fonts async\r\n    // https://github.com/typekit/webfontloader#configuration\r\n    webfontloader_1.load({\r\n        google: {\r\n            families: ['Droid Sans']\r\n        }\r\n    });\r\n    return exports.platformRef.bootstrapModule(browser_module_1.MainModule);\r\n}\r\nexports.main = main;\r\n// support async tag or hmr\r\nbootloader_1.bootloader(main);\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\n//Model\r\nvar user_login_1 = __webpack_require__(73);\r\nvar cookie_service_1 = __webpack_require__(60);\r\nvar router_1 = __webpack_require__(12);\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar AuthService = (function () {\r\n    function AuthService(_api, _cache, cookie, router, cryptoService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.cookie = cookie;\r\n        this.router = router;\r\n        this.cryptoService = cryptoService;\r\n        this.loggedInUser = null;\r\n    }\r\n    AuthService.prototype.GetData = function () {\r\n        var user = new user_login_1.UserLogin();\r\n        if (this.cookie.getObject(\"user\") === undefined) {\r\n            this.loggedInUser = null;\r\n        }\r\n        else if (this.cookie.getObject(\"user\") != undefined) {\r\n            var regUser = this.cookie.getObject(\"user\");\r\n            user.username = regUser[\"username\"];\r\n            user.isAuthenticated = Boolean(regUser[\"isAuthenticated\"]);\r\n            var registeredUser = { \"isAuthenticated\": user.isAuthenticated, \"username\": user.username };\r\n            this.loggedInUser = registeredUser;\r\n            user = this.loggedInUser;\r\n        }\r\n        return user;\r\n    };\r\n    AuthService.prototype.GetUserId = function () {\r\n        var decryptedUserId = \"0\";\r\n        var encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n        if (encryptedUserId != null || encryptedUserId != undefined) {\r\n            decryptedUserId = encryptedUserId;\r\n        }\r\n        else {\r\n            decryptedUserId = this.cryptoService.encryptNumber(Number(decryptedUserId));\r\n        }\r\n        return decryptedUserId;\r\n    };\r\n    AuthService.prototype.GetDecryptedUserId = function () {\r\n        var decryptedUserId = 0;\r\n        var encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n        if (encryptedUserId != null || encryptedUserId != undefined) {\r\n            decryptedUserId = this.cryptoService.decryptNumber(encryptedUserId);\r\n        }\r\n        else {\r\n            decryptedUserId = Number(this.cryptoService.encryptNumber(decryptedUserId));\r\n        }\r\n        return decryptedUserId;\r\n    };\r\n    AuthService.prototype.Login = function (id, username) {\r\n        var user = new user_login_1.UserLogin();\r\n        // user.id = Number(id);\r\n        user.isAuthenticated = true;\r\n        user.username = username;\r\n        var cryptedUserId = this.cryptoService.encryptNumber(Number(id));\r\n        this.cookie.putObject(\"user\", { \"isAuthenticated\": \"true\", \"username\": username });\r\n        this.cookie.put(\"qazwsxedc\", cryptedUserId);\r\n    };\r\n    AuthService.prototype.Logout = function () {\r\n        this.loggedInUser = null;\r\n        this.cookie.remove(\"user\");\r\n        this.cookie.remove(\"qazwsxedc\");\r\n        var currentRoute = this.router.url;\r\n        if (currentRoute == \"/it/home\" || \"/en/home\" || \"/de/home\" || \"/al/home\") {\r\n            window.location.reload();\r\n        }\r\n        this.router.navigateByUrl(\"\");\r\n    };\r\n    AuthService.prototype.getCurrentUserId = function () {\r\n        var userId = this.GetUserId();\r\n        return userId;\r\n    };\r\n    AuthService.prototype.setTemplBuilderId = function (templateBuilderId) {\r\n        this.cookie.put(\"templateBuilderId\", templateBuilderId);\r\n    };\r\n    AuthService.prototype.getTemplBuilderId = function () {\r\n        var templateBuilderId = this.cookie.get(\"templateBuilderId\");\r\n        if (templateBuilderId == undefined || templateBuilderId == \"undefined\") {\r\n            templateBuilderId = \"0\";\r\n        }\r\n        return templateBuilderId;\r\n    };\r\n    AuthService = __decorate([\r\n        core_1.Injectable(),\r\n        __param(2, core_1.Inject('CookieService')), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof crypto_service_1.CryptoService !== 'undefined' && crypto_service_1.CryptoService) === 'function' && _e) || Object])\r\n    ], AuthService);\r\n    return AuthService;\r\n    var _a, _b, _c, _d, _e;\r\n}());\r\nexports.AuthService = AuthService;\r\n\n\n/***/ }),\n\n/***/ 97:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar ClientAreaDetails = (function () {\r\n    function ClientAreaDetails() {\r\n    }\r\n    return ClientAreaDetails;\r\n}());\r\nexports.ClientAreaDetails = ClientAreaDetails;\r\nvar ClientAreaOrderNote = (function () {\r\n    function ClientAreaOrderNote() {\r\n    }\r\n    return ClientAreaOrderNote;\r\n}());\r\nexports.ClientAreaOrderNote = ClientAreaOrderNote;\r\nvar ClientAreaUserProfile = (function () {\r\n    function ClientAreaUserProfile() {\r\n    }\r\n    return ClientAreaUserProfile;\r\n}());\r\nexports.ClientAreaUserProfile = ClientAreaUserProfile;\r\nvar ClientAreaUserAddress = (function () {\r\n    function ClientAreaUserAddress() {\r\n    }\r\n    return ClientAreaUserAddress;\r\n}());\r\nexports.ClientAreaUserAddress = ClientAreaUserAddress;\r\nvar ClientAreaOrderDetails = (function () {\r\n    function ClientAreaOrderDetails() {\r\n    }\r\n    return ClientAreaOrderDetails;\r\n}());\r\nexports.ClientAreaOrderDetails = ClientAreaOrderDetails;\r\nvar PaypalButtonStyleModel = (function () {\r\n    function PaypalButtonStyleModel() {\r\n    }\r\n    return PaypalButtonStyleModel;\r\n}());\r\nexports.PaypalButtonStyleModel = PaypalButtonStyleModel;\r\nvar ClientAreaProcessingOrders = (function () {\r\n    function ClientAreaProcessingOrders() {\r\n    }\r\n    return ClientAreaProcessingOrders;\r\n}());\r\nexports.ClientAreaProcessingOrders = ClientAreaProcessingOrders;\r\nvar ClientAreaOrderProcessMessages = (function () {\r\n    function ClientAreaOrderProcessMessages() {\r\n    }\r\n    return ClientAreaOrderProcessMessages;\r\n}());\r\nexports.ClientAreaOrderProcessMessages = ClientAreaOrderProcessMessages;\r\nvar ClientAreaOrderProcessFile = (function () {\r\n    function ClientAreaOrderProcessFile() {\r\n    }\r\n    return ClientAreaOrderProcessFile;\r\n}());\r\nexports.ClientAreaOrderProcessFile = ClientAreaOrderProcessFile;\r\n\n\n/***/ }),\n\n/***/ 98:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(21);\r\nvar api_service_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar RegisterService = (function () {\r\n    function RegisterService(_api, _cache, mappings, cartService, languageService, authService) {\r\n        this._api = _api;\r\n        this._cache = _cache;\r\n        this.mappings = mappings;\r\n        this.cartService = cartService;\r\n        this.languageService = languageService;\r\n        this.authService = authService;\r\n    }\r\n    RegisterService.prototype.sendInfoRequest = function (parameters) {\r\n        var cartId = this.cartService.getCartId();\r\n        parameters.CartId = cartId;\r\n        parameters.EmailRegister = parameters.EmailRegister ? parameters.EmailRegister.toLowerCase() : \"\";\r\n        parameters.EmailRepeat = parameters.EmailRepeat ? parameters.EmailRepeat.toLowerCase() : \"\";\r\n        parameters.PecEmail = parameters.PecEmail ? parameters.PecEmail.toLowerCase() : \"\";\r\n        return this._api.post(this.mappings.Web_Api_Post_Register, parameters)\r\n            .do(function (result) { return result; })\r\n            .share();\r\n    };\r\n    RegisterService.prototype.getRegisterPageData = function () {\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var lang = this.languageService.getLongLang();\r\n        var templateBuilderId = this.authService.getTemplBuilderId();\r\n        var url = this.mappings.Web_Api_Get_Register_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId)\r\n            .replace('{templatebuilderid}', templateBuilderId);\r\n        return this._api.get(url);\r\n    };\r\n    RegisterService.prototype.confirmationRegistration = function (id) {\r\n        var url = this.mappings.Web_Api_Post_Confirm_Registration.replace('{id}', id);\r\n        return this._api.post(url);\r\n    };\r\n    RegisterService.prototype.setFacebookLoginData = function (registerData) {\r\n        this.facebookLoginData = registerData;\r\n    };\r\n    RegisterService.prototype.getFacebookLoginData = function () {\r\n        return this.facebookLoginData;\r\n    };\r\n    RegisterService.prototype.getRegistrationCompletePageData = function () {\r\n        var lang = this.languageService.getLongLang();\r\n        var customerId = this.authService.GetUserId();\r\n        var cartId = this.cartService.getCartId();\r\n        var url = this.mappings.Web_Api_Get_Registration_Complete_Page_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}', customerId)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    };\r\n    RegisterService = __decorate([\r\n        core_1.Injectable(), \r\n        __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n    ], RegisterService);\r\n    return RegisterService;\r\n    var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.RegisterService = RegisterService;\r\n\n\n/***/ }),\n\n/***/ 99:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\nvar core_1 = __webpack_require__(0);\r\n// es6-modules are used here\r\nvar dom_adapter_1 = __webpack_require__(32);\r\nvar platform_browser_1 = __webpack_require__(7);\r\n/**\r\n * A service that can be used to get and add meta tags.\r\n *\r\n * @experimental\r\n */\r\nvar Meta = (function () {\r\n    function Meta(_document) {\r\n        this._document = _document;\r\n        this._dom = dom_adapter_1.getDOM();\r\n    }\r\n    /**\r\n     * Adds a new meta tag to the dom.\r\n     *\r\n     *  ### Example\r\n     *\r\n     * ```ts\r\n     * const name: MetaDefinition = {name: 'application-name', content: 'Name of my application'};\r\n     * const desc: MetaDefinition = {name: 'description', content: 'A description of the page'};\r\n     * const tags: HTMLMetaElement[] = this.meta.addTags([name, desc]);\r\n     * ```\r\n     *\r\n     * @param tags\r\n     * @returns {HTMLMetaElement[]}\r\n     */\r\n    Meta.prototype.addTags = function () {\r\n        var _this = this;\r\n        var tags = [];\r\n        for (var _i = 0; _i < arguments.length; _i++) {\r\n            tags[_i - 0] = arguments[_i];\r\n        }\r\n        var presentTags = this._flattenArray(tags);\r\n        if (presentTags.length === 0)\r\n            return [];\r\n        return presentTags.map(function (tag) { return _this._addInternal(tag); });\r\n    };\r\n    /**\r\n     * Gets the meta tag by the given selector. Returns element or null\r\n     * if there's no such meta element.\r\n     *\r\n     *  ### Example\r\n     *\r\n     * ```ts\r\n     * const meta: HTMLMetaElement = this.meta.getTag('name=description');\r\n     * const twitterMeta: HTMLMetaElement = this.meta.getTag('name=\"twitter:title\"');\r\n     * const fbMeta: HTMLMetaElement = this.meta.getTag('property=\"fb:app_id\"');\r\n     * ```\r\n     *\r\n     * @param selector\r\n     * @returns {HTMLMetaElement}\r\n     */\r\n    Meta.prototype.getTag = function (selector) {\r\n        if (!selector)\r\n            return null;\r\n        return this._dom.query(\"meta[\" + selector + \"]\");\r\n    };\r\n    /**\r\n     * Updates the meta tag with the given selector.\r\n     *\r\n     * *  ### Example\r\n     *\r\n     * ```ts\r\n     * const meta: HTMLMetaElement = this.meta.updateTag('name=description', {name: 'description',\r\n     * content: 'New description'});\r\n     * console.log(meta.content); // 'New description'\r\n     * ```\r\n     *\r\n     * @param selector\r\n     * @param tag updated tag definition\r\n     * @returns {HTMLMetaElement}\r\n     */\r\n    Meta.prototype.updateTag = function (selector, tag) {\r\n        var meta = this.getTag(selector);\r\n        if (!meta) {\r\n            // create element if it doesn't exist\r\n            return this._addInternal(tag);\r\n        }\r\n        return this._prepareMetaElement(tag, meta);\r\n    };\r\n    /**\r\n     * Removes meta tag with the given selector from the dom.\r\n     *\r\n     *  ### Example\r\n     *\r\n     * ```ts\r\n     * this.meta.removeTagBySelector('name=description');\r\n     * ```\r\n     *\r\n     * @param selector\r\n     */\r\n    Meta.prototype.removeTagBySelector = function (selector) {\r\n        var meta = this.getTag(selector);\r\n        this.removeTagElement(meta);\r\n    };\r\n    /**\r\n     * Removes given meta element from the dom.\r\n     *\r\n     *  ### Example\r\n     *  ```ts\r\n     * const elem: HTMLMetaElement = this.meta.getTag('name=description');\r\n     * this.meta.removeTagElement(elem);\r\n     * ```\r\n     *\r\n     * @param meta meta element\r\n     */\r\n    Meta.prototype.removeTagElement = function (meta) {\r\n        if (meta) {\r\n            this._removeMetaElement(meta);\r\n        }\r\n    };\r\n    Meta.prototype.setTitle = function (title) {\r\n        this._document.title = title;\r\n    };\r\n    Meta.prototype._addInternal = function (tag) {\r\n        var meta = this._createMetaElement();\r\n        this._prepareMetaElement(tag, meta);\r\n        this._appendMetaElement(meta);\r\n        return meta;\r\n    };\r\n    Meta.prototype._createMetaElement = function () {\r\n        return this._dom.createElement('meta');\r\n    };\r\n    Meta.prototype._prepareMetaElement = function (tag, el) {\r\n        var _this = this;\r\n        Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\r\n        return el;\r\n    };\r\n    Meta.prototype._appendMetaElement = function (meta) {\r\n        var head = this._document.head;\r\n        this._dom.appendChild(head, meta);\r\n    };\r\n    Meta.prototype._removeMetaElement = function (meta) {\r\n        var head = this._dom.parentElement(meta);\r\n        this._dom.removeChild(head, meta);\r\n    };\r\n    Meta.prototype._flattenArray = function (input, out) {\r\n        if (out === void 0) { out = []; }\r\n        if (input) {\r\n            for (var i = 0; i < input.length; i++) {\r\n                var item = input[i];\r\n                if (Array.isArray(item)) {\r\n                    this._flattenArray(item, out);\r\n                }\r\n                else if (item) {\r\n                    out.push(item);\r\n                }\r\n            }\r\n        }\r\n        return out;\r\n    };\r\n    Meta = __decorate([\r\n        core_1.Injectable(),\r\n        __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n        __metadata('design:paramtypes', [Object])\r\n    ], Meta);\r\n    return Meta;\r\n}());\r\nexports.Meta = Meta;\r\n\n\n/***/ })\n\n},[898]);\n\n\n// WEBPACK FOOTER //\n// main.bundle.js","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport { ApplicationService } from '../services/core/application.service';\r\n\r\n@Injectable()\r\nexport class Mappings {\r\n  /* base urls */\r\n  public Web_Api_Base_Url: string = this.application.config.apiUrl;\r\n\r\n  /* Google key for map */\r\n  public Google_Maps_Key = \"AIzaSyBXymPQfgG39aceYOuzkdVynFoFRf3lMKc\";\r\n\r\n  constructor(private application: ApplicationService) {\r\n  }\r\n\r\n  /* web api urls */\r\n  static Web_Api_Get_Token_Url: string = \"/token\";\r\n  public Web_Api_Get_Token_Url: string = this.Web_Api_Base_Url + \"/token\";\r\n  public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n  public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n  public Web_Api_Get_Template_Url = this.Web_Api_Base_Url + \"/template/getTemplateHtml/{type}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Default_Company = this.Web_Api_Base_Url + \"/company/getdefault\";\r\n  public Web_Api_Get_Article_List = this.Web_Api_Base_Url + \"/article/getarticlelist/{category}/{listtype}/{lang}\";\r\n  public Web_Api_Get_News_Details = this.Web_Api_Base_Url + \"/article/getarticledetailsbyid/{lang}/{id}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Article_By_Url = this.Web_Api_Base_Url + \"/article/getarticledetailsbyseourl/{lang}/{userid}/{cartid}/{seoUrl}\";\r\n  public Web_Api_Get_Article_Category_By_Id = this.Web_Api_Base_Url + \"/article/getcategorybyid/{categoryId}/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Article_Category_By_Url = this.Web_Api_Base_Url + \"/article/getcategorybyurl/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid/{categoryUrl}\";\r\n  public Web_Api_Get_Article_List_Category = this.Web_Api_Base_Url + \"/article/getarticlelistcategory/{lang}\";\r\n  public Web_Api_Get_Article_By_Category_Id = this.Web_Api_Base_Url + \"/article/getarticledetailsbycategoryid/{categoryId}/{lang}/{startRowIndex}/{maxRows}\";\r\n  public Web_Api_Get_Blog_Data = this.Web_Api_Base_Url + \"/article/getblogdata/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Cms_Menu_List = this.Web_Api_Base_Url + \"/menu/getcmsmenus/{id}/{lang}\";\r\n  public Web_Api_Get_FaqData = this.Web_Api_Base_Url + \"/article/getfaqdata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Post_Newsletter_Subscribe = this.Web_Api_Base_Url + \"/newsletter/subscribe/{email}/{lang}\";\r\n  public Web_Api_Get_Newsletter_Page_Data = this.Web_Api_Base_Url + \"/newsletter/pagedata/{lang}\";\r\n  public Web_Api_Get_Newsletter_Confirmation_Page_Data = this.Web_Api_Base_Url + \"/newsletter/confirmationpage/{lang}\";  \r\n  public Web_Api_Get_Wizard_Data_Address = this.Web_Api_Base_Url + \"/quoting/getwizarddata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n  public Web_Api_Get_Category_Details = this.Web_Api_Base_Url + \"/inventory/getcategory/{categoryId}/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}\";\r\n  public Web_Api_Get_Catalog_Categories_Data = this.Web_Api_Base_Url + \"/inventory/getcatalogcategoriesdata/{lang}/{currency}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Catalog_Categories_Price_Data = this.Web_Api_Base_Url + \"/inventory/getcategorypricedata/{categoryId}/{customerid}/{lang}/{currency}\";  \r\n  public Web_Api_Get_Category_By_Url = this.Web_Api_Base_Url + \"/inventory/getcategorybyseourl/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}/{seoUrl}\";\r\n  public Web_Api_Post_Send_Category_Info_Request = this.Web_Api_Base_Url + \"/inventory/getcategoryinfo\";\r\n  public Web_Api_Get_Product_Details = this.Web_Api_Base_Url + \"/inventory/getproduct/{productType}/{productId}/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}\";\r\n  public Web_Api_Get_Price_Data = this.Web_Api_Base_Url + \"/inventory/getproductpricedata/{productId}/{lang}/{customerid}/{currency}\";  \r\n  public Web_Api_Get_Products_In_Promotion_Data = this.Web_Api_Base_Url + \"/inventory/getproductsinpromotiondata/{lang}/{currency}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Product_By_Url = this.Web_Api_Base_Url + \"/inventory/getproductbyseourl/{lang}/{customerid}/{currency}/{cartid}/{templatebuilderid}/{seoUrl}\";\r\n  public Web_Api_Post_Send_Info_Request = this.Web_Api_Base_Url + \"/info/contactrequest\";\r\n  public Web_Api_Post_Send_Login_Request = this.Web_Api_Base_Url + \"/account/login\";\r\n  public Web_Api_Post_User_Authentification = this.Web_Api_Base_Url + \"/account/authentificateuser\";\r\n  public Web_Api_Recover_Password = this.Web_Api_Base_Url + \"/account/passwordrequest\";\r\n  public Web_Api_Get_Recover_Password_Data = this.Web_Api_Base_Url + \"/account/getrecoverpassworddata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Post_Register = this.Web_Api_Base_Url + \"/account/register\";\r\n  public Web_Api_Get_Register_Data = this.Web_Api_Base_Url + \"/account/registerdata/{lang}/{userid}/{cartid}/{templatebuilderid}\";\r\n  public Web_Api_Get_Registration_Complete_Page_Data = this.Web_Api_Base_Url + \"/registration/confirmationpage/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Post_Confirm_Registration = this.Web_Api_Base_Url + \"/account/activate/{id}\";\r\n  public Web_Api_Get_Save_Cart = this.Web_Api_Base_Url + \"/cart/postsavecartinfo/{userId}/{cartId}/{paymentId}/{shipmentId}\";\r\n  public Web_Api_Set_Cart_Voucher = this.Web_Api_Base_Url + \"/cart/setvoucher\";\r\n  public Web_Api_Set_Job_Name = this.Web_Api_Base_Url + \"/cart/setcartjobname\";\r\n  public Web_Api_Set_Cart_Address = this.Web_Api_Base_Url + \"/cart/setcartaddress\";\r\n  public Web_Api_Post_Cart_Confirm_Order = this.Web_Api_Base_Url + \"/cart/confirmorder\";\r\n  public Web_Api_Get_Cart_Payment_Shipment = this.Web_Api_Base_Url + \"/cart/getcartpaymentshipment/{userId}/{cartId}/{lang}/{currency}\";\r\n  public Web_Api_Get_Client_Area_Details = this.Web_Api_Base_Url + \"/clientarea/getdetails/{id}/{lang}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_User_Profile = this.Web_Api_Base_Url + \"/clientarea/getuserprofile/{userId}/{lang}/{cartid}\";\r\n  public Web_Api_Post_Client_Area_Add_New_Address = this.Web_Api_Base_Url + \"/clientarea/adduseraddress\";\r\n  public Web_Api_Post_Client_Area_Update_User_Password = this.Web_Api_Base_Url + \"/clientarea/updateuserpassword\";\r\n  public Web_Api_Post_Client_Area_Update_User_Profile = this.Web_Api_Base_Url + \"/clientarea/updateuserprofile\";\r\n  public Web_Api_Post_Client_Area_Update_User_Address = this.Web_Api_Base_Url + \"/clientarea/updateuseraddresses\";\r\n  public Web_Api_Post_Client_Area_Remove_Address = this.Web_Api_Base_Url + \"/clientarea/removeuseraddress\";\r\n  public Web_Api_Get_Client_Area_Order_Details = this.Web_Api_Base_Url + \"/clientarea/getorderdetails/{userId}/{orderId}/{lang}/{currency}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_Catalog_Private = this.Web_Api_Base_Url + \"/clientarea/getcatalogprivate/{userId}/{lang}/{currency}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_Order_List = this.Web_Api_Base_Url + \"/clientarea/getorderlist/{userId}/{dateFrom}/{dateTo}/{orderNumber}/{orderStatus}/{lang}/{currency}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_Invoices = this.Web_Api_Base_Url + \"/clientarea/getinvoiceslist/{userId}/{orderNumber}/{invoiceNumber}/{documentType}/{lang}/{currency}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_Order_Send_Message = this.Web_Api_Base_Url + \"/clientarea/postsendprocessordermessage\";\r\n  public Web_Api_Get_Client_Area_Proccess_Order_File = this.Web_Api_Base_Url + \"/clientarea/getorderprocessfiles\";\r\n  public Web_Api_Get_Client_Area_Update_Bonifico_Payment = this.Web_Api_Base_Url + \"/clientarea/updatebonificopaymentdetails\";\r\n  public Web_Api_Get_Configuration = this.Web_Api_Base_Url + \"/config/getconfiguration/{lang}\";\r\n  public Web_Api_Get_Routes = this.Web_Api_Base_Url + \"/config/getroutes/{lang}\";\r\n  public Web_Api_Get_Header_Data = this.Web_Api_Base_Url + \"/cms/getheaderdata/{lang}/{userid}/{cartid}/{currency}/{templatebuilderid}\";\r\n  public Web_Api_Get_Footer_Data = this.Web_Api_Base_Url + \"/cms/getfooterdata/{lang}/{currency}\";\r\n  public Web_Api_Get_Side_Menu_Data = this.Web_Api_Base_Url + \"/cms/getsidemenudata/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Home_Page_Data = this.Web_Api_Base_Url + \"/cms/gethomepagedata/{lang}\";\r\n  public Web_Api_Get_Home_Page_Data_Optimized = this.Web_Api_Base_Url + \"/cms/gethomepagedataoptimized/{lang}/{userid}/{cartid}/{currency}/{templatebuilderid}\";\r\n  public Web_Api_Get_Home_HilightPromoProduct = this.Web_Api_Base_Url + \"/cms/getproducthilightpromo/{lang}\";\r\n  public Web_Api_Get_Info_Request_Data = this.Web_Api_Base_Url + \"/cms/getinforequestdata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Privacy_Policy_Data = this.Web_Api_Base_Url + \"/privacypolicy/getprivacypolicydata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Cookie_Policy_Data = this.Web_Api_Base_Url + \"/cookiepolicy/getcookiepolicydata/{lang}/{cartid}/{userid}\";\r\n  public Web_Api_Get_Purchase_Condition_Data = this.Web_Api_Base_Url + \"/puchasecondition/puchaseconditiondata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Slider_Data = this.Web_Api_Base_Url + \"/slider/getsliderdata/{lang}/{id}/{type}\";\r\n  public Web_Api_Get_Seo_Data = this.Web_Api_Base_Url + \"/cms/gethomepageseodata/{lang}\";\r\n  public Web_Api_Get_Shopping_Cart_Data = this.Web_Api_Base_Url + \"/cms/getcartdata/{userid}/{cartid}/{lang}/{currency}\";\r\n  public Web_Api_Get_Shopping_Cart_Cash_Data = this.Web_Api_Base_Url + \"/cms/getcartcashdata/{userid}/{cartid}/{lang}/{currency}\";\r\n  public Web_Api_Get_Shopping_Cart_Submitted_Data = this.Web_Api_Base_Url + \"/cms/getcartsubmitteddata/{userid}/{orderid}/{lang}/{currency}/{cartid}\";\r\n  public Web_Api_Get_Client_Area_Messages = this.Web_Api_Base_Url + \"/clientarea/setmessagesasread\";\r\n  public Web_Api_Add_Static_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproducttocart\";\r\n  public Web_Api_Add_Static_Product_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproductscontisticatocart\";\r\n  public Web_Api_Add_Matrix_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addmatrixproducttocart\";\r\n  public Web_Api_Get_Offline_Page_Data = this.Web_Api_Base_Url + \"/cms/getofflinepagedata/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Get_Login_Page_Data = this.Web_Api_Base_Url + \"/cms/loginpage/{lang}/{userid}/{cartid}/{templatebuilderid}\";\r\n  public Web_Api_Set_Cart_Payment = this.Web_Api_Base_Url + \"/cart/setcartpayment\";\r\n  public Web_Api_Empty_Cart_Page = this.Web_Api_Base_Url + \"/cart/emptycartpage/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Set_Cart_Shipment = this.Web_Api_Base_Url + \"/cart/setcartshipping\";\r\n  public Web_Api_Remove_From_Cart = this.Web_Api_Base_Url + \"/cart/removefromcart\";\r\n  public Web_Api_Post_Cancel_Order = this.Web_Api_Base_Url + \"/clientarea/postcancelorder/{userId}/{orderId}\";\r\n  public Web_Api_Post_Get_Bonifico_Uploaded_Files = this.Web_Api_Base_Url + \"/clientarea/getorderbonificofiles\";\r\n  public Web_Api_Add_Wizard_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoproducttocart\";\r\n  public Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoscontisticaproducttocart\";\r\n  public Web_Api_Add_Wizard_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinostandardproducttocart\";\r\n  public Web_Api_Add_Wizard_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticaproducttocart\";\r\n  public Web_Api_Update_Prev_Canvas_Info = this.Web_Api_Base_Url + \"/cart/updateprevcanvasinfo\";\r\n  public Web_Api_Add_Other_Product_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinotocart\";\r\n  public Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinoscontisticatocart\";\r\n  public Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductcalcolatoscontisticatocart\";\r\n  public Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatotocart\";\r\n  public Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatoscontisticatocart\";\r\n  public Web_Api_Get_Other_Product_Form_Data = this.Web_Api_Base_Url + \"/quoting/getotherproductformdata/{lang}/{productid}/{userId}/{templatebuilderid}\";\r\n  public Web_Api_Get_Script = this.Web_Api_Base_Url + \"/cms/getscript/{rowid}/{type}/{lang}\";\r\n  public Web_Api_Get_Wizard_Editoria_Data = this.Web_Api_Base_Url + \"/quoting/getwizardeditoriadata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Wizard_Commerciale_Data = this.Web_Api_Base_Url + \"/quoting/getwizardcommercialedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Check_If_Param_Exists_In_Db = this.Web_Api_Base_Url + \"/account/checkifexists/{type}/{value}\";\r\n  public Web_Api_Set_Order_As_Payed = this.Web_Api_Base_Url + \"/clientarea/setorderaspaid\";\r\n  public Web_Api_Get_Head_Foot_Data = this.Web_Api_Base_Url + \"/template/getheadfootdata/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Wizard_Etichette_Data = this.Web_Api_Base_Url + \"/quoting/getwizardetichettedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Post_Get_Wizard_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getwizardpriceestimation\";\r\n  public Web_Api_Post_Send_Request_Info_Wizard = this.Web_Api_Base_Url + \"/quoting/sendrequestinfo\";\r\n  public Web_Api_Get_Wizard_Buste_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbustedata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Wizard_Adesivi_Data = this.Web_Api_Base_Url + \"/quoting/getwizardadesividata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Wizard_Banner_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbannerdata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Get_Wizard_Stampa_Data = this.Web_Api_Base_Url + \"/quoting/getwizardstampadata/{modelType}/{resourceId}/{userId}/{lang}/{templatebuilderid}\";\r\n  public Web_Api_Post_Get_Ap_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getappriceestimation\";\r\n  public Web_Api_Add_Wizard_Buste_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinobustetocart\";\r\n  public Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticabustetocart\";\r\n  public Web_Api_Check_Is_Order_Payed_Unicredit = this.Web_Api_Base_Url + \"/pagonline/verifyunicreditpayment/{orderId}\";\r\n  public Web_Api_Get_Product_And_Categories = this.Web_Api_Base_Url + \"/article/getsearchresults/{startRowIndex}/{maxRows}/{lang}/{query}\";\r\n  public Web_Api_Get_Script_Head = this.Web_Api_Base_Url + \"/cms/getscripthead/{rowid}/{type}/{lang}\";\r\n  public Web_Api_Get_Information_ThankYouPage_Paypal_Url = this.Web_Api_Base_Url + \"/template/getthankyoupagepaypalinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n  public Web_Api_Get_Information_ThankYouPage_PagOnline_Url = this.Web_Api_Base_Url + \"/pagonline/getthankyoupagepagonlineinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n  public Web_Api_Get_Information_ThankYouPage_Nexi_Url = this.Web_Api_Base_Url + \"/nexi/getthankyoupagenexiinfo/{type}/{orderid}/{messaggio}/{data}/{orario}/{lang}/{cartid}/{userid}\";\r\n  public Web_Api_Get_Information_ThankYouPage_BancaSella_Url = this.Web_Api_Base_Url + \"/bancasella/getthankyoupagebancasellainfo/{type}/{orderid}/{messaggio}/{lang}/{cartid}/{userid}\";\r\n  public Web_Api_Get_Template_Url_Page_Not_Found = this.Web_Api_Base_Url + \"/template/getcomponenttemplatepagenotfound/{type}/{lang}/{userid}/{cartid}\";\r\n  public Web_Api_Delete_Customers_Canvas_State = \"/api/users/{userId}/states/{stateId}\";\r\n  public Web_Api_Create_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/createpaypalpayment\";\r\n  public Web_Api_Execute_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/executepaypalpayment\";\r\n  public Web_Api_Get_Trustpilot_Data = this.Web_Api_Base_Url + \"/gettrustpilotdata/{type}/{lang}\";\r\n  public Web_Api_Get_DefaultCurrency = this.Web_Api_Base_Url + \"/config/getdefaultcurrency\";\r\n  public Web_Api_Get_Client_Area_Riorder_List = this.Web_Api_Base_Url + \"/clientarea/getriorderlist/{orderid}/{lang}/{currency}\";\r\n  public Web_Api_Get_Client_Area_CalculatePrice_Riorder = this.Web_Api_Base_Url + \"/clientarea/calculatepriceriorder\";\r\n  public Web_Api_Get_Client_Area_Get_Cart_Riorder = this.Web_Api_Base_Url + \"/cart/getcartforriorder/{userId}/{cartId}/{lang}\";\r\n  public Web_Api_Get_Client_Area_Add_Product_To_Cart_Riorder = this.Web_Api_Base_Url + \"/cart/addproductriordertocart\";\r\n  \r\n  public Canvas_Web_Api_Base_Url = \"https://h.customerscanvas.com/Users/{apiKey}/SimplePolygraphy\";\r\n  public Paypal_JS_Lirary_Url = \"https://www.paypalobjects.com/api/checkout.js\";\r\n\r\n  /* constants */\r\n  public Auth_User_Cookie: string = \"Auth_User\";\r\n  public WscPrinter_Lang: string = \"WscPrinter_Lang\";\r\n  public Default_Lang: string = \"it\";\r\n\r\n  /* images */\r\n  public Offers_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/OFFERTE.jpg\";\r\n  public Products_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/prodotti.jpg\";\r\n  public WizardCheck_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Check-icon.png\";\r\n  public WizardAlert_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Alert-icon.png\";\r\n  public UserLoginImg_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/customer.jpg\";\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/mapping.ts","import { Injectable, Inject, Renderer } from '@angular/core';\r\nimport { Meta } from './../../services/core/angular2-meta';\r\nimport { SeoViewModel } from \"./../../models/core/seo\";\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n\r\nexport interface LinkDefinition {\r\n    charset?: string;\r\n    crossorigin?: string;\r\n    href?: string;\r\n    hreflang?: string;\r\n    media?: string;\r\n    rel?: string;\r\n    rev?: string;\r\n    sizes?: string;\r\n    target?: string;\r\n    type?: string;\r\n    [prop: string]: string;\r\n}\r\n\r\n@Injectable()\r\nexport class SeoService {\r\n    private _dom: DomAdapter = getDOM();\r\n    constructor(@Inject(DOCUMENT) private _document: any,\r\n        private metaService: Meta,\r\n        private translate: TranslateService,\r\n    ) {\r\n    }\r\n\r\n    setSeoInformation(seoInformation: SeoViewModel) {\r\n        this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: seoInformation.Keywords })\r\n        this.metaService.updateTag('name=Description', { name: 'Description', content: seoInformation.Description })\r\n        this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: seoInformation.Description })\r\n        this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: seoInformation.Title })\r\n        this.metaService.updateTag('name=Robots', { name: 'Robots', content: seoInformation.SeoRobots })\r\n        this.metaService.setTitle(seoInformation.Title);\r\n        this.updateCanonicalTag('link', { rel: 'canonical', href: seoInformation.Url })\r\n    }\r\n\r\n    setSeoUserArea(url: string) {\r\n        this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: \"\" })\r\n        this.metaService.updateTag('name=Description', { name: 'Description', content: \"\" })\r\n        this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: \"\" })\r\n        this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: \"\" })\r\n        this.metaService.updateTag('name=Robots', { name: 'Robots', content: \"index,follow\" })\r\n        let title = this.getLabel(\"user_area\");\r\n        this.metaService.setTitle(title);\r\n\r\n        this.updateCanonicalTag('link', { rel: 'canonical', href: url })\r\n    }\r\n\r\n    getLabel(label) {\r\n        let message;\r\n\r\n        this.translate.get(label, this.translate).subscribe((res: string) => {\r\n            message = res;\r\n        });\r\n\r\n        return message;\r\n    }\r\n\r\n    getCanonicalLink(selector: string): HTMLLinkElement {\r\n        if (!selector) return null;\r\n        return this._dom.query(selector);\r\n    }\r\n\r\n    updateCanonicalTag(selector: string, tag: LinkDefinition): HTMLLinkElement {\r\n        const canonical: HTMLLinkElement = this.getCanonicalLink(selector);\r\n        if (!canonical) {\r\n            //create element if it doesn't exist\r\n            return this._addInternalCanonical(tag);\r\n        }\r\n        return this._prepareLinkElement(tag, canonical);\r\n    }\r\n\r\n    //-- *********************************** ANGULAR SERVER SIDE SEO SETUP START ***********************************\r\n    generateSeoDomServerSide(document, renderer: Renderer, seoData: SeoViewModel) {\r\n        let rootElement, h1, h2, h3, linkEl, nodeList, description;\r\n        if (!seoData)\r\n            return;\r\n\r\n        //-- Creating root element which will be hidden, but available for crawling\r\n        rootElement = renderer.createElement(document.body, 'div');\r\n        renderer.setElementClass(rootElement, 'd-none', true);\r\n\r\n        nodeList = [];\r\n\r\n        //-- Creating h1 element\r\n        if (seoData.H1) {\r\n            h1 = renderer.createElement(document.body, 'h1');\r\n            renderer.createText(h1, seoData.H1);\r\n            nodeList.push(h1);\r\n        }\r\n\r\n        //-- Creating h2 element\r\n        if (seoData.H2) {\r\n            h2 = renderer.createElement(document.body, 'h2');\r\n            renderer.createText(h2, seoData.H2);\r\n            nodeList.push(h2);\r\n        }\r\n\r\n        //-- Creating h3 element\r\n        if (seoData.H3) {\r\n          //console.log(\"qui\")\r\n          if(!seoData.H3.includes(\"<iframe\"))\r\n          {\r\n            h3 = renderer.createElement(document.body, 'h3');\r\n            renderer.createText(h3, seoData.H3);\r\n            nodeList.push(h3);\r\n          }\r\n        }\r\n\r\n        //-- Creating p short description element\r\n        if (seoData.ShortDescription) {\r\n            description = renderer.createElement(document.body, 'p');\r\n            renderer.setElementProperty(description,'innerHTML',seoData.ShortDescription)\r\n            nodeList.push(description);\r\n        }\r\n\r\n        //-- Creating p short description element\r\n        if (seoData.LongDescription) {\r\n            description = renderer.createElement(document.body, 'p');\r\n            renderer.setElementProperty(description,'innerHTML',seoData.LongDescription)\r\n            nodeList.push(description);\r\n        }\r\n        //-- Appending all elements to the root element as a children\r\n        renderer.projectNodes(rootElement, nodeList);\r\n\r\n        //generate sitemap list for all pages\r\n        this.generateSiteMapList(document, seoData.SiteMapList);\r\n    }\r\n\r\n    generateSiteMapList(document, siteMapHtml) {\r\n        let stringToInject = \"<ul class='d-none'>\";\r\n        //this.appendHtmlString(document.body,\"<ul>\");\r\n        siteMapHtml.forEach(element => {\r\n            stringToInject += \"<li>\" + element + \"</li>\"\r\n        });\r\n        stringToInject += \"</ul>\";\r\n        //this.appendHtmlString(document.body,\"</ul>\");\r\n        this.appendHtmlString(document.body, stringToInject);\r\n    }\r\n\r\n    appendHtmlString(el: any, template: string) {\r\n        let div = this._dom.createElement('');\r\n        this._dom.setInnerHTML(div, template);\r\n        this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n    }\r\n\r\n    appendScriptsToDOM(el: any, template: string) {\r\n        let div = this._dom.createElement('div');\r\n        this._dom.setInnerHTML(div, template);\r\n\r\n        let listEl = this._dom.childNodesAsList(div);\r\n        listEl.forEach(element => this._dom.insertAfter(el.lastChild, element));\r\n    }\r\n\r\n    setSeoMetaData(document, renderer: Renderer, seoData: SeoViewModel, imgLink = \"\") {\r\n        //console.log( seoData)\r\n        if (!seoData)\r\n            return;\r\n        //console.log( seoData.Title)\r\n        this.updateMetaDataTitle(renderer, seoData.Title || '');\r\n        //-- Setting canonicals\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'link', 'rel', 'canonical', 'href', seoData.Url || '');\r\n\r\n        //-- Setting meta tags and open graph tags\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Keywords', 'content', seoData.Keywords || '');\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Robots', 'content', seoData.SeoRobots || '');\r\n        this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'description', 'content', seoData.Description || '');\r\n\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:description', 'content', seoData.Description || '');\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:title', 'content', seoData.Title || '');\r\n        if (imgLink != null && imgLink.length > 0) {\r\n            this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:image', 'content', imgLink || '');\r\n        }\r\n        this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:type', 'content', 'article');\r\n\r\n    }\r\n\r\n    //-- Updating of title for seo optimization\r\n    updateMetaDataTitle(renderer: Renderer, value) {\r\n        if (renderer && value)\r\n            renderer.setText(renderer.selectRootElement('title'), value);\r\n    }\r\n\r\n    //-- Creating meta attributes for seo\r\n    createMetaTagUniversalAttribute(document, renderer: Renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond = \"\", valueSecond = \"\") {\r\n        let elem = renderer.createElement(document.head, elementType);\r\n        if (propertyNameFirst && valueFirst) {\r\n            renderer.setElementAttribute(elem, propertyNameFirst, valueFirst);\r\n        }\r\n\r\n        if (propertyNameSecond && valueSecond)\r\n            renderer.setElementAttribute(elem, propertyNameSecond, valueSecond);\r\n    }\r\n\r\n    //-- Creating meta properties for social networks seo\r\n    createMetaTagUniversalProperty(document, renderer: Renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond = \"\", valueSecond = \"\") {\r\n        let elem = renderer.createElement(document.head, elementType);\r\n        if (propertyNameFirst && valueFirst) {\r\n            renderer.setElementProperty(elem, propertyNameFirst, valueFirst);\r\n        }\r\n\r\n        if (propertyNameSecond && valueSecond)\r\n            renderer.setElementProperty(elem, propertyNameSecond, valueSecond);\r\n    }\r\n\r\n    //-- ************************************ ANGULAR SERVER SIDE SEO SETUP END*************************************\r\n\r\n    private _addInternalCanonical(tag: LinkDefinition): HTMLLinkElement {\r\n        const canonical: HTMLLinkElement = this._createLinkElement();\r\n        this._prepareLinkElement(tag, canonical);\r\n        this._appendLinkElement(canonical);\r\n        return canonical;\r\n    }\r\n\r\n    private _prepareLinkElement(tag: LinkDefinition, el: HTMLLinkElement): HTMLLinkElement {\r\n        Object.keys(tag).forEach((prop: string) => this._dom.setAttribute(el, prop, tag[prop]));\r\n        return el;\r\n    }\r\n\r\n    private _appendLinkElement(meta: HTMLLinkElement): void {\r\n        const head = this._document.head;\r\n        this._dom.appendChild(head, meta);\r\n    }\r\n\r\n    private _createLinkElement(): HTMLLinkElement {\r\n        return this._dom.createElement('link') as HTMLLinkElement;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/seo.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { News } from \"./../../models/cms/news-list\";\r\nimport { LanguageService } from './language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n\r\n@Injectable()\r\nexport class ArticleService {\r\n  constructor\r\n    (\r\n    public _api: ApiService,\r\n    public _cache: CacheService,\r\n    private mappings: Mappings,\r\n    private languageService: LanguageService,\r\n    private cartService: ShoppingCartService,\r\n    private authService: AuthService\r\n    ) { }\r\n\r\n  getArticleList(category: string, listtype: string) {\r\n    let lang = this.languageService.getLongLang();\r\n\r\n    let url = this.mappings.Web_Api_Get_Article_List.replace('{category}', category).replace('{listtype}', listtype).replace('{lang}', lang);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getArticleDetails(id: number, lang: string) {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_News_Details.replace('{lang}', lang).replace('{id}', id.toString()).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getArticleByUrl(lang: string, seoUrl: string) {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();   \r\n    let url = this.mappings.Web_Api_Get_Article_By_Url.replace('{lang}', lang).replace('{seoUrl}', seoUrl).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url)\r\n  }\r\n\r\n  GetArticleByCategoryIdandRows(categoryId: number, lang: string, startRowIndex: number, maxRows: number) {\r\n    let url = this.mappings.Web_Api_Get_Article_By_Category_Id.replace('{categoryId}', categoryId.toString()).replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString());\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getBlogData(lang: string, startRowIndex: number, maxRows: number) {\r\n    let numberOfItems: number = 15;\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Blog_Data.replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString()).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n    let key = url;\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getArticleListCategory(lang: string) {\r\n    let url = this.mappings.Web_Api_Get_Article_List_Category.replace('{lang}', lang);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getCategoryArticleById(categoryId: string, lang: string, startRowIndex: number, maxRows: number) {\r\n\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_Article_Category_By_Id\r\n      .replace('{categoryId}', categoryId)\r\n      .replace('{lang}', lang)\r\n      .replace('{startRowIndex}', startRowIndex.toString())\r\n      .replace('{maxRows}', maxRows.toString())\r\n      .replace('{userid}', customerId)\r\n \t    .replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getArticleCategoryByUrl(lang: string, categoryUrl: string, startRowIndex: number, maxRows: number) {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_Article_Category_By_Url\r\n      .replace('{lang}', lang)\r\n      .replace('{startRowIndex}', startRowIndex.toString())\r\n      .replace('{maxRows}', maxRows.toString())\r\n      .replace('{categoryUrl}', categoryUrl)\r\n      .replace('{userid}', customerId)\r\n \t    .replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url)\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/article.service.ts","import { Observable } from 'rxjs/Observable';\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject }    from 'rxjs'; \r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from \"../core/auth.service\";\r\nimport { UserLogin } from \"../../models/cms/user-login\";\r\n\r\n@Injectable()\r\nexport class HeaderService \r\n{\r\n  constructor\r\n    (\r\n      public _api: ApiService,\r\n      private authService: AuthService\r\n    ) {\r\n  }\r\n\r\n  toShowQuickRegistration: boolean = false;\r\n\r\n  // Observable source of logged in user\r\n  private loginInfo: UserLogin = this.authService.GetData();\r\n  private loggedInUser = new BehaviorSubject<UserLogin>(this.loginInfo);\r\n\r\n  getLoggedInUser(): Observable<UserLogin> {\r\n    return this.loggedInUser.asObservable();\r\n  }\r\n\r\n  setLoggedInUser(user: UserLogin)\r\n  {\r\n    this.loggedInUser.next(user);\r\n  }\r\n\r\n  setToShowQuickRegistration(toShow: boolean)\r\n  {\r\n    this.toShowQuickRegistration = toShow;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/header.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { URLSearchParams, Headers } from '@angular/http';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { AppConfig } from '../../models/core/app-config';\r\nimport { ApiService } from './api.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\nimport { NodeLoggerService } from './node-logger.service';\r\n\r\n@Injectable()\r\nexport class ApplicationService {\r\n  static ACCESS_TOKEN_KEY: string = 'accessToken';\r\n  static APPLICATION_CONFIG: string = 'ApplicationConfig';\r\n\r\n  public get accessToken(): string {\r\n    return this.cookie.get(ApplicationService.ACCESS_TOKEN_KEY);\r\n  }\r\n\r\n  public config: AppConfig;\r\n\r\n  constructor(private api: ApiService,\r\n              @Inject('isNode') private isNode: boolean,\r\n              @Inject('CookieService') private cookie: CookieService,\r\n              private cache: CacheService,\r\n              private nodeLogger: NodeLoggerService) {\r\n    this.getConfig();\r\n  }\r\n\r\n  public getToken(): Observable<any> {\r\n    if (!this.isNode /*|| 'string' === typeof this.accessToken*/) {\r\n      return;\r\n    }\r\n\r\n    var startDate = new Date();\r\n\r\n    let params = this.getCredentialsParams();\r\n    let headers = new Headers();\r\n    headers.append('Content-Type', 'application/x-www-form-urlencoded');\r\n    return this.api\r\n      .post(`${this.config.apiUrl}${Mappings.Web_Api_Get_Token_Url}`, params, {headers})\r\n      .do(({access_token}) => {\r\n        if (access_token) {\r\n          this.cache.set('__ACCESS_TOKEN__', access_token);\r\n          this.cookie.put(ApplicationService.ACCESS_TOKEN_KEY, access_token);\r\n        }\r\n      });\r\n  }\r\n\r\n  private getCredentialsParams() {\r\n    let config = this.getConfig();\r\n    let params = new URLSearchParams();\r\n    params.set('grant_type', 'password');\r\n    params.set('username', config.credentials.username);\r\n    params.set('password', config.credentials.password);\r\n    return params;\r\n  }\r\n\r\n  public getConfig(): any {\r\n    if (this.config) {\r\n      return this.config;\r\n    }\r\n    if (this.isNode) {\r\n      const fs = require('fs');\r\n      this.config = JSON.parse(fs.readFileSync('src/assets/config.json', 'utf8'));\r\n      this.setConfigToCache();\r\n    } else {\r\n      this.config = this.cache.get(ApplicationService.APPLICATION_CONFIG);\r\n    }\r\n    return this.config;\r\n  }\r\n\r\n  private setConfigToCache() {\r\n    let privateKeys = ['credentials'];\r\n    let configForCache = {};\r\n    for (let key in this.config) if (this.config.hasOwnProperty(key)) {\r\n      if (privateKeys.indexOf(key) === -1) {\r\n        configForCache[key] = this.config[key];\r\n      }\r\n    }\r\n    this.cache.set(ApplicationService.APPLICATION_CONFIG, configForCache);\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/application.service.ts","//Angular\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n//System\r\nimport { Mappings} from '../../shared/mapping'\r\n\r\n//Model\r\nimport { Company } from \"./../../models/core/company\";\r\n\r\n//Services\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\n\r\n@Injectable()\r\nexport class CompanyService {\r\n      constructor(public _api: ApiService, public _cache: CacheService, private mappings: Mappings) {\r\n     }\r\n\r\n    getCompany(){\r\n    let url =  this.mappings.Web_Api_Get_Default_Company;\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/company.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Http, Headers, RequestOptionsArgs, Response } from '@angular/http';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/throw';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\nimport 'rxjs/add/observable/empty';\r\n\r\nimport { CacheService } from './cache.service';\r\nimport { NodeLoggerService } from './node-logger.service';\r\nimport { CookieService } from './cookie';\r\n\r\nconst responseStatuses = {\r\n  noContent: 204,\r\n  authRequired: 401\r\n};\r\n\r\n@Injectable()\r\nexport class ApiService {\r\n\r\n  clientSideCaching:boolean = true;\r\n\r\n  constructor(private http: Http,\r\n              private cache: CacheService,\r\n              private nodeLogger: NodeLoggerService,\r\n              @Inject('isBrowser') private isBrowser: boolean,\r\n              @Inject('CookieService') private cookie: CookieService) {\r\n  }\r\n\r\n  /**\r\n   * whatever domain/feature method name\r\n   */\r\n  get(url: string, options?: RequestOptionsArgs): Observable<any> {\r\n    \r\n    if(this.clientSideCaching == false)\r\n    {\r\n      if (this.isBrowser && this.cache.has(url)) {\r\n        let obs = Observable.of(this.cache.get(url));\r\n        this.cache.clear(url);\r\n        return obs;\r\n      }\r\n      options = this.createAuthorizationHeader(options);\r\n      return this.http\r\n        .get(url, options)\r\n        .map(ApiService.extractData)\r\n        .do(json => {\r\n          if (!this.isBrowser) {\r\n            this.cache.set(url, json);\r\n          }\r\n        })\r\n        .catch((err: any) => this.handleError(err));\r\n    }\r\n    else\r\n    {\r\n\r\n      if (this.cache.has(url)) {\r\n        let obs = Observable.of(this.cache.get(url));\r\n        return obs;\r\n      }\r\n      options = this.createAuthorizationHeader(options);\r\n\r\n\r\n      var startDate = new Date();\r\n      this.nodeLogger.AddLogWithTime(\"START REQUEST \"+url);\r\n\r\n      return this.http\r\n        .get(url, options)\r\n        .map(ApiService.extractData)\r\n        .do(json => {\r\n\r\n          var endDate = new Date();\r\n\r\n          var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n          var diffMs = Math.ceil(timeDiff); \r\n\r\n          this.nodeLogger.AddLogWithTime(\"END REQUEST \"+url+\"(\"+diffMs+\")\");\r\n      \r\n            this.cache.set(url, json);\r\n        })\r\n        .catch((err: any) => this.handleError(err));\r\n    }\r\n\r\n  }\r\n\r\n    /**\r\n   * whatever domain/feature method name\r\n   */\r\n  getUniversalCached(url: string, options?: RequestOptionsArgs): Observable<any> {\r\n      if (this.isBrowser && this.cache.has(url)) {\r\n        \r\n        let obs = Observable.of(this.cache.get(url));\r\n        this.cache.clear(url);\r\n        return obs;\r\n      }\r\n\r\n      options = this.createAuthorizationHeader(options);\r\n      return this.http\r\n        .get(url, options)\r\n        .map(ApiService.extractData)\r\n        .do(json => {\r\n          if (!this.isBrowser) {\r\n            this.cache.set(url, json);\r\n          }\r\n        })\r\n        .catch((err: any) => this.handleError(err));\r\n  }\r\n\r\n  post(url, body?: any, options?: RequestOptionsArgs): Observable<any> {\r\n    options = this.createAuthorizationHeader(options);\r\n    return this.http\r\n      .post(url, body, options)\r\n      .map(ApiService.extractData)\r\n      .catch((err: any) => this.handleError(err));\r\n  }\r\n\r\n  private createAuthorizationHeader(options: RequestOptionsArgs = {}) {\r\n\r\n    //Token is read from cache and not cookie. \r\n    //Note: Before it was read form cookie and it was not containing the last token.\r\n    //Because the set cookie is done on the response and the get cookie is done on the request.\r\n    let token = this.cache.get('__ACCESS_TOKEN__');\r\n\r\n    if (token) {\r\n      if (!options.headers) {\r\n        options.headers = new Headers();\r\n      }\r\n\r\n      options.headers.append('Authorization', `Bearer ${token}`);\r\n    }\r\n\r\n    return options;\r\n  }\r\n\r\n\r\n  private static extractData(res: Response): {[key: string]: any} {\r\n    if (res.status === responseStatuses.noContent) {\r\n      return {};\r\n    }\r\n\r\n    let body = res.json();\r\n    return body || {};\r\n  }\r\n\r\n  private handleError(err): Observable<any> {\r\n\r\n    this.nodeLogger.AddLogWithTime(\"Error: \"+err);\r\n\r\n    let cookieToken = this.cookie.get('accessToken');\r\n    let cacheToken = this.cache.get('__ACCESS_TOKEN__');\r\n\r\n    if (!this.isBrowser) {\r\n      return Observable.empty();\r\n    }\r\n    \r\n    switch (err.status) {\r\n      case 401:\r\n        this.handleUnauthorized();\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n    return Observable.throw(err);\r\n  }\r\n\r\n  private handleUnauthorized() {\r\n    //If the token expires while using the application, the user is redirected to home page to get a new token and start navigation from there.\r\n    if (this.isBrowser)\r\n    {\r\n      window.location.href = \"/\";\r\n    }\r\n  }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/api.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';import { Router } from '@angular/router';\r\nimport { ApiService } from \"./api.service\";\r\nimport { Mappings } from \"../../shared/mapping\";\r\n\r\n@Injectable()\r\nexport class MessagesService {\r\n\r\n    constructor\r\n    (\r\n        protected router: Router,\r\n        protected _api: ApiService,\r\n        protected mappings: Mappings\r\n    ) {}\r\n\r\n    setMessagesAsRead(params) \r\n    {\r\n        let url = this.mappings.Web_Api_Get_Client_Area_Messages;\r\n        \r\n        return this._api.post(url, params);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/messages.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';import { Router } from '@angular/router';\r\nimport { ApiService } from \"./api.service\";\r\nimport { Mappings } from \"../../shared/mapping\";\r\n\r\n@Injectable()\r\nexport class ValidationService {\r\n\r\n    constructor\r\n    (\r\n        protected router: Router,\r\n        protected _api: ApiService,\r\n        protected mappings: Mappings\r\n    ) {}\r\n\r\n    //validation of phone numbers, disable writing any characters in input except of numbers    \r\n    validatePhoneNumber(event: any)\r\n    {\r\n        const pattern = /[0-9]/;\r\n        let inputChar = String.fromCharCode(event.charCode);\r\n    \r\n        if (!pattern.test(inputChar)) {\r\n          // invalid character, prevent input\r\n          event.preventDefault();\r\n        }\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/validation.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { ShoppingCartService } from './shopping-cart.service';\r\n\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\n\r\n@Injectable()\r\nexport class ProductService {\r\n  constructor(\r\n    public _api: ApiService,\r\n    public _cache: CacheService,\r\n    public currencyService: CurrencyService,\r\n    public ShoppingCartService: ShoppingCartService,\r\n    private mappings: Mappings,\r\n    private authService: AuthService) {\r\n  }\r\n\r\n  getProductDetails(productId: number, productType: string, lang: string) {\r\n\r\n    //Reading userId\r\n    let customerId = this.authService.getCurrentUserId();\r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Product_Details\r\n      .replace('{productId}', productId.toString())\r\n      .replace('{productType}', productType)\r\n      .replace('{lang}', lang)\r\n      .replace('{customerid}', customerId)\r\n      .replace('{currency}', curr)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getProductsPromotionsData(lang: string) {\r\n    let customerId = this.authService.getCurrentUserId();\r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Products_In_Promotion_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getProductDetailsBySeoUrl(lang: string, seoUrl: string) {\r\n\r\n    //Reading userId\r\n    let customerId = this.authService.GetUserId();\r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Product_By_Url\r\n      .replace('{lang}', lang)\r\n      .replace('{customerid}', customerId)\r\n      .replace('{currency}', curr)\r\n      .replace('{seoUrl}', seoUrl)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getPriceData(productId: number, lang: string) {\r\n    //Reading userId\r\n    let customerId = this.authService.getCurrentUserId();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Get_Price_Data\r\n      .replace('{productId}', productId.toString())\r\n      .replace('{lang}', lang)\r\n      .replace('{customerid}', customerId)\r\n      .replace('{currency}', curr);\r\n\r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/product.service.ts","import { Injectable, ViewContainerRef, Inject } from '@angular/core';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from \"../cms/language.service\";\r\n\r\nimport { SeoService } from '../core/seo.service';\r\nimport { Meta } from '../core/angular2-meta';\r\n\r\n\r\n@Injectable()\r\nexport class ScriptService {\r\n    private _dom: DomAdapter = getDOM();\r\n    constructor\r\n        (\r\n            public _api: ApiService,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private mappings: Mappings,\r\n            private language: LanguageService,\r\n            private seo: SeoService,\r\n            private metaService: Meta\r\n        ) { }\r\n\r\n    typeSystemPage: string = \"systemPage\";\r\n    typeArticleCategory: string = \"articleCategory\";\r\n    typeArticle: string = \"article\";\r\n    typeCmsPage: string = \"page\";\r\n    typeCatalogCategory: string = \"category\";\r\n    typeCatalogOtherProduct: string = \"otherProduct\";\r\n    typeCatalogProduct: string = \"product\";\r\n\r\n    infoRequestId: string = \"26\";\r\n    userAreaId: string = \"18\";\r\n    privacyPolicyId: string = \"36\";\r\n    purchaseConditionsId: string = \"37\";\r\n    faqsId: string = \"38\";\r\n    cookiesId: string = \"35\";\r\n    homeId: string = \"1\";\r\n    loginId: string = \"2\";\r\n    blogHomeId: string = \"40\";\r\n    productsCatalogId: string = \"29\";\r\n    promotionsId: string = \"16\";\r\n    cartId: string = \"12\";\r\n    cartCashId: string = \"15\";\r\n    cartSubmittedId: string = \"43\";\r\n    userRegistrationId: string = \"5\";\r\n    userRecoverPasswordId: string = \"7\";\r\n    subscriptionId: string = \"45\";\r\n    cartEmptyId: string = \"42\";\r\n    ThankYouPagePaypalId: string = \"47\";\r\n    ThankYouPagePagOnlineId: string = \"48\";\r\n    ThankYouNexiId: string = \"52\";\r\n    subscriptionConfirmationId: string = \"46\";\r\n    registrationCompletePageId: string = \"49\"\r\n    SearchPageId: string = \"50\"\r\n    SearchWithPagingPageId: string = \"51\"\r\n\r\n    getScript(type: string, rowId: string) {\r\n        //reading language\r\n        let longLang: string = this.language.getLongLang();\r\n\r\n        let url: string = this.mappings.Web_Api_Get_Script\r\n            .replace('{rowid}', rowId)\r\n            .replace('{type}', type)\r\n            .replace('{lang}', longLang)\r\n\r\n        return this._api.get(url);\r\n    }\r\n\r\n    getScriptHead(type: string, rowId: string) {\r\n        //reading language\r\n        let longLang: string = this.language.getLongLang();\r\n\r\n        let url: string = this.mappings.Web_Api_Get_Script_Head\r\n            .replace('{rowid}', rowId)\r\n            .replace('{type}', type)\r\n            .replace('{lang}', longLang)\r\n\r\n        return this._api.get(url);\r\n    }\r\n\r\n    checkIfScriptResponseIsValid(content) {\r\n        let retVal = true;\r\n        if (typeof content === 'object') //-- If it is object, it means that field is empty in backoffice\r\n        {\r\n            retVal = false\r\n        }\r\n        else if (typeof content === 'string') {\r\n            if (!content) {\r\n                retVal = false;\r\n            }\r\n        }\r\n        else {\r\n            retVal = false;\r\n        }\r\n\r\n        return retVal;\r\n    }\r\n\r\n    getSystemPageRowId_OrderId(PageRowId, OrderId) {\r\n        return PageRowId + \"_\" + OrderId;\r\n    }\r\n\r\n    setupExternalScripts(result, pageType, id) {\r\n        //-- Retrieving the script to append\r\n        if (result.SeoInformation.HasScripts) {\r\n            this.getScriptHead(pageType, id).subscribe(response => {\r\n                let isValidResponse = this.checkIfScriptResponseIsValid(response);\r\n                if (isValidResponse) {\r\n                    this.seo.appendScriptsToDOM(this.document.head, response);\r\n                }\r\n            });\r\n\r\n            this.getScript(pageType, id).subscribe(response => {\r\n                let isValidResponse = this.checkIfScriptResponseIsValid(response);\r\n                if (isValidResponse) {\r\n                    this.seo.appendScriptsToDOM(this.document.body, response);\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    setGoogleScripts(seoInfo,countRecursive=0) {\r\n        if (!seoInfo)\r\n            return;\r\n\r\n        //-- Updating title on client side\r\n        if (seoInfo.Title)\r\n            this.metaService.setTitle(seoInfo.Title);\r\n\r\n        //-- Update google analytics\r\n        if (seoInfo.HasScripts && seoInfo.AnalyticsId)\r\n        {\r\n            try {\r\n                gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\r\n            } catch (error) {\r\n                if(countRecursive>3)\r\n                {\r\n                return;\r\n                }\r\n                countRecursive++;\r\n                this.setGoogleScripts(seoInfo,countRecursive);\r\n            }\r\n        }\r\n            \r\n            \r\n            \r\n           \r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/script.service.ts","import { MyLavorazioneAccessoria } from \"../document/quoting-model\";\r\n\r\nexport class wizardFormEditoriaModel {\r\n    numCopie: string = \"\";\r\n    idCopie: string = \"\";\r\n    tipoCopie: string = \"\";\r\n    numFacciate: string = \"\";\r\n    idFacciate: string = \"\";\r\n    tipoFacciate: string = \"\";\r\n    idFormati: string = \"\";\r\n    idColori1: string = \"\";\r\n    idCarte1: string = \"\";\r\n    nomeCarte1: string = \"\";\r\n    nomeCarte2: string = \"\";\r\n    idGrammature1: string = \"\";\r\n    nomeGrammature1: string = \"\";\r\n    idPlastificazioni1: string = \"\";\r\n    idCopertine: string = \"\";\r\n    idColori2: string = \"\";\r\n    idCarte2: string = \"\";\r\n    idGrammature2: string = \"\";\r\n    nomeGrammature2: string = \"\";\r\n    idPlastificazioni2: string = \"\";\r\n    idRilegature: string = \"\";\r\n    taglio: boolean = false;\r\n    sezione: string = \"\";\r\n    tipoStampaInternoSoloFronte: boolean = false;\r\n    stampa1_colori_fronte: string = \"\";\r\n    stampa1_colori_retro: string = \"\";\r\n    stampa2_colori_fronte: string = \"\";\r\n    stampa2_colori_retro: string = \"\";\r\n    lavorazioniAccessorie: Array<LavorazioniAccessorieModel>;\r\n    wizardId: number = 0;\r\n    customerdId: string;\r\n    StrCustomerId: string;\r\n    tipoStampaCopertinaSoloFronte: boolean = false;\r\n    macrocategoryWizardId: number = 0;\r\n    richiestaName: string = \"\";\r\n    richiestaSubName: string = \"\";\r\n    richiestaEmail: string = \"\";\r\n    isRichiestaEmailValid: boolean = false;\r\n    richiestaTelephone: string = \"\";\r\n    richiestaSocieta: string = \"\";\r\n    richiestaJobname: string = \"\";\r\n    richiestaCondizioni: boolean = false;\r\n    richiestaNote: string = \"\";\r\n    idPiegature: string = \"\";\r\n    soggettiMultipli: boolean = false;\r\n    numSoggetti: string = \"\";\r\n    baseFormato: string = \"\";\r\n    altezzaFormato: string = \"\";\r\n    idTagli: string = \"\";\r\n    idBusta: string = \"\";\r\n    idMaterialiFlessibili: string = \"\";\r\n    idSupportiRigidi: string = \"\";\r\n    idOcchielli: string = \"\";\r\n    idAsole: string = \"\";\r\n    idCuciture: string = \"\";\r\n    idElettrosaldature: string = \"\";\r\n    disposizione_occhielli_id: string = \"\";\r\n    distanza_occhielli: string = \"\";\r\n    diametro_asola: string = \"\";\r\n    disposizione_asola_id: string = \"\";\r\n    disposizione_cucitura_id: string = \"\";\r\n    disposizione_elettrosaldatura_id: string = \"\";\r\n    tipoBifacciale: string = \"\";\r\n    idBiancoCoprente: string = \"\";\r\n    language: string = \"\";\r\n    currency: string = \"\";\r\n\r\n    idPantoneFronte1: string = \"\";\r\n    idPantoneFronte2: string = \"\";\r\n    idPantoneRetro1: string = \"\";\r\n    idPantoneRetro2: string = \"\";\r\n\r\n\r\n    idCartoncino: string = \"\";\r\n    nomeCartoncino: string = \"\";\r\n    idGrammatureCartoncino: string = \"\";\r\n    nomeGrammatureCartoncino: string = \"\";\r\n    \r\n    numDiametroInternoAnimaLabel: number = 0;\r\n    numDiametroMassimoEsternoAnimaLabel: number = 0;\r\n    numEtichette: string = \"\";\r\n    idAvvolgimento: string = \"\";\r\n    idFustella: string = \"\";\r\n    idFormatoTipo: string = \"\";\r\n    idTipoLavoroLabel: string = \"\";\r\n    subSection: string = \"\";\r\n    listaFormatiMultipli: Array<FormatiMultipliObj>;\r\n    isFormatoMultiploEnabled:boolean=false;\r\n\r\n}\r\n\r\nexport class FormatiMultipliObj {\r\n    Id: number;\r\n    Name: string;\r\n    Width: number;\r\n    Height: number;\r\n    Copie: number;\r\n    copieIsValid: boolean=true;\r\n    copieMessage:string= \"\";;\r\n    widthIsValid: boolean=true;;\r\n    widthMessage:string= \"\";;\r\n    heightIsValid: boolean=true;;\r\n    heightMessage:string= \"\";;\r\n}\r\n\r\nexport class MatrixModelCalculation\r\n{\r\n    lavorazioneVerticaleId: number;\r\n    lavorazioneOrizzontaleId: number;\r\n    quantita:number;\r\n}\r\n\r\nexport class LavorazioniAccessorieModel {\r\n    lavorazioneId: number;\r\n    valoreLavorazione: string=\"\";\r\n    numWidthFormValue: string = \"\";\r\n    numHeightFormValue: string = \"\";\r\n    numDepthFormValue: string = \"\";\r\n    tipo: number = 0;\r\n    matrixValues:Array<MatrixModelCalculation>;\r\n}\r\n\r\nexport class PriceEstimationModel {\r\n    RowId: number;\r\n    Currency: string = \"€\";\r\n    UnitPrice: string = \"0,00\";\r\n    Imponibile: string = \"0,00\";\r\n    Iva: string = \"0,00\";\r\n    Total: string = \"0,00\";\r\n    TotalAmount: string = \"0,00\";\r\n    WeightUm: string = \"Kg\";\r\n    Weight: string = \"0,00\";\r\n    TablePriceList: any;\r\n    TableScontisticaPriceList: any;\r\n    DataId: number;\r\n    DayName: string = \"\";\r\n    IsHour: boolean;\r\n    TimePickup: string = \"\";\r\n    DayNumber: string = \"\";\r\n    QuantityID: number;\r\n    Quantity: number = 0;\r\n    AltezzaDorso: Number = 0.00;\r\n    Varianti: string;\r\n    PrezzoOriginalestato: boolean;\r\n    PrezzoOriginaleimporto: Number = 0.00;\r\n    DayDescriptionStatus: boolean;\r\n    DayDescriptionName: string = \"\";\r\n    iShowHourForDay: boolean=false;\r\n}\r\n\r\nexport class FileCombinationModel {\r\n    PathFile: string;\r\n    NomeFile: string;\r\n    PathIstruzioni: string;\r\n    NomeIstruzioni: string;\r\n}\r\n\r\nexport class wizardFormAdesiviModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    plastificazioni1: any;\r\n    materialiFlessibili: any;\r\n    supportiRigidi: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\n\r\nexport class wizardFormBandieraModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    materialiFlessibili: any;\r\n    occhielli: any;\r\n    distanceOcchielli: any;\r\n    disposizioneOcchielli: any;\r\n    asole: any;\r\n    diametroAsola: any;\r\n    disposizioneAsole: any;\r\n    cuciture: any;\r\n    disposizioneCucitura: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormBannerModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    materialiFlessibili: any;\r\n    occhielli: any;\r\n    distanceOcchielli: any;\r\n    disposizioneOcchielli: any;\r\n    asole: any;\r\n    diametroAsola: any;\r\n    disposizioneAsole: any;\r\n    elettrosaldature: any;\r\n    disposizioneElettrosaldature: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormBusteModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    categorieCarte: any;\r\n    tipologieBusta: any;\r\n    colori1: any;\r\n    fronte: any = \"\";\r\n    colori2: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormCommercialeModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    categorieCarte: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    carte1: any;\r\n    grammature1: any;\r\n    colori1: any;\r\n    colori2: any;\r\n    plastificazioni1: any;\r\n    piegature: any;\r\n    rifilo: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizarFormEtichetteModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    categorieCarte: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    carte1: any;\r\n    grammature1: any;\r\n    colori1: any;\r\n    fronte: any = \"\";\r\n    plastificazioni1: any;\r\n    tagli: any;\r\n    lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormStampaModel {\r\n    numCopie: any;\r\n    numSoggetti: any;\r\n    formati: any;\r\n    base: any;\r\n    altezza: any;\r\n    supportiRigidi: any;\r\n    tagli: any;\r\n    stampaBifacciale: any;\r\n    biancoCoprente: any;\r\n    lavorazioniAccessorie: any;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/document/quoting-submit-model.ts","export class CartInfo {\r\n    Id:number;\r\n    JobsPrice: string;\r\n    TotalAmountBeforeTaxes: string;\r\n    Vat: string;    \r\n    TotalAmountAfterTaxes: string;\r\n    \r\n    Payment: string;\r\n    Shipment: string;\r\n    Voucher: string;\r\n    VoucherID: string;\r\n    Imballo: string;\r\n\r\n    Tax: string;\r\n    Currency: string;\r\n    Products: CartProductModel[];\r\n\r\n    CurrentAddress: CartAddressModel;\r\n    Addresses: Array<CartAddressModel>;\r\n    Payments: Array<CartPaymentModel>;\r\n    Shipments: Array<CartShipmentModel>;\r\n}\r\nexport class CartProductModel {\r\n    Id: number;\r\n    Delivery: string;\r\n    Name: string;\r\n    Quantity: number;\r\n\r\n    TotalPriceAfterTax: string;\r\n    TotalVat: string;\r\n    TotalPriceBeforeTax: string;\r\n    Description: string;\r\n    Image: string;\r\n    JobName: string;\r\n    isCanvasEdited: boolean;\r\n    CanvasStateId: string;\r\n    TipoTrasporto: string;\r\n    DeliveryTime: string;\r\n}\r\nexport class CartAddressModel {\r\n    Id: number;\r\n    Recipient: string;\r\n    Address: string;\r\n    City: string;\r\n    Province: string;\r\n    ZipCode: string;\r\n    Phone: string;\r\n    Mobile: string;\r\n    Default: boolean;\r\n    Name: string;\r\n    CustomerID: string;\r\n    Language: string;\r\n    AddressNumber: string;\r\n}\r\nexport class CartPaymentModel {\r\n    Id: number;\r\n    Name: string;\r\n    Amount: number;\r\n    Description: string;\r\n    Selected: boolean;\r\n    OrderSort:number;\r\n}\r\nexport class CartShipmentModel {\r\n    Id: number;\r\n    Name: string;\r\n    Amount: number;\r\n    Description: string;\r\n    Selected: boolean;\r\n    TipoTrasporto: string;\r\n    UnitaId: number = 0;\r\n    RitiroDestinatario: string;\r\n    RitiroIndirizzo: string;\r\n    RitiroCap: string;\r\n    RitiroProvincia: string;\r\n    RitiroCitta: string;\r\n    RitiroTelefono: string;\r\n    RitiroCellulare: string;\r\n    Default: boolean;\r\n    DefaultShipment: boolean;\r\n    Sort: number;\r\n    Latitudine: string;\r\n    Longitudine: string;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/core/cart.ts","import { LanguageService } from './language.service';\r\n//Angular\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { QuickRegister } from '../../models/cms/register';\r\n\r\n@Injectable()\r\nexport class LoginService {\r\n    constructor\r\n        (\r\n            public _api: ApiService,\r\n            public _cache: CacheService,\r\n            private mappings: Mappings,\r\n            private cartService: ShoppingCartService,\r\n            private langService: LanguageService\r\n        ) { }\r\n\r\n    sendLoginRequest(email: string, password: string) {\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Post_Send_Login_Request\r\n\r\n        let key = url; let x = 0;\r\n\r\n        let params = {\r\n            Email: email.toLowerCase(),\r\n            Password: btoa(password),\r\n            CartID: cartId\r\n        }\r\n\r\n        return this._api.post(url, params);\r\n    }\r\n\r\n    authentificateUser(email: string, firstName: string, lastName: string) {\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Post_User_Authentification\r\n\r\n        let lang = this.langService.getLongLang();\r\n        let key = url;\r\n\r\n        let params = {\r\n            Email: email.toLowerCase(),\r\n            Password: \"\",\r\n            FirstName: firstName,\r\n            LastName: lastName,\r\n            CartID: cartId,\r\n            Lang: lang\r\n        }\r\n\r\n        return this._api.post(url, params);\r\n    }\r\n\r\n    quickRegister(userInfo: QuickRegister) {\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Post_User_Authentification\r\n\r\n        let lang = this.langService.getLongLang();\r\n        let key = url;\r\n\r\n        let params = {\r\n            Email: userInfo.EmailRegister != null ? userInfo.EmailRegister.toLowerCase() : '',\r\n            Password: userInfo.Password,\r\n            FirstName: '',\r\n            LastName: '',\r\n            CustomerGroup: userInfo.CustomerGroup,\r\n            CartID: cartId,\r\n            Lang: lang,\r\n            CodiceFiscale: userInfo.CodiceFiscale,\r\n            PartitaIva: userInfo.PartitaIva,\r\n            Newsletter: userInfo.Newsletter\r\n        }\r\n\r\n        return this._api.post(url, params);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/login.service.ts","//System\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\n//Services\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { CookieService } from '../core/cookie/cookie.service';\r\n\r\n//Models\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ClientAreaOrderDetails } from \"./../../models/settings/client-area\";\r\nimport { CartAddressModel } from \"./../../models/core/cart\";\r\nimport { CartProductModel } from \"./../../models/core/cart\";\r\nimport { CartInfo } from \"./../../models/core/cart\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { AnonymousSubject } from \"rxjs\";\r\n\r\n@Injectable()\r\nexport class ShoppingCartService {\r\n\r\n  private cartId: number = 0;\r\n  private cartData: any;\r\n\r\n  constructor\r\n    (\r\n      public _api: ApiService,\r\n      public _cache: CacheService,\r\n      private mappings: Mappings,\r\n      private authService: AuthService,\r\n      private languageService: LanguageService,\r\n      private currencyService: CurrencyService,\r\n      @Inject('CookieService') private cookieService: CookieService\r\n    ) { }\r\n\r\n  // value of customizationData is set from canvas-widget component after editing is approved. After we can get that data inside of parent component and send it to a server\r\n  private customizationData: any = null;\r\n  private isProductCanvasEdited: boolean = false;\r\n\r\n  saveCart(userId: string, cartId: number, paymentId: number, shipmentId: number) {\r\n\r\n    let url = this.mappings.Web_Api_Get_Save_Cart.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{paymentId}', paymentId.toString()).replace('{shipmentId}', shipmentId.toString());\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  applyVoucher(voucherCode: string) {\r\n\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Set_Cart_Voucher;\r\n\r\n    var param = {\r\n      CartID: cartId,\r\n      CustomerID: customerId,\r\n      Voucher: voucherCode,\r\n      Language: lang,\r\n      Currency: curr\r\n    }\r\n\r\n    let key = url;\r\n\r\n    return this._api.post(url, param);\r\n  }\r\n\r\n  setJobName(rowId: string, jobName: string) {\r\n\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n\r\n    let url = this.mappings.Web_Api_Set_Job_Name;\r\n\r\n    var param = {\r\n      CartID: cartId,\r\n      ProductID: rowId,\r\n      JobName: jobName\r\n    }\r\n\r\n    let key = url;\r\n\r\n    return this._api.post(url, param);\r\n  }\r\n\r\n  setAddress(addressObject: any) {\r\n\r\n    let cartId = this.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Set_Cart_Address;\r\n\r\n    var param = {\r\n      CartID: cartId,\r\n      AddressCity: addressObject.City,\r\n      AddressID: addressObject.Id,\r\n      AddressMobile: addressObject.Mobile,\r\n      AddressPhone: addressObject.Phone,\r\n      AddressPostalCode: addressObject.ZipCode,\r\n      AddressProvince: addressObject.Province,\r\n      AddressRecipient: addressObject.Recipient,\r\n      AddressStreet: addressObject.Address,\r\n      CustomerID: addressObject.CustomerID,\r\n      Language: addressObject.Language\r\n    }\r\n\r\n    let key = url;\r\n\r\n    return this._api.post(url, param);\r\n  }\r\n\r\n  confirmOrder() {\r\n\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n\r\n    var param = {\r\n      CartID: cartId,\r\n      Language: lang\r\n    }\r\n\r\n    let url = this.mappings.Web_Api_Post_Cart_Confirm_Order;\r\n\r\n    return this._api.post(url, param);\r\n  }\r\n\r\n  clearCartAfterConfirmation() {\r\n    this.cookieService.remove(\"cartId\");\r\n    this.cartData = new CartInfo();\r\n\r\n    this.cartData.Products = [];\r\n    this.cartData.Addresses = [];\r\n    this.cartData.Payments = [];\r\n    this.cartData.Shipments = [];\r\n  }\r\n\r\n  getCartPaymentShipment(cartId: number, lang: string) {\r\n    let userId = this.getCustomerId();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Get_Cart_Payment_Shipment.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{lang}', lang).replace('{currency}', curr);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  addWizardCalcolatoToCart(wizardId: number, lavId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n    let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n    let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n    let url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      LavID: lavId.toString(),\r\n      Currency: curr,\r\n      isCanvasEdited: isCanvasEdited,\r\n      CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n      CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n      ColType: colType\r\n    }\r\n\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addApProductToCart(productId: number, lavId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: productId.toString(),\r\n      LavID: lavId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n  getRiorderCart() {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Get_Cart_Riorder\r\n      .replace('{userId}', customerId)\r\n      .replace('{cartId}', cartId.toString())\r\n      .replace('{lang}', lang);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  addWizardCalcolatoScontisticaToCart(wizardId: number, dateId: number, lavId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n    let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n    let url = this.mappings.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart;\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      LavID: lavId.toString(),\r\n      DateID: dateId.toString(),\r\n      Currency: curr,\r\n      isCanvasEdited: isCanvasEdited,\r\n      CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n      CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n\r\n  addWizardListinoToCart(wizardId: number, quantityId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Wizard_Listino_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductListinoToCart(combinationId: number, quantityId: number, wizardId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Other_Product_Listino_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      CombinationId: combinationId.toString(),\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductListinoScontisticaToCart(combinationId: number, quantityId: number, wizardId: number, dateId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      CombinationId: combinationId.toString(),\r\n      DateID: dateId.toString(),\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductCalcolatoListinoToCart(combinationId: number, quantityId: number, wizardId: number, strVariantiCalcolate: string, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      CombinationId: combinationId.toString(),\r\n      StrVariantiCalcolate: strVariantiCalcolate,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductCalcolatoListinoScontisticaToCart(combinationId: number, quantityId: number, wizardId: number, dateId: number, strVariantiCalcolate: string, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      CombinationId: combinationId.toString(),\r\n      DateID: dateId.toString(),\r\n      StrVariantiCalcolate: strVariantiCalcolate,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductCalcolatoScontisticaToCart(productId: number, lavId: number, dateId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart;\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: productId.toString(),\r\n      LavID: lavId.toString(),\r\n      DateID: dateId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addWizardListinoScontisticaBusteToCart(wizardId: number, quantityId: number, dateId: number, idPantoneFronte1: string, idPantoneFronte2: string, idPantoneRetro1: string, idPantoneRetro2: string, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n    let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n    let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n    let key = url; let x = 0;\r\n    if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n      idPantoneFronte1 = \"0\";\r\n    }\r\n    if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n      idPantoneFronte2 = \"0\";\r\n    }\r\n    if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n      idPantoneRetro1 = \"0\";\r\n    }\r\n    if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n      idPantoneRetro2 = \"0\";\r\n    }\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      DateID: dateId.toString(),\r\n      IdPantoneFronte1: idPantoneFronte1.toString(),\r\n      IdPantoneFronte2: idPantoneFronte2.toString(),\r\n      IdPantoneRetro1: idPantoneRetro1.toString(),\r\n      IdPantoneRetro2: idPantoneRetro2.toString(),\r\n      Currency: curr,\r\n      isCanvasEdited: isCanvasEdited,\r\n      CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n      CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n      ColType: colType\r\n    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n\r\n  addWizardListinoBusteToCart(wizardId: number, quantityId: number, idPantoneFronte1: string, idPantoneFronte2: string, idPantoneRetro1: string, idPantoneRetro2: string, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n    let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n    let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n    let key = url; let x = 0;\r\n\r\n    if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n      idPantoneFronte1 = \"0\";\r\n    }\r\n    if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n      idPantoneFronte2 = \"0\";\r\n    }\r\n    if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n      idPantoneRetro1 = \"0\";\r\n    }\r\n    if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n      idPantoneRetro2 = \"0\";\r\n    }\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      IdPantoneFronte1: idPantoneFronte1.toString(),\r\n      IdPantoneFronte2: idPantoneFronte2.toString(),\r\n      IdPantoneRetro1: idPantoneRetro1.toString(),\r\n      IdPantoneRetro2: idPantoneRetro2.toString(),\r\n      Currency: curr,\r\n      isCanvasEdited: isCanvasEdited,\r\n      CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n      CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null,\r\n      ColType: colType\r\n    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addWizardListinoScontisticaToCart(wizardId: number, quantityId: number, dateId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let url = this.mappings.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: wizardId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      DateID: dateId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n\r\n  addStaticProductToCart(productId: number, quantityId: number, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Add_Static_Product_To_Cart\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: productId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addStaticProductScontisticaToCart(productId: number, quantityId: number, dateId: number, colType: string) {\r\n\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Add_Static_Product_Scontistica_To_Cart\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: productId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      DateID: dateId.toString(),\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addMatrixProductToCart(productId: number, quantityId: number, type: string, colType: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Add_Matrix_Product_To_Cart;\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      ProductID: productId.toString(),\r\n      QuantityID: quantityId.toString(),\r\n      Type: type,\r\n      Currency: curr,\r\n      ColType: colType\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  getCartId(): string {\r\n    //Reading cartId from cookie\r\n    let cartId: string = this.cookieService.get(\"cartId\");\r\n\r\n    if (cartId == null || cartId == \"\") {\r\n      cartId = \"0\";\r\n    }\r\n\r\n    return cartId;\r\n  }\r\n\r\n  setCartId(cartId: number) {\r\n    this.cookieService.put(\"cartId\", cartId.toString());\r\n    this.cartId = cartId;\r\n  }\r\n\r\n  getCustomerId(): string {\r\n    let userId = this.authService.GetUserId();\r\n\r\n    return userId;\r\n  }\r\n\r\n  getLang(): string {\r\n    let lang: string = this.languageService.getLongLang();\r\n\r\n    return lang;\r\n  }\r\n\r\n  updateCart(cartData: any): void {\r\n    let currentCartId: string = this.getCartId();\r\n\r\n    if (currentCartId == \"0\") {\r\n      this.setCartId(cartData.CartID);\r\n    }\r\n    //refreshing cart data\r\n    this.cartData = cartData;\r\n  }\r\n\r\n  getCart() {\r\n    return this.cartData;\r\n  }\r\n\r\n  initCart(cartData: any) {\r\n    if (this.cartData == null) {\r\n      this.cartData = cartData;\r\n    }\r\n  }\r\n\r\n  setPayment(paymentId: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Set_Cart_Payment\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      PaymentID: paymentId,\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      Currency: curr\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  setShipment(shipmentId: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Set_Cart_Shipment\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      ShippmentID: shipmentId,\r\n      CustomerID: customerId,\r\n      Language: lang,\r\n      Currency: curr\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n\r\n  }\r\n\r\n  removeFromCart(rowId: string) {\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n    let lang = this.getLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Remove_From_Cart\r\n\r\n    let key = url; let x = 0;\r\n\r\n    let params = {\r\n      CartID: cartId.toString(),\r\n      ProductID: rowId,\r\n      CustomerID: customerId.toString(),\r\n      Language: lang,\r\n      Currency: curr\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n\r\n  }\r\n\r\n  //Check if the cart data is valid to access to the second step\r\n  isCartValid() {\r\n    let res: boolean = false;\r\n\r\n    let cartId = this.getCartId();\r\n    let customerId = this.getCustomerId();\r\n\r\n    //Checking if user is logged-ing\r\n    if (customerId != null && customerId != \"\" && customerId != \"0\") {\r\n      //Checking if there is a cart set\r\n      if (cartId != null && cartId != \"\" && cartId != \"0\") {\r\n        //Checking if there are products\r\n        if (this.cartData.Products != null && this.cartData.Products.length > 0) {\r\n          //Checking if there is a payment set\r\n          if (this.cartData.Payments != null && this.cartData.Payments.length > 0) {\r\n\r\n            let flagPayment = false;\r\n\r\n            for (let payment of this.cartData.Payments) {\r\n              if (payment.Selected == true) {\r\n                flagPayment = true;\r\n                break;\r\n              }\r\n            }\r\n\r\n            //Checking if there is a shipment set\r\n            if (flagPayment == true) {\r\n\r\n              if (this.cartData.Shipments != null && this.cartData.Shipments.length > 0) {\r\n\r\n                let flagShipment = false;\r\n\r\n                for (let shipment of this.cartData.Shipments) {\r\n                  if (shipment.Selected == true) {\r\n                    flagShipment = true;\r\n                    break;\r\n                  }\r\n                }\r\n\r\n                if (flagShipment == true) {\r\n                  res = true;\r\n                }\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return res;\r\n  }\r\n  addProductRiorderToCart(params: any) {\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Add_Product_To_Cart_Riorder\r\n\r\n    let key = url; let x = 0;\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n  //Getting Empty cart page data\r\n  getEmptyCartPageData() {\r\n    let lang = this.getLang();\r\n    let customerId = this.getCustomerId();\r\n    let cartId = this.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Empty_Cart_Page.replace(\"{lang}\", lang).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  setIfProductIsCanvasEdited(isEdited: boolean) {\r\n    this.isProductCanvasEdited = isEdited;\r\n  }\r\n\r\n  getIfProductIsCanvasEdited() {\r\n    return this.isProductCanvasEdited;\r\n  }\r\n\r\n  getCustomizationCanvasData() {\r\n    return this.customizationData;\r\n  }\r\n\r\n  setCustomizationCanvasData(newData) {\r\n    this.customizationData = newData;\r\n  }\r\n\r\n  // reset canvas state because of next adding to a cart\r\n  resetCanvasData() {\r\n    const emptyObj = {};\r\n    this.setIfProductIsCanvasEdited(false);\r\n    this.setCustomizationCanvasData(emptyObj);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/shopping-cart.service.ts","import { Inject, Injectable, isDevMode } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class CacheService {\r\n  static KEY = 'CacheService';\r\n\r\n  constructor(@Inject('LRU') public _cache: Map<string, any>) {\r\n\r\n  }\r\n\r\n  /**\r\n   * check if there is a value in our store\r\n   */\r\n  has(key: string | number): boolean {\r\n    let _key = this.normalizeKey(key);\r\n    return this._cache.has(_key);\r\n  }\r\n\r\n  /**\r\n   * store our state\r\n   */\r\n  set(key: string | number, value: any): void {\r\n    let _key = this.normalizeKey(key);\r\n    if (value && 'string' === typeof value && (/<[a-z][\\s\\S]*>/i).test(value)) {\r\n      value = {\r\n        _escapedHtml: encodeURIComponent(value)\r\n      }\r\n    }\r\n    this._cache.set(_key, value);\r\n  }\r\n\r\n  /**\r\n   * get our cached value\r\n   */\r\n  get(key: string | number): any {\r\n    let _key = this.normalizeKey(key);\r\n    let value = this._cache.get(_key);\r\n    if (value && 'object' === typeof value && value._escapedHtml) {\r\n      value = decodeURIComponent(value._escapedHtml);\r\n    }\r\n    return value;\r\n  }\r\n\r\n  /**\r\n   * release memory ref\r\n   */\r\n  clear(key: string): void {\r\n    this._cache.delete(key);\r\n  }\r\n\r\n  /**\r\n   * release memory all refs\r\n   */\r\n  clearAll(): void {\r\n    this._cache.clear();\r\n  }\r\n\r\n  /**\r\n   * convert to json for the client\r\n   */\r\n  dehydrate(): any {\r\n    let json = {};\r\n    this._cache.forEach((value: any, key: string) => json[key] = value);\r\n    return json;\r\n  }\r\n\r\n  /**\r\n   * convert server json into out initial state\r\n   */\r\n  rehydrate(json: any): void {\r\n    Object.keys(json).forEach((key: string) => {\r\n      let _key = this.normalizeKey(key);\r\n      let value = json[_key];\r\n      this._cache.set(_key, value);\r\n    });\r\n  }\r\n\r\n  /**\r\n   * allow JSON.stringify to work\r\n   */\r\n  toJSON(): any {\r\n    return this.dehydrate();\r\n  }\r\n\r\n  /**\r\n   * convert numbers into strings\r\n   */\r\n  normalizeKey(key: string | number): string {\r\n    if (isDevMode() && this._isInvalidValue(key)) {\r\n      throw new Error('Please provide a valid key to save in the CacheService');\r\n    }\r\n\r\n    return key + '';\r\n  }\r\n\r\n  _isInvalidValue(key): boolean {\r\n    return key === null ||\r\n      key === undefined ||\r\n      key === 0 ||\r\n      key === '' ||\r\n      typeof key === 'boolean' ||\r\n      Number.isNaN(<number>key);\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cache.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { Breadcrumbs } from \"../../models/cms/breadcrumbs\";\r\n\r\nimport { RoutesService } from \"../core/routes.service\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\n\r\n\r\n@Injectable()\r\nexport class BreadcrumbsService {\r\n\r\n    protected breadcrumbsList: Breadcrumbs[];\r\n\r\n    private homeIsInit: boolean = false;\r\n    constructor(protected router: Router,\r\n        private languageService: LanguageService,\r\n        private translateService: TranslateService,\r\n        @Inject('isBrowser') private isBrowser: boolean, ) {\r\n    }\r\n\r\n\r\n    setHomeBreadcrumb() {\r\n        if (this.breadcrumbsList != null && this.breadcrumbsList.length > 0) {\r\n            if (this.breadcrumbsList[0].Level == 0) {\r\n                return;\r\n            }\r\n        }\r\n\r\n        let lang: string = this.languageService.getShortLang();\r\n        let homeLink = \"/home\";\r\n        if (lang != null && lang != \"\") {\r\n            homeLink = lang + homeLink;\r\n        }\r\n        else {\r\n            homeLink = homeLink;\r\n        }\r\n\r\n        var bread = new Breadcrumbs();\r\n\r\n        bread.BreadcrumbLink = homeLink;\r\n        bread.BreadcrumbName = this.translateService.get(\"home_area_message_home\")[\"value\"];\r\n        bread.Level = 0;\r\n\r\n        this.breadcrumbsList.unshift(bread);\r\n        this.homeIsInit = true;\r\n    }\r\n\r\n\r\n    setBreadcrumbs(breadcrumbs: Breadcrumbs[], type?: string) {\r\n        this.breadcrumbsList = [];\r\n\r\n        if (type != \"cmspage\") {\r\n            if (breadcrumbs != null && breadcrumbs.length > 0) {\r\n                breadcrumbs.forEach(x => {\r\n                    x.BreadcrumbLink = x.BreadcrumbLink.toLocaleLowerCase();\r\n                });\r\n            }\r\n        }\r\n\r\n        this.breadcrumbsList = breadcrumbs;\r\n        // this.setHomeBreadcrumb();\r\n    }\r\n\r\n    getBreadcrumbs() {\r\n        var breadcrumbs = this.breadcrumbsList;\r\n\r\n        return breadcrumbs;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/breadcrumbs.service.ts","export class Register {\r\n    public CustomerGroup: string;\r\n    public CustomerType: string;\r\n    public Nation: number;\r\n    public RagSoc: string;\r\n    public Piva: string;\r\n    public CF: string;\r\n    public Name: string;\r\n    public SubName: string;\r\n    public Address: string;\r\n    public City: string;\r\n    public Prov: string;\r\n    public Cap: string;\r\n    public Telephone: string;\r\n    public EmailRegister: string;\r\n    public EmailRepeat: string;\r\n    public PecEmail: string;\r\n    public CodiceDestinatario: string;\r\n    public Password: string;\r\n    public PasswordRepeat: string;\r\n    public Newsletter: string;\r\n    public Mobile: string;\r\n    public Language: string;\r\n    public AddressNumber: string;\r\n    public IsCompletedRegistration: any;\r\n    public CartId: any;\r\n    public IsQuickRegistered: boolean;\r\n}\r\nexport class Nation {\r\n    public Name: string;\r\n    public Code: string;\r\n    public Id: number;\r\n   \r\n}\r\nexport class QuickRegister {\r\n    EmailRegister: string = '';\r\n    EmailRepeat: string = '';\r\n    Password: string = '';\r\n    PartitaIva: string = '';\r\n    CodiceFiscale: string = '';\r\n    Telephone: string = '';\r\n    CustomerGroup: string = '5'\r\n    info_privacy: string = '';\r\n    Newsletter: any;\r\n    IsQuickRegistered: boolean = false;\r\n\r\n    constructor(email: string = '', emailRepeat: string = '', password: string = '', \r\n                telephone: string = '', customerGroup: string = '5', CF: string = '', PIVA: string = '', oldGroup: string = '5')\r\n    {\r\n        this.CustomerGroup = customerGroup;\r\n        this.controlFormReset(oldGroup, CF, PIVA);\r\n        this.EmailRegister = email;\r\n        this.EmailRepeat = emailRepeat;\r\n        this.Password = password;\r\n        this.Telephone = telephone;\r\n    }\r\n\r\n    //-- If client type is changed inside of form from societa to dita individuale, we don't want to reset a PIVA field value also\r\n    //-- If client type is changed inside of form from privato to associazione, we don't want to reset a CF field value also\r\n    controlFormReset(oldGroup, CF, PIVA)\r\n    {\r\n        if(((this.CustomerGroup === '5' || this.CustomerGroup === '6') && (oldGroup === '5' || oldGroup === '6')))\r\n            this.PartitaIva = PIVA;\r\n        else\r\n            this.PartitaIva = ''\r\n\r\n        if(((this.CustomerGroup === '4' || this.CustomerGroup === '7') && (oldGroup === '4' || oldGroup === '7')))\r\n            this.CodiceFiscale = CF;\r\n        else\r\n            this.CodiceFiscale = ''\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/register.ts","export class Company {\r\n    RowId: number;\r\n    Id: number;\r\n    Name: string;\r\n    Piva: string;\r\n    Website: string;\r\n    StreetAddress: string;\r\n    PostalCode: string;\r\n    City: string;\r\n    Province: string;\r\n    Phone: string;\r\n    Email: string;\r\n    Facebook: string;\r\n    Twitter: string;\r\n    Youtube: string;\r\n    Instagram: string;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/core/company.ts","import { SeoViewModel } from \"../core/seo\";\r\nimport { Configuration } from \"../core/configuration\";\r\n\r\nimport { Breadcrumbs } from \"../cms/breadcrumbs\";\r\n\r\nexport class Product {\r\n    Id: number;\r\n    IdGruppo: number;\r\n    Name: string;\r\n    Thumbnail: string;\r\n    ShortDescription: string;\r\n    Type: string;\r\n    LongDescription: string;\r\n    PhotoGallery: PhotoGalleryViewModel[];\r\n    Attachments:AtachmentViewModel[];\r\n    ProductCorrelati:Product[]\r\n    Price: string;\r\n    SeoUrl: string;\r\n    RouterLink: any[];\r\n    TemplateUrl: string;\r\n    TemplateHtml: string;\r\n    EstimateRequest: boolean;\r\n    TimeDiscounts: boolean;\r\n    TypeResultView: string;\r\n    SeoInformation: SeoViewModel;\r\n    PriceData: any;\r\n    Active: boolean;\r\n    IsWizard: boolean;\r\n    BreadcrumbsInfo: Breadcrumbs[];\r\n    ManageAttachment: string;\r\n    CanvasInfo: any;\r\n    listaRegole: Regola[];\r\n    HeaderData:any;\r\n    FooterData:any;\r\n    AltMiniatura: string;\r\n    TitleMiniatura: string;\r\n    AltTop: string;\r\n    TitleTop: string;\r\n    AltFinal: string;\r\n    TitleFinal: string;\r\n    isProductPrivateActiveAndShow: boolean;\r\n    IsPromo: boolean;\r\n}\r\n\r\nexport interface Regola {\r\n    Id: number;\r\n    Nome_Regola: string;\r\n    Tipo: string;\r\n    Categoria_1: string;\r\n    Sezione_1: string;\r\n    Id_Elemento_1: number;\r\n    Categoria_2: string;\r\n    Sezione_2: string;\r\n    Id_Elemento_2: number;\r\n    IdRegoleCategoria: number;\r\n    Id_Elemento_Sottochiave_1: number;\r\n    Id_Elemento_Sottochiave_2: number;\r\n    Tipo_Regola: string;\r\n    Flag_Copertina_1?: boolean;\r\n    Flag_Copertina_2?: boolean;\r\n    Macro_Categoria_1: string;\r\n    Macro_Categoria_2: string;\r\n    Attivo?: boolean;\r\n    nomeCategoria: string;\r\n    nomeElemento1: string;\r\n    nomeElemento2: string;\r\n    stato: boolean;\r\n    connectionString: string;\r\n    descrizione: string;\r\n}\r\n\r\nexport class PhotoGalleryViewModel {\r\n    PhotoUrl: string;\r\n    Alt: string;\r\n    Title: string;\r\n}\r\nclass AtachmentViewModel {\r\n    Name: string;\r\n    Url: string;\r\n}\r\nexport class Category  {\r\n    Id: number;\r\n    Name: string;\r\n    LongDescription: string;\r\n    Image: string;\r\n    Thumbnail: string;\r\n    SliderImages: SliderViewModel[];\r\n    SubCategories: Category[];\r\n    SubProducts: Product[];\r\n    ProductCorrelati: Product[];\r\n    ShortDescription: string;\r\n    SeoUrl: string;\r\n    Children: Category[];\r\n    RouterLink: any[];\r\n    TemplateUrl: string;\r\n    TemplateHtml: string;\r\n    TypeGruppo: number;\r\n    IdWizardMaster: number;\r\n    MacroCategoryIdWizardMaster: number;\r\n    IdProdottoMaster: number;\r\n    WizardResultVisualizationType: string;\r\n    WizardTemporalPricing:boolean;\r\n    WizardQuotingRequest:boolean;\r\n    SeoInformation: SeoViewModel;\r\n    MacroCategory: string;\r\n    Active: boolean;\r\n    Configuration: Configuration;\r\n    PriceData: any;\r\n    TipoVisualizzazione: string;\r\n    BreadcrumbsInfo: Breadcrumbs[];\r\n    ProductAttachments:any[];\r\n    ManageAttachmentWizard: string;\r\n    headerData: any;\r\n    footerData: any;\r\n    PhotoGallery: any[];\r\n    AltMiniatura: string;\r\n    TitleMiniatura: string;\r\n    AltTop: string;\r\n    TitleTop: string;\r\n    AltFinal: string;\r\n    TitleFinal: string;\r\n    IsNew: boolean;\r\n}\r\nexport class SliderViewModel {\r\n    SliderUrl: string;\r\n}\r\nexport class MegaMenu {\r\n    public Id: number;\r\n    public ParentId: string;\r\n    public Level: number;\r\n    public Name: string;\r\n    public Target: string;\r\n    public Thumbnail: string;\r\n    public IsNew: string;\r\n    public SeoUrl: string;\r\n    Children: Array<MegaMenu>;\r\n    ShortDescription: string;\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/inventory/inventory.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n@Injectable()\r\nexport class CheckIfExistService {\r\n        constructor\r\n                (\r\n                public _api: ApiService,\r\n                public _cache: CacheService,\r\n                private mappings: Mappings\r\n                ) { }\r\n\r\n        //for sending of checking type, because we are using same method on server side for all checking\r\n        public readonly emailType: string = \"email\";\r\n        public readonly partitaIvaType: string = \"partitaIva\";\r\n        public readonly codiceFiscaleType: string = \"codiceFiscale\";\r\n\r\n        checkIfEmailExistsInDb(value: string) {\r\n                let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.emailType).replace('{value}', value);\r\n\r\n                return this._api.get(url);\r\n        }\r\n\r\n        checkIfPartitaIvaExistsInDb(value: string) {\r\n                let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.partitaIvaType).replace('{value}', value);\r\n\r\n                return this._api.get(url);\r\n        }\r\n\r\n        checkIfCodiceFiscaleExistsInDb(value: string) {\r\n                let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.codiceFiscaleType).replace('{value}', value);\r\n\r\n                return this._api.get(url);\r\n        }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/check-existence.service.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n@Injectable()\r\nexport class OrderPaymentService \r\n{\r\n        \r\n    constructor\r\n    (\r\n        public _api: ApiService, \r\n        public _cache: CacheService,\r\n        private mappings: Mappings\r\n    ){}\r\n\r\n    setOrderAsPayed(orderId) \r\n    {\r\n        let url = this.mappings.Web_Api_Set_Order_As_Payed;\r\n\r\n        let orderID = \r\n        {\r\n            OrderId:parseInt(orderId)\r\n        }\r\n\r\n        return this._api.post(url,orderID);\r\n    }\r\n\r\n    CheckIsOrderPayedUnicredit(orderId) \r\n    {\r\n        let url = this.mappings.Web_Api_Check_Is_Order_Payed_Unicredit.replace('{orderId}', orderId.toString());\r\n        return this._api.post(url);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/order-payment.service.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { LanguageService } from \"./language.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\nimport { AuthService } from \"../core/auth.service\";\r\n\r\n@Injectable()\r\nexport class RecoverPasswordService \r\n{\r\n        constructor\r\n        (\r\n                public _api: ApiService, \r\n                public language: LanguageService,\r\n                public _cache: CacheService,\r\n                private mappings: Mappings,\r\n                private cartService: ShoppingCartService,\r\n                private authService: AuthService,\r\n        ) {}\r\n\r\n        recoverPasswordRequest(email: string) \r\n        {\r\n                email = email.toLowerCase();\r\n                let lang = this.language.getLongLang();\r\n\r\n                return this._api.post(this.mappings.Web_Api_Recover_Password, { Email: email, Lang: lang })\r\n                        .do(result => result)\r\n                        .share();\r\n        }\r\n\r\n        getRecoverPasswordData(lang: string) \r\n        {\r\n                let customerId = this.authService.GetUserId();\r\n                let cartId = this.cartService.getCartId();\r\n\r\n                let url = this.mappings.Web_Api_Get_Recover_Password_Data\r\n                        .replace('{lang}', lang)\r\n                        .replace('{userid}',customerId)\r\n                        .replace('{cartid}', cartId);\r\n\r\n                         return this._api.get(url);\r\n        }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/recover-password.service.ts","\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\n//System\r\nimport { Mappings } from './../../shared/mapping';\r\n\r\n//Models\r\nimport { Configuration } from \"./../../models/core/configuration\";\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\n\r\n\r\n@Injectable()\r\nexport class ConfigurationService {\r\n  constructor(public _api: ApiService, public _cache: CacheService,\r\n    private mappings: Mappings) {\r\n  }\r\n\r\n  getConfiguration(lang: string) {\r\n\r\n    let url = this.mappings.Web_Api_Get_Configuration.replace('{lang}', lang);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  //Return the routes for a given language\r\n  getRoutes(lang: string) {\r\n\r\n    let url = this.mappings.Web_Api_Get_Routes.replace('{lang}', lang);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/configuration.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Http, Headers, RequestOptionsArgs, Response } from '@angular/http';\r\nimport { CookieService } from './cookie';\r\n\r\n@Injectable()\r\nexport class CryptoService {\r\n\r\n    constructor\r\n    () {}\r\n\r\n\r\n    encryptNumber(param: number)\r\n    {\r\n        let prefix = \"xyZ\";\r\n        let sufix = \"xpNw\";\r\n        let output = \"\";\r\n\r\n        try\r\n        {\r\n            if (param != null)\r\n            {\r\n                let newNumber = param + 1264;\r\n                output = prefix + newNumber.toString() + sufix;\r\n            }\r\n        }\r\n        catch (Exception)\r\n        {\r\n            throw Exception;\r\n        }\r\n\r\n        return output;\r\n    }\r\n\r\n    decryptNumber(encryptedString: string)\r\n    {\r\n        let output = -1;\r\n        \r\n        try\r\n        {\r\n            if (encryptedString != null || encryptedString != \"\")\r\n            {\r\n                let stringWithoutPrefix = encryptedString.substring(3, encryptedString.length);\r\n\r\n                let stringwithoutSufix =  stringWithoutPrefix.substring(0, stringWithoutPrefix.length - 4);\r\n                \r\n                output = Number(stringwithoutSufix) - 1264;\r\n            }\r\n        }\r\n        catch (Exception)\r\n        {\r\n            throw Exception;\r\n        }\r\n\r\n        return output;\r\n    }\r\n\r\n    decryptString(text: string)\r\n    {\r\n        text = text.substring(4, text.length);\r\n        text = text.substring(0, text.length - 4);\r\n        let decryptedText = '';\r\n\r\n        for(let c of text)\r\n        {\r\n            let unicode = c.charCodeAt(0);\r\n            unicode -= 5;\r\n\r\n            decryptedText += String.fromCharCode(unicode);\r\n        }\r\n\r\n        return decryptedText;\r\n    }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/crypto.service.ts","import { Inject, Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class NodeLoggerService {\r\n\r\n    isLogActive: boolean = false; //Defines if the log is active or not\r\n    logFilepath: string = \"src/assets/log.txt\"; //logfile\r\n\r\n    constructor( @Inject('isNode') private isNode: boolean)\r\n    { }\r\n\r\n    AddLogWithTime(mex: string): void {\r\n\r\n        if (this.isNode) {\r\n\r\n            if (this.isLogActive == false) {\r\n                return;\r\n            }\r\n\r\n            const fs = require('fs');\r\n\r\n            var dateObj = new Date();\r\n            var year = dateObj.getFullYear();\r\n            var month = dateObj.getMonth() + 1;\r\n            var day = dateObj.getDate();\r\n\r\n            var hour = dateObj.getHours();   \r\n            var minutes = dateObj.getMinutes();   \r\n            var seconds = dateObj.getSeconds();   \r\n            var milliseconds = dateObj.getMilliseconds();   \r\n\r\n            var dateStr = day+\"/\"+month+\"/\"+year+\" \"+hour+\":\"+minutes+\":\"+seconds+\":\"+milliseconds;\r\n            \r\n            //Prepending date to message\r\n            mex = dateStr + \": \"+ mex+\"\\n\";           \r\n\r\n            fs.appendFile(\r\n                'src/assets/log.txt', \r\n                mex, \r\n                'utf8', \r\n                function (err) {\r\n                    if (err) {\r\n                    // append failed\r\n                    } else {\r\n                    // done\r\n                    }\r\n                }\r\n            );\r\n        }\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/node-logger.service.ts","import { Injectable } from '@angular/core';\r\nimport { PaypalButtonStyleModel } from '../../models/settings/client-area';\r\ndeclare let paypal: any;\r\n\r\n@Injectable()\r\nexport class PaypalService {\r\n\r\n    constructor(\r\n    ) {\r\n    }\r\n\r\n    private isPaypalScriptLoaded: boolean = false;\r\n    public isError = false;\r\n    public errMessage = \"\";\r\n\r\n    public loadPaypalService(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle: PaypalButtonStyleModel, UsePaypalProduction = true) {\r\n        //-- Load paypal script if it is not already loaded, else only render a paypal button\r\n        if (!this.isPaypalScriptLoaded) {\r\n            this.loadExternalScript(externalScriptLink).then(() => {\r\n                this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n            });\r\n        }\r\n        else {\r\n            this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n        }\r\n    }\r\n\r\n    private loadExternalScript(scriptUrl: string) {\r\n        return new Promise((resolve, reject) => {\r\n            const scriptElement = document.createElement('script');\r\n            scriptElement.src = scriptUrl;\r\n            scriptElement.onload = resolve;\r\n            document.body.appendChild(scriptElement);\r\n            this.isPaypalScriptLoaded = true;\r\n        })\r\n    }\r\n\r\n    private renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data: any, paypalBtnStyle: PaypalButtonStyleModel, UsePaypalProduction) {\r\n        let styleObj = this.getPaypalBtnStyle(paypalBtnStyle);\r\n        \r\n        paypal.Button.render({\r\n\r\n            env: UsePaypalProduction ? 'production' : 'sandbox', /* sandbox | production */\r\n\r\n            /* Show the buyer a 'Pay Now' button in the checkout flow */\r\n            commit: true,\r\n            locale: 'it_IT',\r\n\r\n\r\n            style: styleObj,\r\n\r\n            /* payment() is called when the button is clicked */\r\n            payment: function () {\r\n                /* Make a call to your server to set up the payment */\r\n                return paypal.request.post(createPaypalPaymentAPI, data)\r\n                    .then(response => {\r\n                        return response.id;\r\n                    });\r\n            },\r\n\r\n            /* onAuthorize() is called when the buyer approves the payment */\r\n            onAuthorize: function (orderData, actions) {\r\n\r\n                //-- Generating of execute payment object that we need on server side\r\n                var executePaymentObj = {\r\n                    paymentID: orderData.paymentID,\r\n                    payerID: orderData.payerID,\r\n                    intent: orderData.intent,\r\n                    orderID: orderData.orderID,\r\n                    paymentToken: orderData.paymentToken,\r\n                    returnUrl: orderData.returnUrl,\r\n                    CustomerId: data.CustomerId,\r\n                    //-- This is our orderId paypal also returns property with same name, so we renamed our OrderId property\r\n                    CustomerOrderId: data.OrderId,\r\n                    Lang: data.Lang\r\n                };\r\n\r\n                /* Make a call to your server to execute the payment */\r\n                return paypal.request.post(executePaypalPaymentAPI, executePaymentObj)\r\n                    .then(res => {\r\n                        this.isError = res.IsError;\r\n                        if (!res.IsError) this.isError = false;\r\n\r\n                        this.errMessage = res.message;\r\n                        if (!res.message) this.errMessage = \"\";\r\n\r\n                        if (this.isError) {\r\n                            window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=${this.isError}&message=${this.errMessage}`;\r\n                        }\r\n                        else {\r\n                            window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=${this.isError}`;\r\n                        }\r\n                    }).catch(err => {\r\n                        window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=true&message=${err.message}`;\r\n                    })\r\n            }\r\n        }, '#paypal-btn');\r\n    }\r\n\r\n\r\n    getPaypalBtnStyle(paypalBtnStyle: PaypalButtonStyleModel) {\r\n        let styleObj = {};\r\n\r\n        if (paypalBtnStyle) {\r\n            let height = this.getPaypalBtnHeight(paypalBtnStyle.PaypalButtonHeight);\r\n\r\n            styleObj = {\r\n                color: paypalBtnStyle.PaypalButtonColor || 'gold',\r\n                shape: paypalBtnStyle.PaypalButtonShape || 'rect',\r\n                label: paypalBtnStyle.PaypalButtonLabel || 'paypal',\r\n                height: height || 40,\r\n                tagline: paypalBtnStyle.PaypalButtonTagline || false,\r\n                size: paypalBtnStyle.PaypalButtonSize || 'responsive'\r\n            }\r\n        }\r\n        else {\r\n            styleObj = {\r\n                color: 'gold',\r\n                shape: 'rect',\r\n                label: 'paypal',\r\n                height: 40,\r\n                tagline: false,\r\n                size: \"responsive\"\r\n            }\r\n        }\r\n\r\n        return styleObj;\r\n    }\r\n\r\n    getPaypalBtnHeight(paypalButtonHeight: string) {\r\n        let retVal = 40;\r\n        if (paypalButtonHeight) {\r\n            if (paypalButtonHeight === 'small')\r\n                retVal = 30;\r\n            else if (paypalButtonHeight === 'large')\r\n                retVal = 50;\r\n        }\r\n\r\n        return retVal;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/paypal.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CategoryInfoRequest } from \"./../../models/inventory/category-info-request\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class CategoryService {\r\n  \r\n  constructor\r\n  (\r\n    public _api: ApiService, \r\n    public _cache: CacheService,\r\n    public currencyService: CurrencyService,\r\n    private mappings: Mappings, \r\n    private authService: AuthService,\r\n    private languageService: LanguageService,\r\n    public ShoppingCartService: ShoppingCartService\r\n  ) {}\r\n\r\n  getCategory(categoryId: number, lang: string) {\r\n    \r\n    //Reading userId\r\n    let customerId = this.authService.getCurrentUserId();   \r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Category_Details\r\n    .replace('{categoryId}', categoryId.toString())\r\n    .replace('{lang}', lang)\r\n    .replace('{customerid}', customerId)\r\n    .replace('{currency}', curr)\r\n    .replace('{cartid}', cartId)\r\n    .replace('{templatebuilderid}', templateBuilderId);\r\n    \r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getCatalogCategoriesData(lang: string) {\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let curr = this.currencyService.getCurrency();\r\n    let customerId = this.authService.getCurrentUserId();   \r\n    let url = this.mappings.Web_Api_Get_Catalog_Categories_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getCategoryByUrl(lang: string, seoUrl: string) {\r\n\r\n    //Reading userId\r\n    let customerId = this.authService.GetUserId();    \r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Category_By_Url\r\n    .replace('{lang}', lang)\r\n    .replace('{customerid}', customerId)\r\n    .replace('{currency}', curr)\r\n    .replace('{seoUrl}', seoUrl)\r\n    .replace('{cartid}', cartId)\r\n    .replace('{templatebuilderid}', templateBuilderId);\r\n    \r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getCategoryInfo(parameters: CategoryInfoRequest) \r\n  {\r\n    return this._api.post(this.mappings.Web_Api_Post_Send_Category_Info_Request, parameters)\r\n  }\r\n\r\n  getCategoryPriceData(categoryId: number) {\r\n    \r\n    //Reading userId\r\n    let customerId = this.authService.getCurrentUserId();   \r\n    let curr = this.currencyService.getCurrency();\r\n    let lang = this.languageService.getLongLang();\r\n\r\n    let url = this.mappings.Web_Api_Get_Catalog_Categories_Price_Data\r\n    .replace('{categoryId}', categoryId.toString())\r\n    .replace('{customerid}', customerId)    \r\n    .replace('{lang}', lang)\r\n    .replace('{currency}', curr);\r\n\r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/category.service.ts","import { Injectable, ViewContainerRef, Compiler, NgModule } from \"@angular/core\";\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { LanguageService } from '../cms/language.service';\r\n\r\n@Injectable()\r\nexport class SearchService {\r\n  constructor\r\n    (\r\n    public _api: ApiService,\r\n    public _cache: CacheService,\r\n    public currencyService: CurrencyService,\r\n    private mappings: Mappings,\r\n    private authService: AuthService,\r\n    private languageService: LanguageService\r\n    ) {\r\n  }\r\n\r\n  public query: string;\r\n  public base64EncodedValue: string;\r\n  public queryText: string = \"\";\r\n\r\n  getCategoriesAndProducts(query, startRow, endRow) {\r\n    let lang = this.languageService.getLongLang();\r\n\r\n    let url = this.mappings.Web_Api_Get_Product_And_Categories\r\n      .replace('{startRowIndex}', startRow)\r\n      .replace('{maxRows}', endRow)\r\n      .replace('{lang}', lang)\r\n      .replace('{query}', query);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getQueryValue() {\r\n    var response = this.query;\r\n\r\n    return response;\r\n  }\r\n\r\n  setQueryValue(newQuery: string) {\r\n    this.query = newQuery;\r\n  }\r\n\r\n  setQueryPlainTextValue(newQuery: string) {\r\n    this.queryText = newQuery;\r\n  }\r\n\r\n  getQueryPlainTextValue() {\r\n    var response = this.queryText;\r\n\r\n    return response;\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/search.service.ts","import { Injectable } from '@angular/core';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ApiService } from '../core/api.service';\r\n\r\n@Injectable()\r\nexport class CurrencyService {\r\n    constructor\r\n        (\r\n            public _api: ApiService,\r\n            private mappings: Mappings\r\n        ) { }\r\n\r\n    private currencyVal: string = \"\";\r\n\r\n    getCurrency() {\r\n        let param = '$';\r\n\r\n        switch (param) {\r\n            case '$': return 'USD';\r\n            case '€': return 'EUR';\r\n            default: return 'EUR';\r\n        }\r\n    }\r\n    getCurrencyBackend() {\r\n        let url = this.mappings.Web_Api_Get_DefaultCurrency\r\n        return this._api.get(url);\r\n    }\r\n    \r\n    getDefaultCurrency() {\r\n       return this.currencyVal;\r\n    }\r\n\r\n    setDefaultCurrency(currency:string)\r\n    {\r\n        this.currencyVal=currency;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/currency.service.ts","import { Injectable } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ApplicationService } from \"./../core/application.service\";\r\nimport { AppConfig } from '../../models/core/app-config';\r\n\r\n@Injectable()\r\nexport class LanguageService {\r\n\r\n    private lang: string = this.translate.currentLang;\r\n\r\n    constructor\r\n        (\r\n            private translate: TranslateService,\r\n            private appService: ApplicationService\r\n        ) { }\r\n\r\n    getLongLang(): string {\r\n        var lang = 'it-IT';\r\n        switch (this.lang) {\r\n            case 'it': lang = 'it-IT';\r\n                break;\r\n            case 'en': lang = 'en-GB';\r\n                break;\r\n            case 'al': lang = 'sq-AL';\r\n                break;\r\n            case 'de': lang = 'de-DE';\r\n                break;\r\n            case 'sl': lang = 'sl-SI';\r\n                break;\r\n            case 'hr': lang = 'hr-HR';\r\n                break;\r\n            case 'pt': lang = 'pt-PT';\r\n                break;\r\n            case 'es': lang = 'es-ES';\r\n                break;\r\n        }\r\n        return lang;\r\n    }\r\n\r\n    getShortLang(): string {\r\n        return this.lang;\r\n    }\r\n\r\n    //Return an object containing all the information for the current language (eg. code, lable, icon etc.)\r\n    getCurrentLanguage(): any {\r\n        let result: LanguageObj = new LanguageObj();\r\n        switch (this.lang) {\r\n            case \"it\":\r\n        }\r\n        return result;\r\n    }\r\n}\r\n\r\nexport class LanguageObj {\r\n    ShortCode: string;\r\n    LongCode: string;\r\n    Text: string;\r\n    IconCode: string;\r\n    ImageUrl: string;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/language.service.ts","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class TemplateService {\r\n\r\n  constructor(public _api: ApiService, public _cache: CacheService,\r\n    private mappings: Mappings,\r\n    private language: LanguageService,\r\n    private cache: CacheService,\r\n    private cartService: ShoppingCartService,\r\n    private authService: AuthService) {\r\n  }\r\n\r\n\r\n  getThankYouPagePaypalInfo(componentType, id) {\r\n    let currentLang = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_Information_ThankYouPage_Paypal_Url\r\n      .replace('{type}', componentType)\r\n      .replace('{orderid}', id)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{userid}', customerId);\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getThankYouPagOnlineInfo(componentType, id) {\r\n    let currentLang = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_Information_ThankYouPage_PagOnline_Url\r\n      .replace('{type}', componentType)\r\n      .replace('{orderid}', id)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{userid}', customerId);\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getThankYouNexiInfo(componentType, id, messaggio, data, orario) {\r\n    let currentLang = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    //remove special char\r\n    messaggio = messaggio.replace('%2B', ' ')\r\n    messaggio = messaggio.replace('+', ' ')\r\n    let url = this.mappings.Web_Api_Get_Information_ThankYouPage_Nexi_Url\r\n      .replace('{type}', componentType)\r\n      .replace('{orderid}', id)\r\n      .replace('{messaggio}', messaggio)\r\n      .replace('{data}', data)\r\n      .replace('{orario}', orario)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{userid}', customerId);\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getThankYouBancaSellaInfo(componentType, id, messaggio) {\r\n    let currentLang = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    //remove special char\r\n    let url = this.mappings.Web_Api_Get_Information_ThankYouPage_BancaSella_Url\r\n      .replace('{type}', componentType)\r\n      .replace('{orderid}', id)\r\n      .replace('{messaggio}', messaggio)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{userid}', customerId);\r\n    return this._api.get(url);\r\n  }\r\n\r\n  \r\n  /**\r\n   * return the html template for a given component\r\n  */\r\n  getComponentTemplate(componentType) {\r\n    let currentLang = this.language.getLongLang();\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Template_Url\r\n      .replace('{type}', componentType)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getComponentTemplatePageNotFound(componentType) {\r\n    let currentLang = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Template_Url_Page_Not_Found\r\n      .replace('{type}', componentType)\r\n      .replace('{lang}', currentLang)\r\n      .replace('{userid}', customerId)\r\n      .replace('{cartid}', cartId);;\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getHeadFootData(templateBuilderId) {\r\n    let currentLang = this.language.getLongLang();\r\n    //reading template builder id\r\n    if (templateBuilderId == undefined || templateBuilderId == \"undefined\") {\r\n      templateBuilderId = \"0\"\r\n    }\r\n\r\n    let url = this.mappings.Web_Api_Get_Head_Foot_Data\r\n      .replace('{lang}', currentLang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    return this._api.get(url).do(json => {\r\n      this.cache.clear(url);\r\n    });\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/settings/template.service.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, Inject } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { ActivatedRoute, NavigationEnd, Router } from \"@angular/router\";\r\n\r\nimport { TemplateService } from './services/settings/template.service';\r\nimport { CacheService } from './services/core/cache.service';\r\nimport { Mappings } from './shared/mapping';\r\nimport { RoutesService } from \"./services/core/routes.service\";\r\nimport { Breadcrumbs } from \"./models/cms/breadcrumbs\";\r\n\r\nimport {\r\n  // import as RouterEvent to avoid confusion with the DOM Event\r\n  Event as RouterEvent,\r\n  NavigationStart,\r\n  NavigationCancel,\r\n  NavigationError\r\n} from '@angular/router';\r\nimport { ComponentHelperService } from './services/core/component-helper.service';\r\nimport { CurrencyService } from './services/cms/currency.service';\r\nimport { AuthService } from './services/core/auth.service';\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  selector: 'app',\r\n  template:require('./app.component.html')\r\n})\r\n\r\nexport class AppComponent {\r\n\r\n  private _dom: DomAdapter = getDOM();\r\n  \r\n  constructor(private template: TemplateService,\r\n    @Inject(DOCUMENT) private document: any,\r\n    @Inject('isNode') private isNode: boolean,\r\n    private cache: CacheService,\r\n    private mappings: Mappings,\r\n    private router: Router,\r\n    private authService: AuthService,\r\n    private route: ActivatedRoute,\r\n    private currency: CurrencyService,\r\n    public routesService: RoutesService\r\n  ) {\r\n    let sub = router.events.subscribe((event: RouterEvent) => {\r\n      this.navigationInterceptor(event)\r\n    });\r\n\r\n    let currencysub = currency.getCurrencyBackend().subscribe(result => {\r\n      currency.setDefaultCurrency(result);\r\n    });\r\n    this.subManager.add(sub);\r\n    this.subManager.add(currencysub);\r\n  }\r\n\r\n  subManager = new Subscription();\r\n  \r\n  // Shows and hides the loading spinner during RouterEvent changes\r\n  navigationInterceptor(event: RouterEvent): void {\r\n    if (event instanceof NavigationStart) {\r\n      this.routesService.showPageLoader();\r\n    }\r\n\r\n    if (event instanceof NavigationEnd) {\r\n      let templateBuilderId = this.route.snapshot.queryParams[\"tempBuildId\"];\r\n      //console.log(templateBuilderId, \"templateBuilderId\")\r\n      if (templateBuilderId != \"undefined\" && templateBuilderId != undefined && templateBuilderId != \"0\") {\r\n        this.authService.setTemplBuilderId(templateBuilderId);\r\n        //console.log(templateBuilderId, \"templateBuilderIdIF\")\r\n      }\r\n      else {\r\n        templateBuilderId = this.authService.getTemplBuilderId();\r\n        //console.log(templateBuilderId, \"templateBuilderIdelse\")\r\n      }\r\n      this._ngOnInit(templateBuilderId);\r\n    }\r\n    // Set loading state to false in both of the below events to hide the spinner in case a request fails\r\n    if (event instanceof NavigationCancel) {\r\n      this.routesService.hidePageLoader();      \r\n    }\r\n    \r\n    if (event instanceof NavigationError) {\r\n      this.routesService.hidePageLoader();      \r\n    }\r\n  }\r\n\r\n  ngOnInit() {\r\n  }\r\n\r\n  _ngOnInit(templateBuilderId) {\r\n    if (!this.isNode) {\r\n      return;\r\n    }\r\n\r\n    let templateSub = this.template.getHeadFootData(templateBuilderId)\r\n        .subscribe((headFootData) => {\r\n        //Dynamically adding head css, js to the page (head.html)\r\n        this.appendHtmlString(this.document.head, headFootData.HeadTemplateHtml);\r\n\r\n        //Dynamically adding head css, js to the page (foot.html)\r\n        this.appendHtmlString(this.document.body, headFootData.FootTemplateHtml);\r\n      });\r\n\r\n      this.subManager.add(templateSub);\r\n  }\r\n\r\n  private appendHtmlString(el: any, template: string) {\r\n    let div = this._dom.createElement('div');\r\n    this._dom.setInnerHTML(div, template);\r\n    this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n  }\r\n\r\n  clearMemory(){\r\n    this._dom = null;\r\n    this.subManager.unsubscribe();\r\n    this.cache.clearAll();\r\n    this.document = null;\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.clearMemory();\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/app.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { News } from \"./../../../../models/cms/news-list\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class ArticleCategoryComponent implements OnInit {\r\n\r\n    articleCategory: ArticleCategory = new ArticleCategory();\r\n\r\n    constructor(\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private articleService: ArticleService,\r\n        private languageService: LanguageService,\r\n        private route: ActivatedRoute,\r\n        private router: Router,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean,\r\n        private seo: SeoService,\r\n        private renderer: Renderer,\r\n        @Inject(DOCUMENT) private document: any,\r\n        private scriptService: ScriptService\r\n        ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        //Reading Language information\r\n        let lang: string = this.languageService.getLongLang();\r\n\r\n        //Reading id from url\r\n        //If id is set, then the information is retrived by id, else by url\r\n        let routeSub = this.route.params.subscribe(params => {\r\n\r\n            let id = params['id'];\r\n            let pageNumber = params['page'];\r\n            let startRowIndex: number = 0;\r\n            let maxRows: number = 15;\r\n\r\n            if (pageNumber == undefined) {\r\n                pageNumber = 0;\r\n                startRowIndex = pageNumber * maxRows;\r\n            }\r\n            else if (pageNumber < 0) {\r\n                pageNumber = 0;\r\n                startRowIndex = pageNumber * maxRows;\r\n            }\r\n            else {\r\n                startRowIndex = (pageNumber - 1) * maxRows;\r\n            }\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n    \r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n\r\n            if (id !== undefined) {\r\n                let categoryId: string = id;\r\n\r\n                let categorySubId = this.articleService.getCategoryArticleById(categoryId, lang, startRowIndex, maxRows)\r\n                    .subscribe(result => {\r\n                        if (result.SeoInformation) {\r\n                            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                        }\r\n                        \r\n                        if (this.isBrowser) {\r\n                            this.onGetArticleSuccess(result, pageNumber, maxRows,header, categoryId);\r\n                        }\r\n                        else {\r\n                            //-- Get head and body scripts\r\n                            this.scriptService.setupExternalScripts(result, this.scriptService.typeArticleCategory, categoryId);\r\n                            \r\n                            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                        }\r\n                    });\r\n\r\n                this.subManager.add(categorySubId);\r\n            }\r\n\r\n            else {\r\n                let url = this.router.url;\r\n                let pageNumber = params['page'];\r\n\r\n                if (pageNumber != undefined) {\r\n                    url = url.slice(0, url.lastIndexOf('/'));\r\n                }\r\n                else {\r\n                    pageNumber = 0;\r\n                }\r\n\r\n                let categorySubUrl = this.articleService.getArticleCategoryByUrl(lang, url, startRowIndex, maxRows).subscribe(result => {\r\n                    if (this.isBrowser) {\r\n                        this.onGetArticleSuccess(result, pageNumber, maxRows,header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeArticleCategory, result.CategoryDetails.Id);\r\n                        \r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(categorySubUrl);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(routeSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    onGetArticleSuccess(result: any, currentPage: number, maxRows: number,header:any, categoryId?: string ) {\r\n        ////Creating sub-component with the returned information\r\n        let subComponent = this.createSubComponent(result, currentPage, maxRows,header,categoryId);\r\n\r\n        ////Injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n\r\n    private createSubComponent(result: any, currentPage: number, maxRows: number,header:any ,categoryId?: string) {\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor(\r\n                private seoService: SeoService,\r\n                private scriptService: ScriptService,\r\n                private helperService: HelperService,\r\n                @Inject('isBrowser') private isBrowser: boolean,\r\n                private _elementRef: ViewContainerRef,\r\n                private languageService: LanguageService,\r\n                private articleService: ArticleService,\r\n                private routesService: RoutesService,\r\n                private router: Router,\r\n                private breadcrumbsService: BreadcrumbsService\r\n            ) { }\r\n\r\n            articleCategory: ArticleCategory = result.CategoryDetails;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            blogs: Array<News> = result.ArticleCategoryList;\r\n            private pageIsInit: boolean = false;\r\n\r\n            category: any;\r\n            articleCategories: Array<ArticleCategory>;\r\n            lang: string = this.languageService.getLongLang();\r\n            categoryId: number = 0;\r\n            startRowIndex: number = 0;\r\n            maxRows: number = maxRows;\r\n            blogCategoryPageName: string[] = [];\r\n            blogCategoryPageNumber: string[] = [];\r\n            blogPageName: string[] = [];\r\n            homePageName: string[] = [];\r\n\r\n            private currentPageNumber: number = currentPage;\r\n            private disablePreviousPage: boolean = false;\r\n            private disableNextPage: boolean = false;\r\n            private numberOfPages: number = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n            private pages: any = this.createRange(this.numberOfPages);\r\n            private zeroPage: number = 0;\r\n            private breadcrumbs : Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n           footerData: any = result.FooterData;\r\n           headerData: any = header;\r\n\r\n            ngOnInit() \r\n            {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                if(this.currentPageNumber == 0)\r\n                {\r\n                    this.zeroPage = 1;\r\n                }\r\n\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n\r\n                this.articleCategories = result.ArticleCategories;\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n                if (categoryId != undefined) {\r\n                    this.blogCategoryPageName = this.routesService.getRoutePath('ArticleCategoryPage');\r\n                    this.blogCategoryPageNumber = this.routesService.getRoutePath('ArticleCategoryPageWithPaging')\r\n                }\r\n\r\n                else {\r\n                    this.blogCategoryPageName.push(this.router.url)\r\n                }\r\n\r\n\r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n                return imgName;\r\n\r\n            }            \r\n\r\n            createRange(number) {\r\n                var items: any[] = [];\r\n\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n\r\n                return items;\r\n            }\r\n\r\n            showClickedPage(index) {\r\n                let page = index + 1;\r\n                let url: string;\r\n\r\n                if (categoryId != undefined) {\r\n                    url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', page.toString());\r\n                }\r\n                else {\r\n                    if (this.currentPageNumber == 0) {\r\n                        url = this.blogCategoryPageName + \"/\" + page.toString();\r\n                    }\r\n                    else {\r\n                        url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + page.toString();\r\n                    }\r\n                }\r\n\r\n                this.router.navigate([url]);\r\n            }\r\n\r\n            showPreviousPage() {\r\n                let previousPage: number = this.currentPageNumber - 1;\r\n\r\n                if (previousPage > 0) {\r\n                    let url: string;\r\n\r\n                    if (categoryId != undefined) {\r\n                        url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', previousPage.toString());\r\n                    }\r\n                    else {\r\n                        if (this.currentPageNumber == 0) {\r\n                            url = this.blogCategoryPageName + \"/\" + previousPage.toString();\r\n                        }\r\n                        else {\r\n                            url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + previousPage.toString();\r\n                        }\r\n                    }\r\n\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n\r\n            showNextPage() {\r\n                let page: number = Number(this.currentPageNumber);\r\n                if(this.currentPageNumber == 0)\r\n                {\r\n                    page = 1\r\n                }\r\n                \r\n                let nextPage: number = page + 1;\r\n \r\n                let url: string;\r\n\r\n                if (nextPage <= this.numberOfPages) {\r\n                    if (categoryId != undefined) {\r\n                        url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', nextPage.toString());\r\n                    }\r\n                    else {\r\n                        if (this.currentPageNumber == 0) {\r\n                            url = this.blogCategoryPageName + \"/\" + nextPage.toString();\r\n                        }\r\n                        else {\r\n                            url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + nextPage.toString();\r\n                        }\r\n                    }\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/article-category.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation,  Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { News } from \"./../../../../models/cms/news-list\";\r\nimport { ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class BlogPageComponent implements OnInit {\r\n    constructor(\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private articleService: ArticleService,\r\n        private languageService: LanguageService,\r\n        private activatedRoute: ActivatedRoute,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean,\r\n        private seo: SeoService,\r\n        private renderer: Renderer,\r\n        @Inject(DOCUMENT) private document: any,\r\n        private scriptService: ScriptService\r\n    ) {\r\n    }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n    categoryId: number = 0;\r\n    startRowIndex: number = 0;\r\n    maxRows: number = 15;\r\n    currentPageNumber: number = 0;\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let paramsSub = this.activatedRoute.params.subscribe(params => {\r\n            this.currentPageNumber = params['page'];\r\n\r\n            if (this.currentPageNumber == undefined) {\r\n                this.currentPageNumber = 1;\r\n                this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n            }\r\n            else if (this.currentPageNumber < 1) {\r\n                this.currentPageNumber = 1;\r\n                this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n            }\r\n            else {\r\n                this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n            }\r\n\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n    \r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n\r\n\r\n            let blogSub = this.articleService.getBlogData(this.lang, this.startRowIndex, this.maxRows).subscribe(result => {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                if (this.isBrowser) {\r\n                    //Creating subcomponent whith the blog information to inject\r\n                    let subComponent = this.createSubComponent(result, this.currentPageNumber, this.maxRows,header);\r\n\r\n                    //injecting created component (OK)\r\n                    this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n                }\r\n                else {\r\n                    //-- Get head and body scripts\r\n                    this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.blogHomeId);\r\n\r\n                    //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                    this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                    this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                }\r\n            });\r\n\r\n            this.subManager.add(blogSub);\r\n        }\r\n        )\r\n\r\n        this.subManager.add(paramsSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, currentPage: number, maxRows: number,header:any) {\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor(\r\n                private seoService: SeoService,\r\n                private _elementRef: ViewContainerRef,\r\n                @Inject('isBrowser') private isBrowser: boolean,\r\n                private scriptService: ScriptService,\r\n                private helperService: HelperService,\r\n                private languageService: LanguageService,\r\n                private articleService: ArticleService,\r\n                private routesService: RoutesService,\r\n                private router: Router,\r\n                private activatedRoute: ActivatedRoute,\r\n                private breadcrumbsService: BreadcrumbsService\r\n            ) { }\r\n\r\n            blogs: Array<News> = result.ArticleCategoryList;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private company: any = result.Company;\r\n            private pageIsInit: boolean = false;\r\n\r\n            private category: any;\r\n            private articleCategories: Array<ArticleCategory>;\r\n            private lang: string = this.languageService.getLongLang();\r\n            private categoryId: number = 0;\r\n            private startRowIndex: number = 0;\r\n            private maxRows: number = maxRows;\r\n            private blogPageName: string[] = [];\r\n            private blogPageNumber: string[] = [];\r\n            private numberOfPages: number = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n            private pages: any = this.createRange(this.numberOfPages);\r\n            private currentPageNumber: number = currentPage;\r\n            private disableNextPage: boolean = false;\r\n            private disablePreviousPage: boolean = false;\r\n            private homePageName: string[] = [];\r\n\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n           footerData: any = result.FooterData;\r\n           headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                this.articleCategories = result.ArticleCategories;\r\n\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.blogPageNumber = this.routesService.getRoutePath('BLOG_WITH_PAGINATION');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n                \r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n                return imgName;\r\n\r\n            }\r\n\r\n            //PAGINATION START************************************************************\r\n            createRange(number) {\r\n                var items: any[] = [];\r\n\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n\r\n                return items;\r\n            }\r\n\r\n            showClickedPage(index) {\r\n                let page = index + 1;\r\n                let url = this.blogPageNumber[0].replace(':page', page.toString());\r\n\r\n                this.router.navigate([url]);\r\n            }\r\n\r\n            showPreviousPage() {\r\n                let previousPage: number = this.currentPageNumber - 1;\r\n\r\n                if (previousPage > 0) {\r\n                    let url = this.blogPageNumber[0].replace(':page', previousPage.toString());\r\n\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n\r\n            showNextPage() {\r\n                let nextPage: number = Number(this.currentPageNumber) + 1;\r\n\r\n                if (nextPage <= this.numberOfPages) {\r\n                    let url = this.blogPageNumber[0].replace(':page', nextPage.toString());\r\n\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n            //PAGINATION END************************************************************\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/blog-page.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { NewsDetails, ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { NewsletterService } from \"../../../../services/cms/newsletter.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class ArticleComponent implements OnInit {\r\n    newsDetails: NewsDetails = new NewsDetails();\r\n\r\n    constructor(\r\n        private _elementRef: ViewContainerRef,\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private languageService: LanguageService,\r\n        private router: Router,\r\n        private route: ActivatedRoute,\r\n        private articleService: ArticleService,\r\n        private templateService: TemplateService,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean,\r\n        private seo: SeoService,\r\n        private renderer: Renderer,\r\n        @Inject(DOCUMENT) private document: any,\r\n        private scriptService: ScriptService) {\r\n        this.router.routeReuseStrategy.shouldReuseRoute = () => false;\r\n    }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        //Reading Language information\r\n        let lang: string = this.languageService.getLongLang();\r\n\r\n        let paramSub = this.route.params.subscribe(params => {\r\n\r\n            let id = params['id'];\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n    \r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n            //Reading id from url\r\n            //If id is set, then the page is retrived by id, else by url\r\n            if (id !== undefined) {\r\n\r\n                let Id: number = id;\r\n\r\n                let subArticleId = this.articleService.getArticleDetails(Id, lang).subscribe(result => {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n\r\n                    if (this.isBrowser) {\r\n                        this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeArticle, Id);\r\n\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.HeaderImage)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(subArticleId);\r\n            }\r\n\r\n            else {\r\n                let url = this.router.url;\r\n\r\n                let subArticleUrl = this.articleService.getArticleByUrl(lang, url).subscribe(result => {\r\n                    if (this.isBrowser) {\r\n                        this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeArticle, result.Id);\r\n\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.HeaderImage)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(subArticleUrl);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(paramSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    onGetPageSuccess(newsResult: NewsDetails, header: any) {\r\n        ////Creating sub-component with the returned information\r\n        let subComponent = this.createSubComponent(newsResult, header);\r\n\r\n        ////Injecting dynamically created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n\r\n    private createSubComponent(newsObj: NewsDetails, header: any) {\r\n        if (newsObj.Id == 0) {\r\n            let templateSub = this.templateService.getComponentTemplate(\"newsletterConfirmationTemplate\").subscribe(result => {\r\n                newsObj.TemplateHtml = result;\r\n            });\r\n\r\n            this.subManager.add(templateSub);\r\n        }\r\n\r\n        @Component({\r\n            template: newsObj.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor(\r\n                private seoService: SeoService,\r\n                @Inject('isBrowser') private isBrowser: boolean,\r\n                private _elementRef: ViewContainerRef,\r\n                private scriptService: ScriptService,\r\n                private helperService: HelperService,\r\n                private newsletterService: NewsletterService,\r\n                private routesService: RoutesService,\r\n                private articleService: ArticleService,\r\n                private languageService: LanguageService,\r\n                private breadcrumbsService: BreadcrumbsService\r\n            ) { }\r\n\r\n            newsDetails: NewsDetails = newsObj;\r\n            slidesNews: any = newsObj.SliderImages;\r\n            items: any;\r\n            category: any;\r\n            private pageIsInit: boolean = false;\r\n            private seoInfo: SeoViewModel = newsObj.SeoInformation;\r\n            private model =\r\n                {\r\n                    Email: \"\",\r\n                    Checkbox: false\r\n                }\r\n\r\n            private newsletterSubmittedArticle: boolean;\r\n            private spinnerNewslatterArticle: boolean;\r\n            private alreadySubscribedArticle: boolean;\r\n            private successfullySubscribedArticle: boolean;\r\n            private privacyPageNameArticle: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n            articleCategories: Array<ArticleCategory>;\r\n            lang: string = this.languageService.getLongLang();\r\n            categoryId: number = 0;\r\n            startRowIndex: number = 0;\r\n            maxRows: number = 999999;\r\n            blogPageName: string[] = [];\r\n            homePageName: string[] = [];\r\n\r\n            private breadcrumbs: Breadcrumbs[] = newsObj.BreadcrumbsInfo;\r\n\r\n            subManager = new Subscription();\r\n\r\n            footerData: any = newsObj.FooterData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.articleCategories = newsObj.ArticleCategories;\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                this.setupSocialNetworks();\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initLightbox();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            setupSocialNetworks() {\r\n                let shareurl = window.location.href;\r\n\r\n                let title = this.newsDetails.Title;\r\n                let text = encodeURI(title);\r\n\r\n                /********************************** SET THIS PART DYNAMICALY **************************************** */\r\n                //setting twitter profile name \r\n                let companyTwitterProfile = \"DynamicsoftSrl\";\r\n\r\n                //setting linkedin profile name\r\n                let companyLinkedinProfile = \"DynamicsoftSrl\"\r\n                /**************************************************************************************************** */\r\n                //encoded current page\r\n                let currentPage = encodeURI(shareurl);\r\n                //sharing of current page on Facebook\r\n                $('.fbsharelink').click(function () {\r\n                    window.open('https://www.facebook.com/sharer/sharer.php?u=' + shareurl + '&t=' + document.title, '',\r\n                        'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n                    return false;\r\n                });\r\n\r\n                //sharing of current page on LinkedIn\r\n                $('.linkedinsharelink').click(function () {\r\n                    window.open('https://www.linkedin.com/shareArticle?mini=true&url=' + shareurl + '&title=' + document.title +\r\n                        '&summary=' + text + '&source=' + companyLinkedinProfile, '',\r\n                        'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600')\r\n                });\r\n\r\n                //sharing of currentpage on Twitter\r\n                $('.twitter-share-button').click(function () {\r\n                    window.open('https://twitter.com/intent/tweet?text=' + text + '&url=' + currentPage + '&via=' + companyTwitterProfile, '',\r\n                        'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n                })\r\n            }\r\n\r\n            onSubmit(form) {\r\n                this.spinnerNewslatterArticle = true;\r\n                if (form) {\r\n                    let subNewsletter = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n\r\n                        if (result == \"-1\") {\r\n                            this.alreadySubscribedArticle = true;\r\n                            this.successfullySubscribedArticle = false;\r\n                            this.spinnerNewslatterArticle = false;\r\n                        }\r\n\r\n                        else {\r\n                            this.alreadySubscribedArticle = false;\r\n                            this.successfullySubscribedArticle = true;\r\n                            this.spinnerNewslatterArticle = false;\r\n                        }\r\n                    });\r\n\r\n                    this.subManager.add(subNewsletter);\r\n                }\r\n\r\n                else {\r\n                    this.spinnerNewslatterArticle = false;\r\n                }\r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/news-page.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Input } from '@angular/core';\r\n\r\n//Services\r\nimport { SearchService } from '../../../../services/inventory/search.service';\r\nimport { ComponentHelperService } from '../../../../services/core/component-helper.service';\r\nimport { RoutesService } from '../../../../services/core/routes.service';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { type } from 'os';\r\nimport { SearchResult } from '../../../../models/inventory/search-result';\r\nimport { errorHandler } from '@angular/platform-browser/src/browser';\r\nimport { error } from 'util';\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    selector: \"\",\r\n    template: ''\r\n})\r\n\r\nexport class SearchComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private searchService: SearchService,\r\n            private cmsComponentService: CmsComponentService,\r\n            private activatedRoute: ActivatedRoute,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    private query: string;\r\n    private currentPageNumber: number;\r\n    private startRow: number = 0;\r\n    private endRow: number = 10;\r\n    private SearchResult: any;\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let paramSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n\r\n            let decodedQuery = params['query'];\r\n\r\n            var decoded = decodeURIComponent(decodedQuery)\r\n\r\n            this.query = encodeURIComponent(decoded);\r\n\r\n            this.currentPageNumber = params['page'];\r\n\r\n            if (this.currentPageNumber == undefined) {\r\n                this.currentPageNumber = 1;\r\n                this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n            }\r\n            else if (this.currentPageNumber < 1) {\r\n                this.currentPageNumber = 1;\r\n                this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n            }\r\n            else {\r\n                this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n            }\r\n\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n\r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n\r\n            let catAndProdSub = this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(result => {\r\n                this.SearchResult = result;\r\n\r\n                if (this.isBrowser) {\r\n                    // Creating subcomponent whith the selected template to inject\r\n                    let subComponent = this.createSubComponent(header, this.SearchResult, this.query, this.currentPageNumber, this.endRow);\r\n\r\n                    //injecting created component (OK)\r\n                    this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n                }\r\n                else {\r\n                    //Eventually retrieving the script to append\r\n                    if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchPageId);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchWithPagingPageId);\r\n                    }\r\n                }\r\n            },\r\n                err => this.handleSearchError())\r\n\r\n            this.subManager.add(catAndProdSub);\r\n        })\r\n\r\n        this.subManager.add(paramSub)\r\n    }\r\n\r\n    handleSearchError() {\r\n        this.query = null;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(result => {\r\n            this.SearchResult = result;\r\n            if (this.isBrowser) {\r\n                // Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(header, this.SearchResult, this.query, this.currentPageNumber, this.endRow);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //Eventually retrieving the script to append\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    //-- Get head and body scripts\r\n                    this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchPageId);\r\n                }\r\n                else {\r\n                    //-- Get head and body scripts\r\n                    this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchWithPagingPageId);\r\n                }\r\n            }\r\n        })\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n\r\n    private createSubComponent(header: any, SearchResult: any, query: string, currentPage: number, endRow: number) {\r\n\r\n        @Component({\r\n            template: SearchResult.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private routesService: RoutesService,\r\n                    private searchService: SearchService,\r\n                    private router: Router,\r\n                    private seoService: SeoService,\r\n                    private scriptService: ScriptService,\r\n                    private _elementRef: ViewContainerRef\r\n                ) { }\r\n\r\n            private seoInfo: SeoViewModel = SearchResult.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private searchResults: Array<SearchResult>;\r\n            private defaultImageUrl: string = \"/global_app/img/noimage.jpg\";\r\n            private redirectUrlNone: string = \"javascript:void(0)\";\r\n\r\n            //pagination\r\n            private query = query;\r\n            private currentPageNumber: number = currentPage;\r\n            private disablePreviousPage: boolean = false;\r\n            private disableNextPage: boolean = false;\r\n            private numberOfPages: number = Math.ceil(SearchResult.NumberOfResults / endRow);\r\n            private searchResultsPage: string[] = [];\r\n            private searchResultsPageWithPagination: string[] = [];\r\n            private pages: any = this.createRange(this.numberOfPages);\r\n            private numberOfResult: number = SearchResult.NumberOfResults;\r\n            headerData: any = header;\r\n            ngOnInit() {\r\n                if (SearchResult.SearchModelList != null) {\r\n                    this.searchResults = SearchResult.SearchModelList;\r\n                }\r\n\r\n                if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n                    this.disablePreviousPage = true;\r\n                }\r\n                else if (this.currentPageNumber == this.numberOfPages) {\r\n                    this.disableNextPage = true;\r\n                }\r\n\r\n                this.searchResultsPage = this.routesService.getRoutePath('SEARCH - RESULTS');\r\n                this.searchResultsPageWithPagination = this.routesService.getRoutePath('SEARCH RESULTS - PAGINATION');\r\n\r\n                if (this.searchResults != null && this.searchResults != undefined) {\r\n                    for (let i = 0; i < this.searchResults.length; i++) {\r\n                        //setting of default image if image url is not defined\r\n                        if (this.searchResults[i].ImageUrl == null || this.searchResults[i].ImageUrl == \"\") {\r\n                            this.searchResults[i].ImageUrl = this.defaultImageUrl;\r\n                        }\r\n\r\n                        //setting of url href not to do nothing if url is not defined\r\n                        if (this.searchResults[i].RedirectUrl == null || this.searchResults[i].RedirectUrl == \"\") {\r\n                            this.searchResults[i].RedirectUrl = this.redirectUrlNone;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            //Pagination start\r\n            createRange(number) {\r\n                var items: any[] = [];\r\n\r\n                for (var i = 1; i <= number; i++) {\r\n                    items.push(i);\r\n                }\r\n\r\n                return items;\r\n            }\r\n\r\n            showClickedPage(index) {\r\n                let page = index + 1;\r\n                let url = this.searchResultsPageWithPagination[0]\r\n                    .replace(':query', query)\r\n                    .replace(':page', page.toString());\r\n\r\n                this.router.navigate([url]);\r\n            }\r\n\r\n            showPreviousPage() {\r\n                let previousPage: number = this.currentPageNumber - 1;\r\n\r\n                if (previousPage > 0) {\r\n                    let url = this.searchResultsPageWithPagination[0]\r\n                        .replace(':query', query)\r\n                        .replace(':page', previousPage.toString());\r\n\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n\r\n            showNextPage() {\r\n                let nextPage: number = Number(this.currentPageNumber) + 1;\r\n\r\n                if (nextPage <= this.numberOfPages) {\r\n                    let url = this.searchResultsPageWithPagination[0]\r\n                        .replace(':query', query)\r\n                        .replace(':page', nextPage.toString());\r\n\r\n                    this.router.navigate([url]);\r\n                }\r\n            }\r\n            //Pagination end\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/header/widget/search.component.ts","import { CustomersCanvasService } from './../../../../services/inventory/customerscanvas.service';\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\n//Services\r\nimport { NewsletterService } from '../../../../services/cms/newsletter.service';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CacheService } from '../../../../services/core/cache.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { Meta } from '../../../../services/core/angular2-meta';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\nimport { collectAndResolveStyles } from '@angular/core/src/animation/animation_style_util';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport { LanguageService } from '../../../../services/cms/language.service';\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: ''\r\n})\r\n\r\nexport class HomeComponent implements OnInit {\r\n  data: any = {};\r\n\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      private scriptService: ScriptService,\r\n      @Inject(DOCUMENT) private document: any\r\n    ) {\r\n    this._compiler.clearCache();\r\n  }\r\n\r\n  subManager = new Subscription();\r\n  requestDataFromMultipleSources(): Observable<any[]> {\r\n    let response1 = this.cmsComponentService.getHeaderData();\r\n    let response2 = this.cmsComponentService.getSideMenuData();\r\n    let response3 = this.cmsComponentService.getproductHilightpromo();\r\n    let response4 = this.cmsComponentService.getHomePageDataOptimized();\r\n\r\n    // Observable.forkJoin (RxJS 5) changes to just forkJoin() in RxJS 6\r\n    return Observable.forkJoin([response1, response2, response3, response4]);\r\n  }\r\n  ngOnInit() {\r\n    let homePageInfo: any;\r\n    let header: any;\r\n    let SideMenu: any;\r\n    let promo: any;\r\n    let highlith: any;\r\n    let fork = this.requestDataFromMultipleSources().subscribe(result => {\r\n\r\n      header = result[0];\r\n      if (result[1].Categories) {\r\n        header.Categories = result[1].Categories;\r\n        SideMenu = result[1];\r\n      }\r\n      if (result[2].Promotions) {\r\n        promo = result[2].Promotions;\r\n\r\n      }\r\n      if (result[2].Highlights) {\r\n        highlith = result[2].Highlights;\r\n\r\n      }\r\n      if (result[3].SeoInformation) {\r\n        result[3].SeoInformation.ShortDescription = result[3].ShortDescription ? result[3].ShortDescription : '';\r\n        result[3].SeoInformation.LongDescription = result[3].LongDescription ? result[3].LongDescription : '';\r\n      }\r\n      if (SideMenu) {\r\n        result[3].SideMenuData = SideMenu;\r\n      }\r\n      if (promo) {\r\n        result[3].Promotions = promo;\r\n      }\r\n      if (highlith) {\r\n        result[3].Highlights = highlith;\r\n      }\r\n      if (this.isBrowser) {\r\n        homePageInfo = result[3];\r\n        //Creating subcomponent whith the selected template to inject\r\n        let subComponent = this.createSubComponent(homePageInfo, header);\r\n        //let subComponent = this.createSubComponent(homePageInfo);\r\n\r\n        this._elementRef.clear();\r\n        //injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n      }\r\n      else {\r\n        //-- Get head and body scripts\r\n        this.scriptService.setupExternalScripts(result[3], this.scriptService.typeSystemPage, this.scriptService.homeId);\r\n\r\n        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n        this.seo.setSeoMetaData(this.document, this.renderer, result[3].SeoInformation)\r\n        this.seo.generateSeoDomServerSide(this.document, this.renderer, result[3].SeoInformation);\r\n      }\r\n    });\r\n    this.subManager.add(fork);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n    // this.cache.clearAll();\r\n  }\r\n\r\n  //Creates component to inject\r\n  //private createSubComponent(homePageInfo: any) {\r\n\r\n  private createSubComponent(homePageInfo: any, header: any) {\r\n    @Component({\r\n      template: homePageInfo.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private routesService: RoutesService,\r\n          private seoService: SeoService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private _elementRef: ViewContainerRef,\r\n          private scriptService: ScriptService,\r\n          private helperService: HelperService,\r\n          public currency: CurrencyService,\r\n          private languageService: LanguageService,\r\n          private newsletterService: NewsletterService,\r\n          private componentHelper: ComponentHelperService,\r\n          private cache: CacheService,\r\n          public canvasService: CustomersCanvasService,\r\n          private metaService: Meta,\r\n      ) { }\r\n\r\n      private homeIsInit: boolean = false;\r\n\r\n      private productsPageName: string[] = [];\r\n      private promotionsPageName: string[] = [];\r\n\r\n      private categories: any = homePageInfo.Categories;\r\n      private highlights: any = homePageInfo.Highlights;\r\n      private promotions: any = homePageInfo.Promotions;\r\n      private seoInfo: SeoViewModel = homePageInfo.SeoInformation;\r\n      private articles: any = homePageInfo.ArticleCategoryList;\r\n      //private headerData: any = homePageInfo.HeaderData;\r\n\r\n      private headerData: any = header;\r\n      private footerData: any = homePageInfo.FooterData;\r\n      private sideMenuData: any = homePageInfo.SideMenuData;\r\n      private sliderData: any = homePageInfo.SliderData;\r\n\r\n      //newsletter subsciption\r\n      private newsletterSubmitted: boolean = false;\r\n      private privacySubmitted: boolean = false;\r\n      private alreadySubscribed: boolean = false;\r\n      private successfullySubscribed: boolean = false;\r\n      private spinnerNewslatter: boolean = false;\r\n      public lang = this.languageService.getShortLang();\r\n      private model = {\r\n        Email: \"\",\r\n        CheckboxSubscribe: false\r\n      };\r\n\r\n      subManager = new Subscription();\r\n\r\n      // private breadcrumbs : Breadcrumbs[] = homePageInfo.BreadcrumbsInfo;\r\n\r\n      ngOnInit() {\r\n\r\n        // setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n        this.sideMenuData.Categories = this.headerData.Categories;\r\n        this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n        this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n      }\r\n\r\n\r\n      filteraArticleOfType(type, numReturn) {\r\n        let count = 1;\r\n        let result = new Array<any>();\r\n        let res = this.articles.filter(x => x.Code_Category == type);\r\n        for (let item of res) {\r\n          if (count > numReturn) {\r\n            return result;\r\n          }\r\n          result.push(item);\r\n          count++;\r\n        }\r\n        return result;\r\n      }\r\n\r\n      onSubmit(form) {\r\n        this.spinnerNewslatter = true;\r\n        if (form) {\r\n          let newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n            if (result == \"-1\") {\r\n              this.alreadySubscribed = true;\r\n              this.successfullySubscribed = false;\r\n              this.spinnerNewslatter = false;\r\n            }\r\n\r\n            else {\r\n              this.alreadySubscribed = false;\r\n              this.successfullySubscribed = true;\r\n              this.spinnerNewslatter = false;\r\n            }\r\n          });\r\n\r\n          this.subManager.add(newsSub);\r\n        }\r\n\r\n        else {\r\n          this.spinnerNewslatter = false;\r\n        }\r\n      }\r\n\r\n      imageTitle(imgPath) {\r\n        let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n        return imgName;\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.homeIsInit) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        //layoutTheme.initCarousel();\r\n        layoutTheme.initAnimate();\r\n        \r\n        //Eventually retrieving the script to append\r\n        // if (this.seoInfo.HasScripts == true) {\r\n        //     this.scriptService.appendHomeScript(this._elementRef.element.nativeElement);\r\n        // }\r\n\r\n        this.homeIsInit = true;\r\n      }\r\n\r\n      nullifyAllReferences() {\r\n        homePageInfo = null;\r\n        this.productsPageName = null;\r\n        this.promotionsPageName = null;\r\n\r\n        this.categories = null;\r\n        this.articles = null;\r\n        this.highlights = null;\r\n        this.promotions = null;\r\n        this.seoInfo = null;\r\n\r\n        this.headerData = null;\r\n        this.footerData = null;\r\n        this.sideMenuData = null;\r\n        this.sliderData = null;\r\n        this.model.CheckboxSubscribe = null;\r\n        this.model.Email = null;\r\n      }\r\n\r\n      doSomething() {\r\n        this.nullifyAllReferences();\r\n        this.subManager.unsubscribe();\r\n        this.componentHelper.clearMemory();\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.nullifyAllReferences();\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/sys/home.component.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { CmsContentService } from \"./../../../../services/cms/cms-content.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { CmsPage } from \"./../../../../models/cms/cms-page\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Menu } from '../../../../models/cms/menu';\r\nimport { CmsMenuListService } from '../../../../services/cms/cms-menu-list.service';\r\nimport { RoutesService } from '../../../../services/core/routes.service';\r\n\r\n@Component({\r\n    template: \"\",\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated\r\n})\r\n\r\nexport class CmsPageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cmsContentService: CmsContentService,\r\n            private route: ActivatedRoute,\r\n            private languageService: LanguageService,\r\n            private router: Router,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        //Reading Language information\r\n        let longLangCode: string = this.languageService.getLongLang();\r\n        let shortLangCode: string = this.languageService.getShortLang();\r\n\r\n        let subParams = this.route.params.subscribe(params => {\r\n            let id = params['id'];\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n    \r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n            //Reading id from url\r\n            //If id is set, then the page is retrived by id, else by url\r\n            if (id !== undefined) {\r\n                let pageId = '' + id;\r\n\r\n                let cmsIdSub = this.cmsContentService.getCmsPageById(longLangCode, pageId).subscribe(result => {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n\r\n                    if (this.isBrowser) {\r\n                        this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeCmsPage, pageId);\r\n\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.TopImage)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(cmsIdSub);\r\n            }\r\n\r\n            else {\r\n                let url = this.router.url;\r\n\r\n                let cmsUrlSub = this.cmsContentService.getCmsPageByUrl(longLangCode, url).subscribe(result => {\r\n                    if (this.isBrowser) {\r\n                        this.onGetPageSuccess(result, header);\r\n                    }\r\n                    else {\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeCmsPage, result.IdLevel);\r\n\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.TopImage)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(cmsUrlSub);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(subParams);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    onGetPageSuccess(cmsResult: CmsPage, header: any) {\r\n        //Creating subcomponent whith the object get from server\r\n        let subComponent = this.createSubComponent(cmsResult, header);\r\n\r\n        //injecting created component\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n\r\n    //Creates component to inject \r\n    private createSubComponent(cmsPageObj: CmsPage, header: any) {\r\n        @Component({\r\n            template: cmsPageObj.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            private _dom: DomAdapter = getDOM();\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    @Inject(DOCUMENT) private document: any,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private helperService: HelperService,\r\n                    private cmsMenuListService: CmsMenuListService,\r\n                    private languageService: LanguageService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            cmspage: CmsPage = cmsPageObj;\r\n            private seoInfo: SeoViewModel = cmsPageObj.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            menuItems: Menu[] = [];\r\n            headerData: any = header;\r\n            footerData: any = cmsPageObj.footerData;\r\n\r\n            private lang: string = this.languageService.getLongLang();\r\n            private breadcrumbs: Breadcrumbs[] = [];\r\n            //private breadcrumbs: Breadcrumbs[] = cmsPageObj.BreadcrumbsInfo;\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                let paramPage = \"cmspage\";\r\n\r\n                //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n                this.breadcrumbs = cmsPageObj.BreadcrumbsInfo;\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                if (this.isBrowser == true) {\r\n                    setTimeout(x => this.menuItems = cmsPageObj.menuItems, 1);\r\n                    //     let cmsMenuSub = this.cmsMenuListService.LoadData(this.cmspage.IdLevel, this.lang).subscribe(result => {\r\n                    //         if (result != null) {\r\n                    //             this.menuItems = result;\r\n                    //         }\r\n                    //     });\r\n\r\n                    //     this.subManager.add(cmsMenuSub);\r\n                }\r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cms-page.component.ts","import { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CookiePolicyService } from \"./../../../../services/core/cookie-policy.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class CookiePolicyComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private cookiePolicyService: CookiePolicyService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let cookieSub = this.cookiePolicyService.getCookiePolicyData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cookiesId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(cookieSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, header: any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml,\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            configuration: Configuration = result.ConfigurationInfo;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cookie-policy.component.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { FaqListService } from \"./../../../../services/cms/faq.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { CompanyService } from \"./../../../../services/core/company.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\ndeclare var jQuery: any;\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class FaqComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private faqlistService: FaqListService,\r\n            private languageService: LanguageService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let faqSub = this.faqlistService.getFaqData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the faq data to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.faqsId)\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(faqSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, header: any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private companyService: CompanyService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private seoService: SeoService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            faqlist: any = result.FaqList;\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                layoutTheme.initToggle();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/faq.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { InfoRequestService } from \"./../../../../services/cms/info-request.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { HttpParam } from \"./../../../../models/core/http-param\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { InfoRequest } from \"./../../../../models/cms/info-request\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    template: \"\"\r\n})\r\n\r\nexport class InfoRequestComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private infoRequestService: InfoRequestService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let templateHtml: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let infoSub = this.infoRequestService.getInfoRequestData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n\r\n                //templateHtml = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.infoRequestId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(infoSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(componentInfo: any, header: any) {\r\n\r\n        @Component({\r\n            template: componentInfo.TemplateHtml\r\n\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private infoRequestService: InfoRequestService,\r\n                    private seoService: SeoService,\r\n                    private router: Router,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            private configuration: Configuration;\r\n            private infoRequestFailed: boolean;\r\n            private infoRequestSuccess: boolean;\r\n            private model: InfoRequest;\r\n            private company: Company = componentInfo.Company;\r\n\r\n            private pageIsInit: boolean = false;\r\n            private spinnerContact: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = componentInfo.BreadcrumbsInfo;\r\n            footerData: any = componentInfo.footerData;\r\n            headerData: any = header;\r\n            subManager = new Subscription();\r\n\r\n            onSubmit(form) {\r\n                this.spinnerContact = true;\r\n\r\n                if (form.valid) {\r\n                    let infoSub = this.infoRequestService.sendInfoRequest(this.model).subscribe(result => {\r\n                        if (result) {\r\n                            this.infoRequestSuccess = true;\r\n                            this.infoRequestFailed = false;\r\n                            this.spinnerContact = false;\r\n                        }\r\n\r\n                        else {\r\n                            this.infoRequestFailed = true;\r\n                            this.infoRequestSuccess = false;\r\n                            this.spinnerContact = false;\r\n                        }\r\n                    });\r\n\r\n                    this.subManager.add(infoSub);\r\n                }\r\n\r\n                else {\r\n                    this.infoRequestFailed = true;\r\n                    this.infoRequestSuccess = false;\r\n                    this.spinnerContact = false;\r\n                }\r\n            }\r\n\r\n            private seoInfo: SeoViewModel = componentInfo.SeoInformation;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.model = new InfoRequest();\r\n                this.model.Where = \"motoriDiRicerca\";\r\n                this.configuration = componentInfo.ConfigurationInfo;\r\n            }\r\n\r\n            initMap() {\r\n                if (google == undefined || google == null || !google) {\r\n                    this.initMap();\r\n                }\r\n                else {\r\n                    var geocoder = new google.maps.Geocoder();\r\n                    var street = this.company.StreetAddress.replace(\",\", \"\");\r\n                    var address = street + \" - \" + this.company.PostalCode + \", \" + this.company.City + \" (\" + this.company.Province + \")\";\r\n                    var htmlCode = \"<strong>\" + this.company.Name + \"</strong><br>\" + address + \"<br> <strong>Telefono:</strong> \" + this.company.Phone;\r\n                    geocoder.geocode({ 'address': address }, function (results, status) {\r\n\r\n                        var initLongitude = results[0].geometry.location.lng();\r\n                        var initLatitude = results[0].geometry.location.lat();\r\n\r\n                        var mapMarkers = [{\r\n                            address: address,\r\n                            html: htmlCode,\r\n                            icon: {\r\n                                image: \"/global_app/writefolder/img/pin.png\",\r\n                                iconsize: [100, 100],\r\n                                iconanchor: [50, 100]\r\n                            },\r\n                            popup: true\r\n                        }];\r\n\r\n                        // Map Initial Location\r\n\r\n\r\n                        // Map Extended Settings\r\n                        var mapSettings = {\r\n                            controls: {\r\n                                draggable: true,\r\n                                panControl: true,\r\n                                zoomControl: true,\r\n                                mapTypeControl: true,\r\n                                scaleControl: true,\r\n                                streetViewControl: true,\r\n                                overviewMapControl: true\r\n                            },\r\n                            scrollwheel: false,\r\n                            markers: mapMarkers,\r\n                            latitude: initLatitude,\r\n                            longitude: initLongitude,\r\n                            zoom: 18\r\n                        };\r\n\r\n                        var map = $(\"#map\").gMap(mapSettings);\r\n\r\n                        // Map Center At\r\n                        var mapCenterAt = function (options, e) {\r\n                            e.preventDefault();\r\n                            $(\"#map\").gMap(\"centerAt\", options);\r\n                        }\r\n                    })\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                //this.initMap();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/info-request.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { NewsletterService } from './../../../../services/cms/newsletter.service';\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    template: \"\"\r\n})\r\n\r\nexport class NewsletterConfirmationPageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private newsletterService: NewsletterService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let templateHtml: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n\r\n\r\n        let newsConfirmSub = this.newsletterService.getNewsletterConfirmationPageData().subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            \r\n            if (this.isBrowser) {\r\n\r\n                //Creating subcomponent whith the result to inject\r\n                let subComponent = this.createSubComponent(result,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.subscriptionConfirmationId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(newsConfirmSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header:any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private newsletterService: NewsletterService\r\n                ) { }\r\n\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            headerData: any = header;\r\n            //newsletter subscription\r\n            private newsletterSubmitted: boolean = false;\r\n            private privacySubmitted: boolean = false;\r\n            private alreadySubscribed: boolean = false;\r\n            private successfullySubscribed: boolean = false;\r\n            private spinnerNewslatter: boolean = false;\r\n            private model = {\r\n                Email: \"\",\r\n                CheckboxSubscribe: false\r\n            };\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n            }\r\n\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/newsletter-confirmation-page.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from '@angular/router';\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { NewsletterService } from './../../../../services/cms/newsletter.service';\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    template: \"\"\r\n})\r\n\r\nexport class NewsletterPageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private newsletterService: NewsletterService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let templateHtml: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n\r\n\r\n\r\n\r\n        let newsPageSub = this.newsletterService.getNewsletterPageData().subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            \r\n            if (this.isBrowser) {\r\n\r\n                //Creating subcomponent whith the result to inject\r\n                let subComponent = this.createSubComponent(result,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.subscriptionId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(newsPageSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header:any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private newsletterService: NewsletterService,\r\n                    private router: Router\r\n                ) { }\r\n\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            headerData: any = header;\r\n            //newsletter subscription\r\n            private newsletterSubmitted: boolean = false;\r\n            private privacySubmitted: boolean = false;\r\n            private alreadySubscribed: boolean = false;\r\n            private successfullySubscribed: boolean = false;\r\n            private spinnerNewslatter: boolean = false;\r\n            private model = {\r\n                Email: \"\",\r\n                CheckboxSubscribe: false\r\n            };\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n            }\r\n\r\n            onSubmit(form) {\r\n                this.spinnerNewslatter = true;\r\n                if (form) {\r\n                    let newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n                        if (result == \"-1\") {\r\n                            this.alreadySubscribed = true;\r\n                            this.successfullySubscribed = false;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n\r\n                        else {\r\n\r\n                            let newsletterCompletePage: string[] = this.routesService.getRoutePath('NEWSLETTER - CONFIRMATION')[0];\r\n                            this.router.navigate([newsletterCompletePage]);\r\n                            this.alreadySubscribed = false;\r\n                            this.successfullySubscribed = true;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n                    },\r\n                        err => {\r\n                            console.log(err);\r\n                        })\r\n\r\n                    this.subManager.add(newsSub);\r\n                }\r\n\r\n                else {\r\n                    this.spinnerNewslatter = false;\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/newsletter-page.component.ts","//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { PrivacyPolicyService } from \"./../../../../services/core/privacy-policy.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class PrivacyPolicyComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private privacyPolicyService: PrivacyPolicyService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let privacySub = this.privacyPolicyService.getPrivacyPolicyData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the result information  to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.privacyPolicyId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(privacySub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, header: any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            configuration: Configuration = result.ConfigurationInfo;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/privacy-policy.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { PurchaseConditionService } from \"./../../../../services/core/purchase-condition.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class PurchaseConditionComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private purchaseConditionService: PurchaseConditionService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let templateHtml: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let conditionSub = this.purchaseConditionService.getPurchaseConditionServiceData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.purchaseConditionsId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(conditionSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, header: any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            configuration: Configuration = result.ConfigurationInfo;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/purchase-condition.component.ts","import { SeoViewModel } from './../../../models/core/seo';\r\nimport { SeoService } from './../../../services/core/seo.service';\r\nimport { ShoppingCartService } from './../../../services/inventory/shopping-cart.service';\r\nimport { Breadcrumbs } from './../../../models/cms/breadcrumbs';\r\nimport { BreadcrumbsService } from './../../../services/cms/breadcrumbs.service';\r\n//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//System\r\nimport { Mappings } from './../../../shared/mapping';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CompanyService } from \"./../../../services/core/company.service\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\nimport { ScriptService } from \"../../../services/cms/script.service\";\r\n//Models\r\n\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class CartEmptyPageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cartService: ShoppingCartService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n\r\n        let emptyCartSub = this.cartService.getEmptyCartPageData().subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            \r\n            if (this.isBrowser) {\r\n                var EmptyCartData = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(EmptyCartData,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cartEmptyId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(emptyCartSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(EmptyCartData: any,header:any) {\r\n\r\n        @Component({\r\n            template: EmptyCartData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private companyService: CompanyService,\r\n                    private mappings: Mappings,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private routesService: RoutesService,\r\n                    private scriptService: ScriptService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private seoService: SeoService\r\n                ) { }\r\n\r\n            private userLoginImg: string = this.mappings.UserLoginImg_Url;\r\n            private pageIsInit: boolean = false;\r\n            private seoInfo: SeoViewModel = EmptyCartData.SeoInformation;\r\n            private breadcrumbs: Breadcrumbs[] = EmptyCartData.BreadcrumbsInfo;\r\n\r\n           footerData: any = EmptyCartData.FooterData;\r\n           headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/cart-empty-page.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n\r\n\r\n@Component({\r\n    template: \"\"\r\n})\r\n\r\nexport class NotFoundPageComponent implements OnInit {\r\n\r\n    constructor\r\n        (\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private templateService: TemplateService,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean,\r\n        private seo: SeoService,\r\n        private renderer: Renderer,\r\n        @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let notFoundSub = this.templateService.getComponentTemplatePageNotFound(\"notfoundPageTemplate\").subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            \r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(result,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        },\r\n            //setting 404 page status code\r\n            err => {\r\n                if (!this.isBrowser)\r\n                    return;\r\n                //converting response to json\r\n                let response = err.json();\r\n\r\n                //Creating subcomponent whith the selected template to inject                \r\n                let subComponent = this.createSubComponent(response.TemplateHtml,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n        )\r\n\r\n        this.subManager.add(notFoundSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header:any) {\r\n\r\n        @Component({\r\n            template: result\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (\r\n                @Inject('isBrowser') private isBrowser: boolean,\r\n                private routesService: RoutesService\r\n                ) {\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private headerClass: boolean = false;\r\n           footerData: any = result.FooterData;\r\n           headerData: any = header;\r\n\r\n            ngOnInit() {\r\n            }\r\n\r\n            setAutoHeightAndWeightToLogo() {\r\n                this.headerClass = $(\"div\").hasClass(\"header-logo\");\r\n                if (this.headerClass == false) {\r\n                    //setTimeout(x => this.setAutoHeightAndWeightToLogo(), 5);\r\n                }\r\n                else {\r\n                    $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n                    $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.setAutoHeightAndWeightToLogo();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/not-found-page.component.ts","//Angular\r\nimport { Component,ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Company } from \"./../../../models/core/company\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class OfflinePageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let offlinePageData: any;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let offlineSub = this.cmsComponentService.getOfflinePageData().subscribe(result => {\r\n\r\n            offlinePageData = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(offlinePageData,header);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(offlineSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(pageData: any,header:any) {\r\n\r\n        @Component({\r\n            template: pageData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private translateService: TranslateService,\r\n                    private routesService: RoutesService,\r\n                    @Inject('isBrowser') private isBrowser: boolean\r\n                ) { }\r\n\r\n            private company: Company = pageData.Company;\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            private OfflineMessage: string = pageData.OfflineMessage;\r\n            footerData: any = pageData.footerData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/offline-page.component.ts","import { ScriptService } from './../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Input, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { RoutesService } from \"./../../../services/core/routes.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { BreadcrumbsService } from './../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\nimport { ShoppingCartService } from \"./../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from '../../../services/core/bootbox.service';\r\n\r\n//Models\r\nimport { ClientAreaOrderDetails } from \"./../../../models/settings/client-area\";\r\nimport { CookieService } from \"../../../services/core/cookie/cookie.service\";\r\nimport { ApiService } from \"../../../services/core/api.service\";\r\nimport { MessagesService } from \"../../../services/core/messages.service\";\r\nimport { Mappings } from \"../../../shared/mapping\";\r\nimport { Breadcrumbs } from './../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../services/cms/currency.service';\r\nimport { forEach } from '@angular/router/src/utils/collection';\r\nimport { Observable } from 'rxjs';\r\nimport { RegistrationConfirmationComponent } from '../../settings/user/sys/registration-confirmation.component';\r\nimport { setFlagsFromString } from 'v8';\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\nexport class ClientAreaOrderListComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private templateService: TemplateService,\r\n      private authService: AuthService,\r\n      private router: Router,\r\n      private clientAreaService: ClientAreaService,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any\r\n    ) { }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n      this.router.navigate([\"\"]);\r\n    }\r\n    else {\r\n      let ClientAreaOrderListTemplate: any;\r\n      let userId = this.authService.GetUserId();\r\n      let showAll: string = \"-1\"\r\n      let registrationConfirmation: any;\r\n      let header: any;\r\n      let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n        header = result;\r\n        let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n          if (result1.Categories) {\r\n            header.Categories = result1.Categories;\r\n\r\n          }\r\n        });\r\n        this.subManager.add(SideMenuData);\r\n      });\r\n      this.subManager.add(headDataSub);\r\n      let orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, showAll, showAll, showAll, showAll).subscribe(result => {\r\n\r\n        ClientAreaOrderListTemplate = result;\r\n\r\n        // Creating subcomponent whith the selected template to inject\r\n        let subComponent = this.createSubComponent(ClientAreaOrderListTemplate, header);\r\n\r\n        //injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n      })\r\n\r\n      this.subManager.add(orderListSub);\r\n    }\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(ClientAreaOrderListTemplate: any, header: any) {\r\n\r\n    @Component({\r\n      template: ClientAreaOrderListTemplate.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          @Inject('CookieService') private cookie: CookieService,\r\n          private clientAreaService: ClientAreaService,\r\n          private router: Router,\r\n          private authService: AuthService,\r\n          private routesService: RoutesService,\r\n          private apiService: ApiService,\r\n          private messagesService: MessagesService,\r\n          private mappings: Mappings,\r\n          private cartService: ShoppingCartService,\r\n          public currency: CurrencyService,\r\n          private languageService: LanguageService,\r\n          private translateService: TranslateService,\r\n          private bootboxService: BootboxService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private seoService: SeoService,\r\n          private breadcrumbsService: BreadcrumbsService,\r\n          private scriptService: ScriptService\r\n        ) { }\r\n\r\n      private pageIsInit: boolean = false;\r\n\r\n      public rows: Array<any> = [];\r\n\r\n      public rowsRiorder: Array<any> = [];\r\n\r\n      public columns: Array<any> = [];\r\n\r\n      //translating of header columns titles\r\n      translateTableColumnTitle(columnTitle) {\r\n        let translation = this.translateService.get(columnTitle)[\"value\"];\r\n        return translation;\r\n      }\r\n\r\n      @Input() clientModel: Array<ClientAreaOrderDetails>;\r\n\r\n      private status: string = \"0\";\r\n      private orderNumber: string = \"\";\r\n\r\n      private lang: string = this.languageService.getLongLang();\r\n      private shortLang: string = this.languageService.getShortLang();\r\n\r\n      private modalTitle: string = \"MESSAGES:\";\r\n      private modalBody: string = \"\";\r\n      private numberOfMessages: number = 0;\r\n      private bodyMod = [];\r\n\r\n      private isSettedFilter: boolean = false;\r\n      private from: any;\r\n      private to: any;\r\n      private load: boolean = true;\r\n      private loadReorder: boolean = true;\r\n      //checking if invoices and multiple shipment modules are active\r\n      private multipleShipmentActive: boolean = ClientAreaOrderListTemplate.isActiveMultipleShipment;\r\n\r\n      private breadcrumbs: Breadcrumbs[] = ClientAreaOrderListTemplate.BreadcrumbsInfo;\r\n\r\n      //Routes for menu-tabs\r\n      private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n      private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n      private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n      private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n      private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n      private isActiveInvoicesModule: boolean = ClientAreaOrderListTemplate.isActiveInvoicesModule;\r\n      private isCatalogPrivateActive: boolean = ClientAreaOrderListTemplate.isCatalogPrivateActive;\r\n      private isRiordinaActive: boolean = ClientAreaOrderListTemplate.isRiordinaActive;\r\n      currentLang;\r\n      italianLang = {\r\n        \"sProcessing\": \"Attendere...\",\r\n        \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n        \"sZeroRecords\": \"Niente trovato\",\r\n        \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n        \"sInfoEmpty\": \"Non ci sono record\",\r\n        \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n        \"sInfoPostFix\": \"\",\r\n        \"sUrl\": \"\",\r\n        \"oPaginate\": {\r\n          \"sPrevious\": \"«\",\r\n          \"sNext\": \"»\"\r\n        }\r\n      }\r\n\r\n      englishLang = {\r\n        \"oPaginate\": {\r\n          \"sPrevious\": \"«\",\r\n          \"sNext\": \"»\"\r\n        }\r\n      }\r\n\r\n      subManager = new Subscription();\r\n\r\n      footerData: any = ClientAreaOrderListTemplate.FooterData;\r\n      headerData: any = header;\r\n\r\n      ngOnInit() {\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n        if (this.multipleShipmentActive == false && this.isRiordinaActive == false) {\r\n          this.columns = [\r\n            { title: '' },\r\n            { title: this.translateTableColumnTitle(\"Jobname\") },\r\n            { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n            { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n            { title: this.translateTableColumnTitle(\"PriceTotalCell\") },\r\n            { title: this.translateTableColumnTitle(\"Status\") },\r\n            { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n            { title: this.translateTableColumnTitle(\"Payment\") },\r\n            { title: this.translateTableColumnTitle(\"Shipment\") },\r\n            { title: '' },\r\n            { title: '' },\r\n          ];\r\n        }\r\n\r\n        else if (this.isRiordinaActive == false) {\r\n          this.columns = [\r\n            { title: '' },\r\n            { title: this.translateTableColumnTitle(\"Jobname\") },\r\n            { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n            { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n            { title: this.translateTableColumnTitle(\"PriceTotalCell\") },\r\n            { title: this.translateTableColumnTitle(\"Status\") },\r\n            { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n            { title: this.translateTableColumnTitle(\"Payment\") },\r\n            { title: '' },\r\n            { title: '' },\r\n          ];\r\n        }\r\n        else {\r\n          this.columns = [\r\n            { title: '' },\r\n            { title: this.translateTableColumnTitle(\"Jobname\") },\r\n            { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n            { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n            { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n            { title: this.translateTableColumnTitle(\"Status\") },\r\n            { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n            { title: this.translateTableColumnTitle(\"Payment\") },\r\n            { title: '' },\r\n            { title: '' },\r\n            { title: '' },\r\n          ];\r\n        }\r\n\r\n        //getting of Datatable data\r\n        this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n        this.load = false;\r\n        this.loadReorder = false;\r\n\r\n      }\r\n      ngAfterViewChecked() {\r\n\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        if (this.shortLang == 'en') {\r\n          this.currentLang = this.englishLang;\r\n        }\r\n        else {\r\n          this.currentLang = this.italianLang;\r\n        }\r\n\r\n        //initialization of datatable\r\n        $('#datatable').DataTable({\r\n          searching: false,\r\n          ordering: false,\r\n          sDom: 'Rlfrtlip',\r\n          oLanguage: this.currentLang\r\n        });\r\n\r\n        //hiding of first 'per page' section, because we added it on the bottom of the table\r\n        $('.dataTables_length').not(':eq(1)').hide();\r\n\r\n\r\n        //initialization of datetime picker from and to\r\n        $('#fromDate').datetimepicker(\r\n          {\r\n            locale: this.shortLang,\r\n            format: 'DD/MM/YYYY'\r\n          }\r\n        );\r\n\r\n        $('#toDate').datetimepicker(\r\n          {\r\n            locale: this.shortLang,\r\n            useCurrent: false, //Important! See issue #1075\r\n            format: 'DD/MM/YYYY'\r\n          }\r\n        );\r\n\r\n        $(\"#fromDate\").on(\"dp.change\", function (e) {\r\n          $('#toDate').data(\"DateTimePicker\").minDate(e.date);\r\n        }\r\n        );\r\n\r\n        $(\"#toDate\").on(\"dp.change\", function (e) {\r\n          $('#fromDate').data(\"DateTimePicker\").maxDate(e.date);\r\n        }\r\n        );\r\n\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      onClick(indexRow: any, columnName?: string) {\r\n        let indexColumn;\r\n        let orderId = this.rows[indexRow].OrderId;\r\n\r\n        if (columnName == undefined) {\r\n          let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n\r\n          orderDetailsPage = orderDetailsPage.replace(':id', orderId.toString());\r\n\r\n          this.router.navigate([orderDetailsPage]);\r\n        }\r\n        else if (columnName == 'Upload') {\r\n          let loginRoute = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n          loginRoute = loginRoute.replace(\":id\", orderId);\r\n          loginRoute = loginRoute.replace(\":pagefrom\", \"section_upload\");\r\n\r\n          this.router.navigate([loginRoute]);\r\n        }\r\n        else if (columnName == 'OrderNotesCell') {\r\n          let order = this.rows[indexRow];\r\n\r\n          //Reading only the messsages for the selected order\r\n          this.bodyMod = order.OrderNoteList;\r\n          this.numberOfMessages = this.bodyMod.length;\r\n\r\n          //The modal is showed only if there are messages\r\n          if (this.bodyMod.length > 0) {\r\n            let userId = this.authService.GetUserId();\r\n            let params =\r\n            {\r\n              CustomerId: userId.toString(),\r\n              OrderId: orderId.toString(),\r\n              Lang: this.lang\r\n            };\r\n\r\n            //setting messages as read\r\n            let messReadSub = this.messagesService.setMessagesAsRead(params)\r\n              .subscribe(result => { })\r\n\r\n            this.subManager.add(messReadSub);\r\n\r\n            this.showModal();\r\n\r\n            //reseting of value of OrderNoteList\r\n            order.OrderNoteList = []\r\n          }\r\n        }\r\n        else if (columnName == \"Reorder\") {\r\n\r\n          let orderId = this.rows[indexRow].OrderId;\r\n          this.getRiOrdersList(orderId);\r\n        }\r\n      }\r\n      messagesDetails(orderId) {\r\n        $(\"#messagesModal\").modal(\"hide\");\r\n        let id = orderId;\r\n        let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n        orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n\r\n        this.router.navigate([orderDetailsPage]);\r\n        return true;\r\n      }\r\n\r\n      showModal() {\r\n        $(\"#messagesModal\").modal(\"show\");\r\n      }\r\n\r\n      hideModal() {\r\n        $('#basic').modal('hide');\r\n\r\n        this.bodyMod = [];\r\n      }\r\n\r\n\r\n\r\n      getOrdersList(userId: string, dateFrom: string, dateTo: string, orderNumber: string, orderStatus: string) {\r\n        this.load = true;\r\n        let orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, dateFrom, dateTo, orderNumber, orderStatus)\r\n          .subscribe(result => {\r\n\r\n            this.rows = result.ClientAreaOrderList;\r\n\r\n            this.load = false;\r\n\r\n            this.resetTable(this.rows);\r\n          })\r\n\r\n        this.subManager.add(orderListSub);\r\n      }\r\n\r\n      //destroying of current context of table and creating a new one with new data\r\n      resetTable(tableData) {\r\n        $('#datatable').DataTable().destroy();\r\n        let currentLang = this.currentLang;\r\n        setTimeout(function () {\r\n          $('#datatable').DataTable\r\n            (\r\n              {\r\n                data: this.rows,\r\n                searching: false,\r\n                ordering: false,\r\n                sDom: 'Rlfrtlip',\r\n                oLanguage: currentLang\r\n              }\r\n            );\r\n        }, 0);\r\n\r\n        setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide() }, 0);\r\n      }\r\n\r\n      resetFilter() {\r\n        this.from = \"\";\r\n        this.to = \"\";\r\n        $('#fromDate').val(\"\");\r\n        $('#toDate').val(\"\");\r\n        this.status = \"0\";\r\n        this.orderNumber = \"\";\r\n        if (this.isSettedFilter == true) {\r\n          this.isSettedFilter = false;\r\n          //this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n          let userId = this.authService.GetUserId();\r\n          let showAll: string = \"-1\"\r\n          this.getOrdersList(userId, showAll, showAll, showAll, showAll);\r\n        }\r\n      }\r\n\r\n      filterOrdersList() {\r\n        this.isSettedFilter = true;\r\n        let orderStatus: string;\r\n        let numberOfOrder: string;\r\n\r\n        let userId = this.authService.GetUserId();\r\n        this.from = $('#fromDate').val();\r\n        this.to = $('#toDate').val();\r\n\r\n        let dateFrom = this.changeDate(this.from);\r\n        let dateTo = this.changeDate(this.to);\r\n\r\n        if (dateFrom == \"\") {\r\n          dateFrom = \"-1\";\r\n        }\r\n\r\n        if (dateTo == \"\") {\r\n          dateTo = \"-1\";\r\n        }\r\n\r\n        if (dateFrom == \"Invalid date\" || null) {\r\n          dateFrom = \"-1\";\r\n        }\r\n\r\n        if (dateTo == \"Invalid date\" || null) {\r\n          dateTo = \"-1\";\r\n        }\r\n\r\n        if (this.status == \"0\") {\r\n          orderStatus = \"-1\";\r\n        }\r\n\r\n        else {\r\n          orderStatus = this.status\r\n        }\r\n\r\n        if (this.orderNumber == \"\") {\r\n          numberOfOrder = \"-1\";\r\n        }\r\n\r\n        else {\r\n          numberOfOrder = this.orderNumber\r\n        };\r\n\r\n        this.getOrdersList(userId, dateFrom, dateTo, numberOfOrder, orderStatus);\r\n      }\r\n\r\n      changeDate(stringDate) {\r\n        let date = stringDate.replace(/\\//g, \"-\");\r\n        return date;\r\n      }\r\n\r\n      getClassforMenuClientArea() {\r\n        let result;\r\n        if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n          result = \"col-md-3 col-sm-3\"\r\n        }\r\n        else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n          result = \"col-md-3 col-sm-3\"\r\n        }\r\n        else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n          result = \"col-md-4 col-sm-4\"\r\n        }\r\n        return result\r\n      }\r\n\r\n      showModalRiordina(orderId) {\r\n\r\n        this.getRiOrdersList(orderId)\r\n\r\n\r\n      }\r\n      hideModalRiordina() {\r\n        $(\"#ReorderModal\").modal(\"hide\");\r\n      }\r\n\r\n      resetTableReorder() {\r\n        let currentLang = this.currentLang;\r\n        $(\"#ReorderModal\").modal(\"show\");\r\n        setTimeout(function () { \r\n          $('.popovers').popover(); \r\n        }, 150);\r\n      }\r\n\r\n      riordina() {\r\n        //let valueReorderList: Array<{ QuantityID: number, ProductID: number, tipoCalcolo: string, DateID: number, tipoProdotto: string, CustomerID: string, CartID: string, Language: string, Currency: string }> = [];\r\n        let valueReorderList: Array<{ CartID: string, CustomerID: string, Language: string, ProductID: number, LavID: string, DateID: number, Currency: string, tipoProdotto: string, tipoCalcolo: string }> = [];\r\n        //this.cartService.setCartId(cart.CartId)\r\n        var selectedCount = $('input[name=\"selectAllItems\"]:checked').length;\r\n        var selectedCountCheck = 0;\r\n        var stringInputCheck = \"\";\r\n        if (selectedCount > 0) {\r\n          var CustomerID = this.cartService.getCustomerId();\r\n          var CartID = this.cartService.getCartId();\r\n          var Language = this.cartService.getLang();\r\n          var Currency = this.currency.getCurrency();\r\n          $('.disableInputReorder').attr('disabled', true);\r\n          this.loadReorder = true;\r\n\r\n          $('input[name=\"selectAllItems\"]:checked').each(function (index, element) {\r\n            var id = parseInt(element.id.replace(\"check_\", \"\"));\r\n            stringInputCheck = 'input[name=\"priceresult_' + id + '\"]:checked'\r\n            $(stringInputCheck).each(function (index, elementcheck) {\r\n              var ProductID = parseInt($(elementcheck).attr(\"prodId\"));\r\n              var QuantityID = parseInt($(elementcheck).attr(\"rowidcalcolo\"));\r\n              var LavID = $(elementcheck).attr(\"rowidcalcolo\");\r\n              var tipoCalcolo = $(elementcheck).attr(\"tipocalcolo\");\r\n              var DateID = parseInt($(elementcheck).attr(\"idDay\"));\r\n              var tipoProdotto = $(elementcheck).attr(\"tipoprodotto\");\r\n              valueReorderList.push({ CartID, CustomerID, Language, ProductID, LavID, DateID, Currency, tipoProdotto, tipoCalcolo });\r\n            });\r\n          });\r\n          var lenghtReorderList = valueReorderList.length;\r\n          if (lenghtReorderList > 0) {\r\n            let riorderListSub = this.cartService.addProductRiorderToCart(valueReorderList)\r\n              .subscribe(result => {\r\n                this.cartService.updateCart(result);\r\n                this.hideModalRiordina();\r\n                $('.disableInputReorder').removeAttr('disabled');\r\n                this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                this.loadReorder = false;\r\n              },\r\n                err => {\r\n                  $('.disableInputReorder').removeAttr('disabled');\r\n                  this.bootboxService.i18nAlert(\"errorMex\");\r\n                  this.loadReorder = false;\r\n                }\r\n              );\r\n\r\n            this.subManager.add(riorderListSub);\r\n          }\r\n          else {\r\n            this.bootboxService.alertForRiorderFail(\"reorder_seleziona_almeno_una_qta\");\r\n            $('.disableInputReorder').removeAttr('disabled');\r\n            this.loadReorder = false;\r\n          }\r\n        }\r\n        else {\r\n          this.bootboxService.alertForRiorderFail(\"reorder_seleziona_almeno_una_riga\");\r\n        }\r\n      }\r\n\r\n      getRiOrdersList(orderId) {\r\n        this.loadReorder = true;\r\n        let riorderListSub = this.clientAreaService.getClientAreaRiorderList(orderId)\r\n          .subscribe(result => {\r\n            this.rowsRiorder = result;\r\n            this.loadReorder = false;\r\n            //initialization of datatable\r\n            this.resetTableReorder();\r\n          })\r\n\r\n        this.subManager.add(riorderListSub);\r\n      }\r\n\r\n      getLabel(label) {\r\n        let message;\r\n\r\n        this.translateService.get(label, this.translateService).subscribe((res: string) => {\r\n          message = res;\r\n        });\r\n        return message;\r\n      }\r\n\r\n      calculatePrice(idRow, index) {\r\n        var qta = $('#riga_' + idRow).val();\r\n        var riga = this.rowsRiorder[index];\r\n        if (riga != null && qta > 0) {\r\n          this.loadReorder = true;\r\n          $('.disableInputReorder').attr('disabled', true);\r\n          var newQta = \"&NumCopie=\" + qta + \"&\"\r\n          var newQtaOther = \"&str_qt=\" + qta + \"&\"\r\n          var OldQta = \"&NumCopie=\" + riga.Quantity + \"&\"\r\n          var OldQtaOther = \"&str_qt=\" + riga.Quantity + \"&\"\r\n          var queryLavorazione2 = riga.LavorazioneQuery.replace(OldQta, newQta)\r\n          var queryLavorazione3 = queryLavorazione2.replace(OldQtaOther, newQtaOther)\r\n          var substring = queryLavorazione3.indexOf(\"&Datetime\");\r\n          var queryLavorazione = queryLavorazione3.slice(0, substring)\r\n          queryLavorazione += \"&orderid=\" + riga.OrderId;\r\n          queryLavorazione += \"&orderlavid=\" + riga.IdRow;\r\n          if (queryLavorazione.indexOf(\"sezione=\") != -1) {\r\n            let riorderListSub = this.clientAreaService.CalculatePriceRiorder(queryLavorazione, riga.ProdId)\r\n              .subscribe(result => {\r\n                //console.log(result)\r\n                switch (result.resultType) {\r\n                  case \"calcolato_wizard_scontistica\":\r\n                    this.showPriceCalcolatoScontistica(idRow, result.TablePriceList, result.resultType, riga.ProdId, result.RowId, riga.TipoProdotto)\r\n                    break;\r\n                  case \"calcolato_wizard\":\r\n                  case \"calcolato_wizard_altro_prodotto\":\r\n                    this.showPriceCalcolato(idRow, result, result.resultType, riga.ProdId, result.RowId)\r\n                    break;\r\n                }\r\n                //this.rowsRiorder = result;\r\n                this.loadReorder = false;\r\n              })\r\n            this.subManager.add(riorderListSub);\r\n            let getRiorderCart = this.cartService.getRiorderCart()\r\n              .subscribe(cart => {\r\n                var cartIdOld = this.cartService.getCartId();\r\n                if (cartIdOld == \"0\") {\r\n                  this.cartService.setCartId(cart.CartID);\r\n                }\r\n              })\r\n            this.subManager.add(getRiorderCart);\r\n          }\r\n        }\r\n        else {\r\n          $('#Prezzo_' + idRow).html(\"\");\r\n        }\r\n      }\r\n\r\n      showPriceCalcolatoScontistica(idRow, result, type, prodId, rowIdCalcolo, rowTipoProdotto) {\r\n        $('#Prezzo_' + idRow).html(\"\");\r\n        var html = \"\";\r\n        let resultFiltered = result.filter(x => x.Price != -1);\r\n        var lenghtRes = resultFiltered.length - 1;\r\n        resultFiltered.forEach((price, index) => {\r\n          if (price.Price != -1) {\r\n            html += \"<div>\";\r\n            if (lenghtRes == index) {\r\n              html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\" value=\\\"0\\\"  tipoprodotto=\\\"\" + rowTipoProdotto + \"\\\" tipocalcolo=\\\"\" + type + \"\\\"  prodId=\\\"\" + prodId + \"\\\" rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\"  idDay=\\\"\" + price.QuantityId + \"\\\" required checked>\";\r\n            }\r\n            else {\r\n              html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\" value=\\\"0\\\"  tipoprodotto=\\\"\" + rowTipoProdotto + \"\\\" tipocalcolo=\\\"\" + type + \"\\\"  rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\" prodId=\\\"\" + prodId + \"\\\" idDay=\\\"\" + price.QuantityId + \"\\\" required>\";\r\n            }\r\n            html += \"<label class=\\\"riordinaLabel\\\" for=\\\"\" + rowIdCalcolo + \"_\" + price.QuantityId + \"\\\">\" + price.DayName + \" \" + price.DayNumber + \" - \" + price.Currency + \" \" + price.StrPrice + \"</label>\";\r\n            html += \"</div>\";\r\n          }\r\n        });\r\n        $('#Prezzo_' + idRow).html(html);\r\n        $('.disableInputReorder').removeAttr('disabled');\r\n      }\r\n\r\n      showPriceCalcolato(idRow, price, type, prodId, rowIdCalcolo) {\r\n        $('#Prezzo_' + idRow).html(\"\");\r\n        var html = \"\";\r\n        html += \"<div>\";\r\n        html += \"<input class=\\\"riordinaRadio\\\" type=\\\"radio\\\" name=\\\"priceresult_\" + idRow + \"\\\" id=\\\"\" + rowIdCalcolo + \"\\\" value=\\\"0\\\"  tipocalcolo=\\\"\" + type + \"\\\"  rowidcalcolo=\\\"\" + rowIdCalcolo + \"\\\" prodId=\\\"\" + prodId + \"\\\" checked required>\";\r\n        html += \"<label class=\\\"riordinaLabel\\\" for=\\\"\" + rowIdCalcolo + \"\\\">\" + price.Currency + \" \" + price.Imponibile + \"</label>\";\r\n        html += \"</div>\";\r\n\r\n        $('#Prezzo_' + idRow).html(html);\r\n        $('.disableInputReorder').removeAttr('disabled');\r\n      }\r\n\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/sys/client-area-order-list.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Models\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from \"./../../../../models/cms/breadcrumbs\";\r\n//Services\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CategoryInfoRequest } from \"../../../../models/inventory/category-info-request\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { BreadcrumbsService } from \"../../../../services/cms/breadcrumbs.service\";\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\n\r\nexport class CategoryComponent implements OnInit {\r\n  category: Category = new Category();\r\n\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private _elementRef: ViewContainerRef,\r\n      private componentHelper: ComponentHelperService,\r\n      private categoryService: CategoryService,\r\n      private languageService: LanguageService,\r\n      private route: ActivatedRoute,\r\n      private router: Router,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any,\r\n      private scriptService: ScriptService\r\n    ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    //Reading Language information\r\n    let lang: string = this.languageService.getLongLang();\r\n    let header: any;\r\n    let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n      header = result;\r\n      let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n        if (result1.Categories) {\r\n          header.Categories = result1.Categories;\r\n\r\n        }\r\n      });\r\n      this.subManager.add(SideMenuData);\r\n    });\r\n    this.subManager.add(headDataSub);\r\n\r\n    //Reading id from url\r\n    //If id is set, then the information is retrived by id, else by url\r\n    let paramSub = this.route.params.subscribe(params => {\r\n      let id = params['id'];\r\n\r\n      if (id !== undefined) {\r\n        let categoryId: number = id;\r\n\r\n        let catIdSub = this.categoryService.getCategory(categoryId, lang).subscribe(result => {\r\n          if (result.SeoInformation) {\r\n            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n          }\r\n\r\n\r\n          if (this.isBrowser) {\r\n            this.onGetCategorySuccess(result, header);\r\n          }\r\n          else {\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogCategory, categoryId);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(catIdSub);\r\n      }\r\n      else {\r\n        let seoUrl = this.router.url;\r\n        let catUrlSub = this.categoryService.getCategoryByUrl(lang, seoUrl).subscribe(result => {\r\n          if (this.isBrowser) {\r\n            this.onGetCategorySuccess(result, header);\r\n          }\r\n          else {\r\n            if (result.SeoInformation) {\r\n              result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n              result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogCategory, result.Id);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(catUrlSub);\r\n      }\r\n    });\r\n\r\n    this.subManager.add(paramSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  onGetCategorySuccess(categoryResult: Category, header: any) {\r\n    if (categoryResult.Active != true) {\r\n      //Creating sub-component with the returned information\r\n      let subComponent = this.createSubComponentRedirect();\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n    else {\r\n      //Creating sub-component with the returned information\r\n      let subComponent = this.createSubComponent(categoryResult, header);\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n  }\r\n\r\n\r\n  private createSubComponentRedirect() {\r\n    @Component({\r\n      template: \"\"\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private router: Router,\r\n          private routesService: RoutesService\r\n        ) { }\r\n\r\n      ngOnInit(): void {\r\n        let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n        this.router.navigate(notFoundPage);\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n\r\n\r\n  private createSubComponent(categoryObj: Category, header: any) {\r\n    @Component({\r\n      template: categoryObj.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n\r\n      category: Category = categoryObj;\r\n      categories: any = categoryObj.SubCategories;\r\n      products: any = categoryObj.SubProducts;\r\n      prodottiCorrelati: any = categoryObj.ProductCorrelati;\r\n      showProdottiCorrelati:boolean=false;\r\n      headerData: any = header;\r\n      footerData: any = categoryObj.footerData;\r\n\r\n      private loginPageName: string[] = [];\r\n      private registerPageName: string[] = [];\r\n\r\n      private pageIsInit: boolean = false;\r\n      private seoInfo: SeoViewModel = categoryObj.SeoInformation;\r\n      private spinnerForm: boolean = false;\r\n      private contactFormSent: boolean = false;\r\n      private contactFormFailed: boolean = false;\r\n      private showSpinner: boolean = true;\r\n      private showTable: boolean = true;\r\n\r\n      private model: CategoryInfoRequest = {\r\n        Company: \"\",\r\n        Name: \"\",\r\n        Lastname: \"\",\r\n        Email: \"\",\r\n        Amount: \"\",\r\n        Mobile: \"\",\r\n        Message: \"\",\r\n        Lang: \"\",\r\n        options: 0\r\n      }\r\n\r\n      private configuration: Configuration;\r\n      private lang: string = this.languageService.getLongLang();\r\n\r\n      private breadcrumbs: Breadcrumbs[] = [];\r\n\r\n      constructor\r\n        (\r\n          private seoService: SeoService,\r\n          private cartService: ShoppingCartService,\r\n          private bootboxService: BootboxService,\r\n          private routesService: RoutesService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private scriptService: ScriptService,\r\n          private _elementRef: ViewContainerRef,\r\n          private helperService: HelperService,\r\n          public currency: CurrencyService,\r\n          private categoryService: CategoryService,\r\n          private languageService: LanguageService,\r\n          private breadcrumbsService: BreadcrumbsService\r\n        ) { }\r\n\r\n      subManager = new Subscription();\r\n\r\n      ngOnInit() {     //console.log(categoryObj)\r\n        //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n        this.breadcrumbs = categoryObj.BreadcrumbsInfo;\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n        this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n        this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n        if(this.prodottiCorrelati.length>0){\r\n          this.showProdottiCorrelati=true;\r\n        }\r\n        this.configuration = categoryObj.Configuration;\r\n        if (this.isBrowser == true) {\r\n          //if type of category is matrix, get prices\r\n          if (categoryObj.TipoVisualizzazione == \"matrice\") {\r\n            let catPriceSub = this.categoryService.getCategoryPriceData(categoryObj.Id)\r\n              .subscribe(result => {\r\n                this.category.PriceData = result;\r\n                this.showSpinner = false;\r\n              })\r\n\r\n            this.subManager.add(catPriceSub);\r\n          }\r\n        }\r\n        \r\n      }\r\n\r\n      onSubmit(form) {\r\n        this.contactFormSent = false;\r\n        this.contactFormFailed = false;\r\n        this.spinnerForm = true;\r\n        this.model.Lang = this.languageService.getLongLang();\r\n\r\n        if (form.valid && this.model.options == 1) {\r\n          this.model.Amount = this.model.Amount.toString();\r\n          let catInfoSub = this.categoryService.getCategoryInfo(this.model)\r\n            .subscribe(result => {\r\n              if (result == true) {\r\n                this.spinnerForm = false;\r\n                this.contactFormSent = true;\r\n              }\r\n              else {\r\n                this.spinnerForm = false;\r\n                this.contactFormFailed = true;\r\n              }\r\n            })\r\n\r\n          this.subManager.add(catInfoSub);\r\n        }\r\n        else {\r\n          this.spinnerForm = false;\r\n        }\r\n      }\r\n      showedFileBoxWizard() {\r\n        let result: boolean = true;\r\n        if (this.category.IdWizardMaster <= 0) {\r\n          result = false;\r\n        }\r\n        else {\r\n          if (this.category.ManageAttachmentWizard == \"Combinazioni\") {\r\n            result = false;\r\n          }\r\n        }\r\n\r\n        return result;\r\n      }\r\n      addMatrixCommercialeProductToCart(productId: number, quantityId: number,IsHour:any) {\r\n        let addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\",IsHour).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        );\r\n\r\n        this.subManager.add(addToCartSub);\r\n      }\r\n\r\n      addMatrixEditoriaProductToCart(productId: number, quantityId: number,IsHour:any) {\r\n        let addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\",IsHour).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        );\r\n\r\n        this.subManager.add(addMatEdToCartSub);\r\n      }\r\n\r\n      addMatrixProductToCart(productId: number, quantityId: number,IsHour:any) {\r\n        let addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\",IsHour).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        );\r\n\r\n        this.subManager.add(addMatToCartSub);\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        layoutTheme.initCarousel();\r\n        layoutTheme.initLightbox();\r\n        setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n\r\n        setTimeout(function () { \r\n          $('.popovers').popover(); \r\n        }, 150);\r\n        \r\n        if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n          $('#containerVideo').html(this.seoInfo.H3);\r\n        }\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      imageTitle(imgPath) {\r\n        let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n        return imgName;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/category/sys/category.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n\r\n//Services\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\n\r\nexport class OtherProductComponent implements OnInit {\r\n  product: Product = new Product();\r\n\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private productService: ProductService,\r\n      private languageService: LanguageService,\r\n      private route: ActivatedRoute,\r\n      private router: Router,\r\n\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any,\r\n      private scriptService: ScriptService\r\n    ) { }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    //Reading Language information\r\n    let lang: string = this.languageService.getLongLang();\r\n    let header: any;\r\n    let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n      header = result;\r\n      let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n        if (result1.Categories) {\r\n          header.Categories = result1.Categories;\r\n\r\n        }\r\n      });\r\n      this.subManager.add(SideMenuData);\r\n    });\r\n    this.subManager.add(headDataSub);\r\n    //Reading id from url\r\n    //If id is set, then the information is retrived by id, else by url\r\n    let paramsSub = this.route.params.subscribe(params => {\r\n      let id = params['id'];\r\n\r\n      if (id !== undefined) {\r\n        let productId: number = id;\r\n\r\n        let productByIdSub = this.productService.getProductDetails(productId, \"altroProdotto\", lang).subscribe(result => {\r\n          if (result.SeoInformation) {\r\n            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n          }\r\n\r\n          if (this.isBrowser) {\r\n            this.onGetProductSuccess(result, header);\r\n          }\r\n          else {\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogOtherProduct, productId);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(productByIdSub);\r\n      }\r\n      else {\r\n        let url = this.router.url;\r\n\r\n        let productByUrlSub = this.productService.getProductDetailsBySeoUrl(lang, url).subscribe(result => {\r\n          if (result.SeoInformation) {\r\n            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n          }\r\n\r\n          if (this.isBrowser) {\r\n            this.onGetProductSuccess(result, header);\r\n          }\r\n          else {\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogOtherProduct, result.Id);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(productByUrlSub);\r\n      }\r\n    });\r\n\r\n    this.subManager.add(paramsSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  onGetProductSuccess(productResult: Product, header: any) {\r\n    if (productResult.Active != true) {\r\n      //Creating sub-component with the returned information\r\n      let subComponent = this.createSubComponentRedirect();\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n    else {\r\n      let subComponent = this.createSubComponent(productResult, header);\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n  }\r\n\r\n  private createSubComponentRedirect() {\r\n    @Component({\r\n      template: \"\"\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private router: Router,\r\n          private routesService: RoutesService,\r\n      ) { }\r\n\r\n      ngOnInit(): void {\r\n        let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n        this.router.navigate(notFoundPage);\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n\r\n\r\n  private createSubComponent(otherproductObj: Product, header: any) {\r\n    @Component({\r\n      template: otherproductObj.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      product: Product = otherproductObj;\r\n\r\n      private seoInfo: SeoViewModel = otherproductObj.SeoInformation;\r\n\r\n      private loginPageName: string[] = [];\r\n      private registerPageName: string[] = [];\r\n      private pageIsInit: boolean = false;\r\n      private breadcrumbs: Breadcrumbs[] = [];\r\n      prodottiCorrelati: any = otherproductObj.ProductCorrelati;\r\n      showProdottiCorrelati: boolean = false;\r\n      footerData: any = otherproductObj.FooterData;\r\n      headerData: any = header;\r\n\r\n      constructor\r\n        (\r\n          private seoService: SeoService,\r\n          private routesService: RoutesService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private _elementRef: ViewContainerRef,\r\n          private scriptService: ScriptService,\r\n          public currency: CurrencyService,\r\n          private helperService: HelperService,\r\n          private breadcrumbsService: BreadcrumbsService\r\n        ) { }\r\n\r\n      ngOnInit() {\r\n        //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n        this.breadcrumbs = otherproductObj.BreadcrumbsInfo;\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n        if (this.prodottiCorrelati.length > 0) {\r\n          this.showProdottiCorrelati = true;\r\n        }\r\n        this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n        this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n\r\n      }\r\n\r\n      imageTitle(imgPath) {\r\n        let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n        return imgName;\r\n      }\r\n\r\n      shareOnFacebook() {\r\n        window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n      }\r\n\r\n      shareOnTwitter() {\r\n        window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n      }\r\n\r\n      showedFileBox() {\r\n        let result: boolean = true;\r\n\r\n        if (this.product.ManageAttachment == \"Combinazioni\") {\r\n          result = false;\r\n        }\r\n        return result;\r\n      }\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        layoutTheme.initCarousel();\r\n        layoutTheme.initLightbox();\r\n        setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n        if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n          $('#containerVideo').html(this.seoInfo.H3);\r\n        }\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/other-product.component.ts","import { Meta } from './../../../../services/core/angular2-meta';\r\nimport { Renderer } from '@angular/core';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { BreadcrumbsService } from \"../../../../services/cms/breadcrumbs.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from \"./../../../../models/cms/breadcrumbs\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\n\r\nexport class ProductDetailsComponent implements OnInit {\r\n  product: Product = new Product();\r\n\r\n  constructor\r\n    (\r\n      private _elementRef: ViewContainerRef,\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private productService: ProductService,\r\n      private languageService: LanguageService,\r\n      private route: ActivatedRoute,\r\n      private router: Router,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any,\r\n      private scriptService: ScriptService\r\n    ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n\r\n\r\n    //Reading Language information\r\n    let lang: string = this.languageService.getLongLang();\r\n    let header: any;\r\n    let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n      header = result;\r\n      let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n        if (result1.Categories) {\r\n          header.Categories = result1.Categories;\r\n\r\n        }\r\n      });\r\n      this.subManager.add(SideMenuData);\r\n    });\r\n    this.subManager.add(headDataSub);\r\n    //Reading id from url\r\n    //If id is set, then the information is retrived by id, else by url\r\n    let paramsSub = this.route.params.subscribe(params => {\r\n      let id = params['id'];\r\n\r\n      if (id !== undefined) {\r\n        let productId: number = id;\r\n\r\n        let prodByIdSub = this.productService.getProductDetails(productId, \"prodotti\", lang).subscribe(result => {\r\n          if (result.SeoInformation) {\r\n            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n          }\r\n          if (this.isBrowser) {\r\n            this.onGetProductSuccess(result, id, header);\r\n          }\r\n          else {\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogProduct, productId);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(prodByIdSub);\r\n      }\r\n      else {\r\n        let seoUrl = this.router.url;\r\n        let prodByUrlSub = this.productService.getProductDetailsBySeoUrl(lang, seoUrl).subscribe(result => {\r\n          if (result.SeoInformation) {\r\n            result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n            result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n          }\r\n\r\n          if (this.isBrowser) {\r\n            this.onGetProductSuccess(result, id, header);\r\n          }\r\n          else {\r\n            //-- Get head and body scripts\r\n            this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogProduct, result.Id);\r\n\r\n            //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n            this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n            this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n          }\r\n        });\r\n\r\n        this.subManager.add(prodByUrlSub);\r\n      }\r\n    });\r\n\r\n    this.subManager.add(paramsSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  onGetProductSuccess(productDetails: Product, productId: any, header: any) {\r\n    if (productDetails.Active != true || productDetails.isProductPrivateActiveAndShow != true) {\r\n      //Creating sub-component with the returned information\r\n      let subComponent = this.createSubComponentRedirect();\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n    else {\r\n      let subComponent = this.createSubComponent(productDetails, productId, header);\r\n\r\n      //Injecting dynamically created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    }\r\n  }\r\n\r\n\r\n  private createSubComponentRedirect() {\r\n    @Component({\r\n      template: \"\"\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private router: Router,\r\n          private routesService: RoutesService,\r\n      ) { }\r\n\r\n\r\n      ngOnInit(): void {\r\n        let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n        this.router.navigate(notFoundPage);\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n\r\n\r\n  private createSubComponent(productObj: Product, productId: any, header: any) {\r\n    @Component({\r\n      template: productObj.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      private showSpinner: boolean = true;\r\n      private showSpinnerClick: boolean = false;\r\n      currentRowIndex: number = -1;\r\n      currentColumnIndex: number = -1;\r\n\r\n      product: Product = new Product();\r\n      private loginPageName: string[] = [];\r\n      private registerPageName: string[] = [];\r\n      private facebookShareUrl: any = \"\";\r\n\r\n      private pageIsInit: boolean = false;\r\n      private seoInfo: SeoViewModel = productObj.SeoInformation;\r\n      private breadcrumbs: Breadcrumbs[] = [];\r\n      prodottiCorrelati: any = productObj.ProductCorrelati;\r\n      showProdottiCorrelati: boolean = false;\r\n\r\n      footerData: any = productObj.FooterData;\r\n      headerData: any = header;\r\n      constructor\r\n        (\r\n          private seoService: SeoService,\r\n          private cartService: ShoppingCartService,\r\n          private bootboxService: BootboxService,\r\n          private routesService: RoutesService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private _elementRef: ViewContainerRef,\r\n          private scriptService: ScriptService,\r\n          public currency: CurrencyService,\r\n          private helperService: HelperService,\r\n          private productService: ProductService,\r\n          private languageService: LanguageService,\r\n          private breadcrumbsService: BreadcrumbsService,\r\n          private metaService: Meta\r\n        ) { }\r\n\r\n      subManager = new Subscription();\r\n\r\n      ngOnInit() {\r\n\r\n\r\n        //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n        this.breadcrumbs = productObj.BreadcrumbsInfo;\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n        let lang = this.languageService.getLongLang();\r\n        this.product = productObj;\r\n        if (this.prodottiCorrelati.length > 0) {\r\n          this.showProdottiCorrelati = true;\r\n        }\r\n        // this.product.HeaderData = header;\r\n        if (this.isBrowser) {\r\n          if (!this.product.IsWizard) {\r\n            let productId = this.product.Id;\r\n            let pricesSub = this.productService.getPriceData(productId, lang).subscribe(response => {\r\n              this.product.PriceData = response;\r\n              this.showSpinner = false;\r\n            })\r\n\r\n            this.subManager.add(pricesSub);\r\n          }\r\n        }\r\n        //console.log(this.product)\r\n        this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n        this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n      }\r\n\r\n      showedFileBox() {\r\n        let result: boolean = true;\r\n\r\n        if (this.product.ManageAttachment == \"Combinazioni\") {\r\n          result = false;\r\n        }\r\n        return result;\r\n      }\r\n      shareOnFacebook() {\r\n        window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n      }\r\n\r\n      shareOnTwitter() {\r\n        window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n      }\r\n\r\n      addStaticProductToCart(quantityId: number) {\r\n        let productId = this.product.Id;\r\n        this.showSpinnerClick = true\r\n        let staticProdSub = this.cartService.addStaticProductToCart(productId, quantityId,\"D\").subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.showSpinnerClick = false\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          });\r\n\r\n        this.subManager.add(staticProdSub);\r\n      }\r\n\r\n      addStaticProductScontisticaToCart(dayId: number, quantityId: number,isHour:any) {\r\n        let productId = this.product.Id;\r\n        this.showSpinnerClick = true\r\n        var colType = isHour == true ? \"H\" : \"D\";\r\n        let statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId,colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.showSpinnerClick = false\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        );\r\n\r\n        this.subManager.add(statProdScontSub);\r\n      }\r\n\r\n      isRowSelected(rowIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex + 1) == this.currentRowIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isColumnSelected(columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((columnIndex + 1) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n        this.currentRowIndex = rowIndex;\r\n        this.currentColumnIndex = columnIndex;\r\n      }\r\n\r\n      clearSelectedIndex() {\r\n        this.currentRowIndex = -1;\r\n        this.currentColumnIndex = -1;\r\n      }\r\n      isPriceDiscounted(price: any, priceDiscounted: any) {\r\n        let priceInt = parseFloat(price);\r\n        let priceDiscountedInt = parseFloat(priceDiscounted);\r\n        let result = false;\r\n        if (priceDiscountedInt < priceInt) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        layoutTheme.initCarousel();\r\n        layoutTheme.initLightbox();\r\n        setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n\r\n        setTimeout(function () { \r\n          $('.popovers').popover(); \r\n        }, 150);\r\n        if (this.seoInfo.H3.includes(\"<iframe\")) {\r\n          $('#containerVideo').html(this.seoInfo.H3);\r\n        }\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      imageTitle(imgPath) {\r\n        let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n        return imgName;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/product-details.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class ProductPageListComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private categoryService: CategoryService,\r\n            private languageService: LanguageService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let categoriesSub = this.categoryService.getCatalogCategoriesData(this.lang).subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the catalog catgories information to inject\r\n                let subComponent = this.createSubComponent(result,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.productsCatalogId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(categoriesSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header: any) {\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private helperService: HelperService,\r\n                    private routesService: RoutesService,\r\n                    public currency: CurrencyService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            items: any;\r\n            columns: number = 4;\r\n            category: Category;\r\n            private pageIsInit: boolean = false;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n           footerData: any = result.FooterData;\r\n           headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                if (this.category == null) {\r\n                    this.items = result.CatalogCategories;\r\n                }\r\n                else {\r\n                    this.items = this.category.SubCategories;\r\n                }\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/product-page-list.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class PromotionsComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private productService: ProductService,\r\n            private languageService: LanguageService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let promotionsSub = this.productService.getProductsPromotionsData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the promotion page information to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.promotionsId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(promotionsSub);\r\n    }\r\n\r\n    private createSubComponent(result: any, header: any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private helperService: HelperService,\r\n                    public currency: CurrencyService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            items: Product[];\r\n            category: Category;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n            footerData: any = result.FooterData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                if (this.category == null) {\r\n                    //Reading data from server\r\n                    this.items = result.ProductPromotionList;\r\n                }\r\n                else {\r\n                    this.items = this.category.SubProducts;\r\n                }\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            imageTitle(imgPath) {\r\n                let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n                return imgName;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/promotions.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\"\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { CartInfo } from \"./../../../../models/core/cart\";\r\nimport { CartPaymentModel } from \"./../../../../models/core/cart\";\r\nimport { CartShipmentModel } from \"./../../../../models/core/cart\";\r\nimport { CartAddressModel } from \"./../../../../models/core/cart\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { ValidationService } from \"../../../../services/core/validation.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\n\r\nexport class CartCashComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any,\r\n      private scriptService: ScriptService\r\n    ) { }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    let header: any;\r\n    let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n      header = result;\r\n      let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n        if (result1.Categories) {\r\n          header.Categories = result1.Categories;\r\n\r\n        }\r\n      });\r\n      this.subManager.add(SideMenuData);\r\n    });\r\n    this.subManager.add(headDataSub);\r\n    let cmsSub = this.cmsComponentService.getShoppingCartCashData().subscribe(result => {\r\n      if (result.SeoInformation) {\r\n        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n      }\r\n\r\n      if (this.isBrowser) {\r\n        //Creating subcomponent whith the selected template to inject\r\n        let subComponent = this.createSubComponent(result, header);\r\n\r\n        //injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n      }\r\n      else {\r\n        //-- Get head and body scripts\r\n        this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cartCashId);\r\n\r\n        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n      }\r\n    });\r\n\r\n    this.subManager.add(cmsSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(shoppingCartCashData: any, header: any) {\r\n    @Component({\r\n      template: shoppingCartCashData.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private router: Router,\r\n          private shoppingCartService: ShoppingCartService,\r\n          private languageService: LanguageService,\r\n          private authService: AuthService,\r\n          private clientAreaService: ClientAreaService,\r\n          private routesService: RoutesService,\r\n          private seoService: SeoService,\r\n          private bootboxService: BootboxService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private _elementRef: ViewContainerRef,\r\n          private scriptService: ScriptService,\r\n          private breadcrumbsService: BreadcrumbsService,\r\n          private validationService: ValidationService\r\n        ) { }\r\n\r\n      currentAddress: CartAddressModel = new CartAddressModel();\r\n\r\n      carrello: CartInfo = shoppingCartCashData.ShoppingCart;\r\n\r\n      selectedAddress: CartAddressModel = new CartAddressModel();\r\n      selectedPayment: CartPaymentModel = new CartPaymentModel();\r\n      selectedShipment: CartShipmentModel = new CartShipmentModel();\r\n      voucherCode: string = \"\";\r\n      showValidationLabels: boolean = false;\r\n      cartCashAccepted: boolean = false;\r\n      public selectedTipoSpedizione: string = \"\";\r\n      OrderId: number;\r\n      lang: string = this.languageService.getLongLang();\r\n\r\n      isVoucherValid: boolean = false;\r\n      isVoucherInvalid: boolean = false;\r\n      isVoucherApplied: boolean = false;\r\n      disableButtonCart: boolean = false;\r\n      spinnerCartCash: boolean = false;\r\n      $event: any;\r\n\r\n      footerData: any = shoppingCartCashData.footerData;\r\n      headerData: any = header;\r\n\r\n      private pageIsOnDestroy: boolean = false;\r\n      private seoInfo: SeoViewModel = shoppingCartCashData.SeoInformation;\r\n      private pageIsInit: boolean = false;\r\n      private pageIsInitAfter: boolean = false;\r\n      private carrelloPageName: string[] = [];\r\n      private userId = this.authService.GetUserId();\r\n      configuration: Configuration = shoppingCartCashData.ConfigurationInfo;\r\n      private breadcrumbs: Breadcrumbs[] = shoppingCartCashData.BreadcrumbsInfo;\r\n      private spinnerCart: boolean = false;\r\n\r\n      subManager = new Subscription();\r\n\r\n      ngOnInit() {\r\n        //console.log(shoppingCartCashData)\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n        this.shoppingCartService.initCart(this.carrello);\r\n\r\n        if (this.shoppingCartService.isCartValid() == false) {\r\n          //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n          (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n        }\r\n        else {\r\n          this.checkTipoSpedizione();\r\n          //Reading selected payment method\r\n          let payments = this.carrello.Payments;\r\n          let count = payments.length;\r\n\r\n          for (var i = 0; i < count; i++) {\r\n            let payment = payments[i];\r\n\r\n            if (payment.Selected == true) {\r\n              this.selectedPayment = payment;\r\n            }\r\n          }\r\n\r\n          //Reading selected shipment method\r\n          let shipments = this.carrello.Shipments;\r\n          count = shipments.length;\r\n\r\n          for (var i = 0; i < count; i++) {\r\n            let shipment = shipments[i];\r\n\r\n            if (shipment.Selected == true) {\r\n              this.selectedShipment = shipment;\r\n            }\r\n          }\r\n\r\n          //Reading selected address\r\n          let address = this.carrello.CurrentAddress;\r\n\r\n          let completeAddress = address.Address;\r\n\r\n          let lastIndex = completeAddress.lastIndexOf(\" \");\r\n          let addressStreet: string = \"\";\r\n          let addressNumber: string = \"\";\r\n\r\n          if (lastIndex > -1) {\r\n            addressStreet = completeAddress.slice(0, lastIndex);\r\n            addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n          }\r\n\r\n          if (address != null) {\r\n            this.currentAddress.Id = address.Id;\r\n            this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n            this.currentAddress.City = address.City;\r\n            this.currentAddress.Recipient = address.Recipient;\r\n            this.currentAddress.Province = address.Province;\r\n            this.currentAddress.Phone = address.Phone;\r\n            this.currentAddress.ZipCode = address.ZipCode;\r\n            this.currentAddress.Mobile = address.Mobile;\r\n            this.currentAddress.CustomerID = this.userId;\r\n            this.currentAddress.Language = this.lang;\r\n            this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n          }\r\n\r\n          this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n        }\r\n      }\r\n      checkTipoSpedizione() {\r\n        if (this.carrello.Products.length == 0) {\r\n          this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n        }\r\n        else {\r\n          var tipoSped = this.carrello.Products.filter((item, i, arr) => arr.findIndex((t) => t.TipoTrasporto === item.TipoTrasporto) === i);\r\n          var TipoTrasportoShipmentToFilter = \"S\";\r\n          if (tipoSped.length == 1) {\r\n            TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n          }\r\n          if (this.selectedTipoSpedizione == \"\") {\r\n            this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n          }\r\n        }\r\n      }\r\n      //validation of phone numbers, disable writing any characters in input except of numbers\r\n      validatePhone(event: any) {\r\n        this.validationService.validatePhoneNumber(event);\r\n      }\r\n\r\n\r\n      //adding all scripts and elements connected to address verification feature                \r\n      addAddressVerificationScripts(addressKey: string) {\r\n        let suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n        let address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n        let jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n\r\n        $('body > universal-script').before(suggest);\r\n        $('body > universal-script').before(jquery);\r\n        $('body > universal-script').before(address);\r\n      }\r\n\r\n      //removing all scripts and elements connected to address verification feature                            \r\n      removeAddressVerificationScripts(addressKey: string) {\r\n        $(\"#suggestId\").remove();\r\n        $(\"#jqueryuicss\").remove();\r\n        $(\"#jqueryuijs\").remove();\r\n        $(\"#suggestcss\").remove();\r\n        $(\"#initui\").remove();\r\n        $(\"#inituicf\").remove();\r\n        $(\"#ui-id-1\").remove();\r\n        $(\"#ui-id-2\").remove();\r\n        $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n        $(\"#jqueryId\").remove();\r\n        $(\"#addressVerificationId\").remove();\r\n      }\r\n\r\n      checkAddressValidation() {\r\n        this.currentAddress.Province = $(\"#Prov\").val();\r\n        this.currentAddress.ZipCode = $(\"#Cap\").val();\r\n        this.currentAddress.City = $(\"#City\").val();\r\n      }\r\n\r\n      setAddressValue() {\r\n        let streetTypeId = $(\"#streetTypeId\").val();\r\n        let street = $(\"#Address\").val();\r\n        this.currentAddress.Address = street;\r\n\r\n        if (streetTypeId != null && streetTypeId != \"\") {\r\n          if (!this.currentAddress.Address.startsWith(streetTypeId)) {\r\n            this.currentAddress.Address = streetTypeId + \" \" + street;\r\n          }\r\n        }\r\n        else {\r\n          this.currentAddress.Address = street;\r\n        }\r\n      }\r\n\r\n\r\n      updateCartAddress() {\r\n        //concating address street and number\r\n        let model = this.currentAddress;\r\n        let currentStreet = model.Address;\r\n        model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n\r\n        let cartSub = this.shoppingCartService.setAddress(model).subscribe(result => {\r\n          this.shoppingCartService.updateCart(result);\r\n          this.carrello = this.shoppingCartService.getCart();\r\n          if (result == false) {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          });\r\n\r\n        this.subManager.add(cartSub);\r\n\r\n        model.Address = currentStreet;\r\n      }\r\n\r\n      changeAddress(addressId) {\r\n        //Reading selected address\r\n        // let addresses = this.carrello.Addresses;\r\n        // let count = addresses.length;\r\n\r\n        // var addressVal = $('#idSelectedAdress option:selected').text();\r\n        // console.log(addressVal)\r\n\r\n        this.carrello.Addresses.filter(x => x.Id == addressId).forEach(address => {\r\n          let completeAddress = address.Address;\r\n          let lastIndex = completeAddress.lastIndexOf(\" \");\r\n          let addressStreet: string = \"\";\r\n          let addressNumber: string = \"\";\r\n\r\n          if (lastIndex > -1) {\r\n            addressStreet = completeAddress.slice(0, lastIndex);\r\n            addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n          }\r\n\r\n          if (address.Id == addressId) {\r\n            this.currentAddress.Id = address.Id;\r\n            this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n            this.currentAddress.City = address.City;\r\n            this.currentAddress.Recipient = address.Recipient;\r\n            this.currentAddress.Province = address.Province;\r\n            this.currentAddress.Phone = address.Phone;\r\n            this.currentAddress.ZipCode = address.ZipCode;\r\n            this.currentAddress.Mobile = address.Mobile;\r\n            this.currentAddress.CustomerID = this.userId;\r\n            this.currentAddress.Language = this.lang;\r\n            this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n\r\n          }\r\n        });\r\n\r\n\r\n\r\n\r\n\r\n        //concating address street and number to one property \"Address\"\r\n        let model = this.currentAddress;\r\n        model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n        let currentStreet = model.Address;\r\n\r\n        let shopCartSub = this.shoppingCartService.setAddress(model).subscribe(result => {\r\n          if (result == null || result == undefined) {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n          else {\r\n            this.shoppingCartService.updateCart(result);\r\n            this.carrello = this.shoppingCartService.getCart();\r\n          }\r\n        },\r\n          err => {\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          });\r\n\r\n        this.subManager.add(shopCartSub);\r\n\r\n        //reverting address text to previous value after sending request                \r\n        let lastIndex = currentStreet.lastIndexOf(\" \");\r\n        let addressStreet: string = currentStreet;\r\n\r\n        if (lastIndex > -1) {\r\n          addressStreet = currentStreet.slice(0, lastIndex);\r\n        }\r\n\r\n        model.Address = addressStreet;\r\n      };\r\n\r\n      setJobName(rowId, jobName) {\r\n        if (jobName != \"\") {\r\n          let jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(result => {\r\n            if (result == false) {\r\n              this.bootboxService.i18nAlert(\"errorMex\");\r\n            }\r\n          },\r\n            err => {\r\n              this.bootboxService.i18nAlert(\"errorMex\");\r\n            });\r\n\r\n          this.subManager.add(jobNameSub);\r\n        }\r\n      }\r\n\r\n      applyVoucher(coupon) {\r\n        if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n          this.spinnerCartCash = true;\r\n          let voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(result => {\r\n            if (result.CartID != null) {\r\n              this.shoppingCartService.updateCart(result);\r\n              this.carrello = this.shoppingCartService.getCart();\r\n\r\n              this.isVoucherValid = true;\r\n              this.isVoucherInvalid = false;\r\n              this.isVoucherApplied = true;\r\n              this.voucherCode = \"\";\r\n            }\r\n            else {\r\n              this.isVoucherValid = false;\r\n              this.isVoucherInvalid = true;\r\n            }\r\n            this.spinnerCartCash = false;\r\n\r\n          },\r\n            err => {\r\n              this.bootboxService.i18nAlert(\"errorMex\");\r\n              this.spinnerCartCash = false;\r\n\r\n            });\r\n\r\n          this.subManager.add(voucherSub);\r\n        }\r\n      };\r\n\r\n      showModal() {\r\n        this.disableButtonCart = false;\r\n        this.spinnerCartCash = false;\r\n        this.showValidationLabels = true;\r\n\r\n        //JobNames\r\n        let validProducts: boolean = true;\r\n        let count = this.carrello.Products.length;\r\n        for (var i = 0; i < count; i++) {\r\n          var product = this.carrello.Products[i];\r\n\r\n          //If one of the jobnames are not set then the validation fails\r\n          if (product.JobName != null && product.JobName.trim().length == 0) {\r\n            validProducts = false;\r\n            break;\r\n          }\r\n        }\r\n\r\n        let validAddress: boolean = true;\r\n\r\n        if (validProducts == false || this.cartCashAccepted == false || !validAddress) {\r\n          return;\r\n        }\r\n\r\n        $(\"#cartCashModal\").modal(\"show\");\r\n      }\r\n\r\n\r\n      hideModal() {\r\n        $('#cartCashModal').modal('hide');\r\n        this.disableButtonCart = false;\r\n      }\r\n\r\n      confirmOrder() {\r\n        this.disableButtonCart = true;\r\n        this.spinnerCartCash = true;\r\n\r\n        //Checking if all fields are valid\r\n        let confirmOrderSub = this.shoppingCartService.confirmOrder().subscribe(result => {\r\n          if (result > 0) {\r\n            this.shoppingCartService.clearCartAfterConfirmation();\r\n\r\n            this.OrderId = result;\r\n            this.hideModal();\r\n\r\n            //Reading link of the page\r\n            var cartOrderDetailPageUrl = this.routesService.getRoutePath('CARRELLO ORDINE')[0];\r\n\r\n            //Removing system parameter (id)\r\n            cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n\r\n            //Adding Order Id parameter\r\n            cartOrderDetailPageUrl += this.OrderId;\r\n            //this.spinnerCartCash = false;\r\n            //this.router.navigate([cartOrderDetailPageUrl]);\r\n            (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n          }\r\n          else {\r\n            this.hideModal();\r\n            this.spinnerCartCash = false;\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        },\r\n          err => {\r\n            this.hideModal();\r\n            this.spinnerCartCash = false;\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          });\r\n\r\n        this.subManager.add(confirmOrderSub);\r\n      };\r\n\r\n      ngAfterViewInit() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n        setTimeout(function () {\r\n          let altezza = $(\"#footer\").outerHeight();\r\n          let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n          let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n          altezza += margintop;\r\n          altezza += paddingntop;\r\n\r\n          let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n          let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n          let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n          altezza += altezza1;\r\n          altezza += margintop1;\r\n          altezza += paddingntop1;\r\n\r\n          let altezzaHead = $(\".header-body\").outerHeight();\r\n          let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n          let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n          altezzaHead += margintopHead;\r\n          altezzaHead += paddingntopHead;\r\n\r\n          $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n          $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n          this.pageIsInit = true;\r\n        }, 1);\r\n\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInitAfter) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        setTimeout(function () { \r\n          $('.popovers').popover(); \r\n        }, 150);\r\n\r\n        if (shoppingCartCashData.isActiveAddressVerificationModule) {\r\n          let addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n          if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n            this.addAddressVerificationScripts(addressVerificationKey);\r\n            $(\"#Cap\").prop('disabled', true);\r\n\r\n          }\r\n        }\r\n        else {\r\n          $(\"#Cap\").prop('disabled', false);\r\n        }\r\n\r\n        this.pageIsInitAfter = true;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        if (!this.isBrowser || this.pageIsOnDestroy) {\r\n          return;\r\n        }\r\n\r\n        this.subManager.unsubscribe();\r\n\r\n        //this method is removing all scripts and elements connected to address verification feature\r\n        let addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n        this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n        this.pageIsOnDestroy = true;\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart-cash.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { Md5 } from \"ts-md5/dist/md5\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DomSanitizer, DOCUMENT } from \"@angular/platform-browser\";\r\nimport { PaypalService } from \"../../../../services/core/paypal.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class CartSubmittedComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        //Depending on the type of the list, a different template is used\r\n        let orderId: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        //Reading order id from url\r\n        //If id is set, then the information is retrived by id, else the not found page is showed\r\n        let paramsSub = this.route.params.subscribe(params => {\r\n            let templateHtml: string;\r\n            let id = params['id'];\r\n\r\n            if (id !== undefined) {\r\n                orderId = id;\r\n\r\n                let cartSub = this.cmsComponentService.getShoppingCartSubmittedData(orderId).subscribe(result => {\r\n                    if (result.SeoInformation) {\r\n                        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n                    }\r\n\r\n                    if (this.isBrowser) {\r\n                        //Creating subcomponent whith the selected template to inject\r\n                        let subComponent = this.createSubComponent(result, header);\r\n\r\n                        //injecting created component (OK)\r\n                        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n                    }\r\n                    else {\r\n                        let scriptId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.cartSubmittedId, orderId);\r\n\r\n                        //-- Get head and body scripts\r\n                        this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, scriptId);\r\n\r\n                        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(cartSub);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(paramsSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(cartSubmittedData: any, header: any) {\r\n        @Component({\r\n            template: cartSubmittedData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private router: Router,\r\n                    private clientAreaService: ClientAreaService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    private seoService: SeoService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private translateService: TranslateService,\r\n                    private sanitizer: DomSanitizer,\r\n                    private paypalService: PaypalService,\r\n                    private mappings: Mappings\r\n                ) { }\r\n\r\n            footerData: any = cartSubmittedData.footerData;\r\n            headerData: any = header;\r\n            private areaClientiName: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            authentication = this.authService.GetData();\r\n            clientArea: ClientAreaOrderDetails = cartSubmittedData.OrderDetail;\r\n            private seoInfo: SeoViewModel = cartSubmittedData.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            language = this.languageService.getShortLang();\r\n            public selectedTipoSpedizione: string = \"\";\r\n            //cripted orderID with Md5\r\n            criptedOrderID = Md5.hashStr(this.clientArea.OrderId.toString());\r\n            private paymentCompleteUrl: string;\r\n            private paymentUrl: string;\r\n            private isTipologiaPagamentoBonifico = cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico ? cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico : false;\r\n            private numeroTrnInvalid: boolean = false;\r\n            private numeroCroInvalid: boolean = false;\r\n            private bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(cartSubmittedData.BonificoUploadUrl);\r\n            private bonificoUploadedFiles: string[] = cartSubmittedData.OrderDetail.BonificoUploadedFilesNames;\r\n            private pageIsAfterViewInit: boolean = false;\r\n\r\n            private breadcrumbs: Breadcrumbs[] = cartSubmittedData.BreadcrumbsInfo;\r\n\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                //adding http before link because paypal redirection doesn't work without paypal\r\n                this.paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n\r\n                //url that the user will be redirected to after paying of order via paypal\r\n                this.paymentCompleteUrl = this.paymentUrl.replace('{lang}', this.language);\r\n\r\n                this.clientArea.CurrencyCode = \"EUR\";\r\n                if (this.clientArea.OrderId == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('HOME'));\r\n                }\r\n                this.checkTipoSpedizione();\r\n            }\r\n            checkTipoSpedizione() {\r\n                if (this.clientArea.ProcessingOrderList.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    var tipoSped = this.clientArea.ProcessingOrderList.filter((item, i, arr) => arr.findIndex((t) => t.TipoTrasporto === item.TipoTrasporto) === i);\r\n                    var TipoTrasportoShipmentToFilter = \"S\";\r\n                    if (tipoSped.length == 1) {\r\n                        TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                    }\r\n                    if (this.selectedTipoSpedizione == \"\") {\r\n                        this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                    }\r\n                }\r\n            }\r\n            confirmBonificoDetails() {\r\n                // trim value before sending it to a server\r\n                this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n\r\n                this.clientAreaService.updateBonificoPaymentDetails(cartSubmittedData.OrderDetail.OrderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n                    .subscribe(x => {\r\n                        //hiding of loading panel after we get all data we need\r\n                        this.routesService.hidePageLoader();\r\n                        this.hideBonificoModal();\r\n                    },\r\n                        err => {\r\n                        });\r\n            }\r\n\r\n            // validate NumeroTrn input\r\n            checkNumeroTrn(inputText: any) {\r\n                inputText = inputText.trim();\r\n                if (inputText.length < 31) {\r\n                    this.numeroTrnInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroTrnInvalid = true;\r\n                }\r\n            }\r\n\r\n            // validate NumeroCro input\r\n            checkNumeroCro(inputNumber: any) {\r\n                if (inputNumber < 99999999999) {\r\n                    this.numeroCroInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroCroInvalid = true;\r\n                }\r\n            }\r\n\r\n            // getting uploaded files for this order and showing it inside of bonifico modal\r\n            getBonificoUploadedFiles() {\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n\r\n                this.clientAreaService.getBonificoUploadedFiles(cartSubmittedData.OrderDetail.OrderId).subscribe(x => {\r\n                    this.bonificoUploadedFiles = x;\r\n                    //hiding of loading panel after we get all data we need\r\n                    this.routesService.hidePageLoader();\r\n                })\r\n            }\r\n\r\n            showBonificoModal() {\r\n                $(\"#bonificoModal\").modal(\"show\");\r\n            }\r\n\r\n            hideBonificoModal() {\r\n                $(\"#bonificoModal\").modal(\"hide\");\r\n            }\r\n\r\n\r\n            orderDetailsRedirect() {\r\n                //Reading link of the page\r\n                var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n\r\n                //Removing system parameter (id)\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n\r\n                //Adding Order Id parameter\r\n                cartOrderDetailPageUrl += this.clientArea.OrderId;\r\n\r\n                //this.router.navigate([cartOrderDetailPageUrl]);\r\n                (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n\r\n            }\r\n\r\n            fileUploadRedirect() {\r\n                //Reading link of the page\r\n                var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n                //Removing system parameter (id)\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', this.clientArea.OrderId);\r\n                cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':pagefrom', 'section_upload');\r\n\r\n                //this.router.navigate([cartOrderDetailPageUrl]);\r\n                (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n\r\n            }\r\n\r\n            payWithPaypal() {\r\n                let paypalText = \"pay_with_paypal\";\r\n                let translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n\r\n                let formHtml = '<form ngNoForm action=\\\"' + this.clientArea.GatewayUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"paypalForm\" id=\\'paypalForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">' +\r\n                    '<input type=\"hidden\" name=\"business\"  value=\\\"' + this.clientArea.GatewayAccount + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_name\"  value=\\\"' + this.clientArea.OrderNumber + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"currency_code\" value=\\\"' + this.clientArea.CurrencyCode + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"amount\" value=\\\"' + this.clientArea.TotalCost + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_number\"  value=\\\"' + this.clientArea.OrderId + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"return\" value=\\\"' + this.paymentCompleteUrl + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"rm\" value=\"2\">' +\r\n\r\n                    '<button (click)=\"payWithPaypal()\" *ngIf=\"clientArea.PaymentDoneUrl != null\" class=\"btn btn-primary  btn-lg\" type=\"button\"' +\r\n                    'id=\"paypal-button-container\" name=\"paypal-button-container\" style=\"width:100%\">' +\r\n                    '<i class=\"fa fa-credit-card\"></i> ' + translatePaypal +\r\n                    '</button>' +\r\n                    '</form>';\r\n\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                let completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n\r\n                $('#paypalForm').submit();\r\n            }\r\n\r\n            payWithNexi() {\r\n                let NexiForm = $(\"#completeNexiFormId\").html()\r\n                let NexiText = \"pay_with_nexi\";\r\n                let translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n                let formHtml = '<form ngNoForm action=\\\"' + this.clientArea.NexiModel.requestUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"nexiForm\" id=\\'nexiForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"alias\"  value=\\\"' + this.clientArea.NexiModel.alias + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"importo\"  value=\\\"' + this.clientArea.NexiModel.importo + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"divisa\"  value=\\\"' + this.clientArea.NexiModel.divisa + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"codTrans\" value=\\\"' + this.clientArea.NexiModel.codTrans + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url\" value=\\\"' + this.clientArea.NexiModel.url + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url_back\"  value=\\\"' + this.clientArea.NexiModel.url_back_ultimoStepCarrello + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"mac\" value=\\\"' + this.clientArea.NexiModel.mac + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"tipo_servizio\" value=\"paga_1click\"/>' +\r\n                    '<input type=\"hidden\" name=\"num_contratto\" value=\\\"' + this.clientArea.NexiModel.num_contratto + '\\\"/>';\r\n                if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n                    formHtml += '<input type=\"hidden\" name=\"gruppo\" value=\\\"' + this.clientArea.NexiModel.gruppo + '\\\"/>';\r\n                }\r\n                formHtml += '</form>' + NexiForm;\r\n                // formHtml += '</form> <button (click)=\"payWithNexi()\" class=\"btn btn-primary btn-lg w100\" type=\"button\" id=\"nexi-button-container\" name=\"nexi-button-container\">' +\r\n                // '<i class=\"fa fa-credit-card\"></i> ' + translateNexi +\r\n                // '</button>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                let completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n\r\n                $('#nexiForm').submit();\r\n            }\r\n            payWithBancaSella() {\r\n                axerve.lightBox.open(this.clientArea.BancaSellaModel.payload.paymentID, this.clientArea.BancaSellaModel.payload.paymentToken, this.callback);\r\n            }\r\n            callback(result) {\r\n                if (result.responseURL != null && result.responseURL != undefined && result.responseURL != \"\") {\r\n                    (window as any).open(result.responseURL, \"_self\");\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngAfterViewInit(): void {\r\n                if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n                    return;\r\n                }\r\n                if (this.clientArea.PaymentType == 'BancaSella' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00') {\r\n                    axerve.lightBox.shop = this.clientArea.BancaSellaModel.payload.shopId;\r\n                }\r\n                //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n                if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n                    let userId = this.authService.GetUserId();\r\n                    let params = {\r\n                        CustomerId: userId.toString(),\r\n                        OrderId: this.clientArea.OrderId.toString(),\r\n                        Lang: this.languageService.getLongLang()\r\n                    };\r\n\r\n                    //-- Load paypal service and render a button for paypal payment\r\n                    this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url,\r\n                        this.mappings.Web_Api_Create_Paypal_Payment,\r\n                        this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n                }\r\n\r\n                this.pageIsAfterViewInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart-submitted.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, NavigationExtras, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { CartInfo } from \"./../../../../models/core/cart\";\r\nimport { CartShipmentModel } from \"./../../../../models/core/cart\";\r\nimport { CartPaymentModel } from \"./../../../../models/core/cart\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from '../../../../services/inventory/customerscanvas.service';\r\nimport { CookieService } from '../../../../services/core/cookie';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class CartComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        var isChangeShipment = false;\r\n        let paramsSub = this.route.queryParams.subscribe(params => {\r\n            var isChangeShipmentParam = params['isChangeShipment'];\r\n            if (isChangeShipmentParam != undefined) {\r\n                isChangeShipment = isChangeShipmentParam;\r\n            }\r\n        });\r\n        this.subManager.add(paramsSub);\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let cartDataSub = this.cmsComponentService.getShoppingCartData().subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(result, header, isChangeShipment);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                let scriptId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.cartId, result.ShoppingCart.CartID);\r\n\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, scriptId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(cartDataSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(shoppingCartData: any, header: any, isChangeShipment: any) {\r\n        @Component({\r\n            template: shoppingCartData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private router: Router,\r\n                    private shoppingCartService: ShoppingCartService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    private seoService: SeoService,\r\n                    private translate: TranslateService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private registerService: RegisterService,\r\n                    public canvasService: CustomersCanvasService,\r\n                    @Inject('CookieService') private cookie: CookieService\r\n                ) {\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                shoppingCartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                // get row id of edited element\r\n                                let productId = this.clickedProductId;\r\n                                // get data which we get from customer canvas and saved in a cart service\r\n                                let canvasData = shoppingCartService.getCustomizationCanvasData();\r\n                                canvasData[\"RowIdPrev\"] = productId;\r\n\r\n                                if (canvasData && productId && canvasData.status == \"success\") {\r\n                                    let updateCanvas = canvasService.updatePrevCanvasInfo(canvasData).subscribe(x => {\r\n                                        let objectToUpdateStateId = this.carrello.Products.find(obj => {\r\n                                            return obj.Id === productId;\r\n                                        })\r\n                                        objectToUpdateStateId.CanvasStateId = canvasData.stateId;\r\n                                    });\r\n\r\n                                    this.subManager.add(updateCanvas);\r\n                                }\r\n                                // reset editor view\r\n                                shoppingCartService.resetCanvasData();\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            // model = {\r\n            //     selectedPayment: new CartPaymentModel(),\r\n            //     selectedShipment: new CartShipmentModel(),\r\n            //     selectedPickUp: new CartShipmentModel(),\r\n            //     selectedDelivery: new CartShipmentModel()\r\n            // }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            shipmentToShow: CartShipmentModel[];\r\n            areaStatus: any;\r\n            carrello: CartInfo = shoppingCartData.ShoppingCart;\r\n            items = this.carrello.Payments;\r\n\r\n            selectedPaymentId = 0;\r\n            selectedShipmentId = 0;\r\n            map: any;\r\n            selectInfoWindow: any;\r\n            locations = new Array<any>();\r\n\r\n            footerData: any = shoppingCartData.footerData;\r\n            headerData: any = header;\r\n\r\n            userLogin = UserLogin;\r\n            lang: string = this.languageService.getLongLang();\r\n            private isUserAuthenticated: boolean;\r\n            company: Company = new Company();\r\n            authentication = this.authService.GetData();\r\n            private userId = this.authService.GetUserId();\r\n            cartId: number = 0;\r\n            voucherCode: string = \"\";\r\n            isVoucherValid: boolean = false;\r\n            isVoucherInvalid: boolean = false;\r\n            isVoucherApplied: boolean = false;\r\n            hasPickUpActive: boolean = false;\r\n            hasShipmentActive: boolean = false;\r\n            hasDeliveryActive: boolean = false;\r\n            private seoInfo: SeoViewModel = shoppingCartData.SeoInformation;\r\n            private disableModalCartButtons: boolean = false;\r\n            private spinnerCart: boolean = false;\r\n            private idOfProduct: any;\r\n            private breadcrumbs: Breadcrumbs[] = shoppingCartData.BreadcrumbsInfo;\r\n            private isCompletedRegistration: any;\r\n            private userData: any;\r\n            private showProceedBtn: boolean = true;\r\n            public parentWidgetData: string = shoppingCartData.CanvasInfo;\r\n            mapZoom: number = shoppingCartData.MapZoom ;\r\n            private clickedProductId: number = 0;\r\n            private selectedProduct: any;\r\n            public selectedTipoSpedizione: string = \"\";\r\n            trasportoLabel: string = \"\";\r\n            ritiroLabel: string = \"\";\r\n            consegnaLabel: string = \"\";\r\n            public TipiSpedizione: any[];\r\n            subManager = new Subscription();\r\n            countInitMap: number = 0;\r\n            cartStep1: boolean = true;\r\n            cartStep2: boolean = false;\r\n\r\n            ngOnInit() {\r\n\r\n                this.trasportoLabel = this.getLabel('tipoTrasporto_shipment')\r\n                this.ritiroLabel = this.getLabel('tipoTrasporto_pickup')\r\n                this.consegnaLabel = this.getLabel('tipoTrasporto_delivery')\r\n                this.TipiSpedizione = [{\r\n                    valore: this.trasportoLabel,\r\n                    chiave: \"S\",\r\n                    isVisible: true\r\n                }, {\r\n                    valore: this.ritiroLabel,\r\n                    chiave: \"P\",\r\n                    isVisible: true\r\n                }, {\r\n                    valore: this.consegnaLabel,\r\n                    chiave: \"D\",\r\n                    isVisible: true\r\n                }];\r\n\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                if (shoppingCartData.UserData != null) {\r\n                    this.isCompletedRegistration = shoppingCartData.UserData.IsCompletedRegistration;\r\n                    this.userData = shoppingCartData.UserData;\r\n                }\r\n\r\n                if (this.carrello.Products.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    this.shoppingCartService.updateCart(this.carrello);\r\n                    let userData = this.authService.GetData();\r\n                    this.isUserAuthenticated = userData.isAuthenticated;\r\n                    this.carrello.Payments = this.carrello.Payments.sort((a, b) => a.OrderSort - b.OrderSort)\r\n                    for (let payment of this.carrello.Payments) {\r\n                        if (payment.Selected == true) {\r\n                            this.selectedPaymentId = payment.Id;\r\n                            break;\r\n                        }\r\n                    }\r\n                    this.hasPickUpActive = this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == 'P').length > 0 ? true : false;\r\n                    this.hasShipmentActive = this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == 'S').length > 0 ? true : false;\r\n                    this.hasDeliveryActive = this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == 'D').length > 0 ? true : false;\r\n                    this.checkTipoSpedizione();\r\n                    this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == 'P').forEach(element => {\r\n                        var item = [element.Name, parseFloat(element.Latitudine), parseFloat(element.Longitudine), element.Id];\r\n                        this.locations.push(item)\r\n                    });\r\n\r\n\r\n\r\n                    // for (let shipment of this.carrello.Shipments) {\r\n                    //     if (shipment.Selected == true) {\r\n                    //         // console.log(\"selectedShipmentId = \"+shipment.Id)\r\n                    //         this.selectedShipmentId = shipment.Id;\r\n                    //         break;\r\n                    //     }\r\n                    // }\r\n                }\r\n\r\n                if (this.userData != undefined && this.userData != null) {\r\n                    if (this.userData.Id_User_Group != 4) {\r\n                        if ((this.userData.CodiceDestinatarioSDL == \"\" || this.userData.CodiceDestinatarioSDL == \"0000000\" || this.userData.CodiceDestinatarioSDL == undefined) && (this.userData.PecEmail == \"\" || this.userData.PecEmail == undefined)) {\r\n                            this.showProceedBtn = false;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (isChangeShipment) {\r\n                    this.cartStep1 = false;\r\n                    this.cartStep2 = true;\r\n                }\r\n            }\r\n            scroll(id: any) {\r\n                let el = document.getElementById(id);\r\n                if(el!=null)\r\n                {\r\n                    el.scrollIntoView();\r\n                }\r\n            }\r\n            gotoToStep1Cart() {\r\n                this.cartStep1 = true;\r\n                this.cartStep2 = false;\r\n            }\r\n\r\n            gotoToStep2Cart() {\r\n                this.cartStep1 = false;\r\n                this.cartStep2 = true;\r\n            }\r\n\r\n            changeTipoSpedizioneValue(valore) {\r\n                if (this.selectedTipoSpedizione == valore) {\r\n                    return;\r\n                }\r\n                this.selectedTipoSpedizione = valore;\r\n                if (valore == 'P') {\r\n                    this.initMap(this)\r\n                }\r\n                this.checkTipoSpedizione(true);\r\n            }\r\n            checkTipoSpedizione(isUpdate = false, isRemovingCart = false) {\r\n                if (this.carrello.Products.length == 0) {\r\n                    this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                }\r\n                else {\r\n                    var tipoSped = this.carrello.Products.filter((item, i, arr) => arr.findIndex((t) => t.TipoTrasporto === item.TipoTrasporto) === i);\r\n                    var TipoTrasportoShipmentToFilter = \"S\";\r\n                    if (tipoSped.length == 1) {\r\n                        TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                    }\r\n                    if (this.selectedTipoSpedizione == \"\") {\r\n                        this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                    }\r\n                    var showAllType = true;\r\n                    var haveRowTime = this.carrello.Products.filter(x => x.DeliveryTime != \"\");\r\n                    if (haveRowTime.length > 0) {\r\n                        showAllType = false;\r\n                    }\r\n                    //console.log(\"hasDeliveryActive = \"+this.hasDeliveryActive)\r\n                    //console.log(\"hasPickUpActive = \"+this.hasPickUpActive)\r\n                    //console.log(\"hasShipmentActive = \"+this.hasShipmentActive)\r\n                    this.TipiSpedizione.forEach((tipoSped: any) => {\r\n                        tipoSped.isVisible = true;\r\n                        if (showAllType == false && (tipoSped.chiave == \"S\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n\r\n                        if (this.hasDeliveryActive == false && (tipoSped.chiave == \"D\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                        if (this.hasPickUpActive == false && (tipoSped.chiave == \"P\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n                        if (this.hasShipmentActive == false && (tipoSped.chiave == \"S\")) {\r\n                            tipoSped.isVisible = false;\r\n                        }\r\n\r\n                    })\r\n\r\n                    if (isUpdate) {\r\n                        this.shipmentToShow = this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == this.selectedTipoSpedizione && x.DefaultShipment == true);\r\n                        this.selectRadioShipment(this.shipmentToShow[0].Id);\r\n                    }\r\n                    else {\r\n                        this.shipmentToShow = this.carrello.Shipments.sort((a, b) => a.Sort - b.Sort).filter((x: any) => x.TipoTrasporto == this.selectedTipoSpedizione);\r\n                        if (this.shipmentToShow.filter((x: any) => x.Selected == true).length > 0) {\r\n                            this.selectedShipmentId = this.shipmentToShow.filter((x: any) => x.Selected == true)[0].Id;\r\n                        }\r\n                        else {\r\n                            if (isRemovingCart) {\r\n\r\n                                if (this.selectedShipmentId > 0) {\r\n                                    var shipmentToSelect = this.shipmentToShow.filter((x: any) => x.Id == this.selectedShipmentId);\r\n                                    if (shipmentToSelect.length > 0) {\r\n                                        this.selectedShipmentId = 0;\r\n                                        this.selectRadioShipment(shipmentToSelect[0].Id, false, true);\r\n                                    }\r\n                                    else {\r\n                                        this.selectRadioShipment(this.shipmentToShow[0].Id, false, true);\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    var shipentToSelect = this.shipmentToShow[0].Id;\r\n                                    if (this.shipmentToShow.filter((x: any) => x.DefaultShipment == true).length > 0) {\r\n                                        shipentToSelect = this.shipmentToShow[0].Id\r\n                                    }\r\n                                    this.selectRadioShipment(shipentToSelect, false, true);\r\n                                }\r\n                            }\r\n                            else {\r\n                                var shipentToSelect = this.shipmentToShow[0].Id;\r\n                                if (this.shipmentToShow.filter((x: any) => x.DefaultShipment == true).length > 0) {\r\n                                    shipentToSelect = this.shipmentToShow[0].Id\r\n                                }\r\n                                this.selectRadioShipment(this.shipmentToShow[0].Id);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n            }\r\n\r\n            openCanvasEditor(product) {\r\n                this.clickedProductId = product.Id;\r\n\r\n                if (shoppingCartData.CanvasInfo.CanvasUrl) {\r\n                    // we have a state id, because product is already edited, so we kept it's state id in a database\r\n                    const isStateId = true;\r\n                    const canvasConfigData = this.setCanvasConfig(product);\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig(product) {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: shoppingCartData.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: shoppingCartData.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: shoppingCartData.CanvasInfo.CustomerCanvasUserName,\r\n                    CanvasStateId: product.CanvasStateId,\r\n                    Watermark: shoppingCartData.CanvasInfo.WatermarkText,\r\n                    CanvasApiKey: shoppingCartData.CanvasInfo.ApiKey\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n\r\n                if (shoppingCartData.CanvasInfo && shoppingCartData.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = shoppingCartData.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                toShow = isModuleActive && this.isUserAuthenticated ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n            // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n            removeCustomersCanvasState() {\r\n                if (this.toShowCanvasButton() && this.selectedProduct.CanvasStateId) {\r\n                    const canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n\r\n                    this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n                        .subscribe(x => x,\r\n                            err => {\r\n                                console.log(err);\r\n                            });\r\n                }\r\n            }\r\n\r\n            goRegistrationPage() {\r\n                //-- If this parameter is inside of cookie, it means that user used quick registration feature\r\n                let quickRegistration = this.cookie.get(\"IsQuickRegistered\");\r\n\r\n                if (quickRegistration && Boolean(quickRegistration)) {\r\n                    let navigationExtras: NavigationExtras = {\r\n                        queryParams: { 'quickRegistration': true }\r\n                    };\r\n\r\n                    let registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n                    registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n                    registerRoute += \"?quickRegistration=true\";\r\n\r\n                    (window as any).open(registerRoute, \"_self\");\r\n                    //this.router.navigate([registerRoute]);\r\n                }\r\n                else {\r\n                    if (this.isCompletedRegistration == false) {\r\n                        this.registerService.setFacebookLoginData(this.userData);\r\n\r\n                        let registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n                        registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n\r\n                        this.router.navigate([registerRoute]);\r\n                    }\r\n                    else {\r\n                        this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n                    }\r\n                }\r\n            };\r\n\r\n            goLoginPage() {\r\n                let loginRoute = this.routesService.getRoutePath('LOGIN_PAGE_FROM')[0];\r\n                loginRoute = loginRoute.replace(\":pagefrom\", \"cart\");\r\n\r\n                this.router.navigate([loginRoute]);\r\n            };\r\n\r\n            goToConfirmPurchasePage() {\r\n                if (this.selectedPaymentId == 0) {\r\n                    this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n                }\r\n                else if (this.selectedShipmentId == 0) {\r\n                    this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n                }\r\n                else {\r\n                    //this.router.navigateByUrl(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n                    (window as any).open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n                }\r\n            }\r\n\r\n            goToModifyProfile() {\r\n                this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI'));\r\n            }\r\n\r\n            saveCart() {\r\n                let saveCartSub = this.shoppingCartService.saveCart(this.userId, this.cartId, this.selectedPaymentId, this.selectedShipmentId).subscribe(result => {\r\n                    //this.router.navigate(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n                    (window as any).open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n                });\r\n\r\n                this.subManager.add(saveCartSub);\r\n            }\r\n\r\n            selectRadioPayment(paymentId) {\r\n                if (this.selectedPaymentId != paymentId) {\r\n                    this.selectedPaymentId = paymentId;\r\n                    this.setPayment(paymentId);\r\n                }\r\n            }\r\n\r\n            setPayment(paymentId) {\r\n                this.spinnerCart = true;\r\n                let paymentSub = this.shoppingCartService.setPayment(paymentId).subscribe(result => {\r\n                    this.bootboxService.i18nAlert(\"selectedPayment\", 'pagamento');\r\n                    this.shoppingCartService.updateCart(result);\r\n                    this.carrello = this.shoppingCartService.getCart();\r\n                    this.carrello.Payments = this.carrello.Payments.sort((a, b) => a.OrderSort - b.OrderSort)\r\n                    this.spinnerCart = false;\r\n                });\r\n\r\n                this.subManager.add(paymentSub);\r\n            }\r\n\r\n            selectRadioShipment(shipmentId, isOnMap = false, isOnRemove = false) {\r\n                if (this.selectedShipmentId != shipmentId) {\r\n                    this.selectedShipmentId = shipmentId;\r\n                    this.setShipment(shipmentId, isOnMap, isOnRemove);\r\n                }\r\n            }\r\n\r\n            setShipment(shipmentId, isOnMap = false, isOnRemove = false) {\r\n                this.spinnerCart = true;\r\n                let shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(result => {\r\n                    if (!isOnRemove) {\r\n                        this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n                    }\r\n                    this.shoppingCartService.updateCart(result);\r\n                    this.carrello = this.shoppingCartService.getCart();\r\n                    if (!isOnMap) {\r\n                        this.SelectValueMap(this);\r\n                    }\r\n                    this.checkTipoSpedizione();\r\n                    this.spinnerCart = false;\r\n                });\r\n\r\n                this.subManager.add(shipmentSub);\r\n            }\r\n\r\n            removeFromCart() {\r\n                this.disableModalCartButtons = true;\r\n                this.spinnerCart = true;\r\n\r\n                let removeCartSub = this.shoppingCartService.removeFromCart(this.idOfProduct).subscribe(result => {\r\n                    this.shoppingCartService.updateCart(result);\r\n                    this.carrello = this.shoppingCartService.getCart();\r\n                    this.spinnerCart = false;\r\n                    this.disableModalCartButtons = false;\r\n                    this.removeCustomersCanvasState();\r\n                    this.checkTipoSpedizione(false, true);\r\n                    if (this.carrello.Products != null && this.carrello.Products.length == 0) {\r\n                        this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(removeCartSub);\r\n                this.hideModal();\r\n            }\r\n\r\n            showModal(product) {\r\n                this.disableModalCartButtons = false;\r\n                this.idOfProduct = product.Id;\r\n                this.selectedProduct = product;\r\n\r\n                $(\"#cartModal\").modal(\"show\");\r\n            }\r\n\r\n            hideModal() {\r\n                $('#cartModal').modal('hide');\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n                let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n                this.subManager.add(sub);\r\n                return message;\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n                setTimeout(function () {\r\n                    let altezza = $(\"#footer\").outerHeight();\r\n                    let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                    let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                    altezza += margintop;\r\n                    altezza += paddingntop;\r\n\r\n                    let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                    let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                    let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                    altezza += altezza1;\r\n                    altezza += margintop1;\r\n                    altezza += paddingntop1;\r\n\r\n                    let altezzaHead = $(\".header-body\").outerHeight();\r\n                    //console.log(\".header-body = \" + altezzaHead)\r\n\r\n                    let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                    let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                    altezzaHead += margintopHead;\r\n                    altezzaHead += paddingntopHead;\r\n\r\n                    $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                    $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n                    this.pageIsInit = true;\r\n                }, 1);\r\n            }\r\n            applyVoucher(coupon) {\r\n                if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n                    this.spinnerCart = true;\r\n                    let voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(result => {\r\n                        if (result.CartID != null) {\r\n                            this.shoppingCartService.updateCart(result);\r\n                            this.carrello = this.shoppingCartService.getCart();\r\n                            this.isVoucherValid = true;\r\n                            this.isVoucherInvalid = false;\r\n                            this.isVoucherApplied = true;\r\n                            this.voucherCode = \"\";\r\n                        }\r\n                        else {\r\n                            this.isVoucherValid = false;\r\n                            this.isVoucherInvalid = true;\r\n                        }\r\n                        this.spinnerCart = false;\r\n\r\n                    },\r\n                        err => {\r\n                            this.bootboxService.i18nAlert(\"errorMex\");\r\n                            this.spinnerCart = false;\r\n\r\n                        });\r\n\r\n                    this.subManager.add(voucherSub);\r\n                }\r\n            };\r\n            setJobName(rowId, jobName) {\r\n                if (jobName != \"\") {\r\n                    let jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(result => {\r\n                        if (result == false) {\r\n                            this.bootboxService.i18nAlert(\"errorMex\");\r\n                        }\r\n                    },\r\n                        err => {\r\n                            this.bootboxService.i18nAlert(\"errorMex\");\r\n                        });\r\n\r\n                    this.subManager.add(jobNameSub);\r\n                }\r\n            }\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                setTimeout(function () { \r\n                    $('.popovers').popover(); \r\n                  }, 150);\r\n                this.pageIsInitAfter = true;\r\n                this.initMap(this)\r\n            }\r\n\r\n            initMap(those: any) {\r\n                if (those.locations.length > 0 && those.locations != null) {\r\n                    if (google == undefined || google == null || !google) {\r\n                        if (those.countInitMap > 3) {\r\n                            $(\"#map\").hide();\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            return;\r\n                        }\r\n                        those.countInitMap++;\r\n                        those.initMap(those);\r\n                    }\r\n                    else {\r\n                        if (those.locations[0][1] == \"\" || those.locations[0][1] == undefined || those.locations[0][1] == null || isNaN(those.locations[0][1])) {\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            $(\"#map\").hide();\r\n                            return;\r\n                        }\r\n                        var pt = new google.maps.LatLng(those.locations[0][1], those.locations[0][2]);\r\n                        var map = new google.maps.Map(document.getElementById('map'), {\r\n                            zoom: those.mapZoom,\r\n                            center: pt,\r\n                            mapTypeId: google.maps.MapTypeId.ROADMAP\r\n                        });\r\n                        map.setCenter(pt);\r\n\r\n                        those.map = map;\r\n\r\n                        var infowindow = new google.maps.InfoWindow();\r\n\r\n                        var marker, i;\r\n\r\n                        for (i = 0; i < those.locations.length; i++) {\r\n                            if (those.locations[i][1] == \"\" || those.locations[i][1] == undefined || those.locations[i][1] == null || isNaN(those.locations[i][1])) {\r\n                                $(\"#map\").hide();\r\n                                if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                    $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                    $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                }\r\n                                continue;\r\n                            }\r\n                            else if (those.locations[i][2] == \"\" || those.locations[i][2] == undefined || those.locations[i][2] == null || isNaN(those.locations[i][2])) {\r\n                                $(\"#map\").hide();\r\n                                if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                    $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                    $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                }\r\n                                continue;\r\n                            }\r\n                            marker = new google.maps.Marker({\r\n                                position: new google.maps.LatLng(those.locations[i][1], those.locations[i][2]),\r\n                                map: map\r\n                            });\r\n                            if (those.selectedShipmentId == those.locations[i][3]) {\r\n                                infowindow.setContent(those.locations[i][0]);\r\n                                infowindow.open(map, marker);\r\n                            }\r\n                            google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n\r\n                                return function () {\r\n                                    infowindow.setContent(those.locations[i][0]);\r\n                                    infowindow.open(map, marker);\r\n                                    those.selectRadioShipment(those.locations[i][3], true);\r\n                                    those.scroll(those.locations[i][3]);\r\n                                }\r\n\r\n                            })(marker, i));\r\n                        }\r\n                        those.selectInfoWindow = infowindow;\r\n                    }\r\n                }\r\n                else {\r\n                    return;\r\n                }\r\n            }\r\n            SelectValueMap(those: any) {\r\n                if (those.locations.length > 0 && those.locations != null) {\r\n                    if (google == undefined || google == null || !google) {\r\n                        if (those.countInitMap > 3) {\r\n                            $(\"#map\").hide();\r\n                            if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                            }\r\n                            return;\r\n                        }\r\n                        those.countInitMap++;\r\n                        those.SelectValueMap(those);\r\n                    }\r\n                    else {\r\n\r\n                        if (those.selectInfoWindow != \"\" && those.selectInfoWindow != undefined && those.selectInfoWindow != null) {\r\n                            those.selectInfoWindow.close();\r\n                            var infowindow = new google.maps.InfoWindow();\r\n                            those.selectInfoWindow = infowindow;\r\n                            var marker, i;\r\n                            for (i = 0; i < those.locations.length; i++) {\r\n                                if (those.locations[i][1] == \"\" || those.locations[i][1] == undefined || those.locations[i][1] == null || isNaN(those.locations[i][1])) {\r\n                                    $(\"#map\").hide();\r\n                                    if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                        $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                        $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                    }\r\n                                    continue;\r\n                                }\r\n                                else if (those.locations[i][2] == \"\" || those.locations[i][2] == undefined || those.locations[i][2] == null || isNaN(those.locations[i][2])) {\r\n                                    $(\"#map\").hide();\r\n                                    if ($(\"#listOfShipments\").hasClass(\"col-md-4\")) {\r\n                                        $(\"#listOfShipments\").removeClass(\"col-md-4\");\r\n                                        $(\"#listOfShipments\").addClass(\"col-md-12\");\r\n                                    }\r\n                                    continue;\r\n                                }\r\n                                else {\r\n\r\n                                    marker = new google.maps.Marker({\r\n                                        position: new google.maps.LatLng(parseFloat(those.locations[i][1]), parseFloat(those.locations[i][2])),\r\n                                        map: those.map\r\n                                    });\r\n                                    if (those.selectedShipmentId == those.locations[i][3]) {\r\n                                        infowindow.setContent(those.locations[i][0]);\r\n                                        infowindow.open(those.map, marker);\r\n                                    }\r\n                                    google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n\r\n                                        return function () {\r\n                                            infowindow.setContent(those.locations[i][0]);\r\n                                            infowindow.open(those.map, marker);\r\n                                            those.selectRadioShipment(those.locations[i][3], true);\r\n                                            those.scroll(those.locations[i][3]);\r\n                                        }\r\n\r\n                                    })(marker, i));\r\n                                }\r\n                            }\r\n                            those.selectInfoWindow = infowindow;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    return;\r\n                }\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler,  Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { CookieService } from \"../../../../services/core/cookie/cookie.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\nimport { Observable } from 'rxjs/Observable';\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: \"\"\r\n})\r\n\r\nexport class ClientAreaCatalogPrivateComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private templateService: TemplateService,\r\n      private clientAreaService: ClientAreaService,\r\n      private cmsComponentService: CmsComponentService,\r\n      private authService: AuthService,\r\n      private router: Router,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any\r\n    ) { }\r\n  subManager = new Subscription();\r\n  requestDataFromMultipleSources(UserId): Observable<any[]> {\r\n    let response1 = this.cmsComponentService.getHeaderData();\r\n    let response2 = this.cmsComponentService.getSideMenuData();\r\n    let response4 = this.clientAreaService.getClientAreaCatalogPrivate(UserId);\r\n\r\n    // Observable.forkJoin (RxJS 5) changes to just forkJoin() in RxJS 6\r\n    return Observable.forkJoin([response1, response2, response4]);\r\n  }\r\n  ngOnInit() {\r\n    if (!this.authService.GetData().isAuthenticated) {\r\n      this.router.navigate([\"\"]);\r\n    }\r\n    if (this.isBrowser) {\r\n      let UserId = this.authService.GetUserId();\r\n      let PageInfo: any;\r\n      let header: any;\r\n      let SideMenu: any;\r\n      let fork = this.requestDataFromMultipleSources(UserId).subscribe(result => {\r\n        //console.log(result)\r\n        header = result[0];\r\n        if (result[1].Categories) {\r\n          header.Categories = result[1].Categories;\r\n          SideMenu = result[1];\r\n        }\r\n        if (SideMenu) {\r\n          result[2].SideMenuData = SideMenu;\r\n        }\r\n\r\n        if (UserId !== undefined) {\r\n          PageInfo = result[2];\r\n\r\n\r\n          //Creating subcomponent whith the selected template to inject\r\n          let subComponent = this.createSubComponent(PageInfo, UserId, header);\r\n\r\n          this._elementRef.clear();\r\n          //injecting created component (OK)\r\n          this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n        else {\r\n          let orderNotFoundSub = this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(result => {\r\n            PageInfo = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(PageInfo, UserId, header)\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n          });\r\n\r\n          this.subManager.add(orderNotFoundSub);\r\n        }\r\n      });\r\n      this.subManager.add(fork);\r\n    }\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(template: any, orderId: string, header: any) {\r\n    @Component({\r\n      template: template.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private languageService: LanguageService,\r\n          private authService: AuthService,\r\n          private routesService: RoutesService,\r\n          @Inject('CookieService') private cookie: CookieService,\r\n          private router: Router,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private seoService: SeoService,\r\n          public currency: CurrencyService,\r\n          private translateService: TranslateService,\r\n          private breadcrumbsService: BreadcrumbsService,\r\n          private mappings: Mappings,\r\n          private scriptService: ScriptService\r\n        ) { }\r\n\r\n      private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n      private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n      private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n      private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n      private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n      private isActiveInvoicesModule: boolean = template.isActiveInvoicesModule;\r\n      private isCatalogPrivateActive: boolean = template.isCatalogPrivateActive;\r\n      footerData: any = template.footerData;\r\n      headerData: any = header;\r\n      private pageIsInit: boolean = false;\r\n      private pageIsAfterViewInit: boolean = false;\r\n      private sideMenuData: any = template.SideMenuData;\r\n      private breadcrumbs: Breadcrumbs[] = template.BreadcrumbsInfo;\r\n      subManager = new Subscription();\r\n      products = template.ProductPrivateList;\r\n\r\n      ngOnInit() {\r\n        this.sideMenuData.Categories = this.headerData.Categories;\r\n        setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n      getClassforMenuClientArea() {\r\n        let result;\r\n        if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n          result = \"col-md-3 col-sm-3\"\r\n        }\r\n        else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n          result = \"col-md-3 col-sm-3\"\r\n        }\r\n        else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n          result = \"col-md-4 col-sm-4\"\r\n        }\r\n        return result\r\n      }\r\n      ngAfterViewInit(): void {\r\n        if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n          return;\r\n        }\r\n        this.pageIsAfterViewInit = true;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-catalog-private.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ClientAreaDetails } from \"./../../../../models/settings/client-area\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class ClientAreaHomeComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private clientAreaService: ClientAreaService,\r\n            private router: Router,\r\n            private authService: AuthService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            private scriptService: ScriptService,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n\r\n    ngOnInit() {\r\n\r\n        //console.log(this.authService.GetData().isAuthenticated)\r\n        if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n\r\n        let userId = this.authService.GetUserId();\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        \r\n        let clientDetailsSub = this.clientAreaService.getDetailsClientArea(userId).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the catalog catgories information to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userAreaId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(clientDetailsSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(ClientAreaHomeTemplate: any, header: any) {\r\n        @Component({\r\n            template: ClientAreaHomeTemplate.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private languageService: LanguageService,\r\n                    private router: Router,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    private messagesService: MessagesService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private seoService: SeoService,\r\n                    public currency: CurrencyService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private scriptService: ScriptService\r\n                ) { }\r\n\r\n            footerData: any = ClientAreaHomeTemplate.FooterData;\r\n            headerData: any = header;\r\n            clientArea: ClientAreaDetails = new ClientAreaDetails();\r\n            lang: string = this.languageService.getLongLang();\r\n\r\n            private messagesList: any[] = [];\r\n            private numberOfMessages: number = 0;\r\n            private bodyMod: any[] = [];\r\n            private lastOrderDetailsPage: string = \"\";\r\n            private lastOrderId: string;\r\n            private userName: string = \"\";\r\n            private pageIsInit: boolean = false;\r\n\r\n            //checking if invoices module is active\r\n            private isActiveInvoicesModule: boolean = ClientAreaHomeTemplate.isActiveInvoicesModule;\r\n            private isCatalogPrivateActive: boolean = ClientAreaHomeTemplate.isCatalogPrivateActive;\r\n\r\n            private breadcrumbs: Breadcrumbs[] = ClientAreaHomeTemplate.BreadcrumbsInfo;\r\n            //Routes for menu-tabs\r\n            private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n            private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n            private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n            private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.userName = this.authService.GetData().username;\r\n                this.clientArea = ClientAreaHomeTemplate.ClientAreaDetails;\r\n                this.messagesList = this.clientArea.OrderNoteList;\r\n                this.numberOfMessages = this.clientArea.NewNoteOrdersCount;\r\n\r\n                //getting of the link for details page of latest order\r\n                this.lastOrderId = String(this.clientArea[\"LastOrderId\"]);\r\n                let url = this.routesService.getRoutePath(\"AREA CLIENTI - ORDINE\")[0];\r\n                this.lastOrderDetailsPage = url.replace(':id', this.lastOrderId);\r\n\r\n\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            showModal() {\r\n                let userId = this.authService.GetUserId();\r\n\r\n                let params = {\r\n                    CustomerId: userId,\r\n                    OrderId: \"0\",\r\n                    Lang: this.lang\r\n                };\r\n\r\n                let setMessSub = this.messagesService.setMessagesAsRead(params)\r\n                    .subscribe(result => { })\r\n\r\n                this.subManager.add(setMessSub);\r\n\r\n                $(\"#messagesModal\").modal(\"show\");\r\n\r\n                this.bodyMod = [];\r\n            }\r\n\r\n            hideModal() {\r\n                $('#basic').modal('hide');\r\n                this.numberOfMessages = 0;\r\n            }\r\n\r\n            messagesDetails(orderId) {\r\n                $(\"#messagesModal\").modal(\"hide\");\r\n                let id = orderId;\r\n                let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n                orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n                this.router.navigate([orderDetailsPage]);\r\n                return true;\r\n            }\r\n\r\n            getClassforMenuClientArea()\r\n            {\r\n              let result;\r\n              if(this.isActiveInvoicesModule&&this.isCatalogPrivateActive)\r\n              {\r\n                result=\"col-md-3 col-sm-3\"\r\n              }\r\n              else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                result = \"col-md-3 col-sm-3\"\r\n              }\r\n              else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                result = \"col-md-4 col-sm-4\"\r\n              }\r\n              return result\r\n            }\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-home.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Input, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { CookieService } from \"../../../../services/core/cookie/cookie.service\";\r\nimport { ApiService } from \"../../../../services/core/api.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\nexport class ClientAreaInvoicesComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private authService: AuthService,\r\n            private router: Router,\r\n            private clientAreaService: ClientAreaService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        let ClientAreaInvoicesListTemplate: any;\r\n\r\n        let userId = this.authService.GetUserId();\r\n        let showAll: string = \"-1\"\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, showAll, showAll, showAll).subscribe(result => {\r\n\r\n            ClientAreaInvoicesListTemplate = result;\r\n\r\n            if (ClientAreaInvoicesListTemplate.isActiveInvoicesModule) {\r\n                // Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(ClientAreaInvoicesListTemplate,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                let subComponent = this.redirectToHomepage(ClientAreaInvoicesListTemplate);\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n\r\n        })\r\n\r\n        this.subManager.add(invoicesSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //if invoices module is not active, then redirect to homepage\r\n    private redirectToHomepage(ClientAreaInvoicesListTemplate: any) {\r\n        @Component({\r\n            template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (private router: Router) { }\r\n\r\n            ngOnInit(): void {\r\n                this.router.navigate([\"\"]);\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n\r\n    private createSubComponent(ClientAreaInvoicesListTemplate: any,header: any) {\r\n\r\n        @Component({\r\n            template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    @Inject('CookieService') private cookie: CookieService,\r\n                    private clientAreaService: ClientAreaService,\r\n                    private router: Router,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    private apiService: ApiService,\r\n                    private messagesService: MessagesService,\r\n                    private mappings: Mappings,\r\n                    public currency: CurrencyService,\r\n                    private languageService: LanguageService,\r\n                    private translateService: TranslateService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private seoService: SeoService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private scriptService: ScriptService\r\n                ) { }\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            public rows: Array<any> = [];\r\n\r\n            public columns: Array<any> = [];\r\n\r\n            //translating of header columns titles\r\n            translateTableColumnTitle(columnTitle) {\r\n                let translation = this.translateService.get(columnTitle)[\"value\"];\r\n                return translation;\r\n            }\r\n\r\n            @Input() clientModel: Array<ClientAreaOrderDetails>;\r\n\r\n            //filter fields\r\n            private documentTypeSelect: string = \"-1\";\r\n            private orderNumber: string = \"\";\r\n            private invoiceNumber: string = \"\";\r\n\r\n            private lang: string = this.languageService.getLongLang();\r\n            private shortLang: string = this.languageService.getShortLang();\r\n\r\n            private load: boolean = true;\r\n\r\n           footerData: any = ClientAreaInvoicesListTemplate.footerData;\r\n           headerData: any = header;\r\n\r\n            //Routes for menu-tabs\r\n            private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n            private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n            private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n            private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n            private isActiveInvoicesModule: boolean = ClientAreaInvoicesListTemplate.isActiveInvoicesModule;\r\n            private isCatalogPrivateActive: boolean = ClientAreaInvoicesListTemplate.isCatalogPrivateActive;\r\n            private breadcrumbs: Breadcrumbs[] = ClientAreaInvoicesListTemplate.BreadcrumbsInfo;\r\n\r\n            private currentLang: any;\r\n            italianLang = {\r\n                \"sProcessing\": \"Attendere...\",\r\n                \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n                \"sZeroRecords\": \"Niente trovato\",\r\n                \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n                \"sInfoEmpty\": \"Non ci sono record\",\r\n                \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n                \"sInfoPostFix\": \"\",\r\n                \"sUrl\": \"\",\r\n                \"oPaginate\": {\r\n                    \"sPrevious\": \"«\",\r\n                    \"sNext\": \"»\"\r\n                }\r\n            }\r\n\r\n            englishLang = {\r\n                \"oPaginate\": {\r\n                    \"sPrevious\": \"«\",\r\n                    \"sNext\": \"»\"\r\n                }\r\n            }\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.columns = [\r\n                    { title: this.translateTableColumnTitle(\"OrderNumberInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"InvoiceNumberInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"CreationDateInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"TotalPriceInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"DocumentTypeInvoice\") },\r\n                    { title: this.translateTableColumnTitle(\"Download\") }\r\n                ];\r\n\r\n                //getting of Datatable data\r\n                this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n                this.load = false;\r\n              \r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                if (this.shortLang == 'it') {\r\n                    this.currentLang = this.italianLang;\r\n                }\r\n                else {\r\n                    this.currentLang = this.englishLang;\r\n                }\r\n\r\n                //initialization of datatable\r\n                $('#datatable').DataTable({\r\n                    searching: false,\r\n                    ordering: false,\r\n                    sDom: 'Rlfrtlip',\r\n                    oLanguage: this.currentLang\r\n                });\r\n\r\n                //hiding of first 'per page' section, because we added it on the bottom of the table\r\n                $('.dataTables_length').not(':eq(1)').hide();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            getInvoicesList(userId: string, orderNumber: string, invoiceNumber: string, documentType: string) {\r\n                let showAll = \"-1\";\r\n                this.load = true;\r\n                let invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, orderNumber, invoiceNumber, documentType)\r\n                    .subscribe(result => {\r\n                        this.rows = result.ClientAreaInvoicesList;\r\n                        this.load = false;\r\n\r\n                        this.resetTable(this.rows);\r\n                    })\r\n\r\n                this.subManager.add(invoicesSub);\r\n            }\r\n\r\n            //destroying of current context of table and creating a new one with new data\r\n            resetTable(tableData) {\r\n                $('#datatable').DataTable().destroy();\r\n                let currentLang = this.currentLang;\r\n                setTimeout(function () {\r\n                    $('#datatable').DataTable\r\n                        (\r\n                            {\r\n                                data: this.rows,\r\n                                searching: false,\r\n                                ordering: false,\r\n                                sDom: 'Rlfrtlip',\r\n                                oLanguage: currentLang\r\n                            }\r\n                        );\r\n                }, 0);\r\n\r\n                setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide() }, 0);\r\n            }\r\n\r\n            resetFilter() {\r\n                this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n                this.orderNumber = \"\";\r\n                this.invoiceNumber = \"\";\r\n                this.documentTypeSelect = \"-1\";\r\n                this.resetTable(this.rows);\r\n            }\r\n\r\n            filterInvoicesList() {\r\n                let showAll = \"-1\";\r\n                let userId = this.authService.GetUserId();\r\n\r\n                //checking if inputs for filtering are empty, if they are, set them to \"show all\", which is '-1' value\r\n                let filterOrderNumber = this.orderNumber != \"\" ? this.orderNumber : showAll;\r\n                let filterInvoiceNumber = this.invoiceNumber != \"\" ? this.invoiceNumber : showAll;\r\n\r\n                //if all fields are empty, then don't send request to a server, but set rows value to start\r\n                if (filterOrderNumber == showAll && filterInvoiceNumber == showAll && this.documentTypeSelect == showAll) {\r\n                    this.resetFilter();\r\n                }\r\n                else {\r\n                    this.getInvoicesList(userId, filterOrderNumber, filterInvoiceNumber, this.documentTypeSelect);\r\n                }\r\n            }\r\n            getClassforMenuClientArea()\r\n            {\r\n              let result;\r\n              if(this.isActiveInvoicesModule&&this.isCatalogPrivateActive)\r\n              {\r\n                result=\"col-md-3 col-sm-3\"\r\n              }\r\n              else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                result = \"col-md-3 col-sm-3\"\r\n              }\r\n              else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                result = \"col-md-4 col-sm-4\"\r\n              }\r\n              return result\r\n            }\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-invoices.component.ts","import { Injectable, ViewContainerRef, Compiler, NgModule, ComponentRef, ComponentFactory } from \"@angular/core\";\r\nimport { SharedModule } from \"../../shared/shared.module\";\r\nimport { CacheService } from \"./cache.service\";\r\n\r\n\r\n@Injectable()\r\nexport class ComponentHelperService {\r\n    constructor(\r\n        private cache: CacheService\r\n    ) { }\r\n\r\n    cmpRef: ComponentRef<any> | null;\r\n    compFactory: ComponentFactory<any> | null;\r\n    //Inject a component in the viewContainer\r\n    injectComponent(compiler: Compiler, containterRef: ViewContainerRef, componentToInject: any) {\r\n\r\n        @NgModule({\r\n            imports: [SharedModule],\r\n            declarations: [componentToInject]\r\n        })\r\n\r\n        class DynamicModule { }\r\n\r\n        compiler.compileModuleAndAllComponentsAsync(DynamicModule)\r\n            .then((moduleWithFactories) => {\r\n                this.compFactory = moduleWithFactories.componentFactories.find(x => x.componentType === componentToInject);\r\n\r\n                //from v5 - slow and brings in a lot of code. This line of code affects ram performance negatively\r\n                //https://angular.io/api/core/ReflectiveInjector\r\n                //const injector = ReflectiveInjector.fromResolvedProviders([], containterRef.parentInjector);\r\n\r\n                //Clearing current content before injecting new one\r\n                // containterRef.clear();\r\n\r\n                //containterRef.createComponent(compFactory, 0, injector);\r\n                this.cmpRef = containterRef.createComponent(this.compFactory, 0);\r\n\r\n                compiler.clearCache();\r\n                moduleWithFactories = null;\r\n            });\r\n    }\r\n\r\n    clearMemory() {\r\n        if (this.cmpRef) {\r\n            this.cmpRef.destroy();\r\n        }\r\n        this.compFactory = null;\r\n        this.cache.clearAll();\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/component-helper.service.ts","import { Injectable } from '@angular/core';\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { RoutesService } from \"./routes.service\";\r\n\r\n\r\n@Injectable()\r\nexport class BootboxService {\r\n\r\n  constructor(private translate: TranslateService,\r\n    private router: Router,\r\n    private routesService: RoutesService,\r\n    private activatedRoute: ActivatedRoute) {\r\n  }\r\n\r\n  i18nAlert(key: string, val: string = '') {\r\n\r\n    let mex = this.getLabel(key);\r\n    if (val == '') {\r\n      let procededToBuy = this.getLabel('continua_gli_acqisti');\r\n      let goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n\r\n      let res: boolean;\r\n      let bot = this;\r\n\r\n      bootbox.dialog({\r\n        message: mex,\r\n        backdrop: true,\r\n        buttons: {\r\n          confirm: {\r\n            label: procededToBuy\r\n          },\r\n          cancel: {\r\n            label: goToCart,\r\n            callback: function () {\r\n              bot.navigateToCart();\r\n            },\r\n            className: 'btn btn-primary'\r\n\r\n          }\r\n        }\r\n      });\r\n    }\r\n    else {\r\n      bootbox.alert({\r\n        message: mex,\r\n        backdrop: true,\r\n      });\r\n    }\r\n\r\n  }\r\n  alertReorderDone(key: string, val: string = '') {\r\n\r\n    let mex = this.getLabel(key);\r\n    if (val == '') {\r\n      let procededToBuy = this.getLabel('continua_gli_acqisti');\r\n      let goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n\r\n      let res: boolean;\r\n      let bot = this;\r\n\r\n      bootbox.dialog({\r\n        message: mex,\r\n        backdrop: true,\r\n        buttons: {\r\n          confirm: {\r\n            label: procededToBuy\r\n          },\r\n          cancel: {\r\n            label: goToCart,\r\n            callback: function () {\r\n              bot.navigateToCart();\r\n            },\r\n            className: 'btn btn-primary'\r\n\r\n          }\r\n        }\r\n      });\r\n    }\r\n    else {\r\n      bootbox.alert({\r\n        message: mex,\r\n        backdrop: true,\r\n      });\r\n    }\r\n\r\n  }\r\n  alertForRiorderFail(key: String) {\r\n    let mex = this.getLabel(key);\r\n\r\n    bootbox.alert({\r\n      message: mex,\r\n      backdrop: true,\r\n    });\r\n\r\n  }\r\n\r\n\r\n  navigateToCart() {\r\n    var Url = this.routesService.getRoutePath('CARRELLO')[0];\r\n    //this.router.navigate([Url]);\r\n    (window as any).open(Url, \"_self\");\r\n  }\r\n\r\n  getLabel(label) {\r\n    let message;\r\n\r\n    this.translate.get(label, this.translate).subscribe((res: string) => {\r\n      message = res;\r\n    });\r\n    return message;\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/bootbox.service.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute, Params } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { CookieService } from \"../../../../services/core/cookie/cookie.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n//Models\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessMessages } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaProcessingOrders } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessFile } from \"./../../../../models/settings/client-area\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//import * as moment from 'moment'\r\nimport { DomSanitizer, DOCUMENT } from \"@angular/platform-browser\";\r\nimport { Md5 } from 'ts-md5/dist/md5';\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { PaypalService } from \"../../../../services/core/paypal.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class ClientAreaOrderDetailsComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private templateService: TemplateService,\r\n            private route: ActivatedRoute,\r\n            private clientAreaService: ClientAreaService,\r\n            private cmsComponentService: CmsComponentService,\r\n            private authService: AuthService,\r\n            private router: Router,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    orderId: number;\r\n    clientArea: ClientAreaOrderDetails = new ClientAreaOrderDetails();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n\r\n        let subComponentTemplateUrl: string;\r\n        let orderId: number = 0;\r\n        let orderRowId: number = 0;\r\n\r\n        let paramsSub = this.route.params.subscribe(params => {\r\n            let templateHtml: string;\r\n            let id = params['id'];\r\n            let header: any;\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                header = result;\r\n                let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                    if (result1.Categories) {\r\n                        header.Categories = result1.Categories;\r\n\r\n                    }\r\n                });\r\n                this.subManager.add(SideMenuData);\r\n            });\r\n            this.subManager.add(headDataSub);\r\n            if (id !== undefined) {\r\n                orderId = id;\r\n                let UserId = this.authService.GetUserId();\r\n\r\n\r\n                let orderIdSub = this.clientAreaService.getClientAreaOrderDetails(UserId, orderId).subscribe(result => {\r\n\r\n                    templateHtml = result;\r\n                    //Creating subcomponent whith the selected template to inject\r\n                    let subComponent = this.createSubComponent(templateHtml, orderId, header);\r\n                    //injecting created component (OK)\r\n                    this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n                });\r\n\r\n                this.subManager.add(orderIdSub);\r\n            }\r\n            else {\r\n                let orderNotFoundSub = this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(result => {\r\n                    templateHtml = result;\r\n                    //Creating subcomponent whith the selected template to inject\r\n                    let subComponent = this.createSubComponent(templateHtml, orderId, header)\r\n                    //injecting created component (OK)\r\n                    this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n                });\r\n\r\n                this.subManager.add(orderNotFoundSub);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(paramsSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(template: any, orderId: number, header: any) {\r\n        @Component({\r\n            template: template.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private clientAreaService: ClientAreaService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    @Inject('CookieService') private cookie: CookieService,\r\n                    private router: Router,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    private sanitizer: DomSanitizer,\r\n                    private messagesService: MessagesService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private seoService: SeoService,\r\n                    public currency: CurrencyService,\r\n                    private translateService: TranslateService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private paypalService: PaypalService,\r\n                    private mappings: Mappings,\r\n                    private scriptService: ScriptService\r\n                ) { }\r\n\r\n            private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n            private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n            private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n            private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n            private isActiveInvoicesModule: boolean = template.isActiveInvoicesModule;\r\n            private isCatalogPrivateActive: boolean = template.isCatalogPrivateActive;\r\n            model = {\r\n                ProcessOrder: \"\",\r\n                processingSubject: \"\",\r\n                Description: \"\"\r\n            };\r\n\r\n            footerData: any = template.footerData;\r\n            headerData: any = header;\r\n\r\n            clientArea: ClientAreaOrderDetails = new ClientAreaOrderDetails();\r\n            public selectedTipoSpedizione: string = \"\";\r\n            private clientAreaList: Array<ClientAreaOrderProcessFile> = new Array<ClientAreaOrderProcessFile>();\r\n            private userLogin = UserLogin;\r\n            private orderProcessMessageList: ClientAreaOrderProcessMessages[] = [];\r\n            private message: ClientAreaProcessingOrders = new ClientAreaProcessingOrders();\r\n            private lang: string = this.languageService.getLongLang();\r\n            private authentication = this.authService.GetData();\r\n            private userName = this.authentication.username;\r\n            private userId = this.authService.GetUserId();\r\n            private idord: ClientAreaProcessingOrders = new ClientAreaProcessingOrders();\r\n            private upload: string = \"\";\r\n            private info: string = \"active\";\r\n            private comunicazioni: string = \"\";\r\n            private paymentCompleteUrl: string;\r\n            private criptedOrderID: any;\r\n            private mdCripted: any;\r\n            private noMessages: boolean = false;\r\n            private checkValues: boolean = false;\r\n            private waitingDetails: boolean = false;\r\n            private pageIsInit: boolean = false;\r\n            private pageIsAfterViewInit: boolean = false;\r\n            private showSpinnerClick: boolean = false;\r\n\r\n            //checking if multiple shipment module is active\r\n            private multipleShipmentActive: boolean = template.isActiveMultipleShipment;\r\n            private isTipologiaPagamentoBonifico = template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico ? template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico : false;\r\n            private numeroTrnInvalid: boolean = false;\r\n            private numeroCroInvalid: boolean = false;\r\n            private startTrnValue: string = template.ClientAreaOrderDetails.BonificoTrn;\r\n            private startCroValue: string = template.ClientAreaOrderDetails.BonificoCro;\r\n            private bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(template.BonificoUploadUrl);\r\n            private bonificoUploadedFiles: string[] = template.ClientAreaOrderDetails.BonificoUploadedFilesNames;\r\n            private breadcrumbs: Breadcrumbs[] = template.BreadcrumbsInfo;\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                if (this.breadcrumbs != null) {\r\n                    var len = this.breadcrumbs.length;\r\n                    let nameLast = this.breadcrumbs[len - 1].BreadcrumbName;\r\n                    let translatedName = this.translateTableColumnTitle(nameLast);\r\n                    this.breadcrumbs[len - 1].BreadcrumbName = translatedName;\r\n                }\r\n\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                this.waitingDetails = false;\r\n\r\n                //if user from the page order list clicked on email\r\n                let routeParamsSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n                    if (params[\"pagefrom\"] == \"section_upload\") {\r\n                        this.upload = \"active\";\r\n                        this.info = \"\";\r\n                        this.comunicazioni = \"\";\r\n                    }\r\n                    else if (params[\"pagefrom\"] == \"section_comunicazioni\") {\r\n                        this.comunicazioni = \"active\";\r\n                        this.upload = \"\";\r\n                        this.info = \"\";\r\n                        let orderId = params[\"id\"];\r\n                        this.setMessagesAsRead(orderId)\r\n                    }\r\n\r\n                    this.waitingDetails = true;\r\n                    this.clientArea = template.ClientAreaOrderDetails;\r\n\r\n                    this.clientArea.CurrencyCode = \"EUR\";\r\n                    let language = this.languageService.getShortLang();\r\n\r\n                    //cripted orderID with Md5\r\n                    this.criptedOrderID = Md5.hashStr(this.clientArea.OrderId.toString());\r\n\r\n                    if (this.clientArea.OrderNoteList.length > 0) {\r\n                        this.noMessages = false;\r\n                    }\r\n                    else {\r\n                        this.noMessages = true;\r\n                    }\r\n\r\n                    //url that the user will be redirected to after paying of order via paypal\r\n                    this.paymentCompleteUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n                    let paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n\r\n                    this.paymentCompleteUrl = paymentUrl.replace('{lang}', language);\r\n                    if (this.clientArea.NexiModel != null) {\r\n\r\n                        if (this.clientArea.NexiModel.url_back_dettaglioOrdine != null) {\r\n                            this.clientArea.NexiModel.url_back_dettaglioOrdine = this.clientArea.NexiModel.url_back_dettaglioOrdine.replace('{lang}', language);\r\n                        }\r\n                    }\r\n                    //getting of link for upload files on order details page\r\n                    for (let process of this.clientArea.ProcessingOrderList) {\r\n                        process.FileUploadSecuredUrl = this.sanitizer.bypassSecurityTrustResourceUrl(process.FileUploadUrl);\r\n                        process.PreflightUploadSecuredUrl = this.sanitizer.bypassSecurityTrustResourceUrl(process.PreflightUploadUrl);\r\n                    }\r\n                })\r\n\r\n                this.subManager.add(routeParamsSub);\r\n\r\n                if (this.clientArea.TrackingUrl != '' && this.clientArea.TrackingUrl != null) {\r\n                    if (this.clientArea.TrackingUrl.indexOf(\"http://\") == -1 && this.clientArea.TrackingUrl.indexOf(\"https://\") == -1) {\r\n                        this.clientArea.TrackingUrl = \"http://\" + this.clientArea.TrackingUrl;\r\n                    }\r\n                }\r\n                this.checkTipoSpedizione();\r\n            }\r\n            checkTipoSpedizione() {\r\n                var tipoSped = this.clientArea.ProcessingOrderList.filter((item, i, arr) => arr.findIndex((t) => t.TipoTrasporto === item.TipoTrasporto) === i);\r\n                var TipoTrasportoShipmentToFilter = \"S\";\r\n                if (tipoSped.length == 1) {\r\n                    TipoTrasportoShipmentToFilter = tipoSped[0].TipoTrasporto;\r\n                }\r\n                if (this.selectedTipoSpedizione == \"\") {\r\n                    this.selectedTipoSpedizione = TipoTrasportoShipmentToFilter;\r\n                }\r\n            }\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //changing style of status bar(under detail order number) depending on multiple shipment module\r\n                if (this.multipleShipmentActive == true) {\r\n                    $(\"#paymentStatusBar\").addClass('col-md-5').addClass('tabs-style').removeClass('col-md-3').removeClass('tabs-styleNoAfter');\r\n                }\r\n                else {\r\n                    $(\"#paymentStatusBar\").addClass('col-md-3').addClass('tabs-styleNoAfter').removeClass('col-md-5').removeClass('tabs-style');\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngAfterViewInit(): void {\r\n                if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n                    return;\r\n                }\r\n                if (this.clientArea.PaymentType == 'BancaSella' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00') {\r\n                    axerve.lightBox.shop = this.clientArea.BancaSellaModel.payload.shopId;\r\n                }\r\n                //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n                if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n                    && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n                    let userId = this.authService.GetUserId();\r\n                    let params = {\r\n                        CustomerId: userId.toString(),\r\n                        OrderId: orderId.toString(),\r\n                        Lang: this.lang,\r\n                    };\r\n\r\n                    //-- Load paypal service and render a button for paypal payment\r\n                    this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url,\r\n                        this.mappings.Web_Api_Create_Paypal_Payment,\r\n                        this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n                }\r\n\r\n                this.pageIsAfterViewInit = true;\r\n            }\r\n\r\n            confirmBonificoDetails() {\r\n\r\n                // trim value before sending it to a server\r\n                this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.updateBonificoPaymentDetails(orderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n                    .subscribe(x => {\r\n                        this.startTrnValue = this.clientArea.BonificoTrn;\r\n                        this.startCroValue = this.clientArea.BonificoCro;\r\n                        //hiding of loading panel after we get all data we need\r\n                        this.routesService.hidePageLoader();\r\n                        this.hideBonificoModal();\r\n                    },\r\n                        err => {\r\n                            this.clientArea.BonificoTrn = this.startTrnValue;\r\n                            this.clientArea.BonificoCro = this.startCroValue;\r\n                        });\r\n            }\r\n\r\n            // validate NumeroTrn input\r\n            checkNumeroTrn(inputText: any) {\r\n                inputText = inputText.trim();\r\n                if (inputText.length < 31) {\r\n                    this.numeroTrnInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroTrnInvalid = true;\r\n                }\r\n            }\r\n\r\n            // validate NumeroCro input\r\n            checkNumeroCro(inputNumber: any) {\r\n                if (inputNumber < 99999999999) {\r\n                    this.numeroCroInvalid = false;\r\n                }\r\n                else {\r\n                    this.numeroCroInvalid = true;\r\n                }\r\n            }\r\n\r\n            // getting uploaded files for this order and showing it inside of bonifico modal\r\n            getBonificoUploadedFiles() {\r\n                //showing of loading panel after we get all data we need\r\n                this.routesService.showPageLoader();\r\n                this.clientAreaService.getBonificoUploadedFiles(orderId).subscribe(x => {\r\n                    this.bonificoUploadedFiles = x;\r\n                    //hiding of loading panel after we get all data we need\r\n                    this.routesService.hidePageLoader();\r\n                })\r\n            }\r\n\r\n            showBonificoModal() {\r\n                $(\"#bonificoModal\").modal(\"show\");\r\n            }\r\n\r\n            hideBonificoModal() {\r\n                $(\"#bonificoModal\").modal(\"hide\");\r\n\r\n                this.clientArea.BonificoTrn = this.startTrnValue;\r\n                this.clientArea.BonificoCro = this.startCroValue;\r\n            }\r\n\r\n            //translating of header columns titles\r\n            translateTableColumnTitle(columnTitle) {\r\n                let translation = this.translateService.get(columnTitle)[\"value\"];\r\n                return translation;\r\n            }\r\n\r\n            payWithPaypal() {\r\n                let paypalText = \"pay_with_paypal\";\r\n                let translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n                let formHtml = '<form ngNoForm action=\\\"' + this.clientArea.GatewayUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"paypalForm\" id=\\'paypalForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">' +\r\n                    '<input type=\"hidden\" name=\"business\"  value=\\\"' + this.clientArea.GatewayAccount + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_name\"  value=\\\"' + this.clientArea.OrderNumber + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"currency_code\" value=\\\"' + this.clientArea.CurrencyCode + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"amount\" value=\\\"' + this.clientArea.TotalCost + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"item_number\"  value=\\\"' + this.clientArea.OrderId + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"return\" value=\\\"' + this.paymentCompleteUrl + '\\\">' +\r\n                    '<input type=\"hidden\" name=\"rm\" value=\"2\">' +\r\n\r\n                    '<button (click)=\"payWithPaypal()\" class=\"btn btn-primary btn-lg\" type=\"button\" id=\"paypal-button-container\" name=\"paypal-button-container\">' +\r\n                    '<i class=\"fa fa-credit-card\"></i> ' + translatePaypal +\r\n                    '</button>' +\r\n                    '</form>';\r\n\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                let completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n\r\n                $('#paypalForm').submit();\r\n            }\r\n\r\n            payWithNexi() {\r\n                let NexiForm = $(\"#completeNexiFormId\").html()\r\n                let NexiText = \"pay_with_nexi\";\r\n                let translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n                let formHtml = '<form ngNoForm action=\\\"' + this.clientArea.NexiModel.requestUrl + '\\\" method=\"post\" target=\"_top\" class=\"m0\" name=\"nexiForm\" id=\\'nexiForm\\'>' +\r\n                    '<input type=\"hidden\" name=\"alias\"  value=\\\"' + this.clientArea.NexiModel.alias + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"importo\"  value=\\\"' + this.clientArea.NexiModel.importo + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"divisa\"  value=\\\"' + this.clientArea.NexiModel.divisa + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"codTrans\" value=\\\"' + this.clientArea.NexiModel.codTrans + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url\" value=\\\"' + this.clientArea.NexiModel.url + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"url_back\"  value=\\\"' + this.clientArea.NexiModel.url_back_ultimoStepCarrello + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"mac\" value=\\\"' + this.clientArea.NexiModel.mac + '\\\"/>' +\r\n                    '<input type=\"hidden\" name=\"tipo_servizio\" value=\"paga_1click\"/>' +\r\n                    '<input type=\"hidden\" name=\"num_contratto\" value=\\\"' + this.clientArea.NexiModel.num_contratto + '\\\"/>';\r\n                if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n                    formHtml += '<input type=\"hidden\" name=\"gruppo\" value=\\\"' + this.clientArea.NexiModel.gruppo + '\\\"/>';\r\n                }\r\n                formHtml += '</form>' + NexiForm;\r\n                // formHtml += '</form> <button (click)=\"payWithNexi()\" class=\"btn btn-primary btn-lg w100\" type=\"button\" id=\"nexi-button-container\" name=\"nexi-button-container\">' +\r\n                // '<i class=\"fa fa-credit-card\"></i> ' + translateNexi +\r\n                // '</button>';\r\n                //replacing form with values from field because of security reasons - if somebody change html content\r\n                let completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n\r\n                $('#nexiForm').submit();\r\n            }\r\n            payWithBancaSella() {\r\n                axerve.lightBox.open(this.clientArea.BancaSellaModel.payload.paymentID, this.clientArea.BancaSellaModel.payload.paymentToken, this.callback);\r\n            }\r\n            callback(result) {\r\n                if (result.responseURL != null && result.responseURL != undefined && result.responseURL != \"\") {\r\n                    (window as any).open(result.responseURL, \"_self\");\r\n                }\r\n            }\r\n            setMessagesAsRead(orderId) {\r\n                let userId = this.authService.GetUserId();\r\n\r\n                let params = {\r\n                    CustomerId: userId.toString(),\r\n                    OrderId: orderId.toString(),\r\n                    Lang: this.lang\r\n                };\r\n\r\n                this.messagesService.setMessagesAsRead(params);\r\n            }\r\n\r\n            showModal() {\r\n                $(\"#confirmModal\").modal(\"show\");\r\n            }\r\n\r\n            hideModal() {\r\n                $('#confirmModal').modal('hide');\r\n            }\r\n\r\n            //Canceling of orders with status in coda\r\n            cancelOrders() {\r\n                let userId = this.userId;\r\n\r\n                let cancelOrdSub = this.clientAreaService.cancelOrders(userId, orderId)\r\n                    .subscribe(response => {\r\n                        if (response == true) {\r\n                            this.clientArea.Status = 4;\r\n                        }\r\n                    });\r\n\r\n                this.subManager.add(cancelOrdSub);\r\n\r\n                this.hideModal();\r\n            }\r\n\r\n            isDisabled(form) {\r\n                let res: boolean = false;\r\n\r\n                if (form.valid && this.model.ProcessOrder !== \"\") {\r\n                    return true;\r\n                }\r\n\r\n                else {\r\n                    return res;\r\n                }\r\n            }\r\n\r\n            //sending of the message from the order details order\r\n            processMessage() {\r\n                this.showSpinnerClick = true;\r\n                let postMessageSub = this.clientAreaService.postClientAreaSendProcessOrderMessageint(this.userId, orderId, parseInt(this.model.ProcessOrder), this.clientArea.OrderNumber, this.clientArea.UserCreated, this.model.processingSubject, this.model.Description, this.lang)\r\n                    .subscribe(result => {\r\n                        if (this.clientArea.OrderProcessMessageList == undefined || this.clientArea.OrderProcessMessageList == null) {\r\n                            this.clientArea.OrderProcessMessageList = [];\r\n                        }\r\n                        this.clientArea.OrderProcessMessageList.push\r\n                            (\r\n                                new ClientAreaOrderProcessMessages(), { \"CreatedBy\": this.clientArea.UserCreated, \"StringDateCreated\": result, \"Description\": this.model.Description, \"From\": 2, \"Subject\": this.model.processingSubject }\r\n                            )\r\n\r\n                        this.noMessages = false;\r\n                        this.checkValues = false\r\n                        this.model.ProcessOrder = \"\";\r\n                        this.model.processingSubject = \"\";\r\n                        this.model.Description = \"\";\r\n                        this.showSpinnerClick = false;\r\n\r\n                    });\r\n\r\n                this.subManager.add(postMessageSub);\r\n            }\r\n\r\n            refreshProcessFiles(process) {\r\n                let processFilesSub = this.clientAreaService.getProcessOrderFiles(process.Id, orderId).subscribe(result => {\r\n                    result.ListOfFiles.forEach(element => {\r\n                        if (element.Size.endsWith(\"byte\")) {\r\n                            element.Size = element.Size.substring(0, element.Size.length - 3);\r\n                        }\r\n                    });\r\n\r\n                    process.FileState = result.FileState;\r\n                    process.Files = result.ListOfFiles;\r\n                });\r\n\r\n                this.subManager.add(processFilesSub);\r\n            }\r\n            getClassforMenuClientArea() {\r\n                let result;\r\n                if (this.isActiveInvoicesModule && this.isCatalogPrivateActive) {\r\n                    result = \"col-md-3 col-sm-3\"\r\n                }\r\n                else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                    result = \"col-md-3 col-sm-3\"\r\n                }\r\n                else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                    result = \"col-md-4 col-sm-4\"\r\n                }\r\n                return result\r\n            }\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-order-details.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\nimport { ValidationService } from './../../../../services/core/validation.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, EventEmitter, Output, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Models\r\nimport { ClientAreaUserProfile } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaUserAddress } from \"./../../../../models/settings/client-area\";\r\nimport { Register } from \"./../../../../models/cms/register\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\nexport class ClientAreaProfileComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private clientAreaService: ClientAreaService,\r\n        private router: Router,\r\n        private authService: AuthService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    private authentication: any = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.authService.GetData().isAuthenticated) {\r\n            this.router.navigate([\"\"]);\r\n        }\r\n        let templateHtmlUserProfile: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(result => {\r\n\r\n            templateHtmlUserProfile = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(templateHtmlUserProfile, header);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n        })\r\n\r\n        this.subManager.add(userProfileSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(userProfile: any, header: any) {\r\n        @Component({\r\n            template: userProfile.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private clientAreaService: ClientAreaService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private seoService: SeoService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private validationService: ValidationService,\r\n                    private scriptService: ScriptService\r\n                ) { }\r\n\r\n            @Output() onCreate = new EventEmitter();\r\n\r\n            model = {\r\n                UserId: 0,\r\n                Address: \"\",\r\n                City: \"\",\r\n                Prov: \"\",\r\n                Cap: \"\",\r\n                CompanyName: \"\",\r\n                Piva: \"\",\r\n                TaxCode: \"\",\r\n                Name: \"\",\r\n                SubName: \"\",\r\n                Telephone: \"\",\r\n                Mobile: \"\",\r\n                CF: \"\",\r\n                PecEmail: \"\",\r\n                CodiceDestinatario: \"\",\r\n                CurrentPassword: \"\",\r\n                Password: \"\",\r\n                PasswordRepeat: \"\",\r\n                AddressRadio: \"\",\r\n                Language: \"\",\r\n                AddressNumber: \"\",\r\n                DefaultAddress: 999999\r\n            }\r\n\r\n            modelAddAndRemoveAddress = {\r\n                UserId: \"\",\r\n                AddressId: \"\"\r\n            }\r\n\r\n            footerData: any = userProfile.footerData;\r\n            headerData: any = header;\r\n\r\n            private clientAreaProfile: ClientAreaUserProfile = new ClientAreaUserProfile();\r\n            private addresses: ClientAreaUserAddress[] = [];\r\n            private clientAddress: ClientAreaUserAddress = new ClientAreaUserAddress();\r\n            private company: Company = new Company();\r\n            private register: Register = new Register();\r\n            private authentication: any = this.authService.GetData();\r\n            private updateSuccessful: boolean;\r\n            private updateFailed: boolean;\r\n            private updateAddressFailed: boolean;\r\n            private updateAddressSuccessful: boolean;\r\n            private changePasswordSuccessful: boolean;\r\n            private changePasswordFailed: boolean;\r\n            private id1: number;\r\n            private isExist: boolean[] = [];\r\n            private index: number;\r\n            private item: any;\r\n            private pageIsInit: boolean = false;\r\n            private userId = this.authService.GetUserId();\r\n            private decryptedUserId = this.authService.GetDecryptedUserId();\r\n            private user = userProfile.ClientAreaUserProfile;\r\n            private userGroup: any = this.user.UserGroup;\r\n            private showSpinnerClick: boolean = false;\r\n\r\n            private breadcrumbs: Breadcrumbs[] = userProfile.BreadcrumbsInfo;\r\n\r\n            private pageIsOnDestroy: boolean = false;\r\n            private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n            private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n            private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n            private areaClientiCatalogoRiservato: string[] = this.routesService.getRoutePath('RESERVED - CATALOG');\r\n            private isActiveInvoicesModule: boolean = userProfile.isActiveInvoicesModule;\r\n            private isCatalogPrivateActive: boolean = userProfile.isCatalogPrivateActive;\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                this.clientAreaProfile = this.user;\r\n\r\n                //spliting address street and number\r\n                let address = this.clientAreaProfile.Address;\r\n                let lastIndex = -1;\r\n                if (address) {\r\n                    lastIndex = address.lastIndexOf(\" \");\r\n                }\r\n                let addressStreet: string = \"\";\r\n                let addressNumber: string = \"\";\r\n\r\n                if (lastIndex > -1) {\r\n                    addressStreet = address.slice(0, lastIndex);\r\n                    addressNumber = address.slice(lastIndex, address.length).trim();\r\n                }\r\n\r\n                this.model.CompanyName = this.user.CompanyName;\r\n                this.model.Piva = this.user.Piva;\r\n                this.model.TaxCode = this.user.TaxCode;\r\n                this.model.Name = this.user.ContactFirstName;\r\n                this.model.SubName = this.user.ContactLastName;\r\n                this.model.Address = addressStreet;\r\n                this.model.AddressNumber = addressNumber;\r\n                this.model.City = this.user.City;\r\n                this.model.Prov = this.user.AreaCode;\r\n                this.model.Cap = this.user.ZipCode;\r\n                this.model.Telephone = this.user.ContactPhone;\r\n                this.model.DefaultAddress = this.user.DefaultAddressId;\r\n                this.model.Mobile = this.user.ContactMobile;\r\n                this.model.PecEmail = this.user.PecEmail;\r\n                this.model.CodiceDestinatario = this.user.CodiceDestinatario;\r\n\r\n                this.id1 = this.user.DefaultAddressId;\r\n\r\n                for (var key in this.clientAreaProfile.Addresses) {\r\n                    this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n                }\r\n\r\n                // if user group is 4, pec email and cod. destinatario are not required\r\n                if (this.userGroup == 4) {\r\n\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                if (userProfile.isActiveAddressVerificationModule) {\r\n                    let addressVerificationKey = userProfile.AddressVerificationCode;\r\n                    if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n                        this.addAddressVerificationScripts(addressVerificationKey);\r\n                        $(\"#Cap\").prop('disabled', true);\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#Cap\").prop('disabled', false);\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            isCodDestRequired() {\r\n                let retVal = false;\r\n                if (this.userGroup != \"4\") {\r\n                    if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n            isPecEmailRequired() {\r\n                let retVal = false;\r\n                if (this.userGroup != \"4\") {\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n            //adding all scripts and elements connected to address verification feature                \r\n            addAddressVerificationScripts(addressKey: string) {\r\n                let suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n                let address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n                let jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n\r\n                $('body > universal-script').before(suggest);\r\n                $('body > universal-script').before(jquery);\r\n                $('body > universal-script').before(address);\r\n            }\r\n\r\n\r\n            //removing all scripts and elements connected to address verification feature                            \r\n            removeAddressVerificationScripts(addressKey: string) {\r\n                $(\"#suggestId\").remove();\r\n                $(\"#jqueryuicss\").remove();\r\n                $(\"#jqueryuijs\").remove();\r\n                $(\"#suggestcss\").remove();\r\n                $(\"#initui\").remove();\r\n                $(\"#inituicf\").remove();\r\n                $(\"#ui-id-1\").remove();\r\n                $(\"#ui-id-2\").remove();\r\n                $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n                $(\"#jqueryId\").remove();\r\n                $(\"#addressVerificationId\").remove();\r\n            }\r\n\r\n            checkAddressValidation() {\r\n                this.model.Prov = $(\"#Prov\").val();\r\n                this.model.Cap = $(\"#Cap\").val();\r\n                this.model.City = $(\"#City\").val();\r\n            }\r\n\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            validatePhone(event: any) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            }\r\n\r\n            setAddressValue() {\r\n                let streetTypeId = $(\"#streetTypeId\").val();\r\n                let street = $(\"#Address\").val();\r\n\r\n                if (streetTypeId != null && streetTypeId != \"\") {\r\n                    this.model.Address = streetTypeId + \" \" + street;\r\n                }\r\n                else {\r\n                    this.model.Address = street;\r\n                }\r\n\r\n                let cap = $(\"#Cap\").val();\r\n                this.model.Cap = cap;\r\n            }\r\n\r\n            changeUserProfile(valid, model) {\r\n                model.UserId = this.authService.GetUserId();\r\n\r\n                let street = this.model.Address;\r\n\r\n                //concating of address street and number to one model field\r\n                this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n                this.showSpinnerClick = true;\r\n                let updateProfileSub = this.clientAreaService.updateUserProfile(model).subscribe(result => {\r\n                    if (result) {\r\n                        // show success message\r\n                        this.updateSuccessful = true;\r\n                        this.updateFailed = false;\r\n                    }\r\n                    else {\r\n                        // show error message\r\n                        this.updateSuccessful = false;\r\n                        this.updateFailed = true;\r\n                    }\r\n\r\n                    this.model.Address = street;\r\n                    this.showSpinnerClick = false;\r\n                });\r\n                this.subManager.add(updateProfileSub);\r\n            };\r\n\r\n            showModal(index, item) {\r\n                $(\"#editProfileModal\").modal(\"show\");\r\n                this.index = index;\r\n                this.item = item;\r\n            }\r\n\r\n            hideModal() {\r\n                $('#editProfileModal').modal('hide');\r\n            }\r\n\r\n            addNewAddress() {\r\n                this.modelAddAndRemoveAddress.UserId = this.userId;\r\n\r\n                let newAddressSub = this.clientAreaService.addNewAddress(this.modelAddAndRemoveAddress).subscribe(result => {\r\n                    this.clientAreaProfile.Addresses.push(result);\r\n\r\n                    let userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(result => {\r\n                        this.clientAreaProfile = result.ClientAreaUserProfile;\r\n                        this.model.CompanyName = result.ClientAreaUserProfile.CompanyName;\r\n                        this.model.Piva = result.ClientAreaUserProfile.Piva;\r\n                        this.model.TaxCode = result.ClientAreaUserProfile.TaxCode;\r\n                        this.model.Name = result.ClientAreaUserProfile.ContactFirstName;\r\n                        this.model.SubName = result.ClientAreaUserProfile.ContactLastName;\r\n                        this.model.Address = result.ClientAreaUserProfile.Address;\r\n                        this.model.City = result.ClientAreaUserProfile.City;\r\n                        this.model.Prov = result.ClientAreaUserProfile.AreaCode;\r\n                        this.model.Cap = result.ClientAreaUserProfile.ZipCode;\r\n                        this.model.Telephone = result.ClientAreaUserProfile.ContactPhone;\r\n                        this.model.DefaultAddress = result.ClientAreaUserProfile.DefaultAddressId;\r\n                        this.model.Mobile = result.ClientAreaUserProfile.ContactMobile;\r\n                        this.model.PecEmail = result.ClientAreaUserProfile.PecEmail;\r\n                        this.model.CodiceDestinatario = result.ClientAreaUserProfile.CodiceDestinatario;\r\n                        this.id1 = result.ClientAreaUserProfile.DefaultAddressId;\r\n\r\n                        for (var key in this.clientAreaProfile.Addresses) {\r\n                            this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n                        }\r\n                    });\r\n\r\n                    this.subManager.add(userProfileSub);\r\n                });\r\n\r\n                this.subManager.add(newAddressSub);\r\n            }\r\n\r\n            SubmitPassword(model) {\r\n                model.UserId = this.userId;\r\n                this.showSpinnerClick = true;\r\n                let updatePassSub = this.clientAreaService.updateUserPassword(model).subscribe(result => {\r\n                    if (result == true) {\r\n                        this.changePasswordSuccessful = true;\r\n                        this.changePasswordFailed = false;\r\n                    }\r\n                    else {\r\n                        // show error message\r\n                        this.changePasswordSuccessful = false;\r\n                        this.changePasswordFailed = true;\r\n                    }\r\n                    this.showSpinnerClick = false;\r\n                })\r\n\r\n                this.subManager.add(updatePassSub);\r\n            }\r\n\r\n            setDefaultAddress(index, item) {\r\n                this.clientAreaProfile.DefaultAddressId = 0;\r\n\r\n                for (var address of this.clientAreaProfile.Addresses) {\r\n                    if (address.AddressId === this.clientAreaProfile.Addresses[index].AddressId) {\r\n                        this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n                    }\r\n\r\n                    this.id1 = this.clientAreaProfile.DefaultAddressId;\r\n                }\r\n            };\r\n\r\n            resetAddress() {\r\n                for (var address of this.clientAreaProfile.Addresses) {\r\n                    this.clientAreaProfile.DefaultAddressId = 0;\r\n                    this.id1 = 0;\r\n                };\r\n            };\r\n\r\n            updateUserAddresses(model, valid, item) {\r\n                this.showSpinnerClick = true;\r\n                let updateAddressSub = this.clientAreaService.updateAddresses(this.clientAreaProfile.Addresses, this.userId, this.clientAreaProfile.DefaultAddressId)\r\n                    .subscribe(result => {\r\n                        let defaultFound = false;\r\n\r\n                        if (result) {\r\n                            for (var address of this.clientAreaProfile.Addresses) {\r\n                                if (this.clientAreaProfile.DefaultAddressId > 0) {\r\n                                    this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n                                    defaultFound = true;\r\n                                }\r\n                            }\r\n\r\n                            this.updateAddressFailed = false;\r\n                            this.updateAddressSuccessful = true;\r\n                        }\r\n                        else {\r\n                            this.updateAddressFailed = true;\r\n                            this.updateAddressSuccessful = false;\r\n                        }\r\n\r\n                        if (defaultFound == false) {\r\n                            this.clientAreaProfile.DefaultAddressId = 0;\r\n                        }\r\n                        this.showSpinnerClick = false;\r\n                    })\r\n\r\n                this.subManager.add(updateAddressSub);\r\n            };\r\n\r\n            removeAddress() {\r\n                this.modelAddAndRemoveAddress.UserId = this.userId;\r\n                this.modelAddAndRemoveAddress.AddressId = this.item.AddressId;\r\n\r\n                let removeAddressSub = this.clientAreaService.removeAddress(this.modelAddAndRemoveAddress).subscribe(result => {\r\n                    this.clientAreaProfile.Addresses.splice(this.index, 1);\r\n                    try {\r\n                        this.isExist[this.item.AddressId] = false;\r\n\r\n                        this.model.DefaultAddress = 0;\r\n                        this.id1 = 0;\r\n                        this.resetAddress();\r\n                        this.hideModal();\r\n                    }\r\n                    catch (exception) { }\r\n                });\r\n\r\n                this.subManager.add(removeAddressSub);\r\n            };\r\n\r\n            isDisabled(form) {\r\n                let res: boolean = false;\r\n\r\n                if (form.valid && this.model.Password.length >= 4 && this.model.Password.length <= 10 && this.model.Password == this.model.PasswordRepeat) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return res;\r\n                }\r\n            }\r\n            getClassforMenuClientArea()\r\n            {\r\n              let result;\r\n              if(this.isActiveInvoicesModule&&this.isCatalogPrivateActive)\r\n              {\r\n                result=\"col-md-3 col-sm-3\"\r\n              }\r\n              else if ((!this.isActiveInvoicesModule && this.isCatalogPrivateActive) || (this.isActiveInvoicesModule && !this.isCatalogPrivateActive)) {\r\n                result = \"col-md-3 col-sm-3\"\r\n              }\r\n              else if (!this.isActiveInvoicesModule && !this.isCatalogPrivateActive) {\r\n                result = \"col-md-4 col-sm-4\"\r\n              }\r\n              return result\r\n            }\r\n            ngOnDestroy() {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n\r\n                //this method is removing all scripts and elements connected to address verification feature\r\n                let addressVerificationKey = userProfile.AddressVerificationCode;\r\n                this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n                this.subManager.unsubscribe();\r\n                this.pageIsOnDestroy = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-profile.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"../../../../models/core/seo\";\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: ''\r\n})\r\n\r\nexport class PaymentBancaSellaConfirmationComponent implements OnInit {\r\n    data: any = {};\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private templateService: TemplateService,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let id = 0;\r\n        let Status = \"\";\r\n        let paramsSub = this.route.queryParams.subscribe(params => {\r\n            id = params['orderid'];\r\n            Status = params['Status'];\r\n        });\r\n\r\n        this.subManager.add(paramsSub);\r\n        let orderCheckout: any;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let thankYouSub = this.templateService.getThankYouBancaSellaInfo(\"orderBancaSellaPageTemplate\", id, Status).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(orderCheckout, id,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                let typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouNexiId, id);\r\n\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(thankYouSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject\r\n    private createSubComponent(orderCheckout: any, OrderId: any,header:any) {\r\n        @Component({\r\n            template: orderCheckout.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private routesService: RoutesService,\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    private languageService: LanguageService,\r\n                    private translate: TranslateService\r\n                ) { }\r\n\r\n            private success: boolean = false;\r\n            private errorMessage: string = \"\";\r\n            private failed: boolean = false;\r\n            private serverError: boolean = false;\r\n            private orderId: any = OrderId;\r\n            private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private createScript: number = 0;\r\n            subManager = new Subscription();\r\n\r\n            footerData: any = orderCheckout.FooterData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n\r\n                if (orderCheckout.result == false) {\r\n                    this.success = false;\r\n                    this.failed = true;\r\n                    this.serverError = false;\r\n                    this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n                    this.createScript = -1;\r\n                }\r\n                else {\r\n                    this.success = true;\r\n                    this.failed = false;\r\n                    this.serverError = false;\r\n                    this.createScript = 1;\r\n                }\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                return message;\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //Eventually retrieving the script to append\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-banca-sella-confirmation.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\nimport { Md5 } from 'ts-md5/dist/md5';\r\nimport { OrderPaymentService } from \"../../../../services/cms/order-payment.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: ''\r\n})\r\n\r\nexport class PaymentConfirmationComponent implements OnInit {\r\n    data: any = {};\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private templateService: TemplateService,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    private paramsObj: Object = {};\r\n    private isNewPaypalImplementation: boolean = false;\r\n\r\n    ngOnInit() {\r\n        let id = '0';\r\n        let orderCheckout: any;\r\n        let paramsSub = this.route.params.subscribe(params => {\r\n            id = params['orderid'] || 0;\r\n        });\r\n\r\n        let sub = this.route\r\n            .queryParams\r\n            .subscribe(params => {\r\n                if (id == '0') {\r\n                    id = params['orderId'] ? Md5.hashStr(params['orderId']).toString() : '0';\r\n                    this.isNewPaypalImplementation = true;\r\n                }\r\n                else {\r\n                    this.isNewPaypalImplementation = false;\r\n                }\r\n\r\n                this.paramsObj = params;\r\n            });\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let thankYouSub = this.templateService.getThankYouPagePaypalInfo(\"orderCheckoutPageTemplate\", id).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(orderCheckout, this.paramsObj, this.isNewPaypalImplementation, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                let typeId = '';\r\n\r\n                //-- Get Payment Confirmation row id + '_' + orderId, so we can use it for getting scripts\r\n                if (this.isNewPaypalImplementation) {\r\n                    let OrderId = this.paramsObj['orderId'];\r\n                    typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePaypalId, OrderId);\r\n                }\r\n                else {\r\n                    typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePaypalId, id);\r\n                }\r\n\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(paramsSub);\r\n        this.subManager.add(sub);\r\n        this.subManager.add(thankYouSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject\r\n    private createSubComponent(orderCheckout: any, urlParams: any, isNewPaypalImplementation: boolean, header: any) {\r\n        @Component({\r\n            template: orderCheckout.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private routesService: RoutesService,\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    private languageService: LanguageService,\r\n                    private orderPaymentService: OrderPaymentService,\r\n                    private route: ActivatedRoute\r\n                ) { }\r\n\r\n            private success: boolean = false;\r\n            private failed: boolean = false;\r\n            private serverError: boolean = false;\r\n            private orderId: any;\r\n            private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n            private encryptedOrder: any;\r\n            private hashedOrderId: any;\r\n            private pageIsInit: boolean = false;\r\n\r\n            subManager = new Subscription();\r\n            private createScript: number = 0;\r\n\r\n            footerData: any = orderCheckout.FooterData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n\r\n                //-- If paypal payment is implemented on new way, at this point, the order is already set as paid, else we need to set it\r\n                if (isNewPaypalImplementation) {\r\n                    this.orderId = urlParams['orderId'];\r\n\r\n                    if (urlParams.isError.toLowerCase() === 'true') {\r\n                        this.failed = true;\r\n                        this.success = false;\r\n                        this.serverError = false;\r\n                        this.createScript = -1;\r\n                    }\r\n                    else {\r\n                        this.failed = false;\r\n                        this.success = true;\r\n                        this.serverError = false;\r\n                        this.createScript = 1;\r\n                    }\r\n                }\r\n                else {\r\n                    let sub = this.route.queryParams.subscribe(parameters => {\r\n                        this.orderId = parameters['item_number'] || 0;\r\n\r\n                        this.hashedOrderId = Md5.hashStr(this.orderId);\r\n\r\n                        let paramsRouteSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n                            this.encryptedOrder = params['orderid'] || 0;\r\n                        });\r\n\r\n                        this.subManager.add(paramsRouteSub);\r\n\r\n                        //Checking of order and set it as paid\r\n                        if (parameters['st'] == \"Completed\" && this.encryptedOrder == this.hashedOrderId) {\r\n                            this.setOrderAsPaid();\r\n                        }\r\n                        else {\r\n                            this.failed = true;\r\n                            this.success = false;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n\r\n            setOrderAsPaid() {\r\n                let orderPaySub = this.orderPaymentService.setOrderAsPayed(this.orderId)\r\n                    .subscribe(result => {\r\n                        if (result == 1) {\r\n                            this.success = true;\r\n                            this.failed = false;\r\n                            this.serverError = false;\r\n                            this.createScript = 1;\r\n                        }\r\n                        else if (result == -1) {\r\n                            this.success = false;\r\n                            this.failed = true;\r\n                            this.serverError = false;\r\n                            this.createScript = -1;\r\n                        }\r\n                        else {\r\n                            this.success = false;\r\n                            this.failed = false;\r\n                            this.serverError = true;\r\n                            this.createScript = -1;\r\n                        }\r\n                    })\r\n\r\n                this.subManager.add(orderPaySub);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-confirmation.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: ''\r\n})\r\n\r\nexport class PaymentNexiConfirmationComponent implements OnInit {\r\n    data: any = {};\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private templateService: TemplateService,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let id = 0;\r\n        let messaggio = \"\";\r\n        let data = \"\";\r\n        let orario = \"\";\r\n\r\n        let paramsSub = this.route.queryParams.subscribe(params => {\r\n            id = params['orderid'];\r\n            messaggio = params['messaggio'];\r\n            data = params['data'];\r\n            orario = params['orario'];\r\n        });\r\n\r\n        this.subManager.add(paramsSub);\r\n        let orderCheckout: any;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let thankYouSub = this.templateService.getThankYouNexiInfo(\"ordernexiPageTemplate\", id, messaggio, data, orario).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n\r\n            if (this.isBrowser) {\r\n                orderCheckout = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(orderCheckout, id,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                let typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouNexiId, id);\r\n\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(thankYouSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject\r\n    private createSubComponent(orderCheckout: any, OrderId: any,header:any) {\r\n        @Component({\r\n            template: orderCheckout.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private routesService: RoutesService,\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    private languageService: LanguageService,\r\n                    private translate: TranslateService\r\n                ) { }\r\n\r\n            private success: boolean = false;\r\n            private errorMessage: string = \"\";\r\n            private failed: boolean = false;\r\n            private serverError: boolean = false;\r\n            private orderId: any = OrderId;\r\n            private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private createScript: number = 0;\r\n            subManager = new Subscription();\r\n\r\n            footerData: any = orderCheckout.FooterData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n\r\n                if (orderCheckout.result == false) {\r\n                    this.success = false;\r\n                    this.failed = true;\r\n                    this.serverError = false;\r\n                    this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n                    this.createScript = -1;\r\n                }\r\n                else {\r\n                    this.success = true;\r\n                    this.failed = false;\r\n                    this.serverError = false;\r\n                    this.createScript = 1;\r\n                }\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                return message;\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n                //Eventually retrieving the script to append\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-nexi-confirmation.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\nimport { OrderPaymentService } from \"../../../../services/cms/order-payment.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  encapsulation: ViewEncapsulation.Emulated,\r\n  template: ''\r\n})\r\n\r\nexport class PaymentUnicreditConfirmationComponent implements OnInit {\r\n  data: any = {};\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private templateService: TemplateService,\r\n      private route: ActivatedRoute,\r\n      private cmsComponentService: CmsComponentService,\r\n      @Inject('isBrowser') private isBrowser: boolean,\r\n      private seo: SeoService,\r\n      private renderer: Renderer,\r\n      @Inject(DOCUMENT) private document: any,\r\n      private scriptService: ScriptService\r\n    ) { }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    let id = 0;\r\n    let paramsSub = this.route.params.subscribe(params => {\r\n      id = params['orderid'];\r\n    });\r\n\r\n    this.subManager.add(paramsSub);\r\n\r\n    let orderCheckout: any;\r\n    let header: any;\r\n    let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n      header = result;\r\n      let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n        if (result1.Categories) {\r\n          header.Categories = result1.Categories;\r\n\r\n        }\r\n      });\r\n      this.subManager.add(SideMenuData);\r\n    });\r\n    this.subManager.add(headDataSub);\r\n    //console.log(\"sono qui\")\r\n    let thankYouSub = this.templateService.getThankYouPagOnlineInfo(\"orderUnicreditPageTemplate\", id).subscribe(result => {\r\n      if (result.SeoInformation) {\r\n        result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n        result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n      }\r\n\r\n      if (this.isBrowser) {\r\n        orderCheckout = result;\r\n        //Creating subcomponent whith the selected template to inject\r\n        let subComponent = this.createSubComponent(orderCheckout, id, header);\r\n\r\n        //injecting created component (OK)\r\n        this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n      }\r\n      else {\r\n        let typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePagOnlineId, id);\r\n\r\n        //-- Get head and body scripts\r\n        this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n        //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n        this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n        this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n      }\r\n    });\r\n\r\n    this.subManager.add(thankYouSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  //Creates component to inject\r\n  private createSubComponent(orderCheckout: any, OrderId: any, header: any) {\r\n    @Component({\r\n      template: orderCheckout.TemplateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private routesService: RoutesService,\r\n          private seoService: SeoService,\r\n          private _elementRef: ViewContainerRef,\r\n          private scriptService: ScriptService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          private activatedRoute: ActivatedRoute,\r\n          private languageService: LanguageService,\r\n          private translate: TranslateService,\r\n          private orderPaymentService: OrderPaymentService\r\n        ) { }\r\n\r\n      private success: boolean = false;\r\n      private errorMessage: string = \"\";\r\n      private failed: boolean = false;\r\n      private serverError: boolean = false;\r\n      private orderId: any = OrderId;\r\n      private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n      private encryptedOrder: any;\r\n      private hashedOrderId: any;\r\n      private pageIsInit: boolean = false;\r\n      private createScript: number = 0;\r\n      //subManager = new Subscription();\r\n      resultPagOnline: any = orderCheckout.resultPagOnline;\r\n      footerData: any = orderCheckout.FooterData;\r\n      headerData: any = header;\r\n\r\n      ngOnInit() {\r\n\r\n        if (this.isBrowser == false) {\r\n          return;\r\n        }\r\n\r\n        if (this.orderId == -1) {\r\n          this.success = false;\r\n          this.failed = true;\r\n          this.serverError = false;\r\n          this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n          this.createScript = -1;\r\n        }\r\n        else {\r\n          //setting order as paid                                \r\n          //let checkPaymentSub = this.orderPaymentService.CheckIsOrderPayedUnicredit(this.orderId)\r\n          //.subscribe(result => {\r\n\r\n          let res = this.resultPagOnline.split(\"|\");\r\n          if (res[0] == \"1\") {\r\n            this.success = true;\r\n            this.failed = false;\r\n            this.serverError = false;\r\n            this.createScript = 1;\r\n          }\r\n          else if (res[0] == \"-1\") {\r\n            this.success = false;\r\n            this.failed = true;\r\n            this.serverError = false;\r\n            this.errorMessage = res[1];\r\n            this.createScript = -1;\r\n          }\r\n          else {\r\n            this.success = false;\r\n            this.failed = false;\r\n            this.serverError = true;\r\n            this.errorMessage = res[1];\r\n            this.createScript = -1;\r\n          }\r\n          //})\r\n\r\n          //this.subManager.add(checkPaymentSub);\r\n        }\r\n      }\r\n\r\n      getLabel(label) {\r\n        let message;\r\n\r\n        this.translate.get(label, this.translate).subscribe((res: string) => {\r\n          message = res;\r\n        });\r\n\r\n        return message;\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        //-- Set title, setup google analytics and other libraries \r\n        this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n        //hiding of loading panel after we get all data we need\r\n        this.routesService.hidePageLoader();\r\n        //Eventually retrieving the script to append\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n       //this.subManager.unsubscribe();\r\n      }\r\n    }\r\n    return ChildComponent;\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-unicredit-confirmation.component.ts","import { UserLogin } from './../../../../models/cms/user-login';\r\nimport { ValidationService } from './../../../../services/core/validation.service';\r\nimport { LoginService } from './../../../../services/cms/login.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, Compiler, Inject, ViewChild, ElementRef } from \"@angular/core\";\r\nimport { ComponentHelperService } from '../../../../services/core/component-helper.service';\r\nimport { CheckIfExistService } from \"../../../../services/cms/check-existence.service\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { QuickRegister } from \"../../../../models/cms/register\";\r\nimport { Configuration } from '../../../../models/core/configuration';\r\nimport { LanguageService } from '../../../../services/cms/language.service';\r\nimport { ConfigurationService } from '../../../../services/core/configuration.service';\r\nimport { CompanyService } from '../../../../services/core/company.service';\r\nimport { CookieService } from '../../../../services/core/cookie';\r\nimport { AuthService } from '../../../../services/core/auth.service';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\nimport { Company } from '../../../../models/core/company';\r\n\r\n@Component({\r\n    selector: \"dy-quick-register\",\r\n    template: \"\"\r\n})\r\n\r\nexport class QuickRegistrationComponent implements OnInit {\r\n\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() parentWidgetData: any;\r\n    @Input() companyInfo: Company;\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n            \r\n        if (this.parentWidgetData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentWidgetData, this.companyInfo);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    }\r\n\r\n    private createSubComponent(quickRegistrationData: any, companyInfo: Company) {\r\n\r\n        @Component({\r\n            template: quickRegistrationData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private loginService: LoginService,\r\n                    private checkExists: CheckIfExistService,\r\n                    private router: Router,\r\n                    private routesService: RoutesService,\r\n                    private activeRoute: ActivatedRoute,\r\n                    private languageService: LanguageService,\r\n                    private companyService: CompanyService,\r\n                    private configurationService: ConfigurationService,\r\n                    @Inject('CookieService') private cookie: CookieService,\r\n                    private validationService: ValidationService,\r\n                    private authService: AuthService,\r\n                    private headerService: HeaderService\r\n                ) { }\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            //-- Email controls\r\n            public isEmailValid: boolean = false;\r\n            public emailExists: boolean = false;\r\n\r\n            //-- Partita iva controls\r\n            public isPivaValid: boolean = false;\r\n            public pivaExists: boolean = false;\r\n\r\n            //-- Codice Fiscale controls\r\n            public isCFValid: boolean = false;\r\n            public CFExists: boolean = false;\r\n\r\n            private isRegisterFailed: boolean;\r\n            private pageFrom: string = \"\";\r\n            public load: boolean = false;\r\n\r\n            private subManager = new Subscription();\r\n\r\n            modelRegistration = new QuickRegister();\r\n            configuration: Configuration;\r\n            lang: string = this.languageService.getLongLang();\r\n            company: Company = companyInfo;\r\n            oldGroup: string;\r\n\r\n            @ViewChild('submitButton') submitButton: ElementRef;\r\n\r\n            ngOnInit() {\r\n                let paramsSub = this.activeRoute.params.subscribe(params => {\r\n                    let paramPageFrom = params['pagefrom'];\r\n\r\n                    if (paramPageFrom !== undefined) {\r\n                        this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(paramsSub);\r\n\r\n                //-- Get configuration from server\r\n                this.setConfiguration();\r\n            }\r\n\r\n            finishQuickRegistration() {\r\n                this.load = true;\r\n                //-- After submiting form, we are disabling a button until we get a response\r\n                this.submitButton.nativeElement.disabled = true;\r\n\r\n                let quickRegisterUserObj = this.setQuickRegisterObject();\r\n\r\n                //-- Save quick registration user info in cookies so we can reuse it later\r\n                this.cookie.putObject(\"QuickRegisterUser\", quickRegisterUserObj);\r\n                let isQuickRegister: boolean = true;\r\n\r\n                this.cookie.put('IsQuickRegistered', isQuickRegister.toString());\r\n\r\n                let sendInfoSub = this.loginService.quickRegister(this.modelRegistration)\r\n                    .subscribe(response => {\r\n                        this.load = false;\r\n                        this.hideModalQuickRegistration();\r\n\r\n                        if (response.Id_User_Dettail > 0 && response.Active) {\r\n                            let name = response.Name ? response.Name : response.Email;\r\n                            this.authService.Login(response.Id_User_Dettail, name);\r\n                        }\r\n\r\n                        if (response.IsCompletedRegistration == false) {\r\n                            if (response.Active) {\r\n                                let user = new UserLogin();\r\n                                user.isAuthenticated = true;\r\n                                user.username = response.Name ? response.Name : response.Email;\r\n\r\n                                //-- Call service to update header info, to set a logged in user\r\n                                this.headerService.setLoggedInUser(user);\r\n\r\n                                //-- Hide quick registration component even after user is logged in, because we want to show an additional dialog modal\r\n                                this.headerService.setToShowQuickRegistration(true);\r\n\r\n                                this.showQuickRegistrationSuccessModal();\r\n                                // let navigationExtras: NavigationExtras = {\r\n                                //     queryParams: { 'quickRegistration': true }\r\n                                // };\r\n                                // this.router.navigate([this.routesService.getRoutePath('REGISTRAZIONE')[0]], navigationExtras);\r\n                            }\r\n                        }\r\n                        else if (this.pageFrom == \"cart\") {\r\n                            this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                        }\r\n                        else {\r\n                            this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n                        }\r\n                    }\r\n                    )\r\n\r\n                this.subManager.add(sendInfoSub);\r\n            }\r\n\r\n            setQuickRegisterObject() {\r\n                let quickRegisterObj = {\r\n                    QuickEmailUser: this.modelRegistration.EmailRegister.trim(),\r\n                    QuickPartitaIva: this.modelRegistration.PartitaIva.trim(),\r\n                    QuickCodiceFiscale: this.modelRegistration.CodiceFiscale.trim(),\r\n                    QuickClientType: this.modelRegistration.CustomerGroup.trim(),\r\n                    QuickTelephone: this.modelRegistration.Telephone.trim(),\r\n                }\r\n\r\n                return quickRegisterObj;\r\n            }\r\n\r\n            quickRegister() {\r\n                if (this.isEmailValid) {\r\n                    this.hideModalQuickRegistrationEmail();\r\n                    this.showModalQuickRegistration();\r\n                }\r\n            }\r\n\r\n            //-- Checking after changing of focus if the email entered in form already exists in database\r\n            checkEmail(form) {\r\n                if (form.controls.EmailRegister.valid) {\r\n                    let checkEmailSub = this.checkExists.checkIfEmailExistsInDb(this.modelRegistration.EmailRegister)\r\n                        .subscribe(result => {\r\n                            if (result == 1) {\r\n                                this.isEmailValid = true;\r\n                                this.emailExists = false;\r\n                            }\r\n                            else {\r\n                                this.isEmailValid = false;\r\n                                this.emailExists = true;\r\n                            }\r\n                        })\r\n\r\n                    this.subManager.add(checkEmailSub);\r\n                }\r\n                else {\r\n                    this.isEmailValid = false;\r\n                    this.emailExists = false;\r\n                }\r\n            }\r\n\r\n            //-- Checking after changing of focus if the partita iva entered in form already exists in database\r\n            checkPiva(field) {\r\n                if (field.valid) {\r\n                    if (!field.value || !field.value.trim())\r\n                        return;\r\n\r\n                    this.checkExists.checkIfPartitaIvaExistsInDb(this.modelRegistration.PartitaIva)\r\n                        .subscribe(result => {\r\n                            if (result == 1) {\r\n                                this.isPivaValid = true;\r\n                                this.pivaExists = false;\r\n                            }\r\n                            else {\r\n                                if (this.modelRegistration.CustomerGroup !== '7') {\r\n                                    this.isPivaValid = false;\r\n                                    this.pivaExists = true;\r\n                                }\r\n                                else {\r\n                                    this.isPivaValid = true;\r\n                                    this.pivaExists = false;\r\n                                }\r\n                            }\r\n                        })\r\n                }\r\n                else {\r\n                    if (this.modelRegistration.CustomerGroup !== '7') {\r\n                        this.isPivaValid = false;\r\n                        this.pivaExists = false;\r\n                    }\r\n                    else {\r\n                        this.isPivaValid = true;\r\n                        this.pivaExists = false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            //-- Checking after changing of focus if the codice fiscale entered in form already exists in database\r\n            checkCF(field) {\r\n                if (!field.valid) {\r\n                    this.isPivaValid = false;\r\n                    this.pivaExists = false;\r\n                }\r\n\r\n                //-- Check if the CF already exists only when group is privato\r\n                if (this.modelRegistration.CustomerGroup === '4') {\r\n                    if (field.valid) {\r\n                        this.checkExists.checkIfCodiceFiscaleExistsInDb(this.modelRegistration.CodiceFiscale)\r\n                            .subscribe(result => {\r\n                                {\r\n                                    if (result == 1) {\r\n                                        this.isCFValid = true;\r\n                                        this.CFExists = false;\r\n                                    }\r\n                                    else {\r\n                                        this.isCFValid = false;\r\n                                        this.CFExists = true;\r\n                                    }\r\n                                }\r\n                            })\r\n                    }\r\n                }\r\n                else {\r\n                    this.isCFValid = true;\r\n                    this.CFExists = false;\r\n                }\r\n            }\r\n\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            validatePhone(event: any) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            }\r\n\r\n            setConfiguration() {\r\n                this.configurationService.getConfiguration(this.lang).subscribe(resultConfiguration => {\r\n                    let companySub = this.companyService.getCompany().subscribe(resultCompany => {\r\n                        {\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n                            }\r\n                        }\r\n\r\n                        this.configuration = resultConfiguration;\r\n                    });\r\n\r\n                    this.subManager.add(companySub);\r\n                });\r\n            }\r\n\r\n\r\n            onCustomerGroupChange(value) {\r\n                this.setValuesOnCustomerGroupChange();\r\n                this.modelRegistration.CustomerGroup = value;\r\n\r\n                if (this.modelRegistration.CustomerGroup == '4' || this.modelRegistration.CustomerGroup == '7') {\r\n                    this.isPivaValid = true;\r\n                }\r\n                else {\r\n                    this.isCFValid = true;\r\n                }\r\n            }\r\n\r\n            saveOldGroup()\r\n            {\r\n                this.oldGroup = this.modelRegistration.CustomerGroup;\r\n            }\r\n\r\n            setValuesOnCustomerGroupChange() {\r\n                this.modelRegistration = new QuickRegister(this.modelRegistration.EmailRegister,\r\n                    this.modelRegistration.EmailRepeat,\r\n                    this.modelRegistration.Password,\r\n                    this.modelRegistration.Telephone,\r\n                    this.modelRegistration.CustomerGroup,\r\n                    this.modelRegistration.CodiceFiscale,\r\n                    this.modelRegistration.PartitaIva, this.oldGroup);\r\n            }\r\n\r\n            resetForm() {\r\n                this.modelRegistration = new QuickRegister(this.modelRegistration.EmailRegister);\r\n            }\r\n\r\n            //-- Hiding and showing corresponding modals\r\n            showModalQuickRegistration() {\r\n                this.showModal('quickRegistrationModal');\r\n            }\r\n\r\n            hideModalQuickRegistration() {\r\n                this.hideModal('quickRegistrationModal');\r\n\r\n                this.modelRegistration.EmailRegister = '';\r\n                this.resetForm();\r\n            }\r\n\r\n            showModalQuickRegistrationEmail() {\r\n                this.showModal('quickRegistrationEmailModal');\r\n            }\r\n\r\n            showQuickRegistrationSuccessModal()\r\n            {\r\n                this.showModal('quickRegistrationSuccessModal');\r\n            }\r\n\r\n            hideQuickRegistrationSuccessModal()\r\n            {\r\n                this.hideModal('quickRegistrationSuccessModal');\r\n                //-- Hide quick registration component\r\n                this.headerService.setToShowQuickRegistration(false);\r\n            }\r\n\r\n            hideModalQuickRegistrationEmailAndResetEmail() {\r\n                this.hideModalQuickRegistrationEmail();\r\n                this.modelRegistration.EmailRegister = '';\r\n            }\r\n\r\n            hideModalQuickRegistrationEmail() {\r\n                this.hideModal('quickRegistrationEmailModal');\r\n            }\r\n\r\n            showModal(modalId: string) {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n                $(`#${modalId}`).modal(\"show\");\r\n            }\r\n\r\n            hideModal(modalId: string) {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n                $(`#${modalId}`).modal(\"hide\");\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/quick-registration.component.ts","import { ValidationService } from './../../../../services/core/validation.service';\r\nimport { CookieService } from './../../../../services/core/cookie/cookie.service';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, OnDestroy, ViewContainerRef, Compiler, ViewChild, ElementRef, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\n\r\n//Services\r\nimport { RegisterService } from \"./../../../../services/cms/register.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { CompanyService } from \"../../../../services/core/company.service\";\r\nimport { ConfigurationService } from \"../../../../services/core/configuration.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Nation, Register } from \"./../../../../models/cms/register\";\r\nimport { UserType } from \"./../../../../models/cms/user-type\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { Subscription } from \"rxjs/Subscription\";\r\nimport { CheckIfExistService } from '../../../../services/cms/check-existence.service';\r\nimport { AuthService } from '../../../../services/core/auth.service';\r\nimport { LoginService } from '../../../../services/cms/login.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class RegisterComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private registerService: RegisterService,\r\n            private route: ActivatedRoute,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n    ngOnInit() {\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let isQuickRegistration = this.route.snapshot.queryParams[\"quickRegistration\"] || false;\r\n        let registerSub = this.registerService.getRegisterPageData().subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (this.isBrowser) {\r\n                if (!result.IsActiveQuickRegistration) {\r\n                    isQuickRegistration = false;\r\n                }\r\n\r\n                //Creating subcomponent whith the register result information to inject\r\n                let subComponent = this.createSubComponent(result, isQuickRegistration, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userRegistrationId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(registerSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, isQuickRegistrationActive: boolean, header: any) {\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n\r\n        class ChildComponent implements OnInit, OnDestroy {\r\n\r\n            @ViewChild('submitButton') submitButton: ElementRef;\r\n\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private registerService: RegisterService,\r\n                    private languageService: LanguageService,\r\n                    private router: Router,\r\n                    private mappings: Mappings,\r\n                    private checkExists: CheckIfExistService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private companyService: CompanyService,\r\n                    private configurationService: ConfigurationService,\r\n                    private routesService: RoutesService,\r\n                    private translate: TranslateService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private _compiler: Compiler,\r\n                    private route: ActivatedRoute,\r\n                    private validationService: ValidationService,\r\n                    @Inject('CookieService') private cookie: CookieService,\r\n                    private authService: AuthService,\r\n                    private loginService: LoginService\r\n                ) { }\r\n\r\n            private isCaptchaInvalid: boolean;\r\n            public verified: any;\r\n            public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n            public theme: string = \"light\";\r\n            private model: Register;\r\n            private customerTypeList: Array<UserType>;\r\n            private isRegisterFailed: boolean;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private emailError: boolean = false;\r\n            private passwordError: boolean = false;\r\n            private success: boolean = false;\r\n            private load: boolean = false;\r\n            private emailValid: any;\r\n            private validEmail: string = \"\";\r\n            private pageIsInit: boolean = false;\r\n            private pageIsOnDestroy: boolean = false;\r\n            private showEmailInvalid: boolean = false;\r\n            private showPivaInvalid: boolean = false;\r\n            private showCFInvalid: boolean = false;\r\n            private subscription: Subscription;\r\n            private isValidCodDest: string = \"\";\r\n            private isValidPecEmail: string = \"\";\r\n            private isRequiredPecEmail: boolean = true;\r\n            public isQuickRegistration: boolean = isQuickRegistrationActive;\r\n            public configuration: Configuration;\r\n            public quickRegisteredUser: Object = null;\r\n\r\n            private lang: string = this.languageService.getLongLang();\r\n\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            private registerViaFbData = this.registerService.getFacebookLoginData();\r\n            private disableFbDataFields: boolean = false;\r\n\r\n            private cartRoute = this.routesService.getRoutePath('CARRELLO');\r\n            private homepageRoute = this.routesService.getRoutePath('HOME');\r\n            private pageFrom: string = \"\";\r\n\r\n            subManager = new Subscription();\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n            nationList: Array<Nation>;\r\n            nationCode: string = \"\";\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                let paramsSub = this.route.params.subscribe(params => {\r\n                    let paramPageFrom = params['pagefrom'];\r\n\r\n                    if (paramPageFrom !== undefined) {\r\n                        this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(paramsSub);\r\n                this.nationList = result.nationList\r\n                this.model = new Register();\r\n                this.customerTypeList = result.UserTypes;\r\n                this.onNationTypeChange(result.DefaultNation)\r\n                this.model.CustomerGroup = \"5\";\r\n                this.model.CustomerType = \"\";\r\n                this.model.PecEmail = \"\";\r\n                this.model.CodiceDestinatario = \"\";\r\n\r\n                //-- If the user used quick registration feature, we can get it's data from the cookies\r\n                if (this.isQuickRegistration) {\r\n                    this.quickRegisteredUser = this.cookie.getObject(\"QuickRegisterUser\");\r\n                    this.setModelDataFromCookies();\r\n                }\r\n\r\n                this.showEmailInvalid = false;\r\n\r\n                if (this.registerViaFbData) {\r\n                    this.model.CustomerGroup = \"4\";\r\n\r\n                    this.setModelDataFromFb(this.registerViaFbData);\r\n                }\r\n\r\n                this.isCodDestRequired()\r\n                this.isPecEmailRequired()\r\n\r\n                this.configurationService.getConfiguration(this.lang).subscribe(resultConfiguration => {\r\n                    let companySub = this.companyService.getCompany().subscribe(resultCompany => {\r\n                        {\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n                            }\r\n\r\n                            if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n                                resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n                            }\r\n                        }\r\n\r\n                        this.configuration = resultConfiguration;\r\n                    });\r\n\r\n                    this.subManager.add(companySub);\r\n                });\r\n            };\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                return message;\r\n            }\r\n            isItalyNation() {\r\n                var result = false;\r\n                if (this.model.Nation == 8494) {\r\n                    result = true;\r\n                }\r\n                else {\r\n                    if (this.model.CustomerGroup != \"5\" && this.model.CustomerGroup != \"4\") {\r\n                        this.onCustomerGroupChange(\"5\");\r\n                    }\r\n                }\r\n                return result;\r\n            }\r\n            isPrivateCustomer() {\r\n                var result = false;\r\n                if (this.model.CustomerGroup == \"4\") {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            }\r\n            setModelDataFromCookies() {\r\n                if (!this.quickRegisteredUser)\r\n                    return;\r\n\r\n                this.model.EmailRegister = this.quickRegisteredUser['QuickEmailUser'];\r\n                this.model.EmailRepeat = this.quickRegisteredUser['QuickEmailUser'];\r\n                this.model.CustomerGroup = this.quickRegisteredUser['QuickClientType'];\r\n                this.model.Telephone = this.quickRegisteredUser['QuickTelephone'];\r\n\r\n                let isQuickRegistered = this.cookie.get(\"IsQuickRegistered\") ? Boolean(this.cookie.get(\"IsQuickRegistered\")) : false;\r\n                this.model.IsQuickRegistered = isQuickRegistered;\r\n\r\n                //-- If customer group is privato or associazione, then CF was already set during registration, else Partita Iva was set\r\n                if (this.model.CustomerGroup === '4' || this.model.CustomerGroup === '7') {\r\n                    this.model.CF = this.quickRegisteredUser['QuickCodiceFiscale'];\r\n                }\r\n                else {\r\n                    this.model.Piva = this.quickRegisteredUser['QuickPartitaIva'];\r\n                }\r\n            }\r\n            disableFieldsFilledFromFbData() {\r\n                this.disableFbDataFields = true;\r\n            }\r\n            setModelDataFromFb(reg: any) {\r\n                this.model.Name = reg.Name;\r\n                this.model.SubName = reg.SubName;\r\n                this.model.EmailRegister = reg.Email;\r\n                this.model.EmailRepeat = reg.Email;\r\n                this.model.Password = reg.Password;\r\n                this.model.PasswordRepeat = reg.Password;\r\n\r\n                this.disableFieldsFilledFromFbData();\r\n            }\r\n            //adding all scripts and elements connected to address verification feature                \r\n            addAddressVerificationScripts(addressKey: string) {\r\n                let suggest = \"<script type=\\\"text/javascript\\\" id=\\\"suggestId\\\" src=\\\"/template/b2c/template01/layout/js/suggest.js\\\"></script>\";\r\n                let address = \"<script id=\\\"addressVerificationId\\\" type=\\\"text/javascript\\\" title=\" + addressKey + \" src=\\\"/template/b2c/template01/layout/js/adress-verification.js?v=1\\\"></script>\";\r\n                let jquery = \"<script type=\\\"text/javascript\\\" id=\\\"jqueryId\\\" src=\\\"/template/b2c/template01/layout/vendor/jquery/jquery.min.js\\\"></script>\";\r\n\r\n                $('body > universal-script').before(suggest);\r\n                $('body > universal-script').before(jquery);\r\n                $('body > universal-script').before(address);\r\n            }\r\n            //removing all scripts and elements connected to address verification feature                            \r\n            removeAddressVerificationScripts(addressKey: string) {\r\n                $(\"#suggestId\").remove();\r\n                $(\"#jqueryuicss\").remove();\r\n                $(\"#jqueryuijs\").remove();\r\n                $(\"#suggestcss\").remove();\r\n                $(\"#initui\").remove();\r\n                $(\"#inituicf\").remove();\r\n                $(\"#ui-id-1\").remove();\r\n                $(\"#ui-id-2\").remove();\r\n                $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n                $(\"#jqueryId\").remove();\r\n                $(\"#addressVerificationId\").remove();\r\n            }\r\n            checkAddressValidation() {\r\n                this.model.Prov = $(\"#Prov\").val();\r\n                this.model.Cap = $(\"#Cap\").val();\r\n                this.model.City = $(\"#City\").val();\r\n            }\r\n            setAddressValue() {\r\n                let streetTypeId = $(\"#streetTypeId\").val();\r\n                let street = $(\"#Address\").val();\r\n\r\n                if (streetTypeId != null && streetTypeId != \"\") {\r\n                    this.model.Address = streetTypeId + \" \" + street;\r\n                }\r\n                else {\r\n                    this.model.Address = street;\r\n                }\r\n            }\r\n            isDisabled(form) {\r\n                let res: boolean = false;\r\n\r\n                if (this.disableFbDataFields) {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat) {\r\n                        res = true;\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n                else if (this.isQuickRegistration && this.quickRegisteredUser) {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat) {\r\n                        res = true;\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat\r\n                        && this.emailValid == true && this.showCFInvalid == false) {\r\n                        if (this.model.CustomerGroup != '4') {\r\n                            if (this.showPivaInvalid == false) {\r\n                                res = true;\r\n                            }\r\n                            else {\r\n                                res = false;\r\n                            }\r\n                        }\r\n                        else {\r\n                            res = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        res = false;\r\n                    }\r\n                }\r\n\r\n                return res;\r\n            }\r\n            //checking after changing of focus if the email entered in form already exists in database\r\n            checkEmail(form) {\r\n                let email = this.model.EmailRegister;\r\n\r\n                if (form.controls.EmailRegister.valid) {\r\n                    if (this.disableFbDataFields == false) {\r\n                        let checkEmailSub = this.checkExists.checkIfEmailExistsInDb(email)\r\n\r\n                            .subscribe(result => {\r\n                                this.showEmailInvalid = false;\r\n\r\n                                if (result == 1) {\r\n                                    this.emailValid = true;\r\n                                    this.validEmail = \"ng-valid\";\r\n                                }\r\n                                else {\r\n                                    this.emailValid = false;\r\n                                    this.validEmail = \"ng-invalid\";\r\n                                    this.showEmailInvalid = true;\r\n                                }\r\n                            })\r\n\r\n                        this.subManager.add(checkEmailSub);\r\n                    }\r\n\r\n                }\r\n                else {\r\n                    this.emailValid = false;\r\n                    this.validEmail = \"ng-invalid\";\r\n                    this.showEmailInvalid = false;\r\n                }\r\n            }\r\n            //checking after changing of focus if the partita iva entered in form already exists in database\r\n            checkPiva(field) {\r\n                let piva = this.model.Piva;\r\n\r\n                if (field.valid) {\r\n                    if (!field.value || !field.value.trim())\r\n                        return;\r\n\r\n                    if (this.disableFbDataFields == false) {\r\n                        this.checkExists.checkIfPartitaIvaExistsInDb(piva)\r\n                            .subscribe(result => {\r\n                                this.showPivaInvalid = false;\r\n\r\n                                if (result == 1) {\r\n                                    this.showPivaInvalid = false;\r\n                                }\r\n                                else {\r\n                                    if (this.model.CustomerGroup !== '7') {\r\n                                        this.showPivaInvalid = true;\r\n                                    }\r\n                                }\r\n                            })\r\n                    }\r\n\r\n                }\r\n                else {\r\n                    if (this.model.CustomerGroup !== '7') {\r\n                        this.showPivaInvalid = true;\r\n                    }\r\n                }\r\n            }\r\n            //checking after changing of focus if the codice fiscale entered in form already exists in database\r\n            checkCF(field) {\r\n                let CF = this.model.CF;\r\n\r\n                //-- Check if the CF already exists only when group is privato\r\n                if (this.model.CustomerGroup === '4') {\r\n                    if (field.valid) {\r\n                        if (this.disableFbDataFields == false) {\r\n                            this.checkExists.checkIfCodiceFiscaleExistsInDb(CF)\r\n                                .subscribe(result => {\r\n                                    this.showCFInvalid = false;\r\n\r\n                                    if (result == 1) {\r\n                                        this.showCFInvalid = false;\r\n                                    }\r\n                                    else {\r\n                                        this.showCFInvalid = true;\r\n                                    }\r\n                                })\r\n                        }\r\n\r\n                    }\r\n                    else {\r\n                        this.showCFInvalid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.showCFInvalid = false;\r\n                }\r\n            }\r\n            onSubmit() {\r\n                //after submiting form, we are disabling a button until we get a response\r\n                this.submitButton.nativeElement.disabled = true;\r\n\r\n                this.load = true;\r\n                this.model.Language = this.languageService.getLongLang();\r\n\r\n                //converting CAP field to string\r\n                this.model.Cap = this.model.Cap.toString();\r\n\r\n                //concating of address street and number to one model field\r\n                this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.model.IsCompletedRegistration = false;\r\n                }\r\n\r\n                let sendInfoSub = this.registerService.sendInfoRequest(this.model)\r\n                    .subscribe(result => {\r\n                        if (result[\"selected\"]) {\r\n                            if (this.isQuickRegistration) {\r\n                                let authSub = this.loginService.authentificateUser(this.model.EmailRegister, this.model.Name, this.model.Name).subscribe(response => {\r\n                                    this.cookie.remove('QuickRegisterUser');\r\n                                    this.cookie.remove('IsQuickRegistered');\r\n                                    this.authService.Login(response.Id_User_Dettail, response.Name);\r\n                                    this.navigateToCorespondingPage();\r\n                                });\r\n                            }\r\n                            else {\r\n                                this.navigateToCorespondingPage();\r\n                            }\r\n\r\n                        }\r\n                        else {\r\n                            this.emailError = false;\r\n                            this.passwordError = false;\r\n                            this.isRegisterFailed = true;\r\n                            this.load = false;\r\n                            this.success = false;\r\n                        }\r\n                    })\r\n\r\n                this.subManager.add(sendInfoSub);\r\n            }\r\n\r\n            navigateToCorespondingPage() {\r\n                if (this.pageFrom == \"cart\") {\r\n                    this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                }\r\n                else {\r\n\r\n                    let registrationCompletePage: string[] = this.routesService.getRoutePath('REGISTRATION - COMPLETE')[0];\r\n                    this.router.navigate([registrationCompletePage]);\r\n                    this.emailError = false;\r\n                    this.passwordError = false;\r\n                    this.isRegisterFailed = false;\r\n                    this.load = false;\r\n                    this.success = true;\r\n                }\r\n            }\r\n\r\n            setVerified(data) {\r\n                this.isCaptchaInvalid = data;\r\n            }\r\n            onCustomerTypeChange(value) {\r\n                this.model.CustomerType = value;\r\n            }\r\n            onNationTypeChange(value) {\r\n                this.model.Nation = value;\r\n                this.nationCode = this.nationList.filter(x => x.Id == value)[0].Code;\r\n                this.onCustomerGroupChange(this.model.CustomerGroup)\r\n            }\r\n            onCustomerGroupChange(value) {\r\n                var currentModel = this.model;\r\n                this.model = new Register();\r\n                this.model.CustomerGroup = value;\r\n\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.setModelDataFromFb(this.registerViaFbData);\r\n                }\r\n                this.model.Nation = currentModel.Nation;\r\n                this.model.CustomerType = currentModel.CustomerType;\r\n                this.model.Telephone = currentModel.Telephone;\r\n                this.model.Mobile = currentModel.Mobile;\r\n                this.model.EmailRegister = currentModel.EmailRegister;\r\n                this.model.EmailRepeat = currentModel.EmailRepeat;\r\n                this.model.PecEmail = currentModel.PecEmail;\r\n                if (value === '4') {\r\n                    this.model.CodiceDestinatario = \"0000000\";\r\n                }\r\n                else {\r\n                    if(this.isItalyNation()==false)\r\n                    {\r\n                        this.model.CodiceDestinatario = \"0000000\";\r\n                    }\r\n                    else {\r\n                    console.log(\"qui\")\r\n\r\n                        this.model.CodiceDestinatario = \"\";\r\n                    }   \r\n                }\r\n            }\r\n\r\n            isCodDestRequired() {\r\n                let retVal = false;\r\n                //console.log(this.model.CodiceDestinatario)\r\n                if (this.model.CustomerGroup != \"4\" && this.isItalyNation()) {\r\n                    if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n                        retVal = true;\r\n                    }\r\n\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        this.isRequiredPecEmail = true;\r\n                    }\r\n                    else {\r\n                        this.isRequiredPecEmail = false;\r\n                    }\r\n                }\r\n                return retVal;\r\n            }\r\n\r\n            isPecEmailRequired() {\r\n                let retVal = false;\r\n                if (this.model.CustomerGroup != \"4\" && this.isItalyNation()) {\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        retVal = true;\r\n                    }\r\n                }\r\n                return retVal;\r\n            }\r\n\r\n            //validation of phone numbers, disable writing any characters in input except of numbers\r\n            validatePhone(event: any) {\r\n                this.validationService.validatePhoneNumber(event);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                setTimeout(function () { \r\n                    $('.popovers').popover(); \r\n                  }, 150);\r\n\r\n                if (result.isActiveAddressVerificationModule) {\r\n                    let addressVerificationKey = result.AddressVerificationCode;\r\n                    if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n                        this.addAddressVerificationScripts(addressVerificationKey);\r\n                        $(\"#Cap\").prop('disabled', true);\r\n\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#Cap\").prop('disabled', false);\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n\r\n                //this method is removing all scripts and elements connected to address verification feature\r\n                let addressVerificationKey = result.AddressVerificationCode;\r\n                this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n                this.subManager.unsubscribe();\r\n\r\n                // this.registerService.setFacebookLoginData(null);\r\n                this.pageIsOnDestroy = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/register.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class RegistrationConfirmationPageComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private languageService: LanguageService,\r\n            private registerService: RegisterService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let templateHtml: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let registrationDoneSub = this.registerService.getRegistrationCompletePageData().subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the result to inject\r\n                let subComponent = this.createSubComponent(result,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.registrationCompletePageId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(registrationDoneSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header:any) {\r\n\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private seoService: SeoService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private registerService: RegisterService\r\n                ) { }\r\n\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n            //newsletter subscription\r\n            private newsletterSubmitted: boolean = false;\r\n            private privacySubmitted: boolean = false;\r\n            private alreadySubscribed: boolean = false;\r\n            private successfullySubscribed: boolean = false;\r\n            private spinnerNewslatter: boolean = false;\r\n            private pageIsOnDestroy: boolean = false;\r\n\r\n            private registerViaFbData = this.registerService.getFacebookLoginData();\r\n            private isRegisteredViaFacebook: boolean = false;\r\n            \r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n                if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n                    this.isRegisteredViaFacebook = true;\r\n                }\r\n            }\r\n\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                if (!this.isBrowser || this.pageIsOnDestroy) {\r\n                    return;\r\n                }\r\n\r\n                this.registerService.setFacebookLoginData(null);\r\n\r\n                this.pageIsOnDestroy = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/registration-complete.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { RegisterService } from \"../../../../services/cms/register.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from '../../../../services/core/seo.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: ''\r\n})\r\n\r\nexport class RegistrationConfirmationComponent implements OnInit {\r\n    data: any = {};\r\n\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cmsComponentService: CmsComponentService,\r\n            private templateService: TemplateService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let registrationConfirmation: any;\r\n        let header: any;\r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let compTemplateSub = this.templateService.getComponentTemplate(\"registrationConfirmationPageTemplate\").subscribe(result => {\r\n             if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (this.isBrowser) {\r\n                registrationConfirmation = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(registrationConfirmation,header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(compTemplateSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject\r\n    private createSubComponent(registrationConfirmation: any,header:any) {\r\n        @Component({\r\n            template: registrationConfirmation\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (\r\n                    private routesService: RoutesService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    private registerService: RegisterService\r\n                ) { }\r\n\r\n            private success: boolean = false;\r\n            private failed: boolean = false;\r\n            private active: boolean = false;\r\n            private pageIsInit: boolean = false;\r\n\r\n            headerData: any = header;\r\n            footerData: any = registrationConfirmation.FooterData;\r\n\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                if (this.isBrowser == false) {\r\n                    return;\r\n                }\r\n\r\n                let paramsSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n                    let userId = params['userid'];\r\n\r\n                    this.checkActivation(userId);\r\n                });\r\n\r\n                this.subManager.add(paramsSub);\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n            }\r\n\r\n            checkActivation(userId) {\r\n                let confirmRegSub = this.registerService.confirmationRegistration(userId)\r\n                    .subscribe(response => {\r\n                        if (response == \"1\") {\r\n                            this.success = true;\r\n                        }\r\n                        else if (response == \"-1\") {\r\n                            this.active = true;\r\n                        }\r\n                        else {\r\n                            this.failed = true;\r\n                        }\r\n                    })\r\n\r\n                this.subManager.add(confirmRegSub);\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/registration-confirmation.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\nimport { CookieService } from './../../../../services/core/cookie/cookie.service';\r\nimport { ApiService } from './../../../../services/core/api.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../shared/mapping';\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LoginService } from \"../../../../services/cms/login.service\";\r\nimport { AuthService } from \"../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { RecoverPasswordService } from \"../../../../services/cms/recover-password.service\";\r\nimport { CmsComponentService } from \"../../../../services/cms/cms-component.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { Meta } from '../../../../services/core/angular2-meta';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\n//Models\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { SeoViewModel } from \"../../../../models/core/seo\";\r\nimport { UserLogin } from './../../../../models/cms/user-login';\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class UserLoginComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cmsService: CmsComponentService,\r\n            private seo: SeoService,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private renderer: Renderer,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        let loginData: string;\r\n        let header: any;\r\n        let headDataSub = this.cmsService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        // this.templateService.getComponentTemplate(\"userLoginPageTemplate\").subscribe(result =>\r\n        let loginSub = this.cmsService.getLoginPageData().subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n            if (this.isBrowser) {\r\n                loginData = result;\r\n\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(loginData, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.loginId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n\r\n        this.subManager.add(loginSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(loginData: any, header: any) {\r\n        @Component({\r\n            template: loginData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private mappings: Mappings,\r\n                    private loginService: LoginService,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private authService: AuthService,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private router: Router,\r\n                    private route: ActivatedRoute,\r\n                    private seoService: SeoService,\r\n                    private recoverPasswordService: RecoverPasswordService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private breadcrumbsService: BreadcrumbsService,\r\n                    private api: ApiService,\r\n                    @Inject('CookieService') private cookie: CookieService,\r\n                    private registerService: RegisterService,\r\n                    private headerService: HeaderService,\r\n                    private metaService: Meta\r\n                ) {\r\n                if (!this.isBrowser || this.constructorIsInit) {\r\n                    return;\r\n                }\r\n\r\n\r\n                this.constructorIsInit = true;\r\n            }\r\n\r\n            private breadcrumbs: Breadcrumbs[] = loginData.BreadcrumbsInfo;\r\n\r\n            footerData: any = loginData.footerData;\r\n            headerData: any = header;\r\n            private countFb=0;\r\n            private showSpinnerClick: boolean = false;\r\n            private userLoginUrl: string = this.mappings.UserLoginImg_Url;\r\n            private userNotActive: boolean;\r\n            private userNotFound: boolean;\r\n            private pageFrom: string = \"\";\r\n            private emailError: boolean = false;\r\n            private passwordError: boolean = false;\r\n            private seoInfo: SeoViewModel = loginData.SeoInformation;\r\n            private recoverPasswordFailed: boolean;\r\n            private recoverPasswordSuccess: boolean;\r\n            private emailErrorRecover: boolean = false;\r\n            private pageIsInit: boolean = false;\r\n            private constructorIsInit: boolean = false;\r\n            private isActiveFacebookModule: boolean = loginData.isActiveFacebookModule;\r\n            private model = {\r\n                Email: \"\",\r\n                Password: \"\"\r\n            };\r\n\r\n            private modelRecover =\r\n                {\r\n                    Email: \"\"\r\n                };\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n                let paramsSub = this.route.params.subscribe(params => {\r\n                    let paramPageFrom = params['pagefrom'];\r\n\r\n                    if (paramPageFrom !== undefined) {\r\n                        this.pageFrom = paramPageFrom;\r\n                    }\r\n                });\r\n\r\n                this.subManager.add(paramsSub);\r\n            }\r\n\r\n            onFacebookLoginClick() {\r\n\r\n                FB.login((result: any) => {\r\n                    this.getUserInfoFromFb();\r\n                }, { scope: 'email' });\r\n\r\n                this.getUserFromFb();\r\n            }\r\n\r\n            getUserFromFb() {\r\n                let email = this.cookie.get(\"emailFbUser\");\r\n                let firstName = this.cookie.get(\"firstNameFbUser\");\r\n                let lastName = this.cookie.get(\"lastNameFbUser\");\r\n                if (email != undefined && firstName != undefined && lastName != undefined) {\r\n                    let authSub = this.loginService.authentificateUser(email, firstName, lastName).subscribe(response => {\r\n                        this.cookie.remove(\"emailFbUser\");\r\n                        this.cookie.remove(\"firstNameFbUser\");\r\n                        this.cookie.remove(\"lastNameFbUser\");\r\n\r\n                        // if(response.Active)\r\n                        // {\r\n                        this.authService.Login(response.Id_User_Dettail, response.Name);\r\n                        // }                        \r\n                        if (response.IsCompletedRegistration == false) {\r\n                            if (response.Active) {\r\n                                this.registerService.setFacebookLoginData(response);\r\n                                //update after login the header information\r\n                                let user = new UserLogin();\r\n                                user.isAuthenticated = true;\r\n                                user.username = response.Name ? response.Name : this.model.Email;\r\n                                this.headerService.setLoggedInUser(user);\r\n                                this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n                            }\r\n                            else {\r\n                                this.userNotActive = false;\r\n                                this.userNotFound = false;\r\n                            }\r\n                        }\r\n                        else if (this.pageFrom == \"cart\") {\r\n                            //update after login the header information\r\n                            let user = new UserLogin();\r\n                            user.isAuthenticated = true;\r\n                            user.username = response.Name ? response.Name : this.model.Email;\r\n                            this.headerService.setLoggedInUser(user);\r\n                            //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                            (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n                        }\r\n                        else {\r\n                            this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n                        }\r\n\r\n                    });\r\n\r\n                    this.subManager.add(authSub);\r\n                }\r\n                else {\r\n                    setTimeout(x => this.getUserFromFb(), 200);\r\n                }\r\n            }\r\n\r\n            getUserInfoFromFb() {\r\n                FB.api('/me?fields=first_name,last_name,email',\r\n                    function (result) {\r\n                        if (result && !result.error) {\r\n                            let email = result.email;\r\n                            let firstName = result.first_name;\r\n                            let lastName = result.last_name;\r\n                            document.cookie = \"emailFbUser=\" + email + \";\";\r\n                            document.cookie = \"firstNameFbUser=\" + firstName + \";\";\r\n                            document.cookie = \"lastNameFbUser=\" + lastName + \";\";\r\n                        } else {\r\n                            console.log(result.error);\r\n                        }\r\n                    }\r\n                );\r\n            }\r\n\r\n            onSubmit(form) {\r\n                if (form.valid) {\r\n                    this.showSpinnerClick=true;\r\n                    this.emailError = false;\r\n                    this.passwordError = false;\r\n                    let loginDataSub = this.loginService.sendLoginRequest(this.model.Email, this.model.Password).subscribe(result => {\r\n                        if (result.Id_User_Dettail > 0) {\r\n                            if (result.Active) {\r\n                                this.authService.Login(result.Id_User_Dettail, result.Name);\r\n\r\n                                //update after login the header information\r\n                                let user = new UserLogin();\r\n                                user.isAuthenticated = true;\r\n                                user.username = result.Name ? result.Name : this.model.Email;\r\n                                this.headerService.setLoggedInUser(user);\r\n\r\n                                if (this.pageFrom == \"cart\") {\r\n                                    //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n                                    (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n                                }\r\n\r\n                                else {\r\n                                    this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n\r\n                                }\r\n                            }\r\n                            else {\r\n                                this.userNotActive = false;\r\n                                this.userNotFound = false;\r\n                            }\r\n                        }\r\n\r\n                        else {\r\n                            this.userNotActive = false;\r\n                            this.userNotFound = true;\r\n                        }\r\n                        this.showSpinnerClick=false;\r\n                    })\r\n\r\n                    this.subManager.add(loginDataSub);\r\n                }\r\n\r\n                else if (!form.valid) {\r\n                    if (form.form.controls.password.valid == false) {\r\n                        this.passwordError = true;\r\n                    }\r\n\r\n                    else if (form.form.controls.password.valid == true) {\r\n                        this.passwordError = false;\r\n                    }\r\n\r\n                    if (form.form.controls.email.valid == false) {\r\n                        this.emailError = true;\r\n                    }\r\n\r\n                    else if (form.form.controls.email.valid == true) {\r\n                        this.emailError = false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                let fbCode = loginData.FacebookAppID;\r\n                this.initFacebook(fbCode)\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                // Eventually retrieving the script to append\r\n                // if (this.seoInfo.HasScripts == true) {\r\n                //     this.scriptService.appendLoginScript(this._elementRef.element.nativeElement);\r\n                // }\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n            initFacebook(fbCode) {\r\n                try {\r\n                    this.countFb = this.countFb + 1;\r\n                    FB.init({\r\n                        appId: fbCode,\r\n                        cookie: false,\r\n                        xfbml: false,\r\n                        version: 'v2.5'\r\n                    });\r\n                } catch (e) {\r\n                    if (this.countFb <= 5) {\r\n                        setTimeout(x => this.initFacebook(fbCode), 1);\r\n                    }\r\n                }\r\n            }\r\n            \r\n            recoverPassword(form) {\r\n                if (form.valid) {\r\n                    this.showSpinnerClick=true;\r\n                    this.emailErrorRecover = false;\r\n                    let recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.modelRecover.Email).subscribe(result => {\r\n                        if (result.selected) {\r\n                            this.modelRecover.Email = \"\";\r\n\r\n                            this.recoverPasswordFailed = false;\r\n                            this.recoverPasswordSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.recoverPasswordFailed = true;\r\n                            this.recoverPasswordSuccess = false;\r\n                        }\r\n                        this.showSpinnerClick=false;\r\n                    });\r\n\r\n                    this.subManager.add(recoverPassSub);\r\n                }\r\n\r\n                else if (!form.valid) {\r\n                    if (form.form.controls.email.valid == false) {\r\n                        this.emailErrorRecover = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            ngOnDestroy() {\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/user-login.component.ts","//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { RecoverPasswordService } from \"./../../../../services/cms/recover-password.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    template: \"\"\r\n})\r\n\r\nexport class UserPasswordComponent implements OnInit {\r\n\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private recoverPasswordService: RecoverPasswordService,\r\n            private languageService: LanguageService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private seo: SeoService,\r\n            private renderer: Renderer,\r\n            @Inject(DOCUMENT) private document: any,\r\n            private scriptService: ScriptService\r\n        ) { }\r\n\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n    ngOnInit() {\r\n        let header: any;\r\n        \r\n        let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n            header = result;\r\n            let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n                if (result1.Categories) {\r\n                    header.Categories = result1.Categories;\r\n\r\n                }\r\n            });\r\n            this.subManager.add(SideMenuData);\r\n        });\r\n        this.subManager.add(headDataSub);\r\n        let recoverPassSub = this.recoverPasswordService.getRecoverPasswordData(this.lang).subscribe(result => {\r\n            if (result.SeoInformation) {\r\n                result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n                result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n            }\r\n          \r\n            if (this.isBrowser) {\r\n                //Creating subcomponent whith the result  to inject\r\n                let subComponent = this.createSubComponent(result, header);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            }\r\n            else {\r\n                //-- Get head and body scripts\r\n                this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userRecoverPasswordId);\r\n\r\n                //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n                this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n                this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n            }\r\n        });\r\n        this.subManager.add(recoverPassSub);\r\n\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any,header:any) {\r\n        @Component({\r\n            template: result.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private recoverPasswordService: RecoverPasswordService,\r\n                    private seoService: SeoService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private _elementRef: ViewContainerRef,\r\n                    private scriptService: ScriptService,\r\n                    private routesService: RoutesService,\r\n                    private breadcrumbsService: BreadcrumbsService\r\n                ) { }\r\n\r\n            private recoverPasswordFailed: boolean = false;\r\n            private recoverPasswordSuccess: boolean = false;\r\n            private seoInfo: SeoViewModel = result.SeoInformation;\r\n            private pageIsInit: boolean = false;\r\n            private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n            private showSpinnerClick: boolean = false;\r\n            footerData: any = result.footerData;\r\n            headerData: any = header;\r\n            \r\n\r\n\r\n            private model =\r\n                {\r\n                    Email: \"\"\r\n                };\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                //this.headerData.Categories=SideMenu.Categories;\r\n                this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs)\r\n                //setTimeout(x => , 1);\r\n            }\r\n\r\n            onSubmit(form) {\r\n                if (form.valid) {\r\n                    this.showSpinnerClick=true;\r\n                    let recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.model.Email).subscribe(result => {\r\n                        if (result.selected) {\r\n                            this.recoverPasswordFailed = false;\r\n                            this.recoverPasswordSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.recoverPasswordFailed = true;\r\n                            this.recoverPasswordSuccess = false;\r\n                        }\r\n                        this.showSpinnerClick=false;\r\n                    });\r\n\r\n                    this.subManager.add(recoverPassSub);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Set title, setup google analytics and other libraries \r\n                this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n                //hiding of loading panel after we get all data we need\r\n                this.routesService.hidePageLoader();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/user-password.component.ts","import { SeoViewModel } from \"../core/seo\";\r\nexport class News {\r\n    Id: number;\r\n    Title: string;\r\n    Text: string;\r\n    TemplateUrl: string;\r\n    Description: string;\r\n    ImageUrl: string;\r\n    Date: Date;\r\n    FormattedDate: string;\r\n    SeoUrl: string;\r\n    RouterLink: any[];\r\n    Lang: string;\r\n    IdRow: number;\r\n    IdCategory: number;\r\n    Name_Category: string;\r\n    CategoryRouterLink: string;\r\n    ImageHeader: string;\r\n}\r\n\r\nexport class NewsDetails {\r\n    Id: number;\r\n    Title: string;\r\n    LongDescription: string;\r\n    HeaderImage: string;\r\n    Date: Date;\r\n    FormattedDate: string;\r\n    TemplateUrl: string;\r\n    TemplateHtml: string;\r\n    Author: string;\r\n    SliderImages: SliderViewModel[];\r\n    SeoInformation: SeoViewModel;\r\n    Lang: string;\r\n    SeoUrl: string;\r\n    RouterLink: any[];\r\n    ArticleCategories: Array<ArticleCategory>;\r\n    BreadcrumbsInfo:any;\r\n    UrlRedirect: string=\"\";\r\n    FooterData: any;\r\n    HeaderData: any;\r\n}\r\n\r\nexport class SliderViewModel {\r\n    SliderUrl: string;\r\n}\r\nexport class ArticleCategory {\r\n    Name: string;\r\n    Id: number;\r\n    DefaultValue: number;\r\n    Code_Category: string;\r\n    CategorySystem: boolean;\r\n    ShowCategory: boolean;\r\n    SeoUrl: string;\r\n    HeaderImage: string;\r\n    ShortDescription: string;\r\n    LongDescription: string;\r\n    RouterLink: any[];\r\n    TemplateUrl: string;\r\n    TemplateHtml: string;\r\n    Lang: string;\r\n    Image: string;\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/news-list.ts","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping'\r\nimport { AuthService } from '../core/auth.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class CmsContentService \r\n{\r\n     constructor\r\n     (\r\n      public _api: ApiService, \r\n      public _cache: CacheService, \r\n      private authService: AuthService,\r\n      private mappings: Mappings,\r\n      private ShoppingCartService: ShoppingCartService\r\n\r\n    ) {}\r\n\r\n  //whatever domain/feature method name\r\n\r\n  // public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n  getCmsPageById(lang:string, pageId: string) \r\n  {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n\r\n    let url =  this.mappings.Web_Api_Menu_GetCmsPageById\r\n    .replace('{customerid}',customerId)\r\n    .replace('{lang}',lang)\r\n    .replace('{id}',pageId)\r\n    .replace('{cartid}', cartId);\r\n\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n    // public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n\r\n  getCmsPageByUrl(lang:string, pageUrl: string) \r\n  {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n\r\n    let url =  this.mappings.Web_Api_Menu_GetCmsPageByUrl\r\n    .replace('{customerid}',customerId)\r\n    .replace('{lang}',lang)\r\n    .replace('{url}',pageUrl)\r\n    .replace('{cartid}', cartId);\r\n\r\n\r\n    return this._api.get(url);\r\n  }  \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-content.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { Menu } from \"./../../models/cms/menu\";\r\n\r\n@Injectable()\r\nexport class CmsMenuListService \r\n{\r\n    constructor\r\n    (\r\n        public _api: ApiService, \r\n        public _cache: CacheService,\r\n        private mappings: Mappings\r\n    ) {}\r\n\r\n    private setPageUrl(menus) \r\n    {\r\n        for (let index in menus) \r\n        {\r\n            if (menus[index].SeoUrl != undefined &&\r\n                menus[index].SeoUrl != null &&\r\n                menus[index].SeoUrl != \"\") {\r\n                menus[index].Url = \"/\" + menus[index].SeoUrl;\r\n            } \r\n            else \r\n            {\r\n                menus[index].Url = '/cms/' + menus[index].Id;\r\n            }\r\n\r\n            if (menus[index].Children !== undefined && menus[index].Children.length > 0) \r\n            {\r\n                this.setPageUrl(menus[index].Children);\r\n            }\r\n        }\r\n    }\r\n\r\n    LoadData(pageId: string, lang: string) \r\n    {\r\n        let url =  this.mappings.Web_Api_Get_Cms_Menu_List\r\n        .replace('{id}',pageId)\r\n        .replace('{lang}',lang);\r\n        let key = url;\r\n\r\n        return this._api.get(url)\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-menu-list.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { News } from \"./../../models/cms/news-list\";\r\nimport { AuthService } from '../core/auth.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class FaqListService \r\n{\r\n  constructor\r\n  (\r\n    public _api: ApiService, \r\n    public _cache: CacheService,\r\n    private mappings: Mappings,\r\n    private ShoppingCartService: ShoppingCartService,\r\n    private authService: AuthService,\r\n\r\n  ) {}\r\n\r\n  getFaqData(lang: string) \r\n  {\r\n    let userid = this.authService.GetUserId();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Get_FaqData\r\n      .replace('{lang}', lang)\r\n      .replace('{userid}',userid)\r\n      .replace('{cartid}', cartId);\r\n    \r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/faq.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { InfoRequest } from \"./../../models/cms/info-request\";\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class InfoRequestService \r\n{\r\n    constructor\r\n    (\r\n        public _api: ApiService, \r\n        public _cache: CacheService,\r\n        private mappings: Mappings,\r\n        private cartService: ShoppingCartService,\r\n        private authService: AuthService,\r\n    ) {}\r\n\r\n    sendInfoRequest(parameters: InfoRequest) \r\n    {\r\n        return this._api.post(this.mappings.Web_Api_Post_Send_Info_Request, parameters)\r\n            .do(result => result)\r\n            .share();\r\n    }\r\n\r\n\r\n    getInfoRequestData(lang: string) \r\n    {\r\n        let customerId = this.authService.GetUserId();\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Get_Info_Request_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}',customerId)\r\n            .replace('{cartid}', cartId);\r\n        return this._api.get(url);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/info-request.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { SliderViewModel } from \"./../../models/cms/cms-page\";\r\n\r\n@Injectable()\r\nexport class SliderService \r\n{\r\n    constructor\r\n    (\r\n        public _api: ApiService, \r\n        public _cache: CacheService,\r\n        private mappings: Mappings\r\n    ) {}\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/slider.service.ts","import { Injectable } from '@angular/core';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from './language.service';\r\n\r\n@Injectable()\r\nexport class TrustpilotService {\r\n    constructor\r\n        (\r\n            public _api: ApiService,\r\n            public _cache: CacheService,\r\n            private mappings: Mappings,\r\n            private languageService: LanguageService\r\n        ) { }\r\n\r\n\r\n    getTrustpilotData(type: string) {\r\n        let lang = this.languageService.getLongLang();\r\n        let url = this.mappings.Web_Api_Get_Trustpilot_Data.replace('{type}', type).replace('{lang}', lang);\r\n\r\n        return this._api.get(url);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/trustpilot.service.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class CookiePolicyService {\r\n\r\n    constructor(\r\n        public _api: ApiService,\r\n        private mappings: Mappings,\r\n        public ShoppingCartService: ShoppingCartService,\r\n        private authService: AuthService) {\r\n    }\r\n\r\n    getCookiePolicyData(lang: string) {\r\n\r\n        let cartId = this.ShoppingCartService.getCartId();\r\n        let userId = this.authService.getCurrentUserId();\r\n\r\n        let url = this.mappings.Web_Api_Get_Cookie_Policy_Data\r\n        .replace('{lang}', lang)\r\n        .replace('{cartid}', cartId)\r\n        .replace('{userid}', userId);\r\n        let key = url;\r\n\r\n        return this._api.get(url);\r\n    }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie-policy.service.ts","import { CookieOptionsArgs } from './cookie-options-args';\r\n\r\nexport class CookieOptions {\r\n  public path: string;\r\n  public domain: string;\r\n  public expires: string|Date;\r\n  public secure: boolean;\r\n\r\n  constructor({path, domain, expires, secure}: CookieOptionsArgs = {}) {\r\n    this.path = this.isPresent(path) ? path : null;\r\n    this.domain = this.isPresent(domain) ? domain : null;\r\n    this.expires = this.isPresent(expires) ? expires : null;\r\n    this.secure = this.isPresent(secure) ? secure : false;\r\n  }\r\n\r\n  public merge(options?: CookieOptionsArgs): CookieOptions {\r\n    return new CookieOptions(<CookieOptionsArgs>{\r\n      path: this.isPresent(options) && this.isPresent(options.path) ? options.path : this.path,\r\n      domain: this.isPresent(options) && this.isPresent(options.domain) ? options.domain : this.domain,\r\n      expires: this.isPresent(options) && this.isPresent(options.expires) ? options.expires : this.expires,\r\n      secure: this.isPresent(options) && this.isPresent(options.secure) ? options.secure : this.secure,\r\n    });\r\n  }\r\n\r\n  private isPresent(obj: any): boolean {\r\n    return obj !== undefined && obj !== null;\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-options.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class PrivacyPolicyService {\r\n\r\n    constructor(\r\n        public _api: ApiService,\r\n        private mappings: Mappings,\r\n        private cartService: ShoppingCartService,\r\n        private authService: AuthService,) {\r\n    }\r\n\r\n    getPrivacyPolicyData(lang: string) {\r\n       \r\n        let customerId = this.authService.GetUserId();\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Get_Privacy_Policy_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}',customerId)\r\n \t        .replace('{cartid}', cartId);\r\n        let key = url;\r\n\r\n        return this._api.get(url);\r\n    }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/privacy-policy.service.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class PurchaseConditionService {\r\n\r\n    constructor(\r\n        public _api: ApiService,\r\n        private mappings: Mappings,\r\n        private cartService: ShoppingCartService,\r\n        private authService: AuthService,) {\r\n    }\r\n\r\n    getPurchaseConditionServiceData(lang: string) {\r\n        let customerId = this.authService.GetUserId();\r\n        let cartId = this.cartService.getCartId();\r\n\r\n        let url = this.mappings.Web_Api_Get_Purchase_Condition_Data\r\n            .replace('{lang}', lang)\r\n            .replace('{userid}',customerId)\r\n \t        .replace('{cartid}', cartId);;\r\n        let key = url;\r\n\r\n        return this._api.get(url);\r\n    }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/purchase-condition.service.ts","//Angular\r\nimport { Component, Injectable } from \"@angular/core\";\r\n\r\n//Components\r\nimport { HomeComponent } from \"../../components/cms/homepage/sys/home.component\";\r\nimport { FaqComponent } from \"../../components/cms/page/sys/faq.component\";\r\nimport { CookiePolicyComponent } from \"../../components/cms/page/sys/cookie-policy.component\";\r\nimport { PrivacyPolicyComponent } from \"../../components/cms/page/sys/privacy-policy.component\";\r\nimport { PurchaseConditionComponent } from \"../../components/cms/page/sys/purchase-condition.component\";\r\nimport { InfoRequestComponent  } from \"../../components/cms/page/sys/info-request.component\";\r\nimport { UserLoginComponent } from \"../../components/settings/user/sys/user-login.component\";\r\nimport { UserPasswordComponent } from \"../../components/settings/user/sys/user-password.component\";\r\nimport { RegisterComponent } from \"../../components/settings/user/sys/register.component\";\r\nimport { CmsPageComponent } from \"../../components/cms/page/sys/cms-page.component\";\r\nimport { CategoryComponent } from \"../../components/inventory/category/sys/category.component\";\r\nimport { ProductDetailsComponent } from \"../../components/inventory/product/sys/product-details.component\";\r\nimport { ProductPageListComponent } from \"../../components/inventory/product/sys/product-page-list.component\";\r\nimport { PromotionsComponent } from \"../../components/inventory/product/sys/promotions.component\";\r\nimport { ArticleComponent } from \"../../components/cms/article/sys/news-page.component\";\r\nimport { OtherProductComponent } from \"../../components/inventory/product/sys/other-product.component\";\r\nimport { BlogPageComponent } from \"../../components/cms/article/sys/blog-page.component\";\r\nimport { ArticleCategoryComponent } from \"../../components/cms/article/sys/article-category.component\";\r\nimport { ClientAreaHomeComponent } from \"../../components/settings/client-area/sys/client-area-home.component\";\r\nimport { ClientAreaOrderListComponent } from \"../../components/document/sys/client-area-order-list.component\";\r\nimport { ClientAreaProfileComponent } from \"../../components/settings/client-area/sys/client-area-profile.component\";\r\nimport { CartComponent } from \"../../components/inventory/shopping-cart/sys/cart.component\";\r\nimport { CartCashComponent } from \"../../components/inventory/shopping-cart/sys/cart-cash.component\";\r\nimport { CartSubmittedComponent } from \"../../components/inventory/shopping-cart/sys/cart-submitted.component\";\r\nimport { CartEmptyPageComponent } from \"../../components/core/sys/cart-empty-page.component\";\r\nimport { ClientAreaOrderDetailsComponent } from '../../components/settings/client-area/sys/client-area-order-details.component';\r\nimport { ClientAreaCatalogPrivateComponent } from '../../components/settings/client-area/sys/client-area-catalog-private.component';\r\nimport { RoutesService } from \"../../services/core/routes.service\";\r\nimport { RegistrationConfirmationComponent } from \"../../components/settings/user/sys/registration-confirmation.component\";\r\nimport { OfflinePageComponent } from \"../../components/core/sys/offline-page.component\";\r\nimport { PaymentConfirmationComponent } from \"../../components/settings/client-area/sys/payment-confirmation.component\";\r\nimport { PaymentUnicreditConfirmationComponent } from \"../../components/settings/client-area/sys/payment-unicredit-confirmation.component\";\r\nimport { PaymentNexiConfirmationComponent } from \"../../components/settings/client-area/sys/payment-nexi-confirmation.component\";\r\nimport { PaymentBancaSellaConfirmationComponent } from \"../../components/settings/client-area/sys/payment-banca-sella-confirmation.component\";\r\nimport { NotFoundPageComponent } from \"../../components/core/sys/not-found-page.component\";\r\nimport { SearchComponent } from \"../../components/cms/header/widget/search.component\";\r\nimport { ClientAreaInvoicesComponent } from \"../../components/settings/client-area/sys/client-area-invoices.component\";\r\nimport { NewsletterConfirmationPageComponent } from './../../components/cms/page/sys/newsletter-confirmation-page.component';\r\nimport { NewsletterPageComponent } from './../../components/cms/page/sys/newsletter-page.component';\r\nimport { RegistrationConfirmationPageComponent } from './../../components/settings/user/sys/registration-complete.component';\r\nimport { QuickRegistrationComponent } from \"../../components/settings/user/sys/quick-registration.component\";\r\n\r\n@Injectable()\r\nexport class SysConfig {\r\n\r\n  constructor() {\r\n  }    \r\n\r\n    static getComponentByName(componentName) {\r\n        let component: any;\r\n\r\n        switch (componentName) {\r\n            case 'HomeComponent': component = HomeComponent; break;\r\n            case 'FaqComponent': component = FaqComponent; break;\r\n            case 'ClientAreaHomeComponent': component = ClientAreaHomeComponent; break;\r\n            case 'PrivacyPolicyComponent': component = PrivacyPolicyComponent; break;\r\n            case 'CookiePolicyComponent': component = CookiePolicyComponent; break;\r\n            case 'PurchaseConditionComponent': component = PurchaseConditionComponent; break;\r\n            case 'InfoRequestComponent': component = InfoRequestComponent; break;\r\n            case 'UserLoginComponent': component = UserLoginComponent; break;\r\n            case 'UserPasswordComponent': component = UserPasswordComponent; break;\r\n            case 'RegisterComponent': component = RegisterComponent; break;\r\n            case 'CmsPageComponent': component = CmsPageComponent; break;\r\n            case 'CategoryComponent': component = CategoryComponent; break;\r\n            case 'ProductDetailsComponent': component = ProductDetailsComponent; break;\r\n            case 'ProductPageListComponent': component = ProductPageListComponent; break;\r\n            case 'PromotionsComponent': component = PromotionsComponent; break;\r\n            case 'ArticleComponent': component = ArticleComponent; break;\r\n            case 'OtherProductComponent': component = OtherProductComponent; break;\r\n            case 'BlogPageComponent': component = BlogPageComponent; break;\r\n            case 'ArticleCategoryComponent': component = ArticleCategoryComponent; break;\r\n            case 'ClientAreaOrderListComponent': component = ClientAreaOrderListComponent; break;\r\n            case 'ClientAreaInvoicesComponent': component = ClientAreaInvoicesComponent; break;            \r\n            case 'ClientAreaProfileComponent': component = ClientAreaProfileComponent; break;\r\n            case 'CartComponent': component = CartComponent; break;\r\n            case 'CartCashComponent': component = CartCashComponent; break;\r\n            case 'CartSubmittedComponent': component = CartSubmittedComponent; break;\r\n            case 'CartEmptyPageComponent': component = CartEmptyPageComponent; break;\r\n            case 'ClientAreaOrderDetailsComponent': component = ClientAreaOrderDetailsComponent; break;\r\n            case 'ClientAreaCatalogPrivateComponent': component = ClientAreaCatalogPrivateComponent; break;\r\n            case 'RegistrationConfirmationComponent': component = RegistrationConfirmationComponent; break;\r\n            case 'PaymentConfirmationComponent' : component = PaymentConfirmationComponent; break;\r\n            case 'PaymentUnicreditConfirmationComponent' : component = PaymentUnicreditConfirmationComponent; break;\r\n            case 'PaymentNexiConfirmationComponent' : component = PaymentNexiConfirmationComponent; break;\r\n            case 'PaymentBancaSellaConfirmationComponent' : component = PaymentBancaSellaConfirmationComponent; break;\r\n            case 'OfflinePageComponent': component = OfflinePageComponent; break;\r\n            case \"NotFoundPageComponent\": component = NotFoundPageComponent; break;\r\n            case \"SearchComponent\": component = SearchComponent; break;\r\n            case \"NewsletterPageComponent\": component = NewsletterPageComponent; break;\r\n            case \"NewsletterConfirmationPageComponent\": component = NewsletterConfirmationPageComponent; break;   \r\n            case \"RegistrationConfirmationPageComponent\": component = RegistrationConfirmationPageComponent; break;   \r\n            case \"QuickRegistrationComponent\": component = QuickRegistrationComponent; break;                              \r\n            default:\r\n                component = null;\r\n        }\r\n        return component;\r\n    }\r\n\r\n\r\n    static getAllComponents() {\r\n        return [\r\n            HomeComponent,\r\n            FaqComponent,\r\n            ClientAreaHomeComponent,\r\n            PrivacyPolicyComponent,\r\n            CookiePolicyComponent,\r\n            PurchaseConditionComponent,\r\n            InfoRequestComponent,\r\n            UserLoginComponent,\r\n            UserPasswordComponent,\r\n            RegisterComponent,\r\n            CmsPageComponent,\r\n            CategoryComponent,\r\n            ProductDetailsComponent,\r\n            ProductPageListComponent,\r\n            PromotionsComponent,\r\n            ArticleComponent,\r\n            OtherProductComponent,\r\n            BlogPageComponent,\r\n            ArticleCategoryComponent,\r\n            ClientAreaOrderListComponent,\r\n            ClientAreaInvoicesComponent,\r\n            ClientAreaProfileComponent,\r\n            CartComponent,\r\n            CartCashComponent,\r\n            CartSubmittedComponent,\r\n            CartEmptyPageComponent,\r\n            ClientAreaOrderDetailsComponent,\r\n            ClientAreaCatalogPrivateComponent,\r\n            RegistrationConfirmationComponent,\r\n            PaymentConfirmationComponent,\r\n            PaymentUnicreditConfirmationComponent,\r\n            PaymentNexiConfirmationComponent,\r\n            PaymentBancaSellaConfirmationComponent,\r\n            OfflinePageComponent,\r\n            NotFoundPageComponent,\r\n            SearchComponent,\r\n            NewsletterPageComponent,\r\n            NewsletterConfirmationPageComponent,\r\n            RegistrationConfirmationPageComponent,\r\n            QuickRegistrationComponent\r\n        ];\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/system-configuration.service.ts","import { CryptoService } from './../core/crypto.service';\r\nimport { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { PlatformLocation } from '@angular/common'\r\nimport { Subject } from 'rxjs';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { Http, Headers, RequestOptionsArgs} from '@angular/http';\r\n\r\ndeclare var CustomersCanvas: any;\r\n\r\n@Injectable()\r\nexport class CustomersCanvasService {\r\n    constructor\r\n        (\r\n            public _api: ApiService,\r\n            private location: PlatformLocation,\r\n            private mappings: Mappings,\r\n            private http: Http,\r\n            private cryptoService: CryptoService\r\n        ) {\r\n    }\r\n\r\n    // Observable string sources\r\n    private isCanvasModalOpenedSource = new Subject<boolean>();\r\n    private isCanvasProductDesignApprovedSource = new Subject<boolean>();\r\n    // Observable string streams\r\n    isCanvasModalOpened$ = this.isCanvasModalOpenedSource.asObservable();\r\n    isCanvasProductDesignApproved$ = this.isCanvasProductDesignApprovedSource.asObservable();\r\n\r\n    public toShowCanvasContainer = false;\r\n\r\n    //Object containing data generated by getProofImages.\r\n    approveData = null;\r\n    //Object containing data generated by finishProductDesign.\r\n    renderData = null;\r\n    //Object containing data generated by saveProduct.\r\n    saveData = null;\r\n    editor = null;\r\n    loadData = null;\r\n    currentPage = \"design\";\r\n    workflowPages = {};\r\n    documentLinks: string[] = [\"\"];\r\n\r\n    // Service canvas state / if it is opened or closed \r\n    setCanvasState(isOpened: boolean) {\r\n        this.isCanvasModalOpenedSource.next(isOpened);\r\n    }\r\n\r\n    // Service canvas state / if product design is approved or not\r\n    setCanvasProductDesignState(isApproved: boolean) {\r\n        this.isCanvasProductDesignApprovedSource.next(isApproved);\r\n    }\r\n\r\n    //load a script and after it is loaded, instantiate an canvas iframe\r\n    public openCanvasEditor(canvasInfo: any, isStateId: boolean) {\r\n        const canvasUrl = this.cryptoService.decryptString(canvasInfo.CanvasUrl);\r\n\r\n        if (canvasUrl != \"\") {\r\n            const canvasScript = document.querySelector('script[src=\\\"' + canvasUrl + '\\\"]');\r\n            // set canvas state as opened, so inside of components we know when to stick and when unstick some divs\r\n            this.setCanvasState(true);\r\n\r\n            // if script is already loaded, don't append it again\r\n            if (canvasScript == null) {\r\n                let node = document.createElement('script');\r\n                node.src = canvasUrl;\r\n                node.setAttribute(\"id\", \"CcIframeApiScript\");\r\n                node.type = 'text/javascript';\r\n                node.async = true;\r\n                node.charset = 'utf-8';\r\n\r\n                // to display canvas container\r\n                this.toShowCanvasContainer = true;\r\n\r\n                // after script is loaded, instantiate canvas iframe\r\n                node.onload = () => {\r\n                    this.instanciateIframe(canvasInfo, isStateId);\r\n                };\r\n\r\n                document.getElementsByTagName('head')[0].appendChild(node);\r\n            }\r\n            else {\r\n                this.instanciateIframe(canvasInfo, isStateId);\r\n            }\r\n        }\r\n    }\r\n\r\n    public instanciateIframe(canvasInfo: any, isStateId: boolean) {\r\n        const templateImagesFolderPath = canvasInfo.TemplateImagesFolderPath;\r\n        const canvasUserUsername = canvasInfo.CustomerCanvasUserName;\r\n        const watermark = canvasInfo.Watermark;\r\n        \r\n        // defining product folder path\r\n        let productDefinition;\r\n        if (isStateId) {\r\n            // getting design by state id\r\n            productDefinition = canvasInfo.CanvasStateId;\r\n        }\r\n        else {\r\n            productDefinition = { surfaces: templateImagesFolderPath }\r\n        }\r\n\r\n        // const productDefinition = { surfaces: { designFolder: productFolderPath } };\r\n        const editorFrame = document.getElementById(\"editorFrame\");\r\n\r\n        const configuration = {\r\n            userId: canvasUserUsername,\r\n            initialMode: \"Advanced\",\r\n            watermark: {\r\n                text: {\r\n                    text: watermark,\r\n                    opacity: 0.3\r\n                }\r\n            },\r\n            widgets:\r\n            {\r\n                // To disable a download button when the project is in the production\r\n                FinishButton: { mode: \"Disabled\" },\r\n                GalleryDialog: {\r\n                    defaultTabName: \"User\",\r\n                    tabs: [\r\n                        {\r\n                            name: \"User\",\r\n                            type: \"user\",\r\n                            translationKey: \"GalleryDialog.TAB_USER\",\r\n                            canEdit: true,\r\n                            canUpload: true\r\n                        },\r\n                        {\r\n                            name: \"Public\",\r\n                            type: \"public\",\r\n                            subFolderName: \"\",\r\n                            translationKey: \"GalleryDialog.TAB_PUBLIC\",\r\n                            canEdit: false\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        };\r\n\r\n        CustomersCanvas.IframeApi.loadEditor(editorFrame, productDefinition, configuration)\r\n            .then(e => {\r\n                this.editor = e;\r\n            }\r\n            )\r\n            //If there was an error thrown when loading the editor.\r\n            .catch(error => {\r\n                if (error != null) {\r\n                    this.loadData = this.handleError(error, \"Load failed with exception: \");\r\n                }\r\n            });\r\n    }\r\n\r\n    saveCanvasProduct() {\r\n        this.editor.saveProduct()\r\n            //If the product has been successfully saved.\r\n            .then(result => {\r\n                //Saving the product state info.\r\n                this.saveData = result;\r\n            })\r\n            //If there was an error thrown when saving the product.\r\n            .catch(error => {\r\n                this.saveData = this.handleError(error, \"Save failed with exception: \");\r\n            });\r\n    }\r\n\r\n    getImagesLinks(editorPage, approvePage, finishOrderPage) {\r\n        this.workflowPages = {\r\n            \"design\": { elements: editorPage },\r\n            \"approve\": { elements: approvePage },\r\n            \"finish\": { elements: finishOrderPage }\r\n        }\r\n        this.documentLinks = [];\r\n\r\n        if (this.editor) {\r\n            this.editor.getProofImages()\r\n                //If proof images have been successfully received.\r\n                .then(result => {\r\n                    //Saving proof images info.\r\n                    this.approveData = result;\r\n                    // add all links to images to the documentLinks, because we will use that list for element manipulation later\r\n                    if (this.approveData.proofImageUrls) {\r\n                        this.approveData.proofImageUrls.forEach(element => {\r\n                            if (element.length > 0) {\r\n                                this.documentLinks.push(element[0]);\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    //Go to the approval page.\r\n                    this.setupPage(\"approve\");\r\n                    this.setBackgroundImagesUrl();\r\n                })\r\n                //If there was an error thrown while getting the proof images.\r\n                .catch(error => {\r\n                    this.approveData = this.handleError(error, \"Getting proof images failed with exception: \");\r\n                });\r\n        }\r\n    }\r\n\r\n    //img tags inside of slider are later changed to be divs with background image url property, so we need to manage that\r\n    setBackgroundImagesUrl() {\r\n        let sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n\r\n        // because we can't use *ngFor to create as many elements as we need, we need to remove one li element if there is actually only one element we get from customer canvas(we have 2 elements in html)\r\n        if (sliderImageElements.length > this.documentLinks.length) {\r\n            let differenceItems = sliderImageElements.length - this.documentLinks.length;\r\n            for (let index = 1; index <= differenceItems; index++) {\r\n                const element = sliderImageElements[sliderImageElements.length - index];\r\n                //remove li parent of element we found\r\n                const parentLi = $(element).parents(\"li\");\r\n                $(parentLi)[0].remove();\r\n            }\r\n        }\r\n\r\n        //because we can't use angular binding with slider plugin (plugin is initialized before service), we need to set url and src attributes of each slide\r\n        if (this.documentLinks && this.documentLinks.length > 0) {\r\n            sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n\r\n            for (let index = 0; index < this.documentLinks.length; index++) {\r\n                const link = this.documentLinks[index];\r\n                const foundDomElement = $(sliderImageElements)[index];\r\n\r\n                if (foundDomElement) {\r\n                    $(foundDomElement).css('background-image', 'url(' + link + ')');\r\n                    $(foundDomElement).attr(\"src\", link);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    finishProductCustomization() {\r\n        return this.editor.finishProductDesign()\r\n    }\r\n\r\n    setupPageAfterProductCustomization(renderData: any, isError: boolean) {\r\n        if (!isError) {\r\n            this.renderData = renderData;\r\n        }\r\n        else {\r\n            this.renderData = this.handleError(renderData, \"Product customization completion failed with exception: \");\r\n        }\r\n    }\r\n\r\n    openDocumentInNewTab() {\r\n        let sliderElements = $(\"#approvePage ul li\");\r\n\r\n        if (sliderElements.length > 0) {\r\n            for (let index = 0; index < sliderElements.length; index++) {\r\n                const element = sliderElements[index];\r\n                //if element has this class, it means it is active inside of slider, so we want to open that element in a new tab\r\n                if ($(element).hasClass(\"active-revslide\")) {\r\n                    window.open(this.documentLinks[index], \"_blank\");\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    openNewProductInEditor() {\r\n        if (this.editor != null) {\r\n            this.editor.revertProduct();\r\n            this.setupPage(\"design\");\r\n        }\r\n    }\r\n\r\n    reopenProductInEditor() {\r\n        this.setupPage(\"design\");\r\n    }\r\n\r\n    // set details of view we want to show and set layout properties depending on view\r\n    setupPage(page) {\r\n        const destPageData = this.workflowPages[page];\r\n\r\n        if (this.workflowPages[this.currentPage]) {\r\n            const elements = this.workflowPages[this.currentPage].elements;\r\n            if (elements && elements.nativeElement && elements.nativeElement.id) {\r\n                // getting id of element that needs to be hidden\r\n                const generatedIdHide = `#${elements.nativeElement.id}`;\r\n                $(generatedIdHide).fadeOut(() => {\r\n                    if (destPageData && destPageData.elements && destPageData.elements.nativeElement && destPageData.elements.nativeElement.id) {\r\n                        // getting id of element that needs to be shown\r\n                        const generatedIdShow = `#${destPageData.elements.nativeElement.id}`\r\n                        $(generatedIdShow).show();\r\n\r\n                        this.currentPage = page;\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    }\r\n\r\n    handleError(error, message) {\r\n        console.error(message, error);\r\n        return error;\r\n    };\r\n\r\n\r\n    updatePrevCanvasInfo(canvasData: any) {\r\n        let url = this.mappings.Web_Api_Update_Prev_Canvas_Info;\r\n\r\n        const params = {\r\n            RowIdPrev: canvasData.RowIdPrev,\r\n            CanvasStateId: canvasData.stateId,\r\n            CanvasHiResOutputUrls: canvasData.hiResOutputUrls\r\n        }\r\n\r\n        return this._api.post(url, params);\r\n    }\r\n\r\n    // removing state from customers canvas\r\n    deleteCustomerCanvasState(canvasInfo) {\r\n        // const apiKey = '01b3ecc6-6423-4684-b469-f258afa87100';\r\n        const decryptedApiKey = this.cryptoService.decryptString(canvasInfo.CanvasApiKey);\r\n        const baseUrl = this.mappings.Canvas_Web_Api_Base_Url.replace('{apiKey}', decryptedApiKey);\r\n        \r\n        let url = baseUrl + this.mappings.Web_Api_Delete_Customers_Canvas_State;\r\n        url = url.replace('{userId}', canvasInfo.CustomerCanvasUserName).replace('{stateId}', canvasInfo.CanvasStateId);\r\n        const apiKeyFinal = `ApiKey_${decryptedApiKey}`;\r\n\r\n        // configure headers for creating a valid request\r\n        let options: RequestOptionsArgs = {};\r\n        options.headers = new Headers();\r\n\r\n        options.headers.append('X-CustomersCanvasAPIKey', apiKeyFinal);\r\n        options.headers.append('Content-Type', 'application/json');\r\n\r\n        return this.http.delete(url, options);\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/customerscanvas.service.ts","function webpackEmptyContext(req) {\n\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 466;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src async\n// module id = 466\n// module chunks = 0","\r\n/*\r\n * THIS IS TEMPORARY TO PATCH 2.1.1+ Core bugs\r\n */\r\n\r\n/* tslint:disable */\r\nlet __compiler__ = require('@angular/compiler');\r\nimport { __platform_browser_private__ } from '@angular/platform-browser';\r\nimport { __core_private__ } from '@angular/core';\r\nif (!__core_private__['ViewUtils']) {\r\n    __core_private__['ViewUtils'] = __core_private__['view_utils'];\r\n}\r\n\r\n\r\n\r\nif (__compiler__ && __compiler__.SelectorMatcher && __compiler__.CssSelector) {\r\n    (__compiler__).__compiler_private__ = {\r\n        SelectorMatcher: __compiler__.SelectorMatcher,\r\n        CssSelector: __compiler__.CssSelector\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/__workaround.browser.ts","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { UniversalModule, isBrowser, isNode } from 'angular2-universal/browser'; // for AoT we need to manually split universal packages\r\nimport { IdlePreload, IdlePreloadModule } from '@angularclass/idle-preload';\r\nimport { RequestOptions } from '@angular/http';\r\nimport { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';\r\n\r\nimport { AppModule, AppComponent } from './+app/app.module';\r\nimport { SharedModule } from './+app/shared/shared.module';\r\nimport { CacheService } from './+app/services/core/cache.service';\r\nimport { NodeLoggerService } from './+app/services/core/node-logger.service';\r\n\r\n// Will be merged into @angular/platform-browser in a later release\r\n// see https://github.com/angular/angular/pull/12322\r\nimport { Meta } from './+app/services/core/angular2-meta';\r\nimport { DefaultRequestOptions } from './+app/services/core/default-request-options';\r\nimport { CookieBrowserService } from './+app/services/core/cookie';\r\nimport { RoutesService } from './+app/services/core/routes.service';\r\nimport { RoutesBrowserService } from './+app/services/core/routes-browser.service';\r\nimport { ApiService } from './+app/services/core/api.service';\r\nimport { ApplicationService } from './+app/services/core/application.service';\r\nimport { TranslateStaticLoader } from './+app/services/multi-language/browser';\r\n\r\n// import * as LRU from 'modern-lru';\r\n\r\nexport function getLRU(lru?: any) {\r\n  // use LRU for node\r\n  // return lru || new LRU(10);\r\n  return lru || new Map();\r\n}\r\nexport function getRequest() {\r\n  // the request object only lives on the server\r\n  return { cookie: document.cookie };\r\n}\r\nexport function getResponse() {\r\n  // the response object is sent as the index.html and lives on the server\r\n  return {};\r\n}\r\n\r\nexport function TranslateStaticLoaderFactory(http, cache) {\r\n  return new TranslateStaticLoader(http, cache);\r\n}\r\n\r\n// TODO(gdi2290): refactor into Universal\r\nexport const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';\r\n\r\n@NgModule({\r\n  bootstrap: [ AppComponent ],\r\n  imports: [\r\n    UniversalModule,\r\n\r\n    FormsModule,\r\n    TranslateModule.forRoot({\r\n      loader: {\r\n        provide: TranslateLoader,\r\n        useFactory: (TranslateStaticLoaderFactory),\r\n        deps: [ApiService, ApplicationService]\r\n      }\r\n    }),\r\n    RouterModule.forRoot([], { useHash: false, preloadingStrategy: IdlePreload }),\r\n\r\n    IdlePreloadModule.forRoot(),\r\n    SharedModule.forRoot(),\r\n    AppModule\r\n  ],\r\n  providers: [\r\n    { provide: RequestOptions, useClass: DefaultRequestOptions },\r\n    { provide: 'CookieService', useClass: CookieBrowserService },\r\n    { provide: RoutesService, useClass: RoutesBrowserService },\r\n    { provide: 'isBrowser', useValue: isBrowser },\r\n    { provide: 'isNode', useValue: isNode },\r\n\r\n    { provide: 'req', useFactory: getRequest },\r\n    { provide: 'res', useFactory: getResponse },\r\n\r\n    { provide: 'LRU', useFactory: getLRU, deps: [] },\r\n\r\n    NodeLoggerService,\r\n    CacheService,\r\n\r\n    Meta\r\n  ]\r\n})\r\nexport class MainModule {\r\n  constructor(public cache: CacheService,\r\n              public nodeLogger: NodeLoggerService,\r\n              private routes: RoutesService,\r\n              private translate: TranslateService) {\r\n    // TODO(gdi2290): refactor into a lifecycle hook\r\n    this.doRehydrate();\r\n\r\n    this.translate.use(this.routes.getLang());\r\n\r\n    this.routes.loadRoutes();\r\n  }\r\n\r\n  doRehydrate() {\r\n    let defaultValue = {};\r\n    let serverCache = this._getCacheValue(CacheService.KEY, defaultValue);\r\n    this.cache.rehydrate(serverCache);\r\n  }\r\n\r\n  _getCacheValue(key: string, defaultValue: any): any {\r\n    // browser\r\n    const win: any = window;\r\n    if (win[UNIVERSAL_KEY] && win[UNIVERSAL_KEY][key]) {\r\n      let serverCache = defaultValue;\r\n      try {\r\n        serverCache = JSON.parse(win[UNIVERSAL_KEY][key]);\r\n        if (typeof serverCache !== typeof defaultValue) {\r\n          console.log('Angular Universal: The type of data from the server is different from the default value type');\r\n          serverCache = defaultValue;\r\n        }\r\n      } catch (e) {\r\n        console.log('Angular Universal: There was a problem parsing the server data during rehydrate');\r\n        serverCache = defaultValue;\r\n      }\r\n      return serverCache;\r\n    } else {\r\n      console.log('Angular Universal: UNIVERSAL_CACHE is missing');\r\n    }\r\n    return defaultValue;\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/browser.module.ts","import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class HelperService {\r\n\r\n    constructor() {}\r\n\r\n    //Return the name of a file, withouth extention, from a path \r\n    //Eg. \r\n    //Input:http://www.wscprinter.it/business-cards.jpg\r\n    //Output:business-cards\r\n    GetFileNameFromPath(filePath: string) \r\n    {\r\n        let fileName: string = \"\";\r\n        \r\n        if(filePath != null)\r\n        {\r\n            let split = filePath.split(\"/\");\r\n            if(split != null)\r\n            {\r\n                let pop = split.pop();\r\n\r\n                if(pop != null)\r\n                {\r\n                    fileName = pop.replace(/\\.[^/.]+$/, \"\");\r\n                }\r\n            }\r\n\r\n            return fileName;\r\n        }\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/helper.service.ts","import { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\nimport { SysConfig } from './system-configuration.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\n\r\n@Injectable()\r\nexport class RoutesService {\r\n  static COOKIE_LANG_KEY: string = 'CURRENT_LANG';\r\n\r\n  protected locales: string[];\r\n  protected browserLangs: string[];\r\n  protected visiblePageLoader: boolean = false;\r\n\r\n  constructor(protected router: Router,\r\n    protected translate: TranslateService,\r\n    protected cookie: CookieService,\r\n    protected location: Location,\r\n    protected isBrowser: boolean,\r\n    protected cache: CacheService) {\r\n  }\r\n\r\n  public loadRoutes() {\r\n  }\r\n\r\n  protected getRoutesWithComponents(rawRoutes) {\r\n    return rawRoutes.map((route) => {\r\n      if (route.component && 'string' === typeof route.component) {\r\n        return Object.assign({}, route, {\r\n          component: SysConfig.getComponentByName(route.component)\r\n        });\r\n      }\r\n      return route;\r\n    });\r\n  }\r\n\r\n  protected getOnlyOfflineRoutes(rawRoutes) {\r\n\r\n    //Keeping only the offline route\r\n    let offlineRawRoutes = []\r\n\r\n    for (let rowRoute of rawRoutes) {\r\n      if (rowRoute.name == \"OFFLINE\") {\r\n        let redirectToRoute = {\r\n          path: \"\",\r\n          redirectTo: rowRoute.path,\r\n          pathMatch: \"full\"\r\n        }\r\n\r\n        offlineRawRoutes.push(redirectToRoute);\r\n\r\n        let offlineRoute = {\r\n          path: rowRoute.path,\r\n          component: rowRoute.component,\r\n          name: rowRoute.name\r\n        }\r\n\r\n        offlineRawRoutes.push(offlineRoute);\r\n\r\n        let fallBackRoute = {\r\n          path: \"**\",\r\n          redirectTo: rowRoute.path\r\n        }\r\n\r\n        offlineRawRoutes.push(fallBackRoute);\r\n\r\n        break;\r\n      }\r\n      else {\r\n        continue;\r\n      }\r\n    }\r\n\r\n    return offlineRawRoutes;\r\n  }\r\n\r\n  public getLang(): string {\r\n    if (!this.locales) {\r\n      this.locales = this.cache.get('Locales');\r\n    }\r\n    let langFromUrl: string = null;\r\n    let langFromUrlMatch: RegExpMatchArray;\r\n    if (langFromUrlMatch = this.location.path().match(/^\\/(\\w{2})\\//)) {\r\n      langFromUrl = langFromUrlMatch[1];\r\n    }\r\n    let cookieLang: string = this.cookie.get(RoutesService.COOKIE_LANG_KEY);\r\n    if (langFromUrl && this.locales.find((existLang) => existLang === langFromUrl)) {\r\n      return langFromUrl;\r\n    }\r\n    if (cookieLang && this.locales.find((existLang) => existLang === cookieLang)) {\r\n      return cookieLang;\r\n    }\r\n    for (let existBrowserLang of this.browserLangs) {\r\n      if (this.locales.find((existLang) => existLang === existBrowserLang)) {\r\n        return existBrowserLang;\r\n      }\r\n    }\r\n    return this.locales[0];\r\n  }\r\n\r\n  public getRoutes(): any {\r\n\r\n  }\r\n\r\n  public getRoutePath(routeName: string): any {\r\n    let routes = this.getRoutes();\r\n    let routePath: string = \"\";\r\n\r\n\r\n\r\n    if (routes != undefined && routes != null) {\r\n\r\n      routes.filter(x => x.name == routeName).forEach(route => {\r\n        routePath = \"/\" + route.path;\r\n      });\r\n    }\r\n    //console.log(routes);\r\n    //console.log(routes.filter(x => x.name == routeName));\r\n    // for (let route of routes) {\r\n    //     //if the name of the route match the one give in input then the relative route path is returned\r\n    //     if (route.name == routeName) {\r\n    //         routePath = \"/\" + route.path;\r\n    //         break;\r\n    //     }\r\n    // }\r\n\r\n    if (routePath === \"\") {\r\n      routePath = \"/\";\r\n    }\r\n    return [routePath];\r\n  }\r\n\r\n  public getPage(routeName: string): any {\r\n    let routePath: string = \"/\";\r\n    if (routeName != \"\" || routeName != undefined) {\r\n      let routes = this.getRoutes();\r\n      if (routes != undefined) {\r\n        if (routes != undefined && routes != null) {\r\n\r\n          routes.filter(x => x.name == routeName).forEach(route => {\r\n            routePath = \"/\" + route.path;\r\n          });\r\n        }\r\n      }\r\n    }\r\n    return routePath;\r\n  }\r\n\r\n  showPageLoader() {\r\n    this.visiblePageLoader = true;\r\n  }\r\n\r\n  hidePageLoader() {\r\n    this.visiblePageLoader = false\r\n    // window.setTimeout(() =>\r\n    // this.visiblePageLoader = false, 1)\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/routes.service.ts","export class QuotingModel {\r\n    public formati: Array<Object>;\r\n    public formato: Array<Object>;\r\n    public categorieCarte: Array<Object>;\r\n    public categorieCarteCount: number = 0;\r\n    public categorieCarteInterno: Array<Object>;\r\n    public categorieCarteCopertina: Array<Object>;\r\n    public categorieCarteCopertinaCount: number = 0;\r\n    public carte1: Array<Object>;\r\n    public carte1Count: number = 0;\r\n    public carte2: Array<Object>;\r\n    public carte2Count: number = 0;\r\n    public colori1: Array<Object>;\r\n    public colori1Count: number = 0;\r\n    public colori2: Array<Object>;\r\n    public colori2Count: number = 0;\r\n    public grammature1: Array<Object>;\r\n    public grammature1Count: number = 0;\r\n    public grammature2: Array<Object>;\r\n    public grammature2Count: number = 0;\r\n    public plastificazioni1: Array<Object>;\r\n    public plastificazioni1Count: number = 0;\r\n    public plastificazioni2: Array<Object>;\r\n    public plastificazioni2Count: number = 0;\r\n    public piegature: Array<Object>;\r\n    public piegatureCount: number = 0;\r\n    public coloriStampaInterno: Array<Object>;\r\n    public materialiFlessibili: Array<Object>;\r\n    public materialiFlessibiliCount: number = 0;\r\n    public copie: Array<Object>;\r\n    public copieCount: number = 0;\r\n    public supportiRigidi: Array<Object>;\r\n    public supportiRigidiCount: number = 0;\r\n    public lavorazioniAccessorie: Array<MyLavorazioneAccessoria>;\r\n    public elettrosaldature: Array<Object>;\r\n    public elettrosaldatureCount: number = 0;\r\n    public tagli: Array<Object>;\r\n    public tagliCount: number = 0;\r\n    public coloriCarte: Array<Object>;\r\n    public copertine: Array<Object>;\r\n    public copertineCount: number = 0;\r\n    public coloriStampaCopertina: Array<Object>;\r\n    public rilegature: Array<Object>;\r\n    public rilegatureCount: number = 0;\r\n    public facciate: Array<Object>;\r\n    public facciateCount: number = 0;\r\n    public facciateComePagine: boolean;\r\n    public tipologieBusta: Array<Object>;\r\n    public tipologieBustaCount: number = 0;\r\n    public taglio: string;\r\n    public numCopie: string;\r\n    public idCopie: string;\r\n    public numSoggetti: string;\r\n    public numFacciate: string;\r\n    public idFacciate: string;\r\n    public categorieCarteId: number;\r\n    public categorieCarteIdCopertina: number;\r\n    public tipoCopie: string;\r\n    public minimoCopie: number;\r\n    public minimoFacciate: number;\r\n    public massimoFacciate: number;\r\n    public multiploFacciate: number = 0;\r\n    public tipoStampaCopertinaSoloFronte: boolean;\r\n    public tipoColoriOffset: string;\r\n    public plastificazioneInterno: string;\r\n    public cartacopertina: string;\r\n    public plastificazioneCopertina: string;\r\n    public soggettiMultipli: boolean;\r\n    public formatoPersonalizzato: boolean;\r\n    public massimoCopie: number;\r\n    public minimoBase: number;\r\n    public massimoBase: number;\r\n    public minimoAltezza: number;\r\n    public massimoAltezza: number;\r\n    public disposizione_asola: string;\r\n    public tipoFacciate: string;\r\n    public tipoTaglio: boolean;\r\n    public tipoStampaInternoSoloFronte: boolean;\r\n    public tipoCalcoloTaglio: string;\r\n    public listaRegole: Array<Regola>;\r\n    public listaRegoleGrammaturaFacciate: Array<any>;\r\n    public idCarte1: string;\r\n    public idCopertine: string;\r\n    public idCarte2: string;\r\n    public idPlastificazioni1: string;\r\n    public idPlastificazioni2: string;\r\n    public idRilegature: string;\r\n    public idFormati: string;\r\n    public idGrammature1: string;\r\n    public idGrammature2: string;\r\n    public idColori1: string;\r\n    public idColori2: string;\r\n    public idPiegature: string;\r\n    public idRifili: string;\r\n    public idTagli: string;\r\n    public idCategorieCarte1: string;\r\n    public idCategorieCarte2: string;\r\n    public stampa1_colori_fronte: string;\r\n    public stampa1_colori_retro: string;\r\n    public stampa2_colori_fronte: string;\r\n    public stampa2_colori_retro: string;\r\n    public copieIsValid: boolean = true;\r\n    public facciateIsValid: boolean = true;\r\n    public formatiIsValid: boolean = true;\r\n    public carte1IsValid: boolean = true;\r\n    public grammature1IsValid: boolean = true;\r\n    public carte2IsValid: boolean = true;\r\n    public grammature2IsValid: boolean = true;\r\n    public copertineIsValid: boolean = true;\r\n    public rilegatureIsValid: boolean = true;\r\n    public lavorazioniIsValid: boolean = true;\r\n    public copieMessage: string;\r\n    public facciateMessage: string;\r\n    public formatiMessage: string;\r\n    public carte1Message: string;\r\n    public grammature1Message: string;\r\n    public carte2Message: string;\r\n    public grammature2Message: string;\r\n    public copertineMessage: string;\r\n    public rilegatureMessage: string;\r\n    public taglioShowed: boolean = false;\r\n    public isTaglioVisible: boolean = false;\r\n    public valueStampaInternoSoloFronte: boolean;\r\n    public valueStampaCopertinaSoloFronte: boolean;\r\n    public calculationType: string;\r\n    public isWizardWithScontistica: boolean;\r\n    public formatoDescription: string;\r\n    public formatoImage: string;\r\n    public formatiShowInfo: boolean;\r\n    public formatiHasInfo: boolean;\r\n    public carte1Description: string;\r\n    public carte1Image: string;\r\n    public carte1ShowInfo: boolean;\r\n    public carte1HasInfo: boolean;\r\n    public carte2Description: string;\r\n    public carte2Image: string;\r\n    public carte2ShowInfo: boolean;\r\n    public carte2HasInfo: boolean;\r\n    public plastificazioni1Description: string;\r\n    public plastificazioni1Image: string;\r\n    public plastificazioni1ShowInfo: boolean;\r\n    public plastificazioni1HasInfo: boolean;\r\n    public plastificazioni2Description: string;\r\n    public plastificazioni2Image: string;\r\n    public plastificazioni2ShowInfo: boolean;\r\n    public plastificazioni2HasInfo: boolean;\r\n    public rilegatureDescription: string;\r\n    public rilegatureImage: string;\r\n    public rilegatureShowInfo: boolean;\r\n    public rilegatureHasInfo: boolean;\r\n\r\n    public copieOrder: number = 0;\r\n    public facciateOrder: number = 0;\r\n    public formatiOrder: number = 0;\r\n    public stampaInternoFronteOrder: number = 0;\r\n    public stampaInternoOrder: number = 0;\r\n    public carteInternoOrder: number = 0;\r\n    public plastificazioniInternoOrder: number = 0;\r\n    public copertineOrder: number = 0;\r\n    public stampaCopertinaFronteOrder: number = 0;\r\n    public stampaCopertinaOrder: number = 0;\r\n    public cartaCopertinaOrder: number = 0;\r\n    public plastificazioniCopertinaOrder: number = 0;\r\n    public cartoncinoOrder: number = 0;\r\n    public rilegatureOrder: number = 0;\r\n    public rifiloOrder: number = 0;\r\n    public lavorazioniAccessorieOrder: number = 0;\r\n    public companyNumber: string;\r\n    public companyEmail: string;\r\n    public companyCondizioni: string;\r\n\r\n    public piegatureDescription: string;\r\n    public piegatureImage: string;\r\n    public piegatureShowInfo: boolean;\r\n    public piegatureHasInfo: boolean;\r\n    public piegatureIsValid: boolean = true;\r\n    public piegatureMessage: string;\r\n\r\n    public plastificazione1IsValid: boolean = true;\r\n    public plastificazione1Message: string;\r\n\r\n    public plastificazione2IsValid: boolean = true;\r\n    public plastificazione2Message: string;\r\n\r\n    public soggettiOrder: number = 0;\r\n    public soggettiIsValid: boolean = true;\r\n    public soggettiMessage: string;\r\n    public baseFormato: string;\r\n    public altezzaFormato: string;\r\n    public baseFormatoIsValid: boolean = true;\r\n    public baseFormatoMessage: string = \"\";\r\n    public altezzaFormatoIsValid: boolean = true;\r\n    public altezzaFormatoMessage: string = \"\";\r\n    public formatiMultipliIsValid: boolean = true;\r\n\r\n    public formatiVisual: boolean = false;\r\n    public stampaInternoVisual: boolean = false;\r\n    public carteInternoVisual: boolean = false;\r\n    public plastificazioniInternoVisual: boolean = false;\r\n    public copertineVisual: boolean = false;\r\n    public stampaCopertinaVisual: boolean = false;\r\n    public cartaCopertinaVisual: boolean = false;\r\n    public plastificazioniCopertinaVisual: boolean = false;\r\n    public rilegatureVisual: boolean = false;\r\n    public lavorazioniAccessorieVisual: boolean = false;\r\n    public piegatureVisual: boolean = false;\r\n\r\n    public taglioOrder: number = 0;\r\n    public taglioDescription: string;\r\n    public taglioImage: string;\r\n    public taglioShowInfo: boolean;\r\n    public taglioHasInfo: boolean;\r\n    public taglioIsValid: boolean = true;\r\n    public taglioMessage: string;\r\n\r\n    public bustaOrder: number = 0;\r\n    public bustaDescription: string;\r\n    public bustaImage: string;\r\n    public bustaShowInfo: boolean;\r\n    public bustaHasInfo: boolean;\r\n    public bustaIsValid: boolean = true;\r\n    public bustaMessage: string;\r\n    public idBusta: string;\r\n\r\n    public materialeOrder: number = 0;\r\n    public materialeDescription: string;\r\n    public materialeImage: string;\r\n    public materialeShowInfo: boolean;\r\n    public materialeHasInfo: boolean;\r\n    public materialeIsValid: boolean = true;\r\n    public materialeMessage: string;\r\n    public idMaterialiFlessibili: string;\r\n\r\n    public supportoOrder: number = 0;\r\n    public supportoDescription: string;\r\n    public supportoImage: string;\r\n    public supportoShowInfo: boolean;\r\n    public supportoHasInfo: boolean;\r\n    public supportoIsValid: boolean = true;\r\n    public supportoMessage: string;\r\n    public idSupportiRigidi: string;\r\n    public idGruppo: number = 0;\r\n\r\n    public occhiellaturaOrder: number = 0;\r\n    public occhiellaturaDescription: string;\r\n    public occhiellaturaImage: string;\r\n    public occhiellaturaShowInfo: boolean;\r\n    public occhiellaturaHasInfo: boolean;\r\n    public occhiellaturaIsValid: boolean = true;\r\n    public occhiellaturaMessage: string;\r\n    public idOcchielli: string;\r\n    public disposizione_occhielli_id: string;\r\n    public distanza_occhielli: string;\r\n    public occhielli: Array<Object>;\r\n    public occhielliCount: number = 0;\r\n    public occhielliDisposizione: Array<Object>;\r\n    public occhielliDisposizioneCount: number = 0;\r\n    public asolaOrder: number = 0;\r\n    public asolaDescription: string;\r\n    public asolaImage: string;\r\n    public asolaShowInfo: boolean;\r\n    public asolaHasInfo: boolean;\r\n    public asolaIsValid: boolean = true;\r\n    public asolaMessage: string;\r\n    public idAsole: string;\r\n    public diametro_asola: string;\r\n    public disposizione_asola_id: string;\r\n    public asole: Array<Object>;\r\n    public asoleCount: number = 0;\r\n    public asoleDisposizioni: Array<Object>;\r\n    public asoleDisposizioniCount: number = 0;\r\n    public cucituraOrder: number = 0;\r\n    public cucituraDescription: string;\r\n    public cucituraImage: string;\r\n    public cucituraShowInfo: boolean;\r\n    public cucituraHasInfo: boolean;\r\n    public cucituraIsValid: boolean = true;\r\n    public cucituraMessage: string;\r\n    public idCuciture: string;\r\n    public disposizione_cucitura_id: string;\r\n    public cuciture: Array<Object>;\r\n    public cucitureCount: number = 0;\r\n    public cucitureDisposizioni: Array<Object>;\r\n    public cucitureDisposizioniCount: number = 0;\r\n    public elettroOrder: number = 0;\r\n    public elettroDescription: string;\r\n    public elettroImage: string;\r\n    public elettroShowInfo: boolean;\r\n    public elettroHasInfo: boolean;\r\n    public elettroIsValid: boolean = true;\r\n    public elettroMessage: string;\r\n    public idElettrosaldature: string;\r\n    public disposizione_elettrosaldatura_id: string;\r\n    public elettrosaldatureDisposizioni: Array<Object>;\r\n    public elettrosaldatureDisposizioniCount: number = 0;\r\n    public bifaccialeOrder: number = 0;\r\n    public stampaBifacciale: number;\r\n    public tipoBifacciale: string;\r\n    public biancoCoprenteOrder: number = 0;\r\n    public biancoCoprente: Array<Object>;\r\n    public biancoCoprenteCount: number = 0;\r\n    public idBiancoCoprente: string;\r\n\r\n    public oraOrdine: string;\r\n    public richiesteScontistica: string;\r\n\r\n    public distanzaOcchielliIsValid: boolean = true;\r\n    public distanzaOcchielliMessage: string;\r\n\r\n    public diametroAsolaIsValid: boolean = true;\r\n    public diametroAsolaMessage: string;\r\n\r\n\r\n    public pantoni: Array<Object>;\r\n    public pantoniCount: number = 0;\r\n    public idPantoneFronte1: string;\r\n    public pantoneFronte1Description: string;\r\n    public pantoneFronte1Image: string;\r\n    public pantoneFronte1HasInfo: boolean;\r\n    public pantoneFronte1ShowInfo: boolean;\r\n    public pantoneFronte1Visual: boolean;\r\n\r\n    public idPantoneFronte2: string;\r\n    public pantoneFronte2Description: string;\r\n    public pantoneFronte2Image: string;\r\n    public pantoneFronte2HasInfo: boolean;\r\n    public pantoneFronte2ShowInfo: boolean;\r\n    public pantoneFronte2Visual: boolean;\r\n    public idPantoneRetro1: string;\r\n    public pantoneRetro1Description: string;\r\n    public pantoneRetro1Image: string;\r\n    public pantoneRetro1HasInfo: boolean;\r\n    public pantoneRetro1ShowInfo: boolean;\r\n    public pantoneRetro1Visual: boolean;\r\n    public idPantoneRetro2: string;\r\n    public pantoneRetro2Description: string;\r\n    public pantoneRetro2Image: string;\r\n    public pantoneRetro2HasInfo: boolean;\r\n    public pantoneRetro2ShowInfo: boolean;\r\n    public pantoneRetro2Visual: boolean;\r\n    public colori1IsValid: boolean = true;\r\n    public colori1Message: string;\r\n\r\n    //Cartoncino\r\n    public cartoncinoIsValid: boolean = true;\r\n    public cartoncinoHasInfo: boolean;\r\n    public cartoncinoVisual: boolean = false;\r\n    public idCartoncino: string;\r\n    public cartoncini: Array<Object>;\r\n    public cartonciniCount: number = 0;\r\n    public cartoncinoMessage: string;\r\n    public cartoncinoShowInfo: boolean;\r\n    public cartoncinoImage: string;\r\n    public cartoncinoDescription: string;\r\n    public grammatureCartoncinoIsValid: boolean = true;\r\n    public idGrammatureCartoncino: string;\r\n    public grammatureCartoncino: Array<Object>;\r\n    public grammatureCartoncinoCount: number = 0;\r\n    public grammatureCartoncinoMessage: string;\r\n    public FilesCombinazioniObj: FileCombinationModel;\r\n    public ManageAttachment: string;\r\n    public isStampaInternoRequired: boolean;\r\n    public isStampaCopertinaRequired: boolean;\r\n    public isStampaBifaccialeSiHide: boolean;\r\n    public isStampaBifaccialeNoHide: boolean;\r\n    public IsPackagingWizard: boolean;\r\n    public listaPackagingParameter: Array<any>;\r\n    public basePackagingIsValid: boolean = true;\r\n    public profonditaPackagingIsValid: boolean = true;\r\n    public idBasePackaging: number = 0;\r\n    public idProfonditaPackaging: number = 0;\r\n    public basePackagingMessage: string;\r\n    public profonditaPackagingMessage: string;\r\n    public formatiCount: number = 0;\r\n    public gapLabel: number = 0;\r\n    public tipologiaLavoriLabel: Array<any>;\r\n    public avvolgimentiLabel: Array<any>;\r\n    public diametroInterno: number = 0;\r\n    public diametroMassimoEsterno: number = 0;\r\n    public ListafustelleLabel: Array<any>;\r\n    public TipologiaFormatiLabel: Array<any>;\r\n   \r\n    public subSection: string;\r\n    public formatiTipoOrder: number;\r\n    public formatiTipoImgPath: string;\r\n    public formatiTipoVisual: boolean;\r\n    public formatiTipoImage: string;\r\n    public formatiTipoHasInfo: boolean;\r\n    public formatiTipoLabelCount: number = 0;\r\n    public formatiTipoLabelShowInfo: boolean;\r\n    public formatiTipoLabelIsValid: boolean = true;\r\n\r\n    public idFormatoTipo: string;\r\n    public fustelleOrder: number;\r\n    public idFustella: string;\r\n    public fustelleLabelCount: number = 0;\r\n    public fustellaLabelIsValid: boolean = true;\r\n\r\n    public idTipoLavoroLabel: string;\r\n\r\n    public avvolgimentiOrder: number;\r\n    public avvolgimentiImgPath: string;\r\n    public avvolgimentiVisual: boolean;\r\n    public avvolgimentiImage: string;\r\n    public avvolgimentiHasInfo: boolean;\r\n    public idAvvolgimento: string;\r\n    public avvolgimentiCount: number = 0;\r\n    public avvolgimentiShowInfo: boolean;\r\n    public avvolgimentiIsValid: boolean = true;\r\n\r\n    public numEtichetteOrder: number;\r\n    public numEtichetteImgPath: string;\r\n    public numEtichetteIsValid: boolean = true;\r\n    public numEtichetteMessage: string;\r\n    public numEtichette: string = \"1\";\r\n\r\n    public massimaDistanzaEtichetteLabel: number;\r\n    public minimaDistanzaEtichetteLabel: number;\r\n\r\n    public DiametroInternoAnimaEditabileLabel: boolean = false;\r\n    public numDiametroInternoAnimaEditabileLabel: number;\r\n    public DiametroInternoAnimaIsValid: boolean = true;\r\n    public DiametroInternoAnimaMessage: string;\r\n    public numDiametroInternoAnimaLabel: number;\r\n    \r\n\r\n    public numDiametroMassimoEsternoAnimaEditabile: number;\r\n    public DiametroMassimoEsternoAnimaEditabile: boolean = false;\r\n    public DiametroMassimoEsternoAnimaIsValid: boolean = true;\r\n    public DiametroMassimoEsternoAnimaMessage: string;\r\n    public numDiametroMassimoEsternoAnimaLabel: number;\r\n\r\n    public diametriOrder: number;\r\n    public diametriImgPath: string;\r\n    public isPlastificazioneRequired: boolean;\r\n    public isFormatiMultiliEnabled: boolean;\r\n\r\n}\r\nexport class FileCombinationModel {\r\n    listaFilesCombinazioni: any[];\r\n    FormatList: any[];\r\n    PiegheList: any[];\r\n}\r\n\r\nexport class Object {\r\n    public chiave: string;\r\n    public valore: string;\r\n    public selected: boolean;\r\n    public isVisible: boolean = true;\r\n    public subElements: Array<Object>;\r\n    public wrap_valore: string;\r\n    public parentId: string;\r\n    public descrizione: string;\r\n    public image: string;\r\n    public hasInfo: boolean;\r\n    public colorExaForMatrix: string;\r\n    public mostraPerVariantiMatrice: number;\r\n}\r\n\r\nexport class WizardListinoScontistica {\r\n    public rowId: number;\r\n    public columnId: number;\r\n    public value: string;\r\n    public buttonWizardListino: string;\r\n}\r\n\r\nexport class SelectObject {\r\n    public chiave: string;\r\n    public valore: string;\r\n}\r\nexport class MyVarianteMatrice {\r\n    public id: number;\r\n    public nome: string;\r\n    public colore: string;\r\n    public popup: string;\r\n    public imgPath: string;\r\n    public mostraPerVariantiMatrice: string;\r\n    public qta: number;\r\n    public VarianteVerticale: Array<MyVarianteMatrice>;\r\n    public VarianteOrizzontale: Array<MyVarianteMatrice>;\r\n}\r\nexport class MyLavorazioneAccessoria {\r\n    public id: number;\r\n    public type: string;\r\n    public isValid: boolean = false;\r\n    public isVisible: boolean = true;\r\n    public lavId: number;\r\n    public nome: string;\r\n    public tipo: string;\r\n    public tipoSelezione: string;\r\n    public valore: string;\r\n    public valori: Array<Object>;\r\n    public valoriCount: number = 0;\r\n    public value: any;\r\n    public selected: boolean;\r\n    public obbligatorio: boolean;\r\n    public isCalculated: boolean;\r\n    public lavorazioneCheckValue: boolean;\r\n    public lavorazioneMessage: string;\r\n    public description: string;\r\n    public image: string;\r\n    public showInfo: boolean;\r\n    public hasInfo: boolean;\r\n    public maxQtaInput: number;\r\n    public minQtaInput: number;\r\n    public idVarianteMatriceVerticale: number;\r\n    public idVarianteMatriceOrizzontale: number;\r\n    public VarianteMatrix: Array<MyVarianteMatrice>;\r\n    public umLavorazione: number;\r\n    public percentualePagineTotEditoria: number;\r\n}\r\n\r\nexport class Regola {\r\n    public Id: number;\r\n    public Nome_Regola: string;\r\n    public Tipo: string;\r\n    public Categoria_1: string;\r\n    public Sezione_1: string;\r\n    public Id_Elemento_1: number;\r\n    public Categoria_2: string;\r\n    public Sezione_2: string;\r\n    public Id_Elemento_2: number;\r\n    public IdRegoleCategoria: number;\r\n    public Id_Elemento_Sottochiave_1: number;\r\n    public Id_Elemento_Sottochiave_2: number;\r\n    public Tipo_Regola: string;\r\n    public Flag_Copertina_1: boolean;\r\n    public Flag_Copertina_2: boolean\r\n    public Macro_Categoria_1: string;\r\n    public Macro_Categoria_2: string;\r\n    public Attivo: boolean;\r\n}\r\n\r\n\r\nexport class MyLavorazioneAccessoriaReturn {\r\n    public id: number;\r\n    public value: string;\r\n}\r\n\r\nexport class LavorazioniComponents {\r\n    public checkBox: number = 0;\r\n    public inputBox: number = 1;\r\n    public selectBox: number = 2;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/document/quoting-model.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from './shared/shared.module';\r\n\r\nimport { AppComponent } from './app.component';\r\n\r\nimport { HomeModule } from './components/cms/homepage/sys/home.module';\r\nimport { CmsPageModule } from './components/cms/page/sys/cms-page.module';\r\nimport { InventoryProductModule } from './components/inventory/product/sys/inventory-product.module';\r\nimport { InventoryCategoryModule } from './components/inventory/category/sys/inventory-category.module';\r\nimport { SettingsModule } from './components/settings/user/sys/settings.module';\r\nimport { SysConfig } from './services/core/system-configuration.service';\r\nimport { Ng2TableModule } from 'ng2-table/ng2-table';\r\n\r\n// Need for defer included components by dynamic routing\r\nconst entryComponents = SysConfig.getAllComponents();\r\n\r\n@NgModule({\r\n  declarations: [ AppComponent ],\r\n  imports: [\r\n    SharedModule,\r\n    HomeModule,\r\n    CmsPageModule,\r\n    InventoryProductModule,\r\n    InventoryCategoryModule,\r\n    SettingsModule,\r\n    Ng2TableModule,\r\n  ],\r\n\r\n  entryComponents: [\r\n    ...entryComponents\r\n  ]\r\n})\r\nexport class AppModule {\r\n}\r\n\r\nexport { AppComponent } from './app.component';\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/app.module.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, ComponentFactory, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\n\r\n\r\n\r\n@Component({\r\n    selector: \"dy-article-list\",\r\n    template: \"\"\r\n})\r\n\r\nexport class NewsListComponent implements OnInit \r\n{\r\n    constructor\r\n    (\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private templateService: TemplateService,\r\n        private articleService: ArticleService,\r\n        @Inject('isBrowser') private isBrowser: boolean\r\n    ) {}\r\n\r\n    @Input() items: any;\r\n    @Input() category: string;\r\n    @Input() newsOrientation: string;\r\n    @Input() headerTypeNews: string;\r\n    @Input() columns: number = 4;\r\n    \r\n    ngOnInit() \r\n    {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        //Depending on the type of the list, a different template is used\r\n        let subComponentTemplateUrl: string;\r\n\r\n        switch (this.newsOrientation) \r\n        {\r\n            case \"newsVertical\": subComponentTemplateUrl = \"newsListVerticalPageTemplate\"; break;\r\n            case \"newsHorizontal\": subComponentTemplateUrl = \"newsListHorizontalPageTemplate\"; break;\r\n            case \"newsVerticalBanner\": subComponentTemplateUrl = \"newsListVerticalBannerPageTemplate\"; break;\r\n            case \"newsHorizontalBanner\": subComponentTemplateUrl = \"newsListHorizontalBannerHomepageTemplate\"; break; \r\n        }\r\n\r\n        this.articleService.getArticleList(this.category, subComponentTemplateUrl).subscribe(result => \r\n        {     \r\n            let templateData = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(templateData, this.items, this.category, this.newsOrientation, this.headerTypeNews, this.columns);\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }); \r\n    }\r\n\r\n    private createSubComponent(response: any, inputItems: any, inputCategory: string, inputNewsOrientation: string, inputHeaderTypeNews: string, inputColumns: number) {\r\n\r\n        @Component({\r\n            template: response.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit \r\n        {\r\n            constructor\r\n            (\r\n                private languageService: LanguageService,\r\n                private articleService: ArticleService\r\n            ) {}\r\n\r\n            items: any = inputItems;\r\n            category: string = inputCategory;\r\n            newsOrientation: string = inputNewsOrientation;\r\n            headerTypeNews: string = inputHeaderTypeNews;\r\n            lang: string = this.languageService.getLongLang();\r\n            columns: number = inputColumns;\r\n\r\n            ngOnInit() \r\n            {\r\n                this.items = response.ArticleList;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/widget/news-list.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Input, Inject } from '@angular/core';\r\nimport { Router, ActivatedRoute} from \"@angular/router\";\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { AuthService } from './../../../../services/core/auth.service';\r\nimport { NewsletterService } from \"./../../../../services/cms/newsletter.service\";\r\n\r\n//Models\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\nimport { LanguageService } from '../../../../services/cms/language.service';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    selector: \"dy-footer\",\r\n    template: ''\r\n})\r\n\r\nexport class FooterComponent implements OnInit {\r\n    data: any = {};\r\n\r\n    @Input() parentFooterData: any;\r\n\r\n    constructor(\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private cmsComponentService: CmsComponentService,\r\n        private route: ActivatedRoute,\r\n        private router: Router,\r\n        @Inject('isBrowser') private isBrowser: boolean\r\n\r\n    ){this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n        subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if(!this.isBrowser)\r\n            return;\r\n\r\n        if (this.parentFooterData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentFooterData);\r\n            //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n\r\n        else {\r\n            let footerData: any;\r\n\r\n            let footerSub = this.cmsComponentService.getFooterData().subscribe(result => {\r\n                footerData = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(footerData);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            });\r\n\r\n            this.subManager.add(footerSub);\r\n        }\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject \r\n    private createSubComponent(footerData: any) {\r\n        @Component({\r\n            template: footerData.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                private routesService: RoutesService,\r\n                private authService: AuthService,\r\n                private languageService: LanguageService,\r\n                private newsletterService: NewsletterService,\r\n                private headerService: HeaderService\r\n                ) {\r\n                    this.headerService.getLoggedInUser().subscribe((user: UserLogin | null) => {\r\n                        this.loggedIdUser = user;\r\n                    });\r\n                }\r\n\r\n            private loggedIdUser: UserLogin = new UserLogin();\r\n            private company: Company = footerData.Company;\r\n            public isActiveQuickRegistration: boolean = footerData.IsActiveQuickRegistration;\r\n\r\n            private faqPageName: string[] = this.routesService.getRoutePath('FAQ');\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private cookiePageName: string[] = this.routesService.getRoutePath('INFO COOKIE');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private contactPageName: string[] = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n            private loginPageName: string[] = this.routesService.getRoutePath('LOGIN');\r\n            private passwordPageName: string[] = this.routesService.getRoutePath('RECUPERA PASSWORD');\r\n            private registerPageName: string[] = this.routesService.getRoutePath('REGISTRAZIONE');\r\n            private areaClientiPageName: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n            private carrelloPageName: string[] = this.routesService.getRoutePath('CARRELLO');\r\n            private blogPageName: string[] = this.routesService.getRoutePath('BLOG');\r\n\r\n            //Newsletter variables\r\n            private newsletterSubmitted: boolean;\r\n            private privacySubmitted: boolean;\r\n            private alreadySubscribed: boolean;\r\n            private successfullySubscribed: boolean;\r\n            private isCaptchaInvalid = true;\r\n            public verified: any;\r\n            public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n            public theme: string = \"light\";\r\n            public lang = this.languageService.getShortLang();\r\n\r\n            public isArrayInit: boolean = false;\r\n            private spinnerNewslatter: boolean = false;\r\n\r\n            private model = {\r\n                Email: \"\"\r\n            };\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                //setup of links, they must start with http to work properly\r\n                let linkStart = \"http://\";\r\n                let linkSecuredStart = \"https://\";\r\n\r\n                if (this.company.Facebook != null) {\r\n                    if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Facebook = linkStart + this.company.Facebook;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Youtube != null) {\r\n                    if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Youtube = linkStart + this.company.Youtube;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Twitter != null) {\r\n                    if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Twitter = linkStart + this.company.Twitter;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Website != null) {\r\n                    if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Website = linkStart + this.company.Website;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Instagram != null) {\r\n                    if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Instagram = linkStart + this.company.Instagram;\r\n                    }\r\n                }\r\n            }\r\n\r\n            onSubmit(form) \r\n            {\r\n                this.spinnerNewslatter = true;\r\n                if (form) \r\n                {\r\n                    let newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => \r\n                    {\r\n                        if (result == \"-1\")\r\n                        {\r\n                            this.alreadySubscribed = true;\r\n                            this.successfullySubscribed = false;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n\r\n                        else {\r\n                            this.alreadySubscribed = false;\r\n                            this.successfullySubscribed = true;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n                    });\r\n\r\n                    this.subManager.add(newsletterSub);\r\n                }\r\n\r\n                else \r\n                {\r\n                    this.spinnerNewslatter = false;                       \r\n                }\r\n            }\r\n\r\n            setVerified(data) {\r\n                this.isCaptchaInvalid = !data;\r\n            }\r\n\r\n            showModalQuickRegistrationEmail() {\r\n                //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n                (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n                $(`#quickRegistrationEmailModal`).modal(\"show\");\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/footer/widget/footer.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { NewsletterService } from \"./../../../../services/cms/newsletter.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n    selector: \"dy-newsletter\",\r\n    template: \"\"\r\n\r\n})\r\n\r\nexport class NewsletterComponent implements OnInit \r\n{\r\n    constructor\r\n    (\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private templateService: TemplateService,\r\n        @Inject('isBrowser') private isBrowser: boolean\r\n    ) {}\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() \r\n    {\r\n        if(!this.isBrowser)\r\n            return;\r\n\r\n        let pageTemplateSub = this.templateService.getComponentTemplate(\"newsletterPageTemplate\").subscribe(result => {\r\n\r\n            var templateHtml = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(templateHtml);\r\n            \r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(pageTemplateSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(template: string) {\r\n\r\n        @Component({\r\n            template: template\r\n        })\r\n\r\n        class ChildComponent implements OnInit \r\n        {\r\n            constructor\r\n            (\r\n                private newsletterService: NewsletterService,\r\n                private routesService: RoutesService\r\n            ) {}\r\n\r\n            private newsletterSubmitted: boolean;\r\n            private privacySubmitted: boolean;\r\n            private alreadySubscribed: boolean;\r\n            private successfullySubscribed: boolean;\r\n            private isCaptchaInvalid = true;\r\n            public verified: any;\r\n            public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n            public theme: string = \"light\";\r\n            private spinnerNewslatter: boolean = false;\r\n            private model = {\r\n                Email: \"\",\r\n                CheckboxFooter: false\r\n            };\r\n            private privacyPageNameNewsletter: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            \r\n            subManager = new Subscription();\r\n            \r\n            ngOnInit() {\r\n            }\r\n\r\n            onSubmit(form) \r\n            {\r\n                this.spinnerNewslatter = true;\r\n\r\n                if (form) \r\n                {\r\n                    let newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => \r\n                    {\r\n                        if (result == \"-1\")\r\n                        {\r\n                            this.alreadySubscribed = true;\r\n                            this.successfullySubscribed = false;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n\r\n                        else\r\n                        {\r\n                            this.alreadySubscribed = false;\r\n                            this.successfullySubscribed = true;\r\n                            this.spinnerNewslatter = false;\r\n                        }\r\n                    });\r\n\r\n                    this.subManager.add(newsletterSub);\r\n                }\r\n\r\n                else \r\n                {\r\n                    this.spinnerNewslatter = false;                       \r\n                }\r\n            }\r\n            \r\n            setVerified(data) \r\n            {\r\n                this.isCaptchaInvalid = !data;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n       return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/footer/widget/newsletter.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Input } from '@angular/core';\r\nimport { Location } from '@angular/common';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { CompanyService } from \"./../../../../services/core/company.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { AuthService } from './../../../../services/core/auth.service';\r\nimport { SysConfig } from \"./../../../../services/core/system-configuration.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\n\r\n//Models\r\nimport { Mappings } from './../../../../shared/mapping';\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Template } from \"./../../../../models/settings/template\";\r\nimport { Menu } from \"./../../../../models/cms/menu\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { SearchService } from '../../../../services/inventory/search.service';\r\nimport { Router, Params } from \"@angular/router\";\r\nimport { ActivatedRoute } from '@angular/router/src/router_state';\r\nimport { ApplicationService } from './../../../../services/core/application.service';\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from '../../../../services/inventory/customerscanvas.service';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\n\r\n@Component({\r\n    changeDetection: ChangeDetectionStrategy.Default,\r\n    encapsulation: ViewEncapsulation.Emulated,\r\n    selector: \"dy-header\",\r\n    template: ''\r\n})\r\n\r\nexport class HeaderComponent implements OnInit {\r\n    data: any = {};\r\n    @Input() parentHeaderData: any;\r\n\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    subManager = new Subscription();\r\n\r\n\r\n    ngOnInit() {\r\n        if(!this.isBrowser)\r\n            return;\r\n            \r\n        if (this.parentHeaderData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentHeaderData);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n\r\n        else {\r\n            //let templateHtml: string;\r\n            let headerInfo: any;\r\n\r\n            //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n            let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n                headerInfo = result;\r\n                var startDate = new Date();\r\n\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(headerInfo);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n                // var endDate = new Date();\r\n\r\n\r\n                // this.nodeLogger.AddLogWithTime(\"injecting Header (\" + diffMs + \")\");\r\n            });\r\n\r\n            this.subManager.add(headDataSub);\r\n        }\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    //Creates component to inject \r\n    private createSubComponent(headerInfo: any) {\r\n        @Component({\r\n            template: headerInfo.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private language: LanguageService,\r\n                    private authService: AuthService,\r\n                    private cartService: ShoppingCartService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    private searchService: SearchService,\r\n                    private routesService: RoutesService,\r\n                    private router: Router,\r\n                    protected appService: ApplicationService,\r\n                    private activatedRoute: ActivatedRoute,\r\n                    public canvasService: CustomersCanvasService,\r\n                    private headerService: HeaderService\r\n                ) {\r\n                this.cartService.initCart(headerInfo.CartInfo);\r\n                this.headerService.getLoggedInUser().subscribe((user: UserLogin | null) => {\r\n                    this.loggedIdUser = user;\r\n                });\r\n            }\r\n\r\n            private headerIsInit: boolean = false;\r\n\r\n            private company: Company = headerInfo.Company;\r\n            private menuItems: Array<Menu> = headerInfo.MenuList;\r\n            private megaMenuItems: any = headerInfo.Categories;\r\n            public isActiveQuickRegistration: boolean = headerInfo.IsActiveQuickRegistration;\r\n            public quickRegistrationData: any = headerInfo.QuickRegistrationData;\r\n            public isLazyLoadActive: boolean = headerInfo.isEnableLAzyLoad;\r\n\r\n            private languagesList: any[] = headerInfo.Languages;\r\n            private currentLanguage: any = {};\r\n            private loggedIdUser: UserLogin = new UserLogin();\r\n            private shoppingCart: any = headerInfo.CartInfo;\r\n            private homePageName: string[] = [];\r\n            private productsPageName: string[] = [];\r\n            private promotionsPageName: string[] = [];\r\n\r\n            private loginPageName: string[] = [];\r\n            private registerPageName: string[] = [];\r\n            private areaClientiName: string[] = [];\r\n            private carrelloPageName: string[] = [];\r\n            private blogPageName: string[] = [];\r\n            private contactPageName: string[] = [];\r\n            private disableModalButtons: boolean = false;\r\n            private spinner: boolean = false;\r\n            private productId: any;\r\n            private selectedProduct: any;\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                var date = new Date();\r\n                let lang: string = this.language.getShortLang();\r\n\r\n                //Setting current language info\r\n                for (let entry of this.languagesList) {\r\n                    if (entry.ShortCode == lang) {\r\n                        this.currentLanguage = entry;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                this.homePageName = this.routesService.getRoutePath('HOME');\r\n                this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n                this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n\r\n                this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n                this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n                this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n                this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n                this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n                this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n\r\n                //setup of links, they must start with http to work properly\r\n                let linkStart = \"http://\";\r\n                let linkSecuredStart = \"https://\";\r\n\r\n                if (this.company.Facebook != null) {\r\n                    if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Facebook = linkStart + this.company.Facebook;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Youtube != null) {\r\n                    if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Youtube = linkStart + this.company.Youtube;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Twitter != null) {\r\n                    if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Twitter = linkStart + this.company.Twitter;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Website != null) {\r\n                    if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Website = linkStart + this.company.Website;\r\n                    }\r\n                }\r\n\r\n                if (this.company.Instagram != null) {\r\n                    if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n                        this.company.Instagram = linkStart + this.company.Instagram;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            showModal(product) {\r\n                this.disableModalButtons = false;\r\n                $(\"#headerModal\").modal(\"show\");\r\n                this.productId = product.Id;\r\n                this.selectedProduct = product;\r\n            }\r\n\r\n\r\n            hideModal() {\r\n                $('#headerModal').modal('hide');\r\n                this.disableModalButtons = true;\r\n            }\r\n\r\n            // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n            removeCustomersCanvasState() {\r\n                if (this.selectedProduct.isCanvasEdited && this.selectedProduct.CanvasStateId) {\r\n                    const canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n\r\n                    this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n                        .subscribe(x => x,\r\n                            err => {\r\n                                console.log(err);\r\n                            });\r\n                }\r\n            }\r\n\r\n            setCanvasConfig(product) {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: headerInfo.CanvasInfo.CanvasUrl,\r\n                    CustomerCanvasUserName: headerInfo.CanvasInfo.CustomerCanvasUserName,\r\n                    CanvasStateId: product.CanvasStateId,\r\n                    CanvasApiKey: headerInfo.CanvasInfo.ApiKey\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            //Redirect the user to the homepage for the selected language\r\n            setLanguage(lang) {\r\n                window.location.href = \"/\" + lang + '/home';\r\n            }\r\n\r\n            logout() {\r\n                this.authService.Logout();\r\n            }\r\n\r\n            removeFromCart() {\r\n                this.spinner = true;\r\n                this.disableModalButtons = true;\r\n                let removeCartSub = this.cartService.removeFromCart(this.productId).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.shoppingCart = this.cartService.getCart();\r\n                    this.removeCustomersCanvasState();\r\n\r\n                    this.hideModal();\r\n                    this.spinner = false;\r\n                });\r\n\r\n                this.subManager.add(removeCartSub);\r\n            }\r\n\r\n            //getting value of search input and redirecting to search result page\r\n            getSearchResults(inputVal) {\r\n                let query = \"\";\r\n                inputVal = inputVal.trim();\r\n\r\n                if (inputVal == \"\") {\r\n                    return;\r\n                }\r\n                else {\r\n                    this.searchService.setQueryPlainTextValue(inputVal);\r\n\r\n                    if (inputVal != undefined) {\r\n                        query = inputVal;\r\n                    }\r\n                    else {\r\n                        let subParam = this.activatedRoute.params.subscribe((params: Params) => {\r\n                            let encodedQuery = params['query'];\r\n                            query = decodeURIComponent(encodedQuery);\r\n                        })\r\n\r\n                        this.subManager.add(subParam);\r\n\r\n                    }\r\n                }\r\n\r\n                query = decodeURIComponent(query);\r\n                let uriString = encodeURIComponent(query);\r\n\r\n                this.searchService.setQueryValue(uriString);\r\n\r\n                let searchRoute = this.routesService.getRoutePath('SEARCH - RESULTS')[0];\r\n                searchRoute = searchRoute.replace(\":query\", query);\r\n\r\n                this.router.navigate([searchRoute]);\r\n            }\r\n            setAutoHeightAndWeightToLogo() {\r\n                let headerClass = $(\"div\").hasClass(\"header-logo\");\r\n                if (headerClass == false) {\r\n                    //setTimeout(x => this.setAutoHeightAndWeightToLogo(), 1);\r\n                }\r\n                else {\r\n                    $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n                    $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n                }\r\n            }\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.headerIsInit) {\r\n                    return;\r\n                }\r\n                //setting value of search textbox to search condition value if the current page is search-result page, else, clean it's content\r\n                let documentUrl = window.location.href;\r\n\r\n                if (documentUrl.indexOf(\"search-results\") != -1) {\r\n                    var plainSearchText = this.searchService.getQueryPlainTextValue();\r\n                    if (plainSearchText != \"\") {\r\n                        $(\"#searchQuery\").val(plainSearchText);\r\n                    }\r\n                    else {\r\n                        this.activatedRoute.params.subscribe((params: Params) => {\r\n                            let encodedQuery = params['query'];\r\n\r\n                            var decodedQuery = decodeURIComponent(encodedQuery)\r\n                            $(\"#searchQuery\").val(decodedQuery);\r\n                        })\r\n                    }\r\n                }\r\n                else {\r\n                    $(\"#searchQuery\").val(\"\");\r\n                }\r\n\r\n                $(\"#searchQuery\").keyup(function (event) {\r\n                    if (event.keyCode === 13) {\r\n                        $(\"#searchQueryButton\").click();\r\n                    }\r\n                });\r\n\r\n\r\n                layoutTheme.initNavMenu();\r\n                layoutTheme.initStickyHeader();\r\n                if(this.isLazyLoadActive==true)\r\n                {\r\n                    layoutTheme.initLazy();\r\n                }\r\n                let config = this.appService.getConfig();\r\n                if (config.webStoreStatus == \"offline\") {\r\n                    this.setAutoHeightAndWeightToLogo();\r\n                }\r\n                layoutTheme.initCarousel();\r\n                layoutTheme.initVideo();\r\n                this.headerIsInit = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/header/widget/header.component.ts","import { NgModule } from '@angular/core';\r\nimport { HomeComponent } from './home.component';\r\n\r\n@NgModule({\r\n  imports: [\r\n  ],\r\n  declarations: [\r\n    HomeComponent\r\n  ]\r\n})\r\nexport class HomeModule { }\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/sys/home.module.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Injector, Renderer, ComponentFactory, Input, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Models\r\nimport { Menu } from \"./../../../../models/cms/menu\";\r\nimport { MegaMenu } from \"./../../../../models/inventory/inventory\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n\r\n@Component({\r\n    selector: \"dy-side-bar\",\r\n    template: \"\"\r\n})\r\n\r\nexport class SideBarMenuComponent implements OnInit \r\n{\r\n    constructor\r\n    (\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean\r\n    ) {}\r\n\r\n    @Input() sideType: string = \"sideBarMenu\";\r\n    @Input() parentSideMenuData: any;\r\n    @Input() bredcrumpInfo: Array<any>;\r\n\r\n    ngOnInit() \r\n    {\r\n        if(!this.isBrowser)\r\n            return;\r\n\r\n        if (this.parentSideMenuData != null) \r\n        {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentSideMenuData,this.bredcrumpInfo);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n\r\n        else \r\n        {\r\n            let subComponentTemplateUrl: string = \"sideBarMenuTemplate\";\r\n\r\n            this.cmsComponentService.getSideMenuData().subscribe(result =>   \r\n            {\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(result,this.bredcrumpInfo);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            });\r\n        }    \r\n    }\r\n\r\n    private createSubComponent(data: any,breadcrumbs:Array<any>) \r\n    {\r\n        @Component({\r\n            template: data.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit \r\n        {\r\n            constructor() {}\r\n\r\n            megaMenuItems: any = data.Categories;\r\n          \r\n            breadcrumbsList: Array<any> = new Array<any>() ;\r\n\r\n            ngOnInit() \r\n            {\r\n                if(breadcrumbs!=null)\r\n                {\r\n                    this.breadcrumbsList=breadcrumbs;\r\n                }\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/widget/side-bar-menu.component.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { CmsPageComponent } from './cms-page.component';\r\n\r\n@NgModule({\r\n  imports: [\r\n    SharedModule\r\n  ],\r\n  declarations: [\r\n    CmsPageComponent\r\n  ]\r\n})\r\nexport class CmsPageModule { }\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cms-page.module.ts","import { ShoppingCartService } from './../../../services/inventory/shopping-cart.service';\r\n//Angular\r\nimport {\r\n    Component, OnInit, ViewContainerRef, Input,\r\n    Compiler, Inject, ViewChild, ElementRef, Output, EventEmitter\r\n} from \"@angular/core\";\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CustomersCanvasService } from \"../../../services/inventory/customerscanvas.service\";\r\n\r\n\r\n@Component({\r\n    selector: \"customer-canvas-widget\",\r\n    template: \"\"\r\n})\r\n\r\nexport class CanvasWidgetComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n\r\n    @Input() parentWidgetData: any;\r\n\r\n    ngOnInit() {\r\n        if(!this.isBrowser)\r\n            return;\r\n            \r\n        if (this.parentWidgetData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentWidgetData);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n    }\r\n\r\n    private createSubComponent(canvasWidgetComponent: any) {\r\n\r\n        @Component({\r\n            template: canvasWidgetComponent.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            @ViewChild('editorPage') editorPage: ElementRef;\r\n            @ViewChild('approvePage') approvePage: ElementRef;\r\n            @ViewChild('finishOrderPage') finishOrderPage: ElementRef;\r\n\r\n            constructor\r\n                (\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n\r\n                    public canvasService: CustomersCanvasService,\r\n                    private shoppingCartService: ShoppingCartService\r\n                ) { }\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            ngOnInit() { }\r\n\r\n            // when want to finish design, to move to the second step\r\n            finishDesign() {\r\n                this.canvasService.getImagesLinks(this.editorPage, this.approvePage, this.finishOrderPage);\r\n            }\r\n\r\n            // when close a modal with canvas editor, set state to false, so from component we can know the modal is closed\r\n            isCanvasModalOpened(isOpened: boolean) {\r\n                this.canvasService.openNewProductInEditor();\r\n                this.canvasService.setCanvasState(isOpened);\r\n            }\r\n\r\n            // when the product is successfully created and approved, and second step is done\r\n            finishProductCustomization() {\r\n                //If the product customization has been successfully completed.\r\n                this.canvasService.finishProductCustomization()\r\n                    .then(result => {\r\n                        // set canvas response to a property in service, so it can be available to a parent component\r\n                        this.shoppingCartService.setCustomizationCanvasData(result);\r\n                        \r\n                        //Saving hi-res output info.\r\n                        this.canvasService.setupPageAfterProductCustomization(result, false);\r\n\r\n                        /* Send notification to the service that we finished product customization, so from parent component we know it and can call method for adding to cart */\r\n                        this.canvasService.setCanvasProductDesignState(true);\r\n                        this.canvasService.openNewProductInEditor();\r\n                    })\r\n                    //If there was an error thrown while finishing the product customization.\r\n                    .catch(error => {\r\n                        this.canvasService.setupPageAfterProductCustomization(error, true);\r\n                    });\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                layoutTheme.initSlider();\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/canvas-widget.components.ts","//Angular\r\nimport {\r\n    Component, OnInit, ViewContainerRef, Input, Output, EventEmitter, ComponentFactory, ReflectiveInjector,\r\n    Compiler, Inject, ElementRef, Renderer\r\n} from \"@angular/core\";\r\n\r\n//Services\r\nimport { SysConfig } from \"./../../../services/core/system-configuration.service\";\r\nimport { SliderService } from \"./../../../services/cms/slider.service\";\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SliderViewModel } from \"./../../../models/cms/cms-page\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\n\r\n\r\n@Component({\r\n    selector: \"dy-slider\",\r\n    template: \"\"\r\n})\r\n\r\nexport class SliderWidgetComponent implements OnInit \r\n{\r\n    constructor\r\n    (\r\n        private _compiler: Compiler, \r\n        private componentHelper: ComponentHelperService, \r\n        private _elementRef: ViewContainerRef, \r\n        private templateService: TemplateService,\r\n        private cmsComponentService: CmsComponentService,\r\n        @Inject('isBrowser') private isBrowser: boolean\r\n    ) {}\r\n\r\n    @Input() id: string;\r\n    @Input() type: string;\r\n    @Input() parentSliderData: any;\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        if (this.parentSliderData != null) {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(this.parentSliderData);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }\r\n\r\n        else {\r\n            let sliderData: any;\r\n\r\n            let sliderDataSub = this.cmsComponentService.getSliderData(this.type, this.id).subscribe(result => {\r\n                sliderData = result;\r\n                //Creating subcomponent whith the selected template to inject\r\n                let subComponent = this.createSubComponent(sliderData);\r\n\r\n                //injecting created component (OK)\r\n                this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n            });\r\n\r\n            this.subManager.add(sliderDataSub);\r\n        }\r\n    }\r\n\r\n   ngOnDestroy() {\r\n       //Called once, before the instance is destroyed.\r\n       //Add 'implements OnDestroy' to the class.\r\n       this.subManager.unsubscribe();\r\n   }\r\n\r\n   //private createSubComponent(template:string, sliderId: string, sliderType: string) {\r\n   private createSubComponent(sliderData: any) {\r\n\r\n       @Component({\r\n           template:sliderData.TemplateHtml\r\n       })\r\n\r\n       class ChildComponent implements OnInit \r\n       {\r\n            constructor\r\n            (\r\n                private sliderService: SliderService,\r\n                @Inject('isBrowser') private isBrowser: boolean,\r\n                private elementRef: ElementRef, \r\n                private renderer: Renderer\r\n            ) \r\n            {\r\n               this.renderer.setElementStyle\r\n               (\r\n                 this.elementRef.nativeElement,\r\n                 'display',\r\n                 this.isBrowser ? 'block' : 'none'\r\n               );\r\n            }\r\n\r\n           slides: any = sliderData.Slides;\r\n           sliderIsInit: boolean = false;\r\n\r\n           ngOnInit() {}\r\n\r\n           goToUrl(url)\r\n           {\r\n                if(url != null && url.length > 0)\r\n                {\r\n                    window.location.href = url;\r\n                }\r\n           }\r\n\r\n           ngAfterViewChecked() \r\n           {\r\n                if (!this.isBrowser || this.sliderIsInit) \r\n                {\r\n                    return;\r\n                }\r\n\r\n                layoutTheme.initSlider();\r\n\r\n                this.sliderIsInit = true;\r\n           }\r\n       }\r\n\r\n       return ChildComponent;\r\n   }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/slider-widget.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport {\r\n    Component, OnInit, ViewContainerRef, Input,\r\n    Compiler, Inject, OnDestroy\r\n} from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TrustpilotService } from \"../../../services/cms/trustpilot.service\";\r\n\r\n@Component({\r\n    selector: \"trustpilot-widget\",\r\n    template: \"\"\r\n})\r\n\r\nexport class TrustpilotWidgetComponent implements OnInit, OnDestroy {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            @Inject('isBrowser') private isBrowser: boolean,\r\n            private trustpilotService: TrustpilotService\r\n        ) { }\r\n\r\n\r\n    private sub = new Subscription();\r\n    @Input() trustpilotType: string;\r\n\r\n    ngOnInit() {\r\n        if (!this.trustpilotType)\r\n            this.trustpilotType = 'default';\r\n\r\n        let trustpilotSub = this.trustpilotService.getTrustpilotData(this.trustpilotType).subscribe(result => {\r\n            //-- If result is null, it means that trustpilot with given type doesn't exist, or trustpilot module is not active\r\n            let subComponent = this.createSubComponent(result);\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        })\r\n\r\n        this.sub.add(trustpilotSub);\r\n    }\r\n\r\n    ngOnDestroy(): void {\r\n        this.sub.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(trustpilotData: any) {\r\n\r\n        //-- If trustpilot module is not active, we are going to set a template to empty string \r\n        @Component({\r\n            template: trustpilotData.TemplateHtml || \"\"\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n\r\n            constructor\r\n                (\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n            ) { }\r\n\r\n            private pageIsInit: boolean = false;\r\n\r\n            ngOnInit() {\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                //-- Initializing trustbox\r\n                const trustboxesRef = Array.from(document.querySelectorAll('.trustpilot-widget'));\r\n                //-- Initialize all trustbox instances on the page\r\n                if (trustboxesRef && trustboxesRef.length > 0)\r\n                    trustboxesRef.forEach(singleTrustboxInstance => Trustpilot.loadFromElement(singleTrustboxInstance));\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/trustpilot-widget.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, ComponentFactory, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { ProductService } from \"./../../../../../../services/inventory/product.service\";\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n  selector: \"dy-quoting-order-totals-widget\",\r\n  template: \"\"\r\n})\r\nexport class QuotingOrderTotalsComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private templateService: TemplateService,\r\n      @Inject('isBrowser') private isBrowser: boolean\r\n    ) { }\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    if (!this.isBrowser)\r\n      return;\r\n\r\n    let templateHtml: string;\r\n    let orderTotalSub = this.templateService.getComponentTemplate(\"quotingOrderTotalsWidgetTemplate\").subscribe(result => {\r\n      templateHtml = result;\r\n      //Creating subcomponent whith the selected template to inject\r\n      let subComponent = this.createSubComponent(templateHtml);\r\n\r\n      //injecting created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    });\r\n\r\n    this.subManager.add(orderTotalSub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(template: string) {\r\n\r\n    @Component({\r\n      template: template\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private productService: ProductService,\r\n          private languageService: LanguageService,\r\n          private cartService: ShoppingCartService,\r\n          private _elementChildRef: ViewContainerRef\r\n        ) { }\r\n\r\n      ngOnInit() { }\r\n\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\n//Models\r\nimport { LavorazioniAccessorieModel } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel, MatrixModelCalculation } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { QuotingConstants } from './../../../../models/constants/quoting-constants';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { ExcludingComponent } from \"./quoting-excluding.component\";\r\nimport { SharedConstants } from \"../../../../models/constants/shared-constants\";\r\nimport { QuotingModel, MyLavorazioneAccessoria, MyVarianteMatrice, } from \"../../../../models/document/quoting-model\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n    selector: \"dy-other-product-quoting-form\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class OtherProductFormComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            private cmsComponentService: CmsComponentService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() productId: string;\r\n\r\n    autentification = this.authService.GetData();\r\n    lang: string = this.languageService.getLongLang();\r\n    private userId = this.authService.GetUserId();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser) {\r\n            return;\r\n        }\r\n\r\n        //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n        let otherProdSub = this.cmsComponentService.getOtherProductData(this.productId, this.userId).subscribe(result => {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.productId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(otherProdSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(formInfo: any, InputresourceId: string) {\r\n\r\n        @Component({\r\n            template: formInfo.TemplateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private authService: AuthService,\r\n                    private translate: TranslateService,\r\n                    private routesService: RoutesService,\r\n                    public currency: CurrencyService,\r\n                    private cartService: ShoppingCartService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean\r\n                ) { }\r\n\r\n            formData = formInfo.FormData;\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private loggedIdUser: UserLogin;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            resourceId: string = InputresourceId;\r\n            model = new wizardFormEditoriaModel();\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            resultCalculation: boolean = false;\r\n            isDataInitialized: boolean = false;\r\n            iShowHourForDay: boolean = false;\r\n            requestInfoSuccess: boolean = null;\r\n            showErrorMessage: boolean = false;\r\n            companyInformation = formInfo.CompanyInfo;\r\n            isFormValid: boolean = true;\r\n            currentRowIndex: number = -1;\r\n            currentColumnIndex: number = -1;\r\n            typePriceResult: string;\r\n            copieMessage: string;\r\n            MatrixMessage: string;\r\n            sumQtaMatrix: number = 0\r\n            totalQtaForMatrix: number = 0\r\n            isCalculatedProduct: boolean = false;\r\n            isVisibleMatrixLav: boolean = false;\r\n            private ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            private responseModel: QuotingModel = new QuotingModel();\r\n            //isapplyingrules: boolean = false;\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n                this.typePriceResult = \"no-tax\";\r\n                this.formData.gruppi.forEach(group => {\r\n                    group.varianti.forEach(varianti => {\r\n                        if (varianti.tipo == 7) {\r\n                            varianti.VarianteMatrix = this.createMatriceObj(varianti);\r\n                            this.isVisibleMatrixLav = true;\r\n                        }\r\n                    });\r\n\r\n                });\r\n\r\n                this.ExcludingRules.setMacrocategory(SharedConstants.OTHER_PRODUCTS_TYPE);\r\n\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                if (!this.isDataInitialized) {\r\n                    this.convertLogicalToViewQuotingModel();\r\n                    this.checkValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                        this.convertLogicalToViewQuotingModel();\r\n                        this.checkValidation()\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n\r\n            //-- Create quoting object from form data object, because we need it for applying rules(regole)\r\n            private convertLogicalToViewQuotingModel() {\r\n                this.responseModel.listaRegole = this.formData.listaRegole;\r\n                this.responseModel.calculationType = this.formData.calculationType;\r\n                this.responseModel.companyCondizioni = this.formData.companyCondizioni;\r\n                this.responseModel.lavorazioniAccessorie = [];\r\n\r\n                //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n                this.formData.gruppi.forEach(group => {\r\n                    group.varianti.forEach(varianti => {\r\n                        let lavAcc = this.convertLogicalToViewModelVarianti(varianti);\r\n\r\n                        this.responseModel.lavorazioniAccessorie.push(lavAcc);\r\n                    });\r\n                });\r\n            }\r\n\r\n            //-- Convert varianti model to lavorazioni accessorie model\r\n            private convertLogicalToViewModelVarianti(varianti) {\r\n                let lavAcc: MyLavorazioneAccessoria = new MyLavorazioneAccessoria();\r\n\r\n                lavAcc.id = varianti.id;\r\n                lavAcc.obbligatorio = varianti.obbligatorio;\r\n                lavAcc.tipo = varianti.tipo;\r\n                lavAcc.description = varianti.description;\r\n                lavAcc.hasInfo = varianti.hasInfo;\r\n                lavAcc.showInfo = varianti.showInfo;\r\n                lavAcc.isVisible = varianti.isVisible;\r\n                lavAcc.image = varianti.image;\r\n                lavAcc.value = varianti.value;\r\n                lavAcc.valori = varianti.valori;\r\n                lavAcc.lavorazioneCheckValue = (varianti.lavorazioneCheckValue == 'true');\r\n                lavAcc.isCalculated = varianti.isCalculated;\r\n                lavAcc.tipoSelezione = varianti.tipoSelezione;\r\n                lavAcc.idVarianteMatriceOrizzontale = varianti.idVarianteMatriceOrizzontale;\r\n                lavAcc.idVarianteMatriceVerticale = varianti.idVarianteMatriceVerticale;\r\n                if (varianti.tipo == 7) {\r\n                    //lavAcc.VarianteMatrix=this.createMatriceObj(varianti);\r\n                    lavAcc.VarianteMatrix = this.formData.VarianteMatrix;\r\n                }\r\n                //--If type is numeric or dropdown, valore is intFormValue, else it is valore\r\n                if (varianti.tipo == 1 || varianti.tipo == 2) {\r\n                    lavAcc.valore = varianti.intFormValue;\r\n                }\r\n                else {\r\n                    lavAcc.valore = varianti.valore;\r\n                }\r\n\r\n                return lavAcc;\r\n            }\r\n            createMatriceObj(variante) {\r\n                let varianteMatrice: MyVarianteMatrice = new MyVarianteMatrice();\r\n                varianteMatrice.VarianteVerticale = new Array<MyVarianteMatrice>();\r\n                varianteMatrice.VarianteOrizzontale = new Array<MyVarianteMatrice>();\r\n                this.formData.gruppi.forEach(group => {\r\n                    group.varianti.forEach(varianti => {\r\n                        if (variante.idVarianteMatriceVerticale == varianti.id) {\r\n                            varianti.isMatrix = true;\r\n                            varianti.valori.forEach(option => {\r\n                                let varianteMatverticale: MyVarianteMatrice = new MyVarianteMatrice();\r\n                                varianteMatverticale.id = option.chiave;\r\n                                varianteMatverticale.nome = option.valore;\r\n                                varianteMatverticale.colore = option.colorExaForMatrix;\r\n                                varianteMatverticale.imgPath = option.image;\r\n                                varianteMatverticale.mostraPerVariantiMatrice = option.mostraPerVariantiMatrice;\r\n                                varianteMatverticale.popup = \"\";\r\n                                varianteMatverticale.VarianteOrizzontale = new Array<MyVarianteMatrice>();\r\n                                group.varianti.forEach(varianti2 => {\r\n                                    if (variante.idVarianteMatriceOrizzontale == varianti2.id) {\r\n                                        varianti.isMatrix = true;\r\n                                        varianti2.valori.forEach(option2 => {\r\n                                            let varianteMat2: MyVarianteMatrice = new MyVarianteMatrice();\r\n                                            varianteMat2.id = option2.chiave;\r\n                                            varianteMat2.nome = option2.valore;\r\n                                            varianteMat2.qta = 0;\r\n                                            varianteMat2.colore = option2.colorExaForMatrix;\r\n                                            varianteMat2.imgPath = option2.image;\r\n                                            varianteMat2.mostraPerVariantiMatrice = option2.mostraPerVariantiMatrice;\r\n                                            varianteMatverticale.VarianteOrizzontale.push(varianteMat2);\r\n                                        });\r\n                                    }\r\n                                });\r\n                                varianteMatrice.VarianteVerticale.push(varianteMatverticale);\r\n                            });\r\n                        }\r\n                        if (variante.idVarianteMatriceOrizzontale == varianti.id) {\r\n                            varianti.isMatrix = true;\r\n                            varianti.valori.forEach(option3 => {\r\n                                let varianteMat3: MyVarianteMatrice = new MyVarianteMatrice();\r\n                                varianteMat3.id = option3.chiave;\r\n                                varianteMat3.nome = option3.valore;\r\n                                varianteMat3.qta = 0;\r\n                                varianteMat3.colore = option3.colorExaForMatrix;\r\n                                varianteMat3.imgPath = option3.image;\r\n                                varianteMat3.mostraPerVariantiMatrice = option3.mostraPerVariantiMatrice;\r\n                                varianteMatrice.VarianteOrizzontale.push(varianteMat3);\r\n                            });\r\n                        }\r\n                    });\r\n                });\r\n                return varianteMatrice;\r\n            }\r\n            checkRegoleOtherProducts() {\r\n                try {\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    this.formData.gruppi.forEach(group => {\r\n                        group.varianti.forEach(varianti => {\r\n                            //console.log(varianti)\r\n                            let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                            if (varianti.tipo == \"2\") {\r\n                                lav.lavorazioneId = varianti.id;\r\n                                lav.valoreLavorazione = varianti.intFormValue;\r\n                                lavAccArray.push(lav);\r\n                            }\r\n                        })\r\n                    })\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ResetRegole(\"AP\", \"ACCESSORIA\", \"\", \"ALTRO_PRODOTTO\", null, null, this.responseModel, this.formData.gruppi);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"AP\", \"ALTRO_PRODOTTO\", this.responseModel, this.formData.gruppi);\r\n\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    let count = 0;\r\n                    this.formData.gruppi.forEach(group => {\r\n                        group.varianti.forEach(lavorazione => {\r\n                            count = 0;\r\n                            for (let lavorazioneOld of lavAccArray) {\r\n                                if (count > 0) {\r\n                                    continue;\r\n                                }\r\n                                else {\r\n                                    if (lavorazione.tipo == \"2\") {\r\n                                        if (lavorazione.isVisible == true) {\r\n                                            if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                                if ((lavorazione.intFormValue != lavorazioneOld.valoreLavorazione)) {\r\n                                                    this.dropDownChange(lavorazione, true);\r\n                                                    count++;\r\n                                                }\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        })\r\n                    })\r\n                    //this.isapplyingrules=false;\r\n                }\r\n                catch (error) {\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            checkBoxChanged(lavorazione) {\r\n                //-- Updating lavorazioniAccessorie model\r\n                for (let variante of this.responseModel.lavorazioniAccessorie) {\r\n                    if (variante.id == lavorazione.id) {\r\n                        variante.hasInfo = lavorazione.hasInfo;\r\n                        variante.lavorazioneCheckValue = (lavorazione.lavorazioneCheckValue == 'true');\r\n                        variante.valore = lavorazione.intFormValue;\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                this.convertLogicalToViewQuotingModel();\r\n                this.checkValidation();\r\n            }\r\n\r\n            dropDownChange(lavorazione, isrules = false) {\r\n                //this.isapplyingrules=true;\r\n                //-- Setting option description (if there is)\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.intFormValue == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                //-- Updating lavorazioniAccessorie model\r\n                for (let variante of this.responseModel.lavorazioniAccessorie) {\r\n                    if (variante.id == lavorazione.id) {\r\n                        variante.hasInfo = lavorazione.hasInfo;\r\n                        variante.valore = lavorazione.intFormValue;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.checkValidation()\r\n                }\r\n            }\r\n\r\n\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.intFormValue = lavorazioneId;\r\n                this.dropDownChange(lavorazione);\r\n            }\r\n\r\n            checkValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedProduct = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n\r\n                this.checkRegoleOtherProducts();\r\n                //console.log(this.isapplyingrules)\r\n                //if (this.isapplyingrules == false) {\r\n\r\n                this.checkForm();\r\n                if (this.isFormValid) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel()\r\n                }\r\n\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n                // }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            checkForm() {\r\n                if (this.isCalculationTypeCalcolato() || this.isCalculationTypeCalcolatoScontistica()) {\r\n                    this.isFormValid = true;\r\n                    let message;\r\n                    let numCopie = parseInt(this.formData.quantity);\r\n                    let minCopie = this.formData.minimo_quantita;\r\n                    let maxCopie = this.formData.maximo_quantita;\r\n\r\n                    if (this.formData.tipoCopie == 'libera') {\r\n                        //Quantity\r\n                        if (this.formData.quantity == null || numCopie <= 0) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            this.formData.isQuantityValidated = false;\r\n                            if (this.isFormValid == true) {\r\n                                this.isFormValid = false;\r\n                            }\r\n                        }\r\n                        else if (maxCopie == 0 || this.formData.maximo_quantita == null) {\r\n                            if (numCopie < minCopie) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minCopie;\r\n                                this.formData.isQuantityValidated = false;\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                            else {\r\n                                this.formData.isQuantityValidated = true;\r\n                                this.isFormValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                                this.formData.isQuantityValidated = true;\r\n                                this.isFormValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minCopie;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxCopie;\r\n                                this.formData.isQuantityValidated = false;\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.copieMessage = message;\r\n                    }\r\n                    else {\r\n                        if (this.formData.idCopie == \"-1\") {\r\n                            message = this.getLabel('mandatory_field');\r\n                            this.formData.isQuantityValidated = false;\r\n                            if (this.isFormValid == true) {\r\n                                this.isFormValid = false;\r\n                            }\r\n                        }\r\n                        else {\r\n                            this.formData.quantity = this.formData.idCopie;\r\n                            this.formData.isQuantityValidated = true;\r\n                        }\r\n\r\n                        if (this.formData.tipoCopie === 'fissa' && this.formData.copie != null) {\r\n                            this.formData.copieCount = this.formData.copie.filter(x => x.isVisible == true).length;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (parseInt(this.formData.quantity) <= 0) {\r\n                        this.formData.quantity = 1;\r\n                    }\r\n                    this.isFormValid = true;\r\n                    this.formData.isQuantityValidated = true;\r\n                }\r\n\r\n                this.sumQtaMatrix = 0;\r\n                let ismatrixPresent = false;\r\n                //Attributes\r\n                for (let group of this.formData.gruppi) {\r\n                    for (let attribute of group.varianti) {\r\n                        if (!attribute.isVisible) {\r\n                            continue;\r\n                        }\r\n                        //-- Count all varianti options that should be visible\r\n                        if (attribute.valori != null) {\r\n                            attribute.valoriCount = attribute.valori.filter(x => x.isVisible == true).length;\r\n                        }\r\n\r\n                        if (attribute.tipo == 1) //NUMERIC\r\n                        {\r\n                            let message: string = \"\";\r\n                            let qta = parseInt(attribute.intFormValue);\r\n                            let minQta = attribute.minQtaInput;\r\n                            let maxQta = attribute.maxQtaInput;\r\n                            if (attribute.intFormValue == null) {\r\n                                message = this.getLabel('inserisci_valore_valido');\r\n                                attribute.isValidated = false;\r\n                            }\r\n                            else if (maxQta == 0) {\r\n                                if (qta < minQta) {\r\n                                    message = this.getLabel('inserisci_valore_maggiore');\r\n                                    message += \" \" + minQta;\r\n                                    attribute.isValidated = false;\r\n                                }\r\n                                else {\r\n                                    attribute.isValidated = true;\r\n                                }\r\n                            }\r\n                            else {\r\n                                if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                    attribute.isValidated = true;\r\n                                }\r\n                                else {\r\n                                    message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                    message += \" \" + minQta;\r\n                                    message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                    message += \" \" + maxQta;\r\n                                    attribute.isValidated = false;\r\n                                }\r\n                            }\r\n                            if (attribute.isValidated == false) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n                            }\r\n                            attribute.lavorazioneMessage = message;\r\n                        }\r\n                        else if (attribute.tipo == 2) //DROPDOWN\r\n                        {\r\n                            //The value shall be greater than zero\r\n                            if (attribute.intFormValue < 0) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n\r\n                                attribute.isValidated = false;\r\n                            }\r\n\r\n                            else {\r\n                                attribute.isValidated = true;\r\n                            }\r\n                        }\r\n\r\n                        else if (attribute.tipo == 5) //FORMAT\r\n                        {\r\n                            //Width validation\r\n                            let convertedWidth = Number(attribute.numWidthFormValue);\r\n                            let convertedHeight = Number(attribute.numHeightFormValue);\r\n                            let convertedDepth = Number(attribute.numDepthFormValue);\r\n\r\n                            //Checking if it is not mandatory\r\n                            if (attribute.obbligatorio == false) {\r\n                                //There is no validation if the three dimentions are not set\r\n                                if (convertedWidth == 0 && convertedHeight == 0 && convertedDepth == 0) {\r\n                                    attribute.isWidthValidated = true;\r\n                                    attribute.isHeightValidated = true;\r\n                                    attribute.isDepthValidated = true;\r\n                                    continue;\r\n                                }\r\n                            }\r\n\r\n                            //Checking if it is a valid number\r\n\r\n                            if (isNaN(convertedWidth)) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n\r\n                                attribute.isWidthValidated = false;\r\n                                attribute.widthErrorMex = \"Inserisci un valore valido\";\r\n                            }\r\n\r\n                            else {\r\n                                if (attribute.max_base == 0) {\r\n                                    //The value shall be greater than the minimum\r\n                                    if (convertedWidth < attribute.min_base) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n\r\n                                        attribute.isWidthValidated = false;\r\n                                        attribute.widthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_base\r\n                                    }\r\n\r\n                                    else {\r\n                                        attribute.isWidthValidated = true;\r\n                                        attribute.widthErrorMex = \"\";\r\n                                    }\r\n                                }\r\n\r\n                                else {\r\n                                    //3 - minbase = 0 - maxbase N - inserisci un valore compresto tra 0 e N\r\n                                    //4 - minbase = N - maxbase M - inserisci un valore compresto tra 0 e N\r\n                                    if (convertedWidth < attribute.min_base || convertedWidth > attribute.max_base) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n\r\n                                        attribute.isWidthValidated = false;\r\n                                        attribute.widthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_base + \" e \" + attribute.max_base\r\n                                    }\r\n\r\n                                    else {\r\n                                        attribute.isWidthValidated = true;\r\n                                        attribute.widthErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            //Height validation\r\n\r\n                            //Checking if it is a valid number\r\n                            if (isNaN(convertedHeight)) {\r\n                                if (this.isFormValid == true) {\r\n                                    this.isFormValid = false;\r\n                                }\r\n\r\n                                attribute.isHeightValidated = false;\r\n                                attribute.heightErrorMex = \"Inserisci un valore valido\";\r\n                            }\r\n\r\n                            else {\r\n                                if (attribute.max_altezza == 0) {\r\n                                    //1 - min_altezza = 0 - max_altezza 0 - inserisci un valore maggiore id zero\r\n                                    //2 - min_altezza = N - max_altezza 0 - inserisci un valore maggiore id N                      \r\n\r\n                                    //The value shall be greater than the minimum\r\n                                    if (convertedHeight < attribute.min_altezza) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n\r\n                                        attribute.isHeightValidated = false;\r\n                                        attribute.heightErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_altezza\r\n                                    }\r\n\r\n                                    else {\r\n                                        attribute.isHeightValidated = true;\r\n                                        attribute.heightErrorMex = \"\";\r\n                                    }\r\n                                }\r\n\r\n                                else {\r\n                                    //3 - min_altezza = 0 - max_altezza N - inserisci un valore compresto tra 0 e N\r\n                                    //4 - min_altezza = N - max_altezza M - inserisci un valore compresto tra 0 e N\r\n                                    if (convertedHeight < attribute.min_altezza || convertedHeight > attribute.max_altezza) {\r\n                                        if (this.isFormValid == true) {\r\n                                            this.isFormValid = false;\r\n                                        }\r\n\r\n                                        attribute.isHeightValidated = false;\r\n                                        attribute.heightErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_altezza + \" e \" + attribute.max_altezza\r\n                                    }\r\n\r\n                                    else {\r\n                                        attribute.isHeightValidated = true;\r\n                                        attribute.heightErrorMex = \"\";\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            //Depth\r\n                            if (attribute.hasDepth == true) {\r\n                                //Checking if it is a valid number\r\n                                if (isNaN(convertedDepth)) {\r\n                                    if (this.isFormValid == true) {\r\n                                        this.isFormValid = false;\r\n                                    }\r\n\r\n                                    attribute.isDepthValidated = false;\r\n                                    attribute.depthErrorMex = \"Inserisci un valore valido\";\r\n                                }\r\n\r\n                                else {\r\n                                    if (attribute.max_profondita == 0) {\r\n                                        //1 - min_profondita = 0 - max_profondita 0 - inserisci un valore maggiore id zero\r\n                                        //2 - min_profondita = N - max_profondita 0 - inserisci un valore maggiore id N                      \r\n\r\n                                        //The value shall be greater than the minimum\r\n                                        if (convertedDepth < attribute.min_profondita) {\r\n                                            if (this.isFormValid == true) {\r\n                                                this.isFormValid = false;\r\n                                            }\r\n\r\n                                            attribute.isDepthValidated = false;\r\n                                            attribute.depthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_profondita\r\n                                        }\r\n\r\n                                        else {\r\n                                            attribute.isDepthValidated = true;\r\n                                            attribute.depthErrorMex = \"\";\r\n                                        }\r\n                                    }\r\n\r\n                                    else {\r\n                                        //3 - min_profondita = 0 - max_profondita N - inserisci un valore compresto tra 0 e N\r\n                                        //4 - min_profondita = N - max_profondita M - inserisci un valore compresto tra 0 e N\r\n                                        if (convertedDepth < attribute.min_profondita || convertedDepth > attribute.max_profondita) {\r\n                                            if (this.isFormValid == true) {\r\n                                                this.isFormValid = false;\r\n                                            }\r\n\r\n                                            attribute.isDepthValidated = false;\r\n                                            attribute.depthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_profondita + \" e \" + attribute.max_profondita\r\n                                        }\r\n\r\n                                        else {\r\n                                            attribute.isDepthValidated = true;\r\n                                            attribute.depthErrorMex = \"\";\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                        }\r\n                        else if (attribute.tipo == 7)//MATRIX\r\n                        {\r\n                            ismatrixPresent = true;\r\n                            attribute.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n                                varianti.VarianteOrizzontale.filter(x => x.qta > 0).forEach(varianti2 => {\r\n                                    this.sumQtaMatrix += varianti2.qta\r\n                                });\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (ismatrixPresent == true) {\r\n\r\n                    if (this.formData.tipoCopie == 'libera') {\r\n\r\n                        this.totalQtaForMatrix = this.formData.quantity\r\n                    }\r\n                    else {\r\n                        this.totalQtaForMatrix = this.formData.idCopie\r\n                    }\r\n                    if (this.totalQtaForMatrix != this.sumQtaMatrix) {\r\n                        this.formData.isQuantityMatrixValidated = false;\r\n                        if (this.isFormValid == true) {\r\n                            this.isFormValid = false;\r\n                        }\r\n                        let message = this.getLabel('matrix_message_qta');\r\n                        message += \" \" + this.totalQtaForMatrix;\r\n                        this.MatrixMessage = message;\r\n                    }\r\n                    else {\r\n                        this.formData.isQuantityMatrixValidated = true;\r\n                    }\r\n                }\r\n\r\n            }\r\n\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                return message;\r\n            }\r\n            /// Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                if (this.formData.tipoCopie != 'libera') {\r\n                    this.model.numCopie = this.formData.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.formData.quantity;\r\n                }\r\n\r\n                this.model.macrocategoryWizardId = 13;\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = parseInt(this.resourceId);\r\n\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let gruppo of this.formData.gruppi) {\r\n                    for (let variante of gruppo.varianti) {\r\n                        if (variante.isVisible == true) {\r\n                            let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                            lavorazione.matrixValues = new Array<MatrixModelCalculation>();\r\n                            //checkbox\r\n                            if (parseInt(variante.tipo) == 0) {\r\n                                lavorazione.lavorazioneId = variante.id;\r\n                                if (variante.lavorazioneCheckValue.toString() == 'true') {\r\n                                    lavorazione.valoreLavorazione = \"1\";\r\n                                }\r\n                                else {\r\n                                    lavorazione.valoreLavorazione = \"0\";\r\n                                }\r\n                            }\r\n                            //combo\r\n                            else if (parseInt(variante.tipo) == 2) {\r\n                                if (!variante.isMatrix) {\r\n                                    if (variante.intFormValue == \"0\") {\r\n                                        lavorazione.lavorazioneId = variante.id;\r\n                                        lavorazione.valoreLavorazione = \"-1\";\r\n                                    }\r\n\r\n                                    else {\r\n                                        lavorazione.lavorazioneId = variante.id;\r\n                                        lavorazione.valoreLavorazione = variante.intFormValue;\r\n                                    }\r\n                                }\r\n                            }\r\n                            //numeric\r\n                            else if (parseInt(variante.tipo) == 1) {\r\n                                if (variante.intFormValue != null) {\r\n                                    lavorazione.lavorazioneId = variante.id;\r\n                                    lavorazione.valoreLavorazione = variante.intFormValue;\r\n                                }\r\n                            }\r\n                            //formato\r\n                            else if (parseInt(variante.tipo) == 5) {\r\n                                if (variante.numWidthFormValue != null) {\r\n                                    lavorazione.lavorazioneId = variante.id;\r\n                                    lavorazione.tipo = variante.tipo;\r\n                                    if (variante.hasDepth == true) {\r\n                                        lavorazione.numWidthFormValue = variante.numWidthFormValue;\r\n                                        lavorazione.numHeightFormValue = variante.numHeightFormValue;\r\n                                        lavorazione.numDepthFormValue = variante.numDepthFormValue;\r\n                                    }\r\n\r\n                                    else {\r\n                                        lavorazione.numWidthFormValue = variante.numWidthFormValue;\r\n                                        lavorazione.numHeightFormValue = variante.numHeightFormValue;\r\n                                    }\r\n                                }\r\n                            }\r\n                            //textarea\r\n                            else if (parseInt(variante.tipo) == 6) {\r\n                                lavorazione.lavorazioneId = variante.id;\r\n                                lavorazione.valoreLavorazione = variante.value;\r\n                            }\r\n                            else if (parseInt(variante.tipo) == 7) {\r\n                                variante.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n                                    varianti.VarianteOrizzontale.filter(x => x.qta > 0).forEach(varianti2 => {\r\n                                        let matrix: MatrixModelCalculation = new MatrixModelCalculation();\r\n                                        matrix.quantita = varianti2.qta;\r\n                                        matrix.lavorazioneOrizzontaleId = varianti2.id;\r\n                                        matrix.lavorazioneVerticaleId = varianti.id;\r\n                                        lavorazione.tipo = variante.tipo;\r\n                                        lavorazione.lavorazioneId = variante.id;\r\n                                        lavorazione.matrixValues.push(matrix)\r\n                                    });\r\n                                });\r\n                            }\r\n\r\n                            if ((lavorazione.lavorazioneId != null && lavorazione.valoreLavorazione != \"-1\") || parseInt(variante.tipo) == 7) {\r\n                                this.model.lavorazioniAccessorie.push(lavorazione);\r\n                            }\r\n                        }\r\n                    }\r\n                    this.isDataInitialized = true;\r\n                }\r\n                if (this.formData.calculationType != QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n                    let calculationSub = this._quotingService.getCalculatedAp(this.model).subscribe(result => {\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedProduct = true;\r\n\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            let scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListino() || this.isCalculationTypeCalcolatoListino() || this.isCalculationTypeCalcolatoListinoFornitori()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica() || this.isCalculationTypeCalcolatoListinoScontistica() || this.isCalculationTypeCalcolatoListinoFornitoriScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        this.subManager.add(calculationSub);\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedProduct = false;\r\n                            this.showErrorMessage = true;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(calculationSub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoListino(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoListinoFornitori(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n\r\n\r\n            isCalculationTypeCalcolatoListinoScontistica(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n            isCalculationTypeCalcolatoListinoFornitoriScontistica(): boolean {\r\n                let retVal: boolean = false;\r\n                if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA) {\r\n                    retVal = true;\r\n                }\r\n\r\n                return retVal;\r\n            }\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.DayDescriptionName = price.DayDescriptionName;\r\n                this.resultPrice.DayDescriptionStatus = price.DayDescriptionStatus;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n\r\n            addToCartApProduct() {\r\n                let wizardId = parseInt(this.resourceId);\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(addToCartSub);\r\n            }\r\n\r\n            addToCartOtherProductCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = parseInt(this.resourceId);\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = parseInt(this.resourceId);\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = parseInt(this.resourceId);\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addOtherProductCalcolatoListinoToCart(quantityId: number) {\r\n                let wizardId = parseInt(this.resourceId);\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addOtherProductCalcolatoListinoScontisticaToCart(quantityId: number) {\r\n                let wizardId = parseInt(this.resourceId);\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                setTimeout(function () { \r\n                    $('.popovers').popover(); \r\n                  }, 150);\r\n                layoutTheme.initToggle();\r\n                this.setPopoverVariableForMAtrix();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            setPopoverVariableForMAtrix() {\r\n                for (let gruppo of this.formData.gruppi) {\r\n                    for (let variante of gruppo.varianti) {\r\n                        if (parseInt(variante.tipo) == 7) {\r\n                            variante.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n\r\n                                varianti.popup = $('#popover_content_wrapper_' + varianti.id).html()\r\n                            });\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/other-product-form.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Input, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\n\r\n@Component({\r\n    selector: \"dy-quoting\",\r\n    template: \"\"\r\n})\r\n\r\n\r\n\r\nexport class QuotingMainComponent implements OnInit \r\n{\r\n    constructor\r\n    (\r\n        private _compiler: Compiler,\r\n        private componentHelper: ComponentHelperService,\r\n        private _elementRef: ViewContainerRef,\r\n        private templateService: TemplateService,\r\n        @Inject('isBrowser') private isBrowser: boolean,\r\n\r\n    ) {}\r\n\r\n    @Input() QResourceId: number;\r\n    @Input() QMacroCat: number;\r\n    @Input() QType: string;\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() \r\n    {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let templateHtml: string;\r\n\r\n        let compSub = this.templateService.getComponentTemplate(\"quotingMainTemplate\").subscribe(result => \r\n        {\r\n            templateHtml = result;\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(templateHtml, this.QResourceId, this.QMacroCat, this.QType);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        }); \r\n\r\n        this.subManager.add(compSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(template: string, InputresourceId: number, InputMacroCatId: number, InputTypeId: string) \r\n    {\r\n        @Component({\r\n            template: template\r\n        })\r\n\r\n        class ParentComponent implements OnInit \r\n        {\r\n            constructor\r\n            (\r\n                private languageService: LanguageService,\r\n                private authService: AuthService,\r\n            ) {}\r\n\r\n            QResourceId: number = InputresourceId;\r\n            QMacroCat: number = InputMacroCatId;\r\n            QType: string = InputTypeId;\r\n\r\n            lang: string = this.languageService.getLongLang();\r\n            autentification = this.authService.GetData();\r\n\r\n            ngOnInit() {\r\n\r\n            }\r\n\r\n        }\r\n\r\n        return ParentComponent;\r\n    }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/quoting-main.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ComponentFactory, ReflectiveInjector, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FormatiMultipliObj } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n    selector: \"dy-wizard-adesivi-widget\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class WizardAdesiviComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private _quotingService: QuotingService,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() resourceId: number;\r\n    autentification = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let wizardSub = this._quotingService.getWizardAdesiviData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(wizardSub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n        @Component({\r\n            template: result.templateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private translate: TranslateService,\r\n                    private routesService: RoutesService,\r\n                    private cartService: ShoppingCartService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    public canvasService: CustomersCanvasService\r\n                ) {\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                if (this.isCalculationTypeCalcolato()) {\r\n                                    this.addToCartWizardCalcolato(1);\r\n                                }\r\n                                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                                    this.addToCartWizardCalcolatoScontistica(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListino()) {\r\n                                    this.addToCartWizardListino(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListinoScontistica()) {\r\n                                    this.addToCartWizardListinoScontistica(1);\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private loggedIdUser: UserLogin;\r\n            waiting: boolean = false;\r\n            carteValue: number = -1;\r\n            lang: string = this.languageService.getLongLang();\r\n            responseModel: QuotingModel = new QuotingModel();\r\n            autentification = this.authService.GetData();\r\n            resourceId: number = InputresourceId;\r\n            isDataInitialized: boolean = false;\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            typePriceResult: string;\r\n            model = new wizardFormEditoriaModel();\r\n            currentRowIndex: number = -1;\r\n            iShowHourForDay: boolean = false;\r\n            currentColumnIndex: number = -1;\r\n            requestInfoSuccess: boolean = null;\r\n            resultCalculation: boolean = false;\r\n            showErrorMessage: boolean = false;\r\n            blockquoting: boolean = false;\r\n            listaFile: Array<FileCombinationModel>;\r\n            formatiMultipliList: Array<FormatiMultipliObj> = new Array<FormatiMultipliObj>();\r\n\r\n            isCalculatedWizard: boolean = false;\r\n\r\n            // sending info to a child component\r\n            public parentWidgetData: string = result.CanvasInfo;\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n                if (this.responseModel.idGruppo == 6) {\r\n                    this.ExcludingRules.setMacrocategory(\"ADESIVI\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 8) {\r\n                    this.ExcludingRules.setMacrocategory(\"MANIFESTI\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 10) {\r\n                    this.ExcludingRules.setMacrocategory(\"PANNELLI\");\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                        this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n            aggiungiFormatoMultiplo(firstLoad = false) {\r\n                let fileObj = new FormatiMultipliObj();\r\n                let lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(x => x.Id).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj)\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n            deleteFormatoMultiplo(id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(e => e.Id === id), 1)\r\n            }\r\n            openCanvasEditor() {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n\r\n                    const canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    const isStateId = false;\r\n\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig() {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n                let isUserLoggedIn = false;\r\n\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n            CheckRegoleAdesivi() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    let oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"ADESIVI\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"ADESIVI\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    let count = 0;\r\n                    for (let lavorazioneOld of lavAccArray) {\r\n                        count = 0;\r\n                        for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            CheckRegoleManifesti() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    let oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"MANIFESTI\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"MANIFESTI\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    let count = 0;\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        count = 0;\r\n                        for (let lavorazioneOld of lavAccArray) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            CheckRegolePannelli() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    let oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"PANNELLI\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"PANNELLI\", this.responseModel);\r\n\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    let count = 0;\r\n                    for (let lavorazioneOld of lavAccArray) {\r\n                        count = 0;\r\n                        for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            parameterValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n\r\n                //apply all rules\r\n\r\n                if (this.responseModel.idGruppo == 6) {\r\n                    this.CheckRegoleAdesivi();\r\n                }\r\n                else if (this.responseModel.idGruppo == 8) {\r\n                    this.CheckRegoleManifesti();\r\n                }\r\n                else if (this.responseModel.idGruppo == 10) {\r\n                    this.CheckRegolePannelli();\r\n                }\r\n\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n\r\n                    //verify validation for all  parameters \r\n                    this.validationCopie();\r\n\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n\r\n                    this.validationFormati();\r\n\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.validationMateriali();\r\n\r\n                this.validationSupporti();\r\n\r\n                this.countPlastificazioni();\r\n\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            }\r\n\r\n            countPlastificazioni() {\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            selectFileCombination() {\r\n                this.listaFile = new Array<FileCombinationModel>()\r\n                for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n                    if (this.responseModel.idFormati != null) {\r\n\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n\r\n                            let fileObj = new FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj)\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            checkZero(val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            clearSelectedIndex() {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            /// Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n\r\n                this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n                this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n                this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n                    let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        //combo\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        //numeric\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        //text area\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    let calcWizSub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedWizard = true;\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListino()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false\r\n\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedWizard = true;\r\n                            this.showErrorMessage = true;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(calcWizSub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n\r\n                this.isDataInitialized = true;\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkValidation() {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.supportoIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.supportoIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            validationBaseFormati() {\r\n                let message;\r\n                let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            }\r\n\r\n            validationAltezzaFormati() {\r\n                let message;\r\n                let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            }\r\n\r\n            validationSoggetti() {\r\n                let message;\r\n                let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            }\r\n\r\n            validationCopie() {\r\n                let message;\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    let numCopie = parseInt(this.responseModel.numCopie);\r\n                    let minCopie = this.responseModel.minimoCopie;\r\n                    let maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.copieMessage = message;\r\n            }\r\n\r\n            validationFormati() {\r\n                let message;\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.formatiMessage = message;\r\n            }\r\n            validationBaseFormatiMultipli(baseInput) {\r\n\r\n                let message = \"\";\r\n                let base = parseFloat(baseInput)\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n\r\n            validationAltezzaFormatiMultipli(altezzaInput) {\r\n                let message = \"\";\r\n                let altezza = parseFloat(altezzaInput)\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n            validationCopieFormatiMultipli(copieInput) {\r\n                let message = \"\";\r\n                let numCopie = parseInt(copieInput);\r\n                let minCopie = this.responseModel.minimoCopie;\r\n                let maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n\r\n                return message;\r\n            }\r\n            validationFormatiMultipli() {\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                this.formatiMultipliList.forEach(x => {\r\n                    var copieMessage = this.validationCopieFormatiMultipli(x.Copie);\r\n\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n\r\n                    var heighMessage = this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n\r\n            }\r\n            validationMateriali() {\r\n                let message;\r\n                if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.materialeIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.materialiFlessibili != null) {\r\n                    this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.materialeMessage = message;\r\n            }\r\n\r\n            validationSupporti() {\r\n                let message;\r\n\r\n                if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.supportoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.supportiRigidi != null) {\r\n                    this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.supportoMessage = message;\r\n            }\r\n\r\n            validationLavorazioneAccessoria() {\r\n                let message: string = \"\";\r\n                let valid: boolean = true;\r\n\r\n                for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        let qta = parseInt(lavorazione.value);\r\n                        let minQta = lavorazione.minQtaInput;\r\n                        let maxQta = lavorazione.maxQtaInput;\r\n\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n\r\n                let transSub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                this.subManager.add(transSub);\r\n\r\n                return message;\r\n            }\r\n\r\n            checkIsPlastificazioneInternoIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter((x: any) => x.isVisible == true).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                return result;\r\n            }\r\n\r\n            isAttributeFixed(tipoLavorazione) {\r\n                let result: boolean = false;\r\n\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n            InputNumberCheck(event: any) {\r\n                let result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n                let result: boolean = false;\r\n                let isVisible: boolean = false;\r\n\r\n                for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            onFormatiChange(isrules = false) {\r\n                for (let formato of this.responseModel.formati) {\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onFormatiVisualChange(formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            }\r\n\r\n            onMaterialeChange(isrules = false) {\r\n                for (let materiale of this.responseModel.materialiFlessibili) {\r\n                    if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n                        this.responseModel.materialeDescription = materiale.descrizione;\r\n                        this.responseModel.materialeImage = materiale.image;\r\n                        this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n                        this.responseModel.materialeShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onMaterialeVisualChange(materialeId) {\r\n                this.responseModel.idMaterialiFlessibili = materialeId;\r\n                this.onMaterialeChange();\r\n            }\r\n\r\n\r\n            onSuportoChange(isrules = false) {\r\n                for (let supporto of this.responseModel.supportiRigidi) {\r\n                    if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n                        this.responseModel.supportoDescription = supporto.descrizione;\r\n                        this.responseModel.supportoImage = supporto.image;\r\n                        this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n                        this.responseModel.supportoShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onSuportoVisualChange(supportoId) {\r\n                this.responseModel.idSupportiRigidi = supportoId;\r\n                this.onSuportoChange();\r\n            }\r\n\r\n            onPlastificationInternoChange(isrules = false) {\r\n                for (let plastification of this.responseModel.plastificazioni1) {\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onPlastificationInternoViasualChange(plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            }\r\n\r\n            lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            }\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideFormatDescription() {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideMaterialeDescription() {\r\n                if (this.responseModel.materialeShowInfo) {\r\n                    this.responseModel.materialeShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideSupportoDescription() {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePlastficationInternoDescription() {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            addToCartWizardCalcolato(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(wizCalSub);\r\n            }\r\n\r\n            addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(wizSconSub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(wizLisSub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(wizLisSconSub);\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-adesivi.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FormatiMultipliObj } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n    selector: \"dy-wizard-banner-widget\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class WizardBannerComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private _quotingService: QuotingService,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() resourceId: number;\r\n    autentification = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let sub = this._quotingService.getWizardBannerData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(sub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n        @Component({\r\n            template: result.templateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private translate: TranslateService,\r\n                    private routesService: RoutesService,\r\n                    private cartService: ShoppingCartService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    public canvasService: CustomersCanvasService\r\n                ) {\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                if (this.isCalculationTypeCalcolato()) {\r\n                                    this.addToCartWizardCalcolato(1);\r\n                                }\r\n                                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                                    this.addToCartWizardCalcolatoScontistica(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListino()) {\r\n                                    this.addToCartWizardListino(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListinoScontistica()) {\r\n                                    this.addToCartWizardListinoScontistica(1);\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private loggedIdUser: UserLogin;\r\n            waiting: boolean = false;\r\n            carteValue: number = -1;\r\n            lang: string = this.languageService.getLongLang();\r\n            responseModel: QuotingModel = new QuotingModel();\r\n            autentification = this.authService.GetData();\r\n            resourceId: number = InputresourceId;\r\n            isDataInitialized: boolean = false;\r\n            iShowHourForDay: boolean = false;\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            typePriceResult: string;\r\n            model = new wizardFormEditoriaModel();\r\n            currentRowIndex: number = -1;\r\n            currentColumnIndex: number = -1;\r\n            requestInfoSuccess: boolean = null;\r\n            resultCalculation: boolean = false;\r\n            showErrorMessage: boolean = false;\r\n            blockquoting: boolean = false;\r\n            listaFile: Array<FileCombinationModel>;\r\n            formatiMultipliList: Array<FormatiMultipliObj> = new Array<FormatiMultipliObj>();\r\n\r\n            isCalculatedWizard: boolean = false;\r\n\r\n            // sending info to a child component\r\n            public parentWidgetData: string = result.CanvasInfo;\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    this.ExcludingRules.setMacrocategory(\"BANNER\");\r\n                }\r\n                else if (this.responseModel.idGruppo == 9) {\r\n                    this.ExcludingRules.setMacrocategory(\"BANDIERE\");\r\n                }\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                        this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n            aggiungiFormatoMultiplo(firstLoad = false) {\r\n                let fileObj = new FormatiMultipliObj();\r\n                let lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(x => x.Id).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj)\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n            deleteFormatoMultiplo(id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(e => e.Id === id), 1)\r\n            }\r\n\r\n            openCanvasEditor() {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n\r\n                    const canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    const isStateId = false;\r\n\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig() {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n                let isUserLoggedIn = false;\r\n\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n            CheckRegoleBanner() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldAsola = this.responseModel.idAsole;\r\n                    let oldElettro = this.responseModel.idElettrosaldature;\r\n                    let oldOcchielli = this.responseModel.idOcchielli;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole occhiellatura\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole asola\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole elettro\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANNER\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", this.responseModel.idElettrosaldature, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANNER\", this.responseModel);\r\n\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldOcchielli != this.responseModel.idOcchielli) {\r\n                        this.onOcchielliChange(true);\r\n                    }\r\n                    if (oldAsola != this.responseModel.idAsole) {\r\n                        this.onAsoleChange(true);\r\n                    }\r\n                    if (oldElettro != this.responseModel.idElettrosaldature) {\r\n                        this.onElettrosaldatureChange(true);\r\n                    }\r\n                    let count = 0;\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        count = 0;\r\n                        for (let lavorazioneOld of lavAccArray) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            checkIsAsolaIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsCucituraIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsElettroIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            checkIsOcchielliIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n\r\n            CheckRegoleBandiere() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldAsola = this.responseModel.idAsole;\r\n                    let oldCucitura = this.responseModel.idCuciture;\r\n                    let oldOcchielli = this.responseModel.idOcchielli;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", null, null, this.responseModel);\r\n\r\n                    //Reset regole materialeFlessibile\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole occhiellatura\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole asola\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole elettro\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANDIERE\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", this.responseModel.idCuciture, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANDIERE\", this.responseModel);\r\n\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n                        this.onMaterialeChange(true);\r\n                    }\r\n                    if (oldOcchielli != this.responseModel.idOcchielli) {\r\n                        this.onOcchielliChange(true);\r\n                    }\r\n                    if (oldAsola != this.responseModel.idAsole) {\r\n                        this.onAsoleChange(true);\r\n                    }\r\n                    if (oldCucitura != this.responseModel.idCuciture) {\r\n                        this.onCucitureChange(true);\r\n                    }\r\n\r\n                    let count = 0;\r\n                    for (let lavorazioneOld of lavAccArray) {\r\n                        count = 0;\r\n                        for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n                                    if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                        this.lavorazioniAccessorieComboChange(lavorazione);\r\n                                        count++;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            isBannerQuotingForm() {\r\n                result = false;\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isBandiereQuotingForm() {\r\n                result = false;\r\n                if (this.responseModel.idGruppo == 9) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            parameterValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n\r\n                //apply all rules\r\n                if (this.responseModel.idGruppo == 7) {\r\n                    this.CheckRegoleBanner();\r\n                    if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n                        this.validationElettro();\r\n                    }\r\n                    else {\r\n                        this.responseModel.elettroIsValid = true;\r\n                    }\r\n\r\n                    this.responseModel.cucituraIsValid = true;\r\n                }\r\n                else if (this.responseModel.idGruppo == 9) {\r\n                    this.CheckRegoleBandiere();\r\n                    if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n                        this.validationCuciture();\r\n                    }\r\n                    else {\r\n                        this.responseModel.cucituraIsValid = true;\r\n                    }\r\n\r\n                    this.responseModel.elettroIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n\r\n                    //verify validation for all  parameters\r\n                    this.validationCopie();\r\n\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n\r\n                    this.validationFormati();\r\n\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n\r\n                if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n                    this.validationAsole();\r\n                    if (this.responseModel.idAsole != \"0\") {\r\n                        this.validationDiametroAsole();\r\n                    }\r\n                    else {\r\n                        this.responseModel.diametroAsolaIsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.diametroAsolaIsValid = true;\r\n                    this.responseModel.asolaIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n                    this.validationOcchielli();\r\n                    if (this.responseModel.idOcchielli != \"0\") {\r\n                        this.validationDistanzaOcchielli();\r\n                    }\r\n                    else {\r\n                        this.responseModel.distanzaOcchielliIsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaIsValid = true;\r\n                    this.responseModel.distanzaOcchielliIsValid = true;\r\n                }\r\n\r\n\r\n                this.validationMateriali();\r\n\r\n                this.countOcchielliDisposizione();\r\n                this.countAsoleDisposizioni();\r\n                this.countTelettrosaldature();\r\n                this.countTelettrosaldatureDisposizioni();\r\n                this.countCucitureDisposizioni();\r\n\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            }\r\n\r\n            countOcchielliDisposizione() {\r\n                if (this.responseModel.occhielliDisposizione != null) {\r\n                    this.responseModel.occhielliDisposizioneCount = this.responseModel.occhielliDisposizione.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countAsoleDisposizioni() {\r\n                if (this.responseModel.asoleDisposizioni != null) {\r\n                    this.responseModel.asoleDisposizioniCount = this.responseModel.asoleDisposizioni.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countTelettrosaldature() {\r\n                if (this.responseModel.elettrosaldature != null) {\r\n                    this.responseModel.elettrosaldatureCount = this.responseModel.elettrosaldature.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countTelettrosaldatureDisposizioni() {\r\n                if (this.responseModel.elettrosaldatureDisposizioni != null) {\r\n                    this.responseModel.elettrosaldatureDisposizioniCount = this.responseModel.elettrosaldatureDisposizioni.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countCucitureDisposizioni() {\r\n                if (this.responseModel.cucitureDisposizioni != null) {\r\n                    this.responseModel.cucitureDisposizioniCount = this.responseModel.cucitureDisposizioni.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            selectFileCombination() {\r\n\r\n                this.listaFile = new Array<FileCombinationModel>()\r\n                for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n                            let fileObj = new FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj)\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            checkZero(val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            clearSelectedIndex() {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            /// Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n\r\n                this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n\r\n                this.model.idAsole = this.responseModel.idAsole;\r\n                if (this.responseModel.idAsole != \"0\") {\r\n                    this.model.disposizione_asola_id = this.responseModel.disposizione_asola_id;\r\n                    this.model.diametro_asola = this.responseModel.diametro_asola;\r\n                }\r\n\r\n                this.model.idCuciture = this.responseModel.idCuciture;\r\n                if (this.responseModel.idCuciture != \"0\") {\r\n                    this.model.disposizione_cucitura_id = this.responseModel.disposizione_cucitura_id;\r\n                }\r\n\r\n                this.model.idElettrosaldature = this.responseModel.idElettrosaldature;\r\n\r\n                if (this.responseModel.idElettrosaldature != \"0\") {\r\n                    this.model.disposizione_elettrosaldatura_id = this.responseModel.disposizione_elettrosaldatura_id;\r\n                }\r\n\r\n                this.model.idOcchielli = this.responseModel.idOcchielli;\r\n\r\n                if (this.responseModel.idOcchielli != \"0\") {\r\n                    this.model.disposizione_occhielli_id = this.responseModel.disposizione_occhielli_id;\r\n                    this.model.distanza_occhielli = this.responseModel.distanza_occhielli;\r\n                }\r\n\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n                    let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        //combo\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        //numeric\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        //text area\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedWizard = true;\r\n\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListino()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false\r\n\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedWizard = true;\r\n                            this.showErrorMessage = true;\r\n\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n                this.isDataInitialized = true;\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkValidation() {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.occhiellaturaIsValid\r\n                        && this.responseModel.elettroIsValid\r\n                        && this.responseModel.asolaIsValid\r\n                        && this.responseModel.distanzaOcchielliIsValid\r\n                        && this.responseModel.diametroAsolaIsValid\r\n                        && this.responseModel.cucituraIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.materialeIsValid\r\n                        && this.responseModel.occhiellaturaIsValid\r\n                        && this.responseModel.elettroIsValid\r\n                        && this.responseModel.asolaIsValid\r\n                        && this.responseModel.distanzaOcchielliIsValid\r\n                        && this.responseModel.diametroAsolaIsValid\r\n                        && this.responseModel.cucituraIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            validationBaseFormati() {\r\n                let message;\r\n                let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            }\r\n\r\n            validationAltezzaFormati() {\r\n                let message;\r\n                let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            }\r\n\r\n            validationSoggetti() {\r\n                let message;\r\n                let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            }\r\n\r\n            validationCopie() {\r\n                let message;\r\n\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    let numCopie = parseInt(this.responseModel.numCopie);\r\n                    let minCopie = this.responseModel.minimoCopie;\r\n                    let maxCopie = this.responseModel.massimoCopie;\r\n\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.copieMessage = message;\r\n            }\r\n\r\n            validationFormati() {\r\n                let message;\r\n\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.formatiMessage = message;\r\n            }\r\n            validationBaseFormatiMultipli(baseInput) {\r\n\r\n                let message = \"\";\r\n                let base = parseFloat(baseInput)\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n\r\n            validationAltezzaFormatiMultipli(altezzaInput) {\r\n                let message = \"\";\r\n                let altezza = parseFloat(altezzaInput)\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n            validationCopieFormatiMultipli(copieInput) {\r\n                let message = \"\";\r\n                let numCopie = parseInt(copieInput);\r\n                let minCopie = this.responseModel.minimoCopie;\r\n                let maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n\r\n                return message;\r\n            }\r\n            validationFormatiMultipli() {\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                this.formatiMultipliList.forEach(x => {\r\n                    var copieMessage = this.validationCopieFormatiMultipli(x.Copie);\r\n\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n\r\n                    var heighMessage = this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n\r\n            }\r\n            validationMateriali() {\r\n                let message;\r\n\r\n                if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.materialeIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.materialiFlessibili != null) {\r\n                    this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.materialeMessage = message;\r\n            }\r\n\r\n            validationOcchielli() {\r\n                let message;\r\n\r\n                if (this.responseModel.idOcchielli == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.occhiellaturaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.occhielli != null) {\r\n                    this.responseModel.occhielliCount = this.responseModel.occhielli.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.occhiellaturaMessage = message;\r\n            }\r\n\r\n            validationAsole() {\r\n                let message;\r\n\r\n                if (this.responseModel.idAsole == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.asolaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.asolaIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.asole != null) {\r\n                    this.responseModel.asoleCount = this.responseModel.asole.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.asolaMessage = message;\r\n            }\r\n\r\n            validationDiametroAsole() {\r\n                let message;\r\n                let diametro = parseInt(this.responseModel.diametro_asola);\r\n\r\n                if (this.responseModel.diametro_asola == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.diametroAsolaIsValid = false;\r\n                }\r\n                else if (diametro <= 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" 0\";\r\n                    this.responseModel.diametroAsolaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.diametroAsolaIsValid = true;\r\n                }\r\n\r\n                this.responseModel.diametroAsolaMessage = message;\r\n            }\r\n\r\n            validationDistanzaOcchielli() {\r\n                let message;\r\n                let distanza = parseInt(this.responseModel.distanza_occhielli);\r\n\r\n                if (this.responseModel.distanza_occhielli == null) {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.distanzaOcchielliIsValid = false;\r\n                }\r\n                else if (distanza <= 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" 0\";\r\n                    this.responseModel.distanzaOcchielliIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.distanzaOcchielliIsValid = true;\r\n                }\r\n\r\n                this.responseModel.distanzaOcchielliMessage = message;\r\n            }\r\n\r\n            validationElettro() {\r\n                let message;\r\n\r\n                if (this.responseModel.idElettrosaldature == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.elettroIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.elettroIsValid = true;\r\n                }\r\n\r\n                this.responseModel.elettroMessage = message;\r\n            }\r\n\r\n            validationCuciture() {\r\n                let message;\r\n\r\n                if (this.responseModel.idCuciture == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.cucituraIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cucituraIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.cuciture != null) {\r\n                    this.responseModel.cucitureCount = this.responseModel.cuciture.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.cucituraMessage = message;\r\n            }\r\n\r\n            validationLavorazioneAccessoria() {\r\n                let message: string = \"\";\r\n                let valid: boolean = true;\r\n\r\n                for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        let qta = parseInt(lavorazione.value);\r\n                        let minQta = lavorazione.minQtaInput;\r\n                        let maxQta = lavorazione.maxQtaInput;\r\n\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                this.subManager.add(sub);\r\n\r\n                return message;\r\n            }\r\n\r\n\r\n\r\n            isAttributeFixed(tipoLavorazione) {\r\n                let result: boolean = false;\r\n\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n            InputNumberCheck(event: any) {\r\n                let result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n                let result: boolean = false;\r\n                let isVisible: boolean = false;\r\n\r\n                for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n\r\n                }\r\n\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            onFormatiChange(isrules = false) {\r\n                for (let formato of this.responseModel.formati) {\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onFormatiVisualChange(formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            }\r\n\r\n            onOcchielliChange(isrules = false) {\r\n                for (let occhiellatura of this.responseModel.occhielli) {\r\n                    if (occhiellatura.chiave == this.responseModel.idOcchielli) {\r\n                        this.responseModel.occhiellaturaDescription = occhiellatura.descrizione;\r\n                        this.responseModel.occhiellaturaImage = occhiellatura.image;\r\n                        this.responseModel.occhiellaturaHasInfo = occhiellatura.hasInfo;\r\n                        this.responseModel.occhiellaturaShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onOcchielliVisualChange(occhielliId) {\r\n                this.responseModel.idOcchielli = occhielliId;\r\n                this.onOcchielliChange();\r\n            }\r\n\r\n            onAsoleChange(isrules = false) {\r\n                for (let asola of this.responseModel.asole) {\r\n                    if (asola.chiave == this.responseModel.idAsole) {\r\n                        this.responseModel.asolaDescription = asola.descrizione;\r\n                        this.responseModel.asolaImage = asola.image;\r\n                        this.responseModel.asolaHasInfo = asola.hasInfo;\r\n                        this.responseModel.asolaShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onAsoleVisualChange(asoleId) {\r\n                this.responseModel.idAsole = asoleId;\r\n                this.onAsoleChange();\r\n            }\r\n\r\n            onElettrosaldatureChange(isrules = false) {\r\n                for (let elettro of this.responseModel.elettrosaldature) {\r\n                    if (elettro.chiave == this.responseModel.idElettrosaldature) {\r\n                        this.responseModel.elettroDescription = elettro.descrizione;\r\n                        this.responseModel.elettroImage = elettro.image;\r\n                        this.responseModel.elettroHasInfo = elettro.hasInfo;\r\n                        this.responseModel.elettroShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onElettrosaldatureVisualChange(elettroId) {\r\n                this.responseModel.idElettrosaldature = elettroId;\r\n                this.onElettrosaldatureChange();\r\n            }\r\n\r\n\r\n            onCucitureChange(isrules = false) {\r\n                for (let cucitura of this.responseModel.cuciture) {\r\n                    if (cucitura.chiave == this.responseModel.idCuciture) {\r\n                        this.responseModel.cucituraDescription = cucitura.descrizione;\r\n                        this.responseModel.cucituraImage = cucitura.image;\r\n                        this.responseModel.cucituraHasInfo = cucitura.hasInfo;\r\n                        this.responseModel.cucituraShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onCucitureVisualChange(cucituraId) {\r\n                this.responseModel.idCuciture = cucituraId;\r\n                this.onCucitureChange();\r\n            }\r\n\r\n            onMaterialeChange(isrules = false) {\r\n                for (let materiale of this.responseModel.materialiFlessibili) {\r\n                    if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n                        this.responseModel.materialeDescription = materiale.descrizione;\r\n                        this.responseModel.materialeImage = materiale.image;\r\n                        this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n                        this.responseModel.materialeShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onMaterialeVisualChange(materialeId) {\r\n                this.responseModel.idMaterialiFlessibili = materialeId;\r\n                this.onMaterialeChange();\r\n            }\r\n\r\n\r\n            lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            }\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideFormatDescription() {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideOcchiellaturaDescription() {\r\n                if (this.responseModel.occhiellaturaShowInfo) {\r\n                    this.responseModel.occhiellaturaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.occhiellaturaShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideAsolaDescription() {\r\n                if (this.responseModel.asolaShowInfo) {\r\n                    this.responseModel.asolaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.asolaShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideElettrosaldatureDescription() {\r\n                if (this.responseModel.elettroShowInfo) {\r\n                    this.responseModel.elettroShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.elettroShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideCucitureDescription() {\r\n                if (this.responseModel.cucituraShowInfo) {\r\n                    this.responseModel.cucituraShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.cucituraShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideMaterialeDescription() {\r\n                if (this.responseModel.materialeShowInfo) {\r\n                    this.responseModel.materialeShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.materialeShowInfo = true;\r\n                }\r\n            }\r\n            showHideSupportoDescription() {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            }\r\n\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino() {\r\n                let result: boolean = false;\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            addToCartWizardCalcolato(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n        return ChildComponent;\r\n    }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-banner.component.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\n//Model\r\nimport { wizardFormEditoriaModel } from \"./../../models/document/quoting-submit-model\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { AuthService } from '../core/auth.service';\r\n@Injectable()\r\nexport class QuotingService {\r\n\r\n  constructor(\r\n    public _api: ApiService,\r\n    public language: LanguageService,\r\n    public currency: CurrencyService,\r\n    public _cache: CacheService,\r\n    private mappings: Mappings,\r\n    private authService: AuthService\r\n  ) { }\r\n\r\n  getWizardStampaData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Stampa_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n\r\n  getWizardBannerData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Banner_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getWizardAdesiviData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Adesivi_Data.\r\n      replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getWizardBusteData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Buste_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n\r\n  getWizardEtichetteData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Etichette_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getWizardCommercialeData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Commerciale_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId\r\n        .toString()).replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getWizardEditoriaData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url = this.mappings.Web_Api_Get_Wizard_Editoria_Data\r\n      .replace('{modelType}', modelType)\r\n      .replace('{resourceId}', resourceId.toString())\r\n      .replace('{userId}', userId)\r\n      .replace('{lang}', lang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getWizardDataRequest(modelType: string, resourceId: number, lang: string) {\r\n    let userId: string = this.authService.GetUserId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Wizard_Data_Address.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n\r\n  }\r\n\r\n  getCalculatedWizard(data: wizardFormEditoriaModel) {\r\n\r\n    data.language = this.language.getLongLang();\r\n    data.currency = this.currency.getCurrency();\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Get_Wizard_Price_Estimation, data)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  getCalculatedAp(data: wizardFormEditoriaModel) {\r\n\r\n    data.language = this.language.getLongLang();\r\n    data.currency = this.currency.getCurrency();\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Get_Ap_Price_Estimation, data)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  sendRequestInfo(data: wizardFormEditoriaModel) {\r\n\r\n    data.language = this.language.getLongLang();\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Send_Request_Info_Wizard, data)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/document/quoting.service.ts","import { CustomersCanvasService } from './../../../../../../services/inventory/customerscanvas.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ComponentFactory, ReflectiveInjector, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CurrencyService } from '../../../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n    selector: \"dy-wizard-buste-widget\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class WizardBusteComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private _quotingService: QuotingService,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() resourceId: number;\r\n    autentification = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n    subManager = new Subscription();\r\n\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let sub = this._quotingService.getWizardBusteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(sub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n        @Component({\r\n            template: result.templateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private translate: TranslateService,\r\n                    private routesService: RoutesService,\r\n                    public currency: CurrencyService,\r\n                    private cartService: ShoppingCartService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    public canvasService: CustomersCanvasService\r\n                ) {\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                if (this.isCalculationTypeCalcolato()) {\r\n                                    this.addToCartWizardCalcolato(1);\r\n                                }\r\n                                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                                    this.addToCartWizardCalcolatoScontistica(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListino()) {\r\n                                    this.addToCartWizardListino(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListinoScontistica()) {\r\n                                    this.addToCartWizardListinoScontistica(1);\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private loggedIdUser: UserLogin;\r\n            waiting: boolean = false;\r\n            carteValue: number = -1;\r\n            lang: string = this.languageService.getLongLang();\r\n            responseModel: QuotingModel = new QuotingModel();\r\n            autentification = this.authService.GetData();\r\n            resourceId: number = InputresourceId;\r\n            isDataInitialized: boolean = false;\r\n            iShowHourForDay: boolean = false;\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            typePriceResult: string;\r\n            model = new wizardFormEditoriaModel();\r\n            currentRowIndex: number = -1;\r\n            currentColumnIndex: number = -1;\r\n            requestInfoSuccess: boolean = null;\r\n            resultCalculation: boolean = false;\r\n            showErrorMessage: boolean = false;\r\n            //blockquoting: boolean = false;\r\n            resultPriceQuantity: number = 0;\r\n            resultPriceImponibile: number = 0;\r\n            resultPriceCurrency: any = this.currency.getDefaultCurrency();\r\n\r\n            isCalculatedWizard: boolean = false;\r\n\r\n            // sending info to a child component\r\n            public parentWidgetData: string = result.CanvasInfo;\r\n\r\n            subManager = new Subscription();\r\n\r\n            listaFile: Array<FileCombinationModel>;\r\n\r\n            ngOnInit() {\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n                this.ExcludingRules.setMacrocategory(\"BUSTE\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                    this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n\r\n            openCanvasEditor() {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n\r\n                    const canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    const isStateId = false;\r\n\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig() {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n                let isUserLoggedIn = false;\r\n\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n\r\n            getTableValues(index) {\r\n                this.resultPriceQuantity = this.resultPrice.TablePriceList[index].Quantity;\r\n                this.resultPriceImponibile = this.resultPrice.TablePriceList[index].StrDiscountedPrice;\r\n                this.resultPriceCurrency = this.resultPrice.TablePriceList[index].Currency;\r\n            }\r\n\r\n\r\n            onStampaRetroChangeDocta() {\r\n                if (this.responseModel.idColori2 == \"5\") {\r\n                    this.responseModel.idColori1 = \"5\";\r\n                    for (let col of this.responseModel.colori1) {\r\n                        if (col.chiave == \"5\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if (this.responseModel.idColori2 == \"4\") {\r\n                    this.responseModel.idColori1 = \"4\";\r\n                    for (let col of this.responseModel.colori1) {\r\n                        if (col.chiave == \"4\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n                    }\r\n                }\r\n                else if ((this.responseModel.idColori2 == \"0\" || this.responseModel.idColori2 == \"1\") && (this.responseModel.idColori1 == \"5\" || this.responseModel.idColori1 == \"4\")) {\r\n                    this.responseModel.idColori1 = this.responseModel.idColori2;\r\n                    for (let col of this.responseModel.colori1) {\r\n                        if (col.chiave == this.responseModel.idColori2) {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onStampaFronteChangeDocta() {\r\n                if (this.responseModel.idColori1 == \"5\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n                    this.responseModel.idColori2 = \"5\";\r\n                    for (let col of this.responseModel.colori2) {\r\n                        if (col.chiave == \"5\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n\r\n                    }\r\n                }\r\n                else if (this.responseModel.idColori1 == \"4\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n                    this.responseModel.idColori2 = \"4\";\r\n                    for (let col of this.responseModel.colori2) {\r\n                        if (col.chiave == \"4\") {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n\r\n                    }\r\n                }\r\n                else if ((this.responseModel.idColori1 == \"0\" || this.responseModel.idColori1 == \"1\") && (this.responseModel.idColori2 == \"5\" || this.responseModel.idColori2 == \"4\")) {\r\n                    this.responseModel.idColori2 = this.responseModel.idColori1;\r\n                    for (let col of this.responseModel.colori2) {\r\n                        if (col.chiave == this.responseModel.idColori1) {\r\n                            col.selected = true;\r\n                        }\r\n                        else {\r\n                            col.selected = false;\r\n                        }\r\n\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n\r\n\r\n            parameterValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n\r\n                //verify validation for all  parameters \r\n                this.validationCopie();\r\n\r\n                if (this.responseModel.soggettiMultipli == true) {\r\n                    this.validationSoggetti();\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n\r\n                this.validationBusta();\r\n                this.validationColori();\r\n\r\n                this.countPantoni();\r\n\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    //$('#quotingForm').hide();\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            }\r\n\r\n            countPantoni() {\r\n                if (this.responseModel.pantoni != null) {\r\n                    this.responseModel.pantoniCount = this.responseModel.pantoni.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            selectFileCombination() {\r\n                this.listaFile = new Array<FileCombinationModel>()\r\n                for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n                    if (this.responseModel.idBusta != null) {\r\n                        var data = this.responseModel.idBusta.split(\"_\");\r\n                        let idBusta = data[0];\r\n                        if (file.FormatId == idBusta) {\r\n\r\n                            let fileObj = new FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj)\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            checkZero(val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            clearSelectedIndex() {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            /// Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                this.model.macrocategoryWizardId = 15;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n\r\n                if (this.responseModel.idBusta != \"-1\") {\r\n                    this.model.idBusta = this.responseModel.idBusta;\r\n                }\r\n\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n                this.model.idPantoneFronte1 = \"\";\r\n                this.model.idPantoneFronte2 = \"\";\r\n                this.model.idPantoneRetro1 = \"\";\r\n                this.model.idPantoneRetro2 = \"\";\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\" && this.model.idColori1 != \"4\" && this.model.idColori1 != \"5\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n                else if (this.model.idColori1 == \"4\") {\r\n                    this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n                }\r\n                else if (this.model.idColori1 == \"5\") {\r\n                    this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n                    this.model.idPantoneFronte2 = this.responseModel.idPantoneFronte2;\r\n                }\r\n\r\n                this.model.idColori2 = this.responseModel.idColori2;\r\n                if (this.model.idColori2 == \"4\") {\r\n                    this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n                }\r\n                else if (this.model.idColori2 == \"5\") {\r\n                    this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n                    this.model.idPantoneRetro2 = this.responseModel.idPantoneRetro2;\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n                    let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        //combo\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        //numeric\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        //text area\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedWizard = true;\r\n\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        } else if (this.isCalculationTypeListino()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.subManager.add(sub);\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false;\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedWizard = true;\r\n                            this.showErrorMessage = true;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n\r\n                this.isDataInitialized = true;\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkValidation() {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.bustaIsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.soggettiIsValid\r\n                    && this.responseModel.colori1IsValid\r\n                ) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            validationColori() {\r\n                let message;\r\n\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.colori1Message = message;\r\n            }\r\n\r\n            validationSoggetti() {\r\n                let message;\r\n                let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n                this.responseModel.soggettiMessage = message;\r\n            }\r\n\r\n            validationCopie() {\r\n                let message;\r\n\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    let numCopie = parseInt(this.responseModel.numCopie);\r\n                    let minCopie = this.responseModel.minimoCopie;\r\n                    let maxCopie = this.responseModel.massimoCopie;\r\n\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.copieMessage = message;\r\n            }\r\n\r\n            validationBusta() {\r\n                let message;\r\n\r\n                if (this.responseModel.idBusta == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.bustaIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.bustaIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.tipologieBusta != null) {\r\n                    this.responseModel.tipologieBustaCount = this.responseModel.tipologieBusta.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.bustaMessage = message;\r\n            }\r\n\r\n            validationLavorazioneAccessoria() {\r\n                let message: string = \"\";\r\n                let valid: boolean = true;\r\n\r\n                for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        let qta = parseInt(lavorazione.value);\r\n                        let minQta = lavorazione.minQtaInput;\r\n                        let maxQta = lavorazione.maxQtaInput;\r\n\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            }\r\n\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                this.subManager.add(sub);\r\n\r\n                return message;\r\n            }\r\n\r\n\r\n            isAttributeFixed(tipoLavorazione) {\r\n                let result: boolean = false;\r\n\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n            checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n                let result: boolean = false;\r\n                let isVisible: boolean = false;\r\n\r\n                for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            onBustaChange() {\r\n                for (let busta of this.responseModel.tipologieBusta) {\r\n                    if (busta.chiave == this.responseModel.idBusta) {\r\n                        this.responseModel.bustaDescription = busta.descrizione;\r\n                        this.responseModel.bustaImage = busta.image;\r\n                        this.responseModel.bustaHasInfo = busta.hasInfo;\r\n                        this.responseModel.bustaShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onBustaVisualChange(bustaId) {\r\n                this.responseModel.idBusta = bustaId;\r\n                this.onBustaChange();\r\n            }\r\n\r\n\r\n\r\n            onPantoneFronte1VisualChange(pantoneValue) {\r\n                this.responseModel.idPantoneFronte1 = pantoneValue;\r\n                this.onPantoneFronte1Change();\r\n            }\r\n\r\n            onPantoneFronte1Change() {\r\n                for (let pantone of this.responseModel.pantoni) {\r\n                    if (pantone.chiave == this.responseModel.idPantoneFronte1) {\r\n                        this.responseModel.pantoneFronte1Description = pantone.descrizione;\r\n                        this.responseModel.pantoneFronte1Image = pantone.image;\r\n                        this.responseModel.pantoneFronte1HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneFronte1ShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onPantoneFronte2VisualChange(pantoneValue) {\r\n                this.responseModel.idPantoneFronte2 = pantoneValue;\r\n                this.onPantoneFronte2Change();\r\n            }\r\n\r\n            onPantoneFronte2Change() {\r\n                for (let pantone of this.responseModel.pantoni) {\r\n                    if (pantone.chiave == this.responseModel.idPantoneFronte2) {\r\n                        this.responseModel.pantoneFronte2Description = pantone.descrizione;\r\n                        this.responseModel.pantoneFronte2Image = pantone.image;\r\n                        this.responseModel.pantoneFronte2HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneFronte2ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n\r\n\r\n            onPantoneRetro1VisualChange(pantoneValue) {\r\n                this.responseModel.idPantoneRetro1 = pantoneValue;\r\n                this.onPantoneRetro1Change();\r\n            }\r\n\r\n            onPantoneRetro1Change() {\r\n                for (let pantone of this.responseModel.pantoni) {\r\n                    if (pantone.chiave == this.responseModel.idPantoneRetro1) {\r\n                        this.responseModel.pantoneRetro1Description = pantone.descrizione;\r\n                        this.responseModel.pantoneRetro1Image = pantone.image;\r\n                        this.responseModel.pantoneRetro1HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneRetro1ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onPantoneRetro2VisualChange(pantoneValue) {\r\n                this.responseModel.idPantoneRetro2 = pantoneValue;\r\n                this.onPantoneRetro2Change();\r\n            }\r\n            onPantoneRetro2Change() {\r\n                for (let pantone of this.responseModel.pantoni) {\r\n                    if (pantone.chiave == this.responseModel.idPantoneRetro2) {\r\n                        this.responseModel.pantoneRetro2Description = pantone.descrizione;\r\n                        this.responseModel.pantoneRetro2Image = pantone.image;\r\n                        this.responseModel.pantoneRetro2HasInfo = pantone.hasInfo;\r\n                        this.responseModel.pantoneRetro2ShowInfo = false;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onStampaInternoVisualChange(stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onStampaRetroVisualChange(stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            }\r\n\r\n            lavorazioniAccessorieComboChange(lavorazione) {\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n\r\n                this.parameterValidation();\r\n            }\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            }\r\n\r\n\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideBusteDescription() {\r\n                if (this.responseModel.bustaShowInfo) {\r\n                    this.responseModel.bustaShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.bustaShowInfo = true;\r\n                }\r\n            }\r\n            showHidePantoneFronte1Description() {\r\n                if (this.responseModel.pantoneFronte1ShowInfo) {\r\n                    this.responseModel.pantoneFronte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneFronte1ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePantoneFronte2Description() {\r\n                if (this.responseModel.pantoneFronte2ShowInfo) {\r\n                    this.responseModel.pantoneFronte2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneFronte2ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePantoneRetro1Description() {\r\n                if (this.responseModel.pantoneRetro1ShowInfo) {\r\n                    this.responseModel.pantoneRetro1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneRetro1ShowInfo = true;\r\n                }\r\n            }\r\n            showHidePantoneRetro2Description() {\r\n                if (this.responseModel.pantoneRetro2ShowInfo) {\r\n                    this.responseModel.pantoneRetro2ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.pantoneRetro2ShowInfo = true;\r\n                }\r\n            }\r\n            isPantoneFronte1Showed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.idColori1 == \"4\" || this.responseModel.idColori1 == \"5\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            isPantoneFronte2Showed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.idColori1 == \"5\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            isPantoneRetro1Showed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"5\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            isPantoneRetro2Showed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.idColori2 == \"5\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            addToCartWizardCalcolato(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.resetCanvasData();\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.resetCanvasData();\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2, colType).subscribe(result => {\r\n                    this.cartService.resetCanvasData();\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoScontisticaBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2, colType).subscribe(result => {\r\n                    this.cartService.resetCanvasData();\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                // set variable for check if product is canvas edited to a initial state, because of other products\r\n                this.cartService.setIfProductIsCanvasEdited(false);\r\n\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n        return ChildComponent;\r\n    }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-buste.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { Object } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n  selector: \"dy-wizard-commerciale-widget\",\r\n  template: \"\"\r\n})\r\n\r\n\r\nexport class WizardCommercialeComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private _elementRef: ViewContainerRef,\r\n      private _quotingService: QuotingService,\r\n      private authService: AuthService,\r\n      private languageService: LanguageService,\r\n      @Inject('isBrowser') private isBrowser: boolean\r\n    ) { }\r\n\r\n  @Input() resourceId: number;\r\n  autentification = this.authService.GetData();\r\n  private userId = this.authService.GetUserId();\r\n  lang: string = this.languageService.getLongLang();\r\n\r\n  subManager = new Subscription();\r\n\r\n  ngOnInit() {\r\n    if (!this.isBrowser)\r\n      return;\r\n    let sub = this._quotingService.getWizardCommercialeData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n      //Creating subcomponent whith the selected template to inject\r\n      let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n      //injecting created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    });\r\n\r\n    this.subManager.add(sub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(result: any, InputresourceId: number) {\r\n    @Component({\r\n      template: result.templateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private _quotingService: QuotingService,\r\n          private languageService: LanguageService,\r\n          private authService: AuthService,\r\n          private translate: TranslateService,\r\n          private cartService: ShoppingCartService,\r\n          private routesService: RoutesService,\r\n          private bootboxService: BootboxService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          public canvasService: CustomersCanvasService\r\n        ) {\r\n        //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n        const canvasSub = canvasService.isCanvasModalOpened$\r\n          .subscribe(\r\n            isModalOpened => {\r\n              if (isModalOpened == false) {\r\n                $('html').css(\"overflow\", \"visible\");\r\n              }\r\n              else {\r\n                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                window.scrollTo(0, 0);\r\n                $('html').css(\"overflow\", \"hidden\");\r\n              }\r\n            });\r\n\r\n        // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n        const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n          .subscribe(\r\n            isDesignApproved => {\r\n              if (isDesignApproved) {\r\n                $('#customerCanvasModal').modal('hide');\r\n                $('html').css(\"overflow\", \"visible\");\r\n                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                if (this.isCalculationTypeCalcolato()) {\r\n                  this.addToCartWizardCalcolato(1);\r\n                }\r\n                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                  this.addToCartWizardCalcolatoScontistica(1);\r\n                }\r\n                else if (this.isCalculationTypeListino()) {\r\n                  this.addToCartWizardListino(1);\r\n                }\r\n                else if (this.isCalculationTypeListinoScontistica()) {\r\n                  this.addToCartWizardListinoScontistica(1);\r\n                }\r\n              }\r\n            });\r\n\r\n        this.subManager.add(canvasSub);\r\n        this.subManager.add(canvasEditedSub);\r\n      }\r\n\r\n      private pageIsInit: boolean = false;\r\n      private pageIsInitAfter: boolean = false;\r\n      private loggedIdUser: UserLogin;\r\n      private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n      private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n      waiting: boolean = false;\r\n      carteValue: number = -1;\r\n      lang: string = this.languageService.getLongLang();\r\n      responseModel: QuotingModel = new QuotingModel();\r\n      autentification = this.authService.GetData();\r\n      resourceId: number = InputresourceId;\r\n      isDataInitialized: boolean = false;\r\n      iShowHourForDay: boolean = false;\r\n      resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n      ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n      typePriceResult: string;\r\n      model = new wizardFormEditoriaModel();\r\n      currentRowIndex: number = -1;\r\n      currentColumnIndex: number = -1;\r\n      requestInfoSuccess: boolean = null;\r\n      resultCalculation: boolean = false;\r\n      showErrorMessage: boolean = false;\r\n      listaFile: Array<FileCombinationModel>;\r\n      blockquoting: boolean = false;\r\n      listaProfonditaPackaging: Array<any> = new Array<any>();\r\n      listaFormatiFull: Array<Object> = new Array<Object>();\r\n\r\n      isCalculatedWizard: boolean = false;\r\n\r\n      // sending info to a child component\r\n      public parentWidgetData: string = result.CanvasInfo;\r\n\r\n      subManager = new Subscription();\r\n\r\n      ngOnInit() {\r\n        var array = [\"1\", \"2\", \"3\"];\r\n        this.resultPrice.TablePriceList = new Array<any>();\r\n        this.resultPrice.TablePriceList.push(array);\r\n        this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n        this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n        this.ExcludingRules.setMacrocategory(\"COMMERCIALE\");\r\n        this.loggedIdUser = this.authService.GetData();\r\n        this.responseModel = new QuotingModel();\r\n        this.responseModel = result;\r\n        this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n        this.responseModel.isTaglioVisible = false;\r\n        this.typePriceResult = \"no-tax\";\r\n        this.responseModel.valueStampaInternoSoloFronte = false;\r\n        this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n        this.listaFormatiFull = this.responseModel.formati;\r\n\r\n        if (this.responseModel.IsPackagingWizard == true) {\r\n          this.onBasePackagingChange();\r\n        }\r\n        else {\r\n          if (!this.isDataInitialized) {\r\n            //check if the all values is validated\r\n            this.parameterValidation()\r\n          }\r\n        }\r\n        setInterval(() => {\r\n          if (this.isDataInitialized) {\r\n          this.parameterValidation();\r\n          }\r\n      }, 300000); //5 minutes\r\n        //this.parameterValidation();},60000); //1 minutes\r\n      }\r\n\r\n      checkFirstDayForHour(priceList: any) {\r\n        for (let priceRow of priceList) {\r\n          var result = false;\r\n          if (!priceRow.IsHour) {\r\n            if (!this.iShowHourForDay) {\r\n              this.iShowHourForDay = true;\r\n              result = true;\r\n            }\r\n          }\r\n          priceRow.iShowHourForDay = result;\r\n        }\r\n      }\r\n      openCanvasEditor() {\r\n        if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n          $('html').css(\"overflow\", \"hidden\");\r\n\r\n          const canvasConfigData = this.setCanvasConfig();\r\n          // because here we don't have a state id, it is a new product\r\n          const isStateId = false;\r\n\r\n          this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n        }\r\n      }\r\n\r\n      setCanvasConfig() {\r\n        const canvasConfigData = {\r\n          CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n          TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n          CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n          Watermark: result.CanvasInfo.WatermarkText\r\n        };\r\n\r\n        return canvasConfigData;\r\n      }\r\n\r\n      toShowCanvasButton() {\r\n        let toShow = false;\r\n        let isModuleActive = false;\r\n        let isUserLoggedIn = false;\r\n\r\n        if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n          isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n        }\r\n\r\n        if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n          isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n        }\r\n\r\n        toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n        return toShow;\r\n      }\r\n\r\n      CheckRegoleCommerciale() {\r\n        try {\r\n          this.blockquoting = false;\r\n          //save in the array all parameter value before to apply rules\r\n          let oldCarta = this.responseModel.idCarte1;\r\n          let oldFormato = this.responseModel.idFormati;\r\n          let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n          let oldPiegature = this.responseModel.idPiegature;\r\n          let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n          for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n            let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n            if (lavorazione.tipo == \"2\") {\r\n              lav.lavorazioneId = lavorazione.id;\r\n              lav.valoreLavorazione = lavorazione.valore;\r\n              lavAccArray.push(lav);\r\n            }\r\n          }\r\n\r\n          //-----------------------------------------------------------------------------//\r\n          //-----------------------------Reset delle regole------------------------------//\r\n          //-----------------------------------------------------------------------------//\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n          //Reset regole carta e grammature\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n\r\n          //Reset regole plastificazione\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", null, null, this.responseModel);\r\n\r\n          //Reset regole plastificazione\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n          //Reset regole taglio\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n          //Reset regole accessorie\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n\r\n          //-----------------------------------------------------------------------------//\r\n          //----------------------Applicazione delle regole------------------------------//\r\n          //-----------------------------------------------------------------------------//\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", this.responseModel.idFormati, 0, this.responseModel);\r\n\r\n          if (this.responseModel.idCarte1 != null) {\r\n            var data = this.responseModel.idCarte1.split(\"_\");\r\n            let idCarta = data[0];\r\n\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n          }\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", this.responseModel.idPiegature, 0, this.responseModel);\r\n\r\n          if (!this.isTaglioCalculated()) {\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 1, 0, this.responseModel);\r\n          }\r\n          else {\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 2, 0, this.responseModel);\r\n          }\r\n\r\n          this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n          //if the old value id different to the new one i call the method for update description and image\r\n          if (oldFormato != this.responseModel.idFormati) {\r\n            this.onFormatiChange(true);\r\n          }\r\n          if (oldCarta != this.responseModel.idCarte1) {\r\n            this.onCartaInternoFieldChanged(true);\r\n          }\r\n          if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n            this.onPlastificationInternoChange(true);\r\n          }\r\n          if (oldPiegature != this.responseModel.idPiegature) {\r\n            this.onPiegaturaChange(true);\r\n          }\r\n          let count = 0;\r\n          for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n            count = 0;\r\n            for (let lavorazioneOld of lavAccArray) {\r\n              if (count > 0) {\r\n                continue;\r\n              }\r\n              else {\r\n                if (lavorazione.tipo == \"2\") {\r\n                  if (lavorazione.isVisible == true) {\r\n                    if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                      if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                        count++;\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              }\r\n            }\r\n          }\r\n        } catch (e) {\r\n          this.blockquoting = true;\r\n          this.showErrorMessage = true;\r\n          return;\r\n        }\r\n      }\r\n\r\n      parameterValidation() {\r\n        this.iShowHourForDay = false;\r\n        this.isCalculatedWizard = false;\r\n        this.resultCalculation = false;\r\n        this.showErrorMessage = false;\r\n        this.requestInfoSuccess = null;\r\n\r\n        //apply all rules\r\n        this.CheckRegoleCommerciale();\r\n\r\n        //verify validation for all  parameters \r\n        this.validationCopie();\r\n\r\n        if (this.responseModel.soggettiMultipli == true) {\r\n          this.validationSoggetti();\r\n        }\r\n        else {\r\n          this.responseModel.soggettiIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.IsPackagingWizard == true) {\r\n          this.validationBasePackaging();\r\n          this.validationProfonditaPackaging();\r\n        }\r\n        else {\r\n          this.responseModel.basePackagingIsValid = true;\r\n          this.responseModel.profonditaPackagingIsValid = true;\r\n        }\r\n\r\n        this.validationFormati();\r\n\r\n        if (this.responseModel.idFormati == \"0\") {\r\n          this.validationBaseFormati();\r\n          this.validationAltezzaFormati();\r\n        }\r\n        else {\r\n          this.responseModel.baseFormatoIsValid = true;\r\n          this.responseModel.altezzaFormatoIsValid = true;\r\n        }\r\n\r\n        this.validationColori();\r\n\r\n        this.validationCarteInterno();\r\n        this.validationGrammatureCarteInterno();\r\n\r\n        this.validationPiegatura();\r\n        this.validationPlastificazione();\r\n        this.validationLavorazioneAccessoria();\r\n\r\n        this.countCartaCategories()\r\n\r\n        if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n          this.selectFileCombination();\r\n        }\r\n\r\n        //if all parameters are validated  call a method who getting price\r\n        if (this.checkValidation()) {\r\n          $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n          this.getCalculationModel();\r\n        }\r\n        else {\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.resultCalculation = true;\r\n          this.showErrorMessage = true;\r\n        }\r\n      }\r\n\r\n      countCartaCategories() {\r\n        if (this.responseModel.categorieCarte != null) {\r\n          this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n        }\r\n      }\r\n\r\n      checkZero(val) {\r\n        if (val == \"\" || val == null) {\r\n          return \"0\";\r\n        }\r\n        else {\r\n          return val;\r\n        }\r\n      }\r\n\r\n      setTypePriceResult(type) {\r\n        this.typePriceResult = type;\r\n        if (type == \"tax\") {\r\n          $(\"#btnNoIva\").removeClass(\"active\");\r\n          $(\"#btnIva\").addClass(\"active\");\r\n        }\r\n        else {\r\n          $(\"#btnNoIva\").addClass(\"active\");\r\n          $(\"#btnIva\").removeClass(\"active\");\r\n        }\r\n      }\r\n\r\n      isRowSelected(rowIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex + 1) == this.currentRowIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCellSelected(rowIndex: number, columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isColumnSelected(columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((columnIndex + 1) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n        this.currentRowIndex = rowIndex;\r\n        this.currentColumnIndex = columnIndex;\r\n      }\r\n\r\n      clearSelectedIndex() {\r\n        this.currentRowIndex = -1;\r\n        this.currentColumnIndex = -1;\r\n      }\r\n\r\n      isRowSelectedListino(rowIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex) == this.currentRowIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isColumnSelectedListino(columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((columnIndex) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n        this.currentRowIndex = rowIndex;\r\n        this.currentColumnIndex = columnIndex;\r\n      }\r\n\r\n      /// Create model for passed in input to the calculation method\r\n      getCalculationModel() {\r\n        this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n        this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n        if (this.responseModel.tipoCopie != 'libera') {\r\n          this.model.idCopie = this.responseModel.idCopie;\r\n        }\r\n        else {\r\n          this.model.numCopie = this.responseModel.numCopie;\r\n        }\r\n\r\n        this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n        this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n        this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n        for (let carta of this.responseModel.carte1) {\r\n          if (this.model.idCarte1 == carta.chiave) {\r\n            this.model.nomeCarte1 = carta.valore\r\n          }\r\n        }\r\n        this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n        for (let grammatureInterno of this.responseModel.grammature1) {\r\n          if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n            this.model.nomeGrammature1 = grammatureInterno.valore\r\n          }\r\n        }\r\n\r\n        this.model.StrCustomerId = this.authService.GetUserId();\r\n        this.model.wizardId = this.resourceId;\r\n        this.model.idFormati = this.responseModel.idFormati;\r\n\r\n        if (this.responseModel.idFormati == \"0\") {\r\n          this.model.baseFormato = this.responseModel.baseFormato;\r\n          this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n        }\r\n\r\n        this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n        if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n          this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n          this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n        }\r\n\r\n        this.model.idColori2 = this.responseModel.idColori2;\r\n\r\n        if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n          this.model.idPlastificazioni1 = \"\"\r\n        }\r\n        else {\r\n          this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n        }\r\n\r\n        this.model.taglio = this.isTaglioCalculated();\r\n\r\n        if (this.responseModel.idPiegature != \"-1\") {\r\n          this.model.idPiegature = this.responseModel.idPiegature;\r\n        }\r\n\r\n        this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n        for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n          let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n          if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n            //checkbox\r\n            if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n              lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n              if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                lavorazione.valoreLavorazione = \"1\";\r\n              }\r\n              else {\r\n                lavorazione.valoreLavorazione = \"0\";\r\n              }\r\n            }\r\n            //combo\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n              if (lavorazioneAccessoria.valore != \"-1\") {\r\n                if (lavorazioneAccessoria.valore != \"0\") {\r\n                  lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                  lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                }\r\n              }\r\n            }\r\n            //numeric\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n              if (lavorazioneAccessoria.value != null) {\r\n                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                if (lavorazioneAccessoria.value != \"0\") {\r\n                  lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                }\r\n              }\r\n            }\r\n            //text area\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n              lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n              lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n            }\r\n\r\n            if (lavorazione.lavorazioneId != null) {\r\n              this.model.lavorazioniAccessorie.push(lavorazione);\r\n            }\r\n          }\r\n        }\r\n\r\n        this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n        if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n          let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n            this.resultPrice = result;\r\n            this.isCalculatedWizard = true;\r\n\r\n            if (this.isCalculationTypeCalcolatoScontistica()) {\r\n              var scontisticaTable = this.resultPrice.TablePriceList;\r\n              this.checkFirstDayForHour(scontisticaTable);\r\n              if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                //Selecting the last available day result. (The cheapest)\r\n                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                  let price = scontisticaTable[i];\r\n                  if (price.Price != -1) {\r\n                    this.setPriceResult(price);\r\n                    break;\r\n                  }\r\n                }\r\n              }\r\n            }\r\n            else if (this.isCalculationTypeListinoScontistica()) {\r\n              //Selecting first element\r\n              let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n              let breakFlag = false;\r\n              for (let priceRow of tableScontisticaPriceListSliced) {\r\n                let slicedPriceRow = priceRow.slice(1);\r\n                this.checkFirstDayForHour(slicedPriceRow);\r\n                //reverse the obj for select the last data and first price available\r\n                var reverse = slicedPriceRow.reverse();\r\n                for (let price of reverse) {\r\n                  if (price.Price != -1) {\r\n                    this.setListinoScontisticaPriceResult(price);\r\n                    breakFlag = true;\r\n                    break;\r\n                  }\r\n                }\r\n\r\n                if (breakFlag == true) {\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n            else if (this.isCalculationTypeListino()) {\r\n              let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n              this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n              if (tableScontisticaPriceListSliced.length > 0) {\r\n                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                if (slicedPriceRow.Price != -1) {\r\n                  this.setListinoPriceResult(slicedPriceRow);\r\n                }\r\n              }\r\n            }\r\n\r\n            this.subManager.add(sub);\r\n\r\n            this.resultCalculation = true;\r\n            this.showErrorMessage = false;\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          },\r\n            err => {\r\n              this.showErrorMessage = true;\r\n              this.isCalculatedWizard = true;\r\n              $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            }\r\n          );\r\n        }\r\n        else {\r\n          this.resultCalculation = true;\r\n          this.showErrorMessage = false;\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n\r\n        }\r\n\r\n        this.isDataInitialized = true;\r\n      }\r\n\r\n      ngAfterViewInit() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        $('#quotingFormLoader').hide();\r\n        var $wrapper = $('#listWizard');\r\n\r\n        $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n          return +a.dataset.order - +b.dataset.order;\r\n        }).appendTo($wrapper);\r\n\r\n        let altezza = $(\"#footer\").outerHeight();\r\n        let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n        let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n        altezza += margintop;\r\n        altezza += paddingntop;\r\n\r\n        let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n        let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n        let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n        altezza += altezza1;\r\n        altezza += margintop1;\r\n        altezza += paddingntop1;\r\n\r\n        let altezzaHead = $(\".header-body\").outerHeight();\r\n        let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n        let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n        altezzaHead += margintopHead;\r\n        altezzaHead += paddingntopHead;\r\n\r\n        $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n        $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      checkValidation() {\r\n        if (this.responseModel.copieIsValid\r\n          && this.responseModel.formatiIsValid\r\n          && this.responseModel.carte1IsValid\r\n          && this.responseModel.grammature1IsValid\r\n          && this.responseModel.piegatureIsValid\r\n          && this.responseModel.plastificazione1IsValid\r\n          && this.responseModel.lavorazioniIsValid\r\n          && this.responseModel.baseFormatoIsValid\r\n          && this.responseModel.altezzaFormatoIsValid\r\n          && this.responseModel.soggettiIsValid\r\n          && this.responseModel.colori1IsValid\r\n          && this.responseModel.basePackagingIsValid\r\n          && this.responseModel.profonditaPackagingIsValid\r\n        ) {\r\n          return true;\r\n        }\r\n        else {\r\n          return false;\r\n        }\r\n      }\r\n\r\n      validationColori() {\r\n        let message;\r\n\r\n        if (this.responseModel.idColori1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.colori1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.colori1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.colori1 != null) {\r\n          this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        if (this.responseModel.colori2 != null) {\r\n          this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.colori1Message = message;\r\n      }\r\n\r\n\r\n      validationBaseFormati() {\r\n        let message;\r\n        let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n        //let base = parseFloat(this.responseModel.baseFormato)\r\n        let minBase = this.responseModel.minimoBase;\r\n        let maxBase = this.responseModel.massimoBase;\r\n        if (minBase > 0 || maxBase > 0) {\r\n          if (minBase > 0 && maxBase == 0) {\r\n            if ((base >= minBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minBase == 0 && maxBase > 0) {\r\n            if ((base <= maxBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minBase;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minBase > 0 && maxBase > 0) {\r\n            if ((base >= minBase) && (base <= maxBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minBase;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (base <= 0 || this.responseModel.baseFormato == null) {\r\n            message = this.getLabel('inserisci_valore_maggiore');\r\n            message += \" \" + 0;\r\n            this.responseModel.baseFormatoIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.baseFormatoIsValid = true;\r\n          }\r\n        }\r\n        this.responseModel.baseFormatoMessage = message;\r\n      }\r\n\r\n      validationAltezzaFormati() {\r\n        let message;\r\n        let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n        let minAltezza = this.responseModel.minimoAltezza;\r\n        let maxAltezza = this.responseModel.massimoAltezza;\r\n        if (minAltezza > 0 || maxAltezza > 0) {\r\n          if (minAltezza > 0 && maxAltezza == 0) {\r\n            if ((altezza >= minAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minAltezza == 0 && maxAltezza > 0) {\r\n            if ((altezza <= maxAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minAltezza;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minAltezza > 0 && maxAltezza > 0) {\r\n            if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minAltezza;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n            message = this.getLabel('inserisci_valore_maggiore');\r\n            message += \" \" + 0;\r\n            this.responseModel.altezzaFormatoIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.altezzaFormatoIsValid = true;\r\n          }\r\n        }\r\n\r\n        this.responseModel.altezzaFormatoMessage = message;\r\n      }\r\n\r\n      validationSoggetti() {\r\n        let message;\r\n        let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n        if (this.responseModel.numSoggetti == null) {\r\n          message = this.getLabel('inserisci_valore_valido');\r\n          this.responseModel.soggettiIsValid = false;\r\n        }\r\n        else if (numSoggetti == 0) {\r\n          message = this.getLabel('inserisci_valore_maggiore_0');\r\n          this.responseModel.soggettiIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.soggettiIsValid = true;\r\n        }\r\n\r\n        this.responseModel.soggettiMessage = message;\r\n      }\r\n\r\n      validationCopie() {\r\n        let message;\r\n\r\n        if (this.responseModel.tipoCopie == 'libera') {\r\n          let numCopie = parseInt(this.responseModel.numCopie);\r\n          let minCopie = this.responseModel.minimoCopie;\r\n          let maxCopie = this.responseModel.massimoCopie;\r\n\r\n          if (this.responseModel.numCopie == null) {\r\n            message = this.getLabel('inserisci_valore_valido');\r\n            this.responseModel.copieIsValid = false;\r\n          }\r\n          else if (maxCopie == 0) {\r\n            if (numCopie < minCopie) {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minCopie;\r\n              this.responseModel.copieIsValid = false;\r\n            }\r\n            else {\r\n              this.responseModel.copieIsValid = true;\r\n            }\r\n          }\r\n          else {\r\n            if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n              this.responseModel.copieIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minCopie;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxCopie;\r\n              this.responseModel.copieIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (this.responseModel.idCopie == \"-1\") {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.copieIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.copieIsValid = true;\r\n          }\r\n\r\n          if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n            this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n          }\r\n        }\r\n\r\n        this.responseModel.copieMessage = message;\r\n      }\r\n\r\n      validationBasePackaging() {\r\n        let message;\r\n\r\n        if (this.responseModel.idBasePackaging == 0 || this.responseModel.idBasePackaging == null) {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.basePackagingIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.basePackagingIsValid = true;\r\n        }\r\n\r\n        this.responseModel.basePackagingMessage = message;\r\n      }\r\n\r\n      validationProfonditaPackaging() {\r\n        let message;\r\n\r\n        if (this.responseModel.idProfonditaPackaging == 0 || this.responseModel.idProfonditaPackaging == null) {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.profonditaPackagingIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.profonditaPackagingIsValid = true;\r\n        }\r\n\r\n        this.responseModel.profonditaPackagingMessage = message;\r\n      }\r\n\r\n      validationFormati() {\r\n        let message;\r\n\r\n        if (this.responseModel.idFormati == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.formatiIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.formatiIsValid = true;\r\n        }\r\n\r\n        this.responseModel.formatiMessage = message;\r\n\r\n        if (this.responseModel.formati != null) {\r\n          this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n      }\r\n\r\n      validationCarteInterno() {\r\n        let message;\r\n\r\n        if (this.responseModel.idCarte1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.carte1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.carte1 != null) {\r\n          this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.carte1Message = message;\r\n      }\r\n\r\n      validationGrammatureCarteInterno() {\r\n        let message;\r\n\r\n        if (this.responseModel.idGrammature1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.grammature1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.grammature1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.grammature1 != null) {\r\n          this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.grammature1Message = message;\r\n      }\r\n\r\n      validationLavorazioneAccessoria() {\r\n        let message: string = \"\";\r\n        let valid: boolean = true;\r\n\r\n        for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n          if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n            if (lavorazione.obbligatorio == true) {\r\n              if (lavorazione.valore == \"-1\") {\r\n                message = this.getLabel('mandatory_field');\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n              else {\r\n                lavorazione.isValid = true;\r\n              }\r\n            }\r\n\r\n            lavorazione.lavorazioneMessage = message;\r\n          }\r\n          //check min qta  and max qta  for input field\r\n          if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n            let qta = parseInt(lavorazione.value);\r\n            let minQta = lavorazione.minQtaInput;\r\n            let maxQta = lavorazione.maxQtaInput;\r\n\r\n            if (lavorazione.value == null) {\r\n              message = this.getLabel('inserisci_valore_valido');\r\n              lavorazione.isValid = false;\r\n              valid = false;\r\n            }\r\n            else if (maxQta == 0) {\r\n              if (qta < minQta) {\r\n                message = this.getLabel('inserisci_valore_maggiore');\r\n                message += \" \" + minQta;\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n              else {\r\n                lavorazione.isValid = true;\r\n              }\r\n            }\r\n            else {\r\n              if ((qta >= minQta) && (qta <= maxQta)) {\r\n                lavorazione.isValid = true;\r\n              }\r\n              else {\r\n                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                message += \" \" + minQta;\r\n                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                message += \" \" + maxQta;\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n            }\r\n            lavorazione.lavorazioneMessage = message;\r\n          }\r\n\r\n          if (lavorazione.valori != null) {\r\n            lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n          }\r\n        }\r\n\r\n        this.responseModel.lavorazioniIsValid = valid;\r\n      }\r\n\r\n      validationPiegatura() {\r\n        let message;\r\n\r\n        if (this.responseModel.idPiegature == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.piegatureIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.piegatureIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.piegature != null) {\r\n          this.responseModel.piegatureCount = this.responseModel.piegature.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.piegatureMessage = message;\r\n      }\r\n\r\n      validationPlastificazione() {\r\n        let message;\r\n\r\n        if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n          if (this.responseModel.isPlastificazioneRequired == true) {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.plastificazione1IsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.plastificazione1IsValid = true;\r\n          }\r\n        }\r\n        else {\r\n          this.responseModel.plastificazione1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.plastificazioni1 != null) {\r\n          this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.plastificazione1Message = message;\r\n      }\r\n\r\n      getLabel(label) {\r\n        let message;\r\n\r\n        this.translate.get(label, this.translate).subscribe((res: string) => {\r\n          message = res;\r\n        });\r\n\r\n        return message;\r\n      }\r\n\r\n      isTaglioCalculated() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.isTaglioVisible == false) {\r\n          if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n            result = true;\r\n          }\r\n          else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n            result = false;\r\n          }\r\n          else if (this.responseModel.taglioShowed) {\r\n            result = this.responseModel.tipoTaglio;\r\n          }\r\n        }\r\n        else {\r\n          result = false;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsPlastificazioneInternoIsShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n          result = true;\r\n          if (this.responseModel.isPlastificazioneRequired == false) {\r\n            if (this.responseModel.plastificazioni1.filter((x: any) => x.isVisible == true).length > 0) {\r\n              result = true;\r\n            }\r\n            else {\r\n              result = false;\r\n            }\r\n          }\r\n        }\r\n\r\n\r\n        return result;\r\n      }\r\n\r\n      isAttributeFixed(tipoLavorazione) {\r\n        let result: boolean = false;\r\n\r\n        if (tipoLavorazione == 'fisso') {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 1 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n      checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 6 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n      textAreaCheck(event: any) {\r\n        if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n          return false;\r\n        }\r\n        return true;\r\n      }\r\n      InputNumberCheck(event: any) {\r\n        let result = false;\r\n        if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n          result = true;\r\n        }\r\n        return result;\r\n      }\r\n      checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n        let result: boolean = false;\r\n        let isVisible: boolean = false;\r\n\r\n        for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n          if (lavorazioniAccessorie.id == lavId) {\r\n            isVisible = lavorazioniAccessorie.isVisible;\r\n          }\r\n        }\r\n\r\n        if (tipo == 2 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 5 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsTaglioShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      onCategoriaCartaInternoFieldChanged() {\r\n        let selectedPaper = false;\r\n\r\n        for (let carte of this.responseModel.carte1) {\r\n          if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n            if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n              if (selectedPaper == false) {\r\n                this.responseModel.idCarte1 = carte.chiave;\r\n                this.model.idCarte1 = carte.chiave;\r\n                this.responseModel.carte1Description = carte.descrizione;\r\n                this.responseModel.carte1Image = carte.image;\r\n                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                this.responseModel.carte1ShowInfo = false;\r\n\r\n                this.responseModel.grammature1 = carte.subElements;\r\n                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                this.model.idGrammature1 = carte.wrap_valore;\r\n                selectedPaper = true;\r\n              }\r\n\r\n              carte.isVisible = true;\r\n            }\r\n            else {\r\n              carte.isVisible = false;\r\n            }\r\n          }\r\n          else {\r\n            if (selectedPaper == false) {\r\n              this.responseModel.idCarte1 = carte.chiave;\r\n              this.model.idCarte1 = carte.chiave;\r\n              this.responseModel.carte1Description = carte.descrizione;\r\n              this.responseModel.carte1Image = carte.image;\r\n              this.responseModel.carte1HasInfo = carte.hasInfo;\r\n              this.responseModel.carte1ShowInfo = false;\r\n\r\n              this.responseModel.grammature1 = carte.subElements;\r\n              this.responseModel.idGrammature1 = carte.wrap_valore;\r\n              this.model.idGrammature1 = carte.wrap_valore;\r\n              selectedPaper = true;\r\n            }\r\n\r\n            carte.isVisible = true;\r\n          }\r\n        }\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onCartaInternoFieldChanged(isrules = false) {\r\n        for (let grammature of this.responseModel.carte1) {\r\n          if (grammature.chiave == this.responseModel.idCarte1) {\r\n            this.responseModel.carte1Description = grammature.descrizione;\r\n            this.responseModel.carte1Image = grammature.image;\r\n            this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n            this.responseModel.carte1ShowInfo = false;\r\n            this.responseModel.grammature1 = grammature.subElements;\r\n            this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n            this.model.idGrammature1 = grammature.wrap_valore;\r\n          }\r\n        }\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onCartaInternoVisualFieldChanged(paperId) {\r\n        this.responseModel.idCarte1 = paperId;\r\n        this.onCartaInternoFieldChanged();\r\n      }\r\n\r\n      onFormatiChange(isrules = false) {\r\n        if (this.responseModel.idFormati == \"-1\") {\r\n          this.responseModel.formatoDescription = \"\";\r\n          this.responseModel.formatoImage = \"\";\r\n          this.responseModel.formatiHasInfo = false;\r\n          this.responseModel.formatiShowInfo = false;\r\n        }\r\n        else {\r\n          for (let formato of this.responseModel.formati) {\r\n            if (formato.chiave == this.responseModel.idFormati) {\r\n              this.responseModel.formatoDescription = formato.descrizione;\r\n              this.responseModel.formatoImage = formato.image;\r\n              this.responseModel.formatiHasInfo = formato.hasInfo;\r\n              this.responseModel.formatiShowInfo = false;\r\n            }\r\n          }\r\n        }\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n      packangingProfonditaChange = false;\r\n      packangingBaseChange = false;\r\n      onBasePackagingChange() {\r\n        this.packangingBaseChange = false;\r\n        this.packangingProfonditaChange = false;\r\n        if (this.responseModel.listaPackagingParameter.length > 0 && this.responseModel.listaPackagingParameter != null) {\r\n          for (let base of this.responseModel.listaPackagingParameter) {\r\n            if (base.IdBase == this.responseModel.idBasePackaging) {\r\n              this.listaProfonditaPackaging = base.listPackagingRelProfondita;\r\n              if (this.listaProfonditaPackaging != null && this.listaProfonditaPackaging.length > 0) {\r\n                this.packangingProfonditaChange = true;\r\n                this.packangingBaseChange = true;\r\n                this.responseModel.idProfonditaPackaging = this.listaProfonditaPackaging[0].IdProfondita;\r\n                this.onProfonditaPackagingChange();\r\n              }\r\n              else {\r\n                this.responseModel.formati = new Array<any>();\r\n                this.responseModel.idProfonditaPackaging = 0;\r\n                this.onFormatiVisualChange(\"-1\");\r\n              }\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          this.responseModel.idBasePackaging = 0;\r\n          this.responseModel.idProfonditaPackaging = 0;\r\n          this.onFormatiVisualChange(\"-1\");\r\n        }\r\n        if (this.packangingProfonditaChange == false) {\r\n          this.parameterValidation();\r\n          this.packangingBaseChange = false\r\n\r\n        }\r\n      }\r\n\r\n      onProfonditaPackagingChange() {\r\n        if (this.listaProfonditaPackaging.length > 0 && this.listaProfonditaPackaging != null) {\r\n          let firstFormato = 0;\r\n          for (let profondita of this.listaProfonditaPackaging) {\r\n\r\n            if (profondita.IdProfondita == this.responseModel.idProfonditaPackaging && profondita.IdBase == this.responseModel.idBasePackaging) {\r\n              this.responseModel.formati = new Array<any>();\r\n\r\n              if (profondita.listPackagingRelFormato.length > 0 && profondita.listPackagingRelFormato != null) {\r\n                let idFIrstFormat = \"0\";\r\n\r\n                profondita.listPackagingRelFormato.forEach((formatiRel: any) => {\r\n                  let stringId = formatiRel.IdFormato + \"\";\r\n                  this.listaFormatiFull.filter((x: any) => x.chiave == stringId).forEach((formato: any) => {\r\n                    this.responseModel.formati.push(formato);\r\n                    if (firstFormato == 0) {\r\n                      firstFormato++;\r\n                      idFIrstFormat = formato.chiave;\r\n                    }\r\n                  });\r\n                });\r\n                //select firsformato\r\n                if (idFIrstFormat != \"0\") {\r\n                  firstFormato++;\r\n                  this.packangingProfonditaChange = true;\r\n                  this.onFormatiVisualChange(idFIrstFormat)\r\n                }\r\n              }\r\n              else {\r\n                this.responseModel.formati = new Array<any>();\r\n                this.onFormatiVisualChange(\"-1\");\r\n              }\r\n\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          this.responseModel.formati = new Array<any>();\r\n          this.onFormatiVisualChange(\"-1\");\r\n        }\r\n        // console.log(\"qui3\")\r\n        // if (this.packangingBaseChange == true ) {\r\n        //   this.parameterValidation();\r\n        // }\r\n      }\r\n\r\n      onFormatiVisualChange(formatId) {\r\n        this.responseModel.idFormati = formatId;\r\n        this.onFormatiChange();\r\n      }\r\n\r\n      onStampaInternoVisualChange(stampaInternoValue) {\r\n        this.responseModel.idColori1 = stampaInternoValue;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onStampaRetroVisualChange(stampaCopertinaValue) {\r\n        this.responseModel.idColori2 = stampaCopertinaValue;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n        this.responseModel.idGrammature1 = grammatureId;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onPlastificationInternoChange(isrules = false) {\r\n        for (let plastification of this.responseModel.plastificazioni1) {\r\n          if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n            this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n            this.responseModel.plastificazioni1Image = plastification.image;\r\n            this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n            this.responseModel.plastificazioni1ShowInfo = false;\r\n          }\r\n        }\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onPlastificationInternoViasualChange(plastificationId) {\r\n        this.responseModel.idPlastificazioni1 = plastificationId;\r\n        this.onPlastificationInternoChange();\r\n      }\r\n\r\n      lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n        for (let variante of lavorazione.valori) {\r\n          if (lavorazione.valore == variante.chiave) {\r\n            lavorazione.description = variante.descrizione;\r\n            lavorazione.image = variante.image;\r\n            lavorazione.hasInfo = variante.hasInfo;\r\n            lavorazione.showInfo = false;\r\n          }\r\n        }\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n        lavorazione.valore = lavorazioneId;\r\n        this.lavorazioniAccessorieComboChange(lavorazione);\r\n      }\r\n\r\n      onPiegaturaChange(isrules = false) {\r\n        for (let piegatura of this.responseModel.piegature) {\r\n          if (piegatura.chiave == this.responseModel.idPiegature) {\r\n            this.responseModel.piegatureDescription = piegatura.descrizione;\r\n            this.responseModel.piegatureImage = piegatura.image;\r\n            this.responseModel.piegatureHasInfo = piegatura.hasInfo;\r\n            this.responseModel.piegatureShowInfo = false;\r\n          }\r\n        }\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onPiegaturaVisualChange(piegaturaId) {\r\n        this.responseModel.idPiegature = piegaturaId;\r\n        this.onPiegaturaChange();\r\n      }\r\n\r\n\r\n\r\n      showHidePiegatureDescription() {\r\n        if (this.responseModel.piegatureShowInfo) {\r\n          this.responseModel.piegatureShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.piegatureShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHideLavDescription(lavorazione) {\r\n        if (lavorazione.showInfo) {\r\n          lavorazione.showInfo = false;\r\n        }\r\n        else {\r\n          lavorazione.showInfo = true;\r\n        }\r\n      }\r\n\r\n      showHideFormatDescription() {\r\n        if (this.responseModel.formatiShowInfo) {\r\n          this.responseModel.formatiShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.formatiShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePaperInternoDescription() {\r\n        if (this.responseModel.carte1ShowInfo) {\r\n          this.responseModel.carte1ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte1ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePlastficationInternoDescription() {\r\n        if (this.responseModel.plastificazioni1ShowInfo) {\r\n          this.responseModel.plastificazioni1ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.plastificazioni1ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      isCalculationTypeCalcolato() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeCalcolatoScontistica() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeCalcolatoQuotigPrev() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeListino() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"listino\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeListinoScontistica() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      addToCartWizardCalcolato(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.getCalculationModel();\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.getCalculationModel();\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      addToCartWizardListino(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      addToCartWizardListinoScontistica(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      setActive(id) {\r\n        $(\".calendar-list\").removeClass(\"hoverActive\");\r\n        $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n      }\r\n\r\n      selectFileCombination() {\r\n        this.listaFile = new Array<FileCombinationModel>()\r\n        for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n          if (file.FormatId == this.responseModel.idFormati) {\r\n\r\n            if (this.responseModel.piegature != null) {\r\n              if (file.PiegaId == this.responseModel.idPiegature) {\r\n                let fileObj = new FileCombinationModel();\r\n                fileObj.PathFile = file.PathFile;\r\n                if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                  fileObj.NomeFile = file.FileName;\r\n                }\r\n                else {\r\n                  fileObj.NomeFile = file.NomeFile;\r\n                }\r\n                fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                  fileObj.NomeIstruzioni = file.FileIstructionName\r\n                }\r\n                else {\r\n                  fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                }\r\n                this.listaFile.push(fileObj)\r\n              }\r\n            }\r\n            else {\r\n              let fileObj = new FileCombinationModel();\r\n              fileObj.PathFile = file.PathFile;\r\n              if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                fileObj.NomeFile = file.FileName;\r\n              }\r\n              else {\r\n                fileObj.NomeFile = file.NomeFile;\r\n              }\r\n              fileObj.PathIstruzioni = file.PathIstruzioni;\r\n              if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n              }\r\n              else {\r\n                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n              }\r\n              this.listaFile.push(fileObj)\r\n            }\r\n          }\r\n        }\r\n      }\r\n\r\n      setPriceResult(price: any) {\r\n\r\n\r\n        // console.log(\"price1\")\r\n        // console.log(price)\r\n\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n        // console.log(\"this.resultPrice\")\r\n        // console.log(this.resultPrice)\r\n\r\n        //Deselecting the current price and selected the one passed in input\r\n        for (let prices of this.resultPrice.TablePriceList) {\r\n          prices.IsSelected = false;\r\n        }\r\n\r\n        price.IsSelected = true;\r\n        // console.log(\"price2\")\r\n        // console.log(price)\r\n        this.resultPrice.Currency = price.Currency;\r\n        this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n        this.resultPrice.DataId = price.DayId;\r\n        this.resultPrice.DayName = price.DayName;\r\n        this.resultPrice.DayNumber = price.DayNumber;\r\n        this.resultPrice.QuantityID = price.QuantityId;\r\n        this.resultPrice.Quantity = price.Quantity;\r\n        this.resultPrice.IsHour = price.IsHour;\r\n        this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n        this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n        this.resultPrice.Iva = price.StrIva;\r\n        this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n        this.resultPrice.TotalAmount = price.Total;\r\n        this.resultPrice.Weight = price.StrWeight;\r\n        this.resultPrice.WeightUm = price.StrWeightUm;\r\n        this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n        this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n      }\r\n\r\n      setListinoScontisticaPriceResult(price: any) {\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n\r\n        this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n        this.setPriceResult(price);\r\n      }\r\n      setListinoPriceResult(price: any) {\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n        this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n        this.setPriceResult(price);\r\n      }\r\n      isCustomerLoggedIn() {\r\n        return this.loggedIdUser.isAuthenticated;\r\n      }\r\n\r\n      checkEmailIsValid() {\r\n        var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n        if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n          this.model.isRichiestaEmailValid = false;\r\n        }\r\n        else {\r\n          this.model.isRichiestaEmailValid = true;\r\n        }\r\n      }\r\n\r\n      checkFormRichiestaPrevIsValid() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n          if (this.model.richiestaName != \"\"\r\n            && this.model.richiestaSubName != \"\"\r\n            && this.model.isRichiestaEmailValid\r\n            && this.model.richiestaTelephone != \"\"\r\n            && this.model.richiestaJobname != \"\"\r\n            && this.model.richiestaCondizioni) {\r\n            result = true;\r\n          }\r\n        }\r\n        else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n          if (this.model.richiestaJobname != \"\") {\r\n            result = true;\r\n          }\r\n        }\r\n        return result;\r\n      }\r\n\r\n      sendRequestInfo() {\r\n        if (this.checkFormRichiestaPrevIsValid()) {\r\n          this.resultCalculation = false;\r\n          $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n          let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n            if (result == true) {\r\n              this.requestInfoSuccess = true;\r\n            }\r\n            else {\r\n              this.requestInfoSuccess = false;\r\n            }\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.resultCalculation = true;\r\n\r\n          },\r\n            err => {\r\n              this.requestInfoSuccess = false;\r\n              $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n              this.resultCalculation = true;\r\n            }\r\n          );\r\n\r\n          this.subManager.add(sub);\r\n        }\r\n      }\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInitAfter) {\r\n          return;\r\n        }\r\n        layoutTheme.initToggle();\r\n        this.pageIsInitAfter = true;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n\r\n    return ChildComponent;\r\n  }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-commerciale.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Input, Inject } from \"@angular/core\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { LavorazioniComponents } from \"./../../../../../../models/document/quoting-model\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\n\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n  selector: \"dy-wizard-editoria-widget\",\r\n  template: \"\"\r\n})\r\n\r\nexport class WizardEditoriaComponent implements OnInit {\r\n  constructor\r\n    (\r\n      private _compiler: Compiler,\r\n      private componentHelper: ComponentHelperService,\r\n      private authService: AuthService,\r\n      private _elementRef: ViewContainerRef,\r\n      private _quotingService: QuotingService,\r\n      private languageService: LanguageService,\r\n      @Inject('isBrowser') private isBrowser: boolean\r\n    ) { }\r\n\r\n  @Input() resourceId: number;\r\n  @Input() resourceType: string;\r\n\r\n  autentification = this.authService.GetData();\r\n  private userId = this.authService.GetUserId();\r\n  lang: string = this.languageService.getLongLang();\r\n\r\n\r\n  subManager = new Subscription();\r\n  ngOnInit() {\r\n    if (!this.isBrowser)\r\n      return;\r\n    let sub = this._quotingService.getWizardEditoriaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n      //Creating subcomponent whith the selected template to inject\r\n      let subComponent = this.createSubComponent(result, this.resourceId, this.resourceType);\r\n\r\n      //injecting created component (OK)\r\n      this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n    });\r\n\r\n    this.subManager.add(sub);\r\n  }\r\n\r\n  ngOnDestroy() {\r\n    //Called once, before the instance is destroyed.\r\n    //Add 'implements OnDestroy' to the class.\r\n    this.subManager.unsubscribe();\r\n  }\r\n\r\n  private createSubComponent(result: any, InputresourceId: number, InputresourceType: string) {\r\n    @Component({\r\n      template: result.templateHtml\r\n    })\r\n\r\n    class ChildComponent implements OnInit {\r\n      constructor\r\n        (\r\n          private _quotingService: QuotingService,\r\n          private languageService: LanguageService,\r\n          private authService: AuthService,\r\n          private cartService: ShoppingCartService,\r\n          private routesService: RoutesService,\r\n          private bootboxService: BootboxService,\r\n          private translate: TranslateService,\r\n          @Inject('isBrowser') private isBrowser: boolean,\r\n          public canvasService: CustomersCanvasService\r\n        ) {\r\n        //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n        const canvasSub = canvasService.isCanvasModalOpened$\r\n          .subscribe(\r\n            isModalOpened => {\r\n              if (isModalOpened == false) {\r\n                $('html').css(\"overflow\", \"visible\");\r\n              }\r\n              else {\r\n                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                window.scrollTo(0, 0);\r\n                $('html').css(\"overflow\", \"hidden\");\r\n              }\r\n            });\r\n\r\n        // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n        const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n          .subscribe(\r\n            isDesignApproved => {\r\n              if (isDesignApproved) {\r\n                $('#customerCanvasModal').modal('hide');\r\n                $('html').css(\"overflow\", \"visible\");\r\n                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                if (this.isCalculationTypeCalcolato()) {\r\n                  this.addToCartWizardCalcolato(1);\r\n                }\r\n                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                  this.addToCartWizardCalcolatoScontistica(1);\r\n                }\r\n                else if (this.isCalculationTypeListino()) {\r\n                  this.addToCartWizardListino(1);\r\n                }\r\n                else if (this.isCalculationTypeListinoScontistica()) {\r\n                  this.addToCartWizardListinoScontistica(1);\r\n                }\r\n              }\r\n            });\r\n\r\n        this.subManager.add(canvasSub);\r\n        this.subManager.add(canvasEditedSub);\r\n      }\r\n\r\n      private loggedIdUser: UserLogin;\r\n      private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n      private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n      model = new wizardFormEditoriaModel();\r\n      components: LavorazioniComponents = new LavorazioniComponents();\r\n      isDataInitialized: boolean = false;\r\n      iShowHourForDay: boolean = false;\r\n      ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n      private pageIsInit: boolean = false;\r\n      private pageIsInitAfter: boolean = false;\r\n      lang: string = this.languageService.getLongLang();\r\n      responseModel: QuotingModel = new QuotingModel();\r\n      resourceId: number = InputresourceId;\r\n      resourceType: string = InputresourceType;\r\n      EditioriaCopertinaSelect = \"-1\";\r\n      isValidated = false;\r\n      resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n      typePriceResult: string;\r\n      currentRowIndex: number = -1;\r\n      currentColumnIndex: number = -1;\r\n      requestInfoSuccess: boolean = null;\r\n      resultCalculation: boolean = false;\r\n      showErrorMessage: boolean = false;\r\n      blockquoting: boolean = false;\r\n      listaFile: Array<FileCombinationModel>;\r\n\r\n      isCalculatedWizard: boolean = false;\r\n\r\n      // sending info to a child component\r\n      public parentWidgetData: string = result.CanvasInfo;\r\n\r\n      subManager = new Subscription();\r\n\r\n      ngOnInit() {\r\n        var array = [\"1\", \"2\", \"3\"];\r\n        this.resultPrice.TablePriceList = new Array<any>();\r\n        this.resultPrice.TablePriceList.push(array);\r\n        this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n        this.resultPrice.TableScontisticaPriceList.push(array);\r\n        this.ExcludingRules.setMacrocategory(\"EDITORIA\");\r\n        this.loggedIdUser = this.authService.GetData();\r\n        this.responseModel = new QuotingModel();\r\n        this.responseModel = result;\r\n        this.responseModel.stampa1_colori_fronte = \"1\"\r\n        this.responseModel.stampa1_colori_retro = \"1\"\r\n        this.responseModel.stampa2_colori_fronte = \"1\"\r\n        this.responseModel.stampa2_colori_retro = \"1\"\r\n        this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n\r\n        if (this.responseModel.idCopertine == null) {\r\n          this.responseModel.idCopertine = \"-1\";\r\n        }\r\n\r\n        this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n        this.responseModel.isTaglioVisible = false;\r\n        this.typePriceResult = \"no-tax\";\r\n\r\n        if (!this.isDataInitialized) {\r\n          //check if the all values is validated\r\n          this.parameterValidation()\r\n        }\r\n        setInterval(() => {\r\n          if (this.isDataInitialized) {\r\n          this.parameterValidation();\r\n          }\r\n      }, 300000); //5 minutes\r\n        //this.parameterValidation();},60000); //1 minutes\r\n      }\r\n\r\n      checkFirstDayForHour(priceList: any) {\r\n        for (let priceRow of priceList) {\r\n          var result = false;\r\n          if (!priceRow.IsHour) {\r\n            if (!this.iShowHourForDay) {\r\n              this.iShowHourForDay = true;\r\n              result = true;\r\n            }\r\n          }\r\n          priceRow.iShowHourForDay = result;\r\n        }\r\n      }\r\n\r\n      ngAfterViewInit() {\r\n        if (!this.isBrowser || this.pageIsInit) {\r\n          return;\r\n        }\r\n\r\n        $('#quotingFormLoader').hide();\r\n        var $wrapper = $('#listWizard');\r\n\r\n        $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n          return +a.dataset.order - +b.dataset.order;\r\n        }).appendTo($wrapper);\r\n\r\n        let altezza = $(\"#footer\").outerHeight();\r\n        let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n        let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n        altezza += margintop;\r\n        altezza += paddingntop;\r\n\r\n        let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n        let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n        let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n        altezza += altezza1;\r\n        altezza += margintop1;\r\n        altezza += paddingntop1;\r\n\r\n        let altezzaHead = $(\".header-body\").outerHeight();\r\n        let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n        let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n        altezzaHead += margintopHead;\r\n        altezzaHead += paddingntopHead;\r\n\r\n        $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n        $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n        this.pageIsInit = true;\r\n      }\r\n\r\n      openCanvasEditor() {\r\n        if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n          $('html').css(\"overflow\", \"hidden\");\r\n\r\n          const canvasConfigData = this.setCanvasConfig();\r\n          // because here we don't have a state id, it is a new product\r\n          const isStateId = false;\r\n\r\n          this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n        }\r\n      }\r\n\r\n      setCanvasConfig() {\r\n        const canvasConfigData = {\r\n          CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n          TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n          CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n          Watermark: result.CanvasInfo.WatermarkText\r\n        };\r\n\r\n        return canvasConfigData;\r\n      }\r\n\r\n      toShowCanvasButton() {\r\n        let toShow = false;\r\n        let isModuleActive = false;\r\n        let isUserLoggedIn = false;\r\n\r\n        if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n          isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n        }\r\n\r\n        if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n          isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n        }\r\n\r\n        toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n        return toShow;\r\n      }\r\n\r\n\r\n      checkZero(val) {\r\n        if (val == \"\" || val == null) {\r\n          return \"0\";\r\n        }\r\n        else {\r\n          return val;\r\n        }\r\n      }\r\n\r\n      setTypePriceResult(type) {\r\n        this.typePriceResult = type;\r\n\r\n        if (type == \"tax\") {\r\n          $(\"#btnNoIva\").removeClass(\"active\");\r\n          $(\"#btnIva\").addClass(\"active\");\r\n        }\r\n        else {\r\n          $(\"#btnNoIva\").addClass(\"active\");\r\n          $(\"#btnIva\").removeClass(\"active\");\r\n        }\r\n      }\r\n\r\n      setListinoPriceResult(price: any) {\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n        this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n        this.setPriceResult(price);\r\n      }\r\n      isRowSelected(rowIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex + 1) == this.currentRowIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCellSelected(rowIndex: number, columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isColumnSelected(columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((columnIndex + 1) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n        this.currentRowIndex = rowIndex;\r\n        this.currentColumnIndex = columnIndex;\r\n      }\r\n\r\n      clearSelectedIndex() {\r\n        this.currentRowIndex = -1;\r\n        this.currentColumnIndex = -1;\r\n      }\r\n\r\n      isRowSelectedListino(rowIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex) == this.currentRowIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isColumnSelectedListino(columnIndex: number) {\r\n        let result: boolean = false;\r\n\r\n        if ((columnIndex) == this.currentColumnIndex) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n        this.currentRowIndex = rowIndex;\r\n        this.currentColumnIndex = columnIndex;\r\n      }\r\n\r\n      isCustomerLoggedIn() {\r\n        return this.loggedIdUser.isAuthenticated;\r\n      }\r\n\r\n      /// Create model for passed in input to the calculation method\r\n      getCalculationModel() {\r\n        this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n        this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n        if (this.responseModel.tipoCopie != 'libera') {\r\n          this.model.idCopie = this.responseModel.idCopie;\r\n        }\r\n        else {\r\n          this.model.numCopie = this.responseModel.numCopie;\r\n        }\r\n\r\n        this.model.tipoFacciate = this.responseModel.tipoFacciate;\r\n\r\n        if (this.responseModel.tipoFacciate != 'libera') {\r\n          this.model.idFacciate = this.responseModel.idFacciate;\r\n        }\r\n\r\n        else {\r\n          this.model.numFacciate = this.responseModel.numFacciate;\r\n        }\r\n\r\n        this.model.tipoStampaInternoSoloFronte = this.responseModel.valueStampaInternoSoloFronte;\r\n        this.model.tipoStampaCopertinaSoloFronte = this.responseModel.valueStampaCopertinaSoloFronte;\r\n\r\n        this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n        for (let carta of this.responseModel.carte1) {\r\n          if (this.model.idCarte1 == carta.chiave) {\r\n            this.model.nomeCarte1 = carta.valore\r\n          }\r\n        }\r\n        this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n        for (let grammatureInterno of this.responseModel.grammature1) {\r\n          if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n            this.model.nomeGrammature1 = grammatureInterno.valore\r\n          }\r\n        }\r\n\r\n        this.model.StrCustomerId = this.authService.GetUserId();\r\n        this.model.wizardId = this.resourceId;\r\n        this.model.idFormati = this.responseModel.idFormati;\r\n\r\n        if (this.responseModel.idFormati == \"0\") {\r\n          this.model.baseFormato = this.responseModel.baseFormato;\r\n          this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n        }\r\n\r\n        this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n        if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n          this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n          this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n        }\r\n\r\n        if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n          this.model.idPlastificazioni1 = \"\"\r\n        }\r\n        else {\r\n          this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n        }\r\n\r\n        if (this.EditioriaCopertinaSelect != \"0\" && this.EditioriaCopertinaSelect != \"-1\") {\r\n          this.model.idCarte2 = this.responseModel.idCarte2;\r\n          for (let cartaCopertina of this.responseModel.carte2) {\r\n            if (this.model.idCarte2 == cartaCopertina.chiave) {\r\n              this.model.nomeCarte2 = cartaCopertina.valore\r\n            }\r\n          }\r\n\r\n          this.model.idGrammature2 = this.responseModel.idGrammature2;\r\n\r\n          for (let grammatureCopertina of this.responseModel.grammature2) {\r\n            if (this.model.idGrammature2 == grammatureCopertina.chiave) {\r\n              this.model.nomeGrammature2 = grammatureCopertina.valore\r\n            }\r\n          }\r\n\r\n          this.model.idCopertine = this.responseModel.idCopertine;\r\n          if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni2 == \"-1\") {\r\n            this.model.idPlastificazioni2 = \"\"\r\n          }\r\n          else {\r\n            this.model.idPlastificazioni2 = this.responseModel.idPlastificazioni2;\r\n          }\r\n          this.model.idColori2 = this.responseModel.idColori2;\r\n        }\r\n        else {\r\n          this.model.idGrammature2 = \"0\";\r\n          this.model.idCarte2 = \"\";\r\n          this.model.nomeCarte2 = \"\";\r\n          this.model.nomeGrammature2 = \"0\";\r\n          this.model.idCopertine = \"\";\r\n          this.model.idPlastificazioni2 = \"\";\r\n          this.model.idColori2 = \"\";\r\n        }\r\n\r\n        if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n          this.model.idCartoncino = this.responseModel.idCartoncino;\r\n\r\n          for (let cartaCartoncino of this.responseModel.cartoncini) {\r\n            if (this.model.idCartoncino == cartaCartoncino.chiave) {\r\n              this.model.nomeCartoncino = cartaCartoncino.valore\r\n            }\r\n          }\r\n\r\n          this.model.idGrammatureCartoncino = this.responseModel.idGrammatureCartoncino;\r\n\r\n          for (let grammatureCartoncino of this.responseModel.grammatureCartoncino) {\r\n            if (this.model.idGrammatureCartoncino == grammatureCartoncino.chiave) {\r\n              this.model.nomeGrammatureCartoncino = grammatureCartoncino.valore\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          this.model.idGrammatureCartoncino = \"0\";\r\n          this.model.idCartoncino = \"0\";\r\n          this.model.nomeCartoncino = \"0\";\r\n          this.model.nomeGrammatureCartoncino = \"0\";\r\n        }\r\n\r\n        this.model.taglio = this.isTaglioCalculated();\r\n\r\n        if (this.responseModel.idRilegature != \"-1\") {\r\n          this.model.idRilegature = this.responseModel.idRilegature;\r\n        }\r\n\r\n        this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n        for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n          let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n          if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n            //checkbox\r\n            if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n              lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n              if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                lavorazione.valoreLavorazione = \"1\";\r\n              }\r\n              else {\r\n                lavorazione.valoreLavorazione = \"0\";\r\n              }\r\n            }\r\n            //combo\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n              if (lavorazioneAccessoria.valore != \"-1\") {\r\n                if (lavorazioneAccessoria.valore != \"0\") {\r\n                  lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                  lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                }\r\n              }\r\n            }\r\n            //numeric\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n              if (lavorazioneAccessoria.value != null) {\r\n                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                if (lavorazioneAccessoria.value != \"0\") {\r\n                  lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                }\r\n              }\r\n            }\r\n            //text area\r\n            else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n              lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n              lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n            }\r\n            if (lavorazione.lavorazioneId != null) {\r\n              this.model.lavorazioniAccessorie.push(lavorazione);\r\n            }\r\n          }\r\n        }\r\n\r\n        this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n        if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n          this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n            this.resultPrice = result;\r\n            this.isCalculatedWizard = true;\r\n\r\n            let dorsoString = parseFloat(this.resultPrice.AltezzaDorso.toString());\r\n            let dorso = parseFloat(dorsoString.toFixed(2));\r\n            this.resultPrice.AltezzaDorso = dorso;\r\n            if (this.isCalculationTypeCalcolatoScontistica()) {\r\n              var scontisticaTable = this.resultPrice.TablePriceList;\r\n              this.checkFirstDayForHour(scontisticaTable);\r\n              if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                //Selecting the last available day result. (The cheapest)\r\n\r\n                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                  let price = scontisticaTable[i];\r\n                  if (price.Price != -1) {\r\n                    this.setPriceResult(price);\r\n                    break;\r\n                  }\r\n                }\r\n              }\r\n            }\r\n            else if (this.isCalculationTypeListinoScontistica()) {\r\n              //Selecting first element\r\n              let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n              let breakFlag = false;\r\n              for (let priceRow of tableScontisticaPriceListSliced) {\r\n                let slicedPriceRow = priceRow.slice(1);\r\n                this.checkFirstDayForHour(slicedPriceRow);\r\n                //reverse the obj for select the last data and first price available\r\n                var reverse = slicedPriceRow.reverse();\r\n                for (let price of reverse) {\r\n                  if (price.Price != -1) {\r\n                    this.setListinoScontisticaPriceResult(price);\r\n                    breakFlag = true;\r\n                    break;\r\n                  }\r\n                }\r\n\r\n                if (breakFlag == true) {\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n            else if (this.isCalculationTypeListino()) {\r\n              let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n              this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n              if (tableScontisticaPriceListSliced.length > 0) {\r\n                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                if (slicedPriceRow.Price != -1) {\r\n                  this.setListinoPriceResult(slicedPriceRow);\r\n                }\r\n              }\r\n            }\r\n\r\n            this.resultCalculation = true;\r\n            this.showErrorMessage = false;\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          },\r\n            err => {\r\n              this.isCalculatedWizard = true;\r\n              this.showErrorMessage = true;\r\n              $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            }\r\n          );\r\n        }\r\n        else {\r\n          this.resultCalculation = true;\r\n          this.showErrorMessage = false;\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n\r\n        }\r\n        this.isDataInitialized = true;\r\n      }\r\n\r\n      isTaglioCalculated() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.isTaglioVisible == false) {\r\n          if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n            result = true;\r\n          }\r\n          else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n            result = false;\r\n          }\r\n          else if (this.responseModel.taglioShowed) {\r\n            result = this.responseModel.tipoTaglio;\r\n          }\r\n        }\r\n        else {\r\n          result = false;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsCopertinaShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.EditioriaCopertinaSelect != '0' && this.EditioriaCopertinaSelect != '-1') {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsCartoncinoShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsPlastificazioneInternoIsShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n          result = true;\r\n          if (this.responseModel.isPlastificazioneRequired == false) {\r\n            if (this.responseModel.plastificazioni1.filter((x: any) => x.isVisible == true).length > 0) {\r\n              result = true;\r\n            }\r\n            else {\r\n              result = false;\r\n            }\r\n          }\r\n        }\r\n\r\n\r\n        return result;\r\n      }\r\n\r\n      isAttributeFixed(tipoLavorazione) {\r\n        let result: boolean = false;\r\n\r\n        if (tipoLavorazione == 'fisso') {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsPlastificazioneCopertinaIsShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.plastificazioni2 != null && this.responseModel.plastificazioni2.length > 0 && this.checkIsCopertinaShowed()) {\r\n          result = true;\r\n          if (this.responseModel.isPlastificazioneRequired == false) {\r\n            if (this.responseModel.plastificazioni2.filter((x: any) => x.isVisible == true).length > 0) {\r\n              result = true;\r\n            }\r\n            else {\r\n              result = false;\r\n            }\r\n          }\r\n        }\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 1 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 6 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n      textAreaCheck(event: any) {\r\n        if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n          return false;\r\n        }\r\n        return true;\r\n      }\r\n\r\n      InputNumberCheck(event: any) {\r\n        let result = false;\r\n        if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n          result = true;\r\n        }\r\n        return result;\r\n      }\r\n      checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId, lavIsVisible) {\r\n        let result: boolean = false;\r\n        let isVisible: boolean = false;\r\n\r\n        for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n          if (lavorazioniAccessorie.id == lavId) {\r\n            isVisible = lavorazioniAccessorie.isVisible;\r\n          }\r\n        }\r\n\r\n        if (tipo == 2 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n        let result: boolean = false;\r\n\r\n        if (tipo == 5 && isVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      checkIsTaglioShowed() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      onCategoriaCartaInternoFieldChanged() {\r\n        let selectedPaper = false;\r\n\r\n        for (let carte of this.responseModel.carte1) {\r\n          if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n            if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n              if (selectedPaper == false) {\r\n                this.responseModel.idCarte1 = carte.chiave;\r\n                this.model.idCarte1 = carte.chiave;\r\n                this.responseModel.carte1Description = carte.descrizione;\r\n                this.responseModel.carte1Image = carte.image;\r\n                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                this.responseModel.carte1ShowInfo = false;\r\n\r\n                this.responseModel.grammature1 = carte.subElements;\r\n                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                this.model.idGrammature1 = carte.wrap_valore;\r\n                selectedPaper = true;\r\n              }\r\n\r\n              carte.isVisible = true;\r\n            }\r\n            else {\r\n              carte.isVisible = false;\r\n            }\r\n          }\r\n          else {\r\n            if (selectedPaper == false) {\r\n              this.responseModel.idCarte1 = carte.chiave;\r\n              this.model.idCarte1 = carte.chiave;\r\n              this.responseModel.carte1Description = carte.descrizione;\r\n              this.responseModel.carte1Image = carte.image;\r\n              this.responseModel.carte1HasInfo = carte.hasInfo;\r\n              this.responseModel.carte1ShowInfo = false;\r\n\r\n              this.responseModel.grammature1 = carte.subElements;\r\n              this.responseModel.idGrammature1 = carte.wrap_valore;\r\n              this.model.idGrammature1 = carte.wrap_valore;\r\n              selectedPaper = true;\r\n            }\r\n\r\n            carte.isVisible = true;\r\n          }\r\n        }\r\n\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onCartaInternoFieldChanged(isrules = false) {\r\n        for (let grammature of this.responseModel.carte1) {\r\n          if (grammature.chiave == this.responseModel.idCarte1) {\r\n            this.responseModel.carte1Description = grammature.descrizione;\r\n            this.responseModel.carte1Image = grammature.image;\r\n            this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n            this.responseModel.carte1ShowInfo = false;\r\n            this.responseModel.grammature1 = grammature.subElements;\r\n            this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n            this.model.idGrammature1 = grammature.wrap_valore;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onCartoncinoFieldChanged() {\r\n        for (let grammature of this.responseModel.cartoncini) {\r\n          if (grammature.chiave == this.responseModel.idCartoncino) {\r\n            this.responseModel.cartoncinoDescription = grammature.descrizione;\r\n            this.responseModel.cartoncinoImage = grammature.image;\r\n            this.responseModel.cartoncinoHasInfo = grammature.hasInfo;\r\n            this.responseModel.cartoncinoShowInfo = false;\r\n            this.responseModel.grammatureCartoncino = grammature.subElements;\r\n            this.responseModel.idGrammatureCartoncino = grammature.wrap_valore;\r\n            this.model.idGrammatureCartoncino = grammature.wrap_valore;\r\n          }\r\n        }\r\n\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onCartaInternoVisualFieldChanged(paperId) {\r\n        this.responseModel.idCarte1 = paperId;\r\n        this.onCartaInternoFieldChanged();\r\n      }\r\n\r\n      onCartoncinoVisualFieldChanged(paperId) {\r\n        this.responseModel.idCartoncino = paperId;\r\n        this.onCartoncinoFieldChanged();\r\n      }\r\n\r\n      onCategoriaCartaCopertinaFieldChanged() {\r\n        let selectedPaper = false;\r\n\r\n        for (let carteCopertina of this.responseModel.carte2) {\r\n          if (this.responseModel.idCategorieCarte2 != \"-1\") {\r\n            if (carteCopertina.parentId == this.responseModel.idCategorieCarte2) {\r\n              if (selectedPaper == false) {\r\n                this.responseModel.idCarte2 = carteCopertina.chiave;\r\n                this.model.idCarte2 = carteCopertina.chiave;\r\n                this.responseModel.carte2Description = carteCopertina.descrizione;\r\n                this.responseModel.carte2Image = carteCopertina.image;\r\n                this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n                this.responseModel.carte2ShowInfo = false;\r\n                this.responseModel.grammature2 = carteCopertina.subElements;\r\n                this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n                this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n                selectedPaper = true;\r\n              }\r\n\r\n              carteCopertina.isVisible = true;\r\n            }\r\n            else {\r\n              carteCopertina.isVisible = false;\r\n            }\r\n          }\r\n          else {\r\n            if (selectedPaper == false) {\r\n              this.responseModel.idCarte2 = carteCopertina.chiave;\r\n              this.model.idCarte2 = carteCopertina.chiave;\r\n              this.responseModel.carte2Description = carteCopertina.descrizione;\r\n              this.responseModel.carte2Image = carteCopertina.image;\r\n              this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n              this.responseModel.carte2ShowInfo = false;\r\n\r\n              this.responseModel.grammature2 = carteCopertina.subElements;\r\n              this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n              this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n              selectedPaper = true;\r\n            }\r\n\r\n            carteCopertina.isVisible = true;\r\n          }\r\n        }\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onCartaCopertinaFieldChanged(isrules = false) {\r\n        for (let grammatureCartaCopertina of this.responseModel.carte2) {\r\n          if (grammatureCartaCopertina.chiave == this.responseModel.idCarte2) {\r\n            this.responseModel.carte2Description = grammatureCartaCopertina.descrizione;\r\n            this.responseModel.carte2Image = grammatureCartaCopertina.image;\r\n            this.responseModel.carte2HasInfo = grammatureCartaCopertina.hasInfo;\r\n            this.responseModel.carte2ShowInfo = false;\r\n            this.responseModel.grammature2 = grammatureCartaCopertina.subElements;\r\n            this.responseModel.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n            this.model.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onCopertineFieldChange(isrules = false) {\r\n        this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onCopertineFieldVisualChange(copertinaId) {\r\n        this.responseModel.idCopertine = copertinaId;\r\n        this.onCopertineFieldChange();\r\n      }\r\n\r\n      onCartaCopertinaVisualFieldChanged(paperId) {\r\n        this.responseModel.idCarte2 = paperId;\r\n        this.onCartaCopertinaFieldChanged();\r\n      }\r\n\r\n      onFormatiChange(isrules = false) {\r\n        for (let formato of this.responseModel.formati) {\r\n          if (formato.chiave == this.responseModel.idFormati) {\r\n            this.responseModel.formatoDescription = formato.descrizione;\r\n            this.responseModel.formatoImage = formato.image;\r\n            this.responseModel.formatiHasInfo = formato.hasInfo;\r\n            this.responseModel.formatiShowInfo = false;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onFormatiVisualChange(formatId) {\r\n        this.responseModel.idFormati = formatId;\r\n        this.onFormatiChange();\r\n      }\r\n\r\n      onStampaInternoVisualChange(stampaInternoValue) {\r\n        this.responseModel.idColori1 = stampaInternoValue;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onStampaCopertinaVisualChange(stampaCopertinaValue) {\r\n        this.responseModel.idColori2 = stampaCopertinaValue;\r\n        this.parameterValidation();\r\n      }\r\n\r\n\r\n      onPlastificationInternoChange(isrules = false) {\r\n        for (let plastification of this.responseModel.plastificazioni1) {\r\n          if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n            this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n            this.responseModel.plastificazioni1Image = plastification.image;\r\n            this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n            this.responseModel.plastificazioni1ShowInfo = false;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onPlastificationInternoViasualChange(plastificationId) {\r\n        this.responseModel.idPlastificazioni1 = plastificationId;\r\n        this.onPlastificationInternoChange();\r\n      }\r\n\r\n      onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n        this.responseModel.idGrammature1 = grammatureId;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onGrammatureCartoncinoVisualFieldChanged(grammatureId) {\r\n        this.responseModel.idGrammatureCartoncino = grammatureId;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onGrammatureCopertinaVisualFieldChanged(grammatureId) {\r\n        this.responseModel.idGrammature2 = grammatureId;\r\n        this.parameterValidation();\r\n      }\r\n\r\n      onPlastificationCopertinaChange(isrules = false) {\r\n        for (let plastification of this.responseModel.plastificazioni2) {\r\n          if (plastification.chiave == this.responseModel.idPlastificazioni2) {\r\n            this.responseModel.plastificazioni2Description = plastification.descrizione;\r\n            this.responseModel.plastificazioni2Image = plastification.image;\r\n            this.responseModel.plastificazioni2HasInfo = plastification.hasInfo;\r\n            this.responseModel.plastificazioni2ShowInfo = false;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onPlastificationCopertinaVisualChange(plastificationId) {\r\n        this.responseModel.plastificazioni2 = plastificationId;\r\n        this.onPlastificationCopertinaChange();\r\n      }\r\n\r\n      lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n        for (let variante of lavorazione.valori) {\r\n          if (lavorazione.valore == variante.chiave) {\r\n            lavorazione.description = variante.descrizione;\r\n            lavorazione.image = variante.image;\r\n            lavorazione.hasInfo = variante.hasInfo;\r\n            lavorazione.showInfo = false;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n        lavorazione.valore = lavorazioneId;\r\n        this.lavorazioniAccessorieComboChange(lavorazione);\r\n      }\r\n\r\n      onRilegaturaChange(isrules = false) {\r\n        for (let rilegature of this.responseModel.rilegature) {\r\n          if (rilegature.chiave == this.responseModel.idRilegature) {\r\n            this.responseModel.rilegatureDescription = rilegature.descrizione;\r\n            this.responseModel.rilegatureImage = rilegature.image;\r\n            this.responseModel.rilegatureHasInfo = rilegature.hasInfo;\r\n            this.responseModel.rilegatureShowInfo = false;\r\n          }\r\n        }\r\n\r\n        if (isrules == false) {\r\n          this.parameterValidation();\r\n        }\r\n      }\r\n\r\n      onRilegaturaVisualChange(rilegaturaId) {\r\n        this.responseModel.idRilegature = rilegaturaId;\r\n        this.onRilegaturaChange();\r\n      }\r\n\r\n      showHideLavDescription(lavorazione) {\r\n        if (lavorazione.showInfo) {\r\n          lavorazione.showInfo = false;\r\n        }\r\n        else {\r\n          lavorazione.showInfo = true;\r\n        }\r\n      }\r\n\r\n      showHideFormatDescription() {\r\n        if (this.responseModel.formatiShowInfo) {\r\n          this.responseModel.formatiShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.formatiShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePaperInternoDescription() {\r\n        if (this.responseModel.carte1ShowInfo) {\r\n          this.responseModel.carte1ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte1ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePaperCartoncinoDescription() {\r\n        if (this.responseModel.cartoncinoShowInfo) {\r\n          this.responseModel.cartoncinoShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.cartoncinoShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePaperCopertinaDescription() {\r\n        if (this.responseModel.carte2ShowInfo) {\r\n          this.responseModel.carte2ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte2ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePlastficationInternoDescription() {\r\n        if (this.responseModel.plastificazioni1ShowInfo) {\r\n          this.responseModel.plastificazioni1ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.plastificazioni1ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHidePlastficationCopertinaDescription() {\r\n        if (this.responseModel.plastificazioni2ShowInfo) {\r\n          this.responseModel.plastificazioni2ShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.plastificazioni2ShowInfo = true;\r\n        }\r\n      }\r\n\r\n      showHideRilegatureDescription() {\r\n        if (this.responseModel.rilegatureShowInfo) {\r\n          this.responseModel.rilegatureShowInfo = false;\r\n        }\r\n        else {\r\n          this.responseModel.rilegatureShowInfo = true;\r\n        }\r\n      }\r\n\r\n      checkValidation() {\r\n        if (this.responseModel.copieIsValid\r\n          && this.responseModel.facciateIsValid\r\n          && this.responseModel.formatiIsValid\r\n          && this.responseModel.baseFormatoIsValid\r\n          && this.responseModel.altezzaFormatoIsValid\r\n          && this.responseModel.carte1IsValid\r\n          && this.responseModel.grammature1IsValid\r\n          && this.responseModel.plastificazione1IsValid\r\n          && this.responseModel.carte2IsValid\r\n          && this.responseModel.grammature2IsValid\r\n          && this.responseModel.plastificazione2IsValid\r\n          && this.responseModel.copertineIsValid\r\n          && this.responseModel.cartoncinoIsValid\r\n          && this.responseModel.rilegatureIsValid\r\n          && this.responseModel.lavorazioniIsValid\r\n          && this.responseModel.colori1IsValid\r\n        ) {\r\n          return true;\r\n        }\r\n        else {\r\n          return false;\r\n        }\r\n      }\r\n\r\n      checkEmailIsValid() {\r\n        var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n        if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n          this.model.isRichiestaEmailValid = false;\r\n        }\r\n        else {\r\n          this.model.isRichiestaEmailValid = true;\r\n        }\r\n      }\r\n\r\n      checkFormRichiestaPrevIsValid() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n          if (this.model.richiestaName != \"\"\r\n            && this.model.richiestaSubName != \"\"\r\n            && this.model.isRichiestaEmailValid\r\n            && this.model.richiestaTelephone != \"\"\r\n            && this.model.richiestaJobname != \"\"\r\n            && this.model.richiestaCondizioni) {\r\n            result = true;\r\n          }\r\n        }\r\n        else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n          if (this.model.richiestaJobname != \"\") {\r\n            result = true;\r\n          }\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      sendRequestInfo() {\r\n        if (this.checkFormRichiestaPrevIsValid()) {\r\n          this.resultCalculation = false;\r\n          $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n          let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n            if (result == true) {\r\n              this.requestInfoSuccess = true;\r\n            }\r\n            else {\r\n              this.requestInfoSuccess = false;\r\n            }\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.resultCalculation = true;\r\n\r\n          },\r\n            err => {\r\n              this.requestInfoSuccess = false;\r\n              $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n              this.resultCalculation = true;\r\n            }\r\n          );\r\n\r\n          this.subManager.add(sub);\r\n        }\r\n      }\r\n\r\n      CheckRegoleEditoria() {\r\n        try {\r\n          this.blockquoting = false;\r\n          //save in the array all parameter value before to apply rules\r\n          let oldCarta = this.responseModel.idCarte1;\r\n          let oldCartaCopertina = this.responseModel.idCarte2;\r\n          let oldFormato = this.responseModel.idFormati;\r\n          let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n          let oldPlastificazioneCopertina = this.responseModel.idPlastificazioni2;\r\n          let oldCopertina = this.responseModel.idCopertine;\r\n          let oldRilegatura = this.responseModel.idRilegature;\r\n          let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n          for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n            let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n            if (lavorazione.tipo == \"2\") {\r\n              lav.lavorazioneId = lavorazione.id;\r\n              lav.valoreLavorazione = lavorazione.valore;\r\n              lavAccArray.push(lav);\r\n            }\r\n          }\r\n\r\n\r\n          //-----------------------------------------------------------------------------//\r\n          //-----------------------------Reset delle regole------------------------------//\r\n          //-----------------------------------------------------------------------------//\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", null, null, this.responseModel);\r\n          this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"EDITORIA\", null, null, this.responseModel);\r\n\r\n          //-----------------------------------------------------------------------------//\r\n          //----------------------Applicazione delle regole------------------------------//\r\n          //-----------------------------------------------------------------------------//\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", this.responseModel.idFormati, 0, this.responseModel);\r\n\r\n          if (this.responseModel.idCarte1 != null) {\r\n            var data = this.responseModel.idCarte1.split(\"_\");\r\n            let idCarta = data[0];\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n          }\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n          if (this.responseModel.idCarte2 != null) {\r\n            var data = this.responseModel.idCarte2.split(\"_\");\r\n            let idCarta = data[0];\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, this.responseModel.idGrammature2, this.responseModel);\r\n          }\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"EDITORIA\", this.responseModel.idPlastificazioni2, 0, this.responseModel);\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", this.responseModel.idCopertine, 0, this.responseModel);\r\n\r\n          this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", this.responseModel.idRilegature, 0, this.responseModel);\r\n\r\n          if (!this.isTaglioCalculated()) {\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 1, 0, this.responseModel);\r\n          }\r\n          else {\r\n            this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 2, 0, this.responseModel);\r\n          }\r\n\r\n          this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"EDITORIA\", this.responseModel);\r\n          //if the old value id different to the new one i call the method for update description and image\r\n          if (oldFormato != this.responseModel.idFormati) {\r\n            this.onFormatiChange(true);\r\n          }\r\n          if (oldCarta != this.responseModel.idCarte1) {\r\n            this.onCartaInternoFieldChanged(true);\r\n          }\r\n          if (oldCartaCopertina != this.responseModel.idCarte2) {\r\n            this.onCartaCopertinaFieldChanged(true);\r\n          }\r\n          if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n            this.onPlastificationInternoChange(true);\r\n          }\r\n          if (oldPlastificazioneCopertina != this.responseModel.idPlastificazioni2) {\r\n            this.onPlastificationCopertinaChange(true);\r\n          }\r\n          if (oldCopertina != this.responseModel.idCopertine) {\r\n            this.onCopertineFieldChange(true);\r\n          }\r\n          if (oldRilegatura != this.responseModel.idRilegature) {\r\n            this.onRilegaturaChange(true);\r\n          }\r\n\r\n          let count = 0;\r\n          for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n            count = 0;\r\n            for (let lavorazioneOld of lavAccArray) {\r\n              if (count > 0) {\r\n                continue;\r\n              }\r\n              else {\r\n                if (lavorazione.tipo == \"2\") {\r\n                  if (lavorazione.isVisible == true) {\r\n                    if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                      if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                        this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                        count++;\r\n                      }\r\n                    }\r\n                  }\r\n                }\r\n              }\r\n            }\r\n          }\r\n\r\n        } catch (e) {\r\n          this.blockquoting = true;\r\n          this.showErrorMessage = true;\r\n          return;\r\n        }\r\n      }\r\n\r\n      /// Check if all the value is validated\r\n      parameterValidation() {\r\n        this.iShowHourForDay = false;\r\n        this.isCalculatedWizard = false;\r\n        this.resultCalculation = false;\r\n        this.showErrorMessage = false;\r\n        this.requestInfoSuccess = null;\r\n\r\n        //apply all rules\r\n        this.CheckRegoleEditoria();\r\n\r\n        if (this.pageIsInit) {\r\n          this.pageIsInit = false;\r\n        }\r\n\r\n        this.validationCopie();\r\n\r\n        this.validationFacciate();\r\n\r\n        this.validationFormati();\r\n        if (this.responseModel.idFormati == \"0\") {\r\n          this.validationBaseFormati();\r\n          this.validationAltezzaFormati();\r\n        }\r\n        else {\r\n          this.responseModel.baseFormatoIsValid = true;\r\n          this.responseModel.altezzaFormatoIsValid = true;\r\n        }\r\n\r\n        this.validationColori();\r\n        this.validationCarteInterno();\r\n        this.validationGrammatureCarteInterno();\r\n\r\n        this.validationPlastificazioneInterno();\r\n\r\n        this.validationCopertina();\r\n\r\n        if (this.checkIsCopertinaShowed()) {\r\n          this.validationCarteCopertina();\r\n          this.validationGrammatureCarteCopertina();\r\n          this.validationPlastificazioneCopertina();\r\n        }\r\n        else {\r\n          this.responseModel.carte2IsValid = true;\r\n          this.responseModel.grammature2IsValid = true;\r\n          this.responseModel.plastificazione2IsValid = true;\r\n        }\r\n\r\n        if (this.checkIsCartoncinoShowed()) {\r\n          this.validationCartoncino();\r\n          this.validationGrammatureCartoncino();\r\n        }\r\n        else {\r\n          this.responseModel.cartoncinoIsValid = true;\r\n          this.responseModel.grammatureCartoncinoIsValid = true;\r\n        }\r\n\r\n        this.validationRilegatura();\r\n        this.validationLavorazioneAccessoria();\r\n\r\n        this.countCartaCategories();\r\n        this.countCategorieCarteCopertina()\r\n        if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n          this.selectFileCombination();\r\n        }\r\n\r\n        //if all parameters are validated  call a method who getting price\r\n        if (this.checkValidation()) {\r\n          $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n          this.getCalculationModel();\r\n        }\r\n        else {\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.resultCalculation = true;\r\n          this.showErrorMessage = true;\r\n        }\r\n      }\r\n\r\n      countCartaCategories() {\r\n        if (this.responseModel.categorieCarte != null) {\r\n          this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n        }\r\n      }\r\n\r\n      countCategorieCarteCopertina() {\r\n        if (this.responseModel.categorieCarteCopertina != null) {\r\n          this.responseModel.categorieCarteCopertinaCount = this.responseModel.categorieCarteCopertina.filter(x => x.isVisible == true).length;\r\n        }\r\n      }\r\n\r\n      selectFileCombination() {\r\n        this.listaFile = new Array<FileCombinationModel>()\r\n        for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n          if (file.FormatId == this.responseModel.idFormati) {\r\n\r\n\r\n            let fileObj = new FileCombinationModel();\r\n            fileObj.PathFile = file.PathFile;\r\n            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n              fileObj.NomeFile = file.FileName;\r\n            }\r\n            else {\r\n              fileObj.NomeFile = file.NomeFile;\r\n            }\r\n            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n              fileObj.NomeIstruzioni = file.FileIstructionName;\r\n            }\r\n            else {\r\n              fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n            }\r\n            this.listaFile.push(fileObj)\r\n          }\r\n        }\r\n      }\r\n      validationCopie() {\r\n        let message;\r\n\r\n        if (this.responseModel.tipoCopie == 'libera') {\r\n          let numCopie = parseInt(this.responseModel.numCopie);\r\n          let minCopie = this.responseModel.minimoCopie;\r\n          let maxCopie = this.responseModel.massimoCopie;\r\n          if (this.responseModel.numCopie == null) {\r\n            message = this.getLabel('inserisci_valore_valido');\r\n            this.responseModel.copieIsValid = false;\r\n          }\r\n          else if (maxCopie == 0) {\r\n            if (numCopie < minCopie) {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minCopie;\r\n              this.responseModel.copieIsValid = false;\r\n            }\r\n            else {\r\n              this.responseModel.copieIsValid = true;\r\n            }\r\n          }\r\n          else {\r\n            if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n              this.responseModel.copieIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minCopie;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxCopie;\r\n              this.responseModel.copieIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (this.responseModel.idCopie == \"-1\") {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.copieIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.copieIsValid = true;\r\n          }\r\n\r\n          if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n            this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n          }\r\n        }\r\n\r\n        this.responseModel.copieMessage = message;\r\n      }\r\n\r\n      validationFacciate() {\r\n        let message;\r\n\r\n        if (this.responseModel.tipoFacciate == 'libera') {\r\n          let numFacciate = parseInt(this.responseModel.numFacciate);\r\n          let minFacciate = this.responseModel.minimoFacciate;\r\n          let maxFacciate = this.responseModel.massimoFacciate;\r\n          let multiploFacciate = this.responseModel.multiploFacciate;\r\n\r\n          //If the weight for the inside currently selected is in the ones defined in the validation rules, then the max and min are read directly from the ones of the rule.\r\n          //Else the ones on the wizard are used\r\n          //Note: The max and min facciate defined on weight wins over the ones defined on the wizard\r\n          let objGrammaturaFacciateValidation = this.checkValidationRulesGrammatureFacciate();\r\n\r\n          if (objGrammaturaFacciateValidation != null) {\r\n            minFacciate = objGrammaturaFacciateValidation.Facciate != null ? objGrammaturaFacciateValidation.Facciate : 0;\r\n            maxFacciate = objGrammaturaFacciateValidation.MassimoFacciate != null ? objGrammaturaFacciateValidation.MassimoFacciate : 0;\r\n          }\r\n\r\n          if (this.responseModel.numFacciate == null) {\r\n            message = this.getLabel('inserisci_valore_valido');\r\n            this.responseModel.facciateIsValid = false;\r\n          }\r\n          else if ((maxFacciate == 0 && (numFacciate == 0 || numFacciate < minFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n            message = this.getLabel('inserisci_valore_maggiore');\r\n            message += \" \" + minFacciate;\r\n\r\n            if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n              message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n              message += \" \" + multiploFacciate;\r\n            }\r\n\r\n            this.responseModel.facciateIsValid = false;\r\n          }\r\n          else if ((maxFacciate > 0 && (numFacciate == 0 || numFacciate < minFacciate || numFacciate > maxFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n            message = this.getLabel('inserisci_valore_compreso_tra');\r\n            message += \" \" + minFacciate;\r\n            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n            message += \" \" + maxFacciate;\r\n\r\n            if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n              message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n              message += \" \" + multiploFacciate;\r\n            }\r\n\r\n            this.responseModel.facciateIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.facciateIsValid = true;\r\n          }\r\n\r\n        }\r\n        else {\r\n          if (this.responseModel.idFacciate == \"-1\") {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.facciateIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.facciateIsValid = true;\r\n          }\r\n\r\n\r\n          if (this.responseModel.tipoFacciate === 'fissa' && this.responseModel.facciate != null) {\r\n            this.responseModel.facciateCount = this.responseModel.facciate.filter(x => x.isVisible == true).length;\r\n          }\r\n        }\r\n\r\n        this.responseModel.facciateMessage = message;\r\n      }\r\n\r\n      validationColori() {\r\n        let message;\r\n\r\n        if (this.responseModel.idColori1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.colori1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.colori1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.colori1 != null) {\r\n          this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        if (this.responseModel.colori2 != null) {\r\n          this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.colori1Message = message;\r\n      }\r\n      validationBaseFormati() {\r\n        let message;\r\n        let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n        let minBase = this.responseModel.minimoBase;\r\n        let maxBase = this.responseModel.massimoBase;\r\n        if (minBase > 0 || maxBase > 0) {\r\n          if (minBase > 0 && maxBase == 0) {\r\n            if ((base >= minBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minBase == 0 && maxBase > 0) {\r\n            if ((base <= maxBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minBase;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minBase > 0 && maxBase > 0) {\r\n            if ((base >= minBase) && (base <= maxBase)) {\r\n              this.responseModel.baseFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minBase;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxBase;\r\n              this.responseModel.baseFormatoIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (base <= 0 || this.responseModel.baseFormato == null) {\r\n            message = this.getLabel('inserisci_valore_maggiore');\r\n            message += \" \" + 0;\r\n            this.responseModel.baseFormatoIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.baseFormatoIsValid = true;\r\n          }\r\n        }\r\n        this.responseModel.baseFormatoMessage = message;\r\n      }\r\n\r\n      validationAltezzaFormati() {\r\n        let message;\r\n        let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n        let minAltezza = this.responseModel.minimoAltezza;\r\n        let maxAltezza = this.responseModel.massimoAltezza;\r\n        if (minAltezza > 0 || maxAltezza > 0) {\r\n          if (minAltezza > 0 && maxAltezza == 0) {\r\n            if ((altezza >= minAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_maggiore');\r\n              message += \" \" + minAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minAltezza == 0 && maxAltezza > 0) {\r\n            if ((altezza <= maxAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minAltezza;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n          else if (minAltezza > 0 && maxAltezza > 0) {\r\n            if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n              this.responseModel.altezzaFormatoIsValid = true;\r\n            }\r\n            else {\r\n              message = this.getLabel('inserisci_valore_compreso_tra');\r\n              message += \" \" + minAltezza;\r\n              message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n              message += \" \" + maxAltezza;\r\n              this.responseModel.altezzaFormatoIsValid = false;\r\n            }\r\n          }\r\n        }\r\n        else {\r\n          if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n            message = this.getLabel('inserisci_valore_maggiore');\r\n            message += \" \" + 0;\r\n            this.responseModel.altezzaFormatoIsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.altezzaFormatoIsValid = true;\r\n          }\r\n        }\r\n\r\n        this.responseModel.altezzaFormatoMessage = message;\r\n      }\r\n\r\n      validationFormati() {\r\n        let message;\r\n\r\n        if (this.responseModel.idFormati == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.formatiIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.formatiIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.formati != null) {\r\n          this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.formatiMessage = message;\r\n      }\r\n\r\n      validationCarteInterno() {\r\n        let message;\r\n\r\n        if (this.responseModel.idCarte1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.carte1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.carte1 != null) {\r\n          this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.carte1Message = message;\r\n      }\r\n\r\n      validationGrammatureCarteInterno() {\r\n        let message;\r\n\r\n        if (this.responseModel.idGrammature1 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.grammature1IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.grammature1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.grammature1 != null) {\r\n          this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.grammature1Message = message;\r\n      }\r\n\r\n      validationCartoncino() {\r\n        let message;\r\n\r\n        if (this.responseModel.idCartoncino == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.cartoncinoIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.cartoncinoIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.cartoncini != null) {\r\n          this.responseModel.cartonciniCount = this.responseModel.cartoncini.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.cartoncinoMessage = message;\r\n      }\r\n\r\n      validationGrammatureCartoncino() {\r\n        let message;\r\n\r\n        if (this.responseModel.idGrammatureCartoncino == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.grammatureCartoncinoIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.grammatureCartoncinoIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.grammatureCartoncino != null) {\r\n          this.responseModel.grammatureCartoncinoCount = this.responseModel.grammatureCartoncino.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.grammatureCartoncinoMessage = message;\r\n      }\r\n\r\n      validationPlastificazioneInterno() {\r\n        let message;\r\n\r\n        if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n\r\n          if (this.responseModel.isPlastificazioneRequired == true) {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.plastificazione1IsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.plastificazione1IsValid = true;\r\n          }\r\n        }\r\n        else {\r\n          this.responseModel.plastificazione1IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.plastificazioni1 != null) {\r\n          this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.plastificazione1Message = message;\r\n      }\r\n\r\n      validationPlastificazioneCopertina() {\r\n        let message;\r\n\r\n        if (this.responseModel.idPlastificazioni2 == \"-1\") {\r\n\r\n          if (this.responseModel.isPlastificazioneRequired == true) {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.plastificazione2IsValid = false;\r\n          }\r\n          else {\r\n            this.responseModel.plastificazione2IsValid = true;\r\n          }\r\n        }\r\n        else {\r\n          this.responseModel.plastificazione2IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.plastificazioni2 != null) {\r\n          this.responseModel.plastificazioni2Count = this.responseModel.plastificazioni2.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.plastificazione2Message = message;\r\n      }\r\n\r\n      validationCarteCopertina() {\r\n        let message;\r\n\r\n        if (this.responseModel.idCarte2 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.carte2IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.carte2IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.carte2 != null) {\r\n          this.responseModel.carte2Count = this.responseModel.carte2.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.carte2Message = message;\r\n      }\r\n\r\n      validationGrammatureCarteCopertina() {\r\n        let message;\r\n\r\n        if (this.responseModel.idGrammature2 == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.grammature2IsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.grammature2IsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.grammature2 != null) {\r\n          this.responseModel.grammature2Count = this.responseModel.grammature2.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.grammature2Message = message;\r\n      }\r\n\r\n      validationCopertina() {\r\n        let message;\r\n\r\n        if (this.responseModel.idCopertine == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.copertineIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.copertineIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.copertine != null) {\r\n          this.responseModel.copertineCount = this.responseModel.copertine.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.copertineMessage = message;\r\n      }\r\n\r\n      validationLavorazioneAccessoria() {\r\n        let message: string = \"\";\r\n        let valid: boolean = true;\r\n\r\n        for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n          if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n            if (lavorazione.obbligatorio == true) {\r\n              if (lavorazione.valore == \"-1\") {\r\n                message = this.getLabel('mandatory_field');\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n              else {\r\n                lavorazione.isValid = true;\r\n              }\r\n            }\r\n            lavorazione.lavorazioneMessage = message;\r\n          }\r\n          //check min qta  and max qta  for input field\r\n          if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n            let qta = parseInt(lavorazione.value);\r\n            let minQta = lavorazione.minQtaInput;\r\n            let maxQta = lavorazione.maxQtaInput;\r\n\r\n            if (lavorazione.value == null) {\r\n              message = this.getLabel('inserisci_valore_valido');\r\n              lavorazione.isValid = false;\r\n              valid = false;\r\n            }\r\n            else if (maxQta == 0) {\r\n              if (qta < minQta) {\r\n                message = this.getLabel('inserisci_valore_maggiore');\r\n                message += \" \" + minQta;\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n              else {\r\n                lavorazione.isValid = true;\r\n              }\r\n            }\r\n            else {\r\n              if ((qta >= minQta) && (qta <= maxQta)) {\r\n                lavorazione.isValid = true;\r\n              }\r\n              else {\r\n                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                message += \" \" + minQta;\r\n                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                message += \" \" + maxQta;\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n              }\r\n            }\r\n\r\n\r\n            if (lavorazione.umLavorazione == 84 && qta > 0) {\r\n              var numFacciate = 0;\r\n              if (this.responseModel.tipoFacciate != 'libera') {\r\n\r\n                var facciata = this.responseModel.facciate.filter((x: any) => x.chiave == this.responseModel.idFacciate);\r\n\r\n                numFacciate = parseInt(facciata[0].valore);\r\n              }\r\n\r\n              else {\r\n                numFacciate = parseInt(this.responseModel.numFacciate);\r\n              }\r\n\r\n              let checkFacciateNum: number = parseInt(((numFacciate * lavorazione.percentualePagineTotEditoria) / 100) + \"\");\r\n              if (checkFacciateNum < qta) {\r\n                lavorazione.isValid = false;\r\n                valid = false;\r\n                message = this.getLabel('num_lower_or_equal_than');\r\n                message += \" \" + checkFacciateNum;\r\n              }\r\n            }\r\n            lavorazione.lavorazioneMessage = message;\r\n          }\r\n\r\n          if (lavorazione.valori != null) {\r\n            lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n          }\r\n        }\r\n\r\n        this.responseModel.lavorazioniIsValid = valid;\r\n      }\r\n\r\n      validationRilegatura() {\r\n        let message;\r\n\r\n        if (this.responseModel.idRilegature == \"-1\") {\r\n          message = this.getLabel('mandatory_field');\r\n          this.responseModel.rilegatureIsValid = false;\r\n        }\r\n        else {\r\n          this.responseModel.rilegatureIsValid = true;\r\n        }\r\n\r\n        if (this.responseModel.rilegature != null) {\r\n          this.responseModel.rilegatureCount = this.responseModel.rilegature.filter(x => x.isVisible == true).length;\r\n        }\r\n\r\n        this.responseModel.rilegatureMessage = message;\r\n      }\r\n\r\n      getLabel(label) {\r\n        let message;\r\n\r\n\r\n        let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n          message = res;\r\n        });\r\n\r\n        this.subManager.add(sub);\r\n\r\n        return message;\r\n      }\r\n\r\n      isCalculationTypeCalcolato() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeCalcolatoScontistica() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeCalcolatoQuotigPrev() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeListino() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"listino\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      isCalculationTypeListinoScontistica() {\r\n        let result: boolean = false;\r\n\r\n        if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n          result = true;\r\n        }\r\n\r\n        return result;\r\n      }\r\n\r\n      addToCartWizardCalcolato(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.getCalculationModel();\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n        this.resultCalculation = false;\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          this.getCalculationModel();\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      setActive(id) {\r\n        $(\".calendar-list\").removeClass(\"hoverActive\");\r\n        $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n      }\r\n\r\n      addToCartWizardListino(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      addToCartWizardListinoScontistica(quantityId: number) {\r\n        let wizardId = this.resourceId;\r\n        this.resultCalculation = false;\r\n        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n        let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n          this.cartService.updateCart(result);\r\n          $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n          this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n          this.resultCalculation = true;\r\n        },\r\n          err => {\r\n            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n            this.bootboxService.i18nAlert(\"errorMex\");\r\n            this.resultCalculation = true;\r\n          }\r\n        );\r\n\r\n        this.subManager.add(sub);\r\n      }\r\n\r\n      setPriceResult(price: any) {\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n\r\n        //Deselecting the current price and selected the one passed in input\r\n        for (let prices of this.resultPrice.TablePriceList) {\r\n          prices.IsSelected = false;\r\n        }\r\n\r\n        price.IsSelected = true;\r\n\r\n        this.resultPrice.Currency = price.Currency;\r\n        this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n        this.resultPrice.DataId = price.DayId;\r\n        this.resultPrice.DayName = price.DayName;\r\n        this.resultPrice.DayNumber = price.DayNumber;\r\n        this.resultPrice.QuantityID = price.QuantityId;\r\n        this.resultPrice.Quantity = price.Quantity;\r\n        this.resultPrice.IsHour = price.IsHour;\r\n        this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n        this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n        this.resultPrice.Iva = price.StrIva;\r\n        this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n        this.resultPrice.TotalAmount = price.Total;\r\n        this.resultPrice.Weight = price.StrWeight;\r\n        this.resultPrice.WeightUm = price.StrWeightUm;\r\n        this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n        this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n      }\r\n\r\n      setListinoScontisticaPriceResult(price: any) {\r\n        if (price.Price == -1) {\r\n          return;\r\n        }\r\n\r\n        this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n        this.setPriceResult(price);\r\n      }\r\n\r\n      //Check if the selected paper weight for the inside is in the ones defined in the validation rules for the facciate\r\n      checkValidationRulesGrammatureFacciate() {\r\n        var output = null;\r\n\r\n        //Reading current paper weight\r\n        var idGrammatura = this.responseModel.idGrammature1;\r\n\r\n        for (var i = 0; i < this.responseModel.listaRegoleGrammaturaFacciate.length; i++) {\r\n          var item = this.responseModel.listaRegoleGrammaturaFacciate[i];\r\n\r\n          if (item.IdGrammatura == idGrammatura) {\r\n            output = item;\r\n            break;\r\n          }\r\n        }\r\n\r\n        return output;\r\n\r\n      }\r\n\r\n      ngAfterViewChecked() {\r\n        if (!this.isBrowser || this.pageIsInitAfter) {\r\n          return;\r\n        }\r\n        layoutTheme.initToggle();\r\n        this.pageIsInitAfter = true;\r\n      }\r\n\r\n      ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n      }\r\n    }\r\n    return ChildComponent;\r\n  }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-editoria.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { CustomersCanvasService } from '../../../../../../services/inventory/customerscanvas.service';\r\n\r\n@Component({\r\n    selector: \"dy-wizard-etichette-widget\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class WizardEtichetteComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private _quotingService: QuotingService,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() resourceId: number;\r\n    autentification = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let sub = this._quotingService.getWizardEtichetteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(sub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n        @Component({\r\n            template: result.templateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private routesService: RoutesService,\r\n                    private translate: TranslateService,\r\n                    private cartService: ShoppingCartService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    public canvasService: CustomersCanvasService\r\n                ) {//check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                if (this.isCalculationTypeCalcolato()) {\r\n                                    this.addToCartWizardCalcolato(1);\r\n                                }\r\n                                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                                    this.addToCartWizardCalcolatoScontistica(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListino()) {\r\n                                    this.addToCartWizardListino(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListinoScontistica()) {\r\n                                    this.addToCartWizardListinoScontistica(1);\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private loggedIdUser: UserLogin;\r\n            waiting: boolean = false;\r\n            carteValue: number = -1;\r\n            lang: string = this.languageService.getLongLang();\r\n            responseModel: QuotingModel = new QuotingModel();\r\n            autentification = this.authService.GetData();\r\n            resourceId: number = InputresourceId;\r\n            isDataInitialized: boolean = false;\r\n            iShowHourForDay: boolean = false;\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            typePriceResult: string;\r\n            model = new wizardFormEditoriaModel();\r\n            currentRowIndex: number = -1;\r\n            currentColumnIndex: number = -1;\r\n            requestInfoSuccess: boolean = null;\r\n            resultCalculation: boolean = false;\r\n            showErrorMessage: boolean = false;\r\n            blockquoting: boolean = false;\r\n            listaFile: Array<FileCombinationModel>;\r\n            enableAltezzaLabel: boolean = true;\r\n            isCalculatedWizard: boolean = false;\r\n\r\n            // sending info to a child component\r\n            public parentWidgetData: string = result.CanvasInfo;\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n                this.ExcludingRules.setMacrocategory(\"ETICHETTE\");\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                    this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n\r\n            openCanvasEditor() {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n\r\n                    const canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    const isStateId = false;\r\n\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig() {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n                let isUserLoggedIn = false;\r\n\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n            CheckRegoleEtichette() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldCarta = this.responseModel.idCarte1;\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n                    let oldTaglio = this.responseModel.idTagli;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n                    //Reset regole carta e grammature\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole taglio\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole plastificazione\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    if (this.responseModel.idCarte1 != null) {\r\n                        var data = this.responseModel.idCarte1.split(\"_\");\r\n                        let idCarta = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n                        this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"ETICHETTE\", this.responseModel);\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldCarta != this.responseModel.idCarte1) {\r\n                        this.onCartaInternoFieldChanged(true);\r\n                    }\r\n                    if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n                        this.onPlastificationInternoChange(true);\r\n                    }\r\n                    if (oldTaglio != this.responseModel.idTagli) {\r\n                        this.onTaglioChange(true);\r\n                    }\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    let count = 0;\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        count = 0;\r\n                        for (let lavorazioneOld of lavAccArray) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            parameterValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n\r\n                //apply all rules\r\n                this.CheckRegoleEtichette();\r\n\r\n                //verify validation for all  parameters \r\n                this.validationCopie();\r\n\r\n                if (this.isLabelField()) {\r\n                    this.validationSoggetti();\r\n                    this.validationNumEtichetteLabel();\r\n                    this.validationDiametroInternoAnimaLabel();\r\n                    this.validationDiametroMassimoEsternoAnimaLabel();\r\n                }\r\n                else {\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n\r\n\r\n                this.validationFormati();\r\n\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.enableOrDisableAltezzaLabelByTipoFormato(this.responseModel.idFormatoTipo)\r\n                    this.validationBaseFormati();\r\n                    this.validationAltezzaFormati();\r\n                }\r\n                else {\r\n                    this.responseModel.baseFormatoIsValid = true;\r\n                    this.responseModel.altezzaFormatoIsValid = true;\r\n                }\r\n\r\n                this.validationColori();\r\n\r\n                this.validationCarteInterno();\r\n                this.validationGrammatureCarteInterno();\r\n\r\n                this.validationPlastificazione();\r\n\r\n                this.validationLavorazioneAccessoria();\r\n\r\n                this.countCartaCategories();\r\n\r\n                this.countTagli();\r\n\r\n                this.countFustelle();\r\n\r\n                this.countFormatiTipoLabel();\r\n\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            }\r\n\r\n            countCartaCategories() {\r\n                if (this.responseModel.categorieCarte != null) {\r\n                    this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countTagli() {\r\n                if (this.responseModel.tagli != null) {\r\n                    this.responseModel.tagliCount = this.responseModel.tagli.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n            countFustelle() {\r\n                if (this.responseModel.ListafustelleLabel != null) {\r\n                    this.responseModel.fustelleLabelCount = this.responseModel.ListafustelleLabel.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n            countFormatiTipoLabel() {\r\n                if (this.responseModel.TipologiaFormatiLabel != null) {\r\n                    this.responseModel.formatiTipoLabelCount = this.responseModel.TipologiaFormatiLabel.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            selectFileCombination() {\r\n                this.listaFile = new Array<FileCombinationModel>()\r\n                for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n\r\n                            let fileObj = new FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj)\r\n\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            checkZero(val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            clearSelectedIndex() {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            /// Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n                this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n                for (let carta of this.responseModel.carte1) {\r\n                    if (this.model.idCarte1 == carta.chiave) {\r\n                        this.model.nomeCarte1 = carta.valore\r\n                    }\r\n                }\r\n\r\n                this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n                for (let grammatureInterno of this.responseModel.grammature1) {\r\n                    if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n                        this.model.nomeGrammature1 = grammatureInterno.valore\r\n                    }\r\n                }\r\n\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n\r\n                this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n                if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n                    this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n                    this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n                }\r\n\r\n                this.model.idColori2 = this.responseModel.idColori2;\r\n\r\n                if (this.responseModel.isPlastificazioneRequired == false && this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    this.model.idPlastificazioni1 = \"\"\r\n                }\r\n                else {\r\n                    this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n                }\r\n\r\n\r\n                if (this.responseModel.idTagli != \"-1\") {\r\n                    this.model.idTagli = this.responseModel.idTagli;\r\n                }\r\n\r\n                if (this.responseModel.idFustella != \"-1\") {\r\n                    this.model.idFustella = this.responseModel.idFustella;\r\n                }\r\n\r\n                if (this.responseModel.idAvvolgimento != \"-1\") {\r\n                    this.model.idAvvolgimento = this.responseModel.idAvvolgimento;\r\n                }\r\n                if (this.responseModel.idTipoLavoroLabel != \"-1\") {\r\n                    this.model.idTipoLavoroLabel = this.responseModel.idTipoLavoroLabel;\r\n                }\r\n                if (this.responseModel.idFormatoTipo != \"-1\") {\r\n                    this.model.idFormatoTipo = this.responseModel.idFormatoTipo;\r\n                }\r\n                this.model.numDiametroInternoAnimaLabel = this.responseModel.numDiametroInternoAnimaLabel;\r\n                this.model.numDiametroMassimoEsternoAnimaLabel = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n                this.model.numEtichette = this.responseModel.numEtichette;\r\n                this.model.subSection = this.responseModel.subSection;\r\n\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n                    let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n\r\n                        //combo\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        //numeric\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        //text area\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedWizard = false;\r\n\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListino()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false;\r\n\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedWizard = false;\r\n                            this.showErrorMessage = true;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n\r\n                this.isDataInitialized = true;\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkValidation() {\r\n                if (this.responseModel.copieIsValid\r\n                    && this.responseModel.formatiIsValid\r\n                    && this.responseModel.carte1IsValid\r\n                    && this.responseModel.grammature1IsValid\r\n                    && this.responseModel.plastificazione1IsValid\r\n                    && this.responseModel.lavorazioniIsValid\r\n                    && this.responseModel.baseFormatoIsValid\r\n                    && this.responseModel.altezzaFormatoIsValid\r\n                    && this.responseModel.soggettiIsValid\r\n                    && this.responseModel.colori1IsValid\r\n                ) {\r\n                    return true;\r\n                }\r\n                else {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            validationBaseFormati() {\r\n                let message;\r\n                let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            }\r\n\r\n            validationAltezzaFormati() {\r\n                let message;\r\n                let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            }\r\n\r\n            validationSoggetti() {\r\n                let message;\r\n                let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n                if (this.isLabelField()) {\r\n                    let minDistEtichette = this.responseModel.minimaDistanzaEtichetteLabel;\r\n                    let maxDistEtichette = this.responseModel.massimaDistanzaEtichetteLabel;\r\n\r\n                    if (this.responseModel.numSoggetti == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else if (numSoggetti == 0) {\r\n                        message = this.getLabel('inserisci_valore_maggiore_0');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else {\r\n                        if (maxDistEtichette == 0) {\r\n                            if (numSoggetti < minDistEtichette) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minDistEtichette;\r\n                                this.responseModel.soggettiIsValid = false;\r\n                            }\r\n                            else {\r\n                                this.responseModel.soggettiIsValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((numSoggetti >= minDistEtichette) && (numSoggetti <= maxDistEtichette)) {\r\n                                this.responseModel.soggettiIsValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minDistEtichette;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxDistEtichette;\r\n                                this.responseModel.soggettiIsValid = false;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.numSoggetti == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else if (numSoggetti == 0) {\r\n                        message = this.getLabel('inserisci_valore_maggiore_0');\r\n                        this.responseModel.soggettiIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.soggettiMessage = message;\r\n            }\r\n\r\n            validationNumEtichetteLabel() {\r\n                let message;\r\n                let numEtichette = parseInt(this.responseModel.numEtichette);\r\n                if (this.responseModel.numEtichette == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.numEtichetteIsValid = false;\r\n                }\r\n                else if (numEtichette == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.numEtichetteIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.numEtichetteIsValid = true;\r\n                }\r\n\r\n                this.responseModel.numEtichetteMessage = message;\r\n            }\r\n\r\n            validationDiametroInternoAnimaLabel() {\r\n                let message;\r\n                let numDiametroInternoAnimaCustomer = this.responseModel.numDiametroInternoAnimaLabel;\r\n                let numDiametroInternoAnima = this.responseModel.numDiametroInternoAnimaEditabileLabel;\r\n\r\n                if (this.responseModel.numDiametroInternoAnimaLabel == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                }\r\n                else if (numDiametroInternoAnimaCustomer == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                }\r\n                else {\r\n\r\n                    if (numDiametroInternoAnimaCustomer >= numDiametroInternoAnima) {\r\n                        this.responseModel.DiametroInternoAnimaIsValid = true;\r\n                    }\r\n                    else {\r\n                        message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n                        message += \" \" + numDiametroInternoAnima;\r\n                        this.responseModel.DiametroInternoAnimaIsValid = false;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.DiametroInternoAnimaMessage = message;\r\n            }\r\n            validationDiametroMassimoEsternoAnimaLabel() {\r\n                let message;\r\n                let numDiametroMassimoEsternoCustomer = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n                let numDiametroMassimoEsterno = this.responseModel.numDiametroMassimoEsternoAnimaEditabile;\r\n                if (this.responseModel.numDiametroMassimoEsternoAnimaLabel == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                }\r\n                else if (numDiametroMassimoEsternoCustomer == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                }\r\n                else {\r\n\r\n                    if (numDiametroMassimoEsternoCustomer >= numDiametroMassimoEsterno) {\r\n                        this.responseModel.DiametroMassimoEsternoAnimaIsValid = true;\r\n                    }\r\n                    else {\r\n                        message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n                        message += \" \" + numDiametroMassimoEsterno;\r\n                        this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.DiametroMassimoEsternoAnimaMessage = message;\r\n            }\r\n\r\n\r\n            validationCopie() {\r\n                let message;\r\n\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    let numCopie = parseInt(this.responseModel.numCopie);\r\n                    let minCopie = this.responseModel.minimoCopie;\r\n                    let maxCopie = this.responseModel.massimoCopie;\r\n\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.copieMessage = message;\r\n            }\r\n\r\n\r\n\r\n            validationColori() {\r\n                let message;\r\n\r\n                if (this.responseModel.idColori1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.colori1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.colori1IsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.colori1 != null) {\r\n                    this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                if (this.responseModel.colori2 != null) {\r\n                    this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.colori1Message = message;\r\n            }\r\n\r\n            validationFormati() {\r\n                let message;\r\n\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.formatiMessage = message;\r\n            }\r\n\r\n            validationCarteInterno() {\r\n                let message;\r\n\r\n                if (this.responseModel.idCarte1 == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.carte1IsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1IsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.carte1 != null) {\r\n                    this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.carte1Message = message;\r\n            }\r\n\r\n            validationGrammatureCarteInterno() {\r\n                let message;\r\n                if (this.isLabelField()) {\r\n                    this.responseModel.grammature1IsValid = true;\r\n                }\r\n                else {\r\n                    if (this.responseModel.idGrammature1 == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.grammature1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.grammature1IsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.grammature1 != null) {\r\n                        this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n\r\n                this.responseModel.grammature1Message = message;\r\n            }\r\n\r\n            validationPlastificazione() {\r\n                let message;\r\n\r\n                if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n                    if (this.responseModel.isPlastificazioneRequired == true) {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.plastificazione1IsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.plastificazione1IsValid = true;\r\n                    }\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazione1IsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.plastificazioni1 != null) {\r\n                    this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.plastificazione1Message = message;\r\n            }\r\n\r\n            validationLavorazioneAccessoria() {\r\n                let message: string = \"\";\r\n                let valid: boolean = true;\r\n\r\n                for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        let qta = parseInt(lavorazione.value);\r\n                        let minQta = lavorazione.minQtaInput;\r\n                        let maxQta = lavorazione.maxQtaInput;\r\n\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            }\r\n\r\n            isLabelField() {\r\n                let result = false;\r\n                if (this.responseModel.subSection == \"Label\") {\r\n                    result = true;\r\n                }\r\n                return result\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n                let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                this.subManager.add(sub);\r\n\r\n                return message;\r\n            }\r\n\r\n            checkIsPlastificazioneInternoIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n                    result = true;\r\n                    if (this.responseModel.isPlastificazioneRequired == false) {\r\n                        if (this.responseModel.plastificazioni1.filter((x: any) => x.isVisible == true).length > 0) {\r\n                            result = true;\r\n                        }\r\n                        else {\r\n                            result = false;\r\n                        }\r\n                    }\r\n                }\r\n                return result;\r\n            }\r\n\r\n            checkIsTaglioIsShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.tagli != null && this.responseModel.tagli.length > 0) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isAttributeFixed(tipoLavorazione) {\r\n                let result: boolean = false;\r\n\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n            InputNumberCheck(event: any) {\r\n                let result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n                let result: boolean = false;\r\n                let isVisible: boolean = false;\r\n\r\n                for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsTaglioShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            onCategoriaCartaInternoFieldChanged() {\r\n                let selectedPaper = false;\r\n\r\n                for (let carte of this.responseModel.carte1) {\r\n                    if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n                        if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n                            if (selectedPaper == false) {\r\n                                this.responseModel.idCarte1 = carte.chiave;\r\n                                this.model.idCarte1 = carte.chiave;\r\n                                this.responseModel.carte1Description = carte.descrizione;\r\n                                this.responseModel.carte1Image = carte.image;\r\n                                this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                                this.responseModel.carte1ShowInfo = false;\r\n\r\n                                this.responseModel.grammature1 = carte.subElements;\r\n                                this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                                this.model.idGrammature1 = carte.wrap_valore;\r\n                                selectedPaper = true;\r\n                            }\r\n\r\n                            carte.isVisible = true;\r\n                        }\r\n                        else {\r\n                            carte.isVisible = false;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selectedPaper == false) {\r\n                            this.responseModel.idCarte1 = carte.chiave;\r\n                            this.model.idCarte1 = carte.chiave;\r\n                            this.responseModel.carte1Description = carte.descrizione;\r\n                            this.responseModel.carte1Image = carte.image;\r\n                            this.responseModel.carte1HasInfo = carte.hasInfo;\r\n                            this.responseModel.carte1ShowInfo = false;\r\n\r\n                            this.responseModel.grammature1 = carte.subElements;\r\n                            this.responseModel.idGrammature1 = carte.wrap_valore;\r\n                            this.model.idGrammature1 = carte.wrap_valore;\r\n                            selectedPaper = true;\r\n                        }\r\n\r\n                        carte.isVisible = true;\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onCartaInternoFieldChanged(isrules = false) {\r\n                for (let grammature of this.responseModel.carte1) {\r\n                    if (grammature.chiave == this.responseModel.idCarte1) {\r\n                        this.responseModel.carte1Description = grammature.descrizione;\r\n                        this.responseModel.carte1Image = grammature.image;\r\n                        this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n                        this.responseModel.carte1ShowInfo = false;\r\n                        this.responseModel.grammature1 = grammature.subElements;\r\n                        this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n                        this.model.idGrammature1 = grammature.wrap_valore;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onCartaInternoVisualFieldChanged(paperId) {\r\n                this.responseModel.idCarte1 = paperId;\r\n                this.onCartaInternoFieldChanged();\r\n            }\r\n\r\n            onFormatiChange(isrules = false) {\r\n                for (let formato of this.responseModel.formati) {\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onFormatiVisualChange(formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            }\r\n\r\n            onStampaInternoVisualChange(stampaInternoValue) {\r\n                this.responseModel.idColori1 = stampaInternoValue;\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onStampaRetroVisualChange(stampaCopertinaValue) {\r\n                this.responseModel.idColori2 = stampaCopertinaValue;\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n                this.responseModel.idGrammature1 = grammatureId;\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onPlastificationInternoChange(isrules = false) {\r\n                for (let plastification of this.responseModel.plastificazioni1) {\r\n                    if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n                        this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n                        this.responseModel.plastificazioni1Image = plastification.image;\r\n                        this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n                        this.responseModel.plastificazioni1ShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onPlastificationInternoViasualChange(plastificationId) {\r\n                this.responseModel.idPlastificazioni1 = plastificationId;\r\n                this.onPlastificationInternoChange();\r\n            }\r\n\r\n            lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            }\r\n\r\n            onTaglioChange(isrules = false) {\r\n                for (let taglio of this.responseModel.tagli) {\r\n                    if (taglio.chiave == this.responseModel.idTagli) {\r\n                        this.responseModel.taglioDescription = taglio.descrizione;\r\n                        this.responseModel.taglioImage = taglio.image;\r\n                        this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n                        this.responseModel.taglioShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onTaglioVisualChange(taglioId) {\r\n                this.responseModel.idTagli = taglioId;\r\n                this.onTaglioChange();\r\n            }\r\n\r\n            onFormatiTipoLabelChange() {\r\n                for (let formatoTipo of this.responseModel.TipologiaFormatiLabel) {\r\n                    if (formatoTipo.chiave == this.responseModel.idFormatoTipo) {\r\n                        this.responseModel.formatiTipoImage = formatoTipo.image;\r\n                        this.responseModel.formatiTipoHasInfo = formatoTipo.hasInfo;\r\n                        this.responseModel.formatiTipoLabelShowInfo = false;\r\n                        this.enableOrDisableAltezzaLabelByTipoFormato(formatoTipo.chiave)\r\n                    }\r\n                }\r\n                this.parameterValidation();\r\n            }\r\n\r\n            enableOrDisableAltezzaLabelByTipoFormato(tipoFormato) {\r\n                //checking tipo formato for anable or disable height\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    switch (tipoFormato) {\r\n                        case \"1\":\r\n                            this.enableAltezzaLabel = true;\r\n                            break;\r\n                        case \"2\":\r\n                            this.enableAltezzaLabel = false;\r\n                            this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n                            break;\r\n                        case \"3\":\r\n                            this.enableAltezzaLabel = false;\r\n                            this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n                            break;\r\n                        case \"4\":\r\n                            this.enableAltezzaLabel = true;\r\n                            break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            onFormatiTipoLabelVisualChange(fotmatoTipoId) {\r\n                this.responseModel.idFormatoTipo = fotmatoTipoId;\r\n                this.onFormatiTipoLabelChange();\r\n            }\r\n\r\n            onAvvolgimentiChange() {\r\n                for (let avvolgimento of this.responseModel.avvolgimentiLabel) {\r\n                    if (avvolgimento.chiave == this.responseModel.idAvvolgimento) {\r\n                        this.responseModel.avvolgimentiImage = avvolgimento.image;\r\n                        this.responseModel.avvolgimentiHasInfo = avvolgimento.hasInfo;\r\n                        this.responseModel.avvolgimentiShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                this.parameterValidation();\r\n            }\r\n\r\n            onAvvolgimentiVisualChange(avvolgimentoId) {\r\n                this.responseModel.idAvvolgimento = avvolgimentoId;\r\n                this.onAvvolgimentiChange();\r\n            }\r\n\r\n\r\n            showHideTaglioDescription() {\r\n                if (this.responseModel.taglioShowInfo) {\r\n                    this.responseModel.taglioShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.taglioShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideFormatDescription() {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            }\r\n            showHideFormatiTipoLabelDescription() {\r\n                if (this.responseModel.formatiTipoLabelShowInfo) {\r\n                    this.responseModel.formatiTipoLabelShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiTipoLabelShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideAvvolgimentiDescription() {\r\n                if (this.responseModel.avvolgimentiShowInfo) {\r\n                    this.responseModel.avvolgimentiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.avvolgimentiShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePaperInternoDescription() {\r\n                if (this.responseModel.carte1ShowInfo) {\r\n                    this.responseModel.carte1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.carte1ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePlastficationInternoDescription() {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            addToCartWizardCalcolato(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-etichette.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FormatiMultipliObj } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n    selector: \"dy-wizard-stampa-widget\",\r\n    template: \"\"\r\n})\r\n\r\n\r\nexport class WizardStampaComponent implements OnInit {\r\n    constructor\r\n        (\r\n            private _compiler: Compiler,\r\n            private componentHelper: ComponentHelperService,\r\n            private _elementRef: ViewContainerRef,\r\n            private _quotingService: QuotingService,\r\n            private authService: AuthService,\r\n            private languageService: LanguageService,\r\n            @Inject('isBrowser') private isBrowser: boolean\r\n        ) { }\r\n\r\n    @Input() resourceId: number;\r\n    autentification = this.authService.GetData();\r\n    private userId = this.authService.GetUserId();\r\n    lang: string = this.languageService.getLongLang();\r\n\r\n\r\n    subManager = new Subscription();\r\n\r\n    ngOnInit() {\r\n        if (!this.isBrowser)\r\n            return;\r\n\r\n        let sub = this._quotingService.getWizardStampaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n            //Creating subcomponent whith the selected template to inject\r\n            let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n            //injecting created component (OK)\r\n            this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n        });\r\n\r\n        this.subManager.add(sub);\r\n    }\r\n\r\n    ngOnDestroy() {\r\n        //Called once, before the instance is destroyed.\r\n        //Add 'implements OnDestroy' to the class.\r\n        this.subManager.unsubscribe();\r\n    }\r\n\r\n    private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n        @Component({\r\n            template: result.templateHtml\r\n        })\r\n\r\n        class ChildComponent implements OnInit {\r\n            constructor\r\n                (\r\n                    private _quotingService: QuotingService,\r\n                    private languageService: LanguageService,\r\n                    private authService: AuthService,\r\n                    private translate: TranslateService,\r\n                    private cartService: ShoppingCartService,\r\n                    private routesService: RoutesService,\r\n                    private bootboxService: BootboxService,\r\n                    @Inject('isBrowser') private isBrowser: boolean,\r\n                    public canvasService: CustomersCanvasService\r\n                ) {\r\n                //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n                const canvasSub = canvasService.isCanvasModalOpened$\r\n                    .subscribe(\r\n                        isModalOpened => {\r\n                            if (isModalOpened == false) {\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                            }\r\n                            else {\r\n                                // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n                                window.scrollTo(0, 0);\r\n                                $('html').css(\"overflow\", \"hidden\");\r\n                            }\r\n                        });\r\n\r\n                // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n                const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n                    .subscribe(\r\n                        isDesignApproved => {\r\n                            if (isDesignApproved) {\r\n                                $('#customerCanvasModal').modal('hide');\r\n                                $('html').css(\"overflow\", \"visible\");\r\n                                // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n                                cartService.setIfProductIsCanvasEdited(true);\r\n\r\n                                if (this.isCalculationTypeCalcolato()) {\r\n                                    this.addToCartWizardCalcolato(1);\r\n                                }\r\n                                else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                                    this.addToCartWizardCalcolatoScontistica(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListino()) {\r\n                                    this.addToCartWizardListino(1);\r\n                                }\r\n                                else if (this.isCalculationTypeListinoScontistica()) {\r\n                                    this.addToCartWizardListinoScontistica(1);\r\n                                }\r\n                            }\r\n                        });\r\n\r\n                this.subManager.add(canvasSub);\r\n                this.subManager.add(canvasEditedSub);\r\n            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n            private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n            private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n            private loggedIdUser: UserLogin;\r\n            waiting: boolean = false;\r\n            carteValue: number = -1;\r\n            lang: string = this.languageService.getLongLang();\r\n            responseModel: QuotingModel = new QuotingModel();\r\n            autentification = this.authService.GetData();\r\n            resourceId: number = InputresourceId;\r\n            isDataInitialized: boolean = false;\r\n            iShowHourForDay: boolean = false;\r\n            resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n            ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n            typePriceResult: string;\r\n            model = new wizardFormEditoriaModel();\r\n            currentRowIndex: number = -1;\r\n            currentColumnIndex: number = -1;\r\n            requestInfoSuccess: boolean = null;\r\n            resultCalculation: boolean = false;\r\n            showErrorMessage: boolean = false;\r\n            blockquoting: boolean = false;\r\n            listaFile: Array<FileCombinationModel>;\r\n            formatiMultipliList: Array<FormatiMultipliObj> = new Array<FormatiMultipliObj>();\r\n\r\n            isCalculatedWizard: boolean = false;\r\n\r\n            // sending info to a child component\r\n            public parentWidgetData: string = result.CanvasInfo;\r\n\r\n            subManager = new Subscription();\r\n\r\n            ngOnInit() {\r\n\r\n                var array = [\"1\", \"2\", \"3\"];\r\n                this.resultPrice.TablePriceList = new Array<any>();\r\n                this.resultPrice.TablePriceList.push(array);\r\n                this.resultPrice.TableScontisticaPriceList = new Array<Array<any>>();\r\n                this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n                this.loggedIdUser = this.authService.GetData();\r\n                this.responseModel = new QuotingModel();\r\n                this.responseModel = result;\r\n                this.responseModel.isTaglioVisible = false;\r\n                this.typePriceResult = \"no-tax\";\r\n                this.responseModel.valueStampaInternoSoloFronte = false;\r\n                this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n                this.ExcludingRules.setMacrocategory(\"STAMPA_DIRETTA\");\r\n                this.responseModel.isStampaBifaccialeNoHide = false;\r\n                this.responseModel.isStampaBifaccialeSiHide = false\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    this.aggiungiFormatoMultiplo(true);\r\n                }\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\r\n                setInterval(() => {\r\n                    if (this.isDataInitialized) {\r\n                        this.parameterValidation();\r\n                    }\r\n                }, 300000); //5 minutes\r\n                //this.parameterValidation();},60000); //1 minutes\r\n            }\r\n\r\n            checkFirstDayForHour(priceList: any) {\r\n                for (let priceRow of priceList) {\r\n                    var result = false;\r\n                    if (!priceRow.IsHour) {\r\n                        if (!this.iShowHourForDay) {\r\n                            this.iShowHourForDay = true;\r\n                            result = true;\r\n                        }\r\n                    }\r\n                    priceRow.iShowHourForDay = result;\r\n                }\r\n            }\r\n            aggiungiFormatoMultiplo(firstLoad = false) {\r\n                let fileObj = new FormatiMultipliObj();\r\n                let lastId = 0;\r\n                if (this.formatiMultipliList.length > 0) {\r\n                    lastId = this.formatiMultipliList.sort(x => x.Id).reverse()[0].Id;\r\n                }\r\n                fileObj.Id = (lastId + 1);\r\n                fileObj.Copie = 1;\r\n                fileObj.Width = parseFloat(this.responseModel.minimoBase + \"\");\r\n                fileObj.Height = parseFloat(this.responseModel.minimoAltezza + \"\");\r\n                fileObj.Name = this.getLabel('new_format');\r\n                this.formatiMultipliList.push(fileObj)\r\n                if (!firstLoad) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n            deleteFormatoMultiplo(id) {\r\n                this.formatiMultipliList.splice(this.formatiMultipliList.findIndex(e => e.Id === id), 1)\r\n            }\r\n            openCanvasEditor() {\r\n                if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n                    $('html').css(\"overflow\", \"hidden\");\r\n\r\n                    const canvasConfigData = this.setCanvasConfig();\r\n                    // because here we don't have a state id, it is a new product\r\n                    const isStateId = false;\r\n\r\n                    this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n                }\r\n            }\r\n\r\n            setCanvasConfig() {\r\n                const canvasConfigData = {\r\n                    CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n                    TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n                    CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n                    Watermark: result.CanvasInfo.WatermarkText\r\n                };\r\n\r\n                return canvasConfigData;\r\n            }\r\n\r\n            toShowCanvasButton() {\r\n                let toShow = false;\r\n                let isModuleActive = false;\r\n                let isUserLoggedIn = false;\r\n\r\n                if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n                    isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n                }\r\n\r\n                if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n                    isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n                }\r\n\r\n                toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n                return toShow;\r\n            }\r\n\r\n            CheckRegoleStampa() {\r\n                try {\r\n                    this.blockquoting = false;\r\n                    //save in the array all parameter value before to apply rules\r\n                    let oldFormato = this.responseModel.idFormati;\r\n                    let oldSupporto = this.responseModel.idSupportiRigidi;\r\n                    let oldTaglio = this.responseModel.idTagli;\r\n                    let lavAccArray = new Array<LavorazioniAccessorieModel>();\r\n\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                        if (lavorazione.tipo == \"2\") {\r\n                            lav.lavorazioneId = lavorazione.id;\r\n                            lav.valoreLavorazione = lavorazione.valore;\r\n                            lavAccArray.push(lav);\r\n                        }\r\n                    }\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //-----------------------------Reset delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n\r\n\r\n                    //Reset regole supporto rigido\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole stampa bifacciale\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole stampa bianco coprente\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole taglio\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n                    //Reset regole accessorie\r\n                    this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n\r\n                    //-----------------------------------------------------------------------------//\r\n                    //----------------------Applicazione delle regole------------------------------//\r\n                    //-----------------------------------------------------------------------------//\r\n\r\n\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", idFormato, 0, this.responseModel);\r\n                    }\r\n\r\n                    if (this.responseModel.tipoBifacciale == \"0\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"1\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.tipoBifacciale == \"1\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"2\", 0, this.responseModel);\r\n                    }\r\n\r\n\r\n                    if (this.responseModel.idBiancoCoprente == \"0\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"1\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.idBiancoCoprente == \"1\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"2\", 0, this.responseModel);\r\n                    }\r\n                    else if (this.responseModel.idBiancoCoprente == \"2\") {\r\n                        this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"3\", 0, this.responseModel);\r\n                    }\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n\r\n                    this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"STAMPA_DIRETTA\", this.responseModel);\r\n\r\n                    //if the old value id different to the new one i call the method for update description and image\r\n                    if (oldFormato != this.responseModel.idFormati) {\r\n                        this.onFormatiChange(true);\r\n                    }\r\n                    if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n                        this.onSuportoChange(true);\r\n                    }\r\n                    if (oldTaglio != this.responseModel.idTagli) {\r\n                        this.onTaglioChange(true);\r\n                    }\r\n                    let count = 0;\r\n                    for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                        count = 0;\r\n                        for (let lavorazioneOld of lavAccArray) {\r\n                            if (count > 0) {\r\n                                continue;\r\n                            }\r\n                            else {\r\n                                if (lavorazione.tipo == \"2\") {\r\n                                    if (lavorazione.isVisible == true) {\r\n                                        if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n                                            if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n                                                this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n                                                count++;\r\n                                            }\r\n                                        }\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                } catch (e) {\r\n                    this.blockquoting = true;\r\n                    this.showErrorMessage = true;\r\n                    return;\r\n                }\r\n            }\r\n\r\n            parameterValidation() {\r\n                this.iShowHourForDay = false;\r\n                this.isCalculatedWizard = false;\r\n                this.resultCalculation = false;\r\n                this.showErrorMessage = false;\r\n                this.requestInfoSuccess = null;\r\n\r\n                //apply all rules\r\n                this.CheckRegoleStampa();\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    //check id all data into formatimultipli list is setted\r\n                    this.validationFormatiMultipli();\r\n                }\r\n                else {\r\n                    //verify validation for all  parameters \r\n                    this.validationCopie();\r\n                    this.validationFormati();\r\n                    if (this.responseModel.idFormati == \"0\") {\r\n                        this.validationBaseFormati();\r\n                        this.validationAltezzaFormati();\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                    if (this.responseModel.soggettiMultipli == true) {\r\n                        this.validationSoggetti();\r\n                    }\r\n                    else {\r\n                        this.responseModel.soggettiIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.countTagli();\r\n                this.countBiancoCoprente();\r\n\r\n                this.validationSupporti();\r\n                this.validationLavorazioneAccessoria();\r\n                if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n                    this.selectFileCombination();\r\n                }\r\n                //if all parameters are validated  call a method who getting price\r\n                if (this.checkValidation()) {\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    this.getCalculationModel();\r\n                }\r\n                else {\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = true;\r\n                }\r\n            }\r\n\r\n            countTagli() {\r\n                if (this.responseModel.tagli != null) {\r\n                    this.responseModel.tagliCount = this.responseModel.tagli.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            countBiancoCoprente() {\r\n                if (this.responseModel.biancoCoprente != null) {\r\n                    this.responseModel.biancoCoprenteCount = this.responseModel.biancoCoprente.filter(x => x.isVisible == true).length;\r\n                }\r\n            }\r\n\r\n            selectFileCombination() {\r\n\r\n                this.listaFile = new Array<FileCombinationModel>()\r\n                for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n\r\n                    if (this.responseModel.idFormati != null) {\r\n\r\n                        var data = this.responseModel.idFormati.split(\"_\");\r\n                        let idFormato = data[0];\r\n                        if (file.FormatId == idFormato) {\r\n\r\n                            let fileObj = new FileCombinationModel();\r\n                            fileObj.PathFile = file.PathFile;\r\n                            if (file.NomeFile == null || file.NomeFile == \"\") {\r\n                                fileObj.NomeFile = file.FileName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeFile = file.NomeFile;\r\n                            }\r\n                            fileObj.PathIstruzioni = file.PathIstruzioni;\r\n                            if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n                                fileObj.NomeIstruzioni = file.FileIstructionName;\r\n                            }\r\n                            else {\r\n                                fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n                            }\r\n                            this.listaFile.push(fileObj)\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            checkZero(val) {\r\n                if (val == \"\" || val == null) {\r\n                    return \"0\";\r\n                }\r\n                else {\r\n                    return val;\r\n                }\r\n            }\r\n\r\n            setTypePriceResult(type) {\r\n                this.typePriceResult = type;\r\n                if (type == \"tax\") {\r\n                    $(\"#btnNoIva\").removeClass(\"active\");\r\n                    $(\"#btnIva\").addClass(\"active\");\r\n                }\r\n                else {\r\n                    $(\"#btnNoIva\").addClass(\"active\");\r\n                    $(\"#btnIva\").removeClass(\"active\");\r\n                }\r\n            }\r\n            setListinoScontisticaPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            setListinoPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n                this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n                this.setPriceResult(price);\r\n            }\r\n            isRowSelected(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelected(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelected(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex + 1) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            clearSelectedIndex() {\r\n                this.currentRowIndex = -1;\r\n                this.currentColumnIndex = -1;\r\n            }\r\n\r\n            isRowSelectedListino(rowIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isColumnSelectedListino(columnIndex: number) {\r\n                let result: boolean = false;\r\n\r\n                if ((columnIndex) == this.currentColumnIndex) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n                this.currentRowIndex = rowIndex;\r\n                this.currentColumnIndex = columnIndex;\r\n            }\r\n\r\n            // Create model for passed in input to the calculation method\r\n            getCalculationModel() {\r\n                this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n                this.model.tipoCopie = this.responseModel.tipoCopie;\r\n                this.model.isFormatoMultiploEnabled = this.responseModel.isFormatiMultiliEnabled;\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                if (this.responseModel.tipoCopie != 'libera') {\r\n                    this.model.idCopie = this.responseModel.idCopie;\r\n                }\r\n                else {\r\n                    this.model.numCopie = this.responseModel.numCopie;\r\n                }\r\n\r\n                this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n                this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n                this.model.StrCustomerId = this.authService.GetUserId();\r\n                this.model.wizardId = this.resourceId;\r\n                this.model.idFormati = this.responseModel.idFormati;\r\n\r\n                if (this.responseModel.idFormati == \"0\") {\r\n                    this.model.baseFormato = this.responseModel.baseFormato;\r\n                    this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n                }\r\n\r\n                this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n\r\n                if (this.responseModel.stampaBifacciale == 1) {\r\n                    this.model.tipoBifacciale = this.responseModel.tipoBifacciale;\r\n                }\r\n                else {\r\n                    this.model.tipoBifacciale = \"0\";\r\n                }\r\n\r\n                if (this.responseModel.biancoCoprente != null && this.responseModel.biancoCoprente.length > 0) {\r\n                    this.model.idBiancoCoprente = this.responseModel.idBiancoCoprente;\r\n                }\r\n                else {\r\n                    this.model.idBiancoCoprente = \"0\";\r\n                }\r\n\r\n                if (this.responseModel.idTagli != \"-1\") {\r\n                    this.model.idTagli = this.responseModel.idTagli;\r\n                }\r\n                this.model.listaFormatiMultipli = this.formatiMultipliList;\r\n                this.model.lavorazioniAccessorie = new Array<LavorazioniAccessorieModel>();\r\n\r\n                for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n                    let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n                    if (lavorazioneAccessoria.isVisible == true) {\r\n                        //checkbox\r\n                        if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n                                lavorazione.valoreLavorazione = \"1\";\r\n                            }\r\n                            else {\r\n                                lavorazione.valoreLavorazione = \"0\";\r\n                            }\r\n                        }\r\n                        //combo\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n                            if (lavorazioneAccessoria.valore != \"-1\") {\r\n                                if (lavorazioneAccessoria.valore != \"0\") {\r\n                                    lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                        //numeric\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n                            if (lavorazioneAccessoria.value != null) {\r\n                                lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                                if (lavorazioneAccessoria.value != \"0\") {\r\n                                    lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                                }\r\n                            }\r\n                        }\r\n                        //text area\r\n                        else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n                            lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n                            lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n                        }\r\n                        if (lavorazione.lavorazioneId != null) {\r\n                            this.model.lavorazioniAccessorie.push(lavorazione);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n                if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n                    let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n                        this.resultPrice = result;\r\n                        this.isCalculatedWizard = true;\r\n\r\n                        if (this.isCalculationTypeCalcolatoScontistica()) {\r\n                            var scontisticaTable = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(scontisticaTable);\r\n                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                //Selecting the last available day result. (The cheapest)\r\n                                for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n                                    let price = scontisticaTable[i];\r\n                                    if (price.Price != -1) {\r\n                                        this.setPriceResult(price);\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListinoScontistica()) {\r\n                            //Selecting first element\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n                            let breakFlag = false;\r\n                            for (let priceRow of tableScontisticaPriceListSliced) {\r\n                                let slicedPriceRow = priceRow.slice(1);\r\n                                this.checkFirstDayForHour(slicedPriceRow);\r\n\r\n                                //reverse the obj for select the last data and first price available\r\n                                var reverse = slicedPriceRow.reverse();\r\n                                for (let price of reverse) {\r\n                                    if (price.Price != -1) {\r\n                                        this.setListinoScontisticaPriceResult(price);\r\n                                        breakFlag = true;\r\n                                        break;\r\n                                    }\r\n                                }\r\n\r\n                                if (breakFlag == true) {\r\n                                    break;\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (this.isCalculationTypeListino()) {\r\n                            let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n                            this.checkFirstDayForHour(tableScontisticaPriceListSliced);\r\n                            if (tableScontisticaPriceListSliced.length > 0) {\r\n                                let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n                                if (slicedPriceRow.Price != -1) {\r\n                                    this.setListinoPriceResult(slicedPriceRow);\r\n                                }\r\n                            }\r\n                        }\r\n\r\n                        this.resultCalculation = true;\r\n                        this.showErrorMessage = false\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    },\r\n                        err => {\r\n                            this.isCalculatedWizard = true;\r\n                            this.showErrorMessage = true;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n                else {\r\n                    this.resultCalculation = true;\r\n                    this.showErrorMessage = false;\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                }\r\n\r\n                this.isDataInitialized = true;\r\n\r\n            }\r\n\r\n            ngAfterViewInit() {\r\n                if (!this.isBrowser || this.pageIsInit) {\r\n                    return;\r\n                }\r\n\r\n                $('#quotingFormLoader').hide();\r\n                var $wrapper = $('#listWizard');\r\n\r\n                $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n                    return +a.dataset.order - +b.dataset.order;\r\n                }).appendTo($wrapper);\r\n\r\n                let altezza = $(\"#footer\").outerHeight();\r\n                let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n                let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n                altezza += margintop;\r\n                altezza += paddingntop;\r\n\r\n                let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n                let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n                let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n                altezza += altezza1;\r\n                altezza += margintop1;\r\n                altezza += paddingntop1;\r\n\r\n                let altezzaHead = $(\".header-body\").outerHeight();\r\n                let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n                let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n                altezzaHead += margintopHead;\r\n                altezzaHead += paddingntopHead;\r\n\r\n                $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n                $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n                this.pageIsInit = true;\r\n            }\r\n\r\n            checkValidation() {\r\n                if (this.responseModel.isFormatiMultiliEnabled) {\r\n                    if (this.responseModel.formatiMultipliIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.supportoIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.copieIsValid\r\n                        && this.responseModel.formatiIsValid\r\n                        && this.responseModel.lavorazioniIsValid\r\n                        && this.responseModel.baseFormatoIsValid\r\n                        && this.responseModel.altezzaFormatoIsValid\r\n                        && this.responseModel.soggettiIsValid\r\n                        && this.responseModel.supportoIsValid\r\n                    ) {\r\n                        return true;\r\n                    }\r\n                    else {\r\n                        return false;\r\n                    }\r\n                }\r\n            }\r\n\r\n            validationBaseFormati() {\r\n                let message;\r\n                let base = parseFloat(this.responseModel.baseFormato.replace(\",\", \".\"))\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base >= minBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base >= minBase) && (base <= maxBase)) {\r\n                            this.responseModel.baseFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                            this.responseModel.baseFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (base <= 0 || this.responseModel.baseFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.baseFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.baseFormatoIsValid = true;\r\n                    }\r\n                }\r\n                this.responseModel.baseFormatoMessage = message;\r\n            }\r\n\r\n            validationAltezzaFormati() {\r\n                let message;\r\n                let altezza = parseFloat(this.responseModel.altezzaFormato.replace(\",\", \".\"))\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if ((altezza >= minAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n                            this.responseModel.altezzaFormatoIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                            this.responseModel.altezzaFormatoIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + 0;\r\n                        this.responseModel.altezzaFormatoIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.altezzaFormatoIsValid = true;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.altezzaFormatoMessage = message;\r\n            }\r\n\r\n            validationSoggetti() {\r\n                let message;\r\n                let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n                if (this.responseModel.numSoggetti == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else if (numSoggetti == 0) {\r\n                    message = this.getLabel('inserisci_valore_maggiore_0');\r\n                    this.responseModel.soggettiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.soggettiIsValid = true;\r\n                }\r\n\r\n                this.responseModel.soggettiMessage = message;\r\n            }\r\n\r\n            validationCopie() {\r\n                let message;\r\n\r\n                if (this.responseModel.tipoCopie == 'libera') {\r\n                    let numCopie = parseInt(this.responseModel.numCopie);\r\n                    let minCopie = this.responseModel.minimoCopie;\r\n                    let maxCopie = this.responseModel.massimoCopie;\r\n                    if (this.responseModel.numCopie == null) {\r\n                        message = this.getLabel('inserisci_valore_valido');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else if (maxCopie == 0) {\r\n                        if (numCopie < minCopie) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                        else {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n                            this.responseModel.copieIsValid = true;\r\n                        }\r\n                        else {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minCopie;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxCopie;\r\n                            this.responseModel.copieIsValid = false;\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    if (this.responseModel.idCopie == \"-1\") {\r\n                        message = this.getLabel('mandatory_field');\r\n                        this.responseModel.copieIsValid = false;\r\n                    }\r\n                    else {\r\n                        this.responseModel.copieIsValid = true;\r\n                    }\r\n\r\n                    if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n                        this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.copieMessage = message;\r\n            }\r\n\r\n            validationFormati() {\r\n                let message;\r\n\r\n                if (this.responseModel.idFormati == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.formatiIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.formati != null) {\r\n                    this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.formatiMessage = message;\r\n            }\r\n\r\n\r\n            validationBaseFormatiMultipli(baseInput) {\r\n\r\n                let message = \"\";\r\n                let base = parseFloat(baseInput)\r\n                let minBase = this.responseModel.minimoBase;\r\n                let maxBase = this.responseModel.massimoBase;\r\n                if (base <= 0 || baseInput == \"\" || baseInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minBase > 0 || maxBase > 0) {\r\n                    if (minBase > 0 && maxBase == 0) {\r\n                        if ((base < minBase)) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minBase;\r\n                        }\r\n                    }\r\n                    else if (minBase == 0 && maxBase > 0) {\r\n                        if ((base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n\r\n                    }\r\n                    else if (minBase > 0 && maxBase > 0) {\r\n                        if ((base < minBase) || (base > maxBase)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minBase;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxBase;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n\r\n            validationAltezzaFormatiMultipli(altezzaInput) {\r\n                let message = \"\";\r\n                let altezza = parseFloat(altezzaInput)\r\n                let minAltezza = this.responseModel.minimoAltezza;\r\n                let maxAltezza = this.responseModel.massimoAltezza;\r\n                if (altezza <= 0 || altezzaInput == \"\" || altezzaInput == null) {\r\n                    message = this.getLabel('inserisci_valore_maggiore');\r\n                    message += \" \" + 0;\r\n                }\r\n                else if (minAltezza > 0 || maxAltezza > 0) {\r\n                    if (minAltezza > 0 && maxAltezza == 0) {\r\n                        if (altezza < minAltezza) {\r\n                            message = this.getLabel('inserisci_valore_maggiore');\r\n                            message += \" \" + minAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza == 0 && maxAltezza > 0) {\r\n                        if ((altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                    else if (minAltezza > 0 && maxAltezza > 0) {\r\n                        if ((altezza < minAltezza) || (altezza > maxAltezza)) {\r\n                            message = this.getLabel('inserisci_valore_compreso_tra');\r\n                            message += \" \" + minAltezza;\r\n                            message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                            message += \" \" + maxAltezza;\r\n                        }\r\n                    }\r\n                }\r\n                return message;\r\n            }\r\n            validationCopieFormatiMultipli(copieInput) {\r\n                let message = \"\";\r\n                let numCopie = parseInt(copieInput);\r\n                let minCopie = this.responseModel.minimoCopie;\r\n                let maxCopie = this.responseModel.massimoCopie;\r\n                if (numCopie <= 0 || copieInput == \"\" || copieInput == null) {\r\n                    message = this.getLabel('inserisci_valore_valido');\r\n                }\r\n                else if (maxCopie == 0) {\r\n                    if (numCopie < minCopie) {\r\n                        message = this.getLabel('inserisci_valore_maggiore');\r\n                        message += \" \" + minCopie;\r\n                    }\r\n                }\r\n                else {\r\n                    if ((numCopie < minCopie) || (numCopie > maxCopie)) {\r\n                        message = this.getLabel('inserisci_valore_compreso_tra');\r\n                        message += \" \" + minCopie;\r\n                        message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                        message += \" \" + maxCopie;\r\n                    }\r\n                }\r\n\r\n                return message;\r\n            }\r\n            validationFormatiMultipli() {\r\n                this.responseModel.formatiMultipliIsValid = true;\r\n                console.log(this.formatiMultipliList)\r\n                this.formatiMultipliList.forEach(x => {\r\n                    var copieMessage = this.validationCopieFormatiMultipli(x.Copie);\r\n\r\n                    if (copieMessage == \"\") {\r\n                        x.copieIsValid = true;\r\n                        x.copieMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.copieIsValid = false;\r\n                        x.copieMessage = copieMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n\r\n                    var heighMessage = this.validationAltezzaFormatiMultipli(x.Height);\r\n                    if (heighMessage == \"\") {\r\n                        x.heightIsValid = true;\r\n                        x.heightMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.heightIsValid = false;\r\n                        x.heightMessage = heighMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                    var widthMessage = this.validationBaseFormatiMultipli(x.Width);\r\n                    if (widthMessage == \"\") {\r\n                        x.widthIsValid = true;\r\n                        x.widthMessage = \"\";\r\n                    }\r\n                    else {\r\n                        x.widthIsValid = false;\r\n                        x.widthMessage = widthMessage;\r\n                        this.responseModel.formatiMultipliIsValid = false;\r\n                    }\r\n                });\r\n\r\n            }\r\n\r\n            validationSupporti() {\r\n                let message;\r\n\r\n                if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.supportoIsValid = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoIsValid = true;\r\n                }\r\n\r\n                if (this.responseModel.supportiRigidi != null) {\r\n                    this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(x => x.isVisible == true).length;\r\n                }\r\n\r\n                this.responseModel.supportoMessage = message;\r\n            }\r\n\r\n            validationLavorazioneAccessoria() {\r\n                let message: string = \"\";\r\n                let valid: boolean = true;\r\n\r\n                for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n                        if (lavorazione.obbligatorio == true) {\r\n                            if (lavorazione.valore == \"-1\") {\r\n                                message = this.getLabel('mandatory_field');\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    //check min qta  and max qta  for input field\r\n                    if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n                        let qta = parseInt(lavorazione.value);\r\n                        let minQta = lavorazione.minQtaInput;\r\n                        let maxQta = lavorazione.maxQtaInput;\r\n\r\n                        if (lavorazione.value == null) {\r\n                            message = this.getLabel('inserisci_valore_valido');\r\n                            lavorazione.isValid = false;\r\n                            valid = false;\r\n                        }\r\n                        else if (maxQta == 0) {\r\n                            if (qta < minQta) {\r\n                                message = this.getLabel('inserisci_valore_maggiore');\r\n                                message += \" \" + minQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                            else {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                        }\r\n                        else {\r\n                            if ((qta >= minQta) && (qta <= maxQta)) {\r\n                                lavorazione.isValid = true;\r\n                            }\r\n                            else {\r\n                                message = this.getLabel('inserisci_valore_compreso_tra');\r\n                                message += \" \" + minQta;\r\n                                message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n                                message += \" \" + maxQta;\r\n                                lavorazione.isValid = false;\r\n                                valid = false;\r\n                            }\r\n                        }\r\n                        lavorazione.lavorazioneMessage = message;\r\n                    }\r\n                    if (lavorazione.valori != null) {\r\n                        lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n                    }\r\n                }\r\n\r\n                this.responseModel.lavorazioniIsValid = valid;\r\n            }\r\n\r\n            getLabel(label) {\r\n                let message;\r\n\r\n\r\n                let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n                    message = res;\r\n                });\r\n\r\n                this.subManager.add(sub);\r\n\r\n                return message;\r\n            }\r\n\r\n\r\n            isAttributeFixed(tipoLavorazione) {\r\n                let result: boolean = false;\r\n\r\n                if (tipoLavorazione == 'fisso') {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 1 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 6 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n            textAreaCheck(event: any) {\r\n                if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            }\r\n\r\n            InputNumberCheck(event: any) {\r\n                let result = false;\r\n                if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 44 || event.keyCode == 46)) {\r\n                    result = true;\r\n                }\r\n                return result;\r\n            }\r\n            checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n                let result: boolean = false;\r\n                let isVisible: boolean = false;\r\n\r\n                for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n                    if (lavorazioniAccessorie.id == lavId) {\r\n                        isVisible = lavorazioniAccessorie.isVisible;\r\n                    }\r\n                }\r\n\r\n                if (tipo == 2 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n                let result: boolean = false;\r\n\r\n                if (tipo == 5 && isVisible) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            onFormatiChange(isrules = false) {\r\n                for (let formato of this.responseModel.formati) {\r\n                    if (formato.chiave == this.responseModel.idFormati) {\r\n                        this.responseModel.formatoDescription = formato.descrizione;\r\n                        this.responseModel.formatoImage = formato.image;\r\n                        this.responseModel.formatiHasInfo = formato.hasInfo;\r\n                        this.responseModel.formatiShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onFormatiVisualChange(formatId) {\r\n                this.responseModel.idFormati = formatId;\r\n                this.onFormatiChange();\r\n            }\r\n\r\n            onSuportoChange(isrules = false) {\r\n                for (let supporto of this.responseModel.supportiRigidi) {\r\n                    if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n                        this.responseModel.supportoDescription = supporto.descrizione;\r\n                        this.responseModel.supportoImage = supporto.image;\r\n                        this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n                        this.responseModel.supportoShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onSuportoVisualChange(supportoId) {\r\n                this.responseModel.idSupportiRigidi = supportoId;\r\n                this.onSuportoChange();\r\n            }\r\n\r\n            onTaglioChange(isrules = false) {\r\n                for (let taglio of this.responseModel.tagli) {\r\n                    if (taglio.chiave == this.responseModel.idTagli) {\r\n                        this.responseModel.taglioDescription = taglio.descrizione;\r\n                        this.responseModel.taglioImage = taglio.image;\r\n                        this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n                        this.responseModel.taglioShowInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            onTaglioVisualChange(taglioId) {\r\n                this.responseModel.idTagli = taglioId;\r\n                this.onTaglioChange();\r\n            }\r\n\r\n\r\n            lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n                for (let variante of lavorazione.valori) {\r\n                    if (lavorazione.valore == variante.chiave) {\r\n                        lavorazione.description = variante.descrizione;\r\n                        lavorazione.image = variante.image;\r\n                        lavorazione.hasInfo = variante.hasInfo;\r\n                        lavorazione.showInfo = false;\r\n                    }\r\n                }\r\n\r\n                if (isrules == false) {\r\n                    this.parameterValidation();\r\n                }\r\n            }\r\n\r\n            lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n                lavorazione.valore = lavorazioneId;\r\n                this.lavorazioniAccessorieComboChange(lavorazione);\r\n            }\r\n\r\n            checkIsBifaccialeShowed() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.stampaBifacciale == 1 &&\r\n                    (this.responseModel.isStampaBifaccialeNoHide == false || this.responseModel.isStampaBifaccialeSiHide == false)) {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n\r\n            showHideLavDescription(lavorazione) {\r\n                if (lavorazione.showInfo) {\r\n                    lavorazione.showInfo = false;\r\n                }\r\n                else {\r\n                    lavorazione.showInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideFormatDescription() {\r\n                if (this.responseModel.formatiShowInfo) {\r\n                    this.responseModel.formatiShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.formatiShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHideSupportoDescription() {\r\n                if (this.responseModel.supportoShowInfo) {\r\n                    this.responseModel.supportoShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.supportoShowInfo = true;\r\n                }\r\n            }\r\n\r\n            showHidePlastficationInternoDescription() {\r\n                if (this.responseModel.plastificazioni1ShowInfo) {\r\n                    this.responseModel.plastificazioni1ShowInfo = false;\r\n                }\r\n                else {\r\n                    this.responseModel.plastificazioni1ShowInfo = true;\r\n                }\r\n            }\r\n\r\n            isCalculationTypeCalcolato() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeCalcolatoQuotigPrev() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListino() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            isCalculationTypeListinoScontistica() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n                    result = true;\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            addToCartWizardCalcolato(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    this.getCalculationModel();\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListino(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            addToCartWizardListinoScontistica(quantityId: number) {\r\n                let wizardId = this.resourceId;\r\n\r\n                this.resultCalculation = false;\r\n                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var colType = this.resultPrice.IsHour == true ? \"H\" : \"D\";\r\n                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, colType).subscribe(result => {\r\n                    this.cartService.updateCart(result);\r\n                    $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                    this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n                    this.resultCalculation = true;\r\n                },\r\n                    err => {\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.bootboxService.i18nAlert(\"errorMex\");\r\n                        this.resultCalculation = true;\r\n                    }\r\n                );\r\n\r\n                this.subManager.add(sub);\r\n            }\r\n\r\n            setPriceResult(price: any) {\r\n                if (price.Price == -1) {\r\n                    return;\r\n                }\r\n\r\n                //Deselecting the current price and selected the one passed in input\r\n                for (let prices of this.resultPrice.TablePriceList) {\r\n                    prices.IsSelected = false;\r\n                }\r\n\r\n                price.IsSelected = true;\r\n\r\n                this.resultPrice.Currency = price.Currency;\r\n                this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n                this.resultPrice.DataId = price.DayId;\r\n                this.resultPrice.DayName = price.DayName;\r\n                this.resultPrice.DayNumber = price.DayNumber;\r\n                this.resultPrice.QuantityID = price.QuantityId;\r\n                this.resultPrice.Quantity = price.Quantity;\r\n                this.resultPrice.IsHour = price.IsHour;\r\n                this.resultPrice.TimePickup = price.TimePickup;\r\n\r\n\r\n                this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n                this.resultPrice.Iva = price.StrIva;\r\n                this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n                this.resultPrice.TotalAmount = price.Total;\r\n                this.resultPrice.Weight = price.StrWeight;\r\n                this.resultPrice.WeightUm = price.StrWeightUm;\r\n                this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n                this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n            }\r\n\r\n            isCustomerLoggedIn() {\r\n                return this.loggedIdUser.isAuthenticated;\r\n            }\r\n\r\n            checkEmailIsValid() {\r\n                var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n                if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n                    this.model.isRichiestaEmailValid = false;\r\n                }\r\n                else {\r\n                    this.model.isRichiestaEmailValid = true;\r\n                }\r\n            }\r\n\r\n            checkFormRichiestaPrevIsValid() {\r\n                let result: boolean = false;\r\n\r\n                if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaName != \"\"\r\n                        && this.model.richiestaSubName != \"\"\r\n                        && this.model.isRichiestaEmailValid\r\n                        && this.model.richiestaTelephone != \"\"\r\n                        && this.model.richiestaJobname != \"\"\r\n                        && this.model.richiestaCondizioni) {\r\n                        result = true;\r\n                    }\r\n                }\r\n                else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n                    if (this.model.richiestaJobname != \"\") {\r\n                        result = true;\r\n                    }\r\n                }\r\n\r\n                return result;\r\n            }\r\n\r\n            sendRequestInfo() {\r\n                if (this.checkFormRichiestaPrevIsValid()) {\r\n                    this.resultCalculation = false;\r\n                    $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                    let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n                        if (result == true) {\r\n                            this.requestInfoSuccess = true;\r\n                        }\r\n                        else {\r\n                            this.requestInfoSuccess = false;\r\n                        }\r\n                        $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                        this.resultCalculation = true;\r\n\r\n                    },\r\n                        err => {\r\n                            this.requestInfoSuccess = false;\r\n                            $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n                            this.resultCalculation = true;\r\n                        }\r\n                    );\r\n\r\n                    this.subManager.add(sub);\r\n                }\r\n            }\r\n            ngAfterViewChecked() {\r\n                if (!this.isBrowser || this.pageIsInitAfter) {\r\n                    return;\r\n                }\r\n                layoutTheme.initToggle();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n            ngOnDestroy() {\r\n                //Called once, before the instance is destroyed.\r\n                //Add 'implements OnDestroy' to the class.\r\n                this.subManager.unsubscribe();\r\n            }\r\n        }\r\n\r\n        return ChildComponent;\r\n    }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-stampa.component.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { CategoryComponent } from './category.component';\r\n\r\n\r\n@NgModule({\r\n  imports: [\r\n    SharedModule\r\n  ],\r\n  declarations: [\r\n    CategoryComponent\r\n  ]\r\n})\r\n\r\nexport class InventoryCategoryModule { }\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/category/sys/inventory-category.module.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { OtherProductComponent } from './other-product.component';\r\nimport { ProductPageListComponent } from './product-page-list.component';\r\nimport { PromotionsComponent } from './promotions.component';\r\nimport { ProductDetailsComponent } from './product-details.component';\r\n\r\n\r\n@NgModule({\r\n  imports: [\r\n    SharedModule\r\n  ],\r\n  declarations: [\r\n    OtherProductComponent,\r\n    ProductPageListComponent,\r\n    PromotionsComponent,\r\n    ProductDetailsComponent\r\n  ]\r\n})\r\nexport class InventoryProductModule { }\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/inventory-product.module.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { RegisterComponent } from './register.component';\r\n\r\n\r\n@NgModule({\r\n  imports: [\r\n    SharedModule\r\n  ],\r\n  declarations: [\r\n    RegisterComponent\r\n  ]\r\n})\r\n\r\nexport class SettingsModule { }\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/settings.module.ts","export class Breadcrumbs{\r\n    BreadcrumbName: string;\r\n    BreadcrumbLink: string;\r\n    Level: number;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/breadcrumbs.ts","export class InfoRequest {\r\n    public Email: string;\r\n    public Address: string;\r\n    public Message: string;\r\n    public RefererName: string;\r\n    public Telephone: string;\r\n    public City: string;\r\n    public Where: string;\r\n    public Company: string;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/info-request.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n//Models\r\nimport { ClientAreaUserProfile } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaDetails } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaUserAddress } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaOrderDetails } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessFile } from \"./../../models/settings/client-area\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\n\r\n@Injectable()\r\nexport class ClientAreaService {\r\n  constructor(\r\n    public _api: ApiService, \r\n    public _cache: CacheService,\r\n    private languageService: LanguageService,\r\n    private currencyService: CurrencyService,\r\n    private mappings: Mappings,\r\n    private ShoppingCartService: ShoppingCartService) {\r\n  }\r\n\r\n  getDetailsClientArea(id: string) {\r\n\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let lang = this.languageService.getLongLang();\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Details.replace('{id}', id.toString()).replace('{lang}', lang).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n  getUserAreaProfile(userId: string) {\r\n\r\n    let lang = this.languageService.getLongLang();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Client_Area_User_Profile.replace('{userId}', userId).replace('{lang}', lang).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n \r\nupdateUserPassword(param: any) {\r\n\r\n    param.Language = this.languageService.getLongLang();\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Password, param)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  updateUserProfile(collection: any) {\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Profile, collection)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  addNewAddress(param: any) {\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Client_Area_Add_New_Address, param)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  updateAddresses(addresses: ClientAreaUserAddress[], userId: string, defaultAddress: number) {\r\n    var param = {\r\n      Addresses: addresses,\r\n      UserId: userId,\r\n      DefaultAddress: defaultAddress\r\n    }\r\n    return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Address, param)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  removeAddress(param: any) {\r\n    return this._api.post(this.mappings.Web_Api_Post_Client_Area_Remove_Address, param)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  getClientAreaOrderDetails(userId: string, orderId: number) {\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let lang: string = this.languageService.getLongLang();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Order_Details.replace('{userId}', userId).replace('{orderId}', orderId.toString()).replace('{lang}', lang).replace('{currency}', curr).replace(\"{cartid}\", cartId);\r\n    let key = url;\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n  getClientAreaCatalogPrivate(userId: string) {\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let lang: string = this.languageService.getLongLang();\r\n    let curr = this.currencyService.getCurrency();\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Catalog_Private\r\n    .replace('{userId}', userId)\r\n    .replace('{lang}', lang)\r\n    .replace('{currency}', curr)\r\n    .replace(\"{cartid}\", cartId);\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n\r\n\r\n  getClientAreaOrdersList(userId: number, dateFrom: Date, dateTo: Date, orderNumber: string, orderStatus: string) {\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId.toString()).replace('{dateFrom}', dateFrom.toTimeString()).replace('{dateTo}', dateTo.toTimeString()).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{currency}', curr);\r\n    let key = url;\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n    getClientAreaOrdersList1(userId: string, dateFrom: string, dateTo: string, orderNumber: string, orderStatus: string) {\r\n\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n    let curr = this.currencyService.getCurrency();\r\n    let lang: string = this.languageService.getLongLang();\r\n      \r\n    let url = this.mappings.Web_Api_Get_Client_Area_Order_List\r\n    .replace('{userId}', userId).replace('{dateFrom}', dateFrom)\r\n    .replace('{dateTo}', dateTo).replace('{orderNumber}', orderNumber)\r\n    .replace('{orderStatus}', orderStatus).replace('{lang}', lang)\r\n    .replace('{currency}', curr).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n  getClientAreaRiorderList(orderId:any) {\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n    let lang: string = this.languageService.getLongLang();\r\n      \r\n    let url = this.mappings.Web_Api_Get_Client_Area_Riorder_List\r\n    .replace('{orderid}', orderId)\r\n    .replace('{lang}', lang)\r\n    .replace('{currency}', curr);\r\n    let key = url;\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n  \r\n  CalculatePriceRiorder(lavorazioneQuery: string, prodId: number) {\r\n    // let parameter: Array<any> = [];\r\n    let lang: string = this.languageService.getLongLang();\r\n    var dictionary = {\r\n      \"lang\": lang,\r\n      \"query\": lavorazioneQuery,\r\n      \"wizardId\": prodId,\r\n    };\r\n    return this._api.post(this.mappings.Web_Api_Get_Client_Area_CalculatePrice_Riorder, dictionary)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  getClientAreaInvoicesList(userId: string, orderNumber: string, invoiceNumber: string, documentType: string) {\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n    let lang: string = this.languageService.getLongLang();\r\n    let cartId = this.ShoppingCartService.getCartId();\r\n      \r\n    let url = this.mappings.Web_Api_Get_Client_Area_Invoices.replace('{userId}', userId).replace('{orderNumber}', orderNumber).replace('{invoiceNumber}', invoiceNumber).replace('{documentType}', documentType).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n    let key = url;\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n  postClientAreaSendProcessOrderMessageint(userId: string, orderId: number, orderRowId: number, orderNumber: string, sendTo: string, messageObject: string, message: string, lang: string) {\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Order_Send_Message;\r\n\r\n    var params = {\r\n      UserId: userId,\r\n      OrderId: orderId,\r\n      OrderRowId: orderRowId,\r\n      OrderNumber: orderNumber,\r\n      SendTo: sendTo,\r\n      MessageObject: messageObject,\r\n      Message: message,\r\n      Lang: lang\r\n    }\r\n    \r\n    return this._api.post(url, params);\r\n   }\r\n\r\n  getProcessOrderFiles(processId: number, orderId: number) {\r\n\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Proccess_Order_File;\r\n    var params = {\r\n      ProcessId: processId,\r\n      OrderId: orderId\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  cancelOrders(userId:string, orderId:number) {\r\n    let url = this.mappings.Web_Api_Post_Cancel_Order.replace('{userId}', userId).replace('{orderId}', orderId.toString());\r\n    return this._api.post(url);\r\n  }\r\n\r\n  updateBonificoPaymentDetails(orderId: number, numeroCro: string, numeroTrn: string) {\r\n    let url = this.mappings.Web_Api_Get_Client_Area_Update_Bonifico_Payment\r\n    var params = {\r\n      IdOrder: orderId,\r\n      numeroCro: numeroCro,\r\n      numeroTrn: numeroTrn\r\n    }\r\n    return this._api.post(url,params);\r\n  }\r\n\r\n  getBonificoUploadedFiles(orderId) {\r\n    let url = this.mappings.Web_Api_Post_Get_Bonifico_Uploaded_Files;\r\n    var params = {\r\n      OrderId: orderId\r\n    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/settings/client-area.service.ts","export class QuotingConstants {\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO: string = \"calcolato\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA: string = \"calcolato_scontistica\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_LISTINO: string = \"listino\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA: string = \"listino_scontistica\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO: string = \"calcolato_richiesta_preventivo\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO: string = \"calcolato_listino_standard\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA: string = \"calcolato_listino_scontistica\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI: string = \"calcolato_listino_fornitori\";\r\n    public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA: string = \"calcolato_listino_fornitori_scontistica\";\r\n    ;\r\n    \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/constants/quoting-constants.ts","export class SharedConstants {\r\n    public static readonly OTHER_PRODUCTS_TYPE: string = \"ALTRO_PRODOTTO\";\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/constants/shared-constants.ts","import { Inject, Injectable } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\nimport { CookieOptions } from './cookie-options';\r\nimport { CookieOptionsArgs } from './cookie-options-args';\r\nimport { CookieService } from './cookie.service';\r\n\r\n@Injectable()\r\nexport class CookieBrowserService implements CookieService {\r\n  private defaultOptions: CookieOptions;\r\n\r\n  constructor(@Inject(DOCUMENT) private document: any) {\r\n  }\r\n\r\n  public setOptions(options: CookieOptionsArgs) {\r\n    this.defaultOptions = new CookieOptions(options);\r\n  }\r\n\r\n  public get(key: string): string {\r\n    return (<any>this.cookieReader())[key];\r\n  }\r\n\r\n  public getObject(key: string): {[key: string]: string} {\r\n    let value = this.get(key);\r\n    return value ? JSON.parse(value) : value;\r\n  }\r\n\r\n  public getAll(): {[key: string]: string} {\r\n    return <any>this.cookieReader();\r\n  }\r\n\r\n  public put(key: string, value: string, options?: CookieOptionsArgs): void {\r\n    this.cookieWriter()(key, value, options);\r\n  }\r\n\r\n  public putObject(key: string, value: Object, options?: CookieOptionsArgs) {\r\n    this.put(key, JSON.stringify(value), options);\r\n  }\r\n\r\n  public remove(key: string, options?: CookieOptionsArgs): void {\r\n    this.cookieWriter()(key, undefined, options);\r\n  }\r\n\r\n  public removeAll(): void {\r\n    let cookies = this.getAll();\r\n    Object.keys(cookies).forEach(key => {\r\n      this.remove(key);\r\n    });\r\n  }\r\n\r\n  private cookieReader(): Object {\r\n    let rawDocument = this.document;\r\n    let lastCookies = {};\r\n    let lastCookieString = '';\r\n    let that = this;\r\n\r\n    let cookieArray: string[], cookie: string, i: number, index: number, name: string;\r\n    let currentCookieString = rawDocument.cookie || '';\r\n    if (currentCookieString !== lastCookieString) {\r\n      lastCookieString = currentCookieString;\r\n      cookieArray = lastCookieString.split('; ');\r\n      lastCookies = {};\r\n      for (i = 0; i < cookieArray.length; i++) {\r\n        cookie = cookieArray[i];\r\n        index = cookie.indexOf('=');\r\n        if (index > 0) {\r\n          name = that.safeDecodeURIComponent(cookie.substring(0, index));\r\n          if (this.isBlank((<any>lastCookies)[name])) {\r\n            (<any>lastCookies)[name] = that.safeDecodeURIComponent(cookie.substring(index + 1));\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return lastCookies;\r\n  }\r\n\r\n  private cookieWriter() {\r\n    let that = this;\r\n    let rawDocument = this.document;\r\n\r\n    return function (name: string, value: string, options?: CookieOptionsArgs) {\r\n      rawDocument.cookie = that.buildCookieString(name, value, options);\r\n    };\r\n  }\r\n\r\n  private safeDecodeURIComponent(str: string) {\r\n    try {\r\n      return decodeURIComponent(str);\r\n    } catch (e) {\r\n      return str;\r\n    }\r\n  }\r\n\r\n  private buildCookieString(name: string, value: string, options?: CookieOptionsArgs): string {\r\n    let cookiePath = '/';\r\n    let path: string, expires: any;\r\n    let defaultOpts = this.defaultOptions || new CookieOptions(<CookieOptionsArgs>{path: cookiePath});\r\n    let opts: CookieOptions = this.mergeOptions(defaultOpts, options);\r\n    expires = opts.expires;\r\n    if (this.isBlank(value)) {\r\n      expires = 'Thu, 01 Jan 1970 00:00:00 GMT';\r\n      value = '';\r\n    }\r\n    if (this.isString(expires)) {\r\n      expires = new Date(expires);\r\n    }\r\n\r\n    let str = encodeURIComponent(name) + '=' + encodeURIComponent(value);\r\n    str += opts.path ? ';path=' + opts.path : '';\r\n    str += opts.domain ? ';domain=' + opts.domain : '';\r\n    str += expires ? ';expires=' + expires.toUTCString() : '';\r\n    str += opts.secure ? ';secure' : '';\r\n\r\n    let cookieLength = str.length + 1;\r\n    if (cookieLength > 4096) {\r\n      console.log(`Cookie \\'${name}\\' possibly not set or overflowed because it was too \r\n      large (${cookieLength} > 4096 bytes)!`);\r\n    }\r\n    return str;\r\n  }\r\n\r\n  private mergeOptions(defaultOpts: CookieOptions, providedOpts?: CookieOptionsArgs): CookieOptions {\r\n    let newOpts = defaultOpts;\r\n    if (this.isPresent(providedOpts)) {\r\n      return newOpts.merge(new CookieOptions(providedOpts));\r\n    }\r\n    return newOpts;\r\n  }\r\n\r\n  private isBlank(obj: any): boolean {\r\n    return obj === undefined || obj === null;\r\n  }\r\n\r\n  private isPresent(obj: any): boolean {\r\n    return obj !== undefined && obj !== null;\r\n  }\r\n\r\n  private isString(obj: any): obj is string {\r\n    return typeof obj === 'string';\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-browser.service.ts","import { Injectable, Inject } from '@angular/core';\r\n\r\nimport { CookieService } from './cookie.service';\r\nimport { CookieOptionsArgs } from './cookie-options-args';\r\nimport { CookieOptions } from './cookie-options';\r\n\r\n@Injectable()\r\nexport class CookieNodeService implements CookieService {\r\n  private defaultOptions: CookieOptions;\r\n\r\n  private get cookies(): {[key: string]: string} {\r\n    return this.req.cookies;\r\n  }\r\n\r\n  constructor(@Inject('req') private req: any,\r\n              @Inject('res') private res: any) {\r\n  }\r\n\r\n  public setOptions(options: CookieOptionsArgs) {\r\n    this.defaultOptions = Object.assign(options);\r\n  }\r\n\r\n  public get(key: string): string {\r\n    return this.cookies[key];\r\n  }\r\n\r\n  public getObject(key: string): {[key: string]: string} {\r\n    let value = this.get(key);\r\n    let obj = value ? JSON.parse(value) : value\r\n    return obj;\r\n  }\r\n\r\n  public getAll(): {[key: string]: string} {\r\n    return this.cookies;\r\n  }\r\n\r\n  public put(key: string, value: string, options?: CookieOptionsArgs): void {\r\n    options = this.generateOptions();\r\n    this.res.cookie(key, value, options);\r\n  }\r\n\r\n  public putObject(key: string, value: {[key: string]: string}, options?: CookieOptionsArgs): void {\r\n    this.put(key, JSON.stringify(value), options);\r\n  }\r\n\r\n  public remove(key: string, options?: CookieOptionsArgs): void {\r\n    options = this.generateOptions();\r\n    this.res.clearCookie(key, options);\r\n  }\r\n\r\n  public removeAll(): void {\r\n    this.res.clearCookie();\r\n  }\r\n\r\n  private generateOptions(options?: CookieOptionsArgs) {\r\n    return Object.assign({}, options, {path: '/'}, this.defaultOptions);\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-node.service.ts","import { Injectable } from '@angular/core';\r\nimport { BaseRequestOptions, Headers } from '@angular/http';\r\n\r\n@Injectable()\r\nexport class DefaultRequestOptions extends BaseRequestOptions {\r\n  headers: Headers = new Headers({\r\n    'Content-Type': 'application/json; charset=utf-8'\r\n  });\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/default-request-options.ts","import { Injectable, Inject  } from '@angular/core';\r\n\r\n\r\n@Injectable()\r\nexport class LoadingOverlayService {\r\n\r\n    constructor(@Inject('isBrowser') private isBrowser: boolean) {\r\n    }\r\n\r\n    showPageLoadingOverlay() {\r\n        if(this.isBrowser)\r\n        {\r\n           jQuery('body').addClass('loading-overlay-showing');     \r\n        }\r\n    }\r\n\r\n    hidePageLoadingOverlay() {\r\n        if(this.isBrowser)\r\n        {\r\n           jQuery('body').removeClass('loading-overlay-showing');     \r\n        }\r\n    }    \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/loading-overlay.service.ts","import { Injectable } from \"@angular/core\";\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\n\r\n@Injectable()\r\nexport class LocalStorageService {\r\n    Write(key: string, value: any) {\r\n        if (value) {\r\n            value = JSON.stringify(value);\r\n        }\r\n        localStorage.setItem(key, value);\r\n    }\r\n      \r\n    Read(key: string){\r\n        let value: string = localStorage.getItem(key);\r\n\r\n        if (value && value != \"undefined\" && value != \"null\") {\r\n            let userLoginParsed = Helper.toInstance(new UserLogin(), JSON.parse(value));\r\n            return userLoginParsed;\r\n        }\r\n        return null;\r\n    }\r\n    Remove(key: string) {\r\n        localStorage.removeItem(key);\r\n    }\r\n}\r\nclass Helper {\r\n    static toInstance<T>(obj: T, json: string): T {\r\n        var jsonObj = JSON.parse(json);\r\n\r\n        if (typeof obj[\"fromJSON\"] === \"function\") {\r\n            obj[\"fromJSON\"](jsonObj);\r\n        }\r\n        else {\r\n            for (var propName in jsonObj) {\r\n                obj[propName] = jsonObj[propName]\r\n            }\r\n        }\r\n        return obj;\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/local-storage.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\nimport { RoutesService } from './routes.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\n\r\n@Injectable()\r\nexport class RoutesBrowserService extends RoutesService {\r\n\r\n  constructor(protected router: Router,\r\n              protected translate: TranslateService,\r\n              @Inject('CookieService') protected cookie: CookieService,\r\n              protected location: Location,\r\n              protected cache: CacheService) {\r\n    super(router, translate, cookie, location, true, cache);\r\n\r\n    this.browserLangs = RoutesBrowserService.getBrowserLangs();\r\n  }\r\n\r\n  public loadRoutes() {\r\n    let lang = this.getLang();\r\n    let requestUrl = `/assets/i18n-routes/${lang}.json`;\r\n    let rawRoutes = this.cache.get(requestUrl);\r\n    let routes = this.getRoutesWithComponents(rawRoutes);\r\n    this.router.resetConfig(routes);\r\n    this.cache.set(requestUrl, rawRoutes);\r\n    this.cookie.put(RoutesService.COOKIE_LANG_KEY, lang);\r\n  }\r\n\r\n  private static getBrowserLangs(): string[] {\r\n    let browserLangs = window.navigator['languages'] || null;\r\n    browserLangs = browserLangs ||\r\n      (window.navigator.language && [window.navigator.language]) ||\r\n      (window.navigator['browserLanguage'] && [window.navigator['browserLanguage']]) ||\r\n      (window.navigator['userLanguage'] && [window.navigator['userLanguage']]);\r\n    return browserLangs.map((lang) => {\r\n      if (lang.indexOf('-') !== -1) {\r\n        return lang.split('-')[0];\r\n      }\r\n      if (lang.indexOf('_') !== -1) {\r\n        return lang.split('_')[0];\r\n      }\r\n      return lang;\r\n    });\r\n  }\r\n\r\n  public getRoutes()\r\n  {\r\n    let lang = this.getLang();\r\n    let requestUrl = `/assets/i18n-routes/${lang}.json`;\r\n    let rawRoutes = this.cache.get(requestUrl);\r\n\r\n    return rawRoutes;\r\n  }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/routes-browser.service.ts","export * from './translate-static-loader.service';\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/multi-language/browser/index.ts","import { ApplicationService } from '../../core/application.service';\r\nimport { Observable } from 'rxjs';\r\nimport { ApiService } from '../../core/api.service';\r\nimport 'rxjs/add/operator/finally';\r\n\r\nexport class TranslateStaticLoader {\r\n  private observable$: Observable<any>;\r\n\r\n  constructor(private http: ApiService, private application: ApplicationService) {\r\n  }\r\n\r\n  public getTranslation(lang: string) {\r\n    if (!this.observable$) {\r\n      let appConfig = this.application.getConfig();\r\n      let templateName = appConfig.template;\r\n      this.observable$ = this.http\r\n        .get(`/template/b2c/${templateName}/translations/${lang}.json`)\r\n        .finally(() => this.observable$ = null);\r\n    }\r\n    return this.observable$\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/multi-language/browser/translate-static-loader.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../../services/core/cache.service';\r\nimport { ApiService  } from '../../services/core/api.service';\r\n\r\nexport function hashCodeString(str: string): string {\r\n  let hash = 0;\r\n  if (str.length === 0) {\r\n    return hash + '';\r\n  }\r\n  for (let i = 0; i < str.length; i++) {\r\n    let char = str.charCodeAt(i);\r\n    hash = ((hash << 5) - hash) + char;\r\n    hash = hash & hash; // Convert to 32bit integer\r\n  }\r\n  return hash + '';\r\n}\r\n\r\n// domain/feature service\r\n@Injectable()\r\nexport class ModelService {\r\n   // This is only one example of one Model depending on your domain\r\n  constructor(public _api: ApiService, public _cache: CacheService) {\r\n\r\n  }\r\n\r\n /**\r\n  * whatever domain/feature method name\r\n  */\r\n  get(url) {\r\n    // you want to return the cache if there is a response in it.\r\n    // This would cache the first response so if your API isn't idempotent\r\n    // you probably want to remove the item from the cache after you use it. LRU of 10\r\n    // you can use also hashCodeString here\r\n    let key = url;\r\n\r\n    if (this._cache.has(key)) {\r\n      return Observable.of(this._cache.get(key));\r\n    }\r\n    // you probably shouldn't .share() and you should write the correct logic\r\n    return this._api.get(url)\r\n      .do(json => {\r\n        this._cache.set(key, json);\r\n      })\r\n      .share();\r\n  }\r\n  // don't cache here since we're creating\r\n  create() {\r\n    // TODO\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/model/model.service.ts","module.exports = \"<div *ngIf=\\\"routesService.visiblePageLoader\\\" class=\\\"bounce-loader\\\" id=\\\"loading-dots\\\">\\r\\n    <div class=\\\"bounce1\\\"></div>\\r\\n    <div class=\\\"bounce2\\\"></div>\\r\\n    <div class=\\\"bounce3\\\"></div>\\r\\n</div>\\r\\n<router-outlet></router-outlet>\\r\\n<div (window:beforeunload)=\\\"clearMemory()\\\"></div>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/+app/app.component.html\n// module id = 640\n// module chunks = 0","import { Regola } from \"./../../../../models/document/quoting-model\";\r\nimport { LavorazioniComponents } from \"./../../../../models/document/quoting-model\";\r\n\r\nexport class ExcludingComponent {\r\n    components: LavorazioniComponents = new LavorazioniComponents();\r\n\r\n    // get name of model item from sezione value\r\n    private Macrocategory: string;\r\n\r\n    getMacrocategory() {\r\n        return this.Macrocategory;\r\n    }\r\n\r\n    setMacrocategory(macrocategory) {\r\n        this.Macrocategory = macrocategory;\r\n    }\r\n\r\n    getModelItemName(sezione) {\r\n        switch (sezione) {\r\n            case \"formato\":\r\n                {\r\n                    return \"formato\";\r\n                }\r\n\r\n            case \"copertina\":\r\n                {\r\n                    return \"\";\r\n                }\r\n\r\n            case \"fustellatura\":\r\n                {\r\n                    return \"\";\r\n                }\r\n\r\n            case \"plastificazione\":\r\n                {\r\n                    return \"plastificazioni1\";\r\n                }\r\n\r\n            case \"plastificazione_copertina\":\r\n                {\r\n                    return \"plastificazioni2\";\r\n                }\r\n\r\n            case \"rilegatura\":\r\n                {\r\n                    return \"rilegature\";\r\n                }\r\n\r\n            case \"taglio\":\r\n                {\r\n                    return \"tagli\";\r\n                }\r\n\r\n            default:\r\n                {\r\n                    return \"\";\r\n                }\r\n        }\r\n    }\r\n\r\n    //remove all excluding rules from model\r\n    removeSelectRules(model) {\r\n        for (var key in model) {\r\n            if (model[key] != null) {\r\n                if (this.getLowerCase(key) == \"lavorazioniaccessorie\")     // if lavorazione then remove this whay\r\n                {\r\n                    for (var lavorazioneKey in model[key]) // for each key in lavorazione model we set that visible is true\r\n                    {\r\n                        model[key][lavorazioneKey].isVisible = true;\r\n\r\n                        for (var subKey in model[key][lavorazioneKey].valori) // also for each item in valori(drop down)                        \r\n                        {\r\n                            try {\r\n                                model[key][lavorazioneKey].valori[subKey].isVisible = true;\r\n                            }\r\n                            catch (Exception) { }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                else {\r\n                    for (var subKey in model[key])   // set all keys to visible\r\n                    {\r\n                        try {\r\n                            if (Array.isArray(model[key])) {\r\n                                model[key][subKey].isVisible = true;\r\n                            }\r\n\r\n                            model.tipoTaglio = true;\r\n                        }\r\n\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n\r\n            }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    // remove excluding rules from one component\r\n    // if is lavorazione we need to remove rull from model.lavorazione not from model\r\n\r\n    removeRuleFromComponent(model, component, lavorazione = false) {\r\n        if (model != null && model != undefined) {\r\n            if (!lavorazione) {\r\n                for (var key in model[component]) {\r\n                    try {\r\n                        model[component][key].isVisible = true;\r\n                    }\r\n\r\n                    catch (Exception) { }\r\n                }\r\n            }\r\n\r\n            else {\r\n                for (var subKey in model.lavorazioniAccessorie) {\r\n                    for (var valoriSubKey in model.lavorazioniAccessorie[subKey].valori) {\r\n                        try {\r\n                            model.lavorazioniAccessorie[subKey].valori[valoriSubKey].isVisible = true;\r\n                        }\r\n\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    // remove excluding rules list\r\n    removeSelectRuleFromList(model, regoles) {\r\n        for (var regoleKey in regoles) {\r\n            switch (this.getLowerCase(regoles[regoleKey].Categoria_2)) {\r\n                case \"accessoria\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Id_Elemento_2));\r\n                        model = this.removeRuleFromComponent(model, component, true);\r\n                        break;\r\n                    }\r\n\r\n                case \"finitura\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Sezione_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n\r\n                case \"carte\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n\r\n                case \"carte_copertina\":\r\n                    {\r\n                        var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n                        model = this.removeRuleFromComponent(model, component);\r\n                        break;\r\n                    }\r\n\r\n                default: { }\r\n            }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    // return  rules list for certain category\r\n    filter(list, field, value) {\r\n        var returnList = new Array<Regola>();\r\n\r\n        for (var key in list) {\r\n            var text = \"\";\r\n            try {\r\n                text = this.getLowerCase(list[key][field]);\r\n            }\r\n            catch (exception) { }\r\n\r\n            if (text == this.getLowerCase(value)) {\r\n                returnList.push(list[key]);\r\n            }\r\n        }\r\n\r\n        return returnList;\r\n    }\r\n\r\n    // return excluding rules for custom categoria and sezione\r\n    getRegole(regolesList, categoria, sezione) {\r\n        var allRegoles = regolesList;\r\n        var regoles = null;\r\n\r\n        if (allRegoles != null && allRegoles != undefined && allRegoles.length > 0)      // check if we have regoles\r\n        {\r\n            var categoryRegoles = this.filter(allRegoles, \"Categoria_1\", categoria);        //get regoles for certain cattegory\r\n            if (categoryRegoles != null && categoryRegoles != undefined && categoryRegoles.length > 0) {\r\n                var regoles = null;\r\n\r\n                //get regoles for certain cattegory\r\n                switch (this.getLowerCase(categoria)) {\r\n                    case \"finiture\":\r\n                        {\r\n                            regoles = this.filter(categoryRegoles, \"Sezione_1\", sezione);\r\n\r\n                            for (var regolesKey in regoles) {\r\n                                var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2));  //return name for current rules \r\n                            }\r\n                            break;\r\n                        }\r\n                    case \"accessoria\":\r\n                        {\r\n                            regoles = this.filter(categoryRegoles, \"Id_Elemento_1\", sezione);\r\n\r\n                            for (var regolesKey in regoles) {\r\n                                var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2));\r\n                            }\r\n\r\n                            break;\r\n                        }\r\n\r\n                    default:\r\n                        {\r\n                            regoles = categoryRegoles;\r\n                        }\r\n                }\r\n\r\n                if (sezione == \"\") {\r\n                    regoles = categoryRegoles;\r\n                }\r\n                else { }\r\n            }\r\n        }\r\n\r\n        return regoles;\r\n    }\r\n\r\n    getLavorazioneValue(lavorazione, tipo, id)   //get value for current state if we get fisso for example than check box is checkd\r\n    {\r\n        try {\r\n            var tipoNum = parseInt(tipo);\r\n            switch (tipoNum) {\r\n                case this.components.checkBox:\r\n                    {\r\n                        if (lavorazione.value == null || lavorazione.value == undefined) {\r\n                            switch (lavorazione.tipoSelezione) {\r\n                                case \"non_selezionato\":\r\n                                    {\r\n                                        lavorazione.value = false;\r\n                                        return lavorazione.value;\r\n                                    }\r\n\r\n                                case \"selezionato\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n\r\n                                case \"fisso\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n\r\n\r\n                                case \"nascosto\":\r\n                                    {\r\n                                        lavorazione.value = true;\r\n                                        return lavorazione.value;\r\n                                    }\r\n\r\n                                default:\r\n                                    {\r\n                                        lavorazione.value = false;\r\n                                        return lavorazione.value;\r\n                                    }\r\n                            }\r\n                        }\r\n                        else {\r\n                            return !lavorazione.value;\r\n                        }\r\n                    };\r\n\r\n                case this.components.selectBox:\r\n                    { };\r\n\r\n                case this.components.inputBox:\r\n                    { }\r\n\r\n                default:\r\n                    {\r\n                        return null;\r\n                    }\r\n            }\r\n        }\r\n\r\n        catch (exception) { }\r\n    }\r\n\r\n    // hidding field for finiture category\r\n\r\n    //regole - because we need element to hide.\r\n    hideFinituraValue(model, component, regole, macro) {\r\n        switch (this.getLowerCase(macro)) {\r\n            case \"editoria\":\r\n                {\r\n                    for (var key in model[component]) {\r\n                        if (model[component][key].chiave == regole.Id_Elemento_2) {\r\n                            model[component][key].isVisible = false;\r\n                        }\r\n                    }\r\n\r\n                    if (component == \"taglio\") {\r\n                        model[component] = false;\r\n                        model.tipoTaglio = false;\r\n                    }\r\n                }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    //not finished, method that hode lavorazine\r\n    hideLavorazioneValue(model, component, regole, macro) {\r\n        switch (this.getLowerCase(macro)) {\r\n            case \"editoria\":\r\n                {\r\n                    for (var key in model.lavorazioniAccessorie) {\r\n                        try {\r\n                            if (model.lavorazioniAccessorie[key] != null) {\r\n                                if (model.lavorazioniAccessorie[key].id == component) {\r\n                                    if (parseInt(model.lavorazioniAccessorie[key].tipo) == this.components.selectBox) {\r\n                                        for (var subKey in model.lavorazioniAccessorie[key].valori) {\r\n                                            if (model.lavorazioniAccessorie[key].valori[subKey].chiave == regole.Id_Elemento_Sottochiave_2) {\r\n                                                model.lavorazioniAccessorie[key].valori[subKey].isVisible = false;\r\n                                                model.lavorazioniAccessorie[key].valori[subKey].chiave = 0;\r\n                                            }\r\n                                        }\r\n                                    }\r\n\r\n                                    else if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox) {\r\n                                        model.lavorazioniAccessorie[key].value = false;\r\n                                        model.lavorazioniAccessorie[key].isVisible = false;\r\n                                    }\r\n\r\n                                    else if (model.lavorazioniAccessorie[key].tipo == this.components.inputBox) {\r\n                                        model.lavorazioniAccessorie[key].value = \"\";\r\n                                        model.lavorazioniAccessorie[key].isVisible = false;;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        catch (Exception) { }\r\n                    }\r\n                }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    /// hidding option from regole id_element2\r\n    hideSelectValue(model, regole, macro, elemento)   // switch that determine witch hiden method need to use , for all hide group we need method\r\n    {\r\n        switch (this.getLowerCase(regole.Categoria_2)) {\r\n            case \"carta\":\r\n            case \"carta copertina\": { }\r\n            case \"finitura\":\r\n                {\r\n                    var sezioneInput = this.getModelItemName(this.getLowerCase(regole.Sezione_2));\r\n                    model = this.hideFinituraValue(model, sezioneInput, regole, macro);\r\n                }\r\n\r\n            case \"accessoria\":\r\n                {\r\n                    if (this.getLowerCase(regole.Categoria_1) == \"accessoria\") {\r\n                        for (var key in model.lavorazioniAccessorie) {\r\n                            if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox && model.lavorazioniAccessorie[key].id == regole.Id_Elemento_1) {\r\n                                if ((model.lavorazioniAccessorie[key].value == false && regole.Id_Elemento_Sottochiave_1 == 2) || (model.lavorazioniAccessorie[key].value == true && regole.Id_Elemento_Sottochiave_1 == 1) || regole.Id_Elemento_Sottochiave_1 == 0) {\r\n                                    model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n                                }\r\n                            }\r\n\r\n                            else if (model.lavorazioniAccessorie[key].tipo != this.components.checkBox) { }\r\n                        }\r\n                    }\r\n\r\n                    else {\r\n                        model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n                    }\r\n                }\r\n\r\n            case \"busta\": { }\r\n            default: { }\r\n        }\r\n\r\n        return model;\r\n    }\r\n\r\n    //method to get lower case in implement method we get error for null etc\r\n    getLowerCase(inputString) {\r\n        var outString = \"\";\r\n\r\n        try {\r\n            outString = inputString.toLowerCase();\r\n        }\r\n\r\n        catch (Exception) {\r\n            outString = inputString;\r\n        }\r\n\r\n        return outString;\r\n    }\r\n\r\n    //     Get excluding rules for certain component, and from category_1 choise witch\r\n    setSelectRules(model, rulesList, categoria, sezione, elemento, sotoelemento, macro) {\r\n        var regoleList = this.getRegole(rulesList, categoria, sezione);\r\n\r\n        if (regoleList) // != null && regoles != undefined && regoles.length > 0\r\n        {\r\n            var regole = null;\r\n            if (this.getLowerCase(categoria) == \"accessoria\") {\r\n                if (elemento == true) {  // return value before \r\n                    elemento = 1;\r\n                }\r\n\r\n                else {\r\n                    elemento = 0;\r\n                }\r\n\r\n                regole = regoleList;\r\n\r\n                if (!regole) {\r\n                    regole = this.filter(regoleList, \"Id_Elemento_Sottochiave_1\", \"\");\r\n                }\r\n\r\n            }\r\n\r\n            else {\r\n                regole = this.filter(regoleList, \"Id_Elemento_1\", elemento);\r\n                if (!regole) {\r\n                    regole = this.filter(regoleList, \"Id_Elemento_1\", \"\");\r\n                }\r\n            }\r\n\r\n            if (regole) {\r\n                for (var regoleKey in regole) {\r\n                    model = this.hideSelectValue(model, regole[regoleKey], macro, elemento);\r\n                }\r\n            }\r\n\r\n            else { }\r\n        }\r\n\r\n        else { }\r\n\r\n        return model;\r\n    }\r\n\r\n    /// <param name=\"tipo\">\"PF\" </param>\r\n    /// <param name=\"categoria\">\"FINITURA\"</param>\r\n    /// <param name=\"sezione\">\"FORMATO\"</param>\r\n    /// <param name=\"macroCategoria\">\"EDITORIA\"</param>\r\n    /// <param name=\"elemento\">null </param>\r\n    /// <param name=\"sottoElemento\">null</param>\r\n    ResetRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct = []) {\r\n        let regoleToReset = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n        let flagReset;\r\n\r\n        for (let regola of regoleToReset) {\r\n            if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n                flagReset = true;\r\n                this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    }\r\n\r\n    ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct = []) {\r\n        //console.log(\"ApplicaRegole\");\r\n        let regoleToApply = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n        let flagReset;\r\n\r\n        for (let regola of regoleToApply) {\r\n            //console.log(regola)\r\n            if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n                flagReset = false;\r\n                this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    }\r\n\r\n\r\n    ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct = []) {\r\n        let hideOrShow;\r\n\r\n        if (flagReset == false) {\r\n            hideOrShow = \"hide\";\r\n        }\r\n\r\n        else {\r\n            hideOrShow = \"show\";\r\n        }\r\n\r\n        if (regola.Tipo_Regola == \"ESCLUDE\") {\r\n            if (regola.Categoria_2 == \"CARTA\") {\r\n                //In questo caso è stata esclusa una carta e/o grammatura\r\n                var idElemento = regola.Id_Elemento_2;\r\n                var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n\r\n                //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n                //altrimenti una singola grammatura (solo per la relativa carta)\r\n                if (idSottoElemento == null || idSottoElemento == 0) {\r\n                    var attributo = regola.Categoria_2;\r\n                    this.hideOrShowComboItem(\"CARTA\", idElemento, hideOrShow, responseModel);\r\n                }\r\n\r\n                else {\r\n                    if (responseModel.idCarte1 != null) {\r\n                        var data = responseModel.idCarte1.split(\"_\");\r\n                        let idCarta = data[0];\r\n                        //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n\r\n                        if (idCarta == idElemento) {\r\n                            this.hideOrShowComboItem(\"GRAMMATURA_CARTA\", idSottoElemento, hideOrShow, responseModel);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            else if (regola.Categoria_2 == \"CARTA_COPERTINA\") {\r\n                //In questo caso è stata esclusa una carta e/o grammatura\r\n                var idElemento = regola.Id_Elemento_2;\r\n                var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n\r\n                //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n                //altrimenti una singola grammatura (solo per la relativa carta)\r\n                if (idSottoElemento == null || idSottoElemento == 0) {\r\n                    var attributo = regola.Categoria_2;\r\n                    this.hideOrShowComboItem(\"CARTA_COPERTINA\", idElemento, hideOrShow, responseModel);\r\n                }\r\n\r\n                else {\r\n                    if (responseModel.idCarte2 != null) {\r\n                        var data = responseModel.idCarte2.split(\"_\");\r\n                        let idCarta = data[0];\r\n                        //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n                        if (idCarta == idElemento) {\r\n                            this.hideOrShowComboItem(\"GRAMMATURA_CARTA_COPERTINA\", idSottoElemento, hideOrShow, responseModel);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            else if (regola.Categoria_2 == \"FINITURA\") {\r\n                let sezione = regola.Sezione_2;\r\n                let idElemento = regola.Id_Elemento_2;\r\n\r\n                if (sezione == \"TAGLIO\") {\r\n                    this.hideOrShowAttribute(\"TAGLIO\", hideOrShow, responseModel);\r\n                }\r\n\r\n                else if (sezione == \"STAMPA_BIFACCIALE\") {\r\n                    this.hideOrShowComboItem(sezione, idElemento, hideOrShow, responseModel);\r\n                }\r\n\r\n                else if (sezione == \"BIANCO_COPRENTE\") {\r\n                   \r\n                    if (idElemento == \"1\") {\r\n                        this.hideOrShowComboItem(sezione, \"0\", hideOrShow, responseModel);\r\n                    }\r\n\r\n                    else if (idElemento == \"2\") {\r\n                        this.hideOrShowComboItem(sezione, \"1\", hideOrShow, responseModel);\r\n                    }\r\n\r\n                    else if (idElemento == \"3\") {\r\n                        this.hideOrShowComboItem(sezione, \"2\", hideOrShow, responseModel);\r\n                    }\r\n                }\r\n\r\n                else {\r\n                    this.hideOrShowComboItem(sezione, idElemento, hideOrShow, responseModel);\r\n                }\r\n            }\r\n\r\n            else if (regola.Categoria_2 == \"SUPPORTO_RIGIDO\") {\r\n                //In questo caso è stato escluso un supporto rigido\r\n                var idElemento = regola.Id_Elemento_2;\r\n\r\n                this.hideOrShowComboItem(\"SUPPORTO_RIGIDO\", idElemento, hideOrShow, responseModel);\r\n            }\r\n\r\n            else if (regola.Categoria_2 == \"MATERIALE_FLESSIBILE\") {\r\n                //In questo caso è stato escluso un supporto rigido\r\n                var idElemento = regola.Id_Elemento_2;\r\n                this.hideOrShowComboItem(\"MATERIALE_FLESSIBILE\", idElemento, hideOrShow, responseModel);\r\n            }\r\n\r\n            else if (regola.Categoria_2 == \"ACCESSORIA\") {\r\n                var idLavorazione = regola.Id_Elemento_2;\r\n                var idVariante = regola.Id_Elemento_Sottochiave_2;\r\n                this.hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    }\r\n\r\n    hideOrShowAttribute(attributo, hideOrShow, responseModel) {\r\n        if (attributo == \"TAGLIO\") {\r\n            if (hideOrShow == \"hide\") {\r\n                responseModel.isTaglioVisible = true;\r\n            }\r\n\r\n            else if (hideOrShow == \"show\") {\r\n                responseModel.isTaglioVisible = false;\r\n            }\r\n        }\r\n    }\r\n\r\n    hideOrShowComboItem(attributo, id, hideOrShow, responseModel) {\r\n        //console.log(\"hideOrShowComboItem\")\r\n        //console.log(this.Macrocategory)\r\n        //console.log(id)\r\n        //console.log(hideOrShow)\r\n        //console.log(attributo)\r\n        //console.log(\"finehideOrShowComboItem\")\r\n\r\n        if (this.Macrocategory == \"EDITORIA\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"CARTA_COPERTINA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte2, \"CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature2, \"GRAMMATURA_CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", id, hideOrShow, responseModel);\r\n                }\r\n\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"COPERTINA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.copertine, \"COPERTINA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.copertine, \"COPERTINA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"RILEGATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.rilegature, \"RILEGATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.rilegature, \"RILEGATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"COMMERCIALE\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PIEGATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.piegature, \"PIEGATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.piegature, \"PIEGATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"ETICHETTE\") {\r\n            if (attributo == \"CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n\r\n            else if (attributo == \"GRAMMATURA_CARTA\") {\r\n                this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"FUSTELLATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"ADESIVI\" || this.Macrocategory == \"MANIFESTI\" || this.Macrocategory == \"PANNELLI\" || this.Macrocategory == \"STAMPA_DIRETTA\") {\r\n            if (attributo == \"PLASTIFICAZIONE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"SUPPORTO_RIGIDO\") {\r\n                this.hideOrShowRadComboItem(responseModel.supportiRigidi, \"SUPPORTO_RIGIDO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n                this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"BIANCO_COPRENTE\") {\r\n                //Se l'id dell'elemento non è settato vengono nascoste tutto il bianco coprente\r\n                this.hideOrShowRadComboItem(responseModel.biancoCoprente, \"BIANCO_COPRENTE\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"STAMPA_BIFACCIALE\") {\r\n                if (hideOrShow == \"hide\") {\r\n                    if (id == \"1\") {\r\n                        responseModel.isStampaBifaccialeNoHide = true;\r\n                        responseModel.tipoBifacciale=\"1\";\r\n                    }\r\n                    else {\r\n                        responseModel.isStampaBifaccialeSiHide = true;\r\n                        responseModel.tipoBifacciale=\"0\";\r\n                    }\r\n                }\r\n                else {\r\n                    responseModel.isStampaBifaccialeNoHide = false;\r\n                    responseModel.isStampaBifaccialeSiHide = false;\r\n                }\r\n               \r\n            }\r\n            else if (attributo == \"FUSTELLATURA\") {\r\n                //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n        }\r\n        else if (this.Macrocategory == \"BANDIERE\" || this.Macrocategory == \"BANNER\") {\r\n            if (attributo == \"FORMATO\") {\r\n                this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n            }\r\n            else if (attributo == \"OCCHIELLATURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.occhielli, \"OCCHIELLATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.occhielli, \"OCCHIELLATURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"ASOLA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.asole, \"ASOLA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.asole, \"ASOLA\", id, hideOrShow, responseModel);\r\n                }\r\n\r\n            }\r\n            else if (attributo == \"CUCITURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.cuciture, \"CUCITURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.cuciture, \"CUCITURA\", id, hideOrShow, responseModel);\r\n                }\r\n            }\r\n            else if (attributo == \"ELETTROSALDATURA\") {\r\n                if (id == \"0\") {\r\n                    this.hideOrShowAllRadComboItems(responseModel.elettrosaldature, \"ELETTROSALDATURA\", hideOrShow, responseModel);\r\n                }\r\n                else {\r\n                    this.hideOrShowRadComboItem(responseModel.elettrosaldature, \"ELETTROSALDATURA\", id, hideOrShow, responseModel);\r\n                }\r\n\r\n            }\r\n            else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n                this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n            }\r\n        }\r\n    }\r\n\r\n    hideOrShowAllRadComboItems(parameterList, tipo, hideOrShow, responseModel) {\r\n        var emptyValue;\r\n\r\n        if (tipo == \"COPERTINA\") {\r\n            emptyValue = \"0\";\r\n        }\r\n        else {\r\n            emptyValue = \"-1\"\r\n        }\r\n\r\n        let selected = false;\r\n\r\n        for (let parameter of parameterList) {\r\n            if (hideOrShow == \"show\") {\r\n                parameter.isVisible = true;\r\n                if (selected == false) {\r\n                    if (tipo == \"RILEGATURA\") {\r\n                        if (responseModel.idRilegature == \"-1\") {\r\n                            responseModel.idRilegature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PIEGATURA\") {\r\n                        if (responseModel.idPiegature == \"-1\") {\r\n                            responseModel.idPiegature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"OCCHIELLATURA\") {\r\n                        if (responseModel.idOcchielli == \"-1\") {\r\n                            responseModel.idOcchielli = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"CUCITURA\") {\r\n                        if (responseModel.idCuciture == \"-1\") {\r\n                            responseModel.idCuciture = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"ELETTROSALDATURA\") {\r\n                        if (responseModel.idElettrosaldature == \"-1\") {\r\n                            responseModel.idElettrosaldature = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"ASOLA\") {\r\n                        if (responseModel.idAsole == \"-1\") {\r\n                            responseModel.idAsole = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"FUSTELLATURA\") {\r\n                        if (responseModel.idTagli == \"-1\") {\r\n                            responseModel.idTagli = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PLASTIFICAZIONE\") {\r\n                        if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                            responseModel.idPlastificazioni1 = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                        if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                            responseModel.idPlastificazioni2 = parameter.chiave;\r\n                        }\r\n                    }\r\n                    else if (tipo == \"COPERTINA\") {\r\n                        if (responseModel.idCopertine == \"-1\") {\r\n                            responseModel.idCopertine = parameter.chiave;\r\n                        }\r\n                    }\r\n\r\n                    selected = true;\r\n                }\r\n            }\r\n            else if (hideOrShow == \"hide\") {\r\n                if (parameter.chiave != emptyValue) {\r\n                    parameter.isVisible = false;\r\n                }\r\n                else {\r\n                    if (selected == false && parameter.isVisible == true) {\r\n                        if (tipo == \"RILEGATURA\") {\r\n                            if (responseModel.idRilegature == emptyValue) {\r\n                                responseModel.idRilegature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PIEGATURA\") {\r\n                            if (responseModel.idPiegature == emptyValue) {\r\n                                responseModel.idPiegature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"OCCHIELLATURA\") {\r\n                            if (responseModel.idOcchielli == emptyValue) {\r\n                                responseModel.idOcchielli = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"CUCITURA\") {\r\n                            if (responseModel.idCuciture == emptyValue) {\r\n                                responseModel.idCuciture = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"ELETTROSALDATURA\") {\r\n                            if (responseModel.idElettrosaldature == emptyValue) {\r\n                                responseModel.idElettrosaldature = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"ASOLA\") {\r\n                            if (responseModel.idAsole == emptyValue) {\r\n                                responseModel.idAsole = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"FUSTELLATURA\") {\r\n                            if (responseModel.idTagli == emptyValue) {\r\n                                responseModel.idTagli = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PLASTIFICAZIONE\") {\r\n                            if (responseModel.idPlastificazioni1 == emptyValue) {\r\n                                responseModel.idPlastificazioni1 = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                            if (responseModel.idPlastificazioni2 == emptyValue) {\r\n                                responseModel.idPlastificazioni2 = parameter.chiave;\r\n                            }\r\n                        }\r\n                        else if (tipo == \"COPERTINA\") {\r\n                            if (responseModel.idCopertine == emptyValue) {\r\n                                responseModel.idCopertine = parameter.chiave;\r\n                            }\r\n                        }\r\n\r\n                        selected = true;\r\n                    }\r\n                }\r\n            }\r\n            if (selected == false) {\r\n                if (tipo == \"RILEGATURA\") {\r\n                    responseModel.idRilegature = \"-1\";\r\n                }\r\n                else if (tipo == \"PIEGATURA\") {\r\n                    responseModel.idPiegature = \"-1\";\r\n                }\r\n                else if (tipo == \"FUSTELLATURA\") {\r\n                    responseModel.idTagli = \"-1\";\r\n                }\r\n                else if (tipo == \"OCCHIELLATURA\") {\r\n                    responseModel.idOcchielli = \"-1\";\r\n                }\r\n                else if (tipo == \"CUCITURA\") {\r\n                    responseModel.idCuciture = \"-1\";\r\n                }\r\n                else if (tipo == \"ELETTROSALDATURA\") {\r\n                    responseModel.idElettrosaldature = \"-1\";\r\n                }\r\n                else if (tipo == \"ASOLA\") {\r\n                    responseModel.idAsole = \"-1\";\r\n                }\r\n                else if (tipo == \"PLASTIFICAZIONE\") {\r\n                    responseModel.idPlastificazioni1 = \"-1\";\r\n                }\r\n                else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                    responseModel.idPlastificazioni2 = \"-1\";\r\n                }\r\n                else if (tipo == \"COPERTINA\") {\r\n                    responseModel.idCopertine = \"-1\";\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    hideOrShowRadComboItem(parameterList, tipo, id, hideOrShow, responseModel) {\r\n        //Recupero delle info sulla combo\r\n        let selected = false;\r\n        for (let parameter of parameterList) {\r\n            //Se l'elemento non è il valore 'Scegli' (-1) o vuoto, non bisogna considerarlo\r\n            //Tranne per la copertina, dove -1 corrisponde all'autocopertinato, che può essere escluso\r\n            if (tipo != \"COPERTINA\" && (parameter.chiave == \"-1\" || parameter.chiave == null)) {\r\n                continue;\r\n            }\r\n            else {\r\n                var idElemento;\r\n\r\n                if (tipo == \"CARTA\"\r\n                    || tipo == \"CARTA_COPERTINA\"\r\n                    || (this.Macrocategory == \"ETICHETTE\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"STAMPA_DIRETTA\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"PANNELLI\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"BANDIERE\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"MANIFESTI\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"BANNER\" && tipo == \"FORMATO\")\r\n                    || (this.Macrocategory == \"ADESIVI\" && tipo == \"FORMATO\")) {\r\n                    var data = parameter.chiave.split(\"_\");\r\n                    idElemento = data[0];\r\n                }\r\n                else if (tipo == \"COPERTINA\") {\r\n                    if (parameter.chiave == \"0\") //Caso dell'autocopertinato\r\n                    {\r\n                        //Il value dell'option della combo per l'autocopertina è il valore vuoto,\r\n                        //inveCe per le regole il valore dell'autocopertinato è -1, quindi occorre una conversione\r\n                        idElemento = \"-1\";\r\n                    }\r\n                    else {\r\n                        idElemento = parameter.chiave;\r\n                    }\r\n                }\r\n                else {\r\n                    idElemento = parameter.chiave;\r\n                }\r\n\r\n                if (hideOrShow == \"show\") {\r\n                    if (idElemento == id) {\r\n                        parameter.isVisible = true;\r\n                        if (selected == false) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == \"-1\") {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == \"-1\") {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == \"-1\") {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == \"-1\") {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == \"-1\") {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == \"-1\") {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == \"-1\") {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == \"-1\") {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == \"-1\") {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == \"-1\") {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (responseModel.idFormati == \"-1\") {\r\n                                    responseModel.idFormati = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == \"-1\") {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                                if (responseModel.idBiancoCoprente == \"-1\") {\r\n                                    responseModel.idBiancoCoprente = parameter.chiave;\r\n                                }\r\n                            }\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (selected == false) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == \"-1\") {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == \"-1\") {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == \"-1\") {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == \"-1\") {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == \"-1\") {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == \"-1\") {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == \"-1\") {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == \"-1\") {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == \"-1\") {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == \"-1\") {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == \"-1\") {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (responseModel.idFormati == \"-1\") {\r\n                                    responseModel.idFormati = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == \"-1\") {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == \"-1\") {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == \"-1\") {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                }\r\n                else if (hideOrShow == \"hide\") {\r\n                    if (idElemento == id) {\r\n                        parameter.isVisible = false;\r\n                    }\r\n                    else {\r\n                        if (selected == false && parameter.isVisible == true) {\r\n                            if (tipo == \"RILEGATURA\") {\r\n                                if (responseModel.idRilegature == id) {\r\n                                    responseModel.idRilegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                                if (responseModel.idMaterialiFlessibili == id) {\r\n                                    responseModel.idMaterialiFlessibili = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                                if (responseModel.idSupportiRigidi == id) {\r\n                                    responseModel.idSupportiRigidi = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"OCCHIELLATURA\") {\r\n                                if (responseModel.idOcchielli == id) {\r\n                                    responseModel.idOcchielli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CUCITURA\") {\r\n                                if (responseModel.idCuciture == id) {\r\n                                    responseModel.idCuciture = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ELETTROSALDATURA\") {\r\n                                if (responseModel.idElettrosaldature == id) {\r\n                                    responseModel.idElettrosaldature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"ASOLA\") {\r\n                                if (responseModel.idAsole == id) {\r\n                                    responseModel.idAsole = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PIEGATURA\") {\r\n                                if (responseModel.idPiegature == id) {\r\n                                    responseModel.idPiegature = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FUSTELLATURA\") {\r\n                                if (responseModel.idTagli == id) {\r\n                                    responseModel.idTagli = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA\") {\r\n                                var data = responseModel.idCarte1.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == id) {\r\n                                    responseModel.idCarte1 = parameter.chiave;\r\n                                    responseModel.grammature1 = parameter.subElements;\r\n                                    responseModel.idGrammature1 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                                if (responseModel.idGrammature1 == id) {\r\n                                    responseModel.idGrammature1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"CARTA_COPERTINA\") {\r\n                                var data = responseModel.idCarte2.split(\"_\");\r\n                                let idCarta = data[0];\r\n\r\n                                if (idCarta == id) {\r\n                                    responseModel.idCarte2 = parameter.chiave;\r\n                                    responseModel.grammature2 = parameter.subElements;\r\n                                    responseModel.idGrammature2 = parameter.wrap_valore;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                                if (responseModel.idGrammature2 == id) {\r\n                                    responseModel.idGrammature2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"FORMATO\") {\r\n                                if (this.Macrocategory == \"ETICHETTE\"\r\n                                    || this.Macrocategory == \"ADESIVI\"\r\n                                    || this.Macrocategory == \"PANNELLI\"\r\n                                    || this.Macrocategory == \"MANIFESTI\"\r\n                                    || this.Macrocategory == \"STAMPA_DIRETTA\"\r\n                                    || this.Macrocategory == \"BANDIERE\"\r\n                                    || this.Macrocategory == \"BANNER\") {\r\n                                    var data = responseModel.idFormati.split(\"_\");\r\n                                    let idFormato = data[0];\r\n                                    if (idFormato == id) {\r\n                                        responseModel.idFormati = parameter.chiave;\r\n                                    }\r\n                                }\r\n                                else {\r\n                                    if (responseModel.idFormati == id) {\r\n                                        responseModel.idFormati = parameter.chiave;\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                                if (responseModel.idPlastificazioni1 == id) {\r\n                                    responseModel.idPlastificazioni1 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                                if (responseModel.idPlastificazioni2 == id) {\r\n                                    responseModel.idPlastificazioni2 = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"COPERTINA\") {\r\n                                if (responseModel.idCopertine == id) {\r\n                                    responseModel.idCopertine = parameter.chiave;\r\n                                }\r\n                            }\r\n                            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                                if (responseModel.idBiancoCoprente == id) {\r\n                                    responseModel.idBiancoCoprente = parameter.chiave;\r\n                                }\r\n                            }\r\n                            selected = true;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        if (selected == false) {\r\n            if (tipo == \"RILEGATURA\") {\r\n                responseModel.idRilegature = \"-1\";\r\n            }\r\n            else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n                responseModel.idMaterialiFlessibili = \"-1\";\r\n            }\r\n            else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n                responseModel.idSupportiRigidi = \"-1\";\r\n            }\r\n            else if (tipo == \"OCCHIELLATURA\") {\r\n                responseModel.idOcchielli = \"-1\";\r\n            }\r\n            else if (tipo == \"CUCITURA\") {\r\n                responseModel.idCuciture = \"-1\";\r\n            }\r\n            else if (tipo == \"ELETTROSALDATURA\") {\r\n                responseModel.idElettrosaldature = \"-1\";\r\n            }\r\n            else if (tipo == \"ASOLA\") {\r\n                responseModel.idAsole = \"-1\";\r\n            }\r\n            else if (tipo == \"PIEGATURA\") {\r\n                responseModel.idPiegature = \"-1\";\r\n            }\r\n            else if (tipo == \"FUSTELLATURA\") {\r\n                responseModel.idTagli = \"-1\";\r\n            }\r\n            else if (tipo == \"CARTA\") {\r\n                responseModel.idCarte1 = \"-1\";\r\n                responseModel.grammature1 = new Array<Object>();\r\n                responseModel.idGrammature1 = \"-1\";\r\n            }\r\n            else if (tipo == \"GRAMMATURA_CARTA\") {\r\n                responseModel.idGrammature1 = \"-1\";\r\n            }\r\n            else if (tipo == \"CARTA_COPERTINA\") {\r\n                responseModel.idCarte2 = \"-1\";\r\n                responseModel.grammature2 = new Array<Object>();\r\n                responseModel.idGrammature2 = \"-1\";\r\n            }\r\n            else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n                responseModel.idGrammature2 = \"-1\";\r\n            }\r\n            else if (tipo == \"PLASTIFICAZIONE\") {\r\n                responseModel.idPlastificazioni1 = \"-1\";\r\n            }\r\n            else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n                responseModel.idPlastificazioni2 = \"-1\";\r\n            }\r\n            else if (tipo == \"FORMATO\") {\r\n                responseModel.idFormati = \"-1\";\r\n            }\r\n            else if (tipo == \"COPERTINA\") {\r\n                responseModel.idCopertine = \"-1\";\r\n            }\r\n            else if (tipo == \"BIANCO_COPRENTE\") {\r\n                responseModel.idBiancoCoprente = \"0\";\r\n            }\r\n        }\r\n    }\r\n\r\n    /// <param name=\"tipo\">\"PF\" </param>\r\n    /// <param name=\"categoria\">\"FINITURA\"</param>\r\n    /// <param name=\"sezione\">\"FORMATO\"</param>\r\n    /// <param name=\"macroCategoria\">\"EDITORIA\"</param>\r\n    /// <param name=\"elemento\">null </param>\r\n    /// <param name=\"sottoElemento\">null</param>\r\n    FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel) {\r\n        let regole = new Array();\r\n\r\n        for (let regola of responseModel.listaRegole) {\r\n            //console.log(\"FindRegole(\" + tipo + \",\" + categoria + \",\" + sezione + \",\" + macroCategoria + \",\" + elemento + \",\" + sottoElemento + \")\");\r\n\r\n            if (regola.Tipo == tipo\r\n                && regola.Categoria_1 == categoria && regola.Sezione_1 == sezione\r\n                && regola.Macro_Categoria_1 == macroCategoria) //Elementi primari\r\n            {\r\n                //console.log(\"regola (\" + regola.Tipo + \",\" + regola.Categoria_1 + \",\" + regola.Sezione_1 + \",\" + regola.Macro_Categoria_1 + \",\" + regola.Id_Elemento_1 + \",\" + regola.Id_Elemento_Sottochiave_1 + \")\");\r\n                if (elemento != null && regola.Id_Elemento_1 == elemento) {\r\n                    if (sottoElemento != null && regola.Id_Elemento_Sottochiave_1 == sottoElemento) {\r\n                        regole.push(regola);\r\n                    }\r\n                    else if (sottoElemento == null || regola.Id_Elemento_Sottochiave_1 == 0) {  //-- If Sotto-Elemento\tis set to nessuna in regole, to remove entire element\r\n                        regole.push(regola);\r\n                    }\r\n                }\r\n                else if (elemento == null) //se non è stato indicato un id, vengono prese tutte le regole per la sezione in oggetto\r\n                {\r\n                    regole.push(regola);\r\n                }\r\n            }\r\n\r\n        }\r\n        //console.log(regole.length);\r\n        return regole\r\n    }\r\n\r\n    CheckMacroCategoria(regola, macroCategoria) {\r\n        var result = false;\r\n\r\n        if (regola.Macro_Categoria_2 == null || regola.Macro_Categoria_2 == \"\") {\r\n            result = true;\r\n        }\r\n        else if (regola.Macro_Categoria_2 != null && regola.Macro_Categoria_2.toUpperCase() == macroCategoria.toUpperCase()) {\r\n            result = true;\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    ApplicaRegoleLavorazioniAccessorie(tipo, macroCategoria, responseModel, responseModelOtherProduct = []) {\r\n        let categoria: string = \"ACCESSORIA\";\r\n        let sezione: string = \"\";\r\n        let elemento: string;\r\n        let sottoElemento: string;\r\n\r\n        //Lettura della lista delle lavorazioni accessorie\r\n        //Vengono applicate le regole per ogni lavorazione accessoria\r\n        for (let lavorazioneAccessoria of responseModel.lavorazioniAccessorie) {\r\n            elemento = lavorazioneAccessoria.id;\r\n\r\n            let tipoLavorazioneAccessoria;\r\n\r\n            if (lavorazioneAccessoria.tipo == \"0\") {\r\n                tipoLavorazioneAccessoria = \"check\";\r\n            }\r\n            else if (lavorazioneAccessoria.tipo == \"2\") {\r\n                tipoLavorazioneAccessoria = \"select\";\r\n            }\r\n            else if (lavorazioneAccessoria.tipo == \"6\") {\r\n                tipoLavorazioneAccessoria = \"textarea\";\r\n            }\r\n\r\n            //Per le lavorazioni di tipo combo bisogna leggere il valore della select\r\n            //Invece se si tratta di una check bisogna vedere se è checkata o meno.\r\n            if (tipoLavorazioneAccessoria == \"check\") //check\r\n            {\r\n                sottoElemento = null;\r\n                //se la lavorazione è stata checkata allora vengono applicate le eventuali regole associate\r\n                if (lavorazioneAccessoria.lavorazioneCheckValue == false || lavorazioneAccessoria.lavorazioneCheckValue == \"false\" || lavorazioneAccessoria.tipoSelezione == 'nascosto') {\r\n                    sottoElemento = \"1\"; //Corrispone a No nella regola\r\n                }\r\n                else if (lavorazioneAccessoria.lavorazioneCheckValue) {\r\n                    sottoElemento = \"2\"; //Corrispone a Si nella regola\r\n                }\r\n\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n            else if (tipoLavorazioneAccessoria == \"select\") //combo\r\n            {\r\n                sottoElemento = this.getComboValue(\"ACCESSORIA\", lavorazioneAccessoria.valore, lavorazioneAccessoria);\r\n\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n            else if (tipoLavorazioneAccessoria = \"textarea\") {\r\n                sottoElemento = '0';\r\n                this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n            }\r\n        }\r\n    }\r\n    getComboValue(attributo, id, lavorazioneAccessoria) {\r\n        var value = \"\";\r\n\r\n        //Controllo prima se si tratta di una lavorazione accessoria, dato che la loro gestione è uguale per tutte le macrocategorie\r\n        if (attributo == \"ACCESSORIA\") {\r\n            //Lettura di tutta la lista delle lavorazioni accessorie\r\n            for (let varianti of lavorazioneAccessoria.valori) {\r\n                //console.log(varianti)\r\n                var item = varianti;\r\n                var display = varianti.isVisible;\r\n\r\n                //Lettura dell'id della lavorazione corrente\r\n                var idLav = item.chiave;\r\n                var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n                var idLavAcc = lavorazioneAccessoria.valore;\r\n\r\n                if (id == idLav) {\r\n                    //Se la riga non è mostrata viene considerata come non selezionata\r\n                    if (display == false) {\r\n                        value = \"-1\";\r\n                    }\r\n                    else {\r\n                        //Lettura del valore selezionato nella select\r\n                        value = idLav;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            return value;\r\n        }\r\n    }\r\n\r\n    hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct = []) {\r\n        for (let lavorazioneAccessoria of responseModel.lavorazioniAccessorie) {\r\n            var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n            var idLavAcc = lavorazioneAccessoria.id;\r\n\r\n            if (idLavAcc == idLavorazione) {\r\n                if (tipoLavorazione == \"2\") {\r\n                    let comboItemNumber = -1;\r\n\r\n                    if (idVariante == null || idVariante == 0) {\r\n                        if (hideOrShow == \"hide\") {\r\n                            lavorazioneAccessoria.isVisible = false;\r\n                        }\r\n                        else if (hideOrShow == \"show\") {\r\n                            lavorazioneAccessoria.isVisible = true;\r\n                        }\r\n                    }\r\n                    else {\r\n                        let selected = false;\r\n                        for (let variante of lavorazioneAccessoria.valori) {\r\n                            if (hideOrShow == \"hide\") {\r\n                                if (variante.chiave == idVariante) {\r\n                                    variante.isVisible = false;\r\n                                    //-- If type is combobox and we want to hide just one combo option, we will send it's id\r\n                                    comboItemNumber = idVariante;\r\n                                }\r\n                            }\r\n                            else if (hideOrShow == \"show\") {\r\n                                variante.isVisible = true;\r\n\r\n                                if (selected == false) {\r\n                                    if (lavorazioneAccessoria.valore == \"-1\") {\r\n                                        lavorazioneAccessoria.valore = variante.chiave;\r\n                                    }\r\n                                    selected = true;\r\n                                }\r\n                            }\r\n                        }\r\n                        let firstVariableVisible = 0;\r\n                        for (let variante of lavorazioneAccessoria.valori) {\r\n                            if (firstVariableVisible == 0) {\r\n                                if (variante.isVisible == true) {\r\n                                    firstVariableVisible = variante.chiave;\r\n                                }\r\n                            }\r\n                            if (lavorazioneAccessoria.valore == variante.chiave) {\r\n                                if (variante.isVisible == true) {\r\n                                    selected = true;\r\n                                }\r\n                            }\r\n                        }\r\n                        if (selected == false && firstVariableVisible == 0) {\r\n                            lavorazioneAccessoria.valore = \"-1\";\r\n                        }\r\n                        else if (selected == false) {\r\n                            lavorazioneAccessoria.valore = firstVariableVisible;\r\n                        }\r\n                    }\r\n\r\n                    this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber);\r\n                }\r\n                else {\r\n                    if (hideOrShow == \"hide\") {\r\n                        lavorazioneAccessoria.isVisible = false;\r\n                    }\r\n                    else if (hideOrShow == \"show\") {\r\n                        lavorazioneAccessoria.isVisible = true;\r\n                    }\r\n\r\n                    this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    /*-- In other products we don't use lavorazzioniAccessorie object but gruppi,\r\n         so for every change on one object we need to reflect it on the another one */\r\n    reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber = -1) {\r\n        if (responseModelOtherProduct === undefined || responseModelOtherProduct.length == 0)\r\n            return;\r\n\r\n        var idLavorazione = lavorazioneAccessoria.id;\r\n\r\n        let isFoundElement = false;\r\n        //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n        for (let group of responseModelOtherProduct) {\r\n            for (let variante of group.varianti) {\r\n                if (variante.id == idLavorazione) {\r\n                    if (variante.tipo != '2' || comboItemNumber == -1) {\r\n                        variante.isVisible = hideOrShow == \"hide\" ? false : true;\r\n                        //-- If item from select we want to hide was selected before rule is applied on it, we are changing it's value\r\n                        if (!variante.isVisible && (lavorazioneAccessoria.valore || lavorazioneAccessoria.valore == 0)) {\r\n                            variante.intFormValue = lavorazioneAccessoria.valore;\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (variante.valori) {\r\n                            var comboOption = variante.valori.filter(x => x.chiave == comboItemNumber);\r\n                            if (comboOption) {\r\n                                comboOption.isVisible = hideOrShow == \"hide\" ? false : true;\r\n\r\n                                //-- If selected element need to be hidden because of regola, we are selecting first visible element\r\n                                if(!comboOption.isVisible)\r\n                                {\r\n                                    //  let value = lavorazioneAccessoria.valori.filter(x => x.isVisible == true)[0].chiave;\r\n                                    //  if(variante.intFormValue)\r\n                                     variante.intFormValue = lavorazioneAccessoria.valore;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    isFoundElement = true;\r\n                    break;\r\n                }\r\n\r\n            }\r\n            //-- If variante is found, break both loops, because we don't need to look for any other variante\r\n            if (isFoundElement) break;\r\n        }\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/quoting-excluding.component.ts","export class UserLogin {\r\n    constructor() {\r\n        // this.id = 0;\r\n        this.username = \"\";\r\n        this.isAuthenticated = false;\r\n    }\r\n\r\n    // id: number;\r\n    username: string;\r\n    isAuthenticated: boolean;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/user-login.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { AuthService } from \"../core/auth.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\n\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\nimport { CurrencyService } from \"./currency.service\";\r\n\r\n\r\n@Injectable()\r\nexport class CmsComponentService {\r\n  constructor\r\n    (\r\n      public _api: ApiService,\r\n      private mappings: Mappings,\r\n      private language: LanguageService,\r\n      private authService: AuthService,\r\n      private cartService: ShoppingCartService,\r\n      private currencyService: CurrencyService,\r\n  ) { }\r\n\r\n  getHeaderData() {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    console.log(longLang)\r\n    //reading userId\r\n    let userId: string = this.authService.getCurrentUserId();\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    //reading cartId\r\n    let cartId: string = this.cartService.getCartId();\r\n    cartId = encodeURIComponent(cartId);\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Header_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', userId)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{currency}', curr)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n\r\n  getSideMenuData() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url: string = this.mappings.Web_Api_Get_Side_Menu_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getHomePageDataOptimized() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    //reading userId\r\n    let userId: string = this.authService.getCurrentUserId();\r\n\r\n    //reading cartId\r\n    let cartId: string = this.cartService.getCartId();\r\n\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    //reading currency\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    cartId = encodeURIComponent(cartId);\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Home_Page_Data_Optimized\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', userId)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{currency}', curr)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getproductHilightpromo() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Home_HilightPromoProduct\r\n      .replace('{lang}', longLang);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getSeoData() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    let url: string = this.mappings.Web_Api_Get_Seo_Data.replace('{lang}', longLang);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n\r\n  getSliderData(type: string, id: string) {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Slider_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{id}', id)\r\n      .replace('{type}', type);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getFooterData() {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Footer_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{currency}', curr);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getShoppingCartData() {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    //reading userId\r\n    let userInfo: UserLogin = this.authService.GetData();\r\n    let userId;\r\n    if (userInfo != null) {\r\n      userId = this.authService.GetUserId();\r\n    }\r\n\r\n    //reading cartId\r\n    let cartId: string = this.cartService.getCartId();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', userId.toString())\r\n      .replace('{cartid}', cartId)\r\n      .replace('{currency}', curr);\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n\r\n  getShoppingCartCashData() {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    //reading userId\r\n    let userInfo: UserLogin = this.authService.GetData();\r\n    let userId;\r\n\r\n    if (userInfo != null) {\r\n      userId = this.authService.GetUserId();\r\n    }\r\n\r\n    //reading cartId\r\n    let cartId: string = this.cartService.getCartId();\r\n    let curr = this.currencyService.getCurrency();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Cash_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', userId.toString())\r\n      .replace('{cartid}', cartId.toString())\r\n      .replace('{currency}', curr);\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n  getShoppingCartSubmittedData(orderId: string) {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n\r\n    //reading userId\r\n    let userInfo: UserLogin = this.authService.GetData();\r\n    let userId;\r\n\r\n    if (userInfo != null) {\r\n      userId = this.authService.GetUserId();\r\n    }\r\n\r\n    let curr = this.currencyService.getCurrency();\r\n    let cartId = this.cartService.getCartId();\r\n    let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Submitted_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', userId.toString())\r\n      .replace('{orderid}', orderId.toString())\r\n      .replace('{currency}', curr)\r\n      .replace(\"{cartid}\", cartId);\r\n\r\n    return this._api.getUniversalCached(url);\r\n  }\r\n\r\n  getOtherProductData(productId: string, userId: string) {\r\n    //reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    //reading template builder id\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n    let url: string = this.mappings.Web_Api_Get_Other_Product_Form_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{productid}', productId)\r\n      .replace('{userId}', userId)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getOfflinePageData() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Offline_Page_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', customerId)\r\n      .replace('{cartid}', cartId);\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getLoginPageData() {\r\n    //Reading language\r\n    let longLang: string = this.language.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url: string = this.mappings.Web_Api_Get_Login_Page_Data\r\n      .replace('{lang}', longLang)\r\n      .replace('{userid}', customerId)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n\r\n    //Sending request to the server\r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-component.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { LanguageService } from \"./language.service\";\r\n\r\n@Injectable()\r\nexport class NewsletterService \r\n{\r\n  constructor\r\n  (\r\n    public _api: ApiService, \r\n    public _cache: CacheService,\r\n    private languageService: LanguageService,\r\n    private mappings: Mappings\r\n  ) {}\r\n\r\n  //getting language\r\n  lang = this.languageService.getLongLang();\r\n\r\n  newsletterSubscribe(email: string) \r\n  {\r\n    let url = this.mappings.Web_Api_Post_Newsletter_Subscribe.replace('{email}', email).replace('{lang}', this.lang);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  getNewsletterPageData()\r\n  {\r\n    let url = this.mappings.Web_Api_Get_Newsletter_Page_Data.replace('{lang}', this.lang);\r\n\r\n    return this._api.get(url);\r\n  }\r\n  \r\n  getNewsletterConfirmationPageData()\r\n  {\r\n    let url = this.mappings.Web_Api_Get_Newsletter_Confirmation_Page_Data.replace('{lang}', this.lang);\r\n\r\n    return this._api.get(url)\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/newsletter.service.ts","export * from './cookie.service';\r\nexport * from './cookie-browser.service';\r\nexport * from './cookie-node.service';\r\nexport * from './cookie-options';\r\nexport * from './cookie-options-args';\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/index.ts","import { TrustpilotService } from './../services/cms/trustpilot.service';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ApiService } from '../services/core/api.service';\r\nimport { ModelService } from './model/model.service';\r\n\r\nimport { ComponentHelperService } from '../services/core/component-helper.service';\r\nimport { TemplateService } from '../services/settings/template.service';\r\nimport { CmsContentService } from '../services/cms/cms-content.service';\r\nimport { CompanyService } from '../services/core/company.service';\r\nimport { ArticleService } from '../services/cms/article.service';\r\nimport { CmsMenuListService } from '../services/cms/cms-menu-list.service';\r\nimport { FaqListService } from '../services/cms/faq.service';\r\nimport { NewsletterService } from '../services/cms/newsletter.service';\r\nimport { SliderService } from '../services/cms/slider.service';\r\nimport { InfoRequestService } from '../services/cms/info-request.service';\r\nimport { LoginService } from '../services/cms/login.service';\r\nimport { RecoverPasswordService } from '../services/cms/recover-password.service';\r\nimport { RegisterService } from '../services/cms/register.service';\r\nimport { LocalStorageService } from '../services/core/local-storage';\r\nimport { QuotingService } from '../services/document/quoting.service';\r\nimport { CategoryService } from '../services/inventory/category.service';\r\nimport { ProductService } from '../services/inventory/product.service';\r\nimport { ShoppingCartService } from '../services/inventory/shopping-cart.service';\r\nimport { ClientAreaService } from '../services/settings/client-area.service';\r\nimport { AuthService } from '../services/core/auth.service';\r\nimport { LanguageService } from '../services/cms/language.service';\r\nimport { ConfigurationService } from '../services/core/configuration.service';\r\nimport { CmsComponentService } from '../services/cms/cms-component.service';\r\nimport { SeoService } from '../services/core/seo.service';\r\nimport { PrivacyPolicyService } from '../services/core/privacy-policy.service';\r\nimport { CookiePolicyService } from '../services/core/cookie-policy.service';\r\nimport { PurchaseConditionService } from '../services/core/purchase-condition.service';\r\nimport { BootboxService } from '../services/core/bootbox.service';\r\nimport { LoadingOverlayService } from '../services/core/loading-overlay.service';\r\nimport { ScriptService } from '../services/cms/script.service';\r\nimport { HelperService } from '../services/core/helper.service';\r\nimport { OrderPaymentService } from \"../services/cms/order-payment.service\";\r\nimport { CurrencyService } from \"../services/cms/currency.service\";\r\nimport { MessagesService } from \"../services/core/messages.service\";\r\nimport { ApplicationService } from '../services/core/application.service';\r\nimport { SearchService } from '../services/inventory/search.service';\r\nimport { BreadcrumbsService } from '../services/cms/breadcrumbs.service';\r\nimport { ValidationService } from '../services/core/validation.service';\r\nimport { CheckIfExistService } from '../services/cms/check-existence.service';\r\n\r\n//Components  \r\nimport { HeaderComponent } from '../components/cms/header/widget/header.component';\r\nimport { FooterComponent } from '../components/cms/footer/widget/footer.component';\r\nimport { ArticleCategoryComponent } from '../components/cms/article/sys/article-category.component';\r\nimport { BlogPageComponent } from '../components/cms/article/sys/blog-page.component';\r\nimport { ArticleComponent } from '../components/cms/article/sys/news-page.component';\r\nimport { NewsListComponent } from '../components/cms/article/widget/news-list.component';\r\nimport { SideBarMenuComponent } from '../components/cms/homepage/widget/side-bar-menu.component';\r\nimport { NewsletterComponent } from '../components/cms/footer/widget/newsletter.component';\r\nimport { QuotingMainComponent } from '../components/document/widget/quoting/quoting-main.component';\r\nimport { WizardCommercialeComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-commerciale.component';\r\nimport { WizardEditoriaComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-editoria.component';\r\nimport { WizardAdesiviComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-adesivi.component';\r\nimport { WizardBannerComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-banner.component';\r\nimport { WizardBusteComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-buste.component';\r\nimport { WizardEtichetteComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-etichette.component';\r\nimport { WizardStampaComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-stampa.component';\r\nimport { OtherProductFormComponent } from '../components/document/widget/quoting/other-product-form.component';\r\nimport { QuotingOrderTotalsComponent } from '../components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component';\r\nimport { RegisterComponent } from '../components/settings/user/sys/register.component';\r\nimport { CookiePolicyComponent } from '../components/cms/page/sys/cookie-policy.component';\r\nimport { FaqComponent } from '../components/cms/page/sys/faq.component';\r\nimport { InfoRequestComponent } from '../components/cms/page/sys/info-request.component';\r\nimport { PrivacyPolicyComponent } from '../components/cms/page/sys/privacy-policy.component';\r\nimport { PurchaseConditionComponent } from '../components/cms/page/sys/purchase-condition.component';\r\nimport { CartEmptyPageComponent } from '../components/core/sys/cart-empty-page.component';\r\nimport { ClientAreaOrderListComponent } from '../components/document/sys/client-area-order-list.component';\r\nimport { OtherProductComponent } from '../components/inventory/product/sys/other-product.component';\r\nimport { PromotionsComponent } from '../components/inventory/product/sys/promotions.component';\r\nimport { UserLoginComponent } from '../components/settings/user/sys/user-login.component';\r\nimport { UserPasswordComponent } from '../components/settings/user/sys/user-password.component';\r\nimport { CartComponent } from '../components/inventory/shopping-cart/sys/cart.component';\r\nimport { ClientAreaHomeComponent } from '../components/settings/client-area/sys/client-area-home.component';\r\nimport { ClientAreaProfileComponent } from '../components/settings/client-area/sys/client-area-profile.component';\r\nimport { CartCashComponent } from '../components/inventory/shopping-cart/sys/cart-cash.component';\r\nimport { CartSubmittedComponent } from '../components/inventory/shopping-cart/sys/cart-submitted.component';\r\nimport { SliderWidgetComponent } from '../components/core/widget/slider-widget.component';\r\nimport { ClientAreaOrderDetailsComponent } from '../components/settings/client-area/sys/client-area-order-details.component';\r\nimport { ClientAreaCatalogPrivateComponent } from '../components/settings/client-area/sys/client-area-catalog-private.component';\r\nimport { OfflinePageComponent } from '../components/core/sys/offline-page.component';\r\nimport { NotFoundPageComponent } from '../components/core/sys/not-found-page.component';\r\nimport { RegistrationConfirmationComponent } from \"../components/settings/user/sys/registration-confirmation.component\";\r\nimport { PaymentConfirmationComponent } from \"../components/settings/client-area/sys/payment-confirmation.component\";\r\nimport { PaymentUnicreditConfirmationComponent } from \"../components/settings/client-area/sys/payment-unicredit-confirmation.component\";\r\nimport { PaymentNexiConfirmationComponent } from \"../components/settings/client-area/sys/payment-nexi-confirmation.component\";\r\nimport { PaymentBancaSellaConfirmationComponent } from \"../components/settings/client-area/sys/payment-banca-sella-confirmation.component\";\r\nimport { Ng2TableModule} from 'ng2-table/ng2-table';\r\nimport { Mappings } from './mapping';\r\nimport { DatepickerModule } from 'angular2-material-datepicker';\r\nimport { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';\r\nimport { CryptoService } from '../services/core/crypto.service';\r\nimport { SearchComponent } from '../components/cms/header/widget/search.component';\r\nimport { ClientAreaInvoicesComponent } from '../components/settings/client-area/sys/client-area-invoices.component';\r\nimport { NewsletterPageComponent } from './../components/cms/page/sys/newsletter-page.component';\r\nimport { NewsletterConfirmationPageComponent } from './../components/cms/page/sys/newsletter-confirmation-page.component';\r\nimport { RegistrationConfirmationPageComponent } from './../components/settings/user/sys/registration-complete.component';\r\nimport { CustomersCanvasService } from './../services/inventory/customerscanvas.service';\r\nimport { CanvasWidgetComponent } from '../components/core/widget/canvas-widget.components';\r\nimport { PaypalService } from '../services/core/paypal.service';\r\nimport { QuickRegistrationComponent } from '../components/settings/user/sys/quick-registration.component';\r\nimport { TrustpilotWidgetComponent } from '../components/core/widget/trustpilot-widget.component';\r\nimport { HeaderService } from '../services/cms/header.service';\r\n\r\nconst MODULES = [\r\n  // Do NOT include UniversalModule, HttpModule, or JsonpModule here\r\n  CommonModule,\r\n  RouterModule,\r\n  FormsModule,\r\n  ReactiveFormsModule,\r\n  TranslateModule,\r\n  Ng2TableModule,\r\n  DatepickerModule,\r\n  Ng2Bs3ModalModule,\r\n  ];\r\n\r\nconst PIPES = [\r\n  // put pipes here\r\n];\r\n\r\nconst COMPONENTS = [\r\n  // put shared components here\r\n  HeaderComponent,\r\n  FooterComponent,\r\n  ArticleCategoryComponent,\r\n  BlogPageComponent,\r\n  ArticleComponent,\r\n  NewsListComponent,\r\n  SideBarMenuComponent,\r\n  NewsletterComponent,\r\n  QuotingMainComponent,\r\n  WizardCommercialeComponent,\r\n  WizardEditoriaComponent,\r\n  WizardAdesiviComponent,\r\n  WizardBannerComponent,\r\n  WizardBusteComponent,\r\n  WizardEtichetteComponent,\r\n  WizardStampaComponent,\r\n  OtherProductFormComponent,\r\n  QuotingOrderTotalsComponent,\r\n  CookiePolicyComponent,\r\n  FaqComponent,\r\n  InfoRequestComponent,\r\n  PrivacyPolicyComponent,\r\n  PurchaseConditionComponent,\r\n  CartEmptyPageComponent,\r\n  ClientAreaOrderListComponent,\r\n  ClientAreaInvoicesComponent,\r\n  UserLoginComponent,\r\n  UserPasswordComponent,\r\n  CartComponent,\r\n  ClientAreaHomeComponent,\r\n  ClientAreaProfileComponent,\r\n  CartCashComponent,\r\n  CartSubmittedComponent,\r\n  SliderWidgetComponent,\r\n  ClientAreaOrderDetailsComponent,\r\n  ClientAreaCatalogPrivateComponent,\r\n  RegistrationConfirmationComponent,\r\n  PaymentConfirmationComponent,\r\n  PaymentUnicreditConfirmationComponent,\r\n  PaymentNexiConfirmationComponent,\r\n  PaymentBancaSellaConfirmationComponent,\r\n  OfflinePageComponent,\r\n  NotFoundPageComponent,\r\n  SearchComponent,\r\n  NewsletterPageComponent,\r\n  NewsletterConfirmationPageComponent,\r\n  RegistrationConfirmationPageComponent,\r\n  CanvasWidgetComponent,\r\n  QuickRegistrationComponent,\r\n  TrustpilotWidgetComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n  ModelService,\r\n  ApiService,\r\n  ComponentHelperService,\r\n  TemplateService,\r\n  CmsContentService,\r\n  CompanyService,\r\n  ArticleService,\r\n  CmsMenuListService,\r\n  FaqListService,\r\n  NewsletterService,\r\n  SliderService,\r\n  InfoRequestService,\r\n  LoginService,\r\n  RecoverPasswordService,\r\n  RegisterService,\r\n  LocalStorageService,\r\n  QuotingService,\r\n  CategoryService,\r\n  ProductService,\r\n  ShoppingCartService,\r\n  ClientAreaService,\r\n  AuthService,\r\n  LanguageService,\r\n  ConfigurationService,\r\n  ApplicationService,\r\n  Mappings,\r\n  CmsComponentService,\r\n  SeoService,\r\n  PrivacyPolicyService,\r\n  CookiePolicyService,\r\n  PurchaseConditionService,\r\n  BootboxService,\r\n  LoadingOverlayService,\r\n  MessagesService,\r\n  CheckIfExistService,\r\n  OrderPaymentService,\r\n  ScriptService,\r\n  HelperService,\r\n  CurrencyService,\r\n  CryptoService,\r\n  SearchService,\r\n  BreadcrumbsService,\r\n  ValidationService,\r\n  CustomersCanvasService,\r\n  PaypalService,\r\n  TrustpilotService,\r\n  HeaderService\r\n];\r\n\r\n@NgModule({\r\n  imports: [\r\n    ...MODULES\r\n  ],\r\n  declarations: [\r\n    ...PIPES,\r\n    ...COMPONENTS\r\n  ],\r\n  exports: [\r\n    ...MODULES,\r\n    ...PIPES,\r\n    ...COMPONENTS\r\n  ]\r\n})\r\nexport class SharedModule {\r\n  static forRoot(): ModuleWithProviders {\r\n    return {\r\n      ngModule: SharedModule,\r\n      providers: [\r\n        ...PROVIDERS\r\n      ]\r\n    };\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/shared.module.ts","// the polyfills must be the first thing imported\r\nimport 'angular2-universal-polyfills';\r\nimport 'ts-helpers';\r\nimport './__workaround.browser'; // temporary until 2.1.1 things are patched in Core\r\n\r\n// Angular 2\r\nimport { enableProdMode } from '@angular/core';\r\nimport { platformUniversalDynamic } from 'angular2-universal/browser';\r\nimport { bootloader } from '@angularclass/bootloader';\r\n\r\nimport { load as loadWebFont } from 'webfontloader';\r\n\r\n// enable prod for faster renders\r\nenableProdMode();\r\n\r\nimport { MainModule } from './browser.module';\r\n\r\nexport const platformRef = platformUniversalDynamic();\r\n\r\n// on document ready bootstrap Angular 2\r\nexport function main() {\r\n  // Load fonts async\r\n  // https://github.com/typekit/webfontloader#configuration\r\n  loadWebFont({\r\n    google: {\r\n      families: ['Droid Sans']\r\n    }\r\n  });\r\n\r\n  return platformRef.bootstrapModule(MainModule);\r\n}\r\n\r\n// support async tag or hmr\r\nbootloader(main);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/client.prod.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService  } from '../core/cache.service';\r\nimport { ApiService  } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { LocalStorageService } from \"./../core/local-storage\";\r\n\r\n//Model\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\nimport { CookieService } from \"./cookie/cookie.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { CryptoService } from \"./crypto.service\";\r\n\r\n@Injectable()\r\nexport class AuthService \r\n{\r\n    private loggedInUser: UserLogin = null;\r\n\r\n    constructor\r\n    (\r\n        public _api: ApiService, public _cache: CacheService,\r\n              @Inject('CookieService') private cookie: CookieService,\r\n              private router: Router,\r\n              private cryptoService: CryptoService    \r\n        ) {}\r\n\r\n    GetData() \r\n    {\r\n        let user: UserLogin = new UserLogin()\r\n\r\n        if (this.cookie.getObject(\"user\") === undefined) \r\n        {\r\n            this.loggedInUser = null;\r\n        }\r\n\r\n        else if (this.cookie.getObject(\"user\") != undefined) \r\n        {\r\n            let regUser = this.cookie.getObject(\"user\");\r\n            user.username = regUser[\"username\"];\r\n\r\n            user.isAuthenticated = Boolean(regUser[\"isAuthenticated\"]);\r\n            let registeredUser = { \"isAuthenticated\": user.isAuthenticated, \"username\": user.username }\r\n            this.loggedInUser = registeredUser;\r\n            user = this.loggedInUser;\r\n        }\r\n        \r\n        return user;\r\n    }\r\n\r\n    GetUserId()\r\n    {\r\n        let decryptedUserId = \"0\";\r\n        let encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n        if (encryptedUserId != null || encryptedUserId != undefined)\r\n        {\r\n            decryptedUserId = encryptedUserId;                        \r\n        }\r\n        else \r\n        {\r\n            decryptedUserId = this.cryptoService.encryptNumber(Number(decryptedUserId)); \r\n        }\r\n        \r\n        return decryptedUserId;\r\n    }\r\n\r\n    GetDecryptedUserId()\r\n    {\r\n        let decryptedUserId = 0;\r\n        let encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n\r\n        if (encryptedUserId != null || encryptedUserId != undefined)\r\n        {\r\n            decryptedUserId = this.cryptoService.decryptNumber(encryptedUserId);            \r\n        }\r\n        else \r\n        {\r\n            decryptedUserId = Number(this.cryptoService.encryptNumber(decryptedUserId));                        \r\n        }\r\n        \r\n        return decryptedUserId;\r\n    }\r\n\r\n\r\n    Login(id: string, username: string) \r\n    {\r\n        let user: UserLogin = new UserLogin();\r\n        \r\n        // user.id = Number(id);\r\n        user.isAuthenticated = true;\r\n        user.username = username;\r\n        \r\n        let cryptedUserId = this.cryptoService.encryptNumber(Number(id));\r\n\r\n        this.cookie.putObject(\"user\", {\"isAuthenticated\":\"true\", \"username\":username})\r\n\r\n        this.cookie.put(\"qazwsxedc\", cryptedUserId);\r\n    }\r\n\r\n    Logout() \r\n    {\r\n        this.loggedInUser = null;\r\n        this.cookie.remove(\"user\");\r\n        this.cookie.remove(\"qazwsxedc\");\r\n        \r\n        var currentRoute = this.router.url;\r\n\r\n        if (currentRoute == \"/it/home\" || \"/en/home\"|| \"/de/home\"|| \"/al/home\")\r\n        {\r\n            window.location.reload();\r\n        }\r\n\r\n        this.router.navigateByUrl(\"\");\r\n    }\r\n\r\n    getCurrentUserId(): string\r\n    {        \r\n        let userId = this.GetUserId();\r\n\r\n        return userId;\r\n    }\r\n\r\n    setTemplBuilderId(templateBuilderId: string) {\r\n      this.cookie.put(\"templateBuilderId\", templateBuilderId);\r\n    }\r\n\r\n    getTemplBuilderId(): string {\r\n      let templateBuilderId = this.cookie.get(\"templateBuilderId\");\r\n      if (templateBuilderId == undefined||templateBuilderId == \"undefined\") {\r\n        templateBuilderId = \"0\";\r\n      }\r\n      return templateBuilderId\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/auth.service.ts","export class ClientAreaDetails {\r\n    ClientCode: number;\r\n    ClientDal: Date;\r\n    ClientCategory: string\r\n    ClientTopology: string;\r\n    AssociatedList: string;\r\n    LastOrderNumber: string;\r\n    LastOrderDate: Date;\r\n    OrdersQueued: number;\r\n    OrdersProcessing: number;\r\n    CurrentOrders: number;\r\n    OrdersCancelled: number;\r\n    LastQuoteNumber: string;\r\n    LastQuoteDate: Date;\r\n    QuotesOnHold: number;\r\n    ConfirmedQuotes: number\r\n    EstimatedSentOrders: number;\r\n    NewNoteOrdersCount: number;\r\n    OrderNoteList: ClientAreaOrderNote[];\r\n    FormattedDateOrder: string;\r\n    FormattedDateQuote: string;\r\n    HeaderData: any;\r\n    FooterData: any;\r\n}\r\n\r\nexport class ClientAreaOrderNote {\r\n    OrderId: number;\r\n    UserCreated: string;\r\n    DateCreated: string;\r\n    OrderName: string;\r\n    NoteDescription: string;\r\n}\r\n\r\nexport class ClientAreaUserProfile {\r\n    CompanyName: string;\r\n    Piva: string;\r\n    TaxCode: string;\r\n    ContactFirstName: string;\r\n    ContactLastName: string;\r\n    Address: string;\r\n    City: string;\r\n    AreaCode: string;\r\n    ZipCode: string;\r\n    ContactPhone: string;\r\n    ContactMobile: string;\r\n    UserGroup: number;\r\n    DefaultAddressId: number;\r\n    Password: string;\r\n    Addresses: ClientAreaUserAddress[];\r\n    ClientCategory: string;\r\n    HeaderData: any;\r\n    FooterData: any;\r\n}\r\n\r\nexport class ClientAreaUserAddress {\r\n    AddressId: number;\r\n    Recipient: string;\r\n    Address: string;\r\n    City: string;\r\n    Province: string;\r\n    ZipCode: string;\r\n    Phone: string;\r\n    Mobile: string;\r\n    DefaultAddress: number;\r\n}\r\nexport class ClientAreaOrderDetails {\r\n    OrderId: number;\r\n    OrderNumber: string;\r\n    Status: number;\r\n    Price: number;\r\n    StringPrice: string;\r\n    Payment: number;\r\n    Shipment: number;\r\n    FileVerification: boolean;\r\n    Jobname: string;\r\n    OrderDate: Date;\r\n    ShippingDeliveryDate: Date;\r\n    UserCreated: string;\r\n    ReferenceAndQuote: number;\r\n    TotalProcesses: number;\r\n    Voucher: string;\r\n    Processes: number;\r\n    AdditionalMode: number;\r\n    ShipmentCost: number;\r\n    TaxCost: number;\r\n    Vat: number;\r\n    TotalCost: number;\r\n    Name: string;\r\n    Piva: string;\r\n    TaxCode: string;\r\n    Address: string;\r\n    ZipCode: string;\r\n    City: string;\r\n    ContactPhone: string;\r\n    Email: string;\r\n    ShipingType: string;\r\n    Recipient: string;\r\n    ShippingAddress: string;\r\n    ShipingZipCode: string;\r\n    ShipingProvince: string;\r\n    ShipingCity: string;\r\n    ShipingTelephone: string;\r\n    ShipingMobile: string;\r\n    PaymentType: string;\r\n    PaymentDescription: string;\r\n    TotalWeight: number;\r\n    CompanyName: string;\r\n    OrderNoteList: ClientAreaOrderNote[];\r\n    ProcessingOrderList: ClientAreaProcessingOrders[];\r\n    OrderProcessMessageList: ClientAreaOrderProcessMessages[];\r\n    PdfUrl: string;\r\n    Currency: any;\r\n    CurrencyCode: string;\r\n    GatewayAccount: string;\r\n    PaymentDoneUrl: string;\r\n    TrackingUrl: string;\r\n    GatewayUrl: string;\r\n    PaymentStatus: number;\r\n    StrTotalBeforeTax: string;\r\n    BonificoCro: string;\r\n    BonificoTrn: string;\r\n    IsNewPaypalIntegration: boolean;\r\n    UsePaypalProduction: boolean;\r\n    PaypalButtonStyle: PaypalButtonStyleModel;\r\n    HeaderData: any;\r\n    FooterData: any;\r\n    NexiModel: any;\r\n    BancaSellaModel: any;\r\n}\r\n\r\nexport class PaypalButtonStyleModel {\r\n    PaypalButtonColor: string;\r\n    PaypalButtonHeight: string;\r\n    PaypalButtonLabel: string;\r\n    PaypalButtonShape: string;\r\n    PaypalButtonSize: string;\r\n    PaypalButtonTagline: boolean;\r\n}\r\n\r\nexport class ClientAreaProcessingOrders {\r\n    Id: number;\r\n    Jobname: string;\r\n    RefererName: string;\r\n    Status: number;\r\n    FileVerification: boolean;\r\n    Details: string;\r\n    FileUploadUrl: string;\r\n    FileUploadSecuredUrl: any;\r\n    PreflightUploadUrl: any;\r\n    PreflightUploadSecuredUrl: any;\r\n    FileProvider: string;\r\n    Files: ClientAreaOrderProcessFile[];\r\n    TipoTrasporto: string;\r\n    DeliveryTime: string;\r\n}\r\nexport class ClientAreaOrderProcessMessages {\r\n    CreatedBy: string;\r\n    Subject: string;\r\n    Description: string;\r\n    From: number;\r\n    StringDateCreated: string;\r\n}\r\n\r\nexport class ClientAreaOrderProcessFile {\r\n    FileName: string;\r\n    Size: string;\r\n    UploadDate: Date;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/settings/client-area.ts","import { ShoppingCartService } from './../inventory/shopping-cart.service';\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { Register } from \"./../../models/cms/register\";\r\nimport { LanguageService } from './language.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class RegisterService {\r\n  constructor\r\n    (\r\n      public _api: ApiService,\r\n      public _cache: CacheService,\r\n      private mappings: Mappings,\r\n      private cartService: ShoppingCartService,\r\n      private languageService: LanguageService,\r\n      private authService: AuthService,\r\n  ) { }\r\n\r\n  private facebookLoginData: any;\r\n\r\n  sendInfoRequest(parameters: Register) {\r\n    let cartId = this.cartService.getCartId();\r\n    parameters.CartId = cartId;\r\n\r\n    parameters.EmailRegister = parameters.EmailRegister ? parameters.EmailRegister.toLowerCase() : \"\";\r\n    parameters.EmailRepeat = parameters.EmailRepeat ? parameters.EmailRepeat.toLowerCase() : \"\";\r\n    parameters.PecEmail = parameters.PecEmail ? parameters.PecEmail.toLowerCase() : \"\";\r\n\r\n    return this._api.post(this.mappings.Web_Api_Post_Register, parameters)\r\n      .do(result => result)\r\n      .share();\r\n  }\r\n\r\n  getRegisterPageData() {\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let lang = this.languageService.getLongLang();\r\n    let templateBuilderId: string = this.authService.getTemplBuilderId();\r\n\r\n    let url = this.mappings.Web_Api_Get_Register_Data\r\n      .replace('{lang}', lang)\r\n      .replace('{userid}', customerId)\r\n      .replace('{cartid}', cartId)\r\n      .replace('{templatebuilderid}', templateBuilderId);\r\n\r\n    return this._api.get(url);\r\n  }\r\n\r\n  confirmationRegistration(id: string) {\r\n    let url = this.mappings.Web_Api_Post_Confirm_Registration.replace('{id}', id);\r\n\r\n    return this._api.post(url);\r\n  }\r\n\r\n  setFacebookLoginData(registerData: any) {\r\n    this.facebookLoginData = registerData;\r\n  }\r\n\r\n  getFacebookLoginData() {\r\n    return this.facebookLoginData;\r\n  }\r\n\r\n  getRegistrationCompletePageData() {\r\n    let lang = this.languageService.getLongLang();\r\n    let customerId = this.authService.GetUserId();\r\n    let cartId = this.cartService.getCartId();\r\n    let url = this.mappings.Web_Api_Get_Registration_Complete_Page_Data\r\n      .replace('{lang}', lang)\r\n      .replace('{userid}', customerId)\r\n      .replace('{cartid}', cartId);\r\n\r\n    return this._api.get(url);\r\n  }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/register.service.ts","/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\nimport {Injectable, Inject } from '@angular/core';\r\n// es6-modules are used here\r\nimport {DomAdapter, getDOM} from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n\r\n/**\r\n * Represent meta element.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * { name: 'application-name', content: 'Name of my application' },\r\n * { name: 'description', content: 'A description of the page', id: 'desc' }\r\n * // ...\r\n * // Twitter\r\n * { name: 'twitter:title', content: 'Content Title' }\r\n * // ...\r\n * // Google+\r\n * { itemprop: 'name', content: 'Content Title' },\r\n * { itemprop: 'description', content: 'Content Title' }\r\n * // ...\r\n * // Facebook / Open Graph\r\n * { property: 'fb:app_id', content: '123456789' },\r\n * { property: 'og:title', content: 'Content Title' }\r\n * ```\r\n *\r\n * @experimental\r\n */\r\nexport interface MetaDefinition {\r\n  charset?: string;\r\n  content?: string;\r\n  httpEquiv?: string;\r\n  id?: string;\r\n  itemprop?: string;\r\n  name?: string;\r\n  property?: string;\r\n  scheme?: string;\r\n  url?: string;\r\n  [prop: string]: string;\r\n}\r\n\r\n/**\r\n * A service that can be used to get and add meta tags.\r\n *\r\n * @experimental\r\n */\r\n@Injectable()\r\nexport class Meta {\r\nconstructor(@Inject(DOCUMENT) private _document: any) {}\r\n\r\n  private _dom: DomAdapter = getDOM();\r\n\r\n  /**\r\n   * Adds a new meta tag to the dom.\r\n   *\r\n   *  ### Example\r\n   *\r\n   * ```ts\r\n   * const name: MetaDefinition = {name: 'application-name', content: 'Name of my application'};\r\n   * const desc: MetaDefinition = {name: 'description', content: 'A description of the page'};\r\n   * const tags: HTMLMetaElement[] = this.meta.addTags([name, desc]);\r\n   * ```\r\n   *\r\n   * @param tags\r\n   * @returns {HTMLMetaElement[]}\r\n   */\r\n  addTags(...tags: Array<MetaDefinition|MetaDefinition[]>): HTMLMetaElement[] {\r\n    const presentTags = this._flattenArray(tags);\r\n    if (presentTags.length === 0) return [];\r\n    return presentTags.map((tag: MetaDefinition) => this._addInternal(tag));\r\n  }\r\n\r\n  /**\r\n   * Gets the meta tag by the given selector. Returns element or null\r\n   * if there's no such meta element.\r\n   *\r\n   *  ### Example\r\n   *\r\n   * ```ts\r\n   * const meta: HTMLMetaElement = this.meta.getTag('name=description');\r\n   * const twitterMeta: HTMLMetaElement = this.meta.getTag('name=\"twitter:title\"');\r\n   * const fbMeta: HTMLMetaElement = this.meta.getTag('property=\"fb:app_id\"');\r\n   * ```\r\n   *\r\n   * @param selector\r\n   * @returns {HTMLMetaElement}\r\n   */\r\n  getTag(selector: string): HTMLMetaElement {\r\n    if (!selector) return null;\r\n    return this._dom.query(`meta[${selector}]`);\r\n  }\r\n\r\n  /**\r\n   * Updates the meta tag with the given selector.\r\n   *\r\n   * *  ### Example\r\n   *\r\n   * ```ts\r\n   * const meta: HTMLMetaElement = this.meta.updateTag('name=description', {name: 'description',\r\n   * content: 'New description'});\r\n   * console.log(meta.content); // 'New description'\r\n   * ```\r\n   *\r\n   * @param selector\r\n   * @param tag updated tag definition\r\n   * @returns {HTMLMetaElement}\r\n   */\r\n  updateTag(selector: string, tag: MetaDefinition): HTMLMetaElement {\r\n    const meta: HTMLMetaElement = this.getTag(selector);\r\n    if (!meta) {\r\n      // create element if it doesn't exist\r\n      return this._addInternal(tag);\r\n    }\r\n    return this._prepareMetaElement(tag, meta);\r\n  }\r\n\r\n  /**\r\n   * Removes meta tag with the given selector from the dom.\r\n   *\r\n   *  ### Example\r\n   *\r\n   * ```ts\r\n   * this.meta.removeTagBySelector('name=description');\r\n   * ```\r\n   *\r\n   * @param selector\r\n   */\r\n  removeTagBySelector(selector: string): void {\r\n    const meta: HTMLMetaElement = this.getTag(selector);\r\n    this.removeTagElement(meta);\r\n  }\r\n\r\n  /**\r\n   * Removes given meta element from the dom.\r\n   *\r\n   *  ### Example\r\n   *  ```ts\r\n   * const elem: HTMLMetaElement = this.meta.getTag('name=description');\r\n   * this.meta.removeTagElement(elem);\r\n   * ```\r\n   *\r\n   * @param meta meta element\r\n   */\r\n  removeTagElement(meta: HTMLMetaElement): void {\r\n    if (meta) {\r\n      this._removeMetaElement(meta);\r\n    }\r\n  }\r\n\r\n  setTitle(title:string): void\r\n  {\r\n      this._document.title = title\r\n  }\r\n\r\n  private _addInternal(tag: MetaDefinition): HTMLMetaElement {\r\n    const meta: HTMLMetaElement = this._createMetaElement();\r\n    this._prepareMetaElement(tag, meta);\r\n    this._appendMetaElement(meta);\r\n    return meta;\r\n  }\r\n\r\n  private _createMetaElement(): HTMLMetaElement {\r\n    return this._dom.createElement('meta') as HTMLMetaElement;\r\n  }\r\n\r\n  private _prepareMetaElement(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\r\n    Object.keys(tag).forEach((prop: string) => this._dom.setAttribute(el, prop, tag[prop]));\r\n    return el;\r\n  }\r\n\r\n  private _appendMetaElement(meta: HTMLMetaElement): void {\r\n    const head = this._document.head;\r\n    this._dom.appendChild(head, meta);\r\n  }\r\n\r\n  private _removeMetaElement(meta: HTMLMetaElement): void {\r\n    const head = this._dom.parentElement(meta);\r\n    this._dom.removeChild(head, meta);\r\n  }\r\n\r\n  private _flattenArray(input: any[], out: any[] = []): any[] {\r\n    if (input) {\r\n      for (let i = 0; i < input.length; i++) {\r\n        const item: any = input[i];\r\n        if (Array.isArray(item)) {\r\n          this._flattenArray(item, out);\r\n        } else if (item) {\r\n          out.push(item);\r\n        }\r\n      }\r\n    }\r\n    return out;\r\n  }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/angular2-meta.ts"],"sourceRoot":""}