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U,IAILA,CACR,CAEA,eAAOG,CAASC,GAGf,IAAIJ,GAAU,EAOd,OALmB,OAHAI,EAASH,MAAML,EAAWM,SAASC,WAGd,KAAbC,IAE1BJ,GAAU,GAGJA,CACR,CAEA,iBAAOK,CAAWC,GAEjB,IAAIC,EAAWD,EAIf,OAFAC,EAAWA,EAAStU,QAAQ,IAAK,QAAQA,QAAQ,IAAK,QAAQA,QAAQ,IAAK,WAAWA,QAAQ,KAAQ,UAAUA,QAAQ,IAAK,UAAUA,QAAQ,IAAK,UAAUA,QAAQ,OAAQ,IAE1KsU,SAA4D,KAAbA,CAQpD,EArDO,EAAAL,SAAW,CACjBC,SAAU,gBACVN,MAAO,yJACPW,IAAK,mF","sources":["webpack:///./src/Utilities/Button.ts","webpack:///./src/Utilities/Cart.ts","webpack:///./src/Utilities/CookieManager.ts","webpack:///./src/Utilities/CouponManager.ts","webpack:///./src/Utilities/DataPrivacyPolicy.ts","webpack:///./src/Utilities/ExperimentManager.ts","webpack:///./src/Utilities/Media.ts","webpack:///./src/Utilities/ModalTools.ts","webpack:///./src/Utilities/Tenant.ts","webpack:///./src/Utilities/TextResource.ts","webpack:///./src/Utilities/Tracking.ts","webpack:///./src/Validation/Validation.ts"],"sourcesContent":["export class Button\r\n{\r\n\tpublic static EnabledClass = \"btn-load\";\r\n\tpublic static LoaderClass = \"btn__loader\";\r\n\tpublic static LoadingClass = \"btn-load--loading\";\r\n\r\n\tstatic EnableLoading = (button: HTMLElement): void =>\r\n\t{\r\n\t\tif (button !== null)\r\n\t\t{\r\n\t\t\tconst loadingIndicator = document.createRange().createContextualFragment(``);\r\n\t\t\tbutton.classList.add(this.EnabledClass);\r\n\t\t\tbutton.appendChild(loadingIndicator);\r\n\t\t}\r\n\t};\r\n\r\n\tstatic StartLoading = (button: HTMLElement): void =>\r\n\t{\r\n\t\tif (button !== null)\r\n\t\t{\r\n\t\t\tbutton.classList.add(this.LoadingClass);\r\n\t\t}\r\n\t};\r\n\r\n\tstatic StopLoading = (button?: HTMLElement): void =>\r\n\t{\r\n\t\tif (typeof button !== \"undefined\" && button !== null)\r\n\t\t{\r\n\t\t\tbutton.classList.remove(this.LoadingClass);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tconst buttons = document.querySelectorAll(`.${Button.LoadingClass}`) as NodeListOf;\r\n\r\n\t\t\tif (buttons.length > 0)\r\n\t\t\t{\r\n\t\t\t\tbuttons.forEach((button) =>\r\n\t\t\t\t{\r\n\t\t\t\t\tButton.StopLoading(button);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","import { Button } from '@Utilities/Button';\r\nimport { CartService } from \"@Api/CartService\";\r\nimport type { AxiosResponse } from \"axios\";\r\nimport BootstrapModalTemplate from \"@Base/Templates/BootstrapModal.hbs\";\r\nimport { IBootstrapModal, ModalTools } from \"./ModalTools\";\r\nimport { TextResource } from './TextResource';\r\n\r\nexport interface ICartCallback\r\n{\r\n\t(cartProduct: ICartProduct): void;\r\n}\r\n\r\nexport interface ICartProduct\r\n{\r\n\tPrice?: number,\r\n\tProductID: string;\r\n\tProductSizeID: string;\r\n\tProductSku?: string;\r\n\tQuantity: number;\r\n\tCartItemOriginID: string;\r\n}\r\n\r\nexport interface ICartRentalProduct extends ICartProduct\r\n{\r\n\teventDate: Date;\r\n\tisTuxedo: boolean;\r\n\theightFeet?: number;\r\n\theightInches?: number;\r\n\trentalDays: number;\r\n}\r\n\r\nexport class Cart\r\n{\r\n\tprivate readonly cartService: CartService;\r\n\r\n\tconstructor()\r\n\t{\r\n\t\tthis.cartService = new CartService();\r\n\t}\r\n\r\n\tpublic AddPreOrder = (form: HTMLFormElement): void =>\r\n\t{\r\n\t\t// Preorder doesn't use api\r\n\t\tif (form !== null && typeof form !== \"undefined\")\r\n\t\t{\r\n\t\t\tif (typeof form.submit !== \"undefined\")\r\n\t\t\t{\r\n\t\t\t\tform.submit();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tpublic AddProduct = async (product: ICartProduct, callback?: ICartCallback): Promise =>\r\n\t{\r\n\t\tconst cartApiCall = await this.cartService.AddProduct(product) as AxiosResponse;\r\n\r\n\t\tif (typeof cartApiCall !== \"undefined\" && typeof cartApiCall.data !== \"undefined\")\r\n\t\t{\r\n\t\t\tthis.AddProductCallback(\"new\", cartApiCall.data, product, callback);\r\n\t\t}\r\n\t};\r\n\r\n\tprivate AddProductCallback = async (type: string, msg, product: ICartProduct, callback?: ICartCallback): Promise =>\r\n\t{\r\n\t\tconst productSizeID = product.ProductSizeID;\r\n\t\tconst atcPageUrl = `/product/addtocart/${productSizeID}`;\r\n\r\n\t\tButton.StopLoading();\r\n\r\n\t\tif ((msg.Error && msg.Error.length > 0) || (msg.Warning && msg.Warning.length > 0))\r\n\t\t{\r\n\t\t\tif (msg.Error.some((x) => x.Type === 115))\r\n\t\t\t{\r\n\t\t\t\tconst modalOptions: IBootstrapModal = {\r\n\t\t\t\t\tmodalId: \"overSoldModal\",\r\n\t\t\t\t\tmodalContent: msg.Error[0].Description,\r\n\t\t\t\t\tconfirmButton: TextResource.GetTextByCulture(\"Word_Continue\"),\r\n\t\t\t\t\tdisplayButtons: true\r\n\t\t\t\t};\r\n\r\n\t\t\t\tconst modal = BootstrapModalTemplate(modalOptions);\r\n\t\t\t\tModalTools.DisplayGeneratedModal(modal);\r\n\r\n\t\t\t\tconst injectedModal = document.querySelector(\"#overSoldModal\");\r\n\r\n\t\t\t\tif (injectedModal !== null)\r\n\t\t\t\t{\r\n\t\t\t\t\tinjectedModal.querySelector(\".btn-primary\").addEventListener(\"click\", () =>\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twindow.location.href = atcPageUrl;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tModalTools.DisplayMessages(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (callback && typeof callback === \"function\")\r\n\t\t\t{\r\n\t\t\t\tcallback(product);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\twindow.location.href = atcPageUrl;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tpublic AddRental = async (product: ICartRentalProduct, callback?: ICartCallback): Promise =>\r\n\t{\r\n\t\tconst cartApiCall = await this.cartService.AddRental(product) as AxiosResponse;\r\n\r\n\t\tthis.AddProductCallback(\"rent\", cartApiCall.data, product, callback);\r\n\t};\r\n}","export class CookieManager\r\n{\r\n\tstatic Cookies = {\r\n\t\tCoupon: {\r\n\t\t\tKey: \"COUPON_v1\",\r\n\t\t\tCouponCode: \"CouponCode\",\r\n\t\t\tIsPromomtion: \"IsPromotion\",\r\n\t\t\tIsValid: \"IsValid\",\r\n\t\t\tLastValidated: \"LastValidated\",\r\n\t\t\tCouponID: \"CouponID\",\r\n\t\t\tDays: \"Days\",\r\n\t\t\tExpirationDate: \"ExpirationDate\",\r\n\t\t\tPreviousCouponID: \"PreviousCouponID\"\r\n\t\t},\r\n\t\tCurrency: {\r\n\t\t\tKey: \"CURRENCY_v1\",\r\n\t\t\tCurrencySymbol: \"CurrencySymbol\",\r\n\t\t\tCurrencyID: \"CurrencyID\",\r\n\t\t\tCurrencyCode: \"CurrencyCode\"\r\n\t\t},\r\n\t\tDataPrivacyPolicy:\r\n\t\t{\r\n\t\t\tKey: \"DATAPRIVACYPOLICY_v1\",\r\n\t\t\tMarketingTrackingApproved: \"MarketingTrackingApproved\",\r\n\t\t\tPerformanceTrackingApproved: \"PerformanceTrackingApproved\"\r\n\t\t},\r\n\t\tDelayModal: {\r\n\t\t\tKey: \"delayModal\"\r\n\t\t},\r\n\t\tUnique: {\r\n\t\t\tKey: \"UNIQUE\"\r\n\t\t},\r\n\t\tRecentItems: {\r\n\t\t\tKey: \"RECENTITEMS_v1\",\r\n\t\t\tRecentItems: \"RecentItems\"\r\n\t\t},\r\n\t\tReturnVisitor: {\r\n\t\t\tKey: \"RETURN_v2\",\r\n\t\t\tLastVisitTime: \"LastVisitTime\",\r\n\t\t\tOrdered: \"Ordered\",\r\n\t\t\tVisitCount: \"visitCount\"\r\n\t\t},\r\n\t\tSeenModal: {\r\n\t\t\tKey: \"seenModal\"\r\n\t\t},\r\n\t\tSmsModalEligible: {\r\n\t\t\tKey: \"smsModalEligible\"\r\n\t\t},\r\n\t\tSmsWelcomeCoupon: {\r\n\t\t\tKey: \"smsWelcomeCoupon\"\r\n\t\t},\r\n\t\tWelcomeCoupon: {\r\n\t\t\tKey: \"WelcomeCoupon\"\r\n\t\t},\r\n\t\tVisitor: {\r\n\t\t\tKey: \"VISITOR_v1\",\r\n\t\t\tDomainProjectID: \"DomainProjectID\",\r\n\t\t\tBillCountryID: \"BillCountryID\",\r\n\t\t\tCountryID: \"CountryID\",\r\n\t\t\tShipCountryID: \"ShipCountryID\"\r\n\t\t}\r\n\t};\r\n\r\n\tstatic KeyValuePairSeparator = \"&\";\r\n\r\n\tstatic GetCookie(cookieName: string, cookieKey?: string)\r\n\t{\r\n\t\tlet cookieValue = \"\";\r\n\t\tconst allCookies = document.cookie.split(\";\");\r\n\r\n\t\t// need to loop all the cookies to find the one requested\r\n\t\tfor (let allCookiesIndex = 0; allCookiesIndex < allCookies.length; allCookiesIndex++)\r\n\t\t{\r\n\t\t\tconst firstEqualSignIndex = allCookies[allCookiesIndex].indexOf(\"=\");\r\n\t\t\tconst currentCookieName = (allCookies[allCookiesIndex].substring(0, firstEqualSignIndex)).replace(/^\\s+|\\s+$/g, \"\");\r\n\r\n\t\t\tif (currentCookieName === cookieName)\r\n\t\t\t{\r\n\t\t\t\t// found the name requested\r\n\t\t\t\tconst currentCookieValue = allCookies[allCookiesIndex].substring(firstEqualSignIndex + 1);\r\n\r\n\t\t\t\tif (cookieKey !== undefined && cookieKey !== null && cookieKey.length > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// loop the key value pairs to find the key requested\r\n\t\t\t\t\tconst currentCookieValues = currentCookieValue.split(this.KeyValuePairSeparator);\r\n\r\n\t\t\t\t\tfor (let currentCookieValuesIndex = 0; currentCookieValuesIndex < currentCookieValues.length; currentCookieValuesIndex++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tconst keyValuePair = currentCookieValues[currentCookieValuesIndex].split(\"=\");\r\n\r\n\t\t\t\t\t\tif (keyValuePair[0] === cookieKey)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// found the key requested\r\n\t\t\t\t\t\t\tcookieValue = decodeURIComponent(keyValuePair[1]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcookieValue = decodeURIComponent(currentCookieValue);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cookieValue;\r\n\t}\r\n\r\n\t// fun_dcd && fun_scd are registered to the page from the BaseMasterPage.cs\r\n\tstatic GetCookieDomain()\r\n\t{\r\n\t\tlet domain = null;\r\n\r\n\t\t// @ts-expect-error fun_CookieDomain MIGHT be defined\r\n\t\tif (typeof (fun_CookieDomain) !== \"undefined\" && fun_CookieDomain !== null && fun_CookieDomain !== \"\")\r\n\t\t{\r\n\t\t\t// @ts-expect-errorfun_CookieDomain MIGHT be defined\r\n\t\t\tdomain = fun_CookieDomain;\r\n\t\t}\r\n\r\n\t\treturn domain;\r\n\t}\r\n\r\n\tstatic GetCookieNames()\r\n\t{\r\n\t\tconst cookieNames = [];\r\n\t\tconst allCookies = document.cookie.split(\";\");\r\n\r\n\t\t// need to loop all the cookies to find the one requested\r\n\t\tfor (let allCookiesIndex = 0; allCookiesIndex < allCookies.length; allCookiesIndex++)\r\n\t\t{\r\n\t\t\tconst firstEqualSignIndex = allCookies[allCookiesIndex].indexOf(\"=\");\r\n\t\t\tconst currentCookieName = (allCookies[allCookiesIndex].substring(0, firstEqualSignIndex)).replace(/^\\s+|\\s+$/g, \"\");\r\n\r\n\t\t\tcookieNames.push(currentCookieName);\r\n\t\t}\r\n\r\n\t\treturn cookieNames;\r\n\t}\r\n\r\n\tstatic SetCookie(cookieName: string, cookieValue?: string, expirationDays?: number, setDomain = true)\r\n\t{\r\n\t\tlet expirationDate = null;\r\n\t\tlet domain = null;\r\n\r\n\t\tif (cookieValue === null || cookieValue === undefined)\r\n\t\t{\r\n\t\t\t//act as a delete of the cookie by setting the expiration date to a previous time\r\n\t\t\texpirationDays = -1;\r\n\t\t}\r\n\r\n\t\tif (typeof expirationDays === \"number\")\r\n\t\t{\r\n\t\t\tif (expirationDays < 1)\r\n\t\t\t{\r\n\t\t\t\tconst minutes = expirationDays * 24 * 60;\r\n\t\t\t\tconst nowDate = new Date();\r\n\t\t\t\texpirationDate = new Date(nowDate.getTime() + minutes * 60000);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\texpirationDate = new Date();\r\n\t\t\t\texpirationDate.setDate(expirationDate.getDate() + expirationDays);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (setDomain === true)\r\n\t\t{\r\n\t\t\tdomain = this.GetCookieDomain();\r\n\t\t}\r\n\r\n\t\tconst secureSetting = (window.location.protocol.indexOf(\"https:\") >= 0 ? \";secure\" : \"\");\r\n\r\n\t\t// it is assumed that cookieValue would be URI encoded if it would need to be.\r\n\t\t// this is assumed since there can be multiple values instead of only 1 for this cookie.\r\n\t\tdocument.cookie = cookieName + \"=\" + cookieValue + (expirationDate === null ? \"\" : \"; expires=\" + expirationDate.toUTCString()) + (domain === null ? \"\" : \"; domain=\" + domain) + \"; path=/\" + secureSetting;\r\n\t}\r\n\r\n\tstatic SetInCookie(cookieName: string, cookieKey: string, cookieKeyValue: string, expirationDays?: number, setDomain?: boolean)\r\n\t{\r\n\t\tlet cookieValue = this.GetCookie(cookieName);\r\n\r\n\t\tif (cookieValue !== null && cookieValue.length > 0)\r\n\t\t{\r\n\t\t\tconst currentCookieValues = cookieValue.split(this.KeyValuePairSeparator);\r\n\r\n\t\t\t// build the dictionary of existing values\r\n\t\t\tconst dictionary = {};\r\n\r\n\t\t\tfor (let currentCookieValuesIndex = 0; currentCookieValuesIndex < currentCookieValues.length; currentCookieValuesIndex++)\r\n\t\t\t{\r\n\t\t\t\t// if it does not have length then it doesn\"t belong in the new value.\r\n\t\t\t\tif (currentCookieValues[currentCookieValuesIndex].length > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconst keyValuePair = currentCookieValues[currentCookieValuesIndex].split(\"=\");\r\n\t\t\t\t\tdictionary[keyValuePair[0]] = (typeof keyValuePair[1] === \"undefined\" ? \"\" : keyValuePair[1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// add/update the value of the cookie key\r\n\t\t\tdictionary[cookieKey] = encodeURIComponent(cookieKeyValue);\r\n\r\n\t\t\t// clear the current value so it can be re-built.\r\n\t\t\tcookieValue = \"\";\r\n\r\n\t\t\t// build the new cookievalue\r\n\t\t\tlet firstKeyAdded = false;\r\n\r\n\t\t\tfor (const key in dictionary)\r\n\t\t\t{\r\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(dictionary, key))\r\n\t\t\t\t{\r\n\t\t\t\t\tcookieValue += (firstKeyAdded ? this.KeyValuePairSeparator : \"\") + key + \"=\" + dictionary[key];\r\n\t\t\t\t\tif (!firstKeyAdded)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfirstKeyAdded = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcookieValue = cookieKey + \"=\" + encodeURIComponent(cookieKeyValue);\r\n\t\t}\r\n\t\tthis.SetCookie(cookieName, cookieValue, expirationDays, setDomain);\r\n\t}\r\n}","import { AxiosError, AxiosResponse } from \"axios\";\r\nimport { CookieManager } from \"./CookieManager\";\r\nimport { ContentService } from \"@Api/ContentService\";\r\nimport CouponModalTemplate from \"@Base/Templates/CouponModal.hbs\";\r\nimport { CouponService } from \"@Api/CouponService\";\r\nimport { HeaderBase } from \"@Base/Site/HeaderBase\";\r\nimport Modal from \"bootstrap/js/dist/modal.js\";\r\nimport { EngagementProvider } from \"@Base/Engagement/Engagement\";\r\nimport { Tenant } from \"./Tenant\";\r\nimport { ModalTools } from \"./ModalTools\";\r\nimport { TextResource } from \"./TextResource\";\r\nimport queryString from \"query-string\";\r\nimport { TrackJS } from \"trackjs\";\r\n\r\nexport class CouponManager\r\n{\r\n\tprivate CouponCookie = CookieManager.Cookies.Coupon;\r\n\tprivate couponService: CouponService;\r\n\tprivate engagementProvider: EngagementProvider;\r\n\r\n\tconstructor()\r\n\t{\r\n\t\tthis.couponService = new CouponService();\r\n\t\tthis.engagementProvider = new EngagementProvider();\r\n\t}\r\n\r\n\tpublic get CouponID(): string\r\n\t{\r\n\t\treturn ContentService.Response.CouponID.toString();\r\n\t}\r\n\r\n\tpublic get CouponMismatch(): boolean\r\n\t{\r\n\t\treturn (this.CouponID !== this.PreviousCouponID);\r\n\t}\r\n\r\n\tpublic get CouponValid(): boolean\r\n\t{\r\n\t\treturn ContentService.Response.CouponIsValid;\r\n\t}\r\n\r\n\tpublic get PreviousCouponID(): string\r\n\t{\r\n\t\treturn CookieManager.GetCookie(this.CouponCookie.Key, this.CouponCookie.PreviousCouponID);\r\n\t}\r\n\r\n\tpublic ApplyCoupon = (couponCode): void =>\r\n\t{\r\n\t\tthis.couponService.ApplyCoupon(couponCode)\r\n\t\t\t.then((response: AxiosResponse) =>\r\n\t\t\t{\r\n\t\t\t\tif (response.data !== \"undefined\")\r\n\t\t\t\t{\r\n\t\t\t\t\tconst banner = response.data.replace(\" \", \" \");\r\n\t\t\t\t\tHeaderBase.AddToBannerSection(banner);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.catch((error: AxiosError) =>\r\n\t\t\t{\r\n\t\t\t\tconsole.error(error);\r\n\t\t\t});\r\n\t};\r\n\r\n\tpublic RemoveCoupon = (): void =>\r\n\t{\r\n\t\tthis.couponService.RemoveCoupon();\r\n\t};\r\n\r\n\tpublic DisplayCouponDetails = (banner: HTMLElement): void =>\r\n\t{\r\n\t\tconst details = banner.getAttribute(\"data-details\");\r\n\t\tconst title = banner.parentElement.textContent.replace(TextResource.GetTextByCulture(\"Feature_Coupon_Details\"), \"\");\r\n\r\n\t\tModalTools.DisplayAlert(details, title);\r\n\t};\r\n\r\n\t/**\r\n\t * Display the active coupon in a modal\r\n\t */\r\n\tprivate DisplayCouponModal = (): void =>\r\n\t{\r\n\t\tif (typeof ContentService.Response !== \"undefined\")\r\n\t\t{\r\n\t\t\tconst couponResponse = ContentService.Response.CouponBanner;\r\n\t\t\tconst parser = new DOMParser();\r\n\t\t\tconst couponHtml = parser.parseFromString(couponResponse, \"text/html\");\r\n\t\t\tlet couponText = \"\";\r\n\t\t\tconst logo: HTMLImageElement = document.querySelector(\".navbar-brand img\");\r\n\t\t\tlet logoClass = \"\";\r\n\t\t\tconst logoPath = logo.src;\r\n\t\t\tconst logoWidth = logo.width;\r\n\t\t\tconst logoHeight = logo.height;\r\n\t\t\tlet modalClass = \"\";\r\n\t\t\tlet modalContentClass = \"\";\r\n\t\t\tlet monsterPath = \"\";\r\n\t\t\tlet monsterWidth = \"\";\r\n\t\t\tlet monsterHeight = \"\";\r\n\t\t\tlet statusHeadline = \"\";\r\n\t\t\tlet statusSubtitle = \"\";\r\n\t\t\tconst validCoupon = this.CouponValid;\r\n\r\n\t\t\tif (this.CouponMismatch || !validCoupon)\r\n\t\t\t{\r\n\t\t\t\tif (couponResponse !== \"\" && couponResponse !== null)\r\n\t\t\t\t{\r\n\t\t\t\t\tconst couponBanner = couponHtml.querySelector(\".banner-text\");\r\n\r\n\t\t\t\t\tif (couponBanner !== null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcouponText = couponBanner.innerHTML;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (validCoupon)\r\n\t\t\t\t{\r\n\t\t\t\t\tmodalClass = \"coupon-modal--valid\";\r\n\t\t\t\t\tstatusHeadline = TextResource.GetTextByCulture(\"Feature_Coupon_Success_Headline\");\r\n\t\t\t\t\tstatusSubtitle = TextResource.GetTextByCulture(\"Feature_Coupon_Success_Subtitle\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmodalClass = \"coupon-modal--invalid\";\r\n\t\t\t\t\tstatusHeadline = TextResource.GetTextByCulture(\"Feature_Coupon_Invalid_Headline\");\r\n\t\t\t\t\tstatusSubtitle = TextResource.GetTextByCulture(\"Feature_Coupon_Invalid_Subtitle\");\r\n\r\n\t\t\t\t\tconsole.log(\"Coupon Invalid\");\r\n\r\n\t\t\t\t\tif (window.trackJs)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tTrackJS.addMetadata(\"couponCookie\", CookieManager.GetCookie(this.CouponCookie.Key));\r\n\t\t\t\t\t\tTrackJS.addMetadata(\"countryID\", CookieManager.GetCookie(CookieManager.Cookies.Visitor.Key, CookieManager.Cookies.Visitor.CountryID));\r\n\t\t\t\t\t\tTrackJS.addMetadata(\"personalizationID\", CookieManager.GetCookie(CookieManager.Cookies.Unique.Key));\r\n\t\t\t\t\t\tTrackJS.addMetadata(\"ogid\", CookieManager.GetCookie(\"CART_v1\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswitch (Tenant.DomainProjectID)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 13: case 140: case 164: case 165: case 171: case 173:\r\n\t\t\t\t\t\tlogoClass = \"filter-hc-red\";\r\n\t\t\t\t\t\tmonsterWidth = \"251\";\r\n\t\t\t\t\t\tmonsterHeight = \"134\";\r\n\t\t\t\t\t\tmonsterPath = \"/wwwroot/img/monsters/monster-peek-puppet.png\";\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 159: case 167: case 170:\r\n\t\t\t\t\t\tmodalContentClass = \"bg-primary text-white\";\r\n\t\t\t\t\t\tlogoClass = \"filter-white\";\r\n\t\t\t\t\t\tmonsterWidth = \"235\";\r\n\t\t\t\t\t\tmonsterHeight = \"144\";\r\n\t\t\t\t\t\tmonsterPath = \"/wwwroot/img/monsters/monster-peek.png\";\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 184:\r\n\t\t\t\t\t\tmodalContentClass = \"bg-dark text-white\";\r\n\t\t\t\t\t\tlogoClass = \"\";\r\n\t\t\t\t\t\tmonsterWidth = \"251\";\r\n\t\t\t\t\t\tmonsterHeight = \"134\";\r\n\t\t\t\t\t\tmonsterPath = \"/wwwroot/img/monsters/monster-peek-puppet.png\";\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst couponModalHtml = CouponModalTemplate({\r\n\t\t\t\t\tcloseLabel: TextResource.GetTextByCulture(\"Word_Close\"),\r\n\t\t\t\t\tcouponText: couponText,\r\n\t\t\t\t\tdomainProjectID: Tenant.DomainProjectID,\r\n\t\t\t\t\tlogoAltText: TextResource.FormatText(\"Feature_Coupon_Logo_AltText\", [Tenant.WebsiteName]),\r\n\t\t\t\t\tlogoClass: logoClass,\r\n\t\t\t\t\tlogoPath: logoPath,\r\n\t\t\t\t\tlogoWidth: logoWidth,\r\n\t\t\t\t\tlogoHeight: logoHeight,\r\n\t\t\t\t\tmodalClass: modalClass,\r\n\t\t\t\t\tmodalContentClass: modalContentClass,\r\n\t\t\t\t\tmonsterAltText: TextResource.FormatText(\"Feature_Coupon_Monster_AltText\", [Tenant.WebsiteName]),\r\n\t\t\t\t\tmonsterPath: monsterPath,\r\n\t\t\t\t\tmonsterWidth: monsterWidth,\r\n\t\t\t\t\tmonsterHeight: monsterHeight,\r\n\t\t\t\t\tstatusHeadline: statusHeadline,\r\n\t\t\t\t\tstatusSubtitle: statusSubtitle,\r\n\t\t\t\t\tvalidCoupon: validCoupon\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconst couponModalNode = parser.parseFromString(couponModalHtml, \"text/html\");\r\n\t\t\t\tdocument.body.appendChild(couponModalNode.body.firstChild);\r\n\t\t\t\tconst couponModalSelector = document.querySelector(\"#couponModal\");\r\n\t\t\t\tconst couponModalInstance = Modal.getOrCreateInstance(couponModalSelector);\r\n\r\n\t\t\t\tcouponModalInstance.show();\r\n\r\n\t\t\t\tcouponModalSelector.addEventListener(\"hidden.bs.modal\", (event) =>\r\n\t\t\t\t{\r\n\t\t\t\t\tModalTools.ModalDisposer(event.currentTarget);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (!validCoupon)\r\n\t\t\t\t{\r\n\t\t\t\t\tcouponModalSelector.addEventListener(\"hidden.bs.modal\", () =>\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.couponService.RemoveCoupon().then(() =>\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\twindow.setTimeout(() =>\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tthis.engagementProvider.DownloadSdk();\r\n\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tprivate ProcessCouponDisplay = (): void =>\r\n\t{\r\n\t\tif (typeof ContentService.Response !== \"undefined\")\r\n\t\t{\r\n\t\t\tconst banner = ContentService.Response.CouponBanner;\r\n\r\n\t\t\tif (banner !== undefined && banner !== null && banner !== \"\")\r\n\t\t\t{\r\n\t\t\t\tconst headerMessages = document.querySelector(\"header .msgs\");\r\n\t\t\t\tconst couponBannerSelector = document.querySelector(\"#cpn\");\r\n\r\n\t\t\t\t//insert a banner style coupon if the expand banner container is selected in admin. used (pretty much) exclusively for sitewide coupons like the post season sale\r\n\t\t\t\tif (headerMessages.classList.contains(\"msgs--open\") && couponBannerSelector === null)\r\n\t\t\t\t{\r\n\t\t\t\t\tconst couponBanner = `
${banner.replace(\" \", \" \")}
`;\r\n\t\t\t\t\tHeaderBase.AddToBannerSection(couponBanner);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.DisplayCouponModal();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.CouponMismatch)\r\n\t\t\t\t{\r\n\t\t\t\t\tCookieManager.SetInCookie(this.CouponCookie.Key, this.CouponCookie.PreviousCouponID, this.CouponID);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tpublic TriggerContentCallbacks = (): void =>\r\n\t{\r\n\t\tthis.ProcessCouponDisplay();\r\n\t};\r\n}","import { ContentService } from \"@Api/ContentService\";\r\nimport { CookieManager } from \"./CookieManager\";\r\nimport { Tenant } from \"./Tenant\";\r\nimport { TextResource } from \"./TextResource\";\r\n\r\nexport class DataPrivacyPolicy\r\n{\r\n\t// MEMBER VARIABLES\r\n\tpublic DataPrivacyPolicyCookie = CookieManager.Cookies.DataPrivacyPolicy;\r\n\tpublic RequiredCountry = null;\r\n\tpublic VisitorCookie = CookieManager.Cookies.Visitor;\r\n\r\n\tconstructor()\r\n\t{\r\n\t}\r\n\r\n\t// PUBLIC METHODS\r\n\t/// Gets or sets a value indicating whether to display the link.\r\n\tpublic get DisplayLink(): boolean\r\n\t{\r\n\t\tlet display = false;\r\n\r\n\t\tif (this.MarketingApprovedSelection !== null || this.PerformanceApprovedSelection !== null)\r\n\t\t{\r\n\t\t\tdisplay = true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// one (or both) of the values not set, country determines whether to display this or not\r\n\t\t\tdisplay = this.RequiredByCountry;\r\n\t\t}\r\n\r\n\t\treturn display;\r\n\t}\r\n\r\n\t/// Gets approved countries from js variable\r\n\tpublic get EnabledCountries(): Array\r\n\t{\r\n\t\t// @ts-expect-error this is defined on the dataprivacypolicy cookie facade\r\n\t\tif (typeof funDataPrivacyPolicyCountries !== 'undefined' && funDataPrivacyPolicyCountries !== null)\r\n\t\t{\r\n\t\t\t// @ts-expect-error this is defined on the dataprivacypolicy cookie facade\r\n\t\t\treturn funDataPrivacyPolicyCountries;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn [];\r\n\t\t}\r\n\t}\r\n\r\n\t/// Gets or sets a value indicating whether to display the modal window.\r\n\tpublic get DisplayModal(): boolean\r\n\t{\r\n\t\t// display link must be true and one of the values must not be set\r\n\t\tconst display = this.DisplayLink && (this.MarketingApprovedSelection === null || this.PerformanceApprovedSelection === null);\r\n\r\n\t\treturn display;\r\n\t}\r\n\r\n\t/// Gets or sets a value indicating whether marketing is approved.\r\n\tpublic MarketingApproved = (): boolean =>\r\n\t{\r\n\t\tlet approved = true;\r\n\r\n\t\tif (this.MarketingApprovedSelection !== null)\r\n\t\t{\r\n\t\t\t// use the actual value!\r\n\t\t\tapproved = this.MarketingApprovedSelection;\r\n\t\t}\r\n\t\telse if (this.RequiredByCountry)\r\n\t\t{\r\n\t\t\t// required by country so it is not approved\r\n\t\t\tapproved = false;\r\n\t\t}\r\n\r\n\t\treturn approved;\r\n\t};\r\n\r\n\t/// Gets or sets a value indicating whether marketing tracking is approved.\r\n\tpublic get MarketingApprovedSelection(): boolean\r\n\t{\r\n\t\tlet approved = null;\r\n\r\n\t\tconst approvedValue = CookieManager.GetCookie(this.DataPrivacyPolicyCookie.Key, this.DataPrivacyPolicyCookie.MarketingTrackingApproved);\r\n\r\n\t\tif (approvedValue !== null && approvedValue.length > 0)\r\n\t\t{\r\n\t\t\tapproved = approvedValue === '1';\r\n\t\t}\r\n\r\n\t\treturn approved;\r\n\t}\r\n\r\n\t/// Gets or sets a value indicating whether performance is approved.\r\n\tpublic get PerformanceApproved(): boolean\r\n\t{\r\n\t\tlet approved = true;\r\n\r\n\t\tif (this.PerformanceApprovedSelection !== null)\r\n\t\t{\r\n\t\t\t// use the action selection\r\n\t\t\tapproved = this.PerformanceApprovedSelection;\r\n\t\t}\r\n\t\telse if (this.RequiredByCountry)\r\n\t\t{\r\n\t\t\t// required by country so it is not approved\r\n\t\t\tapproved = false;\r\n\t\t}\r\n\r\n\t\treturn approved;\r\n\t}\r\n\r\n\t/// Gets or sets a value indicating whether performance tracking is approved.\r\n\tpublic get PerformanceApprovedSelection(): boolean\r\n\t{\r\n\t\tlet approved = null;\r\n\r\n\t\tconst approvedValue = CookieManager.GetCookie(this.DataPrivacyPolicyCookie.Key, this.DataPrivacyPolicyCookie.PerformanceTrackingApproved);\r\n\r\n\t\tif (approvedValue !== null && approvedValue.length > 0)\r\n\t\t{\r\n\t\t\tapproved = approvedValue === '1';\r\n\t\t}\r\n\r\n\t\treturn approved;\r\n\t}\r\n\r\n\t/// Gets or sets a value indicating whether approval is required by the current country.\r\n\tpublic get RequiredByCountry(): boolean\r\n\t{\r\n\t\tif (this.RequiredCountry === null)\r\n\t\t{\r\n\t\t\tlet countryID = 1; // default to US\r\n\t\t\tconst countryIDValue = CookieManager.GetCookie(this.VisitorCookie.Key, this.VisitorCookie.CountryID);\r\n\r\n\t\t\tthis.RequiredCountry = false;\r\n\r\n\t\t\tif (countryIDValue !== null && countryIDValue.length > 0)\r\n\t\t\t{\r\n\t\t\t\tconst parsedCountryID = parseInt(countryIDValue);\r\n\r\n\t\t\t\tif (!isNaN(parsedCountryID))\r\n\t\t\t\t{\r\n\t\t\t\t\tcountryID = parsedCountryID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet billCountryID = countryID; // default to the country selection\r\n\t\t\tconst billCountryIDValue = CookieManager.GetCookie(this.VisitorCookie.Key, this.VisitorCookie.BillCountryID);\r\n\r\n\t\t\tif (billCountryIDValue !== null && billCountryIDValue.length > 0)\r\n\t\t\t{\r\n\t\t\t\t// try to use the value from the cookie\r\n\t\t\t\tconst parsedBillCountryID = parseInt(billCountryIDValue);\r\n\t\t\t\tif (!isNaN(parsedBillCountryID))\r\n\t\t\t\t{\r\n\t\t\t\t\tbillCountryID = parsedBillCountryID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet shipCountryID = countryID; // default to the country selection\r\n\t\t\tconst shipCountryIDValue = CookieManager.GetCookie(this.VisitorCookie.Key, this.VisitorCookie.ShipCountryID);\r\n\r\n\t\t\tif (shipCountryIDValue !== null && shipCountryIDValue.length > 0)\r\n\t\t\t{\r\n\t\t\t\t// try to use the value from the cookie\r\n\t\t\t\tconst parsedShipCountryID = parseInt(shipCountryIDValue);\r\n\r\n\t\t\t\tif (!isNaN(parsedShipCountryID))\r\n\t\t\t\t{\r\n\t\t\t\t\tshipCountryID = parsedShipCountryID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.EnabledCountries.length > 0)\r\n\t\t\t{\r\n\t\t\t\t// loop through the countries to see if billing or shipping requires it!\r\n\t\t\t\tfor (let countryIndex = 0; countryIndex < this.EnabledCountries.length; countryIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tconst currentCountry = this.EnabledCountries[countryIndex];\r\n\r\n\t\t\t\t\tif (currentCountry === billCountryID || currentCountry === shipCountryID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// shipping or billing country requires it!\r\n\t\t\t\t\t\tthis.RequiredCountry = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.RequiredCountry;\r\n\t}\r\n\r\n\tpublic TriggerContentCallbacks = (): void =>\r\n\t{\r\n\t\tif (typeof ContentService.Response !== \"undefined\")\r\n\t\t{\r\n\t\t\tif (ContentService.Response.DisplayDataPrivacyPolicyLink)\r\n\t\t\t{\r\n\t\t\t\tthis.AddCookieSettingsLink();\r\n\t\t\t}\r\n\r\n\t\t\tif (ContentService.Response.DisplayDataPrivacyPolicyModal)\r\n\t\t\t{\r\n\t\t\t\tCookieManager.SetCookie(CookieManager.Cookies.DelayModal.Key, \"3\");\r\n\t\t\t\tCookieManager.SetCookie(CookieManager.Cookies.SeenModal.Key, \"false\");\r\n\t\t\t\tthis.OpenCookieSettings();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Add cookie settings link to the footer\r\n\t */\r\n\tpublic AddCookieSettingsLink = (): void =>\r\n\t{\r\n\t\tconst link = `${TextResource.GetTextByCulture(\"Client_CookieModal_CookieSettings\")}`;\r\n\t\tconst linkNode = document.createElement(\"a\");\r\n\t\tlinkNode.innerHTML = link;\r\n\t\tconst secure = document.documentElement.classList.contains(\"secure\");\r\n\r\n\t\tif (secure)\r\n\t\t{\r\n\t\t\tconst secureCopyright = document.querySelector(\"footer .copy\");\r\n\r\n\t\t\tif (secureCopyright !== null)\r\n\t\t\t{\r\n\t\t\t\tsecureCopyright.innerHTML += `  ${link}`;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tconst prvLnk = document.querySelector(\".prvLnk\");\r\n\r\n\t\t\tif (prvLnk !== null)\r\n\t\t\t{\r\n\t\t\t\tprvLnk.insertAdjacentElement(\"afterend\", linkNode);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Open the cookie settings screen\r\n\t */\r\n\tpublic OpenCookieSettings = (): void =>\r\n\t{\r\n\t\tconst contentNode = document.createElement(\"div\");\r\n\t\tcontentNode.innerHTML = `\r\n\t\t\t
\r\n\t\t`;\r\n\t\tconst cookieSettings = contentNode.firstElementChild;\r\n\t\tdocument.body.appendChild(cookieSettings);\r\n\r\n\t\timport(\"bootstrap/js/dist/offcanvas\")\r\n\t\t\t.then((OffCanvas) =>\r\n\t\t\t{\r\n\t\t\t\tconst offCanvas = new OffCanvas.default(cookieSettings);\r\n\t\t\t\toffCanvas.show();\r\n\t\t\t});\r\n\r\n\t\tdocument.querySelector(\"#cookieSettingsAccept\").addEventListener(\"click\", () =>\r\n\t\t{\r\n\t\t\tthis.UpdateCookieSettings(true, true);\r\n\t\t});\r\n\r\n\t\tdocument.querySelector(\"#cookieSettingsClose\").addEventListener(\"click\", () =>\r\n\t\t{\r\n\t\t\tthis.UpdateCookieSettings(false, false);\r\n\t\t});\r\n\t};\r\n\r\n\tpublic UpdateCookieSettings = (performance: boolean, marketing: boolean): void =>\r\n\t{\r\n\t\tconst privacyCookie = CookieManager.Cookies.DataPrivacyPolicy;\r\n\r\n\t\tCookieManager.SetInCookie(privacyCookie.Key, privacyCookie.MarketingTrackingApproved, marketing ? \"1\" : \"0\" );\r\n\t\tCookieManager.SetInCookie(privacyCookie.Key, privacyCookie.PerformanceTrackingApproved, performance ? \"1\" : \"0\");\r\n\r\n\t\twindow.location.reload();\r\n\t};\r\n}","import { ExperimentService } from \"@Api/ExperimentService\";\r\n\r\nexport class ExperimentManager\r\n{\r\n\tprivate readonly experimentService: ExperimentService;\r\n\r\n\tconstructor()\r\n\t{\r\n\t\tthis.experimentService = new ExperimentService();\r\n\t}\r\n\r\n\tpublic AddTest = (thirdPartyTestID: string, variantSequence: number, callback?: Function): void =>\r\n\t{\r\n\t\tthis.experimentService.AddTest(thirdPartyTestID, variantSequence, callback);\r\n\t};\r\n}","class Breakpoint\r\n{\r\n\tpublic Min: number;\r\n\tpublic Max?: number;\r\n\r\n\tconstructor(min: number, max?: number)\r\n\t{\r\n\t\tthis.Min = min;\r\n\r\n\t\tif (typeof max !== \"undefined\")\r\n\t\t{\r\n\t\t\tthis.Max = max - 0.2;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic get IsDown(): boolean\r\n\t{\r\n\t\tif (typeof this.Max !== \"undefined\")\r\n\t\t{\r\n\t\t\treturn window.matchMedia(`(max-width: ${this.Max}px)`).matches;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic get IsMatch(): boolean\r\n\t{\r\n\t\treturn window.matchMedia(`(min-width: ${this.Min}px) and (max-width: ${this.Max}px)`).matches;\r\n\t}\r\n\r\n\tpublic get IsUp(): boolean\r\n\t{\r\n\t\treturn window.matchMedia(`(min-width: ${this.Min}px)`).matches;\r\n\t}\r\n}\r\n\r\nexport class Media\r\n{\r\n\tprivate static MinPoints = {\r\n\t\tXs: 0,\r\n\t\tSm: 576,\r\n\t\tMd: 768,\r\n\t\tLg: 992,\r\n\t\tXl: 1200,\r\n\t\tXxl: 1500\r\n\t};\r\n\r\n\tpublic static Breakpoints = {\r\n\t\tXs: new Breakpoint(this.MinPoints.Xs, this.MinPoints.Sm),\r\n\t\tSm: new Breakpoint(this.MinPoints.Sm, this.MinPoints.Md),\r\n\t\tMd: new Breakpoint(this.MinPoints.Md, this.MinPoints.Lg),\r\n\t\tLg: new Breakpoint(this.MinPoints.Lg, this.MinPoints.Xl),\r\n\t\tXl: new Breakpoint(this.MinPoints.Xl, this.MinPoints.Xxl),\r\n\t\tXxl: new Breakpoint(this.MinPoints.Xxl)\r\n\t};\r\n\r\n\tpublic static MediaMobile = `(max-width: ${this.Breakpoints.Md.Max}px)`;\r\n\tpublic static MediaDesktop = `(min-width: ${this.Breakpoints.Lg.Min}px)`;\r\n\r\n\tpublic static get DeviceType(): string\r\n\t{\r\n\t\tif (this.Breakpoints.Md.IsDown)\r\n\t\t{\r\n\t\t\treturn \"mobile\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn \"desktop\";\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static get IsDesktop(): boolean\r\n\t{\r\n\t\tif (this.DeviceType === \"desktop\")\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static get IsMobile(): boolean\r\n\t{\r\n\t\tif (this.DeviceType === \"mobile\")\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}","import Modal from \"bootstrap/js/dist/modal.js\";\r\nimport BootstrapModalTemplate from \"@Base/Templates/BootstrapModal.hbs\";\r\n\r\nexport interface IBootstrapModal\r\n{\r\n\tmodalId: string;\r\n\tmodalClass?: string;\r\n\tmodalContent: string;\r\n\tmodalContentClass?: string;\r\n\tmodalTitle?: string;\r\n\tdisplayButtons: boolean;\r\n\tcancelButton?: string;\r\n\tconfirmButton?: string;\r\n}\r\n\r\nexport class ModalTools\r\n{\r\n\t/**\r\n\t * Generates and displays an alert modal\r\n\t * @param message Message text\r\n\t * @param title Modal Title\r\n\t * @param displayButtons Should buttons be displayed at the bottom\r\n\t */\r\n\tstatic DisplayAlert = (message: string, title?: string, displayButtons?: true): void =>\r\n\t{\r\n\t\tconst dialogOptions: IBootstrapModal = {\r\n\t\t\tmodalId: \"generatedAlert\",\r\n\t\t\tmodalContent: message,\r\n\t\t\tmodalTitle: title,\r\n\t\t\tdisplayButtons: displayButtons\r\n\t\t};\r\n\r\n\t\tModalTools.DisplayGeneratedModal(BootstrapModalTemplate(dialogOptions));\r\n\t};\r\n\r\n\tstatic DisplayGeneratedModal = (modalHtml: string): void =>\r\n\t{\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.innerHTML = modalHtml;\r\n\t\tconst modal = wrapper.firstElementChild;\r\n\t\tdocument.body.appendChild(modal);\r\n\t\tconst modalInstance = new Modal(modal);\r\n\t\tmodalInstance.show();\r\n\r\n\t\tmodal.addEventListener(\"hidden.bs.modal\", event =>\r\n\t\t{\r\n\t\t\tModalTools.ModalDisposer(event.currentTarget);\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t * Display alert messages from an ajax call in a modal\r\n\t * @param messages\r\n\t */\r\n\tstatic DisplayMessages = (messages: { Error?: [{ Description: string; }], Warning?: [{ Description: string; }]; }): void =>\r\n\t{\r\n\t\tif (messages !== null && messages !== undefined)\r\n\t\t{\r\n\t\t\tlet errors = \"\";\r\n\r\n\t\t\tif (messages.Error && messages.Error.length > 0)\r\n\t\t\t{\r\n\t\t\t\tfor (let i = 0; i < messages.Error.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (i > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\terrors += \"\\n\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\terrors += messages.Error[i].Description;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tModalTools.DisplayAlert(errors);\r\n\t\t\t}\r\n\r\n\t\t\tif (messages.Warning && messages.Warning.length > 0)\r\n\t\t\t{\r\n\t\t\t\tfor (let i = 0; i < messages.Warning.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (i > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\terrors += \"\\n\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\terrors += messages.Warning[i].Description;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tModalTools.DisplayAlert(errors);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tstatic ModalDisposer = (element): void =>\r\n\t{\r\n\t\tconst target = element as HTMLElement;\r\n\t\tconst instance = Modal.getInstance(target);\r\n\t\tinstance.dispose();\r\n\t\ttarget.remove();\r\n\t};\r\n}","import { CookieManager } from \"./CookieManager\";\r\n\r\nexport class Tenant\r\n{\r\n\tstatic ID = {\r\n\t\tFunUS: 159,\r\n\t\tFunUK: 167,\r\n\t\tFunAU: 170,\r\n\t\tHalloweenCostumesUS: 13,\r\n\t\tHalloweenCostumesCA: 140,\r\n\t\tHalloweenCostumesUK: 164,\r\n\t\tHalloweenCostumesAU: 165,\r\n\t\tHalloweenCostumesEU: 171,\r\n\t\tHalloweenCostumesMX: 173,\r\n\t\tHalloweenUS: 184\r\n\t};\r\n\r\n\tstatic get ThirdPartyModalEnabled(): boolean\r\n\t{\r\n\t\tswitch (Tenant.DomainProjectID)\r\n\t\t{\r\n\t\t\tcase Tenant.ID.FunUS:\r\n\t\t\tcase Tenant.ID.FunAU:\r\n\t\t\tcase Tenant.ID.HalloweenCostumesUS:\r\n\t\t\tcase Tenant.ID.HalloweenCostumesCA:\r\n\t\t\tcase Tenant.ID.HalloweenCostumesAU:\r\n\t\t\tcase Tenant.ID.HalloweenCostumesUK:\r\n\t\t\tcase Tenant.ID.HalloweenCostumesEU:\r\n\t\t\tcase Tenant.ID.HalloweenUS:\r\n\t\t\t\treturn true;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tstatic get CurrencyID(): string\r\n\t{\r\n\t\tconst currencyCookie = CookieManager.Cookies.Currency;\r\n\t\treturn CookieManager.GetCookie(currencyCookie.Key, currencyCookie.CurrencyID);\r\n\t}\r\n\r\n\tstatic get CurrencySymbol(): string\r\n\t{\r\n\t\tconst currencyCookie = CookieManager.Cookies.Currency;\r\n\t\treturn CookieManager.GetCookie(currencyCookie.Key, currencyCookie.CurrencySymbol);\r\n\t}\r\n\r\n\tstatic get DomainProjectID(): number\r\n\t{\r\n\t\tconst visitorCookie = CookieManager.Cookies.Visitor;\r\n\t\treturn parseInt(CookieManager.GetCookie(visitorCookie.Key, visitorCookie.DomainProjectID), 10);\r\n\t}\r\n\r\n\tstatic get ShortName(): string\r\n\t{\r\n\t\tswitch (this.DomainProjectID)\r\n\t\t{\r\n\t\t\tcase this.ID.FunUS:\r\n\t\t\t\treturn \"FunUS\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.FunAU:\r\n\t\t\t\treturn \"FunAU\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.FunUK:\r\n\t\t\t\treturn \"FunUK\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesUS:\r\n\t\t\t\treturn \"HalloweenCostumesUS\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesCA:\r\n\t\t\t\treturn \"HalloweenCostumesCA\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesUK:\r\n\t\t\t\treturn \"HalloweenCostumesUK\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesAU:\r\n\t\t\t\treturn \"HalloweenCostumesAU\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesEU:\r\n\t\t\t\treturn \"HalloweenCostumesEU\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesMX:\r\n\t\t\t\treturn \"HalloweenCostumesMX\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"null\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tstatic get Type(): string\r\n\t{\r\n\t\tswitch (this.DomainProjectID)\r\n\t\t{\r\n\t\t\tcase this.ID.FunUS:\r\n\t\t\tcase this.ID.FunAU:\r\n\t\t\tcase this.ID.FunUK:\r\n\t\t\t\treturn \"Fun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.ID.HalloweenCostumesUS:\r\n\t\t\tcase this.ID.HalloweenCostumesCA:\r\n\t\t\tcase this.ID.HalloweenCostumesUK:\r\n\t\t\tcase this.ID.HalloweenCostumesAU:\r\n\t\t\tcase this.ID.HalloweenCostumesEU:\r\n\t\t\tcase this.ID.HalloweenCostumesMX:\r\n\t\t\t\treturn \"HC\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"null\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tstatic SecureDomainUrl = \"\";\r\n\r\n\tstatic WebsiteName = \"\";\r\n}","export class DictionaryElement\r\n{\r\n\tconstructor(defaultText: string)\r\n\t{\r\n\t\tthis.DefaultText = defaultText;\r\n\t\tthis.Cultures = {};\r\n\t}\r\n\r\n\tpublic DefaultText: string;\r\n\r\n\tpublic AddCultureText(cultureCode: string, text: string): any\r\n\t{\r\n\t\tthis.Cultures[cultureCode] = text;\r\n\t\treturn this; // This allows us to string this method during the creation of this instance\r\n\r\n\t\t/* Don't delete \"return this;\", it's what allows the cultureDictionary to use [...].AddCultureText(...).AddCultureText(...).AddCultureText(...) etc. */\r\n\t}\r\n\r\n\tpublic GetCultureText(languageCode: string, cultureCode: string): string\r\n\t{\r\n\t\t// IMPORTANT: If there is no culture code, e.g. es-MX, then you need to return the default text\r\n\t\t// Otherwise you can return the text based on the culture code\r\n\r\n\t\tif (this.Cultures[cultureCode] !== undefined)\r\n\t\t{\r\n\t\t\treturn this.Cultures[cultureCode];\r\n\t\t}\r\n\t\telse if (this.Cultures[languageCode] !== undefined)\r\n\t\t{\r\n\t\t\treturn this.Cultures[languageCode];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn this.DefaultText;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate Cultures: any;\r\n}\r\n\r\nexport class TextResourceClass\r\n{\r\n\tconstructor()\r\n\t{\r\n\t\tthis.BuildLibrary();\r\n\t}\r\n\r\n\tprivate culture: any = null;\r\n\tprivate cultureDictionary: object = {};\r\n\r\n\t// Set your languages here, please. Also make the string all LOWER case.\r\n\tprivate langES = \"es-mx\";\r\n\r\n\tprivate AddTextKey(textKey: string, defaultText: string): DictionaryElement\r\n\t{\r\n\t\tif (this.cultureDictionary[textKey] !== null)\r\n\t\t{\r\n\t\t\tthis.cultureDictionary[textKey] = new DictionaryElement(defaultText);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// throw an error\r\n\t\t}\r\n\r\n\t\treturn this.cultureDictionary[textKey];\r\n\t}\r\n\r\n\tprivate BuildLibrary(): void\r\n\t{\r\n\t\t// Naming convention for dictionary items: (Feature||Page)_(FeatureName||PageName)_Descriptor\r\n\t\t// Single word naming convention: (Word)_Descriptor\r\n\t\tthis.cultureDictionary = {};\r\n\r\n\t\t// Single Words\r\n\t\tthis.cultureDictionary[\"Word_All\"] = new DictionaryElement(\"All\")\r\n\t\t\t.AddCultureText(this.langES, \"Todas\");\r\n\t\tthis.cultureDictionary[\"Word_And\"] = new DictionaryElement(\"and\")\r\n\t\t\t.AddCultureText(this.langES, \"y\");\r\n\t\tthis.cultureDictionary[\"Word_Done\"] = new DictionaryElement(\"Done\")\r\n\t\t\t.AddCultureText(this.langES, \"Listo\");\r\n\t\tthis.cultureDictionary[\"Word_Regular\"] = new DictionaryElement(\"Regular\")\r\n\t\t\t.AddCultureText(this.langES, \"Regular\");\r\n\t\tthis.cultureDictionary[\"Word_Back\"] = new DictionaryElement(\"Back\")\r\n\t\t\t.AddCultureText(this.langES, \"Atrás\");\r\n\t\tthis.cultureDictionary[\"Word_Greeting\"] = new DictionaryElement(\"Hello\")\r\n\t\t\t.AddCultureText(this.langES, \"Hola\");\r\n\t\tthis.cultureDictionary[\"Word_Hours\"] = new DictionaryElement(\"hours\")\r\n\t\t\t.AddCultureText(this.langES, \"horas\");\r\n\t\tthis.cultureDictionary[\"Word_ThankYou\"] = new DictionaryElement(\"Thank you\")\r\n\t\t\t.AddCultureText(this.langES, \"Gracias\");\r\n\t\tthis.cultureDictionary[\"Word_Minutes\"] = new DictionaryElement(\"minutes\")\r\n\t\t\t.AddCultureText(this.langES, \"minutos\");\r\n\t\tthis.cultureDictionary[\"Word_Seconds\"] = new DictionaryElement(\"seconds\")\r\n\t\t\t.AddCultureText(this.langES, \"segundos\");\r\n\t\tthis.cultureDictionary[\"Word_Continue\"] = new DictionaryElement(\"Continue\")\r\n\t\t\t.AddCultureText(this.langES, \"Continuar\");\r\n\t\tthis.cultureDictionary[\"Word_Yes\"] = new DictionaryElement(\"Yes\")\r\n\t\t\t.AddCultureText(this.langES, \"Sí\");\r\n\t\tthis.cultureDictionary[\"Word_No\"] = new DictionaryElement(\"No\")\r\n\t\t\t.AddCultureText(this.langES, \"No\");\r\n\t\tthis.cultureDictionary[\"Word_Womens\"] = new DictionaryElement(\"Womens\")\r\n\t\t\t.AddCultureText(this.langES, \"Mujeres\");\r\n\t\tthis.cultureDictionary[\"Word_Mens\"] = new DictionaryElement(\"Mens\")\r\n\t\t\t.AddCultureText(this.langES, \"Hombres\");\r\n\t\tthis.cultureDictionary[\"Word_Girls\"] = new DictionaryElement(\"Girls\")\r\n\t\t\t.AddCultureText(this.langES, \"Niñas\");\r\n\t\tthis.cultureDictionary[\"Word_Boys\"] = new DictionaryElement(\"Boys\")\r\n\t\t\t.AddCultureText(this.langES, \"Niños\");\r\n\t\tthis.cultureDictionary[\"Word_Infant\"] = new DictionaryElement(\"Infant\")\r\n\t\t\t.AddCultureText(this.langES, \"Infantil\");\r\n\t\tthis.cultureDictionary[\"Word_Kids\"] = new DictionaryElement(\"Kids\")\r\n\t\t\t.AddCultureText(this.langES, \"Niños\");\r\n\t\tthis.cultureDictionary[\"Word_Teen\"] = new DictionaryElement(\"Teen\")\r\n\t\t\t.AddCultureText(this.langES, \"Adolescente\");\r\n\t\tthis.cultureDictionary[\"Word_Toddler\"] = new DictionaryElement(\"Toddler\")\r\n\t\t\t.AddCultureText(this.langES, \"Niñito\");\r\n\t\tthis.cultureDictionary[\"Word_Star\"] = new DictionaryElement(\"Star\")\r\n\t\t\t.AddCultureText(this.langES, \"Estrella\");\r\n\t\tthis.cultureDictionary[\"Word_Stars\"] = new DictionaryElement(\"Stars\")\r\n\t\t\t.AddCultureText(this.langES, \"Estrellas\");\r\n\t\tthis.cultureDictionary[\"Word_Update\"] = new DictionaryElement(\"Update\")\r\n\t\t\t.AddCultureText(this.langES, \"Actualizar\");\r\n\t\tthis.cultureDictionary[\"Word_Close\"] = new DictionaryElement(\"Close\")\r\n\t\t\t.AddCultureText(this.langES, \"Cerrar\");\r\n\t\tthis.cultureDictionary[\"Word_Warning\"] = new DictionaryElement(\"Warning\")\r\n\t\t\t.AddCultureText(this.langES, \"Advertencia\");\r\n\t\tthis.cultureDictionary[\"Word_Size\"] = new DictionaryElement(\"Size\")\r\n\t\t\t.AddCultureText(this.langES, \"Talla\");\r\n\t\tthis.cultureDictionary[\"Word_Quantity\"] = new DictionaryElement(\"Quantity\")\r\n\t\t\t.AddCultureText(this.langES, \"Cantidad\");\r\n\r\n\t\t// Shorter and more common phrases\r\n\t\tthis.cultureDictionary[\"Phrase_ReadMore\"] = new DictionaryElement(\"Read More\")\r\n\t\t\t.AddCultureText(this.langES, \"Ver Más\");\r\n\t\tthis.cultureDictionary[\"Phrase_ReadLess\"] = new DictionaryElement(\"Read Less\")\r\n\t\t\t.AddCultureText(this.langES, \"Ver Menos\");\r\n\t\tthis.cultureDictionary[\"Phrase_Less\"] = new DictionaryElement(\"Less\")\r\n\t\t\t.AddCultureText(this.langES, \"Menos\");\r\n\t\tthis.cultureDictionary[\"Phrase_More\"] = new DictionaryElement(\"More\")\r\n\t\t\t.AddCultureText(this.langES, \"Más\");\r\n\t\tthis.cultureDictionary[\"Phrase_ViewAll\"] = new DictionaryElement(\"View All\")\r\n\t\t\t.AddCultureText(this.langES, \"Ver Todo\");\r\n\t\tthis.cultureDictionary[\"Phrase_PlusSize\"] = new DictionaryElement(\"Plus Size\")\r\n\t\t\t.AddCultureText(this.langES, \"Talla Extra\");\r\n\t\tthis.cultureDictionary[\"Phrase_MessageSent\"] = new DictionaryElement(\"Message Sent\")\r\n\t\t\t.AddCultureText(this.langES, \"Mensaje Enviado\");\r\n\r\n\t\t// Feature_Account\r\n\t\tthis.cultureDictionary[\"Feature_Account_EmailError\"] = new DictionaryElement(\"Please specify a valid email.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor, especifique un correo electrónico válido.\");\r\n\t\tthis.cultureDictionary[\"Feature_Account_PasswordError\"] = new DictionaryElement(\"A strong password is at least 6 characters long, has a number, a lowercase letter, an uppercase letter, and a special character.\")\r\n\t\t\t.AddCultureText(this.langES, \"Una contraseña segura tiene al menos 6 caracteres, tiene un número, una letra minúscula, una letra mayúscula y un carácter especial.\");\r\n\r\n\t\t// Feature_Banner\r\n\t\tthis.cultureDictionary[\"Feature_Banner_PricesLowAs\"] = new DictionaryElement(\"(Prices As Low As)\")\r\n\t\t\t.AddCultureText(this.langES, \"(Precios Tan Bajos Como)\");\r\n\r\n\t\t// Feature_Chat\r\n\t\tthis.cultureDictionary[\"Feature_Chat_AskAnything\"] = new DictionaryElement(\"Ask us anything!\").AddCultureText(this.langES, \"¡Pregúntenos Cualquier Cosa!\");\r\n\t\tthis.cultureDictionary[\"Feature_Chat_AskAnythingFunny\"] = new DictionaryElement(\"Ask us anything funny!\").AddCultureText(this.langES, \"¡Pregúntanos algo gracioso!\");\r\n\t\tthis.cultureDictionary[\"Feature_Chat_AskAnythingSpooky\"] = new DictionaryElement(\"Ask us anything spooky!\").AddCultureText(this.langES, \"¡Pregúntanos algo espeluznante!\");\r\n\t\tthis.cultureDictionary[\"Feature_Chat_ContactUs\"] = new DictionaryElement(\"Contact Us\").AddCultureText(this.langES, \"Contáctenos\");\r\n\t\tthis.cultureDictionary[\"Feature_Chat_CustomerSupport\"] = new DictionaryElement(\"Customer Support\").AddCultureText(this.langES, \"Atención al Cliente\");\r\n\t\tthis.cultureDictionary[\"Feature_Chat_LiveChat\"] = new DictionaryElement(\"Live Chat\")\r\n\t\t\t.AddCultureText(this.langES, \"Chat en Vivo\");\r\n\r\n\t\t// Feature_Checkout\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_Prop65_1\"] = new DictionaryElement(\"This product can expose you to chemicals, which are known to the State of California to cause cancer.\").AddCultureText(this.langES, \"Este producto puede exponerse a sustancias químicas, que el estado de California sabe que causan cáncer.\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_Prop65_2\"] = new DictionaryElement(\"This product can expose you to chemicals, which are known to the State of California to cause birth defects or other reproductive harm.\").AddCultureText(this.langES, \"Este producto puede exponerse a sustancias químicas, que el Estado de California sabe que causan defectos de nacimiento u otros daños reproductivos.\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_Prop65_3\"] = new DictionaryElement(\"This product can expose you to chemicals, which are known to the State of California to cause cancer and birth defects or other reproductive harm.\").AddCultureText(this.langES, \"Este producto puede exponerlo a sustancias químicas que, según el estado de California, causan cáncer y defectos de nacimiento u otros daños reproductivos\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_Prop65_Website\"] = new DictionaryElement(\" For more information go to www.p65warnings.ca.gov.\").AddCultureText(this.langES, \" Para más información vaya a www.p65warnings.ca.gov.\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_StepCount1\"] = new DictionaryElement(\"Step 1 of 4\").AddCultureText(this.langES, \"Paso 1 de 4\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_StepCount2\"] = new DictionaryElement(\"Step 2 of 4\").AddCultureText(this.langES, \"Paso 2 de 4\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_StepCount3\"] = new DictionaryElement(\"Step 3 of 4\").AddCultureText(this.langES, \"Paso 3 de 4\");\r\n\t\tthis.cultureDictionary[\"Feature_Checkout_StepCount4\"] = new DictionaryElement(\"Step 4 of 4\").AddCultureText(this.langES, \"Paso 4 de 4\");\r\n\r\n\t\t// Feature_Client\r\n\t\tthis.cultureDictionary[\"Feature_Client_ItemQty\"] = new DictionaryElement(\"You have |*| item|*| in your shopping cart.\")\r\n\t\t\t.AddCultureText(this.langES, \"Tienes |*| artículo|*| en tu carrito de compras.\");\r\n\t\tthis.cultureDictionary[\"Feature_Client_PreOrderItemQty\"] = new DictionaryElement(\"You have |*| item|*| in your pre-order cart.\")\r\n\t\t\t.AddCultureText(this.langES, \"Tienes |*| artículo|*| en tu pre-pedido carrito de compras.\");\r\n\r\n\t\t// Data Privacy Policy\r\n\t\tthis.cultureDictionary[\"Client_CookieModal_Header\"] = new DictionaryElement(\"Your Cookie Settings\")\r\n\t\t\t.AddCultureText(this.langES, \"TU CONFIGURACIÓN DE COOKIES\");\r\n\t\tthis.cultureDictionary[\"Client_CookieModal_Sentence\"] = new DictionaryElement(\"would like you to accept cookies for the purpose of performance, social media, and advertising. By continuing to use our site you are agreeing to this. For more information see our \")\r\n\t\t\t.AddCultureText(this.langES, \"le gustaría que aceptaras cookies con el propósito de rendimiento, redes sociales y publicidad. Al continuar usando nuestro sitio web, otorgas tu consentimiento para esto. Para obtener más información, consulta nuestra \");\r\n\t\tthis.cultureDictionary[\"Client_CookieModal_AceeptContinue\"] = new DictionaryElement(\"Accept & Continue\")\r\n\t\t\t.AddCultureText(this.langES, \"Aceptar y Continuar\");\r\n\t\tthis.cultureDictionary[\"Client_CookieModal_CookieSettings\"] = new DictionaryElement(\"Cookie Settings\")\r\n\t\t\t.AddCultureText(this.langES, \"Configuración de Cookies\");\r\n\t\tthis.cultureDictionary[\"Client_CookieModal_PrivacyCookiesText\"] = new DictionaryElement(\"Privacy & Cookie Policy\")\r\n\t\t\t.AddCultureText(this.langES, \"Política de privacidad y cookies\");\r\n\r\n\t\t// Feature_Coupon\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Logo_AltText\"] = new DictionaryElement(\"{0} Logo\")\r\n\t\t\t.AddCultureText(this.langES, \"Logotipo De {0}\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Invalid_Headline\"] = new DictionaryElement(\"Sorry!\")\r\n\t\t\t.AddCultureText(this.langES, \"¡Lo siento!\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Invalid_Subtitle\"] = new DictionaryElement(\"Your coupon has expired or is not valid\")\r\n\t\t\t.AddCultureText(this.langES, \"Tu cupón ha caducado o no es válido\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Monster_AltText\"] = new DictionaryElement(\"The {0} monster mascot peeking its head out.\")\r\n\t\t\t.AddCultureText(this.langES, \"La mascota del monstruo de {0} asoma la cabeza.\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Success_Headline\"] = new DictionaryElement(\"Lucky You!\")\r\n\t\t\t.AddCultureText(this.langES, \"¡Eres Afortunado!\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Success_Subtitle\"] = new DictionaryElement(\"Enjoy this special coupon. It's already applied to your cart!\")\r\n\t\t\t.AddCultureText(this.langES, \"Disfruta de este cupón especial. ¡Ya está aplicado a tu carrito!\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Details\"] = new DictionaryElement(\"See Details\")\r\n\t\t\t.AddCultureText(this.langES, \"Ver Detalles\");\r\n\t\tthis.cultureDictionary[\"Feature_Coupon_Apply_Error\"] = new DictionaryElement(\"There was a problem applying your coupon. Please reload the page and try again. If this issue persists, please contact customer service.\")\r\n\t\t\t.AddCultureText(this.langES, \"Hubo un problema al aplicar tu cupón. Vuelva a cargar la página e inténtelo de nuevo. Si este problema persiste, comuníquese con el servicio de atención al cliente.\");\r\n\r\n\t\t// Feature_Email_Acquisition_Modal\r\n\t\tthis.cultureDictionary[\"Feature_Email_Acquisition_Modal_Enter_Email\"] = new DictionaryElement(\"Enter email address\")\r\n\t\t\t.AddCultureText(\"es-MX\", \"Ingrese correo electrónico\");\r\n\t\tthis.cultureDictionary[\"Feature_Email_Acquisition_Modal_Privacy\"] = new DictionaryElement(\"Read our Privacy Policy\")\r\n\t\t\t.AddCultureText(this.langES, \"Lea nuestra Política de Privacidad\");\r\n\t\tthis.cultureDictionary[\"Feature_Email_Acquisition_Modal_Submit\"] = new DictionaryElement(\"Sign Up!\")\r\n\t\t\t.AddCultureText(\"es-MX\", \"¡Regístrate!\");\r\n\t\tthis.cultureDictionary[\"Feature_Email_Acqusistion_Modal_Text\"] = new DictionaryElement(\"Join our Costume Club|*|& Receive|*|off|*|Your First Order|*| + updates on exclusive promotions!\")\r\n\t\t\t.AddCultureText(this.langES, \"Únete a nuestro Club de Disfraces|*|Y Receibe|*|rebajado|*|en tu primer pedido|*|! Y actualizaciones sobre promociones exclusivas!\");\r\n\t\tthis.cultureDictionary[\"Feature_Email_Acquisition_Modal_Thanks\"] = new DictionaryElement(\"Thanks for signing up!\")\r\n\t\t\t.AddCultureText(\"es-MX\", \"¡Gracias por registrarte!\");\r\n\r\n\t\t// / Group selector section.\r\n\t\tthis.cultureDictionary[\"GroupSelector_SizeFilter_Text\"] = new DictionaryElement(\"Size Filter\")\r\n\t\t\t.AddCultureText(this.langES, \"Filtro Talla\");\r\n\t\tthis.cultureDictionary[\"GroupSelector_SelectSize_Text\"] = new DictionaryElement(\"Select Size\")\r\n\t\t\t.AddCultureText(this.langES, \"Selecciona Talla\");\r\n\r\n\t\t// Feature_Header\r\n\t\tthis.cultureDictionary[\"Feature_Header_AccountButton\"] = new DictionaryElement(\"Sign In or Sign Up\")\r\n\t\t\t.AddCultureText(this.langES, \"Inicia Sesión o Registrarse\");\r\n\r\n\t\t// Feature_OrderTracking\r\n\t\tthis.cultureDictionary[\"Feature_OrderTracking_AddError\"] = new DictionaryElement(\"There were some problems trying to add the products from this scene to the cart:\")\r\n\t\t\t.AddCultureText(this.langES, \"Hubo algunos problemas al intentar agregar los productos de esta escena al carrito:\");\r\n\t\tthis.cultureDictionary[\"Feature_OrderTracking_ConfirmAdd\"] = new DictionaryElement(\"Do you want to add the items that are available to your cart?\")\r\n\t\t\t.AddCultureText(this.langES, \"¿Desea agregar los artículos que están disponibles para su carrito?\");\r\n\r\n\t\t// Feature_ProductReview\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_RateIt\"] = new DictionaryElement(\"Rate It\")\r\n\t\t\t.AddCultureText(this.langES, \"Puntúalo\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_HateIt\"] = new DictionaryElement(\"I Hate It\")\r\n\t\t\t.AddCultureText(this.langES, \"Lo odio\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_DontLikeIt\"] = new DictionaryElement(\"I Don't Like It\")\r\n\t\t\t.AddCultureText(this.langES, \"No me gusta\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_ItsOkay\"] = new DictionaryElement(\"It's Okay\")\r\n\t\t\t.AddCultureText(this.langES, \"Esta bien\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_LikeIt\"] = new DictionaryElement(\"I Like It\")\r\n\t\t\t.AddCultureText(this.langES, \"Me gusta\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_LoveIt\"] = new DictionaryElement(\"I Love It\")\r\n\t\t\t.AddCultureText(this.langES, \"Lo amo\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_RatingRequired\"] = new DictionaryElement(\"Rating Is Required\")\r\n\t\t\t.AddCultureText(this.langES, \"Se requiere calificación\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Clear\"] = new DictionaryElement(\"Clear\")\r\n\t\t\t.AddCultureText(this.langES, \"Claro\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Select\"] = new DictionaryElement(\"Please select your rating.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione su calificación.\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Title\"] = new DictionaryElement(\"Please enter your title.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor introduzca su titulo.\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Review\"] = new DictionaryElement(\"Please enter your review.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese su comentario.\");\r\n\t\tthis.cultureDictionary['Feature_ProductReview_ReviewOrUploadRequired'] = new DictionaryElement('A review comment or a photo upload is required.')\r\n\t\t\t.AddCultureText(this.langES, 'Se requiere un comentario de revisión o una carga de fotos.');\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Corrections\"] = new DictionaryElement(\"Please correct the following errors:\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor corrige los siguientes errores:\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Error\"] = new DictionaryElement(\"Something went wrong:\")\r\n\t\t\t.AddCultureText(this.langES, \"Algo salió mal:\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Delete\"] = new DictionaryElement(\"Are you sure you want to delete your review?\")\r\n\t\t\t.AddCultureText(this.langES, \"¿Estás seguro de que quieres borrar tu reseña?\");\r\n\t\tthis.cultureDictionary[\"Feature_ProductReview_Posted\"] = new DictionaryElement(\"Rating Posted\")\r\n\t\t\t.AddCultureText(this.langES, \"Calificación Publicada\");\r\n\t\tthis.cultureDictionary['Feature_ProductReview_ReviewOrUploadRequired'] = new DictionaryElement('Review or upload is required.')\r\n\t\t\t.AddCultureText(this.langES, 'Se requiere revisar o cargar.');\r\n\r\n\t\t// Feature_ProductSelector\r\n\t\tthis.cultureDictionary[\"Feature_ProductSelector_OutofStock\"] = new DictionaryElement(\"Some of the products you selected are out of stock and will not be added to the cart. Continue?\")\r\n\t\t\t.AddCultureText(this.langES, \"Algunos de los productos que seleccionó están agotados y no se agregarán al carrito. ¿Continuar?\");\r\n\t\tthis.cultureDictionary[\"Feature_CouplesSelector_Header\"] = new DictionaryElement(\"Couples Costume Selector\")\r\n\t\t\t.AddCultureText(this.langES, \"Selector de Disfraces de Parejas\");\r\n\t\tthis.cultureDictionary[\"Feature_CouplesSelector_Coordinate\"] = new DictionaryElement(\"Coordinate Your Couple\")\r\n\t\t\t.AddCultureText(this.langES, \"Coordina tu Pareja\");\r\n\t\tthis.cultureDictionary[\"Feature_CouplesSelector_Description\"] = new DictionaryElement(\"Coordinate costumes for you and yours with one convenient tool!\")\r\n\t\t\t.AddCultureText(this.langES, \"¡Coordina los trajes para ti y los tuyos con una herramienta práctica!\");\r\n\t\tthis.cultureDictionary[\"Feature_GroupsSelector_Header\"] = new DictionaryElement(\"Group Costume Selector\")\r\n\t\t\t.AddCultureText(this.langES, \"Selector de Disfraces Grupales\");\r\n\t\tthis.cultureDictionary[\"Feature_GroupsSelector_Create\"] = new DictionaryElement(\"Create Your Own Group\")\r\n\t\t\t.AddCultureText(this.langES, \"Crea tu Propio Grupo\");\r\n\t\tthis.cultureDictionary[\"Feature_GroupsSelector_Description\"] = new DictionaryElement(\"Coordinate costumes for your entire group - large or small - with one convenient tool!\")\r\n\t\t\t.AddCultureText(this.langES, \"¡Coordine los disfraces para todo su grupo, grande o pequeño, con una herramienta práctica!\");\r\n\r\n\t\t// Feature_ProductUpsell\r\n\t\tthis.cultureDictionary[\"Feature_ProductUpsell_SelectSize\"] = new DictionaryElement(\"Please select a size and/or quantity to add to the order.\")\r\n\t\t\t.AddCultureText(this.langES, \"Seleccione un tamaño y/o cantidad para agregar al pedido.\");\r\n\r\n\t\t// Feature_Product_Theme\r\n\t\tthis.cultureDictionary[\"Feature_Theme_SelectSize\"] = new DictionaryElement(\"Please select a size.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione una talla.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_SelectHeightFt\"] = new DictionaryElement(\"Please select your height in feet.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione su altura en pies.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_SelectHeightIn\"] = new DictionaryElement(\"Please select your height in inches.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione su altura en pulgadas.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_NotiErr\"] = new DictionaryElement(\"There was a problem saving the notification, please try again.\")\r\n\t\t\t.AddCultureText(this.langES, \"Hubo un problema al guardar la notificación. Inténtalo de nuevo.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_SgnUpThnkYou\"] = new DictionaryElement(\"Thank you for signing up for our email notification. You will be notified via email when the product is back in stock.\")\r\n\t\t\t.AddCultureText(this.langES, \"Gracias por suscribirse a nuestra notificación por correo electrónico. Se le notificará por correo electrónico cuando el producto vuelva a estar disponible.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_EmailThankYou\"] = new DictionaryElement(\"Thank you for signing up for our email notification.\")\r\n\t\t\t.AddCultureText(this.langES, \"Gracias por suscribirse a nuestra notificación por correo electrónico.\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_AddProdError\"] = new DictionaryElement(\"There were some problems trying to add the products from this scene to the cart\")\r\n\t\t\t.AddCultureText(this.langES, \"Hubo algunos problemas al intentar agregar los productos de esta escena al carro\");\r\n\t\tthis.cultureDictionary[\"Feature_Theme_ComingSoon\"] = new DictionaryElement(\"Measurements Coming Soon\")\r\n\t\t\t.AddCultureText(this.langES, \"Las Medidas Vendrán Pronto\");\r\n\r\n\t\t// Feature_Receipt\r\n\t\tthis.cultureDictionary[\"Feature_Receipt_TaxEstimate\"] = new DictionaryElement(\"Estimated Tax\")\r\n\t\t\t.AddCultureText(this.langES, \"Impuesto Estimado\");\r\n\r\n\t\t// Feature_Recommendations\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_ComingSoon\"] = new DictionaryElement(\"New & Coming Soon\")\r\n\t\t\t.AddCultureText(this.langES, \"Nuevo & Muy Pronto\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_Accessories\"] = new DictionaryElement(\"Recommended Accessories\")\r\n\t\t\t.AddCultureText(this.langES, \"Accesorios Recomendados\");\r\n\t\tthis.cultureDictionary['Feature_Recommendations_Decorations'] = new DictionaryElement('Recommended Decorations')\r\n\t\t\t.AddCultureText(this.langES, 'Decoraciones Recomendadas');\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_Products\"] = new DictionaryElement(\"Recommended Products\")\r\n\t\t\t.AddCultureText(this.langES, \"Productos Recomendados\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_MayLike\"] = new DictionaryElement(\"You May Also Like These\")\r\n\t\t\t.AddCultureText(this.langES, \"También te Podría Gustar Esto\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_MoreTheme\"] = new DictionaryElement(\"More From This Theme\")\r\n\t\t\t.AddCultureText(this.langES, \"Más de Este Tema\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_Continue\"] = new DictionaryElement(\"Continue Shopping\")\r\n\t\t\t.AddCultureText(this.langES, \"Seguir Comprando\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_AlsoViewed\"] = new DictionaryElement(\"Customers Also Viewed\")\r\n\t\t\t.AddCultureText(this.langES, \"Los Clientes También Vieron\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_AlsoBought\"] = new DictionaryElement(\"Customers Also Bought\")\r\n\t\t\t.AddCultureText(this.langES, \"Los Clientes También Compraron\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_RecentlyViewed\"] = new DictionaryElement(\"Recently Viewed\")\r\n\t\t\t.AddCultureText(this.langES, \"Visto Recientemente\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_Costumes\"] = new DictionaryElement(\"Recommended Costumes\")\r\n\t\t\t.AddCultureText(this.langES, \"Disfraces Recomendados\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_For_You\"] = new DictionaryElement(\"Recommended For You\")\r\n\t\t\t.AddCultureText(this.langES, \"Recomendado Para Ti\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_MysteryBoxes\"] = new DictionaryElement(\"Mystery Boxes\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_Searched\"] = new DictionaryElement(\"Customers Also Searched\")\r\n\t\t\t.AddCultureText(this.langES, \"Los Clientes También Buscaron\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_RelatedCart\"] = new DictionaryElement(\"Related To Items In Your Cart\")\r\n\t\t\t.AddCultureText(this.langES, \"Relacionados Con Los Artículos De Su Carrito\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_TrendingOnFun\"] = new DictionaryElement(\"Trending Items on FUN.com\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_PopularProducts\"] = new DictionaryElement(\"Popular Products\");\r\n\t\tthis.cultureDictionary[\"Feature_Recommendations_TrendingProducts\"] = new DictionaryElement(\"Trending Products\")\r\n\t\t\t.AddCultureText(this.langES, \"Productos De Tendencia\");\r\n\r\n\t\t// Feature_Shipping\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_ValidRntlQnty\"] = new DictionaryElement(\"Please enter a valid rental quantity.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese una cantidad válida de alquiler.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_SelectState\"] = new DictionaryElement(\"Please select your state.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione su estado.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_SelectDate\"] = new DictionaryElement(\"Please enter a valid event date.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese una fecha de evento válida.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_FutureDate\"] = new DictionaryElement(\"Please select a future date.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione una fecha futura.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_FutureDateRestriction\"] = new DictionaryElement(\"Please enter an event date less than 1 year in the future.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Ingrese una fecha de evento de menos de 1 año en el futuro.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_FuturePrchseQnty\"] = new DictionaryElement(\"Please enter a valid quantity.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese una cantidad de compra válida.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_MaxQuantity\"] = new DictionaryElement(\"We only have {0} in stock. Please select a lower quantity.\")\r\n\t\t\t.AddCultureText(this.langES, \"Solo tenemos {0} en stock. Por favor seleccione una cantidad menor.\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_OutofStock\"] = new DictionaryElement(\"Please select an out-of-stock item to be notified about.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor seleccione un artículo sin stock para ser notificado.\\n\");\r\n\t\tthis.cultureDictionary[\"Feature_Shipping_ValidEmail\"] = new DictionaryElement(\"Please enter a valid email address.\\n\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor, introduce una dirección de correo electrónico válida.\\n\");\r\n\r\n\t\t// Feature_Tracking\r\n\t\tthis.cultureDictionary[\"Feature_Tracking_TrackOrder\"] = new DictionaryElement(\"Track your order\")\r\n\t\t\t.AddCultureText(this.langES, \"Rastrea tu pedido\");\r\n\r\n\t\tthis.cultureDictionary[\"Feature_Global_ValidSearch\"] = new DictionaryElement(\"Please enter something to search for.\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese algo para buscar.\");\r\n\r\n\t\t// Feature_TransitBanner\r\n\t\tthis.cultureDictionary[\"Feature_TransitBanner_Headline_FathersDay\"] = new DictionaryElement(`There's Still Time Before Father's Day – View Shipping Options!`)\r\n\t\t\t.AddCultureText(this.langES, `Todavía Hay Tiempo Antes De Día Del Padre – ¡Ver Opciones De Envío!`);\r\n\t\tthis.cultureDictionary[\"Feature_TransitBanner_Headline_Christmas\"] = new DictionaryElement(`There's Still Time Before Christmas – View Shipping Options!`)\r\n\t\t\t.AddCultureText(this.langES, `Todavía Hay Tiempo Antes De Navidad – ¡Ver Opciones De Envío!`);\r\n\t\tthis.cultureDictionary[\"Feature_TransitBanner_Headline_Halloween\"] = new DictionaryElement(`There's Still Time Before Halloween – View Shipping Options!`)\r\n\t\t\t.AddCultureText(this.langES, `Todavía Hay Tiempo Antes De Halloween – ¡Ver Opciones De Envío!`);\r\n\r\n\t\t// Feature_Utility\r\n\t\tthis.cultureDictionary[\"Feature_Uitility_ErrorMsg\"] = new DictionaryElement(\"An error has occurred, please try again.\")\r\n\t\t\t.AddCultureText(this.langES, \"Ha ocurrido un error. Por favor intente otra vez.\");\r\n\t\tthis.cultureDictionary[\"Utility_Alert_DateFormat\"] = new DictionaryElement(\"The date format should be : mm/dd/yyyy\")\r\n\t\t\t.AddCultureText(this.langES, \"El formato de fecha debe ser : mm/dd/yyy\");\r\n\t\tthis.cultureDictionary[\"Utility_Alert_ValidMonth\"] = new DictionaryElement(\"Please enter a valid month\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor, introduzca un mes válido\");\r\n\t\tthis.cultureDictionary[\"Utility_Alert_ValidDay\"] = new DictionaryElement(\"Please enter a valid day\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor ingrese un día válido\");\r\n\t\tthis.cultureDictionary[\"Utility_Alert_ValidYear\"] = new DictionaryElement(\"Please enter a valid 4 digit year between\")\r\n\t\t\t.AddCultureText(this.langES, \"Ingrese un año válido de 4 dígitos entre\");\r\n\t\tthis.cultureDictionary[\"Utility_Alert_ValidDate\"] = new DictionaryElement(\"Please enter a valid date\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor introduzca una fecha valida\");\r\n\r\n\t\t// Form\r\n\t\tthis.cultureDictionary[\"Feature_Form_Error\"] = new DictionaryElement(\"Please correct the following errors:\")\r\n\t\t\t.AddCultureText(this.langES, \"Por favor corrige los siguientes errores:\");\r\n\t}\r\n\r\n\tprivate GetBrowserCulture(): string\r\n\t{\r\n\t\tconst metaLanguageArray = document.getElementsByName(\"language\");\r\n\t\tlet metaLanguage = \"\";\r\n\r\n\t\t// getting the language metatags\r\n\t\tif (metaLanguageArray.length > 0)\r\n\t\t{\r\n\t\t\tmetaLanguage = metaLanguageArray[0].getAttribute(\"content\");\r\n\t\t}\r\n\r\n\t\t// getting language from head\r\n\t\tif (metaLanguage.length === 0)\r\n\t\t{\r\n\t\t\tmetaLanguage = document.getElementsByTagName(\"head\")[0].getAttribute(\"lang\");\r\n\t\t}\r\n\r\n\t\t// if no language in head then use selected language cookie from smartertrack\r\n\t\t// This is only needed on smarter track\r\n\t\t// if ((metaLanguage === null || metaLanguage.length === 0) && Fun.CookieManager.GetCookie(\"SelectedLanguage\").length > 0)\r\n\t\t// {\r\n\t\t// \tmetaLanguage = Fun.CookieManager.GetCookie(\"SelectedLanguage\");\r\n\t\t// }\r\n\r\n\t\t// if no language has been defined so far, just use english\r\n\t\tif (metaLanguage === null || metaLanguage.length === 0)\r\n\t\t{\r\n\t\t\tmetaLanguage = \"en\";\r\n\t\t}\r\n\r\n\t\treturn metaLanguage.toLowerCase(); // Makes the lang attribute capitalization agnostic\r\n\t}\r\n\r\n\tprivate SetCultureAndLanguage(): void\r\n\t{\r\n\t\tif (this.culture === null)\r\n\t\t{\r\n\t\t\t// need to set it here\r\n\t\t\tthis.culture = { Language: \"\", CultureCode: \"\" };\r\n\r\n\t\t\t// let userCultureSetting: string = \"es-MX\"; // This will become the html lang=\"XYZ\" attribute\r\n\t\t\tconst userCultureSetting: string = this.GetBrowserCulture(); // Get the meta html language of site the user is on.\r\n\t\t\tif (userCultureSetting)\r\n\t\t\t{\r\n\t\t\t\tif (userCultureSetting.length > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tconst cultureStringArray = userCultureSetting.split(\"-\");\r\n\t\t\t\t\tthis.culture.Language = cultureStringArray[0];\r\n\t\t\t\t\tif (cultureStringArray.length > 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// re-build the culture code in case the original was whack\r\n\t\t\t\t\t\tthis.culture.CultureCode = cultureStringArray[0] + \"-\" + cultureStringArray[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic ConstructSentence(key: string, item: string): string\r\n\t{\r\n\t\t/*\r\n\t\t * item: string refers to the index of the sentence you need\r\n\t\t * @string return\r\n\t\t * We made this function so that it would reduce the number of lines in the dictionary and reduce confusion. To\r\n\t\t * construct a sentence simply add |*| (bar star bar) to each break point. This way you can also have different\r\n\t\t * sentence/word orders depending on the language needs.\r\n\t\t * */\r\n\t\tconst txt: string = this.GetTextByCulture(key);\r\n\t\tconst splitText = txt.split(\"|*|\");\r\n\t\treturn splitText[item];\r\n\t}\r\n\r\n\tpublic FormatText(key: string, arr: string[]): string\r\n\t{\r\n\t\tlet txt = this.GetTextByCulture(key); // same function that we used for getting the text\r\n\t\tfor (let index = 0; index < arr.length; index++)\r\n\t\t{\r\n\t\t\tconst arrElement = arr[index];\r\n\t\t\tconst replaceText = '{' + index + '}';\r\n\r\n\t\t\t// loop until we have replaced all the text\r\n\t\t\twhile (txt.indexOf(replaceText) >= 0)\r\n\t\t\t{\r\n\t\t\t\ttxt = txt.replace(replaceText, arrElement);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn txt;\r\n\t}\r\n\r\n\tpublic GetCulture(): string\r\n\t{\r\n\t\tthis.SetCultureAndLanguage();\r\n\t\treturn this.culture.CultureCode;\r\n\t}\r\n\r\n\tpublic GetLanguage(): string\r\n\t{\r\n\t\tthis.SetCultureAndLanguage();\r\n\t\treturn this.culture.Language;\r\n\t}\r\n\r\n\tpublic GetTextByCulture(key: string): string\r\n\t{\r\n\t\tlet text = \"\";\r\n\t\tif (key !== null && key.length > 0)\r\n\t\t{\r\n\t\t\t// the key is usable\r\n\t\t\ttext = null;\r\n\t\t\tif (this.cultureDictionary && this.cultureDictionary[key] !== null)\r\n\t\t\t{\r\n\t\t\t\tconst keyElement: DictionaryElement = this.cultureDictionary[key];\r\n\r\n\t\t\t\t// cultures exist, try to find a match\r\n\t\t\t\ttext = keyElement.GetCultureText(this.GetLanguage(), this.GetCulture());\r\n\t\t\t}\r\n\r\n\t\t\ttext = text === null ? \"\" : text;\r\n\t\t}\r\n\r\n\t\tif (text.length === 0)\r\n\t\t{\r\n\t\t\tconsole.log(\"We need to do better than this\");\r\n\t\t}\r\n\r\n\t\treturn text;\r\n\t}\r\n}\r\n\r\nexport const TextResource = new TextResourceClass();","import { AxiosError, AxiosResponse } from \"axios\";\r\nimport { CartService } from \"@Api/CartService\";\r\nimport { TrackingService } from \"@Api/TrackingService\";\r\nimport { CookieManager } from \"./CookieManager\";\r\n\r\nexport class Tracking\r\n{\r\n\tprivate readonly cartService: CartService;\r\n\tprivate readonly trackingService: TrackingService;\r\n\r\n\tconstructor()\r\n\t{\r\n\t\tthis.cartService = new CartService();\r\n\t\tthis.trackingService = new TrackingService();\r\n\t}\r\n\r\n\tpublic AddExperimentToGa = (experimentId): void =>\r\n\t{\r\n\t\tif (typeof ga !== \"undefined\")\r\n\t\t{\r\n\t\t\tga(\"set\", \"exp\", experimentId);\r\n\t\t}\r\n\t};\r\n\r\n\tpublic IncreaseVisitCount = (): void =>\r\n\t{\r\n\t\tconst returnVisitorCookie = CookieManager.Cookies.ReturnVisitor;\r\n\r\n\t\t//new visit\r\n\t\tlet visits = parseInt(CookieManager.GetCookie(returnVisitorCookie.Key, returnVisitorCookie.VisitCount), 10);\r\n\r\n\t\tvisits = isNaN(visits) ? 0 : visits;\r\n\t\tvisits = visits + 1;\r\n\r\n\t\tCookieManager.SetInCookie(returnVisitorCookie.Key, returnVisitorCookie.VisitCount, visits.toString(), 365, false);\r\n\t};\r\n\r\n\tpublic RestoreCart = (ogid): void =>\r\n\t{\r\n\t\tthis.cartService.RestoreCart(ogid)\r\n\t\t\t.catch((error) =>\r\n\t\t\t{\r\n\t\t\t\tconsole.error(error);\r\n\t\t\t});\r\n\t};\r\n\r\n\tpublic SubmitPageViewData = (pageViewData): void =>\r\n\t{\r\n\t\tif (pageViewData !== null)\r\n\t\t{\r\n\t\t\t// Set country to lowercase to appease facebook\r\n\t\t\t// http://helpdesk.fun.local/IT/Ticket/23754\r\n\t\t\tfor (const entry of pageViewData)\r\n\t\t\t{\r\n\t\t\t\tlet stopChecking = false;\r\n\r\n\t\t\t\tif (typeof entry === \"object\")\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (const [key] of Object.entries(entry))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (key === \"country\")\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tstopChecking = true;\r\n\t\t\t\t\t\t\tentry.country = entry.country.toLowerCase();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (stopChecking === true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.trackingService.SubmitWebAPI(pageViewData);\r\n\t\t}\r\n\t};\r\n\r\n\tpublic VisitCountCheck = (): void =>\r\n\t{\r\n\t\tconst returnVisitorCookie = CookieManager.Cookies.ReturnVisitor;\r\n\r\n\t\tlet lastVisitTime = parseInt(CookieManager.GetCookie(returnVisitorCookie.Key, returnVisitorCookie.LastVisitTime),\r\n\t\t\t10\r\n\t\t);\r\n\r\n\t\t/// Gets or sets the idle time in minutes before the visit count is increased.\r\n\t\tconst returnVisitMinutesIdle = 30;\r\n\t\tconst threshold = returnVisitMinutesIdle * 60000;\r\n\t\tconst now = new Date().getTime();\r\n\t\tlet delta = 0;\r\n\r\n\t\tlastVisitTime = isNaN(lastVisitTime) ? 0 : lastVisitTime;\r\n\t\tdelta = now - lastVisitTime;\r\n\r\n\t\tif (lastVisitTime === 0 || delta > threshold)\r\n\t\t{\r\n\t\t\tthis.IncreaseVisitCount();\r\n\t\t}\r\n\r\n\t\tCookieManager.SetInCookie(returnVisitorCookie.Key, returnVisitorCookie.LastVisitTime, now.toString(), 365, false);\r\n\t};\r\n}","export class Validation\r\n{\r\n\tconstructor()\r\n\t{\r\n\t}\r\n\r\n\tstatic Patterns = {\r\n\t\tQuantity: /^[1-9][0-9]*$/,\r\n\t\tEmail: /^(([^<>()\\[\\]\\\\.,;:\\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\t\tUrl: /[-a-zA-Z0-9@:%_\\+.~#?&//=]{2,256}\\.?[a-z]{2,4}\\b(\\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?/\r\n\t};\r\n\r\n\tstatic Email(email: string): boolean\r\n\t{\r\n\t\tlet matchArray = null;\r\n\t\tlet isValid = true;\r\n\r\n\t\tif (email !== null && email !== undefined)\r\n\t\t{\r\n\t\t\temail = email.replace(\"name@emailaddress.com\", \"\");\r\n\t\t\temail = email.replace(\" \", \"\");\r\n\t\t\tmatchArray = email.match(Validation.Patterns.Email);\r\n\r\n\t\t\tif (matchArray === null || email === \"\")\r\n\t\t\t{\r\n\t\t\t\tisValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isValid;\r\n\t}\r\n\r\n\tstatic Quantity(quantity: string): boolean\r\n\t{\r\n\t\tconst matchArray = quantity.match(Validation.Patterns.Quantity);\r\n\t\tlet isValid = true;\r\n\r\n\t\tif (matchArray === null || quantity === \"\")\r\n\t\t{\r\n\t\t\tisValid = false;\r\n\t\t}\r\n\r\n\t\treturn isValid;\r\n\t}\r\n\r\n\tstatic SiteSearch(searchString: string): boolean\r\n\t{\r\n\t\tlet critiera = searchString;\r\n\r\n\t\tcritiera = critiera.replace(\"<\", \"<\").replace(\">\", \">\").replace(\"'\", \"’\").replace(\"\\\"\\\"\", \""\").replace(\")\", \")\").replace(\"(\", \"(\").replace(\"src=\", \"\");\r\n\r\n\t\tif (critiera !== null && critiera !== undefined && critiera !== \"\")\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}"],"names":["Button","EnabledClass","LoaderClass","LoadingClass","EnableLoading","button","loadingIndicator","document","createRange","createContextualFragment","classList","add","appendChild","StartLoading","StopLoading","remove","buttons","querySelectorAll","length","forEach","Cart","constructor","AddPreOrder","form","submit","AddProduct","product","callback","cartApiCall","this","cartService","data","AddProductCallback","type","msg","atcPageUrl","ProductSizeID","Error","Warning","some","x","Type","modalOptions","modalId","modalContent","Description","confirmButton","GetTextByCulture","displayButtons","modal","DisplayGeneratedModal","injectedModal","querySelector","addEventListener","window","location","href","DisplayMessages","AddRental","CookieManager","GetCookie","cookieName","cookieKey","cookieValue","allCookies","cookie","split","allCookiesIndex","firstEqualSignIndex","indexOf","substring","replace","currentCookieValue","currentCookieValues","KeyValuePairSeparator","currentCookieValuesIndex","keyValuePair","decodeURIComponent","GetCookieDomain","domain","fun_CookieDomain","GetCookieNames","cookieNames","currentCookieName","push","SetCookie","expirationDays","setDomain","expirationDate","minutes","nowDate","Date","getTime","setDate","getDate","secureSetting","protocol","toUTCString","SetInCookie","cookieKeyValue","dictionary","encodeURIComponent","firstKeyAdded","key","Object","prototype","hasOwnProperty","call","Cookies","Coupon","Key","CouponCode","IsPromomtion","IsValid","LastValidated","CouponID","Days","ExpirationDate","PreviousCouponID","Currency","CurrencySymbol","CurrencyID","CurrencyCode","DataPrivacyPolicy","MarketingTrackingApproved","PerformanceTrackingApproved","DelayModal","Unique","RecentItems","ReturnVisitor","LastVisitTime","Ordered","VisitCount","SeenModal","SmsModalEligible","SmsWelcomeCoupon","WelcomeCoupon","Visitor","DomainProjectID","BillCountryID","CountryID","ShipCountryID","CouponManager","CouponCookie","ApplyCoupon","couponCode","couponService","then","response","banner","H","AddToBannerSection","catch","error","console","RemoveCoupon","DisplayCouponDetails","details","getAttribute","title","parentElement","textContent","DisplayAlert","DisplayCouponModal","Response","couponResponse","CouponBanner","parser","DOMParser","couponHtml","parseFromString","couponText","logo","logoClass","logoPath","src","logoWidth","width","logoHeight","height","modalClass","modalContentClass","monsterPath","monsterWidth","monsterHeight","statusHeadline","statusSubtitle","validCoupon","CouponValid","CouponMismatch","couponBanner","innerHTML","log","trackJs","addMetadata","couponModalHtml","closeLabel","domainProjectID","logoAltText","FormatText","WebsiteName","monsterAltText","couponModalNode","body","firstChild","couponModalSelector","show","event","ModalDisposer","currentTarget","setTimeout","engagementProvider","DownloadSdk","ProcessCouponDisplay","headerMessages","couponBannerSelector","contains","TriggerContentCallbacks","toString","CouponIsValid","DataPrivacyPolicyCookie","RequiredCountry","VisitorCookie","MarketingApproved","approved","MarketingApprovedSelection","RequiredByCountry","DisplayDataPrivacyPolicyLink","AddCookieSettingsLink","DisplayDataPrivacyPolicyModal","OpenCookieSettings","link","linkNode","createElement","documentElement","secureCopyright","prvLnk","insertAdjacentElement","contentNode","cookieSettings","firstElementChild","OffCanvas","default","UpdateCookieSettings","performance","marketing","privacyCookie","reload","DisplayLink","display","PerformanceApprovedSelection","EnabledCountries","funDataPrivacyPolicyCountries","DisplayModal","approvedValue","PerformanceApproved","countryID","countryIDValue","parsedCountryID","parseInt","isNaN","billCountryID","billCountryIDValue","parsedBillCountryID","shipCountryID","shipCountryIDValue","parsedShipCountryID","countryIndex","currentCountry","ExperimentManager","AddTest","thirdPartyTestID","variantSequence","experimentService","Breakpoint","min","max","Min","Max","IsDown","matchMedia","matches","IsMatch","IsUp","Media","DeviceType","Breakpoints","Md","IsDesktop","IsMobile","MinPoints","Xs","Sm","Lg","Xl","Xxl","MediaMobile","MediaDesktop","ModalTools","message","dialogOptions","modalTitle","modalHtml","wrapper","messages","errors","i","element","target","dispose","Tenant","ThirdPartyModalEnabled","ID","FunUS","FunAU","HalloweenCostumesUS","HalloweenCostumesCA","HalloweenCostumesAU","HalloweenCostumesUK","HalloweenCostumesEU","HalloweenUS","currencyCookie","visitorCookie","ShortName","FunUK","HalloweenCostumesMX","SecureDomainUrl","DictionaryElement","defaultText","DefaultText","Cultures","AddCultureText","cultureCode","text","GetCultureText","languageCode","undefined","TextResource","culture","cultureDictionary","langES","BuildLibrary","AddTextKey","textKey","GetBrowserCulture","metaLanguageArray","getElementsByName","metaLanguage","getElementsByTagName","toLowerCase","SetCultureAndLanguage","Language","CultureCode","userCultureSetting","cultureStringArray","ConstructSentence","item","arr","txt","index","arrElement","replaceText","GetCulture","GetLanguage","Tracking","AddExperimentToGa","experimentId","ga","IncreaseVisitCount","returnVisitorCookie","visits","RestoreCart","ogid","SubmitPageViewData","pageViewData","entry","stopChecking","entries","country","trackingService","SubmitWebAPI","VisitCountCheck","lastVisitTime","now","delta","returnVisitMinutesIdle","Validation","Email","email","matchArray","isValid","match","Patterns","Quantity","quantity","SiteSearch","searchString","critiera","Url"],"sourceRoot":""}