{"version":3,"sources":["webpack:///main.bundle.js","webpack:///./src/+app/shared/mapping.ts","webpack:///./src/+app/services/cms/register.service.ts","webpack:///./src/+app/services/core/angular2-meta.ts","webpack:///./src/+app/services/core/api.service.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/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/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/models/document/quoting-submit-model.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-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/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/models/constants/quoting-constants.ts","webpack:///./src/+app/services/document/quoting.service.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/services/settings/client-area.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/core/cart.ts","webpack:///./src/+app/models/settings/client-area.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_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","100","shopping_cart_service_1","cache_service_1","api_service_1","mapping_1","language_service_1","auth_service_1","RegisterService","_api","_cache","mappings","cartService","languageService","authService","prototype","sendInfoRequest","parameters","cartId","getCartId","CartId","EmailRegister","toLowerCase","EmailRepeat","PecEmail","post","do","result","share","getRegisterPageData","customerId","GetUserId","lang","getLongLang","templateBuilderId","getTemplBuilderId","url","replace","get","confirmationRegistration","id","setFacebookLoginData","registerData","facebookLoginData","getFacebookLoginData","getRegistrationCompletePageData","ApiService","_b","CacheService","_c","_d","ShoppingCartService","_e","LanguageService","_f","AuthService","101","dom_adapter_1","platform_browser_1","Meta","_document","_dom","getDOM","addTags","_this","tags","_i","arguments","length","presentTags","_flattenArray","map","tag","_addInternal","getTag","selector","query","updateTag","meta","_prepareMetaElement","removeTagBySelector","removeTagElement","_removeMetaElement","setTitle","title","_createMetaElement","_appendMetaElement","createElement","el","keys","forEach","prop","setAttribute","head","appendChild","parentElement","removeChild","input","out","i","item","Array","isArray","push","__param","Inject","DOCUMENT","11","http_1","Observable_1","node_logger_service_1","cookie_1","responseStatuses","noContent","authRequired","http","cache","nodeLogger","isBrowser","cookie","clientSideCaching","options","has","obs","Observable","of","clear","createAuthorizationHeader","extractData","json","set","catch","err","handleError","startDate","Date","AddLogWithTime","endDate","timeDiff","Math","abs","getTime","diffMs","ceil","getUniversalCached","body","token","headers","Headers","append","res","status","empty","handleUnauthorized","throw","window","location","href","Http","NodeLoggerService","Boolean","CookieService","12","angular2_meta_1","core_2","SeoService","metaService","translate","setSeoInformation","seoInformation","name","content","Keywords","Description","property","Title","SeoRobots","updateCanonicalTag","rel","Url","setSeoUserArea","getLabel","label","message","subscribe","getCanonicalLink","canonical","_prepareLinkElement","_addInternalCanonical","generateSeoDomServerSide","document","renderer","seoData","rootElement","h1","h2","h3","nodeList","description","setElementClass","H1","createText","H2","H3","includes","ShortDescription","setElementProperty","LongDescription","projectNodes","generateSiteMapList","SiteMapList","siteMapHtml","stringToInject","element","appendHtmlString","template","div","setInnerHTML","insertAllBefore","lastChild","childNodes","appendScriptsToDOM","childNodesAsList","insertAfter","setSeoMetaData","imgLink","updateMetaDataTitle","createMetaTagUniversalAttribute","createMetaTagUniversalProperty","value","setText","selectRootElement","elementType","propertyNameFirst","valueFirst","propertyNameSecond","valueSecond","elem","setElementAttribute","_createLinkElement","_appendLinkElement","TranslateService","128","ArticleService","getArticleList","category","listtype","getArticleDetails","toString","getArticleByUrl","seoUrl","GetArticleByCategoryIdandRows","categoryId","startRowIndex","maxRows","getBlogData","getArticleListCategory","getCategoryArticleById","getArticleCategoryByUrl","categoryUrl","129","rxjs_1","HeaderService","toShowQuickRegistration","loginInfo","GetData","loggedInUser","BehaviorSubject","getLoggedInUser","asObservable","setLoggedInUser","user","next","setToShowQuickRegistration","toShow","130","api","isNode","getConfig","defineProperty","ACCESS_TOKEN_KEY","enumerable","configurable","getToken","params","getCredentialsParams","access_token","put","URLSearchParams","credentials","username","password","fs","JSON","parse","readFileSync","setConfigToCache","APPLICATION_CONFIG","privateKeys","configForCache","key","hasOwnProperty","indexOf","131","CompanyService","getCompany","132","router_1","MessagesService","router","setMessagesAsRead","Router","133","ValidationService","validatePhoneNumber","event","pattern","inputChar","String","fromCharCode","charCode","test","preventDefault","134","currency_service_1","ProductService","currencyService","getProductDetails","productId","productType","getCurrentUserId","curr","getCurrency","getProductsPromotionsData","getProductDetailsBySeoUrl","getPriceData","CurrencyService","16","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","pageType","SeoInformation","HasScripts","response","setGoogleScripts","seoInfo","AnalyticsId","gtag","page_path","UrlForSeo","178","LoginService","langService","sendLoginRequest","email","Email","Password","btoa","CartID","authentificateUser","firstName","lastName","FirstName","LastName","Lang","quickRegister","userInfo","CustomerGroup","CodiceFiscale","PartitaIva","Newsletter","19","cookie_service_1","cart_1","cookieService","customizationData","isProductCanvasEdited","saveCart","userId","paymentId","shipmentId","applyVoucher","voucherCode","getCustomerId","getLang","param","CustomerID","Voucher","Language","Currency","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","CartInfo","Products","Addresses","Payments","Shipments","getCartPaymentShipment","addWizardCalcolatoToCart","wizardId","lavId","canvasData","getIfProductIsCanvasEdited","getCustomizationCanvasData","isCanvasEdited","LavID","CanvasStateId","stateId","CanvasHiResOutputUrls","hiResOutputUrls","addApProductToCart","getRiorderCart","addWizardCalcolatoScontisticaToCart","dateId","DateID","addWizardListinoToCart","quantityId","QuantityID","addOtherProductListinoToCart","combinationId","CombinationId","addOtherProductListinoScontisticaToCart","addOtherProductCalcolatoListinoToCart","strVariantiCalcolate","StrVariantiCalcolate","addOtherProductCalcolatoListinoScontisticaToCart","addOtherProductCalcolatoScontisticaToCart","addWizardListinoScontisticaBusteToCart","idPantoneFronte1","idPantoneFronte2","idPantoneRetro1","idPantoneRetro2","IdPantoneFronte1","IdPantoneFronte2","IdPantoneRetro1","IdPantoneRetro2","addWizardListinoBusteToCart","addWizardListinoScontisticaToCart","addStaticProductToCart","addStaticProductScontisticaToCart","addMatrixProductToCart","Type","setCartId","updateCart","getCart","initCart","setPayment","PaymentID","setShipment","ShippmentID","removeFromCart","isCartValid","flagPayment","Selected","flagShipment","addProductRiorderToCart","getEmptyCartPageData","setIfProductIsCanvasEdited","isEdited","setCustomizationCanvasData","newData","resetCanvasData","emptyObj","_g","20","_key","normalizeKey","_escapedHtml","encodeURIComponent","decodeURIComponent","delete","clearAll","dehydrate","rehydrate","toJSON","isDevMode","_isInvalidValue","Error","Number","isNaN","KEY","21","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","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","idCartoncino","nomeCartoncino","idGrammatureCartoncino","nomeGrammatureCartoncino","numDiametroInternoAnimaLabel","numDiametroMassimoEsternoAnimaLabel","numEtichette","idAvvolgimento","idFustella","idFormatoTipo","idTipoLavoroLabel","subSection","MatrixModelCalculation","LavorazioniAccessorieModel","valoreLavorazione","numWidthFormValue","numHeightFormValue","numDepthFormValue","tipo","PriceEstimationModel","UnitPrice","Imponibile","Iva","Total","TotalAmount","WeightUm","Weight","DayName","DayNumber","Quantity","AltezzaDorso","PrezzoOriginaleimporto","DayDescriptionName","FileCombinationModel","wizardFormAdesiviModel","wizardFormBandieraModel","wizardFormBannerModel","wizardFormBusteModel","fronte","wizardFormCommercialeModel","wizarFormEtichetteModel","wizardFormStampaModel","22","breadcrumbs_1","BreadcrumbsService","translateService","homeIsInit","setHomeBreadcrumb","breadcrumbsList","Level","getShortLang","homeLink","bread","Breadcrumbs","BreadcrumbLink","BreadcrumbName","unshift","setBreadcrumbs","breadcrumbs","x","toLocaleLowerCase","getBreadcrumbs","252","Register","QuickRegister","emailRepeat","telephone","customerGroup","CF","PIVA","oldGroup","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","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","getCategoryPriceData","263","SearchService","queryText","getCategoriesAndProducts","startRow","endRow","getQueryValue","setQueryValue","newQuery","setQueryPlainTextValue","getQueryPlainTextValue","29","currencyVal","getCurrencyBackend","getDefaultCurrency","setDefaultCurrency","3","appService","currentLang","getCurrentLanguage","LanguageObj","36","TemplateService","getThankYouPagePaypalInfo","componentType","getThankYouPagOnlineInfo","getThankYouNexiInfo","messaggio","orario","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","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","filter","Code_Category","res_1","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","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","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","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","CartAddressModel","carrello","ShoppingCart","selectedAddress","selectedPayment","CartPaymentModel","selectedShipment","CartShipmentModel","showValidationLabels","cartCashAccepted","isVoucherValid","isVoucherInvalid","isVoucherApplied","disableButtonCart","spinnerCartCash","pageIsOnDestroy","pageIsInitAfter","carrelloPageName","spinnerCart","payments","shipments","shipment","CurrentAddress","completeAddress","lastIndex","addressStreet","addressNumber","AddressNumber","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","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","PaymentType","PaymentStatus","StrTotalBeforeTax","IsNewPaypalIntegration","PaypalButtonStyle","DomSanitizer","396","register_service_1","user_login_1","company_1","CartComponent","cartDataSub","getShoppingCartData","shoppingCartData","registerService","selectedPaymentId","selectedShipmentId","userLogin","UserLogin","disableModalCartButtons","showProceedBtn","parentWidgetData","CanvasInfo","clickedProductId","canvasSub","isCanvasModalOpened$","isModalOpened","scrollTo","canvasEditedSub","isCanvasProductDesignApproved$","isDesignApproved","canvasData_1","RowIdPrev","updateCanvas","updatePrevCanvasInfo","find","obj","openCanvasEditor","CanvasUrl","canvasConfigData","setCanvasConfig","TemplateImagesFolderPath","CustomerCanvasUserName","Watermark","WatermarkText","CanvasApiKey","ApiKey","toShowCanvasButton","isModuleActive","IsActiveCanvasModule","isUserAuthenticated","removeCustomersCanvasState","selectedProduct","deleteCustomerCanvasState","goRegistrationPage","quickRegistration","registerRoute","isCompletedRegistration","userData","goLoginPage","goToConfirmPurchasePage","goToModifyProfile","saveCartSub","selectRadioPayment","paymentSub","selectRadioShipment","shipmentSub","removeCartSub","idOfProduct","UserData","IsCompletedRegistration","Id_User_Group","CodiceDestinatarioSDL","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","callback","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","ProcessingOrderList","process","FileUploadSecuredUrl","FileUploadUrl","PreflightUploadSecuredUrl","PreflightUploadUrl","TrackingUrl","addClass","removeClass","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","order_payment_service_1","PaymentConfirmationComponent","paramsObj","isNewPaypalImplementation","orderCheckout","orderid","thankYouSub","typeId","urlParams","orderPaymentService","success","failed","serverError","createScript","item_number","hashedOrderId","paramsRouteSub","encryptedOrder","st","setOrderAsPaid","orderPaySub","403","PaymentNexiConfirmationComponent","errorMessage","404","PaymentUnicreditConfirmationComponent","resultPagOnline","split","405","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","406","RegisterComponent","isQuickRegistration","registerSub","IsActiveQuickRegistration","isQuickRegistrationActive","siteKey","theme","emailError","passwordError","validEmail","showEmailInvalid","showPivaInvalid","showCFInvalid","isValidCodDest","isValidPecEmail","isRequiredPecEmail","quickRegisteredUser","registerViaFbData","disableFbDataFields","cartRoute","homepageRoute","customerTypeList","UserTypes","CustomerType","getObject","setModelDataFromCookies","setModelDataFromFb","isQuickRegistered","disableFieldsFilledFromFbData","reg","emailValid","piva","selected","navigateToCorespondingPage","isRegisterFailed","registrationCompletePage","setVerified","isCaptchaInvalid","onCustomerTypeChange","_s","_t","_u","407","RegistrationConfirmationPageComponent","registrationDoneSub","isRegisteredViaFacebook","408","RegistrationConfirmationComponent","registrationConfirmation","compTemplateSub","active","userid","checkActivation","confirmRegSub","409","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","error","first_name","last_name","loginDataSub","fbCode","FacebookAppID","initFacebook","init","appId","xfbml","version","recoverPassword","recoverPassSub","recoverPasswordFailed","recoverPasswordSuccess","410","UserPasswordComponent","411","News","UrlRedirect","412","pageId","pageUrl","413","setPageUrl","menus","SeoUrl","Children","LoadData","414","415","416","SliderService","417","TrustpilotService","getTrustpilotData","418","419","CookieOptions","path","domain","expires","secure","isPresent","merge","420","421","422","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","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","44","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","getElementById","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","465","webpackEmptyContext","req","468","__compiler__","__core_private__","ViewUtils","view_utils","SelectorMatcher","CssSelector","o","__compiler_private__","469","getLRU","lru","Map","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","a","deps","RouterModule","useHash","preloadingStrategy","IdlePreload","IdlePreloadModule","AppModule","providers","RequestOptions","useClass","DefaultRequestOptions","CookieBrowserService","RoutesBrowserService","useValue","49","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","57","QuotingModel","categorieCarteCount","categorieCarteCopertinaCount","carte1Count","carte2Count","colori1Count","colori2Count","grammature1Count","grammature2Count","plastificazioni1Count","plastificazioni2Count","piegatureCount","materialiFlessibiliCount","copieCount","supportiRigidiCount","elettrosaldatureCount","tagliCount","copertineCount","rilegatureCount","facciateCount","tipologieBustaCount","multiploFacciate","copieIsValid","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","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","isVisible","WizardListinoScontistica","SelectObject","MyVarianteMatrice","MyLavorazioneAccessoria","isValid","valoriCount","Regola","MyLavorazioneAccessoriaReturn","LavorazioniComponents","checkBox","inputBox","selectBox","593","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","594","NewsListComponent","subComponentTemplateUrl","newsOrientation","templateData","headerTypeNews","inputItems","inputCategory","inputNewsOrientation","inputHeaderTypeNews","inputColumns","ArticleList","595","FooterComponent","parentFooterData","footerData_1","footerSub","getFooterData","loggedIdUser","isActiveQuickRegistration","faqPageName","privacyPageName","cookiePageName","purchasePageName","contactPageName","passwordPageName","areaClientiPageName","isArrayInit","linkStart","linkSecuredStart","Facebook","Youtube","Twitter","Website","Instagram","newsletterSub","596","NewsletterComponent","pageTemplateSub","CheckboxFooter","privacyPageNameNewsletter","597","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","598","599","SideBarMenuComponent","sideType","parentSideMenuData","bredcrumpInfo","600","601","CanvasWidgetComponent","canvasWidgetComponent","finishDesign","isCanvasModalOpened","initSlider","602","slider_service_1","SliderWidgetComponent","parentSliderData","sliderData_1","sliderDataSub","getSliderData","sliderService","elementRef","slides","Slides","sliderIsInit","setElementStyle","goToUrl","603","trustpilot_service_1","TrustpilotWidgetComponent","trustpilotService","trustpilotType","trustpilotSub","trustpilotData","trustboxesRef","querySelectorAll","singleTrustboxInstance","Trustpilot","loadFromElement","604","QuotingOrderTotalsComponent","orderTotalSub","_elementChildRef","605","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","listaRegole","calculationType","companyCondizioni","lavorazioniAccessorie","lavAcc","convertLogicalToViewModelVarianti","obbligatorio","hasInfo","showInfo","valori","lavorazioneCheckValue","isCalculated","tipoSelezione","idVarianteMatriceOrizzontale","idVarianteMatriceVerticale","valore","intFormValue","variante","varianteMatrice","VarianteVerticale","VarianteOrizzontale","isMatrix","option","varianteMatverticale","chiave","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","copieMessage","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","priceRow","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","t","isCellSelected","isColumnSelectedListino","IsSelected","StrDiscountedPrice","DataId","DayId","DayDescriptionStatus","StrUnitPrice","StrIva","StrDiscountedPriceWithTax","StrWeight","StrWeightUm","PrezzoOriginalestato","setTypePriceResult","setSelectedIndexListino","addToCartApProduct","addToCartOtherProductCalcolatoScontistica","addToCartWizardListino","addToCartWizardListinoScontistica","Varianti","textAreaCheck","setPopoverVariableForMAtrix","QuotingService","606","QuotingMainComponent","compSub","QResourceId","QMacroCat","QType","InputMacroCatId","InputTypeId","ParentComponent","607","quoting_submit_model_4","WizardAdesiviComponent","wizardSub","getWizardAdesiviData","waiting","carteValue","blockquoting","isCalculatedWizard","addToCartWizardCalcolato","addToCartWizardCalcolatoScontistica","valueStampaInternoSoloFronte","valueStampaCopertinaSoloFronte","parameterValidation","isUserLoggedIn","CheckRegoleAdesivi","oldMateriale","oldSupporto","oldFormato","oldPlastificazione","lavAccArray","idFormato","ApplicaRegole","onFormatiChange","onPlastificationInternoChange","onMaterialeChange","onSuportoChange","lavorazioniAccessorieComboChange","CheckRegoleManifesti","CheckRegolePannelli","lavAccArray_3","validationCopie","validationSoggetti","validationFormati","validationBaseFormati","validationAltezzaFormati","validationMateriali","validationSupporti","countPlastificazioni","validationLavorazioneAccessoria","selectFileCombination","plastificazioni1","listaFile","FilesCombinazioniObj","listaFilesCombinazioni","file","FormatId","fileObj","PathFile","NomeFile","FileName","PathIstruzioni","NomeIstruzioni","FileIstructionName","checkZero","lavorazioneAccessoria","sort","b","calcWizSub","getCalculatedWizard","$wrapper","dataset","appendTo","base","minBase","minimoBase","maxBase","massimoBase","minAltezza","minimoAltezza","maxAltezza","massimoAltezza","soggettiMessage","minimoCopie","massimoCopie","formati","formatiMessage","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","608","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","609","WizardBusteComponent","getWizardBusteData","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","61","610","WizardCommercialeComponent","getWizardCommercialeData","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","611","quoting_model_2","WizardEditoriaComponent","getWizardEditoriaData","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","612","WizardEtichetteComponent","getWizardEtichetteData","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","613","WizardStampaComponent","getWizardStampaData","isStampaBifaccialeNoHide","isStampaBifaccialeSiHide","CheckRegoleStampa","countBiancoCoprente","biancoCoprente","stampaBifacciale","checkIsBifaccialeShowed","614","615","616","617","618","619","62","modelType","getWizardDataRequest","620","621","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","622","CookieNodeService","generateOptions","clearCookie","623","624","_super","apply","Content-Type","__extends","BaseRequestOptions","625","LoadingOverlayService","showPageLoadingOverlay","jQuery","hidePageLoadingOverlay","626","LocalStorageService","Write","localStorage","setItem","Read","getItem","Helper","toInstance","Remove","removeItem","jsonObj","fromJSON","propName","627","call","getBrowserLangs","resetConfig","navigator","languages","browserLanguage","userLanguage","628","__export","m","p","629","getTranslation","observable$","appConfig","templateName","finally","63","collection","defaultAddress","getClientAreaOrdersList","toTimeString","lavorazioneQuery","dictionary","orderRowId","sendTo","messageObject","OrderRowId","SendTo","MessageObject","processId","ProcessId","numeroCro","numeroTrn","IdOrder","630","hashCodeString","hash","ModelService","create","639","73","getMacrocategory","Macrocategory","macrocategory","getModelItemName","removeSelectRules","getLowerCase","lavorazioneKey","subKey","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","74","8","getSeoData","85","86","87","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","896","897","main","webfontloader_1","families","platformRef","bootstrapModule","browser_module_1","bootloader_1","enableProdMode","platformUniversalDynamic","bootloader","9","regUser","registeredUser","encryptedUserId","cryptedUserId","reload","navigateByUrl","98","CartProductModel","99","ClientAreaOrderNote","PaypalButtonStyleModel","ClientAreaOrderProcessFile"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAASC,GAEjC,YCJA,IAAAC,GAAAD,EAA2B,GAC3BE,EAAAF,EAAmC,KAGnCG,EAAA,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A,MAcA,MAAAA,KAdarrH,GAAAqrH,iBAAgBA,CAe7B,IAAArkE,GAAA,mBAAAA,MAcA,MAAAA,KAdahnD,GAAAgnD,iBAAgBA,CAe7B,IAAAK,GAAA,mBAAAA,MAMA,MAAAA,KANarnD,GAAAqnD,iBAAgBA,CAO7B,IAAAE,GAAA,mBAAAA,MAMA,MAAAA,KANavnD,GAAAunD,kBAAiBA,G/Iyw+BxB+jE,GACA,SAAUvrH,EAAQC,EAASC,GAEjC,YgJv0+BA,IAAA20D,GAAA,mBAAAA,MAuBA,MAAAA,KAvBa50D,GAAA40D,kBAAiBA,CAyB9B,IAAA22D,GAAA,mBAAAA,MAMA,MAAAA,KANavrH,GAAAurH,oBAAmBA,CAQhC,IAAAnuD,GAAA,mBAAAA,MAmBA,MAAAA,KAnBap9D,GAAAo9D,sBAAqBA,CAqBlC,IAAAG,GAAA,mBAAAA,MAUA,MAAAA,KAVav9D,GAAAu9D,sBAAqBA,CAWlC,IAAAjF,GAAA,mBAAAA,MA8DA,MAAAA,KA9Dat4D,GAAAs4D,uBAAsBA,CAgEnC,IAAAkzD,GAAA,mBAAAA,MAOA,MAAAA,KAPaxrH,GAAAwrH,uBAAsBA,CASnC,IAAA1yD,GAAA,mBAAAA,MAaA,MAAAA,KAba94D,GAAA84D,2BAA0BA,CAcvC,IAAAkC,GAAA,mBAAAA,MAMA,MAAAA,KANah7D,GAAAg7D,+BAA8BA,CAQ3C,IAAAywD,GAAA,mBAAAA,MAIA,MAAAA,KAJazrH,GAAAyrH,2BAA0BA,KhJmu+BpC","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__(130);\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_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/***/ 100:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 101:\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/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\r\nvar Observable_1 = __webpack_require__(1);\r\n__webpack_require__(433);\r\n__webpack_require__(185);\r\n__webpack_require__(434);\r\n__webpack_require__(431);\r\nvar cache_service_1 = __webpack_require__(20);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\nvar cookie_1 = __webpack_require__(86);\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/***/ 12:\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__(101);\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/***/ 128:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 129:\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__(11);\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/***/ 130:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(20);\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__(428);\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/***/ 131:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 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 router_1 = __webpack_require__(13);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 133:\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__(13);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 134:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 16:\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__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar angular2_meta_1 = __webpack_require__(101);\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) {\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            gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\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/***/ 178:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 19:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar cookie_service_1 = __webpack_require__(61);\r\n//Models\r\nvar mapping_1 = __webpack_require__(10);\r\nvar cart_1 = __webpack_require__(98);\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) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addApProductToCart = function (productId, lavId) {\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        };\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) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoToCart = function (wizardId, quantityId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductListinoToCart = function (combinationId, quantityId, wizardId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoListinoToCart = function (combinationId, quantityId, wizardId, strVariantiCalcolate) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId, strVariantiCalcolate) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addOtherProductCalcolatoScontisticaToCart = function (productId, lavId, dateId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoScontisticaBusteToCart = function (wizardId, quantityId, dateId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoBusteToCart = function (wizardId, quantityId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addWizardListinoScontisticaToCart = function (wizardId, quantityId, dateId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addStaticProductToCart = function (productId, quantityId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addStaticProductScontisticaToCart = function (productId, quantityId, dateId) {\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        };\r\n        return this._api.post(url, params);\r\n    };\r\n    ShoppingCartService.prototype.addMatrixProductToCart = function (productId, quantityId, type) {\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        };\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/***/ 20:\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/***/ 21:\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    }\r\n    return wizardFormEditoriaModel;\r\n}());\r\nexports.wizardFormEditoriaModel = wizardFormEditoriaModel;\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.DayNumber = \"\";\r\n        this.Quantity = 0;\r\n        this.AltezzaDorso = 0.00;\r\n        this.PrezzoOriginaleimporto = 0.00;\r\n        this.DayDescriptionName = \"\";\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/***/ 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__(13);\r\nvar core_2 = __webpack_require__(27);\r\nvar breadcrumbs_1 = __webpack_require__(617);\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 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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(428);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(19);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(11);\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__(130);\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        switch (this.lang) {\r\n            case 'it': return 'it-IT';\r\n            case 'en': return 'en-GB';\r\n            case 'al': return 'sq-AL';\r\n            default: return '';\r\n        }\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/***/ 36:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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    /**\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__(13);\r\nvar template_service_1 = __webpack_require__(36);\r\nvar cache_service_1 = __webpack_require__(20);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar router_2 = __webpack_require__(13);\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__(639)\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__(13);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar news_list_1 = __webpack_require__(411);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar helper_service_1 = __webpack_require__(49);\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__(128);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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__(13);\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__(13);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar news_list_1 = __webpack_require__(411);\r\nvar newsletter_service_1 = __webpack_require__(85);\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__(13);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\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__(44);\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__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\n//Services\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar cache_service_1 = __webpack_require__(20);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar Observable_1 = __webpack_require__(1);\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, 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.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.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 newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _g) || Object, (typeof (_h = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _h) || Object, (typeof (_j = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _j) || Object, (typeof (_k = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _k) || Object, (typeof (_l = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === '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    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__(13);\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__(412);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cms_menu_list_service_1 = __webpack_require__(413);\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__(12);\r\nvar cookie_policy_service_1 = __webpack_require__(418);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(16);\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__(414);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\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__(13);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar info_request_service_1 = __webpack_require__(415);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar info_request_1 = __webpack_require__(618);\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__(12);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\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__(13);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\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__(12);\r\nvar privacy_policy_service_1 = __webpack_require__(420);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\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__(12);\r\nvar purchase_condition_service_1 = __webpack_require__(421);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\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__(12);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(131);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(16);\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__(36);\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__(12);\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__(12);\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__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(36);\r\nvar router_1 = __webpack_require__(13);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(12);\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__(19);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar cookie_service_1 = __webpack_require__(61);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar messages_service_1 = __webpack_require__(132);\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(\"PriceCell\") },\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(\"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                    ];\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 () { $('.popovers').popover(); }, 0);\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__(13);\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__(19);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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) {\r\n                var _this = this;\r\n                var addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").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) {\r\n                var _this = this;\r\n                var addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\").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) {\r\n                var _this = this;\r\n                var addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").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                $('.popovers').popover();\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__(13);\r\n//Services\r\nvar product_service_1 = __webpack_require__(134);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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__(101);\r\nvar core_1 = __webpack_require__(0);\r\n//Angular\r\nvar core_2 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar product_service_1 = __webpack_require__(134);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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).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) {\r\n                var _this = this;\r\n                var productId = this.product.Id;\r\n                this.showSpinnerClick = true;\r\n                var statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId).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                $('.popovers').popover();\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__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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__(134);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\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__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar client_area_service_1 = __webpack_require__(63);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cart_1 = __webpack_require__(98);\r\nvar cart_2 = __webpack_require__(98);\r\nvar cart_3 = __webpack_require__(98);\r\nvar validation_service_1 = __webpack_require__(133);\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.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                    //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            //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                $('.popovers').popover();\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__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar client_area_service_1 = __webpack_require__(63);\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__(12);\r\nvar script_service_1 = __webpack_require__(16);\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                //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            };\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.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 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__(100);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(12);\r\nvar core_2 = __webpack_require__(27);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cart_1 = __webpack_require__(98);\r\nvar cart_2 = __webpack_require__(98);\r\nvar user_login_1 = __webpack_require__(74);\r\nvar company_1 = __webpack_require__(253);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartComponent = (function () {\r\n    function CartComponent(_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    CartComponent.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 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);\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) {\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                this.model = {\r\n                    selectedPayment: new cart_2.CartPaymentModel(),\r\n                    selectedShipment: new cart_1.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.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.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.clickedProductId = 0;\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                        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.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.spinnerCart = false;\r\n                });\r\n                this.subManager.add(paymentSub);\r\n            };\r\n            ChildComponent.prototype.selectRadioShipment = function (shipmentId) {\r\n                if (this.selectedShipmentId != shipmentId) {\r\n                    this.selectedShipmentId = shipmentId;\r\n                    this.setShipment(shipmentId);\r\n                }\r\n            };\r\n            ChildComponent.prototype.setShipment = function (shipmentId) {\r\n                var _this = this;\r\n                this.spinnerCart = true;\r\n                var shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(function (result) {\r\n                    _this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n                    _this.shoppingCartService.updateCart(result);\r\n                    _this.carrello = _this.shoppingCartService.getCart();\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                    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.ngOnInit = function () {\r\n                var _this = this;\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                    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                    for (var _b = 0, _c = this.carrello.Shipments; _b < _c.length; _b++) {\r\n                        var shipment = _c[_b];\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                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            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                $('.popovers').popover();\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: 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(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    ], CartComponent);\r\n    return CartComponent;\r\n    var _a, _b, _c, _d, _e, _f, _g;\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__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(13);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar template_service_1 = __webpack_require__(36);\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__(61);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_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 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__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(12);\r\nvar messages_service_1 = __webpack_require__(132);\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__(99);\r\nvar router_1 = __webpack_require__(13);\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__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(13);\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__(61);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_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 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 == '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                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__(87);\r\nvar cache_service_1 = __webpack_require__(20);\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__(13);\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__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(36);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cookie_service_1 = __webpack_require__(61);\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__(74);\r\nvar client_area_1 = __webpack_require__(99);\r\nvar client_area_2 = __webpack_require__(99);\r\nvar client_area_3 = __webpack_require__(99);\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.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            };\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 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.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__(16);\r\nvar validation_service_1 = __webpack_require__(133);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(63);\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__(12);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\n//Models\r\nvar client_area_1 = __webpack_require__(99);\r\nvar client_area_2 = __webpack_require__(99);\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//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\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/***/ 403:\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__(36);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\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/***/ 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__(36);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\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/***/ 405:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar user_login_1 = __webpack_require__(74);\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar login_service_1 = __webpack_require__(178);\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__(13);\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__(131);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar header_service_1 = __webpack_require__(129);\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/***/ 406:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar cookie_service_1 = __webpack_require__(61);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(10);\r\n//Services\r\nvar register_service_1 = __webpack_require__(100);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar company_service_1 = __webpack_require__(131);\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__(178);\r\nvar platform_browser_1 = __webpack_require__(7);\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, 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.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            }\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.model = new register_1.Register();\r\n                this.customerTypeList = result.UserTypes;\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.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 piva = 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(piva)\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.onCustomerGroupChange = function (value) {\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                if (value == '4') {\r\n                    this.model.CodiceDestinatario = \"0000000\";\r\n                }\r\n                else {\r\n                    this.model.CodiceDestinatario = \"\";\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\") {\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\") {\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                $('.popovers').popover();\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(16, 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 breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _p) || Object, (typeof (_q = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _q) || Object, (typeof (_r = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _r) || Object, (typeof (_s = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _s) || Object, (typeof (_t = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _t) || Object, (typeof (_u = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _u) || 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;\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/***/ 407:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(100);\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__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\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/***/ 408:\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__(36);\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__(13);\r\nvar register_service_1 = __webpack_require__(100);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(12);\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/***/ 409:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(100);\r\nvar cookie_service_1 = __webpack_require__(61);\r\nvar api_service_1 = __webpack_require__(11);\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__(178);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar router_1 = __webpack_require__(13);\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__(12);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar user_login_1 = __webpack_require__(74);\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/***/ 410:\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__(12);\r\nvar script_service_1 = __webpack_require__(16);\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/***/ 411:\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/***/ 412:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 413:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 417:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 418:\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__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 419:\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/***/ 420:\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__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 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__(11);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 422:\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__(409);\r\nvar user_password_component_1 = __webpack_require__(410);\r\nvar register_component_1 = __webpack_require__(406);\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__(408);\r\nvar offline_page_component_1 = __webpack_require__(387);\r\nvar payment_confirmation_component_1 = __webpack_require__(402);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(404);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(403);\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__(407);\r\nvar quick_registration_component_1 = __webpack_require__(405);\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 '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            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/***/ 44:\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__(11);\r\nvar common_1 = __webpack_require__(45);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar http_1 = __webpack_require__(96);\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/***/ 465:\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 = 465;\n\n\n/***/ }),\n\n/***/ 468:\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__(105);\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/***/ 469:\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__(13);\r\nvar browser_1 = __webpack_require__(280); // for AoT we need to manually split universal packages\r\nvar idle_preload_1 = __webpack_require__(584);\r\nvar http_1 = __webpack_require__(96);\r\nvar core_2 = __webpack_require__(27);\r\nvar app_module_1 = __webpack_require__(593);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar cache_service_1 = __webpack_require__(20);\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__(101);\r\nvar default_request_options_1 = __webpack_require__(624);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar routes_browser_service_1 = __webpack_require__(627);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar browser_2 = __webpack_require__(628);\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/***/ 49:\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__(13);\r\nvar common_1 = __webpack_require__(45);\r\nvar core_2 = __webpack_require__(27);\r\nvar system_configuration_service_1 = __webpack_require__(422);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(20);\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/***/ 57:\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.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/***/ 593:\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__(87);\r\nvar app_component_1 = __webpack_require__(371);\r\nvar home_module_1 = __webpack_require__(598);\r\nvar cms_page_module_1 = __webpack_require__(600);\r\nvar inventory_product_module_1 = __webpack_require__(615);\r\nvar inventory_category_module_1 = __webpack_require__(614);\r\nvar settings_module_1 = __webpack_require__(616);\r\nvar system_configuration_service_1 = __webpack_require__(422);\r\nvar ng2_table_1 = __webpack_require__(427);\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/***/ 594:\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__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\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/***/ 595:\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__(13);\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__(85);\r\n//Models\r\nvar user_login_1 = __webpack_require__(74);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar header_service_1 = __webpack_require__(129);\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, newsletterService, headerService) {\r\n                var _this = this;\r\n                this.routesService = routesService;\r\n                this.authService = authService;\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.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 newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _c) || Object, (typeof (_d = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === '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    __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/***/ 596:\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__(85);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\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/***/ 597:\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__(19);\r\nvar user_login_1 = __webpack_require__(74);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar router_1 = __webpack_require__(13);\r\nvar router_state_1 = __webpack_require__(83);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar header_service_1 = __webpack_require__(129);\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.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/***/ 598:\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/***/ 599:\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/***/ 600:\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__(87);\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/***/ 601:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(44);\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/***/ 602:\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__(416);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\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/***/ 603:\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__(417);\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/***/ 604:\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__(134);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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/***/ 605:\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__(62);\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__(19);\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__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_constants_1 = __webpack_require__(619);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\nvar shared_constants_1 = __webpack_require__(620);\r\nvar quoting_model_1 = __webpack_require__(57);\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.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.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            };\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.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                            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                            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                                //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 price_1 = _a[_i];\r\n                    price_1.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.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 addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId).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 sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId).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 sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti).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 sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti).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                $('.popovers').popover();\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/***/ 606:\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__(36);\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/***/ 607:\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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.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.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 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.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\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.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.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                //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                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                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.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                            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                                //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                            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.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            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var 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);\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.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 wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.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.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 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.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\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.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.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                //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                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                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.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                            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                                //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                            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.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            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var 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);\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.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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 609:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\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.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.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 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            };\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.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                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                _this.setPriceResult(scontisticaTable[0]);\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                                //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                            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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).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 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).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 61:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 610:\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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.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_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 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            };\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.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                            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                                //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                            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);\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);\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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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                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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 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\nvar quoting_model_1 = __webpack_require__(57);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(62);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\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__(73);\r\n//Models\r\nvar quoting_model_2 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.model = new quoting_submit_model_2.wizardFormEditoriaModel();\r\n                this.components = new quoting_model_1.LavorazioniComponents();\r\n                this.isDataInitialized = 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 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            };\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                            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                                //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                            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\", \"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.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);\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);\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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n                var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 612:\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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.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.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 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            };\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.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                            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                                //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                            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);\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);\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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 613:\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__(62);\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__(19);\r\nvar routes_service_1 = __webpack_require__(5);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(73);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\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.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.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 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.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation();\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.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.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                //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                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                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.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                            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                                //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                            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.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            ChildComponent.prototype.validationBaseFormati = function () {\r\n                var message;\r\n                var 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);\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.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 sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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 sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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 sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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 sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price_1 = _a[_i];\r\n                    price_1.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.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/***/ 614:\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__(87);\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/***/ 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__(87);\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/***/ 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__(87);\r\nvar register_component_1 = __webpack_require__(406);\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/***/ 617:\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/***/ 618:\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/***/ 619:\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/***/ 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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 620:\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/***/ 621:\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__(419);\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/***/ 622:\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/***/ 623:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 624:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\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/***/ 625:\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/***/ 626:\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__(74);\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/***/ 627:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar common_1 = __webpack_require__(45);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(5);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(20);\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/***/ 628:\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__(629));\r\n\n\n/***/ }),\n\n/***/ 629:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n__webpack_require__(435);\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/***/ 63:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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__(19);\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/***/ 630:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 639:\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/***/ 73:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar quoting_model_1 = __webpack_require__(57);\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/***/ 74:\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__(11);\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__(19);\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        //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/***/ 85:\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\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/***/ 86:\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__(61));\r\n__export(__webpack_require__(621));\r\n__export(__webpack_require__(622));\r\n__export(__webpack_require__(419));\r\n__export(__webpack_require__(623));\r\n\n\n/***/ }),\n\n/***/ 87:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar trustpilot_service_1 = __webpack_require__(417);\r\nvar core_1 = __webpack_require__(0);\r\nvar common_1 = __webpack_require__(45);\r\nvar router_1 = __webpack_require__(13);\r\nvar forms_1 = __webpack_require__(228);\r\nvar core_2 = __webpack_require__(27);\r\nvar api_service_1 = __webpack_require__(11);\r\nvar model_service_1 = __webpack_require__(630);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(36);\r\nvar cms_content_service_1 = __webpack_require__(412);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar cms_menu_list_service_1 = __webpack_require__(413);\r\nvar faq_service_1 = __webpack_require__(414);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar slider_service_1 = __webpack_require__(416);\r\nvar info_request_service_1 = __webpack_require__(415);\r\nvar login_service_1 = __webpack_require__(178);\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar register_service_1 = __webpack_require__(100);\r\nvar local_storage_1 = __webpack_require__(626);\r\nvar quoting_service_1 = __webpack_require__(62);\r\nvar category_service_1 = __webpack_require__(262);\r\nvar product_service_1 = __webpack_require__(134);\r\nvar shopping_cart_service_1 = __webpack_require__(19);\r\nvar client_area_service_1 = __webpack_require__(63);\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__(12);\r\nvar privacy_policy_service_1 = __webpack_require__(420);\r\nvar cookie_policy_service_1 = __webpack_require__(418);\r\nvar purchase_condition_service_1 = __webpack_require__(421);\r\nvar bootbox_service_1 = __webpack_require__(40);\r\nvar loading_overlay_service_1 = __webpack_require__(625);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar currency_service_1 = __webpack_require__(29);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\n//Components  \r\nvar header_component_1 = __webpack_require__(597);\r\nvar footer_component_1 = __webpack_require__(595);\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__(594);\r\nvar side_bar_menu_component_1 = __webpack_require__(599);\r\nvar newsletter_component_1 = __webpack_require__(596);\r\nvar quoting_main_component_1 = __webpack_require__(606);\r\nvar wizard_form_commerciale_component_1 = __webpack_require__(610);\r\nvar wizard_form_editoria_component_1 = __webpack_require__(611);\r\nvar wizard_form_adesivi_component_1 = __webpack_require__(607);\r\nvar wizard_form_banner_component_1 = __webpack_require__(608);\r\nvar wizard_form_buste_component_1 = __webpack_require__(609);\r\nvar wizard_form_etichette_component_1 = __webpack_require__(612);\r\nvar wizard_form_stampa_component_1 = __webpack_require__(613);\r\nvar other_product_form_component_1 = __webpack_require__(605);\r\nvar quoting_order_totals_component_1 = __webpack_require__(604);\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__(409);\r\nvar user_password_component_1 = __webpack_require__(410);\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__(602);\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__(408);\r\nvar payment_confirmation_component_1 = __webpack_require__(402);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(404);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(403);\r\nvar ng2_table_1 = __webpack_require__(427);\r\nvar mapping_1 = __webpack_require__(10);\r\nvar angular2_material_datepicker_1 = __webpack_require__(590);\r\nvar ng2_bs3_modal_1 = __webpack_require__(635);\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__(407);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar canvas_widget_components_1 = __webpack_require__(601);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar quick_registration_component_1 = __webpack_require__(405);\r\nvar trustpilot_widget_component_1 = __webpack_require__(603);\r\nvar header_service_1 = __webpack_require__(129);\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    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/***/ 896:\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n\n/***/ 897:\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__(467);\r\n__webpack_require__(470);\r\n__webpack_require__(468); // 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__(466);\r\nvar webfontloader_1 = __webpack_require__(471);\r\n// enable prod for faster renders\r\ncore_1.enableProdMode();\r\nvar browser_module_1 = __webpack_require__(469);\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__(20);\r\nvar api_service_1 = __webpack_require__(11);\r\n//Model\r\nvar user_login_1 = __webpack_require__(74);\r\nvar cookie_service_1 = __webpack_require__(61);\r\nvar router_1 = __webpack_require__(13);\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\") {\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/***/ 98:\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    }\r\n    return CartShipmentModel;\r\n}());\r\nexports.CartShipmentModel = CartShipmentModel;\r\n\n\n/***/ }),\n\n/***/ 99:\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},[897]);\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_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 { 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","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, 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 } 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) {\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            gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/script.service.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) {\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    }\r\n\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addApProductToCart(productId: number, lavId: number) {\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    }\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) {\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    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n\r\n  addWizardListinoToCart(wizardId: number, quantityId: number) {\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    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductListinoToCart(combinationId: number, quantityId: number, wizardId: number) {\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    }\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) {\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    }\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) {\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    }\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) {\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    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addOtherProductCalcolatoScontisticaToCart(productId: number, lavId: number, dateId: number) {\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    }\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) {\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    }\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) {\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    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addWizardListinoScontisticaToCart(wizardId: number, quantityId: number, dateId: number) {\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    }\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n\r\n  addStaticProductToCart(productId: number, quantityId: number) {\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    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addStaticProductScontisticaToCart(productId: number, quantityId: number, dateId: number) {\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    }\r\n\r\n    return this._api.post(url, params);\r\n  }\r\n\r\n  addMatrixProductToCart(productId: number, quantityId: number, type: 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    }\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\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 { 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}\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    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}\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","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 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\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\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    {\r\n        switch (this.lang) \r\n        {\r\n            case 'it': return 'it-IT';\r\n            case 'en': return 'en-GB';\r\n            case 'al': return 'sq-AL';\r\n            default: return '';\r\n        }\r\n    }\r\n\r\n    getShortLang(): string \r\n    {\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    {\r\n        let result:LanguageObj = new LanguageObj();\r\n\r\n        switch(this.lang)\r\n        {\r\n            case \"it\": \r\n        }\r\n\r\n        return result;\r\n    }\r\n}\r\n\r\nexport class LanguageObj\r\n{\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  /**\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\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 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\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(\"PriceCell\") },\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(\"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          ];\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 () { $('.popovers').popover(); }, 0);\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) {\r\n        let addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").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) {\r\n        let addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\").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) {\r\n        let addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").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        $('.popovers').popover();\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).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) {\r\n        let productId = this.product.Id;\r\n        this.showSpinnerClick = true\r\n        let statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId).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        $('.popovers').popover();\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\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          //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\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        $('.popovers').popover();\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\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            }\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\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\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 } 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 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 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);\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) {\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            }\r\n\r\n            private pageIsInit: boolean = false;\r\n            private pageIsInitAfter: boolean = false;\r\n\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\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            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            private clickedProductId: number = 0;\r\n            private selectedProduct: any;\r\n\r\n            subManager = new Subscription();\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.spinnerCart = false;\r\n                });\r\n\r\n                this.subManager.add(paymentSub);\r\n            }\r\n\r\n            selectRadioShipment(shipmentId) {\r\n                if (this.selectedShipmentId != shipmentId) {\r\n                    this.selectedShipmentId = shipmentId;\r\n                    this.setShipment(shipmentId);\r\n                }\r\n            }\r\n\r\n            setShipment(shipmentId) {\r\n                this.spinnerCart = true;\r\n                let shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(result => {\r\n                    this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n                    this.shoppingCartService.updateCart(result);\r\n                    this.carrello = this.shoppingCartService.getCart();\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\r\n                    this.removeCustomersCanvasState();\r\n\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\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            ngOnInit() {\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\r\n                    let userData = this.authService.GetData();\r\n                    this.isUserAuthenticated = userData.isAuthenticated;\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\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            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\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\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                $('.popovers').popover();\r\n\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/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 == '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                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\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\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\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\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                        {\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            {\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-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//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 { 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\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 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\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\r\n                this.model = new Register();\r\n                this.customerTypeList = result.UserTypes;\r\n\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\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\r\n            disableFieldsFilledFromFbData() {\r\n                this.disableFbDataFields = true;\r\n            }\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\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.model.Prov = $(\"#Prov\").val();\r\n                this.model.Cap = $(\"#Cap\").val();\r\n                this.model.City = $(\"#City\").val();\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\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\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\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\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 piva = 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(piva)\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\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\r\n            onCustomerTypeChange(value) {\r\n                this.model.CustomerType = value;\r\n            }\r\n\r\n            onCustomerGroupChange(value) {\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\r\n                if(value=='4')\r\n                {\r\n                    this.model.CodiceDestinatario=\"0000000\";\r\n                }\r\n                else {\r\n                    this.model.CodiceDestinatario=\"\";\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\") {\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                    {\r\n                        this.isRequiredPecEmail=false;\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.model.CustomerGroup != \"4\") {\r\n                    if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n                        retVal = true;\r\n                       \r\n                    }\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                $('.popovers').popover();\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 { 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 '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            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 = 465;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src async\n// module id = 465\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    {\r\n      if(rowRoute.name == \"OFFLINE\")\r\n      {\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      {\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\r\n  public getRoutePath(routeName: string) : any\r\n  {\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          \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        {\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          \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        \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    }\r\n    return routePath;\r\n  }\r\n  \r\nshowPageLoader()\r\n  {\r\n      this.visiblePageLoader = true;\r\n  }\r\n\r\n  hidePageLoader()\r\n  {              \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\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\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\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 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\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               \r\n                let config = this.appService.getConfig();\r\n                if (config.webStoreStatus == \"offline\") {\r\n                    this.setAutoHeightAndWeightToLogo();\r\n                }\r\n\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\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            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            }\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                {\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\r\n\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                            {\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                            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                            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                                //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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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                let addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId).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                let sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID).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\r\n\r\n                let sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId).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                let sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId).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\r\n                let sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti).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                let sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti).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                $('.popovers').popover();\r\n                layoutTheme.initToggle();\r\n                this.setPopoverVariableForMAtrix();\r\n                this.pageIsInitAfter = true;\r\n            }\r\n\r\n            setPopoverVariableForMAtrix()\r\n            {\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\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 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            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            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\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\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            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.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                //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                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\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                            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\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                            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.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            validationBaseFormati() {\r\n                let message;\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)\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\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                let wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                let wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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                let wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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                let wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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\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 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            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\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\r\n                if (!this.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\r\n                }\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            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.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                //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                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\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\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                            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\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                            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.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            validationBaseFormati() {\r\n                let message;\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)\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\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                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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 { 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 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            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            }\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.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                            if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n                                this.setPriceResult(scontisticaTable[0]);\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\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                            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                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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                let sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).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                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).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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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      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      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      }\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.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              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                //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              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)\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)\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          {\r\n            message = this.getLabel('mandatory_field');\r\n            this.responseModel.plastificazione1IsValid = false;\r\n          }\r\n          else \r\n          {\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        let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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        let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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        let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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        let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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        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 price of this.resultPrice.TablePriceList) {\r\n          price.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\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\r\n      model = new wizardFormEditoriaModel();\r\n      components: LavorazioniComponents = new LavorazioniComponents();\r\n      isDataInitialized: 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      }\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              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\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              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\", \"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.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)\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)\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\r\n        let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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        $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n        let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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\r\n        let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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\r\n        let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price of this.resultPrice.TablePriceList) {\r\n          price.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\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\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            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            }\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.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                            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\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                            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)\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)\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                  {\r\n                    message = this.getLabel('mandatory_field');\r\n                    this.responseModel.plastificazione1IsValid = false;\r\n                  }\r\n                  else \r\n                  {\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                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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\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\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            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\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.isDataInitialized) {\r\n                    //check if the all values is validated\r\n                    this.parameterValidation()\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            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.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\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.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\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\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                            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\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                            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.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            validationBaseFormati() {\r\n                let message;\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)\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            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                let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).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                let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).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                let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).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                let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).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 price of this.resultPrice.TablePriceList) {\r\n                    price.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\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","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","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","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 { 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","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 = 639\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\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 { 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  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\")\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 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}\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}\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}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/core/cart.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}\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}\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"],"sourceRoot":""}