uploadly-cdn.com
Open in
urlscan Pro
2606:4700:3036::ac43:a50e
Public Scan
Submitted URL: http://uploadly-cdn.com/page_script.js
Effective URL: https://uploadly-cdn.com/page_script.js
Submission: On November 21 via manual from US — Scanned from DE
Effective URL: https://uploadly-cdn.com/page_script.js
Submission: On November 21 via manual from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(()=>{var e={666:e=>{var t=function(e){"use strict";var t,i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",l=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function p(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,i){return e[t]=i}}function c(e,t,i,o){var n=t&&t.prototype instanceof g?t:g,r=Object.create(n.prototype),l=new L(o||[]);return a(r,"_invoke",{value:T(e,i,l)}),r}function d(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u="suspendedStart",m="executing",f="completed",h={};function g(){}function y(){}function b(){}var v={};p(v,r,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(q([])));w&&w!==i&&o.call(w,r)&&(v=w);var _=b.prototype=g.prototype=Object.create(v);function A(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(a,n,r,l){var s=d(e[a],e,n);if("throw"!==s.type){var p=s.arg,c=p.value;return c&&"object"==typeof c&&o.call(c,"__await")?t.resolve(c.__await).then((function(e){i("next",e,r,l)}),(function(e){i("throw",e,r,l)})):t.resolve(c).then((function(e){p.value=e,r(p)}),(function(e){return i("throw",e,r,l)}))}l(s.arg)}var n;a(this,"_invoke",{value:function(e,o){function a(){return new t((function(t,a){i(e,o,t,a)}))}return n=n?n.then(a,a):a()}})}function T(e,t,i){var o=u;return function(a,n){if(o===m)throw new Error("Generator is already running");if(o===f){if("throw"===a)throw n;return z()}for(i.method=a,i.arg=n;;){var r=i.delegate;if(r){var l=S(r,i);if(l){if(l===h)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===u)throw o=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=m;var s=d(e,t,i);if("normal"===s.type){if(o=i.done?f:"suspendedYield",s.arg===h)continue;return{value:s.arg,done:i.done}}"throw"===s.type&&(o=f,i.method="throw",i.arg=s.arg)}}}function S(e,i){var o=i.method,a=e.iterator[o];if(a===t)return i.delegate=null,"throw"===o&&e.iterator.return&&(i.method="return",i.arg=t,S(e,i),"throw"===i.method)||"return"!==o&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;var n=d(a,e.iterator,i.arg);if("throw"===n.type)return i.method="throw",i.arg=n.arg,i.delegate=null,h;var r=n.arg;return r?r.done?(i[e.resultName]=r.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,h):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function q(e){if(e){var i=e[r];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function i(){for(;++a<e.length;)if(o.call(e,a))return i.value=e[a],i.done=!1,i;return i.value=t,i.done=!0,i};return n.next=n}}return{next:z}}function z(){return{value:t,done:!0}}return y.prototype=b,a(_,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:y,configurable:!0}),y.displayName=p(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,p(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},A(k.prototype),p(k.prototype,l,(function(){return this})),e.AsyncIterator=k,e.async=function(t,i,o,a,n){void 0===n&&(n=Promise);var r=new k(c(t,i,o,a),n);return e.isGeneratorFunction(i)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},A(_),p(_,s,"Generator"),p(_,r,(function(){return this})),p(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),i=[];for(var o in t)i.push(o);return i.reverse(),function e(){for(;i.length;){var o=i.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},e.values=q,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var i=this;function a(o,a){return l.type="throw",l.arg=e,i.next=o,a&&(i.method="next",i.arg=t),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],l=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var s=o.call(r,"catchLoc"),p=o.call(r,"finallyLoc");if(s&&p){if(this.prev<r.catchLoc)return a(r.catchLoc,!0);if(this.prev<r.finallyLoc)return a(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return a(r.catchLoc,!0)}else{if(!p)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return a(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var r=n?n.completion:{};return r.type=e,r.arg=t,n?(this.method="next",this.next=n.finallyLoc,h):this.complete(r)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),C(i),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var o=i.completion;if("throw"===o.type){var a=o.arg;C(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,o){return this.delegate={iterator:q(e),resultName:i,nextLoc:o},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},891:(e,t,i)=>{"use strict";const o=(e,t,i="")=>{let o=document.createElement("a");o.setAttribute("target","_blank");let a=document.createElement("img");const n=`cartImageDiv${Math.random().toString(36).substr(2,9)}`;a.setAttribute("id",n);let r,l="https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+t.toUpperCase();a.setAttribute("onerror",`this.src = '${l}'`),a.style.cssText="max-width: 100%; max-height: 100%;","pdf"===t?(a.style.width="100%",r=localStorage.getItem("pdf_"+e)??"https://photoupload.inspon-cloud.com/photoupload/img/ICONS/file.png"):r="docx"===t||"docx"===t||"dot"===t||"dotx"===t||"docm"===t||"doc"===t?"https://photoupload.inspon-cloud.com/photoupload/img/ICONS/word.png":"xlsx"===t||"xlsm"===t||"csv"===t||"xls"===t?"https://photoupload.inspon-cloud.com/photoupload/img/ICONS/excel.png":"ppt"===t?"https://photoupload.inspon-cloud.com/photoupload/img/ICONS/powerpoint.png":"png"===t||"jpg"===t||"jpeg"===t||"gif"===t||"tiff"===t||"svg"===t||"tif"===t||"pic"===t?"doityourselftransfers.myshopify.com"===Shopify.shop||"blingzandblankswholesale.myshopify.com"===Shopify.shop||"supremedigital-net.myshopify.com"===Shopify.shop?`https://ucarecdn.com/${e.split(".")[0]}/`:`https://ucarecdn.com/${e.split(".")[0]}/-/resize/500/`:"https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+t.toUpperCase(),fetch(r).then((e=>{200!==e.status&&(r="https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+t.toUpperCase(),document.querySelector(`#${n}`).src=r)})),a.src=r,o.setAttribute("href",i),"blingzandblankswholesale.myshopify.com"===Shopify.shop?o.innerHTML="Link":o.append(a),"png"===t||"jpg"===t||"jpeg"===t||"gif"===t||"tiff"===t||"svg"===t||"tif"===t||"pic"===t||a.addEventListener("click",(()=>{window.open("https://inspon-app.com/photoupload/files/"+e+"."+t)}));let s=document.createElement("div");return s.style.cssText="-ms-flex-negative: 0;position: relative;flex-shrink: 0;display: -webkit-box;display: -ms-flexbox;display: flex;/* -webkit-box-align: center; */-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;float: left;box-sizing: border-box;padding: 2px;width: 70px;height: 70px;overflow: hidden;border: 1px solid;border-radius: 6px;background: transparent;color: #e3e1e1;transition: border .3s;float:revert;cursor: pointer;",s.append(o),"blingzandblankswholesale.myshopify.com"===Shopify.shop?o:s},a=()=>{let e=window.ph_jq;function t(t){var i=[];return e(t).children().each(((e,t)=>{void 0!==t.innerText&&t.innerText.includes("?ph_image=")&&"SCRIPT"!==t.nodeName&&i.push(t)})),i}var i;e("body").children().each(((e,o)=>{for(var a=t(o);0!==a.length;)(a=t(a)).length>=1&&(i=a)}));const a=new RegExp(/https:\/\/cdn\.shopify\.com.+?true/g),n=new RegExp(/https:\/\/cdn\.shopify\.com.+?true/),r=new RegExp(/ph_image/g);i&&(console.log(i),i.forEach((e=>{if(e?.innerHTML){let t=e.innerHTML;const i=t.match(a);if(i)i.forEach(((e,i)=>{let a=document.createElement("textarea");a.innerHTML=e;let r=a.value;if(r&&r.includes("ph_image")){let e=r.split("ph_image=")[1].split("&ph_name")[0];const i=r.split("crop=")[1]?.split("&extension")[0],a=r.split("ph_image=")[1].split("&extension=")[1].split("&live")[0].split("=").join("").replace(/\s/g,"");let l;i&&"null"!==i&&(e=e+"/"+i.replace("p=n=g","png")),l="7c70f2-4.myshopify.com"===window.Shopify.shop?(e=>{const t=document.createElement("a");return t.href=e,t.innerText="Link",t.target="_blank",t})(r):o(e.replace(new RegExp("(p=n=g)","g"),"png"),a,r);let s=l.outerHTML;"97eba3-8c.myshopify.com"===Shopify.shop&&(s=`<div>${new URL(r).searchParams.get("ph_name").split("_").join("")}</div>`+s),t=t.replace(n,s)}})),e.innerHTML=t;else{const t=e.innerText.match(r);if(t){let i=e.innerText;t.forEach((t=>{const a=i.indexOf("ph_image");if(-1!==a){let t=i.substring(a).split("ph_image=")[1].split("&ph_name")[0],n=e?.innerText?.substring(a)?.split("crop=")[1]?.split("&extension")[0];n&&"null"!==n&&(t=t+"/"+n.replace("p=n=g","png"));let r=i.substring(a).split("ph_image=")[1].split("&extension=")[1].split("&live")[0].split("=").join("").replace(/\s/g,""),l=o(t,r,decoded_match);if(document.querySelector("#drawer_images"))document.querySelector("#drawer_images").append(l);else{const t=document.createElement("div");t.setAttribute("id","drawer_images"),t.appendChild(l),e.innerHTML=t.outerHTML}i=i.replace("ph_image","")}}))}}}})))},n="https://photoupload.inspon-cloud.com/uploadly/storefront/",r="https://cdn.shopify.com/s/files/1/0515/2384/6340/files/uploadcarev2.js?v=1727778997",l=(e,t)=>{var i=new Headers;i.append("Content-Type","application/json");var o={method:"POST",headers:i,body:JSON.stringify({getData:window.Shopify.shop,productId:e}),redirect:"follow"};return fetch(n+"getData",o).then((e=>e.json())).then((e=>{t(e)}))},s=(e,t)=>{try{if("1a8f58-04.myshopify.com"===window.Shopify.shop&&window.field_data)return void t(window.field_data);l(e,t)}catch(i){console.log(i),l(e,t)}},p=(e,t)=>{let i,o,a={title:e.product.title,options:e.product.options.map((e=>({name:e.name,values:e.values}))),variants:e.product.variants.map((e=>{var t={};return t.id=e.id,e.option1&&(t.option1=e.option1),e.option2&&(t.option2=e.option2),e.option3&&(t.option3=e.option3),t.price=e.price,t.title=e.title,t}))};window.ph_product_collections?(i=window.ph_product_collections.split(","),i.pop()):i=[],window.ph_product_collections_id?(o=window.ph_product_collections_id.split(","),o.pop()):o=[],t({product:a,collection:i.map((e=>({title:e}))),collection_id:o})},c=()=>{let e='form[action*="/cart/add"]';return"roadtorentable.myshopify.com"!==Shopify.shop&&"info-djur.myshopify.com"!==Shopify.shop&&"animebodypillow.myshopify.com"!==Shopify.shop||document.querySelectorAll('form[action*="/cart/add"][class*="product-single__form"]').length>0&&(e='form[action*="/cart/add"][class*="product-single__form"]'),"instantjewel.myshopify.com"===Shopify.shop&&document.querySelectorAll('form[action*="/cart/add"][is="product-form"]').length>0&&(e='form[action*="/cart/add"][is="product-form"]'),"v2-art-of-paint-by-numbers.myshopify.com"===Shopify.shop&&document.querySelectorAll('form[action*="/cart/add"][class="shopify-product-form"]').length>0&&(e='form[action*="/cart/add"][class="shopify-product-form"]'),"c74d78.myshopify.com"===Shopify.shop&&document.querySelector(".product-buy")&&(e='form[action*="/cart/add"].product-buy'),e},d=function(e,t="product"){const i="home"===t?`[data-ph-product-id='${e}'] `:"";let o=[];return Object.keys(UPLOADCARE_DATA).forEach((e=>{let t=[];UPLOADCARE_DATA[e].yes&&(document.querySelectorAll(`${i} #selBtn_${e}`).length>0?document.querySelector(`${i} #previewImages_${e}`).children.length>0?t.push(!0):t.push(!1):t.push(!0)),"Yes"===UPLOADCARE_DATA[e].textFieldRequired&&(document.querySelectorAll(`${i} .textAreaField_${e}`).length>0?t.push(Array.from(document.querySelectorAll(`${i} .textAreaField_${e}`)).every((e=>""!==e.value))):t.push(!0)),o.push(t.every((e=>!0===e)))})),o.every((e=>!0===e))},u=(e,t="product")=>{const i="home"===t?`.photoupload_${e} `:"";document.querySelectorAll(`#ph_hidden_items[data-ph-product-data='${e}']`).length>0?(Array.from(document.querySelector(`#ph_hidden_items[data-ph-product-data='${e}']`).children).forEach((e=>{const t=document.querySelector(`${i} [data-clone-button='true'][data-clone-id='${e.getAttribute("data-clone-id")}']`);t&&(e.removeAttribute("data-original-button"),e.removeAttribute("data-clone-id"),e.removeAttribute("disabled"),e.querySelectorAll(".shopify-payment-button__button").forEach(((t,i)=>{i+1!==e.querySelectorAll(".shopify-payment-button__button").length&&t.remove()})),t.parentNode.insertBefore(e,t,document.querySelectorAll(`${i} [data-clone-button='true'][data-clone-id='${e.getAttribute("data-clone-id")}']`)),t.remove())})),document.querySelector(`#ph_hidden_items[data-ph-product-data='${e}']`).innerHTML=""):"doityourselftransfers.myshopify.com"===Shopify.shop&&document.querySelectorAll(`${i} .shopify-payment-button__button`).forEach(((e,t)=>{e.style.display="unset",e.style.visibility="unset",e.style.opacity="1"}))},m=(e,t)=>{const i="home"===t?`[data-ph-product-id='${e}'] `:""+c();let o=0,a=document.querySelectorAll(i+' button[name="add"], '+i+' button[type="submit"], '+i+' input[type="submit"], '+i+' input[name="add"]');if(0===a.length){a=[];for(const e of document.querySelectorAll(i+" button, "+i+" [type='submit'][name='add']"))if((!0===e.getAttribute("class")?.includes("add-to-cart")||!0===e.getAttribute("class")?.includes("btn-addtocart")||!0===e.getAttribute("class")?.includes("button--addToCart")||!0===e.getAttribute("class")?.includes("product-submit")||!0===e.getAttribute("class")?.includes("product-buy-buttons--cta")||"AddToCart"===e.getAttribute("id")||"add-to-cart"===e.getAttribute("data-action")||null!==e.getAttribute("data-product-id")||null!==e.getAttribute("data-product-add")||"Add to cart"===e.getAttribute("aria-label")||"product-add-to-cart"===e.getAttribute("id")||"ProductATC"===e.getAttribute("data-pf-type")||"Add to cart"!==e.getAttribute("value")&&null!==e.getAttribute("value"))&&!e.classList.contains("imgBtn")){a[o]=e;break}}if("admendk.myshopify.com"===Shopify.shop&&(document.querySelectorAll('form[action*="/cart/add"] [data-product-atc][type="button"]').length?a=document.querySelectorAll('form[action*="/cart/add"] [data-product-atc][type="button"]'):console.log("NOT FOUND")),"supremedigital-net.myshopify.com"===Shopify.shop&&document.querySelectorAll("[class*='product-form__submit button button--full-width button--secondary']").length){let e=Array.from(document.querySelectorAll("[class*='product-form__submit button button--full-width button--secondary']"));e.shift(),a=e}return"artsbynumber.myshopify.com"===Shopify.shop&&document.querySelectorAll(".custom-add-to-cart").length&&(a=document.querySelectorAll(".custom-add-to-cart")),"perfect-eyelash-hq.myshopify.com"===Shopify.shop&&document.querySelectorAll("sesami-custom-button").length&&(a=document.querySelector("sesami-custom-button")),"227c20-2.myshopify.com"===Shopify.shop&"home"===t&&document.querySelector('form[action*="/cart/add"]')&&(a=document.querySelectorAll('form[action*="/cart/add"] button[name="add"]')),"devill-arts.myshopify.com"===Shopify.shop&&document.querySelector("[name='qbk-add-to-cart']")&&(a=document.querySelectorAll("[name='qbk-add-to-cart']")),"706d99.myshopify.com"!==Shopify.shop&&"ba94b2-5.myshopify.com"!==Shopify.shop||document.querySelector(".gp-button-atc")&&(a=document.querySelectorAll(".gp-button-atc")),"553272-4.myshopify.com"!==Shopify.shop&&"45b71d-2.myshopify.com"!==Shopify.shop||document.querySelector("#tcustomizer-add")&&(a=document.querySelectorAll("#tcustomizer-add")),"zeeprint-2.myshopify.com"===Shopify.shop&&document.querySelectorAll(".btn--add-to-cart").length&&(a=document.querySelectorAll(".btn--add-to-cart")),"yavibera.myshopify.com"===Shopify.shop&&document.querySelector(".add2cart button")&&(o=1,a=document.querySelectorAll(".add2cart button")),"441996-3.myshopify.com"!==Shopify.shop&&"1bdd9d.myshopify.com"!==Shopify.shop||document.querySelector(".btn--add-to-cart")&&(o=0,a=document.querySelectorAll(".btn--add-to-cart")),"crystalninja.myshopify.com"===Shopify.shop&&(o=0,a=document.querySelectorAll("#signpanda-btn")),"972758-2.myshopify.com"===Shopify.shop&&(o=5),"8f873c-4.myshopify.com"===Shopify.shop&&(o=0,a=document.querySelectorAll('[data-checkout="cart"]')),"ba7acf-d5.myshopify.com"===Shopify.shop&&(o=0,a=document.querySelectorAll(".btn--add-to-cart")),"contact-mylinkapp.myshopify.com"===Shopify.shop&&(o=1),"6406d9-62.myshopify.com"===Shopify.shop&&document.querySelector("#new-form-atc")&&(a=document.querySelectorAll("#new-form-atc"),o=0),"cotton-paperie-letterpress.myshopify.com"===Shopify.shop&&document.querySelectorAll("[data-btn-addtocart]").length&&(a=document.querySelectorAll("[data-btn-addtocart]"),o=0),"b59ce6-1f.myshopify.com"===Shopify.shop&&document.querySelector("#tcustomizer-add")&&(a=document.querySelectorAll("#tcustomizer-add"),o=0),"paint-by-numbers-armando.myshopify.com"===Shopify.shop&&document.querySelector("[data-product-add-to-cart]")&&(a=document.querySelectorAll("[data-product-add-to-cart]"),o=0),"01d30e-f5.myshopify.com"!==Shopify.shop&&"7ff792-51.myshopify.com"!==Shopify.shop&&"ca-tuning.myshopify.com"!==Shopify.shop||document.querySelector("#tcustomizer-add")&&(a=document.querySelectorAll("#tcustomizer-add"),o=0),"d88e85-ca.myshopify.com"===Shopify.shop&&document.querySelector(".product__add-to-cart")&&(a=document.querySelectorAll(".product__add-to-cart"),o=0),"6573d9-5.myshopify.com"===Shopify.shop&&document.querySelector("[data-cloned-atc]")&&(a=document.querySelectorAll("[data-cloned-atc]"),o=0),"06c0eb-ed.myshopify.com"===Shopify.shop&&document.querySelector(".js-product-add-to-cart ")&&(a=document.querySelectorAll(".js-product-add-to-cart "),o=0),"40862f-04.myshopify.com"===Shopify.shop&&document.querySelectorAll(".cowlendar-btn.product-form__submit").length&&(a=document.querySelectorAll(".cowlendar-btn.product-form__submit"),o=0),"f1040d-c6.myshopify.com"===Shopify.shop&&(o=1),"4acebe-67.myshopify.com"===Shopify.shop&&document.querySelectorAll("#product-information-cart-button").length&&(a=document.querySelectorAll("#product-information-cart-button"),o=0),a[o]},f=(e=window.__st.rid,t="product")=>{let i=window.ph_jq;if(!d(e,t))return;const o=c(),a=m(e,t);document.querySelectorAll(`[data-ph-cart-clone][data-ph-product='${e}']`).forEach((e=>e.remove())),a&&("0a3e90.myshopify.com"===Shopify.shop&&window.hide_atc_interval&&clearInterval(window.hide_atc_interval),"yavibera.myshopify.com"===Shopify.shop&&window.hide_atc_interval&&clearInterval(window.hide_atc_interval),"733dfe.myshopify.com"===Shopify.shop||"studio-road.myshopify.com"===Shopify.shop||"shopmast-in.myshopify.com"===Shopify.shop||"artsbynumber.myshopify.com"===Shopify.shop||"d10e3f-ab.myshopify.com"===Shopify.shop||"6573d9-5.myshopify.com"===Shopify.shop||"oznic-pouch.myshopify.com"===Shopify.shop?a.style.display="flex":a.style.display="unset",a.style.opacity="1"),"ba94b2-5.myshopify.com"===window.Shopify.shop&&(a.style.cssText="--hvr-bg:var(--g-c-highlight, highlight);--bg:#D172BB;--shadow:none;--w:100%;--w-tablet:100%;--w-mobile:100%;--h:Auto;--h-tablet:Auto;--h-mobile:Auto;--pl:24px;--pr:24px;--pt:8px;--pb:8px;--pl-mobile:24px;--pr-mobile:24px;--pt-mobile:8px;--pb-mobile:8px;--c:var(--g-c-text-3, text-3);--size:16px;--size-tablet:16px;--size-mobile:14px;--ff:var(--g-font-Urbanist, 'Urbanist'), var(--g-font-body, body);--weight:400;--lh:180%;--lh-tablet:180%;--lh-mobile:180%"),setTimeout((()=>{i(`${o} button, ${o} input`).css({opacity:"1"}),0===document.querySelectorAll("[src*='https://inspon-app.com/textfield/backend/js/page_script.js']").length&&i(`${o} .shopify-payment-button__button`).show()}),500),window.window.ph_globals[e].ph_alertChecker=0,i("[id^=alertBox_]").hide(),i(`${o} :input`).prop("disabled",!1),"customcanvas-de.myshopify.com"===Shopify.shop?i(o).unbind("submit",(function(e){e.preventDefault()})):i(o).unbind("submit"),i(`${o} .product-form__item select, ${o} .selector-wrapper select`).prop("disabled",!1),i("[data-error-message-wrapper], .errors, .notification--error ").hide(),u(e,t),document.querySelectorAll("[data-cloned='more-payments-links']").forEach((e=>e.remove())),document.querySelectorAll(".shopify-payment-button__more-options").forEach((e=>e.style.display="block"))},h=e=>{"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="999999998");let t=document.createElement("div");t.setAttribute("id","fileRequiredPopup"),t.style.cssText="position: fixed !important; width: 100% !important; height: 100% !important; z-index: 2147483647 !important; background: #00000082 !important; display: flex !important; justify-content: center !important; align-items: center !important;";let i=document.createElement("div");i.style.cssText="text-align: right !important;padding: 1em !important;background: #fff !important; width: 300px !important;";let o=document.createElement("p");o.innerHTML=UPLOADCARE_DATA[e].fileRequiredMessage,o.style.cssText="color: #000 !important; text-align: left !important; margin-bottom: 1em !important; margin-top: 0px !important;",o.setAttribute("id","fileRequiredErrorText");let a=document.createElement("button");a.style.cssText=`background: ${UPLOADCARE_DATA[e].buttonBg} !important; color: ${UPLOADCARE_DATA[e].buttonCol} !important; border: none !important; padding: 10px 15px !important; border-radius: 5px !important; cursor: pointer !important;width: auto !important; min-width: 60px !important; max-width: 120px !important; break-word: break-all !important; line-height: unset !important; height: unset !important; margin-bottom: unset !important;`,a.setAttribute("id","fileRequiredErrorButton"),a.innerHTML=UPLOADCARE_DATA[e].fileRequiredMessageButtonText,a.addEventListener("click",(function(){"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="9999999998"),document.querySelector("#fileRequiredPopup").remove()})),i.append(o),i.append(a),t.append(i),document.querySelector("body").prepend(t)},g=e=>{"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="999999998");let t=document.createElement("div");t.setAttribute("id","textFieldRequiredPopup"),t.style.cssText="position: fixed !important; width: 100% !important; height: 100% !important; z-index: 2147483647 !important; background: #00000082 !important; display: flex !important; justify-content: center !important; align-items: center !important;";let i=document.createElement("div");i.style.cssText="text-align: right !important;padding: 1em !important;background: #fff !important; width: 300px !important;";let o=document.createElement("p");o.innerHTML=UPLOADCARE_DATA[e].textFieldRequiredMessage,o.style.cssText="text-align: left !important; margin-top: 0px !important; margin-bottom: 1em !important; color: #000 !important;",o.setAttribute("id","textFieldRequiredErrorText");let a=document.createElement("button");a.style.cssText=`background: ${UPLOADCARE_DATA[e].buttonBg} !important; color: ${UPLOADCARE_DATA[e].buttonCol} !important; border: none !important; padding: 10px 15px !important; border-radius: 5px !important; cursor: pointer !important;width: auto !important; min-width: 60px !important; max-width: 120px !important; break-word: break-all !important;`,a.setAttribute("id","textFieldRequiredErrorButton"),a.innerHTML=UPLOADCARE_DATA[e].textFieldrequiredMessageButtonText,a.addEventListener("click",(function(){"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="9999999998"),document.querySelector("#textFieldRequiredPopup").remove()})),i.append(o),i.append(a),t.append(i),document.querySelector("body").prepend(t)},y=(e="product",t=window.__st.rid,i)=>{let o=window.ph_jq;const a=m(t,e),n=c();let r="home"===e?".photoupload_"+t:"",l="home"===e?".photoupload_"+t:n,s="home"===e?`[class='photoupload_${t}']`:"";const p=a;if(p&&0===document.querySelectorAll(`[data-ph-cart-clone][data-ph-product='${t}']`).length){const i=((e=window.__st.rid,t="product",i)=>{const o=getComputedStyle(i),a=getComputedStyle(i,":after"),n=getComputedStyle(i,":before");let r="",l="";const s=document.createElement("div");if("arielidesigns.myshopify.com"!==Shopify.shop&&s.classList.add("button"),s.classList.add("ph_clone_atc_btn"),s.setAttribute("data-ph-cart-clone",!0),s.setAttribute("data-ph-product",e),s.innerHTML=i.innerHTML,"icon-pop-quadri.myshopify.com"===Shopify.shop&&(s.innerHTML="Aggiungi al carrello"),s.querySelector(".loading-spinner")&&s.querySelector(".loading-spinner").remove(),s.querySelector("[class^='#spinner']")&&s.querySelector("[class^='#spinner']").remove(),Array.from(o).forEach((e=>{s.style.setProperty(e,o.getPropertyValue(e),o.getPropertyPriority(e))})),Array.from(a).forEach((e=>{r+=`${e}:${a.getPropertyValue(e)};`})),Array.from(n).forEach((e=>{l+=`${e}:${n.getPropertyValue(e)};`})),document.querySelectorAll("[data_ph_dialog_styles]").length>0){document.querySelector("[data_ph_dialog_styles]").innerHTML+=`.ph_clone_atc_btn:before{${l}};`;const e=document.createElement("style");e.innerHTML=`.ph_clone_atc_btn:after{${r}};`,document.head.appendChild(e)}return"972758-2.myshopify.com"===Shopify.shop&&(i.classList.add("atc_styles"),document.querySelector("gp-button")&&(s.style.border="solid 2px #000")),"gujjuguy-com.myshopify.com"!==Shopify.shop&&"c74d78.myshopify.com"!==Shopify.shop||(s.style.webkitTextFillColor="#fff",s.style.display="flex",s.style.alignItems="center"),"admendk.myshopify.com"===Shopify.shop&&(s.style.visibility="visible",s.style.position="unset"),i.value&&(s.innerText=i.value,"doityourselftransfers.myshopify.com"!==Shopify.shop?s.style.height="auto":s.style.alignItems="center"),s.style.display="colorato-drinks.myshopify.com"===Shopify.shop?"inline":"admendk.myshopify.com"===Shopify.shop?"inline-block":"yavibera.myshopify.com"===Shopify.shop?"inline-flex":"flex","admendk.myshopify.com"!==Shopify.shop&&"tykult-and-co.myshopify.com"!==Shopify.shop||s.children[1].remove(),"oznic-pouch.myshopify.com"===Shopify.shop&&s.children[2].remove(),"4acebe-67.myshopify.com"===Shopify.shop&&s.classList.add("btn"),"printmine-main.myshopify.com"===Shopify.shop&&s.children[0].remove(),"ediblecakeimage.myshopify.com"!==Shopify.shop&&"a64d7c.myshopify.com"!==Shopify.shop||(s.style.padding="1em",s.querySelector("svg").style.width="20px",s.querySelector("span").style.fontSize="1em",s.querySelector("span").style.marginLeft="0.5em"),"roses-fabrics-and-handmade.myshopify.com"===Shopify.shop&&(s.style.width="100%",s.style.alignItems="center"),s.classList.add("atc_styles"),s.style.justifyContent="center",s})(t,e,p);p&&(p.parentNode.insertBefore(i,p.nextSibling),i.addEventListener("click",(function(){if(setTimeout((function(){o(`${r}[data-error-message-wrapper], ${r} .errors, .notification--error `).hide(),o(".icon-error")&&o(".icon-error").hide(),o("p:contains('Required parameter missing or invalid: items')").length>0&&o("p:contains('Required parameter missing or invalid: items')").hide(),o("span:contains('Required parameter missing or invalid: items')").length>0&&o("span:contains('Required parameter missing or invalid: items')").hide()}),800),o("header").css({"z-index":""}),window.ph_globals[t].fileUploadRequired){const i=window.ph_globals[t].fileUploadRequiredIds.filter((e=>document.querySelector(`${r} #selBtn_${e}`)&&"none"!==document.querySelector(`${r} #selBtn_${e}`)?.style?.display));for(let o of i)if(0===document.querySelector(`${r} #previewImages_${o}`).children.length){h(o),b(o,t,e);break}}if(window.ph_globals[t].textFieldRequired){const e=window.ph_globals[t].textFieldRequiredIds.filter((e=>"none"!==document.querySelector(`${r} #selBtn_${e.split("_")[0]}`).style.display&&document.querySelector(`${r} #textArea_${e.split("_").join("")}`)));for(let t of e)if(0===document.querySelector(`${r} #textArea_${t.split("_").join("")}`).value.length){g(t.split("_")[0]);break}}}))),document.querySelectorAll("[data_ph_dialog_styles]").length>0&&(document.querySelector("[data_ph_dialog_styles]").innerHTML+=`.ph_atc_btn{${p.getAttribute("style")}}`),p.classList.add("ph_atc_btn"),p.style.cssText="display: none !important","0a3e90.myshopify.com"===Shopify.shop&&(window.hide_atc_interval=setInterval((()=>{p.style.cssText="display: none !important"}),100)),"yavibera.myshopify.com"===Shopify.shop&&(window.hide_atc_interval=setInterval((()=>{document.querySelector(".add2cart button")&&(document.querySelectorAll(".add2cart button")[1].style.cssText="display: none !important")}),100))}window.window.ph_globals[t].ph_alertChecker=1,0===document.querySelectorAll("[src*='https://inspon-app.com/textfield/backend/js/page_script.js']").length&&o(l+" :input").not(r+" [id^=textArea_]").not(r+" [id^=textFieldTextArea_]").prop("disabled",!0),o(r+' :input[type="radio"]').prop("disabled",!1),o(r+" button").prop("disabled",!1),o("form"+s+'[action*="/cart/add"] button'+s+'[type="submit"], form'+s+'[action*="/cart/add"] input'+s+'[type="submit"]').css({opacity:"0.6"}),document.querySelectorAll(n+" .product-form__item select, "+n+" .selector-wrapper select, "+n+" button, "+n+" input[type='submit'], "+n+" input[type='radio'], "+n+" input[type='checkbox'], "+n+" [id^=textFieldTextArea_], "+n+" button[name='add'], "+n+" input[name='add'], "+n+" fieldset, "+n+" .single-option-selector, [id^='SingleOptionSelector'], [name^='quantity'], .select-dropdown, .option-selectors select, .select__select, .options-selection__input-select, .po-option--container input, pf-option-swatches select, gp-product-property input, .product-form__controls-group select, .expo-option-wrapper textarea, .product-field input, .product-field textarea, [data-item-property-field] textarea, [data-item-property-field] input, .dbtfy-list-property-fields input, .product-options select, #itoris_dynamicproductoptions input, #itoris_dynamicproductoptions select, .product-details__options select, .customization-fields input, .customization-fields textarea, .product__swatches select, [data-product-option-selector], .g-selector-container input").forEach((function(e){e.disabled=!1})),o(`${n}${s} [id^=textArea_], ${n}${s} :input[type="radio"], ${n}${s} button, ${n}${s} .product-form__item select, ${n}${s} .selector-wrapper select${s}, #registration${s}, .product__quantity${s}, .input--small.full.required${s}, #productSelect-op0${s}, #productSelect-op1${s}, .spb-select select${s}, .js-quantity-selector${s},#specialreq${s}, select[data-type="separately"]${s}, .quantity__input${s}, .quantity-selector${s}, [id^='textFieldTextArea'], .ma-custom-field-group input, #launchtip_upsell_select_wrapper input, .quantity input, [class*='product-recommendations'] :input, .options-selection__input-select, .po-option--container input, .pf-option-swatches select, gp-product-property input, .product-field input, .product-field textarea, [data-item-property-field] textarea, [data-item-property-field] input, .product-form__controls-group select, .expo-option-wrapper textarea, [name^='uploader_'], .product__variants-select select, gp-product-variants select, #itoris_dynamicproductoptions input, #itoris_dynamicproductoptions select, .product-details__options select, .customization-fields input, .product__swatches select, [data-product-option-selector], .g-selector-container input`).not("[data-original-button]").not("data-clone-button").prop("disabled",!1),o("[class*='product-recommendations'] :input").css("opacity","1"),o(".product-status-message, [data-error-message-wrapper], .errors, .notification--error, p:contains('Required parameter missing or invalid: items'), span:contains('Required parameter missing or invalid: items')").remove();let d=setInterval((()=>{document.querySelectorAll(".shopify-payment-button__more-options").length&&(document.querySelectorAll(".shopify-payment-button__more-options").forEach((e=>e.style.display="none")),clearInterval(d))}),100)},b=(e,t=window.__st.rid,i="product")=>{d(t,i)?f(t,i):y(i,t)},v=(e,t=window.__st.rid,i="product")=>{let o=window.ph_jq,a="";if("Full"===e.buttonWidth)if("home"===i)a=o(`button[type="submit"][data-ph-product-id="${t}"]`).parents("form").width(),a+="px";else{let e;if(document.querySelector(`[data-ph-cart-clone="true"][data-ph-product="${t}"]`))e=o(`[data-ph-cart-clone="true"][data-ph-product="${t}"]`).parents("form").width();else{let a=m(t,i);e="49b6f0.myshopify.com"===Shopify.shop?a.offsetWidth:o(a).parents("form").width()}a=0===e?"100%":e+"px"}else a="auto";return a},x=(e,t,i,o)=>{window.ph_jq;const a=c();var n=document.querySelectorAll("#photouploadapp").length;if(n>0)document.querySelector("#photouploadapp").append(i),document.querySelector("#photouploadapp").append(o);else if(0===n){n=1;var r=document.createElement("DIV");r.setAttribute("id","photouploadapp"),r.append(i),r.append(o),r.style.width="100%";var l=document.querySelectorAll(a)[0].outerHTML.includes("quantity"),s=document.querySelectorAll(a)[0].outerHTML.includes("Quantity"),p=document.querySelectorAll(a)[0].outerHTML.includes("qty"),d=document.querySelectorAll(a)[0].outerHTML.includes("Qty"),u=!1;if(!0===l||!0===s||!0===p||!0===d){var m=document.querySelector(a).querySelectorAll("div,label,button");for(const U of m){var f=U.outerHTML.includes("quantity"),h=U.outerHTML.includes("Quantity"),g=U.outerHTML.includes("qty"),y=U.outerHTML.includes("Qty"),b=U.parentElement,v=U.parentElement.parentElement;if(!0===f||!0===h||!0===g||!0===y){var x=U.getAttribute("class"),w=U.getAttribute("id"),_=U.getAttribute("for");if(null!=x&&x.includes("quantity")||null!=x&&x.includes("Quantity")||null!=x&&x.includes("qty")||null!=x&&x.includes("Qty")||null!=w&&w.includes("quantity")||null!=w&&w.includes("Quantity")||null!=w&&w.includes("qty")||null!=w&&w.includes("Qty")||null!=_&&_.includes("qty")||null!=_&&_.includes("Qty")||null!=_&&_.includes("quantity")||null!=_&&_.includes("Quantity")){if(console.log("QT CHECKER",f,h,g,y,u),"product-qty selector-wrapper"===x&&!1===u||"product-form__info-item product-form__info-item--quantity"===x&&!1===u){if("product-form__info-item product-form__info-item--quantity"===x){U.parentNode.insertBefore(r,U),U.parentElement.style.display="block",u=!0;break}U.parentNode.insertBefore(r,U),u=!0;break}if(null!==U.previousElementSibling&&void 0!==U.previousElementSibling){var A=U.previousElementSibling.nodeName;if(((A=A.toLowerCase()).includes("label")||A.includes("h6"))&&!1===u){U.previousElementSibling.parentNode.insertBefore(r,U.previousElementSibling),u=!0;break}}if(U.parentElement.offsetWidth<document.querySelector(a).offsetWidth&&U.parentElement.offsetWidth<200&&!1===u){if("three"===v.getAttribute("class")||"product-option-column-1 product-option-row-1 product-option-quantity-label"===U.getAttribute("class")){b.parentNode.insertBefore(r,b),u=!0;break}if(!0===b.getAttribute("class").includes("clearfix")||!0===b.getAttribute("class").includes("product__buy")||!0===b.getAttribute("class").includes("product-form__submit-button-wrapper")){b.parentNode.insertBefore(r,b),u=!0;break}b.style.display="block",b.parentNode.insertBefore(r,b),u=!0;break}if(b.offsetHeight<100&&!1===u){if(void 0!==b.getAttribute("class")&&"quantity-selector-holder"===b.getAttribute("class")||"form__label"===b.getAttribute("class")){b.parentNode.insertBefore(r,b),u=!0;break}if("item"===b.getAttribute("class")&&void 0!==b.getAttribute("class")){U.parentNode.insertBefore(r,U),u=!0;break}if(b.offsetHeight<100&&"product-menu-buttons-addtocart"===b.getAttribute("class")){b.style.minHeight="300px",b.style.maxHeight="max-content",b.style.height="100px",b.style.overflow="scroll",U.parentNode.insertBefore(r,U),u=!0;break}if("product-form__item product-form__quantity-selector"===b.getAttribute("class")){b.parentNode.insertBefore(r,b),u=!0;break}if(null!==document.querySelector(".product-form__item.product-form__quantity")&&null!==document.querySelector(".product-form__controls-group")&&(b.style.width="100%"),b.getAttribute("class").includes("product-quantity form-group d-flex")){b.parentNode.insertBefore(r,b),u=!0;break}if(b.getAttribute("class").includes("product__quantity border--active")){b.parentNode.insertBefore(r,b),u=!0;break}U.parentNode.insertBefore(r,U),u=!0;break}if(document.querySelector(a).children.length<=3&&!1===u){var k=document.querySelector(a).querySelectorAll("div");for(const j of k)if((void 0!==j.getAttribute("class")&&null!==j.getAttribute("class")||void 0!==j.getAttribute("id")&&null!==j.getAttribute("id")||void 0!==j.getAttribute("for")&&null!==j.getAttribute("for"))&&(j.getAttribute("class").includes("quantity")||j.getAttribute("class").includes("Quantity")||j.getAttribute("class").includes("qty")||j.getAttribute("class").includes("Qty")||void 0!==j.getAttribute("id")||null!==j.getAttribute("id")||j.getAttribute("id").includes("quantity")||j.getAttribute("id").includes("Quantity")||j.getAttribute("id").includes("qty")||j.getAttribute("id").includes("Qty")||j.getAttribute("for").includes("qty")||j.getAttribute("for").includes("Qty")||j.getAttribute("for").includes("quantity")||j.getAttribute("for").includes("Quantity"))){if("qty-adjuster"===j.getAttribute("class")){j.previousElementSibling.parentNode.insertBefore(r,j.previousElementSibling),u=!0;break}if("desc_blk"===j.getAttribute("class")){var T=document.querySelector(".rte.main-product-description-product");r.style.padding="0 25px",T.parentNode.insertBefore(r,T),u=!0;break}if("product-form__inner"===j.getAttribute("class")){(T=document.querySelector(".product__border")).parentNode.insertBefore(r,T),u=!0;break}if(j.getAttribute("class").includes("product-details")){(T=document.querySelector('select[name="id"]')).parentNode.insertBefore(r,T),u=!0;break}j.parentNode.insertBefore(r,j),u=!0;break}if(!0===u)break}if(!1===u)if(null!==U.previousElementSibling&&void 0!==U.previousElementSibling){if("P"===U.previousElementSibling.nodeName){U.previousElementSibling.parentNode.insertBefore(r,U.previousElementSibling),u=!0;break}}else if(!1===u){U.parentNode.insertBefore(r,U),"number-input-wrapper product-quantity clearfix"===x&&(document.querySelector(".product-options").style.marginBottom="70px"),"form__control product__quantity"===x&&"product__buy"===b.getAttribute("class")&&(b.style.display="block"),u=!0;break}}else if(!1===u&&"product__cart-functions"===x){if(void 0!==U.children[1]&&null!==U.children[1]){U.children[1].parentNode.insertBefore(r,U.children[1]),u=!0;break}}else if(!1===U.outerHTML.includes('name="quantity"')&&!1===u){var S=document.querySelector(a).querySelectorAll("input, button");for(const M of S){document.querySelectorAll(a)[0].outerHTML.includes('type="submit"');var E=M.getAttribute("name"),C=M.getAttribute("type");if("product-details__add-to-cart-button"===M.getAttribute("class")){M.parentElement.parentNode.insertBefore(r,M.parentElement),r.style.display="flex",r.style.justifyContent="center",u=!0;break}if("button"===C&&"select-popout__toggle"===M.getAttribute("class")){(T=document.querySelector(".select__fieldset")).parentNode.insertBefore(r,T),u=!0;break}if(("submit"===C||"add"===E)&&!1===u){M.parentNode.insertBefore(r,M),u=!0;break}}if(!0===u)break}}else if(!1===l&&!1===s&&!1===p&&!1===d){if(!1!==u)break;S=document.querySelector(a).querySelectorAll("input, button");for(const $ of S)if(document.querySelectorAll(a)[0].outerHTML.includes('type="submit"'),E=$.getAttribute("name"),C=$.getAttribute("type"),("submit"===C||"add"===E)&&!1===u){$.parentNode.insertBefore(r,$),u=!0;break}if(!0===u)break}}if(!1===u){var L=document.querySelector(a).querySelectorAll('input[name="quantity"]');for(const O of L){function I(e){for(var t=[];e.parentNode&&"body"!=e.parentNode.nodeName.toLowerCase();)e=e.parentNode,t.push(e);return t}if(b=O.parentElement,v=I(b)[0],x=O.getAttribute("class"),w=O.getAttribute("id"),_=O.getAttribute("for"),"product-form--variants"===b.getAttribute("class")&&"product-form--price-container"===b.previousElementSibling.getAttribute("class")&&!1===u){O.parentNode.insertBefore(r,O),u=!0;break}if("/cart/add"===b.getAttribute("action")&&void 0!==b.getAttribute("action")&&!1===u){if(!0===b.getAttribute("action").includes("/cart/add")&&!1===u){O.parentNode.insertBefore(r,O),u=!0;break}}else{if("tt-input-counter style-01"===b.getAttribute("class")){T=document.querySelector(".tt-row-custom-01"),r.style.marginBottom="40px",T.parentNode.insertBefore(r,T),u=!0;break}S=document.querySelector(a).querySelectorAll("input, button");for(const P of S){document.querySelectorAll(a)[0].outerHTML.includes('type="submit"'),E=P.getAttribute("name"),C=P.getAttribute("type");var q=P.getAttribute("value"),z=P.getAttribute("class");if(("submit"===C||"add"===E||"Add to cart"===q||"product-form--add-to-cart"===z)&&!1===u){if("product-form--add-to-cart"===z){P.parentElement.parentNode.insertBefore(r,P.parentElement),u=!0;break}P.parentNode.insertBefore(r,P),u=!0;break}}if(!0===u)break}}0===L.length&&((R=document.querySelector(a+" .product-buy-buttons--primary")).parentNode.insertBefore(r,R),u=!0)}}else if(S=document.querySelector(a).querySelectorAll("input, button"),document.querySelectorAll(a).length>1){var D=document.querySelectorAll(a);for(const F of D){if("add-to-cart-form"===F.getAttribute("data-type")){(R=document.querySelector(".product-form__buttons")).parentNode.insertBefore(r,R),u=!0;break}if("FORM"===F.nodeName&&"post"===F.getAttribute("method")&&"/cart/add"===F.getAttribute("action")){var R;(R=null===(R=null===(R=null===(R=null===(R=null===(R=null===(R=null!==document.querySelector(".purchase-details.smart-payment-button--true")?document.querySelector(".purchase-details.smart-payment-button--true"):null)?document.querySelector(".product-add"):R)?document.querySelector(".product-form"):R)?document.querySelector(".product__add-inner-container"):R)?document.querySelector(".product__cart-functions"):R)?document.querySelector(".qty-wrapper.qty-wrapper--with-payment-button"):R)?document.querySelector(".product__quantity-wrapper"):R)||document.querySelector("#product-add-to-cart")&&(R=document.querySelector("#product-add-to-cart").parentNode),R.parentNode.insertBefore(r,R),u=!0;break}}}else for(const N of S)if(document.querySelectorAll(a)[0].outerHTML.includes('type="submit"'),E=N.getAttribute("name"),C=N.getAttribute("type"),b=N.parentElement,("submit"===C||"add"===E)&&!1===u){if("payment-buttons-container"===b.getAttribute("class")){b.parentNode.insertBefore(r,b),u=!0;break}N.parentNode.insertBefore(r,N),u=!0;break}}return!0},w=e=>{if(0==e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)));return Math.round(e/Math.pow(1024,t),2)+" "+["Bytes","KB","MB","GB","TB"][t]},_={123:"application/vnd.lotus-1-2-3","1km":"application/vnd.1000minds.decision-model+xml","3dm":"x-world/x-3dmf","3dml":"text/vnd.in3d.3dml","3ds":"image/x-3ds","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf","7z":"application/x-7z-compressed",aab:"application/x-authorware-bin",aac:"audio/x-aac",aam:"application/x-authorware-map",aas:"application/x-authorware-seg",abw:"application/x-abiword",ac:"application/vnd.nokia.n-gage.ac+xml",acc:"application/vnd.americandynamics.acc",ace:"application/x-ace-compressed",acu:"application/vnd.acucobol",acutc:"application/vnd.acucorp",adp:"audio/adpcm",aep:"application/vnd.audiograph",afm:"application/x-font-type1",afp:"application/vnd.ibm.modcap",age:"application/vnd.age",ahead:"application/vnd.ahead.space",ai:"application/postscript",aif:"audio/x-aiff",aifc:"audio/x-aiff",aiff:"audio/x-aiff",air:"application/vnd.adobe.air-application-installer-package+zip",ait:"application/vnd.dvb.ait",ami:"application/vnd.amiga.ami",amr:"audio/amr",apk:"application/vnd.android.package-archive",apng:"image/apng",appcache:"text/cache-manifest",application:"application/x-ms-application",apr:"application/vnd.lotus-approach",arc:"application/x-freearc",arj:"application/x-arj",asc:"application/pgp-signature",asf:"video/x-ms-asf",asm:"text/x-asm",aso:"application/vnd.accpac.simply.aso",asx:"video/x-ms-asf",atc:"application/vnd.acucorp",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomdeleted:"application/atomdeleted+xml",atomsvc:"application/atomsvc+xml",atx:"application/vnd.antix.game-component",au:"audio/basic",avi:"video/x-msvideo",avif:"image/avif",aw:"application/applixware",azf:"application/vnd.airzip.filesecure.azf",azs:"application/vnd.airzip.filesecure.azs",azv:"image/vnd.airzip.accelerator.azv",azw:"application/vnd.amazon.ebook",b16:"image/vnd.pco.b16",bat:"application/x-msdownload",bcpio:"application/x-bcpio",bdf:"application/x-font-bdf",bdm:"application/vnd.syncml.dm+wbxml",bdoc:"application/x-bdoc",bed:"application/vnd.realvnc.bed",bh2:"application/vnd.fujitsu.oasysprs",bin:"application/octet-stream",blb:"application/x-blorb",blorb:"application/x-blorb",bmi:"application/vnd.bmi",bmml:"application/vnd.balsamiq.bmml+xml",bmp:"image/x-ms-bmp",book:"application/vnd.framemaker",box:"application/vnd.previewsystems.box",boz:"application/x-bzip2",bpk:"application/octet-stream",bsp:"model/vnd.valve.source.compiled-map",btif:"image/prs.btif",buffer:"application/octet-stream",bz:"application/x-bzip",bz2:"application/x-bzip2",c:"text/x-c",c11amc:"application/vnd.cluetrust.cartomobile-config",c11amz:"application/vnd.cluetrust.cartomobile-config-pkg",c4d:"application/vnd.clonk.c4group",c4f:"application/vnd.clonk.c4group",c4g:"application/vnd.clonk.c4group",c4p:"application/vnd.clonk.c4group",c4u:"application/vnd.clonk.c4group",cab:"application/vnd.ms-cab-compressed",caf:"audio/x-caf",cap:"application/vnd.tcpdump.pcap",car:"application/vnd.curl.car",cat:"application/vnd.ms-pki.seccat",cb7:"application/x-cbr",cba:"application/x-cbr",cbr:"application/x-cbr",cbt:"application/x-cbr",cbz:"application/x-cbr",cc:"text/x-c",cco:"application/x-cocoa",cct:"application/x-director",ccxml:"application/ccxml+xml",cdbcmsg:"application/vnd.contact.cmsg",cdf:"application/x-netcdf",cdfx:"application/cdfx+xml",cdkey:"application/vnd.mediastation.cdkey",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cdx:"chemical/x-cdx",cdxml:"application/vnd.chemdraw+xml",cdy:"application/vnd.cinderella",cer:"application/pkix-cert",cfs:"application/x-cfs-compressed",cgm:"image/cgm",chat:"application/x-chat",chm:"application/vnd.ms-htmlhelp",chrt:"application/vnd.kde.kchart",cif:"chemical/x-cif",cii:"application/vnd.anser-web-certificate-issue-initiation",cil:"application/vnd.ms-artgalry",cjs:"application/node",cla:"application/vnd.claymore",class:"application/java-vm",clkk:"application/vnd.crick.clicker.keyboard",clkp:"application/vnd.crick.clicker.palette",clkt:"application/vnd.crick.clicker.template",clkw:"application/vnd.crick.clicker.wordbank",clkx:"application/vnd.crick.clicker",clp:"application/x-msclip",cmc:"application/vnd.cosmocaller",cmdf:"chemical/x-cmdf",cml:"chemical/x-cml",cmp:"application/vnd.yellowriver-custom-menu",cmx:"image/x-cmx",cod:"application/vnd.rim.cod",coffee:"text/coffeescript",com:"application/x-msdownload",conf:"text/plain",cpio:"application/x-cpio",cpp:"text/x-c",cpt:"application/mac-compactpro",crd:"application/x-mscardfile",crl:"application/pkix-crl",crt:"application/x-x509-ca-cert",crx:"application/x-chrome-extension",cryptonote:"application/vnd.rig.cryptonote",csh:"application/x-csh",csl:"application/vnd.citationstyles.style+xml",csml:"chemical/x-csml",csp:"application/vnd.commonspace",css:"text/css",cst:"application/x-director",csv:"text/csv",cu:"application/cu-seeme",curl:"text/vnd.curl",cww:"application/prs.cww",cxt:"application/x-director",cxx:"text/x-c",dae:"model/vnd.collada+xml",daf:"application/vnd.mobius.daf",dart:"application/vnd.dart",dataless:"application/vnd.fdsn.seed",davmount:"application/davmount+xml",dbf:"application/vnd.dbf",dbk:"application/docbook+xml",dcr:"application/x-director",dcurl:"text/vnd.curl.dcurl",dd2:"application/vnd.oma.dd2+xml",ddd:"application/vnd.fujixerox.ddd",ddf:"application/vnd.syncml.dmddf+xml",dds:"image/vnd.ms-dds",deb:"application/x-debian-package",def:"text/plain",deploy:"application/octet-stream",der:"application/x-x509-ca-cert",dfac:"application/vnd.dreamfactory",dgc:"application/x-dgc-compressed",dic:"text/x-c",dir:"application/x-director",dis:"application/vnd.mobius.dis","disposition-notification":"message/disposition-notification",dist:"application/octet-stream",distz:"application/octet-stream",djv:"image/vnd.djvu",djvu:"image/vnd.djvu",dll:"application/x-msdownload",dmg:"application/x-apple-diskimage",dmp:"application/vnd.tcpdump.pcap",dms:"application/octet-stream",dna:"application/vnd.dna",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",dp:"application/vnd.osgi.dp",dpg:"application/vnd.dpgraph",dra:"audio/vnd.dra",drle:"image/dicom-rle",dsc:"text/prs.lines.tag",dssc:"application/dssc+der",dtb:"application/x-dtbook+xml",dtd:"application/xml-dtd",dts:"audio/vnd.dts",dtshd:"audio/vnd.dts.hd",dump:"application/octet-stream",dvb:"video/vnd.dvb.file",dvi:"application/x-dvi",dwd:"application/atsc-dwd+xml",dwf:"model/vnd.dwf",dwg:"image/vnd.dwg",dxf:"image/vnd.dxf",dxp:"application/vnd.spotfire.dxp",dxr:"application/x-director",ear:"application/java-archive",ecelp4800:"audio/vnd.nuera.ecelp4800",ecelp7470:"audio/vnd.nuera.ecelp7470",ecelp9600:"audio/vnd.nuera.ecelp9600",ecma:"application/ecmascript",edm:"application/vnd.novadigm.edm",edx:"application/vnd.novadigm.edx",efif:"application/vnd.picsel",ei6:"application/vnd.pg.osasli",elc:"application/octet-stream",emf:"image/emf",eml:"message/rfc822",emma:"application/emma+xml",emotionml:"application/emotionml+xml",emz:"application/x-msmetafile",eol:"audio/vnd.digital-winds",eot:"application/vnd.ms-fontobject",eps:"application/postscript",epub:"application/epub+zip",es:"application/ecmascript",es3:"application/vnd.eszigno3+xml",esa:"application/vnd.osgi.subsystem",esf:"application/vnd.epson.esf",et3:"application/vnd.eszigno3+xml",etx:"text/x-setext",eva:"application/x-eva",evy:"application/x-envoy",exe:"application/x-msdownload",exi:"application/exi",exp:"application/express",exr:"image/aces",ext:"application/vnd.novadigm.ext",ez:"application/andrew-inset",ez2:"application/vnd.ezpix-album",ez3:"application/vnd.ezpix-package",f:"text/x-fortran",f4v:"video/x-f4v",f77:"text/x-fortran",f90:"text/x-fortran",fbs:"image/vnd.fastbidsheet",fcdt:"application/vnd.adobe.formscentral.fcdt",fcs:"application/vnd.isac.fcs",fdf:"application/vnd.fdf",fdt:"application/fdt+xml",fe_launch:"application/vnd.denovo.fcselayout-link",fg5:"application/vnd.fujitsu.oasysgp",fgd:"application/x-director",fh:"image/x-freehand",fh4:"image/x-freehand",fh5:"image/x-freehand",fh7:"image/x-freehand",fhc:"image/x-freehand",fig:"application/x-xfig",fits:"image/fits",flac:"audio/x-flac",fli:"video/x-fli",flo:"application/vnd.micrografx.flo",flv:"video/x-flv",flw:"application/vnd.kde.kivio",flx:"text/vnd.fmi.flexstor",fly:"text/vnd.fly",fm:"application/vnd.framemaker",fnc:"application/vnd.frogans.fnc",fo:"application/vnd.software602.filler.form+xml",for:"text/x-fortran",fpx:"image/vnd.fpx",frame:"application/vnd.framemaker",fsc:"application/vnd.fsc.weblaunch",fst:"image/vnd.fst",ftc:"application/vnd.fluxtime.clip",fti:"application/vnd.anser-web-funds-transfer-initiation",fvt:"video/vnd.fvt",fxp:"application/vnd.adobe.fxp",fxpl:"application/vnd.adobe.fxp",fzs:"application/vnd.fuzzysheet",g2w:"application/vnd.geoplan",g3:"image/g3fax",g3w:"application/vnd.geospace",gac:"application/vnd.groove-account",gam:"application/x-tads",gbr:"application/rpki-ghostbusters",gca:"application/x-gca-compressed",gdl:"model/vnd.gdl",gdoc:"application/vnd.google-apps.document",ged:"text/vnd.familysearch.gedcom",geo:"application/vnd.dynageo",geojson:"application/geo+json",gex:"application/vnd.geometry-explorer",ggb:"application/vnd.geogebra.file",ggt:"application/vnd.geogebra.tool",ghf:"application/vnd.groove-help",gif:"image/gif",gim:"application/vnd.groove-identity-message",glb:"model/gltf-binary",gltf:"model/gltf+json",gml:"application/gml+xml",gmx:"application/vnd.gmx",gnumeric:"application/x-gnumeric",gph:"application/vnd.flographit",gpx:"application/gpx+xml",gqf:"application/vnd.grafeq",gqs:"application/vnd.grafeq",gram:"application/srgs",gramps:"application/x-gramps-xml",gre:"application/vnd.geometry-explorer",grv:"application/vnd.groove-injector",grxml:"application/srgs+xml",gsf:"application/x-font-ghostscript",gsheet:"application/vnd.google-apps.spreadsheet",gslides:"application/vnd.google-apps.presentation",gtar:"application/x-gtar",gtm:"application/vnd.groove-tool-message",gtw:"model/vnd.gtw",gv:"text/vnd.graphviz",gxf:"application/gxf",gxt:"application/vnd.geonext",gz:"application/gzip",h:"text/x-c",h261:"video/h261",h263:"video/h263",h264:"video/h264",hal:"application/vnd.hal+xml",hbci:"application/vnd.hbci",hbs:"text/x-handlebars-template",hdd:"application/x-virtualbox-hdd",hdf:"application/x-hdf",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",held:"application/atsc-held+xml",hh:"text/x-c",hjson:"application/hjson",hlp:"application/winhlp",hpgl:"application/vnd.hp-hpgl",hpid:"application/vnd.hp-hpid",hps:"application/vnd.hp-hps",hqx:"application/mac-binhex40",hsj2:"image/hsj2",htc:"text/x-component",htke:"application/vnd.kenameaapp",htm:"text/html",html:"text/html",hvd:"application/vnd.yamaha.hv-dic",hvp:"application/vnd.yamaha.hv-voice",hvs:"application/vnd.yamaha.hv-script",i2g:"application/vnd.intergeo",icc:"application/vnd.iccprofile",ice:"x-conference/x-cooltalk",icm:"application/vnd.iccprofile",ico:"image/x-icon",ics:"text/calendar",ief:"image/ief",ifb:"text/calendar",ifm:"application/vnd.shana.informed.formdata",iges:"model/iges",igl:"application/vnd.igloader",igm:"application/vnd.insors.igm",igs:"model/iges",igx:"application/vnd.micrografx.igx",iif:"application/vnd.shana.informed.interchange",img:"application/octet-stream",imp:"application/vnd.accpac.simply.imp",ims:"application/vnd.ms-ims",in:"text/plain",ini:"text/plain",ink:"application/inkml+xml",inkml:"application/inkml+xml",install:"application/x-install-instructions",iota:"application/vnd.astraea-software.iota",ipfix:"application/ipfix",ipk:"application/vnd.shana.informed.package",irm:"application/vnd.ibm.rights-management",irp:"application/vnd.irepository.package+xml",iso:"application/x-iso9660-image",itp:"application/vnd.shana.informed.formtemplate",its:"application/its+xml",ivp:"application/vnd.immervision-ivp",ivu:"application/vnd.immervision-ivu",jad:"text/vnd.sun.j2me.app-descriptor",jade:"text/jade",jam:"application/vnd.jam",jar:"application/java-archive",jardiff:"application/x-java-archive-diff",java:"text/x-java-source",jhc:"image/jphc",jisp:"application/vnd.jisp",jls:"image/jls",jlt:"application/vnd.hp-jlyt",jng:"image/x-jng",jnlp:"application/x-java-jnlp-file",joda:"application/vnd.joost.joda-archive",jp2:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpf:"image/jpx",jpg:"image/jpeg",jpg2:"image/jp2",jpgm:"video/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"video/jpm",jpx:"image/jpx",js:"application/javascript",json:"application/json",json5:"application/json5",jsonld:"application/ld+json",jsonml:"application/jsonml+json",jsx:"text/jsx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:"audio/midi",karbon:"application/vnd.kde.karbon",kdbx:"application/x-keepass2",key:"application/x-iwork-keynote-sffkey",kfo:"application/vnd.kde.kformula",kia:"application/vnd.kidspiration",kml:"application/vnd.google-earth.kml+xml",kmz:"application/vnd.google-earth.kmz",kne:"application/vnd.kinar",knp:"application/vnd.kinar",kon:"application/vnd.kde.kontour",kpr:"application/vnd.kde.kpresenter",kpt:"application/vnd.kde.kpresenter",kpxx:"application/vnd.ds-keypoint",ksp:"application/vnd.kde.kspread",ktr:"application/vnd.kahootz",ktx:"image/ktx",ktx2:"image/ktx2",ktz:"application/vnd.kahootz",kwd:"application/vnd.kde.kword",kwt:"application/vnd.kde.kword",lasxml:"application/vnd.las.las+xml",latex:"application/x-latex",lbd:"application/vnd.llamagraphics.life-balance.desktop",lbe:"application/vnd.llamagraphics.life-balance.exchange+xml",les:"application/vnd.hhe.lesson-player",less:"text/less",lgr:"application/lgr+xml",lha:"application/x-lzh-compressed",link66:"application/vnd.route66.link66+xml",list:"text/plain",list3820:"application/vnd.ibm.modcap",listafp:"application/vnd.ibm.modcap",litcoffee:"text/coffeescript",lnk:"application/x-ms-shortcut",log:"text/plain",lostxml:"application/lost+xml",lrf:"application/octet-stream",lrm:"application/vnd.ms-lrm",ltf:"application/vnd.frogans.ltf",lua:"text/x-lua",luac:"application/x-lua-bytecode",lvp:"audio/vnd.lucent.voice",lwp:"application/vnd.lotus-wordpro",lzh:"application/x-lzh-compressed",m13:"application/x-msmediaview",m14:"application/x-msmediaview",m1v:"video/mpeg",m21:"application/mp21",m2a:"audio/mpeg",m2v:"video/mpeg",m3a:"audio/mpeg",m3u:"audio/x-mpegurl",m3u8:"application/vnd.apple.mpegurl",m4a:"audio/x-m4a",m4p:"application/mp4",m4s:"video/iso.segment",m4u:"video/vnd.mpegurl",m4v:"video/x-m4v",ma:"application/mathematica",mads:"application/mads+xml",maei:"application/mmt-aei+xml",mag:"application/vnd.ecowin.chart",maker:"application/vnd.framemaker",man:"text/troff",manifest:"text/cache-manifest",map:"application/json",mar:"application/octet-stream",markdown:"text/markdown",mathml:"application/mathml+xml",mb:"application/mathematica",mbk:"application/vnd.mobius.mbk",mbox:"application/mbox",mc1:"application/vnd.medcalcdata",mcd:"application/vnd.mcd",mcurl:"text/vnd.curl.mcurl",md:"text/markdown",mdb:"application/x-msaccess",mdi:"image/vnd.ms-modi",mdx:"text/mdx",me:"text/troff",mesh:"model/mesh",meta4:"application/metalink4+xml",metalink:"application/metalink+xml",mets:"application/mets+xml",mfm:"application/vnd.mfmp",mft:"application/rpki-manifest",mgp:"application/vnd.osgeo.mapguide.package",mgz:"application/vnd.proteus.magazine",mid:"audio/midi",midi:"audio/midi",mie:"application/x-mie",mif:"application/vnd.mif",mime:"message/rfc822",mj2:"video/mj2",mjp2:"video/mj2",mjs:"application/javascript",mk3d:"video/x-matroska",mka:"audio/x-matroska",mkd:"text/x-markdown",mks:"video/x-matroska",mkv:"video/x-matroska",mlp:"application/vnd.dolby.mlp",mmd:"application/vnd.chipnuts.karaoke-mmd",mmf:"application/vnd.smaf",mml:"text/mathml",mmr:"image/vnd.fujixerox.edmics-mmr",mng:"video/x-mng",mny:"application/x-msmoney",mobi:"application/x-mobipocket-ebook",mods:"application/mods+xml",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"audio/mpeg",mp21:"application/mp21",mp2a:"audio/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mp4a:"audio/mp4",mp4s:"application/mp4",mp4v:"video/mp4",mpc:"application/vnd.mophun.certificate",mpd:"application/dash+xml",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:"audio/mpeg",mpkg:"application/vnd.apple.installer+xml",mpm:"application/vnd.blueice.multipass",mpn:"application/vnd.mophun.application",mpp:"application/vnd.ms-project",mpt:"application/vnd.ms-project",mpy:"application/vnd.ibm.minipay",mqy:"application/vnd.mobius.mqy",mrc:"application/marc",mrcx:"application/marcxml+xml",ms:"text/troff",mscml:"application/mediaservercontrol+xml",mseed:"application/vnd.fdsn.mseed",mseq:"application/vnd.mseq",msf:"application/vnd.epson.msf",msg:"application/vnd.ms-outlook",msh:"model/mesh",msi:"application/x-msdownload",msl:"application/vnd.mobius.msl",msm:"application/octet-stream",msp:"application/octet-stream",msty:"application/vnd.muvee.style",mtl:"model/mtl",mts:"model/vnd.mts",mus:"application/vnd.musician",musd:"application/mmt-usd+xml",musicxml:"application/vnd.recordare.musicxml+xml",mvb:"application/x-msmediaview",mvt:"application/vnd.mapbox-vector-tile",mwf:"application/vnd.mfer",mxf:"application/mxf",mxl:"application/vnd.recordare.musicxml",mxmf:"audio/mobile-xmf",mxml:"application/xv+xml",mxs:"application/vnd.triscape.mxs",mxu:"video/vnd.mpegurl","n-gage":"application/vnd.nokia.n-gage.symbian.install",n3:"text/n3",nb:"application/mathematica",nbp:"application/vnd.wolfram.player",nc:"application/x-netcdf",ncx:"application/x-dtbncx+xml",nfo:"text/x-nfo",ngdat:"application/vnd.nokia.n-gage.data",nitf:"application/vnd.nitf",nlu:"application/vnd.neurolanguage.nlu",nml:"application/vnd.enliven",nnd:"application/vnd.noblenet-directory",nns:"application/vnd.noblenet-sealer",nnw:"application/vnd.noblenet-web",npx:"image/vnd.net-fpx",nq:"application/n-quads",nsc:"application/x-conference",nsf:"application/vnd.lotus-notes",nt:"application/n-triples",ntf:"application/vnd.nitf",numbers:"application/x-iwork-numbers-sffnumbers",nzb:"application/x-nzb",oa2:"application/vnd.fujitsu.oasys2",oa3:"application/vnd.fujitsu.oasys3",oas:"application/vnd.fujitsu.oasys",obd:"application/x-msbinder",obgx:"application/vnd.openblox.game+xml",obj:"model/obj",oda:"application/oda",odb:"application/vnd.oasis.opendocument.database",odc:"application/vnd.oasis.opendocument.chart",odf:"application/vnd.oasis.opendocument.formula",odft:"application/vnd.oasis.opendocument.formula-template",odg:"application/vnd.oasis.opendocument.graphics",odi:"application/vnd.oasis.opendocument.image",odm:"application/vnd.oasis.opendocument.text-master",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogex:"model/vnd.opengex",ogg:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",omdoc:"application/omdoc+xml",onepkg:"application/onenote",onetmp:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",opf:"application/oebps-package+xml",opml:"text/x-opml",oprc:"application/vnd.palm",opus:"audio/ogg",org:"text/x-org",osf:"application/vnd.yamaha.openscoreformat",osfpvg:"application/vnd.yamaha.openscoreformat.osfpvg+xml",osm:"application/vnd.openstreetmap.data+xml",otc:"application/vnd.oasis.opendocument.chart-template",otf:"font/otf",otg:"application/vnd.oasis.opendocument.graphics-template",oth:"application/vnd.oasis.opendocument.text-web",oti:"application/vnd.oasis.opendocument.image-template",otp:"application/vnd.oasis.opendocument.presentation-template",ots:"application/vnd.oasis.opendocument.spreadsheet-template",ott:"application/vnd.oasis.opendocument.text-template",ova:"application/x-virtualbox-ova",ovf:"application/x-virtualbox-ovf",owl:"application/rdf+xml",oxps:"application/oxps",oxt:"application/vnd.openofficeorg.extension",p:"text/x-pascal",p10:"application/pkcs10",p12:"application/x-pkcs12",p7b:"application/x-pkcs7-certificates",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7r:"application/x-pkcs7-certreqresp",p7s:"application/pkcs7-signature",p8:"application/pkcs8",pac:"application/x-ns-proxy-autoconfig",pages:"application/x-iwork-pages-sffpages",pas:"text/x-pascal",paw:"application/vnd.pawaafile",pbd:"application/vnd.powerbuilder6",pbm:"image/x-portable-bitmap",pcap:"application/vnd.tcpdump.pcap",pcf:"application/x-font-pcf",pcl:"application/vnd.hp-pcl",pclxl:"application/vnd.hp-pclxl",pct:"image/x-pict",pcurl:"application/vnd.curl.pcurl",pcx:"image/x-pcx",pdb:"application/x-pilot",pde:"text/x-processing",pdf:"application/pdf",pem:"application/x-x509-ca-cert",pfa:"application/x-font-type1",pfb:"application/x-font-type1",pfm:"application/x-font-type1",pfr:"application/font-tdpfr",pfx:"application/x-pkcs12",pgm:"image/x-portable-graymap",pgn:"application/x-chess-pgn",pgp:"application/pgp-encrypted",php:"application/x-httpd-php",pic:"image/x-pict",pkg:"application/octet-stream",pki:"application/pkixcmp",pkipath:"application/pkix-pkipath",pkpass:"application/vnd.apple.pkpass",pl:"application/x-perl",plb:"application/vnd.3gpp.pic-bw-large",plc:"application/vnd.mobius.plc",plf:"application/vnd.pocketlearn",pls:"application/pls+xml",pm:"application/x-perl",pml:"application/vnd.ctc-posml",png:"image/png",pnm:"image/x-portable-anymap",portpkg:"application/vnd.macports.portpkg",pot:"application/vnd.ms-powerpoint",potm:"application/vnd.ms-powerpoint.template.macroenabled.12",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",ppam:"application/vnd.ms-powerpoint.addin.macroenabled.12",ppd:"application/vnd.cups-ppd",ppm:"image/x-portable-pixmap",pps:"application/vnd.ms-powerpoint",ppsm:"application/vnd.ms-powerpoint.slideshow.macroenabled.12",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",ppt:"application/vnd.ms-powerpoint",pptm:"application/vnd.ms-powerpoint.presentation.macroenabled.12",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",pqa:"application/vnd.palm",prc:"application/x-pilot",pre:"application/vnd.lotus-freelance",prf:"application/pics-rules",provx:"application/provenance+xml",ps:"application/postscript",psb:"application/vnd.3gpp.pic-bw-small",psd:"image/vnd.adobe.photoshop",psf:"application/x-font-linux-psf",pskcxml:"application/pskc+xml",pti:"image/prs.pti",ptid:"application/vnd.pvi.ptid1",pub:"application/x-mspublisher",pvb:"application/vnd.3gpp.pic-bw-var",pwn:"application/vnd.3m.post-it-notes",pya:"audio/vnd.ms-playready.media.pya",pyv:"video/vnd.ms-playready.media.pyv",qam:"application/vnd.epson.quickanime",qbo:"application/vnd.intu.qbo",qfx:"application/vnd.intu.qfx",qps:"application/vnd.publishare-delta-tree",qt:"video/quicktime",qwd:"application/vnd.quark.quarkxpress",qwt:"application/vnd.quark.quarkxpress",qxb:"application/vnd.quark.quarkxpress",qxd:"application/vnd.quark.quarkxpress",qxl:"application/vnd.quark.quarkxpress",qxt:"application/vnd.quark.quarkxpress",ra:"audio/x-realaudio",ram:"audio/x-pn-realaudio",raml:"application/raml+yaml",rapd:"application/route-apd+xml",rar:"application/x-rar-compressed",ras:"image/x-cmu-raster",rcprofile:"application/vnd.ipunplugged.rcprofile",rdf:"application/rdf+xml",rdz:"application/vnd.data-vision.rdz",relo:"application/p2p-overlay+xml",rep:"application/vnd.businessobjects",res:"application/x-dtbresource+xml",rgb:"image/x-rgb",rif:"application/reginfo+xml",rip:"audio/vnd.rip",ris:"application/x-research-info-systems",rl:"application/resource-lists+xml",rlc:"image/vnd.fujixerox.edmics-rlc",rld:"application/resource-lists-diff+xml",rm:"application/vnd.rn-realmedia",rmi:"audio/midi",rmp:"audio/x-pn-realaudio-plugin",rms:"application/vnd.jcp.javame.midlet-rms",rmvb:"application/vnd.rn-realmedia-vbr",rnc:"application/relax-ng-compact-syntax",rng:"application/xml",roa:"application/rpki-roa",roff:"text/troff",rp9:"application/vnd.cloanto.rp9",rpm:"application/x-redhat-package-manager",rpss:"application/vnd.nokia.radio-presets",rpst:"application/vnd.nokia.radio-preset",rq:"application/sparql-query",rs:"application/rls-services+xml",rsat:"application/atsc-rsat+xml",rsd:"application/rsd+xml",rsheet:"application/urc-ressheet+xml",rss:"application/rss+xml",rtf:"text/rtf",rtx:"text/richtext",run:"application/x-makeself",rusd:"application/route-usd+xml",s:"text/x-asm",s3m:"audio/s3m",saf:"application/vnd.yamaha.smaf-audio",sass:"text/x-sass",sbml:"application/sbml+xml",sc:"application/vnd.ibm.secure-container",scd:"application/x-msschedule",scm:"application/vnd.lotus-screencam",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",scss:"text/x-scss",scurl:"text/vnd.curl.scurl",sda:"application/vnd.stardivision.draw",sdc:"application/vnd.stardivision.calc",sdd:"application/vnd.stardivision.impress",sdkd:"application/vnd.solent.sdkm+xml",sdkm:"application/vnd.solent.sdkm+xml",sdp:"application/sdp",sdw:"application/vnd.stardivision.writer",sea:"application/x-sea",see:"application/vnd.seemail",seed:"application/vnd.fdsn.seed",sema:"application/vnd.sema",semd:"application/vnd.semd",semf:"application/vnd.semf",senmlx:"application/senml+xml",sensmlx:"application/sensml+xml",ser:"application/java-serialized-object",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation","sfd-hdstx":"application/vnd.hydrostatix.sof-data",sfs:"application/vnd.spotfire.sfs",sfv:"text/x-sfv",sgi:"image/sgi",sgl:"application/vnd.stardivision.writer-global",sgm:"text/sgml",sgml:"text/sgml",sh:"application/x-sh",shar:"application/x-shar",shex:"text/shex",shf:"application/shf+xml",shtml:"text/html",sid:"image/x-mrsid-image",sieve:"application/sieve",sig:"application/pgp-signature",sil:"audio/silk",silo:"model/mesh",sis:"application/vnd.symbian.install",sisx:"application/vnd.symbian.install",sit:"application/x-stuffit",sitx:"application/x-stuffitx",siv:"application/sieve",skd:"application/vnd.koan",skm:"application/vnd.koan",skp:"application/vnd.koan",skt:"application/vnd.koan",sldm:"application/vnd.ms-powerpoint.slide.macroenabled.12",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",slim:"text/slim",slm:"text/slim",sls:"application/route-s-tsid+xml",slt:"application/vnd.epson.salt",sm:"application/vnd.stepmania.stepchart",smf:"application/vnd.stardivision.math",smi:"application/smil+xml",smil:"application/smil+xml",smv:"video/x-smv",smzip:"application/vnd.stepmania.package",snd:"audio/basic",snf:"application/x-font-snf",so:"application/octet-stream",spc:"application/x-pkcs7-certificates",spdx:"text/spdx",spf:"application/vnd.yamaha.smaf-phrase",spl:"application/x-futuresplash",spot:"text/vnd.in3d.spot",spp:"application/scvp-vp-response",spq:"application/scvp-vp-request",spx:"audio/ogg",sql:"application/x-sql",src:"application/x-wais-source",srt:"application/x-subrip",sru:"application/sru+xml",srx:"application/sparql-results+xml",ssdl:"application/ssdl+xml",sse:"application/vnd.kodak-descriptor",ssf:"application/vnd.epson.ssf",ssml:"application/ssml+xml",st:"application/vnd.sailingtracker.track",stc:"application/vnd.sun.xml.calc.template",std:"application/vnd.sun.xml.draw.template",stf:"application/vnd.wt.stf",sti:"application/vnd.sun.xml.impress.template",stk:"application/hyperstudio",stl:"model/stl",stp:"application/step",stpx:"model/step+xml",stpxz:"model/step-xml+zip",stpz:"model/step+zip",str:"application/vnd.pg.format",stw:"application/vnd.sun.xml.writer.template",styl:"text/stylus",stylus:"text/stylus",sub:"text/vnd.dvb.subtitle",sus:"application/vnd.sus-calendar",susp:"application/vnd.sus-calendar",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",svc:"application/vnd.dvb.service",svd:"application/vnd.svd",svg:"image/svg+xml",svgz:"image/svg+xml",swa:"application/x-director",swf:"application/x-shockwave-flash",swi:"application/vnd.aristanetworks.swi",swidtag:"application/swid+xml",sxc:"application/vnd.sun.xml.calc",sxd:"application/vnd.sun.xml.draw",sxg:"application/vnd.sun.xml.writer.global",sxi:"application/vnd.sun.xml.impress",sxm:"application/vnd.sun.xml.math",sxw:"application/vnd.sun.xml.writer",t:"text/troff",t3:"application/x-t3vm-image",t38:"image/t38",taglet:"application/vnd.mynfc",tao:"application/vnd.tao.intent-module-archive",tap:"image/vnd.tencent.tap",tar:"application/x-tar",tcap:"application/vnd.3gpp2.tcap",tcl:"application/x-tcl",td:"application/urc-targetdesc+xml",teacher:"application/vnd.smart.teacher",tei:"application/tei+xml",teicorpus:"application/tei+xml",tex:"application/x-tex",texi:"application/x-texinfo",texinfo:"application/x-texinfo",text:"text/plain",tfi:"application/thraud+xml",tfm:"application/x-tex-tfm",tfx:"image/tiff-fx",tga:"image/x-tga",thmx:"application/vnd.ms-officetheme",tif:"image/tiff",tiff:"image/tiff",tk:"application/x-tcl",tmo:"application/vnd.tmobile-livetv",toml:"application/toml",torrent:"application/x-bittorrent",tpl:"application/vnd.groove-tool-template",tpt:"application/vnd.trid.tpt",tr:"text/troff",tra:"application/vnd.trueapp",trig:"application/trig",trm:"application/x-msterminal",ts:"video/mp2t",tsd:"application/timestamped-data",tsv:"text/tab-separated-values",ttc:"font/collection",ttf:"font/ttf",ttl:"text/turtle",ttml:"application/ttml+xml",twd:"application/vnd.simtech-mindmapper",twds:"application/vnd.simtech-mindmapper",txd:"application/vnd.genomatix.tuxedo",txf:"application/vnd.mobius.txf",txt:"text/plain",u32:"application/x-authorware-bin",u8dsn:"message/global-delivery-status",u8hdr:"message/global-headers",u8mdn:"message/global-disposition-notification",u8msg:"message/global",ubj:"application/ubjson",udeb:"application/x-debian-package",ufd:"application/vnd.ufdl",ufdl:"application/vnd.ufdl",ulx:"application/x-glulx",umj:"application/vnd.umajin",unityweb:"application/vnd.unity",uoml:"application/vnd.uoml+xml",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",usdz:"model/vnd.usdz+zip",ustar:"application/x-ustar",utz:"application/vnd.uiq.theme",uu:"text/x-uuencode",uva:"audio/vnd.dece.audio",uvd:"application/vnd.dece.data",uvf:"application/vnd.dece.data",uvg:"image/vnd.dece.graphic",uvh:"video/vnd.dece.hd",uvi:"image/vnd.dece.graphic",uvm:"video/vnd.dece.mobile",uvp:"video/vnd.dece.pd",uvs:"video/vnd.dece.sd",uvt:"application/vnd.dece.ttml+xml",uvu:"video/vnd.uvvu.mp4",uvv:"video/vnd.dece.video",uvva:"audio/vnd.dece.audio",uvvd:"application/vnd.dece.data",uvvf:"application/vnd.dece.data",uvvg:"image/vnd.dece.graphic",uvvh:"video/vnd.dece.hd",uvvi:"image/vnd.dece.graphic",uvvm:"video/vnd.dece.mobile",uvvp:"video/vnd.dece.pd",uvvs:"video/vnd.dece.sd",uvvt:"application/vnd.dece.ttml+xml",uvvu:"video/vnd.uvvu.mp4",uvvv:"video/vnd.dece.video",uvvx:"application/vnd.dece.unspecified",uvvz:"application/vnd.dece.zip",uvx:"application/vnd.dece.unspecified",uvz:"application/vnd.dece.zip",vbox:"application/x-virtualbox-vbox","vbox-extpack":"application/x-virtualbox-vbox-extpack",vcard:"text/vcard",vcd:"application/x-cdlink",vcf:"text/x-vcard",vcg:"application/vnd.groove-vcard",vcs:"text/x-vcalendar",vcx:"application/vnd.vcx",vdi:"application/x-virtualbox-vdi",vds:"model/vnd.sap.vds",vhd:"application/x-virtualbox-vhd",vis:"application/vnd.visionary",viv:"video/vnd.vivo",vmdk:"application/x-virtualbox-vmdk",vob:"video/x-ms-vob",vor:"application/vnd.stardivision.writer",vox:"application/x-authorware-bin",vrml:"model/vrml",vsd:"application/vnd.visio",vsf:"application/vnd.vsf",vss:"application/vnd.visio",vst:"application/vnd.visio",vsw:"application/vnd.visio",vtf:"image/vnd.valve.source.texture",vtt:"text/vtt",vtu:"model/vnd.vtu",vxml:"application/voicexml+xml",w3d:"application/x-director",wad:"application/x-doom",wadl:"application/vnd.sun.wadl+xml",war:"application/java-archive",wasm:"application/wasm",wav:"audio/wav",wax:"audio/x-ms-wax",wbmp:"image/vnd.wap.wbmp",wbs:"application/vnd.criticaltools.wbs+xml",wbxml:"application/vnd.wap.wbxml",wcm:"application/vnd.ms-works",wdb:"application/vnd.ms-works",wdp:"image/vnd.ms-photo",weba:"audio/webm",webapp:"application/x-web-app-manifest+json",webm:"video/webm",webmanifest:"application/manifest+json",webp:"image/webp",wg:"application/vnd.pmi.widget",wgt:"application/widget",wks:"application/vnd.ms-works",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wmd:"application/x-ms-wmd",wmf:"image/wmf",wml:"text/vnd.wap.wml",wmlc:"application/vnd.wap.wmlc",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wmv:"video/x-ms-wmv",wmx:"video/x-ms-wmx",wmz:"application/x-msmetafile",woff:"font/woff",woff2:"font/woff2",wpd:"application/vnd.wordperfect",wpl:"application/vnd.ms-wpl",wps:"application/vnd.ms-works",wqd:"application/vnd.wqd",wri:"application/x-mswrite",wrl:"model/vrml",wsc:"message/vnd.wfa.wsc",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",wtb:"application/vnd.webturbo",wvx:"video/x-ms-wvx",x32:"application/x-authorware-bin",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",x_b:"model/vnd.parasolid.transmit.binary",x_t:"model/vnd.parasolid.transmit.text",xaml:"application/xaml+xml",xap:"application/x-silverlight-app",xar:"application/vnd.xara",xav:"application/xcap-att+xml",xbap:"application/x-ms-xbap",xbd:"application/vnd.fujixerox.docuworks.binder",xbm:"image/x-xbitmap",xca:"application/xcap-caps+xml",xcs:"application/calendar+xml",xdf:"application/xcap-diff+xml",xdm:"application/vnd.syncml.dm+xml",xdp:"application/vnd.adobe.xdp+xml",xdssc:"application/dssc+xml",xdw:"application/vnd.fujixerox.docuworks",xel:"application/xcap-el+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",xfdf:"application/vnd.adobe.xfdf",xfdl:"application/vnd.xfdl",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xhvml:"application/xv+xml",xif:"image/vnd.xiff",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",xm:"audio/xm",xml:"text/xml",xns:"application/xcap-ns+xml",xo:"application/vnd.olpc-sugar",xop:"application/xop+xml",xpi:"application/x-xpinstall",xpl:"application/xproc+xml",xpm:"image/x-xpixmap",xpr:"application/vnd.is-xpr",xps:"application/vnd.ms-xpsdocument",xpw:"application/vnd.intercon.formnet",xpx:"application/vnd.intercon.formnet",xsd:"application/xml",xsl:"application/xslt+xml",xslt:"application/xslt+xml",xsm:"application/vnd.syncml+xml",xspf:"application/xspf+xml",xul:"application/vnd.mozilla.xul+xml",xvm:"application/xv+xml",xvml:"application/xv+xml",xwd:"image/x-xwindowdump",xyz:"chemical/x-xyz",xz:"application/x-xz",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",yml:"text/yaml",ymp:"text/x-suse-ymp",z1:"application/x-zmachine",z2:"application/x-zmachine",z3:"application/x-zmachine",z4:"application/x-zmachine",z5:"application/x-zmachine",z6:"application/x-zmachine",z7:"application/x-zmachine",z8:"application/x-zmachine",zaz:"application/vnd.zzazz.deck+xml",zip:"application/zip",zir:"application/vnd.zul",zirz:"application/vnd.zul",zmm:"application/vnd.handheld-entertainment+xml"},A=(e,t)=>{k(),fetch(`https://crop.inspon-cloud.com/pdf_to_png?url=${e}`).then((e=>e.json())).then((e=>{t(e)})).catch((()=>{t(null)}))},k=()=>{void 0===window.ph_pdf_previews&&(window.ph_pdf_previews={}),void 0===window.ph_pdf_pages&&(window.ph_pdf_pages={})},T=(e,t)=>{k(),localStorage.setItem("pdf_"+e,t+"-/resize/200x/-/preview/"),window.ph_pdf_previews[e]=t+"-/resize/200x/-/preview/"},S=async(e,t)=>{const{uuid:i,cdnUrl:o,mimeType:a}=e;if("application/pdf"==a){if(k(),window.ph_pdf_previews[i]){const e=window.ph_pdf_pages[i];return void t({url:window.ph_pdf_previews[i],pages:e})}A(o,(e=>{e&&e.success?(T(i,e.path.cdnUrl),window.ph_pdf_pages[i]=e.pages,t({url:e.path.cdnUrl,pages:e.pages})):t({url:"https://photoupload.inspon-cloud.com/photoupload/img/ICONS/file.png",pages:1})}))}else t({url:o,pages:1})},E=()=>{const e=document.createElement("div");e.id="ph_pdf_loading";const t=document.createElement("style");t.innerHTML=`\n .loader {\n display: block !important;\n width: 30px;\n height: 30px;\n border: 5px solid ${window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].buttonBg};\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n } \n `,e.appendChild(t);let i=document.createElement("div");return i.setAttribute("class","loader"),e.appendChild(i),e},C=e=>{const t=e.split(".")[e.split(".").length-1],i=e.split(t)[0];return i.length>6?i.substring(0,6).concat("...")+t:e},L=(e,t,i,o,a,n)=>{const r=document.createElement("div");r.style.cssText="\n background: #000;\n border-radius: 100%;\n padding: 4px;\n position: absolute;\n right: -20px;\n top: 0;\n line-height: 0;\n cursor: pointer;\n width: 20px;\n height: 20px;",r.innerHTML='<svg stroke="#fff" fill="#fff" stroke-width="0" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z" fill="#fff"></path></svg>',window.UPLOADCARE_DATA[e].directUpload?r.addEventListener("click",(()=>{document.querySelectorAll(`[data-img-id='${t.uuid}']`).forEach((e=>{e.remove()})),document.querySelectorAll(`[data-prev-id='${t.uuid}']`).forEach((e=>e.remove())),b(o,a,n),0===document.querySelector(`#previewImages_${e}`).children.length&&(document.querySelector(`#previewImages_${e}`).style.marginBottom="0em",document.querySelector(`#selBtn_${e}`).querySelector(".uploadcare--widget__button.uploadcare--widget__button_type_open").innerText=window.UPLOADCARE_DATA[e].uploadButtonText)})):r.addEventListener("click",(()=>{window.UPLOADCARE_DATA[e].widget.openDialog()})),i.appendChild(r)},q=(e,t,i,o,a,n=window.__st.rid,r,l=0)=>{let s=window.ph_jq;const p=v(t,n,r);let c;if(document.querySelector(`[data-ph-cart-clone="true"][data-ph-product="${n}"]`))c=document.querySelector(`[data-ph-cart-clone="true"][data-ph-product="${n}"]`).offsetWidth;else{let e=m(n,r);c=e?e.offsetWidth:200}let d=((e,t,i,o,a,n,r=window.__st.rid)=>{let l,s=o[t].mimeType,p=o[t]?.sourceInfo?.file?.name?.split(".")||o[t]?.contentInfo?.mime?.subtype||o[t]?.originalImageInfo?.format.toLowerCase(),c=p[p.length-1];s="stp"===c?"application/step":o[t].mimeType;let d=Object.keys(_).find((e=>_[e]===s))||c;const u="https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+d.toUpperCase();if("tile_preview"===e){l=document.createElement("div"),l.style.cssText="display: flex; flex-direction: column; outline: none; position: relative; width:fit-content; margin-bottom: 1em; padding: 0px;";let n=document.createElement("img");n.setAttribute("id",`img_${t}`),n.setAttribute("id",`img_preview_${t}`),n.setAttribute("data-open-dialog",!0),n.setAttribute("data-field-id",a),n.setAttribute("onerror",`this.src = '${u}'`),n.style.maxHeight="200px",n.style.maxWidth="150px",i.isImage||"image"===o[t].mimeType.split("/")[0]?(n.setAttribute("src",i.cdnUrl+`/${i?.count?`nth/${t}/`:""}${"supremedigital-net.myshopify.com"===Shopify.shop&&d.toLowerCase().includes("tif")?"-/preview/":"supremedigital-net.myshopify.com"===Shopify.shop||"doityourselftransfers.myshopify.com"===Shopify.shop||"blingzandblankswholesale.myshopify.com"===Shopify.shop?"":"-/resize/500x/"}`),n.style.cssText="margin-bottom: 1em;max-width:150px;max-height:200px; background: url('https://photoupload.inspon-cloud.com/photoupload/img/transparency.jpg');background-size: 7px;"):"pdf"===d?(l.append(E()),S(i,(({url:o})=>{n.style.maxHeight="200px",n.style.width="fit-content",n.setAttribute("src",o),l.querySelector("#ph_pdf_loading").remove(),l.insertBefore(n,l.firstChild),setTimeout((()=>{L(a,i,l,t,r,e)}),1e3)}))):"docx"===d||"docx"===d||"dot"===d||"dotx"===d||"docm"===d||"doc"===d?n.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/word.png"):"xlsx"===d||"xlsm"===d||"csv"===d||"xls"===d?n.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/excel.png"):"ppt"===d?n.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/powerpoint.png"):n.setAttribute("src","https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+d.toUpperCase()),"pdf"!=d&&(l.append(n),setTimeout((()=>{L(a,i,l,t,r,e)}),500))}else if("line_preview"==e){let n=document.createElement("div");n.append(E()),l=document.createElement("div"),l.style.cssText="display: flex; flex-direction: column; outline: none; position: relative; width: 100%; margin-bottom: 1em; cursor: pointer; padding: 0px;";let s=document.createElement("div");s.setAttribute("data-open-dialog",!0),s.style.cssText="display: flex; flex-direction: row; align-items: center;";let p=document.createElement("img");p.setAttribute("id",`img_${t}`),p.setAttribute("id",`img_preview_${t}`),p.setAttribute("data-field-id",a),p.setAttribute("onerror",`this.src = '${u}'`),i.isImage||"image"===o[t].mimeType.split("/")[0]?(p.style.height="100%",p.style.width="100%",p.setAttribute("src",i.cdnUrl+`/${i?.count?`nth/${t}/`:""}${"supremedigital-net.myshopify.com"===Shopify.shop&&d.toLowerCase().includes("tif")?"-/preview/":"supremedigital-net.myshopify.com"===Shopify.shop||"doityourselftransfers.myshopify.com"===Shopify.shop?"":"-/smart_resize/100x100/"}`)):"docx"===d||"docx"===d||"dot"===d||"dotx"===d||"docm"===d||"doc"===d?p.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/word.png"):"xlsx"===d||"xlsm"===d||"csv"===d||"xls"===d?p.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/excel.png"):"ppt"===d?p.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/powerpoint.png"):p.setAttribute("src","https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+d.toUpperCase());let c=document.createElement("div");c.innerHTML=`<div style="width:130px"><span style="color: #2e87fc; text-decoration: underline;">${C(o[t].name)}</span>, <span style="font-size:${window.UPLOADCARE_DATA[a].buttonFontSize}px">${w(i.size)}</span></div>`,c.style.cssText="margin-right: 1em; font-size: 0.8em";let m=document.createElement("div");m.innerHTML="txhuib-nk.myshopify.com"===Shopify.shop?"Ta bort":"Remove",m.title=`Remove ${o[t].name}`,m.style.fontSize="12px",m.setAttribute("area-label",`Remove ${o[t].name}`),window.UPLOADCARE_DATA[a].directUpload&&m.addEventListener("click",(()=>{document.querySelector(`[name='uploader_${a}']`).value="",document.querySelectorAll(`[data-img-id='${i.uuid}']`).forEach((e=>{e.remove()})),document.querySelectorAll(`[data-prev-id='${i.uuid}']`).forEach((e=>e.remove())),b(t,r,e),0===document.querySelector(`#previewImages_${a}`).children.length&&(document.querySelector(`#previewImages_${a}`).style.marginBottom="0em",document.querySelector(`#selBtn_${a}`).querySelector(".uploadcare--widget__button.uploadcare--widget__button_type_open").innerText=window.UPLOADCARE_DATA[a].uploadButtonText)}));let f=document.createElement("div");f.style.cssText="display: flex; align-items: center; justify-content: space-between;","pdf"!=d&&(n.innerHTML="<div></div>",n.style.cssText=`border:1px solid #E3E1E1;border-radius:6px;margin-right:1em;padding:4px;background:#E9E9E9;width:50px;height:50px;overflow:hidden;background-repeat: no-repeat !important;background-size: contain !important;background-position: center center !important;background-image: url(${p.src}) !important;display: flex;flex-direction: column;justify-content: center;align-items:center;`,f.append(n),f.append(c),s.append(f),s.append(m),l.append(s)),"pdf"===d&&(l.append(E()),S(i,(({url:e})=>{p.style.width="fit-content",p.style.height="100%",p.style.width="100%",n.innerHTML="<div></div>",n.style.cssText=`border:1px solid #E3E1E1;border-radius:6px;margin-right:1em;padding:4px;background:#E9E9E9;width:50px;height:50px;overflow:hidden;background-repeat: no-repeat !important;background-size: contain !important;background-position: center center !important;background-image: url(${e}) !important;display: flex;flex-direction: column;justify-content: center;align-items:center;`,p.setAttribute("src",e),f.append(n),f.append(c),s.append(f),s.append(m),l.querySelector("#ph_pdf_loading").remove(),l.insertBefore(s,l.firstChild)})))}else if("link_preview"==e){l=document.createElement("div"),l.style.cssText="display: flex; flex-direction: column; outline: none; position: relative; width: 100%; margin-bottom: 1em; cursor: pointer; padding: 0px;";let n=document.createElement("div");n.setAttribute("data-open-dialog",!0),n.style.cssText="display: flex; flex-direction: row; justify-content: space-between; align-items: center";let s=document.createElement("div");s.innerHTML=`<span style="color: #2e87fc; text-decoration: underline;">${C(o[t].name)}</span>, <span style="font-size: ${window.UPLOADCARE_DATA[a].buttonFontSize}px">${w(i.size)}</span>`;let p=document.createElement("div");p.innerHTML="txhuib-nk.myshopify.com"===Shopify.shop?"Ta bort":"Remove",p.title=`Remove ${o[t].name}`,p.style.fontSize="12px",p.setAttribute("area-label",`Remove ${o[t].name}`),window.UPLOADCARE_DATA[a].directUpload&&p.addEventListener("click",(()=>{document.querySelector(`[name='uploader_${a}']`).value="",document.querySelectorAll(`[data-img-id='${i.uuid}']`).forEach((e=>{e.remove()})),document.querySelectorAll(`[data-prev-id='${i.uuid}']`).forEach((e=>e.remove())),b(t,r,e),0===document.querySelector(`#previewImages_${a}`).children.length&&(document.querySelector(`#previewImages_${a}`).style.marginBottom="0em",document.querySelector(`#selBtn_${a}`).querySelector(".uploadcare--widget__button.uploadcare--widget__button_type_open").innerText=window.UPLOADCARE_DATA[a].uploadButtonText)}));let c=document.createElement("div");c.style.cssText="display: flex; align-items: center; width: 100%; gap: 1em;",c.append(s),c.append(p),n.append(c),l.append(n)}else if("container_preview"==e){document.querySelector(`#previewImages_${a}`).style.background=window.UPLOADCARE_DATA[a].buttonBg,document.querySelector(`#previewImages_${a}`).style.borderRadius="6px",document.querySelector(`#previewImages_${a}`).style.maxHeight="230px",document.querySelector(`#previewImages_${a}`).style.overflowY="auto",document.querySelector(`#previewImages_${a}`).style.overflowX="hidden",document.querySelector(`#previewImages_${a}`).style.marginBottom=n?"1em":"0em";let s=document.createElement("div");s.append(E()),l=document.createElement("div"),l.style.cssText="display: flex; flex-direction: column; outline: none; position: relative; width: 100%; cursor: pointer;";let p=document.createElement("div");p.setAttribute("data-open-dialog",!0),p.style.cssText="display: flex; flex-direction: row; align-items: center; box-shadow: rgba(0, 0, 0, 0.17) 0px 7px 85px 0px inset, rgba(0, 0, 0, 0.15) 0px 4px 85px 20px inset, rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px;padding: 0.5em; color: #fff; border-radius: 5px; justify-content: space-between";let c=document.createElement("img");c.setAttribute("id",`img_${t}`),c.setAttribute("id",`img_preview_${t}`),c.setAttribute("data-field-id",a),c.setAttribute("onerror",`this.src = '${u}'`),i.isImage||"image"===o[t].mimeType.split("/")[0]?(c.style.height="100%",c.style.width="100%",c.setAttribute("src",i.cdnUrl+`/${i?.count?`nth/${t}/`:""}${"supremedigital-net.myshopify.com"===Shopify.shop&&d.toLowerCase().includes("tif")?"-/preview/":"supremedigital-net.myshopify.com"===Shopify.shop||"doityourselftransfers.myshopify.com"===Shopify.shop?"":"-/smart_resize/100x100/"}`)):"pdf"===d?(c.style.display="none",S(i,(({url:e})=>{s.innerHTML="<div></div>",c.style.display="block",c.style.height="100%",c.style.width="100%",s.style.cssText=`border:1px solid #E3E1E1;border-radius:6px;margin-right:1em;padding:4px;background:#E9E9E9;width:50px;height:50px;overflow:hidden;background-repeat: no-repeat !important;background-size: contain !important;background-position: center center !important;background-image: url(${e}) !important;display: flex;flex-direction: column;justify-content: center;align-items:center;`,c.setAttribute("src",e)}))):"docx"===d||"docx"===d||"dot"===d||"dotx"===d||"docm"===d||"doc"===d?c.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/word.png"):"xlsx"===d||"xlsm"===d||"csv"===d||"xls"===d?c.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/excel.png"):"ppt"===d?c.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/powerpoint.png"):c.setAttribute("src","https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+d.toUpperCase());let m=document.createElement("div");m.innerHTML=`<span style="color: #fff; text-decoration: none;">${C(o[t].name)}</span><span style="font-size:14px">${w(i.size)}</span>`,m.style.cssText="margin-right: 1em; font-size: 0.8em; display: flex; flex-direction: column;";let f=document.createElement("div");f.innerHTML=`<svg style="color: ${window.UPLOADCARE_DATA[a].buttonBg}; width: 30px; height: 20px;" stroke="currentColor" fill="none" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M16.3394 9.32245C16.7434 8.94589 16.7657 8.31312 16.3891 7.90911C16.0126 7.50509 15.3798 7.48283 14.9758 7.85938L12.0497 10.5866L9.32245 7.66048C8.94589 7.25647 8.31312 7.23421 7.90911 7.61076C7.50509 7.98731 7.48283 8.62008 7.85938 9.0241L10.5866 11.9502L7.66048 14.6775C7.25647 15.054 7.23421 15.6868 7.61076 16.0908C7.98731 16.4948 8.62008 16.5171 9.0241 16.1405L11.9502 13.4133L14.6775 16.3394C15.054 16.7434 15.6868 16.7657 16.0908 16.3891C16.4948 16.0126 16.5171 15.3798 16.1405 14.9758L13.4133 12.0497L16.3394 9.32245Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21Z" fill="currentColor"></path></svg>`,f.title=`Remove ${o[t].name}`,f.style.fontSize="12px",f.setAttribute("area-label",`Remove ${o[t].name}`),window.UPLOADCARE_DATA[a].directUpload&&f.addEventListener("click",(()=>{document.querySelectorAll(`[data-prev-id='${i.uuid}']`).forEach((e=>{e.classList.add("animate__animated","animate__fadeOutUp")})),setTimeout((()=>{document.querySelector(`[name='uploader_${a}']`).value="",document.querySelectorAll(`[data-img-id='${i.uuid}']`).forEach((e=>{e.remove()})),document.querySelectorAll(`[data-prev-id='${i.uuid}']`).forEach((e=>e.remove())),b(t,r,e),0===document.querySelector(`#previewImages_${a}`).children.length&&(document.querySelector(`#previewImages_${a}`).style.marginBottom="0em",document.querySelector(`#selBtn_${a}`).querySelector(".uploadcare--widget__button.uploadcare--widget__button_type_open").innerText=window.UPLOADCARE_DATA[a].uploadButtonText)}),400)}));let h=document.createElement("div");h.style.cssText="display: flex; align-items: center; justify-content: space-between;","pdf"!=d&&(s.innerHTML="<div></div>"),s.style.cssText=`border:1px solid #E3E1E1;border-radius:6px;margin-right:1em;padding:4px;background:#E9E9E9;width:50px;height:50px;overflow:hidden;background-repeat: no-repeat !important;background-size: contain !important;background-position: center center !important;background-image: url(${c.src}) !important;display: flex;flex-direction: column;justify-content: center;align-items:center;`,h.append(s),h.append(m),p.append(h),p.append(f),l.append(p)}else{l=document.createElement("div"),l.style.cssText="display: flex; flex-direction: column; outline: none; position: relative; width: 100%;";let e=document.createElement("img");e.setAttribute("id","img_${id}"),e.setAttribute("id",`img_preview_${t}`),e.setAttribute("data-field-id",a),e.style.width="100%",e.setAttribute("onerror",`this.src = '${u}'`),i.isImage||"image"===o[t].mimeType.split("/")[0]?e.setAttribute("src",i.cdnUrl+`/${i?.count?`nth/${t}/`:""}${"supremedigital-net.myshopify.com"===Shopify.shop&&d.toLowerCase().includes("tif")?"-/preview/":"supremedigital-net.myshopify.com"===Shopify.shop||"doityourselftransfers.myshopify.com"===Shopify.shop?"":"-/resize/300x/"}`):(e.style.width="100px",e.style.height="100px","pdf"===d?S(i,(({url:t})=>{e.style.maxHeight="70px",e.style.width="70px",e.setAttribute("src",t)})):"docx"===d||"docx"===d||"dot"===d||"dotx"===d||"docm"===d||"doc"===d?e.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/word.png"):"xlsx"===d||"xlsm"===d||"csv"===d||"xls"===d?e.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/excel.png"):"ppt"===d?e.setAttribute("src","https://photoupload.inspon-cloud.com/photoupload/img/ICONS/powerpoint.png"):e.setAttribute("src","https://dummyimage.com/100x100/bfbfbf/ffffff.png&text=."+d.toUpperCase())),e.style.cssText="margin-bottom: 1em;",l.append(e)}return l})(t.previewStyle,a,i,o,e,t.directUpload,n);d.setAttribute("data-prev-id",o[a].uuid);let u="canvasandbear-192.myshopify.com"!==Shopify.shop?document.createElement("div"):document.createElement("input"),h=document.createElement("input"),g=Array.from(document.querySelectorAll("[id^='selBtn_']")).map((e=>e.id)).indexOf(`selBtn_${e}`);u.setAttribute("data-img-prop",g),u.setAttribute("data-main",`${e}${a}`),u.setAttribute("id",`imageFiles_${e}${a}`),h.setAttribute("type","text"),u.setAttribute("data-img-id",o[a].uuid),h.setAttribute("name",`properties[${t.fieldname}${l>1?" "+(a+1):""}]`);let x="";i.isImage?(x=o[a]?.originalImageInfo?.format||o[a]?.imageInfo?.format,o[a].cdnUrlModifiers&&o[a].cdnUrlModifiers.includes("-/crop/")&&(x=o[a]?.mimeType.split("/")[1])):x=o[a].name.split(".")[o[a].name.split(".").length-1];const A=o[a].name.split(".");A.pop(),h.value=`https://cdn.shopify.com-uploadly.com/?ph_image=${o[a].uuid}&ph_name=${encodeURI(A.join("").split("").join("_"))}&crop=${o[a].cdnUrlModifiers?o[a].cdnUrlModifiers.replace(new RegExp("(png)","g"),"p=n=g"):o[a].cdnUrlModifiers||""}&extension=${x.toLowerCase().split("").join("=")}&live=true`,h.style.display="none",h.setAttribute("hidden","");let k=document.createElement("input");if(window.PH_DIRECT_LINK_CONFIG&&(k.setAttribute("name",`properties[_${t.fieldname} ${a+1} (Direct Link)]`),k.value=`https://uploadly-files.com/${o[a].uuid}.${x.toLowerCase()}`),k.style.display="none",k.setAttribute("hidden",""),"canvasandbear-192.myshopify.com"===Shopify.shop&&(u.setAttribute("name",`properties[${t.fieldname} ${a+1}]`),u.setAttribute("value",`https://cdn.shopify.com-uploadly.com/?ph_image=${o[a].uuid}&ph_name=${encodeURI(A.join("").split("").join("_"))}&crop=${o[a].cdnUrlModifiers?o[a].cdnUrlModifiers.replace(new RegExp("(png)","g"),"p=n=g"):o[a].cdnUrlModifiers}&extension=${x.toLowerCase().split("").join("=")}&live=true`),u.setAttribute("hidden",""),u.style.display="none"),u.append(h),u.append(k),d.append(u),document.querySelectorAll(`#imageFiles_${e}${a}`).length>0&&document.querySelectorAll(`#imageFiles_${e}${a}`).forEach((e=>e.remove())),-1!==g){const e=document.querySelectorAll(`[data-img-prop='${g+1}']`);e.length?e.forEach((e=>e.parentNode.insertBefore(u,e))):s("form[action*='/cart/add']"+("home"===r?`[data-ph-product-id="${n}"]`:"")).append(u)}else s("form[action*='/cart/add']"+("home"===r?`[data-ph-product-id="${n}"]`:"")).append(u);if("Enable"===t.buttonStatus){let i=document.createElement("label"),o="Yes"===t.textFieldRequired?"<span style='color: black;'>*</span>":"";i.style.cssText=`font-size: ${t.buttonTextSize}px; color: ${"container_preview"===t.previewStyle?t.buttonCol:t.introTitleColor}; font-family: ${"Upload Field Font"===t.fontStyle?"sans-serif":"inherit"};`,i.innerHTML=window.UPLOADCARE_DATA[e].textfieldHeadingTranslate+o;let l=document.createElement("textarea");l.setAttribute("data-tb-main",`${e}${a}`),l.setAttribute("class","textAreaField_"+e),l.setAttribute("id",`textArea_${e}${a}`),l.style.cssText=`width: 100%; max-width: ${"container_preview"===t.previewStyle?"100%":c}px; max-height: 290px; padding: 13px 9px; border: 1px solid #cccccc; font-size: 105%; border-radius: 5px; font-family: unset; outline: 0; box-shadow: none; ${"container_preview"===t.previewStyle?"resize: vertical":""}`,"Yes"===t.textFieldMaxLength&&l.setAttribute("maxlength",t.textFieldMaxChars),l.setAttribute("data-textfield",t.textFieldName),l.setAttribute("data-buttonfield",e),l.setAttribute("data-textFieldPos",a),l.setAttribute("placeholder",window.UPLOADCARE_DATA[e].textFieldHelpTextTranslate),l.addEventListener("input",(t=>((e,t,i=window.__st.rid,o="product")=>{let a=window.ph_jq;a('textarea[data-tb-main="'+e+t+'"]').each((function(n,r){a(r).val().length;let l=!0;a(`.textAreaField_${e}`).each(((e,t)=>{0===t.value.length&&(l=!1)}));var s=a(r).attr("id").split("_")[1];a(`[data-ph-textarea=${e}${t}]`).val(a("#textArea_"+s).val());var p=a("#textArea_"+s).val().length;document.querySelector("#textAreaChar_"+s)&&(document.querySelector("#textAreaChar_"+s).innerText=p),window.ph_globals[i].textFieldRequired&&(l?f(i,o):y(o,i))}))})(e,a,n,r)));let u=a;document.querySelectorAll(`[name='properties[${t.textFieldName.replace(/'/g,"\\'")} ${a+1}]']`).length&&(u=document.querySelectorAll(`[name='properties[${t.textFieldName.replace(/'/g,"\\'")} ${a+1}]']`).length+1);let m=document.createElement("input");m.setAttribute("name",`properties[${t.textFieldName}${u+1}]`),m.style.display="none",m.setAttribute("hidden",""),m.setAttribute("data-ph-textarea",e+a),s("form[action*='/cart/add']"+("home"===r?`[data-ph-product-id="${n}"]`:"")).append(m),d.append(i);let h=document.createElement("div");h.style.cssText=`display: flex; flex-direction: row; margin-bottom: 0px; width: ${"container_preview"===t.previewStyle?"100%":p}; position: relative; max-height: 290px; text-align: left;`;const g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.append(l),h.append(g),d.append(h),"Yes"===t.textFieldRequired&&(window.ph_globals[n].textFieldRequired=!0,window.ph_globals[n].textFieldRequiredIds.push(`${e}_${a}`),y(r,n)),"Yes"===t.textFieldMaxLength){let i=document.createElement("div");i.setAttribute("class","tb_char_numbers"),i.style.cssText=`position: relative; ${"container_preview"===t.previewStyle?`color: ${t.buttonCol}`:null}`;let o=document.createElement("span");o.style.cssText="position: absolute; right: 0px; bottom: -11px; text-align: right; font-size: 11px;",o.innerHTML=`<span id="textAreaChar_${e}${a}">0</span>/${t.textFieldMaxChars}`,i.append(o),g.append(i)}}s("#previewImages_"+e).append(d)},z=(e,t,i)=>{let o=window.ph_jq,a=i;a.includes("-/border_radius")||(a=a.replace("-/preview",""),!a.includes("-/crop")||"png"!==t&&"jpg"!==t||(a+="-/quality/best/")),(a.includes("-/rotate")||a.includes("enhance")||a.includes("sharp")||a.includes("grayscale"))&&(a+="-/preview/"),"roses-fabrics-and-handmade.myshopify.com"===Shopify.shop&&(m(window.__st.rid).disabled=!0);try{((e,t,i,o)=>{window.ph_jq.ajax({type:"POST",url:"https://com-uploadly-files.com//save_cdn",dataType:"json",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:o,extension:e,url:i,shop:t}),success:function(e){console.log("direct saved")}})})(t,Shopify.shop,a,e)}catch(e){console.log("direct save cdn",e)}o.ajax({type:"POST",url:"https://inspon-app.com/photoupload_file/save_cdn",dataType:"json",headers:{"Content-Type":"application/json"},data:JSON.stringify({uuid:e,extension:t,url:a,shop:Shopify.shop}),success:function(t){if("roses-fabrics-and-handmade.myshopify.com"===Shopify.shop&&t.success&&t.cdn){let i=m(window.__st.rid);i&&(i.disabled=!1),document.querySelectorAll(`div[data-img-id='${e}'] input`).forEach((e=>{if(e.name){const i=e.cloneNode(!0);i.name=`properties[_${i.name.split("[")[1].split("]")[0]} (Preview)]`,i.value=t.cdn.split("?")[0],e.parentNode.insertBefore(i,e)}}))}}})},D=(e,t,i)=>{window.ph_jq.ajax({type:"POST",url:n+"record_file",dataType:"json",data:{shop:e,image:t,size:i},success:function(e){}})};i(666),function(e,t){if("undefined"!=typeof document){e=e||"";var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),i.appendChild(o)}}('\n.uploadcare-tab-effects--crops{display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;max-width:100%}\n.uploadcare-tab-effects--effect-button{-ms-flex-negative:1;flex-shrink:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;padding:0;width:45px;height:45px;border-color:transparent;background:transparent;color:#212121;fill:#212121}.uploadcare-tab-effects--effect-button:active,.uploadcare-tab-effects--effect-button:focus,.uploadcare-tab-effects--effect-button:hover{fill:#0969ee;color:#0969ee}.uploadcare-tab-effects--effect-button:focus,.uploadcare-tab-effects--effect-button:hover{border-color:transparent;background:transparent}.uploadcare-tab-effects--effect-button[aria-disabled=true]{border-color:transparent!important;background:transparent!important;color:#d4d2d2!important;fill:#d4d2d2!important}.uploadcare-tab-effects--effect-button:before{content:"";display:block;-ms-flex-order:1;order:1;margin:1px 0;width:6px;height:6px;background:transparent;border-radius:50%}.uploadcare-tab-effects--effect-button_applied:before{background:#157cfc}@media (min-width:760px){.uploadcare-tab-effects--effect-button:focus,.uploadcare-tab-effects--effect-button:hover{position:relative;overflow:visible}.uploadcare-tab-effects--effect-button:focus:after,.uploadcare-tab-effects--effect-button:hover:after{content:attr(aria-label);display:block;position:absolute;top:0;left:50%;width:auto;height:auto;background:#e3e1e1;color:#212121;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);padding:12px;border-radius:6px;line-height:1;min-width:100%}}\n.uploadcare-tab-effects--icon{height:32px}\n.uploadcare-tab-effects--effects{display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around;max-width:100%}\n.uploadcare-tab-effects--additions{-ms-flex-positive:1;flex-grow:1}\n\n\n.uploadcare-tab-effects--range{-ms-flex-positive:1;flex-grow:1}input[type=range].uploadcare-tab-effects--range__input{box-sizing:border-box;margin:0;padding:0;width:100%;height:40px;line-height:1}input[type=range].uploadcare-tab-effects--range__input:focus{outline:2px solid rgba(21,124,252,.5);outline-offset:1px}input[type=range].uploadcare-tab-effects--range__input::-moz-range-track{background:#d4d2d2}input[type=range].uploadcare-tab-effects--range__input::-moz-range-progress{background:#157cfc}input[type=range].uploadcare-tab-effects--range__input::-moz-range-thumb{border:none;background:#212121;box-shadow:none}input[type=range].uploadcare-tab-effects--range__input::-moz-range-thumb:focus,input[type=range].uploadcare-tab-effects--range__input::-moz-range-thumb:hover{background:#000}input[type=range].uploadcare-tab-effects--range__input::-moz-range-thumb:active{background:#000}input[type=range].uploadcare-tab-effects--range__input::-ms-track{background:#d4d2d2}input[type=range].uploadcare-tab-effects--range__input::-ms-fill-lower{background:#157cfc}input[type=range].uploadcare-tab-effects--range__input::-ms-thumb{background:#212121}input[type=range].uploadcare-tab-effects--range__input::-ms-thumb:active,input[type=range].uploadcare-tab-effects--range__input:focus::-ms-thumb{background:#000}');var R=Object.freeze({be:{effects:{captions:{blur:"Размыццё",crop:"ÐбрÑзка",enhance:"ПалÑпшÑнне",flip:"ÐдлюÑтраваць па вертыкалі",grayscale:"Ðдценні шÑрага",invert:"Інвертаваць",mirror:"ÐдлюÑтраваць па гарызанталі",rotate:"ПавÑрнуць",sharp:"ВыразнаÑць"},apply:"Ужыць"}},en:{effects:{captions:{blur:"Blur",crop:"Crop",enhance:"Enhance",flip:"Flip",grayscale:"Grayscale",invert:"Invert",mirror:"Mirror",rotate:"Rotate",sharp:"Sharpen"},apply:"Apply"}},fr:{effects:{captions:{blur:"Flouter",crop:"Recadrer",enhance:"Effets",flip:"Retourner",grayscale:"Noir et blanc",invert:"Inverser",mirror:"Mirroir",rotate:"Tourner",sharp:"Netteté"},apply:"Appliquer"}},it:{effects:{captions:{blur:"Sfoca",crop:"Ritaglia",enhance:"Accentua",flip:"Capovolgi",grayscale:"Bianconero",invert:"Inverti",mirror:"Specchia",rotate:"Ruota",sharp:"Nitidezza"},apply:"Applica"}},ja:{effects:{captions:{blur:"ã¼ã‹ã—",crop:"トリミング",enhance:"補æ£",flip:"å転",grayscale:"グレースケール",invert:"階調å転",mirror:"ミラー",rotate:"回転",sharp:"シャープ"},apply:"é©ç”¨"}},nl:{effects:{captions:{blur:"Vervagen",crop:"Bijknippen",enhance:"Verbeteren",flip:"Omkeren",grayscale:"Zwart-wit",invert:"Inverteren",mirror:"Spiegelen",rotate:"Roteren",sharp:"Verscherpen"},apply:"Toepassen"}},ru:{effects:{captions:{blur:"Размытие",crop:"Обрезка",enhance:"Улучшение",flip:"Отразить по вертикали",grayscale:"Оттенки Ñерого",invert:"Инвертировать",mirror:"Отразить по горизонтали",rotate:"Повернуть",sharp:"РезкоÑÑ‚ÑŒ"},apply:"Применить"}},vi:{effects:{captions:{blur:"Má»",crop:"Cắt",enhance:"Tinh chỉnh",flip:"Láºt",grayscale:"Xám",invert:"Âm bản",mirror:"GÆ°Æ¡ng",rotate:"Xoay",sharp:"Là m nét"},apply:"Ãp dụng"}}}),U=["crop","rotate","enhance","sharp","grayscale"],j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},O=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,a=!1,n=void 0;try{for(var r,l=e[Symbol.iterator]();!(o=(r=l.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){a=!0,n=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw n}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},I=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)},P=function(e){return Object.keys(R).indexOf(e)>-1},F=function(e){return(new DOMParser).parseFromString(e,"text/html").body.firstChild},N={blur:["number",10],enhance:["number",50],flip:["boolean"],grayscale:["boolean"],invert:["boolean"],mirror:["boolean"],rotate:["number"],sharp:["number",5]},B={blur:/-\/blur\/(([0-9]+)\/|)/i,crop:/-\/crop\/([0-9]+)x([0-9]+)(\/(center|([0-9]+),([0-9]+)))?\/(-\/resize\/([0-9]+)x([0-9]+)\/)?/i,enhance:/-\/enhance\/(([0-9]+)\/|)/i,flip:/-\/flip\//i,grayscale:/-\/grayscale\//i,invert:/-\/invert\//i,mirror:/-\/mirror\//i,rotate:/-\/rotate\/(([0-9]+)\/)/i,sharp:/-\/sharp\/(([0-9]+)\/|)/i},H={view:"preview",image:{},appliedEffects:{blur:0,crop:null,enhance:0,flip:!1,grayscale:!1,invert:!1,mirror:!1,rotate:0,sharp:0},otherModifiers:""},V=function(e){var t=e.originalSize,i=e.coords,o=i.width,a=i.height,n=i.center,r=i.left,l=i.top,s="";return t?o===t[0]&&a===t[1]||(window.do_the_crop&&"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType?s+="-/crop/"+(o-5)+"x"+(a-5)+"/"+r+","+l+"/":s+="-/crop/"+o+"x"+a+"/"+r+","+l+"/"):(s+="-/crop/"+o+"x"+a+"/",n?s+="center/":void 0!==r&&void 0!==l&&(s+=r+","+l+"/")),window.do_the_crop&&"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType&&(s+="-/border_radius/100p/-/format/png/"),e.resizeTo?s+="-/resize/"+e.resizeTo.join("x")+"/":s+="-/preview/",s},K=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o="";for(var a in e)if(e[a])switch(j(e[a])){case"boolean":if(!i&&~["flip","mirror"].indexOf(a))break;o+="-/"+a+"/";break;case"number":if(!i&&"rotate"===a)break;o+="-/"+a+"/"+e[a]+"/";break;case"object":"crop"===a&&t&&(o+=V(e[a]))}if(o){let i="";o=e.crop&&t?o+i:"-/preview/"+o+i}else o="";return o},Z=[0,270,180,90],W=["crop","rotate","mirror","flip","blur","sharp","enhance","grayscale","invert"],G=function(e,t){var i=O(t,2),o=i[0],a=i[1],n=e.downscale&&(o>e.preferedSize[0]||a>e.preferedSize[1]),r=e.upscale&&(o<e.preferedSize[0]||a<e.preferedSize[1]);return n||r?e.preferedSize:null},Y=function(){var e=void 0;return{getElement:function(){return e||(e=F('<div class="uploadcare--tab__content uploadcare--preview__content uploadcare--preview__content_crop"></div>\n')),e},appendChild:function(t){e&&e.appendChild(t)}}},J={"crop-button":"uploadcare-tab-effects--crop-button","crop-button__icon":"uploadcare-tab-effects--crop-button__icon",cropButton:"uploadcare-tab-effects--crop-button",cropButton__icon:"uploadcare-tab-effects--crop-button__icon"},Q="uploadcare--crop-sizes__item_current",X=function(e){var t=void 0,i=e.size,o=e.title,a=e.onClick,n={applied:e.applied||!1,disabled:e.disabled||!1},r=function(){var e=t.querySelector("."+J["crop-button__icon"]),o=i.width,a=i.height;o&&a?(e.style.width=o,e.style.height=a):(e.innerHTML='\n<svg width="32" height="32" role="presentation" class="uploadcare--icon">\n <use xlink:href="#uploadcare--icon-crop-free"/>\n</svg>\n ',e.classList.add("uploadcare--crop-sizes__icon_free"))},l=function(){!n.disabled&&a&&a()};return{getElement:function(){return t||(t=F('<div role="button" tabindex="0" class="uploadcare--button uploadcare--button_icon uploadcare--crop-sizes__item '+(e={title:o,cn:J}).cn["crop-button"]+'" data-caption="'+e.title+'">\n <div class="uploadcare--crop-sizes__icon '+e.cn["crop-button__icon"]+'"></div>\n</div>\n'),r(),n.applied&&t.classList.add(Q),t.addEventListener("click",l)),t;var e},toggleApplied:function(e){t&&n.applied!==e&&(n.applied=e,t.classList[e?"add":"remove"](Q))},toggleDisabled:function(e){t&&n.disabled!==e&&(n.disabled=e,t.setAttribute("aria-disabled",e),t.setAttribute("tabindex",e?"-1":"0"))}}},ee={crops:"uploadcare-tab-effects--crops"},te=function(e){var t=void 0,i=[],o=e.crops,a=e.onCropClick,n={currentCrop:e.currentCrop||0},r=function(e){i&&(n.currentCrop=e,i.forEach((function(t,i){return t.toggleApplied(i===e)})))};return{getElement:function(){return t||(t=F('<div class="'+ee.crops+'"></div>\n'),o.forEach((function(e){var t=e.index,o=e.size,l=e.title;i[t]=new X({size:o,title:l,applied:n.currentCrop===t,onClick:function(){n.currentCrop!==t&&(r(t),a(e))}})})),i.forEach((function(e){return t.appendChild(e.getElement())}))),t},toggleDisabled:function(e){i&&i.forEach((function(t){return t.toggleDisabled(e)}))},updateApplied:r}},ie={"effect-button":"uploadcare-tab-effects--effect-button","effect-button_applied":"uploadcare-tab-effects--effect-button_applied",effectButton:"uploadcare-tab-effects--effect-button",effectButton_applied:"uploadcare-tab-effects--effect-button_applied"},oe=Object.freeze({blur:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <defs>\n <filter id="filter-blur" width="200%" height="200%" x="-50%" y="-50%" filterUnits="objectBoundingBox">\n <feGaussianBlur stdDeviation="3" in="SourceGraphic">\n </feGaussianBlur></filter>\n </defs>\n <circle cx="16" cy="16" r="8" filter="url(#filter-blur)"></circle>\n</svg>\n'},crop:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M21,23 L10.9999602,23 C9.8967381,23 9,22.0989187 9,21.0000398 L9,11 L5,11 L5,9 L9,9 L9,5 L11,5 C11,5 11.0034766,21 10.9999602,21 L27,21 L27,23 L23,23 L23,27 L21,27 L21,23 Z M13,11 L13,9 L21.0046024,9 C22.1100735,9 23,9.89939484 23,11.0081317 L23,19.1279297 L21,19.1279297 L21,11.0081317 C21,11.00117 13,11 13,11 Z"></path>\n</svg>\n'},enhance:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M4.29289322,24.0082521 L16.3137085,11.9874369 C16.7042328,11.5969126 17.3373978,11.5969126 17.7279221,11.9874369 L20.5563492,14.815864 C20.9468735,15.2063883 20.9468735,15.8395533 20.5563492,16.2300776 L8.53553391,28.2508928 C8.14500961,28.6414171 7.51184464,28.6414171 7.12132034,28.2508928 L4.29289322,25.4224657 C3.90236893,25.0319414 3.90236893,24.3987764 4.29289322,24.0082521 Z M14.7175144,16.4120581 L16.131728,17.8262716 L18.4350288,15.5229708 L17.0208153,14.1087572 L14.7175144,16.4120581 L14.7175144,16.4120581 Z M16.3411081,7.13592111 L13.8054564,6.33578644 L16.3411081,5.53565177 L17.1412428,3 L17.9413775,5.53565177 L20.4770292,6.33578644 L17.9413775,7.13592111 L17.1412428,9.67157288 L16.3411081,7.13592111 Z M24.5356518,13.8304648 L22,13.0303301 L24.5356518,12.2301954 L25.3357864,9.69454365 L26.1359211,12.2301954 L28.6715729,13.0303301 L26.1359211,13.8304648 L25.3357864,16.3661165 L24.5356518,13.8304648 Z M9.53565177,10.8304648 L7,10.0303301 L9.53565177,9.23019541 L10.3357864,6.69454365 L11.1359211,9.23019541 L13.6715729,10.0303301 L11.1359211,10.8304648 L10.3357864,13.3661165 L9.53565177,10.8304648 Z M22.5356518,21.8304648 L20,21.0303301 L22.5356518,20.2301954 L23.3357864,17.6945436 L24.1359211,20.2301954 L26.6715729,21.0303301 L24.1359211,21.8304648 L23.3357864,24.3661165 L22.5356518,21.8304648 Z"></path>\n</svg>\n'},flip:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M15.3492086,13.7592566 L8.34920863,7.7592566 C7.64431003,7.15505781 8.07159372,6 9,6 L23,6 C23.9284063,6 24.35569,7.15505781 23.6507914,7.7592566 L16.6507914,13.7592566 C16.2763016,14.0802478 15.7236984,14.0802478 15.3492086,13.7592566 Z M15.3492086,18.2407434 C15.7236984,17.9197522 16.2763016,17.9197522 16.6507914,18.2407434 L23.6507914,24.2407434 C24.35569,24.8449422 23.9284063,26 23,26 L9,26 C8.07159372,26 7.64431003,24.8449422 8.34920863,24.2407434 L15.3492086,18.2407434 Z M11.7032574,24 L20.2967426,24 L16,20.3170778 L11.7032574,24 Z M27,15 L27,17 L25,17 L25,15 L27,15 Z M23,15 L23,17 L21,17 L21,15 L23,15 Z M19,15 L19,17 L17,17 L17,15 L19,15 Z M15,15 L15,17 L13,17 L13,15 L15,15 Z M11,15 L11,17 L9,17 L9,15 L11,15 Z M7,15 L7,17 L5,17 L5,15 L7,15 Z"></path>\n</svg>\n'},grayscale:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M19.3596223,12.0563396 L21.926451,14.6231683 C21.8411716,15.2691808 21.6833431,15.8923164 21.4614188,16.484122 L17.1233611,12.1460643 C16.660957,12.2457748 16.2168493,12.3946804 15.7967877,12.5870314 L20.8981472,17.688391 C20.6220708,18.1749895 20.2993732,18.6316689 19.936127,19.0523568 L14.3668527,13.4830825 C14.0447797,13.7487243 13.7487243,14.0447797 13.4830825,14.3668527 L19.0523568,19.936127 C18.6316689,20.2993732 18.1749895,20.6220708 17.688391,20.8981472 L12.5870314,15.7967877 C12.3946804,16.2168493 12.2457748,16.660957 12.1460643,17.1233611 L16.484122,21.4614188 C15.8923164,21.6833431 15.2691808,21.8411716 14.6231683,21.926451 L12.0563396,19.3596223 C12.4769606,22.5431547 15.2015668,25 18.5,25 C22.0898509,25 25,22.0898509 25,18.5 C25,15.2015668 22.5431547,12.4769606 19.3596223,12.0563396 Z M10.5324038,21.4675962 C7.30134737,20.2636648 5,17.1505866 5,13.5 C5,8.80557963 8.80557963,5 13.5,5 C17.1505866,5 20.2636648,7.30134737 21.4675962,10.5324038 C24.6986526,11.7363352 27,14.8494134 27,18.5 C27,23.1944204 23.1944204,27 18.5,27 C14.8494134,27 11.7363352,24.6986526 10.5324038,21.4675962 L10.5324038,21.4675962 Z"></path>\n</svg>\n'},invert:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" xmlns:xlink="http://www.w3.org/1999/xlink">\n <path d="M5,6.99180311 C5,5.89386312 5.90087297,5 6.99180311,5 L25.0081969,5 C26.1061369,5 27,5.90087297 27,6.99180311 L27,25.0081969 C27,26.1061369 26.099127,27 25.0081969,27 L6.99180311,27 C5.89386312,27 5,26.099127 5,25.0081969 L5,6.99180311 Z M25,7 L7,7 L7,25 L12.071629,19.928371 C13.0769868,20.9337288 14.4658757,21.5555556 16,21.5555556 C19.0682486,21.5555556 21.5555556,19.0682486 21.5555556,16 C21.5555556,14.4658757 20.9337288,13.0769868 19.928371,12.071629 L25,7 L25,7 Z M12.071629,19.928371 C11.0662712,18.9230132 10.4444444,17.5341243 10.4444444,16 C10.4444444,12.9317514 12.9317514,10.4444444 16,10.4444444 C17.5341243,10.4444444 18.9230132,11.0662712 19.928371,12.071629 L12.071629,19.928371 L12.071629,19.928371 Z"></path>\n</svg>\n'},mirror:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M13.7592566,16.6507914 L7.7592566,23.6507914 C7.15505781,24.35569 6,23.9284063 6,23 L6,9 C6,8.07159372 7.15505781,7.64431003 7.7592566,8.34920863 L13.7592566,15.3492086 C14.0802478,15.7236984 14.0802478,16.2763016 13.7592566,16.6507914 Z M18.2407434,16.6507914 C17.9197522,16.2763016 17.9197522,15.7236984 18.2407434,15.3492086 L24.2407434,8.34920863 C24.8449422,7.64431003 26,8.07159372 26,9 L26,23 C26,23.9284063 24.8449422,24.35569 24.2407434,23.6507914 L18.2407434,16.6507914 Z M24,20.2967426 L24,11.7032574 L20.3170778,16 L24,20.2967426 Z M15,5 L17,5 L17,7 L15,7 L15,5 Z M15,9 L17,9 L17,11 L15,11 L15,9 Z M15,13 L17,13 L17,15 L15,15 L15,13 Z M15,17 L17,17 L17,19 L15,19 L15,17 Z M15,21 L17,21 L17,23 L15,23 L15,21 Z M15,25 L17,25 L17,27 L15,27 L15,25 Z"></path>\n</svg>\n'},rotate:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <path d="M22.8449302,10.1550698 L22.8449302,10.1550698 C21.1616077,8.18356972 18.6836184,7 16,7 C11.0294373,7 7,11.0294373 7,16 C7,20.9705627 11.0294373,25 16,25 C18.6610655,25 21.131472,23.8397191 22.8318195,21.8591349 L24.3493086,23.1619115 C22.2729281,25.5805032 19.2506133,27 16,27 C9.92486775,27 5,22.0751322 5,16 C5,9.92486775 9.92486775,5 16,5 C19.224943,5 22.2084802,6.39983031 24.2627348,8.73726518 L27,6 L27,11.9970707 C27,12.5509732 26.5621186,13 25.9970707,13 L20,13 L22.8449302,10.1550698 Z M15,14 L17,14 C17.5522847,14 18,14.4477153 18,15 L18,17 C18,17.5522847 17.5522847,18 17,18 L15,18 C14.4477153,18 14,17.5522847 14,17 L14,15 C14,14.4477153 14.4477153,14 15,14 Z"></path>\n</svg>\n'},sharp:function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n <polygon points="16 6 25 26 7 26"></polygon>\n</svg>\n'}}),ae=function(e){var t=e.name;if(!oe[t])throw new Error('Icon with name "'+t+"\" doesn't exist.");var i=void 0;return{getElement:function(){return i||(i=F(oe[t]())).setAttribute("class",i.getAttribute("class")+" uploadcare-tab-effects--icon"),i}}},ne=function(e){var t=void 0,i=e.effect,o=e.title,a=e.onClick,n={applied:e.applied||!1,disabled:e.disabled||!1},r=function(){!n.disabled&&a&&a()};return{getElement:function(){return t||(a=new ae({name:i}),(t=F('<div role="button" tabindex="0" class="uploadcare--button uploadcare--button_icon '+(e={title:o,cn:ie}).cn["effect-button"]+'" aria-label="'+e.title+'"></div>\n')).appendChild(a.getElement()),n.applied&&t.classList.add(ie["effect-button_applied"]),t.addEventListener("click",r),t.addEventListener("keypress",(function(e){"Enter"===e.code&&(t.dispatchEvent(new Event("click")),e.preventDefault(),e.stopPropagation())}))),t;var e,a},getEffect:function(){return i},toggleApplied:function(e){t&&n.applied!==e&&(n.applied=e,t.classList[e?"add":"remove"](ie["effect-button_applied"]))},toggleDisabled:function(e){t&&n.disabled!==e&&(n.disabled=e,t.setAttribute("aria-disabled",e),t.setAttribute("tabindex",e?-1:0))}}},re={effects:"uploadcare-tab-effects--effects"},le=function(e){var t=void 0,i=[],o=e.effects,a=e.titles,n=e.onEffectClick,r={appliedEffects:e.appliedEffects};return{getElement:function(){return t||(t=F('<div class="'+re.effects+'"></div>\n'),o.forEach((function(e){var t=a[e];i.push(new ne({effect:e,title:t,applied:!!r.appliedEffects[e],onClick:function(){return n(e)}}))})),i.forEach((function(e){return t.appendChild(e.getElement())}))),t},toggleDisabled:function(e){i&&i.forEach((function(t){return t.toggleDisabled(e)}))},updateApplied:function(e){i&&(r.appliedEffects=e,i.forEach((function(t){return t.toggleApplied(!!e[t.getEffect()])})))}}},se={additions:"uploadcare-tab-effects--additions",done:"uploadcare-tab-effects--done",cancel:"uploadcare-tab-effects--cancel"},pe=function(e){var t=void 0,i=void 0,o=void 0,a=void 0,n=e.locale,r=e.onDone,l=e.onCancel;return{getElement:function(){return t||(t=F('<div class="uploadcare--footer uploadcare--tab__footer">\n <div class="uploadcare--footer__additions '+(e={cn:se,locale:n}).cn.additions+'"></div>\n\n <button type="button" class="uploadcare--button uploadcare--footer__button uploadcare--preview__back '+e.cn.cancel+'">\n '+e.locale.cancel+'\n </button>\n\n <button type="button" class="uploadcare--button uploadcare--button_primary uploadcare--footer__button uploadcare--preview__done '+e.cn.done+'">\n '+e.locale.done+"\n </button>\n</div>\n"),i=t.querySelector("."+se.additions),o=t.querySelector("."+se.done),a=t.querySelector("."+se.cancel),o.addEventListener("click",r),a.addEventListener("click",l)),t;var e},empty:function(){if(t)for(;i.firstChild;)i.removeChild(i.firstChild)},appendChild:function(e){t&&i.appendChild(e)},toggleDisabled:function(e){o&&(o.disabled=e)},updateDoneTitle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.innerText=e||n.done}}},ce={title:"uploadcare-tab-effects--title"},de=function(e){var t=void 0,i=void 0,o=e.title;return{getElement:function(){return t||(t=F('<div class="uploadcare--tab__header">\n <div class="uploadcare--text uploadcare--text_size_large uploadcare--tab__title uploadcare--preview__title '+(e={title:o,cn:ce}).cn.title+'">\n '+e.title+"\n </div>\n</div>\n"),i=t.querySelector("."+ce.title)),t;var e},updateTitle:function(e){i&&(i.innerText=e)}}},ue={image:"uploadcare-tab-effects--image","image-container":"uploadcare-tab-effects--image-container",imageContainer:"uploadcare-tab-effects--image-container"},me=function(e){var t=void 0,i=void 0,o=e.imageUrl,a=e.onUpdate,n=e.onLoad,r=e.onFail;return{getElement:function(){return t||(t=F('<div class="uploadcare--media '+(e={cn:ue,imageUrl:o}).cn["image-container"]+'">\n <img src="'+e.imageUrl+'" alt="" class="uploadcare--media__image uploadcare--preview__image '+e.cn.image+'">\n</div>\n'),(i=t.querySelector("."+ue.image)).addEventListener("load",(function(){return n()})),i.addEventListener("error",(function(){i.complete&&r()})),i.addEventListener("abort",(function(){return r()}))),t;var e},getImg:function(){return i},updateImageUrl:function(e){i.src===e&&i.removeAttribute("src"),i.src=e,a()}}},fe={range:"uploadcare-tab-effects--range",range__input:"uploadcare-tab-effects--range__input"},he=function(e){var t=void 0,i=e.min,o=void 0===i?0:i,a=e.max,n=void 0===a?100:a,r=e.step,l=void 0===r?1:r,s=e.value,p=void 0===s?50:s,c=e.onChange;return{getElement:function(){return t||(t=F('<div class="'+(e={cn:fe,min:o,max:n,step:l,value:p}).cn.range+'">\n <input type="range" class="'+e.cn.range__input+'" min="'+e.min+'" max="'+e.max+'" step="'+e.step+'" value="'+e.value+'">\n</div>\n')).addEventListener("change",(function(e){return c(e.target.value)})),t;var e}}},ge={enhance:[0,100],sharp:[0,20],blur:[0,100,5]},ye=function(e){var t=void 0,i=void 0,o=void 0,a=void 0,n=void 0,r=void 0,l=void 0,s=e.uc,p=e.store,c=e.settings,d=e.onDone,u=e.onFail,m={cropWidget:null,currentCrop:0},f=s.locale.t,h=s.crop.CropWidget,g="-/preview/1162x693/-/setfill/ffffff/-/format/png/-/progressive/yes/",y=function(e){return"preview"===e?f("dialog.tabs.preview.regular.title"):b(e)},b=function(e){return f("effects.captions."+e)},v=function(){m.cropWidget&&m.cropWidget.__api&&(m.cropWidget.__api.release(),m.cropWidget.__api.destroy(),n.getImg().removeAttribute("style"))},x=function(e){var t=p.getState().view;"preview"===t?d():(e.stopPropagation(),"crop"===t&&q(),p.setView("preview"))},w=function(e){var t=p.getState(),i=t.view,o=t.appliedEffects,a=c.crop;if("preview"!==i){e.stopPropagation();var n=0;"crop"===i&&(n=a.some((function(e){return!e.preferedSize}))?null:o[i],v()),p.setAppliedEffect(M({},i,n)),p.setView("preview")}},_=function(e){var t,i,o=p.getState().appliedEffects;"rotate"!==e?"boolean"!=typeof o[e]?"crop"!==e&&"number"!=typeof o[e]||p.setView(e):p.setAppliedEffect(M({},e,!o[e])):p.setAppliedEffect({rotate:(t=o.rotate,i=Z.indexOf(t),~i&&i!==Z.length-1?Z[i+1]:Z[0])})},A=function(e){var t=p.getState().view;p.setAppliedEffect(M({},t,parseInt(e)))},k=function(){p.rebuildImage();var e=p.getState().appliedEffects;r.updateApplied(e)},T=function(){var e=p.getState(),t=e.view,o=e.appliedEffects,l=e.image;if(i.updateTitle(y(t)),"preview"===t?a.updateDoneTitle():a.updateDoneTitle(f("effects.apply")),a.empty(),"preview"!==t){if("crop"===t){C();var s=l.originalUrl+(K([{crop:null}],!1,!1)||"")+g;return c.previewUrlCallback&&(s=c.previewUrlCallback(s,l)),void n.updateImageUrl(s)}if(ge[t]){var d=o[t];0===d&&(d=ge[t][1]/2,p.setAppliedEffect(M({},t,d)));var u=new he({min:ge[t][0],max:ge[t][1],step:ge[t][2],value:d,onChange:A});a.appendChild(u.getElement())}}else a.appendChild(r.getElement())},S=function(){var e=p.getState().image,t=e.cdnUrl+g;c.previewUrlCallback&&(t=c.previewUrlCallback(t,e)),n.updateImageUrl(t)},E=function(){var e=p.getState(),t=e.view;switch(e.imageLoad){case"start":a.toggleDisabled(!0),"preview"===t&&r.toggleDisabled(!0),"crop"===t&&l.toggleDisabled(!0);break;case"load":a.toggleDisabled(!1),"preview"===t?r.toggleDisabled(!1):"crop"===t&&(L(),l.toggleDisabled(!1));break;case"fail":u()}},C=function(){var e=c.crop,t=p.getState().appliedEffects.crop;m.currentCrop=t&&void 0!==t.index?t.index:0,l=new te({crops:e.map((function(e,t){var i=z(e);return{index:t,settings:e,title:i.description,size:{width:i.width,height:i.height}}})),currentCrop:m.currentCrop,onCropClick:function(e){m.currentCrop=e.index,m.cropWidget&&m.cropWidget.setCrop(e.settings)}}),a.appendChild(l.getElement())},L=function(){var e=c.crop,t=p.getState(),i=t.appliedEffects,o=t.image,a=i.crop,r=o.originalImageInfo,l=[r.width,r.height];m.cropWidget=new h(s.jQuery(n.getImg()),l,e[m?.currentCrop||0]),a&&a.coords&&m.cropWidget.setSelection(a.coords)},q=function(){var e=m.cropWidget,t=e.crop,i=e.originalSize,o=m.cropWidget.getSelection();v(),p.setAppliedEffect({crop:{originalSize:i,coords:o,resizeTo:G(t,[o.width,o.height]),settings:t,index:m.currentCrop}})},z=function(e){var t=e.preferedSize,i=f("dialog.tabs.preview.crop.free"),o=void 0,a=void 0;if(t){var n=s.utils.gcd(t[0],t[1]),r=s.utils.fitSize(t,[30,30],!0);i=t[0]/n+":"+t[1]/n,o=Math.max(20,r[0])+"px",a=Math.max(12,r[1])+"px"}return{description:i,width:o,height:a}};return{getElement:function(){return t||function(){var e=p.getState(),l=e.view,s=e.appliedEffects,d=e.image;t=F("<div></div>\n"),i=new de({title:y(l)}),a=new pe({locale:{done:f("dialog.tabs.preview.done"),cancel:f("dialog.tabs.preview.image.change")},onDone:x,onCancel:w}),o=new Y;var u=d.cdnUrl+g;c.previewUrlCallback&&(u=c.previewUrlCallback(u,d)),n=new me({imageUrl:u,onUpdate:function(){return p.setImageLoad("start")},onLoad:function(){return p.setImageLoad("load")},onFail:function(){return p.setImageLoad("fail")}}),t.appendChild(i.getElement()),t.appendChild(o.getElement()),t.appendChild(a.getElement()),o.appendChild(n.getElement());var m=c.effects,h=m.reduce((function(e,t){return e[t]=b(t),e}),{});r=new le({effects:m,titles:h,appliedEffects:s,onEffectClick:_}),a.appendChild(r.getElement()),p.subscribeToAppliedEffects(k),p.subscribeToView(T),p.subscribeToImage(S),p.subscribeToImageLoad(E)}(),t}}};function be(e,t){function i(e,t,o,a,n){i.__super__.constructor.call(this,e,t,o,a,n)}return function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);function o(){this.constructor=e}o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype}(i,e),i.prototype.__setState=function(e,o){var a,n=this;if("image"===e){if(o.info){var r=void 0===(a=window["UPLOADCARE_"+"effects".toUpperCase()])?null:a;void 0===this.settings.effects&&r&&(this.settings.effects=r);var l=function(e){var t=function(e){var t=[];if("string"==typeof e&&"all"===e)return W;var i=(t="string"==typeof e?e.replace(/\s/g,"").split(","):Array.isArray(e)?e:U).indexOf("crop");return~i&&0!==i&&(t=["crop"].concat(I(t.slice(0,i)),I(t.slice(i+1)))),t}(e.effects),i=function(e,t){return e||!~t.indexOf("crop")?e:[{downscale:!1,notLess:!1,preferedSize:void 0,upscale:!1}]}(e.crop,t);return $({},e,{crop:i},{effects:t},{locale:e.locale?e.locale:"en"})}(this.settings),s=function(e,t){var i=t.effects,o=t.crop,a=function(e){var t=H.appliedEffects,i={};return e.forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i}(i),n=function(e,t,i){if(!e)return{effects:{},otherModifiers:""};var o={},a=e.replace(/-\/preview\//g,"");return t.forEach((function(t){if(B[t]){var n=e.match(B[t]);if(n){var r=void 0;if("crop"===t){var l=n[7]&&[n[8],n[9]],s=parseInt(n[1]),p=parseInt(n[2]),c=i.findIndex((function(e){if(void 0===e.preferedSize)return!0;var t=O(e.preferedSize,2),i=t[0],o=t[1],a=s===i&&p===o,n=(i/o).toPrecision(2)===(s/p).toPrecision(2);return a||n}));r={resizeTo:l,index:c>=0?c:null,coords:{width:s,height:p,center:"center"===n[4],left:void 0===n[5]?void 0:parseInt(n[5]),top:void 0===n[6]?void 0:parseInt(n[6])}}}else"boolean"===N[t][0]&&(r=!0),"number"===N[t][0]&&(r=void 0===n[2]?N[t][1]:parseInt(n[2]));o[t]=r,a=a.replace(n[0],"")}}})),{effects:o,otherModifiers:a}}(e.cdnUrlModifiers,i,o);return function(e){var t=e,i={view:[],imageLoad:[],appliedEffects:[],image:[]},o=function(e,t){return i[t].push(e),function(){i[t]=i[t].filter((function(t){return t!==e}))}};return{getState:function(){return t},setView:function(e){t=$({},t,{view:e}),i.view.forEach((function(e){return e()}))},setImageLoad:function(e){t=$({},t,{imageLoad:e}),i.imageLoad.forEach((function(e){return e()}))},setAppliedEffect:function(e){var o=$({},t.appliedEffects,e);t=$({},t,{appliedEffects:o}),i.appliedEffects.forEach((function(e){return e()}))},rebuildImage:function(){var e=t,o=e.appliedEffects,a=e.image,n=K(o)+t.otherModifiers,r=function(e){if(e){var t=e.coords,i=e.resizeTo,o={width:t.width,height:t.height,left:t.left,top:t.top};return i&&(o.sw=i[0],o.sh=i[1]),o}return null}(o.crop);t.image=$({},a,{cdnUrl:a.originalUrl+(n||""),cdnUrlModifiers:n,crop:r}),i.image.forEach((function(e){return e()}))},subscribeToView:function(e){return o(e,"view")},subscribeToImageLoad:function(e){return o(e,"imageLoad")},subscribeToImage:function(e){return o(e,"image")},subscribeToAppliedEffects:function(e){return o(e,"appliedEffects")}}}($({},H,{image:e},{appliedEffects:$({},a,n.effects)},{otherModifiers:n.otherModifiers}))}(o.info,l);!function(e,t,i){var o=t.crop,a=e.getState().image;if(o&&!o.some((function(e){return!e.preferedSize}))&&a.isImage&&!a.cdnUrlModifiers&&!a.crop){var n=a.originalImageInfo,r=i.utils.fitSize(o[0].preferedSize,[n.width,n.height],!0),l={originalSize:[n.width,n.height],settings:o[0],resizeTo:G(o[0],r),coords:{left:Math.round((n.width-r[0])/2),top:Math.round((n.height-r[1])/2),width:r[0],height:r[1]}};e.setAppliedEffect({crop:l}),e.rebuildImage()}}(s,l,t);var p=l.locale;t.locale.translations=function(e,t){var i=$({},e),o=P(t),a=R.en,n=function(e){return i.hasOwnProperty(e)};for(var r in i)if(n(r)){if(!n(t)){var l=i[t];i[t]=$({},l,a);continue}o||P(r)?i[r]=$({},i[r],R[r]):i[r]=$({},i[r],a)}return i}(t.locale.translations,p),t.locale.rebuild();var c=new ye({uc:t,store:s,settings:l,onDone:function(){var e=n.file.then((function(e){var t=s.getState().image,i=t.cdnUrl,o=t.cdnUrlModifiers,a=t.crop;return $({},e,{cdnUrl:i,cdnUrlModifiers:o,crop:a})}));n.dialogApi.fileColl.replace(n.file,e)},onFail:function(){n.file=null,n.__setState("error",{error:"loadImage"})}}),d=this.container[0];d.innerHTML="",Array.prototype.slice.call(c.getElement().children).forEach((function(e){return d.appendChild(e)})),s.setImageLoad("start")}}else i.__super__.__setState.call(this,e,o)},i.prototype.initImage=function(){},i}const ve=[{code:"en",name:"English"},{code:"de",name:"German"},{code:"fr",name:"French"},{code:"es",name:"Spanish"},{code:"ar",name:"Arabic"},{code:"az",name:"Azerbaijani"},{code:"ca",name:"Catalan"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"el",name:"Greek"},{code:"et",name:"Estonian"},{code:"he",name:"Hebrew"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"ko",name:"Korean"},{code:"lv",name:"Latvian"},{code:"no",name:"Norwegian"},{code:"nl",name:"Dutch"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sk",name:"Slovak"},{code:"sr",name:"Serbian"},{code:"sv",name:"Swedish"},{code:"tr",name:"Turkish"},{code:"uk",name:"Ukrainian"},{code:"vi",name:"Vietnamese"},{code:"zhTW",name:"Chinese (Taiwan)"},{code:"zh",name:"Chinese"}],xe=(e,t)=>{let i=document.querySelector("html").getAttribute("lang");"zh-TW"===i&&(i="zhTW");let o=ve.filter((e=>e.code===i))[0]||"default";const a=e?.translations?e.translations.filter((e=>e.language===o.name)):[];return a.length?(window.UPLOADCARE_DATA[t].uploadButtonTranslate=a[0].translations.buttonText,window.UPLOADCARE_DATA[t].uploadButtonText2Translate=a[0].translations.buttonTextAfter,window.UPLOADCARE_DATA[t].buttonHeadingTranslate=a[0].translations.buttonHeading,window.UPLOADCARE_DATA[t].dialogInstructionOneTranslate=a[0].translations.desktopInstruction,window.UPLOADCARE_DATA[t].dialogInstructionTwoTranslate=a[0].translations.mobileInstruction,window.UPLOADCARE_DATA[t].textfieldHeadingTranslate=a[0].translations?.textFieldHeading||e.textFieldName,window.UPLOADCARE_DATA[t].textFieldHelpTextTranslate=a[0].translations?.textFieldHelpText||e.fieldHelpText,window.UPLOADCARE_DATA[t].dialogLanguageTranslate=i,UPLOADCARE_FIELD===t&&(window.UPLOADCARE_LOCALE=i),a[0].translations):(window.UPLOADCARE_DATA[t].uploadButtonTranslate=e.uploadButtonText,window.UPLOADCARE_DATA[t].uploadButtonText2Translate=e.uploadButtonText2,window.UPLOADCARE_DATA[t].buttonHeadingTranslate=e.atcTitle,window.UPLOADCARE_DATA[t].dialogInstructionOneTranslate=e.dialogInstructionOne,window.UPLOADCARE_DATA[t].dialogInstructionTwoTranslate=e.dialogInstructionTwo,window.UPLOADCARE_DATA[t].dialogLanguageTranslate=e.dialogLanguage,window.UPLOADCARE_DATA[t].textfieldHeadingTranslate=e.textFieldName,window.UPLOADCARE_DATA[t].textFieldHelpTextTranslate=e.fieldHelpText,UPLOADCARE_FIELD===t&&(window.UPLOADCARE_LOCALE="custom"===e.dialogLanguage?"en":e.dialogLanguage),!1)},we=(e,t=!1)=>{let i;if(!0===e.fopt1)i="*";else if(!0===e.fopt2){let t=[];e.pdf&&t.push("application/pdf"),e.word&&(t=t.concat(["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12"])),e.customFile&&(e.fileTypes.includes("audio/x-wav")&&t.push("audio/wav"),e.fileTypes.includes("application/zip")&&t.push("application/x-zip-compressed"),e.fileTypes.map((e=>{e.includes("/")?t.push(e):t.push(_[void 0===e.split(".")[1]?e:e.split(".")[1]])}))),i=t.join(" ")}else!0===e.fopt3?i=t?"image/*":"imageonly":!0===e.fopt4&&(i="application/pdf");return i};function _e(e){return"[object Object]"===Object.prototype.toString.call(e)}const Ae=/\W|_/g;function ke(e,{ignoreKeys:t}={ignoreKeys:[]}){return Array.isArray(e)?e.map((e=>Te(e,{ignoreKeys:t}))):e}function Te(e,{ignoreKeys:t}={ignoreKeys:[]}){if(Array.isArray(e))return ke(e,{ignoreKeys:t});if(!_e(e))return e;const i={};for(const a of Object.keys(e)){let n=e[a];t.includes(a)?i[a]=n:(_e(n)?n=Te(n,{ignoreKeys:t}):Array.isArray(n)&&(n=ke(n,{ignoreKeys:t})),i[(o=a,o.split(Ae).map(((e,t)=>e.charAt(0)[t>0?"toUpperCase":"toLowerCase"]()+e.slice(1))).join(""))]=n)}var o;return i}const Se={factor:2,time:100};class Ee extends Error{originalProgressEvent;constructor(e){super(),this.name="UploadcareNetworkError",this.message="Network error",Object.setPrototypeOf(this,Ee.prototype),this.originalProgressEvent=e}}const Ce=(e,t)=>{e&&(e.aborted?Promise.resolve().then(t):e.addEventListener("abort",(()=>t()),{once:!0}))};class Le extends Error{isCancel=!0;constructor(e="Request canceled"){super(e),Object.setPrototypeOf(this,Le.prototype)}}const qe=({check:e,interval:t=500,timeout:i,signal:o})=>new Promise(((a,n)=>{let r,l;Ce(o,(()=>{r&&clearTimeout(r),n(new Le("Poll cancelled"))})),i&&(l=setTimeout((()=>{r&&clearTimeout(r),n(new Le("Timed out"))}),i));const s=()=>{try{Promise.resolve(e(o)).then((e=>{e?(l&&clearTimeout(l),a(e)):r=setTimeout(s,t)})).catch((e=>{l&&clearTimeout(l),n(e)}))}catch(e){l&&clearTimeout(l),n(e)}};r=setTimeout(s,0)})),ze={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:52428800,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:26214400,multipartChunkSize:5242880,multipartMinLastPartSize:1048576,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},De="application/octet-stream",Re="original",Ue=({method:e,url:t,data:i,headers:o={},signal:a,onProgress:n})=>new Promise(((r,l)=>{const s=new XMLHttpRequest,p=e?.toUpperCase()||"GET";let c=!1;s.open(p,t,!0),o&&Object.entries(o).forEach((e=>{const[t,i]=e;void 0!==i&&!Array.isArray(i)&&s.setRequestHeader(t,i)})),s.responseType="text",Ce(a,(()=>{c=!0,s.abort(),l(new Le)})),s.onload=()=>{if(200!=s.status)l(new Error(`Error ${s.status}: ${s.statusText}`));else{const e={method:p,url:t,data:i,headers:o||void 0,signal:a,onProgress:n},l=s.getAllResponseHeaders().trim().split(/[\r\n]+/),c={};l.forEach((function(e){const t=e.split(": "),i=t.shift(),o=t.join(": ");i&&void 0!==i&&(c[i]=o)}));const d=s.response,u=s.status;r({request:e,data:d,headers:c,status:u})}},s.onerror=e=>{c||l(new Ee(e))},n&&"function"==typeof n&&(s.upload.onprogress=e=>{e.lengthComputable?n({isComputable:!0,value:e.loaded/e.total}):n({isComputable:!1})}),i?s.send(i):s.send()})),je=e=>"undefined"!=typeof Blob&&e instanceof Blob,Me=e=>"undefined"!=typeof File&&e instanceof File,$e=e=>!!e&&"object"==typeof e&&!Array.isArray(e)&&"uri"in e&&"string"==typeof e.uri,Oe=e=>je(e)||Me(e)||$e(e);function Ie(e,t,i){if((o=i)&&"object"==typeof o&&"data"in o&&Oe(o.data)){const{name:o,contentType:a}=i,n=i.data,r=(({name:e})=>e?[e]:[])({name:o,contentType:a});e.push([t,n,...r])}else if((e=>!!e&&"object"==typeof e&&!Array.isArray(e))(i))for(const[o,a]of Object.entries(i))void 0!==a&&e.push([`${t}[${o}]`,String(a)]);else(e=>"string"==typeof e||"number"==typeof e||void 0===e)(i)&&i&&e.push([t,i.toString()]);var o}function Pe(e){const t=new FormData,i=function(e){const t=[];for(const[i,o]of Object.entries(e))Ie(t,i,o);return t}(e);for(const e of i){const[i,o,...a]=e;t.append(i,o,...a)}return t}class Fe extends Error{isCancel;code;request;response;headers;constructor(e,t,i,o,a){super(),this.name="UploadClientError",this.message=e,this.code=t,this.request=i,this.response=o,this.headers=a,Object.setPrototypeOf(this,Fe.prototype)}}const Ne=(e,t,i)=>{const o=new URL(e);return o.pathname=(o.pathname+t).replace("//","/"),i&&(o.search=(e=>{const t=new URLSearchParams;for(const[i,o]of Object.entries(e))o&&"object"==typeof o&&!Array.isArray(o)?Object.entries(o).filter((e=>e[1]??!1)).forEach((e=>t.set(`${i}[${e[0]}]`,String(e[1])))):Array.isArray(o)?o.forEach((e=>{t.append(`${i}[]`,e)})):"string"==typeof o&&o?t.set(i,o):"number"==typeof o&&t.set(i,o.toString());return t.toString()})(i)),o.toString()};function Be(e){return function({libraryName:e,libraryVersion:t,userAgent:i,publicKey:o="",integration:a=""}){const n="JavaScript";return"string"==typeof i?i:"function"==typeof i?i({publicKey:o,libraryName:e,libraryVersion:t,languageName:n,integration:a}):`${[e,t,o].filter(Boolean).join("/")} (${[n,a].filter(Boolean).join("; ")})`}({libraryName:"UploadcareUploadClient",libraryVersion:"6.6.1",...e})}function He(e,t){const{retryThrottledRequestMaxTimes:i,retryNetworkErrorMaxTimes:o}=t;return function(e,t=Se){let i=0;return function e(o){const a=Math.round(t.time*t.factor**i);return o({attempt:i,retry:t=>(e=>new Promise((t=>setTimeout(t,e))))(t??a).then((()=>(i+=1,e(o))))})}(e)}((({attempt:t,retry:a})=>e().catch((e=>{if("response"in e&&"RequestThrottledError"===e?.code&&t<i)return a(function(e){const{headers:t}=e||{};if(!t||"string"!=typeof t["retry-after"])return 15e3;const i=parseInt(t["retry-after"],10);return Number.isFinite(i)?1e3*i:15e3}(e));if(e instanceof Ee&&t<o)return a(1e3*(t+1));throw e}))))}const Ve=e=>{let t="";return(je(e)||Me(e)||$e(e))&&(t=e.type),t||De},Ke=e=>{let t="";return Me(e)&&e.name?t=e.name:je(e)?t="":$e(e)&&e.name&&(t=e.name),t||Re};function Ze(e){return void 0===e||"auto"===e?"auto":e?"1":"0"}function We(e,{publicKey:t,fileName:i,contentType:o,baseURL:a=ze.baseURL,secureSignature:n,secureExpire:r,store:l,signal:s,onProgress:p,source:c="local",integration:d,userAgent:u,retryThrottledRequestMaxTimes:m=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=ze.retryNetworkErrorMaxTimes,metadata:h}){return He((()=>Ue({method:"POST",url:Ne(a,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Be({publicKey:t,integration:d,userAgent:u})},data:Pe({file:{data:e,name:i||Ke(e),contentType:o||Ve(e)},UPLOADCARE_PUB_KEY:t,UPLOADCARE_STORE:Ze(l),signature:n,expire:r,source:c,metadata:h}),signal:s,onProgress:p}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}var Ge,Ye;function Je(e,{publicKey:t,baseURL:i=ze.baseURL,store:o,fileName:a,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:r,secureSignature:l,secureExpire:s,source:p="url",signal:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=ze.retryNetworkErrorMaxTimes,metadata:h}){return He((()=>Ue({method:"POST",headers:{"X-UC-User-Agent":Be({publicKey:t,integration:d,userAgent:u})},url:Ne(i,"/from_url/",{jsonerrors:1,pub_key:t,source_url:e,store:Ze(o),filename:a,check_URL_duplicates:n?1:void 0,save_URL_duplicates:r?1:void 0,signature:l,expire:s,source:p,metadata:h}),signal:c}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}function Qe(e,{publicKey:t,baseURL:i=ze.baseURL,signal:o,integration:a,userAgent:n,retryThrottledRequestMaxTimes:r=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=ze.retryNetworkErrorMaxTimes}={}){return He((()=>Ue({method:"GET",headers:t?{"X-UC-User-Agent":Be({publicKey:t,integration:a,userAgent:n})}:void 0,url:Ne(i,"/from_url/status/",{jsonerrors:1,token:e}),signal:o}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o&&!(e=>"status"in e&&e.status===Ye.Error)(o))throw new Fe(o.error.content,void 0,i,o,t);return o}))),{retryNetworkErrorMaxTimes:l,retryThrottledRequestMaxTimes:r})}function Xe(e,{publicKey:t,baseURL:i=ze.baseURL,jsonpCallback:o,secureSignature:a,secureExpire:n,signal:r,source:l,integration:s,userAgent:p,retryThrottledRequestMaxTimes:c=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:d=ze.retryNetworkErrorMaxTimes}){return He((()=>Ue({method:"POST",headers:{"X-UC-User-Agent":Be({publicKey:t,integration:s,userAgent:p})},url:Ne(i,"/group/",{jsonerrors:1,pub_key:t,files:e,callback:o,signature:a,expire:n,source:l}),signal:r}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryNetworkErrorMaxTimes:d,retryThrottledRequestMaxTimes:c})}function et(e,{publicKey:t,baseURL:i=ze.baseURL,signal:o,source:a,integration:n,userAgent:r,retryThrottledRequestMaxTimes:l=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=ze.retryNetworkErrorMaxTimes}){return He((()=>Ue({method:"GET",headers:{"X-UC-User-Agent":Be({publicKey:t,integration:n,userAgent:r})},url:Ne(i,"/info/",{jsonerrors:1,pub_key:t,file_id:e,source:a}),signal:o}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:s})}function tt(e,{publicKey:t,contentType:i,fileName:o,multipartChunkSize:a=ze.multipartChunkSize,baseURL:n="",secureSignature:r,secureExpire:l,store:s,signal:p,source:c="local",integration:d,userAgent:u,retryThrottledRequestMaxTimes:m=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=ze.retryNetworkErrorMaxTimes,metadata:h}){return He((()=>Ue({method:"POST",url:Ne(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Be({publicKey:t,integration:d,userAgent:u})},data:Pe({filename:o||Re,size:e,content_type:i||De,part_size:a,UPLOADCARE_STORE:Ze(s),UPLOADCARE_PUB_KEY:t,signature:r,expire:l,source:c,metadata:h}),signal:p}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o.parts=Object.keys(o.parts).map((e=>o.parts[e])),o}))),{retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})}function it(e,t,{contentType:i,signal:o,onProgress:a,retryThrottledRequestMaxTimes:n=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:r=ze.retryNetworkErrorMaxTimes}){return He((()=>Ue({method:"PUT",url:t,data:e,onProgress:a,signal:o,headers:{"Content-Type":i||De}}).then((e=>(a&&a({isComputable:!0,value:1}),e))).then((({status:e})=>({code:e})))),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:r})}function ot(e,{publicKey:t,baseURL:i=ze.baseURL,source:o="local",signal:a,integration:n,userAgent:r,retryThrottledRequestMaxTimes:l=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=ze.retryNetworkErrorMaxTimes}){return He((()=>Ue({method:"POST",url:Ne(i,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":Be({publicKey:t,integration:n,userAgent:r})},data:Pe({uuid:e,UPLOADCARE_PUB_KEY:t,source:o}),signal:a}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:s})}function at({file:e,publicKey:t,baseURL:i,source:o,integration:a,userAgent:n,retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:l,signal:s,onProgress:p}){return qe({check:s=>et(e,{publicKey:t,baseURL:i,signal:s,source:o,integration:a,userAgent:n,retryThrottledRequestMaxTimes:r,retryNetworkErrorMaxTimes:l}).then((e=>e.isReady?e:(p&&p({isComputable:!0,value:1}),!1))),signal:s})}!function(e){e.Token="token",e.FileInfo="file_info"}(Ge||(Ge={})),function(e){e.Unknown="unknown",e.Waiting="waiting",e.Progress="progress",e.Error="error",e.Success="success"}(Ye||(Ye={}));class nt{uuid;name=null;size=null;isStored=null;isImage=null;mimeType=null;cdnUrl=null;s3Url=null;originalFilename=null;imageInfo=null;videoInfo=null;contentInfo=null;metadata=null;s3Bucket=null;constructor(e,{baseCDN:t=ze.baseCDN,fileName:i}={}){const{uuid:o,s3Bucket:a}=e,n=Ne(t,`${o}/`),r=a?Ne(`https://${a}.s3.amazonaws.com/`,`${o}/${e.filename}`):null;this.uuid=o,this.name=i||e.filename,this.size=e.size,this.isStored=e.isStored,this.isImage=e.isImage,this.mimeType=e.mimeType,this.cdnUrl=n,this.originalFilename=e.originalFilename,this.imageInfo=e.imageInfo,this.videoInfo=e.videoInfo,this.contentInfo=e.contentInfo,this.metadata=e.metadata||null,this.s3Bucket=a||null,this.s3Url=r}}var rt=window.WebSocket;class lt{events=Object.create({});emit(e,t){this.events[e]?.forEach((e=>e(t)))}on(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}off(e,t){this.events[e]=t?this.events[e].filter((e=>e!==t)):[]}}class st{key;disconnectTime;ws=void 0;queue=[];isConnected=!1;subscribers=0;emmitter=new lt;disconnectTimeoutId=null;constructor(e,t=3e4){this.key=e,this.disconnectTime=t}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){const e=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new rt(e),this.ws.addEventListener("error",(e=>{this.emmitter.emit("error",new Error(e.message))})),this.emmitter.on("connected",(()=>{this.isConnected=!0,this.queue.forEach((e=>this.send(e.event,e.data))),this.queue=[]})),this.ws.addEventListener("message",(e=>{const t=JSON.parse(e.data.toString());switch(t.event){case"pusher:connection_established":this.emmitter.emit("connected",void 0);break;case"pusher:ping":this.send("pusher:pong",{});break;case"progress":case"success":case"fail":this.emmitter.emit(t.channel,((e,t)=>"success"===e?{status:Ye.Success,...t}:"progress"===e?{status:Ye.Progress,...t}:{status:Ye.Error,...t})(t.event,JSON.parse(t.data)))}}))}}disconnect(){const e=()=>{this.ws?.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout((()=>{e()}),this.disconnectTime):e()}send(e,t){const i=JSON.stringify({event:e,data:t});this.ws?.send(i)}subscribe(e,t){this.subscribers+=1,this.connect();const i=`task-status-${e}`,o={event:"pusher:subscribe",data:{channel:i}};this.emmitter.on(i,t),this.isConnected?this.send(o.event,o.data):this.queue.push(o)}unsubscribe(e){this.subscribers-=1;const t=`task-status-${e}`,i={event:"pusher:unsubscribe",data:{channel:t}};this.emmitter.off(t),this.isConnected?this.send(i.event,i.data):this.queue=this.queue.filter((e=>e.data.channel!==t)),0===this.subscribers&&this.disconnect()}onError(e){return this.emmitter.on("error",e),()=>this.emmitter.off("error",e)}}let pt=null;const ct=e=>{if(!pt){const t="undefined"==typeof window?0:3e4;pt=new st(e,t)}return pt},dt=(e,{publicKey:t,fileName:i,baseURL:o,baseCDN:a,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:r,secureSignature:l,secureExpire:s,store:p,signal:c,onProgress:d,source:u,integration:m,userAgent:f,retryThrottledRequestMaxTimes:h,pusherKey:g=ze.pusherKey,metadata:y})=>{return Promise.resolve((b=g,void ct(b).connect())).then((()=>Je(e,{publicKey:t,fileName:i,baseURL:o,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:r,secureSignature:l,secureExpire:s,store:p,signal:c,source:u,integration:m,userAgent:f,retryThrottledRequestMaxTimes:h,metadata:y}))).catch((e=>(ct(g)?.disconnect(),Promise.reject(e)))).then((e=>e.type===Ge.FileInfo?e:((e,{signal:t}={})=>{let i=null,o=null;const a=e.map((()=>new AbortController));return Ce(t,(()=>{a.forEach((e=>e.abort()))})),Promise.all(e.map(((e,t)=>{const n=(e=>()=>{o=e,a.forEach(((t,i)=>i!==e&&t.abort()))})(t);return Promise.resolve().then((()=>e({stopRace:n,signal:a[t].signal}))).then((e=>(n(),e))).catch((e=>(i=e,null)))}))).then((e=>{if(null===o)throw i;return e[o]}))})([({signal:i})=>function({token:e,publicKey:t,baseURL:i,integration:o,userAgent:a,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:r,onProgress:l,signal:s}){return qe({check:s=>Qe(e,{publicKey:t,baseURL:i,integration:o,userAgent:a,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:r,signal:s}).then((t=>{switch(t.status){case Ye.Error:return new Fe(t.error,t.errorCode);case Ye.Waiting:return!1;case Ye.Unknown:return new Fe(`Token "${e}" was not found.`);case Ye.Progress:return l&&("unknown"===t.total?l({isComputable:!1}):l({isComputable:!0,value:t.done/t.total})),!1;case Ye.Success:return l&&l({isComputable:!0,value:t.done/t.total}),t;default:throw new Error("Unknown status")}})),signal:s})}({token:e.token,publicKey:t,baseURL:o,integration:m,userAgent:f,retryThrottledRequestMaxTimes:h,onProgress:d,signal:i}),({signal:t})=>(({token:e,pusherKey:t,signal:i,onProgress:o})=>new Promise(((a,n)=>{const r=ct(t),l=r.onError(n),s=()=>{l(),r.unsubscribe(e)};Ce(i,(()=>{s(),n(new Le("pusher cancelled"))})),r.subscribe(e,(e=>{switch(e.status){case Ye.Progress:o&&("unknown"===e.total?o({isComputable:!1}):o({isComputable:!0,value:e.done/e.total}));break;case Ye.Success:s(),o&&o({isComputable:!0,value:e.done/e.total}),a(e);break;case Ye.Error:s(),n(new Fe(e.msg,e.error_code))}}))})))({token:e.token,pusherKey:g,signal:t,onProgress:d})],{signal:c}))).then((e=>{if(e instanceof Fe)throw e;return e})).then((e=>at({file:e.uuid,publicKey:t,baseURL:o,integration:m,userAgent:f,retryThrottledRequestMaxTimes:h,onProgress:d,signal:c}))).then((e=>new nt(e,{baseCDN:a})));var b},ut=new WeakMap,mt=async e=>{if(Me(e)||je(e))return e.size;if($e(e))return(await(async e=>{if(ut.has(e))return ut.get(e);const t=await fetch(e.uri).then((e=>e.blob()));return ut.set(e,t),t})(e)).size;throw new Error("Unknown file type. Cannot determine file size.")},ft=e=>{const t=new RegExp("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");return!Oe(e)&&t.test(e)},ht=e=>{const t=new RegExp("^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$");return!Oe(e)&&t.test(e)},gt=async(e,{publicKey:t,fileName:i,fileSize:o,baseURL:a,secureSignature:n,secureExpire:r,store:l,signal:s,onProgress:p,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:h,multipartChunkSize:g=ze.multipartChunkSize,maxConcurrentRequests:y=ze.maxConcurrentRequests,baseCDN:b,metadata:v})=>{const x=o??await mt(e);let w;const _=(e,t)=>{if(p)return w||(w=Array(e).fill(0)),i=>{var o;i.isComputable&&(w[t]=i.value,p({isComputable:!0,value:(o=w,o.reduce(((e,t)=>e+t),0)/e)}))}};return h||=Ve(e),tt(x,{publicKey:t,contentType:h,fileName:i||Ke(e),baseURL:a,secureSignature:n,secureExpire:r,store:l,signal:s,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:v}).then((async({uuid:i,parts:o})=>{const a=await(async(e,t,i)=>o=>((e,t,i,o)=>{const a=o*t,n=Math.min(a+o,i);return e.slice(a,n)})(e,o,t,i))(e,x,g);return Promise.all([i,(n=y,r=o.map(((e,i)=>()=>((e,t,{publicKey:i,contentType:o,onProgress:a,signal:n,integration:r,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:s})=>it(e,t,{publicKey:i,contentType:o,onProgress:a,signal:n,integration:r,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:s}))(a(i),e,{publicKey:t,contentType:h,onProgress:_(o.length,i),signal:s,integration:d,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f}))),new Promise(((e,t)=>{const i=[];let o=!1,a=r.length;const l=[...r],s=()=>{const n=r.length-l.length,p=l.shift();p&&p().then((t=>{o||(i[n]=t,a-=1,a?s():e(i))})).catch((e=>{o=!0,t(e)}))};for(let e=0;e<n;e++)s()})))]);var n,r})).then((([e])=>ot(e,{publicKey:t,baseURL:a,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f}))).then((e=>e.isReady?e:at({file:e.uuid,publicKey:t,baseURL:a,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:p,signal:s}))).then((e=>new nt(e,{baseCDN:b})))};async function yt(e,{publicKey:t,fileName:i,baseURL:o=ze.baseURL,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:s,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,contentType:f,multipartMinFileSize:h,multipartChunkSize:g,maxConcurrentRequests:y,baseCDN:b=ze.baseCDN,checkForUrlDuplicates:v,saveUrlForRecurrentUploads:x,pusherKey:w,metadata:_}){if(Oe(e)){const v=await mt(e);return((e,t=ze.multipartMinFileSize)=>e>=t)(v,h)?gt(e,{publicKey:t,contentType:f,multipartChunkSize:g,fileSize:v,fileName:i,baseURL:o,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:s,source:p,integration:c,userAgent:d,maxConcurrentRequests:y,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,baseCDN:b,metadata:_}):((e,{publicKey:t,fileName:i,baseURL:o,secureSignature:a,secureExpire:n,store:r,contentType:l,signal:s,onProgress:p,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:h,metadata:g})=>We(e,{publicKey:t,fileName:i,contentType:l,baseURL:o,secureSignature:a,secureExpire:n,store:r,signal:s,onProgress:p,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:g}).then((({file:e})=>at({file:e,publicKey:t,baseURL:o,source:c,integration:d,userAgent:u,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:p,signal:s}))).then((e=>new nt(e,{baseCDN:h}))))(e,{publicKey:t,fileName:i,contentType:f,baseURL:o,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:s,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,baseCDN:b,metadata:_})}if(ht(e))return dt(e,{publicKey:t,fileName:i,baseURL:o,baseCDN:b,checkForUrlDuplicates:v,saveUrlForRecurrentUploads:x,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:s,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,pusherKey:w,metadata:_});if(ft(e))return((e,{publicKey:t,fileName:i,baseURL:o,signal:a,onProgress:n,source:r,integration:l,userAgent:s,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:c,baseCDN:d})=>et(e,{publicKey:t,baseURL:o,signal:a,source:r,integration:l,userAgent:s,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:c}).then((e=>new nt(e,{baseCDN:d,fileName:i}))).then((e=>(n&&n({isComputable:!0,value:1}),e))))(e,{publicKey:t,fileName:i,baseURL:o,signal:l,onProgress:s,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,baseCDN:b});throw new TypeError(`File uploading from "${e}" is not supported`)}class bt{uuid;filesCount;totalSize;isStored;isImage;cdnUrl;files;createdAt;storedAt=null;constructor(e,t){this.uuid=e.id,this.filesCount=e.filesCount,this.totalSize=Object.values(e.files).reduce(((e,t)=>e+t.size),0),this.isStored=!!e.datetimeStored,this.isImage=!!Object.values(e.files).filter((e=>e.isImage)).length,this.cdnUrl=e.cdnUrl,this.files=t,this.createdAt=e.datetimeCreated,this.storedAt=e.datetimeStored}}const vt=(e,t)=>({...t,...e});class xt{settings;constructor(e){this.settings=Object.assign({},ze,e)}updateSettings(e){this.settings=Object.assign(this.settings,e)}getSettings(){return this.settings}base(e,t={}){const i=this.getSettings();return We(e,vt(t,i))}info(e,t={}){const i=this.getSettings();return et(e,vt(t,i))}fromUrl(e,t={}){const i=this.getSettings();return Je(e,vt(t,i))}fromUrlStatus(e,t={}){const i=this.getSettings();return Qe(e,vt(t,i))}group(e,t={}){const i=this.getSettings();return Xe(e,vt(t,i))}groupInfo(e,t={}){const i=this.getSettings();return function(e,{publicKey:t,baseURL:i=ze.baseURL,signal:o,source:a,integration:n,userAgent:r,retryThrottledRequestMaxTimes:l=ze.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:s=ze.retryNetworkErrorMaxTimes}){return He((()=>Ue({method:"GET",headers:{"X-UC-User-Agent":Be({publicKey:t,integration:n,userAgent:r})},url:Ne(i,"/group/info/",{jsonerrors:1,pub_key:t,group_id:e,source:a}),signal:o}).then((({data:e,headers:t,request:i})=>{const o=Te(JSON.parse(e));if("error"in o)throw new Fe(o.error.content,o.error.errorCode,i,o,t);return o}))),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:s})}(e,vt(t,i))}multipartStart(e,t={}){const i=this.getSettings();return tt(e,vt(t,i))}multipartUpload(e,t,i={}){const o=this.getSettings();return it(e,t,vt(i,o))}multipartComplete(e,t={}){const i=this.getSettings();return ot(e,vt(t,i))}uploadFile(e,t={}){const i=this.getSettings();return yt(e,vt(t,i))}uploadFileGroup(e,t={}){const i=this.getSettings();return function(e,{publicKey:t,fileName:i,baseURL:o=ze.baseURL,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:s,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:h=ze.multipartChunkSize,baseCDN:g=ze.baseCDN,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:b,jsonpCallback:v}){if(!(e=>{for(const t of e)if(!Oe(t))return!1;return!0})(e)&&!(e=>{for(const t of e)if(!ht(t))return!1;return!0})(e)&&!(e=>{for(const t of e)if(!ft(t))return!1;return!0})(e))throw new TypeError(`Group uploading from "${e}" is not supported`);let x,w=!0;const _=e.length,A=(e,t)=>{if(s)return x||(x=Array(e).fill(0)),i=>{if(!i.isComputable||!w)return w=!1,void s({isComputable:!1});var o;x[t]=i.value,s({isComputable:!0,value:(o=x,o.reduce(((e,t)=>e+t))/e)})}};return Promise.all(e.map(((e,s)=>yt(e,{publicKey:t,fileName:i,baseURL:o,secureSignature:a,secureExpire:n,store:r,signal:l,onProgress:A(_,s),source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:h,baseCDN:g,checkForUrlDuplicates:y,saveUrlForRecurrentUploads:b})))).then((e=>Xe(e.map((e=>e.uuid)),{publicKey:t,baseURL:o,jsonpCallback:v,secureSignature:a,secureExpire:n,signal:l,source:p,integration:c,userAgent:d,retryThrottledRequestMaxTimes:u,retryNetworkErrorMaxTimes:m}).then((t=>new bt(t,e))).then((e=>(s&&s({isComputable:!0,value:1}),e)))))}(e,vt(t,i))}}const wt=(e,t)=>{"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="999999998");let i=document.createElement("div");i.setAttribute("id","fileRequiredPopup"),i.style.cssText="position: fixed !important; width: 100% !important; height: 100% !important; z-index: 2147483647 !important; background: #00000082 !important; display: flex !important; justify-content: center !important; align-items: center !important;";let o=document.createElement("div");o.style.cssText="text-align: right !important;padding: 1em !important;background: #fff !important; width: 300px !important;";let a=document.createElement("p");a.innerHTML=t,a.style.cssText="color: #000 !important; text-align: left !important; margin-bottom: 1em !important; margin-top: 0px !important;",a.setAttribute("id","fileRequiredErrorText");let n=document.createElement("button");n.style.cssText=`background: ${UPLOADCARE_DATA[e].buttonBg} !important; color: ${UPLOADCARE_DATA[e].buttonCol} !important; border: none !important; padding: 10px 15px !important; border-radius: 5px !important; cursor: pointer !important;width: auto !important; min-width: 60px !important; max-width: 120px !important; break-word: break-all !important; line-height: unset !important; height: unset !important; margin-bottom: unset !important;`,n.setAttribute("id","fileRequiredErrorButton"),n.innerHTML=UPLOADCARE_DATA[e].fileRequiredMessageButtonText,n.addEventListener("click",(function(){"kids-print-fabrics.myshopify.com"===Shopify.shop&&document.querySelector(".boost-pfs-modal-backdrop")&&(document.querySelector(".boost-pfs-modal-backdrop").style.zIndex="9999999998"),document.querySelector("#fileRequiredPopup").remove()})),o.append(a),o.append(n),i.append(o),document.querySelector("body").prepend(i)},_t=e=>{const t=window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD];if("Custom Translation"==t.buttonDialogLang)return"crop"==e?t.ucCustomTransalations.effects_captions_crop:"";let i="";return window.uploadcare.plugin((o=>{i=o.locale.translations[t.dialogLanguage].effects.captions[e]})),i},At=[{language:"en",minimum:"File dimensions are wrong. File dimensions of width %width% and height %height% or more are required.",maximum:"File dimensions are wrong. File dimensions of width %width% and height %height% or less are required."},{language:"custom",minimum:"Custom Translation",maximum:"Custom Translation"},{language:"de",minimum:"Die Dateiabmessungen sind falsch. Abmessungen von mindestens %width% in der Breite und %height% in der Höhe sind erforderlich.",maximum:"Die Dateiabmessungen sind falsch. Abmessungen von höchstens %width% in der Breite und %height% in der Höhe sind erforderlich."},{language:"fr",minimum:"Les dimensions du fichier sont incorrectes. Des dimensions de fichier d'une largeur de %width% et d'une hauteur de %height% ou plus sont requises.",maximum:"Les dimensions du fichier sont incorrectes. Des dimensions de fichier d'une largeur de %width% et d'une hauteur de %height% ou moins sont requises."},{language:"es",minimum:"Las dimensiones del archivo son incorrectas. Se requieren dimensiones de archivo con un ancho de %width% y una altura de %height% o más.",maximum:"Las dimensiones del archivo son incorrectas. Se requieren dimensiones de archivo con un ancho de %width% y una altura de %height% o menos."},{language:"ar",minimum:"أبعاد المل٠غير صØÙŠØØ©. أبعاد المل٠بعرض %width% وارتÙاع %height% أو أكثر مطلوبة.",maximum:"أبعاد المل٠غير صØÙŠØØ©. أبعاد المل٠بعرض %width% وارتÙاع %height% أو أقل مطلوبة."},{language:"az",minimum:"Fayl ölçülÉ™ri yanlışdır. Fayl ölçülÉ™ri üçün en %width% vÉ™ hündürlük %height% vÉ™ ya daha çox tÉ™lÉ™b olunur.",maximum:"Fayl ölçülÉ™ri yanlışdır. Fayl ölçülÉ™ri üçün en %width% vÉ™ hündürlük %height% vÉ™ ya daha az tÉ™lÉ™b olunur."},{language:"ca",minimum:"Les dimensions del fitxer són incorrectes. Es requereixen dimensions de fitxer amb una amplada de %width% i una alçada de %height% o més.",maximum:"Les dimensions del fitxer són incorrectes. Es requereixen dimensions de fitxer amb una amplada de %width% i una alçada de %height% o menys."},{language:"cs",minimum:"RozmÄ›ry souboru jsou nesprávné. Požadované rozmÄ›ry souboru jsou Å¡ÃÅ™ka %width% a výška %height% nebo vÃce.",maximum:"RozmÄ›ry souboru jsou nesprávné. Požadované rozmÄ›ry souboru jsou Å¡ÃÅ™ka %width% a výška %height% nebo ménÄ›."},{language:"da",minimum:"Filstørrelserne er forkerte. Filstørrelser pÃ¥ mindst %width% i bredden og %height% i højden er pÃ¥krævet.",maximum:"Filstørrelserne er forkerte. Filstørrelser pÃ¥ højst %width% i bredden og %height% i højden er pÃ¥krævet."},{language:"el",minimum:"Οι διαστάσεις του αÏχείου είναι λανθασμÎνες. ΑπαιτοÏνται διαστάσεις αÏχείου πλάτους %width% και Ïψους %height% ή πεÏισσότεÏου.",maximum:"Οι διαστάσεις του αÏχείου είναι λανθασμÎνες. ΑπαιτοÏνται διαστάσεις αÏχείου πλάτους %width% και Ïψους %height% ή λιγότεÏου."},{language:"et",minimum:"Faili mõõtmed on valed. Nõutavad mõõtmed on laius %width% ja kõrgus %height% või rohkem.",maximum:"Faili mõõtmed on valed. Nõutavad mõõtmed on laius %width% ja kõrgus %height% või vähem."},{language:"he",minimum:"מידות הקובץ שגויות. × ×“×¨×©×•×ª מידות קובץ ברוחב %width% וגובה %height% ×ו יותר.",maximum:"מידות הקובץ שגויות. × ×“×¨×©×•×ª מידות קובץ ברוחב %width% וגובה %height% ×ו פחות."},{language:"it",minimum:"Le dimensioni del file sono errate. Sono richieste dimensioni del file di larghezza %width% e altezza %height% o più.",maximum:"Le dimensioni del file sono errate. Sono richieste dimensioni del file di larghezza %width% e altezza %height% o meno."},{language:"ja",minimum:"ファイルã®å¯¸æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚å¹… %width% 以上ã€é«˜ã• %height% 以上ã®å¯¸æ³•ãŒå¿…è¦ã§ã™ã€‚",maximum:"ファイルã®å¯¸æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚å¹… %width% 以下ã€é«˜ã• %height% 以下ã®å¯¸æ³•ãŒå¿…è¦ã§ã™ã€‚"},{language:"ko",minimum:"íŒŒì¼ í¬ê¸°ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 파ì¼ì˜ 너비 %width% ë° ë†’ì´ %height% ì´ìƒì˜ í¬ê¸°ê°€ 필요합니다.",maximum:"íŒŒì¼ í¬ê¸°ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. 파ì¼ì˜ 너비 %width% ë° ë†’ì´ %height% ì´í•˜ì˜ í¬ê¸°ê°€ 필요합니다."},{language:"lv",minimum:"Faila izmÄ“ri ir nepareizi. NepiecieÅ¡ami faila izmÄ“ri, kuru platums ir %width% un augstums %height% vai vairÄk.",maximum:"Faila izmÄ“ri ir nepareizi. NepiecieÅ¡ami faila izmÄ“ri, kuru platums ir %width% un augstums %height% vai mazÄk."},{language:"nb",minimum:"Filstørrelsene er feil. Filstørrelser med bredde pÃ¥ %width% og høyde pÃ¥ %height% eller mer er nødvendig.",maximum:"Filstørrelsene er feil. Filstørrelser med bredde pÃ¥ %width% og høyde pÃ¥ %height% eller mindre er nødvendig."},{language:"nl",minimum:"De bestandafmetingen zijn onjuist. Bestandafmetingen met een breedte van %width% en een hoogte von %height% of meer sind erforderlich.",maximum:"De bestandafmetingen zijn onjuist. Bestandafmetingen met een breedte van %width% en een hoogte van %height% of minder zijn vereist."},{language:"pl",minimum:"Wymiary pliku sÄ… nieprawidÅ‚owe. Wymagane sÄ… wymiary pliku o szerokoÅ›ci %width% i wysokoÅ›ci %height% lub wiÄ™cej.",maximum:"Wymiary pliku sÄ… nieprawidÅ‚owe. Wymagane sÄ… wymiary pliku o szerokoÅ›ci %width% i wysokoÅ›ci %height% lub mniej."},{language:"pt",minimum:"As dimensões do arquivo estão incorretas. Dimensões do arquivo de largura %width% e altura %height% ou mais são necessárias.",maximum:"As dimensões do arquivo estão incorretas. Dimensões do arquivo de largura %width% e altura %height% ou menos são necessárias."},{language:"ro",minimum:"Dimensiunile fiÈ™ierului sunt greÈ™ite. Sunt necesare dimensiuni ale fiÈ™ierului de lățime %width% È™i înălÈ›ime %height% sau mai mult.",maximum:"Dimensiunile fiÈ™ierului sunt greÈ™ite. Sunt necesare dimensiuni ale fiÈ™ierului de lățime %width% È™i înălÈ›ime %height% sau mai puÈ›in."},{language:"ru",minimum:"Размеры файла неверны. ТребуютÑÑ Ñ€Ð°Ð·Ð¼ÐµÑ€Ñ‹ файла Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð¾Ð¹ %width% и выÑотой %height% или больше.",maximum:"Размеры файла неверны. ТребуютÑÑ Ñ€Ð°Ð·Ð¼ÐµÑ€Ñ‹ файла Ñ ÑˆÐ¸Ñ€Ð¸Ð½Ð¾Ð¹ %width% и выÑотой %height% или меньше."},{language:"sk",minimum:"Rozmery súboru sú nesprávne. Požadujú sa rozmery súboru so Å¡Ãrkou %width% a výškou %height% alebo viac.",maximum:"Rozmery súboru sú nesprávne. Požadujú sa rozmery súboru so Å¡Ãrkou %width% a výškou %height% alebo menej."},{language:"sr",minimum:"Dimenzije datoteke su pogreÅ¡ne. Potrebne su dimenzije datoteke Å¡irine %width% и виÑине %height% или више.",maximum:"Dimenzije datoteke su pogreÅ¡ne. Potrebne su dimenzije datoteke Å¡irine %width% и виÑине %height% или мање."},{language:"sv",minimum:"Filstorlekarna är felaktiga. Filstorlekar med en bredd pÃ¥ %width% och en höjd pÃ¥ %height% eller mer krävs.",maximum:"Filstorlekarna är felaktiga. Filstorlekar med en bredd pÃ¥ %width% och en höjd pÃ¥ %height% eller mindre krävs."},{language:"tr",minimum:"Dosya boyutları yanlış. GeniÅŸliÄŸi %width% ve yüksekliÄŸi %height% veya daha fazla olan dosya boyutları gereklidir.",maximum:"Dosya boyutları yanlış. GeniÅŸliÄŸi %width% ve yüksekliÄŸi %height% veya daha az olan dosya boyutları gereklidir."},{language:"uk",minimum:"Розміри файлу неправильні. Потрібні розміри файлу з шириною %width% Ñ– виÑотою %height% або більше.",maximum:"Розміри файлу неправильні. Потрібні розміри файлу з шириною %width% Ñ– виÑотою %height% або менше."},{language:"vi",minimum:"KÃch thÆ°á»›c tệp không chÃnh xác. Yêu cầu kÃch thÆ°á»›c tệp có chiá»u rá»™ng %width% và chiá»u cao %height% trở lên.",maximum:"KÃch thÆ°á»›c tệp không chÃnh xác. Yêu cầu kÃch thÆ°á»›c tệp có chiá»u rá»™ng %width% và chiá»u cao %height% trở xuống."},{language:"zhTW",minimum:"文件尺寸錯誤。文件尺寸需至少為寬度 %width% 和高度 %height%。",maximum:"文件尺寸錯誤。文件尺寸需至多為寬度 %width% 和高度 %height%。"},{language:"zh",minimum:"文件尺寸错误。文件尺寸至少需è¦å®½åº¦ %width% 和高度 %height%。",maximum:"文件尺寸错误。文件尺寸至多需è¦å®½åº¦ %width% 和高度 %height%。"}],kt=(e,t,i,o,a)=>{const n=At.find((t=>t.language===e));let r="";if(n){let i=a?.dialog_tabs_names_preview_size_restriction_minimum||"",o=a?.dialog_tabs_names_preview_size_restriction_maximum||"";"minimum"===t?r="custom"===e?i:n.minimum:"maximum"===t&&(r="custom"===e?o:n.maximum)}return r.replace("%width%",i+" px").replace("%height%",o+" px")},Tt={en:{minimum:"File size wrong. File of at least %minsize% is required.",maximum:"File size wrong. File of less than %maxsize% is required.",min_max:"File size wrong. File size minimum %minsize% and maximum %maxsize% required."},de:{minimum:"Dateigröße falsch. Eine Datei mit mindestens %minsize% ist erforderlich.",maximum:"Dateigröße falsch. Eine Datei mit weniger als %maxsize% ist erforderlich.",min_max:"Dateigröße falsch. Dateigröße mindestens %minsize% und maximal %maxsize% erforderlich."},fr:{minimum:"Taille de fichier incorrecte. Un fichier d'au moins %minsize% est requis.",maximum:"Taille de fichier incorrecte. Un fichier de moins de %maxsize% est requis.",min_max:"Taille de fichier incorrecte. Taille de fichier minimum %minsize% et maximum %maxsize% requise."},es:{minimum:"Tamaño de archivo incorrecto. Se requiere un archivo de al menos %minsize%",maximum:"Tamaño de archivo incorrecto. Se requiere un archivo de menos de %maxsize%.",min_max:"Tamaño de archivo incorrecto. Tamaño de archivo mÃnimo %minsize% y máximo %maxsize% requerido."},ar:{minimum:"Øجم المل٠خاطئ. يتطلب ملÙًا لا يقل عن %minsize%.",maximum:"Øجم المل٠خاطئ. يتطلب ملÙًا أقل من %maxsize%.",min_max:"Øجم المل٠خاطئ. Øجم المل٠الأدنى %minsize% والأقصى %maxsize% مطلوب."},az:{minimum:"Faylın ölçüsü sÉ™hvdir. Æn azı %minsize% ölçüsündÉ™ fayl tÉ™lÉ™b olunur.",maximum:"Faylın ölçüsü sÉ™hvdir. %maxsize%-dÉ™n kiçik fayl tÉ™lÉ™b olunur.",min_max:"Faylın ölçüsü sÉ™hvdir. Faylın minimum ölçüsü %minsize%, maksimum ölçüsü %maxsize% olmalıdır."},ca:{minimum:"Mida del fitxer incorrecta. Es requereix un fitxer d'almenys %minsize%",maximum:"Mida del fitxer incorrecta. Es requereix un fitxer de menys de %maxsize%.",min_max:"Mida del fitxer incorrecta. Mida del fitxer mÃnima %minsize% i mà xima %maxsize% requerida."},cs:{minimum:"Nesprávná velikost souboru. Je vyžadován soubor o velikosti alespoň %minsize%",maximum:"Nesprávná velikost souboru. Je vyžadován soubor menÅ¡Ã než %maxsize%.",min_max:"Nesprávná velikost souboru. Minimálnà velikost souboru je %minsize% a maximálnà %maxsize%."},da:{minimum:"Filstørrelse forkert. En fil pÃ¥ mindst %minsize% er pÃ¥krævet.",maximum:"Filstørrelse forkert. En fil pÃ¥ mindre end %maxsize% er pÃ¥krævet.",min_max:"Filstørrelse forkert. Minimum filstørrelse %minsize% og maksimum %maxsize% er pÃ¥krævet."},el:{minimum:"Λάθος μÎγεθος αÏχείου. Απαιτείται αÏχείο τουλάχιστον %minsize%",maximum:"Λάθος μÎγεθος αÏχείου. Απαιτείται αÏχείο μικÏότεÏο από %maxsize%.",min_max:"Λάθος μÎγεθος αÏχείου. Ελάχιστο μÎγεθος αÏχείου %minsize% και μÎγιστο %maxsize% απαιτείται."},et:{minimum:"Vale failisuurus. Vaja on vähemalt %minsize% suurusega faili.",maximum:"Vale failisuurus. Vaja on faili, mis on väiksem kui %maxsize%.",min_max:"Vale failisuurus. Faili minimaalne suurus %minsize% ja maksimaalne %maxsize% on nõutav."},he:{minimum:"גודל קובץ שגוי. × ×“×¨×© קובץ של לפחות %minsize%.",maximum:"גודל קובץ שגוי. × ×“×¨×© קובץ קטן מ- %maxsize%.",min_max:"גודל קובץ שגוי. גודל קובץ ×ž×™× ×™×ž×œ×™ %minsize% ומקסימלי %maxsize% × ×“×¨×©."},it:{minimum:"Dimensione del file errata. È richiesto un file di almeno %minsize%",maximum:"Dimensione del file errata. È richiesto un file inferiore a %maxsize%.",min_max:"Dimensione del file errata. Dimensione del file minima %minsize% e massima %maxsize% richiesta."},ja:{minimum:"ファイルサイズãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚å°‘ãªãã¨ã‚‚ %minsize%ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¿…è¦ã§ã™ã€‚",maximum:"ファイルサイズãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚ %maxsize% 未満ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¿…è¦ã§ã™ã€‚",min_max:"ファイルサイズãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚ファイルサイズã®æœ€å°å€¤ã¯ %minsize%ã€æœ€å¤§å€¤ã¯ %maxsize% ã§ã™ã€‚"},ko:{minimum:"íŒŒì¼ í¬ê¸° 오류. ì ì–´ë„ %minsize%í¬ê¸°ì˜ 파ì¼ì´ 필요합니다.",maximum:"íŒŒì¼ í¬ê¸° 오류. %maxsize% ë¯¸ë§Œì˜ íŒŒì¼ì´ 필요합니다.",min_max:"íŒŒì¼ í¬ê¸° 오류. íŒŒì¼ í¬ê¸°ëŠ” 최소 %minsize% ë° ìµœëŒ€ %maxsize% 여야 합니다."},lv:{minimum:"Nepareizs faila lielums. NepiecieÅ¡ams vismaz %minsize% liels fails.",maximum:"Nepareizs faila lielums. NepiecieÅ¡ams fails, kas ir mazÄks par %maxsize%.",min_max:"Nepareizs faila lielums. NepiecieÅ¡amais minimÄlais faila lielums ir %minsize% un maksimÄlais %maxsize%."},nb:{minimum:"Feil filstørrelse. En fil pÃ¥ minst %minsize% er nødvendig.",maximum:"Feil filstørrelse. En fil pÃ¥ mindre enn %maxsize% er nødvendig.",min_max:"Feil filstørrelse. Minimum filstørrelse %minsize% og maksimum %maxsize% kreves."},nl:{minimum:"Bestandsgrootte verkeerd. Een bestand van minstens %minsize% is vereist.",maximum:"Bestandsgrootte verkeerd. Een bestand kleiner dan %maxsize% is vereist.",min_max:"Bestandsgrootte verkeerd. Bestandsgrootte minimaal %minsize% en maximaal %maxsize% vereist."},pl:{minimum:"NieprawidÅ‚owy rozmiar pliku. Wymagany plik o wielkoÅ›ci co najmniej %minsize%",maximum:"NieprawidÅ‚owy rozmiar pliku. Wymagany plik mniejszy niż %maxsize%.",min_max:"NieprawidÅ‚owy rozmiar pliku. Wymagana minimalna wielkość pliku to %minsize%, a maksymalna %maxsize%."},pt:{minimum:"Tamanho de arquivo incorreto. É necessário um arquivo de pelo menos %minsize%",maximum:"Tamanho de arquivo incorreto. É necessário um arquivo com menos de %maxsize%.",min_max:"Tamanho de arquivo incorreto. Tamanho de arquivo mÃnimo %minsize% e máximo %maxsize% requerido."},ro:{minimum:"Dimensiunea fiÈ™ierului greÈ™ită. Este necesar un fiÈ™ier de cel puÈ›in %minsize%",maximum:"Dimensiunea fiÈ™ierului greÈ™ită. Este necesar un fiÈ™ier mai mic de %maxsize%.",min_max:"Dimensiunea fiÈ™ierului greÈ™ită. Dimensiunea minimă %minsize% È™i maximă %maxsize% este necesară."},ru:{minimum:"Ðеправильный размер файла. ТребуетÑÑ Ñ„Ð°Ð¹Ð» не менее %minsize%",maximum:"Ðеправильный размер файла. ТребуетÑÑ Ñ„Ð°Ð¹Ð» меньше %maxsize%.",min_max:"Ðеправильный размер файла. Требуемый минимальный размер файла %minsize% и макÑимальный %maxsize%."},Slovak:{minimum:"Nesprávna veľkosÅ¥ súboru. Vyžaduje sa súbor o veľkosti aspoň %minsize%",maximum:"Nesprávna veľkosÅ¥ súboru. Vyžaduje sa súbor menÅ¡Ã ako %maxsize%.",min_max:"Nesprávna veľkosÅ¥ súboru. Minimálna veľkosÅ¥ súboru %minsize%, maximálna %maxsize% je požadovaná."},sk:{minimum:"Погрешна величина датотеке. Потребна је датотека од најмање %minsize%",maximum:"Погрешна величина датотеке. Потребна је датотека мања од %maxsize%.",min_max:"Погрешна величина датотеке. Минимална величина датотеке %minsize% и макÑимална %maxsize% је потребна."},sv:{minimum:"Fel filstorlek. En fil pÃ¥ minst %minsize% krävs.",maximum:"Fel filstorlek. En fil pÃ¥ mindre än %maxsize% krävs.",min_max:"Fel filstorlek. Minsta filstorlek %minsize% och största %maxsize% krävs."},tr:{minimum:"Dosya boyutu yanlış. En az %minsize% boyutunda bir dosya gereklidir.",maximum:"Dosya boyutu yanlış. %maxsize%'den küçük bir dosya gereklidir.",min_max:"Dosya boyutu yanlış. Minimum dosya boyutu %minsize% ve maksimum %maxsize% gereklidir."},uk:{minimum:"Ðеправильний розмір файлу. Потрібен файл не менший за %minsize%.",maximum:"Ðеправильний розмір файлу. Потрібен файл менший за %maxsize%.",min_max:"Ðеправильний розмір файлу. Мінімальний розмір файлу %minsize%, макÑимальний %maxsize%."},vi:{minimum:"KÃch thÆ°á»›c tệp sai. Yêu cầu tệp Ãt nhất %minsize%.",maximum:"KÃch thÆ°á»›c tệp sai. Yêu cầu tệp nhá» hÆ¡n %maxsize%.",min_max:"KÃch thÆ°á»›c tệp sai. KÃch thÆ°á»›c tệp tối thiểu %minsize% và tối Ä‘a %maxsize% yêu cầu."},zhTW:{minimum:"檔案大å°éŒ¯èª¤ã€‚需è¦è‡³å°‘ %minsize% 的檔案。",maximum:"檔案大å°éŒ¯èª¤ã€‚需è¦å°æ–¼ %maxsize% 的檔案。",min_max:"檔案大å°éŒ¯èª¤ã€‚需è¦çš„檔案大å°æœ€å°ç‚º %minsize%,最大為 %maxsize%。"},zh:{minimum:"文件大å°é”™è¯¯ã€‚需è¦è‡³å°‘ %minsize% 的文件。",maximum:"文件大å°é”™è¯¯ã€‚需è¦å°äºŽ %maxsize% 的文件。",min_max:"文件大å°é”™è¯¯ã€‚所需文件大å°ä¸ºæœ€å° %minsize%,最大 %maxsize%。"}},St=(e,t,i)=>{const o=`File size wrong. File of at least ${t}MB is required.`;return"custom"===e&&i?i.replace("%minsize%",t+"MB"):Tt[e]&&Tt[e].minimum?Tt[e].minimum.replace("%minsize%",t+"MB"):o},Et=(e,t,i)=>{const o=`File size wrong. File of less than ${t}MB is required`;return"custom"===e&&i?i.replace("%maxsize%",t+"MB"):Tt[e]&&Tt[e].maximum?Tt[e].maximum.replace("%maxsize%",t+"MB"):o},Ct=(e,t,i,o)=>{const a=`File size wrong. File size minimum ${t}MB and maximum ${i}MB required.`;return"custom"===e&&o?o.replace("%minsize%",t+"MB").replace("%maxsize%",i+"MB"):Tt[e]&&Tt[e].min_max?Tt[e].min_max.replace("%minsize%",t+"MB").replace("%maxsize%",i+"MB"):a};let Lt=[],qt=!1,zt=0;const Dt=()=>{const e=setInterval((()=>{document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").style.display="none",clearInterval(e))}),50)},Rt=()=>{const e=setInterval((()=>{document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").style.display="block",clearInterval(e))}),50)},Ut=e=>{let t;return t="#FFFFFF"!==e.buttonBg&&"#ffffff"!==e.buttonBg||"#000000"!==e.buttonCol?e.buttonBg:"#000000",t},jt=e=>{let t,i;return"#FFFFFF"===e.buttonBg||"#ffffff"===e.buttonBg?(t=e.buttonCol,i="#ffffff"):(t=e.buttonBg,i=e.buttonCol),`\n.uploadcare--progress__canvas{\nposition: relative !important;\ntop: 0 !important;\nleft: 0 !important;\ntransform: none !important;\n}\n\n.uploadcare-tab-effects--effect-button_applied:before, .uploadcare--crop-sizes__item_current:before{\nbackground: ${t} !important;\n}\n\n.uploadcare--file:hover, .uploadcare--file__preview:hover{\nbackground: ${t}0f !important;\ncolor: ${t} !important;\n}\n\n.uploadcare--file__description:hover .uploadcare--file__preview{\ncolor: ${t} !important;\n}\n\n.uploadcare--file__description:hover{\ncolor: ${t} !important;\ncursor: pointer !important;\n}\n\n.uploadcare--crop-sizes__icon{\n display: unset !important;\n}\n\n.uploadcare--preview__content_crop, .uploadcare--file__preview{\nbackground: #8080802b !important\n}\n.uploadcare--jcrop-tracker{\ndisplay: block !important;\n}\n\n.uploadcare--jcrop-tracker{\ndisplay: block !important;\n}\n\n#textFieldRequiredErrorButton, #fileRequiredErrorButton{\n background: ${t} !important;\n color: ${i} !important;\n}\n.uploadcare--button{\n color: ${t};\n border: 1px solid ${t};\n cursor: pointer !important;\n}\n.uploadcare--button:active{\n color: ${t} !important;\n fill: ${t} !important;\n}\n\n.uploadcare--button:hover{\n color: ${t};\n border: 1px solid ${t};\n}\n\n.uploadcare--button_primary {\n background: ${t} !important;\n border-color: ${t} !important;\n color: ${i} !important;\n}\n.uploadcare--button_primary:active{\n background: ${t} !important;\n border-color: ${t} !important;\n}\n.uploadcare--button_primary:focus{\n background: ${t} !important;\n border-color: ${t} !important;\n color: #fff;\n outline: none;\n}\n.uploadcare-tab-effects--cancel{\n background: transparent !important;\n border-color: ${t} !important;\n color: ${t} !important;\n cursor: pointer !important;\n}\n.uploadcare-tab-effects--effect-button:hover{\n fill: ${t} !important;\n color: ${t} !important;\n}\n@media only screen and (min-width: 600px) {\n .uploadcare--button_primary:hover{\n background: ${t}a4 !important;\n border-color: ${t} !important;\n color: ${i} !important;\n }\n}\n\n.uploadcare--menu__item{\n cursor: pointer !important;\n}\n.uploadcare--button_muted:focus, .uploadcare--button_muted:hover{\n color: ${t} !important;\n outline: none !important;\n}\n.uploadcare--dialog__close{\n outline: none !important;\n border: none !important;\n}\n.uploadcare--dialog__close svg{\n fill: ${t} !important;\n}\n.uploadcare--file__remove, .uploadcare--file__remove:hover, .uploadcare--file__remove:focus{\n border: none\n}\n.uploadcare-tab-effects--effect-button:hover{\n fill: ${t} !important;\n}\n.uploadcare--menu__item:active{\n color: ${t} !important;\n}\n.uploadcare--menu__item:hover{\n color: ${t} !important;\n}\n.uploadcare--menu__item:focus{\n box-shadow: inset 0 0 0 2px ${t}a5 !important;\n color: ${t} !important;\n}\n.uploadcare--progress_type_canvas{\n color: ${t} !important;\n}\n.uploadcare--file:hover{\n background: ${t}0f !important;\n}\n.uploadcare--file_status_uploading .uploadcare--file__preview{\n background: ${t} !important;\n color: ${t} !important;\n}\n.uploadcare--progressbar__value{\n display: block !important;\n background: ${t} !important;\n}\n.uploadcare--powered-by{\n display: none !important;\n}\n.uploadcare--panel_multiple .uploadcare--preview__content::before{\n box-sizing: border-box;\n display: block;\n width: 100%;\n padding: 10px 20px;\n background-color: rgb(240, 240, 240);\n margin-bottom: 10px;\n font-size: 16px;\n font-weight: bold;\n text-align: left !important;\n}\n\n\n.container_uploader > div:first-child { \n padding-top: 0.5em !important;\n}\n.container_uploader > div:last-child { \n padding-bottom: 0.5em;\n}\n\n.container_uploader > div {\n padding: 0 0.5em 0.5em 0.5em;\n}\n\n\n.container_uploader {\n scrollbar-width: thin;\n scrollbar-color: #36afa6;\n}\n\n/* Chrome, Edge, and Safari */\n.container_uploader::-webkit-scrollbar {\n width: 5px;\n}\n\n.container_uploader::-webkit-scrollbar-track {\n margin: 8px\n}\n\n.container_uploader::-webkit-scrollbar-thumb {\n background-color: #4f4f4f;\n border-radius: 10px;\n border: 5px solid #4f4f4f;\n}\n\n\n@keyframes ph_loading { from {transform: rotate(0deg);} to { transform: rotate(360deg);} } @-webkit-keyframes ph_loading { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } }\n\n`},Mt=async()=>{document.querySelectorAll(".uploadcare--preview__done").forEach((e=>{e.setAttribute("disabled","disabled")})),qt=!0;let e=Lt[zt];if(!e)return qt=!1,void(zt-1<=Lt.length&&(zt++,Mt()));let t=document.querySelectorAll(".uploadcare--files__item"),i=null;if(t.forEach((t=>{let o=e.name;t.textContent.includes(o)&&(i=t)})),console.log("fileRow",i),i){let e=setInterval((()=>{document.querySelectorAll(".uploadcare--preview__done").forEach((e=>{e.setAttribute("disabled","disabled")}));let t=i.querySelector("img");if(t&&t.complete){clearInterval(e),t.click();let i=setInterval((()=>{let e=document.querySelector(".uploadcare--media__image.uploadcare--preview__image"),t=document.querySelector(`[aria-label="${_t("crop")}"]`);if(t&&e.complete){document.querySelectorAll(".uploadcare--dialog__close");let e=document.querySelector(".uploadcare-tab-effects--cancel");t.click(),e.setAttribute("disabled","disabled"),clearInterval(i),Lt[zt]=null;let o=Lt.findIndex((e=>!!e));console.log("nextPointer",o),zt=o}}),200)}}),200)}};setInterval((()=>{document.querySelector(".error-file")?Dt():0==window.fileChecking&&Rt()}),50);const $t=(e,t,i=window.__st.rid,o="product")=>{let a=window.ph_jq;if(xe(t,e),document.querySelectorAll(`#selBtn_${e}`).length>0)return;var n=v(t,i,o);const r=(t?.customStyling?.button||"").replace(/;/g," !important;"),l=((e,t,i)=>{const o=["2073f9-2.myshopify.com","e980ba.myshopify.com","picassoprints.myshopify.com","6c48d0-27.myshopify.com","eed2fb-eb.myshopify.com"].includes(Shopify.shop),a=(t?.customStyling?.container||"").replace(/;/g," !important;"),n=(t?.customStyling?.heading||"").replace(/;/g," !important;");var r=document.createElement("DIV");let l="Upload Field Font"===t.fontStyle?"sans-serif":"inherit";r.innerHTML=`<div data-ph-fieldname="${t.fieldname}" id="selBtn_${e}" style="text-align: left; margin-bottom: 20px; margin-top: 20px;${a}"><p style="letter-spacing: inherit !important; font-weight: 300 !important; margin-bottom: 0.3em !important; color: ${t.introTitleColor};text-transform: inherit !important; font-family: ${l} !important; font-size: ${t.buttonTextSize}px; text-align: left !important; ${n}">${window.UPLOADCARE_DATA[e].buttonHeadingTranslate} ${t.yes&&!o?"*":""}</p>\n <div id="sel_${e}"></div>${window.PH_STORE_BRANDING?"<div style='font-size: 18px;color: #000;'>Powered by \n <a target=\"_blank\" style=\"font-size: 18px;color: #000;\" href='https://apps.shopify.com/fileupload'>Uploadly</a>\n </div>":""}</div>`;var s=[];return s[0]=r,s[1]=document.createElement("div"),s})(e,t);let s=l[0],p=l[1];"home"===o?document.querySelector(`.photouploadapp[data-ph-product-id='${i}']`).append(s,p):x(0,0,s,p);let c=document.createElement("div");c.setAttribute("id","previewImages_"+e),c.style.cssText=`display: flex; flex-direction: column; max-width: ${n}`,a("#sel_"+e).before(c),t.allowEditing??=!0,t.fopt4??=!1,t.pdf_settings??={enabled:!1,minimum:0,maximum:3},t.croppingType??="crop_free",t.previewStyle??="tile_preview",t.allowCropping??=!0,t.dialogLanguage??="en",t.croppingAspectRatio??="3:2",t.fileRequiredMessage??="Please upload a file before adding the product to your cart",t.fileSizeRestriction??=!1,t.dialogInstructionOne??="In-dialog file list instructions (desktop)",t.dialogInstructionTwo??="Choose an image from the list to crop or enhance it. To add more files, use the menu icon in the top left",t.dialogInstructionThree??="If you have trouble uploading, click â‹® in the top right, then ‘Open in Chrome’",t.fileSizeMinMaxMaximum??=10,t.fileSizeMinMaxMinimum??=.5,t.selectedUploadSources??="file",t.maxSizeRestriction??="Disable",t.maxImageWidth??="1800",t.maxImageHeight??="1200",t.ucCustomTransalations??={one:"%1 file",draghere:"Drop a file here",uploading:"Uploading... Please wait.",file_other:"%1 files",dialog_done:"Done",errors_info:"Can't load info",errors_size:"File too big",errors_user:"Upload canceled",loadingInfo:"Loading info...",dialog_close:"Close",errors_image:"Only images allowed",errors_upload:"Can't upload",notFound_text:"Looks like you have no camera connected to this device.",buttons_cancel:"Cancel",buttons_remove:"Remove",errors_baddata:"Incorrect value",errors_default:"Error",notFound_title:"No camera detected",dialog_showFiles:"Show files",dialog_tabs_names_url:"Direct Link",dialog_tabs_names_file:"Local Files",error_invalid_filetype:"INVALID FILE TYPE TEST EST",buttons_choose_files_one:"Choose a file",buttons_choose_images_one:"Choose an image",dialog_tabs_names_file_or:"or TEST TEST",dialog_tabs_names_preview:"Preview",buttons_choose_files_other:"Choose files",buttons_choose_images_other:"Choose images",dialog_tabs_names_file_drag:"drag & drop<br>any files",dialog_tabs_names_url_input:"Paste your link here...",dialog_tabs_names_url_line2:"Provide the link.",dialog_tabs_names_url_title:"Files from the Web",dialog_tabs_names_url_button:"Upload",dialog_tabs_names_file_button:"Choose a local file",dialog_tabs_names_camera_retry:"Request permissions again",dialog_tabs_names_camera_title:"File from web camera",dialog_tabs_names_preview_back:"Back",dialog_tabs_names_preview_done:"Add",dialog_tabs_names_camera_mirror:"Mirror",dialog_tabs_names_camera_capture:"Take a photo",dialog_tabs_names_camera_stopRecord:"Stop",dialog_tabs_names_preview_crop_free:"free",dialog_tabs_names_camera_startRecord:"Record a video",dialog_tabs_names_preview_crop_title:"Crop and add this image",dialog_tabs_names_preview_image_title:"Add this image?",dialog_tabs_names_preview_video_title:"Add this video?",dialog_tabs_names_preview_unknown_done:"Skip preview and accept",dialog_tabs_names_preview_regular_line1:"You are about to add the file above.",dialog_tabs_names_preview_regular_line2:"Please confirm.",dialog_tabs_names_preview_regular_title:"Add this file?",dialog_tabs_names_preview_multiple_clear:"Remove all",dialog_tabs_names_preview_multiple_title:"You've chosen %files% TEST",dialog_tabs_names_camera_pleaseAllow_text:"You have been prompted to allow camera access from this site.<br>In order to take pictures with your camera you must approve this request.",dialog_tabs_names_camera_pleaseAllow_title:"Please allow access to your camera",dialog_tabs_names_preview_multiple_question:"Add %files%?",dialog_tabs_names_preview_error_default_back:"Please try again",dialog_tabs_names_preview_error_default_text:"asddaSomething went wrong during the upload.",dialog_tabs_names_preview_error_default_title:"Oops!",dialog_tabs_names_preview_error_loadImage_text:"Can't load image",dialog_tabs_names_preview_multiple_tooFewFiles:"You've chosen %files%. At least %min% required.",dialog_tabs_names_preview_multiple_tooManyFiles:"You've chosen too many files. %max% is maximum.",dialog_tabs_names_preview_size_restriction_minimum:"File dimensions are wrong. File dimensions of width %width% and height %height% or more are required.",dialog_tabs_names_preview_size_restriction_maximum:"File dimensions are wrong. File dimensions of width %width% and height %height% or less are required."},t.fileSizeRestrictionType??="minimumFileRestriction",t.textFieldRequiredMessage??="Please complete the 'notes' field",t.fileSizeMaximumRestriction??="5",t.fileSizeMinimumRestriction??="2",t.fileRequiredMessageButtonText??="OK",t.textFieldrequiredMessageButtonText??="OK","container_preview"===t.previewStyle&&c.setAttribute("class","container_uploader");let d=t?.dialogLanguageTranslate||"en";"no"===d&&(d="nb"),t.dialogLanguage;const u="Enable"===t.buttonStatus2||"Enable"===t.maxSizeRestriction,m="Enable"===t.buttonStatus2?"minimum":"Enable"===t.maxSizeRestriction?"maximum":"minimum",h="minimum"===m?t.imageWidth:t.maxImageWidth,g="minimum"===m?t.imageHeight:t.maxImageHeight;let w={errors:{fileDimensionErrorMinimum:St(t.dialogLanguage,t.fileSizeMinimumRestriction,t.ucCustomTransalations?.minimum_file_size_restriction_error),fileDimensionErrorMaximum:Et(t.dialogLanguage,t.fileSizeMaximumRestriction,t.ucCustomTransalations?.maximum_file_size_restriction_error),fileDimensionErrorMinMax:Ct(t.dialogLanguage,t.fileSizeMinMaxMinimum,t.fileSizeMinMaxMaximum,t.ucCustomTransalations?.minimum_and_maximum_file_size_restrictions_error),fileDimensionErrorWidthHeight:kt(t.dialogLanguage,"Enable"===t.buttonStatus2?"minimum":"Enable"===t.maxSizeRestriction?"maximum":"minimum",h,g,t.ucCustomTransalations),invalidFileType:`File type wrong.\n ${t.fopt4?"Only .pdf files are allowed":t.word?"Only .doc & .docx files are allowed":t.pdf?"Only pdf files are allowed":t.fopt3?"images files are allowed":t?.fileExtensions?t?.fileExtensions.join(" "):""}`}};if("de"===t.dialogLanguage&&(w.file={one:"%1",other:"%1"},w.dialog={tabs:{file:{also:"oder"}}}),"custom"===t.dialogLanguage&&(w.dialog={tabs:{file:{also:t.ucCustomTransalations.dialog_tabs_names_file_also}}}),"fr"===t.dialogLanguage&&(w.dialog={tabs:{preview:{multiple:{tooFewFiles:"Vous avez choisi %files%. %min% est le minimum."}}}}),window.UPLOADCARE_LOCALE_TRANSLATIONS.errors={...window.UPLOADCARE_LOCALE_TRANSLATIONS.errors,...w.errors},!0===t.yes){const t=window.ph_globals[i];t.fileUploadRequired=!0,t.fileUploadRequiredIds.includes(e)||t.fileUploadRequiredIds.push(`${e}`),y(o,i)}"custom"===t.dialogLanguage&&(w={uploading:t.ucCustomTransalations.uploading,loadingInfo:t.ucCustomTransalations.loadingInfo,errors:{default:t.ucCustomTransalations.errors_default,invalidFileType:t.ucCustomTransalations.error_invalid_filetype,baddata:t.ucCustomTransalations.errors_baddata,size:t.ucCustomTransalations.errors_size,upload:t.ucCustomTransalations.errors_upload,user:t.ucCustomTransalations.errors_user,info:t.ucCustomTransalations.errors_info,image:t.ucCustomTransalations.errors_image,fileDimensionErrorMinimum:St(t.dialogLanguage,t.fileSizeMinimumRestriction,t.ucCustomTransalations?.minimum_file_size_restriction_error),fileDimensionErrorMaximum:Et(t.dialogLanguage,t.fileSizeMaximumRestriction,t.ucCustomTransalations?.maximum_file_size_restriction_error),fileDimensionErrorMinMax:Ct(t.dialogLanguage,t.fileSizeMinMaxMinimum,t.fileSizeMinMaxMaximum,t.ucCustomTransalations?.minimum_and_maximum_file_size_restrictions_error),fileDimensionError:t.ucCustomTransalations.dialog_tabs_preview_error_size_title},draghere:t.ucCustomTransalations.draghere,file:{one:t.ucCustomTransalations.one,other:t.ucCustomTransalations.file_other,also:t.ucCustomTransalations.dialog_tabs_names_file_also},buttons:{cancel:t.ucCustomTransalations.buttons_cancel,remove:t.ucCustomTransalations.buttons_remove,choose:{files:{one:t.ucCustomTransalations.buttons_choose_files_one,other:t.ucCustomTransalations.buttons_choose_files_other,also:t.ucCustomTransalations.dialog_tabs_names_file_also},images:{one:t.ucCustomTransalations.buttons_choose_images_one,other:t.ucCustomTransalations.buttons_choose_images_other}}},dialog:{close:t.ucCustomTransalations.dialog_close,done:t.ucCustomTransalations.dialog_done,showFiles:t.ucCustomTransalations.dialog_showFiles,tabs:{names:{preview:t.ucCustomTransalations.dialog_tabs_names_preview,file:t.ucCustomTransalations.dialog_tabs_names_file,url:t.ucCustomTransalations.dialog_tabs_names_url},file:{drag:t.ucCustomTransalations.dialog_tabs_names_file_drag,button:t.ucCustomTransalations.buttons_choose_files_one,or:t.ucCustomTransalations.dialog_tabs_names_file_or,also:t.ucCustomTransalations.dialog_tabs_names_file_also},url:{title:t.ucCustomTransalations.dialog_tabs_names_url_title,line2:"",input:t.ucCustomTransalations.dialog_tabs_names_url_input,button:t.ucCustomTransalations.dialog_tabs_names_url_button},camera:{title:t.ucCustomTransalations.dialog_tabs_names_camera_title,capture:t.ucCustomTransalations.dialog_tabs_names_camera_capture,mirror:t.ucCustomTransalations.dialog_tabs_names_camera_mirror,startRecord:t.ucCustomTransalations.dialog_tabs_names_camera_startRecord,stopRecord:t.ucCustomTransalations.dialog_tabs_names_camera_stopRecord,cancelRecord:t.ucCustomTransalations.dialog_tabs_names_camera_retry,retry:t.ucCustomTransalations.dialog_tabs_names_camera_retry,pleaseAllow:{title:t.ucCustomTransalations.dialog_tabs_names_camera_pleaseAllow_title,text:t.ucCustomTransalations.dialog_tabs_names_camera_pleaseAllow_text},notFound:{title:t.ucCustomTransalations.notFound_title,text:t.ucCustomTransalations.notFound_text}},preview:{change:t.ucCustomTransalations.buttons_cancel,back:t.ucCustomTransalations.dialog_tabs_names_preview_back,done:t.ucCustomTransalations.dialog_tabs_names_preview_done,unknown:{title:t.ucCustomTransalations.uploading,done:t.ucCustomTransalations.dialog_tabs_names_preview_unknown_done},regular:{title:t.ucCustomTransalations.dialog_tabs_names_preview_regular_title,line1:t.ucCustomTransalations.dialog_tabs_names_preview_regular_line1,line2:t.ucCustomTransalations.dialog_tabs_names_preview_regular_line2},image:{title:t.ucCustomTransalations.dialog_tabs_names_preview_image_title,change:t.ucCustomTransalations.buttons_cancel},crop:{title:t.ucCustomTransalations.dialog_tabs_names_preview_crop_title,done:t.ucCustomTransalations.dialog_done,free:t.ucCustomTransalations.dialog_tabs_names_preview_crop_free},video:{title:t.ucCustomTransalations.dialog_tabs_names_preview_video_title,change:t.ucCustomTransalations.buttons_cancel},error:{default:{title:t.ucCustomTransalations.dialog_tabs_names_preview_error_default_title,text:t.ucCustomTransalations.dialog_tabs_names_preview_error_default_text,back:t.ucCustomTransalations.dialog_tabs_names_preview_error_default_back},image:{title:t.ucCustomTransalations.errors_image,text:t.ucCustomTransalations.dialog_tabs_names_preview_error_default_back,back:t.ucCustomTransalations.buttons_choose_images_one},size:{title:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_tooManyFiles,text:t.ucCustomTransalations.dialog_tabs_names_preview_error_default_back},loadImage:{title:t.ucCustomTransalations.errors_default,text:t.ucCustomTransalations.dialog_tabs_names_preview_error_loadImage_text}},multiple:{title:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_title,question:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_question,tooManyFiles:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_tooManyFiles,tooFewFiles:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_tooFewFiles,clear:t.ucCustomTransalations.dialog_tabs_names_preview_multiple_clear,done:t.ucCustomTransalations.dialog_tabs_names_preview_done,file:{preview:t.ucCustomTransalations.dialog_tabs_names_preview+" %file%",remove:t.ucCustomTransalations.buttons_remove+" %file%"}}}}}}),window.uploadcare.plugin((e=>{window.UPLOADCARE_LOCALE="d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,e.locale.rebuild({locale:"d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,localeTranslations:w,localePluralize:e=>1===e?"one":"other"})})),window.UPLOADCARE_LOCALE="d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,window.UPLOADCARE_FIELD=e;let A,k=[];t.allowCropping?(k.push("crop"),"crop_free"===t.croppingType?A="free":"aspect_ratio"===t.croppingType?A=t.croppingAspectRatio:"circle"===t.croppingType&&(A="1:1")):A="disabled",t.allowEditing&&(k=k.concat(["rotate","enhance","sharp","grayscale"]));let T,S,E=t.selectedUploadSources;t.opt1?(T=1,S=1):t.op2?(T=t.minimumfiles,S=t.maximumFiles):t.opt3&&(T=1,S=0);let C=we(t);const L=t.fileSizeRestriction,R=t.fileSizeRestrictionType,U=t.fileSizeMinimumRestriction,j=t.fileSizeMaximumRestriction,M=t.fileSizeMinMaxMinimum,$=t.fileSizeMinMaxMaximum;let O=0,I=0;"minimumFileRestriction"===R?O=U:"maximumFileSize"===R?I=j:"minimumMaximumRestriction"===R&&(O=M,I=$);let P={publicKey:"259e94149a4415a3b0b0",multiple:!t.opt1,previewStep:!0,crop:A,effects:k,tabs:E,multipleMax:S,multipleMin:T,inputAcceptTypes:C};"imageonly"===C?(P.imagesOnly=!0,P.inputAcceptTypes="image/*"):P.inputAcceptTypes=C.split(" ").join(",");const F=window.uploadcare.Widget(`#sel_${e}`,P);if(window.UPLOADCARE_DATA[e].widget=F,u&&F.validators.push(((e,t,i)=>function(o){console.log("FILE RESTRICTION",e,t,i),console.log("IMAGE DIMENSIONS",o?.originalImageInfo?.width,o?.originalImageInfo?.height);let a="minimum"===e?o?.originalImageInfo?.width<t||o?.originalImageInfo?.height<i:"maximum"===e&&(o?.originalImageInfo?.width>t||o?.originalImageInfo?.height>i);if(console.log("FILE REQUIRED CONDITION",a),a)throw document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").disabled=!0),new Error("fileDimensionErrorWidthHeight")})(m,h,g)),L&&F.validators.push(((e,t,i)=>function(o){if(o?.size)if("minimumFileRestriction"===e){if(o?.size<1e6*t)throw document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").disabled=!0),new Error("fileDimensionErrorMinimum")}else if("maximumFileSize"===e){if(o?.size>1e6*i)throw document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").disabled=!0),new Error("fileDimensionErrorMaximum")}else if("minimumMaximumRestriction"===e&&(o?.size<1e6*t||o?.size>1e6*i))throw document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").disabled=!0),new Error("fileDimensionErrorMinMax")})(R,O,I)),t.fopt1||F.validators.push((e=>function(t){let i=t?.sourceInfo?.file?.type;if(i){let t=!1;if("imageonly"===e?t="image"!==i.split("/")[0]:e.includes(i)?e.includes("image/*")&&"image"===i.split("/")[0]&&(t=!1):t=!0,t)throw document.querySelector(".uploadcare--preview__done")&&(document.querySelector(".uploadcare--preview__done").disabled=!0),new Error("invalidFileType")}})(C)),window.uploadcare.registerTab("preview",(function(e,t,i,o,n){return setTimeout((()=>{setTimeout((()=>{"custom"===UPLOADCARE_DATA[UPLOADCARE_FIELD].dialogLanguage?(a(".uploadcare-tab-effects--title").text(UPLOADCARE_DATA[UPLOADCARE_FIELD].dialogLanguage.dialog_tabs_names_preview_regular_title),a(".uploadcare-tab-effects--cancel").text(UPLOADCARE_DATA[UPLOADCARE_FIELD].buttons_cancel),a(".uploadcare-tab-effects--done").text(UPLOADCARE_DATA[UPLOADCARE_FIELD].dialog_done)):window.uploadcare.plugin((e=>{const t=e.locale.translations[d];a(".uploadcare-tab-effects--title").text(t.dialog.tabs.preview.regular.title),a(".uploadcare-tab-effects--cancel").text(t.buttons.cancel),a(".uploadcare-tab-effects--done").text(t.dialog.done)}))}),500),a("[aria-label='Blur']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_blur),a("[aria-label='Crop']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_crop),"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType&&a("[aria-label='Crop'").html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36px" height="36px" viewBox="0 0 36 36" version="1.1"> <g id="surface1"> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:2,2;stroke-miterlimit:4;" d="M 1.499023 1.499023 L 43.383789 1.499023 L 43.383789 43.613281 L 1.499023 43.613281 Z M 1.499023 1.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 42.5 22.5 C 42.5 11.455078 33.544922 2.5 22.5 2.5 C 11.455078 2.5 2.5 11.455078 2.5 22.5 C 2.5 33.544922 11.455078 42.5 22.5 42.5 C 33.544922 42.5 42.5 33.544922 42.5 22.5 Z M 42.5 22.5 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 0.498047 0.498047 L 3.500977 0.498047 L 3.500977 3.500977 L 0.498047 3.500977 Z M 0.498047 0.498047 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 41.499023 0.385742 L 44.501953 0.385742 L 44.501953 3.383789 L 41.499023 3.383789 Z M 41.499023 0.385742 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 0.498047 41.499023 L 3.500977 41.499023 L 3.500977 44.501953 L 0.498047 44.501953 Z M 0.498047 41.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 41.499023 41.499023 L 44.501953 41.499023 L 44.501953 44.501953 L 41.499023 44.501953 Z M 41.499023 41.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> </g> </svg>'),a("[aria-label='Enhance']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_enhance),a("[aria-label='Flip']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_flip),a("[aria-label='Grayscale']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_grayscale),a("[aria-label='Invert']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_invert),a("[aria-label='Mirror']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_mirror),a("[aria-label='Rotate']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_rotate),a("[aria-label='Sharpen']").attr("aria-label",window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_sharp),a(".uploadcare-tab-effects--done").text(window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_apply_button),a(".uploadcare-tab-effects--cancel").text(window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.buttons_cancel),a(".uploadcare-tab-effects--effect-button, .uploadcare-tab-effects--done, .uploadcare-tab-effects--cancel").on("click",(()=>{setTimeout((()=>{a(".uploadcare-tab-effects--done").text(window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_apply_button),a(".uploadcare-tab-effects--cancel").text(window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.buttons_cancel)}),10)}))}),100),window.UPLOADCARE_LOCALE="d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,o.locale="d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,function(e,t,i,o,a){window.uploadcare.plugin((function(n){return o.multiple?new n.widget.tabs.PreviewTabMultiple(e,t,i,o,a):new(be(n.widget.tabs.PreviewTab,n))(e,t,i,o,a)}))}(e,t,i,o,n)})),document.querySelector("#sel_"+e).style.display="none","d1bb07.myshopify.com"===Shopify.shop){const t=document.querySelector("html").getAttribute("lang");document.querySelector(`#selBtn_${e} .uploadcare--widget__button.uploadcare--widget__button_type_open`).innerHTML="de"===t?"Bild hochladen":"en"===t?"Upload a file":window.UPLOADCARE_DATA[e].uploadButtonTranslate}else document.querySelector(`#selBtn_${e} .uploadcare--widget__button.uploadcare--widget__button_type_open`).innerHTML=window.UPLOADCARE_DATA[e].uploadButtonTranslate;let N="Upload Field Font"===t.fontStyle?"sans-serif":"inherit";document.querySelector(`#selBtn_${e} .uploadcare--widget__button.uploadcare--widget__button_type_open`).style.cssText=`height: inherit !important; line-height: ${window.UPLOADCARE_DATA[e].uploadButtonTranslate.length>35?"1":"unset"} !important; font-weight: ${"instantjewel.myshopify.com"===Shopify.shop?600:400} !important; margin-top: ${t.previewStyle,"0em"}; white-space: break-spaces !important; text-transform: inherit !important; font-family: `+N+" !important; cursor: pointer; background: "+t.buttonBg+";border: none;outline: none; border-radius: "+t.buttonBorderRadius+"px !important; color: "+t.buttonCol+" !important;font-size: "+t.buttonFontSize+"px !important; padding-left: "+t.buttonLeftRightPadding+"px !important; padding-right: "+t.buttonLeftRightPadding+"px !important; padding-top: "+t.buttonTopBottomPadding+"px !important; padding-bottom: "+t.buttonTopBottomPadding+"px !important; width: "+n+" !important;"+r,document.querySelector("[data_ph_styles]").innerHTML=jt(t);let B=[];F.onChange((e=>{if(B=[],e)e?.files?(e.files(),a.when.apply(null,e.files()).then((function(){a.each(arguments,(function(){z(this.uuid,this.name.split(".")[this.name.split(".").length-1],this.cdnUrl),B.push(this)})),D(window.ph_globals.ph_store,B.map((e=>e.uuid)),B.map((e=>e.size)))}))):e.done((e=>{z(e.uuid,e.name.split(".")[e.name.split(".").length-1],e.cdnUrl),D(window.ph_globals.ph_store,e.uuid,e.size),B.push(e)}));else{const e=document.querySelector(".uploadcare--tab__content.uploadcare--preview__content");e&&(e.style.opacity=1,e.style.pointerEvents="all",document.querySelectorAll(".uploadcare--file__remove").forEach((e=>{e.style.display="block",e.disabled=!1})),document.querySelector("[data-remove-message]")?.remove())}})),F.onDialogOpen((n=>{if(1==n.fileColl.length()&&t.opt1&&n.fileColl.__items[0].done((e=>{if("application/pdf"==e.mimeType){const t=setInterval((()=>{const i=document.querySelector(".uploadcare--tab__content.uploadcare--preview__content");i&&(window.embed_pdf(i,e),clearInterval(t))}),50)}})),window.UPLOADCARE_FIELD=e,window.CURRENT_DIALOG=n,document.querySelector("[data_ph_styles]").innerHTML=jt(t),!t.opt1&&document.querySelectorAll(".uploadcare--files").length){const e=document.createElement("button");window.uploadcare.plugin((i=>{if("custom"!==d){const t=i.locale.translations[d];e.innerText=t.buttons.choose.files.other}else e.innerText=t.ucCustomTransalations.dialog_addMoreFiles||"Add more files"})),e.addEventListener("click",(()=>{document.querySelector(".uploadcare--tab__action-button").click()})),e.style.cssText=`\n border: solid 2px ${Ut(t)};\n background: none;\n color: ${Ut(t)};\n border-radius: 5px;\n width: 95%;\n padding: 1em;\n margin: 2em;\n cursor: pointer;\n `,document.querySelector(".uploadcare--files").parentNode.appendChild(e)}let r;window.UPLOADCARE_LOCALE="d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,window.uploadcare.plugin((e=>{e.locale.rebuild({locale:"d1bb07.myshopify.com"===Shopify.shop?document.querySelector("html").getAttribute("lang"):d,localeTranslations:w,localePluralize:e=>1===e?"one":"other"})})),r=setInterval((()=>{const e=document.querySelector(".uploadcare-tab-effects--title"),t=document.querySelector(".uploadcare-tab-effects--cancel"),i=document.querySelector(".uploadcare-tab-effects--done");if(e){let o=UPLOADCARE_DATA[UPLOADCARE_FIELD].ucCustomTransalations;if("custom"===UPLOADCARE_DATA[UPLOADCARE_FIELD].dialogLanguage){let a;"Add this file?"===e.innerText?a=o.dialog_tabs_names_preview_regular_title:"Add this image?"===e.innerText?a=o.dialog_tabs_names_preview_image_title:"Crop and add this image"===e.innerText?a=o.dialog_tabs_names_preview_crop_title:"Add this video?"===e.innerText&&(a=o.dialog_tabs_names_preview_video_title),a&&(e.innerText=a),t.innerText=UPLOADCARE_DATA[UPLOADCARE_FIELD].ucCustomTransalations.buttons_cancel,i.innerText=document.querySelector(".uploadcare--jcrop-tracker")?o.effects_apply_button:o.dialog_done}else window.uploadcare.plugin((o=>{const a=o.locale.translations[window.UPLOADCARE_DATA[UPLOADCARE_FIELD].dialogLanguageTranslate];let n=!1;"Add this file?"===e.innerText||"Add this image?"===e.innerText?n=a.dialog.tabs.preview.regular.title:"Crop and add this image"===e.innerText?n=a.dialog.tabs.preview.crop.title:"Add this video?"===e.innerText&&(n=a.dialog.tabs.preview.regular.title),n&&(e.innerText=n),t.innerText=a.buttons.cancel,i.innerText=document.querySelector(".uploadcare--jcrop-tracker")?a.effects.apply:a.dialog.done}))}document.querySelector(".uploadcare-tab-effects--title")&&"custom"===UPLOADCARE_DATA[UPLOADCARE_FIELD].dialogLanguage&&"Crop"===document.querySelector(".uploadcare-tab-effects--title").innerText&&(document.querySelector(".uploadcare-tab-effects--title").innerText=window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].ucCustomTransalations.effects_captions_crop),"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType&&(a("[aria-label='Crop'").html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36px" height="36px" viewBox="0 0 36 36" version="1.1"> <g id="surface1"> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:2,2;stroke-miterlimit:4;" d="M 1.499023 1.499023 L 43.383789 1.499023 L 43.383789 43.613281 L 1.499023 43.613281 Z M 1.499023 1.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 42.5 22.5 C 42.5 11.455078 33.544922 2.5 22.5 2.5 C 11.455078 2.5 2.5 11.455078 2.5 22.5 C 2.5 33.544922 11.455078 42.5 22.5 42.5 C 33.544922 42.5 42.5 33.544922 42.5 22.5 Z M 42.5 22.5 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 0.498047 0.498047 L 3.500977 0.498047 L 3.500977 3.500977 L 0.498047 3.500977 Z M 0.498047 0.498047 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 41.499023 0.385742 L 44.501953 0.385742 L 44.501953 3.383789 L 41.499023 3.383789 Z M 41.499023 0.385742 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 0.498047 41.499023 L 3.500977 41.499023 L 3.500977 44.501953 L 0.498047 44.501953 Z M 0.498047 41.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:4;" d="M 41.499023 41.499023 L 44.501953 41.499023 L 44.501953 44.501953 L 41.499023 44.501953 Z M 41.499023 41.499023 " transform="matrix(0.8,0,0,0.8,0,0)"/> </g> </svg>'),window.do_the_crop=!0)}),400),n.done((async n=>{if(n){if(window.do_the_crop=!1,"function"==typeof n.files){if(n.files().length>0){a("#previewImages_"+e).empty();for(let r=0;r<n.files().length;r++){const l=await n.files()[r];let s=[];s[r]=l,q(e,t,l,s,r,i,o,n.files().length),f(i,o),a('img[id^="img_preview_"]').on("click",(function(e){const t=e.target.getAttribute("data-field-id");window.UPLOADCARE_DATA[t].widget.openDialog()})),document.querySelectorAll(`#previewImages_${e} [data-open-dialog]`).forEach((t=>{t.addEventListener("click",(()=>{window.UPLOADCARE_DATA[e].widget.openDialog()}))}))}window.open_editor=!0}}else a("#previewImages_"+e).empty(),n.then((n=>{let r=[];r[0]=n,q(e,t,n,r,0,i,o,0),f(i,o),a('img[id^="img_preview_"]').on("click",(function(e){const t=e.target.getAttribute("data-field-id");window.UPLOADCARE_DATA[t].widget.openDialog()})),a(`#previewImages_${e} [data-open-dialog]`).on("click",(function(){window.UPLOADCARE_DATA[e].widget.openDialog()}))})),window.open_editor=!0;b(e,i,o),document.querySelectorAll("[id^=textFieldTextArea_], [class^=tb_combinedFields_]").length>0&&document.querySelectorAll("[id^=textFieldTextArea_], [class^=tb_combinedFields_]").forEach((e=>{let t=e?.getAttribute("id")?.split("_")[1];t&&window.tb_req_check_func&&window.tb_req_check_func(t,"textbox",window.tb_passObj_data)}))}})),"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType?document.querySelector("[data-crop-style]").innerHTML="\n .uploadcare--jcrop-holder.uploadcare--crop-widget > div > div:nth-child(1){\n border: solid 3px #fff;\n border-radius: 100%;\n }":document.querySelector("[data-crop-style]").innerHTML="","required"===t?.editingType&&(window.crop_start=!0,"circle"===window.UPLOADCARE_DATA[window.UPLOADCARE_FIELD].croppingType&&(window.do_the_crop=!0),window.open_editor=!1,n.done((e=>{window.uploadcare_crop_int=void 0}))),n.fileColl.onAdd.add(((e,i)=>{if(window.fileChecking=!0,t.allowCropping&&"required"==t.editingType){const e=setInterval((()=>{document.querySelector(".uploadcare--preview__done")&&(document.querySelectorAll(".uploadcare--preview__done").forEach((e=>{e.setAttribute("disabled","disabled")})),clearInterval(e))}),50)}t?.pdf_settings?.enabled&&Dt(),e.done((e=>{var o,a;"application/pdf"==e.mimeType&&t?.pdf_settings?.enabled?Dt():(Rt(),window.fileChecking=!1),o=e.cdnUrl,a=({url:i,pages:o})=>{if(window.fileChecking=!1,t?.opt1&&(t?.fopt4||"application/pdf"==e.mimeType))if(t?.pdf_settings?.enabled&&(t?.pdf_settings?.minimum>o||t?.pdf_settings?.maximum<o)){console.log("THROWING PDF ERROR");const e=`<div class="uploadcare--text uploadcare--text_size_large uploadcare--tab__title uploadcare--preview__title error-file">Oops!</div><div class="uploadcare--text">Please upload pdf with minimum ${t.pdf_settings.minimum} pages and maximum ${t.pdf_settings.maximum} pages</div><button type="button" class="uploadcare--button uploadcare--preview__back">Please try again</button>`;document.querySelector(".uploadcare--tab__content.uploadcare--preview__content").classList+=" uploadcare--error",document.querySelector(".uploadcare--tab__content.uploadcare--preview__content").innerHTML=e}else{Rt();const t=setInterval((()=>{const i=document.querySelector(".uploadcare--tab__content.uploadcare--preview__content");i&&(window.embed_pdf(i,e),clearInterval(t))}),50)}else if(t?.fopt4&&t?.pdf_settings?.enabled&&(t.pdf_settings.minimum>o||t.pdf_settings.maximum<o)){const i=(e=>{try{let t=null;return document.querySelectorAll(".uploadcare--file.uploadcare--files__item").forEach((i=>{i.innerHTML.includes(e)&&(t=i)})),t}catch(e){return console.log("error",e),null}})(e.uuid);if(i){const e=i.querySelector(".uploadcare--file__name"),o=i.querySelector(".uploadcare--file__size");e.style.color="#e66a6a",o.style.color="#e66a6a",o.innerHTML=(t.ucCustomTransalations?.pdf_page_limitation_error?t.ucCustomTransalations?.pdf_page_limitation_error:"%minpdf% PDF page(s) minimum and %maxpdf% PDF page(s) maximum are required.").replace("%minpdf%",t.pdf_settings.minimum).replace("%maxpdf%",t.pdf_settings.maximum),i.classList+=" error-file"}}else Rt()},fetch(`https://crop.inspon-cloud.com/pdf_to_png?url=${o}&onlyPages=1`).then((e=>e.json())).then((e=>{a(e)})).catch((()=>{a(null)})),"required"==t.editingType&&(Lt[i]={...e})}))})),n.fileColl.onRemove.add((t=>{t.done((function(t){window.ph_globals[i].fileUploadRequiredIds.includes(e)&&document.querySelectorAll("[src*='https://inspon-app.com/textfield/backend/js/page_script.js']").length>0&&window.tb_ps_buy_btn(5),document.querySelectorAll(`[data-img-id='${t.uuid}']`).forEach((e=>{e.remove()})),document.querySelectorAll("[name^='properties[TEST'][data-ph-textarea]").forEach((e=>e.remove())),B=B.filter((e=>e.uuid!==t.uuid)),0===B.length?F.value(null):F.value(B.map((e=>window.uploadcare.fileFrom("uploaded",e.cdnUrl)))),a(`#imageFiles_${e}`).remove(),a("#previewImages_"+e).children().each(((e,i)=>{if(i.getAttribute("data-prev-id")===t.uuid){const e=i.querySelector("[data-tb-main]");e&&document.querySelectorAll(`[data-ph-textarea="${e.getAttribute("data-tb-main")}"]`).forEach((e=>e.remove())),i.remove()}})),b(e,i,o);const n=document.querySelector(".uploadcare--preview__done"),r=document.querySelector(".uploadcare--preview__message");n&&r&&""!==r.innerText&&n.setAttribute("disabled","disabled")}))})),document.querySelectorAll(".uploadcare--powered-by").forEach((e=>{e.getAttribute("class").split(" ").includes("inspon--powered-by")||(e.setAttribute("class",[...e.getAttribute("class").split(" "),"inspon--powered-by"].join(" ")),e.innerHTML="Powered By <a style='color:#fff; text-decoration:underline;' target='_blank' href='https://inspon.com'>Inspon</a> - <a target='_blank' style='color:#fff; text-decoration:underline;' href='https://inspon.com/shopify-agentur'>Shopify Agentur</a>")})),window.dialogLang||(window.dialogLang=t.dialogLanguage),document.querySelector("[data-preview-content-style]").innerHTML=`\n @media only screen and (max-width: 600px) {\n .uploadcare--panel_multiple .uploadcare--preview__content:before{\n content: '${window.UPLOADCARE_DATA[e].dialogInstructionTwoTranslate}'\n }\n }\n\n @media only screen and (min-width: 600px) {\n .uploadcare--panel_multiple .uploadcare--preview__content:before{\n content: '${window.UPLOADCARE_DATA[e].dialogInstructionOneTranslate}'\n }\n }\n`})),F.onUploadComplete((i=>{if(i){let i=document.querySelector(`#selBtn_${e} #uploadcare--widget__text .uploadcare--widget__file-name`);if(i){document.querySelector(`#selBtn_${e} #uploadcare--widget__text`).lastChild.remove();let o="Upload Field Font"===t.fontStyle?"sans-serif":"inherit";i.textContent="d1bb07.myshopify.com"===Shopify.shop?"de"===document.querySelector("html").getAttribute("lang")?"Bild ändern":"en"===document.querySelector("html").getAttribute("lang")?"Change photo":window.UPLOADCARE_DATA[e].uploadButtonText2Translate:window.UPLOADCARE_DATA[e].uploadButtonText2Translate,i.style.cssText=`display: block; text-align: center; text-decoration: none; height: inherit !important; line-height: ${window.UPLOADCARE_DATA[e].uploadButtonText2Translate.length>35?"1":"unset"} !important; white-space: break-spaces !important; font-weight: 400 !important; text-transform: inherit !important; font-family: `+o+" !important; cursor: pointer; background: "+t.buttonBg+";border: none;outline: none; border-radius: "+t.buttonBorderRadius+"px !important; color: "+t.buttonCol+" !important;font-size: "+t.buttonFontSize+"px !important; padding-left: "+t.buttonLeftRightPadding+"px !important; padding-right: "+t.buttonLeftRightPadding+"px !important; padding-top: "+(parseFloat(t.buttonTopBottomPadding)+2)+"px !important; padding-bottom: "+(parseFloat(t.buttonTopBottomPadding)+2)+"px !important; width: "+n+" !important;"+r}window.open_editor=!0}"9b7e01-f8.myshopify.com"===Shopify.shop&&setTimeout((()=>{window.ph_check_cart()&&document.querySelector(".product-form__submit").click()}),1e3)})),document.querySelector(`#selBtn_${e}`).querySelectorAll("*").forEach((e=>{null===e.getAttribute("data-ph-product-id")&&e.setAttribute("data-ph-product-id",i)})),t?.directUpload&&((e,t,i=window.__st.rid,o="product")=>{let a=window.ph_jq;const n=new xt({publicKey:"259e94149a4415a3b0b0"}),r=({isComputable:e,value:t})=>{l.querySelector("button").innerText=`${(100*t).toFixed(0)}% ${"txhuib-nk.myshopify.com"===Shopify.shop?"Laddar upp":"e3fdaf-2.myshopify.com"===Shopify.shop?"téléchargement...":"Uploading..."}`},l=document.querySelector(`#selBtn_${e}`),s=document.createElement("input");s.type="file",s.name=`uploader_${e}`,s.hidden=!0,s.style.display="none",s.style.visibility="hidden",s.style.opacity="0";const p=we(t,!0);(t.fopt2||t.fopt3)&&(s.accept=p.split(" ").join(",")),t.opt1||(s.multiple=!0),t.fopt4&&(s.accept="application/pdf"),s.addEventListener("change",(c=>{if(s.value){const d=c.target.files;if(d){if(t.opt1&&1!==d.length)return s.value="",void wt(e,"Only one file is allowed");if(t.op2&&(t.minimumfiles>d.length||t.maximumFiles<d.length))return s.value="",void wt(e,`Minimum ${t.minimumfiles} files allowed and Maximum ${t.maximumFiles} files allowed`);if(t.fopt2){let t=!0;if(Array.from(d).forEach((e=>{p.split(" ").includes(e.type)||(t=!1)})),!t){const t=[];return Object.values(_).forEach(((e,i)=>{p.split(" ").includes(e)&&t.push(Object.keys(_)[i])})),s.value="",void wt(e,`File type doesn't match. Only ${t.join(", ")} are allowed`)}}if(t.fopt3){let t=!0;if(Array.from(d).forEach((e=>{e.type.includes("image/")||(t=!1)})),!t)return s.value="",void wt(e,"File type doesn't match. Only image files are allowed")}if(t.fopt4){let t=!0;if(Array.from(d).forEach((e=>{"application/pdf"!=e.type&&(t=!1)})),!t)return s.value="",void wt(e,"File type doesn't match. Only pdf is allowed")}document.querySelector("#previewImages_"+e).innerHTML="";const u=[];for(let i=0;i<c.target.files.length;i++){const o=c.target.files.item(i);u.push(o),"container_preview"===t.previewStyle&&(document.querySelector(`#previewImages_${e}`).style.background=window.UPLOADCARE_DATA[e].buttonBg,document.querySelector(`#previewImages_${e}`).style.borderRadius="6px",document.querySelector(`#previewImages_${e}`).style.maxHeight="230px",document.querySelector(`#previewImages_${e}`).style.overflowY="auto",document.querySelector(`#previewImages_${e}`).style.marginBottom=(t.directUpload,"0em"))}n.uploadFileGroup(u,{onProgress:r}).then((async n=>{if(l.querySelector("button").innerText=t.uploadButtonText2,n.files.length>0){a("#previewImages_"+e).empty();for(let a=0;a<n.files.length;a++){const r=await n.files[a];let l=[];l[a]=r,z(r.uuid,r.name.split(".")[r.name.split(".").length-1],r.cdnUrl),D(window.ph_globals.ph_store,r.uuid,r.size),q(e,t,r,l,a,i,o,n.files.length),f(i,o)}}}))}}})),l.appendChild(s);const c=document.querySelector(`#selBtn_${e} .uploadcare--widget__button.uploadcare--widget__button_type_open`),d=c.cloneNode(!0);d.addEventListener("click",(t=>{s.value="",window.UPLOADCARE_FIELD=e,s.click()})),c.parentNode.replaceChild(d,c)})(e,t,i,o),setInterval((()=>{if(!t.allowCropping)return;const e=window.UPLOADCARE_DATA?.[window.UPLOADCARE_FIELD]?.editingType;if(document.querySelector(".uploadcare--preview__done"),!t.opt1&&Lt&&Lt.length&&!qt&&"required"==e&&Mt(),window.crop_start&&t.opt1&&Lt&&Lt.length&&!qt&&"required"==e){let e=document.querySelector(`[aria-label="${_t("crop")}"]`);e&&(e.click(),document.querySelector(".uploadcare-tab-effects--cancel").setAttribute("disabled","disabled")),document.querySelector(".uploadcare--jcrop-tracker")&&(window.crop_start=!1,setTimeout((()=>{window.crop_start=!1}),2e3))}const i=Lt.filter((e=>e)).length;Lt.length&&!i&&(console.log("emptied=============="),Lt=[],zt=0,document.querySelectorAll(".uploadcare--preview__done").forEach((e=>{e.removeAttribute("disabled")})))}),50),document.addEventListener("click",(e=>{const t=window.UPLOADCARE_DATA?.[window.UPLOADCARE_FIELD]?.editingType;e.target.closest(".uploadcare--dialog__close")&&"required"==t&&(Lt=[],zt=0,qt=!1,window.CURRENT_DIALOG.reject())})),document.addEventListener("click",(function(e){const t=e.target.closest(".uploadcare--footer__button"),i=e.target.closest(".uploadcare--dialog__close");(t||i)&&(qt=!1)}))},Ot=(e,t,i,o="product")=>{let a=window.ph_jq,n=[],r=[],l=[],s=[],p=[],c=[],d={};window.ph_globals[i].fileUploadRequired&&f(i,o),window.ph_globals[i].oldValue=t;var u=t?t.split("//?//"):[];u.map(((t,m)=>{for(const A of window.ph_globals[i].ph_allVariantValues){var f=A.split("//?//")[0],h=A.split("//?//")[1],g=A.split("//?//")[2].toLowerCase(),y=A.split("//?//")[3].toLowerCase(),v=A.split("//?//")[4];if("anyConditionVariant"===v&&(n.push(f),"Equals"===h&&g===window.ph_globals[i].ph_productOptions[m].toLowerCase()&&t===y&&p.push(f),"Contain"===h)){var x=t.includes(y);g===window.ph_globals[i].ph_productOptions[m].toLowerCase()&&!0===x&&p.push(f)}if("specificConditionVariant"===v&&(a(e+" #selBtn_"+f).remove(),b(f,i,o),u.map((e=>e.toLowerCase().trim())).join(" / ")===y.toLowerCase().trim()&&-1===s.indexOf(f)&&s.push(f)),"allConditionVariant"===v){-1===r.indexOf(f)&&r.push(f);var w=window.ph_globals[i].ph_allVariantValues.filter((e=>e.split("//?//")[0]===f)),_=window.ph_globals[i].ph_productOptions[m].toLowerCase();w.map(((e,o)=>{var a=e.split("//?//")[2].toLowerCase();if(a===_){if(void 0!==e){var n=e.split("//?//")[1],r=e.split("//?//")[3].toLowerCase();"Contain"===n&&(t.includes(r)?void 0===d[f]?(d[f]=[],d[f][m]=!0):d[f][m]=!0:void 0===d[f]?(d[f]=[],d[f][m]=!1):d[f][m]=!1),"Equals"===n&&(t===r?void 0===d[f]?(d[f]=[],d[f][m]=!0):d[f][m]=!0:void 0===d[f]?(d[f]=[],d[f][m]=!1):d[f][m]=!1)}}else 0===window.ph_globals[i].ph_productOptions.filter((e=>e.toLowerCase().trim()===a.toLowerCase().trim())).length&&(void 0===d[f]?(d[f]=[],d[f][m]=!1):d[f][m]=!1)}))}"noneConditionVariant"===v&&(-1===l.indexOf(f)&&l.push(f),"Equals"===h&&g===window.ph_globals[i].ph_productOptions[m].toLowerCase()&&t===y&&c.push(f),"Contain"===h)&&(x=t.includes(y),g===window.ph_globals[i].ph_productOptions[m].toLowerCase()&&!0===x&&c.push(f))}})),r.map((t=>{a(e+" #selBtn_"+t).remove(),b(t,i,o)})),Object.keys(d).length>0&&Object.keys(d).map((t=>{d[t].every((e=>!0===e))&&(a("#previewImages_"+t+" [id^=showImgDiv_]").length>0?(a(e+" #selBtn_"+t).remove(),b(t,i,o)):($t(t,window.UPLOADCARE_DATA[t],i,o),b(t,i,o)))})),n.map((t=>{a(e+" #selBtn_"+t).remove(),b(t,i,o)})),p.length>0&&p.map((t=>{a("#previewImages_"+t+" [id^=showImgDiv_]").length>0?(a(e+" #selBtn_"+t).remove(),b(t,i,o)):($t(t,window.UPLOADCARE_DATA[t],i,o),b(t,i,o))})),l.filter((e=>!c.includes(e))).forEach((e=>{$t(e,window.UPLOADCARE_DATA[e],i,o),b(e,i,o)})),c.forEach((t=>{a(e+" #selBtn_"+t).remove(),b(t,i,o)})),s.map((e=>{$t(e,window.UPLOADCARE_DATA[e],i,o),b(e,i,o)}))},It=function(e=window.__st.rid,t="product"){let i=window.ph_jq;const o=c(),a=new MutationObserver((function(n){if(n.length>0){let n,l,s=e;if("home"===t)l=void 0!==i(".photoupload_"+s+" select[name='id']").val()?i(".photoupload_"+s+" select[name='id']").val():void 0!==i(".photoupload_"+s+" [name='id']").last().val()?i(".photoupload_"+s+" [name='id']").last().val():window.ph_globals[e].ph_allVariantsData[0].id,l=parseInt(l);else{var r=window.location.href;l=r.includes("?variant=")?parseInt(r.split("?variant=")[1].split("?")[0].split("&")[0].split("-")[0]):r.includes("&variant=")?parseInt(r.split("&variant=")[1].split("?")[0].split("&")[0].split("-")[0]):parseInt(i(o+" select[name='id']").val()),l||(l=window.ph_globals[e].firstSelectedVariant),"thenailtreasure.myshopify.com"===window.Shopify.shop&&(l=parseInt(document.querySelector("[name='id']").value))}for(const t of window.ph_globals[e].ph_allVariantsData)if(t.id===l&&t.prodId===e){n=t.variant;break}((e,t,i,o)=>{let a=window.ph_jq;const n=c();let r="home"===o?".photoupload_"+i:"",l="home"===o?a(".photoupload_"+i)[0]:a(n);"home"===o&&document.querySelector(r).querySelectorAll("*").forEach((e=>{null===e.getAttribute("data-ph-product-id")&&e.setAttribute("data-ph-product-id",i)})),window.ph_globals[i].oldValue!==e&&""!==e&&void 0!==e&&("971873-c1.myshopify.com"!==Shopify.shop&&"jvjwfj-ye.myshopify.com"!==Shopify.shop||document.querySelectorAll("[name*='properties']").forEach((e=>e.remove())),window.ph_globals[i].ph_allVariantValues.length>0?("1429e1-14.myshopify.com"!==Shopify.shop&&"memory-block-au.myshopify.com"!==Shopify.shop||document.querySelectorAll("[name*='properties']").forEach((e=>e.remove())),Ot(r,e,i,o),t.disconnect(),"home"===o?t.observe(l,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0}):Array.from(l).forEach((e=>{t.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0})}))):(t.disconnect(),"home"===o?t.observe(l,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0}):Array.from(l).forEach((e=>{t.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0})}))))})(n,a,e,t)}})),n="home"===t?i(".photoupload_"+e)[0]:i(o);"home"===t?a.observe(n,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0}):Array.from(n).forEach((e=>{a.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attribute:!0,characterData:!0})}))},Pt=(e,t,i=window.__st.rid,o,a,n)=>{let r=window.ph_jq;const l=c(),s=t?.anyConditionVariant,p=t?.allConditionVariant;let d=t?.noneConditionVariant;const u=t?.allVariants,m="home"===n?+i.split("_")[0]:+i;if((s||p||d)&&!t?.thisProductVariants){t.allVariantValues.forEach((t=>{(t.includes("Equals:")||t.includes("Contain:"))&&(t=t.replace("/","//?//").replace(":","//?//")),s&&window.ph_globals[i].ph_allVariantValues.push(e+"//?//"+t+"//?//anyConditionVariant"),p&&window.ph_globals[i].ph_allVariantValues.push(e+"//?//"+t+"//?//allConditionVariant"),d&&window.ph_globals[i].ph_allVariantValues.push(e+"//?//"+t+"//?//noneConditionVariant")}));var f=0;if(window.ph_globals[i].ph_allVariantValues.forEach((e=>{var t=e.split("//?//")[2].toLowerCase();window.ph_globals[i].ph_productOptions.forEach((e=>{(e=e.toLowerCase())===t&&f++}))})),f>0){if($t(e,t,i,n),!0===o)return!0}else window.ph_globals[i].ph_allVariantValues.map((t=>{if(t.split("//?//")[0]===e){const e=window.ph_globals[i].ph_allVariantValues.indexOf(t);e>-1&&window.ph_globals[i].ph_allVariantValues.splice(e,1)}}))}else if(s&&t?.thisProductVariants){let a;if("home"===n)a=void 0!==r(".photoupload_"+i+" select[name='id']").val()?r(".photoupload_"+i+" select[name='id']").val():void 0!==r(".photoupload_"+i+" [name='id']").last().val()?r(".photoupload_"+i+" [name='id']").last().val():ph_allVariantsData[0].id,a=parseInt(a);else{const e=window.location.href;a=e.includes("?variant=")?parseInt(e.split("?variant=")[1].split("?")[0].split("&")[0].split("-")[0]):parseInt(r(l+" select[name='id']").val()),a||(a=window.ph_globals[i].firstSelectedVariant)}const s=t.selectedProducts.filter((e=>m===+e.id.split("/")[e.id.split("/").length-1]));if(s.length>0&&(s[0].variants.forEach((t=>{window.ph_globals[i].ph_allVariantValues.push(e+"//?//Equals//?////?//"+t.title+"//?//specificConditionVariant"),window.ph_globals[i].ph_specific_variants.push({id:e,variant:t})})),s[0].variants.filter((e=>+a==+e.id.split("/")[e.id.split("/").length-1])).length>0&&($t(e,t,i,n),!0===o)))return!0}else if(!0===u&&($t(e,t,i,n),!0===o))return!0},Ft=(e,t,i,o,a="product")=>{const n="home"===a?+o.split("_")[0]:+o;if(t?.allVariantValues,t?.showAllFields&&!0===t?.showAllFields&&Pt(e,t,o,!1,0,a),window.ph_globals[o].ph_productTitle=window.ph_globals[o].ph_productTitle.toLowerCase().trim(),t?.anyConditionCheck&&!0===t?.anyConditionCheck&&""!==t.productCondition){let i=t.productCondition.condition.length,l=t.productCondition.condition,s=!1;if(t.productCondition.collectionTitleEqual.length>0&&!1===s)for(const i of t.productCondition.collectionTitleEqual){const n=i.trim().toLowerCase();if(window.ph_globals[o].ph_collection.includes(n)&&!0===Pt(e,t,o,!0,0,a)){s=!0;break}}if(t.productCondition.prodTitleEqual.length>0&&!1===s)for(const i of t.productCondition.prodTitleEqual)if(i.trim().toLowerCase()===window.ph_globals[o].ph_productTitle&&!0===Pt(e,t,o,!0,0,a)){s=!0;break}if(t.productCondition.prodTitleContains.length>0&&!1===s)for(const i of t.productCondition.prodTitleContains){const n=i.trim().toLowerCase();if(window.ph_globals[o].ph_productTitle=window.ph_globals[o].ph_productTitle.toLowerCase().trim(),!0===window.ph_globals[o].ph_productTitle.includes(n)&&!0===Pt(e,t,o,!0,0,a)){s=!0;break}}if(!1===s&&i>0)for(let p=0;p<i;p++){if("Product is one of"===l[p])if(t.productCondition?.productIds){let i=!1;t.productCondition.productIds.forEach((e=>{+e.split("/")[e.split("/").length-1]===n&&(i=!0)})),i&&Pt(e,t,o,!0,0,a)}else for(const i of t.productCondition.products)if(i.trim().toLowerCase()===window.ph_globals[o].ph_productTitle&&!0===Pt(e,t,o,!0,0,a)){s=!0;break}if("Collection is one of"===l[p])for(const i of t.productCondition.collection){var r=i.toLowerCase().trim();if(window.ph_globals[o].ph_collection.includes(r)&&!0===Pt(e,t,o,!0,0,a)){s=!0;break}}}}let l=0;if(t?.allConditionCheck&&!0===t?.allConditionCheck&&""!==t.productCondition){const i=Object.values(t.productCondition).map((e=>e.length>0)).filter((e=>!0===e)).length,r=""===t.productCondition.condition[0]?0:t.productCondition.condition.length,s=t.productCondition.prodTitleEqual.length,p=t.productCondition.prodTitleContains.length,c=t.productCondition.collectionTitleContains.length,d=t.productCondition.collectionTitleEqual.length,u=parseInt(r)+parseInt(s)+parseInt(p)+parseInt(c)+parseInt(d);i>0&&t.productCondition.condition.forEach((i=>{if("Product is one of"===i)if(t.productCondition?.productIds){let i=!1;t.productCondition.productIds.forEach((e=>{+e.split("/")[e.split("/").length-1]===n&&(i=!0)})),i&&Pt(e,t,o,!0,0,a)}else for(const e of t.productCondition.products){const t=e;t=t.trim().toLowerCase(),t===window.ph_globals[o].ph_productTitle&&l++}if("Collection is one of"===i)for(const e of t.productCondition.collection){const t=e;t=t.trim().toLowerCase(),window.ph_globals[o].ph_collection.includes(t.toLowerCase().trim())&&l++}})),t?.productCondition?.prodTitleEqual?.length>0&&t.productCondition.prodTitleEqual.forEach((e=>{(e=e.trim().toLowerCase())===window.ph_globals[o].ph_productTitle&&l++})),t?.productCondition?.prodTitleContains?.length>0&&t.productCondition.prodTitleContains.forEach((e=>{const t=e=e.trim().toLowerCase();!0===window.ph_globals[o].ph_productTitle.toLowerCase().trim().includes(t)&&l++})),t?.productCondition?.collectionTitleEqual?.length>0&&t.productCondition.collectionTitleEqual.forEach((e=>{e=e.trim().toLowerCase(),window.ph_globals[o].ph_collection.includes(e)&&l++})),t?.productCondition?.collectionTitleContains?.length>0&&t.productCondition.collectionTitleContains.forEach((e=>{e=e.trim().toLowerCase(),!0===window.ph_globals[o].ph_collection.map((t=>-1!==t.indexOf(e))).includes(!0)&&l++})),l===u&&Pt(e,t,o,!1,0,a)}if(!0===t?.thisProductVariants||!0===t.thisProduct)if(t.productCondition?.productIds&&!t.productCondition?.productIds.some((e=>""===e))){let i=!1;t.productCondition.productIds.forEach((e=>{+e.split("/")[e.split("/").length-1]===n&&(i=!0)})),i&&Pt(e,t,o,!0,0,a)}else for(const i of t.productCondition.products)if(i.trim().toLowerCase()===window.ph_globals[o].ph_productTitle&&!0===Pt(e,t,o,!0,0,a))break;if(t?.thisCollection&&!0===t?.thisCollection){if(window.ph_globals[o]?.collection_ids.length>0&&t.productCondition?.collectionIds){let i=!1;t.productCondition?.collectionIds.forEach((e=>{window.ph_globals[o].collection_ids.includes(e.split("/")[e.split("/").length-1])&&(i=!0)})),i&&Pt(e,t,o,!0,0,a)}for(const i of t.productCondition.collection){const n=i.toLowerCase().trim();if(window.ph_globals[o].ph_collection.includes(n)&&!0===Pt(e,t,o,!0,0,a))break}}},Nt=(e,t,i,o=window.__st.rid,a="product")=>{let n=window.ph_jq;const r=c();var l;Ft(t,e,0,o,a);var s="",p=window.location.href;(s=p.includes("?variant=")?parseInt(p.split("?variant=")[1].split("?")[0].split("&")[0].split("-")[0]):"campuswelt-new.myshopify.com"===Shopify.shop?parseInt(n('form[action*="/cart/add"]')[1].querySelector("[name='id']").value):parseInt(n(r+" select[name='id']").val()))||(s=window.ph_globals[o].firstSelectedVariant);for(const e of window.ph_globals[o].ph_allVariantsData)if(e.id===s){l=e.variant;break}"1a8f58-04.myshopify.com"!==Shopify.shop&&((e,t,i="product")=>{window.ph_globals[t].oldValue=e,window.ph_globals[t].ph_allVariantValues.length>0&&Ot("",e,t,i)})(l,o)},Bt=(e="product",t=window.__st.rid)=>{},Ht=(e,t="product",i=0)=>{let o=".shopify-payment-button__button:not(.shopify-payment-button__button--hidden)";"93476a-01.myshopify.com"!==window.Shopify.shop&&"972758-2.myshopify.com"!==window.Shopify.shop&&"ba94b2-5.myshopify.com"!==window.Shopify.shop||(o+=",.shopify-payment-button");const a="home"===t?`.photoupload_${e} `:"";window.ph_globals[e]?.buy_button_interval||(window.ph_globals[e].buy_button_interval=setInterval((()=>{if(window.BUY_BUTTON_CONFIG){let e=0,t=setInterval((function(){document.querySelectorAll(`${a}[id^='selBtn_']`).length>0&&Array.from(document.querySelectorAll(`${a}[id^='selBtn_']`)).map((e=>"none"===e.style.display)).includes(!1)?document.querySelectorAll(`${a} .shopify-payment-button, ${a} ${o}`).length>0&&(document.querySelectorAll(`${a} .shopify-payment-button, ${a} ${o}`).forEach((t=>{e++,t.style.display="none"})),50===e&&clearInterval(t)):document.querySelectorAll(`${a} .shopify-payment-button, ${a} ${o}`).forEach((t=>{e++,t.style.display="unset"}))}),1e3)}else{if(document.querySelectorAll("[src*='https://inspon-app.com/textfield/backend/js/page_script.js']").length>0&&"collageandwood.myshopify.com"!==Shopify.shop)return;if(document.querySelectorAll(`[data-ph-product-id="${e}"][data-clone-button]`).length>0)return;if(u(e,t),0===document.querySelectorAll(`#ph_hidden_items[data-ph-product-data='${e}']`).length){const t=document.createElement("div");t.setAttribute("id","ph_hidden_items"),t.setAttribute("data-ph-product-data",e),t.style.cssText="display:none !important;opacity:0 !important;visibility: hidden !important;",document.querySelector("body").appendChild(t)}if(document.querySelectorAll(`${a}[id^='selBtn_']`).length>0&&Array.from(document.querySelectorAll(`${a}[id^='selBtn_']`)).map((e=>"none"===e.style.display)).includes(!1)){if(d(e,t))return;document.querySelectorAll(`${a} ${o}`).forEach(((i,o)=>{if(!i.getAttribute("data-clone-button")&&!i.getAttribute("data-original-button")){i.querySelector("iframe")&&(i=i.closest('[data-shopify="payment-button"]'));let n=i.cloneNode(!0);Array.from(n.children).forEach((e=>e.style.pointerEvents="none")),n.setAttribute("data-clone-button",!0),n.setAttribute("data-clone-id",o),n.setAttribute("data-ph-product-id",e),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();const i=document.querySelector(`[data-ph-cart-clone='true'][data-ph-product="${e}"]`);i?i.click():document.querySelector(`${a} button[type='submit'][name='add']`).click()})),d(e,t),"doityourselftransfers.myshopify.com"===Shopify.shop?(i.style.display="none",i.style.visibility="hidden",i.style.opacity="0"):(i.setAttribute("data-original-button",!0),i.setAttribute("data-clone-id",o),i.parentNode.insertBefore(n,i),document.querySelector(`#ph_hidden_items[data-ph-product-data='${e}']`).appendChild(i))}}))}else document.querySelectorAll(`#ph_hidden_items[data-ph-product-data='${e}']`).length>0&&(document.querySelector(`#ph_hidden_items[data-ph-product-data='${e}']`).innerHTML="")}}),100))},Vt=(e,t,i)=>{window.ph_jq.ajax({type:"POST",url:n+"check_os",dataType:"json",data:{check_os:e,theme_id:t},success:function(e){e.installed&&i(e.message)}})},Kt=(e,t)=>t?e?'url("https://photoupload.inspon-cloud.com/photoupload/img/enable_block.svg")':'url("https://photoupload.inspon-cloud.com/photoupload/img/disable_block.svg")':'url("https://photoupload.inspon-cloud.com/photoupload/img/os_one_block.svg")',Zt=()=>{const e=document.querySelector("#photouploadapp");console.log("EVENT ADDED"),e.addEventListener("click",(()=>{(()=>{const e=document.createElement("div");e.style.cssText="width: 100% !important;\n height: 100% !important;\n position: fixed !important;\n background: #0000004d !important;\n z-index: 2147483647 !important;",e.addEventListener("click",(()=>{document.querySelector("#ph_block_video").remove()}));const t=document.createElement("div");t.setAttribute("id","ph_block_video");const i=document.createElement("div");i.innerHTML="✖",i.style.cssText="color: #fff;\n cursor: pointer !important;\n position: absolute !important;\n top: -20px !important;\n right: -15px !important;\n font-family: sans-serif !important;\n background: #000 !important;\n width: 30px !important;\n height: 30px !important;\n font-size: 15px !important;\n font-weight: bold !important;\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n text-align: center !important;\n border-radius: 100% !important;",i.addEventListener("click",(()=>{document.querySelector("#ph_block_video").remove()})),t.innerHTML='<iframe width="560" height="315" src="https://www.youtube.com/embed/y40_h0ju15U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>',t.appendChild(i),t.style.cssText="\n background: rgb(0, 0, 0) !important;\n position: fixed !important;\n top: 50% !important;\n left: 50% !important;\n z-index: 1000 !important;\n display:flex !important !important;\n justify-content: center !important;\n transform: translate(-50%, -50%) !important;",e.appendChild(t),document.querySelector("body").appendChild(e)})()}))},Wt=(e="product",t,i=!0,o=0,a=window.ph_theme_os)=>{let n=m(o,"product"),r=255;if(n&&(r=n.offsetWidth),!document.querySelector(`[data-ph-block="${o}"]`)&&("product"===e||t)){const n="home"===e?t:document.querySelector("#photouploadapp");if("home"===e&&(n.innerHTML=`<div id='photouploadapp' data-ph-index='${o}'></div>`),!i){const e=Kt(!1,!0);return Zt(),document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).style.cssText=`display: block !important; cursor: pointer !important; background-image: ${e} !important; width: ${r}px !important; background-position: center center; height: 200px !important; min-width: 266px !important; max-width: 410px !important; background-size: contain !important; background-repeat: no-repeat !important;margin: 10px 0 !important;`,void document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).setAttribute("data-ph-block",o)}if(!a){x(0,0,document.createElement("div"),document.createElement("div"));const e=Kt(!0,!1);return document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).style.cssText=`display: block !important; background-image: ${e} !important; width: ${r}px !important; background-position: center center; height: 200px !important; min-width: 266px !important; max-width: 410px !important; background-size: contain !important; background-repeat: no-repeat !important;margin: 10px 0 !important;`,void document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).setAttribute("data-ph-block",o)}if("product"===e&!n){x(0,0,document.createElement("div"),document.createElement("div")),document.querySelector("#photouploadapp").setAttribute("data-ph-index",o);const e=Kt(!1,!0);Zt(),document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).style.cssText=`display: block !important; cursor: pointer !important; background-image: ${e} !important; width: ${r}px !important; background-position: center center; height: 200px !important; min-width: 266px !important; max-width: 410px !important; background-size: contain !important; background-repeat: no-repeat !important;margin: 10px 0 !important;`,document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).setAttribute("data-ph-block",o)}if(n){"product"===e&&n.setAttribute("data-ph-index",o);const t=Kt(!0,!0);document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).style.cssText=`display: block !important; background-image: ${t} !important; width: ${r}px !important; background-position: center center; height: 200px !important; min-width: 266px !important; max-width: 410px !important; background-size: contain !important; background-repeat: no-repeat !important;margin: 10px 0 !important;`,document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).setAttribute("data-ph-block",o)}else{const e=Kt(!1,!0);Zt(),document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).style.cssText=`display: block !important; cursor: pointer !important; background-image: ${e} !important; width: ${r}px !important; background-position: center center; height: 200px !important; min-width: 266px !important; max-width: 410px !important; background-size: contain !important; background-repeat: no-repeat !important;margin: 10px 0 !important;`,document.querySelector(`#photouploadapp[data-ph-index="${o}"]`).setAttribute("data-ph-block",o)}}},Gt=()=>{UPLOADCARE_DATA&&Object.keys(UPLOADCARE_DATA).forEach((e=>{UPLOADCARE_DATA[e].yes&&!d()&&h(e)}))},Yt=async e=>{let t=new Headers;t.append("Content-Type","application/json");const i=await fetch(window.Shopify.routes.root+"cart/add.js?self=true",{method:"POST",headers:t,body:JSON.stringify({items:e}),redirect:"follow"});return await i.json()},Jt=()=>{if(document.querySelector("#QuickOrderList")){const e=window.fetch;window.fetch=async function(){try{let t=arguments[0];if(!["/cart/add","/cart/update",`${Shopify.routes.root}cart/add`,`${Shopify.routes.root}cart/update`].includes(t))return e.apply(this,arguments);if(t.includes("/cart/update")){let e=JSON.parse(arguments[1].body);const t=document.querySelectorAll("[name*='properties']"),i={};t.forEach((e=>{e.value&&(i[e.name.split("properties[")[1].split("]")[0]]=e.value)}));let o=[];o.push({id:Object.keys(e.updates)[0],quantity:1,properties:i}),o.length&&await Yt(o),arguments[1].body=JSON.stringify(e)}}catch(e){console.log("Err",e)}return e.apply(this,arguments)},(()=>{const e=document.querySelector(".quick-order-list__table tbody").querySelectorAll(".variant-item"),t=[];Array.from(e).forEach((e=>{e.querySelector(".variant-item__quantity quantity-input")&&t.push(e.querySelector(".variant-item__quantity quantity-input"))})),t.length&&t.forEach((e=>{let t=e.cloneNode(!0);t.querySelectorAll("button").forEach((t=>{const i=t.cloneNode(!0);i.addEventListener("click",(i=>{i.preventDefault(),i.stopPropagation();const o=e.querySelector(`button[name='${t.getAttribute("name")}']`);"minus"!==i.target.getAttribute("name")?d("","product")?o.click():Gt():o.click()})),t.replaceWith(i)})),t.querySelectorAll("input").forEach((e=>{e.addEventListener("onfocus",(e=>{console.log("INPUT VALUE",e.target.value)}))})),e.style.display="none",e.parentNode.insertBefore(t,e)}))})()}};window.ph_globals||(window.ph_globals={ph_store:window.Shopify.shop});const Qt=(e=window.__st.rid)=>{let t=window.ph_jq;window.UPLOADCARE_PUBLIC_KEY="259e94149a4415a3b0b0",window.UPLOADCARE_LOCALE="en",window.UPLOADCARE_FIELD="",window.UPLOADCARE_DATA={},window.BUY_BUTTON_CONFIG=!1,window.BUY_BUTTON_CONFIG=!1,window.UPLOADCARE_LOCALE_TRANSLATIONS={errors:{fileDimensionRestrictionError:"File dimensions are not right",minimumFileSizeError:"Minimum file size error",maximumFileSizeError:"Maximum file size error",minimumMaximumFileSizeError:"Minimum and Maximum file size error"}},c();const i=new URL(window?.location?.href);"deal-o-rush.myshopify.com"!==Shopify.shop&&t("body").click(),function(){var e=document.createElement("style");e.setAttribute("data_ph_dialog_styles","true");var t=document.createElement("style");t.setAttribute("data_ph_styles","true");var i=document.createElement("style");i.setAttribute("data-crop-style","true");var o=document.createElement("style");o.setAttribute("data-preview-content-style","true"),document.querySelector("head").appendChild(t),document.querySelector("head").appendChild(e),document.querySelector("head").appendChild(i),document.querySelector("head").appendChild(o)}(),window.ph_check_cart=d,window.ph_cart_function=Bt,window.ph_check_file_required=h,window.uploadly_required_check=Gt;const o=e;((e,t)=>{const i=new Headers;i.append("Content-Type","application/json"),fetch("https://"+window.location.host+window.location.pathname+".json",{method:"GET",headers:i}).then((e=>e.json())).then((e=>{p(e,t)})).catch((o=>{fetch(`${n}get_product?product_id=${e}&store_url=${Shopify.shop}`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>{p(e.data,t)}))}))})(e,(t=>{var a;window.ph_globals[o]={fileUploadRequired:!1,ph_productOptions:[],ph_compulsory:0,ph_allVariantsData:[],ph_allVariantValues:[],ph_specific_variants:[],firstSelectedVariant:"",fileUploadRequiredIds:[],oldValue:"",ph_productTitle:{},ph_alertChecker:0,ph_collection:[],textFieldRequired:!1,textFieldRequiredIds:[],fileRequiredPopUpData:{},buy_button_interval:!1,collection_ids:t.collection_id},((e,t)=>{var i=e;window.ph_globals[t].ph_productTitle=i.product.title.trim().toLowerCase(),i.product.options.forEach((e=>{window.ph_globals[t].ph_productOptions.push(e.name)}));var o=e.collection;o.length>0&&o.forEach((e=>window.ph_globals[t].ph_collection.push(e.title.trim().toLowerCase()))),e.product.variants.forEach((e=>{var i="",o=Object.keys(e).filter((t=>t.includes("option")&&null!==e[t]&&!1===t.includes("options")));o.forEach(((t,a)=>{null!==e[t]&&(a!==o.length-1?i+=e[t].toLowerCase()+"//?//":i+=e[t].toLowerCase())})),window.ph_globals[t].ph_allVariantsData.push({id:e.id,variant:i,prodId:window.__st.rid})}))})(t,o),window.ph_globals[o].ph_productOptions.length>0&&(window.ph_globals[o].firstSelectedVariant=t.product.variants[0].id,a=e=>{It(e,"product"),Ht(e,"product",1),(()=>{const e=document.querySelector("html");let t,i="";t=new MutationObserver(((t,o)=>{i!==e.getAttribute("lang")&&(Object.keys(UPLOADCARE_DATA).forEach((e=>{let t=xe(window.UPLOADCARE_DATA[e],e);if(t){const i=document.querySelector(`#selBtn_${e}`);if(i){const o=i.querySelector(".uploadcare--widget__button.uploadcare--widget__button_type_open"),a=document.querySelector(`#selBtn_${e}`).querySelector(".uploadcare--link.uploadcare--widget__file-name"),n=document.querySelector(`#selBtn_${e}`).querySelector("h4");o&&(o.innerText=t?t.buttonText:window.UPLOADCARE_DATA[e].uploadButtonText),a&&(a.innerText=t?t.buttonTextAfter:window.UPLOADCARE_DATA[e].uploadButtonText2),n&&(n.innerText=t?t.buttonHeading:window.UPLOADCARE_DATA[e].atcTitle)}}})),i=e.getAttribute("lang"))})),t.observe(e,{attributes:!0,childList:!0,subtree:!0})})()},s(e,(t=>{t?.data?.length>0?(window.BUY_BUTTON_CONFIG=t.buy_button,window.PH_DIRECT_LINK_CONFIG=t.direct_link||!1,window.PH_STORE_BRANDING=t?.store_branding||!1,Ht(e,"product",2),(t.data||t).forEach(((e,t)=>{var i=Math.random().toString(36).substr(2,9);window.UPLOADCARE_DATA[i]=e,Object.prototype.hasOwnProperty.call(e,"fontStyle")||(e.fontStyle="Upload Field Font"),Nt(e,i)})),a(e)):i.searchParams.get("oseid")&&!1!==i.searchParams.get("oseid")&&(window.ph_theme_os||Vt(window.Shopify.shop,window.Shopify.theme.id,(e=>{window.ph_theme_os=e})),setInterval((()=>{window.ph_theme_os&&Wt()}),500))})))})),Jt()};window.ph_globals||(window.ph_globals={ph_store:window.Shopify.shop});const Xt=()=>{let e=window.ph_jq;const t=new URL(window?.location?.href);if(e(".photouploadapp").length>0){function i(){var e=document.createElement("style");e.setAttribute("data_ph_dialog_styles","true");var t=document.createElement("style");t.setAttribute("data_ph_styles","true");var i=document.createElement("style");i.setAttribute("data-crop-style","true");var o=document.createElement("style");o.setAttribute("data-preview-content-style","true"),document.querySelector("head").appendChild(t),document.querySelector("head").appendChild(e),document.querySelector("head").appendChild(i),document.querySelector("head").appendChild(o)}"deal-o-rush.myshopify.com"!==Shopify.shop&&"kids-print-fabrics.myshopify.com"!==Shopify.shop&&"531683.myshopify.com"!==Shopify.shop&&"mink-street-in.myshopify.com"!==Shopify.shop&&e("body").click(),window.BUY_BUTTON_CONFIG=!1,window.UPLOADCARE_PUBLIC_KEY="259e94149a4415a3b0b0",window.UPLOADCARE_LOCALE="en",window.UPLOADCARE_FIELD="",window.UPLOADCARE_DATA={},window.UPLOADCARE_LOCALE_TRANSLATIONS={errors:{fileDimensionRestrictionError:"File dimensions are not right",minimumFileSizeError:"Minimum file size error",maximumFileSizeError:"Maximum file size error",minimumMaximumFileSizeError:"Minimum and Maximum file size error"}},window.matchMedia("(max-width: 700px)"),c(),i(),s(null,(t=>{window.BUY_BUTTON_CONFIG=t.buy_button,window.PH_DIRECT_LINK_CONFIG=t.direct_link||!1;const i=t.data||t;e(".photouploadapp").each((function(t,o){if(!e(o).attr("data-photouploadapp-product-json"))return;const a=JSON.parse(e(o).attr("data-photouploadapp-product-json")),n=a.id+"_"+t,r=JSON.parse(e(o).attr("data-photouploadapp-collections-json"));window.ph_globals[n]||(window.ph_globals[n]={fileUploadRequired:!1,ph_productOptions:[],ph_compulsory:0,ph_allVariantsData:[],ph_allVariantValues:[],ph_specific_variants:[],firstSelectedVariant:"",fileUploadRequiredIds:[],oldValue:"",ph_productTitle:{},ph_alertChecker:0,ph_collection:[],textFieldRequired:!1,textFieldRequiredIds:[],fileRequiredPopUpData:{},buy_button_interval:!1,collection_ids:r.map((e=>e.id))}),window.ph_globals[n].ph_productTitle=a.title.toLowerCase().trim(),window.ph_globals[n].ph_productOptions=a.options,r.forEach((e=>window.ph_globals[n].ph_collection.push(e.title.trim().toLowerCase())));let l=o,s=[];for(;l;){s.unshift(l),l=l.parentElement;var p=o.parentElement?.getAttribute("class")?.includes("shopify-block");if(l){if(!document.querySelectorAll(".photoupload_"+n).length&&!0===p&&(!0===l.getAttribute("class")?.includes("featured-product")||!0===l.getAttribute("class")?.includes("shopify-section")||l.getAttribute("class")?.includes("section-featured-product")||l.getAttribute("class")?.includes("home-product")||l.getAttribute("class")?.includes("product-single__sticky")||l.getAttribute("class")?.includes("quick-add-modal"))){l.classList.add("photoupload_"+n);break}if("FORM"===l.nodeName&&!1===p){l.classList.add("photoupload_"+n);break}}}e(o).parents("form").attr("id","photoupload_"+n),a.variants.forEach((e=>{var t="",i=Object.keys(e).filter((t=>t.includes("option")&&null!==e[t]&&!1===t.includes("options")));i.forEach(((o,a)=>{null!==e[o]&&(a!==i.length-1?t+=e[o].toLowerCase()+"//?//":t+=e[o].toLowerCase())})),window.ph_globals[n].ph_allVariantsData.push({prodId:n,id:e.id,variant:t})})),document.querySelector(".photoupload_"+n).querySelectorAll("*").forEach((e=>e.setAttribute("data-ph-product-id",n)));var c=[];Ht(n,"home"),i.length>0&&i.forEach(((e,t)=>{var i=Math.random().toString(36).substr(2,9);function a(){c.push(e.fieldname),Ft(i,e,0,n,"home"),It(n,"home")}if(window.UPLOADCARE_DATA[i]=e,o.children.length>0){var r=o.querySelectorAll("[data-ph-fieldname]");for(const t of r)if(t.getAttribute("data-ph-fieldname")!==e.fieldname){a();break}}else a()})),window.ph_check_cart=d,window.ph_cart_function=Bt}))}))}t.searchParams.get("oseid")&&!1!==t.searchParams.get("oseid")&&(window.ph_theme_os||Vt(window.Shopify.shop,window.Shopify.theme.id,(e=>{window.ph_theme_os=e})),setInterval((()=>{window.ph_theme_os&&document.querySelectorAll("[class*='featured-product'][class*='shopify-section'][class*='section-featured-product'],[class*='home-product']").forEach(((e,t)=>{if(e.querySelector(".photouploadapp"))0===e.querySelector(".photouploadapp").children.length&&Wt("home",e.querySelector(".photouploadapp"),!0,t,window.ph_theme_os);else{const i=e.querySelector("form[data-type='add-to-cart-form']")||e.querySelector("form[action*='/cart/add']");if(i&&i.querySelector('[type="submit"][name="add"]')){const e=document.createElement("div");e.setAttribute("data-ph-no-app-block",!0),e.setAttribute("data-ph-block-index",t),i.parentNode.insertBefore(e,i),i.setAttribute("data-ph-product-id",t),Wt("home",e,!1,t,window.ph_theme_os)}}}))}),500))},ei=()=>{if("undefined"!=typeof ymqJq&&void 0!==ymqJq.ajaxPrefilter||"undefined"!=typeof bestJq&&void 0!==bestJq.ajaxPrefilter){let e;"undefined"!=typeof ymqJq?e=ymqJq:"undefined"!=typeof bestJq&&(e=bestJq),(e=>{let t;e.ajaxPrefilter((function(e,i,o){if("/cart/add.js"===e.url||"/cart/add"===e.url||"/cart/add.js"===e.url.split("?")[0]||"/cart/add"===e.url.split("?")[0]){if("text"===e.dataType&&e.data instanceof FormData!=1){var a=getURIData(e.data);e.data+=a}if("json"===e.dataType&&e.data instanceof FormData==1){var n=document.querySelector(mainForm).querySelectorAll("*");for(const e of n)"photouploadapp"!==e.getAttribute("id")&&(t=!0);!0===t&&document.querySelectorAll("[name^='properties").forEach((t=>{e.data.append(t.getAttribute("name"),t.value)}))}if("json"===e.dataType&&e.data instanceof FormData==0&&document.querySelectorAll("[name^='properties").forEach((t=>{e.data+="&"+encodeURIComponent(`items[0][properties][${t.name.replace("properties[","").replace("]","")}]`)+"="+encodeURIComponent(t.value)})),void 0!==e.dataTypes&&e.data instanceof FormData==1)if(e.dataTypes.includes("*")){n=document.querySelector('[action="/cart/add"]').querySelectorAll("*");for(const e of n)"photouploadapp"!==e.getAttribute("id")&&(t=!0);!0===t&&(document.querySelectorAll("[name^='properties").length>0?document.querySelectorAll("[name^='properties").forEach((t=>{e.data.append(t.getAttribute("name"),t.value)})):e.data=e.data)}else e.data=e.data}}))})(e)}else if("346b1f-3.myshopify.com"===window.Shopify.shop){console.log("wb render","undefined"!=typeof wideBundle&&"function"==typeof window.wideBundle.addToCartAjax);let e=setInterval((()=>{"undefined"!=typeof wideBundle&&"function"==typeof window.wideBundle.addToCartAjax&&(window.wideBundle.addToCartAjax=function(t){clearInterval(e);let i=t,o={};return document.querySelectorAll("[name^='properties']").forEach((e=>{o[e.name.replace("properties[","").replace("]","")]=e.value})),i.items[0].properties=o,window.originalFetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>{if(e.ok)return e.text();throw new Error(e.statusText)})).catch((e=>{throw new Error(e)}))})}),100)}},ti=["384d07.myshopify.com","9001b2-97.myshopify.com","6406d9-62.myshopify.com","6c48d0-27.myshopify.com","madison-laser-engraving.myshopify.com"],ii={pdf_preview_api:A,pdf_preview_loading:E,pdf_preview_loading_stop:()=>{document.querySelectorAll("#ph_pdf_loading").forEach((e=>e.remove))},pdf_manager:{add:T}};if(window.shape_crop=!0,!window.ph_app_window_8856){(()=>{if((Shopify?.theme?.name||"").toLowerCase().includes("broadcast")||"5ad425-dc.myshopify.com"===Shopify.shop)return;const e=document.createElement("style");e.innerHTML="\n:root {\n --animate-duration: 1s;\n --animate-delay: 1s;\n --animate-repeat: 1;\n}\n\n.animate__animated {\n-webkit-animation-duration: 1s;\nanimation-duration: 1s;\n-webkit-animation-duration: var(--animate-duration);\nanimation-duration: var(--animate-duration);\n-webkit-animation-fill-mode: both;\nanimation-fill-mode: both;\n}\n\n@-webkit-keyframes fadeOutUp {\n 0 % {\n opacity: 1;\n }\n to {\n opacity: 0;\n -webkit - transform: translate3d(0, -100 %, 0);\n transform: translate3d(0, -100 %, 0);\n }\n}\n\n@keyframes fadeOutUp {\n 0 % {\n opacity: 1;\n }\n to {\n opacity: 0;\n -webkit-transform: translate3d(0, -100 %, 0);\n transform: translate3d(0, -100 %, 0);\n }\n}\n\n.animate__fadeOutUp {\n -webkit-animation-name: fadeOutUp;\n animation-name: fadeOutUp;\n}\n\n@-webkit-keyframes fadeInDown {\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n }\n}\n\n@keyframes fadeInDown {\n 0% {\n opacity: 0;\n -webkit-transform: translate3d(0, -100%, 0);\n transform: translate3d(0, -100%, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n }\n}\n \n.animate__fadeInDown {\n -webkit-animation-name: fadeInDown;\n animation-name: fadeInDown;\n}\n.lds-ring {\n margin-right: 1em;\n display: inline-block;\n position: relative;\n width: 50px;\n height: 50px;\n}\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 30px;\n height: 30px;\n margin: 10px 5px;\n border: 2px solid #fff;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #fff transparent transparent transparent;\n}\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n",document.querySelector("head").appendChild(e)})();const e=document.createElement("style");e.innerHTML=".uploadcare--powered-by, uploadcare--powered-by__link{ display:none !important;}",document.querySelector("head").appendChild(e);const t=()=>{if(setInterval((function(){a()}),1e3),window.ph_product_script=Qt,document.URL.includes("products")&&window.location.pathname.split("/").includes("products")||window.location.pathname.includes("products_preview")){if("crystalninja.myshopify.com"===Shopify.shop||"6573d9-5.myshopify.com"===Shopify.shop)return;Qt()}-1===document.location.href.indexOf("product")&&-1===document.location.href.indexOf("cart")&&!1===window.location.href.includes("products")&&(Xt(),(async()=>{if(ti.includes(Shopify.shop))return;let e=[],t=!1;await s(null,(i=>{i.data.forEach((i=>{i.yes&&(t=!0,i.selectedProducts.map((t=>{const i=t.id.split("/"),o=document.querySelectorAll(`.quick-add__submit[id*='${i[i.length-1]}']`);o.length&&(o[0].getAttribute("data-product-url")||e.push(o[0]))})))})),t&&(e.length?e.map((e=>{e.addEventListener("click",(t=>{t.preventDefault(),ph_jq(e).parents().each(((e,t)=>{if(ph_jq(t).find("a[href*='/products/']").length)return t.querySelector("a[href*='/products/']").click(),!1}))}))})):document.querySelectorAll(".quick-add__submit").length&&document.querySelectorAll(".quick-add__submit").forEach((e=>{e.getAttribute("data-product-url")||e.addEventListener("click",(t=>{"0eed1a-6f.myshopify.com"!==Shopify.shop&&(t.preventDefault(),ph_jq(e).parents().each(((e,t)=>{if(ph_jq(t).find("a[href*='/products/']").length)return t.querySelector("a[href*='/products/']").click(),!1})))}))})))})),setInterval((()=>{document.querySelector("#photouploadapp")&&0===document.querySelector("#photouploadapp").children.length&&(document.querySelector("#photouploadapp").setAttribute("class","photouploadapp"),Xt())}),1e3)})()),window.ph_home_script=Xt,document.URL.includes("/cart")&&!1===window.location.href.includes("products")&&-1===document.location.href.indexOf("products")&&!1===window.location.href.includes("collection")&&-1===document.location.href.indexOf("collection")&&(()=>{let e=window.ph_jq;!function(){"deal-o-rush.myshopify.com"!==Shopify.shop&&e("body").click();var t=document.createElement("style");t.innerHTML=".ph_modal_close:hover{background: none; } #alertText{margin: 0 !important; text-align: left !important;} .photoUploadModal h5{margin: inherit !important;} #photouploadapp h4{text-align: inherit !important; font-style: inherit !important; font-style: inherit !important; text-transform: inherit !important; border: none !important; padding: 0 !important;} .photoUploadModal button{min-height: inherit !important; text-transform: inherit !important;line-height: initial !important; height: inherit !important; width: inherit !important;} #photouploadapp button{min-height: inherit !important; text-transform: inherit !important; line-height: inherit !important; height: inherit !important;} .modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100em; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4);} .modal-content { border: none; background-color: #fefefe; margin: 5% auto; height: 700px; width: 70%;border-radius:25px; } .ph_modal_close { min-width: inherit !important; box-shadow: none !important; color: #fff; float: right; font-size: 33px; font-weight: bold; position: absolute; right: 0; top: 0; margin:-17px 13px 18px 0px;} .ph_modal_close:hover, .ph_modal_close:focus { color: #fff; text-decoration: none; cursor: pointer; } .left{width: 33.33%; float: left; } .imgs{}@media screen and (max-width: 700px) { .ph_modal_close { min-width: inherit !important; box-shadow: none !important; color: #fff; float: right; font-size: 33px; font-weight: bold; position: absolute; right: -40px; top: 30px; margin: -17px 13px 18px 0px; } #ph_preview_image{height: 100em;} }";var i=document.createElement("DIV");i.innerHTML='<div id="ph_preview_image" style="z-index: 999999;" class="modal"> <div class="modal-content"> <div class="right" style=" width: 100% !important; float: right; position: relative; "><span class="ph_modal_close close">×</span> </div></div></div> ';var o=document.querySelector("body");o.appendChild(t),o.appendChild(i)}();var t=document.getElementById("ph_preview_image"),i=document.getElementsByClassName("ph_modal_close")[0],o=document.getElementById("shopify-section-header");i.onclick=function(){o&&(o.style.opacity="1"),t.style.display="none"},window.onclick=function(e){e.target==t&&(o&&(o.style.opacity="1"),t.style.display="none")},e(".imgs").parent().parent().parent().css({marginBottom:"80px"}),e("[data-cart-remove]").on("click",(function(){setTimeout((function(){location.reload(!0)}),200)}))})(),"canvas-galore-2022.myshopify.com"!==window.Shopify.shop&&ei(),setInterval((function(){document.querySelectorAll("#photouploadapp").length>0&&document.querySelectorAll("#photouploadapp button").forEach((e=>e.disabled=!1)),document.querySelector("#shopify-chat")&&(document.querySelector("#shopify-chat").style.zIndex=100,document.querySelector("#shopify-chat").children.length>0&&document.querySelector("#shopify-chat iframe")&&(document.querySelector("#shopify-chat iframe").style.zIndex=100)),document.querySelector(".uploadcare--powered-by")&&document.querySelectorAll(".uploadcare--powered-by").forEach((e=>{e.remove()})),document.querySelector('[data-clone-button="true"] iframe')&&(document.querySelector('[data-clone-button="true"] iframe').style.pointerEvents="none")}),500)};if(document.querySelector("[src*='uploadcarev2.js']")){let e=setInterval((()=>{window.uploadcare&&(clearInterval(e),window.ph_jq=window.uploadcare.jQuery,t())}),10)}else((e,t,i=!1)=>{const o=document.createElement("script");o.onerror=e=>console.log(e),t&&(o.onload=t),document.head.appendChild(o),o.src=e})(r,(()=>{window.ph_jq=window.uploadcare.jQuery,t()}));try{((e,t)=>{if("1a8f58-04.myshopify.com"!==Shopify.shop){var i=new Headers;i.append("Content-Type","application/json"),fetch(n+`uploadly_init?store_name=${e}`,{method:"GET",headers:i,redirect:"follow"}).then((e=>e.json())).then((e=>{t(e)}))}else t(!0)})(Shopify.shop,(()=>{if("9e7f22-58.myshopify.com"===Shopify.shop){let e=setInterval((()=>{document.querySelector("#photouploadapp")&&(clearInterval(e),document.querySelector("#photouploadapp").style.display="flex",document.querySelector("#photouploadapp").style.justifyContent="center")}),100)}}))}catch(e){console.log("error in script ph initialization")}window.ph_pdf_api=ii}window.ph_app_window_8856=!0}},t={};function i(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,i),n.exports}i(666),i(891)})();