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jC,iBAAAC,GACLr4B,EAAAC,EAASwI,QAAQ,kBACrB,CAEA,SAAA6vB,GACIL,EAAgBM,MAAM,gBAAkBC,KACpC,EAAA5Z,EAAA3R,GAAuBurB,IACvB,EAAAC,EAAAxrB,GAAwBurB,GACxBA,EAAIzrB,kBAAkB2rB,EAAAzrB,IACtB,EAAA0rB,EAAA1rB,GAA4BurB,KAGhCnD,EAA0BkD,MAAM,aAAeC,KAC3C,EAAA5Z,EAAA3R,GAAuBurB,IACvB,EAAAC,EAAAxrB,GAAwBurB,IAEhC,CAEA,WAAAI,GAEA,CAEA,aAAAC,IACI,EAAAC,EAAA7rB,GAA6BjN,EAAAC,GACND,EAAAC,ECzClB4d,UAAU,gBAAiBsT,EAAAlkB,ED0CpC,EE5CuB,IAAIirB,C","sources":["webpack:///../common/ts/apps/delivery/components/ProductProductionTime/ProductProductionTime.ts","webpack:///../common/ts/apps/delivery/components/ProductProductionTime/ProductProductionTime.html.ts","webpack:///../common/ts/apps/packaging/components/RetailPackage/RetailPackage.ts","webpack:///../common/ts/apps/packaging/components/RetailPackage/RetailPackage.html.ts","webpack:///../common/ts/apps/packaging/components/RetailPackageOption/RetailPackageOption.ts","webpack:///../common/ts/apps/packaging/components/RetailPackageOption/RetailPackageOption.html.ts","webpack:///../common/ts/apps/packaging/components/init.ts","webpack:///../common/ts/apps/products_shared/components/Price/Price.ts","webpack:///../common/ts/apps/products_shared/components/Price/Price.html.ts","webpack:///../common/ts/apps/products_shared/components/QuantityBreaks/QuantityBreaks.ts","webpack:///../common/ts/apps/products_shared/components/QuantityBreaks/QuantityBreaks.html.ts","webpack:///../common/ts/apps/products_shared/services/ConfiguredProductServiceAbstract.ts","webpack:///../common/ts/apps/products_shared/services/ProductServiceAbstract.ts","webpack:///../common/ts/apps/products_shared/services/PriceQuote.ts","webpack:///../common/ts/apps/products_shared/services/init.ts","webpack:///../common/ts/apps/svgcustom/apps/ProductPageLoaderAbstract.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectDesign/SelectDesign.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectDesign/SelectDesign.html.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/UploadFile/UploadFile.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/UploadFile/UploadFile.html.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectFile/SelectFile.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectFile/SelectFile.html.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectTemplate/SelectTemplate.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectTemplate/SelectTemplate.html.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectAutosave/SelectAutosave.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/SelectAutosave/SelectAutosave.html.ts","webpack:///../common/ts/apps/svgcustom/components/SetupPage/init.ts","webpack:///../common/ts/apps/svgcustom/components/TemplateFinalizeOptions/Options.html.ts","webpack:///../common/ts/apps/svgcustom/components/TemplateFinalizeOptions/Options.ts","webpack:///../common/ts/apps/svgcustom/components/TemplateSetupOptionsShapes/TemplateSetupOptionsShapes.html.ts","webpack:///../common/ts/apps/svgcustom/components/TemplateSetupOptionsShapes/TemplateSetupOptionsShapes.ts","webpack:///../common/ts/apps/svgcustom/services/CustomService.ts","webpack:///../common/ts/core/adapters/VueUtils.ts","webpack:///../common/ts/apps/svgcustom/apps/CustomProductSetupPageApp.ts","webpack:///../common/ts/apps/svgcustom/apps/FinalizePageApp.ts","webpack:///../common/integrations/ts/Setup.ts","webpack:///../common/ts/apps/svgcustom/services/setup.init.ts","webpack:///./integrations/ts/Setup.ts"],"sourcesContent":["import VueComponent, {data, method} from '../../../../core/adapters/VueComponent';\nimport {html} from './ProductProductionTime.html';\nimport {Services} from '../../../../core/services/Services';\nimport {Http} from '../../../../core/services/Http';\n\nclass ProductProductionTimeController extends VueComponent {\n\n    @data()\n    standard: number;\n\n    @data()\n    rush: number;\n\n    @data()\n    message: string;\n\n    @data()\n    loaded: boolean;\n\n    @data()\n    backordered: boolean;\n\n    // Do not store the product service in the data. There is some odd bug\n    // that bricks the component and prevents it from updating the html.\n    // @data()\n    // product_service;\n\n    constructor(componet) {\n        super(componet);\n\n        Services.waitOn('product-service-loaded').then(() => {\n            let product_service: any = Services.get('ProductService');\n            product_service.configured.bind('change:material', this.updateTimes.bind(this), this);\n            product_service.configured.bind('change:quantity', this.updateTimes.bind(this), this);\n            product_service.configured.bind('change:width', this.updateTimes.bind(this), this);\n            product_service.configured.bind('change:height', this.updateTimes.bind(this), this);\n\n            this.backordered = product_service.configured.material?.backordered;\n            product_service.configured.bind('change:material', () => {\n                this.backordered = product_service.configured.material?.backordered;\n            }, this);\n            this.updateTimes();\n        });\n    }\n\n    @method()\n    updateTimes() {\n        let product_service: any = Services.get('ProductService');\n        if (!product_service.configured.material || !product_service.configured.quantity) {\n            return;\n        }\n\n        // Sanity check\n        if (product_service.configured.quantity > 500000) {\n            this.message = 'Please contact customer service for a production time estimate.';\n            return;\n        }\n\n        let size = null;\n        if (product_service.configured.width && product_service.configured.height) {\n            size = product_service.configured.width * product_service.configured.height;\n        }\n\n        Services.get<Http>('$http').request({\n            method: 'GET',\n            url: '/delivery/api/get-production-times-basic/',\n            params: {\n                material: product_service.configured.material.id,\n                quantity: product_service.configured.quantity,\n                size: size\n            }\n        }).then((response) => {\n            this.message = response.data.message;\n            this.standard = response.data.standard;\n            this.rush = response.data.rush;\n            this.$forceUpdate();\n        });\n    }\n\n    @method()\n    hidden() {\n        if (!Services.isRegistered('ProductService')) {\n            return false;\n        }\n\n        let product_service: any = Services.get('ProductService');\n        return !product_service.configured?.material;\n    }\n}\n\nexport default function ProductProductionTime() {\n    return {\n        tag: 'product-production-time',\n        controller: ProductProductionTimeController,\n        template: html\n    }\n}","export const html:string = `\n<div class=\"pill pill-rounded pill-lg\" :class=\"{'pill-green': !backordered, 'pill-warning': backordered}\" v-if=\"!hidden()\">\n    <span v-if=\"message\">\n        {{ message }}\n    </span>\n    <span v-if=\"backordered\">\n        Out of stock\n    </span>\n    <span v-if=\"!backordered && !message && rush != standard\">\n        Ships in {{ rush }} to {{ standard }} days\n    </span>\n    <span v-if=\"!backordered && !message && rush == standard\">\n        Ships within {{ standard }} days\n    </span>\n</div>\n`;","import {html} from './RetailPackage.html';\nimport VueComponent, {data, method, prop} from '../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../core/adapters/IVueComponent';\nimport {IDeferred, IPromise, SimplePromise} from '../../../../core/utils/SimplePromise';\nimport {fitInArea, getInnerHeight, getInnerWidth} from '../../../../core/utils/utils';\nimport {RetailPackage} from '../../models/RetailPackage';\nimport {PackageSize} from '../../models/PackageSize';\nimport ConfiguredRetailPackage from '../../models/ConfiguredRetailPackage';\nimport {disableVueForImport} from '../../../../core/adapters/VueUtils';\n\nclass RetailPackageDisplayController extends VueComponent {\n    paper_import;\n    paper;\n    configured_deferred: IDeferred<void>;\n    configured: IPromise<void>;\n    paperScope: paper.PaperScope;\n    canvas;\n    project: paper.Project;\n    layer: paper.Layer;\n    canvas_width: number;\n    canvas_height: number;\n    package_raster: paper.Raster;\n    product_raster: paper.Raster;\n    transfer_layer: paper.Layer;\n    transfer_background: paper.Raster;\n\n    white_transfer_background = '/static/img/packaging/transfer-bg-white.jpg';\n    blue_transfer_background = '/static/img/packaging/transfer-bg-blue.jpg';\n\n    @prop({\n        watch: true\n    })\n    productDesign: string;\n\n    @prop({\n        watch: true\n    })\n    selectedPackage: ConfiguredRetailPackage;\n\n    @prop({\n        watch: true\n    })\n    productWidth: number;\n\n    @prop({\n        watch: true\n    })\n    productHeight: number;\n\n    @prop()\n    singleColor: boolean;\n\n    @prop()\n    noName: boolean;\n\n    @prop()\n    quantity: number;\n\n    @prop()\n    materialColor: any;\n\n    @data()\n    reversed: boolean;\n\n    timeout;\n\n    constructor(component) {\n        super(component);\n\n        this.paper_import = import('paper');\n        this.paper_import.then((paper) => {\n            disableVueForImport(paper);\n            this.paper = paper\n        });\n\n        this.reset();\n        this.bind('change:selectedPackage', () => {\n            this.reversed = false;\n            this.startReset();\n        }, this);\n        this.bind('change:productDesign', this.startReset.bind(this), this);\n        this.bind('change:productWidth', this.startReset.bind(this), this);\n        this.bind('change:productHeight', this.startReset.bind(this), this);\n\n        if (this.selectedPackage) {\n            this.selectedPackage.bind('sync', () => {\n                this.trigger('sync');\n            }, this);\n        }\n    }\n\n    @method()\n    flip() {\n        this.reversed = !this.reversed;\n        this.reset();\n    }\n\n    startReset() {\n        // Prevent reset from being called faster than paperjs can handle\n        if (this.timeout) {\n            clearTimeout(this.timeout);\n        }\n\n        this.timeout = setTimeout(() => {\n            this.timeout = null;\n            this.reset();\n        }, 50);\n    }\n\n    reset() {\n        if (!this.configured_deferred) {\n            this.configured_deferred = SimplePromise.defer();\n            this.configured = this.configured_deferred.promise;\n        }\n\n        if (this.product_raster) {\n            this.product_raster.remove();\n            this.product_raster = null;\n        }\n        if (this.package_raster) {\n            this.package_raster.remove();\n            this.package_raster = null;\n        }\n        if (this.transfer_background) {\n            this.transfer_background.remove();\n            this.transfer_background = null;\n        }\n        if (this.transfer_layer) {\n            this.transfer_layer.removeChildren();\n        }\n\n        this.configured.then(this.setupPackaging.bind(this));\n        this.configured.then(this.setupProduct.bind(this));\n    }\n\n    override mounted() {\n        super.mounted();\n        this.setupPaper();\n    }\n\n    async setupPaper() {\n        if (!this.configured_deferred) {\n            this.configured_deferred = SimplePromise.defer();\n            this.configured = this.configured_deferred.promise;\n        }\n\n        await this.paper_import;\n\n        this.canvas = this.$el.querySelector('canvas');\n        if (!this.canvas) {\n            return\n        }\n\n        this.canvas_height = getInnerHeight(this.canvas);\n        this.canvas_width = getInnerWidth(this.canvas);\n\n        this.canvas.style.width = Number(this.canvas_width).toFixed(0) + 'px';\n        this.canvas.style.height = Number(this.canvas_height).toFixed(0) + 'px';\n\n        this.paperScope = new this.paper.PaperScope();\n        this.paperScope.activate();\n        this.paperScope.setup(this.canvas);\n        this.paperScope.view.viewSize = new this.paper.Size(this.canvas_width, this.canvas_height);\n\n        this.project = this.paperScope.project;\n        this.layer = new this.paper.Layer();\n        this.transfer_layer = new this.paper.Layer();\n        this.layer.addChild(this.transfer_layer);\n\n        this.layer.name = 'root';\n        this.transfer_layer.name = 'transfer-layer';\n\n        // Setup high quality down sampling for better scaling\n        let ctx = this.paperScope.view.element.getContext('2d');\n        ctx.imageSmoothingQuality = 'medium';\n        ctx.imageSmoothingEnabled = true;\n\n        this.configured_deferred.resolve(null);\n    }\n\n    get no_customer_preview() {\n        if (!this.selectedPackage) {\n            return false;\n        }\n\n        return this.selectedPackage.package.no_customer_preview;\n    }\n\n    get is_reversed() {\n        if (!this.selectedPackage || !this.selectedPackage.package.content_back) {\n            return false;\n        }\n\n        return this.reversed;\n    }\n\n    setupProduct() {\n        if (this.no_customer_preview || this.is_reversed) {\n            return;\n        }\n\n        // Setup product image background\n        this.transfer_layer.visible = false;\n        if (this.singleColor) {\n            this.transfer_layer.removeChildren();\n\n            let background_image = this.white_transfer_background;\n            if (this.materialColor && this.materialColor.toLowerCase().indexOf('white') != -1) {\n                background_image = this.blue_transfer_background;\n            }\n\n            this.transfer_background = new this.paper.Raster({\n                source: background_image,\n                crossOrigin: 'anonymous',\n            });\n            this.transfer_background.on('load', () => {\n                this.transfer_background.fitBounds(new this.paper.Rectangle(0, 0, this.canvas_width, this.canvas_height));\n\n                if (this.product_raster) {\n                    this.product_raster.bringToFront();\n                }\n            })\n            this.transfer_background.name = 'transfer-background';\n            this.transfer_layer.addChild(this.transfer_background);\n            this.transfer_layer.visible = false;\n        }\n\n        this.layer.activate();\n        this.product_raster = new this.paper.Raster({\n            source: this.productDesign,\n            crossOrigin: 'anonymous',\n        });\n        this.product_raster.on('load', () => {\n            if (this.selectedPackage) {\n                // Setup Product Image\n                let package_width = this.selectedPackage.size.package_width;\n                let package_height = this.selectedPackage.size.package_height;\n\n                let dpi;\n                if (package_height > package_width) {\n                    dpi = this.canvas_height / package_height;\n                }\n                else {\n                    dpi = this.canvas_width / package_width;\n                }\n\n                let product_width = this.productWidth * dpi;\n                let product_height = this.productHeight * dpi;\n\n                let left_padding = (this.canvas_width / 2) - (product_width / 2);\n                let top_padding = this.canvas_height - product_height - (0.05 * dpi); // Add 0.25\" padding\n\n                let bounds = new this.paper.Rectangle(\n                    new this.paper.Point(left_padding, top_padding),\n                    new this.paper.Size(product_width, product_height)\n                )\n\n                this.product_raster.fitBounds(bounds);\n\n                if (this.transfer_background) {\n                    let clipping = new this.paper.Path.Rectangle(bounds);\n                    this.transfer_layer.addChild(clipping);\n\n                    clipping.clipMask = true;\n\n                    this.transfer_layer.visible = true;\n                }\n\n                this.product_raster.bringToFront();\n            }\n            else {\n                let bounds = new this.paper.Rectangle(\n                    new this.paper.Point(0, 0),\n                    new this.paper.Size(this.canvas_width, this.canvas_height)\n                )\n\n                this.product_raster.fitBounds(bounds);\n                this.product_raster.bringToFront();\n            }\n            this.product_raster.visible = true;\n            this.product_raster.name = 'product-raster';\n        });\n\n        // Prevent flashing due to a loading bug/\"feature\" with paperjs\n        this.product_raster.visible = false;\n\n        this.layer.addChild(this.product_raster);\n    }\n\n    setupPackaging() {\n        if (!this.selectedPackage) {\n            return\n        }\n\n        this.layer.activate();\n        this.package_raster = new this.paper.Raster({\n            source: this.is_reversed ? this.selectedPackage.package.content_back : this.selectedPackage.package.content,\n            crossOrigin: 'anonymous',\n        });\n        this.package_raster.on('load', () => {\n            (this.package_raster as any).fitBounds(0, 0, this.canvas_width, this.canvas_height);\n            this.package_raster.visible = true;\n            this.package_raster.sendToBack();\n        });\n        this.package_raster.visible = false;\n        this.package_raster.name = 'package-raster';\n\n        this.layer.addChild(this.package_raster);\n    }\n}\n\nexport default function RetailPackageDisplay(): IVueComponent {\n    return  {\n        controller: RetailPackageDisplayController,\n        tag: 'package-preview',\n        template: html\n    }\n}\n","export const html:string = `\n<div class=\"flex-left no-wrap spacing-sm full-width\" :data-package-id=\"selectedPackage.package.id\">\n    <canvas class=\"retail-package\"></canvas>\n    \n    <div class=\"flex-left column spacing-xs\">\n        <div class=\"flex-left-center space-between spacing-xs no-wrap full-width\">\n            <b>{{ selectedPackage ? selectedPackage.package.name : 'None' }}</b>\n            <b v-if=\"selectedPackage && selectedPackage.currency\">+{{ $filters.currency(selectedPackage.priceFor(quantity).unitPrice, selectedPackage.currency) }} each</b>\n            <b v-if=\"!selectedPackage\">Free</b>\n        </div>\n        <span class=\"text-xs align-left\" v-if=\"selectedPackage && selectedPackage.package.description\">\n            {{ selectedPackage.package.description }}\n        </span>\n    </div>\n</div>`;\n","import VueComponent, {data, method, prop} from '../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../core/adapters/IVueComponent';\nimport {html} from './RetailPackageOption.html';\nimport ConfiguredRetailPackage from '../../../packaging/models/ConfiguredRetailPackage';\n\nclass RetailPackageOptionController extends VueComponent {\n    @prop()\n    productService;\n\n    @data()\n    show_retail_packaging: boolean = false;\n\n    @data()\n    selected_package;\n\n    override mounted() {\n        super.mounted();\n        this.productService.setup_complete.then(() => {\n            if (this.productService.configured.retail_package) {\n                this.show_retail_packaging = true;\n                this.selected_package = this.productService.configured.retail_package.package.id;\n            }\n        })\n    }\n\n    @method()\n    manualToggle() {\n        if (this.productService.available_packages.length > 0) {\n            this.show_retail_packaging = !this.show_retail_packaging;\n            this.toggleRetailPackaging()\n        }\n    }\n\n    @method()\n    toggleRetailPackaging() {\n        if (!this.show_retail_packaging) {\n            this.productService.configured.retail_package = null;\n            this.selected_package = null\n        }\n        else {\n            this.updatePackage(this.productService.available_packages[0]);\n        }\n    }\n\n    @method()\n    updatePackage(selected: ConfiguredRetailPackage) {\n        this.selected_package = selected.package.id;\n        this.productService.configured.retail_package = selected;\n    }\n}\n\nexport default function RetailPackageOption(): IVueComponent {\n    return {\n        tag: 'retail-package-option',\n        controller: RetailPackageOptionController,\n        template: html\n    }\n}","export const html:string = `\n<div class=\"input-group\" v-if=\"productService.hasPackageOptions()\">\n    <label>Retail Packaging</label>\n    <div v-if=\"!(productService.available_packages.length > 0) && productService.adjustedPackageSize()\" class=\"text-sm\">\n        Size too large for packaging. <button class=\"btn-link\" @click=\"productService.adjustSizeToPackage()\">\n            Adjust to \n            <size :value=\"productService.adjustedPackageSize().width\"></size>\n            x\n            <size :value=\"productService.adjustedPackageSize().height\"></size>\n            </button>\n    </div>\n    <div class=\"flex-left-center spacing-sm\">\n        <input class=\"input-toggle\" type=\"checkbox\" v-model=\"show_retail_packaging\" @change=\"toggleRetailPackaging()\" :disabled=\"!(productService.available_packages.length > 0)\">\n        <span @click=\"manualToggle()\" :style=\"productService.available_packages.length > 0 ? 'cursor: pointer' : 'cursor: not-allowed'\">Add Retail Packaging To This Item</span>\n    </div>\n</div>\n\n<fieldset class=\"input-group single-option\" v-if=\"show_retail_packaging && productService.available_packages.length > 0\">\n    <legend>Package Type</legend>\n    <div class=\"toggle-items flex-left column spacing-xs no-wrap\">\n        <label class=\"flex-left spacing-none\" :for=\"configured_package.package.name\" v-for=\"configured_package in productService.available_packages\" @click=\"updatePackage(configured_package)\">\n            <input id=\"configured_package.package.name\" :value=\"configured_package.package.id\" name=\"package-option\" type=\"radio\" v-model=\"selected_package\">\n            <package-preview :selected-package=\"configured_package\"\n                         :product-design=\"productService.product_preview\"\n                         :product-width=\"productService.width\"\n                         :product-height=\"productService.height\"\n                         :quantity=\"productService.configured.quantity\"\n                         :single-color=\"productService.base.type == 0\"\n                         :material-color=\"productService.configured.material_color ? productService.configured.material_color.name : ''\">\n            </package-preview>\n        </label>\n    </div>\n</fieldset>\n`;","import RetailPackageDisplay from './RetailPackage/RetailPackage';\nimport VueApp from '../../../core/adapters/VueApp';\nimport RetailPackageOption from './RetailPackageOption/RetailPackageOption';\n\nexport default function registerComponents(vue_app: VueApp) {\n    vue_app.registerComponent(RetailPackageDisplay);\n    vue_app.registerComponent(RetailPackageOption);\n}","import {html} from './Price.html';\nimport IVueComponent from '../../../../core/adapters/IVueComponent';\nimport VueComponent, {prop} from '../../../../core/adapters/VueComponent';\nimport {ConfiguredProductAbstract} from '../../../svgcustom/models/abstract/ConfiguredProductAbstract';\n\nclass PriceController extends VueComponent {\n    @prop()\n    productService: ConfiguredProductAbstract;\n\n    @prop()\n    unit: boolean;\n\n    @prop()\n    total: boolean;\n\n    constructor(component) {\n        super(component);\n\n        // Inefficient but we need to make sure this is always up to date\n        this.productService.bind('change:price', this.$forceUpdate.bind(this), this);\n    }\n}\n\nexport default function Price(): IVueComponent {\n\n    return {\n        controller: PriceController,\n        template: html,\n        tag: 'price'\n    };\n}\n","export const html: string = `\n<span v-if=\"productService && !unit\" :class=\"{'h2 strong': total, 'h5': !total}\">{{ $filters.currency(productService.price.price + productService.optionsPrice, productService.currency) }}</span>\n<span v-if=\"productService && !unit && !total\" :class=\"{'h2': total, 'h5': !total}\">({{ $filters.currency(productService.price.unitPrice, productService.currency) }} each)</span>\n<span v-if=\"productService && unit && !total\" :class=\"{'h2 strong': total, 'h5': !total}\">{{ $filters.currency(productService.price.unitPrice + productService.optionsUnitValue, productService.currency) }} each</span>\n`;","import {html} from './QuantityBreaks.html';\nimport VueComponent, {computed, data, method, prop} from '../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../core/adapters/IVueComponent';\nimport ConfiguredProductServiceAbstract from '../../services/ConfiguredProductServiceAbstract';\n\nexport class QuantityOptionsController extends VueComponent {\n    @prop()\n    productService: ConfiguredProductServiceAbstract;\n\n    @data()\n    quantity_options: any[];\n\n    @data()\n    show_more: boolean;\n\n    @data()\n    show_all: boolean;\n\n    constructor(component) {\n        super(component);\n\n        if (this.productService) {\n            this.productService.bind('change:price', () => {\n                this.quantity_options = this.calcQuantityOptions();\n            }, this);\n            this.productService.setup_complete.then(() => {\n                this.quantity_options = this.calcQuantityOptions();\n            })\n        }\n        else {\n            console.error('Undefined product service');\n        }\n        this.updateQuantityOptions();\n    }\n\n    @method()\n    updateQuantityOptions() {\n        this.quantity_options = this.calcQuantityOptions();\n    }\n\n    @method()\n    checkView() {\n        if (!this.show_all) {\n            this.$el?.parentElement?.scrollIntoView();\n        }\n    }\n\n    calcQuantityOptions(): any[] {\n        if (!this.productService || !this.productService.pricing) {\n            return [];\n        }\n\n        let pricing = this.productService.pricing;\n\n        // Remove the quantities that are lower than the min quantity and alter lower bracket to be the min\n        let to_pop = [];\n        for (let i = 0; i < pricing.length-1; i++) {\n            let current = pricing[i];\n            let next = pricing[i+1];\n\n            if (current.quantity <= this.productService.base.minimum_quantity) {\n                if (next.quantity <= this.productService.base.minimum_quantity) {\n                    to_pop.push(current);\n                }\n                else {\n                    current.quantity = this.productService.base.minimum_quantity;\n                }\n            }\n        }\n\n        for (const item of to_pop) {\n            pricing.splice(pricing.indexOf(item), 1);\n        }\n\n        this.show_more = pricing.length > 3;\n\n        if (!this.show_all && pricing.length > 3) {\n            let index = 0;\n            for (const item of pricing) {\n                if (this.productService.base.default_quantity >= item.quantity) {\n                    index++;\n                }\n            }\n\n            if (index < 2) {\n                index = 2;\n            }\n\n            return pricing.slice(index - 2, index + 1)\n        }\n\n        return pricing;\n    }\n}\n\nexport default function QuantityBreaks(): IVueComponent {\n    return {\n        controller: QuantityOptionsController,\n        template: html,\n        tag: 'quantity-breaks'\n    };\n}","export const html: string = `\n<template v-if=\"quantity_options && quantity_options.length > 1\">\n    <div class=\"option-list hide-radio\">\n        <label class=\"flex-left space-between no-wrap\" v-for=\"tier in quantity_options\">\n            <input :aria-label=\"'Select quantity: ' + tier.quantity\" type=\"radio\" name=\"size\" v-model=\"productService.quantity\" :value=\"tier.quantity\"/>\n            <span>\n                {{ tier.quantity }}\n            </span>\n            <span v-if=\"tier.quantity < 2\">{{ $filters.currency(tier.price, productService.configured.currency) }}</span>\n            <span v-if=\"tier.quantity > 1\">{{ $filters.currency(tier.unitPrice, productService.configured.currency) }} each</span>\n        </label>\n    </div>\n    <button class=\"btn-link rotate-icon\" type=\"button\" @click=\"show_all = !show_all; updateQuantityOptions(); checkView()\" v-if=\"show_more\">\n        {{ show_all ? 'Hide price breaks' : 'View all price breaks' }}\n        <svg class=\"icon\" fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" :class=\"show_all ? 'flip' : ''\">\n            <path d=\"M5 7.5L10 12.5L15 7.5\" stroke=\"var(--brand-secondary, #6941C6)\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.66667\"></path>\n        </svg>\n    </button>\n</template>\n`;","import APIResponse from '../../../core/models/APIResponse';\nimport {Services} from '../../../core/services/Services';\nimport MessageList from '../../../core/utils/MessageList';\nimport PricingTier from '../../../core/utils/PricingTier';\nimport PriceQuote from './PriceQuote';\nimport ButtonProcessingState from '../../../core/utils/ButtonProcessingState';\nimport {clamp, isEmptyString, lerp, roundHalfUp, toFixedCeil, toFixedCeilStable} from '../../../core/utils/utils';\nimport ProductServiceAbstract from './ProductServiceAbstract';\nimport {ConfigurableProductAttributeAbstract} from '../../product/models/abstract/ProductAttributeAbstract';\nimport {ConfiguredProductAbstract} from '../../svgcustom/models/abstract/ConfiguredProductAbstract';\nimport {Color} from '../../svgcustom/models/Color';\nimport {IDeferred, IPromise} from '../../../core/utils/SimplePromise';\nimport ConfiguredRetailPackage from '../../packaging/models/ConfiguredRetailPackage';\nimport {RetailPackage} from '../../packaging/models/RetailPackage';\nimport {Collection} from '../../../core/models/Collection';\nimport {ColorMap} from '../../svgcustom/models/ColorMap';\nimport {DisplayTypeEnum, ProductTypeEnum} from '../../svgcustom/models/enums';\nimport AbstractProductOption from '../../svgcustom/models/AbstractProductOption';\nimport {ProductAbstract} from '../../svgcustom/models/abstract/ProductAbstract';\nimport {FontService} from '../../svgcustom/services/FontService';\nimport RouteService from \"../../../core/services/RouteService\";\n\n/*\n    Configured Product Service Abstract\n\n    This is a abstract class that defines all shared functionality for any product that has a base and configured class.\n    This applies to:\n        Custom/Template\n        ConfiguredClipartProduct/ClipartProduct\n\n    This should only deal with the models not paperjs or any canvas/rendering service.\n */\n\nexport default abstract class ConfiguredProductServiceAbstract extends ProductServiceAbstract {\n    public declare base: ConfigurableProductAttributeAbstract;\n    public declare configured: ConfiguredProductAbstract;\n\n    public declare base_class: typeof ConfigurableProductAttributeAbstract;\n    public declare configured_class: typeof ConfiguredProductAbstract;\n\n    public declare setup_complete: IPromise<void>;\n    protected declare setup_complete_deferred: IDeferred<void>;\n\n    public proportions_ratio: number;\n\n    public price_tier: PricingTier;\n    public pricing: PricingTier[];\n\n    private price_quote_uuid: string;\n    private price_quote_timeout;\n\n    private available_packages: any[] = [];\n    private packages: APIResponse<RetailPackage>;\n\n    abstract configured_option_model: string;\n\n    private price_quote_key;\n\n    constructor(base_class, configured_class, base_key) {\n        super(base_class, configured_class, base_key);\n    }\n\n    override get optionsPrice(): number {\n        return this.configured.calcOptionsPrice(this.price.price, this.show_retail);\n    }\n\n    override setupFromData(base_data, configured_data, all_data): void {\n        let base = null;\n        let configured = null;\n\n        if (base_data) {\n            base = new (this.base_class as any)(base_data);\n        }\n        if (configured_data) {\n            configured = new this.configured_class(configured_data);\n        }\n\n        if (!base && configured) {\n            base = configured[this.base_key];\n        }\n        if (!configured) {\n            configured = new this.configured_class();\n            configured.configure = true;\n            configured.currency = all_data.currency;\n        }\n\n        this.currency = all_data.currency;\n\n        this.setupExtraData(all_data);\n        this.setupFromProduct(base, configured);\n    }\n\n    override setupExtraData(all_data): void {}\n\n    override setupFromProduct(base, configured): void {\n        this.base = base;\n        this.configured = configured;\n\n        this.setupConfiguredFromBase();\n    }\n\n    override nextUrl() {\n        return this.configured.getNextURL();\n    }\n\n    get show_wholesale_prices(): boolean {\n        return false;\n    }\n\n    get color_map(): ColorMap {\n        if (this.configured.material_color && this.configured.material?.color_maps?.length) {\n            return this.configured.material.color_maps.find(v => v.key.id == this.configured.material_color.id);\n        }\n\n        return null;\n    }\n\n    get product_color_set(): Collection<Color> {\n        if (this.color_map) {\n            return this.color_map.values;\n        }\n\n        return this.configured.material.design_colors;\n    }\n\n    get colors_available() {\n        if (this.color_map) {\n            return this.color_map.values;\n        }\n\n        return this.configured.material.design_colors;\n    }\n\n    get colors_available_for_material() {\n        return this.configured.material.material_colors;\n    }\n\n    /*\n        This will create a new product and start the setup process\n     */\n    createNewFromBase(): void {\n        this.configured = new this.configured_class();\n\n        this.setupConfiguredFromBase();\n    }\n\n    /*\n        Setup and validate options on the configured class.\n     */\n    override setupConfiguredFromBase(needs_additional_setup=false): void {\n        super.setupConfiguredFromBase(needs_additional_setup);\n\n        // Make sure we are using the same object and its fully built\n        this.configured[this.base_key] = this.base;\n\n        // First check if the material is no longer valid\n        let material = this.configured.material;\n        if (material && !this.base.materials.getItemFromID(this.configured.material.id)) {\n            if (this.configured.material.name) {\n                this.errors.add('material', `The material ${material.name} is no longer available for this product and has been reverted to the default.`);\n            }\n            material = null;\n        }\n\n        // Validate that a default material is set and that it's an option that is available\n        if (!material && this.base.default_material) {\n            material = this.base.materials.getItemFromURI(this.base.default_material);\n        }\n        if (!material) {\n            material = this.base.materials[0];\n        }\n\n        // Make sure the material object is the same one in the list so equals evaluation will work\n        this.configured.material = this.base.materials.getItemFromID(material.id);\n        this.configured.type = this.base.type;\n\n        // Validate size\n        if (!this.configured.width) {\n            if (this.base.default_width) {\n                this.configured.width = this.base.default_width;\n            }\n        }\n        if (!this.configured.height) {\n            if (this.base.default_height) {\n                this.configured.height = this.base.default_height;\n            }\n        }\n\n        // If no minimum or default quantity was defined, set it to 1\n        if (!this.base.minimum_quantity) {\n            this.base.minimum_quantity = 1;\n        }\n        if (!this.base.default_quantity) {\n            this.base.default_quantity = 1;\n        }\n\n        let query_quantity = Number(Services.get<RouteService>('RouteService').current.params.get('quantity'))\n        if (query_quantity) {\n            this.configured.quantity = query_quantity;\n        }\n\n        // Validate the quantity from the configured product\n        if (!this.configured.quantity) {\n            this.configured.quantity = this.base.default_quantity;\n        }\n        if (this.configured.quantity < this.base.minimum_quantity) {\n            this.errors.add('quantity', `The minimum quantity for this product is ${this.base.minimum_quantity}`);\n            this.configured.quantity = this.base.minimum_quantity;\n        }\n\n        this.setupProductOptions();\n\n        // Setup watch bindings\n        this.configured.bind('change:material', this.updatePricing.bind(this), this);\n        this.configured.bind('change:material', this.checkMaterialColor.bind(this), this);\n        this.configured.bind('change:material', this.checkBackorderedMaterial.bind(this), this);\n        this.configured.bind('change:material_color', this.validateMaxSize.bind(this), this);\n\n        this.checkMaterialColor();\n\n        this.updatePricing(true);\n        this.checkWarnings();\n        this.checkBackorderedMaterial();\n\n        this.configured.bind('change:width', () => {\n            setTimeout(() => {\n                this.updatePricing();\n            });\n        }, this);\n        this.configured.bind('change:height', () => {\n            setTimeout(() => {\n                this.updatePricing();\n            });\n        }, this);\n        this.configured.bind('change:quantity', this.checkWarnings.bind(this), this);\n\n        if (this.base.limited_quantity) {\n            this.configured.quantity = this.base.limited_quantity;\n        }\n\n        if (!needs_additional_setup) {\n            this.setup_complete_deferred.resolve();\n        }\n    }\n\n    checkBackorderedMaterial() {\n        if (!this.warnings) {\n            this.warnings = new MessageList();\n        }\n\n        if (this.configured.material.backordered) {\n            this.warnings.add('material', 'This material is out of stock and is on backorder. Please contact customer service for an estimated ship date.')\n        }\n        else {\n            this.warnings.remove('material')\n        }\n    }\n\n    checkMaterialColor() {\n        if (!this.configured.material_color || !this.configured.material.design_colors.getItemFromID(this.configured.material_color.id)) {\n            this.configured.material_color = this.configured.material.design_colors.find(v => v.default) || this.configured.material.design_colors[0];\n        }\n    }\n\n    async setupRetailPackaging() {\n        await this.setup_complete;\n\n        // Already setup, don't call again to prevent duplicating listeners\n        if (this.packages) {\n            await this.packages.$promise;\n            return;\n        }\n\n        this.resetPackages();\n        await this.packages.$promise;\n\n        this.bind('change:size', this.updatePackages.bind(this), this);\n        this.configured.bind('change:material', this.resetPackages.bind(this), this);\n    }\n\n    private resetPackages() {\n        this.packages = Services.get<typeof RetailPackage>('RetailPackage').objects.filter({material: this.configured.material.id});\n        this.available_packages = [];\n\n        this.packages.$promise.then(() => {\n            this.updatePackages();\n            this.trigger('sync');\n        })\n    }\n\n    hasPackageOptions() {\n        return this.packages && this.packages.items.length > 0;\n    }\n\n    updatePackages() {\n        let old_packages = this.available_packages;\n\n        this.available_packages = [];\n        for (const item of this.packages.items) {\n            let size = item.getValidSizeFor(this.width, this.height);\n\n            if (!size) {\n                continue;\n            }\n\n            let configured;\n            if (this.configured.retail_package && this.configured.retail_package.package.id == item.id) {\n                configured = this.configured.retail_package;\n                configured.size = size;\n            }\n            else {\n                for (const old_package of old_packages) {\n                    if (old_package.package.id == item.id) {\n                        configured = old_package\n                        if (old_package.size != size) {\n                            old_package.size = size;\n                        }\n                        break;\n                    }\n                }\n            }\n            if (!configured) {\n                configured = new ConfiguredRetailPackage({\n                    package: item,\n                    size: size\n                })\n            }\n\n            configured.fetchQuote();\n            this.available_packages.push(configured);\n        }\n    }\n\n    validateMaxSize() {\n        if (!this.errors) {\n            this.errors = new MessageList();\n        }\n        this.errors.remove('size');\n\n        let errors = false;\n        let skip_material_check = this.configured.material_color && this.configured.material_color.sizeIsRestricted();\n        if (!skip_material_check) {\n            if (!this.configured.material.sizeIsValid(this.configured.width, this.configured.height)) {\n                this.errors.merge(this.configured.material.errors.list);\n                errors = true;\n            }\n        }\n        else {\n            if (!this.configured.material_color.sizeIsValid(this.configured.width, this.configured.height)) {\n                this.errors.merge(this.configured.material_color.errors.list);\n                errors = true;\n            }\n        }\n        this.trigger('sync');\n        return !errors;\n    }\n\n    forceUpdatePricing() {\n        this.price_quote_key = null;\n        this.updatePricing();\n    }\n\n    updatePricing(keep_errors?): void {\n        if (!keep_errors) {\n            this.errors.reset();\n        }\n\n        if (!this.configured.material || !this.width || !this.height || !this.configured.material.quantityIsValid(this.configured.quantity)) {\n            return;\n        }\n\n        if (!this.validateMaxSize()) {\n            return;\n        }\n\n        const quoted_material = this.configured.material.id;\n        const quoted_width = this.configured.cleaned.width;\n        const quoted_height = this.configured.cleaned.height;\n\n        const PriceQuoteService = Services.get<PriceQuote>('PriceQuote');\n\n        // Prevent duplicates. This happens with the change:width, change:height bindings and forced aspect ratios.\n        let key = `${quoted_width}-${quoted_height}-${quoted_material}-${this.show_retail}`;\n        if (this.price_quote_key == key) {\n            // Reset priceTier\n            this.price_tier = null;\n            this.price;\n            this.trigger('change:price');\n            return;\n        }\n        this.price_quote_key = key;\n\n        this.price_quote_uuid = PriceQuoteService.uuid();\n        this.price_tier = null;\n        PriceQuoteService.getPriceQuote(\n            quoted_width,\n            quoted_height,\n            quoted_material,\n            this.price_quote_uuid,\n            this.show_retail\n        ).then((response) => {\n            // Only accept pricing data from the last submitted request\n            if (response.data.uuid != this.price_quote_uuid) {\n                return;\n            }\n\n            let prices = response.data.prices;\n            if (!prices) {\n                return;\n            }\n\n            let quantities = response.data.quantities;\n            quantities.unshift(1);\n\n            // shift sq inches breakpoint\n            const sqInch = prices.shift();\n            if (sqInch < this.configured.sqInches) {\n                return;\n            }\n\n            this.pricing = [];\n            for (let i = 0; i < prices.length; i++) {\n                this.pricing.push(new PricingTier(quantities[i], roundHalfUp(prices[i] * (this.designHasVariableData() ? this.configured.material.variable_data_charge + 1 : 1))));\n            }\n\n            // Reset priceTier\n            this.price_tier = null;\n            this.price;\n            this.trigger('change:price');\n        }, (response) => {\n            this.errors.reset();\n\n            if (response && response['data']) {\n                this.errors.merge(new MessageList(response['data']['errors']).list);\n            }\n\n            return response;\n        });\n    }\n\n    designHasVariableData() {\n        return this.configured.variable_data;\n    }\n\n    get price(): PricingTier {\n        if (this.price_tier)\n            return this.price_tier;\n\n        // Can't calculate the price without pricing list\n        if (!this.pricing) {\n            return new PricingTier(0, 0);\n        }\n\n        let tier = this.pricing[0];\n        let next_tier = null;\n        for (let i = 0; i < this.pricing.length; i++) {\n            let t = this.pricing[i];\n            if (t.quantity <= parseInt('' + this.configured.quantity)) {\n                tier = t;\n                if (i + 1 < this.pricing.length) {\n                    next_tier = this.pricing[i+1];\n                }\n                else {\n                    next_tier = null;\n                }\n            }\n        }\n\n        if (next_tier && tier.quantity != this.configured.quantity) {\n            // We need to do a linear interpolation on the total price instead of the unit.\n            // The total lerp creates a smooth fit curve for the unit price.\n            // Doing a lerp on the unit price will create an inverted parabola on the total price that can cause the total price to decrease\n            // This needs to match the backend calculations\n            let percent = (this.configured.quantity - tier.quantity) / (next_tier.quantity - tier.quantity);\n            // We use ceil on the new unit price so that the price drops exactly on the new tier\n            // Rounding issues can still cause the total price to decrease and the quantity increases but this is unavoidable with prices fixed to the unit price\n\n            // Update: I needed to create a special to fixed ceil function that will round the shifted value to try and reduce rounding issues\n            // I don't think it's perfect, but it seems to resolve most of the rounding issues and match the backend Decimal result\n            let value = toFixedCeilStable(lerp(tier.price, next_tier.price, percent) / this.configured.quantity);\n            this.price_tier = new PricingTier(this.configured.quantity, value);\n        }\n        else {\n            this.price_tier = new PricingTier(this.configured.quantity, tier.unitPrice);\n        }\n\n        return this.price_tier;\n    }\n\n    override async preSave() {\n        if (this.configured.retail_package && !this.configured.retail_package.id) {\n            await this.configured.retail_package.save();\n        }\n    }\n\n    override checkWarnings(): void {\n        super.checkWarnings();\n\n        if (this.base.remaining_stock != null) {\n            if (this.quantity > this.base.remaining_stock) {\n                if (this.base.allow_backorders) {\n                    this.warnings.add('quantity', `This product is on backorder and only ${this.base.remaining_stock} are left in stock.`);\n                }\n                else if (this.outOfStock()) {\n                    if (this.base.remaining_stock <= 0) {\n                        this.warnings.add('quantity', 'This product is out of stock.')\n                    }\n                    else {\n                        this.warnings.add('quantity', `This product only has ${this.base.remaining_stock} left in stock.`);\n                    }\n                }\n            }\n        }\n    }\n\n    public outOfStock(): boolean {\n        return this.base.remaining_stock != null && !this.base.allow_backorders && this.quantity > this.base.remaining_stock;\n    }\n\n    public disabled(): boolean {\n        return !this.setup_complete.isResolved() || this.outOfStock();\n    }\n\n    async save($event?, skip_validation?) {\n        const state = new ButtonProcessingState($event);\n        state.process();\n\n        // Remove any save before exit warnings\n        window.onbeforeunload = null;\n\n        if (!skip_validation) {\n            this.validate();\n            if (this.hasErrors) {\n                state.resolved();\n                return;\n            }\n        }\n\n        await this.preSave();\n\n        // When we're saving, we need to make sure there aren't any more\n        // changes to the design.\n        this.saving = true;\n\n        this.configured.save().then((response) => {\n            this.onSaveSuccess(response);\n\n            if (this.add_to_cart) {\n                this.configured.addToCart().then(() => {\n                    this.saving = !this.pageTransition(response);\n                    state.resolved();\n                }, (response: any) => {\n                    if (response.data && response.data.errors) {\n                        this.errors.merge(response.data.errors);\n                    }\n                    else if (response.data && response.data.error) {\n                        this.errors.add('__all__', response.data.error)\n                    }\n                    else {\n                        this.errors.add('__all__', 'Unable to add the product to the cart');\n                    }\n\n                    state.resolved();\n                    this.saving = false;\n                    return response;\n                });\n            }\n            else {\n                this.saving = !this.pageTransition(response);\n                state.resolved();\n            }\n        }, (error: any) => {\n            let response = error;\n            if (error.response) {\n                response = error.response;\n            }\n\n            this.saving = false;\n            state.resolved();\n\n            // We really need to standardize these...\n            if (response.data && response.data.errors) {\n                this.errors.merge(response.data.errors);\n            }\n            if (response.data && response.data.error) {\n                this.errors.add('__all__', response.data.error);\n            }\n            if (response.data && response.data.error_message) {\n                this.errors.add('__all__', response.data.error_message);\n            }\n\n            this.errors.merge(this.configured.errors.list);\n\n            this.onSaveFailure(response);\n        });\n    }\n\n    get allow_custom_sizes(): boolean {\n        return true\n    }\n    \n    get show_custom_sizes(): boolean {\n        return true;\n    }\n\n    /*\n        Optional size bindings to add additional functionality for size change checks.\n        It's used with the vinyl lettering tool for the font lock functionality.\n     */\n    protected onHeightChange() {}\n    protected onWidthChange() {}\n\n    get height(): number {\n        return this.configured.height;\n    }\n    set height(height) {\n        if (height === this.configured.height)\n            return;\n\n        this.price_tier = null;\n\n        // Don't clamp the configured height and width because we need max precision\n        this.configured.height = height;\n\n        // Lock the ratio if lock_ratio is set and the users are not locked to a set size\n        if (this.proportions_ratio || this.base.hasLockRatio) {\n            this.configured.width = this.configured.height * (this.proportions_ratio || this.base.lockRatio);\n        }\n        this.onHeightChange();\n\n        this.trigger('change:height');\n        this.trigger('change:size');\n    }\n\n    get width(): number {\n        return this.configured.width;\n    }\n    set width(width) {\n        if (width === this.configured.width) {\n            return;\n        }\n\n        this.price_tier = null;\n\n        // Don't clamp the configured height and width because we need max precision for converted values\n        this.configured.width = width;\n\n        // Lock the ratio if lock_ratio is set and the users are not locked to a set size\n        if (this.proportions_ratio || this.base.hasLockRatio) {\n            this.configured.height = this.configured.width / (this.proportions_ratio || this.base.lockRatio);\n        }\n        this.onWidthChange();\n\n        this.trigger('change:width');\n        this.trigger('change:size');\n    }\n\n    /*\n        Unit converted height and width access based on user preferences. This should be used instead of the normal\n        width and height. We must check for the empty string case differently without converting the value to allow\n        for clearing out the input without it being forced back to 0.\n     */\n    get unit_width() {\n        if (isEmptyString(this.width)) {\n            return this.width;\n        }\n\n        return clamp(this.ups.convertSizeFromInches(this.width));\n    }\n    set unit_width(v) {\n        if (isEmptyString(v)) {\n            this.width = v;\n        }\n        else {\n            this.width = this.ups.convertSizeToInches(v);\n        }\n    }\n\n    get unit_height() {\n        if (isEmptyString(this.height)) {\n            return this.height;\n        }\n\n        return clamp(this.ups.convertSizeFromInches(this.height));\n    }\n    set unit_height(v) {\n        if (isEmptyString(v)) {\n            this.height = v;\n        }\n        else {\n            this.height = this.ups.convertSizeToInches(v);\n        }\n    }\n\n    get quantity(): number {\n        return this.configured.quantity;\n    }\n\n    set quantity(v) {\n        this.configured.quantity = v;\n\n        this.updatePricing();\n        this.trigger('change:quantity');\n    }\n\n    toggleLockedProportions() {\n        if (!this.allow_custom_sizes) {\n            return;\n        }\n\n        if (this.proportions_ratio) {\n            this.proportions_ratio = null;\n        }\n        else {\n            this.proportions_ratio = this.width / this.height;\n        }\n    }\n\n    setLockedProportions(v) {\n        if (!this.allow_custom_sizes) {\n            return;\n        }\n        if (v) {\n            this.proportions_ratio = this.width / this.height;\n        }\n        else {\n            this.proportions_ratio = null;\n        }\n    }\n\n    updateCanvas() {}\n\n    isPromotionalTextDisabled(): boolean {\n        if (!this.setup_complete.isResolved()) {\n            return false;\n        }\n\n        return !!this.configured.material.disable_promotional_text;\n    }\n\n    adjustSizeToPackage() {\n        if (this.packages.items.length == 0) {\n            return;\n        }\n\n        let item = this.packages.items[0];\n\n        if (item.available_sizes.length == 0) {\n            return;\n        }\n\n        let size = item.available_sizes[0];\n\n        if (!this.proportions_ratio) {\n            this.proportions_ratio = this.width / this.height;\n        }\n\n        if (this.width > this.height) {\n            this.width = size.max_product_width - 0.25;\n        }\n        else {\n            this.height = size.max_product_width - 0.25;\n        }\n    }\n\n    adjustedPackageSize() {\n        // Used to show a preview of what the size will be adjusted to.\n        // Use adjustSizeToPackage to adjust the size of the product to the package.\n\n        if (!this.packages || this.packages.items.length == 0) {\n            return;\n        }\n\n        let item = this.packages.items[0];\n\n        if (item.available_sizes.length == 0) {\n            return;\n        }\n\n        let size = item.available_sizes[0];\n\n        let proportions_ratio = this.proportions_ratio || this.width / this.height;\n        if (this.width > this.height) {\n            return {\n                width: Number(size.max_product_width - 0.25).toFixed(2),\n                height: Number((size.max_product_width - 0.25) * (1 / proportions_ratio)).toFixed(2)\n            }\n        }\n        else {\n            return {\n                width: Number((size.max_product_width - 0.25) * proportions_ratio).toFixed(2),\n                height: Number(size.max_product_width - 0.25).toFixed(2),\n            }\n        }\n    }\n\n\n    materialSelectionMap() {\n        let map = {};\n\n        for (const material of this.base.materials) {\n            if (!material.adhesive) {\n                continue;\n            }\n\n            let name = material.material_name || material.name;\n            if (!map[name]) {\n                map[name] = {}\n            }\n            map[name][material.adhesive] = material;\n        }\n\n        return map;\n    }\n\n    materialTypes() {\n        return Object.keys(this.materialSelectionMap()).sort();\n    }\n\n    adhesiveTypes() {\n        let data = this.materialSelectionMap()[this.material_name] || [];\n        return Object.keys(data).sort((a, b) => {\n            return data[a].order - data[b].order;\n        });\n    }\n\n    get material_name() {\n        return this.configured.material.material_name || this.configured.material.name;\n    }\n    set material_name(v) {\n        let map = this.materialSelectionMap();\n        this.configured.material = map[v][Object.keys(map[v])[0]];\n    }\n\n    get adhesive_type() {\n        return this.configured.material.adhesive;\n    }\n    set adhesive_type(v) {\n        let map = this.materialSelectionMap();\n        this.configured.material = map[this.material_name][v];\n    }\n\n    setupProductOptions() {\n        if (!this.configured_option_model) {\n            return;\n        }\n\n        // Unify the template and custom product's option sets\n        const ConfiguredOptionModel = Services.get<typeof AbstractProductOption>(this.configured_option_model);\n\n        for (const option_set of (this.base as ProductAbstract).options) {\n            // I have no idea what is causing this but somehow customers are getting empty option sets added\n            if (!option_set || !option_set.id) {\n                continue;\n            }\n\n            let found = false;\n            for (const custom_option of this.configured.options) {\n                if (option_set.equals(custom_option.option_set)) {\n                    found = true;\n                    break;\n                }\n            }\n\n            if (!found) {\n                let default_option = null;\n\n                if (option_set.display_type != DisplayTypeEnum.CHECKBOX) {\n                    default_option = option_set.options[0];\n                    for (const option of option_set.options) {\n                        if (option.default) {\n                            default_option = option;\n                            break;\n                        }\n                    }\n                }\n\n                // Ugh... There isn't a good way to define a concrete class that implements an abstract class and is not the abstract class\n                // @ts-ignore \"Cannot create an instance of an abstract class.\"\n                const option = new ConfiguredOptionModel({\n                    option_set: option_set,\n                    option: default_option,\n                    configured: this.configured\n                });\n\n                this.configured.options.push(option);\n            }\n        }\n\n        // Make sure the option selected is form the option set.\n        // Otherwise, vue won't see them as the same item and option selections won't work until they interact with it.\n        for (let option of this.configured.options) {\n            if (option.option_set && option.option && option.option_set.options.length > 0) {\n                option.option = option.option_set.options.getItemFromID(option.option.id) as any || option;\n            }\n\n            option.option_set?.validateDisplayType();\n        }\n    }\n\n    proportionsLocked() {\n        return this.proportions_ratio != null;\n    }\n}\n","import MessageList from '../../../core/utils/MessageList';\nimport {Services} from '../../../core/services/Services';\nimport UserProfileService from '../../userprofile/services/UserProfileService';\nimport PricingTier from '../../../core/utils/PricingTier';\nimport {ProductAttributeAbstract} from '../../product/models/abstract/ProductAttributeAbstract';\nimport {Model} from '../../../core/models/Model';\nimport {IDeferred, IPromise, SimplePromise} from '../../../core/utils/SimplePromise';\nimport {Analytics} from '../../../core/services/Analytics';\nimport {EventDispatcher} from '../../../core/utils/EventDispatcher';\n\nexport default abstract class ProductServiceAbstract extends EventDispatcher {\n    public base: ProductAttributeAbstract;\n    public configured: Model;\n\n    public base_class: typeof ProductAttributeAbstract;\n    public configured_class: typeof Model;\n    public base_key: string; // The key to access the base object on the configured class, ex: template, clipart_product\n\n    public errors: MessageList;\n    public warnings: MessageList;\n\n    public setup_complete: IPromise<void>;\n    protected setup_complete_deferred: IDeferred<void>;\n\n    public ups: UserProfileService;\n\n    public saving: boolean;\n    public auto_page_transition: boolean;\n    public add_to_cart: boolean;\n\n    public page_change_params;\n\n    currency: string;\n\n    protected show_retail_value: boolean = false;\n\n    constructor(base_class, configured_class, base_key) {\n        super();\n\n        this.setup_complete_deferred = SimplePromise.defer<void>();\n        this.setup_complete = this.setup_complete_deferred.promise;\n\n        this.errors = new MessageList();\n        this.warnings = new MessageList();\n        this.ups = Services.get<UserProfileService>('UserProfileService');\n\n        this.base_class = base_class;\n        this.configured_class = configured_class;\n        this.base_key = base_key;\n        this.auto_page_transition = true;\n        this.add_to_cart = true;\n\n        this.setup_complete.then(() => {\n            if (this.price.price == 0) {\n                this.once('change:price', () => {\n                    Services.get<Analytics>('Analytics').trackProductPage(this.base.sku, this.price.price);\n                }, this);\n            }\n            else {\n                Services.get<Analytics>('Analytics').trackProductPage(this.base.sku, this.price.price);\n            }\n        });\n\n        window.addEventListener('pageshow', (event) => {\n            // The page was loaded from cache, reset any states that prevent the user from using the page\n            if (event.persisted) {\n                this.saving = false;\n                this.trigger('sync');\n            }\n        });\n    }\n\n    revalidateOnError() {\n        if (this.errors && this.errors.length > 0) {\n            this.validate();\n        }\n    }\n\n    setupFromData(base_data, configured_data, all_data): void {\n        let base = null;\n        let configured = null;\n\n        if (base_data) {\n            base = new this.base_class(base_data);\n        }\n        if (configured_data) {\n            configured = new this.configured_class(configured_data);\n        }\n\n        if (!base && configured) {\n            base = configured[this.base_key];\n        }\n        if (!configured) {\n            configured = new this.configured_class();\n        }\n\n        this.currency = all_data.currency;\n\n        this.setupExtraData(all_data);\n        this.setupFromProduct(base, configured);\n    }\n\n    setupExtraData(all_data): void {}\n\n    setupFromProduct(base, configured): void {\n        this.base = base;\n        this.configured = configured;\n        this.setupConfiguredFromBase();\n    }\n\n    setupConfiguredFromBase(needs_additional_setup=false): void {}\n\n    abstract save($event?): void;\n\n    // Available hooks for saving\n    onSaveSuccess(response): void {}\n    onSaveFailure(response): void {\n        this.page_change_params = null;\n    }\n    async preSave() {};\n\n    nextUrl() {\n        return '/cart/'\n    }\n\n    pageTransition(response): boolean {\n        if (this.auto_page_transition) {\n            const next_url = new URL(window.location.origin + this.nextUrl());\n            const current_url = new URL(window.location.href);\n\n            if (current_url.searchParams.get('q')) {\n                next_url.searchParams.append('q', current_url.searchParams.get('q'));\n            }\n\n            if (this.page_change_params) {\n                for (const key of Object.keys(this.page_change_params)) {\n                    next_url.searchParams.append(key, this.page_change_params[key]);\n                }\n            }\n\n            Services.get<Analytics>('Analytics').trackAddedProductToCart(this.base.sku, this.price.price, this.quantity);\n\n            this.onSaveSuccess(response);\n\n            window.location.assign(next_url.href);\n\n            return true;\n        }\n\n        return false;\n    }\n\n    preValidate() {\n        return;\n    }\n\n    validate(): boolean {\n        if (!this.errors) {\n            this.errors = new MessageList();\n        }\n        if (!this.warnings) {\n            this.warnings = new MessageList();\n        }\n\n        this.preValidate();\n\n        this.errors.reset();\n        this.warnings.reset();\n        this.configured.validate();\n\n        this.trigger('validate', this.errors);\n\n        this.errors.merge(this.configured.errors.list);\n\n        return !this.hasErrors;\n    }\n\n    checkWarnings() {\n        if (!this.warnings) {\n            this.warnings = new MessageList();\n        }\n\n        this.warnings.reset();\n    }\n\n    get hasErrors(): boolean {\n        return this.errors.length > 0;\n    }\n\n    abstract price: PricingTier;\n    abstract quantity: number;\n\n    get optionsPrice(): number {\n        return 0;\n    }\n\n    get optionsUnitValue(): number {\n        return 0;\n    }\n\n    get show_retail() {\n        return this.show_retail_value;\n    }\n    set show_retail(v) {\n        this.show_retail_value = v;\n        this.updatePricing();\n    }\n\n    abstract updatePricing();\n}\n","import {uuid4} from '../../../core/utils/uuid';\nimport {Http} from '../../../core/services/Http';\nimport {IPromise, SimplePromise} from '../../../core/utils/SimplePromise';\nimport PricingTier from '../../../core/utils/PricingTier';\n\nexport default class PriceQuote {\n    static $inject = [\n        '$http'\n    ];\n\n    public $http: Http;\n\n    constructor($http) {\n        this.$http = $http;\n    }\n\n    uuid() {\n        return uuid4();\n    }\n\n    // Raw quote request\n    getPriceQuote(width, height, material_id, uuid, show_retail=false) {\n        return this.$http.request({\n            url: '/custom/api/v1/price-quote/',\n            method: 'POST',\n            data: {\n                uuid: uuid,\n                width: width,\n                height: height,\n                material_id: material_id,\n                show_retail: show_retail\n            }\n        });\n    }\n\n    // Processed quote\n    quoteRetailPackage(package_id, size_id, show_retail=false): IPromise<{pricing: PricingTier[], currency: string}> {\n        const deferred = SimplePromise.defer<{pricing: PricingTier[], currency: string}>();\n\n        this.$http.request({\n            url: '/packaging/api/v1/price-quote/',\n            method: 'POST',\n            data: {\n                package_id: package_id,\n                size_id: size_id,\n                show_retail: show_retail\n            }\n        }).then((response) => {\n            let prices = response.data.prices;\n            if (!prices) {\n                deferred.reject(null);\n                return;\n            }\n\n            let quantities = response.data.quantities;\n            quantities.unshift(1);\n\n            // shift sq inches breakpoint\n            const sqInch = prices.shift();\n\n            let pricing = [];\n            for (let i = 0; i < prices.length; i++) {\n                pricing.push(new PricingTier(quantities[i], prices[i]));\n            }\n            deferred.resolve({\n                'pricing': pricing,\n                'currency': response.data.currency\n            });\n        }, (error) => {\n            deferred.reject(null);\n        })\n\n        return deferred.promise;\n    }\n}\n","import {IServices} from '../../../core/services/Services';\nimport PriceQuote from './PriceQuote';\n\nexport default function registerServices(services: IServices) {\n    services.singleton('PriceQuote', PriceQuote);\n}","import VueApp from '../../../core/adapters/VueApp';\nimport {data, method, prop} from '../../../core/adapters/VueComponent';\nimport ProductServiceAbstract from '../../products_shared/services/ProductServiceAbstract';\nimport {Services} from '../../../core/services/Services';\nimport UserProfileService from '../../userprofile/services/UserProfileService';\nimport {modal} from \"../../../core/utils/Modal\";\n\nexport default class ProductPageLoaderAbstract extends VueApp {\n    protected base_data_key: string;\n    protected configured_data_key: string;\n    protected product_data: any;\n\n    @prop()\n    defaultPrice: string;\n\n    @data()\n    product_service: ProductServiceAbstract;\n\n    @data()\n    image_display: number;\n\n    @data()\n    ups: UserProfileService;\n\n    constructor() {\n        super();\n\n        this.ups = Services.get<UserProfileService>('UserProfileService');\n\n        Services.waitOn('product-service-loaded').then(() => {\n            this.product_service = Services.get<ProductServiceAbstract>('ProductService');\n        })\n    }\n\n    static override init(product_service: ProductServiceAbstract, base_data_key = 'product', configured_data_key = 'configured_product') {\n        super.init();\n\n        let product_data = null;\n        let product_data_element = document.getElementById(\"product-data\");\n        if (product_data_element && product_data_element.textContent) {\n            product_data = JSON.parse(atob(product_data_element.textContent.replace(/(\\r\\n\\t|\\n|\\r\\t|\\s)/gm, '')));\n            product_data_element.remove()\n        }\n\n        if (!product_data) {\n            return;\n        }\n\n        product_service.setupFromData(product_data[base_data_key], product_data[configured_data_key], product_data);\n\n        Services.registerObject('ProductService', product_service);\n        Services.resolve('product-service-loaded');\n    }\n\n    @method()\n    scrollToTestimonials($event) {\n        if (document.getElementById('featured-testimonial-component')) {\n            document.getElementById('featured-testimonial-component').scrollIntoView({behavior: 'smooth', block: 'start'});\n        }\n        else {\n            window.location.href = '/testimonials/'\n        }\n    }\n\n    withinViewport() {\n        let el = document.querySelector('.product-options');\n        if (!el) {\n            return true;\n        }\n        return el.getBoundingClientRect().y >= 0;\n    }\n\n    @method()\n    checkScrollPosition() {\n        // Safari has issues with the scroll position changing.\n        // In chrome and firefox, it will keep the same relative scroll position, so when the page scroll height changes, you are still viewing the same thing.\n        // Safari keeps the same absolute scroll position so when the scroll height changes, the viewport jumps to some random thing on the screen...\n        setTimeout(() => {\n            if (!this.withinViewport()) {\n                document.querySelector('.product-options')?.scrollIntoView({behavior: 'smooth', block: 'start'});\n            }\n        })\n    }\n\n    @method()\n    register() {\n        modal.register();\n    }\n}\n\n","import VueComponent, {data, method, prop} from '../../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../../core/adapters/IVueComponent';\nimport {html} from './SelectDesign.html';\nimport APIResponse from '../../../../../core/models/APIResponse';\nimport {UserFile} from '../../../models/UserFile';\nimport {Services} from '../../../../../core/services/Services';\nimport CustomService from '../../../services/CustomService';\n\nclass SelectDesignController extends VueComponent {\n\n    @prop({\n        emit: true\n    })\n    step: number;\n\n    @prop({\n        emit: true\n    })\n    action: string;\n\n    @prop()\n    files: boolean;\n\n    @prop()\n    reorders: boolean;\n\n    @prop()\n    autosaves: boolean;\n\n    @prop()\n    productService: CustomService;\n\n    @data()\n    selected_action: string;\n\n    override mounted() {\n        super.mounted();\n        this.selected_action = 'upload';\n        this.productService.setup_complete.then(() => {\n            if (this.productService.base.disable_upload || this.productService.base.design_only) {\n                this.selected_action = 'new-design';\n            }\n            else {\n                this.selected_action = 'upload';\n            }\n        })\n    }\n\n    @method()\n    back() {\n        this.step = this.step - 1;\n    }\n\n    @method()\n    nextStep() {\n        if (this.selected_action == 'new-design') {\n            this.productService.configured.configure = true;\n            this.productService.save();\n        }\n        else {\n            this.action = this.selected_action;\n            this.step = this.step + 1;\n        }\n    }\n}\n\nexport default function SelectDesign(): IVueComponent {\n    return {\n        template: html,\n        controller: SelectDesignController,\n        tag: 'setup-select-design'\n    }\n}","export const html: string = `\n<div class=\"flex-left column spacing-xl no-wrap space-between full-width full-height\">\n    <div class=\"flex-left column spacing-sm stretch no-wrap full-width\">\n        <div class=\"flex-left\">\n            <button class=\"btn-icon\" type=\"button\" @click=\"back()\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M15 18L9 12L15 6\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n        <fieldset class=\"input-group\">\n            <legend class=\"h4\">Design</legend>\n            <div class=\"option-cards\">\n                <label class=\"flex-left no-wrap centered\" v-if=\"!productService.base.disable_upload && !productService.base.design_only\">\n                    <input type=\"radio\" value=\"upload\" name=\"design_option\" v-model=\"selected_action\">\n                    <span class=\"flex-left full-width column spacing-xxs inline\">\n                        Upload a print-ready design\n                        <span class=\"text-sm\">(eps, ai, pdf, psd, svg, png, jpg, heif or tif)</span>\n                    </span>\n                </label>\n                <label class=\"flex-left no-wrap centered\" v-if=\"!productService.base.disable_upload && files && !productService.base.design_only\">\n                    <input type=\"radio\" value=\"previous-file\" name=\"design_option\" v-model=\"selected_action\">\n                    <span class=\"flex-left full-width column spacing-xxs inline\">\n                        Use a previously uploaded file\n                        <span class=\"text-sm\">Select a file from your past uploads</span>\n                    </span>\n                </label>\n                <label class=\"flex-left no-wrap centered\" v-if=\"!productService.base.disable_design\">\n                    <input type=\"radio\" value=\"new-design\" name=\"design_option\" v-model=\"selected_action\">\n                    <span class=\"flex-left full-width column spacing-xxs inline\">\n                        Start a new design\n                        <span class=\"text-sm\">Create and customize your product online</span>\n                    </span>\n                </label>\n                <label class=\"flex-left no-wrap centered\" v-if=\"!productService.base.disable_design && autosaves\">\n                    <input type=\"radio\" value=\"existing-design\" name=\"design_option\" v-model=\"selected_action\">\n                    <span class=\"flex-left full-width column spacing-xxs inline\">\n                        Continue editing a saved design\n                        <span class=\"text-sm\">Resume a work-in-progress</span>\n                    </span>\n                </label>\n            </div>\n        </fieldset>\n    </div>\n    <div class=\"flex-left column no-wrap full-width\">\n        <message-list :errors=\"productService.errors\" :all=\"true\">\n            <button type=\"button\" class=\"btn-base btn-primary-action full-width btn-large\" @click=\"nextStep();\" :disabled=\"productService.saving || !selected_action\">{{ productService.saving ? 'Saving' : 'Continue'  }}</button>\n        </message-list>\n    </div>\n</div>\n`;","import VueComponent, {data, method, prop} from '../../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../../core/adapters/IVueComponent';\nimport {html} from './UploadFile.html';\nimport CustomService from '../../../services/CustomService';\nimport {UserFile} from '../../../models/UserFile';\nimport {ToolTypeEnum} from '../../../models/enums';\nimport {processRequestError} from '../../../../../core/utils/utils';\n\nclass UploadFileController extends VueComponent {\n\n    @prop({\n        emit: true\n    })\n    step: number;\n\n    @prop()\n    productService: CustomService;\n\n    @data()\n    upload_success_callback;\n\n    @data()\n    upload_failure_callback;\n\n    constructor(component) {\n        super(component);\n\n        this.upload_success_callback = this.uploadSuccess.bind(this);\n        this.upload_failure_callback = this.uploadFailure.bind(this);\n    }\n\n    @method()\n    back() {\n        this.step = this.step - 1;\n    }\n\n    async uploadSuccess(response: any) {\n        const user_file = UserFile.objects.get({id: response.data.user_file});\n        await user_file.$promise;\n\n        this.productService.configured.tool_type = ToolTypeEnum.UPLOAD;\n        this.productService.configured.user_file = user_file;\n        if (this.productService.base.auto_background_removal) {\n            this.productService.remove_background = true;\n        }\n        this.productService.save();\n    }\n\n    uploadFailure(error) {\n        if (!error || !error.response) {\n            return;\n        }\n\n        this.productService.errors = processRequestError(error);\n        if (error.response.data) {\n            if (error.response.data.errors) {\n                this.productService.errors = processRequestError(error);\n            }\n            if (error.response.data.error) {\n                this.productService.errors.add('file', error.response.data.error);\n            }\n        }\n    }\n}\n\nexport default function UploadFile(): IVueComponent {\n    return {\n        template: html,\n        controller: UploadFileController,\n        tag: 'setup-upload-file'\n    }\n}","export const html: string = `\n<div class=\"flex-left column spacing-xl no-wrap space-between full-width full-height\">\n    <div class=\"flex-left column spacing-lg stretch no-wrap full-width\">\n        <div class=\"flex-left\">\n            <button class=\"btn-icon\" type=\"button\" @click=\"back()\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M15 18L9 12L15 6\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n        <div class=\"card info padded-card-xs text-sm\" v-if=\"productService.base.type == 0\">\n            <div class=\"flex-left-center spacing-sm no-wrap\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z\" stroke=\"var(--info-weak, #2E90FA)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n                This is a one-color product. We'll make your design in the color you chose, not the colors in your file.\n            </div>\n        </div>\n        <file-upload url=\"/custom/api/v1/upload/\" :success=\"upload_success_callback\" :failure=\"upload_failure_callback\"></file-upload>\n        <message-list :errors=\"productService.errors\" :all=\"true\"></message-list>\n    </div>\n</div>\n`;","import VueComponent, {data, method, prop} from '../../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../../core/adapters/IVueComponent';\nimport {html} from './SelectFile.html';\nimport CustomService from '../../../services/CustomService';\nimport {UserFile} from '../../../models/UserFile';\nimport {ToolTypeEnum} from '../../../models/enums';\nimport APIResponse from '../../../../../core/models/APIResponse';\nimport {Services} from '../../../../../core/services/Services';\n\nclass SelectFileController extends VueComponent {\n\n    @prop({\n        emit: true\n    })\n    step: number;\n\n    @prop()\n    productService: CustomService;\n\n    @data()\n    user_files: APIResponse<UserFile>;\n\n    @data()\n    limit: number = 16;\n\n    @data()\n    page: number = 1;\n\n    @data()\n    search: string;\n\n    constructor(component) {\n        super(component);\n        this.filter(this.page);\n    }\n\n    @method()\n    back() {\n        this.step = this.step - 1;\n    }\n\n    @method()\n    selectUserFile(user_file) {\n        this.productService.configured.tool_type = ToolTypeEnum.UPLOAD;\n        this.productService.configured.user_file = user_file;\n        this.goToFinalize();\n    }\n\n    @method()\n    goToFinalize() {\n        this.productService.configured.tool_type = ToolTypeEnum.UPLOAD;\n\n        if (this.productService.base.auto_background_removal) {\n            this.productService.remove_background = true;\n        }\n\n        this.productService.save();\n    }\n\n    @method()\n    filter(page?) {\n        if (page) {\n            this.page = page;\n        }\n        this.user_files = Services.get<typeof UserFile>('UserFile').objects.filter({\n            limit: this.limit,\n            offset: this.limit * (this.page - 1),\n            name__icontains: this.search,\n            hidden: false\n        });\n    }\n\n    @method()\n    removeUserFile(file: UserFile) {\n        file.remove().then(() => {\n            this.user_files.items.removeItemFromID(file.id);\n            this.filter();\n        });\n    }\n}\n\nexport default function SelectFile(): IVueComponent {\n    return {\n        template: html,\n        controller: SelectFileController,\n        tag: 'setup-select-file'\n    }\n}","export const html:string = `\n<div class=\"flex-left column spacing-md no-wrap space-between full-width full-height\">\n    <div class=\"flex-left column spacing-sm stretch no-wrap full-width\">\n        <div class=\"flex-left\">\n            <button class=\"btn-icon\" type=\"button\" @click=\"back()\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M15 18L9 12L15 6\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n        <h4>My files</h4>\n        <message-list :errors=\"productService.errors\" :all=\"true\"></message-list>\n        <input class=\"search\" type=\"text\" v-model=\"search\" @keydown.enter.prevent=\"filter(1)\">\n        <div class=\"spacing-none scrollbar inset-section\" style=\"max-height: 485px; overflow-y: auto;\">\n            <template v-for=\"(item, $index) in user_files.items\">\n                <div class=\"flex-left no-wrap full-width stretch space-between spacing-sm inset-item inset-hover\">\n                    <button type=\"button\" class=\"btn-clear flex-left-center no-wrap spacing-sm full-width btn-square-sm\" @click=\"selectUserFile(item)\">\n                        <div class=\"card background no-overflow flex-full-center no-shrink\" style=\"width: 80px; height: 80px; padding: 4px\">\n                            <img :src=\"item.raster\" :alt=\"item.name\" class=\"full-width full-height\"/>\n                        </div>\n                        <span class=\"align-left full-width text-wrap text-sm\">{{ item.name }}</span>\n                    </button>\n                    <button type=\"button\" class=\"btn-icon no-shrink flex-full-center\" @click.prevent=\"removeUserFile(item)\">\n                        <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                            <path d=\"M17 7L7 17M7 7L17 17\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                        </svg>\n                    </button>\n                </div>\n                <hr class=\"padding-none\" v-if=\"$index != user_files.items.length - 1\">\n            </template>\n        </div>\n    </div>\n    <div class=\"flex-center full-width\">\n        <callback-paginator :total=\"user_files.totalCount\" :limit=\"limit\" v-model:page=\"page\" :small=\"true\" :callback=\"filter\"></callback-paginator>\n    </div>\n</div>\n`;","import VueComponent, {method, prop} from '../../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../../core/adapters/IVueComponent';\nimport {html} from './SelectTemplate.html';\nimport CustomService from '../../../services/CustomService';\n\nclass SelectTemplateController extends VueComponent {\n    @prop({\n        emit: true\n    })\n    step: number;\n\n    @prop()\n    productService: CustomService;\n\n    @method()\n    back() {\n        this.step = this.step - 1;\n    }\n\n    @method()\n    selectTemplate(template) {\n        this.productService.useDesign(template);\n    }\n}\n\nexport default function SelectTemplate(): IVueComponent {\n    return {\n        controller: SelectTemplateController,\n        tag: 'setup-select-template',\n        template: html,\n    }\n}","export const html:string = `\n<div class=\"flex-left column spacing-xl no-wrap space-between full-width full-height\">\n    <div class=\"flex-left column spacing-sm stretch no-wrap full-width\">\n        <div class=\"flex-left\">\n            <button class=\"btn-icon\" type=\"button\" @click=\"back()\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M15 18L9 12L15 6\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n        <h4>Select template</h4>\n        <div class=\"grid\">\n            <div class=\"xs-6 card padded-card-xs shadow-sm flex-center space-between column\" v-for=\"template in productService.similar_templates.items\">\n                <img :src=\"template.thumbnail_url\" :alt=\"template.name\">\n                <div class=\"flex-center column full-width align-center\">\n                    <span class=\"text-sm\">{{ template.name }}</span>\n                    <button type=\"button\" class=\"btn-base btn-secondary-action full-width\" @click=\"selectTemplate(template)\">Use design</button>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n`;","import VueComponent, {data, method, prop} from '../../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../../core/adapters/IVueComponent';\nimport CustomService from '../../../services/CustomService';\nimport {Services} from '../../../../../core/services/Services';\nimport CustomAutosave from '../../../models/CustomAutosave';\nimport APIResponse from '../../../../../core/models/APIResponse';\nimport {html} from './SelectAutosave.html';\nimport * as url from 'url';\n\n\nclass SelectAutosaveController extends VueComponent {\n\n    @prop({\n        emit: true\n    })\n    step: number;\n\n    @prop()\n    productService: CustomService;\n\n    @data()\n    autosaves: APIResponse<CustomAutosave>;\n\n    @data()\n    limit: number = 16;\n\n    @data()\n    page: number = 1;\n\n    constructor(component) {\n        super(component);\n        this.filter();\n    }\n\n    @method()\n    back() {\n        this.step = this.step - 1;\n    }\n\n    @method()\n    filter() {\n        this.autosaves = Services.get<typeof CustomAutosave>('CustomAutosave').objects.filter({\n            template: this.productService.base.id,\n            no_data: true,\n            limit: this.limit,\n            offset: this.limit * (this.page - 1),\n        });\n    }\n\n    @method()\n    selectAutosave(autosave: CustomAutosave) {\n        this.productService.page_change_params = {\n            load_save: autosave.id\n        }\n        let url = new URL(window.location.origin + this.productService.base.tool_url);\n        url.searchParams.set('load_save', `${autosave.id}`);\n        window.location.href = url.toString();\n    }\n\n    @method()\n    removeAutosave(autosave: CustomAutosave) {\n        this.autosaves.items.removeItemFromID(autosave.id);\n        autosave.delete();\n    }\n}\n\nexport default function SelectAutosave(): IVueComponent {\n    return {\n        template: html,\n        controller: SelectAutosaveController,\n        tag: 'setup-select-autosave'\n    }\n}","export const html: string = `\n<div class=\"flex-left column spacing-md no-wrap space-between full-width full-height\">\n    <div class=\"flex-left column spacing-sm stretch no-wrap full-width\">\n        <div class=\"flex-left\">\n            <button class=\"btn-icon\" type=\"button\" @click=\"back()\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M15 18L9 12L15 6\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n        \n        <h4>Saved designs</h4>   \n        <message-list :errors=\"productService.errors\" :all=\"true\"></message-list>\n        <div class=\"spacing-none scrollbar inset-section\" style=\"max-height: 485px; overflow-y: auto;\">\n            <template v-for=\"(item, $index) in autosaves.items\">\n                <div class=\"flex-left no-wrap full-width stretch space-between spacing-sm inset-item inset-hover\">\n                    <button type=\"button\" class=\"btn-clear flex-left-center no-wrap spacing-sm full-width btn-square-sm\" @click=\"selectAutosave(item)\">\n                        <div class=\"card background no-overflow flex-full-center no-shrink\" style=\"width: 80px; height: 80px; padding: 4px\">\n                            <img :src=\"item.preview\" :alt=\"item.name\" class=\"full-width full-height\"/>\n                        </div>\n                        <span class=\"align-left full-width text-wrap text-sm\">{{ item.name || $filters.date(item.created) }}</span>\n                    </button>\n                    <button type=\"button\" class=\"btn-icon no-shrink flex-full-center\" @click.prevent=\"removeAutosave(item)\">\n                        <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                            <path d=\"M17 7L7 17M7 7L17 17\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                        </svg>\n                    </button>\n                </div>\n                <hr class=\"padding-none\" v-if=\"$index != autosaves.items.length - 1\">\n            </template>\n        </div>\n    </div>\n    <div class=\"flex-center full-width\">\n        <callback-paginator :total=\"autosaves.totalCount\" :limit=\"limit\" v-model:page=\"page\" :small=\"true\" :callback=\"filter\"></callback-paginator>\n    </div> \n</div>\n`;","\n\n/*\n    Only components that are used on the setup page\n */\nimport VueApp from '../../../../core/adapters/VueApp';\nimport SelectDesign from './SelectDesign/SelectDesign';\nimport UploadFile from './UploadFile/UploadFile';\nimport Price from '../../../products_shared/components/Price/Price';\nimport QuantityBreaks from '../../../products_shared/components/QuantityBreaks/QuantityBreaks';\nimport SelectFile from './SelectFile/SelectFile';\nimport SelectTemplate from './SelectTemplate/SelectTemplate';\nimport SelectAutosave from './SelectAutosave/SelectAutosave';\nimport ProductProductionTime from '../../../delivery/components/ProductProductionTime/ProductProductionTime';\nimport TemplateSetupOptionsShapes from '../TemplateSetupOptionsShapes/TemplateSetupOptionsShapes';\n\nexport default function registerComponents(vue_app: VueApp) {\n    vue_app.registerComponent(SelectDesign);\n    vue_app.registerComponent(UploadFile);\n    vue_app.registerComponent(Price);\n    vue_app.registerComponent(QuantityBreaks);\n    vue_app.registerComponent(SelectFile);\n    vue_app.registerComponent(SelectTemplate);\n    vue_app.registerComponent(SelectAutosave);\n    vue_app.registerComponent(ProductProductionTime);\n    vue_app.registerComponent(TemplateSetupOptionsShapes);\n}","import {DisplayTypeEnum} from '../../models/enums';\nimport {TemplateOptionChargeOption} from '../../models/TemplateOption';\n\nexport const html:string = `\n\n<div class=\"input-group\" v-for=\"custom_option in filteredOptions(${DisplayTypeEnum.FIXED_VALUE})\">\n    <label>{{ custom_option.option_set.name }}</label>\n    <message-list :errors=\"errors\" field=\"hidden\">\n        <div class=\"flex-left-center spacing-sm\">\n            {{ custom_option.option.name }}\n            <span v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_PERCENTAGE} && !hidePrice(custom_option)\">\n                ({{ custom_option.option.percent > 0 ? '+' + $filters.shortNumber(custom_option.option.percent) + '%' : 'included' }})\n            </span>\n            <span v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_TOTAL} && !hidePrice(custom_option)\">\n                ({{ custom_option.option.amount > 0 ? '+' + $filters.currency(custom_option.option.amount, productService.configured.currency) : 'included' }})\n            </span>\n            <span v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_UNIT} && !hidePrice(custom_option)\">\n                ({{ custom_option.option.amount > 0 ? '+' + $filters.currency(custom_option.option.display_value(productService.show_retail), productService.configured.currency) + ' each' : 'included' }})\n            </span>\n        </div>\n    </message-list>\n</div>\n\n<div class=\"input-group\" v-if=\"productService.base.option_laminate && productService.configured.material?.can_laminate\">\n    <fieldset class=\"input-group single-option\">\n        <legend>Lamination</legend>\n        <div class=\"toggle-group\">\n            <label :for=\"'lamination-' + item.id\" v-for=\"item in lamination_options\">\n                <input :id=\"'lamination-' + item.id\" :value=\"item.id\" name=\"lamination\" type=\"radio\" v-model=\"productService.configured.option_laminate\">\n                {{ item.label }}\n            </label>\n        </div>\n    </fieldset>\n</div>\n\n<div class=\"input-group\" v-if=\"reverseCut && productService.base.option_reverse_cut\">\n    <fieldset class=\"input-group single-option\">\n        <legend>Invert Design</legend>\n        <div class=\"toggle-group\">\n            <label for=\"invert-no\">\n                <input id=\"invert-no\" :value=\"false\" name=\"invert\" type=\"radio\" v-model=\"productService.configured.option_reverse_cut\">\n                No\n            </label>\n            <label for=\"invert-yes\">\n                <input id=\"invert-yes\" :value=\"true\" name=\"invert\" type=\"radio\" v-model=\"productService.configured.option_reverse_cut\">\n                Yes\n            </label>\n        </div>\n    </fieldset>\n</div>\n\n<div class=\"input-group\" v-if=\"productService.base.option_border && !productService.base.offset_path_uses_material_color\">\n\n    <fieldset class=\"input-group single-option\">\n        <legend>Add Border</legend>\n        <div class=\"toggle-group\">\n            <label for=\"border-no\">\n                <input id=\"invert-no\" :value=\"false\" name=\"border\" type=\"radio\" v-model=\"productService.configured.option_border\">\n                No\n            </label>\n            <label for=\"border-yes\">\n                <input id=\"invert-yes\" :value=\"true\" name=\"border\" type=\"radio\" v-model=\"productService.configured.option_border\">\n                Yes\n            </label>\n        </div>\n    </fieldset>\n</div>\n\n\n<div class=\"input-group\" v-for=\"custom_option in filteredOptions(${DisplayTypeEnum.TOGGLE_BUTTON})\">\n    <label>{{ custom_option.option_set.name }}</label>\n    <message-list :errors=\"errors\" field=\"hidden\">\n        <div class=\"flex-left-center spacing-sm\">\n            <input type=\"checkbox\" class=\"input-toggle\" :checked=\"optionChecked(custom_option)\" v-model=\"custom_option.toggle_value\" @change=\"toggleSingleOption(custom_option, custom_option.toggle_value)\">\n            {{ custom_option.option_set.short_description }}\n            \n            <span v-if=\"togglePriceOption(custom_option) && togglePriceOption(custom_option).charge_option == ${TemplateOptionChargeOption.CHARGE_PERCENTAGE} && !hidePrice(custom_option)\">\n                ({{ togglePriceOption(custom_option).percent > 0 ? '+' + $filters.shortNumber(togglePriceOption(custom_option).percent) + '%' : '(included)' }})\n            </span>\n            <span v-if=\"togglePriceOption(custom_option) && togglePriceOption(custom_option).charge_option == ${TemplateOptionChargeOption.CHARGE_TOTAL} && !hidePrice(custom_option)\">\n                ({{ togglePriceOption(custom_option).amount > 0 ? '+' + $filters.currency(togglePriceOption(custom_option).amount, productService.configured.currency) : '(included)' }})\n            </span>\n            <span v-if=\"togglePriceOption(custom_option) && togglePriceOption(custom_option).charge_option == ${TemplateOptionChargeOption.CHARGE_UNIT} && !hidePrice(custom_option)\">\n                ({{ togglePriceOption(custom_option).amount > 0 ? '+' + $filters.currency(togglePriceOption(custom_option).display_value(productService.show_retail), productService.configured.currency) + ' each' : '(included)' }})\n            </span>\n        </div>\n    </message-list>\n</div>\n\n<div class=\"input-group\" v-for=\"custom_option in filteredOptions(${DisplayTypeEnum.RADIO})\">\n    <fieldset class=\"input-group single-option\">\n        <legend>{{ custom_option.option_set.name }}</legend>\n        <div class=\"text-xs\" v-if=\"custom_option.option_set.short_description\">{{ custom_option.option_set.short_description }}</div>\n        <message-list field=\"option\" :errors=\"custom_option.errors\">\n            <div class=\"toggle-group\">\n                <label :for=\"idForOptionSet(custom_option, item)\" v-for=\"item in filteredOptionItems(custom_option)\" class=\"flex-full-center column no-wrap spacing-none\">\n                    <div v-html=\"item.icon\" v-if=\"item.icon\"></div>\n                    <input :id=\"idForOptionSet(custom_option, item)\" :value=\"item.id\" :name=\"custom_option.option_set.name\" type=\"radio\" v-model=\"custom_option.option_id\" :disabled=\"!custom_option.option_set.optionEligible(productService.configured.width, productService.configured.height) || custom_option.isDisabled(productService.configured.material)\">\n                    {{ item.name }}\n                    \n                    <span class=\"text-sm\" v-if=\"item.charge_option == ${TemplateOptionChargeOption.CHARGE_PERCENTAGE} && !hidePrice(custom_option)\">\n                        {{ item.percent > 0 ? '+' + $filters.shortNumber(item.percent) + '%' : '(included)' }}\n                    </span>\n                    <span class=\"text-sm\" v-if=\"item.charge_option == ${TemplateOptionChargeOption.CHARGE_TOTAL} && !hidePrice(custom_option)\">\n                        {{ item.amount > 0 ? '+' + $filters.currency(item.amount, productService.configured.currency) : '(included)' }}\n                    </span>\n                    <span class=\"text-sm\" v-if=\"item.charge_option == ${TemplateOptionChargeOption.CHARGE_UNIT} && !hidePrice(custom_option)\">\n                        {{ item.amount > 0 ? '+' + $filters.currency(item.display_value(productService.show_retail), productService.configured.currency) + ' each' : '(included)' }}\n                    </span>\n                </label>\n            </div>\n        </message-list>\n        <div class=\"flex-left no-wrap full-width\" :class=\"custom_option.option && custom_option.option.help_text ? 'space-between' : ''\">\n            <div class=\"text-sm\" v-if=\"custom_option.option && custom_option.option.help_text\">{{ custom_option.option.help_text }}</div>\n        </div>\n    </fieldset>\n</div>\n\n<div class=\"input-group\" v-for=\"custom_option in filteredOptions(${DisplayTypeEnum.DROPDOWN})\">\n    <label>{{ custom_option.option_set.name }}</label>\n    <message-list field=\"option\" :errors=\"custom_option.errors\">\n        <generic-dropdown \n            v-if=\"!readOnly\" \n            :items=\"filteredOptionItems(custom_option)\" \n            v-model:selected=\"custom_option.option\" \n            :name-function=\"getOptionItemNameCallback(productService, custom_option.option_set)\" \n            :disabled=\"!custom_option.option_set.optionEligible(productService.configured.width, productService.configured.height) || custom_option.isDisabled(productService.configured.material)\">\n        </generic-dropdown>\n        <span v-if=\"readOnly\">{{ getOptionItemName(productService, custom_option.option_set, custom_option.option) }}</span>\n    </message-list>\n</div>\n\n<fieldset class=\"input-group\" v-for=\"custom_option in filteredOptions(${DisplayTypeEnum.INCREMENTAL_OPTION})\">\n    <legend>{{ custom_option.option_set.name }}</legend>\n    <message-list field=\"option\" :errors=\"custom_option.errors\">\n        <div class=\"flex-left-center no-wrap full-width\">\n            <div class=\"toggle-group grow\">\n                <button type=\"button\" @click=\"lastOption(custom_option)\" :disabled=\"firstOptionSelected(custom_option)\">\n                    <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                        <path d=\"M4.16667 10H15.8333\" stroke=\"#98A2B3\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                    </svg>\n                </button>\n                <span class=\"option-value\">{{ custom_option.option.name }}</span>\n                <button type=\"button\" @click=\"nextOption(custom_option)\" :disabled=\"lastOptionSelected(custom_option)\">\n                    <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                        <path d=\"M10 4.16675V15.8334M4.16667 10.0001H15.8333\" stroke=\"#98A2B3\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                    </svg>\n                </button>\n            </div>\n            <span class=\"no-shrink\" v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_PERCENTAGE} && !hidePrice(custom_option)\">\n                {{ custom_option.option.percent > 0 ? '+' + $filters.shortNumber(custom_option.option.percent) + '%' : '(included)' }}\n            </span>\n            <span class=\"no-shrink\" v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_TOTAL} && !hidePrice(custom_option)\">\n                {{ custom_option.option.amount > 0 ? '+' + $filters.currency(custom_option.option.amount, productService.configured.currency) : '(included)' }}\n            </span>\n            <span class=\"no-shrink\" v-if=\"custom_option.option && custom_option.option.charge_option == ${TemplateOptionChargeOption.CHARGE_UNIT} && !hidePrice(custom_option)\">\n                {{ custom_option.option.amount > 0 ? '+' + $filters.currency(custom_option.option.display_value(productService.show_retail), productService.configured.currency) + ' each' : '(included)' }}\n            </span>\n        </div>\n    </message-list>\n</fieldset>\n`;","import {html} from './Options.html';\nimport VueComponent, {computed, data, method, prop} from '../../../../core/adapters/VueComponent';\nimport {TemplateOptionSet} from '../../models/TemplateOptionSet';\nimport {CustomOption} from '../../models/CustomOption';\nimport {TemplateOption, TemplateOptionChargeOption} from '../../models/TemplateOption';\nimport VueApp from '../../../../core/adapters/VueApp';\nimport ConfiguredProductServiceAbstract from '../../../products_shared/services/ConfiguredProductServiceAbstract';\nimport {CustomLamination, DisplayTypeEnum} from '../../models/enums';\n\nexport class TemplateFinalizeOptionsController extends VueComponent {\n    @data()\n    infoTitle;\n\n    @data()\n    showInfoBool;\n\n    @data()\n    optionItemNameCallback;\n\n    @data()\n    show_border_description: boolean;\n\n    @data()\n    show_lamination_description: boolean;\n\n    @prop()\n    productService: ConfiguredProductServiceAbstract;\n\n    @prop()\n    priceQuote;\n\n    @prop()\n    readOnly;\n\n    @prop()\n    hideRetailPackaging: boolean;\n\n    @prop()\n    reverseCut: boolean;\n\n    @data()\n    lamination_options = [];\n\n    override beforeMount() {\n        super.beforeMount()\n\n        this.lamination_options = this.productService.configured.laminationOptions;\n        if (this.productService.configured.option_laminate == CustomLamination.NONE) {\n            this.lamination_options.push({\n                label: 'None',\n                id: CustomLamination.NONE\n            })\n        }\n    }\n\n    @method()\n    getOptionName(templateOptionSet, index, customService){\n        if (customService.custom.options && customService.custom.options[index] && customService.custom.options[index].option) {\n            if (customService.custom.options[index].option.name == undefined) {\n                customService.custom.options[index].option = templateOptionSet.options[0];\n            }\n\n            return templateOptionSet.name;\n        }\n\n        return null;\n    }\n\n    @method()\n    getOptionItemNameCallback(customService, option_set: TemplateOptionSet) {\n        // Curry the custom service object because we won't have access to it in the dropdown\n        return (item) => {\n            return this.getOptionItemName(customService, option_set, item);\n        }\n    }\n\n    @method()\n    getOptionItemName(customService, option_set: TemplateOptionSet, item: TemplateOption) {\n        if (item) {\n            if (item.charge_option == TemplateOptionChargeOption.CHARGE_PERCENTAGE && item.percent == 0) {\n                return item.name;\n            }\n            if (item.charge_option != TemplateOptionChargeOption.CHARGE_PERCENTAGE && item.amount == 0) {\n                return item.name;\n            }\n\n            if (item.charge_option === TemplateOptionChargeOption.CHARGE_UNIT) {\n                let formatted = VueApp.GLOBAL_FILTERS.currency(item.display_value(customService.show_retail, option_set.quantityBreakIndex(customService.quantity)), this.productService.configured.currency);\n                return item.name + \"   (+\" + formatted + \" each)\";\n            }\n            else if (item.charge_option === TemplateOptionChargeOption.CHARGE_TOTAL) {\n                let formatted = VueApp.GLOBAL_FILTERS.currency(item.display_value(customService.show_retail, option_set.quantityBreakIndex(customService.quantity)), this.productService.configured.currency);\n                return item.name + \"   (+\" + formatted + \")\";\n            }\n            else if (item.charge_option === TemplateOptionChargeOption.CHARGE_PERCENTAGE){\n                return item.name + \"   (+\" +  Number(item.display_value(true, option_set.quantityBreakIndex(customService.quantity))).toString() + \"%)\";\n            }\n        }\n\n        return item.name\n    }\n\n    @computed()\n    hasOptions() {\n        let laminate = this.productService.base['option_laminate'] && this.productService.configured.material.can_laminate;\n        let border = this.productService.base['option_border'];\n        let options = this.productService.configured.options.length > 0;\n\n        return laminate || border || options;\n    }\n\n    @method()\n    idForOptionSet(custom_option, item) {\n        return `${custom_option.option_set.name}-${item.id}`.toLowerCase().split(' ').join('-')\n    }\n\n    @method()\n    toggleOption(custom_option: CustomOption, item: TemplateOption) {\n        if (custom_option.option == item) {\n            custom_option.option = null;\n        }\n        else {\n            custom_option.option = item;\n        }\n\n        custom_option.errors.reset();\n    }\n\n    @method()\n    filteredOptions(type: DisplayTypeEnum) {\n        return this.productService.configured.options.filter(v =>\n            v.option_set.display_type == type &&\n            !v.isDisabled(this.productService.configured.material) &&\n            v.option_set.optionEligible(this.productService.configured.width, this.productService.configured.height) &&\n            v.option_set.options.length > 0 &&\n            v.option_set.sizeIsValid(this.productService.width, this.productService.height, true)\n        );\n    }\n\n    @method()\n    filteredOptionItems(option_set: CustomOption) {\n        return option_set.option_set.options.filter(v => v.sizeIsValid(this.productService.width, this.productService.height, true));\n    }\n\n    @method()\n    optionChecked(custom_option: CustomOption) {\n        return custom_option.option.option_value == 'true'\n    }\n\n    @method()\n    toggleSingleOption(custom_option: CustomOption, value: boolean) {\n        custom_option.option = custom_option.option_set.options.find(v => v.option_value == (value ? 'true' : 'false'));\n    }\n\n    @method()\n    hidePrice(custom_option: CustomOption) {\n        return custom_option.option_set.options.find(v => {\n            if (v.charge_option == TemplateOptionChargeOption.CHARGE_PERCENTAGE) {\n                return v.percent > 0;\n            }\n            else {\n                return v.amount > 0\n            }\n        }) == null;\n    }\n\n    @method()\n    togglePriceOption(custom_option: CustomOption) {\n         return custom_option.option_set.options.find(v => v.option_value == 'true');\n    }\n\n    @method()\n    lastOption(custom_option: CustomOption) {\n        if (this.firstOptionSelected(custom_option)) {\n            return;\n        }\n\n        custom_option.option = custom_option.option_set.options[custom_option.option_set.options.indexOf(custom_option.option) - 1];\n    }\n\n    @method()\n    nextOption(custom_option: CustomOption) {\n        if (this.lastOptionSelected(custom_option)) {\n            return;\n        }\n\n        custom_option.option = custom_option.option_set.options[custom_option.option_set.options.indexOf(custom_option.option) + 1];\n    }\n\n    @method()\n    firstOptionSelected(custom_option: CustomOption) {\n        return custom_option.option_set.options.indexOf(custom_option.option) == 0;\n    }\n\n    @method()\n    lastOptionSelected(custom_option: CustomOption) {\n        return custom_option.option_set.options.indexOf(custom_option.option) == custom_option.option_set.options.length - 1;\n    }\n}\n\nexport default function TemplateFinalizeOptions() {\n    return {\n        controller: TemplateFinalizeOptionsController,\n        template: html,\n        tag: 'template-finalize-options'\n    }\n}\n","import {ClipTypeEnum} from '../../models/enums';\n\nexport const html:string = `\n<fieldset class=\"input-group single-option\" v-if=\"templateShapes().length > 1\">\n    <legend>Select Shape</legend>\n    <div class=\"toggle-items grid spacing-sm\">\n        <label :for=\"'shape-' + shape.id\" v-for=\"shape in $filters.orderBy(templateShapes(), 'order')\" class=\"flex-full-center column spacing-xs xs-3\">\n            <input :id=\"'shape-' + shape.id\" :value=\"shape\" :checked=\"isShapeSelected(shape)\" @change=\"setNewShape(shape)\" name=\"shape-selection\" type=\"radio\"/>\n            <span class=\"contents\" v-if=\"shape.icon\" v-html=\"shape.icon\"></span>\n            {{ shape.name }}\n        </label>\n    </div>\n</fieldset>\n<div class=\"input-group\" v-for=\"shape in customShapes().filter(v => v.template_shape.clip_type == ${ClipTypeEnum.ROUNDED_CORNER})\" :key=\"shape.template_shape.id\">\n    <label>Roundness</label>\n    <fieldset class=\"input-group single-option\">\n        <div class=\"toggle-group\">\n            <button @click.prevent=\"scaleRoundness(shape, -1)\" class=\"icon-option\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M5 12H19\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n            <button @click.prevent=\"scaleRoundness(shape, 1)\" class=\"icon-option\">\n                <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                    <path d=\"M9.99999 4.16663V15.8333M4.16666 9.99996H15.8333\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"1.66667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                </svg>\n            </button>\n        </div>\n    </fieldset>\n</div>\n<template v-if=\"templateShapes().length > 1 && showSize\">\n    <div class=\"flex-left spacing-xs full-width\">\n        <div class=\"text-sm full-width\">Width & Height</div>\n        <message-list :errors=\"productService.errors\" field=\"size,max_size,width,height,max_sqin\">\n            <div class=\"flex-left no-wrap wrap-xs spacing-md size-group space-between full-width\">\n                <div class=\"flex-left spacing-sm no-wrap wrap-xxs\">\n                    <div class=\"input-group inline-label\">\n                        <label aria-label=\"Width\" for=\"width\">W</label>\n                        <input :disabled=\"!productService.allow_custom_sizes\"\n                               type=\"number\"\n                               class=\"form-control\"\n                               id=\"width\"\n                               aria-label=\"Width\"\n                               min=\"0\"\n                               step=\"0.01\"\n                               placeholder=\"Width\"\n                               v-model=\"productService.unit_width\"\n                               @change=\"productService.revalidateOnError()\">\n                    </div>\n                    <div class=\"input-group inline-label\">\n                        <label aria-label=\"Height\" for=\"height\">H</label>\n                        <input :disabled=\"!productService.allow_custom_sizes\"\n                               type=\"number\"\n                               class=\"form-control\"\n                               id=\"height\"\n                               aria-label=\"Height\"\n                               min=\"0\"\n                               step=\"0.01\"\n                               placeholder=\"Height\"\n                               v-model=\"productService.unit_height\"\n                               @change=\"productService.revalidateOnError()\">\n                    </div>\n                    \n                    <button v-tooltip :tooltip-content=\"productService.proportions_ratio == null ? 'Lock Size Ratio' : 'Unlock Size Ratio'\"\n                            type=\"button\"\n                            aria-label=\"Lock Size Ratio\"\n                            class=\"btn-base btn-secondary-action\"\n                            @click=\"productService.toggleLockedProportions()\"\n                            :class=\"{'disabled': !productService.allow_custom_sizes }\">\n\n                            <span v-if=\"!productService.proportionsLocked()\">\n                                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                                    <path d=\"M7 11V7C7 4.2 9.2 2 12 2C14.8 2 15.8 3.2 16.6 5M12 15.5V17.5M8.8 22H15.2C16.9 22 17.7 22 18.4 21.7C19 21.4 19.4 21 19.7 20.4C20 19.8 20 18.9 20 17.2V15.8C20 14.1 20 13.3 19.7 12.6C19.4 12 19 11.6 18.4 11.3C17.8 11 16.9 11 15.2 11H8.8C7.1 11 6.3 11 5.6 11.3C5 11.6 4.6 12 4.3 12.6C4 13.2 4 14.1 4 15.8V17.2C4 18.9 4 19.7 4.3 20.4C4.6 21 5 21.4 5.6 21.7C6.2 22 7.1 22 8.8 22Z\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                                </svg>\n                            </span>\n                            <span v-if=\"productService.proportionsLocked()\" v-cloak>\n                                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n                                    <path d=\"M17 11V9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9V11M12 15.5V17.5M8.8 22H15.2C16.8802 22 17.7202 22 18.362 21.673C18.9265 21.3854 19.3854 20.9265 19.673 20.362C20 19.7202 20 18.8802 20 17.2V15.8C20 14.1198 20 13.2798 19.673 12.638C19.3854 12.0735 18.9265 11.6146 18.362 11.327C17.7202 11 16.8802 11 15.2 11H8.8C7.11984 11 6.27976 11 5.63803 11.327C5.07354 11.6146 4.6146 12.0735 4.32698 12.638C4 13.2798 4 14.1198 4 15.8V17.2C4 18.8802 4 19.7202 4.32698 20.362C4.6146 20.9265 5.07354 21.3854 5.63803 21.673C6.27976 22 7.11984 22 8.8 22Z\" stroke=\"var(--icon-strong, #98A2B3)\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n                                </svg>\n                            </span>\n                    </button>\n                </div>\n            </div>\n        </message-list>\n    </div>\n</template>\n`;\n","import {html} from './TemplateSetupOptionsShapes.html';\nimport VueComponent, {computed, data, method, prop} from '../../../../core/adapters/VueComponent';\nimport IVueComponent from '../../../../core/adapters/IVueComponent';\nimport {TemplateShape} from '../../models/TemplateShape';\nimport {Services} from '../../../../core/services/Services';\nimport {CustomShape} from '../../models/CustomShape';\nimport CustomEditorService from '../../services/CustomEditorService';\nimport PaperCanvasService from '../../services/PaperCanvasService';\nimport {ClipTypeEnum} from '../../models/enums';\nimport UserProfileService from \"../../../userprofile/services/UserProfileService\";\n\nexport class ShapesController extends VueComponent {\n\n    @prop()\n    productService: CustomEditorService;\n\n    @prop()\n    side: number;\n\n    @data()\n    ups: UserProfileService;\n\n    @prop()\n    showSize: boolean;\n\n    constructor(component) {\n        super(component);\n\n        this.ups = Services.get<UserProfileService>('UserProfileService');\n    }\n\n    @method()\n    setNewShape(shape: TemplateShape) {\n        if (this.productService.configured.custom_shapes.find(v => v.template_shape.id == shape.id)) {\n            return;\n        }\n\n        let to_remove = this.productService.configured.custom_shapes.find(v => v.template_shape.side?.id == shape.side?.id);\n        let index = this.productService.configured.custom_shapes.indexOf(to_remove);\n        this.productService.configured.custom_shapes.splice(index, 1);\n        to_remove.trigger('remove');\n\n\n        let custom_shape = new (Services.get<typeof CustomShape>('CustomShape'))();\n        custom_shape.template_shape = shape;\n        custom_shape.bindToConfigured(this.productService.configured);\n        custom_shape.loadDefaultsFromTemplate(to_remove.carryOverData());\n\n        this.productService.configured.custom_shapes.push(custom_shape);\n        this.productService.setupShapeElement(custom_shape);\n        this.productService.fitShape(custom_shape);\n        this.productService.checkSharedShapeSides(custom_shape);\n        this.productService.checkSharedShapeAttributes(custom_shape);\n\n        if (shape.clip_type == ClipTypeEnum.ROUNDED_CORNER) {\n            custom_shape.clip_radius = 7;\n        }\n\n        if (Services.isRegistered('PaperCanvasService')) {\n            Services.get<PaperCanvasService>('PaperCanvasService').trigger('sync');\n        }\n    }\n\n    defaultSideId() {\n        let lowest = null;\n        for (const item of this.productService.base.template_shapes) {\n            if (!item.side) {\n                continue;\n            }\n\n            if (!lowest) {\n                lowest = item.side;\n                continue;\n            }\n\n            if (lowest.side.order > item.side.order) {\n                lowest = item;\n            }\n        }\n        return lowest?.side?.id;\n    }\n\n    @method()\n    templateShapes() {\n        let selected_side = this.side;\n        if (this.side == 0) {\n            selected_side = undefined;\n        }\n        if (!selected_side) {\n            selected_side = this.defaultSideId();\n        }\n\n        return this.productService.base.template_shapes.filter(v => v.side?.id == selected_side);\n    }\n\n    @method()\n    customShapes() {\n        let selected_side = this.side;\n        if (this.side == 0) {\n            selected_side = undefined;\n        }\n        if (!selected_side) {\n            selected_side = this.defaultSideId();\n        }\n\n        if (!this.productService.configured.custom_shapes) {\n            return [];\n        }\n\n        return this.productService.configured.custom_shapes.filter(v => v.template_shape.side?.id == selected_side);\n    }\n\n    @method()\n    isShapeSelected(shape: TemplateShape) {\n        if (!this.productService.configured.custom_shapes) {\n            return false;\n        }\n\n        return this.productService.configured.custom_shapes.find(v => v.template_shape?.id == shape.id)\n    }\n\n    @method()\n    scaleRoundness(shape, amount) {\n        shape.clip_radius = Math.max(Math.min((shape.clip_radius || 7) + amount, 40), 1);\n    }\n}\n\nexport default function TemplateSetupOptionsShapes(): IVueComponent {\n    return {\n        controller: ShapesController,\n        template: html,\n        tag: 'template-setup-options-shapes'\n    }\n};\n","import {Template} from '../models/Template';\nimport {Custom} from '../models/Custom';\nimport PricingTier from '../../../core/utils/PricingTier';\nimport {Services} from '../../../core/services/Services';\nimport {Collection} from '../../../core/models/Collection';\nimport {TemplateSize} from '../models/TemplateSize';\nimport {fitToArea, getClosestQuarter} from '../../../core/utils/utils';\nimport {CustomLamination, ProductTypeEnum, ToolTypeEnum} from '../models/enums';\nimport ConfiguredProductServiceAbstract from '../../products_shared/services/ConfiguredProductServiceAbstract';\nimport {Color} from '../models/Color';\nimport ButtonProcessingState from '../../../core/utils/ButtonProcessingState';\nimport {CustomShape} from '../models/CustomShape';\nimport {TemplateShape} from '../models/TemplateShape';\nimport {TemplateSide} from '../models/TemplateSide';\nimport {BackgroundShapeElement} from '../tool/BackgroundShapeElement';\n\nexport default class CustomService extends ConfiguredProductServiceAbstract {\n    public declare base: Template;\n    public declare configured: Custom;\n\n    public declare base_class: typeof Template;\n    public declare configured_class: typeof Custom;\n\n    public size_adjusted: boolean;\n    public text_too_small: boolean;\n    public show_sizes: boolean;\n    public remove_background: boolean; // remove background on save\n    public recommended_sizes: Collection<TemplateSize>;\n\n    configured_option_model = 'CustomOption';\n\n    constructor() {\n        super(Services.get('Template'), Services.get('Custom'), 'template');\n        this.size_adjusted = false;\n        this.show_sizes = false;\n        this.add_to_cart = false;\n        this.recommended_sizes = new Collection();\n    }\n\n    override setupExtraData(all_data) {\n        super.setupExtraData(all_data);\n    }\n\n    override get optionsUnitValue() {\n        return this.configured.calcOptionsPrice(this.price.price, this.show_retail) / this.configured.quantity;\n    }\n\n    override get show_wholesale_prices(): boolean {\n        return this.base.showWholesalePrices;\n    }\n\n    override checkMaterialColor() {\n        let color_set = this.product_color_set;\n\n        if (!this.configured.material_color && this.base.cut_out_color && color_set.getItemFromID(this.base.cut_out_color.id)) {\n            this.configured.material_color = this.base.cut_out_color;\n        }\n\n        if (!this.configured.material_color || !color_set.getItemFromID(this.configured.material_color.id)) {\n            this.configured.material_color = color_set.find(v => v.default) || color_set[0];\n        }\n    }\n\n    override get product_color_set(): Collection<Color> {\n        let color_set: Collection<Color> = this.base.show_material_color ? this.configured.material.material_colors : this.configured.material.design_colors;\n\n        if (this.configured.size && this.configured.size.disabled_colors) {\n            color_set = color_set.reduce((items, current) => {\n                if (!this.configured.size.disabled_colors.getItemFromID(current.id)) {\n                    items.push(current);\n                }\n\n                return items\n            }, new Collection<Color>());\n        }\n\n        return color_set;\n    }\n\n    override get price(): PricingTier {\n        if (this.configured.size && this.configured.size.price && this.configured.size.price.value > 0 && !this.configured.size.material_price) {\n            return new PricingTier(this.configured.quantity, this.configured.size.price.value);\n        }\n\n        if (this.price_tier)\n            return this.price_tier;\n\n        // Can't calculate the price without pricing list\n        if (!this.pricing) {\n            if (this.configured.size && this.configured.size.price && this.configured.size.price.value) {\n                return new PricingTier(this.configured.quantity, this.configured.size.price.value);\n            }\n            else {\n                return new PricingTier(0, 0);\n            }\n        }\n\n        return super.price;\n    }\n\n    override setupConfiguredFromBase(needs_additional_setup=false) {\n        super.setupConfiguredFromBase(true);\n\n        // Pick the recommended sizes to use\n        /*\n        if (this.configured.template_shape?.sizes?.length > 0) {\n            this.recommended_sizes = this.configured.template_shape.sizes;\n        }\n        */\n        if (this.base.sizes?.length > 0) {\n            this.recommended_sizes = this.base.sizes;\n        }\n        \n        let ratio = this.base.lockRatio;\n        if (ratio) {\n            this.proportions_ratio = ratio;\n        }\n\n        if (this.base.option_border && this.configured.option_border == null) {\n            if (this.base.type == ProductTypeEnum.PRINTED) {\n                this.configured.option_border = true;\n            }\n            else {\n                this.configured.option_border = false;\n            }\n        }\n        if (this.base.option_laminate && this.configured.option_laminate == null) {\n            let unset_default = this.configured.material?.default_lamination != null || this.configured.material?.default_lamination == CustomLamination.NOT_SELECTED;\n            if (!unset_default && this.configured.material.default_lamination != CustomLamination.NONE) {\n                this.configured.option_laminate = this.configured.material.default_lamination;\n            }\n            else {\n                this.configured.option_laminate = CustomLamination.GLOSS;\n            }\n        }\n\n        // Set the size to the same item in the list so equality checks will work\n        if (this.configured.size && this.recommended_sizes.getItemFromID(this.configured.size.id)) {\n            this.configured.size = this.recommended_sizes.getItemFromID(this.configured.size.id);\n        }\n\n        if (!this.configured.size && this.recommended_sizes.length > 0) {\n            this.configured.size = this.recommended_sizes.find((v) => v.width == this.configured.width && v.height == this.configured.height) || this.configured.size;\n        }\n\n        this.show_sizes = this.base.allow_custom_size || this.recommended_sizes.length > 0;\n\n        // If there is no default width/height but there are recommended sizes then set the height/width based on the default\n        if ((!this.configured.width || !this.configured.height) && this.recommended_sizes.length > 0) {\n            for (const size of this.recommended_sizes) {\n                if (size.default) {\n                    this.configured.height = size.height;\n                    this.configured.width = size.width;\n                    break\n                }\n            }\n\n            // No default set to first\n            if (!this.configured.width || !this.configured.height) {\n                this.configured.height = this.recommended_sizes[0].height;\n                this.configured.width = this.recommended_sizes[0].width;\n            }\n        }\n\n        this.setupShapes();\n\n        this.configured.bind('change:size', () => {\n            this.checkMaterialColor();\n        }, this);\n\n        if (!needs_additional_setup) {\n            this.setup_complete_deferred.resolve();\n        }\n\n        if (this.base.show_material_color) {\n            this.configured.bind('change:material_color', this.updateShapeFromMaterialColors.bind(this), this);\n        }\n    }\n\n    updateShapeFromMaterialColors() {\n        if (this.base.show_material_color) {\n            for (const shape of this.configured.custom_shapes) {\n                if (shape.background_shape_fill != this.configured.material_color) {\n                    shape.background_shape_fill = this.configured.material_color;\n                }\n            }\n        }\n    }\n\n    setupShapes() {\n        let to_remove = []\n        for (const item of this.configured.custom_shapes) {\n            if (!item.template_shape || !this.base.template_shapes.find(v => v.id == item.template_shape.id)) {\n                console.warn(`Found mismatched shape #${item.template_shape?.id}`);\n                to_remove.push(item);\n            }\n        }\n        for (const item of to_remove) {\n            this.configured.custom_shapes.splice(this.configured.custom_shapes.indexOf(item), 1);\n        }\n\n        for (const item of this.configured.custom_shapes) {\n            item.bindToConfigured(this.configured);\n        }\n\n        // Unique set of sides, vue will prevent equality working so we cant use [... new Set(data)]\n        let side_data = {};\n        for (const item of this.base.template_shapes) {\n            side_data[item.side?.id] = item.side;\n        }\n        let template_shape_sides: TemplateSide[] = Object.values(side_data);\n\n        for (const side of template_shape_sides) {\n            let existing = this.configured.custom_shapes.find(v => v.template_shape.side?.id == side?.id);\n            if (existing) {\n                continue;\n            }\n\n            let template_shape = this.templateShapesForSide(side)[0];\n            let custom_shape = this.configured.custom_shapes.find(v => v.template_shape?.id == template_shape.id);\n\n            if (!custom_shape) {\n                custom_shape = new (Services.get<typeof CustomShape>('CustomShape'))();\n                custom_shape.template_shape = template_shape;\n                custom_shape.bindToConfigured(this.configured);\n                custom_shape.loadDefaultsFromTemplate();\n                this.configured.custom_shapes.push(custom_shape);\n            }\n        }\n\n        if (this.base.show_material_color) {\n            this.updateShapeFromMaterialColors();\n        }\n    }\n\n    templateShapesForSide(side: TemplateSide) {\n        return this.base.template_shapes.filter(\n            v => v.side?.id == side?.id\n        ).sort((a, b) => {\n            if (a.default && b.default) {\n                return 0;\n            }\n            if (a.default) {\n                return -1;\n            }\n            if (b.default) {\n                return 1\n            }\n            if (a.order == b.order) {\n                return 0;\n            }\n            return a.order > b.order ? 1 : -1;\n        });\n    }\n\n    public checkSharedShapeAttributes(shape: CustomShape) {\n        if (this.configured.custom_shapes.indexOf(shape) == -1) {\n            return;\n        }\n\n        for (const item of this.configured.custom_shapes) {\n            if (item == shape) {\n                continue;\n            }\n            if (!item.template_shape.share_attributes || item.template_shape.tag != shape.template_shape.tag) {\n                continue;\n            }\n\n            for (const key of Services.get<typeof CustomShape>('CustomShape').SHARED_ATTRIBUTES) {\n                if (item[key] != shape[key]) {\n                    item[key] = shape[key];\n                }\n            }\n        }\n    }\n\n    get size_by_id(): number|null {\n        if (this.configured.size) {\n            if (this.configured.size.width == this.configured.width && this.configured.size.height == this.configured.height) {\n                return this.configured.size.id;\n            }\n        }\n\n        for (const size of this.recommended_sizes) {\n            if (size.width == this.configured.width && size.height == this.configured.height) {\n                this.configured.size = size;\n                return size.id;\n            }\n        }\n\n        return null;\n    }\n\n    set size_by_id(v: number|null) {\n        this.configured.size = this.recommended_sizes.getItemFromID(v);\n\n        if (this.configured.size) {\n            this.width = this.configured.size.width;\n            this.height = this.configured.size.height;\n        }\n    }\n\n    override get allow_custom_sizes() {\n        return this.base.allow_custom_size;\n    }\n\n    fitShape(shape: CustomShape|TemplateShape) {\n        if (!shape) {\n            return;\n        }\n\n        if (shape.fixed_size) {\n            this.configured.width = shape.fixed_width;\n            this.configured.height = shape.fixed_height;\n        }\n\n        if (shape.standardSizeRatio || shape.locked_shape_size) {\n            let width, height, size;\n            if (shape.standardSizeRatio)\n                size = fitToArea((shape.standardSizeRatio), 1, (this.width * this.height));\n\n            if (shape.locked_shape_size)\n                size = fitToArea(shape.clip_width, shape.clip_height, (this.width * this.height));\n\n            if (size.width > size.height) {\n                width = getClosestQuarter(size.width);\n                height = Number((width * (size.height / size.width)).toFixed(3));\n            } else {\n                height = getClosestQuarter(size.height);\n                width = Number((height * (size.width / size.height)).toFixed(3));\n            }\n\n            this.configured.width = width;\n            this.configured.height = height;\n            this.setLockedProportions(true);\n        }\n    }\n\n    setupShapeElement(custom_shape: CustomShape): BackgroundShapeElement {\n        // Allow this function to be called on both the CustomEditorService and CustomService\n        // Do nothing, modifies the design tool\n\n        return null\n    }\n    public checkSharedShapeSides(shape: CustomShape): void {\n        // Allow this function to be called on both the CustomEditorService and CustomService\n        // Do nothing, modifies the design tool\n    }\n\n    directToFinalize() {\n        window.location.assign(this.configured.getFinalizeURL());\n    }\n\n    useDesign(template: Template, $event?) {\n        let state = new ButtonProcessingState($event);\n        state.process();\n\n        this.configured.tool_type = ToolTypeEnum.ADVANCED;\n        this.configured.configure = true;\n\n        this.validate();\n        if (this.hasErrors) {\n            state.resolved();\n            return;\n        }\n\n        this.configured.template = new (Services.get<typeof Template>('Template'))({\n            id: template.id\n        })\n\n        state.resolved();\n        this.save($event, true);\n    }\n\n    checkOptionsSet() {\n        for (let option of this.configured.options) {\n            if (!option?.optionEligible(this.configured.width, this.configured.height)) {\n                this.configured.options.splice(this.configured.options.indexOf(option), 1)\n            }\n        }\n    }\n\n    override designHasVariableData() {\n        return this.configured.variable_data || (!this.add_to_cart && this.base.designHasVariableData());\n    }\n\n    override preValidate() {\n        super.preValidate();\n        this.checkOptionsSet();\n    }\n\n    override async preSave() {\n        await super.preSave();\n\n        if (this.remove_background) {\n            await this.removeUserFileBackground();\n        }\n\n        if (this.configured.retail_package) {\n            if (!this.configured.retail_package.package.getValidSizeFor(this.configured.width, this.configured.height)) {\n                this.configured.retail_package = null;\n            }\n        }\n    }\n\n    async removeUserFileBackground() {\n        if (!this.configured.user_file.original_background_file) {\n            this.configured.user_file = await this.configured.user_file.removeBackground().catch((error) => {\n                 this.errors.add('file', error.data['error']);\n            });\n        }\n    }\n\n    override onSaveFailure(response) {\n        super.onSaveFailure(response);\n\n        if (response && response.data && response.data.custom) {\n            this.errors.merge(response.data.custom);\n        }\n    }\n\n    get size() {\n        if (!this.configured.size) {\n            for (const size of this.recommended_sizes) {\n                if (size.width == this.configured.width && size.height == this.configured.height) {\n                    this.configured.size = size;\n                }\n            }\n        }\n        return this.configured.size;\n    }\n    set size(v) {\n        this.configured.size = v;\n    }\n\n    override nextUrl() {\n        if (this.add_to_cart) {\n            return '/cart/'\n        }\n        else {\n            return super.nextUrl();\n        }\n    }\n\n    override get colors_available_for_material() {\n        let colors = super.colors_available_for_material;\n        if (this.size && this.size.disabled_colors) {\n            colors = new Collection<Color>(...colors.filter(v => !this.size.disabled_colors.getItemFromID(v.id)));\n        }\n        return colors;\n    }\n}\n","/*\n    Vue's reactivity system can slow things down a lot so these function will optionally disable the system.\n */\nimport {ReactiveFlags} from '@vue/reactivity';\n\nexport function nonreactiveClass<T extends {new (...args: any[]): {}}>(constructor: T) {\n    constructor.prototype[ReactiveFlags.SKIP] = true;\n}\n\nexport function nonreactiveProperty() {\n    return function(target: any, key: string) {\n        Object.defineProperty(target, key, {\n            get: () => {\n                return target[`___${key}`];\n            },\n            set: (v) => {\n                if (v) {\n                    v[ReactiveFlags.SKIP] = true;\n                }\n\n                target[`___${key}`] = v;\n            },\n            enumerable: false,\n            configurable: false\n        });\n    };\n}\n\nexport function disableVueForImport(v: any) {\n    for (const key of Object.keys(v)) {\n        let item = v[key];\n\n        if (!item || !(item instanceof Object) || !item.prototype) {\n            continue\n        }\n\n        item.prototype[ReactiveFlags.SKIP] = true;\n    }\n}\n","import ProductPageLoaderAbstract from './ProductPageLoaderAbstract';\nimport {data, method} from '../../../core/adapters/VueComponent';\nimport {Services} from '../../../core/services/Services';\nimport CustomService from '../services/CustomService';\n\nexport default class CustomProductSetupPageApp extends ProductPageLoaderAbstract {\n\n    declare product_service: CustomService;\n\n    @data()\n    show_preview_tool: boolean;\n\n    @data()\n    step: number = 0;\n\n    @data()\n    action: string;\n\n    static override init() {\n        super.init(Services.get('CustomService'), 'product', 'configured_product');\n    }\n\n    override mounted() {\n        super.mounted();\n    }\n\n    @method()\n    finishStepOne() {\n        this.product_service.validate();\n        if (this.product_service.errors.length > 0) {\n            return;\n        }\n\n        this.step = 1;\n        this.checkScrollPosition()\n    }\n}","import ProductPageLoaderAbstract from './ProductPageLoaderAbstract';\nimport {data, method} from '../../../core/adapters/VueComponent';\nimport {Services} from '../../../core/services/Services';\nimport CustomService from '../services/CustomService';\nimport {ProofApproval} from '../models/enums';\nimport MessageList from '../../../core/utils/MessageList';\nimport RouteService from '../../../core/services/RouteService';\n\nexport default class FinalizePageApp extends ProductPageLoaderAbstract {\n\n    declare product_service: CustomService;\n\n    @data()\n    step: number = 0;\n\n    @data()\n    action: string;\n\n    @data()\n    show_summary: boolean = false;\n\n    @data()\n    show_finishing: boolean = true;\n\n    @data()\n    finalize: boolean = false;\n\n    @data()\n    errors: MessageList;\n\n    @data()\n    disable_finishing_options: boolean;\n\n    @data()\n    warnings: MessageList;\n\n    @data()\n    infos: MessageList;\n\n    @data()\n    size_changed: boolean;\n\n    static override init() {\n        super.init(Services.get('CustomService'), 'product', 'configured_product');\n    }\n\n    override mounted() {\n        super.mounted();\n\n        this.warnings = new MessageList();\n        if (Services.get<RouteService>('RouteService').current.params.get('size_changed') == '1') {\n            this.warnings.add('size', \"The size has changed to match your design's aspect ratio.\");\n            this.size_changed = true;\n        }\n\n        this.product_service.bind('change:price', this.$forceUpdate.bind(this), this);\n        this.product_service.add_to_cart = true;\n        this.product_service.setupRetailPackaging().then(() => {\n            this.disable_finishing_options = !(this.product_service.hasPackageOptions()\n                || this.product_service.base.option_laminate\n                || this.product_service.base.option_reverse_cut\n                || this.product_service.base.option_border\n                || this.product_service.base.option_vectorize\n                || this.product_service.configured.options.length > 0);\n\n            if (this.disable_finishing_options) {\n                this.finalize = true;\n            }\n        });\n\n        this.product_service.setup_complete.then(() => {\n            let clear_check = () => {\n                if (this.product_service.configured.material.clear) {\n                    this.infos = new MessageList();\n                    if (this.product_service.configured.material.instructions_label) {\n                        this.infos.add('instructions', this.product_service.configured.material.instructions_label);\n                    } else {\n                        this.infos.add('instructions', 'Please specify what you would like clear or white in the design');\n                    }\n                }\n            }\n            this.product_service.configured.bind('change:material', clear_check, this);\n            clear_check();\n        });\n\n        this.product_service.once('change:width', () => {\n            this.warnings?.remove('size');\n            this.size_changed = false;\n        });\n        this.product_service.once('change:height', () => {\n            this.warnings?.remove('size');\n            this.size_changed = false;\n        });\n    }\n\n    @method()\n    save() {\n        this.errors = new MessageList();\n        if (this.product_service.configured.design_approval === undefined || this.product_service.configured.design_approval === null) {\n            this.errors.add('design_approval', 'This field is required.');\n        }\n\n        if (this.product_service.configured.design_approval == ProofApproval.CHANGES && !this.product_service.configured.instructions) {\n            this.errors.add('instructions', 'This field is required.')\n        }\n\n        if (this.errors.length == 0) {\n            this.product_service.save();\n        }\n        else {\n            this.errors.add('__all__', 'Please correct the errors above.')\n        }\n    }\n}","/*\n    Custom.ts\n\n    This file contains everything that's needed to load the setup page\n */\n\nimport {Services} from '../../ts/core/services/Services';\n\nimport registerCustomServices from '../../ts/apps/svgcustom/services/setup.init';\nimport registerCoreComponents from '../../ts/core/components/init';\n\nimport CustomProductSetupPageApp from '../../ts/apps/svgcustom/apps/CustomProductSetupPageApp';\nimport registerProductAddonServices from '../../ts/apps/products_shared/services/init';\nimport {IntegrationExtra} from '../../ts/core/utils/IntegrationExtra';\nimport registerSetupComponents from '../../ts/apps/svgcustom/components/SetupPage/init';\nimport FinalizePageApp from '../../ts/apps/svgcustom/apps/FinalizePageApp';\nimport TemplateFinalizeOptions from '../../ts/apps/svgcustom/components/TemplateFinalizeOptions/Options';\nimport registerPackagingComponents from '../../ts/apps/packaging/components/init';\n\n\nexport default class SetupIntegration extends IntegrationExtra {\n    override configureServices() {\n        Services.resolve('loaded-page-app');\n    }\n\n    setupApps(): void {\n        FinalizePageApp.mount('#finalize-app', (app) => {\n            registerCoreComponents(app);\n            registerSetupComponents(app);\n            app.registerComponent(TemplateFinalizeOptions);\n            registerPackagingComponents(app);\n        });\n\n        CustomProductSetupPageApp.mount('#setup-app', (app) => {\n            registerCoreComponents(app);\n            registerSetupComponents(app);\n        });\n    }\n\n    setupModels(): void {\n        // Done in CustomCommon.ts\n    }\n\n    setupServices(): void {\n        registerProductAddonServices(Services);\n        registerCustomServices(Services);\n    }\n}","import {IServices} from '../../../core/services/Services';\nimport CustomService from './CustomService';\n\nexport default function registerServices(services: IServices) {\n    services.singleton('CustomService', CustomService);\n}","import SetupIntegration from '../../../common/integrations/ts/Setup';\n\nconst custom_integration = new SetupIntegration();"],"names":["ProductProductionTimeController","VueComponent","Ay","_classSuper","constructor","componet","super","this","standard","__runInitializers","_instanceExtraInitializers","_standard_initializers","rush","_standard_extraInitializers","_rush_initializers","message","_rush_extraInitializers","_message_initializers","loaded","_message_extraInitializers","_loaded_initializers","backordered","_loaded_extraInitializers","_backordered_initializers","Services","x","waitOn","then","product_service","get","configured","bind","updateTimes","material","quantity","size","width","height","request","method","url","params","id","response","data","$forceUpdate","hidden","isRegistered","p","EJ","__esDecorate","_a","_updateTimes_decorators","kind","name","static","private","access","has","obj","metadata","_metadata","_hidden_decorators","_standard_decorators","set","value","_rush_decorators","_message_decorators","_loaded_decorators","_backordered_decorators","_backordered_extraInitializers","ProductProductionTime","tag","controller","template","RetailPackageDisplayController","component","paper_import","white_transfer_background","blue_transfer_background","productDesign","_productDesign_initializers","selectedPackage","_productDesign_extraInitializers","_selectedPackage_initializers","productWidth","_selectedPackage_extraInitializers","_productWidth_initializers","productHeight","_productWidth_extraInitializers","_productHeight_initializers","singleColor","_productHeight_extraInitializers","_singleColor_initializers","noName","_singleColor_extraInitializers","_noName_initializers","_noName_extraInitializers","_quantity_initializers","materialColor","_quantity_extraInitializers","_materialColor_initializers","reversed","_materialColor_extraInitializers","_reversed_initializers","timeout","_reversed_extraInitializers","__webpack_require__","e","t","paper","VueUtils","Df","reset","startReset","trigger","flip","clearTimeout","setTimeout","configured_deferred","SimplePromise","yY","defer","promise","product_raster","remove","package_raster","transfer_background","transfer_layer","removeChildren","setupPackaging","setupProduct","mounted","setupPaper","canvas","$el","querySelector","canvas_height","utils","yV","canvas_width","hh","style","Number","toFixed","paperScope","PaperScope","activate","setup","view","viewSize","Size","project","layer","Layer","addChild","ctx","element","getContext","imageSmoothingQuality","imageSmoothingEnabled","resolve","no_customer_preview","package","is_reversed","content_back","visible","background_image","toLowerCase","indexOf","Raster","source","crossOrigin","on","fitBounds","Rectangle","bringToFront","dpi","package_width","package_height","product_width","product_height","left_padding","top_padding","bounds","Point","clipping","Path","clipMask","content","sendToBack","_w","watch","_flip_decorators","_productDesign_decorators","_selectedPackage_decorators","_productWidth_decorators","_productHeight_decorators","_singleColor_decorators","_noName_decorators","_quantity_decorators","_materialColor_decorators","_reversed_decorators","RetailPackageDisplay","RetailPackageOptionController","productService","setup_complete","retail_package","show_retail_packaging","selected_package","manualToggle","available_packages","length","toggleRetailPackaging","updatePackage","selected","_productService_initializers","_productService_extraInitializers","_show_retail_packaging_initializers","_show_retail_packaging_extraInitializers","_selected_package_initializers","_manualToggle_decorators","_toggleRetailPackaging_decorators","_updatePackage_decorators","_productService_decorators","_show_retail_packaging_decorators","_selected_package_decorators","_selected_package_extraInitializers","RetailPackageOption","registerComponents","vue_app","registerComponent","RetailPackage","A","PriceController","unit","_unit_initializers","total","_unit_extraInitializers","_total_initializers","_unit_decorators","_total_decorators","_total_extraInitializers","Price","QuantityOptionsController","quantity_options","_quantity_options_initializers","show_more","_quantity_options_extraInitializers","_show_more_initializers","show_all","_show_more_extraInitializers","_show_all_initializers","calcQuantityOptions","console","error","updateQuantityOptions","checkView","parentElement","scrollIntoView","pricing","to_pop","i","current","next","base","minimum_quantity","push","item","splice","index","default_quantity","slice","_updateQuantityOptions_decorators","_checkView_decorators","_quantity_options_decorators","_show_more_decorators","_show_all_decorators","_show_all_extraInitializers","QuantityBreaks","ConfiguredProductServiceAbstract","_ProductServiceAbstract__WEBPACK_IMPORTED_MODULE_5__","base_class","configured_class","base_key","optionsPrice","calcOptionsPrice","price","show_retail","setupFromData","base_data","configured_data","all_data","configure","currency","setupExtraData","setupFromProduct","setupConfiguredFromBase","nextUrl","getNextURL","show_wholesale_prices","color_map","material_color","color_maps","find","v","key","product_color_set","values","design_colors","colors_available","colors_available_for_material","material_colors","createNewFromBase","needs_additional_setup","materials","getItemFromID","errors","add","default_material","getItemFromURI","type","default_width","default_height","query_quantity","_core_services_Services__WEBPACK_IMPORTED_MODULE_0__","setupProductOptions","updatePricing","checkMaterialColor","checkBackorderedMaterial","validateMaxSize","checkWarnings","limited_quantity","setup_complete_deferred","warnings","_core_utils_MessageList__WEBPACK_IMPORTED_MODULE_1__","default","setupRetailPackaging","packages","$promise","resetPackages","updatePackages","objects","filter","hasPackageOptions","items","old_packages","getValidSizeFor","old_package","_packaging_models_ConfiguredRetailPackage__WEBPACK_IMPORTED_MODULE_6__","fetchQuote","sizeIsRestricted","sizeIsValid","merge","list","forceUpdatePricing","price_quote_key","keep_errors","quantityIsValid","quoted_material","quoted_width","cleaned","quoted_height","PriceQuoteService","price_tier","price_quote_uuid","uuid","getPriceQuote","prices","quantities","unshift","shift","sqInches","_core_utils_PricingTier__WEBPACK_IMPORTED_MODULE_2__","_core_utils_utils__WEBPACK_IMPORTED_MODULE_4__","bS","designHasVariableData","variable_data_charge","variable_data","tier","next_tier","parseInt","percent","UD","Cc","unitPrice","preSave","save","remaining_stock","allow_backorders","outOfStock","disabled","isResolved","$event","skip_validation","state","_core_utils_ButtonProcessingState__WEBPACK_IMPORTED_MODULE_3__","process","window","onbeforeunload","validate","hasErrors","saving","onSaveSuccess","add_to_cart","addToCart","pageTransition","resolved","error_message","onSaveFailure","allow_custom_sizes","show_custom_sizes","onHeightChange","onWidthChange","proportions_ratio","hasLockRatio","lockRatio","unit_width","jw","qE","ups","convertSizeFromInches","convertSizeToInches","unit_height","toggleLockedProportions","setLockedProportions","updateCanvas","isPromotionalTextDisabled","disable_promotional_text","adjustSizeToPackage","available_sizes","max_product_width","adjustedPackageSize","materialSelectionMap","map","adhesive","material_name","materialTypes","Object","keys","sort","adhesiveTypes","a","b","order","adhesive_type","configured_option_model","ConfiguredOptionModel","option_set","options","found","custom_option","equals","default_option","display_type","_svgcustom_models_enums__WEBPACK_IMPORTED_MODULE_7__","uM","CHECKBOX","option","validateDisplayType","proportionsLocked","ProductServiceAbstract","_core_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_3__","Q","show_retail_value","_core_utils_SimplePromise__WEBPACK_IMPORTED_MODULE_2__","_core_utils_MessageList__WEBPACK_IMPORTED_MODULE_0__","_core_services_Services__WEBPACK_IMPORTED_MODULE_1__","auto_page_transition","once","trackProductPage","sku","addEventListener","event","persisted","revalidateOnError","page_change_params","next_url","URL","location","origin","current_url","href","searchParams","append","trackAddedProductToCart","assign","preValidate","optionsUnitValue","PriceQuote","$http","material_id","quoteRetailPackage","package_id","size_id","deferred","reject","PricingTier","$inject","registerServices","services","singleton","services_PriceQuote","__WEBPACK_DEFAULT_EXPORT__","_core_adapters_VueApp__WEBPACK_IMPORTED_MODULE_0__","base_data_key","defaultPrice","_defaultPrice_initializers","_defaultPrice_extraInitializers","_product_service_initializers","image_display","_product_service_extraInitializers","_image_display_initializers","_image_display_extraInitializers","_ups_initializers","_core_services_Services__WEBPACK_IMPORTED_MODULE_2__","init","configured_data_key","product_data","product_data_element","document","getElementById","textContent","JSON","parse","atob","replace","registerObject","scrollToTestimonials","behavior","block","withinViewport","el","getBoundingClientRect","y","checkScrollPosition","register","_core_utils_Modal__WEBPACK_IMPORTED_MODULE_3__","yl","_core_adapters_VueComponent__WEBPACK_IMPORTED_MODULE_1__","_scrollToTestimonials_decorators","_checkScrollPosition_decorators","_register_decorators","_defaultPrice_decorators","_product_service_decorators","_image_display_decorators","_ups_decorators","_ups_extraInitializers","SelectDesignController","selected_action","disable_upload","design_only","back","step","nextStep","action","_step_initializers","_step_extraInitializers","_action_initializers","files","_action_extraInitializers","_files_initializers","reorders","_files_extraInitializers","_reorders_initializers","autosaves","_reorders_extraInitializers","_autosaves_initializers","_autosaves_extraInitializers","_selected_action_initializers","emit","_back_decorators","_nextStep_decorators","_step_decorators","_action_decorators","_files_decorators","_reorders_decorators","_autosaves_decorators","_selected_action_decorators","_selected_action_extraInitializers","SelectDesign","UploadFileController","UploadFile_runInitializers","upload_success_callback","_upload_success_callback_initializers","upload_failure_callback","_upload_success_callback_extraInitializers","_upload_failure_callback_initializers","uploadSuccess","uploadFailure","user_file","UserFile","s","tool_type","enums","yF","UPLOAD","auto_background_removal","remove_background","De","UploadFile_esDecorate","_upload_success_callback_decorators","_upload_failure_callback_decorators","_upload_failure_callback_extraInitializers","UploadFile","SelectFileController","SelectFile_runInitializers","user_files","_user_files_initializers","limit","_user_files_extraInitializers","_limit_initializers","page","_limit_extraInitializers","_page_initializers","search","_page_extraInitializers","_search_initializers","selectUserFile","goToFinalize","offset","name__icontains","removeUserFile","file","removeItemFromID","SelectFile_esDecorate","_selectUserFile_decorators","_goToFinalize_decorators","_filter_decorators","_removeUserFile_decorators","_user_files_decorators","_limit_decorators","_page_decorators","_search_decorators","_search_extraInitializers","SelectFile","SelectTemplateController","selectTemplate","useDesign","SelectTemplate_runInitializers","SelectTemplate_esDecorate","_selectTemplate_decorators","SelectTemplate","SelectAutosaveController","SelectAutosave_runInitializers","no_data","selectAutosave","autosave","load_save","tool_url","toString","removeAutosave","delete","SelectAutosave_esDecorate","_selectAutosave_decorators","_removeAutosave_decorators","SelectAutosave","TemplateSetupOptionsShapes","html","FIXED_VALUE","TemplateOption","X","CHARGE_PERCENTAGE","CHARGE_TOTAL","CHARGE_UNIT","TOGGLE_BUTTON","RADIO","DROPDOWN","INCREMENTAL_OPTION","TemplateFinalizeOptionsController","beforeMount","lamination_options","laminationOptions","option_laminate","Ez","NONE","label","getOptionName","templateOptionSet","customService","custom","undefined","getOptionItemNameCallback","getOptionItemName","charge_option","amount","formatted","VueApp","GLOBAL_FILTERS","display_value","quantityBreakIndex","hasOptions","laminate","can_laminate","border","idForOptionSet","split","join","toggleOption","filteredOptions","isDisabled","optionEligible","filteredOptionItems","optionChecked","option_value","toggleSingleOption","hidePrice","togglePriceOption","lastOption","firstOptionSelected","nextOption","lastOptionSelected","infoTitle","_infoTitle_initializers","showInfoBool","_infoTitle_extraInitializers","_showInfoBool_initializers","optionItemNameCallback","_showInfoBool_extraInitializers","_optionItemNameCallback_initializers","show_border_description","_optionItemNameCallback_extraInitializers","_show_border_description_initializers","show_lamination_description","_show_border_description_extraInitializers","_show_lamination_description_initializers","_show_lamination_description_extraInitializers","priceQuote","_priceQuote_initializers","readOnly","_priceQuote_extraInitializers","_readOnly_initializers","hideRetailPackaging","_readOnly_extraInitializers","_hideRetailPackaging_initializers","reverseCut","_hideRetailPackaging_extraInitializers","_reverseCut_initializers","_reverseCut_extraInitializers","_lamination_options_initializers","EW","_getOptionName_decorators","_getOptionItemNameCallback_decorators","_getOptionItemName_decorators","_hasOptions_decorators","_idForOptionSet_decorators","_toggleOption_decorators","_filteredOptions_decorators","_filteredOptionItems_decorators","_optionChecked_decorators","_toggleSingleOption_decorators","_hidePrice_decorators","_togglePriceOption_decorators","_lastOption_decorators","_nextOption_decorators","_firstOptionSelected_decorators","_lastOptionSelected_decorators","_infoTitle_decorators","_showInfoBool_decorators","_optionItemNameCallback_decorators","_show_border_description_decorators","_show_lamination_description_decorators","_priceQuote_decorators","_readOnly_decorators","_hideRetailPackaging_decorators","_reverseCut_decorators","_lamination_options_decorators","_lamination_options_extraInitializers","TemplateFinalizeOptions","AM","ROUNDED_CORNER","ShapesController","side","_side_initializers","_side_extraInitializers","showSize","_showSize_initializers","setNewShape","shape","custom_shapes","template_shape","to_remove","custom_shape","bindToConfigured","loadDefaultsFromTemplate","carryOverData","setupShapeElement","fitShape","checkSharedShapeSides","checkSharedShapeAttributes","clip_type","clip_radius","defaultSideId","lowest","template_shapes","templateShapes","selected_side","customShapes","isShapeSelected","scaleRoundness","Math","max","min","_setNewShape_decorators","_templateShapes_decorators","_customShapes_decorators","_isShapeSelected_decorators","_scaleRoundness_decorators","_side_decorators","_showSize_decorators","_showSize_extraInitializers","CustomService","_products_shared_services_ConfiguredProductServiceAbstract__WEBPACK_IMPORTED_MODULE_5__","size_adjusted","show_sizes","recommended_sizes","_core_models_Collection__WEBPACK_IMPORTED_MODULE_2__","showWholesalePrices","color_set","cut_out_color","show_material_color","disabled_colors","reduce","material_price","_core_utils_PricingTier__WEBPACK_IMPORTED_MODULE_0__","sizes","ratio","option_border","_models_enums__WEBPACK_IMPORTED_MODULE_4__","po","PRINTED","default_lamination","NOT_SELECTED","GLOSS","allow_custom_size","setupShapes","updateShapeFromMaterialColors","background_shape_fill","warn","side_data","template_shape_sides","templateShapesForSide","share_attributes","SHARED_ATTRIBUTES","size_by_id","fixed_size","fixed_width","fixed_height","standardSizeRatio","locked_shape_size","_core_utils_utils__WEBPACK_IMPORTED_MODULE_3__","wj","clip_width","clip_height","Eq","directToFinalize","getFinalizeURL","_core_utils_ButtonProcessingState__WEBPACK_IMPORTED_MODULE_6__","ADVANCED","checkOptionsSet","removeUserFileBackground","original_background_file","removeBackground","catch","colors","disableVueForImport","prototype","_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__","$F","SKIP","ProductPageLoaderAbstract","finishStepOne","show_preview_tool","_show_preview_tool_initializers","_show_preview_tool_extraInitializers","_finishStepOne_decorators","_show_preview_tool_decorators","apps_CustomProductSetupPageApp","MessageList","size_changed","disable_finishing_options","option_reverse_cut","option_vectorize","finalize","clear_check","clear","infos","instructions_label","design_approval","UK","CHANGES","instructions","FinalizePageApp_runInitializers","show_summary","_show_summary_initializers","show_finishing","_show_summary_extraInitializers","_show_finishing_initializers","_show_finishing_extraInitializers","_finalize_initializers","_finalize_extraInitializers","_errors_initializers","_errors_extraInitializers","_disable_finishing_options_initializers","_disable_finishing_options_extraInitializers","_warnings_initializers","_warnings_extraInitializers","_infos_initializers","_infos_extraInitializers","_size_changed_initializers","FinalizePageApp_esDecorate","_save_decorators","_show_summary_decorators","_show_finishing_decorators","_finalize_decorators","_errors_decorators","_disable_finishing_options_decorators","_warnings_decorators","_infos_decorators","_size_changed_decorators","_size_changed_extraInitializers","apps_FinalizePageApp","SetupIntegration","IntegrationExtra","T","configureServices","setupApps","mount","app","SetupPage_init","Options","components_init","setupModels","setupServices","services_init"],"sourceRoot":""}