@thefittingroom/shop-ui 3.1.5 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/esm/components/SizeRec.js.map +1 -0
- package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Vto.js.map +1 -1
- package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-size-rec.js +5 -4
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/esm/tfr-size-rec.js.map +1 -0
- package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr.js +25 -13
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/esm/tfr.js.map +1 -0
- package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/types/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/index.js +32 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/index.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/.rollup.cache/home/codeliger/code/thefittingroom/shop-sdk-ui/dist/esm/components/SizeRec.js.map +0 -1
- package/.rollup.cache/home/codeliger/code/thefittingroom/shop-sdk-ui/dist/esm/tfr-size-rec.js.map +0 -1
- package/.rollup.cache/home/codeliger/code/thefittingroom/shop-sdk-ui/dist/esm/tfr.js.map +0 -1
- package/.rollup.cache/home/codeliger/code/thefittingroom/shop-sdk-ui/dist/tsconfig.tsbuildinfo +0 -1
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ErrorModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ErrorModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/FitModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/FitModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ForgotPasswordModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ForgotPasswordModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoadingAvatarModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoadingAvatarModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoggedOutModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoggedOutModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ModalManager.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ModalManager.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/NoAvatarModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/NoAvatarModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ResetLinkModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ResetLinkModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ScanCodeModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ScanCodeModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SignInModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SignInModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SizeErrorModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SizeErrorModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/TryOnModal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/TryOnModal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/SizeRec.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Vto.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/index.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/index.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/locale.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/locale.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/slider.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/slider.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/svgs.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/svgs.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/uiError.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/uiError.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/telephone.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/telephone.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/validations.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/validations.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/index.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/index.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/init.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/init.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/styles/index.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/styles/index.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-modal.js +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-modal.js.map +0 -0
- /package/.rollup.cache/home/{codeliger/code/thefittingroom → runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/types/index.js +0 -0
package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/esm/components/SizeRec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeRec.js","sourceRoot":"","sources":["../../../src/components/SizeRec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAepD,MAAM,OAAO,gBAAgB;IA8B3B,YACE,gBAAwB,EACP,aAAyB,EACzB,cAA0B,EAC1B,cAA0B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;;;;;;;;;6DAiBF,OAAO;;;;;;iEAMH,CAAA;QAE7D,cAAc,CAAC,SAAS,GAAG,IAAI,CAAA;IACjC,CAAC;CACF","sourcesContent":["import { infoIcon, tfrDoor, userIcon } from './svgs'\n\nexport type RecommendedSize = {\n recommended: string\n sizes: {\n size: string\n size_id: number\n locations: {\n fit: string\n isPerfect: boolean\n location: string\n }[]\n }[]\n}\n\nexport class SizeRecComponent {\n private _sku: string = ''\n private _styleId: number = null\n\n private isLoggedIn: boolean = false\n\n private tfrInfoIcon: HTMLDivElement\n private tfrLoginToView: HTMLDivElement\n private tfrSizeHowItFits: HTMLDivElement\n private tfrSizeRecActionLogin: HTMLDivElement\n private tfrSizeRecActionLogout: HTMLDivElement\n private tfrSizeRecLoading: HTMLDivElement\n private tfrSizeRecommendationError: HTMLDivElement\n private tfrSizeRecommendationsContainer: HTMLDivElement\n private tfrSizeRecSelect: HTMLDivElement\n private tfrSizeRecSelectContainer: HTMLDivElement\n private tfrSizeRecSize: HTMLDivElement\n private tfrSizeRecTable: HTMLDivElement\n private tfrSizeRecTitle: HTMLDivElement\n private tfrSizeRecTitleToggle: HTMLDivElement\n\n private tfrLoggedInElements: NodeList = [] as any as NodeList\n private tfrLoggedOutElements: NodeList = [] as any as NodeList\n\n private tfrToggleOpenElements: NodeList = [] as any as NodeList\n private tfrToggleClosedElements: NodeList = [] as any as NodeList\n\n private isCollapsed: boolean = false\n private redraw: (index: number) => void = null\n\n constructor(\n sizeRecMainDivId: string,\n private readonly onSignInClick: () => void,\n private readonly onSignOutClick: () => void,\n private readonly onFitInfoClick: () => void,\n private readonly onTryOnClick: (styleId: number, sizeId: number, shouldDisplay: boolean) => Promise<void>,\n ) {\n this.init(sizeRecMainDivId)\n }\n\n public get sku() {\n return this._sku\n }\n\n public setSku(sku: string) {\n this._sku = sku\n }\n\n public get styleId() {\n return this._styleId\n }\n\n public setStyleId(styleId: number) {\n this._styleId = styleId\n }\n\n public setIsLoggedIn(isLoggedIn: boolean) {\n this.isLoggedIn = isLoggedIn\n\n this.tfrSizeRecSelectContainer.style.display = 'flex'\n this.tfrSizeRecSelect.style.display = 'flex'\n this.tfrSizeHowItFits.style.display = 'block'\n\n if (isLoggedIn) {\n this.tfrSizeHowItFits.style.opacity = '1'\n this.tfrSizeRecSelect.style.opacity = '1'\n this.tfrLoggedInElements.forEach((element) => ((element as HTMLElement).style.display = 'block'))\n this.tfrLoggedOutElements.forEach((element) => ((element as HTMLElement).style.display = 'none'))\n\n this.tfrSizeRecActionLogin.style.display = 'none'\n this.tfrSizeRecActionLogout.style.display = 'block'\n this.tfrSizeRecTitle.style.display = 'flex'\n this.isCollapsed = false\n this.tfrSizeRecTitleToggle.classList.add('tfr-chevron-up')\n this.tfrSizeRecTitleToggle.classList.remove('tfr-chevron-down')\n\n // Ensure the container is visible\n this.tfrSizeRecSelectContainer.style.display = 'flex'\n this.tfrSizeRecSelectContainer.style.opacity = '1'\n\n } else {\n this.tfrSizeHowItFits.style.opacity = '0.4'\n this.tfrSizeRecSelect.style.opacity = '0.4'\n this.tfrLoggedInElements.forEach((element) => ((element as HTMLElement).style.display = 'none'))\n this.tfrLoggedOutElements.forEach((element) => ((element as HTMLElement).style.display = 'block'))\n\n this.tfrSizeRecActionLogin.style.display = 'block'\n this.tfrSizeRecActionLogout.style.display = 'none'\n\n this.tfrSizeRecTitle.style.display = 'flex'\n this.tfrSizeRecommendationError.style.display = 'none'\n this.tfrSizeRecommendationError.innerHTML = ''\n\n this.renderSizeRecSelectLoggedOut()\n }\n }\n\n public setLoading(isLoading: boolean) {\n if (isLoading) {\n this.tfrSizeRecLoading.style.display = 'block'\n this.tfrSizeRecommendationsContainer.style.display = 'none'\n } else {\n this.tfrSizeRecLoading.style.display = 'none'\n this.tfrSizeRecommendationsContainer.style.display = 'flex'\n }\n }\n\n public setGarmentLocations(locations: string[]) {\n if (!locations || !locations.length) {\n this.tfrSizeRecTitle.style.display = 'none'\n\n return\n }\n\n this.renderGarmentLocations(locations)\n }\n\n public setRecommendedSize({ recommended, sizes }: RecommendedSize) {\n this.renderSizeRec(recommended, sizes)\n }\n\n public setError() {\n this.tfrSizeRecTitle.style.display = 'none'\n\n if (!this.isLoggedIn) return\n\n this.tfrSizeRecommendationError.style.display = 'block'\n this.tfrSizeRecommendationError.innerHTML = 'No recommended size found.'\n }\n\n private init(sizeRecMainDivId: string) {\n const sizeRecMainDiv = document.getElementById(sizeRecMainDivId) as HTMLDivElement\n\n if (!sizeRecMainDiv) throw new Error('Size rec main div not found')\n\n this.render(sizeRecMainDiv)\n this.setElements()\n this.bindEvents()\n }\n\n private setElements() {\n this.tfrSizeHowItFits = document.getElementById('tfr-size-how-it-fits') as HTMLDivElement\n this.tfrSizeRecTitle = document.getElementById('tfr-size-rec-title') as HTMLDivElement\n\n this.tfrInfoIcon = document.getElementById('tfr-info-icon') as HTMLDivElement\n this.tfrLoginToView = document.getElementById('tfr-login-to-view') as HTMLDivElement\n this.tfrSizeRecActionLogin = document.getElementById('tfr-size-rec-action-login') as HTMLDivElement\n this.tfrSizeRecActionLogout = document.getElementById('tfr-size-rec-action-logout') as HTMLDivElement\n this.tfrSizeRecTable = document.getElementById('tfr-size-rec-table') as HTMLDivElement\n this.tfrSizeRecommendationError = document.getElementById('tfr-size-recommendation-error') as HTMLDivElement\n this.tfrSizeRecSize = document.getElementById('tfr-size-rec-size') as HTMLDivElement\n this.tfrSizeRecSelect = document.getElementById('tfr-size-rec-select') as HTMLDivElement\n this.tfrSizeRecLoading = document.getElementById('tfr-size-rec-loading') as HTMLDivElement\n this.tfrSizeRecTitleToggle = document.getElementById('tfr-size-rec-title-toggle') as HTMLDivElement\n this.tfrSizeRecSelectContainer = document.getElementById('tfr-size-rec-select-container') as HTMLDivElement\n this.tfrSizeRecommendationsContainer = document.getElementById(\n 'tfr-size-recommendations-container',\n ) as HTMLDivElement\n\n this.tfrLoggedInElements = document.querySelectorAll('.tfr-logged-in')\n this.tfrLoggedOutElements = document.querySelectorAll('.tfr-logged-out')\n this.tfrToggleOpenElements = document.querySelectorAll('.tfr-toggle-open')\n this.tfrToggleClosedElements = document.querySelectorAll('.tfr-toggle-closed')\n }\n\n private bindEvents() {\n this.tfrSizeRecActionLogin.addEventListener('click', this.onSignInClick)\n this.tfrSizeRecActionLogout.addEventListener('click', this.onSignOutClick)\n this.tfrSizeRecSelect.addEventListener('click', this.onSizeRecSelectClick.bind(this))\n this.tfrSizeRecTitleToggle.addEventListener('click', this.toggletSizeRecSelectContainer.bind(this))\n this.tfrInfoIcon.addEventListener('click', this.onFitInfoClick)\n this.tfrLoginToView.addEventListener('click', this.onSignInClick)\n\n const tryOnButton = document.getElementById('tfr-try-on-button')\n if (!tryOnButton) return\n\n tryOnButton.addEventListener('click', async () => {\n // Prevent multiple clicks while loading\n if (tryOnButton.classList.contains('loading')) {\n return\n }\n\n const activeButton = document.querySelector('.tfr-size-rec-select-button.active')\n if (!activeButton) return\n\n const selectedSizeId = Number(activeButton.getAttribute('data-size-id'))\n if (Number.isNaN(selectedSizeId)) return\n\n // Set loading state\n tryOnButton.classList.add('loading')\n const originalText = tryOnButton.textContent\n tryOnButton.textContent = ' '\n tryOnButton.setAttribute('disabled', 'true')\n\n try {\n // Get all size buttons\n const allSizeButtons = Array.from(document.querySelectorAll('.tfr-size-rec-select-button')) as HTMLElement[];\n const activeIndex = allSizeButtons.indexOf(activeButton as HTMLElement);\n\n if (this.styleId !== null) {\n // 1. Fetch and display the VTO for the active (recommended) size\n try {\n await this.onTryOnClick(this.styleId, selectedSizeId, true);\n } catch (e) {\n console.error(`Error trying on active size ${selectedSizeId}:`, e);\n // Optionally, inform the user about the error for the primary VTO\n }\n\n // 2. Fetch VTO for the size to the left (if it exists)\n if (activeIndex > 0) {\n const leftButton = allSizeButtons[activeIndex - 1];\n await this._preloadNeighborVTO(leftButton);\n }\n\n // 3. Fetch VTO for the size to the right (if it exists)\n if (activeIndex >= 0 && activeIndex < allSizeButtons.length - 1) {\n const rightButton = allSizeButtons[activeIndex + 1];\n await this._preloadNeighborVTO(rightButton);\n }\n }\n } catch (error) {\n console.error('Error during sequential try-on process:', error);\n } finally {\n // Reset loading state\n tryOnButton.classList.remove('loading')\n tryOnButton.textContent = originalText\n tryOnButton.removeAttribute('disabled')\n }\n })\n }\n\n private async _preloadNeighborVTO(buttonElement: HTMLElement): Promise<void> {\n // this.styleId is assumed to be non-null here because the calling context (bindEvents)\n // is wrapped in 'if (this.styleId !== null)'\n const sizeId = Number(buttonElement.getAttribute('data-size-id'));\n if (!Number.isNaN(sizeId)) {\n try {\n await this.onTryOnClick(this.styleId!, sizeId, false);\n } catch (e) {\n const buttonText = buttonElement.textContent?.trim() || 'N/A';\n console.error(`Error pre-loading try-on for size ${sizeId} (button: ${buttonText}):`, e);\n }\n }\n }\n\n private onSizeRecSelectClick(e: MouseEvent) {\n const target = e.target as HTMLDivElement\n if (!target.classList.contains('tfr-size-rec-select-button') || target.classList.contains('tfr-disabled')) return\n\n e.preventDefault()\n\n const selectedIndex = Number(target.getAttribute('data-index'))\n if (Number.isNaN(selectedIndex)) return\n\n const allButtons = document.querySelectorAll('.tfr-size-rec-select-button')\n\n allButtons.forEach((button) => button.classList.remove('active'))\n allButtons.item(selectedIndex).classList.add('active')\n\n this.redraw(selectedIndex)\n\n const selectedSizeId = Number(target.getAttribute('data-size-id'))\n if (Number.isNaN(selectedSizeId)) return\n\n this.onTryOnClick(this.styleId, selectedSizeId, true)\n }\n\n private renderSizeRec(recommended: string, sizes: RecommendedSize['sizes']) {\n this.tfrSizeRecSize.innerHTML = ` ${recommended}`\n\n const selectedSizeIndex = sizes.findIndex(({ size }) => size === recommended)\n\n this.redraw = (index: number) => this.renderSizeRecTable(sizes, index)\n\n this.redraw(selectedSizeIndex)\n this.renderSizeRecSelect(sizes, selectedSizeIndex)\n }\n\n private renderSizeRecTable(sizes: RecommendedSize['sizes'], index: number) {\n const { locations } = sizes[index]\n const html = locations\n .map(({ location, fit, isPerfect }) => this.renderSizeRecTableRow(location, fit, isPerfect))\n .join('')\n\n this.tfrSizeRecTable.innerHTML = html\n }\n\n private renderSizeRecSelect(sizes: RecommendedSize['sizes'], index: number) {\n const sizeNames = sizes.map(({ size }) => size)\n const html = sizeNames\n .map(\n (name, i) =>\n `<div class=\"tfr-size-rec-select-button ${i === index ? 'active' : ''}\" data-index=\"${i}\" data-size-id=\"${sizes[i].size_id\n }\">${name}</div>`,\n )\n .join('')\n\n this.tfrSizeRecSelect.innerHTML = html\n }\n\n private renderSizeRecSelectLoggedOut() {\n const html = [\n `<div class=\"tfr-size-rec-select-button tfr-disabled\">M</div>`,\n `<div class=\"tfr-size-rec-select-button tfr-disabled active\">L</div>`,\n `<div class=\"tfr-size-rec-select-button tfr-disabled\">XL</div>`,\n ].join('')\n\n this.tfrSizeRecSelect.innerHTML = html\n }\n\n private renderSizeRecTableRow(location: string, fit: string, isPerfect: boolean = false) {\n return `<div class=\"tfr-size-rec-table-row\">\n <div class=\"tfr-size-rec-table-cell-left\">${location}</div>\n <div class=\"tfr-size-rec-table-cell-right ${isPerfect ? 'perfect' : ''}\">\n ${fit}\n </div>\n </div>`\n }\n\n private renderGarmentLocations(locations: string[]) {\n const innerHtml = locations\n .map((location, index) => this.renderSizeRecTableRow(location, this.randomFit(index), true))\n .join('')\n const html = `<div id=\"tfr-logged-out-overlay-container\">\n <div id=\"tfr-logged-out-overlay\">\n Login to reveal how this item will fit specifically at each area of your body in different sizes\n </div>\n <div>\n ${innerHtml}\n </div>\n </div>`\n\n this.tfrSizeRecTable.innerHTML = html\n }\n\n private randomFit(index: number) {\n const choices = ['Slightly Tight', 'Perfect Fit', 'Perfect Fit', 'Slightly Loose', 'Perfect Fit']\n\n return choices[index % choices.length]\n }\n\n private toggletSizeRecSelectContainer() {\n if (this.isCollapsed) {\n this.isCollapsed = false\n this.tfrSizeRecTitleToggle.classList.add('tfr-chevron-up')\n this.tfrSizeRecTitleToggle.classList.remove('tfr-chevron-down')\n this.tfrToggleOpenElements.forEach((element) => ((element as HTMLElement).style.display = 'block'))\n this.tfrToggleClosedElements.forEach((element) => ((element as HTMLElement).style.display = 'none'))\n } else {\n this.isCollapsed = true\n this.tfrSizeRecTitleToggle.classList.remove('tfr-chevron-up')\n this.tfrSizeRecTitleToggle.classList.add('tfr-chevron-down')\n this.tfrToggleOpenElements.forEach((element) => ((element as HTMLElement).style.display = 'none'))\n this.tfrToggleClosedElements.forEach((element) => ((element as HTMLElement).style.display = 'block'))\n }\n }\n\n private render(sizeRecMainDiv: HTMLDivElement) {\n const body = `<div id=\"tfr-size-recommendations\">\n <div id=\"tfr-size-rec-loading\">\n <div class=\"lds-ellipsis\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n <div id=\"tfr-size-recommendations-container\">\n <div id=\"tfr-size-rec-title-toggle\" class=\"tfr-chevron-up\">v</div>\n\n <div class=\"tfr-logged-out\">\n <div class=\"tfr-flex tfr-gap tfr-mb-2 tfr-mobile-small-text\">\n <div>Uncertain of your size?</div>\n \n <div class=\"tfr-toggle-closed\">\n <div class=\"tfr-flex tfr-items-center\">\n <div>Try</div>\n <div class=\"tfr-powered-by-logo\">${tfrDoor}</div>\n <div class=\"tfr-powered-by-text-bold\">The Fitting Room</div>\n </div>\n </div>\n\n <div class=\"tfr-toggle-open\">\n <div id=\"tfr-login-to-view\" class=\"tfr-flex tfr-items-center\">\n ${userIcon} Login to view\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"tfr-logged-in\">\n <div id=\"tfr-size-rec-title\">\n Recommended Size:\n <div id=\"tfr-size-rec-size\">\n <div class=\"tfr-size-rec-login-cta\">\n ${userIcon} Sign up to view\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"tfr-toggle-open\" style=\"width: 100%\">\n <div id=\"tfr-size-rec-select-container\">\n <div id=\"tfr-size-how-it-fits\">Select size to see how it fits:</div>\n\n <div id=\"tfr-size-rec-select\"></div>\n\n <div id=\"tfr-size-rec-subtitle\">\n How it fits\n <span id=\"tfr-info-icon\">${infoIcon}</span>\n </div>\n\n <div id=\"tfr-size-rec-table\"></div>\n\n <div id=\"tfr-try-on-button\" class=\"tfr-try-on-button\">Try On</div>\n </div>\n </div>\n\n <div id=\"tfr-size-rec-action\">\n <div id=\"tfr-size-rec-action-login\">Sign up or login</div>\n <div id=\"tfr-size-rec-action-logout\">Log out</div>\n </div>\n\n <div class=\"tfr-toggle-open\">\n <div class=\"tfr-powered-by\">\n <div>Powered by</div>\n <div class=\"tfr-powered-by-logo\">${tfrDoor}</div>\n <div class=\"tfr-powered-by-text-bold\">The Fitting Room</div>\n </div>\n </div>\n </div>\n </div>\n <div id=\"tfr-size-recommendation-error\"></div>`\n\n sizeRecMainDiv.innerHTML = body\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vto.js","sourceRoot":"","sources":["../../../src/components/Vto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,MAAM,OAAO,YAAY;IAKvB,YAA6B,YAAoB;QAApB,iBAAY,GAAZ,YAAY,CAAQ;QAJzC,WAAM,GAAG,KAAK,CAAA;QACd,uBAAkB,GAAW,CAAC,CAAA;QAC9B,WAAM,GAAuC,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"Vto.js","sourceRoot":"","sources":["../../../src/components/Vto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,MAAM,OAAO,YAAY;IAKvB,YAA6B,YAAoB;QAApB,iBAAY,GAAZ,YAAY,CAAQ;QAJzC,WAAM,GAAG,KAAK,CAAA;QACd,uBAAkB,GAAW,CAAC,CAAA;QAC9B,WAAM,GAAuC,IAAI,CAAA;IAEJ,CAAC;IAE/C,IAAI;QACT,IAAI,IAAI,CAAC,MAAM;YAAE,OAAM;QAEvB,MAAM,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QAE7D,IAAI,CAAC,UAAU;YAAE,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,IAAI,aAAa,IAAI,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;gBAC7D,aAAa,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAA;gBACxD,MAAM,UAAU,GAAqB,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;gBAC/E,UAAU,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;YAClD,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import { InitImageSlider } from './slider'\n\nexport class VtoComponent {\n private isInit = false\n private currentSliderValue: number = 0\n private slider: ReturnType<typeof InitImageSlider> = null\n\n constructor(private readonly vtoMainDivId: string) { }\n\n public init() {\n if (this.isInit) return\n\n const vtoMainDiv = document.getElementById(this.vtoMainDivId)\n\n if (!vtoMainDiv) throw new Error(`Element with id ${this.vtoMainDivId} not found`)\n\n vtoMainDiv.innerHTML = `\n <div class=\"tfr-slider-wrapper\">\n <img id=\"tfr-tryon-image\" src=\"\" />\n <input type=\"range\" id=\"tfr-slider\" />\n </div>\n `\n\n const tryOnImage = <HTMLImageElement>document.getElementById('tfr-tryon-image')\n const onChange = (slider, imageUrl) => {\n console.debug('slider change', slider, imageUrl)\n tryOnImage.src = imageUrl\n this.currentSliderValue = parseInt(slider.value)\n }\n\n this.slider = InitImageSlider('tfr-slider', onChange)\n this.isInit = true\n }\n\n public onNewFramesReady(frames: string[]) {\n if (!this.isInit) {\n this.init()\n }\n\n if (Array.isArray(frames) && frames.length > 0) {\n // Ensure the current slider value is within bounds of the new frames array\n const boundedValue = Math.min(this.currentSliderValue, frames.length - 1)\n const e = this.slider.Load(frames, boundedValue)\n if (e instanceof Error) {\n console.error(e)\n return\n }\n\n // Restore previous slider position if it's within bounds\n const sliderElement = document.getElementById('tfr-slider') as HTMLInputElement\n if (sliderElement && this.currentSliderValue < frames.length) {\n sliderElement.value = this.currentSliderValue.toString()\n const tryOnImage = <HTMLImageElement>document.getElementById('tfr-tryon-image')\n tryOnImage.src = frames[this.currentSliderValue]\n }\n }\n }\n}\n"]}
|
|
@@ -28,15 +28,16 @@ export class TfrSizeRec {
|
|
|
28
28
|
}
|
|
29
29
|
async setGarmentLocations(filledLocations = []) {
|
|
30
30
|
this.sizeRecComponent.setLoading(true);
|
|
31
|
-
|
|
31
|
+
// If we already have filledLocations, use them directly instead of making API calls
|
|
32
|
+
const locations = filledLocations.length > 0 ? filledLocations : await this.getGarmentLocations(filledLocations);
|
|
32
33
|
console.debug('locations', locations);
|
|
33
34
|
console.debug('filledLocations', filledLocations);
|
|
34
35
|
this.sizeRecComponent.setGarmentLocations(locations || []);
|
|
35
36
|
this.sizeRecComponent.setLoading(false);
|
|
36
37
|
}
|
|
37
|
-
async
|
|
38
|
+
async recommendSize() {
|
|
38
39
|
this.sizeRecComponent.setLoading(true);
|
|
39
|
-
const sizes = await this.
|
|
40
|
+
const sizes = await this.getRecommendedSize();
|
|
40
41
|
if (!sizes) {
|
|
41
42
|
console.error('No sizes found for sku');
|
|
42
43
|
this.sizeRecComponent.setLoading(false);
|
|
@@ -64,7 +65,7 @@ export class TfrSizeRec {
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
async
|
|
68
|
+
async getRecommendedSize() {
|
|
68
69
|
try {
|
|
69
70
|
const colorwaySizeAsset = await this.tfrShop.getColorwaySizeAssetFromSku(this.sku);
|
|
70
71
|
const sizes = await this.getRecommendedSizes(String(colorwaySizeAsset.style_id));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tfr-size-rec.js","sourceRoot":"","sources":["../../src/tfr-size-rec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAW,MAAM,qBAAqB,CAAA;AAEjE,OAAO,EAAmB,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAuCxE,MAAM,OAAO,UAAU;IAIrB,YACE,gBAA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,CAAC,CAAA;QACjG,IAAI,YAAY,CAAC,8BAA8B;YAC7C,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,0CAA0C,EAAE,YAAY,CAAC,8BAA8B,CAAC,CAAA;QAC9G,IAAI,YAAY,CAAC,mCAAmC;YAClD,CAAC,CAAC,KAAK,CAAC,WAAW,CACjB,gDAAgD,EAChD,YAAY,CAAC,mCAAmC,CACjD,CAAA;QACH,IAAI,YAAY,CAAC,mCAAmC;YAClD,CAAC,CAAC,KAAK,CAAC,WAAW,CACjB,gDAAgD,EAChD,YAAY,CAAC,mCAAmC,CACjD,CAAA;QACH,IAAI,YAAY,CAAC,wBAAwB;YACvC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,mCAAmC,EAAE,YAAY,CAAC,wBAAwB,CAAC,CAAA;QACjG,IAAI,YAAY,CAAC,wBAAwB;YACvC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,mCAAmC,EAAE,YAAY,CAAC,wBAAwB,CAAC,CAAA;IACnG,CAAC;CACF","sourcesContent":["import { types as ShopTypes, TfrShop } from '@thefittingroom/sdk'\n\nimport { RecommendedSize, SizeRecComponent } from './components/SizeRec'\n\nexport type TfrCssVariables = {\n brandColor?: string\n black?: string\n red?: string\n white?: string\n muted?: string\n dark?: string\n grey?: string\n lightGrey?: string\n mainBorderColor?: string\n mainBorderRadius?: string\n mainBorderWidth?: string\n mainBgColor?: string\n mainWidth?: string\n mainVPadding?: string\n mainHPadding?: string\n mainFont?: string\n titleFont?: string\n subtitleFont?: string\n rowFont?: string\n ctaFont?: string\n sizeSelectorTextColor?: string\n sizeSelectorFontSize?: string\n sizeSelectorFontWeight?: string\n sizeSelectorBorderColor?: string\n sizeSelectorBorderWidth?: string\n sizeSelectorBgColor?: string\n sizeSelectorBgColorHover?: string\n sizeSelectorBgColorActive?: string\n sizeSelectorButtonHeight?: string\n sizeSelectorButtonActiveHeight?: string\n sizeSelectorButtonActiveBorderColor?: string\n sizeSelectorButtonActiveBorderWidth?: string\n sizeSelectorButtonRadius?: string\n sizeSelectorButtonShadow?: string\n}\n\nexport class TfrSizeRec {\n private readonly sizeRecComponent: SizeRecComponent\n private readonly perfectFits = [ShopTypes.Fit.PERFECT_FIT, ShopTypes.Fit.SLIGHTLY_LOOSE, ShopTypes.Fit.SLIGHTLY_TIGHT]\n\n constructor(\n sizeRecMainDivId: string,\n cssVariables: TfrCssVariables,\n private readonly tfrShop: TfrShop,\n private readonly onSignInClick: () => void,\n private readonly onSignOutClick: () => void,\n private readonly onFitInfoClick: () => void,\n private readonly onTryOnClick: (styleId: number, sizeId: number, shouldDisplay: boolean) => Promise<void>,\n ) {\n this.setCssVariables(cssVariables)\n this.sizeRecComponent = new SizeRecComponent(\n sizeRecMainDivId,\n this.onSignInClick,\n this.onSignOutClick,\n this.onFitInfoClick,\n this.onTryOnClick,\n )\n }\n\n public get sku() {\n return this.sizeRecComponent.sku\n }\n\n public setSku(sku: string) {\n this.sizeRecComponent.setSku(sku)\n }\n\n public get styleId() {\n return this.sizeRecComponent.styleId\n }\n\n public setStyleId(styleId: number) {\n this.sizeRecComponent.setStyleId(styleId)\n }\n\n public setIsLoggedIn(isLoggedIn: boolean) {\n this.sizeRecComponent.setIsLoggedIn(isLoggedIn)\n }\n\n public async setGarmentLocations(filledLocations: string[] = []) {\n this.sizeRecComponent.setLoading(true)\n // If we already have filledLocations, use them directly instead of making API calls\n const locations = filledLocations.length > 0 ? filledLocations : await this.getGarmentLocations(filledLocations)\n\n console.debug('locations', locations)\n console.debug('filledLocations', filledLocations)\n\n this.sizeRecComponent.setGarmentLocations(locations || [])\n this.sizeRecComponent.setLoading(false)\n }\n\n public async recommendSize() {\n this.sizeRecComponent.setLoading(true)\n const sizes = await this.getRecommendedSize()\n\n if (!sizes) {\n console.error('No sizes found for sku')\n this.sizeRecComponent.setLoading(false)\n this.sizeRecComponent.setError()\n\n return\n }\n\n this.sizeRecComponent.setRecommendedSize(sizes)\n this.sizeRecComponent.setLoading(false)\n }\n\n private async getGarmentLocations(filledLocations: string[]): Promise<string[]> {\n try {\n const locations = await this.tfrShop.getMeasurementLocationsFromSku(this.sku, filledLocations)\n\n return locations\n } catch (error) {\n try {\n const style = await this.tfrShop.getStyleByBrandStyleId(this.sku)\n const locations = await this.tfrShop.getMeasurementLocationsFromBrandStyleId(style.id, filledLocations)\n\n return locations\n } catch (error) {\n console.error(error)\n this.sizeRecComponent.setError()\n return null\n }\n }\n }\n\n private async getRecommendedSize() {\n try {\n const colorwaySizeAsset = await this.tfrShop.getColorwaySizeAssetFromSku(this.sku)\n const sizes = await this.getRecommendedSizes(String(colorwaySizeAsset.style_id))\n this.setStyleId(colorwaySizeAsset.style_id)\n\n return sizes\n } catch (error) {\n try {\n const style = await this.tfrShop.getStyleByBrandStyleId(this.sku)\n const sizes = await this.getRecommendedSizes(String(style.id))\n this.setStyleId(style.id)\n\n return sizes\n } catch (error) {\n console.error(error)\n this.sizeRecComponent.setError()\n return null\n }\n }\n }\n\n private async getRecommendedSizes(styleId: string): Promise<RecommendedSize> {\n const sizeRec = await this.tfrShop.getRecommendedSizes(styleId)\n\n if (!sizeRec) return null\n\n return {\n recommended: sizeRec.recommended_size.size_value.name,\n sizes: sizeRec.fits.map((fit) => {\n return {\n size: sizeRec.available_sizes.find((size) => size.id === fit.size_id).size_value.name,\n size_id: fit.size_id,\n locations: fit.measurement_location_fits\n .map((locationFit) => {\n const fitLabel =\n typeof locationFit.fit_label === 'string' && locationFit.fit_label\n ? locationFit.fit_label\n : ShopTypes.FitNames[locationFit.fit]\n\n return {\n fit: fitLabel,\n isPerfect: this.perfectFits.includes(locationFit.fit),\n location: this.tfrShop.getMeasurementLocationName(locationFit.measurement_location),\n sortOrder: this.tfrShop.getMeasurementLocationSortOrder(locationFit.measurement_location),\n }\n })\n .sort((a, b) => (a.sortOrder < b.sortOrder ? -1 : 1)),\n }\n }),\n }\n }\n\n private setCssVariables(cssVariables: TfrCssVariables) {\n const r = document.querySelector<HTMLElement>(':root')\n\n if (cssVariables.brandColor) r.style.setProperty('--tfr-brand-color', cssVariables.brandColor)\n if (cssVariables.black) r.style.setProperty('--tfr-black', cssVariables.black)\n if (cssVariables.red) r.style.setProperty('--tfr-red', cssVariables.red)\n if (cssVariables.white) r.style.setProperty('--tfr-white', cssVariables.white)\n if (cssVariables.muted) r.style.setProperty('--tfr-muted', cssVariables.muted)\n if (cssVariables.dark) r.style.setProperty('--tfr-dark', cssVariables.dark)\n if (cssVariables.grey) r.style.setProperty('--tfr-grey', cssVariables.grey)\n if (cssVariables.lightGrey) r.style.setProperty('--tfr-light-grey', cssVariables.lightGrey)\n if (cssVariables.mainBorderColor) r.style.setProperty('--tfr-main-border-color', cssVariables.mainBorderColor)\n if (cssVariables.mainBorderRadius) r.style.setProperty('--tfr-main-border-radius', cssVariables.mainBorderRadius)\n if (cssVariables.mainBorderWidth) r.style.setProperty('--tfr-main-border-width', cssVariables.mainBorderWidth)\n if (cssVariables.mainBgColor) r.style.setProperty('--tfr-main-bg-color', cssVariables.mainBgColor)\n if (cssVariables.mainWidth) r.style.setProperty('--tfr-main-width', cssVariables.mainWidth)\n if (cssVariables.mainVPadding) r.style.setProperty('--tfr-main-v-padding', cssVariables.mainVPadding)\n if (cssVariables.mainHPadding) r.style.setProperty('--tfr-main-h-padding', cssVariables.mainHPadding)\n if (cssVariables.mainFont) r.style.setProperty('--tfr-main-font', cssVariables.mainFont)\n if (cssVariables.titleFont) r.style.setProperty('--tfr-title-font', cssVariables.titleFont)\n if (cssVariables.subtitleFont) r.style.setProperty('--tfr-subtitle-font', cssVariables.subtitleFont)\n if (cssVariables.rowFont) r.style.setProperty('--tfr-row-font', cssVariables.rowFont)\n if (cssVariables.ctaFont) r.style.setProperty('--tfr-cta-font', cssVariables.ctaFont)\n\n // Size Selector\n if (cssVariables.sizeSelectorTextColor)\n r.style.setProperty('--tfr-size-selector-text-color', cssVariables.sizeSelectorTextColor)\n if (cssVariables.sizeSelectorFontSize)\n r.style.setProperty('--tfr-size-selector-font-size', cssVariables.sizeSelectorFontSize)\n if (cssVariables.sizeSelectorFontWeight)\n r.style.setProperty('--tfr-size-selector-font-weight', cssVariables.sizeSelectorFontWeight)\n if (cssVariables.sizeSelectorBgColor)\n r.style.setProperty('--tfr-size-selector-bg-color', cssVariables.sizeSelectorBgColor)\n if (cssVariables.sizeSelectorBorderColor)\n r.style.setProperty('--tfr-size-selector-border-color', cssVariables.sizeSelectorBorderColor)\n if (cssVariables.sizeSelectorBorderWidth)\n r.style.setProperty('--tfr-size-selector-border-width', cssVariables.sizeSelectorBorderWidth)\n if (cssVariables.sizeSelectorBgColorHover)\n r.style.setProperty('--tfr-size-selector-bg-color-hover', cssVariables.sizeSelectorBgColorHover)\n if (cssVariables.sizeSelectorBgColorActive)\n r.style.setProperty('--tfr-size-selector-bg-color-active', cssVariables.sizeSelectorBgColorActive)\n if (cssVariables.sizeSelectorButtonHeight)\n r.style.setProperty('--tfr-size-selector-button-height', cssVariables.sizeSelectorButtonHeight)\n if (cssVariables.sizeSelectorButtonActiveHeight)\n r.style.setProperty('--tfr-size-selector-button-active-height', cssVariables.sizeSelectorButtonActiveHeight)\n if (cssVariables.sizeSelectorButtonActiveBorderColor)\n r.style.setProperty(\n '--tfr-size-selector-button-active-border-color',\n cssVariables.sizeSelectorButtonActiveBorderColor,\n )\n if (cssVariables.sizeSelectorButtonActiveBorderWidth)\n r.style.setProperty(\n '--tfr-size-selector-button-active-border-width',\n cssVariables.sizeSelectorButtonActiveBorderWidth,\n )\n if (cssVariables.sizeSelectorButtonRadius)\n r.style.setProperty('--tfr-size-selector-button-radius', cssVariables.sizeSelectorButtonRadius)\n if (cssVariables.sizeSelectorButtonShadow)\n r.style.setProperty('--tfr-size-selector-button-shadow', cssVariables.sizeSelectorButtonShadow)\n }\n}\n"]}
|
|
@@ -30,16 +30,29 @@ export class FittingRoom {
|
|
|
30
30
|
get sku() {
|
|
31
31
|
return this.tfrSizeRec.sku;
|
|
32
32
|
}
|
|
33
|
-
async
|
|
34
|
-
|
|
35
|
-
return Boolean(style === null || style === void 0 ? void 0 : style.is_published);
|
|
36
|
-
}
|
|
37
|
-
setSku(sku) {
|
|
33
|
+
async setSku(sku) {
|
|
34
|
+
var _a, _b;
|
|
38
35
|
this.tfrSizeRec.setSku(sku);
|
|
36
|
+
const style = await this.getStyle(this.sku);
|
|
37
|
+
this.style = style;
|
|
38
|
+
if (!style.is_published) {
|
|
39
|
+
document.getElementById('tfr-size-recommendations').style.display = 'none';
|
|
40
|
+
console.log(`style ${style.id} is not published`);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(`style ${style.id} is published`);
|
|
44
|
+
}
|
|
45
|
+
console.log(`style ${style.id} virtual try on is disabled`);
|
|
46
|
+
if (style.is_vto) {
|
|
47
|
+
(_a = document.getElementById('tfr-try-on-button')) === null || _a === void 0 ? void 0 : _a.classList.remove("hide");
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
(_b = document.getElementById('tfr-try-on-button')) === null || _b === void 0 ? void 0 : _b.classList.add("hide");
|
|
51
|
+
}
|
|
39
52
|
if (this.isLoggedIn)
|
|
40
|
-
this.tfrSizeRec.
|
|
53
|
+
this.tfrSizeRec.recommendSize();
|
|
41
54
|
else
|
|
42
|
-
this.setGarmentLocations();
|
|
55
|
+
this.setGarmentLocations(style);
|
|
43
56
|
}
|
|
44
57
|
async onInit() {
|
|
45
58
|
var _a, _b;
|
|
@@ -67,7 +80,7 @@ export class FittingRoom {
|
|
|
67
80
|
this.hooks.onLogout();
|
|
68
81
|
this.isLoggedIn = false;
|
|
69
82
|
this.tfrSizeRec.setIsLoggedIn(false);
|
|
70
|
-
this.setGarmentLocations();
|
|
83
|
+
this.setGarmentLocations(this.style);
|
|
71
84
|
this.unsubscribeFromProfileChanges();
|
|
72
85
|
}
|
|
73
86
|
async signIn(username, password, validationError) {
|
|
@@ -85,7 +98,7 @@ export class FittingRoom {
|
|
|
85
98
|
this.tfrModal.close();
|
|
86
99
|
this.isLoggedIn = true;
|
|
87
100
|
this.tfrSizeRec.setIsLoggedIn(true);
|
|
88
|
-
this.tfrSizeRec.
|
|
101
|
+
this.tfrSizeRec.recommendSize();
|
|
89
102
|
this.subscribeToProfileChanges();
|
|
90
103
|
}
|
|
91
104
|
catch (e) {
|
|
@@ -170,9 +183,8 @@ export class FittingRoom {
|
|
|
170
183
|
this.unsub();
|
|
171
184
|
this.unsub = null;
|
|
172
185
|
}
|
|
173
|
-
async setGarmentLocations() {
|
|
186
|
+
async setGarmentLocations(style) {
|
|
174
187
|
var _a, _b;
|
|
175
|
-
const style = await this.getStyle(this.sku);
|
|
176
188
|
const filledLocations = ((_b = (_a = style === null || style === void 0 ? void 0 : style.sizes) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.garment_measurements.map((measurement) => measurement.measurement_location)) || [];
|
|
177
189
|
this.tfrSizeRec.setGarmentLocations(filledLocations);
|
|
178
190
|
}
|
|
@@ -182,12 +194,12 @@ export class FittingRoom {
|
|
|
182
194
|
const style = await this.tfrShop.getStyle(colorwaySizeAsset.style_id);
|
|
183
195
|
return style;
|
|
184
196
|
}
|
|
185
|
-
catch (
|
|
197
|
+
catch (e) {
|
|
186
198
|
try {
|
|
187
199
|
const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleIdOrSku);
|
|
188
200
|
return style;
|
|
189
201
|
}
|
|
190
|
-
catch (
|
|
202
|
+
catch (e2) {
|
|
191
203
|
return null;
|
|
192
204
|
}
|
|
193
205
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tfr.js","sourceRoot":"","sources":["../../src/tfr.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uB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AAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAA;IACnH,CAAC;IAEO,6BAA6B;QACnC,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAM;QAEvB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACnB,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,KAA6B;;QAE7D,MAAM,eAAe,GACnB,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAG,CAAC,CAAC,0CAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,oBAAoB,CAAC,KAAK,EAAe,CAAA;QAEpH,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAA;IACtD,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,iBAAyB;QAC9C,IAAI,CAAC;YACH,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,iBAAiB,CAAC,CAAA;YAC3F,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;YAErE,OAAO,KAAK,CAAA;QACd,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAA;gBAE1E,OAAO,KAAK,CAAA;YACd,CAAC;YAAC,OAAO,EAAE,EAAE,CAAC;gBACZ,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import { types as ShopTypes, TfrShop, initShop } from '@thefittingroom/sdk'\n\nimport { VtoComponent } from './components/Vto'\nimport { L } from './components/locale'\nimport { validateEmail, validatePassword } from './helpers/validations'\nimport { TfrModal } from './tfr-modal'\nimport { TfrCssVariables, TfrSizeRec } from './tfr-size-rec'\nimport * as types from './types'\nimport { FirestoreStyleCategory } from '@thefittingroom/sdk/dist/esm/types'\n\nexport interface TfrHooks {\n onLoading?: () => void\n onLoadingComplete?: () => void\n onError?: (error: string) => void\n onVtoReady?: (frames: types.TryOnFrames) => void\n onLogin?: () => void\n onLogout?: () => void\n}\n\nexport class FittingRoom {\n private isLoggedIn: boolean = false\n\n public style: FirestoreStyleCategory\n\n public readonly tfrModal: TfrModal\n public readonly tfrSizeRec: TfrSizeRec\n private readonly vtoComponent: VtoComponent\n private readonly tfrShop: TfrShop\n private unsub: () => void = null\n\n constructor(\n private readonly shopId: string | number,\n modalDivId: string,\n sizeRecMainDivId: string,\n vtoMainDivId: string,\n private readonly hooks: TfrHooks = {},\n cssVariables: TfrCssVariables,\n _env?: string,\n ) {\n // prettier-ignore\n const env = _env\n ? _env\n : typeof process !== 'undefined'\n ? process.env.NODE_ENV\n : 'dev'\n\n console.log('tfr-env', env)\n\n this.tfrModal = new TfrModal(\n modalDivId,\n this.signIn.bind(this),\n this.forgotPassword.bind(this),\n this.submitTel.bind(this),\n )\n this.tfrShop = initShop(Number(this.shopId), env)\n this.tfrSizeRec = new TfrSizeRec(\n sizeRecMainDivId,\n cssVariables,\n this.tfrShop,\n this.onSignInClick.bind(this),\n this.signOut.bind(this),\n this.onFitInfoClick.bind(this),\n this.onTryOnClick.bind(this),\n )\n\n if (vtoMainDivId) this.vtoComponent = new VtoComponent(vtoMainDivId)\n }\n\n get shop() {\n return this.tfrShop\n }\n\n get sku() {\n return this.tfrSizeRec.sku\n }\n\n public async setSku(sku: string) {\n this.tfrSizeRec.setSku(sku)\n\n const style = await this.getStyle(this.sku)\n\n this.style = style\n\n if (!style.is_published) {\n document.getElementById('tfr-size-recommendations').style.display = 'none';\n console.log(`style ${style.id} is not published`)\n } else {\n console.log(`style ${style.id} is published`)\n }\n\n console.log(`style ${style.id} virtual try on is disabled`)\n\n if (style.is_vto) {\n document.getElementById('tfr-try-on-button')?.classList.remove(\"hide\")\n } else {\n document.getElementById('tfr-try-on-button')?.classList.add(\"hide\")\n }\n\n if (this.isLoggedIn) this.tfrSizeRec.recommendSize()\n else this.setGarmentLocations(style)\n }\n\n public async onInit() {\n this.isLoggedIn = await this.tfrShop.onInit()\n this.tfrSizeRec.setIsLoggedIn(this.isLoggedIn)\n\n if (this.isLoggedIn) {\n if (this.hooks?.onLogin) this.hooks.onLogin()\n\n this.subscribeToProfileChanges()\n } else {\n if (this.hooks?.onLogout) this.hooks.onLogout()\n\n this.unsubscribeFromProfileChanges()\n }\n\n return this.isLoggedIn\n }\n\n public close() {\n this.tfrModal.close()\n }\n\n public async signOut() {\n await this.tfrShop.user.logout()\n\n if (this.hooks?.onLogout) this.hooks.onLogout()\n\n this.isLoggedIn = false\n this.tfrSizeRec.setIsLoggedIn(false)\n this.setGarmentLocations(this.style)\n this.unsubscribeFromProfileChanges()\n }\n\n public async signIn(username: string, password: string, validationError: (message: string) => void) {\n if (username.length == 0 || password.length == 0) return validationError(L.UsernameOrPasswordEmpty)\n if (!validateEmail(username)) return validationError(L.EmailError)\n if (!validatePassword(password)) return validationError(L.PasswordError)\n\n try {\n await this.tfrShop.user.login(username, password)\n\n if (this.hooks?.onLogin) this.hooks.onLogin()\n this.tfrModal.close()\n\n this.isLoggedIn = true\n this.tfrSizeRec.setIsLoggedIn(true)\n\n this.tfrSizeRec.recommendSize()\n this.subscribeToProfileChanges()\n } catch (e) {\n return validationError(L.UsernameOrPasswordIncorrect)\n }\n }\n\n public setBrandUserId(brandUserId: string | number) {\n this.tfrShop.user.setBrandUserId(brandUserId)\n }\n\n public async submitTel(tel: string) {\n try {\n await this.tfrShop.submitTelephoneNumber(tel)\n this.tfrModal.toSignIn()\n } catch {\n this.tfrModal.onError(L.SomethingWentWrong)\n }\n }\n\n public async forgotPassword(email: string) {\n await this.tfrShop.user.sendPasswordResetEmail(email)\n\n this.tfrModal.toSignIn()\n }\n\n public async passwordReset(code: string, newPassword: string) {\n await this.tfrShop.user.confirmPasswordReset(code, newPassword)\n\n this.tfrModal.toPasswordReset()\n }\n\n public async getMeasurementLocationsFromSku(sku: string) {\n return this.tfrShop.getMeasurementLocationsFromSku(sku)\n }\n\n public onSignInClick() {\n this.tfrModal.toScan()\n }\n\n public onFitInfoClick() {\n this.tfrModal.toFitInfo()\n }\n\n public async onTryOnClick(styleId: number, sizeId: number, shouldDisplay: boolean = true) {\n if (!this.vtoComponent)\n return console.error('VtoComponent is not initialized. Please check if the vtoMainDivId is correct.')\n\n const frames = await this.shop.tryOn(styleId, sizeId)\n\n if (shouldDisplay) {\n try {\n this.vtoComponent.init()\n this.vtoComponent.onNewFramesReady(frames)\n } catch (e) {\n console.error('Error initializing VTO:', e)\n this.tfrModal.onError(L.SomethingWentWrong)\n }\n }\n }\n\n private onUserProfileChange(userProfile: ShopTypes.FirestoreUser) {\n switch (userProfile.avatar_status as types.AvatarState) {\n case types.AvatarState.NOT_CREATED:\n if (this.hooks?.onError) this.hooks.onError(L.DontHaveAvatar)\n this.tfrModal.onNotCreated()\n break\n\n case types.AvatarState.PENDING:\n if (this.hooks?.onLoading) this.hooks.onLoading()\n break\n\n case types.AvatarState.CREATED:\n if (this.hooks?.onLoadingComplete) this.hooks.onLoadingComplete()\n break\n\n default:\n if (this.hooks?.onError) this.hooks.onError(L.SomethingWentWrong)\n this.tfrModal.onError(L.SomethingWentWrong)\n break\n }\n }\n\n private subscribeToProfileChanges() {\n if (this.unsub) return\n\n this.unsub = this.tfrShop.user.watchUserProfileForChanges((userProfile) => this.onUserProfileChange(userProfile))\n }\n\n private unsubscribeFromProfileChanges() {\n if (!this.unsub) return\n\n this.unsub()\n this.unsub = null\n }\n\n private async setGarmentLocations(style: FirestoreStyleCategory) {\n\n const filledLocations =\n style?.sizes?.[0]?.garment_measurements.map((measurement) => measurement.measurement_location) || ([] as string[])\n\n this.tfrSizeRec.setGarmentLocations(filledLocations)\n }\n\n private async getStyle(brandStyleIdOrSku: string) {\n try {\n const colorwaySizeAsset = await this.tfrShop.getColorwaySizeAssetFromSku(brandStyleIdOrSku)\n const style = await this.tfrShop.getStyle(colorwaySizeAsset.style_id)\n\n return style\n } catch (e) {\n try {\n const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleIdOrSku)\n\n return style\n } catch (e2) {\n return null\n }\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,eAAe,CAAA;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,iBAAiB,CAAA;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,qBAAqB,CAAA;AAC1E,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,mBAAmB,CAAA;AAEtE,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;AA8GzD,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB","sourcesContent":["import { FirebaseUser, TfrShop } from '@thefittingroom/sdk'\n\nimport { ModalManager } from '../components'\nimport { UIError } from '../components/uiError'\nimport * as types from '../types'\n\nexport const TfrLogo = process.env.ASSETS_URL + '/tfr-logo.svg'\nexport const AposeLogo = process.env.ASSETS_URL + '/apose-logo.svg'\nexport const AppStoreLogo = process.env.ASSETS_URL + '/app-store-logo.svg'\nexport const QrCodeLogo = process.env.ASSETS_URL + '/qr-code-logo.svg'\n\nexport const NotLoggedIn = new Error('user not logged in')\nexport const NoFramesFound = new Error('No frames found for this colorway')\nexport const NoColorwaySizeAssetsFound = new Error('No colorway size assets found')\nexport const NoStylesFound = new Error('No styles found')\n\nexport interface RecommendedAvailableSizes {\n error: string\n recommended_size: string\n available_sizes: string[]\n}\n\nexport interface FittingRoom {\n shop: TfrShop\n manager: ModalManager\n onSignout(colorwaySizeAssetSKU: string): () => Promise<void>\n onClose(): void\n onNavBack(): void\n onTryOn(colorwaySizeAssetSKU: string): void\n whenAvatarNotCreated(colorwaySizeAssetSKU: string): void\n whenAvatarPending(colorwaySizeAssetSKU: string): void\n whenAvatarCreated(colorwaySizeAssetSKU: string): void\n whenNotSignedIn(colorwaySizeAssetSKU: string): void\n\n whenTryOnReady(colorwaySizeAssetSKU: string, frames: types.TryOnFrames): void\n\n whenTryOnLoading(colorwaySizeAssetSKU: string): void\n\n whenTryOnFailed(colorwaySizeAssetSKU: string, error: Error): void\n\n whenError(colorwaySizeAssetSKU: string, error: UIError): void\n whenSignedIn(user: FirebaseUser, colorwaySizeAssetSKU: string): void\n whenSignedOut(colorwaySizeAssetSKU: string): void\n\n onSignIn(\n colorwaySizeAssetSKU: string,\n ): (username: string, password: string, validation: (message: string) => void) => void\n onNavSignIn(colorwaySizeAssetSKU: string): (email: string) => void\n onPasswordReset(colorwaySizeAssetSKU: string): (email: string) => void\n onNavForgotPassword(colorwaySizeAssetSKU: string): (email: string) => void\n onNavScanCode(colorwaySizeAssetSKU: string): void\n TryOn(colorwaySizeAssetSKU: string): void\n}\n\nexport interface ModalContent {\n Body: () => string\n Hook(): void\n Unhook(): void\n useFullModalContent: boolean\n}\n\nexport interface ModalProps {}\n\nexport interface SignInParams {\n email: string\n password: string\n}\nexport interface SignInModalProps extends ModalProps {\n email?: string\n onSignIn: (email: string, password: string, validationError: (message: string) => void) => void\n onNavForgotPassword: (email?: string) => void\n onNavScanCode: () => void\n}\nexport interface ForgotPasswordModalProps extends ModalProps {\n email?: string\n onNavSignIn: (email: string) => void\n onPasswordReset: (email: string) => void\n}\nexport type NoAvatarModalProps = ModalProps\nexport interface LoadingAvatarModalProps extends ModalProps {\n timeoutMS: number\n}\n\nexport interface TryOnModalProps extends ModalProps {\n frames: TryOnFrames\n onNavBack: () => void\n onClose: () => void\n}\n\nexport interface ErrorModalProps extends ModalProps {\n error: string\n onNavBack: () => void\n onClose: () => void\n}\n\nexport interface SizeErrorModalProps {\n onNavBack: () => void\n onClose: () => void\n sizes?: {\n recommended: string\n available: string[]\n }\n}\n\nexport interface ResetLinkModalProps {\n email: string\n onNavSignIn: (email: string) => void\n}\nexport interface ScanCodeModalProps {\n onSignInNav: () => void\n onTelSubmit: (tel: string) => void\n}\nexport interface LoggedOutModalProps {\n onClose: () => void\n onNavSignIn: (email: string) => void\n}\n\nexport interface FitModalProps {\n onSignInNav: () => void\n onClose: () => void\n}\n\nexport type TryOnFrames = string[]\n\nexport enum AvatarState {\n NOT_CREATED = 'NOT_CREATED',\n CREATED = 'CREATED',\n PENDING = 'PENDING',\n}\n\nexport type FirestoreColorwaySizeAsset = {\n id: number\n size_id: number\n style_id: number\n colorway_id: number\n colorway_name: string\n sku: string\n}\n\nexport type FirestoreGarmentMeasurement = {\n id: number\n measurement_location: string\n tolerance: number\n value: number\n}\n\nexport type FirestoreSize = {\n id: number\n size: string\n label: string\n size_system: string\n size_value_id: string\n garment_measurements: Map<string, FirestoreGarmentMeasurement>\n}\n\nexport type FirestoreColorway = {\n id: number\n name: string\n}\n\nexport type FirestoreStyle = {\n id: number\n brand_id: number\n brand_style_id: string\n name: string\n description: string\n garment_category: string\n is_published: boolean\n sale_type: string\n colorways: { [key: number]: FirestoreColorway }\n sizes: { [key: number]: FirestoreSize }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,eAAe,CAAA;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,iBAAiB,CAAA;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,qBAAqB,CAAA;AAC1E,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,mBAAmB,CAAA;AAEtE,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;AA8GzD,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB","sourcesContent":["import { FirebaseUser, TfrShop } from '@thefittingroom/sdk'\n\nimport { ModalManager } from '../components'\nimport { UIError } from '../components/uiError'\nimport * as types from '../types'\n\nexport const TfrLogo = process.env.ASSETS_URL + '/tfr-logo.svg'\nexport const AposeLogo = process.env.ASSETS_URL + '/apose-logo.svg'\nexport const AppStoreLogo = process.env.ASSETS_URL + '/app-store-logo.svg'\nexport const QrCodeLogo = process.env.ASSETS_URL + '/qr-code-logo.svg'\n\nexport const NotLoggedIn = new Error('user not logged in')\nexport const NoFramesFound = new Error('No frames found for this colorway')\nexport const NoColorwaySizeAssetsFound = new Error('No colorway size assets found')\nexport const NoStylesFound = new Error('No styles found')\n\nexport interface RecommendedAvailableSizes {\n error: string\n recommended_size: string\n available_sizes: string[]\n}\n\nexport interface FittingRoom {\n shop: TfrShop\n manager: ModalManager\n onSignout(colorwaySizeAssetSKU: string): () => Promise<void>\n onClose(): void\n onNavBack(): void\n onTryOn(colorwaySizeAssetSKU: string): void\n whenAvatarNotCreated(colorwaySizeAssetSKU: string): void\n whenAvatarPending(colorwaySizeAssetSKU: string): void\n whenAvatarCreated(colorwaySizeAssetSKU: string): void\n whenNotSignedIn(colorwaySizeAssetSKU: string): void\n\n whenTryOnReady(colorwaySizeAssetSKU: string, frames: types.TryOnFrames): void\n\n whenTryOnLoading(colorwaySizeAssetSKU: string): void\n\n whenTryOnFailed(colorwaySizeAssetSKU: string, error: Error): void\n\n whenError(colorwaySizeAssetSKU: string, error: UIError): void\n whenSignedIn(user: FirebaseUser, colorwaySizeAssetSKU: string): void\n whenSignedOut(colorwaySizeAssetSKU: string): void\n\n onSignIn(\n colorwaySizeAssetSKU: string,\n ): (username: string, password: string, validation: (message: string) => void) => void\n onNavSignIn(colorwaySizeAssetSKU: string): (email: string) => void\n onPasswordReset(colorwaySizeAssetSKU: string): (email: string) => void\n onNavForgotPassword(colorwaySizeAssetSKU: string): (email: string) => void\n onNavScanCode(colorwaySizeAssetSKU: string): void\n TryOn(colorwaySizeAssetSKU: string): void\n}\n\nexport interface ModalContent {\n Body: () => string\n Hook(): void\n Unhook(): void\n useFullModalContent: boolean\n}\n\nexport interface ModalProps { }\n\nexport interface SignInParams {\n email: string\n password: string\n}\nexport interface SignInModalProps extends ModalProps {\n email?: string\n onSignIn: (email: string, password: string, validationError: (message: string) => void) => void\n onNavForgotPassword: (email?: string) => void\n onNavScanCode: () => void\n}\nexport interface ForgotPasswordModalProps extends ModalProps {\n email?: string\n onNavSignIn: (email: string) => void\n onPasswordReset: (email: string) => void\n}\nexport type NoAvatarModalProps = ModalProps\nexport interface LoadingAvatarModalProps extends ModalProps {\n timeoutMS: number\n}\n\nexport interface TryOnModalProps extends ModalProps {\n frames: TryOnFrames\n onNavBack: () => void\n onClose: () => void\n}\n\nexport interface ErrorModalProps extends ModalProps {\n error: string\n onNavBack: () => void\n onClose: () => void\n}\n\nexport interface SizeErrorModalProps {\n onNavBack: () => void\n onClose: () => void\n sizes?: {\n recommended: string\n available: string[]\n }\n}\n\nexport interface ResetLinkModalProps {\n email: string\n onNavSignIn: (email: string) => void\n}\nexport interface ScanCodeModalProps {\n onSignInNav: () => void\n onTelSubmit: (tel: string) => void\n}\nexport interface LoggedOutModalProps {\n onClose: () => void\n onNavSignIn: (email: string) => void\n}\n\nexport interface FitModalProps {\n onSignInNav: () => void\n onClose: () => void\n}\n\nexport type TryOnFrames = string[]\n\nexport enum AvatarState {\n NOT_CREATED = 'NOT_CREATED',\n CREATED = 'CREATED',\n PENDING = 'PENDING',\n}\n\nexport type FirestoreColorwaySizeAsset = {\n id: number\n size_id: number\n style_id: number\n colorway_id: number\n colorway_name: string\n sku: string\n}\n\nexport type FirestoreGarmentMeasurement = {\n id: number\n measurement_location: string\n tolerance: number\n value: number\n}\n\nexport type FirestoreSize = {\n id: number\n size: string\n label: string\n size_system: string\n size_value_id: string\n garment_measurements: Map<string, FirestoreGarmentMeasurement>\n}\n\nexport type FirestoreColorway = {\n id: number\n name: string\n}\n\nexport type FirestoreStyle = {\n id: number\n brand_id: number\n brand_style_id: string\n name: string\n description: string\n garment_category: string\n is_published: boolean\n sale_type: string\n colorways: { [key: number]: FirestoreColorway }\n sizes: { [key: number]: FirestoreSize }\n is_vto: boolean\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/tslib/tslib.d.ts","../src/components/slider.ts","../node_modules/@thefittingroom/sdk/dist/esm/api/requests.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/api/responses.d.ts","../node_modules/@firebase/component/dist/src/provider.d.ts","../node_modules/@firebase/component/dist/src/component_container.d.ts","../node_modules/@firebase/component/dist/src/types.d.ts","../node_modules/@firebase/component/dist/src/component.d.ts","../node_modules/@firebase/component/dist/index.d.ts","../node_modules/@firebase/util/dist/util-public.d.ts","../node_modules/@firebase/logger/dist/src/logger.d.ts","../node_modules/@firebase/logger/dist/index.d.ts","../node_modules/@firebase/app/dist/app-public.d.ts","../node_modules/@firebase/firestore/dist/index.d.ts","../node_modules/firebase/firestore/dist/firestore/index.d.ts","../node_modules/firebase/app/dist/app/index.d.ts","../node_modules/@firebase/auth/dist/auth-public.d.ts","../node_modules/firebase/auth/dist/auth/index.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/types/measurement.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/types/index.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/firebase/firebase-user.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/firebase/firebase.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/api/shop.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/helpers/errors.d.ts","../node_modules/@thefittingroom/sdk/dist/esm/index.d.ts","../src/components/Vto.ts","../src/components/uiError.ts","../src/components/locale.ts","../src/helpers/validations.ts","../src/styles/index.ts","../src/types/index.ts","../src/components/Modals/ErrorModal.ts","../src/components/svgs.ts","../src/components/Modals/FitModal.ts","../src/components/Modals/ForgotPasswordModal.ts","../src/components/Modals/LoadingAvatarModal.ts","../src/components/Modals/LoggedOutModal.ts","../src/components/Modals/ModalManager.ts","../src/components/Modals/NoAvatarModal.ts","../src/components/Modals/ResetLinkModal.ts","../src/components/Modals/ScanCodeModal.ts","../src/components/Modals/SignInModal.ts","../src/components/Modals/SizeErrorModal.ts","../src/components/Modals/TryOnModal.ts","../src/components/index.ts","../src/tfr-modal.ts","../src/components/SizeRec.ts","../src/tfr-size-rec.ts","../src/tfr.ts","../src/init.ts","../src/index.ts","../src/helpers/telephone.ts","../node_modules/@types/node/compatibility/iterators.d.ts","../node_modules/@types/node/globals.typedarray.d.ts","../node_modules/@types/node/buffer.buffer.d.ts","../node_modules/undici-types/utility.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/h2c-client.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-call-history.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/env-http-proxy-agent.d.ts","../node_modules/undici-types/retry-handler.d.ts","../node_modules/undici-types/retry-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/cache-interceptor.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/util.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/eventsource.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/sqlite.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/index.d.ts"],"fileIdsList":[[57,58,60,103,147],[58,61,103,147],[53,54,55,56,103,147],[55,103,147],[53,55,56,103,147],[54,55,56,103,147],[54,103,147],[58,60,61,103,147],[59,103,147],[103,147],[52,68,70,73,103,147],[63,64,66,68,103,147],[63,69,103,147],[51,52,68,69,70,71,72,103,147],[67,103,147],[103,144,147],[103,146,147],[147],[103,147,152,182],[103,147,148,153,159,160,167,179,190],[103,147,148,149,159,167],[103,147,150,191],[103,147,151,152,160,168],[103,147,152,179,187],[103,147,153,155,159,167],[103,146,147,154],[103,147,155,156],[103,147,157,159],[103,146,147,159],[103,147,159,160,161,179,190],[103,147,159,160,161,174,179,182],[103,142,147],[103,142,147,155,159,162,167,179,190],[103,147,159,160,162,163,167,179,187,190],[103,147,162,164,179,187,190],[101,102,103,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[103,147,159,165],[103,147,166,190],[103,147,155,159,167,179],[103,147,168],[103,147,169],[103,146,147,170],[103,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[103,147,172],[103,147,173],[103,147,159,174,175],[103,147,174,176,191,193],[103,147,159,179,180,182],[103,147,181,182],[103,147,179,180],[103,147,182],[103,147,183],[103,144,147,179,184],[103,147,159,185,186],[103,147,185,186],[103,147,152,167,179,187],[103,147,188],[103,147,167,189],[103,147,162,173,190],[103,147,152,191],[103,147,179,192],[103,147,166,193],[103,147,194],[103,147,159,161,170,179,182,190,192,193,195],[103,147,179,196],[61,103,147],[65,103,147],[62,103,147],[103,112,116,147,190],[103,112,147,179,190],[103,147,179],[103,107,147],[103,109,112,147,190],[103,147,167,187],[103,147,197],[103,107,147,197],[103,109,112,147,167,190],[103,104,105,106,108,111,147,159,179,190],[103,112,120,147],[103,105,110,147],[103,112,136,137,147],[103,105,108,112,147,182,190,197],[103,112,147],[103,104,147],[103,107,108,109,110,111,112,113,114,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,138,139,140,141,147],[103,112,129,132,147,155],[103,112,120,121,122,147],[103,110,112,121,123,147],[103,111,147],[103,105,107,112,147],[103,112,116,121,123,147],[103,116,147],[103,110,112,115,147,190],[103,105,109,112,120,147],[103,112,129,147],[103,107,112,136,147,182,195,197],[49,76,79,103,147],[49,79,81,103,147],[49,50,79,103,147],[49,81,103,147],[49,50,103,147],[49,50,78,80,82,83,84,85,86,87,88,89,90,91,92,103,147],[49,75,103,147],[49,103,147],[49,50,97,98,103,147],[49,96,97,103,147],[49,79,93,103,147],[49,73,95,103,147],[49,68,73,74,76,77,79,94,96,103,147],[49,73,75,79,93,103,147]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},"34052f9cb56dcffe4466aa017842749694bd482d5ea197df7ee6c1e3e054f5e6",{"version":"d2656f2108b1abcc26f7c0b2fa667d18beddd7516ce09cff30e0afdd800d499e","impliedFormat":99},{"version":"36a8b576c02becda59132d5cd8d468bd8d787024618448ef7a52284f21b3028d","impliedFormat":99},{"version":"cdbd35458f506b843f280d695d192968af4b0f27db3d5c0707934d97e96dd88d","impliedFormat":1},{"version":"0d86e751cdf42541f9b0dc579f1fad78ba02c9b57104723187d942c53bd63092","impliedFormat":1},{"version":"dae32a2a0cc5be690082fc59bd4b16ab58fc400d8802dc3073657ff4e825c48a","impliedFormat":1},{"version":"654bbcc8726e2a7a684460eda9c7d25847716587b04a72e0b88e75d828aa3db1","impliedFormat":1},{"version":"5c252941b1299551ad4f3f44ef995ee7a79585aebe2c5318271297496f2611c6","impliedFormat":1},{"version":"ca862092adc2e7df5d8244e202db4a5479bee59299ed6620773040d5e843e780","impliedFormat":1},{"version":"84ab1b8202996d370d7580cd15c85fe5981c9fd8ce4e20019de7203c8e9b594e","impliedFormat":1},{"version":"b7b58b11be801068222c596659957f4defdeec281974feb02a28d9c9ea38cd51","impliedFormat":1},{"version":"403e071e95c87cff78762cb6d0b374f28a333fd63957d542953a93cde367675f","impliedFormat":1},{"version":"973d9c7b2064204601c4361d2ea007cfd7e0f767cb7138979f79a38cf4125964","impliedFormat":1},{"version":"7656a4096d1d60bdd81b8b1909afdf0aedb36a1d97b05edf71887d023dd59ea9","impliedFormat":1},{"version":"d488bd13a9d714f30014a5f8a8df1be6b11ae3411efa63ba6643af44749bc153","impliedFormat":1},{"version":"039917782bd9cdfb0be18c3ab57d7502657e2b24fe62b3621586ab3d13dd8ae8","impliedFormat":1},{"version":"898f97b7fab287b8dd26c0f8d91fafe17bec2578645a9741ce8242f3c70ae517","impliedFormat":1},{"version":"42ce8d5949b467e6bad2c42c2e400d9d6bad0f8184daa3d68d5a36966e2de662","impliedFormat":99},{"version":"84fb1b640ed3febfe24384587e89ca28aad9c4ec055dc65dc5949ab036471ac8","impliedFormat":99},{"version":"b59823c787ddaaa379514e6203d010f1aa467bf1b65ebeb994702399ec837331","impliedFormat":99},{"version":"959c861d6d5819c9e6febcce786b8042555cc59aab201c2ade032bf7e81809dc","impliedFormat":99},{"version":"eaf8ba38e8ff427a08dac15f38ee85989367735b59f95226b397f53fc325170b","impliedFormat":99},{"version":"27d1702fa986b7cb4f1089fe2b3e6eba897c3527b8f504a349bfdd59e79d25be","impliedFormat":99},{"version":"5fee5d036fddaf5b9b729e85071491d758e5c74f4491149dab17e4637cdc679a","impliedFormat":99},"81aea26fbaf6bd613bb6d911b3ca8515b7e253ad584c35731da6efd5d7a7bf72","51beffd52b90e83f58d060f799f481d2015e0e6074f5c8e910679a664ed3ba64","4d6a2026f6d0fb98e8abc4d825603d12add1e52d77508219bd46e2ef98b70ee9","39d8e5f9bbb1a638668f86b1397e1f104119d5084761693f6d717f13755fa604","28064f281ede6530f3ace9b485142e2334612ed9797930ba8368e08c6318034e","cc86ce089e88875a30999b8bde85f208c9022de3ef20c5994f027b73a852555c","659d153ca9f12f815b882df86c324bc65133f4d06f671aa13da332ec1a5da3da","ef8b1c4cb2bb5fd81e813535f10d532e4200e7356ff4f5ec25468e8c816bc9b9","f9c8078324653e846562df3527e9c1628cb4ea1fc5730615d450c1ba46acd0fe","fe28d1c8a996936cbfeb4d25d84badae931be633cfc4fccfb41aeef6559aa933","9fd1b3c382734e4c72db4283f99d3fd7aa7c191f04980615ff7266fd3b5b5054","f99d6ef20e22b6a4a86aa79a0438f5c6a395dfd3e64e15dc07d2b7482768e67d","eb7d20ba80c695b1ae56658102096e2ccfb3ae0288e2539a94c817e636144f32","282ba73007686c1f3c7e4b9dd4122be92bb28a42a13691b01563713032a5c155","4bf2403f91dc28f0814a4a6a056f806d92bb490b0ac74162b4453ac44ae41ca8","bc1db175815cbd63b485cc00e0f5c3f1d0dabadadd407a52abc6db5cceb65dea","b69c1d90917d45c0abff0b2da0f968fea506834157397542981b4eca887f7f43","a8c98f29fb3862d3c1098866caa074596fcc661aca022752a689abe063af9ba6","0e9f25c3c1d729fa1a0f02d3c2fbe208e8d381523e16d9f82716e70efca9e17d","764a3394c169ec66650fc53ed4f132a67f36b5bd1cd92056007779a444499e1f","9288e60c4126dbd8b7de57dd9fa275d7b8080d98421667cf004aa1bf182ae311","115d2cfe9b138335bf0a399e028a1033f41da711085f194479348aeca2850d8f","4f1dfdfa604eefc52b8afcdc4267c97a99548b581e916b69f5934a1955d355e5","2c34ff76d266ad3e8d4e2215cde84afd685211faa2b210cf6514fe1e0edc81b7","566ca36529432f86b55010a1f8012795776590a28363087ce0c88f0daf3fd720","968bfaf256c653530b59cc9a4872f0ee9b9c5274230362f0ddea4d071f6d00c8","2a40faa2b3af39ff83d1b64399ba45473546b8fbdbe935962b1396c6ddf4cbd4",{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0671b50bb99cc7ad46e9c68fa0e7f15ba4bc898b59c31a17ea4611fab5095da","affectsGlobalScope":true,"impliedFormat":1},{"version":"d802f0e6b5188646d307f070d83512e8eb94651858de8a82d1e47f60fb6da4e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"17fe9131bec653b07b0a1a8b99a830216e3e43fe0ea2605be318dc31777c8bbf","impliedFormat":1},{"version":"3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","impliedFormat":1},{"version":"2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"2472ef4c28971272a897fdb85d4155df022e1f5d9a474a526b8fc2ef598af94e","impliedFormat":1},{"version":"6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","impliedFormat":1},{"version":"19851a6596401ca52d42117108d35e87230fc21593df5c4d3da7108526b6111c","impliedFormat":1},{"version":"3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"40bfc70953be2617dc71979c14e9e99c5e65c940a4f1c9759ddb90b0f8ff6b1a","impliedFormat":1},{"version":"da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","impliedFormat":1},{"version":"e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"561c60d8bfe0fec2c08827d09ff039eca0c1f9b50ef231025e5a549655ed0298","impliedFormat":1},{"version":"1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","impliedFormat":1},{"version":"84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e","impliedFormat":1},{"version":"f4b4faedc57701ae727d78ba4a83e466a6e3bdcbe40efbf913b17e860642897c","affectsGlobalScope":true,"impliedFormat":1},{"version":"bbcfd9cd76d92c3ee70475270156755346c9086391e1b9cb643d072e0cf576b8","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7","impliedFormat":1},{"version":"003ec918ec442c3a4db2c36dc0c9c766977ea1c8bcc1ca7c2085868727c3d3f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"938f94db8400d0b479626b9006245a833d50ce8337f391085fad4af540279567","impliedFormat":1},{"version":"c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c","impliedFormat":1},{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"12fb9c13f24845000d7bd9660d11587e27ef967cbd64bd9df19ae3e6aa9b52d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","impliedFormat":1},{"version":"25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","impliedFormat":1},{"version":"5078cd62dbdf91ae8b1dc90b1384dec71a9c0932d62bdafb1a811d2a8e26bef2","impliedFormat":1},{"version":"a2e2bbde231b65c53c764c12313897ffdfb6c49183dd31823ee2405f2f7b5378","impliedFormat":1},{"version":"ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c","impliedFormat":1},{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true,"impliedFormat":1},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd2fcf3359dc2dacc5198ae764d5179e3dc096295c37e8241fdce324a99ff1ee","impliedFormat":1},{"version":"0ab3c844f1eb5a1d94c90edc346a25eb9d3943af7a7812f061bf2d627d8afac0","impliedFormat":1},{"version":"bd8b644c5861b94926687618ec2c9e60ad054d334d6b7eb4517f23f53cb11f91","impliedFormat":1},{"version":"161f09445a8b4ba07f62ae54b27054e4234e7957062e34c6362300726dabd315","impliedFormat":1},{"version":"77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","impliedFormat":1},{"version":"a828998f5c017ec1356a7d07e66c7fc8a6b009d451c2bdc3be8ccb4f424316d2","impliedFormat":1},{"version":"34ecb9596317c44dab586118fb62c1565d3dad98d201cd77f3e6b0dde453339c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","impliedFormat":1},{"version":"e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","impliedFormat":1},{"version":"76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86","impliedFormat":1},{"version":"237581f5ec4620a17e791d3bb79bad3af01e27a274dbee875ac9b0721a4fe97d","affectsGlobalScope":true,"impliedFormat":1},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true,"impliedFormat":1},{"version":"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","impliedFormat":1},{"version":"b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","impliedFormat":1},{"version":"de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","impliedFormat":1},{"version":"70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","impliedFormat":1},{"version":"e6d81b1f7ab11dc1b1ad7ad29fcfad6904419b36baf55ed5e80df48d56ac3aff","impliedFormat":1},{"version":"1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","impliedFormat":1},{"version":"b6b8e3736383a1d27e2592c484a940eeb37ec4808ba9e74dd57679b2453b5865","impliedFormat":1},{"version":"d6f36b683c59ac0d68a1d5ee906e578e2f5e9a285bca80ff95ce61cdc9ddcdeb","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"12aad38de6f0594dc21efa78a2c1f67bf6a7ef5a389e05417fe9945284450908","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6","impliedFormat":1},{"version":"b338a6e6c1d456e65a6ea78da283e3077fe8edf7202ae10490abbba5b952b05e","impliedFormat":1},{"version":"2918b7c516051c30186a1055ebcdb3580522be7190f8a2fff4100ea714c7c366","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","impliedFormat":1},{"version":"982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","impliedFormat":1},{"version":"e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","impliedFormat":1},{"version":"4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055","impliedFormat":1},{"version":"d67fc92a91171632fc74f413ce42ff1aa7fbcc5a85b127101f7ec446d2039a1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d40e4631100dbc067268bce96b07d7aff7f28a541b1bfb7ef791c64a696b3d33","affectsGlobalScope":true,"impliedFormat":1},{"version":"784490137935e1e38c49b9289110e74a1622baf8a8907888dcbe9e476d7c5e44","impliedFormat":1},{"version":"42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","impliedFormat":1},{"version":"4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446","impliedFormat":1},{"version":"e4c653466d0497d87fa9ffd00e59a95f33bc1c1722c3f5c84dab2e950c18da70","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6dcc3b933e864e91d4bea94274ad69854d5d2a1311a4b0e20408a57af19e95d","impliedFormat":1},{"version":"a51f786b9f3c297668f8f322a6c58f85d84948ef69ade32069d5d63ec917221c","impliedFormat":1}],"root":[50,[74,100]],"options":{"declaration":false,"emitDeclarationOnly":false,"esModuleInterop":true,"importHelpers":true,"inlineSourceMap":false,"inlineSources":true,"module":99,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"target":4},"referencedMap":[[61,1],[65,2],[57,3],[56,4],[54,5],[53,6],[55,7],[62,8],[60,9],[59,10],[58,10],[51,10],[52,10],[71,11],[69,12],[70,13],[72,10],[73,14],[68,15],[67,10],[144,16],[145,16],[146,17],[103,18],[147,19],[148,20],[149,21],[101,10],[150,22],[151,23],[152,24],[153,25],[154,26],[155,27],[156,27],[158,10],[157,28],[159,29],[160,30],[161,31],[143,32],[102,10],[162,33],[163,34],[164,35],[197,36],[165,37],[166,38],[167,39],[168,40],[169,41],[170,42],[171,43],[172,44],[173,45],[174,46],[175,46],[176,47],[177,10],[178,10],[179,48],[181,49],[180,50],[182,51],[183,52],[184,53],[185,54],[186,55],[187,56],[188,57],[189,58],[190,59],[191,60],[192,61],[193,62],[194,63],[195,64],[196,65],[64,66],[66,67],[63,68],[49,10],[47,10],[48,10],[8,10],[10,10],[9,10],[2,10],[11,10],[12,10],[13,10],[14,10],[15,10],[16,10],[17,10],[18,10],[3,10],[19,10],[20,10],[4,10],[21,10],[25,10],[22,10],[23,10],[24,10],[26,10],[27,10],[28,10],[5,10],[29,10],[30,10],[31,10],[32,10],[6,10],[36,10],[33,10],[34,10],[35,10],[37,10],[7,10],[38,10],[43,10],[44,10],[39,10],[40,10],[41,10],[42,10],[1,10],[45,10],[46,10],[120,69],[131,70],[118,69],[132,71],[141,72],[110,73],[109,74],[140,75],[135,76],[139,77],[112,78],[128,79],[111,80],[138,81],[107,82],[108,76],[113,83],[114,10],[119,73],[117,83],[105,84],[142,85],[133,86],[123,87],[122,83],[124,88],[126,89],[121,90],[125,91],[136,75],[115,92],[116,93],[127,94],[106,71],[130,95],[129,83],[134,10],[104,10],[137,96],[80,97],[82,98],[83,97],[84,97],[85,97],[86,97],[87,97],[88,97],[89,97],[90,97],[91,97],[92,99],[95,100],[74,101],[93,102],[76,103],[50,104],[81,104],[75,104],[100,104],[77,104],[99,105],[98,106],[78,104],[94,107],[96,108],[97,109],[79,110]],"semanticDiagnosticsPerFile":[[97,[{"start":2492,"length":6,"code":2339,"category":1,"messageText":"Property 'is_vto' does not exist on type 'FirestoreStyleCategory'."}]]],"version":"5.9.2"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v3.
|
|
2
|
+
* thefittingroom v3.2.0 (2025-08-26T01:37:18.866Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
function loadImageRecursive(imageURL, imageURLs) {
|
|
@@ -26597,7 +26597,7 @@ styleInject(css_248z$6);
|
|
|
26597
26597
|
var css_248z$5 = "@media screen and (max-width:702px){.tfr-modal-title-logo-container{display:flex;flex-direction:column}}@media screen and (min-width:600px){.tfr-modal-content-container{border-radius:10px;height:auto;margin:auto;width:100%}}@media screen and (max-width:599px){#tfr-size-recommendations{width:calc(100vw - 30px)!important}.tfr-mobile-small-text{font-size:12px}.tfr-mobile-hidden{display:none}.tfr-modal-content{overflow:hidden}.tfr-modal-content-container{max-height:none;max-width:100vw;min-height:100vh;min-width:100vw}.trf-logo-title{margin-bottom:10px}.tfr-modal-content-flex{overflow:auto}}@media screen and (max-width:500px){.tfr-fieldset{width:90%}.tfr-how-it-works-item{flex-direction:column}.tfr-try-on-content{margin-left:0;margin-top:20px}}@media screen and (max-height:800px){.tfr-video-responsive{height:280px!important}}";
|
|
26598
26598
|
styleInject(css_248z$5);
|
|
26599
26599
|
|
|
26600
|
-
var css_248z$4 = "#tfr-size-recommendations{align-items:center;background-color:var(--tfr-main-bg-color);border:var(--tfr-main-border-width) solid var(--tfr-main-border-color);border-radius:var(--tfr-main-border-radius);color:var(--tfr-dark);display:flex;flex-direction:column;font-family:var(--tfr-main-font);justify-content:center;padding:var(--tfr-main-v-padding) var(--tfr-main-h-padding);width:var(--tfr-main-width)}#tfr-size-recommendations-container{align-items:center;display:none;flex-direction:column;justify-content:center;position:relative;width:100%}#tfr-size-rec-select-container{align-items:center;display:none;flex-direction:column;font-size:13px;width:100%}#tfr-size-rec-title{align-items:center;display:flex;font-family:var(--tfr-title-font);margin-bottom:8px}#tfr-size-rec-title-toggle{color:var(--tfr-grey);cursor:pointer;position:absolute;right:0;top:0;transition:all .3s ease}.tfr-chevron-up{transform:rotate(180deg) scaleY(.6)}.tfr-chevron-down{transform:rotate(0deg) scaleY(.6)}#tfr-info-icon{cursor:pointer}#tfr-size-rec-subtitle{border-bottom:2px solid #000;font-size:18px;font-weight:700;text-align:center;width:100%}#tfr-size-rec-title{font-size:14px}#tfr-size-rec-table{display:flex;flex-direction:column;font-size:12px;padding:0 10px;width:100%}.tfr-size-rec-table-row:first-of-type{border-top-width:0}.tfr-size-rec-table-row{align-items:center;border-top:var(--tfr-main-border-width) solid var(--tfr-main-border-color);display:flex;font-family:var(--tfr-row-font);justify-content:center;min-height:40px}.tfr-size-rec-table-cell-left,.tfr-size-rec-table-cell-right{flex:1 1 0px}.tfr-size-rec-table-cell-left{flex-grow:1;padding-left:8px;padding-right:8px;text-align:right}.tfr-size-rec-table-cell-right{flex-grow:1;padding-left:8px;padding-right:8px;text-align:left}.tfr-size-rec-table-cell-right.perfect{color:var(--tfr-brand-color)}#tfr-size-rec-size{display:inline-block}#tfr-size-rec-size>.tfr-size-rec-login-cta{font-weight:500;margin-left:10px}.tfr-size-rec-login-cta,.tfr-size-rec-table-cell-right{font-size:12px}.tfr-size-rec-login-cta{color:var(--tfr-muted);display:flex;width:150px}#tfr-size-rec-action-login,#tfr-size-rec-action-logout{display:none;font-family:var(--tfr-cta-font)}#tfr-size-rec-action{cursor:pointer;font-size:16px;text-decoration:underline}#tfr-size-rec-select{background-color:var(--tfr-size-selector-bg-color);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);display:none;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);margin-bottom:20px;margin-top:10px}#tfr-size-rec-select,.tfr-size-rec-select-button{align-items:center;height:var(--tfr-size-selector-button-height);justify-content:center}.tfr-size-rec-select-button{cursor:pointer;display:flex;transition:all .15s ease-in;width:80px}.tfr-size-rec-select-button:hover:not(.active):not(.tfr-disabled){background-color:var(--tfr-size-selector-bg-color-hover);opacity:.7}.tfr-size-rec-select-button.active{background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-button-active-border-color);border-style:solid;border-width:var(--tfr-size-selector-button-active-border-width);height:var(--tfr-size-selector-button-active-height)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:first-of-type{border-bottom-left-radius:var(--tfr-size-selector-button-radius);border-top-left-radius:var(--tfr-size-selector-button-radius)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:last-of-type{border-bottom-right-radius:var(--tfr-size-selector-button-radius);border-top-right-radius:var(--tfr-size-selector-button-radius)}.tfr-powered-by{align-items:center;display:flex;font-size:10px;margin-top:10px}.tfr-powered-by-logo{margin:0 4px}.tfr-powered-by-logo,.tfr-powered-by-logo img,.tfr-powered-by-logo svg{height:24px;width:12px}.tfr-powered-by-text-bold{font-weight:700}#tfr-size-recommendation-error{color:#8d0000;display:none}#tfr-sign-in-nav{margin-bottom:80px}.tfr-disabled{cursor:default}#tfr-login-to-view{cursor:pointer}.tfr-try-on-button{align-items:center;background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);cursor:pointer;display:flex;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);height:var(--tfr-size-selector-button-height);justify-content:center;margin-bottom:10px;margin-top:20px;max-width:200px;position:relative;transition:all .15s ease-in;width:100%}.tfr-try-on-button.loading,.tfr-try-on-button:disabled{cursor:not-allowed;opacity:.7}.tfr-try-on-button.loading:after{animation:spin 1s linear infinite;border:2px solid var(--tfr-size-selector-text-color);border-radius:50%;border-top:2px solid transparent;content:\"\";height:16px;margin-left:8px;position:absolute;width:16px}@keyframes spin{to{transform:rotate(1turn)}}";
|
|
26600
|
+
var css_248z$4 = "#tfr-size-recommendations{align-items:center;background-color:var(--tfr-main-bg-color);border:var(--tfr-main-border-width) solid var(--tfr-main-border-color);border-radius:var(--tfr-main-border-radius);color:var(--tfr-dark);display:flex;flex-direction:column;font-family:var(--tfr-main-font);justify-content:center;padding:var(--tfr-main-v-padding) var(--tfr-main-h-padding);width:var(--tfr-main-width)}#tfr-size-recommendations-container{align-items:center;display:none;flex-direction:column;justify-content:center;position:relative;width:100%}#tfr-size-rec-select-container{align-items:center;display:none;flex-direction:column;font-size:13px;width:100%}#tfr-size-rec-title{align-items:center;display:flex;font-family:var(--tfr-title-font);margin-bottom:8px}#tfr-size-rec-title-toggle{color:var(--tfr-grey);cursor:pointer;position:absolute;right:0;top:0;transition:all .3s ease}.tfr-chevron-up{transform:rotate(180deg) scaleY(.6)}.tfr-chevron-down{transform:rotate(0deg) scaleY(.6)}#tfr-info-icon{cursor:pointer}#tfr-size-rec-subtitle{border-bottom:2px solid #000;font-size:18px;font-weight:700;text-align:center;width:100%}#tfr-size-rec-title{font-size:14px}#tfr-size-rec-table{display:flex;flex-direction:column;font-size:12px;padding:0 10px;width:100%}.tfr-size-rec-table-row:first-of-type{border-top-width:0}.tfr-size-rec-table-row{align-items:center;border-top:var(--tfr-main-border-width) solid var(--tfr-main-border-color);display:flex;font-family:var(--tfr-row-font);justify-content:center;min-height:40px}.tfr-size-rec-table-cell-left,.tfr-size-rec-table-cell-right{flex:1 1 0px}.tfr-size-rec-table-cell-left{flex-grow:1;padding-left:8px;padding-right:8px;text-align:right}.tfr-size-rec-table-cell-right{flex-grow:1;padding-left:8px;padding-right:8px;text-align:left}.tfr-size-rec-table-cell-right.perfect{color:var(--tfr-brand-color)}#tfr-size-rec-size{display:inline-block}#tfr-size-rec-size>.tfr-size-rec-login-cta{font-weight:500;margin-left:10px}.tfr-size-rec-login-cta,.tfr-size-rec-table-cell-right{font-size:12px}.tfr-size-rec-login-cta{color:var(--tfr-muted);display:flex;width:150px}#tfr-size-rec-action-login,#tfr-size-rec-action-logout{display:none;font-family:var(--tfr-cta-font)}#tfr-size-rec-action{cursor:pointer;font-size:16px;text-decoration:underline}#tfr-size-rec-select{background-color:var(--tfr-size-selector-bg-color);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);display:none;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);margin-bottom:20px;margin-top:10px}#tfr-size-rec-select,.tfr-size-rec-select-button{align-items:center;height:var(--tfr-size-selector-button-height);justify-content:center}.tfr-size-rec-select-button{cursor:pointer;display:flex;transition:all .15s ease-in;width:80px}.tfr-size-rec-select-button:hover:not(.active):not(.tfr-disabled){background-color:var(--tfr-size-selector-bg-color-hover);opacity:.7}.tfr-size-rec-select-button.active{background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-button-active-border-color);border-style:solid;border-width:var(--tfr-size-selector-button-active-border-width);height:var(--tfr-size-selector-button-active-height)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:first-of-type{border-bottom-left-radius:var(--tfr-size-selector-button-radius);border-top-left-radius:var(--tfr-size-selector-button-radius)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:last-of-type{border-bottom-right-radius:var(--tfr-size-selector-button-radius);border-top-right-radius:var(--tfr-size-selector-button-radius)}.tfr-powered-by{align-items:center;display:flex;font-size:10px;margin-top:10px}.tfr-powered-by-logo{margin:0 4px}.tfr-powered-by-logo,.tfr-powered-by-logo img,.tfr-powered-by-logo svg{height:24px;width:12px}.tfr-powered-by-text-bold{font-weight:700}#tfr-size-recommendation-error{color:#8d0000;display:none}#tfr-sign-in-nav{margin-bottom:80px}.tfr-disabled{cursor:default}#tfr-login-to-view{cursor:pointer}.tfr-try-on-button{align-items:center;background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);cursor:pointer;display:flex;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);height:var(--tfr-size-selector-button-height);justify-content:center;margin-bottom:10px;margin-top:20px;max-width:200px;position:relative;transition:all .15s ease-in;width:100%}.tfr-try-on-button.loading,.tfr-try-on-button:disabled{cursor:not-allowed;opacity:.7}.tfr-try-on-button.hide{display:none}.tfr-try-on-button.loading:after{animation:spin 1s linear infinite;border:2px solid var(--tfr-size-selector-text-color);border-radius:50%;border-top:2px solid transparent;content:\"\";height:16px;margin-left:8px;position:absolute;width:16px}@keyframes spin{to{transform:rotate(1turn)}}";
|
|
26601
26601
|
styleInject(css_248z$4);
|
|
26602
26602
|
|
|
26603
26603
|
var css_248z$3 = ".tfr-mt-10{margin-top:10px}.tfr-mt-20{margin-top:20px}.tfr-mt-15{margin-top:15px}.tfr-mt-30{margin-top:30px}.mt-40{margin-top:40px}.tfr-mb-40{margin-bottom:40px}.tfr-mb-20{margin-bottom:20px}.tfr-mr-10{margin-right:10px}.tfr-mr-15{margin-right:15px}.tfr-mt-50{margin-top:50px}.tfr-mt-60{margin-top:60px}.tfr-mb-60{margin-bottom:60px}.tfr-mr-20{margin-right:20px}.tfr-mt-15-p{margin-top:15%}.tfr-mb-13-p{margin-bottom:13%}.tfr-m-h-auto{margin-left:auto;margin-right:auto}.tfr-pt-20{padding-top:20px}.tfr-pb-50{padding-bottom:50px}.tfr-p-20{padding:20px 10px}.tfr-pr-20{padding-right:20px}.tfr-pl-20{padding-left:20px}.tfr-pb-7-p{padding-bottom:7%}";
|
|
@@ -27746,15 +27746,16 @@ class TfrSizeRec {
|
|
|
27746
27746
|
}
|
|
27747
27747
|
async setGarmentLocations(filledLocations = []) {
|
|
27748
27748
|
this.sizeRecComponent.setLoading(true);
|
|
27749
|
-
|
|
27749
|
+
// If we already have filledLocations, use them directly instead of making API calls
|
|
27750
|
+
const locations = filledLocations.length > 0 ? filledLocations : await this.getGarmentLocations(filledLocations);
|
|
27750
27751
|
console.debug('locations', locations);
|
|
27751
27752
|
console.debug('filledLocations', filledLocations);
|
|
27752
27753
|
this.sizeRecComponent.setGarmentLocations(locations || []);
|
|
27753
27754
|
this.sizeRecComponent.setLoading(false);
|
|
27754
27755
|
}
|
|
27755
|
-
async
|
|
27756
|
+
async recommendSize() {
|
|
27756
27757
|
this.sizeRecComponent.setLoading(true);
|
|
27757
|
-
const sizes = await this.
|
|
27758
|
+
const sizes = await this.getRecommendedSize();
|
|
27758
27759
|
if (!sizes) {
|
|
27759
27760
|
console.error('No sizes found for sku');
|
|
27760
27761
|
this.sizeRecComponent.setLoading(false);
|
|
@@ -27782,7 +27783,7 @@ class TfrSizeRec {
|
|
|
27782
27783
|
}
|
|
27783
27784
|
}
|
|
27784
27785
|
}
|
|
27785
|
-
async
|
|
27786
|
+
async getRecommendedSize() {
|
|
27786
27787
|
try {
|
|
27787
27788
|
const colorwaySizeAsset = await this.tfrShop.getColorwaySizeAssetFromSku(this.sku);
|
|
27788
27789
|
const sizes = await this.getRecommendedSizes(String(colorwaySizeAsset.style_id));
|
|
@@ -27936,16 +27937,29 @@ class FittingRoom {
|
|
|
27936
27937
|
get sku() {
|
|
27937
27938
|
return this.tfrSizeRec.sku;
|
|
27938
27939
|
}
|
|
27939
|
-
async
|
|
27940
|
-
|
|
27941
|
-
return Boolean(style === null || style === void 0 ? void 0 : style.is_published);
|
|
27942
|
-
}
|
|
27943
|
-
setSku(sku) {
|
|
27940
|
+
async setSku(sku) {
|
|
27941
|
+
var _a, _b;
|
|
27944
27942
|
this.tfrSizeRec.setSku(sku);
|
|
27943
|
+
const style = await this.getStyle(this.sku);
|
|
27944
|
+
this.style = style;
|
|
27945
|
+
if (!style.is_published) {
|
|
27946
|
+
document.getElementById('tfr-size-recommendations').style.display = 'none';
|
|
27947
|
+
console.log(`style ${style.id} is not published`);
|
|
27948
|
+
}
|
|
27949
|
+
else {
|
|
27950
|
+
console.log(`style ${style.id} is published`);
|
|
27951
|
+
}
|
|
27952
|
+
console.log(`style ${style.id} virtual try on is disabled`);
|
|
27953
|
+
if (style.is_vto) {
|
|
27954
|
+
(_a = document.getElementById('tfr-try-on-button')) === null || _a === void 0 ? void 0 : _a.classList.remove("hide");
|
|
27955
|
+
}
|
|
27956
|
+
else {
|
|
27957
|
+
(_b = document.getElementById('tfr-try-on-button')) === null || _b === void 0 ? void 0 : _b.classList.add("hide");
|
|
27958
|
+
}
|
|
27945
27959
|
if (this.isLoggedIn)
|
|
27946
|
-
this.tfrSizeRec.
|
|
27960
|
+
this.tfrSizeRec.recommendSize();
|
|
27947
27961
|
else
|
|
27948
|
-
this.setGarmentLocations();
|
|
27962
|
+
this.setGarmentLocations(style);
|
|
27949
27963
|
}
|
|
27950
27964
|
async onInit() {
|
|
27951
27965
|
var _a, _b;
|
|
@@ -27973,7 +27987,7 @@ class FittingRoom {
|
|
|
27973
27987
|
this.hooks.onLogout();
|
|
27974
27988
|
this.isLoggedIn = false;
|
|
27975
27989
|
this.tfrSizeRec.setIsLoggedIn(false);
|
|
27976
|
-
this.setGarmentLocations();
|
|
27990
|
+
this.setGarmentLocations(this.style);
|
|
27977
27991
|
this.unsubscribeFromProfileChanges();
|
|
27978
27992
|
}
|
|
27979
27993
|
async signIn(username, password, validationError) {
|
|
@@ -27991,7 +28005,7 @@ class FittingRoom {
|
|
|
27991
28005
|
this.tfrModal.close();
|
|
27992
28006
|
this.isLoggedIn = true;
|
|
27993
28007
|
this.tfrSizeRec.setIsLoggedIn(true);
|
|
27994
|
-
this.tfrSizeRec.
|
|
28008
|
+
this.tfrSizeRec.recommendSize();
|
|
27995
28009
|
this.subscribeToProfileChanges();
|
|
27996
28010
|
}
|
|
27997
28011
|
catch (e) {
|
|
@@ -28076,9 +28090,8 @@ class FittingRoom {
|
|
|
28076
28090
|
this.unsub();
|
|
28077
28091
|
this.unsub = null;
|
|
28078
28092
|
}
|
|
28079
|
-
async setGarmentLocations() {
|
|
28093
|
+
async setGarmentLocations(style) {
|
|
28080
28094
|
var _a, _b;
|
|
28081
|
-
const style = await this.getStyle(this.sku);
|
|
28082
28095
|
const filledLocations = ((_b = (_a = style === null || style === void 0 ? void 0 : style.sizes) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.garment_measurements.map((measurement) => measurement.measurement_location)) || [];
|
|
28083
28096
|
this.tfrSizeRec.setGarmentLocations(filledLocations);
|
|
28084
28097
|
}
|
|
@@ -28088,12 +28101,12 @@ class FittingRoom {
|
|
|
28088
28101
|
const style = await this.tfrShop.getStyle(colorwaySizeAsset.style_id);
|
|
28089
28102
|
return style;
|
|
28090
28103
|
}
|
|
28091
|
-
catch (
|
|
28104
|
+
catch (e) {
|
|
28092
28105
|
try {
|
|
28093
28106
|
const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleIdOrSku);
|
|
28094
28107
|
return style;
|
|
28095
28108
|
}
|
|
28096
|
-
catch (
|
|
28109
|
+
catch (e2) {
|
|
28097
28110
|
return null;
|
|
28098
28111
|
}
|
|
28099
28112
|
}
|