diff --git a/HISTORY.md b/HISTORY.md index f0045dba..1af6f837 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.0.0](https://github.com/uploadcare/pyuploadcare/compare/v5.1.0...v6.0.0) - 2024-09-19 + +### Changed +- [File Uploader](https://github.com/uploadcare/file-uploader) have been updated to [v1](https://github.com/uploadcare/file-uploader/releases) + ## [5.1.0](https://github.com/uploadcare/pyuploadcare/compare/v5.0.1...v5.1.0) - 2024-04-09 ### Added diff --git a/Makefile b/Makefile index 9fe7a2c8..23ade466 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,10 @@ run_django: update_bundled_static: blocks_version=$$(DJANGO_SETTINGS_MODULE=tests.test_project.settings poetry run python -c "from pyuploadcare.dj.conf import DEFAULT_CONFIG; print(DEFAULT_CONFIG['widget']['version'])"); \ - curl "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@$${blocks_version}/web/blocks.min.js" -o pyuploadcare/dj/static/uploadcare/blocks.min.js; \ - curl "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@$${blocks_version}/web/lr-file-uploader-inline.min.css" -o pyuploadcare/dj/static/uploadcare/lr-file-uploader-inline.min.css; \ - curl "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@$${blocks_version}/web/lr-file-uploader-minimal.min.css" -o pyuploadcare/dj/static/uploadcare/lr-file-uploader-minimal.min.css; \ - curl "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@$${blocks_version}/web/lr-file-uploader-regular.min.css" -o pyuploadcare/dj/static/uploadcare/lr-file-uploader-regular.min.css + curl "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@$${blocks_version}/web/file-uploader.min.js" -o pyuploadcare/dj/static/uploadcare/file-uploader.min.js; \ + curl "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@$${blocks_version}/web/uc-file-uploader-inline.min.css" -o pyuploadcare/dj/static/uploadcare/uc-file-uploader-inline.min.css; \ + curl "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@$${blocks_version}/web/uc-file-uploader-minimal.min.css" -o pyuploadcare/dj/static/uploadcare/uc-file-uploader-minimal.min.css; \ + curl "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@$${blocks_version}/web/uc-file-uploader-regular.min.css" -o pyuploadcare/dj/static/uploadcare/uc-file-uploader-regular.min.css + + diff --git a/docs/django-widget.rst b/docs/django-widget.rst index a912c30a..e297f259 100644 --- a/docs/django-widget.rst +++ b/docs/django-widget.rst @@ -36,7 +36,7 @@ Below is the full default configuration: "use_legacy_widget": False, "use_hosted_assets": True, "widget": { - "version": "0.36.0", + "version": "1", "variant": "regular", "build": "min", "options": {}, @@ -58,17 +58,22 @@ PyUploadcare takes assets from CDN by default, e.g.: .. code-block:: html + + + - + > If you don't want to use hosted assets you have to turn off this feature: @@ -91,9 +96,9 @@ widget url: "widget": { "override_js_url": "http://path.to/your/blocks.js", "override_css_url": { - "regular": "http://path.to/your/lr-file-uploader-regular.css", - "inline": "http://path.to/your/lr-file-uploader-inline.css", - "minimal": "http://path.to/your/lr-file-uploader-minimal.css", + "regular": "http://path.to/your/uc-file-uploader-regular.css", + "inline": "http://path.to/your/uc-file-uploader-inline.css", + "minimal": "http://path.to/your/uc-file-uploader-minimal.css", }, }, } diff --git a/docs/install.rst b/docs/install.rst index 10e195df..2ab7efe6 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -128,5 +128,5 @@ In version 5.0, we introduce a new `file uploader`_, which is now the default fo Additionally, please take note that some settings have been renamed in this update. For example, ``UPLOADCARE["widget_version"]`` has been changed to ``UPLOADCARE["legacy_widget"]["version"]``. You can find the full list of these changes in the `changelog for version 5.0.0`_. .. _file uploader: https://uploadcare.com/docs/file-uploader/ -.. _@uploadcare/blocks: https://www.npmjs.com/package/@uploadcare/blocks +.. _@uploadcare/file-uploader: https://www.npmjs.com/package/@uploadcare/file-uploader .. _changelog for version 5.0.0: https://github.com/uploadcare/pyuploadcare/blob/main/HISTORY.md#500---2023-12-28 diff --git a/pyuploadcare/dj/conf.py b/pyuploadcare/dj/conf.py index 70090624..39c83c42 100644 --- a/pyuploadcare/dj/conf.py +++ b/pyuploadcare/dj/conf.py @@ -67,7 +67,7 @@ class SettingsType(typing_extensions.TypedDict): "use_legacy_widget": False, "use_hosted_assets": True, "widget": { - "version": "0.36.0", + "version": "1", "variant": "regular", "build": "min", "options": {}, @@ -131,12 +131,13 @@ def get_legacy_widget_js_url() -> str: def get_widget_js_url() -> str: widget_config = config["widget"] - filename = "blocks.{0}.js".format(widget_config["build"]).replace( - "..", "." - ) - hosted_url = "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{version}/web/{filename}".format( - version=widget_config["version"], filename=filename - ) + filename = "file-uploader.{0}.min.js".format( + widget_config["build"] + ).replace("..", ".") + hosted_url = ( + "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{version}" + + "/web/{filename}" + ).format(version=widget_config["version"], filename=filename) local_url = "uploadcare/{filename}".format(filename=filename) override_url = widget_config["override_js_url"] if override_url: @@ -149,12 +150,13 @@ def get_widget_js_url() -> str: def get_widget_css_url(variant: WidgetVariantType) -> str: widget_config = config["widget"] - filename = "lr-file-uploader-{0}.{1}.css".format( + filename = "uc-file-uploader-{0}.{1}.min.css".format( variant, widget_config["build"] ).replace("..", ".") - hosted_url = "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{version}/web/{filename}".format( - version=widget_config["version"], filename=filename - ) + hosted_url = ( + "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{version}" + + "/web/{filename}" + ).format(version=widget_config["version"], filename=filename) local_url = "uploadcare/{filename}".format(filename=filename) override_url = widget_config["override_css_url"][variant] if override_url: diff --git a/pyuploadcare/dj/static/uploadcare/blocks.min.js b/pyuploadcare/dj/static/uploadcare/blocks.min.js deleted file mode 100644 index 932306c4..00000000 --- a/pyuploadcare/dj/static/uploadcare/blocks.min.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @license - * MIT License - * - * Copyright (c) 2022 Uploadcare (hello@uploadcare.com). All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ -var nn=Object.defineProperty;var on=(s,i,t)=>i in s?nn(s,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[i]=t;var h=(s,i,t)=>(on(s,typeof i!="symbol"?i+"":i,t),t);var an=Object.defineProperty,ln=(s,i,t)=>i in s?an(s,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[i]=t,Ii=(s,i,t)=>(ln(s,typeof i!="symbol"?i+"":i,t),t);function cn(s){let i=t=>{var e;for(let r in t)((e=t[r])==null?void 0:e.constructor)===Object&&(t[r]=i(t[r]));return{...t}};return i(s)}var E=class{constructor(s){s.constructor===Object?this.store=cn(s):(this._storeIsProxy=!0,this.store=s),this.callbackMap=Object.create(null)}static warn(s,i){console.warn(`Symbiote Data: cannot ${s}. Prop name: `+i)}read(s){return!this._storeIsProxy&&!this.store.hasOwnProperty(s)?(E.warn("read",s),null):this.store[s]}has(s){return this._storeIsProxy?this.store[s]!==void 0:this.store.hasOwnProperty(s)}add(s,i,t=!1){!t&&Object.keys(this.store).includes(s)||(this.store[s]=i,this.notify(s))}pub(s,i){if(!this._storeIsProxy&&!this.store.hasOwnProperty(s)){E.warn("publish",s);return}this.store[s]=i,this.notify(s)}multiPub(s){for(let i in s)this.pub(i,s[i])}notify(s){this.callbackMap[s]&&this.callbackMap[s].forEach(i=>{i(this.store[s])})}sub(s,i,t=!0){return!this._storeIsProxy&&!this.store.hasOwnProperty(s)?(E.warn("subscribe",s),null):(this.callbackMap[s]||(this.callbackMap[s]=new Set),this.callbackMap[s].add(i),t&&i(this.store[s]),{remove:()=>{this.callbackMap[s].delete(i),this.callbackMap[s].size||delete this.callbackMap[s]},callback:i})}static registerCtx(s,i=Symbol()){let t=E.globalStore.get(i);return t?console.warn('State: context UID "'+i+'" already in use'):(t=new E(s),E.globalStore.set(i,t)),t}static deleteCtx(s){E.globalStore.delete(s)}static getCtx(s,i=!0){return E.globalStore.get(s)||(i&&console.warn('State: wrong context UID - "'+s+'"'),null)}};E.globalStore=new Map;var v=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),bs="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",hn=bs.length-1,Yt=class{static generate(s="XXXXXXXXX-XXX"){let i="";for(let t=0;t{ai&&t?i[0].toUpperCase()+i.slice(1):i).join("").split("_").map((i,t)=>i&&t?i.toUpperCase():i).join("")}function dn(s,i){[...s.querySelectorAll(`[${v.REPEAT_ATTR}]`)].forEach(t=>{let e=t.getAttribute(v.REPEAT_ITEM_TAG_ATTR),r;if(e&&(r=window.customElements.get(e)),!r){r=class extends i.BaseComponent{constructor(){super(),e||(this.style.display="contents")}};let o=t.innerHTML;r.template=o,r.reg(e)}for(;t.firstChild;)t.firstChild.remove();let n=t.getAttribute(v.REPEAT_ATTR);i.sub(n,o=>{if(!o){for(;t.firstChild;)t.firstChild.remove();return}let a=[...t.children],l,c=u=>{u.forEach((p,m)=>{if(a[m])if(a[m].set$)setTimeout(()=>{a[m].set$(p)});else for(let f in p)a[m][f]=p[f];else{l||(l=new DocumentFragment);let f=new r;Object.assign(f.init$,p),l.appendChild(f)}}),l&&t.appendChild(l);let d=a.slice(u.length,a.length);for(let p of d)p.remove()};if(o.constructor===Array)c(o);else if(o.constructor===Object){let u=[];for(let d in o){let p=o[d];Object.defineProperty(p,"_KEY_",{value:d,enumerable:!0}),u.push(p)}c(u)}else console.warn("Symbiote repeat data type error:"),console.log(o)}),t.removeAttribute(v.REPEAT_ATTR),t.removeAttribute(v.REPEAT_ITEM_TAG_ATTR)})}var gs="__default__";function pn(s,i){if(i.shadowRoot)return;let t=[...s.querySelectorAll("slot")];if(!t.length)return;let e={};t.forEach(r=>{let n=r.getAttribute("name")||gs;e[n]={slot:r,fr:document.createDocumentFragment()}}),i.initChildren.forEach(r=>{var n;let o=gs;r instanceof Element&&r.hasAttribute("slot")&&(o=r.getAttribute("slot"),r.removeAttribute("slot")),(n=e[o])==null||n.fr.appendChild(r)}),Object.values(e).forEach(r=>{if(r.fr.childNodes.length)r.slot.parentNode.replaceChild(r.fr,r.slot);else if(r.slot.childNodes.length){let n=document.createDocumentFragment();n.append(...r.slot.childNodes),r.slot.parentNode.replaceChild(n,r.slot)}else r.slot.remove()})}function fn(s,i){[...s.querySelectorAll(`[${v.EL_REF_ATTR}]`)].forEach(t=>{let e=t.getAttribute(v.EL_REF_ATTR);i.ref[e]=t,t.removeAttribute(v.EL_REF_ATTR)})}function mn(s,i){[...s.querySelectorAll(`[${v.BIND_ATTR}]`)].forEach(t=>{let r=t.getAttribute(v.BIND_ATTR).split(";");[...t.attributes].forEach(n=>{if(n.name.startsWith("-")&&n.value){let o=un(n.name.replace("-",""));r.push(o+":"+n.value),t.removeAttribute(n.name)}}),r.forEach(n=>{if(!n)return;let o=n.split(":").map(u=>u.trim()),a=o[0],l;a.indexOf(v.ATTR_BIND_PRFX)===0&&(l=!0,a=a.replace(v.ATTR_BIND_PRFX,""));let c=o[1].split(",").map(u=>u.trim());for(let u of c){let d;u.startsWith("!!")?(d="double",u=u.replace("!!","")):u.startsWith("!")&&(d="single",u=u.replace("!","")),i.sub(u,p=>{d==="double"?p=!!p:d==="single"&&(p=!p),l?(p==null?void 0:p.constructor)===Boolean?p?t.setAttribute(a,""):t.removeAttribute(a):t.setAttribute(a,p):ys(t,a,p)||(t[v.SET_LATER_KEY]||(t[v.SET_LATER_KEY]=Object.create(null)),t[v.SET_LATER_KEY][a]=p)})}}),t.removeAttribute(v.BIND_ATTR)})}var Ae="{{",Kt="}}",gn="skip-text";function _n(s){let i,t=[],e=document.createTreeWalker(s,NodeFilter.SHOW_TEXT,{acceptNode:r=>{var n;return!((n=r.parentElement)!=null&&n.hasAttribute(gn))&&r.textContent.includes(Ae)&&r.textContent.includes(Kt)&&1}});for(;i=e.nextNode();)t.push(i);return t}var bn=function(s,i){_n(s).forEach(e=>{let r=[],n;for(;e.textContent.includes(Kt);)e.textContent.startsWith(Ae)?(n=e.textContent.indexOf(Kt)+Kt.length,e.splitText(n),r.push(e)):(n=e.textContent.indexOf(Ae),e.splitText(n)),e=e.nextSibling;r.forEach(o=>{let a=o.textContent.replace(Ae,"").replace(Kt,"");o.textContent="",i.sub(a,l=>{o.textContent=l})})})},yn=[dn,pn,fn,mn,bn],xe="'",Mt='"',vn=/\\([0-9a-fA-F]{1,6} ?)/g;function Cn(s){return(s[0]===Mt||s[0]===xe)&&(s[s.length-1]===Mt||s[s.length-1]===xe)}function wn(s){return(s[0]===Mt||s[0]===xe)&&(s=s.slice(1)),(s[s.length-1]===Mt||s[s.length-1]===xe)&&(s=s.slice(0,-1)),s}function En(s){let i="",t="";for(var e=0;eString.fromCodePoint(parseInt(e.trim(),16))),i=i.replaceAll(`\\ -`,"\\n"),i=En(i),i=Mt+i+Mt);try{return JSON.parse(i)}catch{throw new Error(`Failed to parse CSS property value: ${i}. Original input: ${s}`)}}var _s=0,Rt=null,ct=null,gt=class extends HTMLElement{constructor(){super(),Ii(this,"updateCssData",()=>{var s;this.dropCssDataCache(),(s=this.__boundCssProps)==null||s.forEach(i=>{let t=this.getCssData(this.__extractCssName(i),!0);t!==null&&this.$[i]!==t&&(this.$[i]=t)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return gt}initCallback(){}__initCallback(){var s;this.__initialized||(this.__initialized=!0,(s=this.initCallback)==null||s.call(this))}render(s,i=this.renderShadow){let t;if((i||this.constructor.__shadowStylesUrl)&&!this.shadowRoot&&this.attachShadow({mode:"open"}),this.allowCustomTemplate){let r=this.getAttribute(v.USE_TPL);if(r){let n=this.getRootNode(),o=(n==null?void 0:n.querySelector(r))||document.querySelector(r);o?s=o.content.cloneNode(!0):console.warn(`Symbiote template "${r}" is not found...`)}}if(this.processInnerHtml)for(let r of this.tplProcessors)r(this,this);if(s||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),(s==null?void 0:s.constructor)===DocumentFragment)t=s;else if((s==null?void 0:s.constructor)===String){let r=document.createElement("template");r.innerHTML=s,t=r.content.cloneNode(!0)}else this.constructor.__tpl&&(t=this.constructor.__tpl.content.cloneNode(!0));for(let r of this.tplProcessors)r(t,this)}let e=()=>{t&&(i&&this.shadowRoot.appendChild(t)||this.appendChild(t)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){i=!0;let r=document.createElement("link");r.rel="stylesheet",r.href=this.constructor.__shadowStylesUrl,r.onload=e,this.shadowRoot.prepend(r)}else e()}addTemplateProcessor(s){this.tplProcessors.add(s)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=Yt.generate(),this.style.setProperty(v.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(v.CSS_CTX_PROP,!0)}get ctxName(){var s;let i=((s=this.getAttribute(v.CTX_NAME_ATTR))==null?void 0:s.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=i,i}get localCtx(){return this.__localCtx||(this.__localCtx=E.registerCtx({},this)),this.__localCtx}get nodeCtx(){return E.getCtx(this.ctxName,!1)||E.registerCtx({},this.ctxName)}static __parseProp(s,i){let t,e;if(s.startsWith(v.EXT_DATA_CTX_PRFX))t=i.nodeCtx,e=s.replace(v.EXT_DATA_CTX_PRFX,"");else if(s.includes(v.NAMED_DATA_CTX_SPLTR)){let r=s.split(v.NAMED_DATA_CTX_SPLTR);t=E.getCtx(r[0]),e=r[1]}else t=i.localCtx,e=s;return{ctx:t,name:e}}sub(s,i,t=!0){let e=n=>{this.isConnected&&i(n)},r=gt.__parseProp(s,this);r.ctx.has(r.name)?this.allSubs.add(r.ctx.sub(r.name,e,t)):window.setTimeout(()=>{this.allSubs.add(r.ctx.sub(r.name,e,t))})}notify(s){let i=gt.__parseProp(s,this);i.ctx.notify(i.name)}has(s){let i=gt.__parseProp(s,this);return i.ctx.has(i.name)}add(s,i,t=!1){let e=gt.__parseProp(s,this);e.ctx.add(e.name,i,t)}add$(s,i=!1){for(let t in s)this.add(t,s[t],i)}get $(){if(!this.__stateProxy){let s=Object.create(null);this.__stateProxy=new Proxy(s,{set:(i,t,e)=>{let r=gt.__parseProp(t,this);return r.ctx.pub(r.name,e),!0},get:(i,t)=>{let e=gt.__parseProp(t,this);return e.ctx.read(e.name)}})}return this.__stateProxy}set$(s,i=!1){for(let t in s){let e=s[t];i||![String,Number,Boolean].includes(e==null?void 0:e.constructor)?this.$[t]=e:this.$[t]!==e&&(this.$[t]=e)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(v.CTX_OWNER_ATTR)&&this.getAttribute(v.CTX_OWNER_ATTR)!=="false"}__initDataCtx(){let s=this.constructor.__attrDesc;if(s)for(let i of Object.values(s))Object.keys(this.init$).includes(i)||(this.init$[i]="");for(let i in this.init$)if(i.startsWith(v.EXT_DATA_CTX_PRFX))this.nodeCtx.add(i.replace(v.EXT_DATA_CTX_PRFX,""),this.init$[i],this.__ctxOwner);else if(i.includes(v.NAMED_DATA_CTX_SPLTR)){let t=i.split(v.NAMED_DATA_CTX_SPLTR),e=t[0].trim(),r=t[1].trim();if(e&&r){let n=E.getCtx(e,!1);n||(n=E.registerCtx({},e)),n.add(r,this.init$[i])}}else this.localCtx.add(i,this.init$[i]);for(let i in this.cssInit$)this.bindCssData(i,this.cssInit$[i]);this.__dataCtxInitialized=!0}connectedCallback(){var s;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let i=(s=this.getAttribute(v.CTX_NAME_ATTR))==null?void 0:s.trim();if(i&&this.style.setProperty(v.CSS_CTX_PROP,`'${i}'`),this.__initDataCtx(),this[v.SET_LATER_KEY]){for(let t in this[v.SET_LATER_KEY])ys(this,t,this[v.SET_LATER_KEY][t]);delete this[v.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let t of yn)this.addTemplateProcessor(t);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let t=this.getRootNode();if(!t)return;if(t==null?void 0:t.querySelector(`link[${v.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`)){this.render();return}let r=this.constructor.__rootStylesLink.cloneNode(!0);r.setAttribute(v.ROOT_STYLE_ATTR_NAME,this.constructor.is),r.onload=()=>{this.render()},t.nodeType===Node.DOCUMENT_NODE?t.head.appendChild(r):t.prepend(r)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let s of this.allSubs)s.remove(),this.allSubs.delete(s);for(let s of this.tplProcessors)this.tplProcessors.delete(s);ct==null||ct.delete(this.updateCssData),ct!=null&&ct.size||(Rt==null||Rt.disconnect(),Rt=null,ct=null)},100)))}static reg(s,i=!1){s||(_s++,s=`${v.AUTO_TAG_PRFX}-${_s}`),this.__tag=s;let t=window.customElements.get(s);if(t){!i&&t!==this&&console.warn([`Element with tag name "${s}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join(` -`));return}window.customElements.define(s,i?class extends this{}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(s){this.observedAttributes=Object.keys(s),this.__attrDesc=s}attributeChangedCallback(s,i,t){var e;if(i===t)return;let r=(e=this.constructor.__attrDesc)==null?void 0:e[s];r?this.__dataCtxInitialized?this.$[r]=t:this.init$[r]=t:this[s]=t}getCssData(s,i=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(s)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let t=this.__computedStyle.getPropertyValue(s).trim();try{this.__cssDataCache[s]=An(t)}catch{!i&&console.warn(`CSS Data error: ${s}`),this.__cssDataCache[s]=null}}return this.__cssDataCache[s]}__extractCssName(s){return s.split("--").map((i,t)=>t===0?"":i).join("--")}__initStyleAttrObserver(){ct||(ct=new Set),ct.add(this.updateCssData),Rt||(Rt=new MutationObserver(s=>{s[0].type==="attributes"&&ct.forEach(i=>{i()})}),Rt.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}))}bindCssData(s,i=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(s);let t=this.getCssData(this.__extractCssName(s),!0);t===null&&(t=i),this.add(s,t),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(s,i,t){let e="__"+s;this[e]=this[s],Object.defineProperty(this,s,{set:r=>{this[e]=r,t?window.setTimeout(()=>{i==null||i(r)}):i==null||i(r)},get:()=>this[e]}),this[s]=this[e]}static set shadowStyles(s){let i=new Blob([s],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(i)}static set rootStyles(s){if(!this.__rootStylesLink){let i=new Blob([s],{type:"text/css"}),t=URL.createObjectURL(i),e=document.createElement("link");e.href=t,e.rel="stylesheet",this.__rootStylesLink=e}}},Nt=gt;Ii(Nt,"template");var $i=class{static _print(s){console.warn(s)}static setDefaultTitle(s){this.defaultTitle=s}static setRoutingMap(s){Object.assign(this.appMap,s);for(let i in this.appMap)!this.defaultRoute&&this.appMap[i].default===!0?this.defaultRoute=i:!this.errorRoute&&this.appMap[i].error===!0&&(this.errorRoute=i)}static set routingEventName(s){this.__routingEventName=s}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let s={route:null,options:{}};return window.location.search.split(this.separator).forEach(t=>{if(t.includes("?"))s.route=t.replace("?","");else if(t.includes("=")){let e=t.split("=");s.options[e[0]]=decodeURI(e[1])}else s.options[t]=!0}),s}static notify(){let s=this.readAddressBar(),i=this.appMap[s.route];if(i&&i.title&&(document.title=i.title),s.route===null&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!i&&this.errorRoute){this.applyRoute(this.errorRoute);return}else if(!i&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!i){this._print(`Route "${s.route}" not found...`);return}let t=new CustomEvent($i.routingEventName,{detail:{route:s.route,options:Object.assign(i||{},s.options)}});window.dispatchEvent(t)}static reflect(s,i={}){let t=this.appMap[s];if(!t){this._print("Wrong route: "+s);return}let e="?"+s;for(let n in i)i[n]===!0?e+=this.separator+n:e+=this.separator+n+`=${i[n]}`;let r=t.title||this.defaultTitle||"";window.history.pushState(null,r,e),document.title=r}static applyRoute(s,i={}){this.reflect(s,i),this.notify()}static setSeparator(s){this._separator=s}static get separator(){return this._separator||"&"}static createRouterData(s,i){this.setRoutingMap(i);let t=E.registerCtx({route:null,options:null,title:null},s);return window.addEventListener(this.routingEventName,e=>{var r;t.multiPub({route:e.detail.route,options:e.detail.options,title:((r=e.detail.options)==null?void 0:r.title)||this.defaultTitle||""})}),$i.notify(),this.initPopstateListener(),t}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};$i.appMap=Object.create(null);function ki(s,i){for(let t in i)t.includes("-")?s.style.setProperty(t,i[t]):s.style[t]=i[t]}function xn(s,i){for(let t in i)i[t].constructor===Boolean?i[t]?s.setAttribute(t,""):s.removeAttribute(t):s.setAttribute(t,i[t])}function Jt(s={tag:"div"}){let i=document.createElement(s.tag);if(s.attributes&&xn(i,s.attributes),s.styles&&ki(i,s.styles),s.properties)for(let t in s.properties)i[t]=s.properties[t];return s.processors&&s.processors.forEach(t=>{t(i)}),s.children&&s.children.forEach(t=>{let e=Jt(t);i.appendChild(e)}),i}var vs="idb-store-ready",Tn="symbiote-db",Sn="symbiote-idb-update_",$n=class{_notifyWhenReady(s=null){window.dispatchEvent(new CustomEvent(vs,{detail:{dbName:this.name,storeName:this.storeName,event:s}}))}get _updEventName(){return Sn+this.name}_getUpdateEvent(s){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:s}})}_notifySubscribers(s){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,s),window.dispatchEvent(this._getUpdateEvent(s))}constructor(s,i){this.name=s,this.storeName=i,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=t=>{this.db=t.target.result,this.objStore=this.db.createObjectStore(i,{keyPath:"_key"}),this.objStore.transaction.oncomplete=e=>{this._notifyWhenReady(e)}},this.request.onsuccess=t=>{this.db=t.target.result,this._notifyWhenReady(t)},this.request.onerror=t=>{console.error(t)},this._subscriptionsMap={},this._updateHandler=t=>{t.key===this.name&&this._subscriptionsMap[t.newValue]&&this._subscriptionsMap[t.newValue].forEach(async r=>{r(await this.read(t.newValue))})},this._localUpdateHandler=t=>{this._updateHandler(t.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(s){let t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(s);return new Promise((e,r)=>{t.onsuccess=n=>{var o;(o=n.target.result)!=null&&o._value?e(n.target.result._value):(e(null),console.warn(`IDB: cannot read "${s}"`))},t.onerror=n=>{r(n)}})}write(s,i,t=!1){let e={_key:s,_value:i},n=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(e);return new Promise((o,a)=>{n.onsuccess=l=>{t||this._notifySubscribers(s),o(l.target.result)},n.onerror=l=>{a(l)}})}delete(s,i=!1){let e=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(s);return new Promise((r,n)=>{e.onsuccess=o=>{i||this._notifySubscribers(s),r(o)},e.onerror=o=>{n(o)}})}getAll(){let i=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((t,e)=>{i.onsuccess=r=>{let n=r.target.result;t(n.map(o=>o._value))},i.onerror=r=>{e(r)}})}subscribe(s,i){this._subscriptionsMap[s]||(this._subscriptionsMap[s]=new Set);let t=this._subscriptionsMap[s];return t.add(i),{remove:()=>{t.delete(i),t.size||delete this._subscriptionsMap[s]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,Cs.clear(this.name)}},Cs=class{static get readyEventName(){return vs}static open(s=Tn,i="store"){let t=s+"/"+i;return this._reg[t]||(this._reg[t]=new $n(s,i)),this._reg[t]}static clear(s){window.indexedDB.deleteDatabase(s);for(let i in this._reg)i.split("/")[0]===s&&delete this._reg[i]}};Ii(Cs,"_reg",Object.create(null));var $=Object.freeze({FILE_ADDED:"file-added",FILE_REMOVED:"file-removed",FILE_UPLOAD_START:"file-upload-start",FILE_UPLOAD_PROGRESS:"file-upload-progress",FILE_UPLOAD_SUCCESS:"file-upload-success",FILE_UPLOAD_FAILED:"file-upload-failed",FILE_URL_CHANGED:"file-url-changed",MODAL_OPEN:"modal-open",MODAL_CLOSE:"modal-close",DONE_CLICK:"done-click",UPLOAD_CLICK:"upload-click",ACTIVITY_CHANGE:"activity-change",COMMON_UPLOAD_START:"common-upload-start",COMMON_UPLOAD_PROGRESS:"common-upload-progress",COMMON_UPLOAD_SUCCESS:"common-upload-success",COMMON_UPLOAD_FAILED:"common-upload-failed",CHANGE:"change",GROUP_CREATED:"group-created"}),Te=class{constructor(i){h(this,"_timeoutStore",new Map);h(this,"_targets",new Set);h(this,"_debugPrint",null);this._debugPrint=i}bindTarget(i){this._targets.add(i)}unbindTarget(i){this._targets.delete(i)}_dispatch(i,t){var e;for(let r of this._targets)r.dispatchEvent(new CustomEvent(i,{detail:t}));(e=this._debugPrint)==null||e.call(this,()=>{let r=t&&typeof t=="object"?{...t}:t;return[`event "${i}"`,r]})}emit(i,t,{debounce:e}={}){if(typeof e!="number"&&!e){this._dispatch(i,typeof t=="function"?t():t);return}this._timeoutStore.has(i)&&window.clearTimeout(this._timeoutStore.get(i));let r=typeof e=="number"?e:20,n=window.setTimeout(()=>{this._dispatch(i,typeof t=="function"?t():t),this._timeoutStore.delete(i)},r);this._timeoutStore.set(i,n)}};function k(s,i){let t,e=(...r)=>{clearTimeout(t),t=setTimeout(()=>s(...r),i)};return e.cancel=()=>{clearTimeout(t)},e}var ws="--uploadcare-blocks-window-height",$t=class{static registerClient(i){this.clientsRegistry.size===0&&this.attachTracker(),this.clientsRegistry.add(i)}static unregisterClient(i){this.clientsRegistry.delete(i),this.clientsRegistry.size===0&&this.detachTracker()}static attachTracker(){window.addEventListener("resize",this.flush,{passive:!0,capture:!0}),this.flush()}static detachTracker(){window.removeEventListener("resize",this.flush,{capture:!0}),document.documentElement.style.removeProperty(ws)}};h($t,"clientsRegistry",new Set),h($t,"flush",k(()=>{document.documentElement.style.setProperty(ws,`${window.innerHeight}px`)},100));var Se=(s,i)=>new Intl.PluralRules(s).select(i);var In=s=>s,Oi="{{",As="}}",Es="plural:";function Zt(s,i,t={}){var o;let{openToken:e=Oi,closeToken:r=As,transform:n=In}=t;for(let a in i){let l=(o=i[a])==null?void 0:o.toString();s=s.replaceAll(e+a+r,typeof l=="string"?n(l):l)}return s}function xs(s){let i=[],t=s.indexOf(Oi);for(;t!==-1;){let e=s.indexOf(As,t),r=s.substring(t+2,e);if(r.startsWith(Es)){let n=s.substring(t+2,e).replace(Es,""),o=n.substring(0,n.indexOf("(")),a=n.substring(n.indexOf("(")+1,n.indexOf(")"));i.push({variable:r,pluralKey:o,countVariable:a})}t=s.indexOf(Oi,e)}return i}var ht=s=>{var i;return(i=s.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:i.map(t=>t.toLowerCase()).join("-")};var $e=({element:s,attribute:i,onSuccess:t,onTimeout:e,timeout:r=300})=>{let n=s.getAttribute(i);if(n!==null){t(n);return}let o=new MutationObserver(c=>{let u=c[c.length-1];l(u)});o.observe(s,{attributes:!0,attributeFilter:[i]});let a=setTimeout(()=>{o.disconnect(),e()},r),l=c=>{let u=s.getAttribute(i);c.type==="attributes"&&c.attributeName===i&&u!==null&&(clearTimeout(a),o.disconnect(),t(u))}};var Ts=new Set;function It(s){Ts.has(s)||(Ts.add(s),console.warn(s))}function Ss(s){return Object.prototype.toString.call(s)==="[object Object]"}var kn=/\W|_/g;function On(s){return s.split(kn).map((i,t)=>i.charAt(0)[t>0?"toUpperCase":"toLowerCase"]()+i.slice(1)).join("")}function $s(s,{ignoreKeys:i}={ignoreKeys:[]}){return Array.isArray(s)?s.map(t=>pt(t,{ignoreKeys:i})):s}function pt(s,{ignoreKeys:i}={ignoreKeys:[]}){if(Array.isArray(s))return $s(s,{ignoreKeys:i});if(!Ss(s))return s;let t={};for(let e of Object.keys(s)){let r=s[e];if(i.includes(e)){t[e]=r;continue}Ss(r)?r=pt(r,{ignoreKeys:i}):Array.isArray(r)&&(r=$s(r,{ignoreKeys:i})),t[On(e)]=r}return t}var Pn=s=>new Promise(i=>setTimeout(i,s));function Di({libraryName:s,libraryVersion:i,userAgent:t,publicKey:e="",integration:r=""}){let n="JavaScript";if(typeof t=="string")return t;if(typeof t=="function")return t({publicKey:e,libraryName:s,libraryVersion:i,languageName:n,integration:r});let o=[s,i,e].filter(Boolean).join("/"),a=[n,r].filter(Boolean).join("; ");return`${o} (${a})`}var Ln={factor:2,time:100};function Un(s,i=Ln){let t=0;function e(r){let n=Math.round(i.time*i.factor**t);return r({attempt:t,retry:a=>Pn(a!=null?a:n).then(()=>(t+=1,e(r)))})}return e(s)}var Qt=class extends Error{},Dt=class s extends Qt{constructor(t){super();h(this,"originalProgressEvent");this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,s.prototype),this.originalProgressEvent=t}},ke=(s,i)=>{s&&(s.aborted?Promise.resolve().then(i):s.addEventListener("abort",()=>i(),{once:!0}))},_t=class s extends Qt{constructor(t="Request canceled"){super(t);h(this,"isCancel",!0);this.name="CancelError",Object.setPrototypeOf(this,s.prototype)}},Rn=500,ks=({check:s,interval:i=Rn,timeout:t,signal:e})=>new Promise((r,n)=>{let o,a;ke(e,()=>{o&&clearTimeout(o),n(new _t("Poll cancelled"))}),t&&(a=setTimeout(()=>{o&&clearTimeout(o),n(new _t("Timed out"))},t));let l=()=>{try{Promise.resolve(s(e)).then(c=>{c?(a&&clearTimeout(a),r(c)):o=setTimeout(l,i)}).catch(c=>{a&&clearTimeout(a),n(c)})}catch(c){a&&clearTimeout(a),n(c)}};o=setTimeout(l,0)}),S={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:50*1024*1024,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:25*1024*1024,multipartChunkSize:5*1024*1024,multipartMinLastPartSize:1024*1024,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},Oe="application/octet-stream",Os="original",bt=({method:s,url:i,data:t,headers:e={},signal:r,onProgress:n})=>new Promise((o,a)=>{let l=new XMLHttpRequest,c=(s==null?void 0:s.toUpperCase())||"GET",u=!1;l.open(c,i,!0),e&&Object.entries(e).forEach(d=>{let[p,m]=d;typeof m!="undefined"&&!Array.isArray(m)&&l.setRequestHeader(p,m)}),l.responseType="text",ke(r,()=>{u=!0,l.abort(),a(new _t)}),l.onload=()=>{if(l.status!=200)a(new Error(`Error ${l.status}: ${l.statusText}`));else{let d={method:c,url:i,data:t,headers:e||void 0,signal:r,onProgress:n},p=l.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};p.forEach(function(y){let x=y.split(": "),T=x.shift(),w=x.join(": ");T&&typeof T!="undefined"&&(m[T]=w)});let f=l.response,_=l.status;o({request:d,data:f,headers:m,status:_})}},l.onerror=d=>{u||a(new Dt(d))},n&&typeof n=="function"&&(l.upload.onprogress=d=>{d.lengthComputable?n({isComputable:!0,value:d.loaded/d.total}):n({isComputable:!1})}),t?l.send(t):l.send()});function Mn(s,...i){return s}var Nn=({name:s})=>s?[s]:[],Dn=Mn,Fn=()=>new FormData,Ps=s=>!1,Pe=s=>typeof Blob!="undefined"&&s instanceof Blob,Le=s=>typeof File!="undefined"&&s instanceof File,Ue=s=>!!s&&typeof s=="object"&&!Array.isArray(s)&&"uri"in s&&typeof s.uri=="string",Ft=s=>Pe(s)||Le(s)||Ps()||Ue(s),Bn=s=>typeof s=="string"||typeof s=="number"||typeof s=="undefined",zn=s=>!!s&&typeof s=="object"&&!Array.isArray(s),Vn=s=>!!s&&typeof s=="object"&&"data"in s&&Ft(s.data);function Ls(s,i,t){if(Array.isArray(t))for(let e of t)Ls(s,`${i}[]`,e);else if(Vn(t)){let{name:e,contentType:r}=t,n=Dn(t.data,e,r!=null?r:Oe),o=Nn({name:e,contentType:r});s.push([i,n,...o])}else if(zn(t))for(let[e,r]of Object.entries(t))typeof r!="undefined"&&s.push([`${i}[${e}]`,String(r)]);else Bn(t)&&t&&s.push([i,t.toString()])}function jn(s){let i=[];for(let[t,e]of Object.entries(s))Ls(i,t,e);return i}function Re(s){let i=Fn(),t=jn(s);for(let e of t){let[r,n,...o]=e;i.append(r,n,...o)}return i}var F=class s extends Qt{constructor(t,e,r,n,o){super();h(this,"code");h(this,"request");h(this,"response");h(this,"headers");this.name="UploadError",this.message=t,this.code=e,this.request=r,this.response=n,this.headers=o,Object.setPrototypeOf(this,s.prototype)}},Hn=s=>{let i=new URLSearchParams;for(let[t,e]of Object.entries(s))e&&typeof e=="object"&&!Array.isArray(e)?Object.entries(e).filter(r=>{var n;return(n=r[1])!=null?n:!1}).forEach(r=>i.set(`${t}[${r[0]}]`,String(r[1]))):Array.isArray(e)?e.forEach(r=>{i.append(`${t}[]`,r)}):typeof e=="string"&&e?i.set(t,e):typeof e=="number"&&i.set(t,e.toString());return i.toString()},ut=(s,i,t)=>{let e=new URL(s);return e.pathname=(e.pathname+i).replace("//","/"),t&&(e.search=Hn(t)),e.toString()},Gn="6.14.1",Wn="UploadcareUploadClient",Xn=Gn;function kt(s){return Di({libraryName:Wn,libraryVersion:Xn,...s})}var qn="RequestThrottledError",Is=15e3,Kn=1e3;function Yn(s){let{headers:i}=s||{};if(!i||typeof i["retry-after"]!="string")return Is;let t=parseInt(i["retry-after"],10);return Number.isFinite(t)?t*1e3:Is}function yt(s,i){let{retryThrottledRequestMaxTimes:t,retryNetworkErrorMaxTimes:e}=i;return Un(({attempt:r,retry:n})=>s().catch(o=>{if("response"in o&&(o==null?void 0:o.code)===qn&&r{let i="";return(Pe(s)||Le(s)||Ue(s))&&(i=s.type),i||Oe},Rs=s=>{let i="";return Le(s)&&s.name?i=s.name:Pe(s)||Ps()?i="":Ue(s)&&s.name&&(i=s.name),i||Os};function Fi(s){return typeof s=="undefined"||s==="auto"?"auto":s?"1":"0"}function Jn(s,{publicKey:i,fileName:t,contentType:e,baseURL:r=S.baseURL,secureSignature:n,secureExpire:o,store:a,signal:l,onProgress:c,source:u="local",integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=S.retryNetworkErrorMaxTimes,metadata:_}){return yt(()=>bt({method:"POST",url:ut(r,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:i,integration:d,userAgent:p})},data:Re({file:{data:s,name:t||Rs(s),contentType:e||Us(s)},UPLOADCARE_PUB_KEY:i,UPLOADCARE_STORE:Fi(a),signature:n,expire:o,source:u,metadata:_}),signal:l,onProgress:c}).then(({data:y,headers:x,request:T})=>{let w=pt(JSON.parse(y));if("error"in w)throw new F(w.error.content,w.error.errorCode,T,w,x);return w}),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}var Ui;(function(s){s.Token="token",s.FileInfo="file_info"})(Ui||(Ui={}));function Zn(s,{publicKey:i,baseURL:t=S.baseURL,store:e,fileName:r,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:o,secureSignature:a,secureExpire:l,source:c="url",signal:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=S.retryNetworkErrorMaxTimes,metadata:_}){return yt(()=>bt({method:"POST",headers:{"X-UC-User-Agent":kt({publicKey:i,integration:d,userAgent:p})},url:ut(t,"/from_url/",{jsonerrors:1,pub_key:i,source_url:s,store:Fi(e),filename:r,check_URL_duplicates:n?1:void 0,save_URL_duplicates:o?1:void 0,signature:a,expire:l,source:c,metadata:_}),signal:u}).then(({data:y,headers:x,request:T})=>{let w=pt(JSON.parse(y));if("error"in w)throw new F(w.error.content,w.error.errorCode,T,w,x);return w}),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}var H;(function(s){s.Unknown="unknown",s.Waiting="waiting",s.Progress="progress",s.Error="error",s.Success="success"})(H||(H={}));var Qn=s=>"status"in s&&s.status===H.Error;function to(s,{publicKey:i,baseURL:t=S.baseURL,signal:e,integration:r,userAgent:n,retryThrottledRequestMaxTimes:o=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=S.retryNetworkErrorMaxTimes}={}){return yt(()=>bt({method:"GET",headers:i?{"X-UC-User-Agent":kt({publicKey:i,integration:r,userAgent:n})}:void 0,url:ut(t,"/from_url/status/",{jsonerrors:1,token:s}),signal:e}).then(({data:l,headers:c,request:u})=>{let d=pt(JSON.parse(l));if("error"in d&&!Qn(d))throw new F(d.error.content,d.error.errorCode,u,d,c);return d}),{retryNetworkErrorMaxTimes:a,retryThrottledRequestMaxTimes:o})}function eo(s,{publicKey:i,baseURL:t=S.baseURL,jsonpCallback:e,secureSignature:r,secureExpire:n,signal:o,source:a,integration:l,userAgent:c,retryThrottledRequestMaxTimes:u=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:d=S.retryNetworkErrorMaxTimes}){return yt(()=>bt({method:"POST",headers:{"X-UC-User-Agent":kt({publicKey:i,integration:l,userAgent:c})},url:ut(t,"/group/",{jsonerrors:1}),data:Re({files:s,callback:e,pub_key:i,signature:r,expire:n,source:a}),signal:o}).then(({data:p,headers:m,request:f})=>{let _=pt(JSON.parse(p));if("error"in _)throw new F(_.error.content,_.error.errorCode,f,_,m);return _}),{retryNetworkErrorMaxTimes:d,retryThrottledRequestMaxTimes:u})}function Ms(s,{publicKey:i,baseURL:t=S.baseURL,signal:e,source:r,integration:n,userAgent:o,retryThrottledRequestMaxTimes:a=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=S.retryNetworkErrorMaxTimes}){return yt(()=>bt({method:"GET",headers:{"X-UC-User-Agent":kt({publicKey:i,integration:n,userAgent:o})},url:ut(t,"/info/",{jsonerrors:1,pub_key:i,file_id:s,source:r}),signal:e}).then(({data:c,headers:u,request:d})=>{let p=pt(JSON.parse(c));if("error"in p)throw new F(p.error.content,p.error.errorCode,d,p,u);return p}),{retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})}function io(s,{publicKey:i,contentType:t,fileName:e,multipartChunkSize:r=S.multipartChunkSize,baseURL:n="",secureSignature:o,secureExpire:a,store:l,signal:c,source:u="local",integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=S.retryNetworkErrorMaxTimes,metadata:_}){return yt(()=>bt({method:"POST",url:ut(n,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:i,integration:d,userAgent:p})},data:Re({filename:e||Os,size:s,content_type:t||Oe,part_size:r,UPLOADCARE_STORE:Fi(l),UPLOADCARE_PUB_KEY:i,signature:o,expire:a,source:u,metadata:_}),signal:c}).then(({data:y,headers:x,request:T})=>{let w=pt(JSON.parse(y));if("error"in w)throw new F(w.error.content,w.error.errorCode,T,w,x);return w.parts=Object.keys(w.parts).map(V=>w.parts[Number(V)]),w}),{retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})}function so(s,i,{contentType:t,signal:e,onProgress:r,retryThrottledRequestMaxTimes:n=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:o=S.retryNetworkErrorMaxTimes}){return yt(()=>bt({method:"PUT",url:i,data:s,onProgress:r,signal:e,headers:{"Content-Type":t||Oe}}).then(a=>(r&&r({isComputable:!0,value:1}),a)).then(({status:a})=>({code:a})),{retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:o})}function ro(s,{publicKey:i,baseURL:t=S.baseURL,source:e="local",signal:r,integration:n,userAgent:o,retryThrottledRequestMaxTimes:a=S.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=S.retryNetworkErrorMaxTimes}){return yt(()=>bt({method:"POST",url:ut(t,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:i,integration:n,userAgent:o})},data:Re({uuid:s,UPLOADCARE_PUB_KEY:i,source:e}),signal:r}).then(({data:c,headers:u,request:d})=>{let p=pt(JSON.parse(c));if("error"in p)throw new F(p.error.content,p.error.errorCode,d,p,u);return p}),{retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})}function Bi(s,{publicKey:i,baseURL:t,source:e,integration:r,userAgent:n,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:a,signal:l,onProgress:c}){return ks({check:u=>Ms(s,{publicKey:i,baseURL:t,signal:u,source:e,integration:r,userAgent:n,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:a}).then(d=>d.isReady?d:(c&&c({isComputable:!0,value:1}),!1)),signal:l})}function no(s){return"defaultEffects"in s}var dt=class{constructor(i,{baseCDN:t=S.baseCDN,fileName:e}={}){h(this,"uuid");h(this,"name",null);h(this,"size",null);h(this,"isStored",null);h(this,"isImage",null);h(this,"mimeType",null);h(this,"cdnUrl",null);h(this,"s3Url",null);h(this,"originalFilename",null);h(this,"imageInfo",null);h(this,"videoInfo",null);h(this,"contentInfo",null);h(this,"metadata",null);h(this,"s3Bucket",null);h(this,"defaultEffects",null);let{uuid:r,s3Bucket:n}=i,o=ut(t,`${r}/`),a=n?ut(`https://${n}.s3.amazonaws.com/`,`${r}/${i.filename}`):null;this.uuid=r,this.name=e||i.filename,this.size=i.size,this.isStored=i.isStored,this.isImage=i.isImage,this.mimeType=i.mimeType,this.cdnUrl=o,this.originalFilename=i.originalFilename,this.imageInfo=i.imageInfo,this.videoInfo=i.videoInfo,this.contentInfo=i.contentInfo,this.metadata=i.metadata||null,this.s3Bucket=n||null,this.s3Url=a,no(i)&&(this.defaultEffects=i.defaultEffects)}},oo=(s,{publicKey:i,fileName:t,baseURL:e,secureSignature:r,secureExpire:n,store:o,contentType:a,signal:l,onProgress:c,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:_,metadata:y})=>Jn(s,{publicKey:i,fileName:t,contentType:a,baseURL:e,secureSignature:r,secureExpire:n,store:o,signal:l,onProgress:c,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:y}).then(({file:x})=>Bi(x,{publicKey:i,baseURL:e,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:c,signal:l})).then(x=>new dt(x,{baseCDN:_})),ao=(s,{publicKey:i,fileName:t,baseURL:e,signal:r,onProgress:n,source:o,integration:a,userAgent:l,retryThrottledRequestMaxTimes:c,retryNetworkErrorMaxTimes:u,baseCDN:d})=>Ms(s,{publicKey:i,baseURL:e,signal:r,source:o,integration:a,userAgent:l,retryThrottledRequestMaxTimes:c,retryNetworkErrorMaxTimes:u}).then(p=>new dt(p,{baseCDN:d,fileName:t})).then(p=>(n&&n({isComputable:!0,value:1}),p)),lo=(s,{signal:i}={})=>{let t=null,e=null,r=s.map(()=>new AbortController),n=o=>()=>{e=o,r.forEach((a,l)=>l!==o&&a.abort())};return ke(i,()=>{r.forEach(o=>o.abort())}),Promise.all(s.map((o,a)=>{let l=n(a);return Promise.resolve().then(()=>o({stopRace:l,signal:r[a].signal})).then(c=>(l(),c)).catch(c=>(t=c,null))})).then(o=>{if(e===null)throw t;return o[e]})},co=window.WebSocket,Ri=class{constructor(){h(this,"events",Object.create({}))}emit(i,t){var e;(e=this.events[i])==null||e.forEach(r=>r(t))}on(i,t){this.events[i]=this.events[i]||[],this.events[i].push(t)}off(i,t){t?this.events[i]=this.events[i].filter(e=>e!==t):this.events[i]=[]}},ho=(s,i)=>s==="success"?{status:H.Success,...i}:s==="progress"?{status:H.Progress,...i}:{status:H.Error,...i},Mi=class{constructor(i,t=3e4){h(this,"key");h(this,"disconnectTime");h(this,"ws");h(this,"queue",[]);h(this,"isConnected",!1);h(this,"subscribers",0);h(this,"emmitter",new Ri);h(this,"disconnectTimeoutId",null);this.key=i,this.disconnectTime=t}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){let i=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new co(i),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{let e=JSON.parse(t.data.toString());switch(e.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(e.channel,ho(e.event,JSON.parse(e.data)))}})}}disconnect(){let i=()=>{var t;(t=this.ws)==null||t.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{i()},this.disconnectTime):i()}send(i,t){var r;let e=JSON.stringify({event:i,data:t});(r=this.ws)==null||r.send(e)}subscribe(i,t){this.subscribers+=1,this.connect();let e=`task-status-${i}`,r={event:"pusher:subscribe",data:{channel:e}};this.emmitter.on(e,t),this.isConnected?this.send(r.event,r.data):this.queue.push(r)}unsubscribe(i){this.subscribers-=1;let t=`task-status-${i}`,e={event:"pusher:unsubscribe",data:{channel:t}};this.emmitter.off(t),this.isConnected?this.send(e.event,e.data):this.queue=this.queue.filter(r=>r.data.channel!==t),this.subscribers===0&&this.disconnect()}onError(i){return this.emmitter.on("error",i),()=>this.emmitter.off("error",i)}},Pi=null,zi=s=>{if(!Pi){let i=typeof window=="undefined"?0:3e4;Pi=new Mi(s,i)}return Pi},uo=s=>{zi(s).connect()};function po({token:s,publicKey:i,baseURL:t,integration:e,userAgent:r,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:o,onProgress:a,signal:l}){return ks({check:c=>to(s,{publicKey:i,baseURL:t,integration:e,userAgent:r,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:o,signal:c}).then(u=>{switch(u.status){case H.Error:return new F(u.error,u.errorCode);case H.Waiting:return!1;case H.Unknown:return new F(`Token "${s}" was not found.`);case H.Progress:return a&&(u.total==="unknown"?a({isComputable:!1}):a({isComputable:!0,value:u.done/u.total})),!1;case H.Success:return a&&a({isComputable:!0,value:u.done/u.total}),u;default:throw new Error("Unknown status")}}),signal:l})}var fo=({token:s,pusherKey:i,signal:t,onProgress:e})=>new Promise((r,n)=>{let o=zi(i),a=o.onError(n),l=()=>{a(),o.unsubscribe(s)};ke(t,()=>{l(),n(new _t("pusher cancelled"))}),o.subscribe(s,c=>{switch(c.status){case H.Progress:{e&&(c.total==="unknown"?e({isComputable:!1}):e({isComputable:!0,value:c.done/c.total}));break}case H.Success:{l(),e&&e({isComputable:!0,value:c.done/c.total}),r(c);break}case H.Error:l(),n(new F(c.msg,c.error_code))}})}),mo=(s,{publicKey:i,fileName:t,baseURL:e,baseCDN:r,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:o,secureSignature:a,secureExpire:l,store:c,signal:u,onProgress:d,source:p,integration:m,userAgent:f,retryThrottledRequestMaxTimes:_,pusherKey:y=S.pusherKey,metadata:x})=>Promise.resolve(uo(y)).then(()=>Zn(s,{publicKey:i,fileName:t,baseURL:e,checkForUrlDuplicates:n,saveUrlForRecurrentUploads:o,secureSignature:a,secureExpire:l,store:c,signal:u,source:p,integration:m,userAgent:f,retryThrottledRequestMaxTimes:_,metadata:x})).catch(T=>{let w=zi(y);return w==null||w.disconnect(),Promise.reject(T)}).then(T=>T.type===Ui.FileInfo?T:lo([({signal:w})=>po({token:T.token,publicKey:i,baseURL:e,integration:m,userAgent:f,retryThrottledRequestMaxTimes:_,onProgress:d,signal:w}),({signal:w})=>fo({token:T.token,pusherKey:y,signal:w,onProgress:d})],{signal:u})).then(T=>{if(T instanceof F)throw T;return T}).then(T=>Bi(T.uuid,{publicKey:i,baseURL:e,integration:m,userAgent:f,retryThrottledRequestMaxTimes:_,onProgress:d,signal:u})).then(T=>new dt(T,{baseCDN:r})),Li=new WeakMap,go=async s=>{if(Li.has(s))return Li.get(s);let i=await fetch(s.uri).then(t=>t.blob());return Li.set(s,i),i},Ns=async s=>{if(Le(s)||Pe(s))return s.size;if(Ue(s))return(await go(s)).size;throw new Error("Unknown file type. Cannot determine file size.")},_o=(s,i=S.multipartMinFileSize)=>s>=i,Ds=s=>{let i="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}",t=new RegExp(i);return!Ft(s)&&t.test(s)},Vi=s=>{let i="^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$",t=new RegExp(i);return!Ft(s)&&t.test(s)},bo=(s,i)=>new Promise((t,e)=>{let r=[],n=!1,o=i.length,a=[...i],l=()=>{let c=i.length-a.length,u=a.shift();u&&u().then(d=>{n||(r[c]=d,o-=1,o?l():t(r))}).catch(d=>{n=!0,e(d)})};for(let c=0;c{let r=e*i,n=Math.min(r+e,t);return s.slice(r,n)},vo=async(s,i,t)=>e=>yo(s,e,i,t),Co=(s,i,{publicKey:t,contentType:e,onProgress:r,signal:n,integration:o,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l})=>so(s,i,{publicKey:t,contentType:e,onProgress:r,signal:n,integration:o,retryThrottledRequestMaxTimes:a,retryNetworkErrorMaxTimes:l}),wo=async(s,{publicKey:i,fileName:t,fileSize:e,baseURL:r,secureSignature:n,secureExpire:o,store:a,signal:l,onProgress:c,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:_,multipartChunkSize:y=S.multipartChunkSize,maxConcurrentRequests:x=S.maxConcurrentRequests,baseCDN:T,metadata:w})=>{let V=e!=null?e:await Ns(s),at,St=(U,j)=>{if(!c)return;at||(at=Array(U).fill(0));let Z=tt=>tt.reduce((lt,Si)=>lt+Si,0);return tt=>{tt.isComputable&&(at[j]=tt.value,c({isComputable:!0,value:Z(at)/U}))}};return _||(_=Us(s)),io(V,{publicKey:i,contentType:_,fileName:t||Rs(s),baseURL:r,secureSignature:n,secureExpire:o,store:a,signal:l,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:w}).then(async({uuid:U,parts:j})=>{let Z=await vo(s,V,y);return Promise.all([U,bo(x,j.map((tt,lt)=>()=>Co(Z(lt),tt,{publicKey:i,contentType:_,onProgress:St(j.length,lt),signal:l,integration:d,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})))])}).then(([U])=>ro(U,{publicKey:i,baseURL:r,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})).then(U=>U.isReady?U:Bi(U.uuid,{publicKey:i,baseURL:r,source:u,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:c,signal:l})).then(U=>new dt(U,{baseCDN:T}))};async function ji(s,{publicKey:i,fileName:t,baseURL:e=S.baseURL,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:l,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartMinFileSize:_,multipartChunkSize:y,maxConcurrentRequests:x,baseCDN:T=S.baseCDN,checkForUrlDuplicates:w,saveUrlForRecurrentUploads:V,pusherKey:at,metadata:St}){if(Ft(s)){let U=await Ns(s);return _o(U,_)?wo(s,{publicKey:i,contentType:f,multipartChunkSize:y,fileSize:U,fileName:t,baseURL:e,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:l,source:c,integration:u,userAgent:d,maxConcurrentRequests:x,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:T,metadata:St}):oo(s,{publicKey:i,fileName:t,contentType:f,baseURL:e,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:l,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:T,metadata:St})}if(Vi(s))return mo(s,{publicKey:i,fileName:t,baseURL:e,baseCDN:T,checkForUrlDuplicates:w,saveUrlForRecurrentUploads:V,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:l,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,pusherKey:at,metadata:St});if(Ds(s))return ao(s,{publicKey:i,fileName:t,baseURL:e,signal:a,onProgress:l,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:T});throw new TypeError(`File uploading from "${s}" is not supported`)}var Ni=class{constructor(i,{baseCDN:t=S.baseCDN}={}){h(this,"uuid");h(this,"filesCount");h(this,"totalSize");h(this,"isStored");h(this,"isImage");h(this,"cdnUrl");h(this,"files");h(this,"createdAt");h(this,"storedAt",null);this.uuid=i.id,this.filesCount=i.filesCount;let e=i.files.filter(Boolean);this.totalSize=Object.values(e).reduce((r,n)=>r+n.size,0),this.isStored=!!i.datetimeStored,this.isImage=!!Object.values(e).filter(r=>r.isImage).length,this.cdnUrl=i.cdnUrl,this.files=e.map(r=>new dt(r,{baseCDN:t})),this.createdAt=i.datetimeCreated,this.storedAt=i.datetimeStored}},Eo=s=>{for(let i of s)if(!Ft(i))return!1;return!0},Ao=s=>{for(let i of s)if(!Ds(i))return!1;return!0},xo=s=>{for(let i of s)if(!Vi(i))return!1;return!0};function Fs(s,{publicKey:i,fileName:t,baseURL:e=S.baseURL,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:l,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:_=S.multipartChunkSize,baseCDN:y=S.baseCDN,checkForUrlDuplicates:x,saveUrlForRecurrentUploads:T,jsonpCallback:w}){if(!Eo(s)&&!xo(s)&&!Ao(s))throw new TypeError(`Group uploading from "${s}" is not supported`);let V,at=!0,St=s.length,U=(j,Z)=>{if(!l)return;V||(V=Array(j).fill(0));let tt=lt=>lt.reduce((Si,rn)=>Si+rn)/j;return lt=>{if(!lt.isComputable||!at){at=!1,l({isComputable:!1});return}V[Z]=lt.value,l({isComputable:!0,value:tt(V)})}};return Promise.all(s.map((j,Z)=>Ft(j)||Vi(j)?ji(j,{publicKey:i,fileName:t,baseURL:e,secureSignature:r,secureExpire:n,store:o,signal:a,onProgress:U(St,Z),source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:_,baseCDN:y,checkForUrlDuplicates:x,saveUrlForRecurrentUploads:T}).then(tt=>tt.uuid):j)).then(j=>eo(j,{publicKey:i,baseURL:e,jsonpCallback:w,secureSignature:r,secureExpire:n,signal:a,source:c,integration:u,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m}).then(Z=>new Ni(Z,{baseCDN:y})).then(Z=>(l&&l({isComputable:!0,value:1}),Z)))}var Ie=class{constructor(i){h(this,"_concurrency",1);h(this,"_pending",[]);h(this,"_running",0);h(this,"_resolvers",new Map);h(this,"_rejectors",new Map);this._concurrency=i}_run(){let i=this._concurrency-this._running;for(let t=0;t{this._resolvers.delete(e),this._rejectors.delete(e),this._running-=1,this._run()}).then(o=>r(o)).catch(o=>n(o))}}add(i){return new Promise((t,e)=>{this._resolvers.set(i,t),this._rejectors.set(i,e),this._pending.push(i),this._run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(i){this._concurrency=i,this._run()}get concurrency(){return this._concurrency}};var Hi=()=>({"*blocksRegistry":new Set,"*eventEmitter":null}),Gi=s=>({...Hi(),"*currentActivity":"","*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":()=>{s.set$({"*modalActive":!1,"*currentActivity":""})}}),Me=s=>({...Gi(s),"*commonProgress":0,"*uploadList":[],"*focusedEntry":null,"*uploadMetadata":null,"*uploadQueue":new Ie(1),"*uploadCollection":null,"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set});function Bs(s,i){[...s.querySelectorAll("[l10n]")].forEach(t=>{let e=t.getAttribute("l10n"),r="textContent";if(e.includes(":")){let o=e.split(":");r=o[0],e=o[1]}let n="l10n:"+e;i.__l10nKeys.push(n),i.add(n,e),i.sub(n,o=>{t[r]=i.l10n(o)}),t.removeAttribute("l10n")})}var B=s=>`*cfg/${s}`;var Wi="lr-",C=class extends Nt{constructor(){super();h(this,"requireCtxName",!1);h(this,"allowCustomTemplate",!0);h(this,"activityType",null);h(this,"init$",Hi());h(this,"updateCtxCssData",()=>{It("Using CSS variables for configuration is deprecated. Please use `lr-config` instead. See migration guide: https://uploadcare.com/docs/file-uploader/migration-to-0.25.0/");let t=this.$["*blocksRegistry"];for(let e of t)e.isConnected&&e.updateCssData()});this.addTemplateProcessor(Bs),this.__l10nKeys=[]}l10n(t,e={}){if(!t)return"";let r=this.getCssData("--l10n-"+t,!0)||t,n=xs(r);for(let a of n)e[a.variable]=this.pluralize(a.pluralKey,Number(e[a.countVariable]));return Zt(r,e)}pluralize(t,e){let r=this.l10n("locale-name")||"en-US",n=Se(r,e);return this.l10n(`${t}__${n}`)}emit(t,e,r){let n=this.has("*eventEmitter")&&this.$["*eventEmitter"];n&&n.emit(t,e,r)}applyL10nKey(t,e){let r="l10n:"+t;this.$[r]=e,this.__l10nKeys.push(t)}hasBlockInCtx(t){let e=this.$["*blocksRegistry"];for(let r of e)if(t(r))return!0;return!1}setOrAddState(t,e){this.add$({[t]:e},!0)}setActivity(t){if(this.hasBlockInCtx(e=>e.activityType===t)){this.$["*currentActivity"]=t;return}console.warn(`Activity type "${t}" not found in the context`)}connectedCallback(){let t=this.constructor.className;t&&this.classList.toggle(`${Wi}${t}`,!0),this.hasAttribute("retpl")&&(this.constructor.template=null,this.processInnerHtml=!0),this.requireCtxName?$e({element:this,attribute:"ctx-name",onSuccess:()=>{super.connectedCallback()},onTimeout:()=>{console.error("Attribute `ctx-name` is required and it is not set.")}}):super.connectedCallback(),$t.registerClient(this)}disconnectedCallback(){super.disconnectedCallback(),$t.unregisterClient(this)}initCallback(){this.$["*blocksRegistry"].add(this),this.$["*eventEmitter"]||(this.$["*eventEmitter"]=new Te(this.debugPrint.bind(this)))}destroyCallback(){let t=this.$["*blocksRegistry"];t.delete(this),E.deleteCtx(this),t.size===0&&setTimeout(()=>{this.destroyCtxCallback()},0)}destroyCtxCallback(){E.deleteCtx(this.ctxName)}fileSizeFmt(t,e=2){let r=["B","KB","MB","GB","TB"],n=c=>this.getCssData("--l10n-unit-"+c.toLowerCase(),!0)||c;if(t===0)return`0 ${n(r[0])}`;let o=1024,a=e<0?0:e,l=Math.floor(Math.log(t)/Math.log(o));return parseFloat((t/o**l).toFixed(a))+" "+n(r[l])}proxyUrl(t){let e=this.cfg.secureDeliveryProxy;return e?Zt(e,{previewUrl:t},{transform:r=>window.encodeURIComponent(r)}):t}parseCfgProp(t){return{ctx:this.nodeCtx,name:t.replace("*","")}}get cfg(){if(!this.__cfgProxy){let t=Object.create(null);this.__cfgProxy=new Proxy(t,{set:(e,r,n)=>{if(typeof r!="string")return!1;let o=B(r);return this.$[o]=n,!0},get:(e,r)=>{let n=B(r),o=this.parseCfgProp(n);return o.ctx.has(o.name)?o.ctx.read(o.name):(It("Using CSS variables for configuration is deprecated. Please use `lr-config` instead. See migration guide: https://uploadcare.com/docs/file-uploader/migration-to-0.25.0/"),this.getCssData(`--cfg-${ht(r)}`))}})}return this.__cfgProxy}subConfigValue(t,e){let r=this.parseCfgProp(B(t));r.ctx.has(r.name)?this.sub(B(t),e):(this.bindCssData(`--cfg-${ht(t)}`),this.sub(`--cfg-${ht(t)}`,e))}debugPrint(...t){if(!this.cfg.debug)return;let e=t;if(typeof(t==null?void 0:t[0])=="function"){let r=t[0];e=r()}console.log(`[${this.debugCtxName}]`,...e)}get debugCtxName(){return this.ctxName}static reg(t){if(!t){super.reg();return}super.reg(t.startsWith(Wi)?t:Wi+t)}};h(C,"StateConsumerScope",null),h(C,"className","");var zs="active",te="___ACTIVITY_IS_ACTIVE___",Q=class Q extends C{constructor(){super(...arguments);h(this,"historyTracked",!1);h(this,"init$",Gi(this));h(this,"_debouncedHistoryFlush",k(this._historyFlush.bind(this),10))}_deactivate(){var e;let t=Q._activityRegistry[this.activityKey];this[te]=!1,this.removeAttribute(zs),(e=t==null?void 0:t.deactivateCallback)==null||e.call(t)}_activate(){var e;let t=Q._activityRegistry[this.activityKey];this.$["*historyBack"]=this.historyBack.bind(this),this[te]=!0,this.setAttribute(zs,""),(e=t==null?void 0:t.activateCallback)==null||e.call(t),this._debouncedHistoryFlush(),this.emit($.ACTIVITY_CHANGE,{activity:this.activityType})}initCallback(){super.initCallback(),this.hasAttribute("current-activity")&&this.sub("*currentActivity",t=>{this.setAttribute("current-activity",t)}),this.activityType&&(this.hasAttribute("activity")||this.setAttribute("activity",this.activityType),this.sub("*currentActivity",t=>{this.activityType!==t&&this[te]?this._deactivate():this.activityType===t&&!this[te]&&this._activate(),t||(this.$["*history"]=[])}),this.has("*modalActive")&&this.sub("*modalActive",t=>{!t&&this.activityType===this.$["*currentActivity"]&&(this.$["*currentActivity"]=null)}))}_historyFlush(){let t=this.$["*history"];t&&(t.length>10&&(t=t.slice(t.length-11,t.length-1)),this.historyTracked&&t[t.length-1]!==this.activityType&&t.push(this.activityType),this.$["*history"]=t)}_isActivityRegistered(){return this.activityType&&!!Q._activityRegistry[this.activityKey]}get isActivityActive(){return this[te]}get couldOpenActivity(){return!0}registerActivity(t,e={}){let{onActivate:r,onDeactivate:n}=e;Q._activityRegistry||(Q._activityRegistry=Object.create(null)),Q._activityRegistry[this.activityKey]={activateCallback:r,deactivateCallback:n}}unregisterActivity(){this.isActivityActive&&this._deactivate(),Q._activityRegistry[this.activityKey]=void 0}destroyCallback(){super.destroyCallback(),this._isActivityRegistered()&&this.unregisterActivity(),Object.keys(Q._activityRegistry).length===0&&(this.$["*currentActivity"]=null)}get activityKey(){return this.ctxName+this.activityType}get activityParams(){return this.$["*currentActivityParams"]}get initActivity(){return this.getCssData("--cfg-init-activity")}get doneActivity(){return this.getCssData("--cfg-done-activity")}historyBack(){var e;let t=this.$["*history"];if(t){let r=t.pop();for(;r===this.activityType;)r=t.pop();let n=!!r;if(r){let a=[...this.$["*blocksRegistry"]].find(l=>l.activityType===r);n=(e=a==null?void 0:a.couldOpenActivity)!=null?e:!1}r=n?r:void 0,this.$["*currentActivity"]=r,this.$["*history"]=t,r||this.setOrAddState("*modalActive",!1)}}};h(Q,"_activityRegistry",Object.create(null));var g=Q;g.activities=Object.freeze({START_FROM:"start-from",CAMERA:"camera",DRAW:"draw",UPLOAD_LIST:"upload-list",URL:"url",CONFIRMATION:"confirmation",CLOUD_IMG_EDIT:"cloud-image-edit",EXTERNAL:"external",DETAILS:"details"});var ee=33.333333333333336,b=1,Xi=24,Vs=6;function Ot(s,i){for(let t in i)s.setAttributeNS(null,t,i[t].toString())}function Y(s,i={}){let t=document.createElementNS("http://www.w3.org/2000/svg",s);return Ot(t,i),t}function js(s,i,t){let{x:e,y:r,width:n,height:o}=s,a=i.includes("w")?0:1,l=i.includes("n")?0:1,c=[-1,1][a],u=[-1,1][l],d=[e+a*n+1.5*c,r+l*o+1.5*u-24*t*u],p=[e+a*n+1.5*c,r+l*o+1.5*u],m=[e+a*n-24*t*c+1.5*c,r+l*o+1.5*u];return{d:`M ${d[0]} ${d[1]} L ${p[0]} ${p[1]} L ${m[0]} ${m[1]}`,center:p}}function Hs(s,i,t){let{x:e,y:r,width:n,height:o}=s,a=["n","s"].includes(i)?.5:{w:0,e:1}[i],l=["w","e"].includes(i)?.5:{n:0,s:1}[i],c=[-1,1][a],u=[-1,1][l],d,p;["n","s"].includes(i)?(d=[e+a*n-34*t/2,r+l*o+1.5*u],p=[e+a*n+34*t/2,r+l*o+1.5*u]):(d=[e+a*n+1.5*c,r+l*o-34*t/2],p=[e+a*n+1.5*c,r+l*o+34*t/2]);let m=`M ${d[0]} ${d[1]} L ${p[0]} ${p[1]}`,f=[p[0]-(p[0]-d[0])/2,p[1]-(p[1]-d[1])/2];return{d:m,center:f}}function Gs(s){return s===""?"move":["e","w"].includes(s)?"ew-resize":["n","s"].includes(s)?"ns-resize":["nw","se"].includes(s)?"nwse-resize":"nesw-resize"}function Ws({rect:s,delta:[i,t],imageBox:e}){return zt({...s,x:s.x+i,y:s.y+t},e)}function zt(s,i){let{x:t}=s,{y:e}=s;return s.xi.x+i.width&&(t=i.x+i.width-s.width),s.yi.y+i.height&&(e=i.y+i.height-s.height),{...s,x:t,y:e}}function To({rect:s,delta:i,aspectRatio:t,imageBox:e}){let[,r]=i,{y:n,width:o,height:a}=s;n+=r,a-=r,t&&(o=a*t);let l=s.x+s.width/2-o/2;return n<=e.y&&(n=e.y,a=s.y+s.height-n,t&&(o=a*t,l=s.x+s.width/2-o/2)),l<=e.x&&(l=e.x,n=s.y+s.height-a),l+o>=e.x+e.width&&(l=Math.max(e.x,e.x+e.width-o),o=e.x+e.width-l,t&&(a=o/t),n=s.y+s.height-a),a=e.y+e.height&&(l=Math.max(e.y,e.y+e.height-a),a=e.y+e.height-l,t&&(o=a*t),n=s.x+s.width-o),a=e.y+e.height&&(a=e.y+e.height-n,t&&(o=a*t),l=s.x+s.width/2-o/2),l<=e.x&&(l=e.x,n=s.y),l+o>=e.x+e.width&&(l=Math.max(e.x,e.x+e.width-o),o=e.x+e.width-l,t&&(a=o/t),n=s.y),a=e.x+e.width&&(o=e.x+e.width-n,t&&(a=o/t),l=s.y+s.height/2-a/2),l<=e.y&&(l=e.y,n=s.x),l+a>=e.y+e.height&&(l=Math.max(e.y,e.y+e.height-a),a=e.y+e.height-l,t&&(o=a*t),n=s.x),at?(n=l/t-c,c+=n,a-=n,a<=e.y&&(c=c-(e.y-a),l=c*t,o=s.x+s.width-l,a=e.y)):t&&(r=c*t-l,l=l+r,o-=r,o<=e.x&&(l=l-(e.x-o),c=l/t,o=e.x,a=s.y+s.height-c)),ce.x+e.width&&(r=e.x+e.width-o-l),a+nt?(n=l/t-c,c+=n,a-=n,a<=e.y&&(c=c-(e.y-a),l=c*t,o=s.x,a=e.y)):t&&(r=c*t-l,l+=r,o+l>=e.x+e.width&&(l=e.x+e.width-o,c=l/t,o=e.x+e.width-l,a=s.y+s.height-c)),ce.y+e.height&&(n=e.y+e.height-a-c),o+=r,l-=r,c+=n,t&&Math.abs(l/c)>t?(n=l/t-c,c+=n,a+c>=e.y+e.height&&(c=e.y+e.height-a,l=c*t,o=s.x+s.width-l,a=e.y+e.height-c)):t&&(r=c*t-l,l+=r,o-=r,o<=e.x&&(l=l-(e.x-o),c=l/t,o=e.x,a=s.y)),ce.x+e.width&&(r=e.x+e.width-o-l),a+c+n>e.y+e.height&&(n=e.y+e.height-a-c),l+=r,c+=n,t&&Math.abs(l/c)>t?(n=l/t-c,c+=n,a+c>=e.y+e.height&&(c=e.y+e.height-a,l=c*t,o=s.x,a=e.y+e.height-c)):t&&(r=c*t-l,l+=r,o+l>=e.x+e.width&&(l=e.x+e.width-o,c=l/t,o=e.x+e.width-l,a=s.y)),c=i.x&&s.y>=i.y&&s.x+s.width<=i.x+i.width&&s.y+s.height<=i.y+i.height}function Ys(s,i){return Math.abs(s.width/s.height-i)<.1}function Vt({width:s,height:i},t){let e=t/90%2!==0;return{width:e?i:s,height:e?s:i}}function Js(s,i,t){let e=s/i,r,n;e>t?(r=Math.round(i*t),n=i):(r=s,n=Math.round(s/t));let o=Math.round((s-r)/2),a=Math.round((i-n)/2);return o+r>s&&(r=s-o),a+n>i&&(n=i-a),{x:o,y:a,width:r,height:n}}function jt(s){return{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}}function vt(s,i,t){return Math.min(Math.max(s,i),t)}var De=s=>{if(!s)return[];let[i,t]=s.split(":").map(Number);if(!Number.isFinite(i)||!Number.isFinite(t)){console.error(`Invalid crop preset: ${s}`);return}return[{type:"aspect-ratio",width:i,height:t}]};var G=Object.freeze({LOCAL:"local",DROP_AREA:"drop-area",URL_TAB:"url-tab",CAMERA:"camera",EXTERNAL:"external",API:"js-api"});var Zs=s=>s?s.split(",").map(i=>i.trim()):[],Ht=s=>s?s.join(","):"";var Fe="blocks",Be="0.36.0";function Qs(s){return Di({...s,libraryName:Fe,libraryVersion:Be})}var tr=({type:s,message:i,...t})=>({type:s,message:i,...t}),Pt=tr,ze=tr;var er=s=>{if(typeof s!="string"||!s)return"";let i=s.trim();return i.startsWith("-/")?i=i.slice(2):i.startsWith("/")&&(i=i.slice(1)),i.endsWith("/")&&(i=i.slice(0,i.length-1)),i},Ve=(...s)=>s.filter(i=>typeof i=="string"&&i).map(i=>er(i)).join("/-/"),R=(...s)=>{let i=Ve(...s);return i?`-/${i}/`:""};function ir(s){let i=new URL(s),t=i.pathname+i.search+i.hash,e=t.lastIndexOf("http"),r=t.lastIndexOf("/"),n="";return e>=0?n=t.slice(e):r>=0&&(n=t.slice(r+1)),n}function sr(s){let i=new URL(s),{pathname:t}=i,e=t.indexOf("/"),r=t.indexOf("/",e+1);return t.substring(e+1,r)}function rr(s){let i=nr(s),t=new URL(i),e=t.pathname.indexOf("/-/");return e===-1?[]:t.pathname.substring(e).split("/-/").filter(Boolean).map(n=>er(n))}function nr(s){let i=new URL(s),t=ir(s),e=or(t)?ar(t).pathname:t;return i.pathname=i.pathname.replace(e,""),i.search="",i.hash="",i.toString()}function or(s){return s.startsWith("http")}function ar(s){let i=new URL(s);return{pathname:i.origin+i.pathname||"",search:i.search||"",hash:i.hash||""}}var O=(s,i,t)=>{let e=new URL(nr(s));if(t=t||ir(s),e.pathname.startsWith("//")&&(e.pathname=e.pathname.replace("//","/")),or(t)){let r=ar(t);e.pathname=e.pathname+(i||"")+(r.pathname||""),e.search=r.search,e.hash=r.hash}else e.pathname=e.pathname+(i||"")+(t||"");return e.toString()},Ct=(s,i)=>{let t=new URL(s);return t.pathname=i+"/",t.toString()};var M=(s,i=",")=>s.trim().split(i).map(t=>t.trim()).filter(t=>t.length>0);var je=["image/*","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/avif","image/avif-sequence",".heif",".heifs",".heic",".heics",".avif",".avifs"],qi=s=>s?s.filter(i=>typeof i=="string").map(i=>M(i)).flat():[],Ki=(s,i)=>i.some(t=>t.endsWith("*")?(t=t.replace("*",""),s.startsWith(t)):s===t),lr=(s,i)=>i.some(t=>t.startsWith(".")?s.toLowerCase().endsWith(t.toLowerCase()):!1),ie=s=>{let i=s==null?void 0:s.type;return i?Ki(i,je):!1};var it=1e3,Lt=Object.freeze({AUTO:"auto",BYTE:"byte",KB:"kb",MB:"mb",GB:"gb",TB:"tb",PB:"pb"}),se=s=>Math.ceil(s*100)/100,cr=(s,i=Lt.AUTO)=>{let t=i===Lt.AUTO;if(i===Lt.BYTE||t&&s(e[r]=i[r].value,e),{}),this.__data=E.registerCtx(this.__schema,this.__ctxId)}get uid(){return this.__ctxId}setValue(i,t){if(!this.__typedSchema.hasOwnProperty(i)){console.warn(hr+i);return}let e=this.__typedSchema[i];if((t==null?void 0:t.constructor)===e.type||t instanceof e.type||e.nullable&&t===null){this.__data.pub(i,t);return}console.warn(Uo+i)}setMultipleValues(i){for(let t in i)this.setValue(t,i[t])}getValue(i){if(!this.__typedSchema.hasOwnProperty(i)){console.warn(hr+i);return}return this.__data.read(i)}subscribe(i,t){return this.__data.sub(i,t)}remove(){E.deleteCtx(this.__ctxId)}};var Ge=class{constructor(i){this.__typedSchema=i.typedSchema,this.__ctxId=i.ctxName||Yt.generate(),this.__data=E.registerCtx({},this.__ctxId),this.__watchList=i.watchList||[],this.__subsMap=Object.create(null),this.__propertyObservers=new Set,this.__collectionObservers=new Set,this.__items=new Set,this.__removed=new Set,this.__added=new Set;let t=Object.create(null);this.__notifyObservers=(e,r)=>{this.__observeTimeout&&window.clearTimeout(this.__observeTimeout),t[e]||(t[e]=new Set),t[e].add(r),this.__observeTimeout=window.setTimeout(()=>{Object.keys(t).length!==0&&(this.__propertyObservers.forEach(n=>{n({...t})}),t=Object.create(null))})}}notify(){this.__notifyTimeout&&window.clearTimeout(this.__notifyTimeout),this.__notifyTimeout=window.setTimeout(()=>{let i=new Set(this.__added),t=new Set(this.__removed);this.__added.clear(),this.__removed.clear();for(let e of this.__collectionObservers)e==null||e([...this.__items],i,t)})}observeCollection(i){return this.__collectionObservers.add(i),this.__items.size>0&&this.notify(),()=>{this.unobserveCollection(i)}}unobserveCollection(i){var t;(t=this.__collectionObservers)==null||t.delete(i)}add(i){let t=new He(this.__typedSchema);for(let e in i)t.setValue(e,i[e]);return this.__items.add(t.uid),this.notify(),this.__data.add(t.uid,t),this.__added.add(t),this.__watchList.forEach(e=>{this.__subsMap[t.uid]||(this.__subsMap[t.uid]=[]),this.__subsMap[t.uid].push(t.subscribe(e,()=>{this.__notifyObservers(e,t.uid)}))}),t.uid}read(i){return this.__data.read(i)}readProp(i,t){return this.read(i).getValue(t)}publishProp(i,t,e){this.read(i).setValue(t,e)}remove(i){this.__removed.add(this.__data.read(i)),this.__items.delete(i),this.notify(),this.__data.pub(i,null),delete this.__subsMap[i]}clearAll(){this.__items.forEach(i=>{this.remove(i)})}observeProperties(i){return this.__propertyObservers.add(i),()=>{this.unobserveProperties(i)}}unobserveProperties(i){var t;(t=this.__propertyObservers)==null||t.delete(i)}findItems(i){let t=[];return this.__items.forEach(e=>{let r=this.read(e);i(r)&&t.push(e)}),t}items(){return[...this.__items]}get size(){return this.__items.size}destroy(){E.deleteCtx(this.__ctxId),this.__propertyObservers=null,this.__collectionObservers=null;for(let i in this.__subsMap)this.__subsMap[i].forEach(t=>{t.remove()}),delete this.__subsMap[i]}};var ur=s=>{let i=new Map;return(...t)=>{let e=JSON.stringify(t);if(i.has(e))return i.get(e);let r=s(...t);return i.set(e,r),r}};function Ro(s){let i=!1;return setTimeout(()=>{i=!0},0),e=>(...r)=>(i&&It(s),e(...r))}function dr(s){let i={progress:()=>s.$["*commonProgress"],errors:()=>s.$["*collectionErrors"],group:()=>s.$["*groupInfo"],totalCount:()=>s.uploadCollection.size,failedCount:()=>t.failedEntries.length,successCount:()=>t.successEntries.length,uploadingCount:()=>t.uploadingEntries.length,status:()=>t.isFailed?"failed":t.isUploading?"uploading":t.isSuccess?"success":"idle",isSuccess:()=>t.errors.length===0&&t.successEntries.length===t.allEntries.length,isUploading:()=>t.allEntries.some(r=>r.status==="uploading"),isFailed:()=>t.errors.length>0||t.failedEntries.length>0,allEntries:()=>s.getOutputData(),successEntries:()=>t.allEntries.filter(r=>r.status==="success"),failedEntries:()=>t.allEntries.filter(r=>r.status==="failed"),uploadingEntries:()=>t.allEntries.filter(r=>r.status==="uploading"),idleEntries:()=>t.allEntries.filter(r=>r.status==="idle")},t={},e=Ro("You're trying to access the OutputCollectionState asynchronously. In this case, the data you retrieve will be newer than it was when the OutputCollectionState was created or when the event was dispatched. If you want to retain the state at a specific moment in time, you should use the spread operator like this: `{...outputCollectionState}` or `{...e.detail}`");for(let[r,n]of Object.entries(i)){let o=r,l=ur(e(n));Object.defineProperty(t,o,{get:l,enumerable:!0})}return t}var pr=Object.freeze({file:{type:File,value:null},externalUrl:{type:String,value:null},fileName:{type:String,value:null,nullable:!0},fileSize:{type:Number,value:null,nullable:!0},lastModified:{type:Number,value:Date.now()},uploadProgress:{type:Number,value:0},uuid:{type:String,value:null},isImage:{type:Boolean,value:!1},mimeType:{type:String,value:null,nullable:!0},ctxName:{type:String,value:null},cdnUrl:{type:String,value:null},cdnUrlModifiers:{type:String,value:null},fileInfo:{type:dt,value:null},isUploading:{type:Boolean,value:!1},abortController:{type:AbortController,value:null,nullable:!0},thumbUrl:{type:String,value:null,nullable:!0},silent:{type:Boolean,value:!1},source:{type:String,value:!1,nullable:!0},fullPath:{type:String,value:null,nullable:!0},metadata:{type:Object,value:null,nullable:!0},errors:{type:Array,value:[]},uploadError:{type:Error,value:null,nullable:!0},isRemoved:{type:Boolean,value:!1}});var Mo=/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i,No=new RegExp(`^/?(${Mo.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`,"i"),fr=({url:s,cdnBase:i})=>{let t=new URL(i),e=new URL(s);if(t.host!==e.host)return null;let[,r,n,o]=No.exec(e.pathname);return{uuid:r,cdnUrlModifiers:n||"",filename:o||null}};var A=class s extends g{constructor(){super(...arguments);h(this,"couldBeCtxOwner",!1);h(this,"isCtxOwner",!1);h(this,"init$",Me(this));h(this,"__initialUploadMetadata",null);h(this,"_fileValidators",[this._validateIsImage.bind(this),this._validateFileType.bind(this),this._validateMaxSizeLimit.bind(this),this._validateUploadError.bind(this)]);h(this,"_collectionValidators",[t=>{let e=t.size,r=this.cfg.multiple?this.cfg.multipleMin:0,n=this.cfg.multiple?this.cfg.multipleMax:1;if(r&&en){let o=this.l10n("files-count-limit-error-too-many",{min:r,max:n,total:e});return ze({type:"TOO_MANY_FILES",message:o,total:e,min:r,max:n})}},t=>{if(t.items().some(e=>t.readProp(e,"errors").length>0))return ze({type:"SOME_FILES_HAS_ERRORS",message:this.l10n("some-files-were-not-uploaded")})}]);h(this,"uploadAll",()=>{let t=this.uploadCollection.items().filter(e=>{let r=this.uploadCollection.read(e);return!r.getValue("isRemoved")&&!r.getValue("isUploading")&&!r.getValue("fileInfo")});t.length!==0&&(this.$["*uploadTrigger"]=new Set(t),this.emit($.COMMON_UPLOAD_START,this.getOutputCollectionState()))});h(this,"_flushOutputItems",k(async()=>{if(this.getOutputData().length!==this.uploadCollection.size)return;let e=this.getOutputCollectionState();this.$["*collectionState"]=e,this.emit($.CHANGE,()=>this.getOutputCollectionState(),{debounce:!0}),this.cfg.groupOutput&&e.totalCount>0&&e.status==="success"&&this._createGroup(e)},300));h(this,"_handleCollectionUpdate",(t,e,r)=>{var n;(e.size||r.size)&&(this.$["*groupInfo"]=null),this._runFileValidators(),this._runCollectionValidators();for(let o of e)o.getValue("silent")||this.emit($.FILE_ADDED,this.getOutputItem(o.uid));for(let o of r)this.$["*uploadTrigger"].delete(o.uid),(n=o.getValue("abortController"))==null||n.abort(),o.setMultipleValues({isRemoved:!0,abortController:null,isUploading:!1,uploadProgress:0}),URL.revokeObjectURL(o==null?void 0:o.getValue("thumbUrl")),this.emit($.FILE_REMOVED,this.getOutputItem(o.uid));this.$["*uploadList"]=t.map(o=>({uid:o})),this._flushCommonUploadProgress(),this._flushOutputItems()});h(this,"_handleCollectionPropertiesUpdate",t=>{this._flushOutputItems();let e=this.uploadCollection,r=[...new Set(Object.entries(t).filter(([n])=>["uploadError","fileInfo"].includes(n)).map(([,n])=>[...n]).flat())];if(r.length>0&&setTimeout(()=>{this._runFileValidators(r)}),t.uploadProgress){for(let n of t.uploadProgress){let{isUploading:o,silent:a}=E.getCtx(n).store;o&&!a&&this.emit($.FILE_UPLOAD_PROGRESS,this.getOutputItem(n))}this._flushCommonUploadProgress()}if(t.isUploading)for(let n of t.isUploading){let{isUploading:o,silent:a}=E.getCtx(n).store;o&&!a&&this.emit($.FILE_UPLOAD_START,this.getOutputItem(n))}if(t.fileInfo){for(let a of t.fileInfo){let{fileInfo:l,silent:c}=E.getCtx(a).store;l&&!c&&this.emit($.FILE_UPLOAD_SUCCESS,this.getOutputItem(a))}this.cfg.cropPreset&&this.setInitialCrop();let n=e.findItems(a=>!!a.getValue("fileInfo"));e.findItems(a=>a.getValue("errors").length>0).length===0&&e.size===n.length&&this.emit($.COMMON_UPLOAD_SUCCESS,this.getOutputCollectionState())}if(t.errors)for(let n of t.errors){let{errors:o}=E.getCtx(n).store;o.length>0&&(this.emit($.FILE_UPLOAD_FAILED,this.getOutputItem(n)),this.emit($.COMMON_UPLOAD_FAILED,()=>this.getOutputCollectionState(),{debounce:!0}))}t.cdnUrl&&([...t.cdnUrl].filter(o=>{var a;return!!((a=this.uploadCollection.read(o))!=null&&a.getValue("cdnUrl"))}).forEach(o=>{this.emit($.FILE_URL_CHANGED,this.getOutputItem(o))}),this.$["*groupInfo"]=null)});h(this,"_flushCommonUploadProgress",()=>{let t=0,r=[...this.$["*uploadTrigger"]].filter(o=>!!this.uploadCollection.read(o));r.forEach(o=>{let a=this.uploadCollection.readProp(o,"uploadProgress");t+=a});let n=r.length?Math.round(t/r.length):0;this.$["*commonProgress"]!==n&&(this.$["*commonProgress"]=n,this.emit($.COMMON_UPLOAD_PROGRESS,this.getOutputCollectionState()))})}setUploadMetadata(t){It("setUploadMetadata is deprecated. Use `metadata` instance property on `lr-config` block instead. See migration guide: https://uploadcare.com/docs/file-uploader/migration-to-0.25.0/"),this.connectedOnce?this.$["*uploadMetadata"]=t:this.__initialUploadMetadata=t}get hasCtxOwner(){return this.hasBlockInCtx(t=>t instanceof s?t.isCtxOwner&&t.isConnected&&t!==this:!1)}initCallback(){if(super.initCallback(),!this.$["*uploadCollection"]){let t=new Ge({typedSchema:pr,watchList:["uploadProgress","uploadError","fileInfo","errors","cdnUrl","isUploading"]});this.$["*uploadCollection"]=t}!this.hasCtxOwner&&this.couldBeCtxOwner&&this.initCtxOwner()}destroyCtxCallback(){var t,e;(t=this._unobserveCollectionProperties)==null||t.call(this),(e=this._unobserveCollection)==null||e.call(this),this.uploadCollection.destroy(),this.$["*uploadCollection"]=null,super.destroyCtxCallback()}initCtxOwner(){this.isCtxOwner=!0,this._unobserveCollection=this.uploadCollection.observeCollection(this._handleCollectionUpdate),this._unobserveCollectionProperties=this.uploadCollection.observeProperties(this._handleCollectionPropertiesUpdate);let t=()=>{this._runFileValidators(),this._runCollectionValidators()};this.subConfigValue("maxLocalFileSizeBytes",t),this.subConfigValue("multipleMin",t),this.subConfigValue("multipleMax",t),this.subConfigValue("multiple",t),this.subConfigValue("imgOnly",t),this.subConfigValue("accept",t),this.subConfigValue("maxConcurrentRequests",e=>{this.$["*uploadQueue"].concurrency=Number(e)||1}),this.__initialUploadMetadata&&(this.$["*uploadMetadata"]=this.__initialUploadMetadata)}addFileFromUrl(t,{silent:e,fileName:r,source:n}={}){let o=this.uploadCollection.add({externalUrl:t,fileName:r!=null?r:null,silent:e!=null?e:!1,source:n!=null?n:G.API});return this.getOutputItem(o)}addFileFromUuid(t,{silent:e,fileName:r,source:n}={}){let o=this.uploadCollection.add({uuid:t,fileName:r!=null?r:null,silent:e!=null?e:!1,source:n!=null?n:G.API});return this.getOutputItem(o)}addFileFromCdnUrl(t,{silent:e,fileName:r,source:n}={}){var l;let o=fr({url:t,cdnBase:this.cfg.cdnCname});if(!o)throw new Error("Invalid CDN URL");let a=this.uploadCollection.add({uuid:o.uuid,cdnUrl:t,cdnUrlModifiers:o.cdnUrlModifiers,fileName:(l=r!=null?r:o.filename)!=null?l:null,silent:e!=null?e:!1,source:n!=null?n:G.API});return this.getOutputItem(a)}addFileFromObject(t,{silent:e,fileName:r,source:n,fullPath:o}={}){let a=this.uploadCollection.add({file:t,isImage:ie(t),mimeType:t.type,fileName:r!=null?r:t.name,fileSize:t.size,silent:e!=null?e:!1,source:n!=null?n:G.API,fullPath:o!=null?o:null});return this.getOutputItem(a)}addFiles(t){return console.warn("`addFiles` method is deprecated. Please use `addFileFromObject`, `addFileFromUrl` or `addFileFromUuid` instead."),t.map(e=>{let r=this.uploadCollection.add({file:e,isImage:ie(e),mimeType:e.type,fileName:e.name,fileSize:e.size});return this.getOutputItem(r)})}removeFileByInternalId(t){if(!this.uploadCollection.read(t))throw new Error(`File with internalId ${t} not found`);this.uploadCollection.remove(t)}removeAllFiles(){this.uploadCollection.clearAll()}openSystemDialog(t={}){var r;let e=Ht(qi([(r=this.cfg.accept)!=null?r:"",...this.cfg.imgOnly?je:[]]));this.cfg.accept&&this.cfg.imgOnly&&console.warn("There could be a mistake.\nBoth `accept` and `imgOnly` parameters are set.\nThe value of `accept` will be concatenated with the internal image mime types list."),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.multiple=this.cfg.multiple,t.captureCamera?(this.fileInput.capture=this.cfg.cameraCapture,this.fileInput.accept="image/*"):this.fileInput.accept=e,this.fileInput.dispatchEvent(new MouseEvent("click")),this.fileInput.onchange=()=>{[...this.fileInput.files].forEach(n=>this.addFileFromObject(n,{source:t.captureCamera?G.CAMERA:G.LOCAL})),this.$["*currentActivity"]=g.activities.UPLOAD_LIST,this.setOrAddState("*modalActive",!0),this.fileInput.value="",this.fileInput=null}}get sourceList(){let t=[];return this.cfg.sourceList&&(t=M(this.cfg.sourceList)),t}initFlow(t=!1){var e;if(this.uploadCollection.size>0&&!t)this.set$({"*currentActivity":g.activities.UPLOAD_LIST}),this.setOrAddState("*modalActive",!0);else if(((e=this.sourceList)==null?void 0:e.length)===1){let r=this.sourceList[0];if(r==="local"){this.$["*currentActivity"]=g.activities.UPLOAD_LIST,this==null||this.openSystemDialog();return}let n=this.$["*blocksRegistry"],o=l=>"type"in l&&l.type===r,a=[...n].find(o);a==null||a.activate(),this.$["*currentActivity"]&&this.setOrAddState("*modalActive",!0)}else this.set$({"*currentActivity":g.activities.START_FROM}),this.setOrAddState("*modalActive",!0)}doneFlow(){this.set$({"*currentActivity":this.doneActivity,"*history":this.doneActivity?[this.doneActivity]:[]}),this.$["*currentActivity"]||this.setOrAddState("*modalActive",!1)}get uploadCollection(){return this.$["*uploadCollection"]}_validateFileType(t){let e=this.cfg.imgOnly,r=this.cfg.accept,n=qi([...e?je:[],r]);if(!n.length)return;let o=t.mimeType,a=t.name;if(!o||!a)return;let l=Ki(o,n),c=lr(a,n);if(!l&&!c)return Pt({type:"FORBIDDEN_FILE_TYPE",message:this.l10n("file-type-not-allowed"),entry:t})}_validateMaxSizeLimit(t){let e=this.cfg.maxLocalFileSizeBytes,r=t.size;if(e&&r&&r>e)return Pt({type:"FILE_SIZE_EXCEEDED",message:this.l10n("files-max-size-limit-error",{maxFileSize:cr(e)}),entry:t})}_validateUploadError(t,e){let r=e==null?void 0:e.getValue("uploadError");if(r){if(r instanceof F)return Pt({type:"UPLOAD_ERROR",message:r.message,entry:t,error:r});if(r instanceof Dt)return Pt({type:"NETWORK_ERROR",message:r.message,entry:t,error:r});{let n=r instanceof Error?r:new Error("Unknown error",{cause:r});return Pt({type:"UNKNOWN_ERROR",message:n.message,entry:t,error:n})}}}_validateIsImage(t){let e=this.cfg.imgOnly,r=t.isImage;if(!(!e||r)&&!(!t.fileInfo&&t.externalUrl)&&!(!t.fileInfo&&!t.mimeType))return Pt({type:"NOT_AN_IMAGE",message:this.l10n("images-only-accepted"),entry:t})}_runFileValidatorsForEntry(t){let e=this.getOutputItem(t.uid),r=[];for(let n of this._fileValidators){let o=n(e,t);o&&r.push(o)}t.setValue("errors",r)}_runFileValidators(t){let e=t!=null?t:this.uploadCollection.items();for(let r of e){let n=this.uploadCollection.read(r);n&&this._runFileValidatorsForEntry(n)}}_runCollectionValidators(){let t=this.uploadCollection,e=[];for(let r of this._collectionValidators){let n=r(t);n&&(Array.isArray(n)?e.push(...n):e.push(n))}this.$["*collectionErrors"]=e,e.length>0&&this.emit($.COMMON_UPLOAD_FAILED,()=>this.getOutputCollectionState(),{debounce:!0})}async _createGroup(t){let e=this.getUploadClientOptions(),r=t.allEntries.map(l=>l.uuid+(l.cdnUrlModifiers?`/${l.cdnUrlModifiers}`:"")),n=new AbortController,o=await Fs(r,{...e,signal:n.signal});if(this.$["*collectionState"]!==t){n.abort();return}this.$["*groupInfo"]=o;let a=this.getOutputCollectionState();this.emit($.GROUP_CREATED,a),this.emit($.CHANGE,()=>this.getOutputCollectionState(),{debounce:!0}),this.$["*collectionState"]=a}setInitialCrop(){let t=De(this.cfg.cropPreset);if(t){let[e]=t,r=this.uploadCollection.findItems(n=>{var o;return n.getValue("fileInfo")&&n.getValue("isImage")&&!((o=n.getValue("cdnUrlModifiers"))!=null&&o.includes("/crop/"))}).map(n=>this.uploadCollection.read(n));for(let n of r){let o=n.getValue("fileInfo"),{width:a,height:l}=o.imageInfo,c=e.width/e.height,u=Js(a,l,c),d=R(`crop/${u.width}x${u.height}/${u.x},${u.y}`,"preview");n.setMultipleValues({cdnUrlModifiers:d,cdnUrl:O(n.getValue("cdnUrl"),d)}),this.uploadCollection.size===1&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(p=>p.activityType===g.activities.CLOUD_IMG_EDIT)&&(this.$["*focusedEntry"]=n,this.$["*currentActivity"]=g.activities.CLOUD_IMG_EDIT)}}}async getMetadataFor(t){var r;let e=(r=this.cfg.metadata)!=null?r:this.$["*uploadMetadata"];if(typeof e=="function"){let n=this.getOutputItem(t);return await e(n)}return e}getUploadClientOptions(){return{store:this.cfg.store,publicKey:this.cfg.pubkey,baseCDN:this.cfg.cdnCname,baseURL:this.cfg.baseUrl,userAgent:Qs,integration:this.cfg.userAgentIntegration,secureSignature:this.cfg.secureSignature,secureExpire:this.cfg.secureExpire,retryThrottledRequestMaxTimes:this.cfg.retryThrottledRequestMaxTimes,multipartMinFileSize:this.cfg.multipartMinFileSize,multipartChunkSize:this.cfg.multipartChunkSize,maxConcurrentRequests:this.cfg.multipartMaxConcurrentRequests,multipartMaxAttempts:this.cfg.multipartMaxAttempts,checkForUrlDuplicates:!!this.cfg.checkForUrlDuplicates,saveUrlForRecurrentUploads:!!this.cfg.saveUrlForRecurrentUploads}}getOutputItem(t){var a,l,c,u,d,p,m,f,_,y;let e=E.getCtx(t).store,r=e.fileInfo,n=e.isRemoved?"removed":e.errors.length>0?"failed":e.fileInfo?"success":e.isUploading?"uploading":"idle";return{uuid:(l=(a=r==null?void 0:r.uuid)!=null?a:e.uuid)!=null?l:null,internalId:t,name:(c=r==null?void 0:r.originalFilename)!=null?c:e.fileName,size:(u=r==null?void 0:r.size)!=null?u:e.fileSize,isImage:(d=r==null?void 0:r.isImage)!=null?d:e.isImage,mimeType:(p=r==null?void 0:r.mimeType)!=null?p:e.mimeType,file:e.file,externalUrl:e.externalUrl,cdnUrlModifiers:e.cdnUrlModifiers,cdnUrl:(f=(m=e.cdnUrl)!=null?m:r==null?void 0:r.cdnUrl)!=null?f:null,fullPath:e.fullPath,uploadProgress:e.uploadProgress,fileInfo:r!=null?r:null,metadata:(y=(_=e.metadata)!=null?_:r==null?void 0:r.metadata)!=null?y:null,isSuccess:n==="success",isUploading:n==="uploading",isFailed:n==="failed",isRemoved:n==="removed",errors:e.errors,status:n}}getOutputData(t){return(t?this.uploadCollection.findItems(t):this.uploadCollection.items()).map(n=>this.getOutputItem(n))}getOutputCollectionState(){return dr(this)}};A.extSrcList=Object.freeze({FACEBOOK:"facebook",DROPBOX:"dropbox",GDRIVE:"gdrive",GPHOTOS:"gphotos",INSTAGRAM:"instagram",FLICKR:"flickr",VK:"vk",EVERNOTE:"evernote",BOX:"box",ONEDRIVE:"onedrive",HUDDLE:"huddle"});A.sourceTypes=Object.freeze({LOCAL:"local",URL:"url",CAMERA:"camera",DRAW:"draw",...A.extSrcList});var q=Object.freeze({brightness:0,exposure:0,gamma:100,contrast:0,saturation:0,vibrance:0,warmth:0,enhance:0,filter:0,rotate:0,mirror:!1,flip:!1,crop:void 0}),gr=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function Do(s,i){if(typeof i=="number"){let t=i;return q[s]!==t?`${s}/${t}`:""}if(typeof i=="boolean"){let t=i;return q[s]!==t?`${s}`:""}if(s==="filter"&&i){let{name:t,amount:e}=i;return q.filter===e?"":`${s}/${t}/${e}`}if(s==="crop"&&i){let{dimensions:t,coords:e}=i;return`${s}/${t.join("x")}/${e.join(",")}`}return""}function wt(s){return Ve(...gr.filter(i=>typeof s[i]!="undefined"&&s[i]!==null).map(i=>{let t=s[i];return Do(i,t)}).filter(i=>!!i))}var We=Ve("format/auto","progressive/yes"),ft=([s])=>typeof s!="undefined"?Number(s):void 0,mr=()=>!0,Fo=([s,i])=>({name:s,amount:typeof i!="undefined"?Number(i):100}),Bo=([s,i])=>{if(!/\d+x\d+/.test(s)||!/\d+,\d+/.test(i))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:M(s,"x").map(Number),coords:M(i).map(Number)}},zo=Object.freeze({enhance:ft,brightness:ft,exposure:ft,gamma:ft,contrast:ft,saturation:ft,vibrance:ft,warmth:ft,filter:Fo,mirror:mr,flip:mr,rotate:ft,crop:Bo});function _r(s){let i={};for(let t of s){let[e,...r]=t.split("/");if(!gr.includes(e))continue;let n=e,o=zo[n];try{let a=o(r);i[n]=a}catch(a){console.warn([`Failed to parse URL operation "${t}". It will be ignored.`,a instanceof Error?`Error message: "${a.message}"`:a,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join(` `))}}return i}var P=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),W=[P.CROP,P.TUNING,P.FILTERS],br=["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"],yr=["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"],vr=["rotate","mirror","flip"],st=Object.freeze({brightness:{zero:q.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:q.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:q.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:q.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:q.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:q.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:q.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:q.enhance,range:[0,100],keypointsNumber:1},filter:{zero:q.filter,range:[0,100],keypointsNumber:1}});var Vo="https://ucarecdn.com",jo="https://upload.uploadcare.com",Ho="https://social.uploadcare.com",Et={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",cloudImageEditorTabs:Ht(W),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:Vo,baseUrl:jo,socialBaseUrl:Ho,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:1,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null};var D=s=>String(s),rt=s=>{let i=Number(s);if(Number.isNaN(i))throw new Error(`Invalid number: "${s}"`);return i},I=s=>{if(typeof s=="undefined"||s===null)return!1;if(typeof s=="boolean")return s;if(s==="true"||s==="")return!0;if(s==="false")return!1;throw new Error(`Invalid boolean: "${s}"`)},Go=s=>s==="auto"?s:I(s),Wo=s=>{let i=D(s);if(i!=="user"&&i!=="environment"&&i!=="")throw new Error(`Invalid "cameraCapture" value: "${i}"`);return i},Xo={pubkey:D,multiple:I,multipleMin:rt,multipleMax:rt,confirmUpload:I,imgOnly:I,accept:D,externalSourcesPreferredTypes:D,store:Go,cameraMirror:I,cameraCapture:Wo,sourceList:D,maxLocalFileSizeBytes:rt,thumbSize:rt,showEmptyList:I,useLocalImageEditor:I,useCloudImageEditor:I,cloudImageEditorTabs:D,removeCopyright:I,cropPreset:D,imageShrink:D,modalScrollLock:I,modalBackdropStrokes:I,sourceListWrap:I,remoteTabSessionKey:D,cdnCname:D,baseUrl:D,socialBaseUrl:D,secureSignature:D,secureExpire:D,secureDeliveryProxy:D,retryThrottledRequestMaxTimes:rt,multipartMinFileSize:rt,multipartChunkSize:rt,maxConcurrentRequests:rt,multipartMaxConcurrentRequests:rt,multipartMaxAttempts:rt,checkForUrlDuplicates:I,saveUrlForRecurrentUploads:I,groupOutput:I,userAgentIntegration:D,debug:I},Cr=(s,i)=>{if(!(typeof i=="undefined"||i===null))try{return Xo[s](i)}catch(t){return console.error(`Invalid value for config key "${s}".`,t),Et[s]}};var re=Object.keys(Et),qo=["metadata"],Ko=s=>qo.includes(s),Xe=re.filter(s=>!Ko(s)),Yo={...Object.fromEntries(Xe.map(s=>[ht(s),s])),...Object.fromEntries(Xe.map(s=>[s.toLowerCase(),s]))},Jo={...Object.fromEntries(re.map(s=>[ht(s),B(s)])),...Object.fromEntries(re.map(s=>[s.toLowerCase(),B(s)]))},qe=class extends C{constructor(){super();h(this,"requireCtxName",!0);h(this,"_debugPrint",k(()=>{let t=Object.create(null);for(let e of re)t[e]=this.$[B(e)];this.debugPrint("config",t)},0));this.init$={...this.init$,...Object.fromEntries(Object.entries(Et).map(([t,e])=>[B(t),e]))}}initCallback(){super.initCallback();let t=this;for(let e of Xe)this.sub(B(e),r=>{r!==Et[e]&&(t[e]=r)},!1);for(let e of re){let r="__"+e;t[r]=t[e],Object.defineProperty(this,e,{set:n=>{if(t[r]=n,Xe.includes(e)){let o=[...new Set([ht(e),e.toLowerCase()])];for(let a of o)typeof n=="undefined"||n===null?this.removeAttribute(a):this.setAttribute(a,n.toString())}this.$[B(e)]!==n&&(typeof n=="undefined"||n===null?this.$[B(e)]=Et[e]:this.$[B(e)]=n)},get:()=>this.$[B(e)]}),typeof t[e]!="undefined"&&t[e]!==null&&(t[e]=t[r])}}attributeChangedCallback(t,e,r){if(e===r)return;let n=Yo[t],o=Cr(n,r),a=o!=null?o:Et[n],l=this;l[n]=a}};qe.bindAttributes(Jo);var Zo=qe;var ne=class extends C{constructor(){super(...arguments);h(this,"init$",{...this.init$,name:"",path:"",size:"24",viewBox:""})}initCallback(){super.initCallback(),this.sub("name",t=>{if(!t)return;let e=this.getCssData(`--icon-${t}`);e&&(this.$.path=e)}),this.sub("path",t=>{if(!t)return;t.trimStart().startsWith("<")?(this.setAttribute("raw",""),this.ref.svg.innerHTML=t):(this.removeAttribute("raw"),this.ref.svg.innerHTML=``)}),this.sub("size",t=>{this.$.viewBox=`0 0 ${t} ${t}`})}};ne.template=``;ne.bindAttributes({name:"name",size:"size"});var wr=s=>[...new Set(s)];var Er=s=>Object.entries(s).filter(([i,t])=>t!==void 0&&t!=="").map(([i,t])=>i==="cdn-operations"||i==="analytics"?t:`${i}/${t}`);var Qo="https://ucarecdn.com",oe=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:Qo},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}});var Gt="--lr-img-",Yi="unresolved";var Ji=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),Zi=3e3,Qi=5e3,ts=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"});var xr=Object.create(null),Ar;for(let s in oe)xr[Gt+s]=((Ar=oe[s])==null?void 0:Ar.default)||"";var Ke=class extends Nt{constructor(){super(...arguments);h(this,"cssInit$",xr)}$$(t){return this.$[Gt+t]}set$$(t){for(let e in t)this.$[Gt+e]=t[e]}sub$$(t,e){this.sub(Gt+t,r=>{r===null||r===""||e(r)})}analyticsParams(){return`-/@clib/${Fe}/${Be}/lr-img/`}initAttributes(t){[...this.attributes].forEach(e=>{oe[e.name]||t.setAttribute(e.name,e.value)})}initIntersection(t,e){let r={root:null,rootMargin:"0px"};this._isnObserver=new IntersectionObserver(n=>{n.forEach(o=>{o.isIntersecting&&(e(),this._isnObserver.unobserve(t))})},r),this._isnObserver.observe(t),this._observed||(this._observed=new Set),this._observed.add(t)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(t=>{this._isnObserver.unobserve(t)}),this._isnObserver=null),E.deleteCtx(this)}static get observedAttributes(){return Object.keys(oe)}attributeChangedCallback(t,e,r){window.setTimeout(()=>{this.$[Gt+t]=r})}};var Ze=class extends Ke{constructor(){super(...arguments);h(this,"_img",new Image);h(this,"_imgPreview",new Image)}_fmtAbs(t){return!t.includes("//")&&!Ji&&(t=new URL(t,document.baseURI).href),t}_validateSize(t){if((t==null?void 0:t.trim())!==""){let e=t.match(/\d+/)[0],r=t.match(/[a-zA-Z]+/)[0],n=parseInt(e,10);if(Number(n)>Qi&&this.hasFormatJPG)return Qi+r;if(Number(n)>Zi&&!this.hasFormatJPG)return Zi+r}return t}_getCdnModifiers(t,e){let r={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(t),blur:e,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return R(...Er(r))}_getUrlBase(t="",e=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(Ji&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));let r=this._getCdnModifiers(t,e);if(this.$$("src").startsWith(this.$$("cdn-cname")))return O(this.$$("src"),r);if(this.$$("cdn-cname")&&this.$$("uuid"))return this._proxyUrl(O(Ct(this.$$("cdn-cname"),this.$$("uuid")),r));if(this.$$("uuid"))return this._proxyUrl(O(Ct(this.$$("cdn-cname"),this.$$("uuid")),r));if(this.$$("proxy-cname"))return this._proxyUrl(O(this.$$("proxy-cname"),r,this._fmtAbs(this.$$("src"))));if(this.$$("pubkey"))return this._proxyUrl(O(`https://${this.$$("pubkey")}.ucr.io/`,r,this._fmtAbs(this.$$("src"))))}_proxyUrl(t){return this.$$("secure-delivery-proxy")?Zt(this.$$("secure-delivery-proxy"),{previewUrl:t},{transform:r=>window.encodeURIComponent(r)}):t}_getElSize(t,e=1,r=!0){let n=t.getBoundingClientRect(),o=e*Math.round(n.width),a=r?"":e*Math.round(n.height);return o||a?`${o||""}x${a||""}`:null}_setupEventProxy(t){let e=n=>{n.stopPropagation();let o=new Event(n.type,n);this.dispatchEvent(o)},r=["load","error"];for(let n of r)t.addEventListener(n,e)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:ts.PREVIEW,img:this._imgPreview}:{type:ts.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){let t=M(this.$$("breakpoints"));return wr(t.map(e=>parseInt(e,10)))}else return null}get hasFormatJPG(){return this.$$("format").toLowerCase()==="jpeg"}renderBg(t){let e=new Set;e.add(`url("${this._getUrlBase(this._getElSize(t))}") 1x`),this.$$("hi-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,2))}") ${2}x`),this.$$("ultra-res-support")&&e.add(`url("${this._getUrlBase(this._getElSize(t,3))}") ${3}x`);let r=`image-set(${[...e].join(", ")})`;t.style.setProperty("background-image",r),t.style.setProperty("background-image","-webkit-"+r)}getSrcset(){let t=new Set;return this.breakpoints?this.breakpoints.forEach(e=>{t.add(this._getUrlBase(e+"x")+` ${this._validateSize(e+"w")}`),this.$$("hi-res-support")&&t.add(this._getUrlBase(e*2+"x")+` ${this._validateSize(e*2+"w")}`),this.$$("ultra-res-support")&&t.add(this._getUrlBase(e*3+"x")+` ${this._validateSize(e*3+"w")}`)}):(t.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...t].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(t=>{this.$$("intersection")?this.initIntersection(t,()=>{this.renderBg(t)}):this.renderBg(t)})}_appendURL({elNode:t,src:e,srcset:r}){e&&(t.src=e),r&&(t.srcset=r)}_setupConfigForImage({elNode:t}){this._setupEventProxy(t),this.initAttributes(t)}loaderImage({src:t,srcset:e,elNode:r}){return new Promise((n,o)=>{this._setupConfigForImage({elNode:r}),r.setAttribute(Yi,""),r.addEventListener("load",()=>{r.removeAttribute(Yi),n(r)}),r.addEventListener("error",()=>{o(!1)}),this._appendURL({elNode:r,src:t,srcset:e})})}async renderImage(){var t,e;if(this.$$("intersection")){this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),this.initIntersection(this.currentImg.img,async()=>{var r;this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((r=this._imgPreview)==null?void 0:r.remove()),this.appendChild(this._img)}});return}try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await((t=this._imgPreview)==null?void 0:t.remove()),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((e=this._imgPreview)==null?void 0:e.remove()),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}};var es=class extends Ze{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",i=>{!this.$$("is-background-for")&&!this.$$("is-preview-blur")&&(this.img.loading=i?"lazy":"eager")})}};var ae=class extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);this.init$={...this.init$,"*simpleButtonText":"",withDropZone:!0,onClick:()=>{this.initFlow()}}}initCallback(){super.initCallback(),this.defineAccessor("dropzone",t=>{typeof t!="undefined"&&(this.$.withDropZone=I(t))}),this.subConfigValue("multiple",t=>{this.$["*simpleButtonText"]=t?this.l10n("upload-files"):this.l10n("upload-file")})}};ae.template=``;ae.bindAttributes({dropzone:null});var Qe=class extends g{constructor(){super(...arguments);h(this,"historyTracked",!0);h(this,"activityType","start-from")}initCallback(){super.initCallback(),this.registerActivity(this.activityType)}};Qe.template='
';function ta(s){return new Promise(i=>{typeof window.FileReader!="function"&&i(!1);try{let t=new FileReader;t.onerror=()=>{i(!0)};let e=r=>{r.type!=="loadend"&&t.abort(),i(!1)};t.onloadend=e,t.onprogress=e,t.readAsDataURL(s)}catch{i(!1)}})}function ea(s,i){return new Promise(t=>{let e=0,r=[],n=a=>{a||(console.warn("Unexpectedly received empty content entry",{scope:"drag-and-drop"}),t(null)),a.isFile?(e++,a.file(l=>{e--;let c=new File([l],l.name,{type:l.type||i});r.push({type:"file",file:c,fullPath:a.fullPath}),e===0&&t(r)})):a.isDirectory&&o(a.createReader())},o=a=>{e++,a.readEntries(l=>{e--;for(let c of l)n(c);e===0&&t(r)})};n(s)})}function Tr(s){let i=[],t=[];for(let e=0;e{l&&i.push(...l)}));continue}let o=r.getAsFile();o&&t.push(ta(o).then(a=>{a||i.push({type:"file",file:o})}))}else r.kind==="string"&&r.type.match("^text/uri-list")&&t.push(new Promise(n=>{r.getAsString(o=>{i.push({type:"url",url:o}),n(void 0)})}))}return Promise.all(t).then(()=>i)}var z={ACTIVE:0,INACTIVE:1,NEAR:2,OVER:3},Sr=["focus"],ia=100,is=new Map;function sa(s,i){let t=Math.max(Math.min(s[0],i.x+i.width),i.x),e=Math.max(Math.min(s[1],i.y+i.height),i.y);return Math.sqrt((s[0]-t)*(s[0]-t)+(s[1]-e)*(s[1]-e))}function ss(s){let i=0,t=document.body,e=new Set,r=f=>e.add(f),n=z.INACTIVE,o=f=>{s.shouldIgnore()&&f!==z.INACTIVE||(n!==f&&e.forEach(_=>_(f)),n=f)},a=()=>i>0;r(f=>s.onChange(f));let l=()=>{i=0,o(z.INACTIVE)},c=()=>{i+=1,n===z.INACTIVE&&o(z.ACTIVE)},u=()=>{i-=1,a()||o(z.INACTIVE)},d=f=>{f.preventDefault(),i=0,o(z.INACTIVE)},p=f=>{if(s.shouldIgnore())return;a()||(i+=1);let _=[f.x,f.y],y=s.element.getBoundingClientRect(),x=Math.floor(sa(_,y)),T=x{if(s.shouldIgnore())return;f.preventDefault();let _=await Tr(f.dataTransfer);s.onItems(_),o(z.INACTIVE)};return t.addEventListener("drop",d),t.addEventListener("dragleave",u),t.addEventListener("dragenter",c),t.addEventListener("dragover",p),s.element.addEventListener("drop",m),Sr.forEach(f=>{window.addEventListener(f,l)}),()=>{is.delete(s.element),t.removeEventListener("drop",d),t.removeEventListener("dragleave",u),t.removeEventListener("dragenter",c),t.removeEventListener("dragover",p),s.element.removeEventListener("drop",m),Sr.forEach(f=>{window.removeEventListener(f,l)})}}var $r="lr-drop-area",Wt=`${$r}/registry`,le=class extends A{constructor(){super(),this.init$={...this.init$,state:z.INACTIVE,withIcon:!1,isClickable:!1,isFullscreen:!1,isEnabled:!0,isVisible:!0,text:this.l10n("drop-files-here"),[Wt]:null}}isActive(){if(!this.$.isEnabled)return!1;let i=this.getBoundingClientRect(),t=i.width>0&&i.height>0,e=i.top>=0&&i.left>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&i.right<=(window.innerWidth||document.documentElement.clientWidth),r=window.getComputedStyle(this),n=r.visibility!=="hidden"&&r.display!=="none";return t&&n&&e}initCallback(){super.initCallback(),this.$[Wt]||(this.$[Wt]=new Set),this.$[Wt].add(this),this.defineAccessor("disabled",t=>{this.set$({isEnabled:!I(t)})}),this.defineAccessor("clickable",t=>{this.set$({isClickable:I(t)})}),this.defineAccessor("with-icon",t=>{this.set$({withIcon:I(t)})}),this.defineAccessor("fullscreen",t=>{this.set$({isFullscreen:I(t)})}),this.defineAccessor("text",t=>{typeof t=="string"?this.set$({text:this.l10n(t)||t}):this.set$({text:this.l10n("drop-files-here")})}),this._destroyDropzone=ss({element:this,shouldIgnore:()=>this._shouldIgnore(),onChange:t=>{this.$.state=t},onItems:t=>{t.length&&(t.forEach(e=>{e.type==="url"?this.addFileFromUrl(e.url,{source:G.DROP_AREA}):e.type==="file"&&this.addFileFromObject(e.file,{source:G.DROP_AREA,fullPath:e.fullPath})}),this.uploadCollection.size&&(this.set$({"*currentActivity":g.activities.UPLOAD_LIST}),this.setOrAddState("*modalActive",!0)))}});let i=this.ref["content-wrapper"];i&&(this._destroyContentWrapperDropzone=ss({element:i,onChange:t=>{var r;let e=(r=Object.entries(z).find(([,n])=>n===t))==null?void 0:r[0].toLowerCase();e&&i.setAttribute("drag-state",e)},onItems:()=>{},shouldIgnore:()=>this._shouldIgnore()})),this.sub("state",t=>{var r;let e=(r=Object.entries(z).find(([,n])=>n===t))==null?void 0:r[0].toLowerCase();e&&this.setAttribute("drag-state",e)}),this.subConfigValue("sourceList",t=>{let e=M(t);this.$.isEnabled=e.includes(A.sourceTypes.LOCAL),this.$.isVisible=this.$.isEnabled||!this.querySelector("[data-default-slot]")}),this.sub("isVisible",t=>{this.toggleAttribute("hidden",!t)}),this.sub("isClickable",t=>{this.toggleAttribute("clickable",t)}),this.$.isClickable&&(this._onAreaClicked=()=>{this.openSystemDialog()},this.addEventListener("click",this._onAreaClicked))}_shouldIgnore(){return!this.$.isEnabled||!this._couldHandleFiles()?!0:this.$.isFullscreen?[...this.$[Wt]].filter(e=>e!==this).filter(e=>e.isActive()).length>0:!1}_couldHandleFiles(){let i=this.cfg.multiple,t=this.cfg.multipleMax,e=this.uploadCollection.size;return!(i&&t&&e>=t||!i&&e>0)}destroyCallback(){var t,e;super.destroyCallback();let i=this.$[Wt];i&&(i.delete(this),i.size===0&&E.deleteCtx($r)),(t=this._destroyDropzone)==null||t.call(this),(e=this._destroyContentWrapperDropzone)==null||e.call(this),this._onAreaClicked&&this.removeEventListener("click",this._onAreaClicked)}};le.template=`
{{text}}
`;le.bindAttributes({"with-icon":null,clickable:null,text:null,fullscreen:null,disabled:null});var ra="src-type-",ce=class extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);h(this,"type");h(this,"_registeredTypes",{});this.init$={...this.init$,iconName:"default"}}initTypes(){this.registerType({type:A.sourceTypes.LOCAL,activate:()=>(this.openSystemDialog(),!1)}),this.registerType({type:A.sourceTypes.URL,activity:g.activities.URL,textKey:"from-url"}),this.registerType({type:A.sourceTypes.CAMERA,activity:g.activities.CAMERA,activate:()=>{let t="capture"in document.createElement("input");return t&&this.openSystemDialog({captureCamera:!0}),!t}}),this.registerType({type:"draw",activity:g.activities.DRAW,icon:"edit-draw"});for(let t of Object.values(A.extSrcList))this.registerType({type:t,activity:g.activities.EXTERNAL,activityParams:{externalSourceType:t}})}initCallback(){super.initCallback(),this.initTypes(),this.setAttribute("role","button"),this.defineAccessor("type",t=>{t&&this.applyType(t)})}registerType(t){this._registeredTypes[t.type]=t}getType(t){return this._registeredTypes[t]}activate(){if(!this.type)return;let t=this._registeredTypes[this.type],{activity:e,activate:r,activityParams:n={}}=t;(r?r():!!e)&&this.set$({"*currentActivityParams":n,"*currentActivity":e})}applyType(t){let e=this._registeredTypes[t];if(!e){console.warn("Unsupported source type: "+t);return}let{textKey:r=t,icon:n=t}=e;this.applyL10nKey("src-type",`${ra}${r}`),this.$.iconName=n,this.onclick=()=>{this.activate()}}};ce.template=`
`;ce.bindAttributes({type:null});var rs=class extends C{initCallback(){super.initCallback(),this.subConfigValue("sourceList",i=>{let t=M(i),e="";t.forEach(r=>{e+=``}),this.cfg.sourceListWrap?this.innerHTML=e:this.outerHTML=e})}};var ei=()=>{let s=[];return{stack:s,promiseReadJpegChunks:t=>new Promise((e,r)=>{let n=2,o=(c,u)=>{let d=new FileReader;d.addEventListener("load",()=>{u(new DataView(d.result))}),d.addEventListener("error",p=>{r(`Reader error: ${p}`)}),d.readAsArrayBuffer(c)},a=()=>o(t.slice(n,n+128),c=>{let u,d,p;for(u=d=0,p=c.byteLength;p>=0?dp;u=p>=0?++d:--d)if(c.getUint8(u)===255){n+=u;break}l()}),l=()=>{let c=n;return o(t.slice(n,n+=4),u=>{if(u.byteLength!==4||u.getUint8(0)!==255){r("Corrupted");return}let d=u.getUint8(1);if(d===218){e(!0);return}let p=u.getUint16(2)-2;return o(t.slice(n,n+=p),m=>{if(m.byteLength!==p){r("Corrupted");return}s.push({startPos:c,length:p,marker:d,view:m}),a()})})};FileReader&&DataView||r("Not Support"),o(t.slice(0,2),c=>{c.getUint16(0)!==65496&&r("Not jpeg"),a()})})}},na=async s=>{let i=[],{promiseReadJpegChunks:t,stack:e}=ei();return await t(s),e.forEach(({marker:r,view:n})=>{r===226&&n.getUint32(0)===1229144927&&n.getUint32(4)===1347571526&&n.getUint32(8)===1229735168&&i.push(n)}),i},kr=async(s,i,t)=>{{let e=[],r=[],{promiseReadJpegChunks:n,stack:o}=ei();await n(s),o.forEach(c=>{if(c.marker===i)return e.push(c.startPos),r.push(c.length)});let a=[s.slice(0,2)];for(let c of t){let u=new DataView(new ArrayBuffer(4));u.setUint16(0,65280+i),u.setUint16(2,c.byteLength+2),a.push(u.buffer),a.push(c)}let l=2;for(let c=0;cl&&a.push(s.slice(l,e[c])),l=e[c]+r[c]+4;return a.push(s.slice(l,s.size)),new Blob(a,{type:s.type})}};var Or=(s,i)=>kr(s,226,i.map(t=>t.buffer)),oa=async s=>{try{return await Or(s,[])}catch(i){throw new Error(`Failed to strip ICC profile: ${i}`)}},aa=(s,i,t)=>new Promise((e,r)=>{let n=o=>{if(!o){r("Failed to convert canvas to blob");return}e(o)};s.toBlob(n,i,t),s.width=s.height=1}),he=()=>{let s=document.createElement("canvas"),i=s.getContext("2d");return{canvas:s,ctx:i}},la=s=>{let{ctx:t,canvas:e}=he();e.width=e.height=50,t.drawImage(s,0,0,50,50);let r=t.getImageData(0,0,50,50).data;e.width=e.height=1;for(let n=3;n{let i=null,{promiseReadJpegChunks:t,stack:e}=ei();return await t(s),e.forEach(({marker:r,view:n})=>{if(!i&&r===225&&n.byteLength>=14&&n.getUint32(0)===1165519206&&n.getUint16(4)===0){i=n;return}}),i},ha="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",ti,ua=()=>new Promise(s=>{if(ti!==void 0)s(ti);else{let i=new Image;i.addEventListener("load",()=>{ti=i.naturalWidth{let t,e,r,n;if(!s||s.byteLength<14||s.getUint32(0)!==1165519206||s.getUint16(4)!==0)return;if(s.getUint16(6)===18761)e=!0;else if(s.getUint16(6)===19789)e=!1;else return;if(s.getUint16(8,e)!==42)return;r=8+s.getUint32(10,e);let o=s.getUint16(r-2,e);for(t=0,n=o;n>=0?tn;n>=0?++t:--t){if(s.byteLength{da(s,(t,e)=>s.setUint16(t,i,e))},fa=async(s,i,t)=>(t&&pa(i,1),kr(s,225,[i.buffer])),ma=(s,i)=>new Promise((t,e)=>{i&&(s.src=i),s.complete?t(s):(s.addEventListener("load",()=>{t(s)}),s.addEventListener("error",()=>{e(new Error("Failed to load image. Probably not an image."))}))}),ga=s=>ma(new Image,s),_a=[1,3],ba=[192,193,194,195,197,198,199,201,202,203,205,206,207],Ir={squareSide:[Math.floor(Math.sqrt(5*1e3*1e3)),4096,8192,11180,10836,11402,14188,16384],dimension:[4096,8192,16384,32767,65535]},ya=async s=>{let i=!1,{promiseReadJpegChunks:t,stack:e}=ei();return await t(s).then(()=>(e.forEach(({marker:r,view:n})=>{if(!i&&ba.indexOf(r)>=0){let o=n.getUint8(5);_a.indexOf(o)<0&&(i=!0)}}),i)).catch(()=>i)},Pr=(s,i)=>{let t={};return(...e)=>{let r=i(e,t);return r in t?t[r]:t[r]=s(...e)}},Lr=(s,i)=>{let[t]=s,e=Object.keys(i).map(r=>parseInt(r,10)).sort((r,n)=>r-n);for(let r=0;rt&&o||n{try{let t=[s-1,i-1,1,1],{canvas:e,ctx:r}=he();e.width=1,e.height=1;let{canvas:n,ctx:o}=he();n.width=s,n.height=i,o&&(o.fillStyle=va,o.fillRect(...t),r.drawImage(n,s-1,i-1,1,1,0,0,1,1));let a=r&&r.getImageData(0,0,1,1).data,l=!1;return a&&(l=a[0]===At.R&&a[1]===At.G&&a[2]===At.B&&a[3]===At.A),n.width=n.height=1,l}catch{return console.error(`Failed to test for max canvas size of ${s}x${i}.`),!1}};function Rr(s){return(...i)=>new Promise(t=>{setTimeout(()=>{let e=s(...i);t(e)},0)})}var Ca=Rr(Pr(Ur,Lr)),wa=Rr(Pr(Ur,Lr)),Mr=async(s,i)=>{let t=Ir.squareSide.find(o=>o*o>=s*i),e=Ir.dimension.find(o=>o>=s&&o>=i);if(!t||!e)throw new Error("Not supported");let[r,n]=await Promise.all([Ca(t,t),wa(e,1)]);if(r&&n)return!0;throw new Error("Not supported")},Nr=async(s,i,t)=>{try{let{ctx:e,canvas:r}=he();return r.width=i,r.height=t,e.imageSmoothingQuality="high",e.drawImage(s,0,0,i,t),s instanceof HTMLImageElement&&(s.src="//:0"),s instanceof HTMLCanvasElement&&(s.width=s.height=1),r}catch(e){throw new Error("Canvas resize error",{cause:e})}},Ea=({img:s,targetW:i,targetH:t})=>Nr(s,i,t),Aa=function({sourceW:s,targetW:i,targetH:t,step:e}){let r=[],n=i,o=t;do r.push([n,o]),n=Math.round(n/e),o=Math.round(o/e);while(nAa({sourceW:i,targetW:t,targetH:e,step:r}).reduce((o,[a,l])=>o.then(c=>Mr(a,l).then(()=>Nr(c,a,l)).catch(()=>c)),Promise.resolve(s)),Ta=()=>/iPad|iPhone|iPod/.test(navigator.platform)?!0:navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),Sa=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),ns=.71,$a=(s,i)=>{if(s.width*ns*s.height*ns{let{ctx:a}=he();return"imageSmoothingQuality"in a&&!Ta()&&!Sa?Ea({img:s,targetW:n,targetH:o}):xa({img:s,sourceW:t,targetW:n,targetH:o,step:ns})}).catch(()=>Promise.reject("Not supported"))},Dr=async(s,i)=>{try{if(await ya(s))throw new Error("Should skipped");let e=await Promise.allSettled([ca(s),ua(),na(s)]),n=!e.some(_=>_.status==="rejected"),[o,a,l]=e,c=await oa(s).catch(()=>s),u=await ga(URL.createObjectURL(c));URL.revokeObjectURL(u.src);let d=await $a(u,i),p="image/jpeg",m=(i==null?void 0:i.quality)||.8;!n&&la(d)&&(p="image/png",m=void 0);let f=await aa(d,p,m);if(n&&o.status==="fulfilled"&&o.value){let _=o.value,y=a.status==="fulfilled"?a.value:!1;f=await fa(f,_,y)}return n&&l.status==="fulfilled"&&l.value.length>0&&(f=await Or(f,l.value)),f}catch(t){let e;throw t instanceof Error&&(e=t.message),typeof t=="string"&&(e=t),new Error(`Failed to shrink image. ${e?`Message: "${e}".`:""}`,{cause:t})}};function Fr(s){let i=new Blob([s],{type:"image/svg+xml"});return URL.createObjectURL(i)}function Br(s="#fff",i="rgba(0, 0, 0, .1)"){return Fr(``)}function ue(s="hsl(209, 21%, 65%)",i=32,t=32){return Fr(``)}function zr(s,i=40){if(s.type==="image/svg+xml")return URL.createObjectURL(s);let t=document.createElement("canvas"),e=t.getContext("2d"),r=new Image,n=new Promise((o,a)=>{r.onload=()=>{let l=r.height/r.width;l>1?(t.width=i,t.height=i*l):(t.height=i,t.width=i/l),e.fillStyle="rgb(240, 240, 240)",e.fillRect(0,0,t.width,t.height),e.drawImage(r,0,0,t.width,t.height),t.toBlob(c=>{if(!c){a();return}let u=URL.createObjectURL(c);o(u)})},r.onerror=l=>{a(l)}});return r.src=URL.createObjectURL(s),n}var Ia=/^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i,Vr=s=>{let i=Ia.exec(s==null?void 0:s.toLocaleLowerCase())||[];if(!i.length)return!1;let t=i[1]*i[2],e=16384*16384;return t>e?(console.warn(`Shrinked size can not be larger than ${Math.floor(e/1e3/1e3)}MP. You have set ${i[1]}x${i[2]} (${Math.ceil(t/1e3/100)/10}MP).`),!1):{quality:i[3]?i[3]/100:void 0,size:t}};var J=Object.freeze({FINISHED:Symbol(0),FAILED:Symbol(1),UPLOADING:Symbol(2),IDLE:Symbol(3)}),de=class s extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);h(this,"pauseRender",!0);h(this,"_entrySubs",new Set);h(this,"_entry",null);h(this,"_isIntersecting",!1);h(this,"_debouncedGenerateThumb",k(this._generateThumbnail.bind(this),100));h(this,"_debouncedCalculateState",k(this._calculateState.bind(this),100));h(this,"_renderedOnce",!1);this.init$={...this.init$,uid:"",itemName:"",errorText:"",thumbUrl:"",progressValue:0,progressVisible:!1,badgeIcon:"",isFinished:!1,isFailed:!1,isUploading:!1,isFocused:!1,isEditable:!1,state:J.IDLE,onEdit:()=>{this.set$({"*focusedEntry":this._entry}),this.hasBlockInCtx(t=>t.activityType===g.activities.DETAILS)?this.$["*currentActivity"]=g.activities.DETAILS:this.$["*currentActivity"]=g.activities.CLOUD_IMG_EDIT},onRemove:()=>{this.uploadCollection.remove(this.$.uid)},onUpload:()=>{this.upload()}}}_reset(){for(let t of this._entrySubs)t.remove();this._debouncedGenerateThumb.cancel(),this._debouncedCalculateState.cancel(),this._entrySubs=new Set,this._entry=null}_observerCallback(t){let[e]=t;this._isIntersecting=e.isIntersecting,e.isIntersecting&&!this._renderedOnce&&(this.render(),this._renderedOnce=!0),e.intersectionRatio===0?this._debouncedGenerateThumb.cancel():this._debouncedGenerateThumb()}_calculateState(){if(!this._entry)return;let t=this._entry,e=J.IDLE;t.getValue("errors").length>0?e=J.FAILED:t.getValue("isUploading")?e=J.UPLOADING:t.getValue("fileInfo")&&(e=J.FINISHED),this.$.state=e}async _generateThumbnail(){var e;if(!this._entry)return;let t=this._entry;if(t.getValue("fileInfo")&&t.getValue("isImage")){let r=this.cfg.thumbSize,n=this.proxyUrl(O(Ct(this.cfg.cdnCname,this._entry.getValue("uuid")),R(t.getValue("cdnUrlModifiers"),`scale_crop/${r}x${r}/center`))),o=t.getValue("thumbUrl");o!==n&&(t.setValue("thumbUrl",n),o!=null&&o.startsWith("blob:")&&URL.revokeObjectURL(o));return}if(!t.getValue("thumbUrl"))if((e=t.getValue("file"))!=null&&e.type.includes("image"))try{let r=await zr(t.getValue("file"),this.cfg.thumbSize);t.setValue("thumbUrl",r)}catch{let n=window.getComputedStyle(this).getPropertyValue("--clr-generic-file-icon");t.setValue("thumbUrl",ue(n))}else{let r=window.getComputedStyle(this).getPropertyValue("--clr-generic-file-icon");t.setValue("thumbUrl",ue(r))}}_subEntry(t,e){let r=this._entry.subscribe(t,n=>{this.isConnected&&e(n)});this._entrySubs.add(r)}_handleEntryId(t){var r;this._reset();let e=(r=this.uploadCollection)==null?void 0:r.read(t);this._entry=e,e&&(this._subEntry("uploadProgress",n=>{this.$.progressValue=n}),this._subEntry("fileName",n=>{this.$.itemName=n||e.getValue("externalUrl")||this.l10n("file-no-name"),this._debouncedCalculateState()}),this._subEntry("externalUrl",n=>{this.$.itemName=e.getValue("fileName")||n||this.l10n("file-no-name")}),this._subEntry("fileInfo",n=>{this._debouncedCalculateState(),n&&this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("cdnUrlModifiers",()=>{this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("thumbUrl",n=>{this.$.thumbUrl=n?`url(${n})`:""}),this._subEntry("errors",()=>this._debouncedCalculateState()),this._subEntry("isUploading",()=>this._debouncedCalculateState()),this._subEntry("fileSize",()=>this._debouncedCalculateState()),this._subEntry("mimeType",()=>this._debouncedCalculateState()),this._subEntry("isImage",()=>this._debouncedCalculateState()),this._isIntersecting&&this._debouncedGenerateThumb())}initCallback(){super.initCallback(),this.sub("uid",t=>{this._handleEntryId(t)}),this.sub("state",t=>{this._handleState(t)}),this.subConfigValue("useCloudImageEditor",()=>this._debouncedCalculateState()),this.onclick=()=>{s.activeInstances.forEach(t=>{t===this?t.setAttribute("focused",""):t.removeAttribute("focused")})},this.sub("*uploadTrigger",t=>{t.has(this._entry.uid)&&setTimeout(()=>this.isConnected&&this.upload())}),s.activeInstances.add(this)}_handleState(t){var e,r,n,o;t===J.FAILED?this.$.badgeIcon="badge-error":t===J.FINISHED&&(this.$.badgeIcon="badge-success"),t===J.UPLOADING?this.$.isFocused=!1:this.$.progressValue=0,this.set$({isFailed:t===J.FAILED,isUploading:t===J.UPLOADING,isFinished:t===J.FINISHED,progressVisible:t===J.UPLOADING,isEditable:this.cfg.useCloudImageEditor&&((e=this._entry)==null?void 0:e.getValue("isImage"))&&((r=this._entry)==null?void 0:r.getValue("cdnUrl")),errorText:(o=(n=this._entry.getValue("errors"))==null?void 0:n[0])==null?void 0:o.message})}destroyCallback(){super.destroyCallback(),s.activeInstances.delete(this),this._reset()}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{root:this.parentElement,rootMargin:"50% 0px 50% 0px",threshold:[0,1]}),this._observer.observe(this)}disconnectedCallback(){var t;super.disconnectedCallback(),this._debouncedGenerateThumb.cancel(),(t=this._observer)==null||t.disconnect()}_settingsOfShrink(){return Vr(this.cfg.imageShrink)}_processShrink(t){return Dr(t,this._settingsOfShrink())}async upload(){var r,n,o,a,l;let t=this._entry;if(!this.uploadCollection.read(t.uid)||t.getValue("fileInfo")||t.getValue("isUploading")||t.getValue("errors").length>0)return;let e=this.cfg.multiple?this.cfg.multipleMax:1;if(!(e&&this.uploadCollection.size>e)){this._debouncedCalculateState(),t.setValue("isUploading",!0),t.setValue("errors",[]);try{let c=new AbortController;t.setValue("abortController",c);let u=async()=>{let p=t.getValue("file");p&&this.cfg.imageShrink&&(p=await this._processShrink(p).catch(()=>p));let m=p||t.getValue("externalUrl")||t.getValue("uuid"),_={...this.getUploadClientOptions(),fileName:t.getValue("fileName"),source:t.getValue("source"),onProgress:y=>{if(y.isComputable){let x=y.value*100;t.setValue("uploadProgress",x)}},signal:c.signal,metadata:await this.getMetadataFor(t.uid)};return this.debugPrint("upload options",m,_),ji(m,_)},d=await this.$["*uploadQueue"].add(u);t.setMultipleValues({fileInfo:d,isUploading:!1,fileName:d.originalFilename,fileSize:d.size,isImage:d.isImage,mimeType:(o=(n=(r=d.contentInfo)==null?void 0:r.mime)==null?void 0:n.mime)!=null?o:d.mimeType,uuid:d.uuid,cdnUrl:(a=t.getValue("cdnUrl"))!=null?a:d.cdnUrl,cdnUrlModifiers:(l=t.getValue("cdnUrlModifiers"))!=null?l:"",uploadProgress:100}),t===this._entry&&this._debouncedCalculateState()}catch(c){c instanceof _t&&c.isCancel?t.setMultipleValues({isUploading:!1,uploadProgress:0}):t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:c}),t===this._entry&&this._debouncedCalculateState()}}}};de.template=`
{{itemName}}{{errorText}}
`;de.activeInstances=new Set;var pe=class extends C{constructor(){super();h(this,"_handleBackdropClick",()=>{this._closeDialog()});h(this,"_closeDialog",()=>{this.setOrAddState("*modalActive",!1)});h(this,"_handleDialogClose",()=>{this._closeDialog()});h(this,"_handleDialogMouseDown",t=>{this._mouseDownTarget=t.target});h(this,"_handleDialogMouseUp",t=>{t.target===this.ref.dialog&&t.target===this._mouseDownTarget&&this._closeDialog()});this.init$={...this.init$,"*modalActive":!1,isOpen:!1,closeClicked:this._handleDialogClose}}show(){this.ref.dialog.showModal?this.ref.dialog.showModal():this.ref.dialog.setAttribute("open","")}hide(){this.ref.dialog.close?this.ref.dialog.close():this.ref.dialog.removeAttribute("open")}initCallback(){if(super.initCallback(),typeof HTMLDialogElement=="function")this.ref.dialog.addEventListener("close",this._handleDialogClose),this.ref.dialog.addEventListener("mousedown",this._handleDialogMouseDown),this.ref.dialog.addEventListener("mouseup",this._handleDialogMouseUp);else{this.setAttribute("dialog-fallback","");let t=document.createElement("div");t.className="backdrop",this.appendChild(t),t.addEventListener("click",this._handleBackdropClick)}this.sub("*modalActive",t=>{this.$.isOpen!==t&&(this.$.isOpen=t),t&&this.cfg.modalScrollLock?document.body.style.overflow="hidden":document.body.style.overflow=""}),this.subConfigValue("modalBackdropStrokes",t=>{t?this.setAttribute("strokes",""):this.removeAttribute("strokes")}),this.sub("isOpen",t=>{t?this.show():this.hide()})}destroyCallback(){super.destroyCallback(),document.body.style.overflow="",this._mouseDownTarget=void 0,this.ref.dialog.removeEventListener("close",this._handleDialogClose),this.ref.dialog.removeEventListener("mousedown",this._handleDialogMouseDown),this.ref.dialog.removeEventListener("mouseup",this._handleDialogMouseUp)}};h(pe,"StateConsumerScope","modal");pe.template=``;var ii=(s,i)=>{let t,e,r,n=(...o)=>{t?(clearTimeout(e),e=setTimeout(()=>{Date.now()-r>=i&&(s(...o),r=Date.now())},Math.max(i-(Date.now()-r),0))):(s(...o),r=Date.now(),t=!0)};return Object.defineProperty(n,"cancel",{configurable:!1,writable:!1,enumerable:!1,value:()=>{clearTimeout(e)}}),n};var si=class extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);h(this,"historyTracked",!0);h(this,"activityType",g.activities.UPLOAD_LIST);h(this,"_throttledHandleCollectionUpdate",ii(()=>{this.isConnected&&(this._updateUploadsState(),!this.couldOpenActivity&&this.$["*currentActivity"]===this.activityType&&this.historyBack())},300));this.init$={...this.init$,doneBtnVisible:!1,doneBtnEnabled:!1,uploadBtnVisible:!1,addMoreBtnVisible:!1,addMoreBtnEnabled:!1,headerText:"",commonErrorMessage:"",hasFiles:!1,onAdd:()=>{this.initFlow(!0)},onUpload:()=>{this.emit($.UPLOAD_CLICK),this.uploadAll(),this._throttledHandleCollectionUpdate()},onDone:()=>{this.emit($.DONE_CLICK,this.getOutputCollectionState()),this.doneFlow()},onCancel:()=>{this.uploadCollection.clearAll()}}}_updateUploadsState(){let t=this.getOutputCollectionState(),e={total:t.totalCount,succeed:t.successCount,uploading:t.uploadingCount,failed:t.failedCount},r=!t.errors.some(p=>p.type==="TOO_MANY_FILES"||p.type==="TOO_FEW_FILES"),n=t.errors.some(p=>p.type==="TOO_MANY_FILES"),o=t.totalCount===(this.cfg.multiple?this.cfg.multipleMax:1),a=e.failed===0,l=!1,c=!1,u=!1;e.total-e.succeed-e.uploading-e.failed>0&&r?l=!0:(c=!0,u=e.total===e.succeed&&r&&a),this.set$({doneBtnVisible:c,doneBtnEnabled:u,uploadBtnVisible:l,addMoreBtnEnabled:e.total===0||!n&&!o,addMoreBtnVisible:!o||this.cfg.multiple,headerText:this._getHeaderText(e)})}_getHeaderText(t){let e=r=>{let n=t[r];return this.l10n(`header-${r}`,{count:n})};return t.uploading>0?e("uploading"):t.failed>0?e("failed"):t.succeed>0?e("succeed"):e("total")}get couldOpenActivity(){return this.cfg.showEmptyList||this.uploadCollection.size>0}initCallback(){super.initCallback(),this.registerActivity(this.activityType),this.subConfigValue("multiple",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMin",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMax",this._throttledHandleCollectionUpdate),this.sub("*currentActivity",t=>{!this.couldOpenActivity&&t===this.activityType&&(this.$["*currentActivity"]=this.initActivity)}),this.uploadCollection.observeProperties(this._throttledHandleCollectionUpdate),this.sub("*uploadList",t=>{this._throttledHandleCollectionUpdate(),this.set$({hasFiles:t.length>0}),this.cfg.confirmUpload||this.uploadAll()},!1),this.sub("*collectionErrors",t=>{let e=t.filter(r=>r.type!=="SOME_FILES_HAS_ERRORS")[0];if(!e){this.set$({commonErrorMessage:null});return}this.set$({commonErrorMessage:e.message})})}destroyCallback(){super.destroyCallback(),this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate)}};si.template=`{{headerText}}
`;var ri=class extends A{constructor(){super(...arguments);h(this,"couldBeCtxOwner",!0);h(this,"activityType",g.activities.URL);h(this,"init$",{...this.init$,importDisabled:!0,onUpload:t=>{t.preventDefault();let e=this.ref.input.value;this.addFileFromUrl(e,{source:G.URL_TAB}),this.$["*currentActivity"]=g.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()},onInput:t=>{let e=t.target.value;this.set$({importDisabled:!e})}})}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{this.ref.input.value="",this.ref.input.focus()}})}};ri.template=`
`;var os=()=>typeof navigator.permissions!="undefined";var ni=class extends A{constructor(){super(...arguments);h(this,"couldBeCtxOwner",!0);h(this,"activityType",g.activities.CAMERA);h(this,"_unsubPermissions",null);h(this,"init$",{...this.init$,video:null,videoTransformCss:null,shotBtnDisabled:!0,videoHidden:!0,messageHidden:!0,requestBtnHidden:os(),l10nMessage:null,originalErrorMessage:null,cameraSelectOptions:null,cameraSelectHidden:!0,onCameraSelectChange:t=>{this._selectedCameraId=t.target.value,this._capture()},onCancel:()=>{this.historyBack()},onShot:()=>{this._shot()},onRequestPermissions:()=>{this._capture()}});h(this,"_onActivate",()=>{os()&&this._subscribePermissions(),this._capture()});h(this,"_onDeactivate",()=>{this._unsubPermissions&&this._unsubPermissions(),this._stopCapture()});h(this,"_handlePermissionsChange",()=>{this._capture()});h(this,"_setPermissionsState",k(t=>{this.$.originalErrorMessage=null,this.classList.toggle("initialized",t==="granted"),t==="granted"?this.set$({videoHidden:!1,shotBtnDisabled:!1,messageHidden:!0}):t==="prompt"?(this.$.l10nMessage=this.l10n("camera-permissions-prompt"),this.set$({videoHidden:!0,shotBtnDisabled:!0,messageHidden:!1}),this._stopCapture()):(this.$.l10nMessage=this.l10n("camera-permissions-denied"),this.set$({videoHidden:!0,shotBtnDisabled:!0,messageHidden:!1}),this._stopCapture())},300))}async _subscribePermissions(){try{(await navigator.permissions.query({name:"camera"})).addEventListener("change",this._handlePermissionsChange)}catch(t){console.log("Failed to use permissions API. Fallback to manual request mode.",t),this._capture()}}async _capture(){let t={video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}},audio:!1};this._selectedCameraId&&(t.video.deviceId={exact:this._selectedCameraId}),this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d");try{this._setPermissionsState("prompt");let e=await navigator.mediaDevices.getUserMedia(t);e.addEventListener("inactive",()=>{this._setPermissionsState("denied")}),this.$.video=e,this._capturing=!0,this._setPermissionsState("granted")}catch(e){this._setPermissionsState("denied"),this.$.originalErrorMessage=e.message}}_stopCapture(){var t;this._capturing&&((t=this.$.video)==null||t.getTracks()[0].stop(),this.$.video=null,this._capturing=!1)}_shot(){this._canvas.height=this.ref.video.videoHeight,this._canvas.width=this.ref.video.videoWidth,this._ctx.drawImage(this.ref.video,0,0);let t=Date.now(),e=`camera-${t}.jpeg`,r="image/jpeg";this._canvas.toBlob(n=>{let o=new File([n],e,{lastModified:t,type:r});this.addFileFromObject(o,{source:G.CAMERA}),this.set$({"*currentActivity":g.activities.UPLOAD_LIST})},r)}async initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:this._onActivate,onDeactivate:this._onDeactivate}),this.subConfigValue("cameraMirror",t=>{this.$.videoTransformCss=t?"scaleX(-1)":null});try{let e=(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="videoinput").map((r,n)=>({text:r.label.trim()||`${this.l10n("caption-camera")} ${n+1}`,value:r.deviceId}));e.length>1&&(this.$.cameraSelectOptions=e,this.$.cameraSelectHidden=!1)}catch{}}};ni.template=`
{{l10nMessage}}{{originalErrorMessage}}
`;var oi=class extends A{constructor(){super(...arguments);h(this,"requireCtxName",!0)}initCallback(){super.initCallback(),this.$["*eventEmitter"].bindTarget(this)}destroyCallback(){super.destroyCallback(),this.$["*eventEmitter"].unbindTarget(this)}};oi.EventType=$;var ka=oi;var ai=class extends A{constructor(){super(...arguments);h(this,"activityType",g.activities.DETAILS);h(this,"pauseRender",!0);h(this,"init$",{...this.init$,checkerboard:!1,fileSize:null,fileName:"",cdnUrl:"",errorTxt:"",cloudEditBtnHidden:!0,onNameInput:null,onBack:()=>{this.historyBack()},onRemove:()=>{this.uploadCollection.remove(this.entry.uid),this.historyBack()},onCloudEdit:()=>{this.entry.getValue("uuid")&&(this.$["*currentActivity"]=g.activities.CLOUD_IMG_EDIT)}})}showNonImageThumb(){let t=window.getComputedStyle(this).getPropertyValue("--clr-generic-file-icon"),e=ue(t,108,108);this.ref.filePreview.setImageUrl(e),this.set$({checkerboard:!1})}initCallback(){super.initCallback(),this.render(),this.$.fileSize=this.l10n("file-size-unknown"),this.registerActivity(this.activityType,{onDeactivate:()=>{this.ref.filePreview.clear()}}),this.sub("*focusedEntry",t=>{if(!t)return;this._entrySubs?this._entrySubs.forEach(n=>{this._entrySubs.delete(n),n.remove()}):this._entrySubs=new Set,this.entry=t;let e=t.getValue("file");if(e){this._file=e;let n=ie(this._file);n&&!t.getValue("cdnUrl")&&(this.ref.filePreview.setImageFile(this._file),this.set$({checkerboard:!0})),n||this.showNonImageThumb()}let r=(n,o)=>{this._entrySubs.add(this.entry.subscribe(n,o))};r("fileName",n=>{this.$.fileName=n,this.$.onNameInput=()=>{let o=this.ref.file_name_input.value;Object.defineProperty(this._file,"name",{writable:!0,value:o}),this.entry.setValue("fileName",o)}}),r("fileSize",n=>{this.$.fileSize=Number.isFinite(n)?this.fileSizeFmt(n):this.l10n("file-size-unknown")}),r("errors",n=>{var o;this.$.errorTxt=(o=n[0])==null?void 0:o.message}),r("externalUrl",n=>{n&&(this.entry.getValue("uuid")||this.showNonImageThumb())}),r("cdnUrl",n=>{let o=this.cfg.useCloudImageEditor&&n&&this.entry.getValue("isImage");if(n&&this.ref.filePreview.clear(),this.set$({cdnUrl:n,cloudEditBtnHidden:!o}),n&&this.entry.getValue("isImage")){let a=O(n,R("format/auto","preview"));this.ref.filePreview.setImageUrl(this.proxyUrl(a))}})})}};ai.template=`
{{fileSize}}
{{errorTxt}}
`;var as=class{constructor(){h(this,"captionL10nStr","confirm-your-action");h(this,"messageL10Str","are-you-sure");h(this,"confirmL10nStr","yes");h(this,"denyL10nStr","no")}confirmAction(){console.log("Confirmed")}denyAction(){this.historyBack()}},li=class extends g{constructor(){super(...arguments);h(this,"activityType",g.activities.CONFIRMATION);h(this,"_defaults",new as);h(this,"init$",{...this.init$,activityCaption:"",messageTxt:"",confirmBtnTxt:"",denyBtnTxt:"","*confirmation":null,onConfirm:this._defaults.confirmAction,onDeny:this._defaults.denyAction.bind(this)})}initCallback(){super.initCallback(),this.set$({messageTxt:this.l10n(this._defaults.messageL10Str),confirmBtnTxt:this.l10n(this._defaults.confirmL10nStr),denyBtnTxt:this.l10n(this._defaults.denyL10nStr)}),this.sub("*confirmation",t=>{t&&this.set$({"*currentActivity":g.activities.CONFIRMATION,activityCaption:this.l10n(t.captionL10nStr),messageTxt:this.l10n(t.messageL10Str),confirmBtnTxt:this.l10n(t.confirmL10nStr),denyBtnTxt:this.l10n(t.denyL10nStr),onDeny:()=>{t.denyAction()},onConfirm:()=>{t.confirmAction()}})})}};li.template=`{{activityCaption}}
{{messageTxt}}
`;var ci=class extends A{constructor(){super(...arguments);h(this,"init$",{...this.init$,visible:!1,value:0,"*commonProgress":0})}initCallback(){super.initCallback(),this._unobserveCollection=this.uploadCollection.observeProperties(()=>{let t=this.uploadCollection.items().some(e=>this.uploadCollection.read(e).getValue("isUploading"));this.$.visible=t}),this.sub("visible",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")}),this.sub("*commonProgress",t=>{this.$.value=t})}destroyCallback(){var t;super.destroyCallback(),(t=this._unobserveCollection)==null||t.call(this)}};ci.template='';var hi=class extends C{constructor(){super(...arguments);h(this,"_value",0);h(this,"init$",{...this.init$,width:0,opacity:0})}initCallback(){super.initCallback(),this.defineAccessor("value",t=>{if(t===void 0)return;let e=this._value;if(this._value=t,t===0&&e>0){this.ref.line.addEventListener("transitionend",()=>{this.style.setProperty("--l-width",this._value.toString())});return}this.style.setProperty("--l-width",this._value.toString())}),this.defineAccessor("visible",t=>{this.ref.line.classList.toggle("progress--hidden",!t)})}};hi.template='
';var K="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";var fe=class extends C{constructor(){super();h(this,"init$",{...this.init$,checkerboard:!1,src:K})}initCallback(){super.initCallback(),this.sub("checkerboard",()=>{this.style.backgroundImage=this.hasAttribute("checkerboard")?`url(${Br()})`:"unset"})}destroyCallback(){super.destroyCallback(),URL.revokeObjectURL(this._lastObjectUrl)}setImage(t){this.$.src=t.src}setImageFile(t){let e=URL.createObjectURL(t);this.$.src=e,this._lastObjectUrl=e}setImageUrl(t){this.$.src=t}clear(){URL.revokeObjectURL(this._lastObjectUrl),this.$.src=K}};fe.template='';fe.bindAttributes({checkerboard:"checkerboard"});var jr="--cfg-ctx-name",L=class extends C{get cfgCssCtxName(){return this.getCssData(jr,!0)}get cfgCtxName(){var t;let i=((t=this.getAttribute("ctx-name"))==null?void 0:t.trim())||this.cfgCssCtxName||this.__cachedCfgCtxName;if(!i)throw new Error(`ctx-name attribute is required for ${this.constructor.name}`);return this.__cachedCfgCtxName=i,i}connectedCallback(){var i;if(!this.connectedOnce){let t=(i=this.getAttribute("ctx-name"))==null?void 0:i.trim();t&&this.style.setProperty(jr,`'${t}'`)}super.connectedCallback()}parseCfgProp(i){return{...super.parseCfgProp(i),ctx:E.getCtx(this.cfgCtxName)}}get debugCtxName(){return this.cfgCtxName}};function Hr(...s){return s.reduce((i,t)=>{if(typeof t=="string")return i[t]=!0,i;for(let e of Object.keys(t))i[e]=t[e];return i},{})}function N(...s){let i=Hr(...s);return Object.keys(i).reduce((t,e)=>(i[e]&&t.push(e),t),[]).join(" ")}function Gr(s,...i){let t=Hr(...i);for(let e of Object.keys(t))s.classList.toggle(e,t[e])}var Wr=s=>{if(!s)return W;let i=Zs(s).filter(t=>W.includes(t));return i.length===0?W:i};function Xr(s){return{"*originalUrl":null,"*faderEl":null,"*cropperEl":null,"*imgEl":null,"*imgContainerEl":null,"*networkProblems":!1,"*imageSize":null,"*editorTransformations":{},"*cropPresetList":[],"*tabList":W,"*tabId":P.CROP,entry:null,extension:null,editorMode:!1,modalCaption:"",isImage:!1,msg:"",src:K,fileType:"",showLoader:!1,uuid:null,cdnUrl:null,cropPreset:"",tabs:Ht(W),"presence.networkProblems":!1,"presence.modalCaption":!0,"presence.editorToolbar":!1,"presence.viewerToolbar":!0,"*on.retryNetwork":()=>{let i=s.querySelectorAll("img");for(let t of i){let e=t.src;t.src=K,t.src=e}s.$["*networkProblems"]=!1},"*on.apply":i=>{if(!i)return;let t=s.$["*originalUrl"],e=R(wt(i),"preview"),r=O(t,e),n={originalUrl:t,cdnUrlModifiers:e,cdnUrl:r,transformations:i};s.dispatchEvent(new CustomEvent("apply",{detail:n,bubbles:!0,composed:!0})),s.remove()},"*on.cancel":()=>{s.remove(),s.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))}}}var qr=`
Network error
{{fileType}}
{{msg}}
`;var nt=class extends L{constructor(){super();h(this,"_debouncedShowLoader",k(this._showLoader.bind(this),300));this.init$={...this.init$,...Xr(this)}}get ctxName(){return this.autoCtxName}_showLoader(t){this.$.showLoader=t}_waitForSize(){return new Promise((e,r)=>{let n=setTimeout(()=>{r(new Error("[cloud-image-editor] timeout waiting for non-zero container size"))},3e3),o=new ResizeObserver(([a])=>{a.contentRect.width>0&&a.contentRect.height>0&&(e(),clearTimeout(n),o.disconnect())});o.observe(this)})}initCallback(){super.initCallback(),this.$["*faderEl"]=this.ref["fader-el"],this.$["*cropperEl"]=this.ref["cropper-el"],this.$["*imgContainerEl"]=this.ref["img-container-el"],this.initEditor()}async updateImage(){if(this.isConnected){if(await this._waitForSize(),this.$.cdnUrl){let t=sr(this.$.cdnUrl),e=Ct(this.$.cdnUrl,t);if(e===this.$["*originalUrl"])return;this.$["*originalUrl"]=e;let r=rr(this.$.cdnUrl),n=_r(r);this.$["*editorTransformations"]=n}else if(this.$.uuid){let t=Ct(this.cfg.cdnCname,this.$.uuid);if(t===this.$["*originalUrl"])return;this.$["*originalUrl"]=t,this.$["*editorTransformations"]={}}else throw new Error("No UUID nor CDN URL provided");this.$["*tabId"]===P.CROP?this.$["*cropperEl"].deactivate({reset:!0}):this.$["*faderEl"].deactivate();try{let t=O(this.$["*originalUrl"],R("json")),e=await fetch(t).then(o=>o.json()),{width:r,height:n}=e;this.$["*imageSize"]={width:r,height:n},this.$["*tabId"]===P.CROP?this.$["*cropperEl"].activate(this.$["*imageSize"]):this.$["*faderEl"].activate({url:this.$["*originalUrl"]})}catch(t){t&&console.error("Failed to load image info",t)}}}async initEditor(){try{await this._waitForSize()}catch(t){this.isConnected&&console.error(t.message);return}this.ref["img-el"].addEventListener("load",()=>{this._imgLoading=!1,this._debouncedShowLoader(!1),this.$.src!==K&&(this.$["*networkProblems"]=!1)}),this.ref["img-el"].addEventListener("error",()=>{this._imgLoading=!1,this._debouncedShowLoader(!1),this.$["*networkProblems"]=!0}),this.sub("src",t=>{let e=this.ref["img-el"];e.src!==t&&(this._imgLoading=!0,e.src=t||K)}),this.sub("cropPreset",t=>{this.$["*cropPresetList"]=De(t)}),this.sub("tabs",t=>{this.$["*tabList"]=Wr(t)}),this.sub("*tabId",t=>{this.ref["img-el"].className=N("image",{image_hidden_to_cropper:t===P.CROP,image_hidden_effects:t!==P.CROP})}),this.classList.add("editor_ON"),this.sub("*networkProblems",t=>{this.$["presence.networkProblems"]=t,this.$["presence.modalCaption"]=!t}),this.sub("*editorTransformations",t=>{if(Object.keys(t).length===0)return;let e=this.$["*originalUrl"],r=R(wt(t),"preview"),n=O(e,r),o={originalUrl:e,cdnUrlModifiers:r,cdnUrl:n,transformations:t};this.dispatchEvent(new CustomEvent("change",{detail:o,bubbles:!0,composed:!0}))},!1),this.sub("uuid",t=>t&&this.updateImage()),this.sub("cdnUrl",t=>t&&this.updateImage())}};h(nt,"className","cloud-image-editor");nt.template=qr;nt.bindAttributes({uuid:"uuid","cdn-url":"cdnUrl","crop-preset":"cropPreset",tabs:"tabs"});var ui=class extends L{constructor(){super(),this.init$={...this.init$,dragging:!1},this._handlePointerUp=this._handlePointerUp_.bind(this),this._handlePointerMove=this._handlePointerMove_.bind(this),this._handleSvgPointerMove=this._handleSvgPointerMove_.bind(this)}_shouldThumbBeDisabled(i){let t=this.$["*imageBox"];if(!t)return;if(i===""&&t.height<=b&&t.width<=b)return!0;let e=t.height<=b&&(i.includes("n")||i.includes("s")),r=t.width<=b&&(i.includes("e")||i.includes("w"));return e||r}_createBackdrop(){let i=this.$["*cropBox"];if(!i)return;let{x:t,y:e,width:r,height:n}=i,o=this.ref["svg-el"],a=Y("mask",{id:"backdrop-mask"}),l=Y("rect",{x:0,y:0,width:"100%",height:"100%",fill:"white"}),c=Y("rect",{x:t,y:e,width:r,height:n,fill:"black"});a.appendChild(l),a.appendChild(c);let u=Y("rect",{x:0,y:0,width:"100%",height:"100%",fill:"var(--color-image-background)","fill-opacity":.85,mask:"url(#backdrop-mask)"});o.appendChild(u),o.appendChild(a),this._backdropMask=a,this._backdropMaskInner=c}_resizeBackdrop(){this._backdropMask&&(this._backdropMask.style.display="none",window.requestAnimationFrame(()=>{this._backdropMask&&(this._backdropMask.style.display="block")}))}_updateBackdrop(){let i=this.$["*cropBox"];if(!i)return;let{x:t,y:e,width:r,height:n}=i;this._backdropMaskInner&&Ot(this._backdropMaskInner,{x:t,y:e,width:r,height:n})}_updateFrame(){let i=this.$["*cropBox"];if(!(!i||!this._frameGuides||!this._frameThumbs)){for(let t of Object.values(this._frameThumbs)){let{direction:e,pathNode:r,interactionNode:n,groupNode:o}=t,a=e==="",l=e.length===2,{x:c,y:u,width:d,height:p}=i;if(a){let f={x:c+d/3,y:u+p/3,width:d/3,height:p/3};Ot(n,f)}else{let f=vt(Math.min(d,p)/(24*2+34)/2,0,1),{d:_,center:y}=l?js(i,e,f):Hs(i,e,f),x=Math.max(Xi*vt(Math.min(d,p)/Xi/3,0,1),Vs);Ot(n,{x:y[0]-x,y:y[1]-x,width:x*2,height:x*2}),Ot(r,{d:_})}let m=this._shouldThumbBeDisabled(e);o.setAttribute("class",N("thumb",{"thumb--hidden":m,"thumb--visible":!m}))}Ot(this._frameGuides,{x:i.x-1*.5,y:i.y-1*.5,width:i.width+1,height:i.height+1})}}_createThumbs(){let i={};for(let t=0;t<3;t++)for(let e=0;e<3;e++){let r=`${["n","","s"][t]}${["w","","e"][e]}`,n=Y("g");n.classList.add("thumb"),n.setAttribute("with-effects","");let o=Y("rect",{fill:"transparent"}),a=Y("path",{stroke:"currentColor",fill:"none","stroke-width":3});n.appendChild(a),n.appendChild(o),i[r]={direction:r,pathNode:a,interactionNode:o,groupNode:n},o.addEventListener("pointerdown",this._handlePointerDown.bind(this,r))}return i}_createGuides(){let i=Y("svg"),t=Y("rect",{x:0,y:0,width:"100%",height:"100%",fill:"none",stroke:"#000000","stroke-width":1,"stroke-opacity":.5});i.appendChild(t);for(let e=1;e<=2;e++){let r=Y("line",{x1:`${ee*e}%`,y1:"0%",x2:`${ee*e}%`,y2:"100%",stroke:"#000000","stroke-width":1,"stroke-opacity":.3});i.appendChild(r)}for(let e=1;e<=2;e++){let r=Y("line",{x1:"0%",y1:`${ee*e}%`,x2:"100%",y2:`${ee*e}%`,stroke:"#000000","stroke-width":1,"stroke-opacity":.3});i.appendChild(r)}return i.classList.add("guides","guides--semi-hidden"),i}_createFrame(){let i=this.ref["svg-el"],t=document.createDocumentFragment(),e=this._createGuides();t.appendChild(e);let r=this._createThumbs();for(let{groupNode:n}of Object.values(r))t.appendChild(n);i.appendChild(t),this._frameThumbs=r,this._frameGuides=e}_handlePointerDown(i,t){if(!this._frameThumbs)return;let e=this._frameThumbs[i];if(this._shouldThumbBeDisabled(i))return;let r=this.$["*cropBox"],{x:n,y:o}=this.ref["svg-el"].getBoundingClientRect(),a=t.x-n,l=t.y-o;this.$.dragging=!0,this._draggingThumb=e,this._dragStartPoint=[a,l],this._dragStartCrop={...r}}_handlePointerUp_(i){this._updateCursor(),this.$.dragging&&(i.stopPropagation(),i.preventDefault(),this.$.dragging=!1)}_handlePointerMove_(i){if(!this.$.dragging||!this._dragStartPoint||!this._draggingThumb)return;i.stopPropagation(),i.preventDefault();let t=this.ref["svg-el"],{x:e,y:r}=t.getBoundingClientRect(),n=i.x-e,o=i.y-r,a=n-this._dragStartPoint[0],l=o-this._dragStartPoint[1],{direction:c}=this._draggingThumb,u=this._calcCropBox(c,[a,l]);u&&(this.$["*cropBox"]=u)}_calcCropBox(i,t){var c,u;let[e,r]=t,n=this.$["*imageBox"],o=(c=this._dragStartCrop)!=null?c:this.$["*cropBox"],a=(u=this.$["*cropPresetList"])==null?void 0:u[0],l=a?a.width/a.height:void 0;if(i===""?o=Ws({rect:o,delta:[e,r],imageBox:n}):o=Xs({rect:o,delta:[e,r],direction:i,aspectRatio:l,imageBox:n}),!Object.values(o).every(d=>Number.isFinite(d)&&d>=0)){console.error("CropFrame is trying to create invalid rectangle",{payload:o});return}return zt(jt(o),this.$["*imageBox"])}_handleSvgPointerMove_(i){if(!this._frameThumbs)return;let t=Object.values(this._frameThumbs).find(e=>{if(this._shouldThumbBeDisabled(e.direction))return!1;let n=e.interactionNode.getBoundingClientRect(),o={x:n.x,y:n.y,width:n.width,height:n.height};return qs(o,[i.x,i.y])});this._hoverThumb=t,this._updateCursor()}_updateCursor(){let i=this._hoverThumb;this.ref["svg-el"].style.cursor=i?Gs(i.direction):"initial"}_render(){this._updateBackdrop(),this._updateFrame()}toggleThumbs(i){this._frameThumbs&&Object.values(this._frameThumbs).map(({groupNode:t})=>t).forEach(t=>{t.setAttribute("class",N("thumb",{"thumb--hidden":!i,"thumb--visible":i}))})}initCallback(){super.initCallback(),this._createBackdrop(),this._createFrame(),this.sub("*imageBox",()=>{this._resizeBackdrop(),window.requestAnimationFrame(()=>{this._render()})}),this.sub("*cropBox",i=>{i&&(this._guidesHidden=i.height<=b||i.width<=b,window.requestAnimationFrame(()=>{this._render()}))}),this.sub("dragging",i=>{this._frameGuides&&this._frameGuides.setAttribute("class",N({"guides--hidden":this._guidesHidden,"guides--visible":!this._guidesHidden&&i,"guides--semi-hidden":!this._guidesHidden&&!i}))}),this.ref["svg-el"].addEventListener("pointermove",this._handleSvgPointerMove,!0),document.addEventListener("pointermove",this._handlePointerMove,!0),document.addEventListener("pointerup",this._handlePointerUp,!0)}destroyCallback(){super.destroyCallback(),document.removeEventListener("pointermove",this._handlePointerMove),document.removeEventListener("pointerup",this._handlePointerUp)}};ui.template='';var mt=class extends L{constructor(){super(...arguments);h(this,"init$",{...this.init$,active:!1,title:"",icon:"","on.click":null})}initCallback(){super.initCallback(),this._titleEl=this.ref["title-el"],this._iconEl=this.ref["icon-el"],this.setAttribute("role","button"),this.tabIndex===-1&&(this.tabIndex=0),this.sub("title",t=>{this._titleEl&&(this._titleEl.style.display=t?"block":"none")}),this.sub("active",t=>{this.className=N({active:t,not_active:!t})}),this.sub("on.click",t=>{this.onclick=t})}};mt.template=`
{{title}}
`;function Pa(s){let i=s+90;return i=i>=360?0:i,i}function La(s,i){return s==="rotate"?Pa(i):["mirror","flip"].includes(s)?!i:null}var me=class extends mt{initCallback(){super.initCallback(),this.defineAccessor("operation",i=>{i&&(this._operation=i,this.$.icon=i)}),this.$["on.click"]=i=>{let t=this.$["*cropperEl"].getValue(this._operation),e=La(this._operation,t);this.$["*cropperEl"].setValue(this._operation,e)}}};var ge={FILTER:"filter",COLOR_OPERATION:"color_operation"},ot="original",di=class extends L{constructor(){super(...arguments);h(this,"init$",{...this.init$,disabled:!1,min:0,max:100,value:0,defaultValue:0,zero:0,"on.input":t=>{this.$["*faderEl"].set(t),this.$.value=t}})}setOperation(t,e){this._controlType=t==="filter"?ge.FILTER:ge.COLOR_OPERATION,this._operation=t,this._iconName=t,this._title=t.toUpperCase(),this._filter=e,this._initializeValues(),this.$["*faderEl"].activate({url:this.$["*originalUrl"],operation:this._operation,value:this._filter===ot?void 0:this.$.value,filter:this._filter===ot?void 0:this._filter,fromViewer:!1})}_initializeValues(){let{range:t,zero:e}=st[this._operation],[r,n]=t;this.$.min=r,this.$.max=n,this.$.zero=e;let o=this.$["*editorTransformations"][this._operation];if(this._controlType===ge.FILTER){let a=n;if(o){let{name:l,amount:c}=o;a=l===this._filter?c:n}this.$.value=a,this.$.defaultValue=a}if(this._controlType===ge.COLOR_OPERATION){let a=typeof o!="undefined"?o:e;this.$.value=a,this.$.defaultValue=a}}apply(){let t;this._controlType===ge.FILTER?this._filter===ot?t=null:t={name:this._filter,amount:this.$.value}:t=this.$.value;let e={...this.$["*editorTransformations"],[this._operation]:t};this.$["*editorTransformations"]=e}cancel(){this.$["*faderEl"].deactivate({hide:!1})}initCallback(){super.initCallback(),this.sub("*originalUrl",t=>{this._originalUrl=t}),this.sub("value",t=>{let e=`${this._filter||this._operation} ${t}`;this.$["*operationTooltip"]=e})}};di.template=``;function _e(s){let i=new Image;return{promise:new Promise((r,n)=>{i.src=s,i.onload=r,i.onerror=n}),image:i,cancel:()=>{i.naturalWidth===0&&(i.src=K)}}}function be(s){let i=[];for(let n of s){let o=_e(n);i.push(o)}let t=i.map(n=>n.image);return{promise:Promise.allSettled(i.map(n=>n.promise)),images:t,cancel:()=>{i.forEach(n=>{n.cancel()})}}}var Xt=class extends mt{constructor(){super(...arguments);h(this,"init$",{...this.init$,active:!1,title:"",icon:"",isOriginal:!1,iconSize:"20","on.click":null})}_previewSrc(){let t=parseInt(window.getComputedStyle(this).getPropertyValue("--l-base-min-width"),10),e=window.devicePixelRatio,r=Math.ceil(e*t),n=e>=2?"lightest":"normal",o=100,a={...this.$["*editorTransformations"]};return a[this._operation]=this._filter!==ot?{name:this._filter,amount:o}:void 0,O(this._originalUrl,R(We,wt(a),`quality/${n}`,`scale_crop/${r}x${r}/center`))}_observerCallback(t,e){if(t[0].isIntersecting){let n=this.proxyUrl(this._previewSrc()),o=this.ref["preview-el"],{promise:a,cancel:l}=_e(n);this._cancelPreload=l,a.catch(c=>{this.$["*networkProblems"]=!0,console.error("Failed to load image",{error:c})}).finally(()=>{o.style.backgroundImage=`url(${n})`,o.setAttribute("loaded",""),e.unobserve(this)})}else this._cancelPreload&&this._cancelPreload()}initCallback(){super.initCallback(),this.$["on.click"]=e=>{this.$.active?this.$.isOriginal||(this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*showSlider"]=!0):(this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*sliderEl"].apply()),this.$["*currentFilter"]=this._filter},this.defineAccessor("filter",e=>{this._operation="filter",this._filter=e,this.$.isOriginal=e===ot,this.$.icon=this.$.isOriginal?"original":"slider"}),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]});let t=this.$["*originalUrl"];this._originalUrl=t,this.$.isOriginal?this.ref["icon-el"].classList.add("original-icon"):this._observer.observe(this),this.sub("*currentFilter",e=>{this.$.active=e&&e===this._filter}),this.sub("isOriginal",e=>{this.$.iconSize=e?40:20}),this.sub("active",e=>{if(this.$.isOriginal)return;let r=this.ref["icon-el"];r.style.opacity=e?"1":"0";let n=this.ref["preview-el"];e?n.style.opacity="0":n.style.backgroundImage&&(n.style.opacity="1")}),this.sub("*networkProblems",e=>{if(!e){let r=this.proxyUrl(this._previewSrc()),n=this.ref["preview-el"];n.style.backgroundImage&&(n.style.backgroundImage="none",n.style.backgroundImage=`url(${r})`)}})}destroyCallback(){var t;super.destroyCallback(),(t=this._observer)==null||t.disconnect(),this._cancelPreload&&this._cancelPreload()}};Xt.template=`
`;var ye=class extends mt{constructor(){super(...arguments);h(this,"_operation","")}initCallback(){super.initCallback(),this.$["on.click"]=t=>{this.$["*sliderEl"].setOperation(this._operation),this.$["*showSlider"]=!0,this.$["*currentOperation"]=this._operation},this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.$.title=this.l10n(t))}),this.sub("*editorTransformations",t=>{if(!this._operation)return;let{zero:e}=st[this._operation],r=t[this._operation],n=typeof r!="undefined"?r!==e:!1;this.$.active=n})}};function Kr(s,i){let t={};for(let e of i){let r=s[e];(s.hasOwnProperty(e)||r!==void 0)&&(t[e]=r)}return t}function qt(s,i,t){let r=window.devicePixelRatio,n=Math.min(Math.ceil(i*r),3e3),o=r>=2?"lightest":"normal";return O(s,R(We,wt(t),`quality/${o}`,`stretch/off/-/resize/${n}x`))}function Ua(s){return s?[({dimensions:t,coords:e})=>[...t,...e].every(r=>Number.isInteger(r)&&Number.isFinite(r)),({dimensions:t,coords:e})=>t.every(r=>r>0)&&e.every(r=>r>=0)].every(t=>t(s)):!0}var pi=class extends L{constructor(){super(),this.init$={...this.init$,image:null,"*padding":20,"*operations":{rotate:0,mirror:!1,flip:!1},"*imageBox":{x:0,y:0,width:0,height:0},"*cropBox":{x:0,y:0,width:0,height:0}},this._commitDebounced=k(this._commit.bind(this),300),this._handleResizeThrottled=ii(this._handleResize.bind(this),100),this._imageSize={width:0,height:0}}_handleResize(){!this.isConnected||!this._isActive||(this._initCanvas(),this._syncTransformations(),this._alignImage(),this._alignCrop(),this._draw())}_syncTransformations(){let i=this.$["*editorTransformations"],t=Kr(i,Object.keys(this.$["*operations"])),e={...this.$["*operations"],...t};this.$["*operations"]=e}_initCanvas(){let i=this.ref["canvas-el"],t=i.getContext("2d"),e=this.offsetWidth,r=this.offsetHeight,n=window.devicePixelRatio;i.style.width=`${e}px`,i.style.height=`${r}px`,i.width=e*n,i.height=r*n,t==null||t.scale(n,n),this._canvas=i,this._ctx=t}_alignImage(){if(!this._isActive||!this.$.image)return;let i=this.$.image,t=this.$["*padding"],e=this.$["*operations"],{rotate:r}=e,n={width:this.offsetWidth,height:this.offsetHeight},o=Vt({width:i.naturalWidth,height:i.naturalHeight},r),a;if(o.width>n.width-t*2||o.height>n.height-t*2){let l=o.width/o.height,c=n.width/n.height;if(l>c){let u=n.width-t*2,d=u/l,p=0+t,m=t+(n.height-t*2)/2-d/2;a={x:p,y:m,width:u,height:d}}else{let u=n.height-t*2,d=u*l,p=t+(n.width-t*2)/2-d/2,m=0+t;a={x:p,y:m,width:d,height:u}}}else{let{width:l,height:c}=o,u=t+(n.width-t*2)/2-l/2,d=t+(n.height-t*2)/2-c/2;a={x:u,y:d,width:l,height:c}}this.$["*imageBox"]=jt(a)}_alignCrop(){var d;let i=this.$["*cropBox"],t=this.$["*imageBox"],e=this.$["*operations"],{rotate:r}=e,n=this.$["*editorTransformations"].crop,{width:o,x:a,y:l}=this.$["*imageBox"];if(n){let{dimensions:[p,m],coords:[f,_]}=n,{width:y}=Vt(this._imageSize,r),x=o/y;i=zt(jt({x:a+f*x,y:l+_*x,width:p*x,height:m*x}),this.$["*imageBox"])}let c=(d=this.$["*cropPresetList"])==null?void 0:d[0],u=c?c.width/c.height:void 0;if(!Ks(i,t)||u&&!Ys(i,u)){let p=t.width/t.height,m=t.width,f=t.height;u&&(p>u?m=Math.min(t.height*u,t.width):f=Math.min(t.width/u,t.height)),i={x:t.x+t.width/2-m/2,y:t.y+t.height/2-f/2,width:m,height:f}}this.$["*cropBox"]=zt(jt(i),this.$["*imageBox"])}_drawImage(){let i=this._ctx;if(!i)return;let t=this.$.image,e=this.$["*imageBox"],r=this.$["*operations"],{mirror:n,flip:o,rotate:a}=r,l=Vt({width:e.width,height:e.height},a);i.save(),i.translate(e.x+e.width/2,e.y+e.height/2),i.rotate(a*Math.PI*-1/180),i.scale(n?-1:1,o?-1:1),i.drawImage(t,-l.width/2,-l.height/2,l.width,l.height),i.restore()}_draw(){if(!this._isActive||!this.$.image||!this._canvas||!this._ctx)return;let i=this._canvas;this._ctx.clearRect(0,0,i.width,i.height),this._drawImage()}_animateIn({fromViewer:i}){this.$.image&&(this.ref["frame-el"].toggleThumbs(!0),this._transitionToImage(),setTimeout(()=>{this.className=N({active_from_viewer:i,active_from_editor:!i,inactive_to_editor:!1})}))}_getCropDimensions(){let i=this.$["*cropBox"],t=this.$["*imageBox"],e=this.$["*operations"],{rotate:r}=e,{width:n,height:o}=t,{width:a,height:l}=Vt(this._imageSize,r),{width:c,height:u}=i,d=n/a,p=o/l;return[vt(Math.round(c/d),1,a),vt(Math.round(u/p),1,l)]}_getCropTransformation(){let i=this.$["*cropBox"],t=this.$["*imageBox"],e=this.$["*operations"],{rotate:r}=e,{width:n,height:o,x:a,y:l}=t,{width:c,height:u}=Vt(this._imageSize,r),{x:d,y:p}=i,m=n/c,f=o/u,_=this._getCropDimensions(),y={dimensions:_,coords:[vt(Math.round((d-a)/m),0,c-_[0]),vt(Math.round((p-l)/f),0,u-_[1])]};if(!Ua(y)){console.error("Cropper is trying to create invalid crop object",{payload:y});return}if(!(_[0]===c&&_[1]===u))return y}_commit(){if(!this.isConnected)return;let i=this.$["*operations"],{rotate:t,mirror:e,flip:r}=i,n=this._getCropTransformation(),a={...this.$["*editorTransformations"],crop:n,rotate:t,mirror:e,flip:r};this.$["*editorTransformations"]=a}setValue(i,t){this.$["*operations"]={...this.$["*operations"],[i]:t},this._isActive&&(this._alignImage(),this._alignCrop(),this._draw())}getValue(i){return this.$["*operations"][i]}async activate(i,{fromViewer:t}={}){if(!this._isActive){this._isActive=!0,this._imageSize=i,this.removeEventListener("transitionend",this._reset);try{this.$.image=await this._waitForImage(this.$["*originalUrl"],this.$["*editorTransformations"]),this._syncTransformations(),this._animateIn({fromViewer:t})}catch(e){console.error("Failed to activate cropper",{error:e})}this._observer=new ResizeObserver(([e])=>{e.contentRect.width>0&&e.contentRect.height>0&&this._isActive&&this.$.image&&this._handleResizeThrottled()}),this._observer.observe(this)}}deactivate({reset:i=!1}={}){var t;this._isActive&&(!i&&this._commit(),this._isActive=!1,this._transitionToCrop(),this.className=N({active_from_viewer:!1,active_from_editor:!1,inactive_to_editor:!0}),this.ref["frame-el"].toggleThumbs(!1),this.addEventListener("transitionend",this._reset,{once:!0}),(t=this._observer)==null||t.disconnect())}_transitionToCrop(){let i=this._getCropDimensions(),t=Math.min(this.offsetWidth,i[0])/this.$["*cropBox"].width,e=Math.min(this.offsetHeight,i[1])/this.$["*cropBox"].height,r=Math.min(t,e),n=this.$["*cropBox"].x+this.$["*cropBox"].width/2,o=this.$["*cropBox"].y+this.$["*cropBox"].height/2;this.style.transform=`scale(${r}) translate(${(this.offsetWidth/2-n)/r}px, ${(this.offsetHeight/2-o)/r}px)`,this.style.transformOrigin=`${n}px ${o}px`}_transitionToImage(){let i=this.$["*cropBox"].x+this.$["*cropBox"].width/2,t=this.$["*cropBox"].y+this.$["*cropBox"].height/2;this.style.transform="scale(1)",this.style.transformOrigin=`${i}px ${t}px`}_reset(){this._isActive||(this.$.image=null)}_waitForImage(i,t){let e=this.offsetWidth;t={...t,crop:void 0,rotate:void 0,flip:void 0,mirror:void 0};let r=this.proxyUrl(qt(i,e,t)),{promise:n,cancel:o,image:a}=_e(r),l=this._handleImageLoading(r);return a.addEventListener("load",l,{once:!0}),a.addEventListener("error",l,{once:!0}),this._cancelPreload&&this._cancelPreload(),this._cancelPreload=o,n.then(()=>a).catch(c=>(console.error("Failed to load image",{error:c}),this.$["*networkProblems"]=!0,Promise.resolve(a)))}_handleImageLoading(i){let t="crop",e=this.$["*loadingOperations"];return e.get(t)||e.set(t,new Map),e.get(t).get(i)||(e.set(t,e.get(t).set(i,!0)),this.$["*loadingOperations"]=e),()=>{var r;(r=e==null?void 0:e.get(t))!=null&&r.has(i)&&(e.get(t).delete(i),this.$["*loadingOperations"]=e)}}initCallback(){super.initCallback(),this.sub("*imageBox",()=>{this._draw()}),this.sub("*cropBox",()=>{this.$.image&&this._commitDebounced()}),this.sub("*cropPresetList",()=>{this._alignCrop()}),setTimeout(()=>{this.sub("*networkProblems",i=>{i||this._isActive&&this.activate(this._imageSize,{fromViewer:!1})})},0)}destroyCallback(){var i;super.destroyCallback(),(i=this._observer)==null||i.disconnect()}};pi.template=``;function ls(s,i,t){let e=Array(t);t--;for(let r=t;r>=0;r--)e[r]=Math.ceil((r*i+(t-r)*s)/t);return e}function Ra(s){return s.reduce((i,t,e)=>er<=i&&i<=n);return s.map(r=>{let n=Math.abs(e[0]-e[1]),o=Math.abs(i-e[0])/n;return e[0]===r?i>t?1:1-o:e[1]===r?i>=t?o:1:0})}function Na(s,i){return s.map((t,e)=>tn-o)}var cs=class extends L{constructor(){super(),this._isActive=!1,this._hidden=!0,this._addKeypointDebounced=k(this._addKeypoint.bind(this),600),this.classList.add("inactive_to_cropper")}_handleImageLoading(i){let t=this._operation,e=this.$["*loadingOperations"];return e.get(t)||e.set(t,new Map),e.get(t).get(i)||(e.set(t,e.get(t).set(i,!0)),this.$["*loadingOperations"]=e),()=>{var r;(r=e==null?void 0:e.get(t))!=null&&r.has(i)&&(e.get(t).delete(i),this.$["*loadingOperations"]=e)}}_flush(){window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{for(let i of this._keypoints){let{image:t}=i;t&&(t.style.opacity=i.opacity.toString(),t.style.zIndex=i.zIndex.toString())}})}_imageSrc({url:i=this._url,filter:t=this._filter,operation:e,value:r}={}){let n={...this._transformations};e&&(n[e]=t?{name:t,amount:r}:r);let o=this.offsetWidth;return this.proxyUrl(qt(i,o,n))}_constructKeypoint(i,t){return{src:this._imageSrc({operation:i,value:t}),image:null,opacity:0,zIndex:0,value:t}}_isSame(i,t){return this._operation===i&&this._filter===t}_addKeypoint(i,t,e){let r=()=>!this._isSame(i,t)||this._value!==e||!!this._keypoints.find(l=>l.value===e);if(r())return;let n=this._constructKeypoint(i,e),o=new Image;o.src=n.src;let a=this._handleImageLoading(n.src);o.addEventListener("load",a,{once:!0}),o.addEventListener("error",a,{once:!0}),n.image=o,o.classList.add("fader-image"),o.addEventListener("load",()=>{if(r())return;let l=this._keypoints,c=l.findIndex(d=>d.value>e),u=c{this.$["*networkProblems"]=!0},{once:!0})}set(i){i=typeof i=="string"?parseInt(i,10):i,this._update(this._operation,i),this._addKeypointDebounced(this._operation,this._filter,i)}_update(i,t){this._operation=i,this._value=t;let{zero:e}=st[i],r=this._keypoints.map(a=>a.value),n=Ma(r,t,e),o=Na(r,e);for(let[a,l]of Object.entries(this._keypoints))l.opacity=n[a],l.zIndex=o[a];this._flush()}_createPreviewImage(){let i=new Image;return i.classList.add("fader-image","fader-image--preview"),i.style.opacity="0",i}async _initNodes(){let i=document.createDocumentFragment();this._previewImage=this._previewImage||this._createPreviewImage(),!this.contains(this._previewImage)&&i.appendChild(this._previewImage);let t=document.createElement("div");i.appendChild(t);let e=this._keypoints.map(c=>c.src),{images:r,promise:n,cancel:o}=be(e);r.forEach(c=>{let u=this._handleImageLoading(c.src);c.addEventListener("load",u),c.addEventListener("error",u)}),this._cancelLastImages=()=>{o(),this._cancelLastImages=void 0};let a=this._operation,l=this._filter;await n,this._isActive&&this._isSame(a,l)&&(this._container&&this._container.remove(),this._container=t,this._keypoints.forEach((c,u)=>{let d=r[u];d.classList.add("fader-image"),c.image=d,this._container.appendChild(d)}),this.appendChild(i),this._flush())}setTransformations(i){if(this._transformations=i,this._previewImage){let t=this._imageSrc(),e=this._handleImageLoading(t);this._previewImage.src=t,this._previewImage.addEventListener("load",e,{once:!0}),this._previewImage.addEventListener("error",e,{once:!0}),this._previewImage.style.opacity="1",this._previewImage.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}}preload({url:i,filter:t,operation:e,value:r}){this._cancelBatchPreload&&this._cancelBatchPreload();let o=Yr(e,r).map(l=>this._imageSrc({url:i,filter:t,operation:e,value:l})),{cancel:a}=be(o);this._cancelBatchPreload=a}_setOriginalSrc(i){let t=this._previewImage||this._createPreviewImage();if(!this.contains(t)&&this.appendChild(t),this._previewImage=t,t.src===i){t.style.opacity="1",t.style.transform="scale(1)",this.className=N({active_from_viewer:this._fromViewer,active_from_cropper:!this._fromViewer,inactive_to_cropper:!1});return}t.style.opacity="0";let e=this._handleImageLoading(i);t.addEventListener("error",e,{once:!0}),t.src=i,t.addEventListener("load",()=>{e(),t&&(t.style.opacity="1",t.style.transform="scale(1)",this.className=N({active_from_viewer:this._fromViewer,active_from_cropper:!this._fromViewer,inactive_to_cropper:!1}))},{once:!0}),t.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}activate({url:i,operation:t,value:e,filter:r,fromViewer:n}){if(this._isActive=!0,this._hidden=!1,this._url=i,this._operation=t||"initial",this._value=e,this._filter=r,this._fromViewer=n,typeof e!="number"&&!r){let a=this._imageSrc({operation:t,value:e});this._setOriginalSrc(a),this._container&&this._container.remove();return}this._keypoints=Yr(t,e).map(a=>this._constructKeypoint(t,a)),this._update(t,e),this._initNodes()}deactivate({hide:i=!0}={}){this._isActive=!1,this._cancelLastImages&&this._cancelLastImages(),this._cancelBatchPreload&&this._cancelBatchPreload(),i&&!this._hidden?(this._hidden=!0,this._previewImage&&(this._previewImage.style.transform="scale(1)"),this.className=N({active_from_viewer:!1,active_from_cropper:!1,inactive_to_cropper:!0}),this.addEventListener("transitionend",()=>{this._container&&this._container.remove()},{once:!0})):this._container&&this._container.remove()}};var Da=1,fi=class extends L{initCallback(){super.initCallback(),this.addEventListener("wheel",i=>{i.preventDefault();let{deltaY:t,deltaX:e}=i;Math.abs(e)>Da?this.scrollLeft+=e:this.scrollLeft+=t})}};fi.template=" ";function Fa(s){return``}function Ba(s){return`
`}var mi=class extends L{constructor(){super();h(this,"_updateInfoTooltip",k(()=>{var o,a;let t=this.$["*editorTransformations"],e=this.$["*currentOperation"],r="",n=!1;if(this.$["*tabId"]===P.FILTERS)if(n=!0,this.$["*currentFilter"]&&((o=t==null?void 0:t.filter)==null?void 0:o.name)===this.$["*currentFilter"]){let l=((a=t==null?void 0:t.filter)==null?void 0:a.amount)||100;r=this.l10n(this.$["*currentFilter"])+" "+l}else r=this.l10n(ot);else if(this.$["*tabId"]===P.TUNING&&e){n=!0;let l=(t==null?void 0:t[e])||st[e].zero;r=e+" "+l}n&&(this.$["*operationTooltip"]=r),this.ref["tooltip-el"].classList.toggle("info-tooltip_visible",n)},0));this.init$={...this.init$,"*sliderEl":null,"*loadingOperations":new Map,"*showSlider":!1,"*currentFilter":ot,"*currentOperation":null,showLoader:!1,filters:yr,colorOperations:br,cropOperations:vr,"*operationTooltip":null,"l10n.cancel":this.l10n("cancel"),"l10n.apply":this.l10n("apply"),"presence.mainToolbar":!0,"presence.subToolbar":!1,"presence.tabToggles":!0,"presence.tabContent.crop":!1,"presence.tabContent.tuning":!1,"presence.tabContent.filters":!1,"presence.tabToggle.crop":!0,"presence.tabToggle.tuning":!0,"presence.tabToggle.filters":!0,"presence.subTopToolbarStyles":{hidden:"sub-toolbar--top-hidden",visible:"sub-toolbar--visible"},"presence.subBottomToolbarStyles":{hidden:"sub-toolbar--bottom-hidden",visible:"sub-toolbar--visible"},"presence.tabContentStyles":{hidden:"tab-content--hidden",visible:"tab-content--visible"},"presence.tabToggleStyles":{hidden:"tab-toggle--hidden",visible:"tab-toggle--visible"},"presence.tabTogglesStyles":{hidden:"tab-toggles--hidden",visible:"tab-toggles--visible"},"on.cancel":()=>{this._cancelPreload&&this._cancelPreload(),this.$["*on.cancel"]()},"on.apply":()=>{this.$["*on.apply"](this.$["*editorTransformations"])},"on.applySlider":()=>{this.ref["slider-el"].apply(),this._onSliderClose()},"on.cancelSlider":()=>{this.ref["slider-el"].cancel(),this._onSliderClose()},"on.clickTab":t=>{let e=t.currentTarget.getAttribute("data-id");e&&this._activateTab(e,{fromViewer:!1})}},this._debouncedShowLoader=k(this._showLoader.bind(this),500)}_onSliderClose(){this.$["*showSlider"]=!1,this.$["*tabId"]===P.TUNING&&this.ref["tooltip-el"].classList.toggle("info-tooltip_visible",!1)}_createOperationControl(t){let e=new ye;return e.operation=t,e}_createFilterControl(t){let e=new Xt;return e.filter=t,e}_createToggleControl(t){let e=new me;return e.operation=t,e}_renderControlsList(t){let e=this.ref[`controls-list-${t}`],r=document.createDocumentFragment();t===P.CROP?this.$.cropOperations.forEach(n=>{let o=this._createToggleControl(n);r.appendChild(o)}):t===P.FILTERS?[ot,...this.$.filters].forEach(n=>{let o=this._createFilterControl(n);r.appendChild(o)}):t===P.TUNING&&this.$.colorOperations.forEach(n=>{let o=this._createOperationControl(n);r.appendChild(o)}),[...r.children].forEach((n,o)=>{o===r.childNodes.length-1&&n.classList.add("controls-list_last-item")}),e.innerHTML="",e.appendChild(r)}_activateTab(t,{fromViewer:e}){this.$["*tabId"]=t,t===P.CROP?(this.$["*faderEl"].deactivate(),this.$["*cropperEl"].activate(this.$["*imageSize"],{fromViewer:e})):(this.$["*faderEl"].activate({url:this.$["*originalUrl"],fromViewer:e}),this.$["*cropperEl"].deactivate());for(let r of W){let n=r===t,o=this.ref[`tab-toggle-${r}`];o.active=n,n?(this._renderControlsList(t),this._syncTabIndicator()):this._unmountTabControls(r),this.$[`presence.tabContent.${r}`]=n}}_unmountTabControls(t){let e=this.ref[`controls-list-${t}`];e&&(e.innerHTML="")}_syncTabIndicator(){let t=this.ref[`tab-toggle-${this.$["*tabId"]}`],e=this.ref["tabs-indicator"];e.style.transform=`translateX(${t.offsetLeft}px)`}_preloadEditedImage(){if(this.$["*imgContainerEl"]&&this.$["*originalUrl"]){let t=this.$["*imgContainerEl"].offsetWidth,e=this.proxyUrl(qt(this.$["*originalUrl"],t,this.$["*editorTransformations"]));this._cancelPreload&&this._cancelPreload();let{cancel:r}=be([e]);this._cancelPreload=()=>{r(),this._cancelPreload=void 0}}}_showLoader(t){this.$.showLoader=t}initCallback(){super.initCallback(),this.$["*sliderEl"]=this.ref["slider-el"],this.sub("*imageSize",t=>{t&&setTimeout(()=>{this._activateTab(this.$["*tabId"],{fromViewer:!0})},0)}),this.sub("*editorTransformations",t=>{var r;let e=(r=t==null?void 0:t.filter)==null?void 0:r.name;this.$["*currentFilter"]!==e&&(this.$["*currentFilter"]=e)}),this.sub("*currentFilter",()=>{this._updateInfoTooltip()}),this.sub("*currentOperation",()=>{this._updateInfoTooltip()}),this.sub("*tabId",()=>{this._updateInfoTooltip()}),this.sub("*originalUrl",()=>{this.$["*faderEl"]&&this.$["*faderEl"].deactivate()}),this.sub("*editorTransformations",t=>{this._preloadEditedImage(),this.$["*faderEl"]&&this.$["*faderEl"].setTransformations(t)}),this.sub("*loadingOperations",t=>{let e=!1;for(let[,r]of t.entries()){if(e)break;for(let[,n]of r.entries())if(n){e=!0;break}}this._debouncedShowLoader(e)}),this.sub("*showSlider",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t}),this.sub("*tabList",t=>{this.$["presence.tabToggles"]=t.length>1;for(let e of W){this.$[`presence.tabToggle.${e}`]=t.includes(e);let r=this.ref[`tab-toggle-${e}`];r.style.gridColumn=t.indexOf(e)+1}t.includes(this.$["*tabId"])||this._activateTab(t[0],{fromViewer:!1})}),this._updateInfoTooltip()}};mi.template=`
{{*operationTooltip}}
${W.map(Ba).join("")}
${W.map(Fa).join("")}
`;var ve=class extends C{constructor(){super(),this._iconReversed=!1,this._iconSingle=!1,this._iconHidden=!1,this.init$={...this.init$,text:"",icon:"",iconCss:this._iconCss(),theme:null},this.defineAccessor("active",i=>{i?this.setAttribute("active",""):this.removeAttribute("active")})}_iconCss(){return N("icon",{icon_left:!this._iconReversed,icon_right:this._iconReversed,icon_hidden:this._iconHidden,icon_single:this._iconSingle})}initCallback(){super.initCallback(),this.sub("icon",i=>{this._iconSingle=!this.$.text,this._iconHidden=!i,this.$.iconCss=this._iconCss()}),this.sub("theme",i=>{i!=="custom"&&(this.className=i)}),this.sub("text",i=>{this._iconSingle=!1}),this.setAttribute("role","button"),this.tabIndex===-1&&(this.tabIndex=0),this.hasAttribute("theme")||this.setAttribute("theme","default")}set reverse(i){this.hasAttribute("reverse")?(this.style.flexDirection="row-reverse",this._iconReversed=!0):(this._iconReversed=!1,this.style.flexDirection=null)}};ve.bindAttributes({text:"text",icon:"icon",reverse:"reverse",theme:"theme"});ve.template=`
{{text}}
`;var gi=class extends C{constructor(){super(),this._active=!1,this._handleTransitionEndRight=()=>{let i=this.ref["line-el"];i.style.transition="initial",i.style.opacity="0",i.style.transform="translateX(-101%)",this._active&&this._start()}}initCallback(){super.initCallback(),this.defineAccessor("active",i=>{typeof i=="boolean"&&(i?this._start():this._stop())})}_start(){this._active=!0;let{width:i}=this.getBoundingClientRect(),t=this.ref["line-el"];t.style.transition="transform 1s",t.style.opacity="1",t.style.transform=`translateX(${i}px)`,t.addEventListener("transitionend",this._handleTransitionEndRight,{once:!0})}_stop(){this._active=!1}};gi.template=`
`;var _i={transition:"transition",visible:"visible",hidden:"hidden"},bi=class extends C{constructor(){super(),this._visible=!1,this._visibleStyle=_i.visible,this._hiddenStyle=_i.hidden,this._externalTransitions=!1,this.defineAccessor("styles",i=>{i&&(this._externalTransitions=!0,this._visibleStyle=i.visible,this._hiddenStyle=i.hidden)}),this.defineAccessor("visible",i=>{typeof i=="boolean"&&(this._visible=i,this._handleVisible())})}_handleVisible(){this.style.visibility=this._visible?"inherit":"hidden",Gr(this,{[_i.transition]:!this._externalTransitions,[this._visibleStyle]:this._visible,[this._hiddenStyle]:!this._visible}),this.setAttribute("aria-hidden",this._visible?"false":"true")}initCallback(){super.initCallback(),this.setAttribute("hidden",""),this._externalTransitions||this.classList.add(_i.transition),this._handleVisible(),setTimeout(()=>this.removeAttribute("hidden"),0)}};bi.template=" ";var yi=class extends C{constructor(){super();h(this,"init$",{...this.init$,disabled:!1,min:0,max:100,onInput:null,onChange:null,defaultValue:null,"on.sliderInput":()=>{let t=parseInt(this.ref["input-el"].value,10);this._updateValue(t),this.$.onInput&&this.$.onInput(t)},"on.sliderChange":()=>{let t=parseInt(this.ref["input-el"].value,10);this.$.onChange&&this.$.onChange(t)}});this.setAttribute("with-effects","")}initCallback(){super.initCallback(),this.defineAccessor("disabled",e=>{this.$.disabled=e}),this.defineAccessor("min",e=>{this.$.min=e}),this.defineAccessor("max",e=>{this.$.max=e}),this.defineAccessor("defaultValue",e=>{this.$.defaultValue=e,this.ref["input-el"].value=e,this._updateValue(e)}),this.defineAccessor("zero",e=>{this._zero=e}),this.defineAccessor("onInput",e=>{e&&(this.$.onInput=e)}),this.defineAccessor("onChange",e=>{e&&(this.$.onChange=e)}),this._updateSteps(),this._observer=new ResizeObserver(()=>{this._updateSteps();let e=parseInt(this.ref["input-el"].value,10);this._updateValue(e)}),this._observer.observe(this),this._thumbSize=parseInt(window.getComputedStyle(this).getPropertyValue("--l-thumb-size"),10),setTimeout(()=>{let e=parseInt(this.ref["input-el"].value,10);this._updateValue(e)},0),this.sub("disabled",e=>{let r=this.ref["input-el"];e?r.setAttribute("disabled","disabled"):r.removeAttribute("disabled")});let t=this.ref["input-el"];t.addEventListener("focus",()=>{this.style.setProperty("--color-effect","var(--hover-color-rgb)")}),t.addEventListener("blur",()=>{this.style.setProperty("--color-effect","var(--idle-color-rgb)")})}_updateValue(t){this._updateZeroDot(t);let{width:e}=this.getBoundingClientRect(),o=100/(this.$.max-this.$.min)*(t-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this.ref["thumb-el"].style.transform=`translateX(${o}px)`})}_updateZeroDot(t){if(!this._zeroDotEl)return;t===this._zero?this._zeroDotEl.style.opacity="0":this._zeroDotEl.style.opacity="0.2";let{width:e}=this.getBoundingClientRect(),o=100/(this.$.max-this.$.min)*(this._zero-this.$.min)*(e-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._zeroDotEl.style.transform=`translateX(${o}px)`})}_updateSteps(){let e=this.ref["steps-el"],{width:r}=e.getBoundingClientRect(),n=Math.ceil(r/2),o=Math.ceil(n/15)-2;if(this._stepsCount===o)return;let a=document.createDocumentFragment(),l=document.createElement("div"),c=document.createElement("div");l.className="minor-step",c.className="border-step",a.appendChild(c);for(let d=0;d
`;var hs=class extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);h(this,"activityType",g.activities.CLOUD_IMG_EDIT);this.init$={...this.init$,cdnUrl:null}}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>this.mountEditor(),onDeactivate:()=>this.unmountEditor()}),this.sub("*focusedEntry",t=>{t&&(this.entry=t,this.entry.subscribe("cdnUrl",e=>{e&&(this.$.cdnUrl=e)}))}),this.subConfigValue("cropPreset",t=>{this._instance&&this._instance.getAttribute("crop-preset")!==t&&this._instance.setAttribute("crop-preset",t)}),this.subConfigValue("cloudImageEditorTabs",t=>{this._instance&&this._instance.getAttribute("tabs")!==t&&this._instance.setAttribute("tabs",t)})}handleApply(t){if(!this.entry)return;let e=t.detail;this.entry.setMultipleValues({cdnUrl:e.cdnUrl,cdnUrlModifiers:e.cdnUrlModifiers}),this.historyBack()}handleCancel(){this.historyBack()}mountEditor(){let t=new nt,e=this.$.cdnUrl,r=this.cfg.cropPreset,n=this.cfg.cloudImageEditorTabs;t.setAttribute("ctx-name",this.ctxName),t.setAttribute("cdn-url",e),r&&t.setAttribute("crop-preset",r),n&&t.setAttribute("tabs",n),t.addEventListener("apply",o=>{let a=o;this.handleApply(a),this.debugPrint('editor event "apply"',a.detail)}),t.addEventListener("cancel",o=>{let a=o;this.handleCancel(),this.debugPrint('editor event "cancel"',a.detail)}),t.addEventListener("change",o=>{let a=o;this.debugPrint('editor event "change"',a.detail)}),this.innerHTML="",this.appendChild(t),this._mounted=!0,this._instance=t}unmountEditor(){this._instance=void 0,this.innerHTML=""}};var za=function(s){return s.replace(/[\\-\\[]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},Jr=function(s,i="i"){let t=s.split("*").map(za);return new RegExp("^"+t.join(".+")+"$",i)};var Va=s=>Object.keys(s).reduce((t,e)=>{let r=s[e],n=Object.keys(r).reduce((o,a)=>{let l=r[a];return o+`${a}: ${l};`},"");return t+`${e}{${n}}`},"");function Zr({textColor:s,backgroundColor:i,linkColor:t,linkColorHover:e,shadeColor:r}){let n=`solid 1px ${r}`;return Va({body:{color:s,"background-color":i},".side-bar":{background:"inherit","border-right":n},".main-content":{background:"inherit"},".main-content-header":{background:"inherit"},".main-content-footer":{background:"inherit"},".list-table-row":{color:"inherit"},".list-table-row:hover":{background:r},".list-table-row .list-table-cell-a, .list-table-row .list-table-cell-b":{"border-top":n},".list-table-body .list-items":{"border-bottom":n},".bread-crumbs a":{color:t},".bread-crumbs a:hover":{color:e},".main-content.loading":{background:`${i} url(/static/images/loading_spinner.gif) center no-repeat`,"background-size":"25px 25px"},".list-icons-item":{"background-color":r},".source-gdrive .side-bar-menu a, .source-gphotos .side-bar-menu a":{color:t},".source-gdrive .side-bar-menu a, .source-gphotos .side-bar-menu a:hover":{color:e},".side-bar-menu a":{color:t},".side-bar-menu a:hover":{color:e},".source-gdrive .side-bar-menu .current, .source-gdrive .side-bar-menu a:hover, .source-gphotos .side-bar-menu .current, .source-gphotos .side-bar-menu a:hover":{color:e},".source-vk .side-bar-menu a":{color:t},".source-vk .side-bar-menu a:hover":{color:e,background:"none"}})}var xt={};window.addEventListener("message",s=>{let i;try{i=JSON.parse(s.data)}catch{return}if((i==null?void 0:i.type)in xt){let t=xt[i.type];for(let[e,r]of t)s.source===e&&r(i)}});var Qr=function(s,i,t){s in xt||(xt[s]=[]),xt[s].push([i,t])},tn=function(s,i){s in xt&&(xt[s]=xt[s].filter(t=>t[0]!==i))};function en(s){let i=[];for(let[t,e]of Object.entries(s))e==null||typeof e=="string"&&e.length===0||i.push(`${t}=${encodeURIComponent(e)}`);return i.join("&")}var vi=class extends A{constructor(){super();h(this,"couldBeCtxOwner",!0);h(this,"activityType",g.activities.EXTERNAL);h(this,"_iframe",null);h(this,"updateCssData",()=>{this.isActivityActive&&(this._inheritedUpdateCssData(),this.applyStyles())});h(this,"_inheritedUpdateCssData",this.updateCssData);this.init$={...this.init$,activityIcon:"",activityCaption:"",selectedList:[],counter:0,multiple:!1,onDone:()=>{for(let t of this.$.selectedList){let e=this.extractUrlFromMessage(t),{filename:r}=t,{externalSourceType:n}=this.activityParams;this.addFileFromUrl(e,{fileName:r,source:n})}this.$["*currentActivity"]=g.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()}}}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{let{externalSourceType:t}=this.activityParams;this.set$({activityCaption:`${t==null?void 0:t[0].toUpperCase()}${t==null?void 0:t.slice(1)}`,activityIcon:t}),this.mountIframe()}}),this.sub("*currentActivity",t=>{t!==this.activityType&&this.unmountIframe()}),this.sub("selectedList",t=>{this.$.counter=t.length}),this.subConfigValue("multiple",t=>{this.$.multiple=t})}extractUrlFromMessage(t){if(t.alternatives){let e=M(this.cfg.externalSourcesPreferredTypes);for(let r of e){let n=Jr(r);for(let[o,a]of Object.entries(t.alternatives))if(n.test(o))return a}}return t.url}sendMessage(t){var e,r;(r=(e=this._iframe)==null?void 0:e.contentWindow)==null||r.postMessage(JSON.stringify(t),"*")}async handleFileSelected(t){!this.$.multiple&&this.$.selectedList.length||(this.$.selectedList=[...this.$.selectedList,t],this.$.multiple||this.$.onDone())}handleIframeLoad(){this.applyStyles()}getCssValue(t){return window.getComputedStyle(this).getPropertyValue(t).trim()}applyStyles(){let t={backgroundColor:this.getCssValue("--clr-background-light"),textColor:this.getCssValue("--clr-txt"),shadeColor:this.getCssValue("--clr-shade-lv1"),linkColor:"#157cfc",linkColorHover:"#3891ff"};this.sendMessage({type:"embed-css",style:Zr(t)})}remoteUrl(){var a,l;let t=this.cfg.pubkey,e="false",{externalSourceType:r}=this.activityParams,n={lang:((l=(a=this.getCssData("--l10n-locale-name"))==null?void 0:a.split("-"))==null?void 0:l[0])||"en",public_key:t,images_only:e,pass_window_open:!1,session_key:this.cfg.remoteTabSessionKey},o=new URL(this.cfg.socialBaseUrl);return o.pathname=`/window3/${r}`,o.search=en(n),o.toString()}mountIframe(){let t=Jt({tag:"iframe",attributes:{src:this.remoteUrl(),marginheight:0,marginwidth:0,frameborder:0,allowTransparency:!0}});t.addEventListener("load",this.handleIframeLoad.bind(this)),this.ref.iframeWrapper.innerHTML="",this.ref.iframeWrapper.appendChild(t),Qr("file-selected",t.contentWindow,this.handleFileSelected.bind(this)),this._iframe=t,this.$.selectedList=[]}unmountIframe(){this._iframe&&tn("file-selected",this._iframe.contentWindow),this.ref.iframeWrapper.innerHTML="",this._iframe=null,this.$.selectedList=[],this.$.counter=0}};vi.template=`
{{activityCaption}}
{{counter}}
`;var Ce=class extends C{setCurrentTab(i){if(!i)return;[...this.ref.context.querySelectorAll("[tab-ctx]")].forEach(e=>{e.getAttribute("tab-ctx")===i?e.removeAttribute("hidden"):e.setAttribute("hidden","")});for(let e in this._tabMap)e===i?this._tabMap[e].setAttribute("current",""):this._tabMap[e].removeAttribute("current")}initCallback(){super.initCallback(),this._tabMap={},this.defineAccessor("tab-list",i=>{if(!i)return;M(i).forEach(e=>{let r=Jt({tag:"div",attributes:{class:"tab"},properties:{onclick:()=>{this.setCurrentTab(e)}}});r.textContent=this.l10n(e),this.ref.row.appendChild(r),this._tabMap[e]=r})}),this.defineAccessor("default",i=>{this.setCurrentTab(i)}),this.hasAttribute("default")||this.setCurrentTab(Object.keys(this._tabMap)[0])}};Ce.bindAttributes({"tab-list":null,default:null});Ce.template=`
`;var us=class extends A{constructor(){super(...arguments);h(this,"requireCtxName",!0)}_createValidationInput(){let t=document.createElement("input");return t.type="text",t.name=this.ctxName,t.required=this.cfg.multipleMin>0,t.tabIndex=-1,ki(t,{opacity:0,height:0,width:0}),t}initCallback(){super.initCallback(),this._validationInputElement=this._createValidationInput(),this.appendChild(this._validationInputElement),this.sub("*collectionState",t=>{var e;{if(this._dynamicInputsContainer||(this._dynamicInputsContainer=document.createElement("div"),this.appendChild(this._dynamicInputsContainer)),!this._validationInputElement){let a=this._createValidationInput();this.appendChild(a),this._validationInputElement=a}if(this._dynamicInputsContainer.innerHTML="",t.status==="uploading"||t.status==="idle"){this._validationInputElement.value="",this._validationInputElement.setCustomValidity("");return}if(t.status==="failed"){let a=(e=t.errors[0])==null?void 0:e.message;this._validationInputElement.value="",this._validationInputElement.setCustomValidity(a);return}let r=t.group?t.group:null;if(r){this._validationInputElement.value=r.cdnUrl,this._validationInputElement.setCustomValidity("");return}let n=t.allEntries.map(a=>a.cdnUrl);if(!this.cfg.multiple&&n.length===1){this._validationInputElement.value=n[0],this._validationInputElement.setCustomValidity("");return}this._validationInputElement.remove(),this._validationInputElement=null;let o=new DocumentFragment;for(let a of n){let l=document.createElement("input");l.type="hidden",l.name=`${this.ctxName}[]`,l.value=a,o.appendChild(l)}this._dynamicInputsContainer.replaceChildren(o)}},!1)}};var ds=class extends g{};var Ci=class extends C{constructor(){super(...arguments);h(this,"init$",{...this.init$,currentText:"",options:[],selectHtml:"",onSelect:t=>{var e;t.preventDefault(),t.stopPropagation(),this.value=this.ref.select.value,this.$.currentText=((e=this.$.options.find(r=>r.value==this.value))==null?void 0:e.text)||"",this.dispatchEvent(new Event("change"))}})}initCallback(){super.initCallback(),this.sub("options",t=>{var r;this.$.currentText=((r=t==null?void 0:t[0])==null?void 0:r.text)||"";let e="";t==null||t.forEach(n=>{e+=``}),this.$.selectHtml=e})}};Ci.template=``;var X={PLAY:"play",PAUSE:"pause",FS_ON:"fullscreen-on",FS_OFF:"fullscreen-off",VOL_ON:"unmute",VOL_OFF:"mute",CAP_ON:"captions",CAP_OFF:"captions-off"},sn={requestFullscreen:s=>{s.requestFullscreen?s.requestFullscreen():s.webkitRequestFullscreen&&s.webkitRequestFullscreen()},exitFullscreen:()=>{document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}},we=class s extends C{constructor(){super(...arguments);h(this,"init$",{...this.init$,src:"",ppIcon:X.PLAY,fsIcon:X.FS_ON,volIcon:X.VOL_ON,capIcon:X.CAP_OFF,totalTime:"00:00",currentTime:"00:00",progressCssWidth:"0",hasSubtitles:!1,volumeDisabled:!1,volumeValue:0,onPP:()=>{this.togglePlay()},onFs:()=>{this.toggleFullscreen()},onCap:()=>{this.toggleCaptions()},onMute:()=>{this.toggleSound()},onVolChange:t=>{let e=parseFloat(t.currentTarget.$.value);this.setVolume(e)},progressClicked:t=>{let e=this.progress.getBoundingClientRect();this._video.currentTime=this._video.duration*(t.offsetX/e.width)}})}togglePlay(){this._video.paused||this._video.ended?this._video.play():this._video.pause()}toggleFullscreen(){(document.fullscreenElement||document.webkitFullscreenElement)===this?sn.exitFullscreen():sn.requestFullscreen(this)}toggleCaptions(){this.$.capIcon===X.CAP_OFF?(this.$.capIcon=X.CAP_ON,this._video.textTracks[0].mode="showing",window.localStorage.setItem(s.is+":captions","1")):(this.$.capIcon=X.CAP_OFF,this._video.textTracks[0].mode="hidden",window.localStorage.removeItem(s.is+":captions"))}toggleSound(){this.$.volIcon===X.VOL_ON?(this.$.volIcon=X.VOL_OFF,this.$.volumeDisabled=!0,this._video.muted=!0):(this.$.volIcon=X.VOL_ON,this.$.volumeDisabled=!1,this._video.muted=!1)}setVolume(t){window.localStorage.setItem(s.is+":volume",t);let e=t?t/100:0;this._video.volume=e}get progress(){return this.ref.progress}_getUrl(t){return t.includes("/")?t:`https://ucarecdn.com/${t}/`}_desc2attrs(t){let e=[];for(let r in t){let n=r==="src"?this._getUrl(t[r]):t[r];e.push(`${r}="${n}"`)}return e.join(" ")}_timeFmt(t){let e=new Date(Math.round(t)*1e3);return[e.getMinutes(),e.getSeconds()].map(r=>r<10?"0"+r:r).join(":")}_initTracks(){[...this._video.textTracks].forEach(t=>{t.mode="hidden"}),window.localStorage.getItem(s.is+":captions")&&this.toggleCaptions()}_castAttributes(){let t=["autoplay","loop","muted"];[...this.attributes].forEach(e=>{t.includes(e.name)&&this._video.setAttribute(e.name,e.value)})}initCallback(){super.initCallback(),this._video=this.ref.video,this._castAttributes(),this._video.addEventListener("play",()=>{this.$.ppIcon=X.PAUSE,this.setAttribute("playback","")}),this._video.addEventListener("pause",()=>{this.$.ppIcon=X.PLAY,this.removeAttribute("playback")}),this.addEventListener("fullscreenchange",e=>{console.log(e),document.fullscreenElement===this?this.$.fsIcon=X.FS_OFF:this.$.fsIcon=X.FS_ON}),this.sub("src",e=>{if(!e)return;let r=this._getUrl(e);this._video.src=r}),this.sub("video",async e=>{if(!e)return;let r=await(await window.fetch(this._getUrl(e))).json();r.poster&&(this._video.poster=this._getUrl(r.poster));let n="";r==null||r.sources.forEach(o=>{n+=``}),r.tracks&&(r.tracks.forEach(o=>{n+=``}),this.$.hasSubtitles=!0),this._video.innerHTML+=n,this._initTracks(),console.log(r)}),this._video.addEventListener("loadedmetadata",e=>{this.$.currentTime=this._timeFmt(this._video.currentTime),this.$.totalTime=this._timeFmt(this._video.duration)}),this._video.addEventListener("timeupdate",e=>{let r=Math.round(100*(this._video.currentTime/this._video.duration));this.$.progressCssWidth=r+"%",this.$.currentTime=this._timeFmt(this._video.currentTime)});let t=window.localStorage.getItem(s.is+":volume");if(t){let e=parseFloat(t);this.setVolume(e),this.$.volumeValue=e}}};we.template=`
{{currentTime}} / {{totalTime}}
`;we.bindAttributes({video:"video",src:"src"});var ja="css-src";function wi(s){return class extends s{constructor(){super(...arguments);h(this,"renderShadow",!0);h(this,"pauseRender",!0);h(this,"requireCtxName",!0)}shadowReadyCallback(){}async _waitForShadowStylesLoad(){if(!this.shadowRoot)return;let t=this.constructor.__shadowStylesUrl,e=this.shadowRoot.querySelector(`link[href="${t}"]`);e&&await new Promise((r,n)=>{e.addEventListener("load",r),e.addEventListener("error",n)})}initCallback(){super.initCallback(),this.setAttribute("hidden",""),$e({element:this,attribute:ja,onSuccess:t=>{this.attachShadow({mode:"open"});let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=t,e.onload=()=>{window.requestAnimationFrame(async()=>{this.render(),await this._waitForShadowStylesLoad(),window.setTimeout(()=>{this.removeAttribute("hidden"),this.shadowReadyCallback()})})},this.shadowRoot.prepend(e)},onTimeout:()=>{console.error("Attribute `css-src` is required and it is not set. See migration guide: https://uploadcare.com/docs/file-uploader/migration-to-0.25.0/")}})}}}var Ee=class extends wi(C){};var Ei=class extends C{initCallback(){super.initCallback(),this.subConfigValue("removeCopyright",i=>{this.toggleAttribute("hidden",!!i)})}};h(Ei,"template",`Powered by Uploadcare`);var Tt=class extends Ee{constructor(){super(...arguments);h(this,"requireCtxName",!0);h(this,"init$",Me(this));h(this,"_template",null)}static set template(t){this._template=t+""}static get template(){return this._template}};var Ai=class extends Tt{shadowReadyCallback(){super.shadowReadyCallback(),this.sub("*modalActive",i=>{this._lastModalActive!==i&&this.emit(i?$.MODAL_OPEN:$.MODAL_CLOSE,void 0,{debounce:!0}),this._lastModalActive=i},!1)}};Ai.template=``;var xi=class extends Tt{constructor(){super(...arguments);h(this,"pauseRender",!0)}shadowReadyCallback(){let t=this.ref.uBlock;this.sub("*currentActivity",e=>{e||(this.$["*currentActivity"]=t.initActivity||g.activities.START_FROM)}),this.sub("*uploadList",e=>{(e==null?void 0:e.length)>0?this.$["*currentActivity"]=g.activities.UPLOAD_LIST:this.$["*currentActivity"]=t.initActivity||g.activities.START_FROM}),this.subConfigValue("sourceList",e=>{e!=="local"&&(this.cfg.sourceList="local")}),this.subConfigValue("confirmUpload",e=>{e!==!1&&(this.cfg.confirmUpload=!1)})}};xi.template=``;var Ti=class extends Tt{constructor(){super(),this.init$={...this.init$,couldCancel:!1,cancel:()=>{this.couldHistoryBack?this.$["*historyBack"]():this.couldShowList&&(this.$["*currentActivity"]=g.activities.UPLOAD_LIST)}}}get couldHistoryBack(){let i=this.$["*history"];return i.length>1&&i[i.length-1]!==g.activities.START_FROM}get couldShowList(){return this.cfg.showEmptyList||this.$["*uploadList"].length>0}shadowReadyCallback(){let i=this.ref.uBlock;this.sub("*currentActivity",t=>{t||(this.$["*currentActivity"]=i.initActivity||g.activities.START_FROM)}),this.sub("*uploadList",t=>{(t==null?void 0:t.length)>0&&this.$["*currentActivity"]===(i.initActivity||g.activities.START_FROM)&&(this.$["*currentActivity"]=g.activities.UPLOAD_LIST)}),this.sub("*history",()=>{this.$.couldCancel=this.couldHistoryBack||this.couldShowList})}};Ti.template=``;var ps=class extends wi(nt){shadowReadyCallback(){this.__shadowReady=!0,this.$["*faderEl"]=this.ref["fader-el"],this.$["*cropperEl"]=this.ref["cropper-el"],this.$["*imgContainerEl"]=this.ref["img-container-el"],this.initEditor()}async initEditor(){this.__shadowReady&&await super.initEditor()}};function fs(s){for(let i in s){let t=[...i].reduce((e,r)=>(r.toUpperCase()===r&&(r="-"+r.toLowerCase()),e+=r),"");t.startsWith("-")&&(t=t.replace("-","")),t.startsWith("lr-")||(t="lr-"+t),s[i].reg&&s[i].reg(t)}}var ms="LR";async function Ha(s,i=!1){return new Promise((t,e)=>{if(typeof document!="object"){t(null);return}if(typeof window=="object"&&window[ms]){t(window[ms]);return}let r=document.createElement("script");r.async=!0,r.src=s,r.onerror=()=>{e()},r.onload=()=>{let n=window[ms];i&&fs(n),t(n)},document.head.appendChild(r)})}export{g as ActivityBlock,ds as ActivityHeader,Nt as BaseComponent,C as Block,ni as CameraSource,ps as CloudImageEditor,hs as CloudImageEditorActivity,nt as CloudImageEditorBlock,Zo as Config,li as ConfirmationDialog,Ei as Copyright,ui as CropFrame,E as Data,le as DropArea,me as EditorCropButtonControl,Xt as EditorFilterControl,pi as EditorImageCropper,cs as EditorImageFader,ye as EditorOperationControl,fi as EditorScroller,di as EditorSlider,mi as EditorToolbar,vi as ExternalSource,de as FileItem,fe as FilePreview,Ti as FileUploaderInline,xi as FileUploaderMinimal,Ai as FileUploaderRegular,us as FormInput,ne as Icon,es as Img,gi as LineLoaderUi,ve as LrBtnUi,pe as Modal,Fe as PACKAGE_NAME,Be as PACKAGE_VERSION,bi as PresenceToggle,hi as ProgressBar,ci as ProgressBarCommon,Ci as Select,Ee as ShadowWrapper,ae as SimpleBtn,yi as SliderUi,ce as SourceBtn,rs as SourceList,Qe as StartFrom,Ce as Tabs,ka as UploadCtxProvider,ai as UploadDetails,si as UploadList,A as UploaderBlock,ri as UrlSource,we as Video,Ha as connectBlocksFrom,fs as registerBlocks,wi as shadowed,ht as toKebabCase}; \ No newline at end of file diff --git a/pyuploadcare/dj/static/uploadcare/file-uploader.min.js b/pyuploadcare/dj/static/uploadcare/file-uploader.min.js new file mode 100644 index 00000000..c0b018d4 --- /dev/null +++ b/pyuploadcare/dj/static/uploadcare/file-uploader.min.js @@ -0,0 +1,29 @@ +/** + * @license + * MIT License + * + * Copyright (c) 2022 Uploadcare (hello@uploadcare.com). All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +var Uo=Object.defineProperty;var Mo=Object.getPrototypeOf;var Po=Reflect.get;var Ro=(r,e,t)=>e in r?Uo(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var u=(r,e,t)=>(Ro(r,typeof e!="symbol"?e+"":e,t),t);var j=(r,e,t)=>Po(Mo(r),t,e);var Fo=Object.defineProperty,Do=(r,e,t)=>e in r?Fo(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Pi=(r,e,t)=>(Do(r,typeof e!="symbol"?e+"":e,t),t);function No(r){let e=t=>{var i;for(let s in t)((i=t[s])==null?void 0:i.constructor)===Object&&(t[s]=e(t[s]));return{...t}};return e(r)}var E=class{constructor(r){r.constructor===Object?this.store=No(r):(this._storeIsProxy=!0,this.store=r),this.callbackMap=Object.create(null)}static warn(r,e){console.warn(`Symbiote Data: cannot ${r}. Prop name: `+e)}read(r){return!this._storeIsProxy&&!this.store.hasOwnProperty(r)?(E.warn("read",r),null):this.store[r]}has(r){return this._storeIsProxy?this.store[r]!==void 0:this.store.hasOwnProperty(r)}add(r,e,t=!1){!t&&Object.keys(this.store).includes(r)||(this.store[r]=e,this.notify(r))}pub(r,e){if(!this._storeIsProxy&&!this.store.hasOwnProperty(r)){E.warn("publish",r);return}this.store[r]=e,this.notify(r)}multiPub(r){for(let e in r)this.pub(e,r[e])}notify(r){this.callbackMap[r]&&this.callbackMap[r].forEach(e=>{e(this.store[r])})}sub(r,e,t=!0){return!this._storeIsProxy&&!this.store.hasOwnProperty(r)?(E.warn("subscribe",r),null):(this.callbackMap[r]||(this.callbackMap[r]=new Set),this.callbackMap[r].add(e),t&&e(this.store[r]),{remove:()=>{this.callbackMap[r].delete(e),this.callbackMap[r].size||delete this.callbackMap[r]},callback:e})}static registerCtx(r,e=Symbol()){let t=E.globalStore.get(e);return t?console.warn('State: context UID "'+e+'" already in use'):(t=new E(r),E.globalStore.set(e,t)),t}static deleteCtx(r){E.globalStore.delete(r)}static getCtx(r,e=!0){return E.globalStore.get(r)||(e&&console.warn('State: wrong context UID - "'+r+'"'),null)}};E.globalStore=new Map;var A=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),Pr="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",Bo=Pr.length-1,Mt=class{static generate(r="XXXXXXXXX-XXX"){let e="";for(let t=0;t{le&&t?e[0].toUpperCase()+e.slice(1):e).join("").split("_").map((e,t)=>e&&t?e.toUpperCase():e).join("")}function Vo(r,e){[...r.querySelectorAll(`[${A.REPEAT_ATTR}]`)].forEach(t=>{let i=t.getAttribute(A.REPEAT_ITEM_TAG_ATTR),s;if(i&&(s=window.customElements.get(i)),!s){s=class extends e.BaseComponent{constructor(){super(),i||(this.style.display="contents")}};let n=t.innerHTML;s.template=n,s.reg(i)}for(;t.firstChild;)t.firstChild.remove();let o=t.getAttribute(A.REPEAT_ATTR);e.sub(o,n=>{if(!n){for(;t.firstChild;)t.firstChild.remove();return}let l=[...t.children],a,c=h=>{h.forEach((p,m)=>{if(l[m])if(l[m].set$)setTimeout(()=>{l[m].set$(p)});else for(let f in p)l[m][f]=p[f];else{a||(a=new DocumentFragment);let f=new s;Object.assign(f.init$,p),a.appendChild(f)}}),a&&t.appendChild(a);let d=l.slice(h.length,l.length);for(let p of d)p.remove()};if(n.constructor===Array)c(n);else if(n.constructor===Object){let h=[];for(let d in n){let p=n[d];Object.defineProperty(p,"_KEY_",{value:d,enumerable:!0}),h.push(p)}c(h)}else console.warn("Symbiote repeat data type error:"),console.log(n)}),t.removeAttribute(A.REPEAT_ATTR),t.removeAttribute(A.REPEAT_ITEM_TAG_ATTR)})}var Ur="__default__";function jo(r,e){if(e.shadowRoot)return;let t=[...r.querySelectorAll("slot")];if(!t.length)return;let i={};t.forEach(s=>{let o=s.getAttribute("name")||Ur;i[o]={slot:s,fr:document.createDocumentFragment()}}),e.initChildren.forEach(s=>{var o;let n=Ur;s instanceof Element&&s.hasAttribute("slot")&&(n=s.getAttribute("slot"),s.removeAttribute("slot")),(o=i[n])==null||o.fr.appendChild(s)}),Object.values(i).forEach(s=>{if(s.fr.childNodes.length)s.slot.parentNode.replaceChild(s.fr,s.slot);else if(s.slot.childNodes.length){let o=document.createDocumentFragment();o.append(...s.slot.childNodes),s.slot.parentNode.replaceChild(o,s.slot)}else s.slot.remove()})}function Ho(r,e){[...r.querySelectorAll(`[${A.EL_REF_ATTR}]`)].forEach(t=>{let i=t.getAttribute(A.EL_REF_ATTR);e.ref[i]=t,t.removeAttribute(A.EL_REF_ATTR)})}function Go(r,e){[...r.querySelectorAll(`[${A.BIND_ATTR}]`)].forEach(t=>{let s=t.getAttribute(A.BIND_ATTR).split(";");[...t.attributes].forEach(o=>{if(o.name.startsWith("-")&&o.value){let n=zo(o.name.replace("-",""));s.push(n+":"+o.value),t.removeAttribute(o.name)}}),s.forEach(o=>{if(!o)return;let n=o.split(":").map(h=>h.trim()),l=n[0],a;l.indexOf(A.ATTR_BIND_PRFX)===0&&(a=!0,l=l.replace(A.ATTR_BIND_PRFX,""));let c=n[1].split(",").map(h=>h.trim());for(let h of c){let d;h.startsWith("!!")?(d="double",h=h.replace("!!","")):h.startsWith("!")&&(d="single",h=h.replace("!","")),e.sub(h,p=>{d==="double"?p=!!p:d==="single"&&(p=!p),a?(p==null?void 0:p.constructor)===Boolean?p?t.setAttribute(l,""):t.removeAttribute(l):t.setAttribute(l,p):Rr(t,l,p)||(t[A.SET_LATER_KEY]||(t[A.SET_LATER_KEY]=Object.create(null)),t[A.SET_LATER_KEY][l]=p)})}}),t.removeAttribute(A.BIND_ATTR)})}var Ie="{{",Jt="}}",Wo="skip-text";function Xo(r){let e,t=[],i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode:s=>{var o;return!((o=s.parentElement)!=null&&o.hasAttribute(Wo))&&s.textContent.includes(Ie)&&s.textContent.includes(Jt)&&1}});for(;e=i.nextNode();)t.push(e);return t}var qo=function(r,e){Xo(r).forEach(i=>{let s=[],o;for(;i.textContent.includes(Jt);)i.textContent.startsWith(Ie)?(o=i.textContent.indexOf(Jt)+Jt.length,i.splitText(o),s.push(i)):(o=i.textContent.indexOf(Ie),i.splitText(o)),i=i.nextSibling;s.forEach(n=>{let l=n.textContent.replace(Ie,"").replace(Jt,"");n.textContent="",e.sub(l,a=>{n.textContent=a})})})},Ko=[Vo,jo,Ho,Go,qo],Oe="'",Ut='"',Zo=/\\([0-9a-fA-F]{1,6} ?)/g;function Yo(r){return(r[0]===Ut||r[0]===Oe)&&(r[r.length-1]===Ut||r[r.length-1]===Oe)}function Jo(r){return(r[0]===Ut||r[0]===Oe)&&(r=r.slice(1)),(r[r.length-1]===Ut||r[r.length-1]===Oe)&&(r=r.slice(0,-1)),r}function Qo(r){let e="",t="";for(var i=0;iString.fromCodePoint(parseInt(i.trim(),16))),e=e.replaceAll(`\\ +`,"\\n"),e=Qo(e),e=Ut+e+Ut);try{return JSON.parse(e)}catch{throw new Error(`Failed to parse CSS property value: ${e}. Original input: ${r}`)}}var Mr=0,Lt=null,ut=null,_t=class extends HTMLElement{constructor(){super(),Pi(this,"updateCssData",()=>{var r;this.dropCssDataCache(),(r=this.__boundCssProps)==null||r.forEach(e=>{let t=this.getCssData(this.__extractCssName(e),!0);t!==null&&this.$[e]!==t&&(this.$[e]=t)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return _t}initCallback(){}__initCallback(){var r;this.__initialized||(this.__initialized=!0,(r=this.initCallback)==null||r.call(this))}render(r,e=this.renderShadow){let t;if((e||this.constructor.__shadowStylesUrl)&&!this.shadowRoot&&this.attachShadow({mode:"open"}),this.allowCustomTemplate){let s=this.getAttribute(A.USE_TPL);if(s){let o=this.getRootNode(),n=(o==null?void 0:o.querySelector(s))||document.querySelector(s);n?r=n.content.cloneNode(!0):console.warn(`Symbiote template "${s}" is not found...`)}}if(this.processInnerHtml)for(let s of this.tplProcessors)s(this,this);if(r||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),(r==null?void 0:r.constructor)===DocumentFragment)t=r;else if((r==null?void 0:r.constructor)===String){let s=document.createElement("template");s.innerHTML=r,t=s.content.cloneNode(!0)}else this.constructor.__tpl&&(t=this.constructor.__tpl.content.cloneNode(!0));for(let s of this.tplProcessors)s(t,this)}let i=()=>{t&&(e&&this.shadowRoot.appendChild(t)||this.appendChild(t)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){e=!0;let s=document.createElement("link");s.rel="stylesheet",s.href=this.constructor.__shadowStylesUrl,s.onload=i,this.shadowRoot.prepend(s)}else i()}addTemplateProcessor(r){this.tplProcessors.add(r)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=Mt.generate(),this.style.setProperty(A.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(A.CSS_CTX_PROP,!0)}get ctxName(){var r;let e=((r=this.getAttribute(A.CTX_NAME_ATTR))==null?void 0:r.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=e,e}get localCtx(){return this.__localCtx||(this.__localCtx=E.registerCtx({},this)),this.__localCtx}get nodeCtx(){return E.getCtx(this.ctxName,!1)||E.registerCtx({},this.ctxName)}static __parseProp(r,e){let t,i;if(r.startsWith(A.EXT_DATA_CTX_PRFX))t=e.nodeCtx,i=r.replace(A.EXT_DATA_CTX_PRFX,"");else if(r.includes(A.NAMED_DATA_CTX_SPLTR)){let s=r.split(A.NAMED_DATA_CTX_SPLTR);t=E.getCtx(s[0]),i=s[1]}else t=e.localCtx,i=r;return{ctx:t,name:i}}sub(r,e,t=!0){let i=o=>{this.isConnected&&e(o)},s=_t.__parseProp(r,this);s.ctx.has(s.name)?this.allSubs.add(s.ctx.sub(s.name,i,t)):window.setTimeout(()=>{this.allSubs.add(s.ctx.sub(s.name,i,t))})}notify(r){let e=_t.__parseProp(r,this);e.ctx.notify(e.name)}has(r){let e=_t.__parseProp(r,this);return e.ctx.has(e.name)}add(r,e,t=!1){let i=_t.__parseProp(r,this);i.ctx.add(i.name,e,t)}add$(r,e=!1){for(let t in r)this.add(t,r[t],e)}get $(){if(!this.__stateProxy){let r=Object.create(null);this.__stateProxy=new Proxy(r,{set:(e,t,i)=>{let s=_t.__parseProp(t,this);return s.ctx.pub(s.name,i),!0},get:(e,t)=>{let i=_t.__parseProp(t,this);return i.ctx.read(i.name)}})}return this.__stateProxy}set$(r,e=!1){for(let t in r){let i=r[t];e||![String,Number,Boolean].includes(i==null?void 0:i.constructor)?this.$[t]=i:this.$[t]!==i&&(this.$[t]=i)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(A.CTX_OWNER_ATTR)&&this.getAttribute(A.CTX_OWNER_ATTR)!=="false"}__initDataCtx(){let r=this.constructor.__attrDesc;if(r)for(let e of Object.values(r))Object.keys(this.init$).includes(e)||(this.init$[e]="");for(let e in this.init$)if(e.startsWith(A.EXT_DATA_CTX_PRFX))this.nodeCtx.add(e.replace(A.EXT_DATA_CTX_PRFX,""),this.init$[e],this.__ctxOwner);else if(e.includes(A.NAMED_DATA_CTX_SPLTR)){let t=e.split(A.NAMED_DATA_CTX_SPLTR),i=t[0].trim(),s=t[1].trim();if(i&&s){let o=E.getCtx(i,!1);o||(o=E.registerCtx({},i)),o.add(s,this.init$[e])}}else this.localCtx.add(e,this.init$[e]);for(let e in this.cssInit$)this.bindCssData(e,this.cssInit$[e]);this.__dataCtxInitialized=!0}connectedCallback(){var r;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let e=(r=this.getAttribute(A.CTX_NAME_ATTR))==null?void 0:r.trim();if(e&&this.style.setProperty(A.CSS_CTX_PROP,`'${e}'`),this.__initDataCtx(),this[A.SET_LATER_KEY]){for(let t in this[A.SET_LATER_KEY])Rr(this,t,this[A.SET_LATER_KEY][t]);delete this[A.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let t of Ko)this.addTemplateProcessor(t);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let t=this.getRootNode();if(!t)return;if(t==null?void 0:t.querySelector(`link[${A.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`)){this.render();return}let s=this.constructor.__rootStylesLink.cloneNode(!0);s.setAttribute(A.ROOT_STYLE_ATTR_NAME,this.constructor.is),s.onload=()=>{this.render()},t.nodeType===Node.DOCUMENT_NODE?t.head.appendChild(s):t.prepend(s)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let r of this.allSubs)r.remove(),this.allSubs.delete(r);for(let r of this.tplProcessors)this.tplProcessors.delete(r);ut==null||ut.delete(this.updateCssData),ut!=null&&ut.size||(Lt==null||Lt.disconnect(),Lt=null,ut=null)},100)))}static reg(r,e=!1){r||(Mr++,r=`${A.AUTO_TAG_PRFX}-${Mr}`),this.__tag=r;let t=window.customElements.get(r);if(t){!e&&t!==this&&console.warn([`Element with tag name "${r}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join(` +`));return}window.customElements.define(r,e?class extends this{}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(r){this.observedAttributes=Object.keys(r),this.__attrDesc=r}attributeChangedCallback(r,e,t){var i;if(e===t)return;let s=(i=this.constructor.__attrDesc)==null?void 0:i[r];s?this.__dataCtxInitialized?this.$[s]=t:this.init$[s]=t:this[r]=t}getCssData(r,e=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(r)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let t=this.__computedStyle.getPropertyValue(r).trim();try{this.__cssDataCache[r]=tn(t)}catch{!e&&console.warn(`CSS Data error: ${r}`),this.__cssDataCache[r]=null}}return this.__cssDataCache[r]}__extractCssName(r){return r.split("--").map((e,t)=>t===0?"":e).join("--")}__initStyleAttrObserver(){ut||(ut=new Set),ut.add(this.updateCssData),Lt||(Lt=new MutationObserver(r=>{r[0].type==="attributes"&&ut.forEach(e=>{e()})}),Lt.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}))}bindCssData(r,e=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(r);let t=this.getCssData(this.__extractCssName(r),!0);t===null&&(t=e),this.add(r,t),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(r,e,t){let i="__"+r;this[i]=this[r],Object.defineProperty(this,r,{set:s=>{this[i]=s,t?window.setTimeout(()=>{e==null||e(s)}):e==null||e(s)},get:()=>this[i]}),this[r]=this[i]}static set shadowStyles(r){let e=new Blob([r],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(e)}static set rootStyles(r){if(!this.__rootStylesLink){let e=new Blob([r],{type:"text/css"}),t=URL.createObjectURL(e),i=document.createElement("link");i.href=t,i.rel="stylesheet",this.__rootStylesLink=i}}},Pt=_t;Pi(Pt,"template");var Mi=class{static _print(r){console.warn(r)}static setDefaultTitle(r){this.defaultTitle=r}static setRoutingMap(r){Object.assign(this.appMap,r);for(let e in this.appMap)!this.defaultRoute&&this.appMap[e].default===!0?this.defaultRoute=e:!this.errorRoute&&this.appMap[e].error===!0&&(this.errorRoute=e)}static set routingEventName(r){this.__routingEventName=r}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let r={route:null,options:{}};return window.location.search.split(this.separator).forEach(t=>{if(t.includes("?"))r.route=t.replace("?","");else if(t.includes("=")){let i=t.split("=");r.options[i[0]]=decodeURI(i[1])}else r.options[t]=!0}),r}static notify(){let r=this.readAddressBar(),e=this.appMap[r.route];if(e&&e.title&&(document.title=e.title),r.route===null&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!e&&this.errorRoute){this.applyRoute(this.errorRoute);return}else if(!e&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!e){this._print(`Route "${r.route}" not found...`);return}let t=new CustomEvent(Mi.routingEventName,{detail:{route:r.route,options:Object.assign(e||{},r.options)}});window.dispatchEvent(t)}static reflect(r,e={}){let t=this.appMap[r];if(!t){this._print("Wrong route: "+r);return}let i="?"+r;for(let o in e)e[o]===!0?i+=this.separator+o:i+=this.separator+o+`=${e[o]}`;let s=t.title||this.defaultTitle||"";window.history.pushState(null,s,i),document.title=s}static applyRoute(r,e={}){this.reflect(r,e),this.notify()}static setSeparator(r){this._separator=r}static get separator(){return this._separator||"&"}static createRouterData(r,e){this.setRoutingMap(e);let t=E.registerCtx({route:null,options:null,title:null},r);return window.addEventListener(this.routingEventName,i=>{var s;t.multiPub({route:i.detail.route,options:i.detail.options,title:((s=i.detail.options)==null?void 0:s.title)||this.defaultTitle||""})}),Mi.notify(),this.initPopstateListener(),t}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};Mi.appMap=Object.create(null);function Qt(r,e){for(let t in e)t.includes("-")?r.style.setProperty(t,e[t]):r.style[t]=e[t]}function en(r,e){for(let t in e)e[t].constructor===Boolean?e[t]?r.setAttribute(t,""):r.removeAttribute(t):r.setAttribute(t,e[t])}function Ri(r={tag:"div"}){let e=document.createElement(r.tag);if(r.attributes&&en(e,r.attributes),r.styles&&Qt(e,r.styles),r.properties)for(let t in r.properties)e[t]=r.properties[t];return r.processors&&r.processors.forEach(t=>{t(e)}),r.children&&r.children.forEach(t=>{let i=Ri(t);e.appendChild(i)}),e}var Fr="idb-store-ready",rn="symbiote-db",sn="symbiote-idb-update_",on=class{_notifyWhenReady(r=null){window.dispatchEvent(new CustomEvent(Fr,{detail:{dbName:this.name,storeName:this.storeName,event:r}}))}get _updEventName(){return sn+this.name}_getUpdateEvent(r){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:r}})}_notifySubscribers(r){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,r),window.dispatchEvent(this._getUpdateEvent(r))}constructor(r,e){this.name=r,this.storeName=e,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=t=>{this.db=t.target.result,this.objStore=this.db.createObjectStore(e,{keyPath:"_key"}),this.objStore.transaction.oncomplete=i=>{this._notifyWhenReady(i)}},this.request.onsuccess=t=>{this.db=t.target.result,this._notifyWhenReady(t)},this.request.onerror=t=>{console.error(t)},this._subscriptionsMap={},this._updateHandler=t=>{t.key===this.name&&this._subscriptionsMap[t.newValue]&&this._subscriptionsMap[t.newValue].forEach(async s=>{s(await this.read(t.newValue))})},this._localUpdateHandler=t=>{this._updateHandler(t.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(r){let t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(r);return new Promise((i,s)=>{t.onsuccess=o=>{var n;(n=o.target.result)!=null&&n._value?i(o.target.result._value):(i(null),console.warn(`IDB: cannot read "${r}"`))},t.onerror=o=>{s(o)}})}write(r,e,t=!1){let i={_key:r,_value:e},o=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(i);return new Promise((n,l)=>{o.onsuccess=a=>{t||this._notifySubscribers(r),n(a.target.result)},o.onerror=a=>{l(a)}})}delete(r,e=!1){let i=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(r);return new Promise((s,o)=>{i.onsuccess=n=>{e||this._notifySubscribers(r),s(n)},i.onerror=n=>{o(n)}})}getAll(){let e=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((t,i)=>{e.onsuccess=s=>{let o=s.target.result;t(o.map(n=>n._value))},e.onerror=s=>{i(s)}})}subscribe(r,e){this._subscriptionsMap[r]||(this._subscriptionsMap[r]=new Set);let t=this._subscriptionsMap[r];return t.add(e),{remove:()=>{t.delete(e),t.size||delete this._subscriptionsMap[r]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,Dr.clear(this.name)}},Dr=class{static get readyEventName(){return Fr}static open(r=rn,e="store"){let t=r+"/"+e;return this._reg[t]||(this._reg[t]=new on(r,e)),this._reg[t]}static clear(r){window.indexedDB.deleteDatabase(r);for(let e in this._reg)e.split("/")[0]===r&&delete this._reg[e]}};Pi(Dr,"_reg",Object.create(null));var Nr=r=>{if(typeof r!="string"||!r)return"";let e=r.trim();return e.startsWith("-/")?e=e.slice(2):e.startsWith("/")&&(e=e.slice(1)),e.endsWith("/")&&(e=e.slice(0,e.length-1)),e},Le=(...r)=>r.filter(e=>typeof e=="string"&&e).map(e=>Nr(e)).join("/-/"),D=(...r)=>{let e=Le(...r);return e?`-/${e}/`:""};function Ue(r){let e=new URL(r),t=e.pathname+e.search+e.hash,i=t.lastIndexOf("http"),s=t.lastIndexOf("/"),o="";return i>=0?o=t.slice(i):s>=0&&(o=t.slice(s+1)),o}function Me(r){let e=new URL(r),{pathname:t}=e,i=t.indexOf("/"),s=t.indexOf("/",i+1);return t.substring(i+1,s)}function Fi(r){let e=zr(r),t=new URL(e),i=t.pathname.indexOf("/-/");return i===-1?"":t.pathname.substring(i).slice(1)}function Br(r){return Fi(r).split("/-/").filter(Boolean).map(t=>Nr(t))}function zr(r){let e=new URL(r),t=Ue(r),i=Vr(t)?jr(t).pathname:t;return e.pathname=e.pathname.replace(i,""),e.search="",e.hash="",e.toString()}function Vr(r){return r.startsWith("http")}function jr(r){let e=new URL(r);return{pathname:e.origin+e.pathname||"",search:e.search||"",hash:e.hash||""}}var U=(r,e,t)=>{let i=new URL(zr(r));if(t=t||Ue(r),i.pathname.startsWith("//")&&(i.pathname=i.pathname.replace("//","/")),Vr(t)){let s=jr(t);i.pathname=i.pathname+(e||"")+(s.pathname||""),i.search=s.search,i.hash=s.hash}else i.pathname=i.pathname+(e||"")+(t||"");return i.toString()},yt=(r,e)=>{let t=new URL(r);return t.pathname=e+"/",t.toString()};var N=(r,e=",")=>r.trim().split(e).map(t=>t.trim()).filter(t=>t.length>0);var X=Object.freeze({brightness:0,exposure:0,gamma:100,contrast:0,saturation:0,vibrance:0,warmth:0,enhance:0,filter:0,rotate:0,mirror:!1,flip:!1,crop:void 0}),Gr=["enhance","brightness","exposure","gamma","contrast","saturation","vibrance","warmth","filter","mirror","flip","rotate","crop"];function nn(r,e){if(typeof e=="number"){let t=e;return X[r]!==t?`${r}/${t}`:""}if(typeof e=="boolean"){let t=e;return X[r]!==t?`${r}`:""}if(r==="filter"&&e){let{name:t,amount:i}=e;return X.filter===i?"":`${r}/${t}/${i}`}if(r==="crop"&&e){let{dimensions:t,coords:i}=e;return`${r}/${t.join("x")}/${i.join(",")}`}return""}function vt(r){return Le(...Gr.filter(e=>typeof r[e]!="undefined"&&r[e]!==null).map(e=>{let t=r[e];return nn(e,t)}).filter(e=>!!e))}var Pe=Le("format/auto","progressive/yes"),ht=([r])=>typeof r!="undefined"?Number(r):void 0,Hr=()=>!0,ln=([r,e])=>({name:r,amount:typeof e!="undefined"?Number(e):100}),an=([r,e])=>{if(!/\d+x\d+/.test(r)||!/\d+,\d+/.test(e))throw new Error("Crop by aspect ratio, percentage or alignment shortcuts is not supported.");return{dimensions:N(r,"x").map(Number),coords:N(e).map(Number)}},cn=Object.freeze({enhance:ht,brightness:ht,exposure:ht,gamma:ht,contrast:ht,saturation:ht,vibrance:ht,warmth:ht,filter:ln,mirror:Hr,flip:Hr,rotate:ht,crop:an});function Wr(r){let e={};for(let t of r){let[i,...s]=t.split("/");if(!Gr.includes(i))continue;let o=i,n=cn[o];try{let l=n(s);e[o]=l}catch(l){console.warn([`Failed to parse URL operation "${t}". It will be ignored.`,l instanceof Error?`Error message: "${l.message}"`:l,"If you need this functionality, please feel free to open an issue at https://github.com/uploadcare/blocks/issues/new"].join(` +`))}}return e}var I=Object.freeze({CROP:"crop",TUNING:"tuning",FILTERS:"filters"}),H=[I.CROP,I.TUNING,I.FILTERS],Xr=["brightness","exposure","gamma","contrast","saturation","vibrance","warmth","enhance"],qr=["adaris","briaril","calarel","carris","cynarel","cyren","elmet","elonni","enzana","erydark","fenralan","ferand","galen","gavin","gethriel","iorill","iothari","iselva","jadis","lavra","misiara","namala","nerion","nethari","pamaya","sarnar","sedis","sewen","sorahel","sorlen","tarian","thellassan","varriel","varven","vevera","virkas","yedis","yllara","zatvel","zevcen"],Kr=["rotate","mirror","flip"],it=Object.freeze({brightness:{zero:X.brightness,range:[-100,100],keypointsNumber:2},exposure:{zero:X.exposure,range:[-500,500],keypointsNumber:2},gamma:{zero:X.gamma,range:[0,1e3],keypointsNumber:2},contrast:{zero:X.contrast,range:[-100,500],keypointsNumber:2},saturation:{zero:X.saturation,range:[-100,500],keypointsNumber:1},vibrance:{zero:X.vibrance,range:[-100,500],keypointsNumber:1},warmth:{zero:X.warmth,range:[-100,100],keypointsNumber:1},enhance:{zero:X.enhance,range:[0,100],keypointsNumber:1},filter:{zero:X.filter,range:[0,100],keypointsNumber:1}});var Zr=r=>r?r.split(",").map(e=>e.trim()):[],Rt=r=>r?r.join(","):"";var un="https://ucarecdn.com",hn="https://upload.uploadcare.com",dn="https://social.uploadcare.com",J={pubkey:"",multiple:!0,multipleMin:0,multipleMax:Number.MAX_SAFE_INTEGER,confirmUpload:!1,imgOnly:!1,accept:"",externalSourcesPreferredTypes:"",store:"auto",cameraMirror:!1,cameraCapture:"",sourceList:"local, url, camera, dropbox, gdrive",cloudImageEditorTabs:Rt(H),maxLocalFileSizeBytes:0,thumbSize:76,showEmptyList:!1,useLocalImageEditor:!1,useCloudImageEditor:!0,removeCopyright:!1,cropPreset:"",imageShrink:"",modalScrollLock:!0,modalBackdropStrokes:!1,sourceListWrap:!0,remoteTabSessionKey:"",cdnCname:un,baseUrl:hn,socialBaseUrl:dn,secureSignature:"",secureExpire:"",secureDeliveryProxy:"",retryThrottledRequestMaxTimes:1,multipartMinFileSize:26214400,multipartChunkSize:5242880,maxConcurrentRequests:10,multipartMaxConcurrentRequests:4,multipartMaxAttempts:3,checkForUrlDuplicates:!1,saveUrlForRecurrentUploads:!1,groupOutput:!1,userAgentIntegration:"",debug:!1,metadata:null,localeName:"en",localeDefinitionOverride:null,secureUploadsExpireThreshold:10*60*1e3,secureUploadsSignatureResolver:null,secureDeliveryProxyUrlResolver:null,iconHrefResolver:null,fileValidators:[],collectionValidators:[]};var k=Object.freeze({FILE_ADDED:"file-added",FILE_REMOVED:"file-removed",FILE_UPLOAD_START:"file-upload-start",FILE_UPLOAD_PROGRESS:"file-upload-progress",FILE_UPLOAD_SUCCESS:"file-upload-success",FILE_UPLOAD_FAILED:"file-upload-failed",FILE_URL_CHANGED:"file-url-changed",MODAL_OPEN:"modal-open",MODAL_CLOSE:"modal-close",DONE_CLICK:"done-click",UPLOAD_CLICK:"upload-click",ACTIVITY_CHANGE:"activity-change",COMMON_UPLOAD_START:"common-upload-start",COMMON_UPLOAD_PROGRESS:"common-upload-progress",COMMON_UPLOAD_SUCCESS:"common-upload-success",COMMON_UPLOAD_FAILED:"common-upload-failed",CHANGE:"change",GROUP_CREATED:"group-created"}),Re=class{constructor(e){u(this,"_timeoutStore",new Map);u(this,"_targets",new Set);u(this,"_debugPrint",null);this._debugPrint=e}bindTarget(e){this._targets.add(e)}unbindTarget(e){this._targets.delete(e)}_dispatch(e,t){var i;for(let s of this._targets)s.dispatchEvent(new CustomEvent(e,{detail:t}));(i=this._debugPrint)==null||i.call(this,()=>{let s=t&&typeof t=="object"?{...t}:t;return[`event "${e}"`,s]})}emit(e,t,{debounce:i}={}){if(typeof i!="number"&&!i){this._dispatch(e,typeof t=="function"?t():t);return}this._timeoutStore.has(e)&&window.clearTimeout(this._timeoutStore.get(e));let s=typeof i=="number"?i:20,o=window.setTimeout(()=>{this._dispatch(e,typeof t=="function"?t():t),this._timeoutStore.delete(e)},s);this._timeoutStore.set(e,o)}};function O(r,e){let t,i=(...s)=>{clearTimeout(t),t=setTimeout(()=>r(...s),e)};return i.cancel=()=>{clearTimeout(t)},i}var Yr="--uploadcare-blocks-window-height",St=class{static registerClient(e){this.clientsRegistry.size===0&&this.attachTracker(),this.clientsRegistry.add(e)}static unregisterClient(e){this.clientsRegistry.delete(e),this.clientsRegistry.size===0&&this.detachTracker()}static attachTracker(){window.addEventListener("resize",this.flush,{passive:!0,capture:!0}),this.flush()}static detachTracker(){window.removeEventListener("resize",this.flush,{capture:!0}),document.documentElement.style.removeProperty(Yr)}};u(St,"clientsRegistry",new Set),u(St,"flush",O(()=>{document.documentElement.style.setProperty(Yr,`${window.innerHeight}px`)},100));var Jr=r=>{var i;let e=new Intl.Locale(r),t="ltr";return typeof e.getTextInfo=="function"&&e.getTextInfo().direction?t=e.getTextInfo().direction:"textInfo"in e&&((i=e.textInfo)!=null&&i.direction)&&(t=e.textInfo.direction),t};var Fe=(r,e)=>new Intl.PluralRules(r).select(e);var pn=r=>r,Di="{{",ts="}}",Qr="plural:";function te(r,e,t={}){var n;let{openToken:i=Di,closeToken:s=ts,transform:o=pn}=t;for(let l in e){let a=(n=e[l])==null?void 0:n.toString();r=r.replaceAll(i+l+s,typeof a=="string"?o(a):a)}return r}function es(r){let e=[],t=r.indexOf(Di);for(;t!==-1;){let i=r.indexOf(ts,t),s=r.substring(t+2,i);if(s.startsWith(Qr)){let o=r.substring(t+2,i).replace(Qr,""),n=o.substring(0,o.indexOf("(")),l=o.substring(o.indexOf("(")+1,o.indexOf(")"));e.push({variable:s,pluralKey:n,countVariable:l})}t=r.indexOf(Di,i)}return e}var is=({element:r,attribute:e,onSuccess:t,onTimeout:i,timeout:s=300})=>{let o=r.getAttribute(e);if(o!==null){t(o);return}let n=new MutationObserver(c=>{let h=c[c.length-1];a(h)});n.observe(r,{attributes:!0,attributeFilter:[e]});let l=setTimeout(()=>{n.disconnect(),i()},s),a=c=>{let h=r.getAttribute(e);c.type==="attributes"&&c.attributeName===e&&h!==null&&(clearTimeout(l),n.disconnect(),t(h))}};function rs(r){return Object.prototype.toString.call(r)==="[object Object]"}var fn=/\W|_/g;function mn(r){return r.split(fn).map((e,t)=>e.charAt(0)[t>0?"toUpperCase":"toLowerCase"]()+e.slice(1)).join("")}function ss(r,{ignoreKeys:e}={ignoreKeys:[]}){return Array.isArray(r)?r.map(t=>ft(t,{ignoreKeys:e})):r}function ft(r,{ignoreKeys:e}={ignoreKeys:[]}){if(Array.isArray(r))return ss(r,{ignoreKeys:e});if(!rs(r))return r;let t={};for(let i of Object.keys(r)){let s=r[i];if(e.includes(i)){t[i]=s;continue}rs(s)?s=ft(s,{ignoreKeys:e}):Array.isArray(s)&&(s=ss(s,{ignoreKeys:e})),t[mn(i)]=s}return t}var gn=r=>new Promise(e=>setTimeout(e,r));function Gi({libraryName:r,libraryVersion:e,userAgent:t,publicKey:i="",integration:s=""}){let o="JavaScript";if(typeof t=="string")return t;if(typeof t=="function")return t({publicKey:i,libraryName:r,libraryVersion:e,languageName:o,integration:s});let n=[r,e,i].filter(Boolean).join("/"),l=[o,s].filter(Boolean).join("; ");return`${n} (${l})`}var bn={factor:2,time:100};function _n(r,e=bn){let t=0;function i(s){let o=Math.round(e.time*e.factor**t);return s({attempt:t,retry:l=>gn(l!=null?l:o).then(()=>(t+=1,i(s)))})}return i(r)}var ee=class extends Error{},Ft=class r extends ee{constructor(t){super();u(this,"originalProgressEvent");this.name="NetworkError",this.message="Network error",Object.setPrototypeOf(this,r.prototype),this.originalProgressEvent=t}},Ne=(r,e)=>{r&&(r.aborted?Promise.resolve().then(e):r.addEventListener("abort",()=>e(),{once:!0}))},wt=class r extends ee{constructor(t="Request canceled"){super(t);u(this,"isCancel",!0);this.name="CancelError",Object.setPrototypeOf(this,r.prototype)}},yn=500,ns=({check:r,interval:e=yn,timeout:t,signal:i})=>new Promise((s,o)=>{let n,l;Ne(i,()=>{n&&clearTimeout(n),o(new wt("Poll cancelled"))}),t&&(l=setTimeout(()=>{n&&clearTimeout(n),o(new wt("Timed out"))},t));let a=()=>{try{Promise.resolve(r(i)).then(c=>{c?(l&&clearTimeout(l),s(c)):n=setTimeout(a,e)}).catch(c=>{l&&clearTimeout(l),o(c)})}catch(c){l&&clearTimeout(l),o(c)}};n=setTimeout(a,0)}),T={baseCDN:"https://ucarecdn.com",baseURL:"https://upload.uploadcare.com",maxContentLength:50*1024*1024,retryThrottledRequestMaxTimes:1,retryNetworkErrorMaxTimes:3,multipartMinFileSize:25*1024*1024,multipartChunkSize:5*1024*1024,multipartMinLastPartSize:1024*1024,maxConcurrentRequests:4,pollingTimeoutMilliseconds:1e4,pusherKey:"79ae88bd931ea68464d9"},Be="application/octet-stream",ls="original",Ct=({method:r,url:e,data:t,headers:i={},signal:s,onProgress:o})=>new Promise((n,l)=>{let a=new XMLHttpRequest,c=(r==null?void 0:r.toUpperCase())||"GET",h=!1;a.open(c,e,!0),i&&Object.entries(i).forEach(d=>{let[p,m]=d;typeof m!="undefined"&&!Array.isArray(m)&&a.setRequestHeader(p,m)}),a.responseType="text",Ne(s,()=>{h=!0,a.abort(),l(new wt)}),a.onload=()=>{if(a.status!=200)l(new Error(`Error ${a.status}: ${a.statusText}`));else{let d={method:c,url:e,data:t,headers:i||void 0,signal:s,onProgress:o},p=a.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};p.forEach(function(v){let w=v.split(": "),y=w.shift(),C=w.join(": ");y&&typeof y!="undefined"&&(m[y]=C)});let f=a.response,g=a.status;n({request:d,data:f,headers:m,status:g})}},a.onerror=d=>{h||l(new Ft(d))},o&&typeof o=="function"&&(a.upload.onprogress=d=>{d.lengthComputable?o({isComputable:!0,value:d.loaded/d.total}):o({isComputable:!1})}),t?a.send(t):a.send()});function vn(r,...e){return r}var wn=({name:r})=>r?[r]:[],Cn=vn,xn=()=>new FormData,as=r=>!1,ze=r=>typeof Blob!="undefined"&&r instanceof Blob,Ve=r=>typeof File!="undefined"&&r instanceof File,je=r=>!!r&&typeof r=="object"&&!Array.isArray(r)&&"uri"in r&&typeof r.uri=="string",Dt=r=>ze(r)||Ve(r)||as()||je(r),An=r=>typeof r=="string"||typeof r=="number"||typeof r=="undefined",En=r=>!!r&&typeof r=="object"&&!Array.isArray(r),Tn=r=>!!r&&typeof r=="object"&&"data"in r&&Dt(r.data);function cs(r,e,t){if(Array.isArray(t))for(let i of t)cs(r,`${e}[]`,i);else if(Tn(t)){let{name:i,contentType:s}=t,o=Cn(t.data,i,s!=null?s:Be),n=wn({name:i,contentType:s});r.push([e,o,...n])}else if(En(t))for(let[i,s]of Object.entries(t))typeof s!="undefined"&&r.push([`${e}[${i}]`,String(s)]);else An(t)&&t&&r.push([e,t.toString()])}function Sn(r){let e=[];for(let[t,i]of Object.entries(r))cs(e,t,i);return e}function He(r){let e=xn(),t=Sn(r);for(let i of t){let[s,o,...n]=i;e.append(s,o,...n)}return e}var B=class r extends ee{constructor(t,i,s,o,n){super();u(this,"code");u(this,"request");u(this,"response");u(this,"headers");this.name="UploadError",this.message=t,this.code=i,this.request=s,this.response=o,this.headers=n,Object.setPrototypeOf(this,r.prototype)}},kn=r=>{let e=new URLSearchParams;for(let[t,i]of Object.entries(r))i&&typeof i=="object"&&!Array.isArray(i)?Object.entries(i).filter(s=>{var o;return(o=s[1])!=null?o:!1}).forEach(s=>e.set(`${t}[${s[0]}]`,String(s[1]))):Array.isArray(i)?i.forEach(s=>{e.append(`${t}[]`,s)}):typeof i=="string"&&i?e.set(t,i):typeof i=="number"&&e.set(t,i.toString());return e.toString()},dt=(r,e,t)=>{let i=new URL(r);return i.pathname=(i.pathname+e).replace("//","/"),t&&(i.search=kn(t)),i.toString()},$n="6.14.1",In="UploadcareUploadClient",On=$n;function kt(r){return Gi({libraryName:In,libraryVersion:On,...r})}var Ln="RequestThrottledError",os=15e3,Un=1e3;function Mn(r){let{headers:e}=r||{};if(!e||typeof e["retry-after"]!="string")return os;let t=parseInt(e["retry-after"],10);return Number.isFinite(t)?t*1e3:os}function xt(r,e){let{retryThrottledRequestMaxTimes:t,retryNetworkErrorMaxTimes:i}=e;return _n(({attempt:s,retry:o})=>r().catch(n=>{if("response"in n&&(n==null?void 0:n.code)===Ln&&s{let e="";return(ze(r)||Ve(r)||je(r))&&(e=r.type),e||Be},hs=r=>{let e="";return Ve(r)&&r.name?e=r.name:ze(r)||as()?e="":je(r)&&r.name&&(e=r.name),e||ls};function Wi(r){return typeof r=="undefined"||r==="auto"?"auto":r?"1":"0"}function Pn(r,{publicKey:e,fileName:t,contentType:i,baseURL:s=T.baseURL,secureSignature:o,secureExpire:n,store:l,signal:a,onProgress:c,source:h="local",integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=T.retryNetworkErrorMaxTimes,metadata:g}){return xt(()=>Ct({method:"POST",url:dt(s,"/base/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:e,integration:d,userAgent:p})},data:He({file:{data:r,name:t||hs(r),contentType:i||us(r)},UPLOADCARE_PUB_KEY:e,UPLOADCARE_STORE:Wi(l),signature:o,expire:n,source:h,metadata:g}),signal:a,onProgress:c}).then(({data:v,headers:w,request:y})=>{let C=ft(JSON.parse(v));if("error"in C)throw new B(C.error.content,C.error.errorCode,y,C,w);return C}),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}var zi;(function(r){r.Token="token",r.FileInfo="file_info"})(zi||(zi={}));function Rn(r,{publicKey:e,baseURL:t=T.baseURL,store:i,fileName:s,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:n,secureSignature:l,secureExpire:a,source:c="url",signal:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=T.retryNetworkErrorMaxTimes,metadata:g}){return xt(()=>Ct({method:"POST",headers:{"X-UC-User-Agent":kt({publicKey:e,integration:d,userAgent:p})},url:dt(t,"/from_url/",{jsonerrors:1,pub_key:e,source_url:r,store:Wi(i),filename:s,check_URL_duplicates:o?1:void 0,save_URL_duplicates:n?1:void 0,signature:l,expire:a,source:c,metadata:g}),signal:h}).then(({data:v,headers:w,request:y})=>{let C=ft(JSON.parse(v));if("error"in C)throw new B(C.error.content,C.error.errorCode,y,C,w);return C}),{retryNetworkErrorMaxTimes:f,retryThrottledRequestMaxTimes:m})}var G;(function(r){r.Unknown="unknown",r.Waiting="waiting",r.Progress="progress",r.Error="error",r.Success="success"})(G||(G={}));var Fn=r=>"status"in r&&r.status===G.Error;function Dn(r,{publicKey:e,baseURL:t=T.baseURL,signal:i,integration:s,userAgent:o,retryThrottledRequestMaxTimes:n=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:l=T.retryNetworkErrorMaxTimes}={}){return xt(()=>Ct({method:"GET",headers:e?{"X-UC-User-Agent":kt({publicKey:e,integration:s,userAgent:o})}:void 0,url:dt(t,"/from_url/status/",{jsonerrors:1,token:r}),signal:i}).then(({data:a,headers:c,request:h})=>{let d=ft(JSON.parse(a));if("error"in d&&!Fn(d))throw new B(d.error.content,d.error.errorCode,h,d,c);return d}),{retryNetworkErrorMaxTimes:l,retryThrottledRequestMaxTimes:n})}function Nn(r,{publicKey:e,baseURL:t=T.baseURL,jsonpCallback:i,secureSignature:s,secureExpire:o,signal:n,source:l,integration:a,userAgent:c,retryThrottledRequestMaxTimes:h=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:d=T.retryNetworkErrorMaxTimes}){return xt(()=>Ct({method:"POST",headers:{"X-UC-User-Agent":kt({publicKey:e,integration:a,userAgent:c})},url:dt(t,"/group/",{jsonerrors:1}),data:He({files:r,callback:i,pub_key:e,signature:s,expire:o,source:l}),signal:n}).then(({data:p,headers:m,request:f})=>{let g=ft(JSON.parse(p));if("error"in g)throw new B(g.error.content,g.error.errorCode,f,g,m);return g}),{retryNetworkErrorMaxTimes:d,retryThrottledRequestMaxTimes:h})}function ds(r,{publicKey:e,baseURL:t=T.baseURL,signal:i,source:s,integration:o,userAgent:n,retryThrottledRequestMaxTimes:l=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=T.retryNetworkErrorMaxTimes}){return xt(()=>Ct({method:"GET",headers:{"X-UC-User-Agent":kt({publicKey:e,integration:o,userAgent:n})},url:dt(t,"/info/",{jsonerrors:1,pub_key:e,file_id:r,source:s}),signal:i}).then(({data:c,headers:h,request:d})=>{let p=ft(JSON.parse(c));if("error"in p)throw new B(p.error.content,p.error.errorCode,d,p,h);return p}),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:a})}function Bn(r,{publicKey:e,contentType:t,fileName:i,multipartChunkSize:s=T.multipartChunkSize,baseURL:o="",secureSignature:n,secureExpire:l,store:a,signal:c,source:h="local",integration:d,userAgent:p,retryThrottledRequestMaxTimes:m=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:f=T.retryNetworkErrorMaxTimes,metadata:g}){return xt(()=>Ct({method:"POST",url:dt(o,"/multipart/start/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:e,integration:d,userAgent:p})},data:He({filename:i||ls,size:r,content_type:t||Be,part_size:s,UPLOADCARE_STORE:Wi(a),UPLOADCARE_PUB_KEY:e,signature:n,expire:l,source:h,metadata:g}),signal:c}).then(({data:v,headers:w,request:y})=>{let C=ft(JSON.parse(v));if("error"in C)throw new B(C.error.content,C.error.errorCode,y,C,w);return C.parts=Object.keys(C.parts).map(M=>C.parts[Number(M)]),C}),{retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})}function zn(r,e,{contentType:t,signal:i,onProgress:s,retryThrottledRequestMaxTimes:o=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:n=T.retryNetworkErrorMaxTimes}){return xt(()=>Ct({method:"PUT",url:e,data:r,onProgress:s,signal:i,headers:{"Content-Type":t||Be}}).then(l=>(s&&s({isComputable:!0,value:1}),l)).then(({status:l})=>({code:l})),{retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:n})}function Vn(r,{publicKey:e,baseURL:t=T.baseURL,source:i="local",signal:s,integration:o,userAgent:n,retryThrottledRequestMaxTimes:l=T.retryThrottledRequestMaxTimes,retryNetworkErrorMaxTimes:a=T.retryNetworkErrorMaxTimes}){return xt(()=>Ct({method:"POST",url:dt(t,"/multipart/complete/",{jsonerrors:1}),headers:{"X-UC-User-Agent":kt({publicKey:e,integration:o,userAgent:n})},data:He({uuid:r,UPLOADCARE_PUB_KEY:e,source:i}),signal:s}).then(({data:c,headers:h,request:d})=>{let p=ft(JSON.parse(c));if("error"in p)throw new B(p.error.content,p.error.errorCode,d,p,h);return p}),{retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:a})}function Xi(r,{publicKey:e,baseURL:t,source:i,integration:s,userAgent:o,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:l,signal:a,onProgress:c}){return ns({check:h=>ds(r,{publicKey:e,baseURL:t,signal:h,source:i,integration:s,userAgent:o,retryThrottledRequestMaxTimes:n,retryNetworkErrorMaxTimes:l}).then(d=>d.isReady?d:(c&&c({isComputable:!0,value:1}),!1)),signal:a})}function jn(r){return"defaultEffects"in r}var pt=class{constructor(e,{baseCDN:t=T.baseCDN,fileName:i}={}){u(this,"uuid");u(this,"name",null);u(this,"size",null);u(this,"isStored",null);u(this,"isImage",null);u(this,"mimeType",null);u(this,"cdnUrl",null);u(this,"s3Url",null);u(this,"originalFilename",null);u(this,"imageInfo",null);u(this,"videoInfo",null);u(this,"contentInfo",null);u(this,"metadata",null);u(this,"s3Bucket",null);u(this,"defaultEffects",null);let{uuid:s,s3Bucket:o}=e,n=dt(t,`${s}/`),l=o?dt(`https://${o}.s3.amazonaws.com/`,`${s}/${e.filename}`):null;this.uuid=s,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=o||null,this.s3Url=l,jn(e)&&(this.defaultEffects=e.defaultEffects)}},Hn=(r,{publicKey:e,fileName:t,baseURL:i,secureSignature:s,secureExpire:o,store:n,contentType:l,signal:a,onProgress:c,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,baseCDN:g,metadata:v})=>Pn(r,{publicKey:e,fileName:t,contentType:l,baseURL:i,secureSignature:s,secureExpire:o,store:n,signal:a,onProgress:c,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:v}).then(({file:w})=>Xi(w,{publicKey:e,baseURL:i,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:c,signal:a})).then(w=>new pt(w,{baseCDN:g})),Gn=(r,{publicKey:e,fileName:t,baseURL:i,signal:s,onProgress:o,source:n,integration:l,userAgent:a,retryThrottledRequestMaxTimes:c,retryNetworkErrorMaxTimes:h,baseCDN:d})=>ds(r,{publicKey:e,baseURL:i,signal:s,source:n,integration:l,userAgent:a,retryThrottledRequestMaxTimes:c,retryNetworkErrorMaxTimes:h}).then(p=>new pt(p,{baseCDN:d,fileName:t})).then(p=>(o&&o({isComputable:!0,value:1}),p)),Wn=(r,{signal:e}={})=>{let t=null,i=null,s=r.map(()=>new AbortController),o=n=>()=>{i=n,s.forEach((l,a)=>a!==n&&l.abort())};return Ne(e,()=>{s.forEach(n=>n.abort())}),Promise.all(r.map((n,l)=>{let a=o(l);return Promise.resolve().then(()=>n({stopRace:a,signal:s[l].signal})).then(c=>(a(),c)).catch(c=>(t=c,null))})).then(n=>{if(i===null)throw t;return n[i]})},Xn=window.WebSocket,Vi=class{constructor(){u(this,"events",Object.create({}))}emit(e,t){var i;(i=this.events[e])==null||i.forEach(s=>s(t))}on(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)}off(e,t){t?this.events[e]=this.events[e].filter(i=>i!==t):this.events[e]=[]}},qn=(r,e)=>r==="success"?{status:G.Success,...e}:r==="progress"?{status:G.Progress,...e}:{status:G.Error,...e},ji=class{constructor(e,t=3e4){u(this,"key");u(this,"disconnectTime");u(this,"ws");u(this,"queue",[]);u(this,"isConnected",!1);u(this,"subscribers",0);u(this,"emmitter",new Vi);u(this,"disconnectTimeoutId",null);this.key=e,this.disconnectTime=t}connect(){if(this.disconnectTimeoutId&&clearTimeout(this.disconnectTimeoutId),!this.isConnected&&!this.ws){let e=`wss://ws.pusherapp.com/app/${this.key}?protocol=5&client=js&version=1.12.2`;this.ws=new Xn(e),this.ws.addEventListener("error",t=>{this.emmitter.emit("error",new Error(t.message))}),this.emmitter.on("connected",()=>{this.isConnected=!0,this.queue.forEach(t=>this.send(t.event,t.data)),this.queue=[]}),this.ws.addEventListener("message",t=>{let i=JSON.parse(t.data.toString());switch(i.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(i.channel,qn(i.event,JSON.parse(i.data)))}})}}disconnect(){let e=()=>{var t;(t=this.ws)==null||t.close(),this.ws=void 0,this.isConnected=!1};this.disconnectTime?this.disconnectTimeoutId=setTimeout(()=>{e()},this.disconnectTime):e()}send(e,t){var s;let i=JSON.stringify({event:e,data:t});(s=this.ws)==null||s.send(i)}subscribe(e,t){this.subscribers+=1,this.connect();let i=`task-status-${e}`,s={event:"pusher:subscribe",data:{channel:i}};this.emmitter.on(i,t),this.isConnected?this.send(s.event,s.data):this.queue.push(s)}unsubscribe(e){this.subscribers-=1;let 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(s=>s.data.channel!==t),this.subscribers===0&&this.disconnect()}onError(e){return this.emmitter.on("error",e),()=>this.emmitter.off("error",e)}},Ni=null,qi=r=>{if(!Ni){let e=typeof window=="undefined"?0:3e4;Ni=new ji(r,e)}return Ni},Kn=r=>{qi(r).connect()};function Zn({token:r,publicKey:e,baseURL:t,integration:i,userAgent:s,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:n,onProgress:l,signal:a}){return ns({check:c=>Dn(r,{publicKey:e,baseURL:t,integration:i,userAgent:s,retryThrottledRequestMaxTimes:o,retryNetworkErrorMaxTimes:n,signal:c}).then(h=>{switch(h.status){case G.Error:return new B(h.error,h.errorCode);case G.Waiting:return!1;case G.Unknown:return new B(`Token "${r}" was not found.`);case G.Progress:return l&&(h.total==="unknown"?l({isComputable:!1}):l({isComputable:!0,value:h.done/h.total})),!1;case G.Success:return l&&l({isComputable:!0,value:h.done/h.total}),h;default:throw new Error("Unknown status")}}),signal:a})}var Yn=({token:r,pusherKey:e,signal:t,onProgress:i})=>new Promise((s,o)=>{let n=qi(e),l=n.onError(o),a=()=>{l(),n.unsubscribe(r)};Ne(t,()=>{a(),o(new wt("pusher cancelled"))}),n.subscribe(r,c=>{switch(c.status){case G.Progress:{i&&(c.total==="unknown"?i({isComputable:!1}):i({isComputable:!0,value:c.done/c.total}));break}case G.Success:{a(),i&&i({isComputable:!0,value:c.done/c.total}),s(c);break}case G.Error:a(),o(new B(c.msg,c.error_code))}})}),Jn=(r,{publicKey:e,fileName:t,baseURL:i,baseCDN:s,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:n,secureSignature:l,secureExpire:a,store:c,signal:h,onProgress:d,source:p,integration:m,userAgent:f,retryThrottledRequestMaxTimes:g,pusherKey:v=T.pusherKey,metadata:w})=>Promise.resolve(Kn(v)).then(()=>Rn(r,{publicKey:e,fileName:t,baseURL:i,checkForUrlDuplicates:o,saveUrlForRecurrentUploads:n,secureSignature:l,secureExpire:a,store:c,signal:h,source:p,integration:m,userAgent:f,retryThrottledRequestMaxTimes:g,metadata:w})).catch(y=>{let C=qi(v);return C==null||C.disconnect(),Promise.reject(y)}).then(y=>y.type===zi.FileInfo?y:Wn([({signal:C})=>Zn({token:y.token,publicKey:e,baseURL:i,integration:m,userAgent:f,retryThrottledRequestMaxTimes:g,onProgress:d,signal:C}),({signal:C})=>Yn({token:y.token,pusherKey:v,signal:C,onProgress:d})],{signal:h})).then(y=>{if(y instanceof B)throw y;return y}).then(y=>Xi(y.uuid,{publicKey:e,baseURL:i,integration:m,userAgent:f,retryThrottledRequestMaxTimes:g,onProgress:d,signal:h})).then(y=>new pt(y,{baseCDN:s})),Bi=new WeakMap,Qn=async r=>{if(Bi.has(r))return Bi.get(r);let e=await fetch(r.uri).then(t=>t.blob());return Bi.set(r,e),e},ps=async r=>{if(Ve(r)||ze(r))return r.size;if(je(r))return(await Qn(r)).size;throw new Error("Unknown file type. Cannot determine file size.")},tl=(r,e=T.multipartMinFileSize)=>r>=e,fs=r=>{let e="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}",t=new RegExp(e);return!Dt(r)&&t.test(r)},Ki=r=>{let e="^(?:\\w+:)?\\/\\/([^\\s\\.]+\\.\\S{2}|localhost[\\:?\\d]*)\\S*$",t=new RegExp(e);return!Dt(r)&&t.test(r)},el=(r,e)=>new Promise((t,i)=>{let s=[],o=!1,n=e.length,l=[...e],a=()=>{let c=e.length-l.length,h=l.shift();h&&h().then(d=>{o||(s[c]=d,n-=1,n?a():t(s))}).catch(d=>{o=!0,i(d)})};for(let c=0;c{let s=i*e,o=Math.min(s+i,t);return r.slice(s,o)},rl=async(r,e,t)=>i=>il(r,i,e,t),sl=(r,e,{publicKey:t,contentType:i,onProgress:s,signal:o,integration:n,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:a})=>zn(r,e,{publicKey:t,contentType:i,onProgress:s,signal:o,integration:n,retryThrottledRequestMaxTimes:l,retryNetworkErrorMaxTimes:a}),ol=async(r,{publicKey:e,fileName:t,fileSize:i,baseURL:s,secureSignature:o,secureExpire:n,store:l,signal:a,onProgress:c,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,contentType:g,multipartChunkSize:v=T.multipartChunkSize,maxConcurrentRequests:w=T.maxConcurrentRequests,baseCDN:y,metadata:C})=>{let M=i!=null?i:await ps(r),q,tt=(P,V)=>{if(!c)return;q||(q=Array(P).fill(0));let Y=et=>et.reduce((ct,Ui)=>ct+Ui,0);return et=>{et.isComputable&&(q[V]=et.value,c({isComputable:!0,value:Y(q)/P}))}};return g||(g=us(r)),Bn(M,{publicKey:e,contentType:g,fileName:t||hs(r),baseURL:s,secureSignature:o,secureExpire:n,store:l,signal:a,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,metadata:C}).then(async({uuid:P,parts:V})=>{let Y=await rl(r,M,v);return Promise.all([P,el(w,V.map((et,ct)=>()=>sl(Y(ct),et,{publicKey:e,contentType:g,onProgress:tt(V.length,ct),signal:a,integration:d,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})))])}).then(([P])=>Vn(P,{publicKey:e,baseURL:s,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f})).then(P=>P.isReady?P:Xi(P.uuid,{publicKey:e,baseURL:s,source:h,integration:d,userAgent:p,retryThrottledRequestMaxTimes:m,retryNetworkErrorMaxTimes:f,onProgress:c,signal:a})).then(P=>new pt(P,{baseCDN:y}))};async function Zi(r,{publicKey:e,fileName:t,baseURL:i=T.baseURL,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:a,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartMinFileSize:g,multipartChunkSize:v,maxConcurrentRequests:w,baseCDN:y=T.baseCDN,checkForUrlDuplicates:C,saveUrlForRecurrentUploads:M,pusherKey:q,metadata:tt}){if(Dt(r)){let P=await ps(r);return tl(P,g)?ol(r,{publicKey:e,contentType:f,multipartChunkSize:v,fileSize:P,fileName:t,baseURL:i,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:a,source:c,integration:h,userAgent:d,maxConcurrentRequests:w,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:y,metadata:tt}):Hn(r,{publicKey:e,fileName:t,contentType:f,baseURL:i,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:a,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:y,metadata:tt})}if(Ki(r))return Jn(r,{publicKey:e,fileName:t,baseURL:i,baseCDN:y,checkForUrlDuplicates:C,saveUrlForRecurrentUploads:M,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:a,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,pusherKey:q,metadata:tt});if(fs(r))return Gn(r,{publicKey:e,fileName:t,baseURL:i,signal:l,onProgress:a,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,baseCDN:y});throw new TypeError(`File uploading from "${r}" is not supported`)}var Hi=class{constructor(e,{baseCDN:t=T.baseCDN}={}){u(this,"uuid");u(this,"filesCount");u(this,"totalSize");u(this,"isStored");u(this,"isImage");u(this,"cdnUrl");u(this,"files");u(this,"createdAt");u(this,"storedAt",null);this.uuid=e.id,this.filesCount=e.filesCount;let i=e.files.filter(Boolean);this.totalSize=Object.values(i).reduce((s,o)=>s+o.size,0),this.isStored=!!e.datetimeStored,this.isImage=!!Object.values(i).filter(s=>s.isImage).length,this.cdnUrl=e.cdnUrl,this.files=i.map(s=>new pt(s,{baseCDN:t})),this.createdAt=e.datetimeCreated,this.storedAt=e.datetimeStored}},nl=r=>{for(let e of r)if(!Dt(e))return!1;return!0},ll=r=>{for(let e of r)if(!fs(e))return!1;return!0},al=r=>{for(let e of r)if(!Ki(e))return!1;return!0};function ms(r,{publicKey:e,fileName:t,baseURL:i=T.baseURL,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:a,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:g=T.multipartChunkSize,baseCDN:v=T.baseCDN,checkForUrlDuplicates:w,saveUrlForRecurrentUploads:y,jsonpCallback:C}){if(!nl(r)&&!al(r)&&!ll(r))throw new TypeError(`Group uploading from "${r}" is not supported`);let M,q=!0,tt=r.length,P=(V,Y)=>{if(!a)return;M||(M=Array(V).fill(0));let et=ct=>ct.reduce((Ui,Lo)=>Ui+Lo)/V;return ct=>{if(!ct.isComputable||!q){q=!1,a({isComputable:!1});return}M[Y]=ct.value,a({isComputable:!0,value:et(M)})}};return Promise.all(r.map((V,Y)=>Dt(V)||Ki(V)?Zi(V,{publicKey:e,fileName:t,baseURL:i,secureSignature:s,secureExpire:o,store:n,signal:l,onProgress:P(tt,Y),source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m,contentType:f,multipartChunkSize:g,baseCDN:v,checkForUrlDuplicates:w,saveUrlForRecurrentUploads:y}).then(et=>et.uuid):V)).then(V=>Nn(V,{publicKey:e,baseURL:i,jsonpCallback:C,secureSignature:s,secureExpire:o,signal:l,source:c,integration:h,userAgent:d,retryThrottledRequestMaxTimes:p,retryNetworkErrorMaxTimes:m}).then(Y=>new Hi(Y,{baseCDN:v})).then(Y=>(a&&a({isComputable:!0,value:1}),Y)))}var De=class{constructor(e){u(this,"_concurrency",1);u(this,"_pending",[]);u(this,"_running",0);u(this,"_resolvers",new Map);u(this,"_rejectors",new Map);this._concurrency=e}_run(){let e=this._concurrency-this._running;for(let t=0;t{this._resolvers.delete(i),this._rejectors.delete(i),this._running-=1,this._run()}).then(n=>s(n)).catch(n=>o(n))}}add(e){return new Promise((t,i)=>{this._resolvers.set(e,t),this._rejectors.set(e,i),this._pending.push(e),this._run()})}get pending(){return this._pending.length}get running(){return this._running}set concurrency(e){this._concurrency=e,this._run()}get concurrency(){return this._concurrency}};var Yi=()=>({}),Ji=r=>({...Yi(),"*currentActivity":null,"*currentActivityParams":{},"*history":[],"*historyBack":null,"*closeModal":()=>{r.set$({"*currentActivity":null,"*modalActive":!1})}}),Ge=r=>({...Ji(r),"*commonProgress":0,"*uploadList":[],"*uploadQueue":new De(1),"*collectionErrors":[],"*collectionState":null,"*groupInfo":null,"*uploadTrigger":new Set,"*secureUploadsManager":null});var ie={"locale-id":"en","social-source-lang":"en","upload-file":"Upload file","upload-files":"Upload files","choose-file":"Choose file","choose-files":"Choose files","drop-files-here":"Drop files here","select-file-source":"Select file source",selected:"Selected",upload:"Upload","add-more":"Add more",cancel:"Cancel","start-from-cancel":"Cancel",clear:"Clear","camera-shot":"Shot","upload-url":"Import","upload-url-placeholder":"Paste link here","edit-image":"Edit image","edit-detail":"Details",back:"Back",done:"Done",ok:"Ok","remove-from-list":"Remove",no:"No",yes:"Yes","confirm-your-action":"Confirm your action","are-you-sure":"Are you sure?","selected-count":"Selected:","upload-error":"Upload error","validation-error":"Validation error","no-files":"No files selected",browse:"Browse","not-uploaded-yet":"Not uploaded yet...",file__one:"file",file__other:"files",error__one:"error",error__other:"errors","header-uploading":"Uploading {{count}} {{plural:file(count)}}","header-failed":"{{count}} {{plural:error(count)}}","header-succeed":"{{count}} {{plural:file(count)}} uploaded","header-total":"{{count}} {{plural:file(count)}} selected","src-type-local":"From device","src-type-from-url":"From link","src-type-camera":"Camera","src-type-draw":"Draw","src-type-facebook":"Facebook","src-type-dropbox":"Dropbox","src-type-gdrive":"Google Drive","src-type-gphotos":"Google Photos","src-type-instagram":"Instagram","src-type-flickr":"Flickr","src-type-vk":"VK","src-type-evernote":"Evernote","src-type-box":"Box","src-type-onedrive":"Onedrive","src-type-huddle":"Huddle","src-type-other":"Other","caption-from-url":"Import from link","caption-camera":"Camera","caption-draw":"Draw","caption-edit-file":"Edit file","file-no-name":"No name...","toggle-fullscreen":"Toggle fullscreen","toggle-guides":"Toggle guides",rotate:"Rotate","flip-vertical":"Flip vertical","flip-horizontal":"Flip horizontal",apply:"Apply",brightness:"Brightness",contrast:"Contrast",saturation:"Saturation",exposure:"Exposure",gamma:"Gamma",vibrance:"Vibrance",warmth:"Warmth",enhance:"Enhance",original:"Original",resize:"Resize image",crop:"Crop","select-color":"Select color",text:"Text",draw:"Draw","cancel-edit":"Cancel edit","tab-view":"Preview","tab-details":"Details","file-name":"Name","file-size":"Size","cdn-url":"CDN URL","file-size-unknown":"Unknown","camera-permissions-denied":"Camera access denied","camera-permissions-prompt":"Please allow access to the camera","camera-permissions-request":"Request access","files-count-limit-error-title":"Files count limit overflow","files-count-limit-error-too-few":"You\u2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.","files-count-limit-error-too-many":"You\u2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.","files-max-size-limit-error":"File is too big. Max file size is {{maxFileSize}}.","has-validation-errors":"File validation error ocurred. Please, check your files before upload.","images-only-accepted":"Only image files are accepted.","file-type-not-allowed":"Uploading of these file types is not allowed.","some-files-were-not-uploaded":"Some files were not uploaded.","file-item-edit-button":"Edit","file-item-remove-button":"Remove","a11y-editor-tab-filters":"Filters","a11y-editor-tab-tuning":"Tuning","a11y-editor-tab-crop":"Crop","a11y-activity-header-button-close":"Close",flip:"Flip",mirror:"Mirror","a11y-cloud-editor-apply-filter":"Apply {{name}} filter","a11y-cloud-editor-apply-crop":"Apply {{name}} operation","a11y-cloud-editor-apply-tuning":"Apply {{name}} tuning",finished:"Finished",failed:"Failed",uploading:"Uploading",idle:"Idle","a11y-file-item-status":"File {{fileName}} in status {{status}}"};var We=new Map,Qi=new Map,gs=(r,e)=>{We.has(r)&&console.log(`Locale ${r} is already defined. Overwriting...`),We.set(r,{...ie,...e})},cl=(r,e)=>{Qi.set(r,e)},bs=(r,e)=>{typeof e=="function"?cl(r,e):gs(r,e)},_s=async r=>{if(!We.has(r)){if(!Qi.has(r))throw new Error(`Locale ${r} is not defined`);let t=await Qi.get(r)();gs(r,t)}return We.get(r)};bs("en",ie);var mt=r=>`*l10n/${r}`,ul="en",Xe=class{constructor(e){u(this,"_blockInstance",null);u(this,"_localeName","");u(this,"_callbacks",new Set);u(this,"_boundBlocks",new Map);this._blockInstance=e;for(let[t,i]of Object.entries(ie))this._blockInstance.add(mt(t),i,!1);setTimeout(()=>{e.subConfigValue("localeName",async t=>{var o;if(!this._blockInstance||!t)return;this._localeName=t;let i=await _s(t);if(t!==ul&&this._localeName!==t)return;let s=(o=this._blockInstance.cfg.localeDefinitionOverride)==null?void 0:o[t];for(let[n,l]of Object.entries(i)){let a=s==null?void 0:s[n];this._blockInstance.add(mt(n),a!=null?a:l,!0);for(let c of this._callbacks)c()}}),e.subConfigValue("localeDefinitionOverride",t=>{var s;if(!t)return;let i=t[this._localeName];if(i)for(let[o,n]of Object.entries(i)){(s=this._blockInstance)==null||s.add(mt(o),n,!0);for(let l of this._callbacks)l()}})})}onLocaleChange(e){let t=O(e,0);return this._callbacks.add(t),()=>{this._callbacks.delete(t)}}bindL10n(e,t,i){var o,n,l;e.$[t]=i(),this._boundBlocks.has(e)||this._boundBlocks.set(e,new Map),(n=(o=this._boundBlocks.get(e))==null?void 0:o.get(t))==null||n();let s=this.onLocaleChange(()=>{e.$[t]=i()});(l=this._boundBlocks.get(e))==null||l.set(t,s)}destroyL10nBindings(e){let t=this._boundBlocks.get(e);if(t){for(let i of t.values())i();this._boundBlocks.delete(e)}}destroy(){this._callbacks.clear()}};function ys(r,e){[...r.querySelectorAll("[l10n]")].forEach(t=>{let i=t.getAttribute("l10n");if(!i)return;let s="textContent",o=!1;if(i.includes(":")){let a=i.split(":");s=a[0],i=a[1],s.startsWith("@")&&(s=s.slice(1),o=!0)}let n=i;e.has(n)&&e.sub(n,a=>{if(!a)return;e.l10nProcessorSubs.has(n)||e.l10nProcessorSubs.set(n,new Set);let c=e.l10nProcessorSubs.get(n);c==null||c.forEach(p=>{p.remove(),c.delete(p),e.allSubs.delete(p)});let h=mt(a).replace("*","");e.nodeCtx.has(h)||e.nodeCtx.add(h,a);let d=e.nodeCtx.sub(h,()=>{t[s]=e.l10n(a)});c==null||c.add(d),e.allSubs.add(d),t.removeAttribute("l10n")});let l=mt(i);e.has(l)||e.add(l,""),e.sub(l,()=>{i=i,o?t.setAttribute(s,e.l10n(i)):t[s]=e.l10n(i)}),t.removeAttribute("l10n")})}var W=r=>`*cfg/${r}`;var hl={button:["toolbar"],checkbox:["toolbar"],menuitem:["menu","menubar"],option:["listbox"],tab:["tablist"]};function re(r,e){e.tabIndex=0,e.focus(),r.tabIndex=-1}function tr(r){let e=r.role||r.type||r.tagName;if(!e)return null;let t=hl[e.toLowerCase()];if(!t)return null;for(let i of t){let s=r.closest(`[role=${i}]`);if(s)return s}}function er(r,e){return e.role==="toolbar"?dl(e):e.querySelectorAll(`[role=${r.role}]`)}function dl(r){return[...r.querySelectorAll("*")].filter(t=>t.role==="button"||t.type==="button"||t.role==="checkbox"||t.type==="checkbox")}function pl(r){let e=r.getAttribute("aria-orientation");if(e==="vertical")return!1;if(e==="horizontal")return!0;let t=r.role;return t==="menubar"||t==="tablist"||t==="toolbar"}function vs(r){return e=>{let t=!1,i=(r==null?void 0:r.searchDelayMs)||300,s=0,o="";function n(d){let p=tr(d.target);if(!p){l();return}let m=er(d.target,p),f=Array.from(m).indexOf(d.target),g="ArrowDown",v="ArrowUp";if(pl(p)&&(e.document.dir==="rtl"?(g="ArrowLeft",v="ArrowRight"):(g="ArrowRight",v="ArrowLeft")),d.key===g)d.preventDefault(),re(d.target,m[f+1]||m[0]);else if(d.key===v)d.preventDefault(),re(d.target,m[f-1]||m[m.length-1]);else if(d.key==="Home")d.preventDefault(),re(d.target,m[0]);else if(d.key==="End")d.preventDefault(),re(d.target,m[m.length-1]);else if(d.key.length===1&&p.role!=="tablist"){let w=Date.now();w-s<=i?o+=d.key.toLowerCase():o=d.key.toLowerCase(),s=w;let y=Array.from(m).find(C=>{var M,q,tt;return(tt=(q=(M=C.textContent)==null?void 0:M.trim())==null?void 0:q.toLowerCase())==null?void 0:tt.startsWith(o)});y&&(d.preventDefault(),re(d.target,y))}}function l(){t=!1,e.removeEventListener("keydown",n)}function a(d){let p=tr(d.target);if(p){t||(t=!0,e.addEventListener("keydown",n));let m=er(d.target,p);for(let f of m)f!==d.target&&f.setAttribute("tabindex",-1)}else t&&l()}function c(d){(!d.relatedTarget||d.relatedTarget===e.document)&&l()}function h(d){let p=tr(d.target);if(p){let m=er(d.target,p);for(let f of m)f!==d.target&&f.setAttribute("tabindex",-1);d.target.setAttribute("tabindex",0)}}return e.addEventListener("click",h),e.addEventListener("focusin",a),e.addEventListener("focusout",c),()=>{l(),e.removeEventListener("click",h),e.removeEventListener("focusin",a),e.removeEventListener("focusout",c)}}}function ws(){return r=>{let e,t;function i(o){if(o.target.getAttribute("aria-hidden")==="true"){e=o.target,e.setAttribute("aria-hidden","false"),t=e.hidden,t&&(e.hidden=!1);let n=o.target.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');n&&(n.tabIndex=0)}}function s(o){e&&e.contains(o.target)&&(!o.relatedTarget||!e.contains(o.relatedTarget))&&(o.target.tabIndex=-1,e.setAttribute("aria-hidden","true"),t&&(e.hidden=!0),e=null)}return r.addEventListener("keyuxJump",i),r.addEventListener("focusout",s),()=>{r.removeEventListener("keyuxJump",i),r.removeEventListener("focusout",s)}}}function Cs(){return r=>{let e=[];function t(c){let h=r.document.activeElement;h&&h!==r.document.body&&e.push(new WeakRef(h)),c.focus({focusVisible:!0})}function i(){let c=e.pop();if(!c){r.document.activeElement.blur();return}let h=c.deref();h&&h.isConnected?h.focus():i()}let s=0,o;function n(c){clearInterval(o);let h=c.getAttribute("aria-controls");h&&(o=setInterval(()=>{if(s++>50){clearInterval(o);return}let d=r.document.getElementById(h);if(d){let p=d.querySelector('a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])');p&&(clearInterval(o),d.dispatchEvent(new r.CustomEvent("keyuxJump",{bubbles:!0})),t(p))}},50))}function l(c){c.clientX===0&&c.clientY===0&&n(c.target)}function a(c){c.target.tagName==="INPUT"&&c.key==="Enter"&&n(c.target),c.key==="Escape"&&i()}return r.addEventListener("click",l),r.addEventListener("keydown",a),()=>{r.removeEventListener("click",l),r.removeEventListener("keydown",a)}}}function xs(r){let e,t=r.split(" ");function i(){e&&e.classList.remove(...t)}function s(o){o.clientX===0&&o.clientY===0&&(i(),o.target.classList.add(...t),e=o.target)}return o=>(o.addEventListener("keyup",i),o.addEventListener("click",s),()=>{o.removeEventListener("keyup",i),o.removeEventListener("click",s)})}function As(r,e){let t=e.map(i=>i(r));return()=>{t.forEach(i=>i())}}var ir=class{constructor(){u(this,"_listeners",new Map);u(this,"_scope",[])}addEventListener(e,t){let i=s=>{let o=s.target;o&&this._scope.some(n=>n===s.target||n.contains(o))&&t(s)};this._listeners.set(t,i),window.addEventListener(e,i)}removeEventListener(e,t){let i=this._listeners.get(t);i&&window.removeEventListener(e,i),this._listeners.delete(t)}get CustomEvent(){return window.CustomEvent}get document(){return window.document}get navigator(){return window.navigator}registerScope(e){this._scope.push(e)}destroy(){this._scope=[],this._listeners.forEach((e,t)=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e),this._listeners.delete(t)})}},qe=class{constructor(){u(this,"_destroyKeyUX");u(this,"_scopedWindow");this._scopedWindow=new ir,this._destroyKeyUX=As(this._scopedWindow,[vs(),xs("is-pressed"),Cs(),ws()])}registerBlock(e){this._scopedWindow.registerScope(e)}destroy(){var e;(e=this._destroyKeyUX)==null||e.call(this),this._scopedWindow.destroy()}};var fl="uc-",_=class extends Pt{constructor(){super();u(this,"requireCtxName",!1);u(this,"activityType",null);u(this,"init$",Yi());this.l10nProcessorSubs=new Map,this.addTemplateProcessor(ys)}l10n(t,i={}){if(!t)return"";let s=this.$[mt(t)]||t,o=es(s);for(let l of o)i[l.variable]=this.pluralize(l.pluralKey,Number(i[l.countVariable]));return te(s,i)}pluralize(t,i){let s=this.l10n("locale-id")||"en",o=Fe(s,i);return this.l10n(`${t}__${o}`)}bindL10n(t,i){var s;(s=this.localeManager)==null||s.bindL10n(this,t,i)}emit(t,i,s){let o=this.has("*eventEmitter")&&this.$["*eventEmitter"];o&&o.emit(t,i,s)}hasBlockInCtx(t){for(let i of this.blocksRegistry)if(t(i))return!0;return!1}setOrAddState(t,i){this.add$({[t]:i},!0)}connectedCallback(){this.constructor.styleAttrs.forEach(i=>{this.setAttribute(i,"")}),this.hasAttribute("retpl")&&(this.constructor.template=null,this.processInnerHtml=!0),this.requireCtxName?is({element:this,attribute:"ctx-name",onSuccess:()=>{super.connectedCallback()},onTimeout:()=>{console.error("Attribute `ctx-name` is required and it is not set.")}}):super.connectedCallback(),St.registerClient(this)}disconnectedCallback(){super.disconnectedCallback(),St.unregisterClient(this)}initCallback(){this.has("*blocksRegistry")||this.add("*blocksRegistry",new Set),this.$["*blocksRegistry"].add(this),this.has("*eventEmitter")||this.add("*eventEmitter",new Re(this.debugPrint.bind(this))),this.has("*localeManager")||this.add("*localeManager",new Xe(this)),this.has("*a11y")||this.add("*a11y",new qe),this.sub(mt("locale-id"),i=>{let s=Jr(i);this.style.direction=s==="ltr"?"":s})}get localeManager(){return this.has("*localeManager")?this.$["*localeManager"]:null}get a11y(){return this.has("*a11y")?this.$["*a11y"]:null}get blocksRegistry(){return this.$["*blocksRegistry"]}destroyCallback(){var i;super.destroyCallback();let t=this.blocksRegistry;t==null||t.delete(this),(i=this.localeManager)==null||i.destroyL10nBindings(this),this.l10nProcessorSubs=new Map,E.deleteCtx(this),(t==null?void 0:t.size)===0&&setTimeout(()=>{this.destroyCtxCallback()},0)}destroyCtxCallback(){var t;E.deleteCtx(this.ctxName),(t=this.localeManager)==null||t.destroy()}async proxyUrl(t){if(this.cfg.secureDeliveryProxy&&this.cfg.secureDeliveryProxyUrlResolver&&console.warn("Both secureDeliveryProxy and secureDeliveryProxyUrlResolver are set. The secureDeliveryProxyUrlResolver will be used."),this.cfg.secureDeliveryProxyUrlResolver)try{return await this.cfg.secureDeliveryProxyUrlResolver(t,{uuid:Me(t),cdnUrlModifiers:Fi(t),fileName:Ue(t)})}catch(i){return console.error("Failed to resolve secure delivery proxy URL. Falling back to the default URL.",i),t}return this.cfg.secureDeliveryProxy?te(this.cfg.secureDeliveryProxy,{previewUrl:t},{transform:i=>window.encodeURIComponent(i)}):t}get cfg(){if(!this.__cfgProxy){let t=Object.create(null);this.__cfgProxy=new Proxy(t,{set:(i,s,o)=>{if(typeof s!="string")return!1;let n=W(s);return this.has(n)||this.add(n,J[s]),this.$[n]=o,!0},get:(i,s)=>{let o=W(s);return this.has(o)||this.add(o,J[s]),this.$[W(s)]}})}return this.__cfgProxy}subConfigValue(t,i){let s=W(t);this.has(s)||this.add(s,J[t]),this.sub(s,i)}debugPrint(...t){if(!this.cfg.debug)return;let i=t;if(typeof(t==null?void 0:t[0])=="function"){let s=t[0];i=s()}console.log(`[${this.ctxName}]`,...i)}static reg(t){if(!t){super.reg();return}t.startsWith(fl)&&super.reg(t)}};u(_,"StateConsumerScope",null),u(_,"styleAttrs",[]);var Es="";var rt=class extends _{constructor(){super(...arguments);u(this,"requireCtxName",!0);u(this,"init$",Ge(this));u(this,"_template",null)}initCallback(){var t;super.initCallback(),(t=this.a11y)==null||t.registerBlock(this)}static set template(t){this._template=Es+t+""}static get template(){return this._template}};u(rt,"styleAttrs",["uc-wgt-common"]);var Ts="active",se="___ACTIVITY_IS_ACTIVE___",gt=class gt extends _{constructor(){super(...arguments);u(this,"historyTracked",!1);u(this,"init$",Ji(this));u(this,"_debouncedHistoryFlush",O(this._historyFlush.bind(this),10))}_deactivate(){var i;let t=gt._activityCallbacks.get(this);this[se]=!1,this.removeAttribute(Ts),(i=t==null?void 0:t.deactivateCallback)==null||i.call(t)}_activate(){var i;let t=gt._activityCallbacks.get(this);this.$["*historyBack"]=this.historyBack.bind(this),this[se]=!0,this.setAttribute(Ts,""),(i=t==null?void 0:t.activateCallback)==null||i.call(t),this._debouncedHistoryFlush(),this.emit(k.ACTIVITY_CHANGE,{activity:this.activityType})}initCallback(){super.initCallback(),this.hasAttribute("current-activity")&&this.sub("*currentActivity",t=>{this.setAttribute("current-activity",t)}),this.activityType&&(this.hasAttribute("activity")||this.setAttribute("activity",this.activityType),this.sub("*currentActivity",t=>{var i;try{this.activityType!==t&&this[se]?this._deactivate():this.activityType===t&&!this[se]&&this._activate()}catch(s){console.error(`Error in activity "${this.activityType}". `,s),this.$["*currentActivity"]=(i=this.$["*history"][this.$["*history"].length-1])!=null?i:null}t||(this.$["*history"]=[])}),this.has("*modalActive")&&this.sub("*modalActive",t=>{!t&&this.activityType===this.$["*currentActivity"]&&(this.$["*currentActivity"]=null)}))}_historyFlush(){let t=this.$["*history"];t&&(t.length>10&&(t=t.slice(t.length-11,t.length-1)),this.historyTracked&&t[t.length-1]!==this.activityType&&t.push(this.activityType),this.$["*history"]=t)}_isActivityRegistered(){return this.activityType&>._activityCallbacks.has(this)}get isActivityActive(){return this[se]}get couldOpenActivity(){return!0}registerActivity(t,i={}){let{onActivate:s,onDeactivate:o}=i;gt._activityCallbacks.set(this,{activateCallback:s,deactivateCallback:o})}unregisterActivity(){this.isActivityActive&&this._deactivate(),gt._activityCallbacks.delete(this)}destroyCallback(){super.destroyCallback(),this._isActivityRegistered()&&this.unregisterActivity();let t=this.$["*currentActivity"];!![...this.blocksRegistry].find(s=>s instanceof gt&&s.activityType===t)||(this.$["*currentActivity"]=null,this.setOrAddState("*modalActive",!1))}get activityKey(){return this.ctxName+this.activityType}get activityParams(){return this.$["*currentActivityParams"]}get initActivity(){return this.getCssData("--cfg-init-activity")}get doneActivity(){return this.getCssData("--cfg-done-activity")}historyBack(){var i;let t=this.$["*history"];if(t){let s=t.pop();for(;s===this.activityType;)s=t.pop();let o=!!s;if(s){let n=[...this.blocksRegistry].find(l=>l.activityType===s);o=(i=n==null?void 0:n.couldOpenActivity)!=null?i:!1}s=o?s:void 0,this.$["*currentActivity"]=s,this.$["*history"]=t,s||this.setOrAddState("*modalActive",!1)}}};u(gt,"_activityCallbacks",new Map);var b=gt;b.activities=Object.freeze({START_FROM:"start-from",CAMERA:"camera",DRAW:"draw",UPLOAD_LIST:"upload-list",URL:"url",CLOUD_IMG_EDIT:"cloud-image-edit",EXTERNAL:"external"});var oe=33.333333333333336,x=1,rr=24,Ss=6;function $t(r,e){for(let t in e)r.setAttributeNS(null,t,e[t].toString())}function K(r,e={}){let t=document.createElementNS("http://www.w3.org/2000/svg",r);return $t(t,e),t}function ks(r,e,t){let{x:i,y:s,width:o,height:n}=r,l=e.includes("w")?0:1,a=e.includes("n")?0:1,c=[-1,1][l],h=[-1,1][a],d=[i+l*o+1.5*c,s+a*n+1.5*h-24*t*h],p=[i+l*o+1.5*c,s+a*n+1.5*h],m=[i+l*o-24*t*c+1.5*c,s+a*n+1.5*h];return{d:`M ${d[0]} ${d[1]} L ${p[0]} ${p[1]} L ${m[0]} ${m[1]}`,center:p}}function $s(r,e,t){let{x:i,y:s,width:o,height:n}=r,l=["n","s"].includes(e)?.5:{w:0,e:1}[e],a=["w","e"].includes(e)?.5:{n:0,s:1}[e],c=[-1,1][l],h=[-1,1][a],d,p;["n","s"].includes(e)?(d=[i+l*o-34*t/2,s+a*n+1.5*h],p=[i+l*o+34*t/2,s+a*n+1.5*h]):(d=[i+l*o+1.5*c,s+a*n-34*t/2],p=[i+l*o+1.5*c,s+a*n+34*t/2]);let m=`M ${d[0]} ${d[1]} L ${p[0]} ${p[1]}`,f=[p[0]-(p[0]-d[0])/2,p[1]-(p[1]-d[1])/2];return{d:m,center:f}}function Is(r){return r===""?"move":["e","w"].includes(r)?"ew-resize":["n","s"].includes(r)?"ns-resize":["nw","se"].includes(r)?"nwse-resize":"nesw-resize"}function Os({rect:r,delta:[e,t],imageBox:i}){return Bt({...r,x:r.x+e,y:r.y+t},i)}function Bt(r,e){let{x:t}=r,{y:i}=r;return r.xe.x+e.width&&(t=e.x+e.width-r.width),r.ye.y+e.height&&(i=e.y+e.height-r.height),{...r,x:t,y:i}}function ml({rect:r,delta:e,aspectRatio:t,imageBox:i}){let[,s]=e,{y:o,width:n,height:l}=r;o+=s,l-=s,t&&(n=l*t);let a=r.x+r.width/2-n/2;return o<=i.y&&(o=i.y,l=r.y+r.height-o,t&&(n=l*t,a=r.x+r.width/2-n/2)),a<=i.x&&(a=i.x,o=r.y+r.height-l),a+n>=i.x+i.width&&(a=Math.max(i.x,i.x+i.width-n),n=i.x+i.width-a,t&&(l=n/t),o=r.y+r.height-l),l=i.y+i.height&&(a=Math.max(i.y,i.y+i.height-l),l=i.y+i.height-a,t&&(n=l*t),o=r.x+r.width-n),l=i.y+i.height&&(l=i.y+i.height-o,t&&(n=l*t),a=r.x+r.width/2-n/2),a<=i.x&&(a=i.x,o=r.y),a+n>=i.x+i.width&&(a=Math.max(i.x,i.x+i.width-n),n=i.x+i.width-a,t&&(l=n/t),o=r.y),l=i.x+i.width&&(n=i.x+i.width-o,t&&(l=n/t),a=r.y+r.height/2-l/2),a<=i.y&&(a=i.y,o=r.x),a+l>=i.y+i.height&&(a=Math.max(i.y,i.y+i.height-l),l=i.y+i.height-a,t&&(n=l*t),o=r.x),lt?(o=a/t-c,c+=o,l-=o,l<=i.y&&(c=c-(i.y-l),a=c*t,n=r.x+r.width-a,l=i.y)):t&&(s=c*t-a,a=a+s,n-=s,n<=i.x&&(a=a-(i.x-n),c=a/t,n=i.x,l=r.y+r.height-c)),ci.x+i.width&&(s=i.x+i.width-n-a),l+ot?(o=a/t-c,c+=o,l-=o,l<=i.y&&(c=c-(i.y-l),a=c*t,n=r.x,l=i.y)):t&&(s=c*t-a,a+=s,n+a>=i.x+i.width&&(a=i.x+i.width-n,c=a/t,n=i.x+i.width-a,l=r.y+r.height-c)),ci.y+i.height&&(o=i.y+i.height-l-c),n+=s,a-=s,c+=o,t&&Math.abs(a/c)>t?(o=a/t-c,c+=o,l+c>=i.y+i.height&&(c=i.y+i.height-l,a=c*t,n=r.x+r.width-a,l=i.y+i.height-c)):t&&(s=c*t-a,a+=s,n-=s,n<=i.x&&(a=a-(i.x-n),c=a/t,n=i.x,l=r.y)),ci.x+i.width&&(s=i.x+i.width-n-a),l+c+o>i.y+i.height&&(o=i.y+i.height-l-c),a+=s,c+=o,t&&Math.abs(a/c)>t?(o=a/t-c,c+=o,l+c>=i.y+i.height&&(c=i.y+i.height-l,a=c*t,n=r.x,l=i.y+i.height-c)):t&&(s=c*t-a,a+=s,n+a>=i.x+i.width&&(a=i.x+i.width-n,c=a/t,n=i.x+i.width-a,l=r.y)),c=e.x&&r.y>=e.y&&r.x+r.width<=e.x+e.width&&r.y+r.height<=e.y+e.height}function Ps(r,e){return Math.abs(r.width/r.height-e)<.1}function zt({width:r,height:e},t){let i=t/90%2!==0;return{width:i?e:r,height:i?r:e}}function Rs(r,e,t){let i=r/e,s,o;i>t?(s=Math.round(e*t),o=e):(s=r,o=Math.round(r/t));let n=Math.round((r-s)/2),l=Math.round((e-o)/2);return n+s>r&&(s=r-n),l+o>e&&(o=e-l),{x:n,y:l,width:s,height:o}}function Vt(r){return{x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)}}function At(r,e,t){return Math.min(Math.max(r,e),t)}var Ze=r=>{if(!r)return[];let[e,t]=r.split(":").map(Number);if(!Number.isFinite(e)||!Number.isFinite(t)){console.error(`Invalid crop preset: ${r}`);return}return[{type:"aspect-ratio",width:e,height:t}]};var jt="blocks",Ht="1.6.0";function Fs(r){return Gi({...r,libraryName:jt,libraryVersion:Ht})}var Ds=r=>Math.floor(r/1e3),Ns=(r,{threshold:e})=>{let{secureExpire:t}=r,i=Ds(Date.now()),s=Number(t),o=Ds(e);return i+o>=s};var Ye=class{constructor(e){u(this,"_block");u(this,"_secureToken",null);this._block=e}_debugPrint(...e){this._block.debugPrint("[secure-uploads]",...e)}async getSecureToken(){let{secureSignature:e,secureExpire:t,secureUploadsSignatureResolver:i}=this._block.cfg;if((e||t)&&i&&console.warn("Both secureSignature/secureExpire and secureUploadsSignatureResolver are set. secureUploadsSignatureResolver will be used."),i){if(!this._secureToken||Ns(this._secureToken,{threshold:this._block.cfg.secureUploadsExpireThreshold})){this._secureToken?this._debugPrint("Secure signature is expired. Resolving a new one..."):this._debugPrint("Secure signature is not set yet.");try{let s=await i();s?!s.secureSignature||!s.secureExpire?console.error("Secure signature resolver returned an invalid result:",s):(this._debugPrint("Secure signature resolved:",s),this._debugPrint("Secure signature will expire in",new Date(Number(s.secureExpire)*1e3).toISOString()),this._secureToken=s):(this._debugPrint("Secure signature resolver returned nothing."),this._secureToken=null)}catch(s){console.error("Secure signature resolving failed. Falling back to the previous one.",s)}}return this._secureToken}return e&&t?(this._debugPrint("Secure signature and expire are set. Using them...",{secureSignature:e,secureExpire:t}),{secureSignature:e,secureExpire:t}):null}};var Bs="[Typed State] Wrong property name: ",xl="[Typed State] Wrong property type: ",Je=class{constructor(e,t){this.__typedSchema=e,this.__ctxId=t||Mt.generate(),this.__schema=Object.keys(e).reduce((i,s)=>(i[s]=e[s].value,i),{}),this.__data=E.registerCtx(this.__schema,this.__ctxId)}get uid(){return this.__ctxId}setValue(e,t){if(!this.__typedSchema.hasOwnProperty(e)){console.warn(Bs+e);return}let i=this.__typedSchema[e];if((t==null?void 0:t.constructor)===i.type||t instanceof i.type||i.nullable&&t===null){this.__data.pub(e,t);return}console.warn(xl+e)}setMultipleValues(e){for(let t in e)this.setValue(t,e[t])}getValue(e){if(!this.__typedSchema.hasOwnProperty(e)){console.warn(Bs+e);return}return this.__data.read(e)}subscribe(e,t){return this.__data.sub(e,t)}remove(){E.deleteCtx(this.__ctxId)}};var Qe=class{constructor(e){this.__typedSchema=e.typedSchema,this.__ctxId=e.ctxName||Mt.generate(),this.__data=E.registerCtx({},this.__ctxId),this.__watchList=e.watchList||[],this.__subsMap=Object.create(null),this.__propertyObservers=new Set,this.__collectionObservers=new Set,this.__items=new Set,this.__removed=new Set,this.__added=new Set;let t=Object.create(null);this.__notifyObservers=(i,s)=>{this.__observeTimeout&&window.clearTimeout(this.__observeTimeout),t[i]||(t[i]=new Set),t[i].add(s),this.__observeTimeout=window.setTimeout(()=>{Object.keys(t).length!==0&&(this.__propertyObservers.forEach(o=>{o({...t})}),t=Object.create(null))})}}notify(){this.__notifyTimeout&&window.clearTimeout(this.__notifyTimeout),this.__notifyTimeout=window.setTimeout(()=>{let e=new Set(this.__added),t=new Set(this.__removed);this.__added.clear(),this.__removed.clear();for(let i of this.__collectionObservers)i==null||i([...this.__items],e,t)})}observeCollection(e){return this.__collectionObservers.add(e),this.__items.size>0&&this.notify(),()=>{this.unobserveCollection(e)}}unobserveCollection(e){var t;(t=this.__collectionObservers)==null||t.delete(e)}add(e){let t=new Je(this.__typedSchema);for(let i in e)t.setValue(i,e[i]);return this.__items.add(t.uid),this.notify(),this.__data.add(t.uid,t),this.__added.add(t),this.__watchList.forEach(i=>{this.__subsMap[t.uid]||(this.__subsMap[t.uid]=[]),this.__subsMap[t.uid].push(t.subscribe(i,()=>{this.__notifyObservers(i,t.uid)}))}),t.uid}read(e){return this.__data.read(e)}readProp(e,t){return this.read(e).getValue(t)}publishProp(e,t,i){this.read(e).setValue(t,i)}remove(e){this.__removed.add(this.__data.read(e)),this.__items.delete(e),this.notify(),this.__data.pub(e,null),delete this.__subsMap[e]}clearAll(){this.__items.forEach(e=>{this.remove(e)})}observeProperties(e){return this.__propertyObservers.add(e),()=>{this.unobserveProperties(e)}}unobserveProperties(e){var t;(t=this.__propertyObservers)==null||t.delete(e)}findItems(e){let t=[];return this.__items.forEach(i=>{let s=this.read(i);e(s)&&t.push(i)}),t}items(){return[...this.__items]}get size(){return this.__items.size}destroy(){E.deleteCtx(this.__ctxId),this.__propertyObservers=null,this.__collectionObservers=null;for(let e in this.__subsMap)this.__subsMap[e].forEach(t=>{t.remove()}),delete this.__subsMap[e]}};var Gt=Object.freeze({FACEBOOK:"facebook",DROPBOX:"dropbox",GDRIVE:"gdrive",GPHOTOS:"gphotos",INSTAGRAM:"instagram",FLICKR:"flickr",VK:"vk",EVERNOTE:"evernote",BOX:"box",ONEDRIVE:"onedrive",HUDDLE:"huddle"}),L=Object.freeze({LOCAL:"local",DROP_AREA:"drop-area",CAMERA:"camera",EXTERNAL:"external",API:"js-api",URL:"url",DRAW:"draw",...Gt});var ne=["image/*","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/avif","image/avif-sequence",".heif",".heifs",".heic",".heics",".avif",".avifs"],ti=r=>r?r.filter(e=>typeof e=="string").map(e=>N(e)).flat():[],sr=(r,e)=>e.some(t=>t.endsWith("*")?(t=t.replace("*",""),r.startsWith(t)):r===t),zs=(r,e)=>e.some(t=>t.startsWith(".")?r.toLowerCase().endsWith(t.toLowerCase()):!1),Vs=r=>{let e=r==null?void 0:r.type;return e?sr(e,ne):!1};var Al=/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i,El=new RegExp(`^/?(${Al.source})(?:/(-/(?:[^/]+/)+)?([^/]*))?$`,"i"),js=({url:r,cdnBase:e})=>{let t=new URL(e),i=new URL(r);if(t.host!==i.host)return null;let[,s,o,n]=El.exec(i.pathname);return{uuid:s,cdnUrlModifiers:o||"",filename:n||null}};var Hs=r=>{let e=new Map;return(...t)=>{let i=JSON.stringify(t);if(e.has(i))return e.get(i);let s=r(...t);return e.set(i,s),s}};var Gs=new Set;function Ws(r){Gs.has(r)||(Gs.add(r),console.warn(r))}function Tl(r){let e=!1;return setTimeout(()=>{e=!0},0),i=>(...s)=>(e&&Ws(r),i(...s))}function Xs(r){let e={progress:()=>r.$["*commonProgress"],errors:()=>r.$["*collectionErrors"],group:()=>r.$["*groupInfo"],totalCount:()=>r.uploadCollection.size,failedCount:()=>t.failedEntries.length,successCount:()=>t.successEntries.length,uploadingCount:()=>t.uploadingEntries.length,status:()=>t.isFailed?"failed":t.isUploading?"uploading":t.isSuccess?"success":"idle",isSuccess:()=>t.allEntries.length>0&&t.errors.length===0&&t.successEntries.length===t.allEntries.length,isUploading:()=>t.allEntries.some(s=>s.status==="uploading"),isFailed:()=>t.errors.length>0||t.failedEntries.length>0,allEntries:()=>r.getOutputData(),successEntries:()=>t.allEntries.filter(s=>s.status==="success"),failedEntries:()=>t.allEntries.filter(s=>s.status==="failed"),uploadingEntries:()=>t.allEntries.filter(s=>s.status==="uploading"),idleEntries:()=>t.allEntries.filter(s=>s.status==="idle")},t={},i=Tl("You're trying to access the OutputCollectionState asynchronously. In this case, the data you retrieve will be newer than it was when the OutputCollectionState was created or when the event was dispatched. If you want to retain the state at a specific moment in time, you should use the spread operator like this: `{...outputCollectionState}` or `{...e.detail}`");for(let[s,o]of Object.entries(e)){let n=s,a=Hs(i(o));Object.defineProperty(t,n,{get:a,enumerable:!0})}return t}var ei=class{constructor(e){u(this,"_ctx");u(this,"addFileFromUrl",(e,{silent:t,fileName:i,source:s}={})=>{let o=this._uploadCollection.add({externalUrl:e,fileName:i!=null?i:null,silent:t!=null?t:!1,source:s!=null?s:L.API});return this.getOutputItem(o)});u(this,"addFileFromUuid",(e,{silent:t,fileName:i,source:s}={})=>{let o=this._uploadCollection.add({uuid:e,fileName:i!=null?i:null,silent:t!=null?t:!1,source:s!=null?s:L.API});return this.getOutputItem(o)});u(this,"addFileFromCdnUrl",(e,{silent:t,fileName:i,source:s}={})=>{var l;let o=js({url:e,cdnBase:this.cfg.cdnCname});if(!o)throw new Error("Invalid CDN URL");let n=this._uploadCollection.add({uuid:o.uuid,cdnUrl:e,cdnUrlModifiers:o.cdnUrlModifiers,fileName:(l=i!=null?i:o.filename)!=null?l:null,silent:t!=null?t:!1,source:s!=null?s:L.API});return this.getOutputItem(n)});u(this,"addFileFromObject",(e,{silent:t,fileName:i,source:s,fullPath:o}={})=>{let n=this._uploadCollection.add({file:e,isImage:Vs(e),mimeType:e.type,fileName:i!=null?i:e.name,fileSize:e.size,silent:t!=null?t:!1,source:s!=null?s:L.API,fullPath:o!=null?o:null});return this.getOutputItem(n)});u(this,"removeFileByInternalId",e=>{if(!this._uploadCollection.read(e))throw new Error(`File with internalId ${e} not found`);this._uploadCollection.remove(e)});u(this,"uploadAll",()=>{let e=this._uploadCollection.items().filter(t=>{let i=this._uploadCollection.read(t);return!i.getValue("isRemoved")&&!i.getValue("isUploading")&&!i.getValue("fileInfo")});e.length!==0&&(this._ctx.$["*uploadTrigger"]=new Set(e),this._ctx.emit(k.COMMON_UPLOAD_START,this.getOutputCollectionState()))});u(this,"openSystemDialog",(e={})=>{var o;let t=Rt(ti([(o=this.cfg.accept)!=null?o:"",...this.cfg.imgOnly?ne:[]]));this.cfg.accept&&this.cfg.imgOnly&&console.warn("There could be a mistake.\nBoth `accept` and `imgOnly` parameters are set.\nThe value of `accept` will be concatenated with the internal image mime types list.");let i="uploadcare-file-input",s=document.createElement("input");s.setAttribute(i,""),Qt(s,{opacity:0,height:0,width:0,visibility:"hidden"}),s.type="file",s.multiple=this.cfg.multiple,e.captureCamera?(s.capture=this.cfg.cameraCapture,s.accept="image/*"):s.accept=t,s.addEventListener("change",()=>{s.files&&([...s.files].forEach(n=>this.addFileFromObject(n,{source:e.captureCamera?L.CAMERA:L.LOCAL})),this._ctx.$["*currentActivity"]=b.activities.UPLOAD_LIST,this._ctx.setOrAddState("*modalActive",!0),s.remove())},{once:!0}),document.querySelectorAll(`[${i}]`).forEach(n=>n.remove()),document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click"))});u(this,"getOutputItem",e=>{var n,l,a,c,h,d,p,m,f,g;let t=E.getCtx(e).store,i=t.fileInfo,s=t.isRemoved?"removed":t.errors.length>0?"failed":t.fileInfo?"success":t.isUploading?"uploading":"idle";return{uuid:(l=(n=i==null?void 0:i.uuid)!=null?n:t.uuid)!=null?l:null,internalId:e,name:(a=i==null?void 0:i.originalFilename)!=null?a:t.fileName,size:(c=i==null?void 0:i.size)!=null?c:t.fileSize,isImage:(h=i==null?void 0:i.isImage)!=null?h:t.isImage,mimeType:(d=i==null?void 0:i.mimeType)!=null?d:t.mimeType,file:t.file,externalUrl:t.externalUrl,cdnUrlModifiers:t.cdnUrlModifiers,cdnUrl:(m=(p=t.cdnUrl)!=null?p:i==null?void 0:i.cdnUrl)!=null?m:null,fullPath:t.fullPath,uploadProgress:t.uploadProgress,fileInfo:i!=null?i:null,metadata:(g=(f=t.metadata)!=null?f:i==null?void 0:i.metadata)!=null?g:null,isSuccess:s==="success",isUploading:s==="uploading",isFailed:s==="failed",isRemoved:s==="removed",errors:t.errors,status:s,source:t==null?void 0:t.source}});u(this,"getOutputCollectionState",()=>Xs(this._ctx));u(this,"initFlow",(e=!1)=>{var t;if(this._uploadCollection.size>0&&!e)this._ctx.set$({"*currentActivity":b.activities.UPLOAD_LIST}),this._ctx.setOrAddState("*modalActive",!0);else if(((t=this._sourceList)==null?void 0:t.length)===1){let i=this._sourceList[0];if(i==="local"){this._ctx.$["*currentActivity"]=b.activities.UPLOAD_LIST,this.openSystemDialog();return}let s=this._ctx.$["*blocksRegistry"],o=l=>"type"in l&&l.type===i,n=[...s].find(o);n==null||n.activate(),this._ctx.$["*currentActivity"]&&this._ctx.setOrAddState("*modalActive",!0)}else this._ctx.set$({"*currentActivity":b.activities.START_FROM}),this._ctx.setOrAddState("*modalActive",!0)});u(this,"doneFlow",()=>{this._ctx.set$({"*currentActivity":this._ctx.doneActivity,"*history":this._ctx.doneActivity?[this._ctx.doneActivity]:[]}),this._ctx.$["*currentActivity"]||this._ctx.setOrAddState("*modalActive",!1)});u(this,"setCurrentActivity",(e,t=void 0)=>{if(this._ctx.hasBlockInCtx(i=>i.activityType===e)){this._ctx.set$({"*currentActivityParams":t!=null?t:{},"*currentActivity":e});return}console.warn(`Activity type "${e}" not found in the context`)});u(this,"getCurrentActivity",()=>this._ctx.$["*currentActivity"]);u(this,"setModalState",e=>{if(e&&!this._ctx.$["*currentActivity"]){console.warn(`Can't open modal without current activity. Please use "setCurrentActivity" method first.`);return}this._ctx.setOrAddState("*modalActive",e)});this._ctx=e}get _uploadCollection(){return this._ctx.uploadCollection}get cfg(){return this._ctx.cfg}get l10n(){return this._ctx.l10n.bind(this._ctx)}removeAllFiles(){this._uploadCollection.clearAll()}get _sourceList(){let e=[];return this.cfg.sourceList&&(e=N(this.cfg.sourceList)),e}};var or=(r,e)=>{let t=e.cfg.imgOnly,i=r.isImage;if(!(!t||i)&&!(!r.fileInfo&&r.externalUrl)&&!(!r.fileInfo&&!r.mimeType))return{type:"NOT_AN_IMAGE",message:e.l10n("images-only-accepted"),payload:{entry:r}}};var nr=(r,e)=>{let t=e.cfg.imgOnly,i=e.cfg.accept,s=ti([...t?ne:[],i]);if(!s.length)return;let o=r.mimeType,n=r.name;if(!o||!n)return;let l=sr(o,s),a=zs(n,s);if(!l&&!a)return{type:"FORBIDDEN_FILE_TYPE",message:e.l10n("file-type-not-allowed"),payload:{entry:r}}};var ot=1e3,It=Object.freeze({AUTO:"auto",BYTE:"byte",KB:"kb",MB:"mb",GB:"gb",TB:"tb",PB:"pb"}),le=r=>Math.ceil(r*100)/100,qs=(r,e=It.AUTO)=>{let t=e===It.AUTO;if(e===It.BYTE||t&&r{let t=e.cfg.maxLocalFileSizeBytes,i=r.size;if(t&&i&&i>t)return{type:"FILE_SIZE_EXCEEDED",message:e.l10n("files-max-size-limit-error",{maxFileSize:qs(t)}),payload:{entry:r}}};var ar=(r,e)=>{let{internalId:t}=r,i=e._uploadCollection.read(t),s=i==null?void 0:i.getValue("uploadError");if(!s)return;if(s instanceof B)return{type:"UPLOAD_ERROR",message:s.message,payload:{entry:r,error:s}};if(s instanceof Ft)return{type:"NETWORK_ERROR",message:s.message,payload:{entry:r,error:s}};let o=s instanceof Error?s:new Error("Unknown error",{cause:s});return{type:"UNKNOWN_ERROR",message:o.message,payload:{entry:r,error:o}}};var cr=(r,e)=>{if(r.failedCount>0)return{type:"SOME_FILES_HAS_ERRORS",message:e.l10n("some-files-were-not-uploaded")}};var ur=(r,e)=>{let t=r.totalCount,i=e.cfg.multiple?e.cfg.multipleMin:0,s=e.cfg.multiple?e.cfg.multipleMax:1;if(i&&ts)return{type:"TOO_MANY_FILES",message:e.l10n("files-count-limit-error-too-many",{min:i,max:s,total:t}),payload:{total:t,min:i,max:s}}};var ii={file:"File validator execution has failed",collection:"Collection validator execution has failed",message:"Missing message. We recommend adding message: value."},ri=class{constructor(e){u(this,"_blockInstance");u(this,"_fileValidators",[or,nr,lr,ar]);u(this,"_collectionValidators",[ur,cr]);this._blockInstance=e,this._uploadCollection=this._blockInstance.uploadCollection;let t=()=>{this.runFileValidators(),this.runCollectionValidators()};this._blockInstance.subConfigValue("maxLocalFileSizeBytes",t),this._blockInstance.subConfigValue("multipleMin",t),this._blockInstance.subConfigValue("multipleMax",t),this._blockInstance.subConfigValue("multiple",t),this._blockInstance.subConfigValue("imgOnly",t),this._blockInstance.subConfigValue("accept",t)}runFileValidators(e){let t=e!=null?e:this._uploadCollection.items();for(let i of t){let s=this._uploadCollection.read(i);s&&this._runFileValidatorsForEntry(s)}}runCollectionValidators(){let e=this._blockInstance.api.getOutputCollectionState(),t=[];for(let i of[...this._collectionValidators,...this._addCustomTypeToValidators(this._blockInstance.cfg.collectionValidators)])try{let s=i(e,this._blockInstance.api);if(!s)continue;s&&(t.push(s),s.message||console.warn(ii.message))}catch(s){console.warn(ii.collection,s)}this._blockInstance.$["*collectionErrors"]=t,t.length>0&&this._blockInstance.emit(k.COMMON_UPLOAD_FAILED,()=>this._blockInstance.api.getOutputCollectionState(),{debounce:!0})}_runFileValidatorsForEntry(e){let t=this._blockInstance.api.getOutputItem(e.uid),i=[];for(let s of[...this._fileValidators,...this._addCustomTypeToValidators(this._blockInstance.cfg.fileValidators)])try{let o=s(t,this._blockInstance.api);if(!o)continue;o&&(i.push(o),o.message||console.warn(ii.message))}catch(o){console.warn(ii.file,o)}e.setValue("errors",i)}_addCustomTypeToValidators(e){return e.map(t=>(...i)=>{let s=t(...i);return s?{...s,type:"CUSTOM_ERROR"}:void 0})}};var Ks=Object.freeze({file:{type:File,value:null},externalUrl:{type:String,value:null},fileName:{type:String,value:null,nullable:!0},fileSize:{type:Number,value:null,nullable:!0},lastModified:{type:Number,value:Date.now()},uploadProgress:{type:Number,value:0},uuid:{type:String,value:null},isImage:{type:Boolean,value:!1},mimeType:{type:String,value:null,nullable:!0},ctxName:{type:String,value:null},cdnUrl:{type:String,value:null},cdnUrlModifiers:{type:String,value:null},fileInfo:{type:pt,value:null},isUploading:{type:Boolean,value:!1},abortController:{type:AbortController,value:null,nullable:!0},thumbUrl:{type:String,value:null,nullable:!0},silent:{type:Boolean,value:!1},source:{type:String,value:!1,nullable:!0},fullPath:{type:String,value:null,nullable:!0},metadata:{type:Object,value:null,nullable:!0},errors:{type:Array,value:[]},uploadError:{type:Error,value:null,nullable:!0},isRemoved:{type:Boolean,value:!1}});var S=class r extends b{constructor(){super(...arguments);u(this,"couldBeCtxOwner",!1);u(this,"isCtxOwner",!1);u(this,"init$",Ge(this));u(this,"_flushOutputItems",O(async()=>{if(this.getOutputData().length!==this.uploadCollection.size)return;let i=this.api.getOutputCollectionState();this.$["*collectionState"]=i,this.emit(k.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.cfg.groupOutput&&i.totalCount>0&&i.status==="success"&&this._createGroup(i)},300));u(this,"_handleCollectionUpdate",(t,i,s)=>{var o;(i.size||s.size)&&(this.$["*groupInfo"]=null),this.validationManager.runFileValidators(),this.validationManager.runCollectionValidators();for(let n of i)n.getValue("silent")||this.emit(k.FILE_ADDED,this.api.getOutputItem(n.uid));for(let n of s)this.$["*uploadTrigger"].delete(n.uid),(o=n.getValue("abortController"))==null||o.abort(),n.setMultipleValues({isRemoved:!0,abortController:null,isUploading:!1,uploadProgress:0}),URL.revokeObjectURL(n==null?void 0:n.getValue("thumbUrl")),this.emit(k.FILE_REMOVED,this.api.getOutputItem(n.uid));this.$["*uploadList"]=t.map(n=>({uid:n})),this._flushCommonUploadProgress(),this._flushOutputItems()});u(this,"_handleCollectionPropertiesUpdate",t=>{this._flushOutputItems();let i=this.uploadCollection,s=[...new Set(Object.entries(t).filter(([o])=>["uploadError","fileInfo"].includes(o)).map(([,o])=>[...o]).flat())];if(s.length>0&&setTimeout(()=>{this.validationManager.runFileValidators(s)}),t.uploadProgress){for(let o of t.uploadProgress){let{isUploading:n,silent:l}=E.getCtx(o).store;n&&!l&&this.emit(k.FILE_UPLOAD_PROGRESS,this.api.getOutputItem(o))}this._flushCommonUploadProgress()}if(t.isUploading)for(let o of t.isUploading){let{isUploading:n,silent:l}=E.getCtx(o).store;n&&!l&&this.emit(k.FILE_UPLOAD_START,this.api.getOutputItem(o))}if(t.fileInfo){for(let o of t.fileInfo){let{fileInfo:n,silent:l}=E.getCtx(o).store;n&&!l&&this.emit(k.FILE_UPLOAD_SUCCESS,this.api.getOutputItem(o))}this.cfg.cropPreset&&this.setInitialCrop()}if(t.errors){for(let l of t.errors){let{errors:a}=E.getCtx(l).store;a.length>0&&(this.emit(k.FILE_UPLOAD_FAILED,this.api.getOutputItem(l)),this.emit(k.COMMON_UPLOAD_FAILED,()=>this.api.getOutputCollectionState(),{debounce:!0}))}let o=i.findItems(l=>!!l.getValue("fileInfo")),n=i.findItems(l=>l.getValue("errors").length>0);i.size>0&&n.length===0&&i.size===o.length&&this.$["*collectionErrors"].length===0&&this.emit(k.COMMON_UPLOAD_SUCCESS,this.api.getOutputCollectionState())}t.cdnUrl&&([...t.cdnUrl].filter(n=>{var l;return!!((l=this.uploadCollection.read(n))!=null&&l.getValue("cdnUrl"))}).forEach(n=>{this.emit(k.FILE_URL_CHANGED,this.api.getOutputItem(n))}),this.$["*groupInfo"]=null)});u(this,"_flushCommonUploadProgress",()=>{let t=0,s=[...this.$["*uploadTrigger"]].filter(n=>!!this.uploadCollection.read(n));s.forEach(n=>{let l=this.uploadCollection.readProp(n,"uploadProgress");t+=l});let o=s.length?Math.round(t/s.length):0;this.$["*commonProgress"]!==o&&(this.$["*commonProgress"]=o,this.emit(k.COMMON_UPLOAD_PROGRESS,this.api.getOutputCollectionState()))})}get hasCtxOwner(){return this.hasBlockInCtx(t=>t instanceof r?t.isCtxOwner&&t.isConnected&&t!==this:!1)}initCallback(){if(super.initCallback(),!this.has("*uploadCollection")){let t=new Qe({typedSchema:Ks,watchList:["uploadProgress","uploadError","fileInfo","errors","cdnUrl","isUploading"]});this.add("*uploadCollection",t)}this.has("*publicApi")||this.add("*publicApi",new ei(this)),this.has("*validationManager")||this.add("*validationManager",new ri(this)),!this.hasCtxOwner&&this.couldBeCtxOwner&&this.initCtxOwner()}get validationManager(){if(!this.has("*validationManager"))throw new Error("Unexpected error: ValidationManager is not initialized");return this.$["*validationManager"]}get api(){if(!this.has("*publicApi"))throw new Error("Unexpected error: UploaderPublicApi is not initialized");return this.$["*publicApi"]}getAPI(){return this.api}get uploadCollection(){if(!this.has("*uploadCollection"))throw new Error("Unexpected error: TypedCollection is not initialized");return this.$["*uploadCollection"]}destroyCtxCallback(){var t,i;(t=this._unobserveCollectionProperties)==null||t.call(this),(i=this._unobserveCollection)==null||i.call(this),this.uploadCollection.destroy(),this.$["*uploadCollection"]=null,super.destroyCtxCallback()}initCtxOwner(){this.isCtxOwner=!0,this._unobserveCollection=this.uploadCollection.observeCollection(this._handleCollectionUpdate),this._unobserveCollectionProperties=this.uploadCollection.observeProperties(this._handleCollectionPropertiesUpdate),this.subConfigValue("maxConcurrentRequests",t=>{this.$["*uploadQueue"].concurrency=Number(t)||1}),this.$["*secureUploadsManager"]||(this.$["*secureUploadsManager"]=new Ye(this)),this.has("*modalActive")&&this.sub("*modalActive",t=>{t&&!this.$["*currentActivity"]&&(this.$["*modalActive"]=!1)})}async _createGroup(t){let i=await this.getUploadClientOptions(),s=t.allEntries.map(a=>a.uuid+(a.cdnUrlModifiers?`/${a.cdnUrlModifiers}`:"")),o=new AbortController,n=await ms(s,{...i,signal:o.signal});if(this.$["*collectionState"]!==t){o.abort();return}this.$["*groupInfo"]=n;let l=this.api.getOutputCollectionState();this.emit(k.GROUP_CREATED,l),this.emit(k.CHANGE,()=>this.api.getOutputCollectionState(),{debounce:!0}),this.$["*collectionState"]=l}setInitialCrop(){let t=Ze(this.cfg.cropPreset);if(t){let[i]=t,s=this.uploadCollection.findItems(o=>{var n;return o.getValue("fileInfo")&&o.getValue("isImage")&&!((n=o.getValue("cdnUrlModifiers"))!=null&&n.includes("/crop/"))}).map(o=>this.uploadCollection.read(o));for(let o of s){let n=o.getValue("fileInfo"),{width:l,height:a}=n.imageInfo,c=i.width/i.height,h=Rs(l,a,c),d=D(`crop/${h.width}x${h.height}/${h.x},${h.y}`,"preview");o.setMultipleValues({cdnUrlModifiers:d,cdnUrl:U(o.getValue("cdnUrl"),d)}),this.uploadCollection.size===1&&this.cfg.useCloudImageEditor&&this.hasBlockInCtx(p=>p.activityType===b.activities.CLOUD_IMG_EDIT)&&(this.$["*currentActivityParams"]={internalId:o.uid},this.$["*currentActivity"]=b.activities.CLOUD_IMG_EDIT)}}}async getMetadataFor(t){let i=this.cfg.metadata||void 0;if(typeof i=="function"){let s=this.api.getOutputItem(t);return await i(s)}return i}async getUploadClientOptions(){let i=await this.$["*secureUploadsManager"].getSecureToken().catch(()=>null);return{store:this.cfg.store,publicKey:this.cfg.pubkey,baseCDN:this.cfg.cdnCname,baseURL:this.cfg.baseUrl,userAgent:Fs,integration:this.cfg.userAgentIntegration,secureSignature:i==null?void 0:i.secureSignature,secureExpire:i==null?void 0:i.secureExpire,retryThrottledRequestMaxTimes:this.cfg.retryThrottledRequestMaxTimes,multipartMinFileSize:this.cfg.multipartMinFileSize,multipartChunkSize:this.cfg.multipartChunkSize,maxConcurrentRequests:this.cfg.multipartMaxConcurrentRequests,multipartMaxAttempts:this.cfg.multipartMaxAttempts,checkForUrlDuplicates:!!this.cfg.checkForUrlDuplicates,saveUrlForRecurrentUploads:!!this.cfg.saveUrlForRecurrentUploads}}getOutputData(){return this.uploadCollection.items().map(s=>this.api.getOutputItem(s))}};S.extSrcList=Object.freeze({...Gt});S.sourceTypes=Object.freeze({...L});var ae=r=>{var e;return(e=r.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:e.map(t=>t.toLowerCase()).join("-")};var R=r=>String(r),Q=r=>{let e=Number(r);if(Number.isNaN(e))throw new Error(`Invalid number: "${r}"`);return e},$=r=>{if(typeof r=="undefined"||r===null)return!1;if(typeof r=="boolean")return r;if(r==="true"||r==="")return!0;if(r==="false")return!1;throw new Error(`Invalid boolean: "${r}"`)},Sl=r=>r==="auto"?r:$(r),kl=r=>{let e=R(r);if(e!=="user"&&e!=="environment"&&e!=="")throw new Error(`Invalid "cameraCapture" value: "${e}"`);return e},$l=r=>{if(typeof r=="object"&&!Array.isArray(r)||typeof r=="function")return r;throw new Error("Invalid metadata value. Must be an object or function.")},Il=r=>{if(typeof r=="object")return r;throw new Error("Invalid value. Must be an object.")},hr=r=>{if(typeof r=="function")return r;throw new Error("Invalid value. Must be a function.")},Zs=r=>{if(Array.isArray(r))return r;throw new Error("Must be an array.")},Ol={pubkey:R,multiple:$,multipleMin:Q,multipleMax:Q,confirmUpload:$,imgOnly:$,accept:R,externalSourcesPreferredTypes:R,store:Sl,cameraMirror:$,cameraCapture:kl,sourceList:R,maxLocalFileSizeBytes:Q,thumbSize:Q,showEmptyList:$,useLocalImageEditor:$,useCloudImageEditor:$,cloudImageEditorTabs:R,removeCopyright:$,cropPreset:R,imageShrink:R,modalScrollLock:$,modalBackdropStrokes:$,sourceListWrap:$,remoteTabSessionKey:R,cdnCname:R,baseUrl:R,socialBaseUrl:R,secureSignature:R,secureExpire:R,secureDeliveryProxy:R,retryThrottledRequestMaxTimes:Q,multipartMinFileSize:Q,multipartChunkSize:Q,maxConcurrentRequests:Q,multipartMaxConcurrentRequests:Q,multipartMaxAttempts:Q,checkForUrlDuplicates:$,saveUrlForRecurrentUploads:$,groupOutput:$,userAgentIntegration:R,debug:$,localeName:R,metadata:$l,secureUploadsExpireThreshold:Q,localeDefinitionOverride:Il,secureUploadsSignatureResolver:hr,secureDeliveryProxyUrlResolver:hr,iconHrefResolver:hr,fileValidators:Zs,collectionValidators:Zs},Ys=(r,e)=>{if(!(typeof e=="undefined"||e===null))try{return Ol[r](e)}catch(t){return console.error(`Invalid value for config key "${r}".`,t),J[r]}};var dr=[...new Set(["debug",...Object.keys(J)])],Ll=["metadata","localeDefinitionOverride","secureUploadsSignatureResolver","secureDeliveryProxyUrlResolver","iconHrefResolver","fileValidators","collectionValidators"],Ul=r=>Ll.includes(r),Wt=dr.filter(r=>!Ul(r)),Ml={...Object.fromEntries(Wt.map(r=>[ae(r),r])),...Object.fromEntries(Wt.map(r=>[r.toLowerCase(),r]))},Pl={...Object.fromEntries(Wt.map(r=>[ae(r),W(r)])),...Object.fromEntries(Wt.map(r=>[r.toLowerCase(),W(r)]))},Js=r=>"__"+r,ce=class extends _{constructor(){super();u(this,"requireCtxName",!0);this.init$={...this.init$,...Object.fromEntries(Object.entries(J).map(([t,i])=>[W(t),i]))}}_flushValueToAttribute(t,i){if(Wt.includes(t)){let s=[...new Set([ae(t),t.toLowerCase()])];for(let o of s)typeof i=="undefined"||i===null?this.removeAttribute(o):this.getAttribute(o)!==i.toString()&&this.setAttribute(o,i.toString())}}_flushValueToState(t,i){this.$[W(t)]!==i&&(typeof i=="undefined"||i===null?this.$[W(t)]=J[t]:this.$[W(t)]=i)}_setValue(t,i){let s=this,o=Ys(t,i),n=Js(t);s[n]!==o&&(this._assertSameValueDifferentReference(t,s[n],o),s[n]=o,this._flushValueToAttribute(t,o),this._flushValueToState(t,o),this.debugPrint(`[uc-config] "${t}"`,o))}_getValue(t){let i=this,s=Js(t);return i[s]}_assertSameValueDifferentReference(t,i,s){this.cfg.debug&&s!==i&&typeof s=="object"&&typeof i=="object"&&JSON.stringify(s)===JSON.stringify(i)&&(console.warn(`[uc-config] Option "${t}" value is the same as the previous one but the reference is different`),console.warn("[uc-config] You should avoid changing the reference of the object to prevent unnecessary calculations"),console.warn(`[uc-config] "${t}" previous value:`,i),console.warn(`[uc-config] "${t}" new value:`,s))}initCallback(){var i;super.initCallback();let t=this;for(let s of Wt)this.sub(W(s),o=>{this._setValue(s,o)},!1);for(let s of dr){let o=(i=t[s])!=null?i:this.$[W(s)];o!==J[s]&&this._setValue(s,o),Object.defineProperty(this,s,{set:n=>{this._setValue(s,n)},get:()=>this._getValue(s)})}}attributeChangedCallback(t,i,s){if(i===s)return;let o=this,n=Ml[t];o[n]=s}};ce.bindAttributes(Pl);for(let r of dr)ce.prototype[r]=void 0;var Rl=ce;var ue=class extends _{constructor(){super(),this.init$={...this.init$,name:"",href:"",title:""}}initCallback(){super.initCallback(),this.sub("name",e=>{if(!e)return;let t=`#uc-icon-${e}`;this.subConfigValue("iconHrefResolver",i=>{if(i){let s=i(e);t=s!=null?s:t}this.$.href=t})})}};ue.template=`{{title}}`;ue.bindAttributes({name:"name",title:"title"});var Qs=r=>[...new Set(r)];var to=r=>Object.entries(r).filter(([e,t])=>t!==void 0&&t!=="").map(([e,t])=>e==="cdn-operations"||e==="analytics"?t:`${e}/${t}`);var Fl="https://ucarecdn.com",he=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:Fl},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}});var Xt="--uc-img-",pr="unresolved";var fr=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),mr=3e3,gr=5e3,br=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"});var io=Object.create(null),eo;for(let r in he)io[Xt+r]=((eo=he[r])==null?void 0:eo.default)||"";var si=class extends Pt{constructor(){super(...arguments);u(this,"cssInit$",io)}$$(t){return this.$[Xt+t]}set$$(t){for(let i in t)this.$[Xt+i]=t[i]}sub$$(t,i){this.sub(Xt+t,s=>{s===null||s===""||i(s)})}analyticsParams(){return`-/@clib/${jt}/${Ht}/uc-img/`}initAttributes(t){[...this.attributes].forEach(i=>{he[i.name]||t.setAttribute(i.name,i.value)})}initIntersection(t,i){let s={root:null,rootMargin:"0px"};this._isnObserver=new IntersectionObserver(o=>{o.forEach(n=>{n.isIntersecting&&(i(),this._isnObserver.unobserve(t))})},s),this._isnObserver.observe(t),this._observed||(this._observed=new Set),this._observed.add(t)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(t=>{this._isnObserver.unobserve(t)}),this._isnObserver=null),E.deleteCtx(this)}static get observedAttributes(){return Object.keys(he)}attributeChangedCallback(t,i,s){window.setTimeout(()=>{this.$[Xt+t]=s})}};var li=class extends si{constructor(){super(...arguments);u(this,"_img",new Image);u(this,"_imgPreview",new Image)}_fmtAbs(t){return!t.includes("//")&&!fr&&(t=new URL(t,document.baseURI).href),t}_validateSize(t){if((t==null?void 0:t.trim())!==""){let i=t.match(/\d+/)[0],s=t.match(/[a-zA-Z]+/)[0],o=parseInt(i,10);if(Number(o)>gr&&this.hasFormatJPG)return gr+s;if(Number(o)>mr&&!this.hasFormatJPG)return mr+s}return t}_getCdnModifiers(t,i){let s={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(t),blur:i,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return D(...to(s))}_getUrlBase(t="",i=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(fr&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));let s=this._getCdnModifiers(t,i);if(this.$$("src").startsWith(this.$$("cdn-cname")))return U(this.$$("src"),s);if(this.$$("cdn-cname")&&this.$$("uuid"))return this._proxyUrl(U(yt(this.$$("cdn-cname"),this.$$("uuid")),s));if(this.$$("uuid"))return this._proxyUrl(U(yt(this.$$("cdn-cname"),this.$$("uuid")),s));if(this.$$("proxy-cname"))return this._proxyUrl(U(this.$$("proxy-cname"),s,this._fmtAbs(this.$$("src"))));if(this.$$("pubkey"))return this._proxyUrl(U(`https://${this.$$("pubkey")}.ucr.io/`,s,this._fmtAbs(this.$$("src"))))}_proxyUrl(t){return this.$$("secure-delivery-proxy")?te(this.$$("secure-delivery-proxy"),{previewUrl:t},{transform:s=>window.encodeURIComponent(s)}):t}_getElSize(t,i=1,s=!0){let o=t.getBoundingClientRect(),n=i*Math.round(o.width),l=s?"":i*Math.round(o.height);return n||l?`${n||""}x${l||""}`:null}_setupEventProxy(t){let i=o=>{o.stopPropagation();let n=new Event(o.type,o);this.dispatchEvent(n)},s=["load","error"];for(let o of s)t.addEventListener(o,i)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:br.PREVIEW,img:this._imgPreview}:{type:br.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){let t=N(this.$$("breakpoints"));return Qs(t.map(i=>parseInt(i,10)))}else return null}get hasFormatJPG(){return this.$$("format").toLowerCase()==="jpeg"}renderBg(t){let i=new Set;i.add(`url("${this._getUrlBase(this._getElSize(t))}") 1x`),this.$$("hi-res-support")&&i.add(`url("${this._getUrlBase(this._getElSize(t,2))}") ${2}x`),this.$$("ultra-res-support")&&i.add(`url("${this._getUrlBase(this._getElSize(t,3))}") ${3}x`);let s=`image-set(${[...i].join(", ")})`;t.style.setProperty("background-image",s),t.style.setProperty("background-image","-webkit-"+s)}getSrcset(){let t=new Set;return this.breakpoints?this.breakpoints.forEach(i=>{t.add(this._getUrlBase(i+"x")+` ${this._validateSize(i+"w")}`),this.$$("hi-res-support")&&t.add(this._getUrlBase(i*2+"x")+` ${this._validateSize(i*2+"w")}`),this.$$("ultra-res-support")&&t.add(this._getUrlBase(i*3+"x")+` ${this._validateSize(i*3+"w")}`)}):(t.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...t].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(t=>{this.$$("intersection")?this.initIntersection(t,()=>{this.renderBg(t)}):this.renderBg(t)})}_appendURL({elNode:t,src:i,srcset:s}){i&&(t.src=i),s&&(t.srcset=s)}_setupConfigForImage({elNode:t}){this._setupEventProxy(t),this.initAttributes(t)}loaderImage({src:t,srcset:i,elNode:s}){return new Promise((o,n)=>{this._setupConfigForImage({elNode:s}),s.setAttribute(pr,""),s.addEventListener("load",()=>{s.removeAttribute(pr),o(s)}),s.addEventListener("error",()=>{n(!1)}),this._appendURL({elNode:s,src:t,srcset:i})})}async renderImage(){var t,i;if(this.$$("intersection")){this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),this.initIntersection(this.currentImg.img,async()=>{var s;this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((s=this._imgPreview)==null?void 0:s.remove()),this.appendChild(this._img)}});return}try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await((t=this._imgPreview)==null?void 0:t.remove()),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((i=this._imgPreview)==null?void 0:i.remove()),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}};var _r=class extends li{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",e=>{!this.$$("is-background-for")&&!this.$$("is-preview-blur")&&(this.img.loading=e?"lazy":"eager")})}};var de=class de extends S{constructor(){super();u(this,"couldBeCtxOwner",!0);this.init$={...this.init$,withDropZone:!0,onClick:()=>{this.api.initFlow()},"button-text":""}}initCallback(){super.initCallback(),this.defineAccessor("dropzone",t=>{typeof t!="undefined"&&(this.$.withDropZone=$(t))}),this.subConfigValue("multiple",t=>{this.$["button-text"]=t?"upload-files":"upload-file"})}};u(de,"styleAttrs",[...j(de,de,"styleAttrs"),"uc-simple-btn"]);var pe=de;pe.template=``;pe.bindAttributes({dropzone:null});var ai=class extends b{constructor(){super(...arguments);u(this,"historyTracked",!0);u(this,"activityType","start-from")}initCallback(){super.initCallback(),this.registerActivity(this.activityType)}};ai.template='
';function Dl(r){return new Promise(e=>{typeof window.FileReader!="function"&&e(!1);try{let t=new FileReader;t.onerror=()=>{e(!0)};let i=s=>{s.type!=="loadend"&&t.abort(),e(!1)};t.onloadend=i,t.onprogress=i,t.readAsDataURL(r)}catch{e(!1)}})}function Nl(r,e){return new Promise(t=>{let i=0,s=[],o=l=>{l||(console.warn("Unexpectedly received empty content entry",{scope:"drag-and-drop"}),t(null)),l.isFile?(i++,l.file(a=>{i--;let c=new File([a],a.name,{type:a.type||e});s.push({type:"file",file:c,fullPath:l.fullPath}),i===0&&t(s)})):l.isDirectory&&n(l.createReader())},n=l=>{i++,l.readEntries(a=>{i--;for(let c of a)o(c);i===0&&t(s)})};o(r)})}function ro(r){let e=[],t=[];for(let i=0;i{a&&e.push(...a)}));continue}let n=s.getAsFile();n&&t.push(Dl(n).then(l=>{l||e.push({type:"file",file:n})}))}else s.kind==="string"&&s.type.match("^text/uri-list")&&t.push(new Promise(o=>{s.getAsString(n=>{e.push({type:"url",url:n}),o(void 0)})}))}return Promise.all(t).then(()=>e)}var z={ACTIVE:0,INACTIVE:1,NEAR:2,OVER:3},so=["focus"],Bl=100,yr=new Map;function zl(r,e){let t=Math.max(Math.min(r[0],e.x+e.width),e.x),i=Math.max(Math.min(r[1],e.y+e.height),e.y);return Math.sqrt((r[0]-t)*(r[0]-t)+(r[1]-i)*(r[1]-i))}function vr(r){let e=0,t=document.body,i=new Set,s=f=>i.add(f),o=z.INACTIVE,n=f=>{r.shouldIgnore()&&f!==z.INACTIVE||(o!==f&&i.forEach(g=>g(f)),o=f)},l=()=>e>0;s(f=>r.onChange(f));let a=()=>{e=0,n(z.INACTIVE)},c=()=>{e+=1,o===z.INACTIVE&&n(z.ACTIVE)},h=()=>{e-=1,l()||n(z.INACTIVE)},d=f=>{f.preventDefault(),e=0,n(z.INACTIVE)},p=f=>{if(r.shouldIgnore())return;l()||(e+=1);let g=[f.x,f.y],v=r.element.getBoundingClientRect(),w=Math.floor(zl(g,v)),y=w{if(r.shouldIgnore())return;f.preventDefault();let g=await ro(f.dataTransfer);r.onItems(g),n(z.INACTIVE)};return t.addEventListener("drop",d),t.addEventListener("dragleave",h),t.addEventListener("dragenter",c),t.addEventListener("dragover",p),r.element.addEventListener("drop",m),so.forEach(f=>{window.addEventListener(f,a)}),()=>{yr.delete(r.element),t.removeEventListener("drop",d),t.removeEventListener("dragleave",h),t.removeEventListener("dragenter",c),t.removeEventListener("dragover",p),r.element.removeEventListener("drop",m),so.forEach(f=>{window.removeEventListener(f,a)})}}var oo="uc-drop-area",qt=`${oo}/registry`,fe=class fe extends S{constructor(){super(),this.init$={...this.init$,state:z.INACTIVE,withIcon:!1,isClickable:!1,isFullscreen:!1,isEnabled:!0,isVisible:!0,text:"",[qt]:null}}isActive(){if(!this.$.isEnabled)return!1;let e=this.getBoundingClientRect(),t=e.width>0&&e.height>0,i=e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth),s=window.getComputedStyle(this),o=s.visibility!=="hidden"&&s.display!=="none";return t&&o&&i}initCallback(){super.initCallback(),this.bindL10n("text",()=>this.l10n("drop-files-here")),this.$[qt]||(this.$[qt]=new Set),this.$[qt].add(this),this.defineAccessor("disabled",t=>{this.set$({isEnabled:!$(t)})}),this.defineAccessor("clickable",t=>{this.set$({isClickable:$(t)})}),this.defineAccessor("with-icon",t=>{this.set$({withIcon:$(t)})}),this.defineAccessor("fullscreen",t=>{this.set$({isFullscreen:$(t)})}),this.defineAccessor("text",t=>{typeof t=="string"?this.bindL10n("text",()=>this.l10n(t)||t):this.bindL10n("text",()=>this.l10n("drop-files-here"))}),this._destroyDropzone=vr({element:this,shouldIgnore:()=>this._shouldIgnore(),onChange:t=>{this.$.state=t},onItems:t=>{t.length&&(t.forEach(i=>{i.type==="url"?this.api.addFileFromUrl(i.url,{source:L.DROP_AREA}):i.type==="file"&&this.api.addFileFromObject(i.file,{source:L.DROP_AREA,fullPath:i.fullPath})}),this.uploadCollection.size&&(this.set$({"*currentActivity":b.activities.UPLOAD_LIST}),this.setOrAddState("*modalActive",!0)))}});let e=this.ref["content-wrapper"];e&&(this._destroyContentWrapperDropzone=vr({element:e,onChange:t=>{var s;let i=(s=Object.entries(z).find(([,o])=>o===t))==null?void 0:s[0].toLowerCase();i&&e.setAttribute("drag-state",i)},onItems:()=>{},shouldIgnore:()=>this._shouldIgnore()})),this.sub("state",t=>{var s;let i=(s=Object.entries(z).find(([,o])=>o===t))==null?void 0:s[0].toLowerCase();i&&this.setAttribute("drag-state",i)}),this.subConfigValue("sourceList",t=>{let i=N(t);this.$.isEnabled=i.includes(L.LOCAL),this.$.isVisible=this.$.isEnabled||!this.querySelector("[data-default-slot]")}),this.sub("isVisible",t=>{this.toggleAttribute("hidden",!t)}),this.sub("isClickable",t=>{this.toggleAttribute("clickable",t)}),this.$.isClickable&&(this._onAreaClicked=t=>{t.type==="keydown"?(t.code==="Space"||t.code==="Enter")&&this.api.openSystemDialog():t.type==="click"&&this.api.openSystemDialog()},this.addEventListener("keydown",this._onAreaClicked),this.addEventListener("click",this._onAreaClicked))}_shouldIgnore(){return!this.$.isEnabled||!this._couldHandleFiles()?!0:this.$.isFullscreen?[...this.$[qt]].filter(i=>i!==this).filter(i=>i.isActive()).length>0:!1}_couldHandleFiles(){let e=this.cfg.multiple,t=this.cfg.multipleMax,i=this.uploadCollection.size;return!(e&&t&&i>=t||!e&&i>0)}destroyCallback(){var t,i;super.destroyCallback();let e=this.$[qt];e&&(e.delete(this),e.size===0&&E.deleteCtx(oo)),(t=this._destroyDropzone)==null||t.call(this),(i=this._destroyContentWrapperDropzone)==null||i.call(this),this._onAreaClicked&&(this.removeEventListener("keydown",this._onAreaClicked),this.removeEventListener("click",this._onAreaClicked))}};u(fe,"styleAttrs",[...j(fe,fe,"styleAttrs"),"uc-drop-area"]);var me=fe;me.template=`
{{text}}
`;me.bindAttributes({"with-icon":null,clickable:null,text:null,fullscreen:null,disabled:null});var Vl="src-type-",ge=class extends S{constructor(){super();u(this,"couldBeCtxOwner",!0);u(this,"type");u(this,"_registeredTypes",{});this.init$={...this.init$,iconName:"default","src-type":""}}initTypes(){this.registerType({type:L.LOCAL,activate:()=>(this.api.openSystemDialog(),!1)}),this.registerType({type:L.URL,activity:b.activities.URL,textKey:"from-url"}),this.registerType({type:L.CAMERA,activity:b.activities.CAMERA,activate:()=>{let t="capture"in document.createElement("input");return t&&this.api.openSystemDialog({captureCamera:!0}),!t}}),this.registerType({type:"draw",activity:b.activities.DRAW,icon:"edit-draw"});for(let t of Object.values(Gt))this.registerType({type:t,activity:b.activities.EXTERNAL,activityParams:{externalSourceType:t}})}initCallback(){super.initCallback(),this.initTypes(),this.defineAccessor("type",t=>{t&&this.applyType(t)})}registerType(t){this._registeredTypes[t.type]=t}getType(t){return this._registeredTypes[t]}activate(){if(!this.type)return;let t=this._registeredTypes[this.type],{activity:i,activate:s,activityParams:o={}}=t;(s?s():!!i)&&this.set$({"*currentActivityParams":o,"*currentActivity":i})}applyType(t){let i=this._registeredTypes[t];if(!i){console.warn("Unsupported source type: "+t);return}let{textKey:s=t,icon:o=t}=i;this.$["src-type"]=`${Vl}${s}`,this.$.iconName=o,this.onclick=()=>{this.activate()}}};ge.template=``;ge.bindAttributes({type:null});var wr=class extends _{initCallback(){super.initCallback(),this.subConfigValue("sourceList",e=>{let t=N(e),i="";t.forEach(s=>{i+=``}),this.cfg.sourceListWrap?this.innerHTML=i:this.outerHTML=i})}};var ui=()=>{let r=[];return{stack:r,promiseReadJpegChunks:t=>new Promise((i,s)=>{let o=2,n=(c,h)=>{let d=new FileReader;d.addEventListener("load",()=>{h(new DataView(d.result))}),d.addEventListener("error",p=>{s(`Reader error: ${p}`)}),d.readAsArrayBuffer(c)},l=()=>n(t.slice(o,o+128),c=>{let h,d,p;for(h=d=0,p=c.byteLength;p>=0?dp;h=p>=0?++d:--d)if(c.getUint8(h)===255){o+=h;break}a()}),a=()=>{let c=o;return n(t.slice(o,o+=4),h=>{if(h.byteLength!==4||h.getUint8(0)!==255){s("Corrupted");return}let d=h.getUint8(1);if(d===218){i(!0);return}let p=h.getUint16(2)-2;return n(t.slice(o,o+=p),m=>{if(m.byteLength!==p){s("Corrupted");return}r.push({startPos:c,length:p,marker:d,view:m}),l()})})};FileReader&&DataView||s("Not Support"),n(t.slice(0,2),c=>{c.getUint16(0)!==65496&&s("Not jpeg"),l()})})}},jl=async r=>{let e=[],{promiseReadJpegChunks:t,stack:i}=ui();return await t(r),i.forEach(({marker:s,view:o})=>{s===226&&o.getUint32(0)===1229144927&&o.getUint32(4)===1347571526&&o.getUint32(8)===1229735168&&e.push(o)}),e},lo=async(r,e,t)=>{{let i=[],s=[],{promiseReadJpegChunks:o,stack:n}=ui();await o(r),n.forEach(c=>{if(c.marker===e)return i.push(c.startPos),s.push(c.length)});let l=[r.slice(0,2)];for(let c of t){let h=new DataView(new ArrayBuffer(4));h.setUint16(0,65280+e),h.setUint16(2,c.byteLength+2),l.push(h.buffer),l.push(c)}let a=2;for(let c=0;ca&&l.push(r.slice(a,i[c])),a=i[c]+s[c]+4;return l.push(r.slice(a,r.size)),new Blob(l,{type:r.type})}};var ao=(r,e)=>lo(r,226,e.map(t=>t.buffer)),Hl=async r=>{try{return await ao(r,[])}catch(e){throw new Error(`Failed to strip ICC profile: ${e}`)}},Gl=(r,e,t)=>new Promise((i,s)=>{let o=n=>{if(!n){s("Failed to convert canvas to blob");return}i(n)};r.toBlob(o,e,t),r.width=r.height=1}),be=()=>{let r=document.createElement("canvas"),e=r.getContext("2d");return{canvas:r,ctx:e}},Wl=r=>{let{ctx:t,canvas:i}=be();i.width=i.height=50,t.drawImage(r,0,0,50,50);let s=t.getImageData(0,0,50,50).data;i.width=i.height=1;for(let o=3;o{let e=null,{promiseReadJpegChunks:t,stack:i}=ui();return await t(r),i.forEach(({marker:s,view:o})=>{if(!e&&s===225&&o.byteLength>=14&&o.getUint32(0)===1165519206&&o.getUint16(4)===0){e=o;return}}),e},ql="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",ci,Kl=()=>new Promise(r=>{if(ci!==void 0)r(ci);else{let e=new Image;e.addEventListener("load",()=>{ci=e.naturalWidth{let t,i,s,o;if(!r||r.byteLength<14||r.getUint32(0)!==1165519206||r.getUint16(4)!==0)return;if(r.getUint16(6)===18761)i=!0;else if(r.getUint16(6)===19789)i=!1;else return;if(r.getUint16(8,i)!==42)return;s=8+r.getUint32(10,i);let n=r.getUint16(s-2,i);for(t=0,o=n;o>=0?to;o>=0?++t:--t){if(r.byteLength{Zl(r,(t,i)=>r.setUint16(t,e,i))},Jl=async(r,e,t)=>(t&&Yl(e,1),lo(r,225,[e.buffer])),Ql=(r,e)=>new Promise((t,i)=>{e&&(r.src=e),r.complete?t(r):(r.addEventListener("load",()=>{t(r)}),r.addEventListener("error",()=>{i(new Error("Failed to load image. Probably not an image."))}))}),ta=r=>Ql(new Image,r),ea=[1,3],ia=[192,193,194,195,197,198,199,201,202,203,205,206,207],no={squareSide:[Math.floor(Math.sqrt(5*1e3*1e3)),4096,8192,11180,10836,11402,14188,16384],dimension:[4096,8192,16384,32767,65535]},ra=async r=>{let e=!1,{promiseReadJpegChunks:t,stack:i}=ui();return await t(r).then(()=>(i.forEach(({marker:s,view:o})=>{if(!e&&ia.indexOf(s)>=0){let n=o.getUint8(5);ea.indexOf(n)<0&&(e=!0)}}),e)).catch(()=>e)},co=(r,e)=>{let t={};return(...i)=>{let s=e(i,t);return s in t?t[s]:t[s]=r(...i)}},uo=(r,e)=>{let[t]=r,i=Object.keys(e).map(s=>parseInt(s,10)).sort((s,o)=>s-o);for(let s=0;st&&n||o{try{let t=[r-1,e-1,1,1],{canvas:i,ctx:s}=be();i.width=1,i.height=1;let{canvas:o,ctx:n}=be();o.width=r,o.height=e,n&&(n.fillStyle=sa,n.fillRect(...t),s.drawImage(o,r-1,e-1,1,1,0,0,1,1));let l=s&&s.getImageData(0,0,1,1).data,a=!1;return l&&(a=l[0]===Et.R&&l[1]===Et.G&&l[2]===Et.B&&l[3]===Et.A),o.width=o.height=1,a}catch{return console.error(`Failed to test for max canvas size of ${r}x${e}.`),!1}};function po(r){return(...e)=>new Promise(t=>{setTimeout(()=>{let i=r(...e);t(i)},0)})}var oa=po(co(ho,uo)),na=po(co(ho,uo)),fo=async(r,e)=>{let t=no.squareSide.find(n=>n*n>=r*e),i=no.dimension.find(n=>n>=r&&n>=e);if(!t||!i)throw new Error("Not supported");let[s,o]=await Promise.all([oa(t,t),na(i,1)]);if(s&&o)return!0;throw new Error("Not supported")},mo=async(r,e,t)=>{try{let{ctx:i,canvas:s}=be();return s.width=e,s.height=t,i.imageSmoothingQuality="high",i.drawImage(r,0,0,e,t),r instanceof HTMLImageElement&&(r.src="//:0"),r instanceof HTMLCanvasElement&&(r.width=r.height=1),s}catch(i){throw new Error("Canvas resize error",{cause:i})}},la=({img:r,targetW:e,targetH:t})=>mo(r,e,t),aa=function({sourceW:r,targetW:e,targetH:t,step:i}){let s=[],o=e,n=t;do s.push([o,n]),o=Math.round(o/i),n=Math.round(n/i);while(oaa({sourceW:e,targetW:t,targetH:i,step:s}).reduce((n,[l,a])=>n.then(c=>fo(l,a).then(()=>mo(c,l,a)).catch(()=>c)),Promise.resolve(r)),ua=()=>/iPad|iPhone|iPod/.test(navigator.platform)?!0:navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),ha=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),Cr=.71,da=(r,e)=>{if(r.width*Cr*r.height*Cr{let{ctx:l}=be();return"imageSmoothingQuality"in l&&!ua()&&!ha?la({img:r,targetW:o,targetH:n}):ca({img:r,sourceW:t,targetW:o,targetH:n,step:Cr})}).catch(()=>Promise.reject("Not supported"))},go=async(r,e)=>{try{if(await ra(r))throw new Error("Should skipped");let i=await Promise.allSettled([Xl(r),Kl(),jl(r)]),o=!i.some(g=>g.status==="rejected"),[n,l,a]=i,c=await Hl(r).catch(()=>r),h=await ta(URL.createObjectURL(c));URL.revokeObjectURL(h.src);let d=await da(h,e),p="image/jpeg",m=(e==null?void 0:e.quality)||.8;!o&&Wl(d)&&(p="image/png",m=void 0);let f=await Gl(d,p,m);if(o&&n.status==="fulfilled"&&n.value){let g=n.value,v=l.status==="fulfilled"?l.value:!1;f=await Jl(f,g,v)}return o&&a.status==="fulfilled"&&a.value.length>0&&(f=await ao(f,a.value)),f}catch(t){let i;throw t instanceof Error&&(i=t.message),typeof t=="string"&&(i=t),new Error(`Failed to shrink image. ${i?`Message: "${i}".`:""}`,{cause:t})}};function pa(r){let e=new Blob([r],{type:"image/svg+xml"});return URL.createObjectURL(e)}function xr(r="hsl(209, 21%, 65%)",e=32,t=32){return pa(``)}function bo(r,e=40){if(r.type==="image/svg+xml")return URL.createObjectURL(r);let t=document.createElement("canvas"),i=t.getContext("2d"),s=new Image,o=new Promise((n,l)=>{s.onload=()=>{let a=s.height/s.width;a>1?(t.width=e,t.height=e*a):(t.height=e,t.width=e/a),i.fillStyle="rgb(240, 240, 240)",i.fillRect(0,0,t.width,t.height),i.drawImage(s,0,0,t.width,t.height),t.toBlob(c=>{if(!c){l();return}let h=URL.createObjectURL(c);n(h)})},s.onerror=a=>{l(a)}});return s.src=URL.createObjectURL(r),o}var fa=/^([0-9]+)x([0-9]+)(?:\s+(\d{1,2}|100)%)?$/i,_o=r=>{let e=fa.exec(r==null?void 0:r.toLocaleLowerCase())||[];if(!e.length)return!1;let t=e[1]*e[2],i=16384*16384;return t>i?(console.warn(`Shrinked size can not be larger than ${Math.floor(i/1e3/1e3)}MP. You have set ${e[1]}x${e[2]} (${Math.ceil(t/1e3/100)/10}MP).`),!1):{quality:e[3]?e[3]/100:void 0,size:t}};var Z=Object.freeze({FINISHED:Symbol("FINISHED"),FAILED:Symbol("FAILED"),UPLOADING:Symbol("UPLOADING"),IDLE:Symbol("IDLE")}),_e=class r extends S{constructor(){super();u(this,"couldBeCtxOwner",!0);u(this,"pauseRender",!0);u(this,"_entrySubs",new Set);u(this,"_entry",null);u(this,"_isIntersecting",!1);u(this,"_debouncedGenerateThumb",O(this._generateThumbnail.bind(this),100));u(this,"_debouncedCalculateState",O(this._calculateState.bind(this),100));u(this,"_renderedOnce",!1);this.init$={...this.init$,uid:"",itemName:"",errorText:"",thumbUrl:"",progressValue:0,progressVisible:!1,badgeIcon:"",isFinished:!1,isFailed:!1,isUploading:!1,isFocused:!1,isEditable:!1,state:Z.IDLE,ariaLabelStatusFile:"",onEdit:()=>{this.$["*currentActivityParams"]={internalId:this._entry.uid},this.$["*currentActivity"]=b.activities.CLOUD_IMG_EDIT},onRemove:()=>{this.uploadCollection.remove(this.$.uid)},onUpload:()=>{this.upload()}}}_reset(){for(let t of this._entrySubs)t.remove();this._debouncedGenerateThumb.cancel(),this._debouncedCalculateState.cancel(),this._entrySubs=new Set,this._entry=null}_observerCallback(t){let[i]=t;this._isIntersecting=i.isIntersecting,i.isIntersecting&&!this._renderedOnce&&(this.render(),this._renderedOnce=!0),i.intersectionRatio===0?this._debouncedGenerateThumb.cancel():this._debouncedGenerateThumb()}_calculateState(){if(!this._entry)return;let t=this._entry,i=Z.IDLE;t.getValue("errors").length>0?i=Z.FAILED:t.getValue("isUploading")?i=Z.UPLOADING:t.getValue("fileInfo")&&(i=Z.FINISHED),this.$.state=i}async _generateThumbnail(){var i;if(!this._entry)return;let t=this._entry;if(t.getValue("fileInfo")&&t.getValue("isImage")){let s=this.cfg.thumbSize,o=await this.proxyUrl(U(yt(this.cfg.cdnCname,this._entry.getValue("uuid")),D(t.getValue("cdnUrlModifiers"),`scale_crop/${s}x${s}/center`))),n=t.getValue("thumbUrl");n!==o&&(t.setValue("thumbUrl",o),n!=null&&n.startsWith("blob:")&&URL.revokeObjectURL(n));return}if(!t.getValue("thumbUrl"))if((i=t.getValue("file"))!=null&&i.type.includes("image"))try{let s=await bo(t.getValue("file"),this.cfg.thumbSize);t.setValue("thumbUrl",s)}catch{let o=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",xr(o))}else{let s=window.getComputedStyle(this).getPropertyValue("--uc-muted-foreground");t.setValue("thumbUrl",xr(s))}}_subEntry(t,i){let s=this._entry.subscribe(t,o=>{this.isConnected&&i(o)});this._entrySubs.add(s)}_handleEntryId(t){var s;this._reset();let i=(s=this.uploadCollection)==null?void 0:s.read(t);this._entry=i,i&&(this._subEntry("uploadProgress",o=>{this.$.progressValue=o}),this._subEntry("fileName",o=>{this.$.itemName=o||i.getValue("externalUrl")||this.l10n("file-no-name"),this._debouncedCalculateState()}),this._subEntry("externalUrl",o=>{this.$.itemName=i.getValue("fileName")||o||this.l10n("file-no-name")}),this._subEntry("fileInfo",o=>{this._debouncedCalculateState(),o&&this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("cdnUrlModifiers",()=>{this._isIntersecting&&this._debouncedGenerateThumb()}),this._subEntry("thumbUrl",o=>{this.$.thumbUrl=o?`url(${o})`:""}),this._subEntry("errors",()=>this._debouncedCalculateState()),this._subEntry("isUploading",()=>this._debouncedCalculateState()),this._subEntry("fileSize",()=>this._debouncedCalculateState()),this._subEntry("mimeType",()=>this._debouncedCalculateState()),this._subEntry("isImage",()=>this._debouncedCalculateState()),this._isIntersecting&&this._debouncedGenerateThumb())}initCallback(){super.initCallback(),this.sub("uid",t=>{this._handleEntryId(t)}),this.sub("state",t=>{this._handleState(t)}),this.subConfigValue("useCloudImageEditor",()=>this._debouncedCalculateState()),this.onclick=()=>{r.activeInstances.forEach(t=>{t===this?t.setAttribute("focused",""):t.removeAttribute("focused")})},this.sub("*uploadTrigger",t=>{t.has(this._entry.uid)&&setTimeout(()=>this.isConnected&&this.upload())}),r.activeInstances.add(this)}_handleState(t){var i,s,o,n,l,a,c;t===Z.FAILED?this.$.badgeIcon="badge-error":t===Z.FINISHED&&(this.$.badgeIcon="badge-success"),t===Z.UPLOADING?this.$.isFocused=!1:this.$.progressValue=0,this.set$({isFailed:t===Z.FAILED,isUploading:t===Z.UPLOADING,isFinished:t===Z.FINISHED,progressVisible:t===Z.UPLOADING,isEditable:this.cfg.useCloudImageEditor&&((i=this._entry)==null?void 0:i.getValue("isImage"))&&((s=this._entry)==null?void 0:s.getValue("cdnUrl")),errorText:(n=(o=this._entry.getValue("errors"))==null?void 0:o[0])==null?void 0:n.message,ariaLabelStatusFile:this.l10n("a11y-file-item-status",{fileName:(l=this._entry)==null?void 0:l.getValue("fileName"),status:this.l10n((c=(a=t==null?void 0:t.description)==null?void 0:a.toLocaleLowerCase())!=null?c:"").toLocaleLowerCase()})})}destroyCallback(){super.destroyCallback(),r.activeInstances.delete(this),this._reset()}connectedCallback(){super.connectedCallback(),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]}),this._observer.observe(this)}disconnectedCallback(){var t;super.disconnectedCallback(),this._debouncedGenerateThumb.cancel(),(t=this._observer)==null||t.disconnect()}_settingsOfShrink(){return _o(this.cfg.imageShrink)}_processShrink(t){return go(t,this._settingsOfShrink())}async upload(){var s,o,n,l,a,c;let t=this._entry;if(!this.uploadCollection.read(t.uid)||t.getValue("fileInfo")||t.getValue("isUploading")||t.getValue("errors").length>0)return;let i=this.cfg.multiple?this.cfg.multipleMax:1;if(!(i&&this.uploadCollection.size>i)){this._debouncedCalculateState(),t.setValue("isUploading",!0),t.setValue("errors",[]);try{let h=new AbortController;t.setValue("abortController",h);let d=async()=>{let m=t.getValue("file");m&&this.cfg.imageShrink&&(m=await this._processShrink(m).catch(()=>m));let f=m||t.getValue("externalUrl")||t.getValue("uuid"),v={...await this.getUploadClientOptions(),fileName:t.getValue("fileName"),source:t.getValue("source"),onProgress:w=>{if(w.isComputable){let y=w.value*100;t.setValue("uploadProgress",y)}},signal:h.signal,metadata:await this.getMetadataFor(t.uid)};return this.debugPrint("upload options",f,v),Zi(f,v)},p=await this.$["*uploadQueue"].add(d);t.setMultipleValues({fileInfo:p,isUploading:!1,fileName:p.originalFilename,fileSize:p.size,isImage:p.isImage,mimeType:(n=(o=(s=p.contentInfo)==null?void 0:s.mime)==null?void 0:o.mime)!=null?n:p.mimeType,uuid:p.uuid,cdnUrl:(l=t.getValue("cdnUrl"))!=null?l:p.cdnUrl,cdnUrlModifiers:(a=t.getValue("cdnUrlModifiers"))!=null?a:"",uploadProgress:100,source:(c=t.getValue("source"))!=null?c:null}),t===this._entry&&this._debouncedCalculateState()}catch(h){h instanceof wt&&h.isCancel?t.setMultipleValues({isUploading:!1,uploadProgress:0}):t.setMultipleValues({isUploading:!1,uploadProgress:0,uploadError:h}),t===this._entry&&this._debouncedCalculateState()}}}};_e.template=`
{{itemName}}{{errorText}}
`;_e.activeInstances=new Set;var Kt=class Kt extends _{constructor(){super();u(this,"_handleBackdropClick",()=>{this._closeDialog()});u(this,"_closeDialog",()=>{this.setOrAddState("*modalActive",!1)});u(this,"_handleDialogClose",()=>{this._closeDialog()});u(this,"_handleDialogMouseDown",t=>{this._mouseDownTarget=t.target});u(this,"_handleDialogMouseUp",t=>{t.target===this.ref.dialog&&t.target===this._mouseDownTarget&&this._closeDialog()});this.init$={...this.init$,"*modalActive":!1,isOpen:!1,closeClicked:this._handleDialogClose}}show(){this.ref.dialog.showModal?this.ref.dialog.showModal():this.ref.dialog.setAttribute("open","")}hide(){this.ref.dialog.close?this.ref.dialog.close():this.ref.dialog.removeAttribute("open")}initCallback(){if(super.initCallback(),typeof HTMLDialogElement=="function")this.ref.dialog.addEventListener("close",this._handleDialogClose),this.ref.dialog.addEventListener("mousedown",this._handleDialogMouseDown),this.ref.dialog.addEventListener("mouseup",this._handleDialogMouseUp);else{this.setAttribute("dialog-fallback","");let t=document.createElement("div");t.className="uc-backdrop",this.appendChild(t),t.addEventListener("click",this._handleBackdropClick)}this.sub("*modalActive",t=>{this.$.isOpen!==t&&(this.$.isOpen=t),t&&this.cfg.modalScrollLock?document.body.style.overflow="hidden":document.body.style.overflow=""}),this.subConfigValue("modalBackdropStrokes",t=>{t?this.setAttribute("strokes",""):this.removeAttribute("strokes")}),this.sub("isOpen",t=>{t?(this.show(),this.setAttribute("aria-modal","true")):(this.hide(),this.setAttribute("aria-modal","false"))})}destroyCallback(){super.destroyCallback(),document.body.style.overflow="",this._mouseDownTarget=void 0,this.ref.dialog.removeEventListener("close",this._handleDialogClose),this.ref.dialog.removeEventListener("mousedown",this._handleDialogMouseDown),this.ref.dialog.removeEventListener("mouseup",this._handleDialogMouseUp)}};u(Kt,"styleAttrs",[...j(Kt,Kt,"styleAttrs"),"uc-modal"]),u(Kt,"StateConsumerScope","modal");var hi=Kt;hi.template=``;var di=(r,e)=>{let t,i,s,o=(...n)=>{t?(clearTimeout(i),i=setTimeout(()=>{Date.now()-s>=e&&(r(...n),s=Date.now())},Math.max(e-(Date.now()-s),0))):(r(...n),s=Date.now(),t=!0)};return Object.defineProperty(o,"cancel",{configurable:!1,writable:!1,enumerable:!1,value:()=>{clearTimeout(i)}}),o};var pi=class extends S{constructor(){super();u(this,"couldBeCtxOwner",!0);u(this,"historyTracked",!0);u(this,"activityType",b.activities.UPLOAD_LIST);u(this,"_throttledHandleCollectionUpdate",di(()=>{this.isConnected&&(this._updateUploadsState(),!this.couldOpenActivity&&this.$["*currentActivity"]===this.activityType&&this.historyBack())},300));this.init$={...this.init$,doneBtnVisible:!1,doneBtnEnabled:!1,uploadBtnVisible:!1,addMoreBtnVisible:!1,addMoreBtnEnabled:!1,headerText:"",commonErrorMessage:"",hasFiles:!1,onAdd:()=>{this.api.initFlow(!0)},onUpload:()=>{this.emit(k.UPLOAD_CLICK),this.api.uploadAll(),this._throttledHandleCollectionUpdate()},onDone:()=>{this.emit(k.DONE_CLICK,this.api.getOutputCollectionState()),this.api.doneFlow()},onCancel:()=>{this.uploadCollection.clearAll()}}}_updateUploadsState(){let t=this.api.getOutputCollectionState(),i={total:t.totalCount,succeed:t.successCount,uploading:t.uploadingCount,failed:t.failedCount},s=!t.errors.some(p=>p.type==="TOO_MANY_FILES"||p.type==="TOO_FEW_FILES"),o=t.errors.some(p=>p.type==="TOO_MANY_FILES"),n=t.totalCount===(this.cfg.multiple?this.cfg.multipleMax:1),l=i.failed===0&&t.errors.length===0,a=!1,c=!1,h=!1;if(i.total-i.succeed-i.uploading-i.failed>0&&s)a=!0;else{c=!0;let p=this.cfg.groupOutput?!!t.group:!0;h=i.total===i.succeed&&s&&l&&p}this.set$({doneBtnVisible:c,doneBtnEnabled:h,uploadBtnVisible:a,addMoreBtnEnabled:i.total===0||!o&&!n,addMoreBtnVisible:!n||this.cfg.multiple}),this.bindL10n("headerText",()=>this._getHeaderText(i))}_getHeaderText(t){let i=s=>{let o=t[s];return this.l10n(`header-${s}`,{count:o})};return t.uploading>0?i("uploading"):t.failed>0?i("failed"):t.succeed>0?i("succeed"):i("total")}get couldOpenActivity(){return this.cfg.showEmptyList||this.uploadCollection.size>0}initCallback(){super.initCallback(),this.registerActivity(this.activityType),this.subConfigValue("multiple",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMin",this._throttledHandleCollectionUpdate),this.subConfigValue("multipleMax",this._throttledHandleCollectionUpdate),this.sub("*groupInfo",t=>{t&&this._throttledHandleCollectionUpdate()}),this.sub("*currentActivity",t=>{!this.couldOpenActivity&&t===this.activityType&&(this.$["*currentActivity"]=this.initActivity)}),this.uploadCollection.observeProperties(this._throttledHandleCollectionUpdate),this.sub("*uploadList",t=>{this._throttledHandleCollectionUpdate(),this.set$({hasFiles:t.length>0}),this.cfg.confirmUpload||this.api.uploadAll()},!1),this.sub("*collectionErrors",t=>{let i=t.filter(s=>s.type!=="SOME_FILES_HAS_ERRORS")[0];if(!i){this.set$({commonErrorMessage:null});return}this.set$({commonErrorMessage:i.message})})}destroyCallback(){super.destroyCallback(),this.uploadCollection.unobserveProperties(this._throttledHandleCollectionUpdate)}};pi.template=`{{headerText}}
`;var fi=class extends S{constructor(){super(...arguments);u(this,"couldBeCtxOwner",!0);u(this,"activityType",b.activities.URL);u(this,"init$",{...this.init$,importDisabled:!0,onUpload:t=>{t.preventDefault();let i=this.ref.input.value;this.api.addFileFromUrl(i,{source:L.URL}),this.$["*currentActivity"]=b.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()},onInput:t=>{let i=t.target.value;this.set$({importDisabled:!i})}})}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{this.ref.input.value="",this.ref.input.focus()}})}};fi.template=`
`;var Ar=()=>typeof navigator.permissions!="undefined";var mi=class extends S{constructor(){super(...arguments);u(this,"couldBeCtxOwner",!0);u(this,"activityType",b.activities.CAMERA);u(this,"_unsubPermissions",null);u(this,"init$",{...this.init$,video:null,videoTransformCss:null,shotBtnDisabled:!0,videoHidden:!0,messageHidden:!0,requestBtnHidden:Ar(),cameraSelectOptions:null,cameraSelectHidden:!0,l10nMessage:"",onCameraSelectChange:t=>{this._selectedCameraId=t.target.value,this._capture()},onCancel:()=>{this.historyBack()},onShot:()=>{this._shot()},onRequestPermissions:()=>{this._capture()}});u(this,"_onActivate",()=>{Ar()&&this._subscribePermissions(),this._capture()});u(this,"_onDeactivate",()=>{this._unsubPermissions&&this._unsubPermissions(),this._stopCapture()});u(this,"_handlePermissionsChange",()=>{this._capture()});u(this,"_setPermissionsState",O(t=>{this.classList.toggle("uc-initialized",t==="granted"),t==="granted"?this.set$({videoHidden:!1,shotBtnDisabled:!1,messageHidden:!0}):t==="prompt"?(this.$.l10nMessage="camera-permissions-prompt",this.set$({videoHidden:!0,shotBtnDisabled:!0,messageHidden:!1}),this._stopCapture()):(this.$.l10nMessage="camera-permissions-denied",this.set$({videoHidden:!0,shotBtnDisabled:!0,messageHidden:!1}),this._stopCapture())},300))}async _subscribePermissions(){try{(await navigator.permissions.query({name:"camera"})).addEventListener("change",this._handlePermissionsChange)}catch(t){console.log("Failed to use permissions API. Fallback to manual request mode.",t),this._capture()}}async _capture(){let t={video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}},audio:!1};this._selectedCameraId&&(t.video.deviceId={exact:this._selectedCameraId}),this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d");try{this._setPermissionsState("prompt");let i=await navigator.mediaDevices.getUserMedia(t);i.addEventListener("inactive",()=>{this._setPermissionsState("denied")}),this.$.video=i,this._capturing=!0,this._setPermissionsState("granted")}catch(i){this._setPermissionsState("denied"),console.error("Failed to capture camera",i)}}_stopCapture(){var t;this._capturing&&((t=this.$.video)==null||t.getTracks()[0].stop(),this.$.video=null,this._capturing=!1)}_shot(){this._canvas.height=this.ref.video.videoHeight,this._canvas.width=this.ref.video.videoWidth,this._ctx.drawImage(this.ref.video,0,0);let t=Date.now(),i=`camera-${t}.jpeg`,s="image/jpeg";this._canvas.toBlob(o=>{let n=new File([o],i,{lastModified:t,type:s});this.api.addFileFromObject(n,{source:L.CAMERA}),this.set$({"*currentActivity":b.activities.UPLOAD_LIST})},s)}async initCallback(){var t;super.initCallback(),this.registerActivity(this.activityType,{onActivate:this._onActivate,onDeactivate:this._onDeactivate}),this.subConfigValue("cameraMirror",i=>{this.$.videoTransformCss=i?"scaleX(-1)":null});try{let s=(await navigator.mediaDevices.enumerateDevices()).filter(o=>o.kind==="videoinput").map((o,n)=>({text:o.label.trim()||`${this.l10n("caption-camera")} ${n+1}`,value:o.deviceId}));s.length>1&&(this.$.cameraSelectOptions=s,this.$.cameraSelectHidden=!1),this._selectedCameraId=(t=s[0])==null?void 0:t.value}catch{}}};mi.template=`
`;var gi=class extends S{constructor(){super(...arguments);u(this,"requireCtxName",!0)}initCallback(){super.initCallback(),this.$["*eventEmitter"].bindTarget(this)}destroyCallback(){super.destroyCallback(),this.$["*eventEmitter"].unbindTarget(this)}};gi.EventType=k;var ma=gi;var bi=class extends S{constructor(){super(...arguments);u(this,"init$",{...this.init$,visible:!1,value:0,"*commonProgress":0})}initCallback(){super.initCallback(),this._unobserveCollection=this.uploadCollection.observeProperties(()=>{let t=this.uploadCollection.items().some(i=>this.uploadCollection.read(i).getValue("isUploading"));this.$.visible=t}),this.sub("visible",t=>{t?this.setAttribute("active",""):this.removeAttribute("active")}),this.sub("*commonProgress",t=>{this.$.value=t})}destroyCallback(){var t;super.destroyCallback(),(t=this._unobserveCollection)==null||t.call(this)}};bi.template='';var _i=class extends _{constructor(){super(...arguments);u(this,"_value",0);u(this,"init$",{...this.init$,width:0,opacity:0})}initCallback(){super.initCallback(),this.defineAccessor("value",t=>{if(t===void 0)return;let i=this._value;if(this._value=t,t===0&&i>0){this.ref.line.addEventListener("transitionend",()=>{this.style.setProperty("--l-width",this._value.toString())});return}this.style.setProperty("--l-width",this._value.toString())}),this.defineAccessor("visible",t=>{this.ref.line.classList.toggle("uc-progress--hidden",!t)})}};_i.template='
';var nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";function yo(...r){return r.reduce((e,t)=>{if(typeof t=="string")return e[t]=!0,e;for(let i of Object.keys(t))e[i]=t[i];return e},{})}function F(...r){let e=yo(...r);return Object.keys(e).reduce((t,i)=>(e[i]&&t.push(i),t),[]).join(" ")}function vo(r,...e){let t=yo(...e);for(let i of Object.keys(t))r.classList.toggle(i,t[i])}var wo=r=>{if(!r)return H;let e=Zr(r).filter(t=>H.includes(t));return e.length===0?H:e};function Co(r){return{"*originalUrl":null,"*faderEl":null,"*cropperEl":null,"*imgEl":null,"*imgContainerEl":null,"*networkProblems":!1,"*imageSize":null,"*editorTransformations":{},"*cropPresetList":[],"*tabList":H,"*tabId":I.CROP,entry:null,extension:null,editorMode:!1,modalCaption:"",isImage:!1,msg:"",src:nt,fileType:"",showLoader:!1,uuid:null,cdnUrl:null,cropPreset:"",tabs:Rt(H),"presence.networkProblems":!1,"presence.modalCaption":!0,"presence.editorToolbar":!1,"presence.viewerToolbar":!0,"*on.retryNetwork":()=>{let e=r.querySelectorAll("img");for(let t of e){let i=t.src;t.src=nt,t.src=i}r.$["*networkProblems"]=!1},"*on.apply":e=>{if(!e)return;let t=r.$["*originalUrl"],i=D(vt(e),"preview"),s=U(t,i),o={originalUrl:t,cdnUrlModifiers:i,cdnUrl:s,transformations:e};r.dispatchEvent(new CustomEvent("apply",{detail:o,bubbles:!0,composed:!0})),r.remove()},"*on.cancel":()=>{r.remove(),r.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))}}}var xo="";var Ao=`${xo}
Network error
{{fileType}}
{{msg}}
`;var lt=class extends _{constructor(){super();u(this,"ctxOwner",!0);u(this,"_debouncedShowLoader",O(this._showLoader.bind(this),300));this.init$={...this.init$,...Co(this)}}_showLoader(t){this.$.showLoader=t}_waitForSize(){return new Promise((i,s)=>{let o=setTimeout(()=>{s(new Error("[cloud-image-editor] timeout waiting for non-zero container size"))},3e3),n=new ResizeObserver(([l])=>{l.contentRect.width>0&&l.contentRect.height>0&&(i(),clearTimeout(o),n.disconnect())});n.observe(this)})}initCallback(){super.initCallback(),this.$["*faderEl"]=this.ref["fader-el"],this.$["*cropperEl"]=this.ref["cropper-el"],this.$["*imgContainerEl"]=this.ref["img-container-el"],this.initEditor()}async updateImage(){if(this.isConnected){if(await this._waitForSize(),this.$.cdnUrl){let t=Me(this.$.cdnUrl),i=yt(this.$.cdnUrl,t);if(i===this.$["*originalUrl"])return;this.$["*originalUrl"]=i;let s=Br(this.$.cdnUrl),o=Wr(s);this.$["*editorTransformations"]=o}else if(this.$.uuid){let t=yt(this.cfg.cdnCname,this.$.uuid);if(t===this.$["*originalUrl"])return;this.$["*originalUrl"]=t,this.$["*editorTransformations"]={}}else throw new Error("No UUID nor CDN URL provided");this.$["*tabId"]===I.CROP?this.$["*cropperEl"].deactivate({reset:!0}):this.$["*faderEl"].deactivate();try{let t=await this.proxyUrl(U(this.$["*originalUrl"],D("json"))),i=await fetch(t).then(n=>n.json()),{width:s,height:o}=i;this.$["*imageSize"]={width:s,height:o},this.$["*tabId"]===I.CROP?this.$["*cropperEl"].activate(this.$["*imageSize"]):this.$["*faderEl"].activate({url:this.$["*originalUrl"]})}catch(t){t&&console.error("Failed to load image info",t)}}}async initEditor(){try{await this._waitForSize()}catch(t){this.isConnected&&console.error(t.message);return}this.ref["img-el"].addEventListener("load",()=>{this._imgLoading=!1,this._debouncedShowLoader(!1),this.$.src!==nt&&(this.$["*networkProblems"]=!1)}),this.ref["img-el"].addEventListener("error",()=>{this._imgLoading=!1,this._debouncedShowLoader(!1),this.$["*networkProblems"]=!0}),this.sub("src",t=>{let i=this.ref["img-el"];i.src!==t&&(this._imgLoading=!0,i.src=t||nt)}),this.sub("cropPreset",t=>{this.$["*cropPresetList"]=Ze(t)}),this.sub("tabs",t=>{this.$["*tabList"]=wo(t)}),this.sub("*tabId",t=>{this.ref["img-el"].className=F("uc-image",{"uc-image_hidden_to_cropper":t===I.CROP,"uc-image_hidden_effects":t!==I.CROP})}),this.classList.add("uc-editor_ON"),this.sub("*networkProblems",t=>{this.$["presence.networkProblems"]=t,this.$["presence.modalCaption"]=!t}),this.sub("*editorTransformations",t=>{if(Object.keys(t).length===0)return;let i=this.$["*originalUrl"],s=D(vt(t),"preview"),o=U(i,s),n={originalUrl:i,cdnUrlModifiers:s,cdnUrl:o,transformations:t};this.dispatchEvent(new CustomEvent("change",{detail:n,bubbles:!0,composed:!0}))},!1),this.sub("uuid",t=>t&&this.updateImage()),this.sub("cdnUrl",t=>t&&this.updateImage())}};u(lt,"styleAttrs",["uc-cloud-image-editor"]);lt.template=Ao;lt.bindAttributes({uuid:"uuid","cdn-url":"cdnUrl","crop-preset":"cropPreset",tabs:"tabs"});var yi=class extends _{constructor(){super(),this.init$={...this.init$,dragging:!1},this._handlePointerUp=this._handlePointerUp_.bind(this),this._handlePointerMove=this._handlePointerMove_.bind(this),this._handleSvgPointerMove=this._handleSvgPointerMove_.bind(this)}_shouldThumbBeDisabled(e){let t=this.$["*imageBox"];if(!t)return;if(e===""&&t.height<=x&&t.width<=x)return!0;let i=t.height<=x&&(e.includes("n")||e.includes("s")),s=t.width<=x&&(e.includes("e")||e.includes("w"));return i||s}_createBackdrop(){let e=this.$["*cropBox"];if(!e)return;let{x:t,y:i,width:s,height:o}=e,n=this.ref["svg-el"],l=K("mask",{id:"backdrop-mask"}),a=K("rect",{x:0,y:0,width:"100%",height:"100%",fill:"white"}),c=K("rect",{x:t,y:i,width:s,height:o,fill:"black"});l.appendChild(a),l.appendChild(c);let h=K("rect",{x:0,y:0,width:"100%",height:"100%",fill:"var(--color-image-background)","fill-opacity":.85,mask:"url(#backdrop-mask)"});n.appendChild(h),n.appendChild(l),this._backdropMask=l,this._backdropMaskInner=c}_resizeBackdrop(){this._backdropMask&&(this._backdropMask.style.display="none",window.requestAnimationFrame(()=>{this._backdropMask&&(this._backdropMask.style.display="block")}))}_updateBackdrop(){let e=this.$["*cropBox"];if(!e)return;let{x:t,y:i,width:s,height:o}=e;this._backdropMaskInner&&$t(this._backdropMaskInner,{x:t,y:i,width:s,height:o})}_updateFrame(){let e=this.$["*cropBox"];if(!(!e||!this._frameGuides||!this._frameThumbs)){for(let t of Object.values(this._frameThumbs)){let{direction:i,pathNode:s,interactionNode:o,groupNode:n}=t,l=i==="",a=i.length===2,{x:c,y:h,width:d,height:p}=e;if(l){let f={x:c+d/3,y:h+p/3,width:d/3,height:p/3};$t(o,f)}else{let f=At(Math.min(d,p)/(24*2+34)/2,0,1),{d:g,center:v}=a?ks(e,i,f):$s(e,i,f),w=Math.max(rr*At(Math.min(d,p)/rr/3,0,1),Ss);$t(o,{x:v[0]-w,y:v[1]-w,width:w*2,height:w*2}),$t(s,{d:g})}let m=this._shouldThumbBeDisabled(i);n.setAttribute("class",F("uc-thumb",{"uc-thumb--hidden":m,"uc-thumb--visible":!m}))}$t(this._frameGuides,{x:e.x-1*.5,y:e.y-1*.5,width:e.width+1,height:e.height+1})}}_createThumbs(){let e={};for(let t=0;t<3;t++)for(let i=0;i<3;i++){let s=`${["n","","s"][t]}${["w","","e"][i]}`,o=K("g");o.classList.add("uc-thumb"),o.setAttribute("with-effects","");let n=K("rect",{fill:"transparent"}),l=K("path",{stroke:"currentColor",fill:"none","stroke-width":3});o.appendChild(l),o.appendChild(n),e[s]={direction:s,pathNode:l,interactionNode:n,groupNode:o},n.addEventListener("pointerdown",this._handlePointerDown.bind(this,s))}return e}_createGuides(){let e=K("svg"),t=K("rect",{x:0,y:0,width:"100%",height:"100%",fill:"none",stroke:"currentColor","stroke-width":1,"stroke-opacity":.5});e.appendChild(t);for(let i=1;i<=2;i++){let s=K("line",{x1:`${oe*i}%`,y1:"0%",x2:`${oe*i}%`,y2:"100%",stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});e.appendChild(s)}for(let i=1;i<=2;i++){let s=K("line",{x1:"0%",y1:`${oe*i}%`,x2:"100%",y2:`${oe*i}%`,stroke:"currentColor","stroke-width":1,"stroke-opacity":.3});e.appendChild(s)}return e.classList.add("uc-guides","uc-guides--semi-hidden"),e}_createFrame(){let e=this.ref["svg-el"],t=document.createDocumentFragment(),i=this._createGuides();t.appendChild(i);let s=this._createThumbs();for(let{groupNode:o}of Object.values(s))t.appendChild(o);e.appendChild(t),this._frameThumbs=s,this._frameGuides=i}_handlePointerDown(e,t){if(!this._frameThumbs)return;let i=this._frameThumbs[e];if(this._shouldThumbBeDisabled(e))return;let s=this.$["*cropBox"],{x:o,y:n}=this.ref["svg-el"].getBoundingClientRect(),l=t.x-o,a=t.y-n;this.$.dragging=!0,this._draggingThumb=i,this._dragStartPoint=[l,a],this._dragStartCrop={...s}}_handlePointerUp_(e){this._updateCursor(),this.$.dragging&&(e.stopPropagation(),e.preventDefault(),this.$.dragging=!1)}_handlePointerMove_(e){if(!this.$.dragging||!this._dragStartPoint||!this._draggingThumb)return;e.stopPropagation(),e.preventDefault();let t=this.ref["svg-el"],{x:i,y:s}=t.getBoundingClientRect(),o=e.x-i,n=e.y-s,l=o-this._dragStartPoint[0],a=n-this._dragStartPoint[1],{direction:c}=this._draggingThumb,h=this._calcCropBox(c,[l,a]);h&&(this.$["*cropBox"]=h)}_calcCropBox(e,t){var c,h;let[i,s]=t,o=this.$["*imageBox"],n=(c=this._dragStartCrop)!=null?c:this.$["*cropBox"],l=(h=this.$["*cropPresetList"])==null?void 0:h[0],a=l?l.width/l.height:void 0;if(e===""?n=Os({rect:n,delta:[i,s],imageBox:o}):n=Ls({rect:n,delta:[i,s],direction:e,aspectRatio:a,imageBox:o}),!Object.values(n).every(d=>Number.isFinite(d)&&d>=0)){console.error("CropFrame is trying to create invalid rectangle",{payload:n});return}return Bt(Vt(n),this.$["*imageBox"])}_handleSvgPointerMove_(e){if(!this._frameThumbs)return;let t=Object.values(this._frameThumbs).find(i=>{if(this._shouldThumbBeDisabled(i.direction))return!1;let o=i.interactionNode.getBoundingClientRect(),n={x:o.x,y:o.y,width:o.width,height:o.height};return Us(n,[e.x,e.y])});this._hoverThumb=t,this._updateCursor()}_updateCursor(){let e=this._hoverThumb;this.ref["svg-el"].style.cursor=e?Is(e.direction):"initial"}_render(){this._updateBackdrop(),this._updateFrame()}toggleThumbs(e){this._frameThumbs&&Object.values(this._frameThumbs).map(({groupNode:t})=>t).forEach(t=>{t.setAttribute("class",F("uc-thumb",{"uc-thumb--hidden":!e,"uc-thumb--visible":e}))})}initCallback(){super.initCallback(),this._createBackdrop(),this._createFrame(),this.sub("*imageBox",()=>{this._resizeBackdrop(),window.requestAnimationFrame(()=>{this._render()})}),this.sub("*cropBox",e=>{e&&(this._guidesHidden=e.height<=x||e.width<=x,window.requestAnimationFrame(()=>{this._render()}))}),this.sub("dragging",e=>{this._frameGuides&&this._frameGuides.setAttribute("class",F({"uc-guides--hidden":this._guidesHidden,"uc-guides--visible":!this._guidesHidden&&e,"uc-guides--semi-hidden":!this._guidesHidden&&!e}))}),this.ref["svg-el"].addEventListener("pointermove",this._handleSvgPointerMove,!0),document.addEventListener("pointermove",this._handlePointerMove,!0),document.addEventListener("pointerup",this._handlePointerUp,!0)}destroyCallback(){super.destroyCallback(),document.removeEventListener("pointermove",this._handlePointerMove),document.removeEventListener("pointerup",this._handlePointerUp)}};yi.template='';var bt=class extends _{constructor(){super(...arguments);u(this,"init$",{...this.init$,active:!1,title:"",icon:"","on.click":null,"title-prop":""})}initCallback(){super.initCallback(),this._titleEl=this.ref["title-el"],this._iconEl=this.ref["icon-el"],this.sub("title",t=>{this._titleEl&&(this._titleEl.style.display=t?"block":"none")}),this.sub("active",t=>{this.className=F({"uc-active":t,"uc-not_active":!t})}),this.sub("on.click",t=>{this.onclick=t})}};bt.template=``;function ba(r){let e=r+90;return e=e>=360?0:e,e}function _a(r,e){return r==="rotate"?ba(e):["mirror","flip"].includes(r)?!e:null}var ye=class extends bt{initCallback(){super.initCallback(),this.defineAccessor("operation",e=>{e&&(this._operation=e,this.$.icon=e,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-crop",{name:this.l10n(e).toLowerCase()})))}),this.$["on.click"]=()=>{let e=this.$["*cropperEl"].getValue(this._operation),t=_a(this._operation,e);this.$["*cropperEl"].setValue(this._operation,t)}}};var ve={FILTER:"filter",COLOR_OPERATION:"color_operation"},at="original",vi=class extends _{constructor(){super(...arguments);u(this,"init$",{...this.init$,disabled:!1,min:0,max:100,value:0,defaultValue:0,zero:0,"on.input":t=>{this.$["*faderEl"].set(t),this.$.value=t}})}setOperation(t,i){this._controlType=t==="filter"?ve.FILTER:ve.COLOR_OPERATION,this._operation=t,this._iconName=t,this._title=t.toUpperCase(),this._filter=i,this._initializeValues(),this.$["*faderEl"].activate({url:this.$["*originalUrl"],operation:this._operation,value:this._filter===at?void 0:this.$.value,filter:this._filter===at?void 0:this._filter,fromViewer:!1})}_initializeValues(){let{range:t,zero:i}=it[this._operation],[s,o]=t;this.$.min=s,this.$.max=o,this.$.zero=i;let n=this.$["*editorTransformations"][this._operation];if(this._controlType===ve.FILTER){let l=o;if(n){let{name:a,amount:c}=n;l=a===this._filter?c:o}this.$.value=l,this.$.defaultValue=l}if(this._controlType===ve.COLOR_OPERATION){let l=typeof n!="undefined"?n:i;this.$.value=l,this.$.defaultValue=l}}apply(){let t;this._controlType===ve.FILTER?this._filter===at?t=null:t={name:this._filter,amount:this.$.value}:t=this.$.value;let i={...this.$["*editorTransformations"],[this._operation]:t};this.$["*editorTransformations"]=i}cancel(){this.$["*faderEl"].deactivate({hide:!1})}initCallback(){super.initCallback(),this.sub("*originalUrl",t=>{this._originalUrl=t}),this.sub("value",t=>{let i=`${this._filter||this._operation} ${t}`;this.$["*operationTooltip"]=i})}};vi.template=``;function we(r){let e=new Image;return{promise:new Promise((s,o)=>{e.src=r,e.onload=s,e.onerror=o}),image:e,cancel:()=>{e.naturalWidth===0&&(e.src=nt)}}}function Ce(r){let e=[];for(let o of r){let n=we(o);e.push(n)}let t=e.map(o=>o.image);return{promise:Promise.allSettled(e.map(o=>o.promise)),images:t,cancel:()=>{e.forEach(o=>{o.cancel()})}}}var Zt=class extends bt{constructor(){super(),this.init$={...this.init$,active:!1,title:"",icon:"",isOriginal:!1,iconSize:"20","on.click":null}}_previewSrc(){let e=parseInt(window.getComputedStyle(this).getPropertyValue("--l-base-min-width"),10),t=window.devicePixelRatio,i=Math.ceil(t*e),s=t>=2?"lightest":"normal",o=100,n={...this.$["*editorTransformations"]};return n[this._operation]=this._filter!==at?{name:this._filter,amount:o}:void 0,U(this._originalUrl,D(Pe,vt(n),`quality/${s}`,`scale_crop/${i}x${i}/center`))}async _observerCallback(e,t){var s;if(e[0].isIntersecting){let o=await this.proxyUrl(this._previewSrc()),n=this.ref["preview-el"],{promise:l,cancel:a}=we(o);this._cancelPreload=a,l.catch(c=>{this.$["*networkProblems"]=!0,console.error("Failed to load image",{error:c})}).finally(()=>{n.style.backgroundImage=`url(${o})`,n.setAttribute("loaded",""),t.unobserve(this)})}else(s=this._cancelPreload)==null||s.call(this)}initCallback(){super.initCallback(),this.$["on.click"]=()=>{this.$.active?this.$.isOriginal||(this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*showSlider"]=!0):(this.$["*sliderEl"].setOperation(this._operation,this._filter),this.$["*sliderEl"].apply()),this.$["*currentFilter"]=this._filter},this.defineAccessor("filter",t=>{this._operation="filter",this._filter=t,this.$.isOriginal=t===at,this.$.icon=this.$.isOriginal?"original":"slider",this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-filter",{name:t.toLowerCase()}))}),this._observer=new window.IntersectionObserver(this._observerCallback.bind(this),{threshold:[0,1]});let e=this.$["*originalUrl"];this._originalUrl=e,this.$.isOriginal?this.ref["icon-el"].classList.add("uc-original-icon"):this._observer.observe(this),this.sub("*currentFilter",t=>{this.$.active=t&&t===this._filter}),this.sub("isOriginal",t=>{this.$.iconSize=t?40:20}),this.sub("active",t=>{if(this.$.isOriginal)return;let i=this.ref["icon-el"];i.style.opacity=t?"1":"0";let s=this.ref["preview-el"];t?s.style.opacity="0":s.style.backgroundImage&&(s.style.opacity="1")}),this.sub("*networkProblems",async t=>{if(!t){let i=await this.proxyUrl(this._previewSrc()),s=this.ref["preview-el"];s.style.backgroundImage&&(s.style.backgroundImage="none",s.style.backgroundImage=`url(${i})`)}})}destroyCallback(){var e,t;super.destroyCallback(),(e=this._observer)==null||e.disconnect(),(t=this._cancelPreload)==null||t.call(this)}};Zt.template=``;var xe=class extends bt{constructor(){super(...arguments);u(this,"_operation","")}initCallback(){super.initCallback(),this.$["on.click"]=t=>{this.$["*sliderEl"].setOperation(this._operation),this.$["*showSlider"]=!0,this.$["*currentOperation"]=this._operation},this.defineAccessor("operation",t=>{t&&(this._operation=t,this.$.icon=t,this.bindL10n("title-prop",()=>this.l10n("a11y-cloud-editor-apply-tuning",{name:this.l10n(t).toLowerCase()})),this.bindL10n("title",()=>this.l10n(t)))}),this.sub("*editorTransformations",t=>{if(!this._operation)return;let{zero:i}=it[this._operation],s=t[this._operation],o=typeof s!="undefined"?s!==i:!1;this.$.active=o})}};function Eo(r,e){let t={};for(let i of e){let s=r[i];(r.hasOwnProperty(i)||s!==void 0)&&(t[i]=s)}return t}function Yt(r,e,t){let s=window.devicePixelRatio,o=Math.min(Math.ceil(e*s),3e3),n=s>=2?"lightest":"normal";return U(r,D(Pe,vt(t),`quality/${n}`,`stretch/off/-/resize/${o}x`,`@clib/${jt}/${Ht}/uc-cloud-image-editor/`))}function ya(r){return r?[({dimensions:t,coords:i})=>[...t,...i].every(s=>Number.isInteger(s)&&Number.isFinite(s)),({dimensions:t,coords:i})=>t.every(s=>s>0)&&i.every(s=>s>=0)].every(t=>t(r)):!0}var wi=class extends _{constructor(){super();u(this,"ctxOwner",!0);this.init$={...this.init$,image:null,"*padding":20,"*operations":{rotate:0,mirror:!1,flip:!1},"*imageBox":{x:0,y:0,width:0,height:0},"*cropBox":{x:0,y:0,width:0,height:0}},this._commitDebounced=O(this._commit.bind(this),300),this._handleResizeThrottled=di(this._handleResize.bind(this),100),this._imageSize={width:0,height:0}}_handleResize(){!this.isConnected||!this._isActive||(this._initCanvas(),this._syncTransformations(),this._alignImage(),this._alignCrop(),this._draw())}_syncTransformations(){let t=this.$["*editorTransformations"],i=Eo(t,Object.keys(this.$["*operations"])),s={...this.$["*operations"],...i};this.$["*operations"]=s}_initCanvas(){let t=this.ref["canvas-el"],i=t.getContext("2d"),s=this.offsetWidth,o=this.offsetHeight,n=window.devicePixelRatio;t.style.width=`${s}px`,t.style.height=`${o}px`,t.width=s*n,t.height=o*n,i==null||i.scale(n,n),this._canvas=t,this._ctx=i}_alignImage(){if(!this._isActive||!this.$.image)return;let t=this.$.image,i=this.$["*padding"],s=this.$["*operations"],{rotate:o}=s,n={width:this.offsetWidth,height:this.offsetHeight},l=zt({width:t.naturalWidth,height:t.naturalHeight},o),a;if(l.width>n.width-i*2||l.height>n.height-i*2){let c=l.width/l.height,h=n.width/n.height;if(c>h){let d=n.width-i*2,p=d/c,m=0+i,f=i+(n.height-i*2)/2-p/2;a={x:m,y:f,width:d,height:p}}else{let d=n.height-i*2,p=d*c,m=i+(n.width-i*2)/2-p/2,f=0+i;a={x:m,y:f,width:p,height:d}}}else{let{width:c,height:h}=l,d=i+(n.width-i*2)/2-c/2,p=i+(n.height-i*2)/2-h/2;a={x:d,y:p,width:c,height:h}}this.$["*imageBox"]=Vt(a)}_alignCrop(){var p;let t=this.$["*cropBox"],i=this.$["*imageBox"],s=this.$["*operations"],{rotate:o}=s,n=this.$["*editorTransformations"].crop,{width:l,x:a,y:c}=this.$["*imageBox"];if(n){let{dimensions:[m,f],coords:[g,v]}=n,{width:w}=zt(this._imageSize,o),y=l/w;t=Bt(Vt({x:a+g*y,y:c+v*y,width:m*y,height:f*y}),this.$["*imageBox"])}let h=(p=this.$["*cropPresetList"])==null?void 0:p[0],d=h?h.width/h.height:void 0;if(!Ms(t,i)||d&&!Ps(t,d)){let m=i.width/i.height,f=i.width,g=i.height;d&&(m>d?f=Math.min(i.height*d,i.width):g=Math.min(i.width/d,i.height)),t={x:i.x+i.width/2-f/2,y:i.y+i.height/2-g/2,width:f,height:g}}this.$["*cropBox"]=Bt(Vt(t),this.$["*imageBox"])}_drawImage(){let t=this._ctx;if(!t)return;let i=this.$.image,s=this.$["*imageBox"],o=this.$["*operations"],{mirror:n,flip:l,rotate:a}=o,c=zt({width:s.width,height:s.height},a);t.save(),t.translate(s.x+s.width/2,s.y+s.height/2),t.rotate(a*Math.PI*-1/180),t.scale(n?-1:1,l?-1:1),t.drawImage(i,-c.width/2,-c.height/2,c.width,c.height),t.restore()}_draw(){if(!this._isActive||!this.$.image||!this._canvas||!this._ctx)return;let t=this._canvas;this._ctx.clearRect(0,0,t.width,t.height),this._drawImage()}_animateIn({fromViewer:t}){this.$.image&&(this.ref["frame-el"].toggleThumbs(!0),this._transitionToImage(),setTimeout(()=>{this.className=F({"uc-active_from_viewer":t,"uc-active_from_editor":!t,"uc-inactive_to_editor":!1})}))}_getCropDimensions(){let t=this.$["*cropBox"],i=this.$["*imageBox"],s=this.$["*operations"],{rotate:o}=s,{width:n,height:l}=i,{width:a,height:c}=zt(this._imageSize,o),{width:h,height:d}=t,p=n/a,m=l/c;return[At(Math.round(h/p),1,a),At(Math.round(d/m),1,c)]}_getCropTransformation(){let t=this.$["*cropBox"],i=this.$["*imageBox"],s=this.$["*operations"],{rotate:o}=s,{width:n,height:l,x:a,y:c}=i,{width:h,height:d}=zt(this._imageSize,o),{x:p,y:m}=t,f=n/h,g=l/d,v=this._getCropDimensions(),w={dimensions:v,coords:[At(Math.round((p-a)/f),0,h-v[0]),At(Math.round((m-c)/g),0,d-v[1])]};if(!ya(w)){console.error("Cropper is trying to create invalid crop object",{payload:w});return}if(!(v[0]===h&&v[1]===d))return w}_commit(){if(!this.isConnected||!this._imageSize)return;let t=this.$["*operations"],{rotate:i,mirror:s,flip:o}=t,n=this._getCropTransformation(),a={...this.$["*editorTransformations"],crop:n,rotate:i,mirror:s,flip:o};this.$["*editorTransformations"]=a}setValue(t,i){this.$["*operations"]={...this.$["*operations"],[t]:i},this._isActive&&(this._alignImage(),this._alignCrop(),this._draw())}getValue(t){return this.$["*operations"][t]}async activate(t,{fromViewer:i}={}){if(!this._isActive){this._isActive=!0,this._imageSize=t,this.removeEventListener("transitionend",this._reset);try{this.$.image=await this._waitForImage(this.$["*originalUrl"],this.$["*editorTransformations"]),this._syncTransformations(),this._animateIn({fromViewer:i})}catch(s){console.error("Failed to activate cropper",{error:s})}this._observer=new ResizeObserver(([s])=>{s.contentRect.width>0&&s.contentRect.height>0&&this._isActive&&this.$.image&&this._handleResizeThrottled()}),this._observer.observe(this)}}deactivate({reset:t=!1}={}){var i;this._isActive&&(!t&&this._commit(),this._isActive=!1,this._transitionToCrop(),this.className=F({"uc-active_from_viewer":!1,"uc-active_from_editor":!1,"uc-inactive_to_editor":!0}),this.ref["frame-el"].toggleThumbs(!1),this.addEventListener("transitionend",this._reset,{once:!0}),(i=this._observer)==null||i.disconnect())}_transitionToCrop(){let t=this._getCropDimensions(),i=Math.min(this.offsetWidth,t[0])/this.$["*cropBox"].width,s=Math.min(this.offsetHeight,t[1])/this.$["*cropBox"].height,o=Math.min(i,s),n=this.$["*cropBox"].x+this.$["*cropBox"].width/2,l=this.$["*cropBox"].y+this.$["*cropBox"].height/2;this.style.transform=`scale(${o}) translate(${(this.offsetWidth/2-n)/o}px, ${(this.offsetHeight/2-l)/o}px)`,this.style.transformOrigin=`${n}px ${l}px`}_transitionToImage(){let t=this.$["*cropBox"].x+this.$["*cropBox"].width/2,i=this.$["*cropBox"].y+this.$["*cropBox"].height/2;this.style.transform="scale(1)",this.style.transformOrigin=`${t}px ${i}px`}_reset(){this._isActive||(this.$.image=null)}async _waitForImage(t,i){var h;let s=this.offsetWidth;i={...i,crop:void 0,rotate:void 0,flip:void 0,mirror:void 0};let o=await this.proxyUrl(Yt(t,s,i)),{promise:n,cancel:l,image:a}=we(o),c=this._handleImageLoading(o);return a.addEventListener("load",c,{once:!0}),a.addEventListener("error",c,{once:!0}),(h=this._cancelPreload)==null||h.call(this),this._cancelPreload=l,n.then(()=>a).catch(d=>(console.error("Failed to load image",{error:d}),this.$["*networkProblems"]=!0,Promise.resolve(a)))}_handleImageLoading(t){let i="crop",s=this.$["*loadingOperations"];return s.get(i)||s.set(i,new Map),s.get(i).get(t)||(s.set(i,s.get(i).set(t,!0)),this.$["*loadingOperations"]=s),()=>{var o;(o=s==null?void 0:s.get(i))!=null&&o.has(t)&&(s.get(i).delete(t),this.$["*loadingOperations"]=s)}}initCallback(){super.initCallback(),this.sub("*imageBox",()=>{this._draw()}),this.sub("*cropBox",()=>{this.$.image&&this._commitDebounced()}),this.sub("*cropPresetList",()=>{this._alignCrop()}),setTimeout(()=>{this.sub("*networkProblems",t=>{t||this._isActive&&this.activate(this._imageSize,{fromViewer:!1})})},0)}destroyCallback(){var t;super.destroyCallback(),(t=this._observer)==null||t.disconnect()}};wi.template=``;function Er(r,e,t){let i=Array(t);t--;for(let s=t;s>=0;s--)i[s]=Math.ceil((s*e+(t-s)*r)/t);return i}function va(r){return r.reduce((e,t,i)=>is<=e&&e<=o);return r.map(s=>{let o=Math.abs(i[0]-i[1]),n=Math.abs(e-i[0])/o;return i[0]===s?e>t?1:1-n:i[1]===s?e>=t?n:1:0})}function Ca(r,e){return r.map((t,i)=>to-n)}var Tr=class extends _{constructor(){super(),this._isActive=!1,this._hidden=!0,this._addKeypointDebounced=O(this._addKeypoint.bind(this),600),this.classList.add("uc-inactive_to_cropper")}_handleImageLoading(e){let t=this._operation,i=this.$["*loadingOperations"];return i.get(t)||i.set(t,new Map),i.get(t).get(e)||(i.set(t,i.get(t).set(e,!0)),this.$["*loadingOperations"]=i),()=>{var s;(s=i==null?void 0:i.get(t))!=null&&s.has(e)&&(i.get(t).delete(e),this.$["*loadingOperations"]=i)}}_flush(){window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{for(let e of this._keypoints){let{image:t}=e;t&&(t.style.opacity=e.opacity.toString(),t.style.zIndex=e.zIndex.toString())}})}async _imageSrc({url:e=this._url,filter:t=this._filter,operation:i,value:s}={}){let o={...this._transformations};i&&(o[i]=t?{name:t,amount:s}:s);let n=this.offsetWidth;return await this.proxyUrl(Yt(e,n,o))}async _constructKeypoint(e,t){return{src:await this._imageSrc({operation:e,value:t}),image:null,opacity:0,zIndex:0,value:t}}_isSame(e,t){return this._operation===e&&this._filter===t}async _addKeypoint(e,t,i){let s=()=>!this._isSame(e,t)||this._value!==i||!!this._keypoints.find(a=>a.value===i);if(s())return;let o=await this._constructKeypoint(e,i),n=new Image;n.src=o.src;let l=this._handleImageLoading(o.src);n.addEventListener("load",l,{once:!0}),n.addEventListener("error",l,{once:!0}),o.image=n,n.classList.add("uc-fader-image"),n.addEventListener("load",()=>{if(s())return;let a=this._keypoints,c=a.findIndex(d=>d.value>i),h=c{this.$["*networkProblems"]=!0},{once:!0})}set(e){e=typeof e=="string"?parseInt(e,10):e,this._update(this._operation,e),this._addKeypointDebounced(this._operation,this._filter,e)}_update(e,t){this._operation=e,this._value=t;let{zero:i}=it[e],s=this._keypoints.map(l=>l.value),o=wa(s,t,i),n=Ca(s,i);for(let[l,a]of Object.entries(this._keypoints))a.opacity=o[l],a.zIndex=n[l];this._flush()}_createPreviewImage(){let e=new Image;return e.classList.add("uc-fader-image","uc-fader-image--preview"),e.style.opacity="0",e}async _initNodes(){let e=document.createDocumentFragment();this._previewImage=this._previewImage||this._createPreviewImage(),!this.contains(this._previewImage)&&e.appendChild(this._previewImage);let t=document.createElement("div");e.appendChild(t);let i=this._keypoints.map(c=>c.src),{images:s,promise:o,cancel:n}=Ce(i);s.forEach(c=>{let h=this._handleImageLoading(c.src);c.addEventListener("load",h),c.addEventListener("error",h)}),this._cancelLastImages=()=>{n(),this._cancelLastImages=void 0};let l=this._operation,a=this._filter;await o,this._isActive&&this._isSame(l,a)&&(this._container&&this._container.remove(),this._container=t,this._keypoints.forEach((c,h)=>{let d=s[h];d.classList.add("uc-fader-image"),c.image=d,this._container.appendChild(d)}),this.appendChild(e),this._flush())}async setTransformations(e){if(this._transformations=e,this._previewImage){let t=await this._imageSrc(),i=this._handleImageLoading(t);this._previewImage.src=t,this._previewImage.addEventListener("load",i,{once:!0}),this._previewImage.addEventListener("error",i,{once:!0}),this._previewImage.style.opacity="1",this._previewImage.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}}async preload({url:e,filter:t,operation:i,value:s}){this._cancelBatchPreload&&this._cancelBatchPreload();let o=To(i,s),n=await Promise.all(o.map(a=>this._imageSrc({url:e,filter:t,operation:i,value:a}))),{cancel:l}=Ce(n);this._cancelBatchPreload=l}_setOriginalSrc(e){let t=this._previewImage||this._createPreviewImage();if(!this.contains(t)&&this.appendChild(t),this._previewImage=t,t.src===e){t.style.opacity="1",t.style.transform="scale(1)",this.className=F({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1});return}t.style.opacity="0";let i=this._handleImageLoading(e);t.addEventListener("error",i,{once:!0}),t.src=e,t.addEventListener("load",()=>{i(),t&&(t.style.opacity="1",t.style.transform="scale(1)",this.className=F({"uc-active_from_viewer":this._fromViewer,"uc-active_from_cropper":!this._fromViewer,"uc-inactive_to_cropper":!1}))},{once:!0}),t.addEventListener("error",()=>{this.$["*networkProblems"]=!0},{once:!0})}async activate({url:e,operation:t,value:i,filter:s,fromViewer:o}){if(this._isActive=!0,this._hidden=!1,this._url=e,this._operation=t||"initial",this._value=i,this._filter=s,this._fromViewer=o,typeof i!="number"&&!s){let l=await this._imageSrc({operation:t,value:i});this._setOriginalSrc(l),this._container&&this._container.remove();return}this._keypoints=await Promise.all(To(t,i).map(l=>this._constructKeypoint(t,l))),this._update(t,i),this._initNodes()}deactivate({hide:e=!0}={}){this._isActive=!1,this._cancelLastImages&&this._cancelLastImages(),this._cancelBatchPreload&&this._cancelBatchPreload(),e&&!this._hidden?(this._hidden=!0,this._previewImage&&(this._previewImage.style.transform="scale(1)"),this.className=F({"uc-active_from_viewer":!1,"uc-active_from_cropper":!1,"uc-inactive_to_cropper":!0}),this.addEventListener("transitionend",()=>{this._container&&this._container.remove()},{once:!0})):this._container&&this._container.remove()}};var xa=1,Ci=class extends _{initCallback(){super.initCallback(),this.addEventListener("wheel",e=>{e.preventDefault();let{deltaY:t,deltaX:i}=e;Math.abs(i)>xa?this.scrollLeft+=i:this.scrollLeft+=t},{passive:!1}),this.addEventListener("scroll",()=>{},{passive:!0})}};Ci.template=" ";function Aa(r){return``}function Ea(r){return`
`}var xi=class extends _{constructor(){super();u(this,"_updateInfoTooltip",O(()=>{var n,l;let t=this.$["*editorTransformations"],i=this.$["*currentOperation"],s="",o=!1;if(this.$["*tabId"]===I.FILTERS)if(o=!0,this.$["*currentFilter"]&&((n=t==null?void 0:t.filter)==null?void 0:n.name)===this.$["*currentFilter"]){let a=((l=t==null?void 0:t.filter)==null?void 0:l.amount)||100;s=this.$["*currentFilter"]+" "+a}else s=this.l10n(at);else if(this.$["*tabId"]===I.TUNING&&i){o=!0;let a=(t==null?void 0:t[i])||it[i].zero;s=this.l10n(i)+" "+a}o&&(this.$["*operationTooltip"]=s),this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",o)},0));this.init$={...this.init$,"*sliderEl":null,"*loadingOperations":new Map,"*showSlider":!1,"*currentFilter":at,"*currentOperation":null,showLoader:!1,filters:qr,colorOperations:Xr,cropOperations:Kr,"*operationTooltip":null,"presence.mainToolbar":!0,"presence.subToolbar":!1,"presence.tabToggles":!0,"presence.tabContent.crop":!1,"presence.tabContent.tuning":!1,"presence.tabContent.filters":!1,"presence.tabToggle.crop":!0,"presence.tabToggle.tuning":!0,"presence.tabToggle.filters":!0,"presence.subTopToolbarStyles":{hidden:"uc-sub-toolbar--top-hidden",visible:"uc-sub-toolbar--visible"},"presence.subBottomToolbarStyles":{hidden:"uc-sub-toolbar--bottom-hidden",visible:"uc-sub-toolbar--visible"},"presence.tabContentStyles":{hidden:"uc-tab-content--hidden",visible:"uc-tab-content--visible"},"presence.tabToggleStyles":{hidden:"uc-tab-toggle--hidden",visible:"uc-tab-toggle--visible"},"presence.tabTogglesStyles":{hidden:"uc-tab-toggles--hidden",visible:"uc-tab-toggles--visible"},"on.cancel":()=>{var t;(t=this._cancelPreload)==null||t.call(this),this.$["*on.cancel"]()},"on.apply":()=>{this.$["*on.apply"](this.$["*editorTransformations"])},"on.applySlider":()=>{this.ref["slider-el"].apply(),this._onSliderClose()},"on.cancelSlider":()=>{this.ref["slider-el"].cancel(),this._onSliderClose()},"on.clickTab":t=>{let i=t.currentTarget.getAttribute("data-id");i&&this._activateTab(i,{fromViewer:!1})},tab_role:"tab",[`tab_${I.TUNING}`]:`tab_${I.TUNING}`,[`tab_${I.CROP}`]:`tab_${I.CROP}`,[`tab_${I.FILTERS}`]:`tab_${I.FILTERS}`,cancel:"cancel",apply:"apply","a11y-editor-tab-filters":"a11y-editor-tab-filters","a11y-editor-tab-tuning":"a11y-editor-tab-tuning","a11y-editor-tab-crop":"a11y-editor-tab-crop"},this._debouncedShowLoader=O(this._showLoader.bind(this),500)}_onSliderClose(){this.$["*showSlider"]=!1,this.$["*tabId"]===I.TUNING&&this.ref["tooltip-el"].classList.toggle("uc-info-tooltip_visible",!1)}_createOperationControl(t){let i=new xe;return i.operation=t,i}_createFilterControl(t){let i=new Zt;return i.filter=t,i}_createToggleControl(t){let i=new ye;return i.operation=t,i}_renderControlsList(t){let i=this.ref[`controls-list-${t}`],s=document.createDocumentFragment();t===I.CROP?this.$.cropOperations.forEach(o=>{let n=this._createToggleControl(o);s.appendChild(n)}):t===I.FILTERS?[at,...this.$.filters].forEach(o=>{let n=this._createFilterControl(o);s.appendChild(n)}):t===I.TUNING&&this.$.colorOperations.forEach(o=>{let n=this._createOperationControl(o);s.appendChild(n)}),[...s.children].forEach((o,n)=>{n===s.childNodes.length-1&&o.classList.add("uc-controls-list_last-item")}),i.innerHTML="",i.appendChild(s)}_activateTab(t,{fromViewer:i}){this.$["*tabId"]=t,t===I.CROP?(this.$["*faderEl"].deactivate(),this.$["*cropperEl"].activate(this.$["*imageSize"],{fromViewer:i})):(this.$["*faderEl"].activate({url:this.$["*originalUrl"],fromViewer:i}),this.$["*cropperEl"].deactivate());for(let s of H){let o=s===t,n=this.ref[`tab-toggle-${s}`];n.active=o,o?(this._renderControlsList(t),this._syncTabIndicator()):this._unmountTabControls(s),this.$[`presence.tabContent.${s}`]=o}}_unmountTabControls(t){let i=this.ref[`controls-list-${t}`];i&&(i.innerHTML="")}_syncTabIndicator(){let t=this.ref[`tab-toggle-${this.$["*tabId"]}`],i=this.ref["tabs-indicator"];i.style.transform=`translateX(${t.offsetLeft}px)`}async _preloadEditedImage(){var t;if(this.$["*imgContainerEl"]&&this.$["*originalUrl"]){let i=this.$["*imgContainerEl"].offsetWidth,s=await this.proxyUrl(Yt(this.$["*originalUrl"],i,this.$["*editorTransformations"]));(t=this._cancelPreload)==null||t.call(this);let{cancel:o}=Ce([s]);this._cancelPreload=()=>{o(),this._cancelPreload=void 0}}}_showLoader(t){this.$.showLoader=t}initCallback(){super.initCallback(),this.$["*sliderEl"]=this.ref["slider-el"],this.sub("*imageSize",t=>{t&&setTimeout(()=>{this._activateTab(this.$["*tabId"],{fromViewer:!0})},0)}),this.sub("*editorTransformations",t=>{var s;let i=(s=t==null?void 0:t.filter)==null?void 0:s.name;this.$["*currentFilter"]!==i&&(this.$["*currentFilter"]=i)}),this.sub("*currentFilter",()=>{this._updateInfoTooltip()}),this.sub("*currentOperation",()=>{this._updateInfoTooltip()}),this.sub("*tabId",()=>{this._updateInfoTooltip()}),this.sub("*originalUrl",()=>{this.$["*faderEl"]&&this.$["*faderEl"].deactivate()}),this.sub("*editorTransformations",t=>{this._preloadEditedImage(),this.$["*faderEl"]&&this.$["*faderEl"].setTransformations(t)}),this.sub("*loadingOperations",t=>{let i=!1;for(let[,s]of t.entries()){if(i)break;for(let[,o]of s.entries())if(o){i=!0;break}}this._debouncedShowLoader(i)}),this.sub("*showSlider",t=>{this.$["presence.subToolbar"]=t,this.$["presence.mainToolbar"]=!t}),this.sub("*tabList",t=>{this.$["presence.tabToggles"]=t.length>1;for(let i of H){this.$[`presence.tabToggle.${i}`]=t.includes(i);let s=this.ref[`tab-toggle-${i}`];s.style.gridColumn=t.indexOf(i)+1}t.includes(this.$["*tabId"])||this._activateTab(t[0],{fromViewer:!1})}),this._updateInfoTooltip()}};xi.template=`
{{*operationTooltip}}
${H.map(Ea).join("")}
${H.map(Aa).join("")}
`;var Ae=class extends _{constructor(){super(),this._iconReversed=!1,this._iconSingle=!1,this._iconHidden=!1,this.init$={...this.init$,text:"",icon:"",iconCss:this._iconCss(),theme:null,"aria-role":"","aria-controls":"","title-prop":""},this.defineAccessor("active",e=>{e?this.setAttribute("active",""):this.removeAttribute("active")})}_iconCss(){return F("uc-icon",{"uc-icon_left":!this._iconReversed,"uc-icon_right":this._iconReversed,"uc-icon_hidden":this._iconHidden,"uc-icon_single":this._iconSingle})}initCallback(){super.initCallback(),this.sub("icon",e=>{this._iconSingle=!this.$.text,this._iconHidden=!e,this.$.iconCss=this._iconCss()}),this.sub("theme",e=>{e!=="custom"&&(this.className=`uc-${e}`)}),this.sub("text",e=>{this._iconSingle=!1}),this.hasAttribute("theme")||this.setAttribute("theme","default"),this.defineAccessor("aria-role",e=>{this.$["aria-role"]=e||""}),this.defineAccessor("aria-controls",e=>{this.$["aria-controls"]=e||""}),this.defineAccessor("title-prop",e=>{this.$["title-prop"]=e||""})}set reverse(e){this.hasAttribute("reverse")?(this.style.flexDirection="row-reverse",this._iconReversed=!0):(this._iconReversed=!1,this.style.flexDirection=null)}};Ae.bindAttributes({text:"text",icon:"icon",reverse:"reverse",theme:"theme"});Ae.template=``;var Ai=class extends _{constructor(){super(),this._active=!1,this._handleTransitionEndRight=()=>{let e=this.ref["line-el"];e.style.transition="initial",e.style.opacity="0",e.style.transform="translateX(-101%)",this._active&&this._start()}}initCallback(){super.initCallback(),this.defineAccessor("active",e=>{typeof e=="boolean"&&(e?this._start():this._stop())})}_start(){this._active=!0;let{width:e}=this.getBoundingClientRect(),t=this.ref["line-el"];t.style.transition="transform 1s",t.style.opacity="1",t.style.transform=`translateX(${e}px)`,t.addEventListener("transitionend",this._handleTransitionEndRight,{once:!0})}_stop(){this._active=!1}};Ai.template=`
`;var Ei={transition:"uc-transition",visible:"uc-visible",hidden:"uc-hidden"},Ti=class extends _{constructor(){super(),this._visible=!1,this._visibleStyle=Ei.visible,this._hiddenStyle=Ei.hidden,this._externalTransitions=!1,this.defineAccessor("styles",e=>{e&&(this._externalTransitions=!0,this._visibleStyle=e.visible,this._hiddenStyle=e.hidden)}),this.defineAccessor("visible",e=>{typeof e=="boolean"&&(this._visible=e,this._handleVisible())})}_handleVisible(){this.style.visibility=this._visible?"inherit":"hidden",vo(this,{[Ei.transition]:!this._externalTransitions,[this._visibleStyle]:this._visible,[this._hiddenStyle]:!this._visible}),this.setAttribute("aria-hidden",this._visible?"false":"true")}initCallback(){super.initCallback(),this.classList.toggle("uc-initial",!0),this._externalTransitions||this.classList.add(Ei.transition),this._handleVisible(),setTimeout(()=>{this.classList.toggle("uc-initial",!1)},0)}};Ti.template=" ";var Si=class extends _{constructor(){super();u(this,"init$",{...this.init$,disabled:!1,min:0,max:100,onInput:null,onChange:null,defaultValue:null,"on.sliderInput":()=>{let t=parseInt(this.ref["input-el"].value,10);this._updateValue(t),this.$.onInput&&this.$.onInput(t)},"on.sliderChange":()=>{let t=parseInt(this.ref["input-el"].value,10);this.$.onChange&&this.$.onChange(t)}});this.setAttribute("with-effects","")}initCallback(){super.initCallback(),this.defineAccessor("disabled",i=>{this.$.disabled=i}),this.defineAccessor("min",i=>{this.$.min=i}),this.defineAccessor("max",i=>{this.$.max=i}),this.defineAccessor("defaultValue",i=>{this.$.defaultValue=i,this.ref["input-el"].value=i,this._updateValue(i)}),this.defineAccessor("zero",i=>{this._zero=i}),this.defineAccessor("onInput",i=>{i&&(this.$.onInput=i)}),this.defineAccessor("onChange",i=>{i&&(this.$.onChange=i)}),this._updateSteps(),this._observer=new ResizeObserver(()=>{this._updateSteps();let i=parseInt(this.ref["input-el"].value,10);this._updateValue(i)}),this._observer.observe(this),this._thumbSize=parseInt(window.getComputedStyle(this).getPropertyValue("--l-thumb-size"),10),setTimeout(()=>{let i=parseInt(this.ref["input-el"].value,10);this._updateValue(i)},0),this.sub("disabled",i=>{let s=this.ref["input-el"];i?s.setAttribute("disabled","disabled"):s.removeAttribute("disabled")});let t=this.ref["input-el"];t.addEventListener("focus",()=>{this.style.setProperty("--color-effect","var(--hover-color-rgb)")}),t.addEventListener("blur",()=>{this.style.setProperty("--color-effect","var(--idle-color-rgb)")})}_updateValue(t){this._updateZeroDot(t);let{width:i}=this.getBoundingClientRect(),n=100/(this.$.max-this.$.min)*(t-this.$.min)*(i-this._thumbSize)/100;window.requestAnimationFrame(()=>{this.ref["thumb-el"].style.transform=`translateX(${n}px)`})}_updateZeroDot(t){if(!this._zeroDotEl)return;t===this._zero?this._zeroDotEl.style.opacity="0":this._zeroDotEl.style.opacity="0.2";let{width:i}=this.getBoundingClientRect(),n=100/(this.$.max-this.$.min)*(this._zero-this.$.min)*(i-this._thumbSize)/100;window.requestAnimationFrame(()=>{this._zeroDotEl.style.transform=`translateX(${n}px)`})}_updateSteps(){let i=this.ref["steps-el"],{width:s}=i.getBoundingClientRect(),o=Math.ceil(s/2),n=Math.ceil(o/15)-2;if(this._stepsCount===n)return;let l=document.createDocumentFragment(),a=document.createElement("div"),c=document.createElement("div");a.className="uc-minor-step",c.className="uc-border-step",l.appendChild(c);for(let d=0;d
`;var Sr=class extends S{constructor(){super(...arguments);u(this,"couldBeCtxOwner",!0);u(this,"activityType",b.activities.CLOUD_IMG_EDIT);u(this,"_entry");u(this,"_instance")}get activityParams(){let t=super.activityParams;if("internalId"in t)return t;throw new Error("Cloud Image Editor activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>this.mountEditor(),onDeactivate:()=>this.unmountEditor()}),this.subConfigValue("cropPreset",t=>{this._instance&&this._instance.getAttribute("crop-preset")!==t&&this._instance.setAttribute("crop-preset",t)}),this.subConfigValue("cloudImageEditorTabs",t=>{this._instance&&this._instance.getAttribute("tabs")!==t&&this._instance.setAttribute("tabs",t)})}handleApply(t){if(!this._entry)return;let i=t.detail;this._entry.setMultipleValues({cdnUrl:i.cdnUrl,cdnUrlModifiers:i.cdnUrlModifiers}),this.historyBack()}handleCancel(){this.historyBack()}mountEditor(){let{internalId:t}=this.activityParams;if(this._entry=this.uploadCollection.read(t),!this._entry)throw new Error(`Entry with internalId "${t}" not found`);let i=this._entry.getValue("cdnUrl");if(!i)throw new Error(`Entry with internalId "${t}" hasn't uploaded yet`);let s=new lt,o=this.cfg.cropPreset,n=this.cfg.cloudImageEditorTabs;s.setAttribute("ctx-name",this.ctxName),s.setAttribute("cdn-url",i),o&&s.setAttribute("crop-preset",o),n&&s.setAttribute("tabs",n),s.addEventListener("apply",l=>{let a=l;this.handleApply(a),this.debugPrint('editor event "apply"',a.detail)}),s.addEventListener("cancel",l=>{let a=l;this.handleCancel(),this.debugPrint('editor event "cancel"',a.detail)}),s.addEventListener("change",l=>{let a=l;this.debugPrint('editor event "change"',a.detail)}),this.innerHTML="",this.appendChild(s),this._instance=s}unmountEditor(){this._instance=void 0,this._entry=void 0,this.innerHTML=""}};var Ta=function(r){return r.replace(/[\\-\\[]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},So=function(r,e="i"){let t=r.split("*").map(Ta);return new RegExp("^"+t.join(".+")+"$",e)};var Sa=r=>Object.keys(r).reduce((t,i)=>{let s=r[i],o=Object.keys(s).reduce((n,l)=>{let a=s[l];return n+`${l}: ${a};`},"");return t+`${i}{${o}}`},"");function ko({textColor:r,backgroundColor:e,linkColor:t,linkColorHover:i,secondaryColor:s,secondaryHover:o,secondaryForegroundColor:n,fontFamily:l,fontSize:a,radius:c}){let h=`solid 1px ${s}`;return Sa({body:{color:r,"background-color":e,"font-family":l,"font-size":a},".side-bar":{background:"inherit","border-right":h},".main-content":{background:"inherit"},".main-content-header":{background:"inherit"},".main-content-footer":{background:"inherit"},".list-table-row":{color:"inherit"},".list-table-row:hover":{background:s},".list-table-row .list-table-cell-a, .list-table-row .list-table-cell-b":{"border-top":h},".list-table-body .list-items":{"border-bottom":h},".bread-crumbs a":{color:t},".bread-crumbs a:hover":{color:i},".main-content.loading":{background:`${e} url(/static/images/loading_spinner.gif) center no-repeat`,"background-size":"25px 25px"},".list-icons-item":{"background-color":s},".source-gdrive .side-bar-menu a, .source-gphotos .side-bar-menu a":{color:t},".source-gdrive .side-bar-menu a, .source-gphotos .side-bar-menu a:hover":{color:i},".side-bar-menu a":{color:t},".side-bar-menu a:hover":{color:i},".source-gdrive .side-bar-menu .current, .source-gdrive .side-bar-menu a:hover, .source-gphotos .side-bar-menu .current, .source-gphotos .side-bar-menu a:hover":{color:i},".source-vk .side-bar-menu a":{color:t},".source-vk .side-bar-menu a:hover":{color:i,background:"none"},"input[type=submit], .button, button":{color:n,background:s,"box-shadow":"none",border:"none","border-radius":c},"input[type=submit]:hover, .button:hover, button:hover":{background:o},".text-field, input[type=search], input[type=text], input[type=url], textarea":{color:n,"border-radius":c,background:s,border:h}})}var Tt={};window.addEventListener("message",r=>{let e;try{e=JSON.parse(r.data)}catch{return}if((e==null?void 0:e.type)in Tt){let t=Tt[e.type];for(let[i,s]of t)r.source===i&&s(e)}});var $o=function(r,e,t){r in Tt||(Tt[r]=[]),Tt[r].push([e,t])},Io=function(r,e){r in Tt&&(Tt[r]=Tt[r].filter(t=>t[0]!==e))};function Oo(r){let e=[];for(let[t,i]of Object.entries(r))i==null||typeof i=="string"&&i.length===0||e.push(`${t}=${encodeURIComponent(i)}`);return e.join("&")}var ki=class extends S{constructor(){super();u(this,"couldBeCtxOwner",!0);u(this,"activityType",b.activities.EXTERNAL);u(this,"_iframe",null);this.init$={...this.init$,activityIcon:"",activityCaption:"",selectedList:[],counter:0,multiple:!1,onDone:()=>{for(let t of this.$.selectedList){let i=this.extractUrlFromMessage(t),{filename:s}=t,{externalSourceType:o}=this.activityParams;this.api.addFileFromUrl(i,{fileName:s,source:o})}this.$["*currentActivity"]=b.activities.UPLOAD_LIST},onCancel:()=>{this.historyBack()}}}get activityParams(){let t=super.activityParams;if("externalSourceType"in t)return t;throw new Error("External Source activity params not found")}initCallback(){super.initCallback(),this.registerActivity(this.activityType,{onActivate:()=>{let{externalSourceType:t}=this.activityParams;if(!t){this.$["*currentActivity"]=null,this.setOrAddState("*modalActive",!1),console.error(`Param "externalSourceType" is required for activity "${this.activityType}"`);return}this.set$({activityCaption:`${t==null?void 0:t[0].toUpperCase()}${t==null?void 0:t.slice(1)}`,activityIcon:t}),this.mountIframe()}}),this.sub("*currentActivityParams",t=>{this.isActivityActive&&(this.unmountIframe(),this.mountIframe())}),this.sub("*currentActivity",t=>{t!==this.activityType&&this.unmountIframe()}),this.sub("selectedList",t=>{this.$.counter=t.length}),this.subConfigValue("multiple",t=>{this.$.multiple=t})}extractUrlFromMessage(t){if(t.alternatives){let i=N(this.cfg.externalSourcesPreferredTypes);for(let s of i){let o=So(s);for(let[n,l]of Object.entries(t.alternatives))if(o.test(n))return l}}return t.url}sendMessage(t){var i,s;(s=(i=this._iframe)==null?void 0:i.contentWindow)==null||s.postMessage(JSON.stringify(t),"*")}async handleFileSelected(t){!this.$.multiple&&this.$.selectedList.length||(this.$.selectedList=[...this.$.selectedList,t],this.$.multiple||this.$.onDone())}handleIframeLoad(){this.applyStyles()}getCssValue(t){return window.getComputedStyle(this).getPropertyValue(t).trim()}applyStyles(){let t={radius:this.getCssValue("--uc-radius"),backgroundColor:this.getCssValue("--uc-background"),textColor:this.getCssValue("--uc-foreground"),secondaryColor:this.getCssValue("--uc-secondary"),secondaryForegroundColor:this.getCssValue("--uc-secondary-foreground"),secondaryHover:this.getCssValue("--uc-secondary-hover"),linkColor:this.getCssValue("--uc-primary"),linkColorHover:this.getCssValue("--uc-primary-hover"),fontFamily:this.getCssValue("--uc-font-family"),fontSize:this.getCssValue("--uc-font-size")};this.sendMessage({type:"embed-css",style:ko(t)})}remoteUrl(){var c,h;let{pubkey:t,remoteTabSessionKey:i,socialBaseUrl:s}=this.cfg,{externalSourceType:o}=this.activityParams,l={lang:((h=(c=this.l10n("social-source-lang"))==null?void 0:c.split("-"))==null?void 0:h[0])||"en",public_key:t,images_only:"false",pass_window_open:!1,session_key:i},a=new URL(`/window3/${o}`,s);return a.search=Oo(l),a.toString()}mountIframe(){let t=Ri({tag:"iframe",attributes:{src:this.remoteUrl(),marginheight:0,marginwidth:0,frameborder:0,allowTransparency:!0}});t.addEventListener("load",this.handleIframeLoad.bind(this)),this.ref.iframeWrapper.innerHTML="",this.ref.iframeWrapper.appendChild(t),$o("file-selected",t.contentWindow,this.handleFileSelected.bind(this)),this._iframe=t,this.$.selectedList=[]}unmountIframe(){this._iframe&&Io("file-selected",this._iframe.contentWindow),this.ref.iframeWrapper.innerHTML="",this._iframe=null,this.$.selectedList=[],this.$.counter=0}};ki.template=`
{{activityCaption}}
{{counter}}
`;var kr=class extends S{constructor(){super(...arguments);u(this,"requireCtxName",!0)}_createValidationInput(){let t=document.createElement("input");return t.type="text",t.name=this.ctxName,t.required=this.cfg.multipleMin>0,t.tabIndex=-1,Qt(t,{opacity:0,height:0,width:0}),t}initCallback(){super.initCallback(),this._validationInputElement=this._createValidationInput(),this.appendChild(this._validationInputElement),this.sub("*collectionState",t=>{var i;{if(this._dynamicInputsContainer||(this._dynamicInputsContainer=document.createElement("div"),this.appendChild(this._dynamicInputsContainer)),!this._validationInputElement){let l=this._createValidationInput();this.appendChild(l),this._validationInputElement=l}if(this._dynamicInputsContainer.innerHTML="",t.status==="uploading"||t.status==="idle"){this._validationInputElement.value="",this._validationInputElement.setCustomValidity("");return}if(t.status==="failed"){let l=(i=t.errors[0])==null?void 0:i.message;this._validationInputElement.value="",this._validationInputElement.setCustomValidity(l);return}let s=t.group?t.group:null;if(s){this._validationInputElement.value=s.cdnUrl,this._validationInputElement.setCustomValidity("");return}let o=t.allEntries.map(l=>l.cdnUrl);if(!this.cfg.multiple&&o.length===1){this._validationInputElement.value=o[0],this._validationInputElement.setCustomValidity("");return}this._validationInputElement.remove(),this._validationInputElement=null;let n=new DocumentFragment;for(let l of o){let a=document.createElement("input");a.type="hidden",a.name=`${this.ctxName}[]`,a.value=l,n.appendChild(a)}this._dynamicInputsContainer.replaceChildren(n)}},!1)}};var $r=class extends b{};var $i=class extends _{constructor(){super(...arguments);u(this,"init$",{...this.init$,currentText:"",options:[],selectHtml:"",onSelect:t=>{var i;t.preventDefault(),t.stopPropagation(),this.value=this.ref.select.value,this.$.currentText=((i=this.$.options.find(s=>s.value==this.value))==null?void 0:i.text)||"",this.dispatchEvent(new Event("change"))}})}initCallback(){super.initCallback(),this.sub("options",t=>{var s;this.$.currentText=((s=t==null?void 0:t[0])==null?void 0:s.text)||"";let i="";t==null||t.forEach(o=>{i+=``}),this.$.selectHtml=i})}};$i.template='';var Ii=class extends _{initCallback(){super.initCallback(),this.subConfigValue("removeCopyright",e=>{this.toggleAttribute("hidden",!!e)})}};u(Ii,"template",`Powered by Uploadcare`);var Ee=class Ee extends rt{constructor(){super(),this.init$={...this.init$,isHidden:!1}}initCallback(){super.initCallback(),this.defineAccessor("headless",e=>{this.set$({isHidden:$(e)})}),this.sub("*modalActive",e=>{this._lastModalActive!==e&&this.emit(e?k.MODAL_OPEN:k.MODAL_CLOSE,void 0,{debounce:!0}),this._lastModalActive=e},!1)}};u(Ee,"styleAttrs",[...j(Ee,Ee,"styleAttrs"),"uc-file-uploader-regular"]);var Te=Ee;Te.template=``;Te.bindAttributes({headless:null});var Se=class Se extends rt{initCallback(){super.initCallback();let e=this.ref.uBlock;this.sub("*currentActivity",t=>{t||(this.$["*currentActivity"]=e.initActivity||b.activities.START_FROM)}),this.sub("*uploadList",t=>{(t==null?void 0:t.length)>0?this.$["*currentActivity"]=b.activities.UPLOAD_LIST:this.$["*currentActivity"]=e.initActivity||b.activities.START_FROM}),this.subConfigValue("sourceList",t=>{t!=="local"&&(this.cfg.sourceList="local")}),this.subConfigValue("confirmUpload",t=>{t!==!1&&(this.cfg.confirmUpload=!1)})}};u(Se,"styleAttrs",[...j(Se,Se,"styleAttrs"),"uc-file-uploader-minimal"]);var Oi=Se;Oi.template=``;var ke=class ke extends rt{constructor(){super(),this.init$={...this.init$,couldCancel:!1,cancel:()=>{this.couldHistoryBack?this.$["*historyBack"]():this.couldShowList&&(this.$["*currentActivity"]=b.activities.UPLOAD_LIST)}}}get couldHistoryBack(){let e=this.$["*history"];return e.length>1&&e[e.length-1]!==b.activities.START_FROM}get couldShowList(){return this.cfg.showEmptyList||this.$["*uploadList"].length>0}initCallback(){super.initCallback();let e=this.ref.uBlock;this.sub("*currentActivity",t=>{t||(this.$["*currentActivity"]=e.initActivity||b.activities.START_FROM)}),this.sub("*uploadList",t=>{(t==null?void 0:t.length)>0&&this.$["*currentActivity"]===(e.initActivity||b.activities.START_FROM)&&(this.$["*currentActivity"]=b.activities.UPLOAD_LIST)}),this.sub("*history",()=>{this.$.couldCancel=this.couldHistoryBack||this.couldShowList})}};u(ke,"styleAttrs",[...j(ke,ke,"styleAttrs"),"uc-file-uploader-inline"]);var Li=ke;Li.template=``;var $e=class $e extends lt{initCallback(){var e;super.initCallback(),(e=this.a11y)==null||e.registerBlock(this)}};u($e,"styleAttrs",[...j($e,$e,"styleAttrs"),"uc-wgt-common"]);var Ir=$e;function Or(r){for(let e in r){let t=[...e].reduce((i,s)=>(s.toUpperCase()===s&&(s="-"+s.toLowerCase()),i+=s),"");t.startsWith("-")&&(t=t.replace("-","")),t.startsWith("uc-")||(t="uc-"+t),r[e].reg&&r[e].reg(t)}}var Lr="UC";async function ka(r,e=!1){return new Promise((t,i)=>{if(typeof document!="object"){t(null);return}if(typeof window=="object"&&window[Lr]){t(window[Lr]);return}let s=document.createElement("script");s.async=!0,s.src=r,s.onerror=()=>{i()},s.onload=()=>{let o=window[Lr];e&&Or(o),t(o)},document.head.appendChild(s)})}export{b as ActivityBlock,$r as ActivityHeader,Pt as BaseComponent,_ as Block,Ae as BtnUi,mi as CameraSource,Ir as CloudImageEditor,Sr as CloudImageEditorActivity,lt as CloudImageEditorBlock,Rl as Config,Ii as Copyright,yi as CropFrame,E as Data,me as DropArea,ye as EditorCropButtonControl,Zt as EditorFilterControl,wi as EditorImageCropper,Tr as EditorImageFader,xe as EditorOperationControl,Ci as EditorScroller,vi as EditorSlider,xi as EditorToolbar,ki as ExternalSource,Gt as ExternalUploadSource,_e as FileItem,Li as FileUploaderInline,Oi as FileUploaderMinimal,Te as FileUploaderRegular,kr as FormInput,ue as Icon,_r as Img,Ai as LineLoaderUi,hi as Modal,jt as PACKAGE_NAME,Ht as PACKAGE_VERSION,Ti as PresenceToggle,_i as ProgressBar,bi as ProgressBarCommon,$i as Select,pe as SimpleBtn,Si as SliderUi,rt as SolutionBlock,ge as SourceBtn,wr as SourceList,ai as StartFrom,Mt as UID,ma as UploadCtxProvider,pi as UploadList,L as UploadSource,S as UploaderBlock,fi as UrlSource,Or as defineComponents,bs as defineLocale,ka as loadFileUploaderFrom,ae as toKebabCase}; \ No newline at end of file diff --git a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-inline.min.css b/pyuploadcare/dj/static/uploadcare/lr-file-uploader-inline.min.css deleted file mode 100644 index fda9d51d..00000000 --- a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-inline.min.css +++ /dev/null @@ -1 +0,0 @@ -:where(.lr-wgt-cfg,.lr-wgt-common),:host{--cfg-pubkey: "YOUR_PUBLIC_KEY";--cfg-multiple: 1;--cfg-multiple-min: 0;--cfg-multiple-max: 0;--cfg-confirm-upload: 0;--cfg-img-only: 0;--cfg-accept: "";--cfg-external-sources-preferred-types: "";--cfg-store: "auto";--cfg-camera-mirror: 1;--cfg-source-list: "local, url, camera, dropbox, gdrive";--cfg-max-local-file-size-bytes: 0;--cfg-thumb-size: 76;--cfg-show-empty-list: 0;--cfg-use-local-image-editor: 0;--cfg-use-cloud-image-editor: 1;--cfg-remove-copyright: 0;--cfg-modal-scroll-lock: 1;--cfg-modal-backdrop-strokes: 0;--cfg-source-list-wrap: 1;--cfg-init-activity: "start-from";--cfg-done-activity: "";--cfg-remote-tab-session-key: "";--cfg-cdn-cname: "https://ucarecdn.com";--cfg-base-url: "https://upload.uploadcare.com";--cfg-social-base-url: "https://social.uploadcare.com";--cfg-secure-signature: "";--cfg-secure-expire: "";--cfg-secure-delivery-proxy: "";--cfg-retry-throttled-request-max-times: 1;--cfg-multipart-min-file-size: 26214400;--cfg-multipart-chunk-size: 5242880;--cfg-max-concurrent-requests: 10;--cfg-multipart-max-concurrent-requests: 4;--cfg-multipart-max-attempts: 3;--cfg-check-for-url-duplicates: 0;--cfg-save-url-for-recurrent-uploads: 0;--cfg-group-output: 0;--cfg-user-agent-integration: ""}:where(.lr-wgt-icons,.lr-wgt-common),:host{--icon-default: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-file: "m2.89453 1.2012c0-.473389.38376-.857145.85714-.857145h8.40003c.2273 0 .4453.090306.6061.251051l8.4 8.400004c.1607.16074.251.37876.251.60609v13.2c0 .4734-.3837.8571-.8571.8571h-16.80003c-.47338 0-.85714-.3837-.85714-.8571zm1.71429.85714v19.88576h15.08568v-11.4858h-7.5428c-.4734 0-.8572-.3837-.8572-.8571v-7.54286zm8.39998 1.21218 5.4736 5.47353-5.4736.00001z";--icon-close: "m4.60395 4.60395c.29289-.2929.76776-.2929 1.06066 0l6.33539 6.33535 6.3354-6.33535c.2929-.2929.7677-.2929 1.0606 0 .2929.29289.2929.76776 0 1.06066l-6.3353 6.33539 6.3353 6.3354c.2929.2929.2929.7677 0 1.0606s-.7677.2929-1.0606 0l-6.3354-6.3353-6.33539 6.3353c-.2929.2929-.76777.2929-1.06066 0-.2929-.2929-.2929-.7677 0-1.0606l6.33535-6.3354-6.33535-6.33539c-.2929-.2929-.2929-.76777 0-1.06066z";--icon-collapse: "M3.11572 12C3.11572 11.5858 3.45151 11.25 3.86572 11.25H20.1343C20.5485 11.25 20.8843 11.5858 20.8843 12C20.8843 12.4142 20.5485 12.75 20.1343 12.75H3.86572C3.45151 12.75 3.11572 12.4142 3.11572 12Z";--icon-expand: "M12.0001 8.33716L3.53033 16.8068C3.23743 17.0997 2.76256 17.0997 2.46967 16.8068C2.17678 16.5139 2.17678 16.0391 2.46967 15.7462L11.0753 7.14067C11.1943 7.01825 11.3365 6.92067 11.4936 6.8536C11.6537 6.78524 11.826 6.75 12.0001 6.75C12.1742 6.75 12.3465 6.78524 12.5066 6.8536C12.6637 6.92067 12.8059 7.01826 12.925 7.14068L21.5304 15.7462C21.8233 16.0391 21.8233 16.5139 21.5304 16.8068C21.2375 17.0997 20.7627 17.0997 20.4698 16.8068L12.0001 8.33716Z";--icon-info: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z";--icon-error: "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";--icon-arrow-down: "m11.5009 23.0302c.2844.2533.7135.2533.9978 0l9.2899-8.2758c.3092-.2756.3366-.7496.0611-1.0589s-.7496-.3367-1.0589-.0612l-8.0417 7.1639v-19.26834c0-.41421-.3358-.749997-.75-.749997s-.75.335787-.75.749997v19.26704l-8.04025-7.1626c-.30928-.2755-.78337-.2481-1.05889.0612-.27553.3093-.24816.7833.06112 1.0589z";--icon-upload: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-local: "m3 3.75c-.82843 0-1.5.67157-1.5 1.5v13.5c0 .8284.67157 1.5 1.5 1.5h18c.8284 0 1.5-.6716 1.5-1.5v-9.75c0-.82843-.6716-1.5-1.5-1.5h-9c-.2634 0-.5076-.13822-.6431-.36413l-2.03154-3.38587zm-3 1.5c0-1.65685 1.34315-3 3-3h6.75c.2634 0 .5076.13822.6431.36413l2.0315 3.38587h8.5754c1.6569 0 3 1.34315 3 3v9.75c0 1.6569-1.3431 3-3 3h-18c-1.65685 0-3-1.3431-3-3z";--icon-url: "m19.1099 3.67026c-1.7092-1.70917-4.5776-1.68265-6.4076.14738l-2.2212 2.22122c-.2929.29289-.7678.29289-1.0607 0-.29289-.29289-.29289-.76777 0-1.06066l2.2212-2.22122c2.376-2.375966 6.1949-2.481407 8.5289-.14738l1.2202 1.22015c2.334 2.33403 2.2286 6.15294-.1474 8.52895l-2.2212 2.2212c-.2929.2929-.7678.2929-1.0607 0s-.2929-.7678 0-1.0607l2.2212-2.2212c1.8301-1.83003 1.8566-4.69842.1474-6.40759zm-3.3597 4.57991c.2929.29289.2929.76776 0 1.06066l-6.43918 6.43927c-.29289.2928-.76777.2928-1.06066 0-.29289-.2929-.29289-.7678 0-1.0607l6.43924-6.43923c.2929-.2929.7677-.2929 1.0606 0zm-9.71158 1.17048c.29289.29289.29289.76775 0 1.06065l-2.22123 2.2212c-1.83002 1.8301-1.85654 4.6984-.14737 6.4076l1.22015 1.2202c1.70917 1.7091 4.57756 1.6826 6.40763-.1474l2.2212-2.2212c.2929-.2929.7677-.2929 1.0606 0s.2929.7677 0 1.0606l-2.2212 2.2212c-2.37595 2.376-6.19486 2.4815-8.52889.1474l-1.22015-1.2201c-2.334031-2.3341-2.22859-6.153.14737-8.5289l2.22123-2.22125c.29289-.2929.76776-.2929 1.06066 0z";--icon-camera: "m7.65 2.55c.14164-.18885.36393-.3.6-.3h7.5c.2361 0 .4584.11115.6.3l2.025 2.7h2.625c1.6569 0 3 1.34315 3 3v10.5c0 1.6569-1.3431 3-3 3h-18c-1.65685 0-3-1.3431-3-3v-10.5c0-1.65685 1.34315-3 3-3h2.625zm.975 1.2-2.025 2.7c-.14164.18885-.36393.3-.6.3h-3c-.82843 0-1.5.67157-1.5 1.5v10.5c0 .8284.67157 1.5 1.5 1.5h18c.8284 0 1.5-.6716 1.5-1.5v-10.5c0-.82843-.6716-1.5-1.5-1.5h-3c-.2361 0-.4584-.11115-.6-.3l-2.025-2.7zm3.375 6c-1.864 0-3.375 1.511-3.375 3.375s1.511 3.375 3.375 3.375 3.375-1.511 3.375-3.375-1.511-3.375-3.375-3.375zm-4.875 3.375c0-2.6924 2.18261-4.875 4.875-4.875 2.6924 0 4.875 2.1826 4.875 4.875s-2.1826 4.875-4.875 4.875c-2.69239 0-4.875-2.1826-4.875-4.875z";--icon-dots: "M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z";--icon-back: "M20.251 12.0001C20.251 12.4143 19.9152 12.7501 19.501 12.7501L6.06696 12.7501L11.7872 18.6007C12.0768 18.8968 12.0715 19.3717 11.7753 19.6613C11.4791 19.9508 11.0043 19.9455 10.7147 19.6493L4.13648 12.9213C4.01578 12.8029 3.91947 12.662 3.85307 12.5065C3.78471 12.3464 3.74947 12.1741 3.74947 12C3.74947 11.8259 3.78471 11.6536 3.85307 11.4935C3.91947 11.338 4.01578 11.1971 4.13648 11.0787L10.7147 4.35068C11.0043 4.0545 11.4791 4.04916 11.7753 4.33873C12.0715 4.62831 12.0768 5.10315 11.7872 5.39932L6.06678 11.2501L19.501 11.2501C19.9152 11.2501 20.251 11.5859 20.251 12.0001Z";--icon-remove: "m6.35673 9.71429c-.76333 0-1.35856.66121-1.27865 1.42031l1.01504 9.6429c.06888.6543.62067 1.1511 1.27865 1.1511h9.25643c.658 0 1.2098-.4968 1.2787-1.1511l1.015-9.6429c.0799-.7591-.5153-1.42031-1.2786-1.42031zm.50041-4.5v.32142h-2.57143c-.71008 0-1.28571.57564-1.28571 1.28572s.57563 1.28571 1.28571 1.28571h15.42859c.7101 0 1.2857-.57563 1.2857-1.28571s-.5756-1.28572-1.2857-1.28572h-2.5714v-.32142c0-1.77521-1.4391-3.21429-3.2143-3.21429h-3.8572c-1.77517 0-3.21426 1.43908-3.21426 3.21429zm7.07146-.64286c.355 0 .6428.28782.6428.64286v.32142h-5.14283v-.32142c0-.35504.28782-.64286.64283-.64286z";--icon-edit: "M3.96371 14.4792c-.15098.151-.25578.3419-.3021.5504L2.52752 20.133c-.17826.8021.53735 1.5177 1.33951 1.3395l5.10341-1.1341c.20844-.0463.39934-.1511.55032-.3021l8.05064-8.0507-5.557-5.55702-8.05069 8.05062ZM13.4286 5.01437l5.557 5.55703 2.0212-2.02111c.6576-.65765.6576-1.72393 0-2.38159l-3.1755-3.17546c-.6577-.65765-1.7239-.65765-2.3816 0l-2.0211 2.02113Z";--icon-detail: "M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z";--icon-select: "M7,10L12,15L17,10H7Z";--icon-check: "m12 22c5.5228 0 10-4.4772 10-10 0-5.52285-4.4772-10-10-10-5.52285 0-10 4.47715-10 10 0 5.5228 4.47715 10 10 10zm4.7071-11.4929-5.9071 5.9071-3.50711-3.5071c-.39052-.3905-.39052-1.0237 0-1.4142.39053-.3906 1.02369-.3906 1.41422 0l2.09289 2.0929 4.4929-4.49294c.3905-.39052 1.0237-.39052 1.4142 0 .3905.39053.3905 1.02374 0 1.41424z";--icon-add: "M12.75 21C12.75 21.4142 12.4142 21.75 12 21.75C11.5858 21.75 11.25 21.4142 11.25 21V12.7499H3C2.58579 12.7499 2.25 12.4141 2.25 11.9999C2.25 11.5857 2.58579 11.2499 3 11.2499H11.25V3C11.25 2.58579 11.5858 2.25 12 2.25C12.4142 2.25 12.75 2.58579 12.75 3V11.2499H21C21.4142 11.2499 21.75 11.5857 21.75 11.9999C21.75 12.4141 21.4142 12.7499 21 12.7499H12.75V21Z";--icon-edit-file: "m12.1109 6c.3469-1.69213 1.8444-2.96484 3.6391-2.96484s3.2922 1.27271 3.6391 2.96484h2.314c.4142 0 .75.33578.75.75 0 .41421-.3358.75-.75.75h-2.314c-.3469 1.69213-1.8444 2.9648-3.6391 2.9648s-3.2922-1.27267-3.6391-2.9648h-9.81402c-.41422 0-.75001-.33579-.75-.75 0-.41422.33578-.75.75-.75zm3.6391-1.46484c-1.2232 0-2.2148.99162-2.2148 2.21484s.9916 2.21484 2.2148 2.21484 2.2148-.99162 2.2148-2.21484-.9916-2.21484-2.2148-2.21484zm-11.1391 11.96484c.34691-1.6921 1.84437-2.9648 3.6391-2.9648 1.7947 0 3.2922 1.2727 3.6391 2.9648h9.814c.4142 0 .75.3358.75.75s-.3358.75-.75.75h-9.814c-.3469 1.6921-1.8444 2.9648-3.6391 2.9648-1.79473 0-3.29219-1.2727-3.6391-2.9648h-2.31402c-.41422 0-.75-.3358-.75-.75s.33578-.75.75-.75zm3.6391-1.4648c-1.22322 0-2.21484.9916-2.21484 2.2148s.99162 2.2148 2.21484 2.2148 2.2148-.9916 2.2148-2.2148-.99158-2.2148-2.2148-2.2148z";--icon-remove-file: "m11.9554 3.29999c-.7875 0-1.5427.31281-2.0995.86963-.49303.49303-.79476 1.14159-.85742 1.83037h5.91382c-.0627-.68878-.3644-1.33734-.8575-1.83037-.5568-.55682-1.312-.86963-2.0994-.86963zm4.461 2.7c-.0656-1.08712-.5264-2.11657-1.3009-2.89103-.8381-.83812-1.9749-1.30897-3.1601-1.30897-1.1853 0-2.32204.47085-3.16016 1.30897-.77447.77446-1.23534 1.80391-1.30087 2.89103h-2.31966c-.03797 0-.07529.00282-.11174.00827h-1.98826c-.41422 0-.75.33578-.75.75 0 .41421.33578.75.75.75h1.35v11.84174c0 .7559.30026 1.4808.83474 2.0152.53448.5345 1.25939.8348 2.01526.8348h9.44999c.7559 0 1.4808-.3003 2.0153-.8348.5344-.5344.8347-1.2593.8347-2.0152v-11.84174h1.35c.4142 0 .75-.33579.75-.75 0-.41422-.3358-.75-.75-.75h-1.9883c-.0364-.00545-.0737-.00827-.1117-.00827zm-10.49169 1.50827v11.84174c0 .358.14223.7014.3954.9546.25318.2532.59656.3954.9546.3954h9.44999c.358 0 .7014-.1422.9546-.3954s.3954-.5966.3954-.9546v-11.84174z";--icon-trash-file: var(--icon-remove);--icon-upload-error: var(--icon-error);--icon-fullscreen: "M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z";--icon-fullscreen-exit: "M14,14H19V16H16V19H14V14M5,14H10V19H8V16H5V14M8,5H10V10H5V8H8V5M19,8V10H14V5H16V8H19Z";--icon-badge-success: "M10.5 18.2044L18.0992 10.0207C18.6629 9.41362 18.6277 8.46452 18.0207 7.90082C17.4136 7.33711 16.4645 7.37226 15.9008 7.97933L10.5 13.7956L8.0992 11.2101C7.53549 10.603 6.5864 10.5679 5.97933 11.1316C5.37226 11.6953 5.33711 12.6444 5.90082 13.2515L10.5 18.2044Z";--icon-badge-error: "m13.6 18.4c0 .8837-.7164 1.6-1.6 1.6-.8837 0-1.6-.7163-1.6-1.6s.7163-1.6 1.6-1.6c.8836 0 1.6.7163 1.6 1.6zm-1.6-13.9c.8284 0 1.5.67157 1.5 1.5v7c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5v-7c0-.82843.6716-1.5 1.5-1.5z";--icon-about: "M11.152 14.12v.1h1.523v-.1c.007-.409.053-.752.138-1.028.086-.277.22-.517.405-.72.188-.202.434-.397.735-.586.32-.191.593-.412.82-.66.232-.249.41-.531.533-.847.125-.32.187-.678.187-1.076 0-.579-.137-1.085-.41-1.518a2.717 2.717 0 0 0-1.14-1.018c-.49-.245-1.062-.367-1.715-.367-.597 0-1.142.114-1.636.34-.49.228-.884.564-1.182 1.008-.299.44-.46.98-.485 1.619h1.62c.024-.377.118-.684.282-.922.163-.241.369-.419.617-.532.25-.114.51-.17.784-.17.301 0 .575.063.82.191.248.124.447.302.597.533.149.23.223.504.223.82 0 .263-.05.502-.149.72-.1.216-.234.408-.405.574a3.48 3.48 0 0 1-.575.453c-.33.199-.613.42-.847.66-.234.242-.415.558-.543.949-.125.39-.19.916-.197 1.577ZM11.205 17.15c.21.206.46.31.75.31.196 0 .374-.049.534-.144.16-.096.287-.224.383-.384.1-.163.15-.343.15-.538a1 1 0 0 0-.32-.746 1.019 1.019 0 0 0-.746-.314c-.291 0-.542.105-.751.314-.21.206-.314.455-.314.746 0 .295.104.547.314.756ZM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12Zm-1.5 0c0 5.799-4.701 10.5-10.5 10.5S1.5 17.799 1.5 12 6.201 1.5 12 1.5 22.5 6.201 22.5 12Z";--icon-edit-rotate: "M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z";--icon-edit-flip-v: "M3 15V17H5V15M15 19V21H17V19M19 3H5C3.9 3 3 3.9 3 5V9H5V5H19V9H21V5C21 3.9 20.1 3 19 3M21 19H19V21C20.1 21 21 20.1 21 19M1 11V13H23V11M7 19V21H9V19M19 15V17H21V15M11 19V21H13V19M3 19C3 20.1 3.9 21 5 21V19Z";--icon-edit-flip-h: "M15 21H17V19H15M19 9H21V7H19M3 5V19C3 20.1 3.9 21 5 21H9V19H5V5H9V3H5C3.9 3 3 3.9 3 5M19 3V5H21C21 3.9 20.1 3 19 3M11 23H13V1H11M19 17H21V15H19M15 5H17V3H15M19 13H21V11H19M19 21C20.1 21 21 20.1 21 19H19Z";--icon-edit-brightness: "M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z";--icon-edit-contrast: "M12,20C9.79,20 7.79,19.1 6.34,17.66L17.66,6.34C19.1,7.79 20,9.79 20,12A8,8 0 0,1 12,20M6,8H8V6H9.5V8H11.5V9.5H9.5V11.5H8V9.5H6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,16H17V14.5H12V16Z";--icon-edit-saturation: "M3,13A9,9 0 0,0 12,22C12,17 7.97,13 3,13M12,5.5A2.5,2.5 0 0,1 14.5,8A2.5,2.5 0 0,1 12,10.5A2.5,2.5 0 0,1 9.5,8A2.5,2.5 0 0,1 12,5.5M5.6,10.25A2.5,2.5 0 0,0 8.1,12.75C8.63,12.75 9.12,12.58 9.5,12.31C9.5,12.37 9.5,12.43 9.5,12.5A2.5,2.5 0 0,0 12,15A2.5,2.5 0 0,0 14.5,12.5C14.5,12.43 14.5,12.37 14.5,12.31C14.88,12.58 15.37,12.75 15.9,12.75C17.28,12.75 18.4,11.63 18.4,10.25C18.4,9.25 17.81,8.4 16.97,8C17.81,7.6 18.4,6.74 18.4,5.75C18.4,4.37 17.28,3.25 15.9,3.25C15.37,3.25 14.88,3.41 14.5,3.69C14.5,3.63 14.5,3.56 14.5,3.5A2.5,2.5 0 0,0 12,1A2.5,2.5 0 0,0 9.5,3.5C9.5,3.56 9.5,3.63 9.5,3.69C9.12,3.41 8.63,3.25 8.1,3.25A2.5,2.5 0 0,0 5.6,5.75C5.6,6.74 6.19,7.6 7.03,8C6.19,8.4 5.6,9.25 5.6,10.25M12,22A9,9 0 0,0 21,13C16,13 12,17 12,22Z";--icon-edit-crop: "M7,17V1H5V5H1V7H5V17A2,2 0 0,0 7,19H17V23H19V19H23V17M17,15H19V7C19,5.89 18.1,5 17,5H9V7H17V15Z";--icon-edit-text: "M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z";--icon-edit-draw: "m21.879394 2.1631238c-1.568367-1.62768627-4.136546-1.53831744-5.596267.1947479l-8.5642801 10.1674753c-1.4906533-.224626-3.061232.258204-4.2082427 1.448604-1.0665468 1.106968-1.0997707 2.464806-1.1203996 3.308068-.00142.05753-.00277.113001-.00439.16549-.02754.894146-.08585 1.463274-.5821351 2.069648l-.80575206.98457.88010766.913285c1.0539516 1.093903 2.6691689 1.587048 4.1744915 1.587048 1.5279113 0 3.2235468-.50598 4.4466094-1.775229 1.147079-1.190514 1.612375-2.820653 1.395772-4.367818l9.796763-8.8879697c1.669907-1.5149954 1.75609-4.1802333.187723-5.8079195zm-16.4593821 13.7924592c.8752943-.908358 2.2944227-.908358 3.1697054 0 .8752942.908358.8752942 2.381259 0 3.289617-.5909138.61325-1.5255389.954428-2.53719.954428-.5223687 0-.9935663-.09031-1.3832112-.232762.3631253-.915463.3952949-1.77626.4154309-2.429737.032192-1.045425.072224-1.308557.3352649-1.581546z";--icon-edit-guides: "M1.39,18.36L3.16,16.6L4.58,18L5.64,16.95L4.22,15.54L5.64,14.12L8.11,16.6L9.17,15.54L6.7,13.06L8.11,11.65L9.53,13.06L10.59,12L9.17,10.59L10.59,9.17L13.06,11.65L14.12,10.59L11.65,8.11L13.06,6.7L14.47,8.11L15.54,7.05L14.12,5.64L15.54,4.22L18,6.7L19.07,5.64L16.6,3.16L18.36,1.39L22.61,5.64L5.64,22.61L1.39,18.36Z";--icon-edit-color: "M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";--icon-edit-resize: "M10.59,12L14.59,8H11V6H18V13H16V9.41L12,13.41V16H20V4H8V12H10.59M22,2V18H12V22H2V12H6V2H22M10,14H4V20H10V14Z";--icon-external-source-placeholder: "M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z";--icon-facebook: "m12 1.5c-5.79901 0-10.5 4.70099-10.5 10.5 0 4.9427 3.41586 9.0888 8.01562 10.2045v-6.1086h-2.13281c-.41421 0-.75-.3358-.75-.75v-3.2812c0-.4142.33579-.75.75-.75h2.13281v-1.92189c0-.95748.22571-2.51089 1.38068-3.6497 1.1934-1.17674 3.1742-1.71859 6.2536-1.05619.3455.07433.5923.3798.5923.73323v2.75395c0 .41422-.3358.75-.75.75-.6917 0-1.2029.02567-1.5844.0819-.3865.05694-.5781.13711-.675.20223-.1087.07303-.2367.20457-.2367 1.02837v1.0781h2.3906c.2193 0 .4275.0959.57.2626.1425.1666.205.3872.1709.6038l-.5156 3.2813c-.0573.3647-.3716.6335-.7409.6335h-1.875v6.1058c4.5939-1.1198 8.0039-5.2631 8.0039-10.2017 0-5.79901-4.701-10.5-10.5-10.5zm-12 10.5c0-6.62744 5.37256-12 12-12 6.6274 0 12 5.37256 12 12 0 5.9946-4.3948 10.9614-10.1384 11.8564-.2165.0337-.4369-.0289-.6033-.1714s-.2622-.3506-.2622-.5697v-7.7694c0-.4142.3358-.75.75-.75h1.9836l.28-1.7812h-2.2636c-.4142 0-.75-.3358-.75-.75v-1.8281c0-.82854.0888-1.72825.9-2.27338.3631-.24396.8072-.36961 1.293-.4412.3081-.0454.6583-.07238 1.0531-.08618v-1.39629c-2.4096-.40504-3.6447.13262-4.2928.77165-.7376.72735-.9338 1.79299-.9338 2.58161v2.67189c0 .4142-.3358.75-.75.75h-2.13279v1.7812h2.13279c.4142 0 .75.3358.75.75v7.7712c0 .219-.0956.427-.2619.5695-.1662.1424-.3864.2052-.6028.1717-5.74968-.8898-10.1509-5.8593-10.1509-11.8583z";--icon-dropbox: "m6.01895 1.92072c.24583-.15659.56012-.15658.80593.00003l5.17512 3.29711 5.1761-3.29714c.2458-.15659.5601-.15658.8059.00003l5.5772 3.55326c.2162.13771.347.37625.347.63253 0 .25629-.1308.49483-.347.63254l-4.574 2.91414 4.574 2.91418c.2162.1377.347.3762.347.6325s-.1308.4948-.347.6325l-5.5772 3.5533c-.2458.1566-.5601.1566-.8059 0l-5.1761-3.2971-5.17512 3.2971c-.24581.1566-.5601.1566-.80593 0l-5.578142-3.5532c-.216172-.1377-.347058-.3763-.347058-.6326s.130886-.4949.347058-.6326l4.574772-2.91408-4.574772-2.91411c-.216172-.1377-.347058-.37626-.347058-.63257 0-.2563.130886-.49486.347058-.63256zm.40291 8.61518-4.18213 2.664 4.18213 2.664 4.18144-2.664zm6.97504 2.664 4.1821 2.664 4.1814-2.664-4.1814-2.664zm2.7758-3.54668-4.1727 2.65798-4.17196-2.65798 4.17196-2.658zm1.4063-.88268 4.1814-2.664-4.1814-2.664-4.1821 2.664zm-6.9757-2.664-4.18144-2.664-4.18213 2.664 4.18213 2.664zm-4.81262 12.43736c.22254-.3494.68615-.4522 1.03551-.2297l5.17521 3.2966 5.1742-3.2965c.3493-.2226.813-.1198 1.0355.2295.2226.3494.1198.813-.2295 1.0355l-5.5772 3.5533c-.2458.1566-.5601.1566-.8059 0l-5.57819-3.5532c-.34936-.2226-.45216-.6862-.22963-1.0355z";--icon-gdrive: "m7.73633 1.81806c.13459-.22968.38086-.37079.64707-.37079h7.587c.2718 0 .5223.14697.6548.38419l7.2327 12.94554c.1281.2293.1269.5089-.0031.7371l-3.7935 6.6594c-.1334.2342-.3822.3788-.6517.3788l-14.81918.0004c-.26952 0-.51831-.1446-.65171-.3788l-3.793526-6.6598c-.1327095-.233-.130949-.5191.004617-.7504zm.63943 1.87562-6.71271 11.45452 2.93022 5.1443 6.65493-11.58056zm3.73574 6.52652-2.39793 4.1727 4.78633.0001zm4.1168 4.1729 5.6967-.0002-6.3946-11.44563h-5.85354zm5.6844 1.4998h-13.06111l-2.96515 5.1598 13.08726-.0004z";--icon-gphotos: "M12.51 0c-.702 0-1.272.57-1.272 1.273V7.35A6.381 6.381 0 0 0 0 11.489c0 .703.57 1.273 1.273 1.273H7.35A6.381 6.381 0 0 0 11.488 24c.704 0 1.274-.57 1.274-1.273V16.65A6.381 6.381 0 0 0 24 12.51c0-.703-.57-1.273-1.273-1.273H16.65A6.381 6.381 0 0 0 12.511 0Zm.252 11.232V1.53a4.857 4.857 0 0 1 0 9.702Zm-1.53.006H1.53a4.857 4.857 0 0 1 9.702 0Zm1.536 1.524a4.857 4.857 0 0 0 9.702 0h-9.702Zm-6.136 4.857c0-2.598 2.04-4.72 4.606-4.85v9.7a4.857 4.857 0 0 1-4.606-4.85Z";--icon-instagram: "M6.225 12a5.775 5.775 0 1 1 11.55 0 5.775 5.775 0 0 1-11.55 0zM12 7.725a4.275 4.275 0 1 0 0 8.55 4.275 4.275 0 0 0 0-8.55zM18.425 6.975a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8zM11.958.175h.084c2.152 0 3.823 0 5.152.132 1.35.134 2.427.41 3.362 1.013a7.15 7.15 0 0 1 2.124 2.124c.604.935.88 2.012 1.013 3.362.132 1.329.132 3 .132 5.152v.084c0 2.152 0 3.823-.132 5.152-.134 1.35-.41 2.427-1.013 3.362a7.15 7.15 0 0 1-2.124 2.124c-.935.604-2.012.88-3.362 1.013-1.329.132-3 .132-5.152.132h-.084c-2.152 0-3.824 0-5.153-.132-1.35-.134-2.427-.409-3.36-1.013a7.15 7.15 0 0 1-2.125-2.124C.716 19.62.44 18.544.307 17.194c-.132-1.329-.132-3-.132-5.152v-.084c0-2.152 0-3.823.132-5.152.133-1.35.409-2.427 1.013-3.362A7.15 7.15 0 0 1 3.444 1.32C4.378.716 5.456.44 6.805.307c1.33-.132 3-.132 5.153-.132zM6.953 1.799c-1.234.123-2.043.36-2.695.78A5.65 5.65 0 0 0 2.58 4.26c-.42.65-.657 1.46-.78 2.695C1.676 8.2 1.675 9.797 1.675 12c0 2.203 0 3.8.124 5.046.123 1.235.36 2.044.78 2.696a5.649 5.649 0 0 0 1.68 1.678c.65.421 1.46.658 2.694.78 1.247.124 2.844.125 5.047.125s3.8 0 5.046-.124c1.235-.123 2.044-.36 2.695-.78a5.648 5.648 0 0 0 1.68-1.68c.42-.65.657-1.46.78-2.694.123-1.247.124-2.844.124-5.047s-.001-3.8-.125-5.046c-.122-1.235-.359-2.044-.78-2.695a5.65 5.65 0 0 0-1.679-1.68c-.651-.42-1.46-.657-2.695-.78-1.246-.123-2.843-.124-5.046-.124-2.203 0-3.8 0-5.047.124z";--icon-flickr: "M5.95874 7.92578C3.66131 7.92578 1.81885 9.76006 1.81885 11.9994C1.81885 14.2402 3.66145 16.0744 5.95874 16.0744C8.26061 16.0744 10.1039 14.2396 10.1039 11.9994C10.1039 9.76071 8.26074 7.92578 5.95874 7.92578ZM0.318848 11.9994C0.318848 8.91296 2.85168 6.42578 5.95874 6.42578C9.06906 6.42578 11.6039 8.91232 11.6039 11.9994C11.6039 15.0877 9.06919 17.5744 5.95874 17.5744C2.85155 17.5744 0.318848 15.0871 0.318848 11.9994ZM18.3898 7.92578C16.0878 7.92578 14.2447 9.76071 14.2447 11.9994C14.2447 14.2396 16.088 16.0744 18.3898 16.0744C20.6886 16.0744 22.531 14.2401 22.531 11.9994C22.531 9.76019 20.6887 7.92578 18.3898 7.92578ZM12.7447 11.9994C12.7447 8.91232 15.2795 6.42578 18.3898 6.42578C21.4981 6.42578 24.031 8.91283 24.031 11.9994C24.031 15.0872 21.4982 17.5744 18.3898 17.5744C15.2794 17.5744 12.7447 15.0877 12.7447 11.9994Z";--icon-vk: var(--icon-external-source-placeholder);--icon-evernote: "M9.804 2.27v-.048c.055-.263.313-.562.85-.562h.44c.142 0 .325.014.526.033.066.009.124.023.267.06l.13.032h.002c.319.079.515.275.644.482a1.461 1.461 0 0 1 .16.356l.004.012a.75.75 0 0 0 .603.577l1.191.207a1988.512 1988.512 0 0 0 2.332.402c.512.083 1.1.178 1.665.442.64.3 1.19.795 1.376 1.77.548 2.931.657 5.829.621 8a39.233 39.233 0 0 1-.125 2.602 17.518 17.518 0 0 1-.092.849.735.735 0 0 0-.024.112c-.378 2.705-1.269 3.796-2.04 4.27-.746.457-1.53.451-2.217.447h-.192c-.46 0-1.073-.23-1.581-.635-.518-.412-.763-.87-.763-1.217 0-.45.188-.688.355-.786.161-.095.436-.137.796.087a.75.75 0 1 0 .792-1.274c-.766-.476-1.64-.52-2.345-.108-.7.409-1.098 1.188-1.098 2.08 0 .996.634 1.84 1.329 2.392.704.56 1.638.96 2.515.96l.185.002c.667.009 1.874.025 3.007-.67 1.283-.786 2.314-2.358 2.733-5.276.01-.039.018-.078.022-.105.011-.061.023-.14.034-.23.023-.184.051-.445.079-.772.055-.655.111-1.585.13-2.704.037-2.234-.074-5.239-.647-8.301v-.002c-.294-1.544-1.233-2.391-2.215-2.85-.777-.363-1.623-.496-2.129-.576-.097-.015-.18-.028-.25-.041l-.006-.001-1.99-.345-.761-.132a2.93 2.93 0 0 0-.182-.338A2.532 2.532 0 0 0 12.379.329l-.091-.023a3.967 3.967 0 0 0-.493-.103L11.769.2a7.846 7.846 0 0 0-.675-.04h-.44c-.733 0-1.368.284-1.795.742L2.416 7.431c-.468.428-.751 1.071-.751 1.81 0 .02 0 .041.003.062l.003.034c.017.21.038.468.096.796.107.715.275 1.47.391 1.994.029.13.055.245.075.342l.002.008c.258 1.141.641 1.94.978 2.466.168.263.323.456.444.589a2.808 2.808 0 0 0 .192.194c1.536 1.562 3.713 2.196 5.731 2.08.13-.005.35-.032.537-.073a2.627 2.627 0 0 0 .652-.24c.425-.26.75-.661.992-1.046.184-.294.342-.61.473-.915.197.193.412.357.627.493a5.022 5.022 0 0 0 1.97.709l.023.002.018.003.11.016c.088.014.205.035.325.058l.056.014c.088.022.164.04.235.061a1.736 1.736 0 0 1 .145.048l.03.014c.765.34 1.302 1.09 1.302 1.871a.75.75 0 0 0 1.5 0c0-1.456-.964-2.69-2.18-3.235-.212-.103-.5-.174-.679-.217l-.063-.015a10.616 10.616 0 0 0-.606-.105l-.02-.003-.03-.003h-.002a3.542 3.542 0 0 1-1.331-.485c-.471-.298-.788-.692-.828-1.234a.75.75 0 0 0-1.48-.106l-.001.003-.004.017a8.23 8.23 0 0 1-.092.352 9.963 9.963 0 0 1-.298.892c-.132.34-.29.68-.47.966-.174.276-.339.454-.478.549a1.178 1.178 0 0 1-.221.072 1.949 1.949 0 0 1-.241.036h-.013l-.032.002c-1.684.1-3.423-.437-4.604-1.65a.746.746 0 0 0-.053-.05L4.84 14.6a1.348 1.348 0 0 1-.07-.073 2.99 2.99 0 0 1-.293-.392c-.242-.379-.558-1.014-.778-1.985a54.1 54.1 0 0 0-.083-.376 27.494 27.494 0 0 1-.367-1.872l-.003-.02a6.791 6.791 0 0 1-.08-.67c.004-.277.086-.475.2-.609l.067-.067a.63.63 0 0 1 .292-.145h.05c.18 0 1.095.055 2.013.115l1.207.08.534.037a.747.747 0 0 0 .052.002c.782 0 1.349-.206 1.759-.585l.005-.005c.553-.52.622-1.225.622-1.76V6.24l-.026-.565A774.97 774.97 0 0 1 9.885 4.4c-.042-.961-.081-1.939-.081-2.13ZM4.995 6.953a251.126 251.126 0 0 1 2.102.137l.508.035c.48-.004.646-.122.715-.185.07-.068.146-.209.147-.649l-.024-.548a791.69 791.69 0 0 1-.095-2.187L4.995 6.953Zm16.122 9.996ZM15.638 11.626a.75.75 0 0 0 1.014.31 2.04 2.04 0 0 1 .304-.089 1.84 1.84 0 0 1 .544-.039c.215.023.321.06.37.085.033.016.039.026.047.04a.75.75 0 0 0 1.289-.767c-.337-.567-.906-.783-1.552-.85a3.334 3.334 0 0 0-1.002.062c-.27.056-.531.14-.705.234a.75.75 0 0 0-.31 1.014Z";--icon-box: "M1.01 4.148a.75.75 0 0 1 .75.75v4.348a4.437 4.437 0 0 1 2.988-1.153c1.734 0 3.23.992 3.978 2.438a4.478 4.478 0 0 1 3.978-2.438c2.49 0 4.488 2.044 4.488 4.543 0 2.5-1.999 4.544-4.488 4.544a4.478 4.478 0 0 1-3.978-2.438 4.478 4.478 0 0 1-3.978 2.438C2.26 17.18.26 15.135.26 12.636V4.898a.75.75 0 0 1 .75-.75Zm.75 8.488c0 1.692 1.348 3.044 2.988 3.044s2.989-1.352 2.989-3.044c0-1.691-1.349-3.043-2.989-3.043S1.76 10.945 1.76 12.636Zm10.944-3.043c-1.64 0-2.988 1.352-2.988 3.043 0 1.692 1.348 3.044 2.988 3.044s2.988-1.352 2.988-3.044c0-1.69-1.348-3.043-2.988-3.043Zm4.328-1.23a.75.75 0 0 1 1.052.128l2.333 2.983 2.333-2.983a.75.75 0 0 1 1.181.924l-2.562 3.277 2.562 3.276a.75.75 0 1 1-1.181.924l-2.333-2.983-2.333 2.983a.75.75 0 1 1-1.181-.924l2.562-3.276-2.562-3.277a.75.75 0 0 1 .129-1.052Z";--icon-onedrive: "M13.616 4.147a7.689 7.689 0 0 0-7.642 3.285A6.299 6.299 0 0 0 1.455 17.3c.684.894 2.473 2.658 5.17 2.658h12.141c.95 0 1.882-.256 2.697-.743.815-.486 1.514-1.247 1.964-2.083a5.26 5.26 0 0 0-3.713-7.612 7.69 7.69 0 0 0-6.098-5.373ZM3.34 17.15c.674.63 1.761 1.308 3.284 1.308h12.142a3.76 3.76 0 0 0 2.915-1.383l-7.494-4.489L3.34 17.15Zm10.875-6.25 2.47-1.038a5.239 5.239 0 0 1 1.427-.389 6.19 6.19 0 0 0-10.3-1.952 6.338 6.338 0 0 1 2.118.813l4.285 2.567Zm4.55.033c-.512 0-1.019.104-1.489.307l-.006.003-1.414.594 6.521 3.906a3.76 3.76 0 0 0-3.357-4.8l-.254-.01ZM4.097 9.617A4.799 4.799 0 0 1 6.558 8.9c.9 0 1.84.25 2.587.713l3.4 2.037-10.17 4.28a4.799 4.799 0 0 1 1.721-6.312Z";--icon-huddle: "M6.204 2.002c-.252.23-.357.486-.357.67V21.07c0 .15.084.505.313.812.208.28.499.477.929.477.519 0 .796-.174.956-.365.178-.212.286-.535.286-.924v-.013l.117-6.58c.004-1.725 1.419-3.883 3.867-3.883 1.33 0 2.332.581 2.987 1.364.637.762.95 1.717.95 2.526v6.47c0 .392.11.751.305.995.175.22.468.41 1.008.41.52 0 .816-.198 1.002-.437.207-.266.31-.633.31-.969V14.04c0-2.81-1.943-5.108-4.136-5.422a5.971 5.971 0 0 0-3.183.41c-.912.393-1.538.96-1.81 1.489a.75.75 0 0 1-1.417-.344v-7.5c0-.587-.47-1.031-1.242-1.031-.315 0-.638.136-.885.36ZM5.194.892A2.844 2.844 0 0 1 7.09.142c1.328 0 2.742.867 2.742 2.53v5.607a6.358 6.358 0 0 1 1.133-.629 7.47 7.47 0 0 1 3.989-.516c3.056.436 5.425 3.482 5.425 6.906v6.914c0 .602-.177 1.313-.627 1.89-.47.605-1.204 1.016-2.186 1.016-.96 0-1.698-.37-2.179-.973-.46-.575-.633-1.294-.633-1.933v-6.469c0-.456-.19-1.071-.602-1.563-.394-.471-.986-.827-1.836-.827-1.447 0-2.367 1.304-2.367 2.39v.014l-.117 6.58c-.001.64-.177 1.333-.637 1.881-.48.57-1.2.9-2.105.9-.995 0-1.7-.5-2.132-1.081-.41-.552-.61-1.217-.61-1.708V2.672c0-.707.366-1.341.847-1.78Z"}:where(.lr-wgt-l10n_en-US,.lr-wgt-common),:host{--l10n-locale-name: "en-US";--l10n-upload-file: "Upload file";--l10n-upload-files: "Upload files";--l10n-choose-file: "Choose file";--l10n-choose-files: "Choose files";--l10n-drop-files-here: "Drop files here";--l10n-select-file-source: "Select file source";--l10n-selected: "Selected";--l10n-upload: "Upload";--l10n-add-more: "Add more";--l10n-cancel: "Cancel";--l10n-start-from-cancel: var(--l10n-cancel);--l10n-clear: "Clear";--l10n-camera-shot: "Shot";--l10n-upload-url: "Import";--l10n-upload-url-placeholder: "Paste link here";--l10n-edit-image: "Edit image";--l10n-edit-detail: "Details";--l10n-back: "Back";--l10n-done: "Done";--l10n-ok: "Ok";--l10n-remove-from-list: "Remove";--l10n-no: "No";--l10n-yes: "Yes";--l10n-confirm-your-action: "Confirm your action";--l10n-are-you-sure: "Are you sure?";--l10n-selected-count: "Selected:";--l10n-upload-error: "Upload error";--l10n-validation-error: "Validation error";--l10n-no-files: "No files selected";--l10n-browse: "Browse";--l10n-not-uploaded-yet: "Not uploaded yet...";--l10n-file__one: "file";--l10n-file__other: "files";--l10n-error__one: "error";--l10n-error__other: "errors";--l10n-header-uploading: "Uploading {{count}} {{plural:file(count)}}";--l10n-header-failed: "{{count}} {{plural:error(count)}}";--l10n-header-succeed: "{{count}} {{plural:file(count)}} uploaded";--l10n-header-total: "{{count}} {{plural:file(count)}} selected";--l10n-src-type-local: "From device";--l10n-src-type-from-url: "From link";--l10n-src-type-camera: "Camera";--l10n-src-type-draw: "Draw";--l10n-src-type-facebook: "Facebook";--l10n-src-type-dropbox: "Dropbox";--l10n-src-type-gdrive: "Google Drive";--l10n-src-type-gphotos: "Google Photos";--l10n-src-type-instagram: "Instagram";--l10n-src-type-flickr: "Flickr";--l10n-src-type-vk: "VK";--l10n-src-type-evernote: "Evernote";--l10n-src-type-box: "Box";--l10n-src-type-onedrive: "Onedrive";--l10n-src-type-huddle: "Huddle";--l10n-src-type-other: "Other";--l10n-src-type: var(--l10n-src-type-local);--l10n-caption-from-url: "Import from link";--l10n-caption-camera: "Camera";--l10n-caption-draw: "Draw";--l10n-caption-edit-file: "Edit file";--l10n-file-no-name: "No name...";--l10n-toggle-fullscreen: "Toggle fullscreen";--l10n-toggle-guides: "Toggle guides";--l10n-rotate: "Rotate";--l10n-flip-vertical: "Flip vertical";--l10n-flip-horizontal: "Flip horizontal";--l10n-brightness: "Brightness";--l10n-contrast: "Contrast";--l10n-saturation: "Saturation";--l10n-resize: "Resize image";--l10n-crop: "Crop";--l10n-select-color: "Select color";--l10n-text: "Text";--l10n-draw: "Draw";--l10n-cancel-edit: "Cancel edit";--l10n-tab-view: "Preview";--l10n-tab-details: "Details";--l10n-file-name: "Name";--l10n-file-size: "Size";--l10n-cdn-url: "CDN URL";--l10n-file-size-unknown: "Unknown";--l10n-camera-permissions-denied: "Camera access denied";--l10n-camera-permissions-prompt: "Please allow access to the camera";--l10n-camera-permissions-request: "Request access";--l10n-files-count-limit-error-title: "Files count limit overflow";--l10n-files-count-limit-error-too-few: "You\2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.";--l10n-files-count-limit-error-too-many: "You\2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.";--l10n-files-max-size-limit-error: "File is too big. Max file size is {{maxFileSize}}.";--l10n-has-validation-errors: "File validation error ocurred. Please, check your files before upload.";--l10n-images-only-accepted: "Only image files are accepted.";--l10n-file-type-not-allowed: "Uploading of these file types is not allowed.";--l10n-some-files-were-not-uploaded: "Some files were not uploaded."}:where(.lr-wgt-theme,.lr-wgt-common),:host{--darkmode: 0;--h-foreground: 208;--s-foreground: 4%;--l-foreground: calc(10% + 78% * var(--darkmode));--h-background: 208;--s-background: 4%;--l-background: calc(97% - 85% * var(--darkmode));--h-accent: 211;--s-accent: 100%;--l-accent: calc(50% - 5% * var(--darkmode));--h-confirm: 137;--s-confirm: 85%;--l-confirm: 53%;--h-error: 358;--s-error: 100%;--l-error: 66%;--shadows: 1;--h-shadow: 0;--s-shadow: 0%;--l-shadow: 0%;--opacity-normal: .6;--opacity-hover: .9;--opacity-active: 1;--ui-size: 32px;--gap-min: 2px;--gap-small: 4px;--gap-mid: 10px;--gap-max: 20px;--gap-table: 0px;--borders: 1;--border-radius-element: 8px;--border-radius-frame: 12px;--border-radius-thumb: 6px;--transition-duration: .2s;--modal-max-w: 800px;--modal-max-h: 600px;--modal-normal-w: 430px;--darkmode-minus: calc(1 + var(--darkmode) * -2);--clr-background: hsl(var(--h-background), var(--s-background), var(--l-background));--clr-background-dark: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-background-light: hsl( var(--h-background), var(--s-background), calc(var(--l-background) + 3% * var(--darkmode-minus)) );--clr-accent: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 15% * var(--darkmode)));--clr-accent-light: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 30%);--clr-accent-lightest: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 10%);--clr-accent-light-opaque: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 45% * var(--darkmode-minus)));--clr-accent-lightest-opaque: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) + 47% * var(--darkmode-minus)) );--clr-confirm: hsl(var(--h-confirm), var(--s-confirm), var(--l-confirm));--clr-error: hsl(var(--h-error), var(--s-error), var(--l-error));--clr-error-light: hsla(var(--h-error), var(--s-error), var(--l-error), 15%);--clr-error-lightest: hsla(var(--h-error), var(--s-error), var(--l-error), 5%);--clr-error-message-bgr: hsl(var(--h-error), var(--s-error), calc(var(--l-error) + 31% * var(--darkmode-minus)));--clr-txt: hsl(var(--h-foreground), var(--s-foreground), var(--l-foreground));--clr-txt-mid: hsl(var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 20% * var(--darkmode-minus)));--clr-txt-light: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 30% * var(--darkmode-minus)) );--clr-txt-lightest: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 50% * var(--darkmode-minus)) );--clr-shade-lv1: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 5%);--clr-shade-lv2: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 8%);--clr-shade-lv3: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 12%);--clr-generic-file-icon: var(--clr-txt-lightest);--border-light: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.1 - .05 * var(--darkmode)) * var(--borders)) );--border-mid: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.2 - .1 * var(--darkmode)) * var(--borders)) );--border-accent: 1px solid hsla(var(--h-accent), var(--s-accent), var(--l-accent), 1 * var(--borders));--border-dashed: 1px dashed hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), calc(.2 * var(--borders)));--clr-curtain: hsla(var(--h-background), var(--s-background), calc(var(--l-background)), 60%);--hsl-shadow: var(--h-shadow), var(--s-shadow), var(--l-shadow);--modal-shadow: 0px 0px 1px hsla(var(--hsl-shadow), calc((.3 + .65 * var(--darkmode)) * var(--shadows))), 0px 6px 20px hsla(var(--hsl-shadow), calc((.1 + .4 * var(--darkmode)) * var(--shadows)));--clr-btn-bgr-primary: var(--clr-accent);--clr-btn-bgr-primary-hover: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 4% * var(--darkmode-minus)) );--clr-btn-bgr-primary-active: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 8% * var(--darkmode-minus)) );--clr-btn-txt-primary: hsl(var(--h-accent), var(--s-accent), 98%);--shadow-btn-primary: none;--clr-btn-bgr-secondary: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-hover: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 7% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-active: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 12% * var(--darkmode-minus)) );--clr-btn-txt-secondary: var(--clr-txt-mid);--shadow-btn-secondary: none;--clr-btn-bgr-disabled: var(--clr-background);--clr-btn-txt-disabled: var(--clr-txt-lightest);--shadow-btn-disabled: none}@media only screen and (max-height: 600px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-h: 100%}}@media only screen and (max-width: 430px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-w: 100vw;--modal-max-h: var(--uploadcare-blocks-window-height)}}:where(.lr-wgt-theme,.lr-wgt-common),:host{color:var(--clr-txt);font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}:where(.lr-wgt-theme,.lr-wgt-common) *,:host *{box-sizing:border-box}:where(.lr-wgt-theme,.lr-wgt-common) [hidden],:host [hidden]{display:none!important}:where(.lr-wgt-theme,.lr-wgt-common) [activity]:not([active]),:host [activity]:not([active]){display:none}:where(.lr-wgt-theme,.lr-wgt-common) dialog:not([open]) [activity],:host dialog:not([open]) [activity]{display:none}:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{display:flex;align-items:center;justify-content:center;height:var(--ui-size);padding-right:1.4em;padding-left:1.4em;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--border-radius-element);cursor:pointer;user-select:none}@media only screen and (max-width: 800px){:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{padding-right:1em;padding-left:1em}}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn,:host button.primary-btn{color:var(--clr-btn-txt-primary);background-color:var(--clr-btn-bgr-primary);box-shadow:var(--shadow-btn-primary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:hover,:host button.primary-btn:hover{background-color:var(--clr-btn-bgr-primary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:active,:host button.primary-btn:active{background-color:var(--clr-btn-bgr-primary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn,:host button.secondary-btn{color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:hover,:host button.secondary-btn:hover{background-color:var(--clr-btn-bgr-secondary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:active,:host button.secondary-btn:active{background-color:var(--clr-btn-bgr-secondary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn,:host button.mini-btn{width:var(--ui-size);height:var(--ui-size);padding:0;background-color:transparent;border:none;cursor:pointer;transition:var(--transition-duration) ease;color:var(--clr-txt)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:hover,:host button.mini-btn:hover{background-color:var(--clr-shade-lv1)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:active,:host button.mini-btn:active{background-color:var(--clr-shade-lv2)}:where(.lr-wgt-theme,.lr-wgt-common) :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]),:host :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]){color:var(--clr-btn-txt-disabled);background-color:var(--clr-btn-bgr-disabled);box-shadow:var(--shadow-btn-disabled);pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) a,:host a{color:var(--clr-accent);text-decoration:none}:where(.lr-wgt-theme,.lr-wgt-common) a[disabled],:host a[disabled]{pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]{display:flex;width:100%;height:var(--ui-size);padding-right:.6em;padding-left:.6em;color:var(--clr-txt);font-size:1em;font-family:inherit;background-color:var(--clr-background-light);border:var(--border-light);border-radius:var(--border-radius-element);transition:var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]::placeholder{color:var(--clr-txt-lightest)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:hover,:host input[type=text]:hover{border-color:var(--clr-accent-light)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:focus,:host input[type=text]:focus{border-color:var(--clr-accent);outline:none}:where(.lr-wgt-theme,.lr-wgt-common) input[disabled],:host input[disabled]{opacity:.6;pointer-events:none}lr-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-size);height:var(--ui-size)}lr-icon svg{width:calc(var(--ui-size) / 2);height:calc(var(--ui-size) / 2)}lr-icon:not([raw]) path{fill:currentColor}lr-tabs{display:grid;grid-template-rows:min-content minmax(var(--ui-size),auto);height:100%;overflow:hidden;color:var(--clr-txt-lightest)}lr-tabs>.tabs-row{display:flex;grid-template-columns:minmax();background-color:var(--clr-background-light)}lr-tabs>.tabs-context{overflow-y:auto}lr-tabs .tabs-row>.tab{display:flex;flex-grow:1;align-items:center;justify-content:center;height:var(--ui-size);border-bottom:var(--border-light);cursor:pointer;transition:var(--transition-duration)}lr-tabs .tabs-row>.tab[current]{color:var(--clr-txt);border-color:var(--clr-txt)}lr-range{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--ui-size)}lr-range datalist{display:none}lr-range input{width:100%;height:100%;opacity:0}lr-range .track-wrapper{position:absolute;right:10px;left:10px;display:flex;align-items:center;justify-content:center;height:2px;user-select:none;pointer-events:none}lr-range .track{position:absolute;right:0;left:0;display:flex;align-items:center;justify-content:center;height:2px;background-color:currentColor;border-radius:2px;opacity:.5}lr-range .slider{position:absolute;width:16px;height:16px;background-color:currentColor;border-radius:100%;transform:translate(-50%)}lr-range .bar{position:absolute;left:0;height:100%;background-color:currentColor;border-radius:2px}lr-range .caption{position:absolute;display:inline-flex;justify-content:center}lr-color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--ui-size);height:var(--ui-size);overflow:hidden;background-color:var(--clr-background);cursor:pointer}lr-color[current]{background-color:var(--clr-txt)}lr-color input[type=color]{position:absolute;display:block;width:100%;height:100%;opacity:0}lr-color .current-color{position:absolute;width:50%;height:50%;border:2px solid #fff;border-radius:100%;pointer-events:none}lr-config{display:none}lr-simple-btn{position:relative;display:inline-flex}lr-simple-btn button{padding-left:.2em!important;color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary)}lr-simple-btn button lr-icon svg{transform:scale(.8)}lr-simple-btn button:hover{background-color:var(--clr-btn-bgr-secondary-hover)}lr-simple-btn button:active{background-color:var(--clr-btn-bgr-secondary-active)}lr-simple-btn>lr-drop-area{display:contents}lr-simple-btn .visual-drop-area{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--gap-min);border:var(--border-dashed);border-radius:inherit;opacity:0;transition:border-color var(--transition-duration) ease,background-color var(--transition-duration) ease,opacity var(--transition-duration) ease}lr-simple-btn .visual-drop-area:before{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--clr-txt-light);background-color:var(--clr-background);border-radius:inherit;content:var(--l10n-drop-files-here)}lr-simple-btn>lr-drop-area[drag-state=active] .visual-drop-area{background-color:var(--clr-accent-lightest);opacity:1}lr-simple-btn>lr-drop-area[drag-state=inactive] .visual-drop-area{background-color:var(--clr-shade-lv1);opacity:0}lr-simple-btn>lr-drop-area[drag-state=near] .visual-drop-area{background-color:var(--clr-accent-lightest);border-color:var(--clr-accent-light);opacity:1}lr-simple-btn>lr-drop-area[drag-state=over] .visual-drop-area{background-color:var(--clr-accent-lightest);border-color:var(--clr-accent);opacity:1}lr-simple-btn>:where(lr-drop-area[drag-state=active],lr-drop-area[drag-state=near],lr-drop-area[drag-state=over]) button{box-shadow:none}lr-simple-btn>lr-drop-area:after{content:""}lr-source-btn{display:flex;align-items:center;margin-bottom:var(--gap-min);padding:var(--gap-min) var(--gap-mid);color:var(--clr-txt-mid);border-radius:var(--border-radius-element);cursor:pointer;transition-duration:var(--transition-duration);transition-property:background-color,color;user-select:none}lr-source-btn:hover{color:var(--clr-accent);background-color:var(--clr-accent-lightest)}lr-source-btn:active{color:var(--clr-accent);background-color:var(--clr-accent-light)}lr-source-btn lr-icon{display:inline-flex;flex-grow:1;justify-content:center;min-width:var(--ui-size);margin-right:var(--gap-mid);opacity:.8}lr-source-btn[type=local]>.txt:after{content:var(--l10n-local-files)}lr-source-btn[type=camera]>.txt:after{content:var(--l10n-camera)}lr-source-btn[type=url]>.txt:after{content:var(--l10n-from-url)}lr-source-btn[type=other]>.txt:after{content:var(--l10n-other)}lr-source-btn .txt{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--ui-size);padding:0;white-space:nowrap;border:none}lr-drop-area{padding:var(--gap-min);overflow:hidden;border:var(--border-dashed);border-radius:var(--border-radius-frame);transition:var(--transition-duration) ease}lr-drop-area,lr-drop-area .content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}lr-drop-area .text{position:relative;margin:var(--gap-mid);color:var(--clr-txt-light);transition:var(--transition-duration) ease}lr-drop-area[ghost][drag-state=inactive]{display:none;opacity:0}lr-drop-area[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--clr-background)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.text,.icon-container){color:var(--clr-accent)}lr-drop-area:is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--clr-accent);background:var(--clr-accent-lightest);border-color:var(--clr-accent-light)}lr-drop-area:is([drag-state=active],[drag-state=near]){opacity:1}lr-drop-area[drag-state=over]{border-color:var(--clr-accent);opacity:1}lr-drop-area[with-icon]{min-height:calc(var(--ui-size) * 6)}lr-drop-area[with-icon] .content-wrapper{display:flex;flex-direction:column}lr-drop-area[with-icon] .text{color:var(--clr-txt);font-weight:500;font-size:1.1em}lr-drop-area[with-icon] .icon-container{position:relative;width:calc(var(--ui-size) * 2);height:calc(var(--ui-size) * 2);margin:var(--gap-mid);overflow:hidden;color:var(--clr-txt);background-color:var(--clr-background);border-radius:50%;transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon{position:absolute;top:calc(50% - var(--ui-size) / 2);left:calc(50% - var(--ui-size) / 2);transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon:last-child{transform:translateY(calc(var(--ui-size) * 1.5))}lr-drop-area[with-icon]:hover .icon-container,lr-drop-area[with-icon]:hover .text{color:var(--clr-accent)}lr-drop-area[with-icon]:hover .icon-container{background-color:var(--clr-accent-lightest)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .icon-container{color:#fff;background-color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .text{color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:last-child{transform:translateY(0)}lr-drop-area[with-icon]>.content-wrapper[drag-state=near] lr-icon:last-child{transform:scale(1.3)}lr-drop-area[with-icon]>.content-wrapper[drag-state=over] lr-icon:last-child{transform:scale(1.5)}lr-drop-area[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--gap-mid) * 2);height:calc(100vh - var(--gap-mid) * 2);margin:var(--gap-mid)}lr-drop-area[fullscreen] .content-wrapper{width:100%;max-width:calc(var(--modal-normal-w) * .8);height:calc(var(--ui-size) * 6);color:var(--clr-txt);background-color:var(--clr-background-light);border-radius:var(--border-radius-frame);box-shadow:var(--modal-shadow);transition:var(--transition-duration) ease}lr-drop-area[with-icon][fullscreen][drag-state=active]>.content-wrapper,lr-drop-area[with-icon][fullscreen][drag-state=near]>.content-wrapper{transform:translateY(var(--gap-mid));opacity:0}lr-drop-area[with-icon][fullscreen][drag-state=over]>.content-wrapper{transform:translateY(0);opacity:1}:is(lr-drop-area[with-icon][fullscreen])>.content-wrapper lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[clickable]{cursor:pointer}lr-modal{--modal-max-content-height: calc(var(--uploadcare-blocks-window-height, 100vh) - 4 * var(--gap-mid) - var(--ui-size));--modal-content-height-fill: var(--uploadcare-blocks-window-height, 100vh)}lr-modal[dialog-fallback]{--lr-z-max: 2147483647;position:fixed;z-index:var(--lr-z-max);display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;pointer-events:none;inset:0}lr-modal[dialog-fallback] dialog[open]{z-index:var(--lr-z-max);pointer-events:auto}lr-modal[dialog-fallback] dialog[open]+.backdrop{position:fixed;top:0;left:0;z-index:calc(var(--lr-z-max) - 1);align-items:center;justify-content:center;width:100vw;height:100vh;background-color:var(--clr-curtain);pointer-events:auto}lr-modal[strokes][dialog-fallback] dialog[open]+.backdrop{background-image:var(--modal-backdrop-background-image)}@supports selector(dialog::backdrop){lr-modal>dialog::backdrop{background-color:#0000001a}lr-modal[strokes]>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}lr-modal>dialog[open]{transform:translateY(0);visibility:visible;opacity:1}lr-modal>dialog:not([open]){transform:translateY(20px);visibility:hidden;opacity:0}lr-modal>dialog{display:flex;flex-direction:column;width:max-content;max-width:min(calc(100% - var(--gap-mid) * 2),calc(var(--modal-max-w) - var(--gap-mid) * 2));min-height:var(--ui-size);max-height:calc(var(--modal-max-h) - var(--gap-mid) * 2);margin:auto;padding:0;overflow:hidden;background-color:var(--clr-background-light);border:0;border-radius:var(--border-radius-frame);box-shadow:var(--modal-shadow);transition:transform calc(var(--transition-duration) * 2)}@media only screen and (max-width: 430px),only screen and (max-height: 600px){lr-modal>dialog>.content{height:var(--modal-max-content-height)}}lr-url-source{display:block;background-color:var(--clr-background-light)}lr-modal lr-url-source{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2))}lr-url-source>.content{display:grid;grid-gap:var(--gap-small);grid-template-columns:1fr min-content;padding:var(--gap-mid);padding-top:0}lr-url-source .url-input{display:flex}lr-url-source .url-upload-btn:after{content:var(--l10n-upload-url)}lr-camera-source{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden;background-color:var(--clr-background-light);border-radius:var(--border-radius-element)}lr-modal lr-camera-source{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:100vh;max-height:var(--modal-max-content-height)}lr-camera-source.initialized{height:max-content}@media only screen and (max-width: 430px){lr-camera-source{width:calc(100vw - var(--gap-mid) * 2);height:var(--modal-content-height-fill, 100%)}}lr-camera-source video{display:block;width:100%;max-height:100%;object-fit:contain;object-position:center center;background-color:var(--clr-background-dark);border-radius:var(--border-radius-element)}lr-camera-source .toolbar{position:absolute;bottom:0;display:flex;justify-content:space-between;width:100%;padding:var(--gap-mid);background-color:var(--clr-background-light)}lr-camera-source .content{display:flex;flex:1;justify-content:center;width:100%;padding:var(--gap-mid);padding-top:0;overflow:hidden}lr-camera-source .message-box{--padding: calc(var(--gap-max) * 2);display:flex;flex-direction:column;grid-gap:var(--gap-max);align-items:center;justify-content:center;padding:var(--padding) var(--padding) 0 var(--padding);color:var(--clr-txt)}lr-camera-source .message-box button{color:var(--clr-btn-txt-primary);background-color:var(--clr-btn-bgr-primary)}lr-camera-source .shot-btn{position:absolute;bottom:var(--gap-max);width:calc(var(--ui-size) * 1.8);height:calc(var(--ui-size) * 1.8);color:var(--clr-background-light);background-color:var(--clr-txt);border-radius:50%;opacity:.85;transition:var(--transition-duration) ease}lr-camera-source .shot-btn:hover{transform:scale(1.05);opacity:1}lr-camera-source .shot-btn:active{background-color:var(--clr-txt-mid);opacity:1}lr-camera-source .shot-btn[disabled]{bottom:calc(var(--gap-max) * -1 - var(--gap-mid) - var(--ui-size) * 2)}lr-camera-source .shot-btn lr-icon svg{width:calc(var(--ui-size) / 1.5);height:calc(var(--ui-size) / 1.5)}lr-external-source{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--clr-background-light);overflow:hidden}lr-modal lr-external-source{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height)}lr-external-source>.content{position:relative;display:grid;flex:1;grid-template-rows:1fr min-content}@media only screen and (max-width: 430px){lr-external-source{width:calc(100vw - var(--gap-mid) * 2);height:var(--modal-content-height-fill, 100%)}}lr-external-source iframe{display:block;width:100%;height:100%;border:none}lr-external-source .iframe-wrapper{overflow:hidden}lr-external-source .toolbar{display:grid;grid-gap:var(--gap-mid);grid-template-columns:max-content 1fr max-content max-content;align-items:center;width:100%;padding:var(--gap-mid);border-top:var(--border-light)}lr-external-source .back-btn{padding-left:0}lr-external-source .back-btn:after{content:var(--l10n-back)}lr-external-source .selected-counter{display:flex;grid-gap:var(--gap-mid);align-items:center;justify-content:space-between;padding:var(--gap-mid);color:var(--clr-txt-light)}lr-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--clr-background-light);transition:opacity var(--transition-duration)}lr-modal lr-upload-list{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:max-content;max-height:var(--modal-max-content-height)}lr-upload-list .no-files{height:var(--ui-size);padding:var(--gap-max)}lr-upload-list .files{display:block;flex:1;min-height:var(--ui-size);padding:0 var(--gap-mid);overflow:auto}lr-upload-list .toolbar{display:flex;gap:var(--gap-small);justify-content:space-between;padding:var(--gap-mid);background-color:var(--clr-background-light)}lr-upload-list .toolbar .add-more-btn{padding-left:.2em}lr-upload-list .toolbar-spacer{flex:1}lr-upload-list lr-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--gap-mid) * 2);height:calc(100% - var(--gap-mid) * 2);margin:var(--gap-mid);border-radius:var(--border-radius-element)}lr-upload-list lr-activity-header>.header-text{padding:0 var(--gap-mid)}lr-upload-list .common-error{border-radius:var(--border-radius-element);color:var(--clr-error);background-color:var(--clr-error-message-bgr);display:flex;align-items:center;justify-content:center;padding:var(--gap-mid);margin:var(--gap-small) var(--gap-mid) 0 var(--gap-mid);font-size:.95em}lr-start-from{display:block;overflow-y:auto}lr-start-from .content{display:grid;grid-auto-flow:row;gap:var(--gap-max);width:100%;height:100%;padding:var(--gap-max);background-color:var(--clr-background-light)}lr-modal lr-start-from{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2))}lr-file-item{display:block}lr-file-item>.inner{position:relative;display:grid;grid-template-columns:32px 1fr max-content;gap:var(--gap-min);align-items:center;margin-bottom:var(--gap-small);padding:var(--gap-mid);overflow:hidden;font-size:.95em;background-color:var(--clr-background);border-radius:var(--border-radius-element);transition:var(--transition-duration)}lr-file-item:last-of-type>.inner{margin-bottom:0}lr-file-item>.inner[focused]{background-color:transparent}lr-file-item>.inner[uploading] .edit-btn{display:none}lr-file-item>:where(.inner[failed],.inner[limit-overflow]){background-color:var(--clr-error-lightest)}lr-file-item .thumb{position:relative;display:inline-flex;width:var(--ui-size);height:var(--ui-size);background-color:var(--clr-shade-lv1);background-position:center center;background-size:cover;border-radius:var(--border-radius-thumb)}lr-file-item .file-name-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--gap-mid);padding-left:var(--gap-mid);overflow:hidden;color:var(--clr-txt-light);transition:color var(--transition-duration)}lr-file-item .file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}lr-file-item .file-error{display:none;color:var(--clr-error);font-size:.85em;line-height:130%}lr-file-item button.remove-btn,lr-file-item button.edit-btn{color:var(--clr-txt-lightest)!important}lr-file-item button.upload-btn{display:none}lr-file-item button:hover{color:var(--clr-txt-light)}lr-file-item .badge{position:absolute;top:calc(var(--ui-size) * -.13);right:calc(var(--ui-size) * -.13);width:calc(var(--ui-size) * .44);height:calc(var(--ui-size) * .44);color:var(--clr-background-light);background-color:var(--clr-txt);border-radius:50%;transform:scale(.3);opacity:0;transition:var(--transition-duration) ease;display:flex;justify-content:center;align-items:center}lr-file-item>.inner:where([failed],[limit-overflow],[finished]) .badge{transform:scale(1);opacity:1}lr-file-item>.inner[finished] .badge{background-color:var(--clr-confirm)}lr-file-item>.inner:where([failed],[limit-overflow]) .badge{background-color:var(--clr-error)}lr-file-item>.inner:where([failed],[limit-overflow]) .file-error{display:block}lr-file-item .badge lr-icon,lr-file-item .badge lr-icon svg{width:100%;height:100%}lr-file-item .progress-bar{top:calc(100% - 2px);height:2px}lr-file-item .file-actions{display:flex;gap:var(--gap-min);align-items:center;justify-content:center}lr-upload-details{display:flex;flex-direction:column;width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height);overflow:hidden;background-color:var(--clr-background-light)}lr-upload-details>.content{position:relative;display:grid;flex:1;grid-template-rows:auto min-content}lr-upload-details lr-tabs .tabs-context{position:relative}lr-upload-details .toolbar{display:grid;grid-template-columns:min-content min-content 1fr min-content;gap:var(--gap-mid);padding:var(--gap-mid);border-top:var(--border-light)}lr-upload-details .toolbar[edit-disabled]{display:flex;justify-content:space-between}lr-upload-details .remove-btn{padding-left:.5em}lr-upload-details .detail-btn{padding-left:0;color:var(--clr-txt);background-color:var(--clr-background)}lr-upload-details .edit-btn{padding-left:.5em}lr-upload-details .details{padding:var(--gap-max)}lr-upload-details .info-block{padding-top:var(--gap-max);padding-bottom:calc(var(--gap-max) + var(--gap-table));color:var(--clr-txt);border-bottom:var(--border-light)}lr-upload-details .info-block:first-of-type{padding-top:0}lr-upload-details .info-block:last-of-type{border-bottom:none}lr-upload-details .info-block>.info-block_name{margin-bottom:.4em;color:var(--clr-txt-light);font-size:.8em}lr-upload-details .cdn-link[disabled]{pointer-events:none}lr-upload-details .cdn-link[disabled]:before{filter:grayscale(1);content:var(--l10n-not-uploaded-yet)}lr-file-preview{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}lr-file-preview>lr-img{display:contents}lr-file-preview>lr-img>.img-view{position:absolute;inset:0;width:100%;max-width:100%;height:100%;max-height:100%;object-fit:scale-down}lr-confirmation-dialog{display:block;padding:var(--gap-mid);padding-top:var(--gap-max)}lr-confirmation-dialog .message{display:flex;justify-content:center;padding:var(--gap-mid);padding-bottom:var(--gap-max);font-weight:500;font-size:1.1em}lr-confirmation-dialog .toolbar{display:grid;grid-template-columns:1fr 1fr;gap:var(--gap-mid);margin-top:var(--gap-mid)}lr-progress-bar-common{position:fixed;right:0;bottom:0;left:0;z-index:10000;display:block;height:var(--gap-mid);background-color:var(--clr-background);transition:opacity .3s}lr-progress-bar-common:not([active]){opacity:0;pointer-events:none}lr-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}lr-progress-bar .progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--clr-accent-light);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}lr-progress-bar .progress--hidden{opacity:0}lr-activity-header{display:flex;gap:var(--gap-mid);justify-content:space-between;padding:var(--gap-mid);color:var(--clr-txt);font-weight:500;font-size:1em;line-height:var(--ui-size)}lr-activity-header lr-icon{height:var(--ui-size)}lr-activity-header>*{display:flex;align-items:center}lr-activity-header button{display:inline-flex;align-items:center;justify-content:center;color:var(--clr-txt-mid)}lr-activity-header button:hover{background-color:var(--clr-background)}lr-activity-header button:active{background-color:var(--clr-background-dark)}lr-copyright{display:flex;align-items:flex-end}lr-copyright .credits{padding:0 var(--gap-mid) var(--gap-mid) calc(var(--gap-mid) * 1.5);color:var(--clr-txt-lightest);font-weight:400;font-size:.85em;opacity:.7;transition:var(--transition-duration) ease}lr-copyright .credits:hover{opacity:1}:host(.lr-cloud-image-editor) lr-icon,.lr-cloud-image-editor lr-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:host(.lr-cloud-image-editor) lr-icon svg,.lr-cloud-image-editor lr-icon svg{width:unset;height:unset}:host(.lr-cloud-image-editor) lr-icon:not([raw]) path,.lr-cloud-image-editor lr-icon:not([raw]) path{stroke-linejoin:round;fill:none;stroke:currentColor;stroke-width:1.2}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--icon-rotate: "M13.5.399902L12 1.9999l1.5 1.6M12.0234 2H14.4C16.3882 2 18 3.61178 18 5.6V8M4 17h9c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44771-1 1v9c0 .5523.44771 1 1 1z";--icon-mirror: "M5.00042.399902l-1.5 1.599998 1.5 1.6M15.0004.399902l1.5 1.599998-1.5 1.6M3.51995 2H16.477M8.50042 16.7V6.04604c0-.30141-.39466-.41459-.5544-.159L1.28729 16.541c-.12488.1998.01877.459.2544.459h6.65873c.16568 0 .3-.1343.3-.3zm2.99998 0V6.04604c0-.30141.3947-.41459.5544-.159L18.7135 16.541c.1249.1998-.0187.459-.2544.459h-6.6587c-.1657 0-.3-.1343-.3-.3z";--icon-flip: "M19.6001 4.99993l-1.6-1.5-1.6 1.5m3.2 9.99997l-1.6 1.5-1.6-1.5M18 3.52337V16.4765M3.3 8.49993h10.654c.3014 0 .4146-.39466.159-.5544L3.459 1.2868C3.25919 1.16192 3 1.30557 3 1.5412v6.65873c0 .16568.13432.3.3.3zm0 2.99997h10.654c.3014 0 .4146.3947.159.5544L3.459 18.7131c-.19981.1248-.459-.0188-.459-.2544v-6.6588c0-.1657.13432-.3.3-.3z";--icon-sad: "M2 17c4.41828-4 11.5817-4 16 0M16.5 5c0 .55228-.4477 1-1 1s-1-.44772-1-1 .4477-1 1-1 1 .44772 1 1zm-11 0c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z";--icon-closeMax: "M3 3l14 14m0-14L3 17";--icon-crop: "M20 14H7.00513C6.45001 14 6 13.55 6 12.9949V0M0 6h13.0667c.5154 0 .9333.41787.9333.93333V20M14.5.399902L13 1.9999l1.5 1.6M13 2h2c1.6569 0 3 1.34315 3 3v2M5.5 19.5999l1.5-1.6-1.5-1.6M7 18H5c-1.65685 0-3-1.3431-3-3v-2";--icon-tuning: "M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4M12 4.5a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0M5 10a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0M12 15.5a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0";--icon-filters: "M4.5 6.5a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0m-3.5 6a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0m7 0a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0";--icon-done: "M1 10.6316l5.68421 5.6842L19 4";--icon-original: "M0 40L40-.00000133";--icon-slider: "M0 10h11m0 0c0 1.1046.8954 2 2 2s2-.8954 2-2m-4 0c0-1.10457.8954-2 2-2s2 .89543 2 2m0 0h5";--icon-exposure: "M10 20v-3M2.92946 2.92897l2.12132 2.12132M0 10h3m-.07054 7.071l2.12132-2.1213M10 0v3m7.0705 14.071l-2.1213-2.1213M20 10h-3m.0705-7.07103l-2.1213 2.12132M5 10a5 5 0 1010 0 5 5 0 10-10 0";--icon-contrast: "M2 10a8 8 0 1016 0 8 8 0 10-16 0m8-8v16m8-8h-8m7.5977 2.5H10m6.24 2.5H10m7.6-7.5H10M16.2422 5H10";--icon-brightness: "M15 10c0 2.7614-2.2386 5-5 5m5-5c0-2.76142-2.2386-5-5-5m5 5h-5m0 5c-2.76142 0-5-2.2386-5-5 0-2.76142 2.23858-5 5-5m0 10V5m0 15v-3M2.92946 2.92897l2.12132 2.12132M0 10h3m-.07054 7.071l2.12132-2.1213M10 0v3m7.0705 14.071l-2.1213-2.1213M20 10h-3m.0705-7.07103l-2.1213 2.12132M14.3242 7.5H10m4.3242 5H10";--icon-gamma: "M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1";--icon-enhance: "M19 13h-2m0 0c-2.2091 0-4-1.7909-4-4m4 4c-2.2091 0-4 1.7909-4 4m0-8V7m0 2c0 2.2091-1.7909 4-4 4m-2 0h2m0 0c2.2091 0 4 1.7909 4 4m0 0v2M8 8.5H6.5m0 0c-1.10457 0-2-.89543-2-2m2 2c-1.10457 0-2 .89543-2 2m0-4V5m0 1.5c0 1.10457-.89543 2-2 2M1 8.5h1.5m0 0c1.10457 0 2 .89543 2 2m0 0V12M12 3h-1m0 0c-.5523 0-1-.44772-1-1m1 1c-.5523 0-1 .44772-1 1m0-2V1m0 1c0 .55228-.44772 1-1 1M8 3h1m0 0c.55228 0 1 .44772 1 1m0 0v1";--icon-saturation: ' ';--icon-warmth: ' ';--icon-vibrance: ' '}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--l10n-cancel: "Cancel";--l10n-apply: "Apply";--l10n-brightness: "Brightness";--l10n-exposure: "Exposure";--l10n-gamma: "Gamma";--l10n-contrast: "Contrast";--l10n-saturation: "Saturation";--l10n-vibrance: "Vibrance";--l10n-warmth: "Warmth";--l10n-enhance: "Enhance";--l10n-original: "Original"}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--rgb-primary-accent: 6, 2, 196;--rgb-text-base: 0, 0, 0;--rgb-text-accent-contrast: 255, 255, 255;--rgb-fill-contrast: 255, 255, 255;--rgb-fill-shaded: 245, 245, 245;--rgb-shadow: 0, 0, 0;--rgb-error: 209, 81, 81;--opacity-shade-mid: .2;--color-primary-accent: rgb(var(--rgb-primary-accent));--color-text-base: rgb(var(--rgb-text-base));--color-text-accent-contrast: rgb(var(--rgb-text-accent-contrast));--color-text-soft: rgb(var(--rgb-fill-contrast));--color-text-error: rgb(var(--rgb-error));--color-fill-contrast: rgb(var(--rgb-fill-contrast));--color-modal-backdrop: rgba(var(--rgb-fill-shaded), .95);--color-image-background: rgba(var(--rgb-fill-shaded));--color-outline: rgba(var(--rgb-text-base), var(--opacity-shade-mid));--color-underline: rgba(var(--rgb-text-base), .08);--color-shade: rgba(var(--rgb-text-base), .02);--color-focus-ring: var(--color-primary-accent);--color-input-placeholder: rgba(var(--rgb-text-base), .32);--color-error: rgb(var(--rgb-error));--font-size-ui: 16px;--font-size-title: 18px;--font-weight-title: 500;--font-size-soft: 14px;--size-touch-area: 40px;--size-panel-heading: 66px;--size-ui-min-width: 130px;--size-line-width: 1px;--size-modal-width: 650px;--border-radius-connect: 2px;--border-radius-editor: 3px;--border-radius-thumb: 4px;--border-radius-ui: 5px;--border-radius-base: 6px;--cldtr-gap-min: 5px;--cldtr-gap-mid-1: 10px;--cldtr-gap-mid-2: 15px;--cldtr-gap-max: 20px;--opacity-min: var(--opacity-shade-mid);--opacity-mid: .1;--opacity-max: .05;--transition-duration-2: var(--transition-duration-all, .2s);--transition-duration-3: var(--transition-duration-all, .3s);--transition-duration-4: var(--transition-duration-all, .4s);--transition-duration-5: var(--transition-duration-all, .5s);--shadow-base: 0px 5px 15px rgba(var(--rgb-shadow), .1), 0px 1px 4px rgba(var(--rgb-shadow), .15);--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading);--transparent-pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);display:block;width:100%;height:100%;max-height:100%}:host(.lr-cloud-image-editor) :is([can-handle-paste]:hover,[can-handle-paste]:focus),.lr-cloud-image-editor :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste: "true"}:host(.lr-cloud-image-editor) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover),.lr-cloud-image-editor :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect: var(--hover-filter) !important;--opacity-effect: var(--hover-opacity) !important;--color-effect: var(--hover-color-rgb) !important}:host(.lr-cloud-image-editor) :is([tabindex]:active,[with-effects]:active),.lr-cloud-image-editor :is([tabindex]:active,[with-effects]:active){--filter-effect: var(--down-filter) !important;--opacity-effect: var(--down-opacity) !important;--color-effect: var(--down-color-rgb) !important}:host(.lr-cloud-image-editor) :is([tabindex][active],[with-effects][active]),.lr-cloud-image-editor :is([tabindex][active],[with-effects][active]){--filter-effect: var(--active-filter) !important;--opacity-effect: var(--active-opacity) !important;--color-effect: var(--active-color-rgb) !important}:host(.lr-cloud-image-editor) [hidden-scrollbar]::-webkit-scrollbar,.lr-cloud-image-editor [hidden-scrollbar]::-webkit-scrollbar{display:none}:host(.lr-cloud-image-editor) [hidden-scrollbar],.lr-cloud-image-editor [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}:host(.lr-cloud-image-editor.editor_ON),.lr-cloud-image-editor.editor_ON{--modal-header-opacity: 0;--modal-header-height: 0px;--modal-toolbar-height: calc(var(--size-panel-heading) * 2)}:host(.lr-cloud-image-editor.editor_OFF),.lr-cloud-image-editor.editor_OFF{--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading)}:host(.lr-cloud-image-editor)>.wrapper,.lr-cloud-image-editor>.wrapper{--l-min-img-height: var(--modal-toolbar-height);--l-max-img-height: 100%;--l-edit-button-width: 120px;--l-toolbar-horizontal-padding: var(--cldtr-gap-mid-1);position:relative;display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto}@media only screen and (max-width: 800px){:host(.lr-cloud-image-editor)>.wrapper,.lr-cloud-image-editor>.wrapper{--l-edit-button-width: 70px;--l-toolbar-horizontal-padding: var(--cldtr-gap-min)}}:host(.lr-cloud-image-editor)>.wrapper>.viewport,.lr-cloud-image-editor>.wrapper>.viewport{display:flex;align-items:center;justify-content:center;overflow:hidden}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image{--viewer-image-opacity: 1;position:absolute;top:0;left:0;z-index:10;display:block;box-sizing:border-box;width:100%;height:100%;object-fit:scale-down;background-color:var(--color-image-background);transform:scale(1);opacity:var(--viewer-image-opacity);user-select:none;pointer-events:auto}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_visible_viewer,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_hidden_to_cropper,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_hidden_to_cropper{--viewer-image-opacity: 0;background-image:var(--transparent-pixel);transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_hidden_effects,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_hidden_effects{--viewer-image-opacity: 0;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4);pointer-events:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container,.lr-cloud-image-editor>.wrapper>.viewport>.image_container{position:relative;display:block;width:100%;height:100%;background-color:var(--color-image-background);transition:var(--transition-duration-3)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar,.lr-cloud-image-editor>.wrapper>.toolbar{position:relative;transition:.3s}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content{position:absolute;bottom:0;left:0;box-sizing:border-box;width:100%;height:var(--modal-toolbar-height);min-height:var(--size-panel-heading);background-color:var(--color-fill-contrast)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content.toolbar_content__viewer,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content.toolbar_content__viewer{display:flex;align-items:center;justify-content:space-between;height:var(--size-panel-heading);padding-right:var(--l-toolbar-horizontal-padding);padding-left:var(--l-toolbar-horizontal-padding)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content.toolbar_content__editor,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content.toolbar_content__editor{display:flex}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.info_pan,.lr-cloud-image-editor>.wrapper>.viewport>.info_pan{position:absolute;user-select:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.file_type_outer,.lr-cloud-image-editor>.wrapper>.viewport>.file_type_outer{position:absolute;z-index:2;display:flex;max-width:120px;transform:translate(-40px);user-select:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.file_type_outer>.file_type,.lr-cloud-image-editor>.wrapper>.viewport>.file_type_outer>.file_type{padding:4px .8em}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash,.lr-cloud-image-editor>.wrapper>.network_problems_splash{position:absolute;z-index:4;display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--color-fill-contrast)}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_icon,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:rgba(var(--rgb-text-base),.6);background-color:rgba(var(--rgb-fill-shaded));border-radius:50%}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_text,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_text{margin-top:var(--cldtr-gap-max);font-size:var(--font-size-ui)}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_footer,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_footer{display:flex;align-items:center;justify-content:center;height:var(--size-panel-heading)}lr-crop-frame>.svg{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:inherit;transition:var(--transition-duration-3)}lr-crop-frame>.thumb{--idle-color-rgb: var(--color-text-base);--hover-color-rgb: var(--color-primary-accent);--focus-color-rgb: var(--color-primary-accent);--down-color-rgb: var(--color-primary-accent);--color-effect: var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}lr-crop-frame>.thumb--visible{opacity:1;pointer-events:auto}lr-crop-frame>.thumb--hidden{opacity:0;pointer-events:none}lr-crop-frame>.guides{transition:var(--transition-duration-3)}lr-crop-frame>.guides--hidden{opacity:0}lr-crop-frame>.guides--semi-hidden{opacity:.2}lr-crop-frame>.guides--visible{opacity:1}lr-editor-button-control,lr-editor-crop-button-control,lr-editor-filter-control,lr-editor-operation-control{--l-base-min-width: 40px;--l-base-height: var(--l-base-min-width);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--filter-effect: var(--idle-filter);--idle-color-rgb: var(--rgb-text-base);--idle-opacity: .05;--idle-filter: 1;--hover-color-rgb: var(--idle-color-rgb);--hover-opacity: .08;--hover-filter: .8;--down-color-rgb: var(--hover-color-rgb);--down-opacity: .12;--down-filter: .6;position:relative;display:grid;grid-template-columns:var(--l-base-min-width) auto;align-items:center;height:var(--l-base-height);color:rgba(var(--idle-color-rgb));outline:none;cursor:pointer;transition:var(--l-width-transition)}lr-editor-button-control.active,lr-editor-operation-control.active,lr-editor-crop-button-control.active,lr-editor-filter-control.active{--idle-color-rgb: var(--rgb-primary-accent)}lr-editor-filter-control.not_active .preview[loaded]{opacity:1}lr-editor-filter-control.active .preview{opacity:0}lr-editor-button-control.not_active,lr-editor-operation-control.not_active,lr-editor-crop-button-control.not_active,lr-editor-filter-control.not_active{--idle-color-rgb: var(--rgb-text-base)}lr-editor-button-control>.before,lr-editor-operation-control>.before,lr-editor-crop-button-control>.before,lr-editor-filter-control>.before{position:absolute;right:0;left:0;z-index:-1;width:100%;height:100%;background-color:rgba(var(--color-effect),var(--opacity-effect));border-radius:var(--border-radius-editor);transition:var(--transition-duration-3)}lr-editor-button-control>.title,lr-editor-operation-control>.title,lr-editor-crop-button-control>.title,lr-editor-filter-control>.title{padding-right:var(--cldtr-gap-mid-1);font-size:.7em;letter-spacing:1.004px;text-transform:uppercase}lr-editor-filter-control>.preview{position:absolute;right:0;left:0;z-index:1;width:100%;height:var(--l-base-height);background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);opacity:0;filter:brightness(var(--filter-effect));transition:var(--transition-duration-3)}lr-editor-filter-control>.original-icon{color:var(--color-text-base);opacity:.3}lr-editor-image-cropper{position:absolute;top:0;left:0;z-index:10;display:block;width:100%;height:100%;opacity:0;pointer-events:none;touch-action:none}lr-editor-image-cropper.active_from_editor{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}lr-editor-image-cropper.active_from_viewer{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}lr-editor-image-cropper.inactive_to_editor{opacity:0;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s);pointer-events:none}lr-editor-image-cropper>.canvas{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%}lr-editor-image-fader{position:absolute;top:0;left:0;display:block;width:100%;height:100%}lr-editor-image-fader.active_from_viewer{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-start);pointer-events:auto}lr-editor-image-fader.active_from_cropper{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:auto}lr-editor-image-fader.inactive_to_cropper{z-index:3;transform:scale(1);opacity:0;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}lr-editor-image-fader .fader-image{position:absolute;top:0;left:0;display:block;width:100%;height:100%;object-fit:scale-down;transform:scale(1);user-select:none;content-visibility:auto}lr-editor-image-fader .fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);transform:scale(1);opacity:0;transition:var(--transition-duration-3)}lr-editor-scroller{display:flex;align-items:center;width:100%;height:100%;overflow-x:scroll}lr-editor-slider{display:flex;align-items:center;justify-content:center;width:100%;height:66px}lr-editor-toolbar{position:relative;width:100%;height:100%}@media only screen and (max-width: 600px){lr-editor-toolbar{--l-tab-gap: var(--cldtr-gap-mid-1);--l-slider-padding: var(--cldtr-gap-min);--l-controls-padding: var(--cldtr-gap-min)}}@media only screen and (min-width: 601px){lr-editor-toolbar{--l-tab-gap: calc(var(--cldtr-gap-mid-1) + var(--cldtr-gap-max));--l-slider-padding: var(--cldtr-gap-mid-1);--l-controls-padding: var(--cldtr-gap-mid-1)}}lr-editor-toolbar>.toolbar-container{position:relative;width:100%;height:100%;overflow:hidden}lr-editor-toolbar>.toolbar-container>.sub-toolbar{position:absolute;display:grid;grid-template-rows:1fr 1fr;width:100%;height:100%;background-color:var(--color-fill-contrast);transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--visible{transform:translateY(0);opacity:1;pointer-events:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--top-hidden{transform:translateY(100%);opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--bottom-hidden{transform:translateY(-100%);opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row{display:flex;align-items:center;justify-content:space-between;padding-right:var(--l-controls-padding);padding-left:var(--l-controls-padding)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles{position:relative;display:grid;grid-auto-flow:column;grid-gap:0px var(--l-tab-gap);align-items:center;height:100%}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggles_indicator{position:absolute;bottom:0;left:0;width:var(--size-touch-area);height:2px;background-color:var(--color-primary-accent);transform:translate(0);transition:transform var(--transition-duration-3)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row{position:relative}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;overflow:hidden;opacity:0;content-visibility:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content.tab-content--visible{opacity:1;pointer-events:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content.tab-content--hidden{opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggle.tab-toggle--visible{display:contents}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggle.tab-toggle--hidden{display:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles.tab-toggles--hidden{display:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_align{display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;box-sizing:border-box;min-width:100%;padding-left:var(--cldtr-gap-max)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_inner{display:grid;grid-area:inner;grid-auto-flow:column;grid-gap:calc((var(--cldtr-gap-min) - 1px) * 3)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_inner:last-child{padding-right:var(--cldtr-gap-max)}lr-editor-toolbar .controls-list_last-item{margin-right:var(--cldtr-gap-max)}lr-editor-toolbar .info-tooltip_container{position:absolute;display:flex;align-items:flex-start;justify-content:center;width:100%;height:100%}lr-editor-toolbar .info-tooltip_wrapper{position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2));display:flex;flex-direction:column;justify-content:flex-end;height:100%;pointer-events:none}lr-editor-toolbar .info-tooltip{z-index:3;padding-top:calc(var(--cldtr-gap-min) / 2);padding-right:var(--cldtr-gap-min);padding-bottom:calc(var(--cldtr-gap-min) / 2);padding-left:var(--cldtr-gap-min);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;text-transform:uppercase;background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);transform:translateY(100%);opacity:0;transition:var(--transition-duration-3)}lr-editor-toolbar .info-tooltip_visible{transform:translateY(0);opacity:1}lr-editor-toolbar .slider{padding-right:var(--l-slider-padding);padding-left:var(--l-slider-padding)}lr-btn-ui{--filter-effect: var(--idle-brightness);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--l-transition-effect: var(--css-transition, color var(--transition-duration-2), filter var(--transition-duration-2));display:inline-flex;align-items:center;box-sizing:var(--css-box-sizing, border-box);height:var(--css-height, var(--size-touch-area));padding-right:var(--css-padding-right, var(--cldtr-gap-mid-1));padding-left:var(--css-padding-left, var(--cldtr-gap-mid-1));color:rgba(var(--color-effect),var(--opacity-effect));outline:none;cursor:pointer;filter:brightness(var(--filter-effect));transition:var(--l-transition-effect);user-select:none}lr-btn-ui .text{white-space:nowrap}lr-btn-ui .icon{display:flex;align-items:center;justify-content:center;color:rgba(var(--color-effect),var(--opacity-effect));filter:brightness(var(--filter-effect));transition:var(--l-transition-effect)}lr-btn-ui .icon_left{margin-right:var(--cldtr-gap-mid-1);margin-left:0}lr-btn-ui .icon_right{margin-right:0;margin-left:var(--cldtr-gap-mid-1)}lr-btn-ui .icon_single{margin-right:0;margin-left:0}lr-btn-ui .icon_hidden{display:none;margin:0}lr-btn-ui.primary{--idle-color-rgb: var(--rgb-primary-accent);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--idle-color-rgb);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: .75;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-btn-ui.boring{--idle-color-rgb: var(--rgb-text-base);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--rgb-text-base);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: 1;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-btn-ui.default{--idle-color-rgb: var(--rgb-text-base);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--rgb-primary-accent);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: .75;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-line-loader-ui{position:absolute;top:0;left:0;z-index:9999;width:100%;height:2px;opacity:.5}lr-line-loader-ui .inner{width:25%;max-width:200px;height:100%}lr-line-loader-ui .line{width:100%;height:100%;background-color:var(--color-primary-accent);transform:translate(-101%);transition:transform 1s}lr-slider-ui{--l-thumb-size: 24px;--l-zero-dot-size: 5px;--l-zero-dot-offset: 2px;--idle-color-rgb: var(--rgb-text-base);--hover-color-rgb: var(--rgb-primary-accent);--down-color-rgb: var(--rgb-primary-accent);--color-effect: var(--idle-color-rgb);--l-color: rgb(var(--color-effect));position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset)) * 2)}lr-slider-ui .thumb{position:absolute;left:0;width:var(--l-thumb-size);height:var(--l-thumb-size);background-color:var(--l-color);border-radius:50%;transform:translate(0);opacity:1;transition:opacity var(--transition-duration-2)}lr-slider-ui .steps{position:absolute;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:100%;padding-right:calc(var(--l-thumb-size) / 2);padding-left:calc(var(--l-thumb-size) / 2)}lr-slider-ui .border-step{width:0px;height:10px;border-right:1px solid var(--l-color);opacity:.6;transition:var(--transition-duration-2)}lr-slider-ui .minor-step{width:0px;height:4px;border-right:1px solid var(--l-color);opacity:.2;transition:var(--transition-duration-2)}lr-slider-ui .zero-dot{position:absolute;top:calc(100% - var(--l-zero-dot-offset) * 2);left:calc(var(--l-thumb-size) / 2 - var(--l-zero-dot-size) / 2);width:var(--l-zero-dot-size);height:var(--l-zero-dot-size);background-color:var(--color-primary-accent);border-radius:50%;opacity:0;transition:var(--transition-duration-3)}lr-slider-ui .input{position:absolute;width:calc(100% - 10px);height:100%;margin:0;cursor:pointer;opacity:0}lr-presence-toggle.transition{transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}lr-presence-toggle.visible{opacity:1;pointer-events:inherit}lr-presence-toggle.hidden{opacity:0;pointer-events:none}ctx-provider{--color-text-base: black;--color-primary-accent: blue;display:flex;align-items:center;justify-content:center;width:190px;height:40px;padding-right:10px;padding-left:10px;background-color:#f5f5f5;border-radius:3px}lr-cloud-image-editor-activity{position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:var(--clr-background-light)}lr-modal lr-cloud-image-editor-activity{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%)}lr-select{display:inline-flex}lr-select>button{position:relative;display:inline-flex;align-items:center;padding-right:0!important;color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary)}lr-select>button>select{position:absolute;display:block;width:100%;height:100%;opacity:0}:host{flex:1}lr-start-from{height:100%;container-type:inline-size}.lr-wgt-common,:host{--cfg-done-activity: "start-from";--cfg-init-activity: "start-from"}lr-activity-header:after{width:var(--ui-size);height:var(--ui-size);content:""}lr-activity-header .close-btn{display:none}@container (min-width: 500px){lr-start-from .content{grid-template-columns:1fr max-content;height:100%}lr-start-from lr-copyright{grid-column:2}lr-start-from lr-drop-area{grid-row:span 3}lr-start-from:has(lr-copyright[hidden]) lr-drop-area{grid-row:span 2}lr-start-from:has(.cancel-btn[hidden]) lr-drop-area{grid-row:span 2}lr-start-from:has(lr-copyright[hidden]):has(.cancel-btn[hidden]) lr-drop-area{grid-row:span 1}} diff --git a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-minimal.min.css b/pyuploadcare/dj/static/uploadcare/lr-file-uploader-minimal.min.css deleted file mode 100644 index fb3069ac..00000000 --- a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-minimal.min.css +++ /dev/null @@ -1 +0,0 @@ -:where(.lr-wgt-cfg,.lr-wgt-common),:host{--cfg-pubkey: "YOUR_PUBLIC_KEY";--cfg-multiple: 1;--cfg-multiple-min: 0;--cfg-multiple-max: 0;--cfg-confirm-upload: 0;--cfg-img-only: 0;--cfg-accept: "";--cfg-external-sources-preferred-types: "";--cfg-store: "auto";--cfg-camera-mirror: 1;--cfg-source-list: "local, url, camera, dropbox, gdrive";--cfg-max-local-file-size-bytes: 0;--cfg-thumb-size: 76;--cfg-show-empty-list: 0;--cfg-use-local-image-editor: 0;--cfg-use-cloud-image-editor: 1;--cfg-remove-copyright: 0;--cfg-modal-scroll-lock: 1;--cfg-modal-backdrop-strokes: 0;--cfg-source-list-wrap: 1;--cfg-init-activity: "start-from";--cfg-done-activity: "";--cfg-remote-tab-session-key: "";--cfg-cdn-cname: "https://ucarecdn.com";--cfg-base-url: "https://upload.uploadcare.com";--cfg-social-base-url: "https://social.uploadcare.com";--cfg-secure-signature: "";--cfg-secure-expire: "";--cfg-secure-delivery-proxy: "";--cfg-retry-throttled-request-max-times: 1;--cfg-multipart-min-file-size: 26214400;--cfg-multipart-chunk-size: 5242880;--cfg-max-concurrent-requests: 10;--cfg-multipart-max-concurrent-requests: 4;--cfg-multipart-max-attempts: 3;--cfg-check-for-url-duplicates: 0;--cfg-save-url-for-recurrent-uploads: 0;--cfg-group-output: 0;--cfg-user-agent-integration: ""}:where(.lr-wgt-theme,.lr-wgt-common),:host{color:var(--clr-txt);font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}:where(.lr-wgt-theme,.lr-wgt-common) *,:host *{box-sizing:border-box}:where(.lr-wgt-theme,.lr-wgt-common) [hidden],:host [hidden]{display:none!important}:where(.lr-wgt-theme,.lr-wgt-common) [activity]:not([active]),:host [activity]:not([active]){display:none}:where(.lr-wgt-theme,.lr-wgt-common) dialog:not([open]) [activity],:host dialog:not([open]) [activity]{display:none}:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{display:flex;align-items:center;justify-content:center;height:var(--ui-size);padding-right:1.4em;padding-left:1.4em;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--border-radius-element);cursor:pointer;user-select:none}@media only screen and (max-width: 800px){:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{padding-right:1em;padding-left:1em}}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn,:host button.primary-btn{color:var(--clr-btn-txt-primary);background-color:var(--clr-btn-bgr-primary);box-shadow:var(--shadow-btn-primary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:hover,:host button.primary-btn:hover{background-color:var(--clr-btn-bgr-primary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:active,:host button.primary-btn:active{background-color:var(--clr-btn-bgr-primary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn,:host button.secondary-btn{color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:hover,:host button.secondary-btn:hover{background-color:var(--clr-btn-bgr-secondary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:active,:host button.secondary-btn:active{background-color:var(--clr-btn-bgr-secondary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn,:host button.mini-btn{width:var(--ui-size);height:var(--ui-size);padding:0;background-color:transparent;border:none;cursor:pointer;transition:var(--transition-duration) ease;color:var(--clr-txt)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:hover,:host button.mini-btn:hover{background-color:var(--clr-shade-lv1)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:active,:host button.mini-btn:active{background-color:var(--clr-shade-lv2)}:where(.lr-wgt-theme,.lr-wgt-common) :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]),:host :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]){color:var(--clr-btn-txt-disabled);background-color:var(--clr-btn-bgr-disabled);box-shadow:var(--shadow-btn-disabled);pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) a,:host a{color:var(--clr-accent);text-decoration:none}:where(.lr-wgt-theme,.lr-wgt-common) a[disabled],:host a[disabled]{pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]{display:flex;width:100%;height:var(--ui-size);padding-right:.6em;padding-left:.6em;color:var(--clr-txt);font-size:1em;font-family:inherit;background-color:var(--clr-background-light);border:var(--border-light);border-radius:var(--border-radius-element);transition:var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]::placeholder{color:var(--clr-txt-lightest)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:hover,:host input[type=text]:hover{border-color:var(--clr-accent-light)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:focus,:host input[type=text]:focus{border-color:var(--clr-accent);outline:none}:where(.lr-wgt-theme,.lr-wgt-common) input[disabled],:host input[disabled]{opacity:.6;pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common),:host{--darkmode: 0;--h-foreground: 208;--s-foreground: 4%;--l-foreground: calc(10% + 78% * var(--darkmode));--h-background: 208;--s-background: 4%;--l-background: calc(97% - 85% * var(--darkmode));--h-accent: 211;--s-accent: 100%;--l-accent: calc(50% - 5% * var(--darkmode));--h-confirm: 137;--s-confirm: 85%;--l-confirm: 53%;--h-error: 358;--s-error: 100%;--l-error: 66%;--shadows: 1;--h-shadow: 0;--s-shadow: 0%;--l-shadow: 0%;--opacity-normal: .6;--opacity-hover: .9;--opacity-active: 1;--ui-size: 32px;--gap-min: 2px;--gap-small: 4px;--gap-mid: 10px;--gap-max: 20px;--gap-table: 0px;--borders: 1;--border-radius-element: 8px;--border-radius-frame: 12px;--border-radius-thumb: 6px;--transition-duration: .2s;--modal-max-w: 800px;--modal-max-h: 600px;--modal-normal-w: 430px;--darkmode-minus: calc(1 + var(--darkmode) * -2);--clr-background: hsl(var(--h-background), var(--s-background), var(--l-background));--clr-background-dark: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-background-light: hsl( var(--h-background), var(--s-background), calc(var(--l-background) + 3% * var(--darkmode-minus)) );--clr-accent: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 15% * var(--darkmode)));--clr-accent-light: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 30%);--clr-accent-lightest: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 10%);--clr-accent-light-opaque: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 45% * var(--darkmode-minus)));--clr-accent-lightest-opaque: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) + 47% * var(--darkmode-minus)) );--clr-confirm: hsl(var(--h-confirm), var(--s-confirm), var(--l-confirm));--clr-error: hsl(var(--h-error), var(--s-error), var(--l-error));--clr-error-light: hsla(var(--h-error), var(--s-error), var(--l-error), 15%);--clr-error-lightest: hsla(var(--h-error), var(--s-error), var(--l-error), 5%);--clr-error-message-bgr: hsl(var(--h-error), var(--s-error), calc(var(--l-error) + 31% * var(--darkmode-minus)));--clr-txt: hsl(var(--h-foreground), var(--s-foreground), var(--l-foreground));--clr-txt-mid: hsl(var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 20% * var(--darkmode-minus)));--clr-txt-light: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 30% * var(--darkmode-minus)) );--clr-txt-lightest: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 50% * var(--darkmode-minus)) );--clr-shade-lv1: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 5%);--clr-shade-lv2: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 8%);--clr-shade-lv3: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 12%);--clr-generic-file-icon: var(--clr-txt-lightest);--border-light: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.1 - .05 * var(--darkmode)) * var(--borders)) );--border-mid: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.2 - .1 * var(--darkmode)) * var(--borders)) );--border-accent: 1px solid hsla(var(--h-accent), var(--s-accent), var(--l-accent), 1 * var(--borders));--border-dashed: 1px dashed hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), calc(.2 * var(--borders)));--clr-curtain: hsla(var(--h-background), var(--s-background), calc(var(--l-background)), 60%);--hsl-shadow: var(--h-shadow), var(--s-shadow), var(--l-shadow);--modal-shadow: 0px 0px 1px hsla(var(--hsl-shadow), calc((.3 + .65 * var(--darkmode)) * var(--shadows))), 0px 6px 20px hsla(var(--hsl-shadow), calc((.1 + .4 * var(--darkmode)) * var(--shadows)));--clr-btn-bgr-primary: var(--clr-accent);--clr-btn-bgr-primary-hover: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 4% * var(--darkmode-minus)) );--clr-btn-bgr-primary-active: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 8% * var(--darkmode-minus)) );--clr-btn-txt-primary: hsl(var(--h-accent), var(--s-accent), 98%);--shadow-btn-primary: none;--clr-btn-bgr-secondary: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-hover: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 7% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-active: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 12% * var(--darkmode-minus)) );--clr-btn-txt-secondary: var(--clr-txt-mid);--shadow-btn-secondary: none;--clr-btn-bgr-disabled: var(--clr-background);--clr-btn-txt-disabled: var(--clr-txt-lightest);--shadow-btn-disabled: none}@media only screen and (max-height: 600px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-h: 100%}}@media only screen and (max-width: 430px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-w: 100vw;--modal-max-h: var(--uploadcare-blocks-window-height)}}lr-start-from{display:block;overflow-y:auto}lr-start-from .content{display:grid;grid-auto-flow:row;gap:var(--gap-max);width:100%;height:100%;padding:var(--gap-max);background-color:var(--clr-background-light)}lr-modal lr-start-from{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2))}lr-drop-area{padding:var(--gap-min);overflow:hidden;border:var(--border-dashed);border-radius:var(--border-radius-frame);transition:var(--transition-duration) ease}lr-drop-area,lr-drop-area .content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}lr-drop-area .text{position:relative;margin:var(--gap-mid);color:var(--clr-txt-light);transition:var(--transition-duration) ease}lr-drop-area[ghost][drag-state=inactive]{display:none;opacity:0}lr-drop-area[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--clr-background)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.text,.icon-container){color:var(--clr-accent)}lr-drop-area:is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--clr-accent);background:var(--clr-accent-lightest);border-color:var(--clr-accent-light)}lr-drop-area:is([drag-state=active],[drag-state=near]){opacity:1}lr-drop-area[drag-state=over]{border-color:var(--clr-accent);opacity:1}lr-drop-area[with-icon]{min-height:calc(var(--ui-size) * 6)}lr-drop-area[with-icon] .content-wrapper{display:flex;flex-direction:column}lr-drop-area[with-icon] .text{color:var(--clr-txt);font-weight:500;font-size:1.1em}lr-drop-area[with-icon] .icon-container{position:relative;width:calc(var(--ui-size) * 2);height:calc(var(--ui-size) * 2);margin:var(--gap-mid);overflow:hidden;color:var(--clr-txt);background-color:var(--clr-background);border-radius:50%;transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon{position:absolute;top:calc(50% - var(--ui-size) / 2);left:calc(50% - var(--ui-size) / 2);transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon:last-child{transform:translateY(calc(var(--ui-size) * 1.5))}lr-drop-area[with-icon]:hover .icon-container,lr-drop-area[with-icon]:hover .text{color:var(--clr-accent)}lr-drop-area[with-icon]:hover .icon-container{background-color:var(--clr-accent-lightest)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .icon-container{color:#fff;background-color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .text{color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:last-child{transform:translateY(0)}lr-drop-area[with-icon]>.content-wrapper[drag-state=near] lr-icon:last-child{transform:scale(1.3)}lr-drop-area[with-icon]>.content-wrapper[drag-state=over] lr-icon:last-child{transform:scale(1.5)}lr-drop-area[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--gap-mid) * 2);height:calc(100vh - var(--gap-mid) * 2);margin:var(--gap-mid)}lr-drop-area[fullscreen] .content-wrapper{width:100%;max-width:calc(var(--modal-normal-w) * .8);height:calc(var(--ui-size) * 6);color:var(--clr-txt);background-color:var(--clr-background-light);border-radius:var(--border-radius-frame);box-shadow:var(--modal-shadow);transition:var(--transition-duration) ease}lr-drop-area[with-icon][fullscreen][drag-state=active]>.content-wrapper,lr-drop-area[with-icon][fullscreen][drag-state=near]>.content-wrapper{transform:translateY(var(--gap-mid));opacity:0}lr-drop-area[with-icon][fullscreen][drag-state=over]>.content-wrapper{transform:translateY(0);opacity:1}:is(lr-drop-area[with-icon][fullscreen])>.content-wrapper lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[clickable]{cursor:pointer}lr-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--clr-background-light);transition:opacity var(--transition-duration)}lr-modal lr-upload-list{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:max-content;max-height:var(--modal-max-content-height)}lr-upload-list .no-files{height:var(--ui-size);padding:var(--gap-max)}lr-upload-list .files{display:block;flex:1;min-height:var(--ui-size);padding:0 var(--gap-mid);overflow:auto}lr-upload-list .toolbar{display:flex;gap:var(--gap-small);justify-content:space-between;padding:var(--gap-mid);background-color:var(--clr-background-light)}lr-upload-list .toolbar .add-more-btn{padding-left:.2em}lr-upload-list .toolbar-spacer{flex:1}lr-upload-list lr-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--gap-mid) * 2);height:calc(100% - var(--gap-mid) * 2);margin:var(--gap-mid);border-radius:var(--border-radius-element)}lr-upload-list lr-activity-header>.header-text{padding:0 var(--gap-mid)}lr-upload-list .common-error{border-radius:var(--border-radius-element);color:var(--clr-error);background-color:var(--clr-error-message-bgr);display:flex;align-items:center;justify-content:center;padding:var(--gap-mid);margin:var(--gap-small) var(--gap-mid) 0 var(--gap-mid);font-size:.95em}lr-file-item{display:block}lr-file-item>.inner{position:relative;display:grid;grid-template-columns:32px 1fr max-content;gap:var(--gap-min);align-items:center;margin-bottom:var(--gap-small);padding:var(--gap-mid);overflow:hidden;font-size:.95em;background-color:var(--clr-background);border-radius:var(--border-radius-element);transition:var(--transition-duration)}lr-file-item:last-of-type>.inner{margin-bottom:0}lr-file-item>.inner[focused]{background-color:transparent}lr-file-item>.inner[uploading] .edit-btn{display:none}lr-file-item>:where(.inner[failed],.inner[limit-overflow]){background-color:var(--clr-error-lightest)}lr-file-item .thumb{position:relative;display:inline-flex;width:var(--ui-size);height:var(--ui-size);background-color:var(--clr-shade-lv1);background-position:center center;background-size:cover;border-radius:var(--border-radius-thumb)}lr-file-item .file-name-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--gap-mid);padding-left:var(--gap-mid);overflow:hidden;color:var(--clr-txt-light);transition:color var(--transition-duration)}lr-file-item .file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}lr-file-item .file-error{display:none;color:var(--clr-error);font-size:.85em;line-height:130%}lr-file-item button.remove-btn,lr-file-item button.edit-btn{color:var(--clr-txt-lightest)!important}lr-file-item button.upload-btn{display:none}lr-file-item button:hover{color:var(--clr-txt-light)}lr-file-item .badge{position:absolute;top:calc(var(--ui-size) * -.13);right:calc(var(--ui-size) * -.13);width:calc(var(--ui-size) * .44);height:calc(var(--ui-size) * .44);color:var(--clr-background-light);background-color:var(--clr-txt);border-radius:50%;transform:scale(.3);opacity:0;transition:var(--transition-duration) ease;display:flex;justify-content:center;align-items:center}lr-file-item>.inner:where([failed],[limit-overflow],[finished]) .badge{transform:scale(1);opacity:1}lr-file-item>.inner[finished] .badge{background-color:var(--clr-confirm)}lr-file-item>.inner:where([failed],[limit-overflow]) .badge{background-color:var(--clr-error)}lr-file-item>.inner:where([failed],[limit-overflow]) .file-error{display:block}lr-file-item .badge lr-icon,lr-file-item .badge lr-icon svg{width:100%;height:100%}lr-file-item .progress-bar{top:calc(100% - 2px);height:2px}lr-file-item .file-actions{display:flex;gap:var(--gap-min);align-items:center;justify-content:center}lr-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-size);height:var(--ui-size)}lr-icon svg{width:calc(var(--ui-size) / 2);height:calc(var(--ui-size) / 2)}lr-icon:not([raw]) path{fill:currentColor}lr-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}lr-progress-bar .progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--clr-accent-light);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}lr-progress-bar .progress--hidden{opacity:0}lr-copyright{display:flex;align-items:flex-end}lr-copyright .credits{padding:0 var(--gap-mid) var(--gap-mid) calc(var(--gap-mid) * 1.5);color:var(--clr-txt-lightest);font-weight:400;font-size:.85em;opacity:.7;transition:var(--transition-duration) ease}lr-copyright .credits:hover{opacity:1}:where(.lr-wgt-l10n_en-US,.lr-wgt-common),:host{--l10n-locale-name: "en-US";--l10n-upload-file: "Upload file";--l10n-upload-files: "Upload files";--l10n-choose-file: "Choose file";--l10n-choose-files: "Choose files";--l10n-drop-files-here: "Drop files here";--l10n-select-file-source: "Select file source";--l10n-selected: "Selected";--l10n-upload: "Upload";--l10n-add-more: "Add more";--l10n-cancel: "Cancel";--l10n-start-from-cancel: var(--l10n-cancel);--l10n-clear: "Clear";--l10n-camera-shot: "Shot";--l10n-upload-url: "Import";--l10n-upload-url-placeholder: "Paste link here";--l10n-edit-image: "Edit image";--l10n-edit-detail: "Details";--l10n-back: "Back";--l10n-done: "Done";--l10n-ok: "Ok";--l10n-remove-from-list: "Remove";--l10n-no: "No";--l10n-yes: "Yes";--l10n-confirm-your-action: "Confirm your action";--l10n-are-you-sure: "Are you sure?";--l10n-selected-count: "Selected:";--l10n-upload-error: "Upload error";--l10n-validation-error: "Validation error";--l10n-no-files: "No files selected";--l10n-browse: "Browse";--l10n-not-uploaded-yet: "Not uploaded yet...";--l10n-file__one: "file";--l10n-file__other: "files";--l10n-error__one: "error";--l10n-error__other: "errors";--l10n-header-uploading: "Uploading {{count}} {{plural:file(count)}}";--l10n-header-failed: "{{count}} {{plural:error(count)}}";--l10n-header-succeed: "{{count}} {{plural:file(count)}} uploaded";--l10n-header-total: "{{count}} {{plural:file(count)}} selected";--l10n-src-type-local: "From device";--l10n-src-type-from-url: "From link";--l10n-src-type-camera: "Camera";--l10n-src-type-draw: "Draw";--l10n-src-type-facebook: "Facebook";--l10n-src-type-dropbox: "Dropbox";--l10n-src-type-gdrive: "Google Drive";--l10n-src-type-gphotos: "Google Photos";--l10n-src-type-instagram: "Instagram";--l10n-src-type-flickr: "Flickr";--l10n-src-type-vk: "VK";--l10n-src-type-evernote: "Evernote";--l10n-src-type-box: "Box";--l10n-src-type-onedrive: "Onedrive";--l10n-src-type-huddle: "Huddle";--l10n-src-type-other: "Other";--l10n-src-type: var(--l10n-src-type-local);--l10n-caption-from-url: "Import from link";--l10n-caption-camera: "Camera";--l10n-caption-draw: "Draw";--l10n-caption-edit-file: "Edit file";--l10n-file-no-name: "No name...";--l10n-toggle-fullscreen: "Toggle fullscreen";--l10n-toggle-guides: "Toggle guides";--l10n-rotate: "Rotate";--l10n-flip-vertical: "Flip vertical";--l10n-flip-horizontal: "Flip horizontal";--l10n-brightness: "Brightness";--l10n-contrast: "Contrast";--l10n-saturation: "Saturation";--l10n-resize: "Resize image";--l10n-crop: "Crop";--l10n-select-color: "Select color";--l10n-text: "Text";--l10n-draw: "Draw";--l10n-cancel-edit: "Cancel edit";--l10n-tab-view: "Preview";--l10n-tab-details: "Details";--l10n-file-name: "Name";--l10n-file-size: "Size";--l10n-cdn-url: "CDN URL";--l10n-file-size-unknown: "Unknown";--l10n-camera-permissions-denied: "Camera access denied";--l10n-camera-permissions-prompt: "Please allow access to the camera";--l10n-camera-permissions-request: "Request access";--l10n-files-count-limit-error-title: "Files count limit overflow";--l10n-files-count-limit-error-too-few: "You\2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.";--l10n-files-count-limit-error-too-many: "You\2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.";--l10n-files-max-size-limit-error: "File is too big. Max file size is {{maxFileSize}}.";--l10n-has-validation-errors: "File validation error ocurred. Please, check your files before upload.";--l10n-images-only-accepted: "Only image files are accepted.";--l10n-file-type-not-allowed: "Uploading of these file types is not allowed.";--l10n-some-files-were-not-uploaded: "Some files were not uploaded."}:where(.lr-wgt-icons,.lr-wgt-common),:host{--icon-arrow-down: "m11.5009 23.0302c.2844.2533.7135.2533.9978 0l9.2899-8.2758c.3092-.2756.3366-.7496.0611-1.0589s-.7496-.3367-1.0589-.0612l-8.0417 7.1639v-19.26834c0-.41421-.3358-.749997-.75-.749997s-.75.335787-.75.749997v19.26704l-8.04025-7.1626c-.30928-.2755-.78337-.2481-1.05889.0612-.27553.3093-.24816.7833.06112 1.0589z";--icon-default: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-close: "m4.60395 4.60395c.29289-.2929.76776-.2929 1.06066 0l6.33539 6.33535 6.3354-6.33535c.2929-.2929.7677-.2929 1.0606 0 .2929.29289.2929.76776 0 1.06066l-6.3353 6.33539 6.3353 6.3354c.2929.2929.2929.7677 0 1.0606s-.7677.2929-1.0606 0l-6.3354-6.3353-6.33539 6.3353c-.2929.2929-.76777.2929-1.06066 0-.2929-.2929-.2929-.7677 0-1.0606l6.33535-6.3354-6.33535-6.33539c-.2929-.2929-.2929-.76777 0-1.06066z";--icon-info: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z";--icon-error: "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";--icon-remove: "m6.35673 9.71429c-.76333 0-1.35856.66121-1.27865 1.42031l1.01504 9.6429c.06888.6543.62067 1.1511 1.27865 1.1511h9.25643c.658 0 1.2098-.4968 1.2787-1.1511l1.015-9.6429c.0799-.7591-.5153-1.42031-1.2786-1.42031zm.50041-4.5v.32142h-2.57143c-.71008 0-1.28571.57564-1.28571 1.28572s.57563 1.28571 1.28571 1.28571h15.42859c.7101 0 1.2857-.57563 1.2857-1.28571s-.5756-1.28572-1.2857-1.28572h-2.5714v-.32142c0-1.77521-1.4391-3.21429-3.2143-3.21429h-3.8572c-1.77517 0-3.21426 1.43908-3.21426 3.21429zm7.07146-.64286c.355 0 .6428.28782.6428.64286v.32142h-5.14283v-.32142c0-.35504.28782-.64286.64283-.64286z";--icon-check: "m12 22c5.5228 0 10-4.4772 10-10 0-5.52285-4.4772-10-10-10-5.52285 0-10 4.47715-10 10 0 5.5228 4.47715 10 10 10zm4.7071-11.4929-5.9071 5.9071-3.50711-3.5071c-.39052-.3905-.39052-1.0237 0-1.4142.39053-.3906 1.02369-.3906 1.41422 0l2.09289 2.0929 4.4929-4.49294c.3905-.39052 1.0237-.39052 1.4142 0 .3905.39053.3905 1.02374 0 1.41424z";--icon-remove-file: "m11.9554 3.29999c-.7875 0-1.5427.31281-2.0995.86963-.49303.49303-.79476 1.14159-.85742 1.83037h5.91382c-.0627-.68878-.3644-1.33734-.8575-1.83037-.5568-.55682-1.312-.86963-2.0994-.86963zm4.461 2.7c-.0656-1.08712-.5264-2.11657-1.3009-2.89103-.8381-.83812-1.9749-1.30897-3.1601-1.30897-1.1853 0-2.32204.47085-3.16016 1.30897-.77447.77446-1.23534 1.80391-1.30087 2.89103h-2.31966c-.03797 0-.07529.00282-.11174.00827h-1.98826c-.41422 0-.75.33578-.75.75 0 .41421.33578.75.75.75h1.35v11.84174c0 .7559.30026 1.4808.83474 2.0152.53448.5345 1.25939.8348 2.01526.8348h9.44999c.7559 0 1.4808-.3003 2.0153-.8348.5344-.5344.8347-1.2593.8347-2.0152v-11.84174h1.35c.4142 0 .75-.33579.75-.75 0-.41422-.3358-.75-.75-.75h-1.9883c-.0364-.00545-.0737-.00827-.1117-.00827zm-10.49169 1.50827v11.84174c0 .358.14223.7014.3954.9546.25318.2532.59656.3954.9546.3954h9.44999c.358 0 .7014-.1422.9546-.3954s.3954-.5966.3954-.9546v-11.84174z";--icon-trash-file: var(--icon-remove);--icon-upload-error: var(--icon-error);--icon-badge-success: "M10.5 18.2044L18.0992 10.0207C18.6629 9.41362 18.6277 8.46452 18.0207 7.90082C17.4136 7.33711 16.4645 7.37226 15.9008 7.97933L10.5 13.7956L8.0992 11.2101C7.53549 10.603 6.5864 10.5679 5.97933 11.1316C5.37226 11.6953 5.33711 12.6444 5.90082 13.2515L10.5 18.2044Z";--icon-badge-error: "m13.6 18.4c0 .8837-.7164 1.6-1.6 1.6-.8837 0-1.6-.7163-1.6-1.6s.7163-1.6 1.6-1.6c.8836 0 1.6.7163 1.6 1.6zm-1.6-13.9c.8284 0 1.5.67157 1.5 1.5v7c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5v-7c0-.82843.6716-1.5 1.5-1.5z";--icon-edit-file: "m12.1109 6c.3469-1.69213 1.8444-2.96484 3.6391-2.96484s3.2922 1.27271 3.6391 2.96484h2.314c.4142 0 .75.33578.75.75 0 .41421-.3358.75-.75.75h-2.314c-.3469 1.69213-1.8444 2.9648-3.6391 2.9648s-3.2922-1.27267-3.6391-2.9648h-9.81402c-.41422 0-.75001-.33579-.75-.75 0-.41422.33578-.75.75-.75zm3.6391-1.46484c-1.2232 0-2.2148.99162-2.2148 2.21484s.9916 2.21484 2.2148 2.21484 2.2148-.99162 2.2148-2.21484-.9916-2.21484-2.2148-2.21484zm-11.1391 11.96484c.34691-1.6921 1.84437-2.9648 3.6391-2.9648 1.7947 0 3.2922 1.2727 3.6391 2.9648h9.814c.4142 0 .75.3358.75.75s-.3358.75-.75.75h-9.814c-.3469 1.6921-1.8444 2.9648-3.6391 2.9648-1.79473 0-3.29219-1.2727-3.6391-2.9648h-2.31402c-.41422 0-.75-.3358-.75-.75s.33578-.75.75-.75zm3.6391-1.4648c-1.22322 0-2.21484.9916-2.21484 2.2148s.99162 2.2148 2.21484 2.2148 2.2148-.9916 2.2148-2.2148-.99158-2.2148-2.2148-2.2148z";--icon-upload: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-add: "M12.75 21C12.75 21.4142 12.4142 21.75 12 21.75C11.5858 21.75 11.25 21.4142 11.25 21V12.7499H3C2.58579 12.7499 2.25 12.4141 2.25 11.9999C2.25 11.5857 2.58579 11.2499 3 11.2499H11.25V3C11.25 2.58579 11.5858 2.25 12 2.25C12.4142 2.25 12.75 2.58579 12.75 3V11.2499H21C21.4142 11.2499 21.75 11.5857 21.75 11.9999C21.75 12.4141 21.4142 12.7499 21 12.7499H12.75V21Z"}:where(.lr-wgt-common),:host{--cfg-multiple: 1;--cfg-confirm-upload: 0;--cfg-init-activity: "start-from";--cfg-done-activity: "upload-list";position:relative;display:block}lr-start-from .content{display:flex;flex-direction:column;gap:var(--gap-min);padding:0;overflow:hidden;align-items:center;background-color:transparent}lr-drop-area{display:flex;align-items:center;justify-content:center;width:100%;min-height:calc(var(--ui-size) + var(--gap-mid) * 2 + var(--gap-min) * 4);padding:0;line-height:140%;text-align:center;background-color:var(--clr-background);border-radius:var(--border-radius-frame)}lr-upload-list lr-activity-header{display:none}lr-upload-list>.toolbar{background-color:transparent}lr-upload-list{width:100%;height:unset;padding:var(--gap-small);background-color:transparent;border:var(--border-dashed);border-radius:var(--border-radius-frame)}lr-upload-list .files{padding:0}lr-upload-list .toolbar{display:block;padding:0}lr-upload-list .toolbar .cancel-btn,lr-upload-list .toolbar .upload-btn,lr-upload-list .toolbar .done-btn{display:none}lr-upload-list .toolbar .add-more-btn{width:100%;height:calc(var(--ui-size) + var(--gap-mid) * 2);margin-top:var(--gap-small);background-color:var(--clr-background)}lr-upload-list .toolbar .add-more-btn[disabled]{display:none}lr-upload-list .toolbar .add-more-btn:hover{background-color:var(--clr-background-dark)}lr-upload-list .toolbar .add-more-btn>span{display:none}lr-file-item{background-color:var(--clr-background);border-radius:var(--border-radius-element)}lr-file-item .edit-btn{display:none}lr-file-item lr-progress-bar{top:0!important;height:100%!important}lr-file-item lr-progress-bar .progress{background-color:var(--clr-accent-lightest);border-radius:var(--border-radius-element)}lr-upload-list lr-drop-area{width:100%;height:100%;margin:0;border-radius:var(--border-radius-frame)}lr-upload-list .common-error{margin:var(--gap-small) 0 0 0} diff --git a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-regular.min.css b/pyuploadcare/dj/static/uploadcare/lr-file-uploader-regular.min.css deleted file mode 100644 index 1e0163c7..00000000 --- a/pyuploadcare/dj/static/uploadcare/lr-file-uploader-regular.min.css +++ /dev/null @@ -1 +0,0 @@ -:where(.lr-wgt-cfg,.lr-wgt-common),:host{--cfg-pubkey: "YOUR_PUBLIC_KEY";--cfg-multiple: 1;--cfg-multiple-min: 0;--cfg-multiple-max: 0;--cfg-confirm-upload: 0;--cfg-img-only: 0;--cfg-accept: "";--cfg-external-sources-preferred-types: "";--cfg-store: "auto";--cfg-camera-mirror: 1;--cfg-source-list: "local, url, camera, dropbox, gdrive";--cfg-max-local-file-size-bytes: 0;--cfg-thumb-size: 76;--cfg-show-empty-list: 0;--cfg-use-local-image-editor: 0;--cfg-use-cloud-image-editor: 1;--cfg-remove-copyright: 0;--cfg-modal-scroll-lock: 1;--cfg-modal-backdrop-strokes: 0;--cfg-source-list-wrap: 1;--cfg-init-activity: "start-from";--cfg-done-activity: "";--cfg-remote-tab-session-key: "";--cfg-cdn-cname: "https://ucarecdn.com";--cfg-base-url: "https://upload.uploadcare.com";--cfg-social-base-url: "https://social.uploadcare.com";--cfg-secure-signature: "";--cfg-secure-expire: "";--cfg-secure-delivery-proxy: "";--cfg-retry-throttled-request-max-times: 1;--cfg-multipart-min-file-size: 26214400;--cfg-multipart-chunk-size: 5242880;--cfg-max-concurrent-requests: 10;--cfg-multipart-max-concurrent-requests: 4;--cfg-multipart-max-attempts: 3;--cfg-check-for-url-duplicates: 0;--cfg-save-url-for-recurrent-uploads: 0;--cfg-group-output: 0;--cfg-user-agent-integration: ""}:where(.lr-wgt-icons,.lr-wgt-common),:host{--icon-default: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-file: "m2.89453 1.2012c0-.473389.38376-.857145.85714-.857145h8.40003c.2273 0 .4453.090306.6061.251051l8.4 8.400004c.1607.16074.251.37876.251.60609v13.2c0 .4734-.3837.8571-.8571.8571h-16.80003c-.47338 0-.85714-.3837-.85714-.8571zm1.71429.85714v19.88576h15.08568v-11.4858h-7.5428c-.4734 0-.8572-.3837-.8572-.8571v-7.54286zm8.39998 1.21218 5.4736 5.47353-5.4736.00001z";--icon-close: "m4.60395 4.60395c.29289-.2929.76776-.2929 1.06066 0l6.33539 6.33535 6.3354-6.33535c.2929-.2929.7677-.2929 1.0606 0 .2929.29289.2929.76776 0 1.06066l-6.3353 6.33539 6.3353 6.3354c.2929.2929.2929.7677 0 1.0606s-.7677.2929-1.0606 0l-6.3354-6.3353-6.33539 6.3353c-.2929.2929-.76777.2929-1.06066 0-.2929-.2929-.2929-.7677 0-1.0606l6.33535-6.3354-6.33535-6.33539c-.2929-.2929-.2929-.76777 0-1.06066z";--icon-collapse: "M3.11572 12C3.11572 11.5858 3.45151 11.25 3.86572 11.25H20.1343C20.5485 11.25 20.8843 11.5858 20.8843 12C20.8843 12.4142 20.5485 12.75 20.1343 12.75H3.86572C3.45151 12.75 3.11572 12.4142 3.11572 12Z";--icon-expand: "M12.0001 8.33716L3.53033 16.8068C3.23743 17.0997 2.76256 17.0997 2.46967 16.8068C2.17678 16.5139 2.17678 16.0391 2.46967 15.7462L11.0753 7.14067C11.1943 7.01825 11.3365 6.92067 11.4936 6.8536C11.6537 6.78524 11.826 6.75 12.0001 6.75C12.1742 6.75 12.3465 6.78524 12.5066 6.8536C12.6637 6.92067 12.8059 7.01826 12.925 7.14068L21.5304 15.7462C21.8233 16.0391 21.8233 16.5139 21.5304 16.8068C21.2375 17.0997 20.7627 17.0997 20.4698 16.8068L12.0001 8.33716Z";--icon-info: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z";--icon-error: "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";--icon-arrow-down: "m11.5009 23.0302c.2844.2533.7135.2533.9978 0l9.2899-8.2758c.3092-.2756.3366-.7496.0611-1.0589s-.7496-.3367-1.0589-.0612l-8.0417 7.1639v-19.26834c0-.41421-.3358-.749997-.75-.749997s-.75.335787-.75.749997v19.26704l-8.04025-7.1626c-.30928-.2755-.78337-.2481-1.05889.0612-.27553.3093-.24816.7833.06112 1.0589z";--icon-upload: "m11.5014.392135c.2844-.253315.7134-.253315.9978 0l6.7037 5.971925c.3093.27552.3366.74961.0611 1.05889-.2755.30929-.7496.33666-1.0589.06113l-5.4553-4.85982v13.43864c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-13.43771l-5.45427 4.85889c-.30929.27553-.78337.24816-1.0589-.06113-.27553-.30928-.24816-.78337.06113-1.05889zm-10.644466 16.336765c.414216 0 .749996.3358.749996.75v4.9139h20.78567v-4.9139c0-.4142.3358-.75.75-.75.4143 0 .75.3358.75.75v5.6639c0 .4143-.3357.75-.75.75h-22.285666c-.414214 0-.75-.3357-.75-.75v-5.6639c0-.4142.335786-.75.75-.75z";--icon-local: "m3 3.75c-.82843 0-1.5.67157-1.5 1.5v13.5c0 .8284.67157 1.5 1.5 1.5h18c.8284 0 1.5-.6716 1.5-1.5v-9.75c0-.82843-.6716-1.5-1.5-1.5h-9c-.2634 0-.5076-.13822-.6431-.36413l-2.03154-3.38587zm-3 1.5c0-1.65685 1.34315-3 3-3h6.75c.2634 0 .5076.13822.6431.36413l2.0315 3.38587h8.5754c1.6569 0 3 1.34315 3 3v9.75c0 1.6569-1.3431 3-3 3h-18c-1.65685 0-3-1.3431-3-3z";--icon-url: "m19.1099 3.67026c-1.7092-1.70917-4.5776-1.68265-6.4076.14738l-2.2212 2.22122c-.2929.29289-.7678.29289-1.0607 0-.29289-.29289-.29289-.76777 0-1.06066l2.2212-2.22122c2.376-2.375966 6.1949-2.481407 8.5289-.14738l1.2202 1.22015c2.334 2.33403 2.2286 6.15294-.1474 8.52895l-2.2212 2.2212c-.2929.2929-.7678.2929-1.0607 0s-.2929-.7678 0-1.0607l2.2212-2.2212c1.8301-1.83003 1.8566-4.69842.1474-6.40759zm-3.3597 4.57991c.2929.29289.2929.76776 0 1.06066l-6.43918 6.43927c-.29289.2928-.76777.2928-1.06066 0-.29289-.2929-.29289-.7678 0-1.0607l6.43924-6.43923c.2929-.2929.7677-.2929 1.0606 0zm-9.71158 1.17048c.29289.29289.29289.76775 0 1.06065l-2.22123 2.2212c-1.83002 1.8301-1.85654 4.6984-.14737 6.4076l1.22015 1.2202c1.70917 1.7091 4.57756 1.6826 6.40763-.1474l2.2212-2.2212c.2929-.2929.7677-.2929 1.0606 0s.2929.7677 0 1.0606l-2.2212 2.2212c-2.37595 2.376-6.19486 2.4815-8.52889.1474l-1.22015-1.2201c-2.334031-2.3341-2.22859-6.153.14737-8.5289l2.22123-2.22125c.29289-.2929.76776-.2929 1.06066 0z";--icon-camera: "m7.65 2.55c.14164-.18885.36393-.3.6-.3h7.5c.2361 0 .4584.11115.6.3l2.025 2.7h2.625c1.6569 0 3 1.34315 3 3v10.5c0 1.6569-1.3431 3-3 3h-18c-1.65685 0-3-1.3431-3-3v-10.5c0-1.65685 1.34315-3 3-3h2.625zm.975 1.2-2.025 2.7c-.14164.18885-.36393.3-.6.3h-3c-.82843 0-1.5.67157-1.5 1.5v10.5c0 .8284.67157 1.5 1.5 1.5h18c.8284 0 1.5-.6716 1.5-1.5v-10.5c0-.82843-.6716-1.5-1.5-1.5h-3c-.2361 0-.4584-.11115-.6-.3l-2.025-2.7zm3.375 6c-1.864 0-3.375 1.511-3.375 3.375s1.511 3.375 3.375 3.375 3.375-1.511 3.375-3.375-1.511-3.375-3.375-3.375zm-4.875 3.375c0-2.6924 2.18261-4.875 4.875-4.875 2.6924 0 4.875 2.1826 4.875 4.875s-2.1826 4.875-4.875 4.875c-2.69239 0-4.875-2.1826-4.875-4.875z";--icon-dots: "M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z";--icon-back: "M20.251 12.0001C20.251 12.4143 19.9152 12.7501 19.501 12.7501L6.06696 12.7501L11.7872 18.6007C12.0768 18.8968 12.0715 19.3717 11.7753 19.6613C11.4791 19.9508 11.0043 19.9455 10.7147 19.6493L4.13648 12.9213C4.01578 12.8029 3.91947 12.662 3.85307 12.5065C3.78471 12.3464 3.74947 12.1741 3.74947 12C3.74947 11.8259 3.78471 11.6536 3.85307 11.4935C3.91947 11.338 4.01578 11.1971 4.13648 11.0787L10.7147 4.35068C11.0043 4.0545 11.4791 4.04916 11.7753 4.33873C12.0715 4.62831 12.0768 5.10315 11.7872 5.39932L6.06678 11.2501L19.501 11.2501C19.9152 11.2501 20.251 11.5859 20.251 12.0001Z";--icon-remove: "m6.35673 9.71429c-.76333 0-1.35856.66121-1.27865 1.42031l1.01504 9.6429c.06888.6543.62067 1.1511 1.27865 1.1511h9.25643c.658 0 1.2098-.4968 1.2787-1.1511l1.015-9.6429c.0799-.7591-.5153-1.42031-1.2786-1.42031zm.50041-4.5v.32142h-2.57143c-.71008 0-1.28571.57564-1.28571 1.28572s.57563 1.28571 1.28571 1.28571h15.42859c.7101 0 1.2857-.57563 1.2857-1.28571s-.5756-1.28572-1.2857-1.28572h-2.5714v-.32142c0-1.77521-1.4391-3.21429-3.2143-3.21429h-3.8572c-1.77517 0-3.21426 1.43908-3.21426 3.21429zm7.07146-.64286c.355 0 .6428.28782.6428.64286v.32142h-5.14283v-.32142c0-.35504.28782-.64286.64283-.64286z";--icon-edit: "M3.96371 14.4792c-.15098.151-.25578.3419-.3021.5504L2.52752 20.133c-.17826.8021.53735 1.5177 1.33951 1.3395l5.10341-1.1341c.20844-.0463.39934-.1511.55032-.3021l8.05064-8.0507-5.557-5.55702-8.05069 8.05062ZM13.4286 5.01437l5.557 5.55703 2.0212-2.02111c.6576-.65765.6576-1.72393 0-2.38159l-3.1755-3.17546c-.6577-.65765-1.7239-.65765-2.3816 0l-2.0211 2.02113Z";--icon-detail: "M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z";--icon-select: "M7,10L12,15L17,10H7Z";--icon-check: "m12 22c5.5228 0 10-4.4772 10-10 0-5.52285-4.4772-10-10-10-5.52285 0-10 4.47715-10 10 0 5.5228 4.47715 10 10 10zm4.7071-11.4929-5.9071 5.9071-3.50711-3.5071c-.39052-.3905-.39052-1.0237 0-1.4142.39053-.3906 1.02369-.3906 1.41422 0l2.09289 2.0929 4.4929-4.49294c.3905-.39052 1.0237-.39052 1.4142 0 .3905.39053.3905 1.02374 0 1.41424z";--icon-add: "M12.75 21C12.75 21.4142 12.4142 21.75 12 21.75C11.5858 21.75 11.25 21.4142 11.25 21V12.7499H3C2.58579 12.7499 2.25 12.4141 2.25 11.9999C2.25 11.5857 2.58579 11.2499 3 11.2499H11.25V3C11.25 2.58579 11.5858 2.25 12 2.25C12.4142 2.25 12.75 2.58579 12.75 3V11.2499H21C21.4142 11.2499 21.75 11.5857 21.75 11.9999C21.75 12.4141 21.4142 12.7499 21 12.7499H12.75V21Z";--icon-edit-file: "m12.1109 6c.3469-1.69213 1.8444-2.96484 3.6391-2.96484s3.2922 1.27271 3.6391 2.96484h2.314c.4142 0 .75.33578.75.75 0 .41421-.3358.75-.75.75h-2.314c-.3469 1.69213-1.8444 2.9648-3.6391 2.9648s-3.2922-1.27267-3.6391-2.9648h-9.81402c-.41422 0-.75001-.33579-.75-.75 0-.41422.33578-.75.75-.75zm3.6391-1.46484c-1.2232 0-2.2148.99162-2.2148 2.21484s.9916 2.21484 2.2148 2.21484 2.2148-.99162 2.2148-2.21484-.9916-2.21484-2.2148-2.21484zm-11.1391 11.96484c.34691-1.6921 1.84437-2.9648 3.6391-2.9648 1.7947 0 3.2922 1.2727 3.6391 2.9648h9.814c.4142 0 .75.3358.75.75s-.3358.75-.75.75h-9.814c-.3469 1.6921-1.8444 2.9648-3.6391 2.9648-1.79473 0-3.29219-1.2727-3.6391-2.9648h-2.31402c-.41422 0-.75-.3358-.75-.75s.33578-.75.75-.75zm3.6391-1.4648c-1.22322 0-2.21484.9916-2.21484 2.2148s.99162 2.2148 2.21484 2.2148 2.2148-.9916 2.2148-2.2148-.99158-2.2148-2.2148-2.2148z";--icon-remove-file: "m11.9554 3.29999c-.7875 0-1.5427.31281-2.0995.86963-.49303.49303-.79476 1.14159-.85742 1.83037h5.91382c-.0627-.68878-.3644-1.33734-.8575-1.83037-.5568-.55682-1.312-.86963-2.0994-.86963zm4.461 2.7c-.0656-1.08712-.5264-2.11657-1.3009-2.89103-.8381-.83812-1.9749-1.30897-3.1601-1.30897-1.1853 0-2.32204.47085-3.16016 1.30897-.77447.77446-1.23534 1.80391-1.30087 2.89103h-2.31966c-.03797 0-.07529.00282-.11174.00827h-1.98826c-.41422 0-.75.33578-.75.75 0 .41421.33578.75.75.75h1.35v11.84174c0 .7559.30026 1.4808.83474 2.0152.53448.5345 1.25939.8348 2.01526.8348h9.44999c.7559 0 1.4808-.3003 2.0153-.8348.5344-.5344.8347-1.2593.8347-2.0152v-11.84174h1.35c.4142 0 .75-.33579.75-.75 0-.41422-.3358-.75-.75-.75h-1.9883c-.0364-.00545-.0737-.00827-.1117-.00827zm-10.49169 1.50827v11.84174c0 .358.14223.7014.3954.9546.25318.2532.59656.3954.9546.3954h9.44999c.358 0 .7014-.1422.9546-.3954s.3954-.5966.3954-.9546v-11.84174z";--icon-trash-file: var(--icon-remove);--icon-upload-error: var(--icon-error);--icon-fullscreen: "M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z";--icon-fullscreen-exit: "M14,14H19V16H16V19H14V14M5,14H10V19H8V16H5V14M8,5H10V10H5V8H8V5M19,8V10H14V5H16V8H19Z";--icon-badge-success: "M10.5 18.2044L18.0992 10.0207C18.6629 9.41362 18.6277 8.46452 18.0207 7.90082C17.4136 7.33711 16.4645 7.37226 15.9008 7.97933L10.5 13.7956L8.0992 11.2101C7.53549 10.603 6.5864 10.5679 5.97933 11.1316C5.37226 11.6953 5.33711 12.6444 5.90082 13.2515L10.5 18.2044Z";--icon-badge-error: "m13.6 18.4c0 .8837-.7164 1.6-1.6 1.6-.8837 0-1.6-.7163-1.6-1.6s.7163-1.6 1.6-1.6c.8836 0 1.6.7163 1.6 1.6zm-1.6-13.9c.8284 0 1.5.67157 1.5 1.5v7c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5v-7c0-.82843.6716-1.5 1.5-1.5z";--icon-about: "M11.152 14.12v.1h1.523v-.1c.007-.409.053-.752.138-1.028.086-.277.22-.517.405-.72.188-.202.434-.397.735-.586.32-.191.593-.412.82-.66.232-.249.41-.531.533-.847.125-.32.187-.678.187-1.076 0-.579-.137-1.085-.41-1.518a2.717 2.717 0 0 0-1.14-1.018c-.49-.245-1.062-.367-1.715-.367-.597 0-1.142.114-1.636.34-.49.228-.884.564-1.182 1.008-.299.44-.46.98-.485 1.619h1.62c.024-.377.118-.684.282-.922.163-.241.369-.419.617-.532.25-.114.51-.17.784-.17.301 0 .575.063.82.191.248.124.447.302.597.533.149.23.223.504.223.82 0 .263-.05.502-.149.72-.1.216-.234.408-.405.574a3.48 3.48 0 0 1-.575.453c-.33.199-.613.42-.847.66-.234.242-.415.558-.543.949-.125.39-.19.916-.197 1.577ZM11.205 17.15c.21.206.46.31.75.31.196 0 .374-.049.534-.144.16-.096.287-.224.383-.384.1-.163.15-.343.15-.538a1 1 0 0 0-.32-.746 1.019 1.019 0 0 0-.746-.314c-.291 0-.542.105-.751.314-.21.206-.314.455-.314.746 0 .295.104.547.314.756ZM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12Zm-1.5 0c0 5.799-4.701 10.5-10.5 10.5S1.5 17.799 1.5 12 6.201 1.5 12 1.5 22.5 6.201 22.5 12Z";--icon-edit-rotate: "M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z";--icon-edit-flip-v: "M3 15V17H5V15M15 19V21H17V19M19 3H5C3.9 3 3 3.9 3 5V9H5V5H19V9H21V5C21 3.9 20.1 3 19 3M21 19H19V21C20.1 21 21 20.1 21 19M1 11V13H23V11M7 19V21H9V19M19 15V17H21V15M11 19V21H13V19M3 19C3 20.1 3.9 21 5 21V19Z";--icon-edit-flip-h: "M15 21H17V19H15M19 9H21V7H19M3 5V19C3 20.1 3.9 21 5 21H9V19H5V5H9V3H5C3.9 3 3 3.9 3 5M19 3V5H21C21 3.9 20.1 3 19 3M11 23H13V1H11M19 17H21V15H19M15 5H17V3H15M19 13H21V11H19M19 21C20.1 21 21 20.1 21 19H19Z";--icon-edit-brightness: "M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z";--icon-edit-contrast: "M12,20C9.79,20 7.79,19.1 6.34,17.66L17.66,6.34C19.1,7.79 20,9.79 20,12A8,8 0 0,1 12,20M6,8H8V6H9.5V8H11.5V9.5H9.5V11.5H8V9.5H6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,16H17V14.5H12V16Z";--icon-edit-saturation: "M3,13A9,9 0 0,0 12,22C12,17 7.97,13 3,13M12,5.5A2.5,2.5 0 0,1 14.5,8A2.5,2.5 0 0,1 12,10.5A2.5,2.5 0 0,1 9.5,8A2.5,2.5 0 0,1 12,5.5M5.6,10.25A2.5,2.5 0 0,0 8.1,12.75C8.63,12.75 9.12,12.58 9.5,12.31C9.5,12.37 9.5,12.43 9.5,12.5A2.5,2.5 0 0,0 12,15A2.5,2.5 0 0,0 14.5,12.5C14.5,12.43 14.5,12.37 14.5,12.31C14.88,12.58 15.37,12.75 15.9,12.75C17.28,12.75 18.4,11.63 18.4,10.25C18.4,9.25 17.81,8.4 16.97,8C17.81,7.6 18.4,6.74 18.4,5.75C18.4,4.37 17.28,3.25 15.9,3.25C15.37,3.25 14.88,3.41 14.5,3.69C14.5,3.63 14.5,3.56 14.5,3.5A2.5,2.5 0 0,0 12,1A2.5,2.5 0 0,0 9.5,3.5C9.5,3.56 9.5,3.63 9.5,3.69C9.12,3.41 8.63,3.25 8.1,3.25A2.5,2.5 0 0,0 5.6,5.75C5.6,6.74 6.19,7.6 7.03,8C6.19,8.4 5.6,9.25 5.6,10.25M12,22A9,9 0 0,0 21,13C16,13 12,17 12,22Z";--icon-edit-crop: "M7,17V1H5V5H1V7H5V17A2,2 0 0,0 7,19H17V23H19V19H23V17M17,15H19V7C19,5.89 18.1,5 17,5H9V7H17V15Z";--icon-edit-text: "M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z";--icon-edit-draw: "m21.879394 2.1631238c-1.568367-1.62768627-4.136546-1.53831744-5.596267.1947479l-8.5642801 10.1674753c-1.4906533-.224626-3.061232.258204-4.2082427 1.448604-1.0665468 1.106968-1.0997707 2.464806-1.1203996 3.308068-.00142.05753-.00277.113001-.00439.16549-.02754.894146-.08585 1.463274-.5821351 2.069648l-.80575206.98457.88010766.913285c1.0539516 1.093903 2.6691689 1.587048 4.1744915 1.587048 1.5279113 0 3.2235468-.50598 4.4466094-1.775229 1.147079-1.190514 1.612375-2.820653 1.395772-4.367818l9.796763-8.8879697c1.669907-1.5149954 1.75609-4.1802333.187723-5.8079195zm-16.4593821 13.7924592c.8752943-.908358 2.2944227-.908358 3.1697054 0 .8752942.908358.8752942 2.381259 0 3.289617-.5909138.61325-1.5255389.954428-2.53719.954428-.5223687 0-.9935663-.09031-1.3832112-.232762.3631253-.915463.3952949-1.77626.4154309-2.429737.032192-1.045425.072224-1.308557.3352649-1.581546z";--icon-edit-guides: "M1.39,18.36L3.16,16.6L4.58,18L5.64,16.95L4.22,15.54L5.64,14.12L8.11,16.6L9.17,15.54L6.7,13.06L8.11,11.65L9.53,13.06L10.59,12L9.17,10.59L10.59,9.17L13.06,11.65L14.12,10.59L11.65,8.11L13.06,6.7L14.47,8.11L15.54,7.05L14.12,5.64L15.54,4.22L18,6.7L19.07,5.64L16.6,3.16L18.36,1.39L22.61,5.64L5.64,22.61L1.39,18.36Z";--icon-edit-color: "M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";--icon-edit-resize: "M10.59,12L14.59,8H11V6H18V13H16V9.41L12,13.41V16H20V4H8V12H10.59M22,2V18H12V22H2V12H6V2H22M10,14H4V20H10V14Z";--icon-external-source-placeholder: "M6.341 3.27a10.5 10.5 0 0 1 5.834-1.77.75.75 0 0 0 0-1.5 12 12 0 1 0 12 12 .75.75 0 0 0-1.5 0A10.5 10.5 0 1 1 6.34 3.27Zm14.145 1.48a.75.75 0 1 0-1.06-1.062L9.925 13.19V7.95a.75.75 0 1 0-1.5 0V15c0 .414.336.75.75.75h7.05a.75.75 0 0 0 0-1.5h-5.24l9.501-9.5Z";--icon-facebook: "m12 1.5c-5.79901 0-10.5 4.70099-10.5 10.5 0 4.9427 3.41586 9.0888 8.01562 10.2045v-6.1086h-2.13281c-.41421 0-.75-.3358-.75-.75v-3.2812c0-.4142.33579-.75.75-.75h2.13281v-1.92189c0-.95748.22571-2.51089 1.38068-3.6497 1.1934-1.17674 3.1742-1.71859 6.2536-1.05619.3455.07433.5923.3798.5923.73323v2.75395c0 .41422-.3358.75-.75.75-.6917 0-1.2029.02567-1.5844.0819-.3865.05694-.5781.13711-.675.20223-.1087.07303-.2367.20457-.2367 1.02837v1.0781h2.3906c.2193 0 .4275.0959.57.2626.1425.1666.205.3872.1709.6038l-.5156 3.2813c-.0573.3647-.3716.6335-.7409.6335h-1.875v6.1058c4.5939-1.1198 8.0039-5.2631 8.0039-10.2017 0-5.79901-4.701-10.5-10.5-10.5zm-12 10.5c0-6.62744 5.37256-12 12-12 6.6274 0 12 5.37256 12 12 0 5.9946-4.3948 10.9614-10.1384 11.8564-.2165.0337-.4369-.0289-.6033-.1714s-.2622-.3506-.2622-.5697v-7.7694c0-.4142.3358-.75.75-.75h1.9836l.28-1.7812h-2.2636c-.4142 0-.75-.3358-.75-.75v-1.8281c0-.82854.0888-1.72825.9-2.27338.3631-.24396.8072-.36961 1.293-.4412.3081-.0454.6583-.07238 1.0531-.08618v-1.39629c-2.4096-.40504-3.6447.13262-4.2928.77165-.7376.72735-.9338 1.79299-.9338 2.58161v2.67189c0 .4142-.3358.75-.75.75h-2.13279v1.7812h2.13279c.4142 0 .75.3358.75.75v7.7712c0 .219-.0956.427-.2619.5695-.1662.1424-.3864.2052-.6028.1717-5.74968-.8898-10.1509-5.8593-10.1509-11.8583z";--icon-dropbox: "m6.01895 1.92072c.24583-.15659.56012-.15658.80593.00003l5.17512 3.29711 5.1761-3.29714c.2458-.15659.5601-.15658.8059.00003l5.5772 3.55326c.2162.13771.347.37625.347.63253 0 .25629-.1308.49483-.347.63254l-4.574 2.91414 4.574 2.91418c.2162.1377.347.3762.347.6325s-.1308.4948-.347.6325l-5.5772 3.5533c-.2458.1566-.5601.1566-.8059 0l-5.1761-3.2971-5.17512 3.2971c-.24581.1566-.5601.1566-.80593 0l-5.578142-3.5532c-.216172-.1377-.347058-.3763-.347058-.6326s.130886-.4949.347058-.6326l4.574772-2.91408-4.574772-2.91411c-.216172-.1377-.347058-.37626-.347058-.63257 0-.2563.130886-.49486.347058-.63256zm.40291 8.61518-4.18213 2.664 4.18213 2.664 4.18144-2.664zm6.97504 2.664 4.1821 2.664 4.1814-2.664-4.1814-2.664zm2.7758-3.54668-4.1727 2.65798-4.17196-2.65798 4.17196-2.658zm1.4063-.88268 4.1814-2.664-4.1814-2.664-4.1821 2.664zm-6.9757-2.664-4.18144-2.664-4.18213 2.664 4.18213 2.664zm-4.81262 12.43736c.22254-.3494.68615-.4522 1.03551-.2297l5.17521 3.2966 5.1742-3.2965c.3493-.2226.813-.1198 1.0355.2295.2226.3494.1198.813-.2295 1.0355l-5.5772 3.5533c-.2458.1566-.5601.1566-.8059 0l-5.57819-3.5532c-.34936-.2226-.45216-.6862-.22963-1.0355z";--icon-gdrive: "m7.73633 1.81806c.13459-.22968.38086-.37079.64707-.37079h7.587c.2718 0 .5223.14697.6548.38419l7.2327 12.94554c.1281.2293.1269.5089-.0031.7371l-3.7935 6.6594c-.1334.2342-.3822.3788-.6517.3788l-14.81918.0004c-.26952 0-.51831-.1446-.65171-.3788l-3.793526-6.6598c-.1327095-.233-.130949-.5191.004617-.7504zm.63943 1.87562-6.71271 11.45452 2.93022 5.1443 6.65493-11.58056zm3.73574 6.52652-2.39793 4.1727 4.78633.0001zm4.1168 4.1729 5.6967-.0002-6.3946-11.44563h-5.85354zm5.6844 1.4998h-13.06111l-2.96515 5.1598 13.08726-.0004z";--icon-gphotos: "M12.51 0c-.702 0-1.272.57-1.272 1.273V7.35A6.381 6.381 0 0 0 0 11.489c0 .703.57 1.273 1.273 1.273H7.35A6.381 6.381 0 0 0 11.488 24c.704 0 1.274-.57 1.274-1.273V16.65A6.381 6.381 0 0 0 24 12.51c0-.703-.57-1.273-1.273-1.273H16.65A6.381 6.381 0 0 0 12.511 0Zm.252 11.232V1.53a4.857 4.857 0 0 1 0 9.702Zm-1.53.006H1.53a4.857 4.857 0 0 1 9.702 0Zm1.536 1.524a4.857 4.857 0 0 0 9.702 0h-9.702Zm-6.136 4.857c0-2.598 2.04-4.72 4.606-4.85v9.7a4.857 4.857 0 0 1-4.606-4.85Z";--icon-instagram: "M6.225 12a5.775 5.775 0 1 1 11.55 0 5.775 5.775 0 0 1-11.55 0zM12 7.725a4.275 4.275 0 1 0 0 8.55 4.275 4.275 0 0 0 0-8.55zM18.425 6.975a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8zM11.958.175h.084c2.152 0 3.823 0 5.152.132 1.35.134 2.427.41 3.362 1.013a7.15 7.15 0 0 1 2.124 2.124c.604.935.88 2.012 1.013 3.362.132 1.329.132 3 .132 5.152v.084c0 2.152 0 3.823-.132 5.152-.134 1.35-.41 2.427-1.013 3.362a7.15 7.15 0 0 1-2.124 2.124c-.935.604-2.012.88-3.362 1.013-1.329.132-3 .132-5.152.132h-.084c-2.152 0-3.824 0-5.153-.132-1.35-.134-2.427-.409-3.36-1.013a7.15 7.15 0 0 1-2.125-2.124C.716 19.62.44 18.544.307 17.194c-.132-1.329-.132-3-.132-5.152v-.084c0-2.152 0-3.823.132-5.152.133-1.35.409-2.427 1.013-3.362A7.15 7.15 0 0 1 3.444 1.32C4.378.716 5.456.44 6.805.307c1.33-.132 3-.132 5.153-.132zM6.953 1.799c-1.234.123-2.043.36-2.695.78A5.65 5.65 0 0 0 2.58 4.26c-.42.65-.657 1.46-.78 2.695C1.676 8.2 1.675 9.797 1.675 12c0 2.203 0 3.8.124 5.046.123 1.235.36 2.044.78 2.696a5.649 5.649 0 0 0 1.68 1.678c.65.421 1.46.658 2.694.78 1.247.124 2.844.125 5.047.125s3.8 0 5.046-.124c1.235-.123 2.044-.36 2.695-.78a5.648 5.648 0 0 0 1.68-1.68c.42-.65.657-1.46.78-2.694.123-1.247.124-2.844.124-5.047s-.001-3.8-.125-5.046c-.122-1.235-.359-2.044-.78-2.695a5.65 5.65 0 0 0-1.679-1.68c-.651-.42-1.46-.657-2.695-.78-1.246-.123-2.843-.124-5.046-.124-2.203 0-3.8 0-5.047.124z";--icon-flickr: "M5.95874 7.92578C3.66131 7.92578 1.81885 9.76006 1.81885 11.9994C1.81885 14.2402 3.66145 16.0744 5.95874 16.0744C8.26061 16.0744 10.1039 14.2396 10.1039 11.9994C10.1039 9.76071 8.26074 7.92578 5.95874 7.92578ZM0.318848 11.9994C0.318848 8.91296 2.85168 6.42578 5.95874 6.42578C9.06906 6.42578 11.6039 8.91232 11.6039 11.9994C11.6039 15.0877 9.06919 17.5744 5.95874 17.5744C2.85155 17.5744 0.318848 15.0871 0.318848 11.9994ZM18.3898 7.92578C16.0878 7.92578 14.2447 9.76071 14.2447 11.9994C14.2447 14.2396 16.088 16.0744 18.3898 16.0744C20.6886 16.0744 22.531 14.2401 22.531 11.9994C22.531 9.76019 20.6887 7.92578 18.3898 7.92578ZM12.7447 11.9994C12.7447 8.91232 15.2795 6.42578 18.3898 6.42578C21.4981 6.42578 24.031 8.91283 24.031 11.9994C24.031 15.0872 21.4982 17.5744 18.3898 17.5744C15.2794 17.5744 12.7447 15.0877 12.7447 11.9994Z";--icon-vk: var(--icon-external-source-placeholder);--icon-evernote: "M9.804 2.27v-.048c.055-.263.313-.562.85-.562h.44c.142 0 .325.014.526.033.066.009.124.023.267.06l.13.032h.002c.319.079.515.275.644.482a1.461 1.461 0 0 1 .16.356l.004.012a.75.75 0 0 0 .603.577l1.191.207a1988.512 1988.512 0 0 0 2.332.402c.512.083 1.1.178 1.665.442.64.3 1.19.795 1.376 1.77.548 2.931.657 5.829.621 8a39.233 39.233 0 0 1-.125 2.602 17.518 17.518 0 0 1-.092.849.735.735 0 0 0-.024.112c-.378 2.705-1.269 3.796-2.04 4.27-.746.457-1.53.451-2.217.447h-.192c-.46 0-1.073-.23-1.581-.635-.518-.412-.763-.87-.763-1.217 0-.45.188-.688.355-.786.161-.095.436-.137.796.087a.75.75 0 1 0 .792-1.274c-.766-.476-1.64-.52-2.345-.108-.7.409-1.098 1.188-1.098 2.08 0 .996.634 1.84 1.329 2.392.704.56 1.638.96 2.515.96l.185.002c.667.009 1.874.025 3.007-.67 1.283-.786 2.314-2.358 2.733-5.276.01-.039.018-.078.022-.105.011-.061.023-.14.034-.23.023-.184.051-.445.079-.772.055-.655.111-1.585.13-2.704.037-2.234-.074-5.239-.647-8.301v-.002c-.294-1.544-1.233-2.391-2.215-2.85-.777-.363-1.623-.496-2.129-.576-.097-.015-.18-.028-.25-.041l-.006-.001-1.99-.345-.761-.132a2.93 2.93 0 0 0-.182-.338A2.532 2.532 0 0 0 12.379.329l-.091-.023a3.967 3.967 0 0 0-.493-.103L11.769.2a7.846 7.846 0 0 0-.675-.04h-.44c-.733 0-1.368.284-1.795.742L2.416 7.431c-.468.428-.751 1.071-.751 1.81 0 .02 0 .041.003.062l.003.034c.017.21.038.468.096.796.107.715.275 1.47.391 1.994.029.13.055.245.075.342l.002.008c.258 1.141.641 1.94.978 2.466.168.263.323.456.444.589a2.808 2.808 0 0 0 .192.194c1.536 1.562 3.713 2.196 5.731 2.08.13-.005.35-.032.537-.073a2.627 2.627 0 0 0 .652-.24c.425-.26.75-.661.992-1.046.184-.294.342-.61.473-.915.197.193.412.357.627.493a5.022 5.022 0 0 0 1.97.709l.023.002.018.003.11.016c.088.014.205.035.325.058l.056.014c.088.022.164.04.235.061a1.736 1.736 0 0 1 .145.048l.03.014c.765.34 1.302 1.09 1.302 1.871a.75.75 0 0 0 1.5 0c0-1.456-.964-2.69-2.18-3.235-.212-.103-.5-.174-.679-.217l-.063-.015a10.616 10.616 0 0 0-.606-.105l-.02-.003-.03-.003h-.002a3.542 3.542 0 0 1-1.331-.485c-.471-.298-.788-.692-.828-1.234a.75.75 0 0 0-1.48-.106l-.001.003-.004.017a8.23 8.23 0 0 1-.092.352 9.963 9.963 0 0 1-.298.892c-.132.34-.29.68-.47.966-.174.276-.339.454-.478.549a1.178 1.178 0 0 1-.221.072 1.949 1.949 0 0 1-.241.036h-.013l-.032.002c-1.684.1-3.423-.437-4.604-1.65a.746.746 0 0 0-.053-.05L4.84 14.6a1.348 1.348 0 0 1-.07-.073 2.99 2.99 0 0 1-.293-.392c-.242-.379-.558-1.014-.778-1.985a54.1 54.1 0 0 0-.083-.376 27.494 27.494 0 0 1-.367-1.872l-.003-.02a6.791 6.791 0 0 1-.08-.67c.004-.277.086-.475.2-.609l.067-.067a.63.63 0 0 1 .292-.145h.05c.18 0 1.095.055 2.013.115l1.207.08.534.037a.747.747 0 0 0 .052.002c.782 0 1.349-.206 1.759-.585l.005-.005c.553-.52.622-1.225.622-1.76V6.24l-.026-.565A774.97 774.97 0 0 1 9.885 4.4c-.042-.961-.081-1.939-.081-2.13ZM4.995 6.953a251.126 251.126 0 0 1 2.102.137l.508.035c.48-.004.646-.122.715-.185.07-.068.146-.209.147-.649l-.024-.548a791.69 791.69 0 0 1-.095-2.187L4.995 6.953Zm16.122 9.996ZM15.638 11.626a.75.75 0 0 0 1.014.31 2.04 2.04 0 0 1 .304-.089 1.84 1.84 0 0 1 .544-.039c.215.023.321.06.37.085.033.016.039.026.047.04a.75.75 0 0 0 1.289-.767c-.337-.567-.906-.783-1.552-.85a3.334 3.334 0 0 0-1.002.062c-.27.056-.531.14-.705.234a.75.75 0 0 0-.31 1.014Z";--icon-box: "M1.01 4.148a.75.75 0 0 1 .75.75v4.348a4.437 4.437 0 0 1 2.988-1.153c1.734 0 3.23.992 3.978 2.438a4.478 4.478 0 0 1 3.978-2.438c2.49 0 4.488 2.044 4.488 4.543 0 2.5-1.999 4.544-4.488 4.544a4.478 4.478 0 0 1-3.978-2.438 4.478 4.478 0 0 1-3.978 2.438C2.26 17.18.26 15.135.26 12.636V4.898a.75.75 0 0 1 .75-.75Zm.75 8.488c0 1.692 1.348 3.044 2.988 3.044s2.989-1.352 2.989-3.044c0-1.691-1.349-3.043-2.989-3.043S1.76 10.945 1.76 12.636Zm10.944-3.043c-1.64 0-2.988 1.352-2.988 3.043 0 1.692 1.348 3.044 2.988 3.044s2.988-1.352 2.988-3.044c0-1.69-1.348-3.043-2.988-3.043Zm4.328-1.23a.75.75 0 0 1 1.052.128l2.333 2.983 2.333-2.983a.75.75 0 0 1 1.181.924l-2.562 3.277 2.562 3.276a.75.75 0 1 1-1.181.924l-2.333-2.983-2.333 2.983a.75.75 0 1 1-1.181-.924l2.562-3.276-2.562-3.277a.75.75 0 0 1 .129-1.052Z";--icon-onedrive: "M13.616 4.147a7.689 7.689 0 0 0-7.642 3.285A6.299 6.299 0 0 0 1.455 17.3c.684.894 2.473 2.658 5.17 2.658h12.141c.95 0 1.882-.256 2.697-.743.815-.486 1.514-1.247 1.964-2.083a5.26 5.26 0 0 0-3.713-7.612 7.69 7.69 0 0 0-6.098-5.373ZM3.34 17.15c.674.63 1.761 1.308 3.284 1.308h12.142a3.76 3.76 0 0 0 2.915-1.383l-7.494-4.489L3.34 17.15Zm10.875-6.25 2.47-1.038a5.239 5.239 0 0 1 1.427-.389 6.19 6.19 0 0 0-10.3-1.952 6.338 6.338 0 0 1 2.118.813l4.285 2.567Zm4.55.033c-.512 0-1.019.104-1.489.307l-.006.003-1.414.594 6.521 3.906a3.76 3.76 0 0 0-3.357-4.8l-.254-.01ZM4.097 9.617A4.799 4.799 0 0 1 6.558 8.9c.9 0 1.84.25 2.587.713l3.4 2.037-10.17 4.28a4.799 4.799 0 0 1 1.721-6.312Z";--icon-huddle: "M6.204 2.002c-.252.23-.357.486-.357.67V21.07c0 .15.084.505.313.812.208.28.499.477.929.477.519 0 .796-.174.956-.365.178-.212.286-.535.286-.924v-.013l.117-6.58c.004-1.725 1.419-3.883 3.867-3.883 1.33 0 2.332.581 2.987 1.364.637.762.95 1.717.95 2.526v6.47c0 .392.11.751.305.995.175.22.468.41 1.008.41.52 0 .816-.198 1.002-.437.207-.266.31-.633.31-.969V14.04c0-2.81-1.943-5.108-4.136-5.422a5.971 5.971 0 0 0-3.183.41c-.912.393-1.538.96-1.81 1.489a.75.75 0 0 1-1.417-.344v-7.5c0-.587-.47-1.031-1.242-1.031-.315 0-.638.136-.885.36ZM5.194.892A2.844 2.844 0 0 1 7.09.142c1.328 0 2.742.867 2.742 2.53v5.607a6.358 6.358 0 0 1 1.133-.629 7.47 7.47 0 0 1 3.989-.516c3.056.436 5.425 3.482 5.425 6.906v6.914c0 .602-.177 1.313-.627 1.89-.47.605-1.204 1.016-2.186 1.016-.96 0-1.698-.37-2.179-.973-.46-.575-.633-1.294-.633-1.933v-6.469c0-.456-.19-1.071-.602-1.563-.394-.471-.986-.827-1.836-.827-1.447 0-2.367 1.304-2.367 2.39v.014l-.117 6.58c-.001.64-.177 1.333-.637 1.881-.48.57-1.2.9-2.105.9-.995 0-1.7-.5-2.132-1.081-.41-.552-.61-1.217-.61-1.708V2.672c0-.707.366-1.341.847-1.78Z"}:where(.lr-wgt-l10n_en-US,.lr-wgt-common),:host{--l10n-locale-name: "en-US";--l10n-upload-file: "Upload file";--l10n-upload-files: "Upload files";--l10n-choose-file: "Choose file";--l10n-choose-files: "Choose files";--l10n-drop-files-here: "Drop files here";--l10n-select-file-source: "Select file source";--l10n-selected: "Selected";--l10n-upload: "Upload";--l10n-add-more: "Add more";--l10n-cancel: "Cancel";--l10n-start-from-cancel: var(--l10n-cancel);--l10n-clear: "Clear";--l10n-camera-shot: "Shot";--l10n-upload-url: "Import";--l10n-upload-url-placeholder: "Paste link here";--l10n-edit-image: "Edit image";--l10n-edit-detail: "Details";--l10n-back: "Back";--l10n-done: "Done";--l10n-ok: "Ok";--l10n-remove-from-list: "Remove";--l10n-no: "No";--l10n-yes: "Yes";--l10n-confirm-your-action: "Confirm your action";--l10n-are-you-sure: "Are you sure?";--l10n-selected-count: "Selected:";--l10n-upload-error: "Upload error";--l10n-validation-error: "Validation error";--l10n-no-files: "No files selected";--l10n-browse: "Browse";--l10n-not-uploaded-yet: "Not uploaded yet...";--l10n-file__one: "file";--l10n-file__other: "files";--l10n-error__one: "error";--l10n-error__other: "errors";--l10n-header-uploading: "Uploading {{count}} {{plural:file(count)}}";--l10n-header-failed: "{{count}} {{plural:error(count)}}";--l10n-header-succeed: "{{count}} {{plural:file(count)}} uploaded";--l10n-header-total: "{{count}} {{plural:file(count)}} selected";--l10n-src-type-local: "From device";--l10n-src-type-from-url: "From link";--l10n-src-type-camera: "Camera";--l10n-src-type-draw: "Draw";--l10n-src-type-facebook: "Facebook";--l10n-src-type-dropbox: "Dropbox";--l10n-src-type-gdrive: "Google Drive";--l10n-src-type-gphotos: "Google Photos";--l10n-src-type-instagram: "Instagram";--l10n-src-type-flickr: "Flickr";--l10n-src-type-vk: "VK";--l10n-src-type-evernote: "Evernote";--l10n-src-type-box: "Box";--l10n-src-type-onedrive: "Onedrive";--l10n-src-type-huddle: "Huddle";--l10n-src-type-other: "Other";--l10n-src-type: var(--l10n-src-type-local);--l10n-caption-from-url: "Import from link";--l10n-caption-camera: "Camera";--l10n-caption-draw: "Draw";--l10n-caption-edit-file: "Edit file";--l10n-file-no-name: "No name...";--l10n-toggle-fullscreen: "Toggle fullscreen";--l10n-toggle-guides: "Toggle guides";--l10n-rotate: "Rotate";--l10n-flip-vertical: "Flip vertical";--l10n-flip-horizontal: "Flip horizontal";--l10n-brightness: "Brightness";--l10n-contrast: "Contrast";--l10n-saturation: "Saturation";--l10n-resize: "Resize image";--l10n-crop: "Crop";--l10n-select-color: "Select color";--l10n-text: "Text";--l10n-draw: "Draw";--l10n-cancel-edit: "Cancel edit";--l10n-tab-view: "Preview";--l10n-tab-details: "Details";--l10n-file-name: "Name";--l10n-file-size: "Size";--l10n-cdn-url: "CDN URL";--l10n-file-size-unknown: "Unknown";--l10n-camera-permissions-denied: "Camera access denied";--l10n-camera-permissions-prompt: "Please allow access to the camera";--l10n-camera-permissions-request: "Request access";--l10n-files-count-limit-error-title: "Files count limit overflow";--l10n-files-count-limit-error-too-few: "You\2019ve chosen {{total}} {{plural:file(total)}}. At least {{min}} {{plural:file(min)}} required.";--l10n-files-count-limit-error-too-many: "You\2019ve chosen too many files. {{max}} {{plural:file(max)}} is maximum.";--l10n-files-max-size-limit-error: "File is too big. Max file size is {{maxFileSize}}.";--l10n-has-validation-errors: "File validation error ocurred. Please, check your files before upload.";--l10n-images-only-accepted: "Only image files are accepted.";--l10n-file-type-not-allowed: "Uploading of these file types is not allowed.";--l10n-some-files-were-not-uploaded: "Some files were not uploaded."}:where(.lr-wgt-theme,.lr-wgt-common),:host{--darkmode: 0;--h-foreground: 208;--s-foreground: 4%;--l-foreground: calc(10% + 78% * var(--darkmode));--h-background: 208;--s-background: 4%;--l-background: calc(97% - 85% * var(--darkmode));--h-accent: 211;--s-accent: 100%;--l-accent: calc(50% - 5% * var(--darkmode));--h-confirm: 137;--s-confirm: 85%;--l-confirm: 53%;--h-error: 358;--s-error: 100%;--l-error: 66%;--shadows: 1;--h-shadow: 0;--s-shadow: 0%;--l-shadow: 0%;--opacity-normal: .6;--opacity-hover: .9;--opacity-active: 1;--ui-size: 32px;--gap-min: 2px;--gap-small: 4px;--gap-mid: 10px;--gap-max: 20px;--gap-table: 0px;--borders: 1;--border-radius-element: 8px;--border-radius-frame: 12px;--border-radius-thumb: 6px;--transition-duration: .2s;--modal-max-w: 800px;--modal-max-h: 600px;--modal-normal-w: 430px;--darkmode-minus: calc(1 + var(--darkmode) * -2);--clr-background: hsl(var(--h-background), var(--s-background), var(--l-background));--clr-background-dark: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-background-light: hsl( var(--h-background), var(--s-background), calc(var(--l-background) + 3% * var(--darkmode-minus)) );--clr-accent: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 15% * var(--darkmode)));--clr-accent-light: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 30%);--clr-accent-lightest: hsla(var(--h-accent), var(--s-accent), var(--l-accent), 10%);--clr-accent-light-opaque: hsl(var(--h-accent), var(--s-accent), calc(var(--l-accent) + 45% * var(--darkmode-minus)));--clr-accent-lightest-opaque: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) + 47% * var(--darkmode-minus)) );--clr-confirm: hsl(var(--h-confirm), var(--s-confirm), var(--l-confirm));--clr-error: hsl(var(--h-error), var(--s-error), var(--l-error));--clr-error-light: hsla(var(--h-error), var(--s-error), var(--l-error), 15%);--clr-error-lightest: hsla(var(--h-error), var(--s-error), var(--l-error), 5%);--clr-error-message-bgr: hsl(var(--h-error), var(--s-error), calc(var(--l-error) + 31% * var(--darkmode-minus)));--clr-txt: hsl(var(--h-foreground), var(--s-foreground), var(--l-foreground));--clr-txt-mid: hsl(var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 20% * var(--darkmode-minus)));--clr-txt-light: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 30% * var(--darkmode-minus)) );--clr-txt-lightest: hsl( var(--h-foreground), var(--s-foreground), calc(var(--l-foreground) + 50% * var(--darkmode-minus)) );--clr-shade-lv1: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 5%);--clr-shade-lv2: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 8%);--clr-shade-lv3: hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), 12%);--clr-generic-file-icon: var(--clr-txt-lightest);--border-light: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.1 - .05 * var(--darkmode)) * var(--borders)) );--border-mid: 1px solid hsla( var(--h-foreground), var(--s-foreground), var(--l-foreground), calc((.2 - .1 * var(--darkmode)) * var(--borders)) );--border-accent: 1px solid hsla(var(--h-accent), var(--s-accent), var(--l-accent), 1 * var(--borders));--border-dashed: 1px dashed hsla(var(--h-foreground), var(--s-foreground), var(--l-foreground), calc(.2 * var(--borders)));--clr-curtain: hsla(var(--h-background), var(--s-background), calc(var(--l-background)), 60%);--hsl-shadow: var(--h-shadow), var(--s-shadow), var(--l-shadow);--modal-shadow: 0px 0px 1px hsla(var(--hsl-shadow), calc((.3 + .65 * var(--darkmode)) * var(--shadows))), 0px 6px 20px hsla(var(--hsl-shadow), calc((.1 + .4 * var(--darkmode)) * var(--shadows)));--clr-btn-bgr-primary: var(--clr-accent);--clr-btn-bgr-primary-hover: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 4% * var(--darkmode-minus)) );--clr-btn-bgr-primary-active: hsl( var(--h-accent), var(--s-accent), calc(var(--l-accent) - 8% * var(--darkmode-minus)) );--clr-btn-txt-primary: hsl(var(--h-accent), var(--s-accent), 98%);--shadow-btn-primary: none;--clr-btn-bgr-secondary: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 3% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-hover: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 7% * var(--darkmode-minus)) );--clr-btn-bgr-secondary-active: hsl( var(--h-background), var(--s-background), calc(var(--l-background) - 12% * var(--darkmode-minus)) );--clr-btn-txt-secondary: var(--clr-txt-mid);--shadow-btn-secondary: none;--clr-btn-bgr-disabled: var(--clr-background);--clr-btn-txt-disabled: var(--clr-txt-lightest);--shadow-btn-disabled: none}@media only screen and (max-height: 600px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-h: 100%}}@media only screen and (max-width: 430px){:where(.lr-wgt-theme,.lr-wgt-common),:host{--modal-max-w: 100vw;--modal-max-h: var(--uploadcare-blocks-window-height)}}:where(.lr-wgt-theme,.lr-wgt-common),:host{color:var(--clr-txt);font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}:where(.lr-wgt-theme,.lr-wgt-common) *,:host *{box-sizing:border-box}:where(.lr-wgt-theme,.lr-wgt-common) [hidden],:host [hidden]{display:none!important}:where(.lr-wgt-theme,.lr-wgt-common) [activity]:not([active]),:host [activity]:not([active]){display:none}:where(.lr-wgt-theme,.lr-wgt-common) dialog:not([open]) [activity],:host dialog:not([open]) [activity]{display:none}:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{display:flex;align-items:center;justify-content:center;height:var(--ui-size);padding-right:1.4em;padding-left:1.4em;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--border-radius-element);cursor:pointer;user-select:none}@media only screen and (max-width: 800px){:where(.lr-wgt-theme,.lr-wgt-common) button,:host button{padding-right:1em;padding-left:1em}}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn,:host button.primary-btn{color:var(--clr-btn-txt-primary);background-color:var(--clr-btn-bgr-primary);box-shadow:var(--shadow-btn-primary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:hover,:host button.primary-btn:hover{background-color:var(--clr-btn-bgr-primary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.primary-btn:active,:host button.primary-btn:active{background-color:var(--clr-btn-bgr-primary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn,:host button.secondary-btn{color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary);transition:background-color var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:hover,:host button.secondary-btn:hover{background-color:var(--clr-btn-bgr-secondary-hover)}:where(.lr-wgt-theme,.lr-wgt-common) button.secondary-btn:active,:host button.secondary-btn:active{background-color:var(--clr-btn-bgr-secondary-active)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn,:host button.mini-btn{width:var(--ui-size);height:var(--ui-size);padding:0;background-color:transparent;border:none;cursor:pointer;transition:var(--transition-duration) ease;color:var(--clr-txt)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:hover,:host button.mini-btn:hover{background-color:var(--clr-shade-lv1)}:where(.lr-wgt-theme,.lr-wgt-common) button.mini-btn:active,:host button.mini-btn:active{background-color:var(--clr-shade-lv2)}:where(.lr-wgt-theme,.lr-wgt-common) :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]),:host :is(button[disabled],button.primary-btn[disabled],button.secondary-btn[disabled]){color:var(--clr-btn-txt-disabled);background-color:var(--clr-btn-bgr-disabled);box-shadow:var(--shadow-btn-disabled);pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) a,:host a{color:var(--clr-accent);text-decoration:none}:where(.lr-wgt-theme,.lr-wgt-common) a[disabled],:host a[disabled]{pointer-events:none}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]{display:flex;width:100%;height:var(--ui-size);padding-right:.6em;padding-left:.6em;color:var(--clr-txt);font-size:1em;font-family:inherit;background-color:var(--clr-background-light);border:var(--border-light);border-radius:var(--border-radius-element);transition:var(--transition-duration)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text],:host input[type=text]::placeholder{color:var(--clr-txt-lightest)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:hover,:host input[type=text]:hover{border-color:var(--clr-accent-light)}:where(.lr-wgt-theme,.lr-wgt-common) input[type=text]:focus,:host input[type=text]:focus{border-color:var(--clr-accent);outline:none}:where(.lr-wgt-theme,.lr-wgt-common) input[disabled],:host input[disabled]{opacity:.6;pointer-events:none}lr-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--ui-size);height:var(--ui-size)}lr-icon svg{width:calc(var(--ui-size) / 2);height:calc(var(--ui-size) / 2)}lr-icon:not([raw]) path{fill:currentColor}lr-tabs{display:grid;grid-template-rows:min-content minmax(var(--ui-size),auto);height:100%;overflow:hidden;color:var(--clr-txt-lightest)}lr-tabs>.tabs-row{display:flex;grid-template-columns:minmax();background-color:var(--clr-background-light)}lr-tabs>.tabs-context{overflow-y:auto}lr-tabs .tabs-row>.tab{display:flex;flex-grow:1;align-items:center;justify-content:center;height:var(--ui-size);border-bottom:var(--border-light);cursor:pointer;transition:var(--transition-duration)}lr-tabs .tabs-row>.tab[current]{color:var(--clr-txt);border-color:var(--clr-txt)}lr-range{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--ui-size)}lr-range datalist{display:none}lr-range input{width:100%;height:100%;opacity:0}lr-range .track-wrapper{position:absolute;right:10px;left:10px;display:flex;align-items:center;justify-content:center;height:2px;user-select:none;pointer-events:none}lr-range .track{position:absolute;right:0;left:0;display:flex;align-items:center;justify-content:center;height:2px;background-color:currentColor;border-radius:2px;opacity:.5}lr-range .slider{position:absolute;width:16px;height:16px;background-color:currentColor;border-radius:100%;transform:translate(-50%)}lr-range .bar{position:absolute;left:0;height:100%;background-color:currentColor;border-radius:2px}lr-range .caption{position:absolute;display:inline-flex;justify-content:center}lr-color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--ui-size);height:var(--ui-size);overflow:hidden;background-color:var(--clr-background);cursor:pointer}lr-color[current]{background-color:var(--clr-txt)}lr-color input[type=color]{position:absolute;display:block;width:100%;height:100%;opacity:0}lr-color .current-color{position:absolute;width:50%;height:50%;border:2px solid #fff;border-radius:100%;pointer-events:none}lr-config{display:none}lr-simple-btn{position:relative;display:inline-flex}lr-simple-btn button{padding-left:.2em!important;color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary)}lr-simple-btn button lr-icon svg{transform:scale(.8)}lr-simple-btn button:hover{background-color:var(--clr-btn-bgr-secondary-hover)}lr-simple-btn button:active{background-color:var(--clr-btn-bgr-secondary-active)}lr-simple-btn>lr-drop-area{display:contents}lr-simple-btn .visual-drop-area{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--gap-min);border:var(--border-dashed);border-radius:inherit;opacity:0;transition:border-color var(--transition-duration) ease,background-color var(--transition-duration) ease,opacity var(--transition-duration) ease}lr-simple-btn .visual-drop-area:before{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--clr-txt-light);background-color:var(--clr-background);border-radius:inherit;content:var(--l10n-drop-files-here)}lr-simple-btn>lr-drop-area[drag-state=active] .visual-drop-area{background-color:var(--clr-accent-lightest);opacity:1}lr-simple-btn>lr-drop-area[drag-state=inactive] .visual-drop-area{background-color:var(--clr-shade-lv1);opacity:0}lr-simple-btn>lr-drop-area[drag-state=near] .visual-drop-area{background-color:var(--clr-accent-lightest);border-color:var(--clr-accent-light);opacity:1}lr-simple-btn>lr-drop-area[drag-state=over] .visual-drop-area{background-color:var(--clr-accent-lightest);border-color:var(--clr-accent);opacity:1}lr-simple-btn>:where(lr-drop-area[drag-state=active],lr-drop-area[drag-state=near],lr-drop-area[drag-state=over]) button{box-shadow:none}lr-simple-btn>lr-drop-area:after{content:""}lr-source-btn{display:flex;align-items:center;margin-bottom:var(--gap-min);padding:var(--gap-min) var(--gap-mid);color:var(--clr-txt-mid);border-radius:var(--border-radius-element);cursor:pointer;transition-duration:var(--transition-duration);transition-property:background-color,color;user-select:none}lr-source-btn:hover{color:var(--clr-accent);background-color:var(--clr-accent-lightest)}lr-source-btn:active{color:var(--clr-accent);background-color:var(--clr-accent-light)}lr-source-btn lr-icon{display:inline-flex;flex-grow:1;justify-content:center;min-width:var(--ui-size);margin-right:var(--gap-mid);opacity:.8}lr-source-btn[type=local]>.txt:after{content:var(--l10n-local-files)}lr-source-btn[type=camera]>.txt:after{content:var(--l10n-camera)}lr-source-btn[type=url]>.txt:after{content:var(--l10n-from-url)}lr-source-btn[type=other]>.txt:after{content:var(--l10n-other)}lr-source-btn .txt{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--ui-size);padding:0;white-space:nowrap;border:none}lr-drop-area{padding:var(--gap-min);overflow:hidden;border:var(--border-dashed);border-radius:var(--border-radius-frame);transition:var(--transition-duration) ease}lr-drop-area,lr-drop-area .content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}lr-drop-area .text{position:relative;margin:var(--gap-mid);color:var(--clr-txt-light);transition:var(--transition-duration) ease}lr-drop-area[ghost][drag-state=inactive]{display:none;opacity:0}lr-drop-area[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--clr-background)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.text,.icon-container){color:var(--clr-accent)}lr-drop-area:is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--clr-accent);background:var(--clr-accent-lightest);border-color:var(--clr-accent-light)}lr-drop-area:is([drag-state=active],[drag-state=near]){opacity:1}lr-drop-area[drag-state=over]{border-color:var(--clr-accent);opacity:1}lr-drop-area[with-icon]{min-height:calc(var(--ui-size) * 6)}lr-drop-area[with-icon] .content-wrapper{display:flex;flex-direction:column}lr-drop-area[with-icon] .text{color:var(--clr-txt);font-weight:500;font-size:1.1em}lr-drop-area[with-icon] .icon-container{position:relative;width:calc(var(--ui-size) * 2);height:calc(var(--ui-size) * 2);margin:var(--gap-mid);overflow:hidden;color:var(--clr-txt);background-color:var(--clr-background);border-radius:50%;transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon{position:absolute;top:calc(50% - var(--ui-size) / 2);left:calc(50% - var(--ui-size) / 2);transition:var(--transition-duration) ease}lr-drop-area[with-icon] lr-icon:last-child{transform:translateY(calc(var(--ui-size) * 1.5))}lr-drop-area[with-icon]:hover .icon-container,lr-drop-area[with-icon]:hover .text{color:var(--clr-accent)}lr-drop-area[with-icon]:hover .icon-container{background-color:var(--clr-accent-lightest)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .icon-container{color:#fff;background-color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .text{color:var(--clr-accent)}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[with-icon]>.content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) lr-icon:last-child{transform:translateY(0)}lr-drop-area[with-icon]>.content-wrapper[drag-state=near] lr-icon:last-child{transform:scale(1.3)}lr-drop-area[with-icon]>.content-wrapper[drag-state=over] lr-icon:last-child{transform:scale(1.5)}lr-drop-area[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--gap-mid) * 2);height:calc(100vh - var(--gap-mid) * 2);margin:var(--gap-mid)}lr-drop-area[fullscreen] .content-wrapper{width:100%;max-width:calc(var(--modal-normal-w) * .8);height:calc(var(--ui-size) * 6);color:var(--clr-txt);background-color:var(--clr-background-light);border-radius:var(--border-radius-frame);box-shadow:var(--modal-shadow);transition:var(--transition-duration) ease}lr-drop-area[with-icon][fullscreen][drag-state=active]>.content-wrapper,lr-drop-area[with-icon][fullscreen][drag-state=near]>.content-wrapper{transform:translateY(var(--gap-mid));opacity:0}lr-drop-area[with-icon][fullscreen][drag-state=over]>.content-wrapper{transform:translateY(0);opacity:1}:is(lr-drop-area[with-icon][fullscreen])>.content-wrapper lr-icon:first-child{transform:translateY(calc(var(--ui-size) * -1.5))}lr-drop-area[clickable]{cursor:pointer}lr-modal{--modal-max-content-height: calc(var(--uploadcare-blocks-window-height, 100vh) - 4 * var(--gap-mid) - var(--ui-size));--modal-content-height-fill: var(--uploadcare-blocks-window-height, 100vh)}lr-modal[dialog-fallback]{--lr-z-max: 2147483647;position:fixed;z-index:var(--lr-z-max);display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;pointer-events:none;inset:0}lr-modal[dialog-fallback] dialog[open]{z-index:var(--lr-z-max);pointer-events:auto}lr-modal[dialog-fallback] dialog[open]+.backdrop{position:fixed;top:0;left:0;z-index:calc(var(--lr-z-max) - 1);align-items:center;justify-content:center;width:100vw;height:100vh;background-color:var(--clr-curtain);pointer-events:auto}lr-modal[strokes][dialog-fallback] dialog[open]+.backdrop{background-image:var(--modal-backdrop-background-image)}@supports selector(dialog::backdrop){lr-modal>dialog::backdrop{background-color:#0000001a}lr-modal[strokes]>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}lr-modal>dialog[open]{transform:translateY(0);visibility:visible;opacity:1}lr-modal>dialog:not([open]){transform:translateY(20px);visibility:hidden;opacity:0}lr-modal>dialog{display:flex;flex-direction:column;width:max-content;max-width:min(calc(100% - var(--gap-mid) * 2),calc(var(--modal-max-w) - var(--gap-mid) * 2));min-height:var(--ui-size);max-height:calc(var(--modal-max-h) - var(--gap-mid) * 2);margin:auto;padding:0;overflow:hidden;background-color:var(--clr-background-light);border:0;border-radius:var(--border-radius-frame);box-shadow:var(--modal-shadow);transition:transform calc(var(--transition-duration) * 2)}@media only screen and (max-width: 430px),only screen and (max-height: 600px){lr-modal>dialog>.content{height:var(--modal-max-content-height)}}lr-url-source{display:block;background-color:var(--clr-background-light)}lr-modal lr-url-source{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2))}lr-url-source>.content{display:grid;grid-gap:var(--gap-small);grid-template-columns:1fr min-content;padding:var(--gap-mid);padding-top:0}lr-url-source .url-input{display:flex}lr-url-source .url-upload-btn:after{content:var(--l10n-upload-url)}lr-camera-source{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden;background-color:var(--clr-background-light);border-radius:var(--border-radius-element)}lr-modal lr-camera-source{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:100vh;max-height:var(--modal-max-content-height)}lr-camera-source.initialized{height:max-content}@media only screen and (max-width: 430px){lr-camera-source{width:calc(100vw - var(--gap-mid) * 2);height:var(--modal-content-height-fill, 100%)}}lr-camera-source video{display:block;width:100%;max-height:100%;object-fit:contain;object-position:center center;background-color:var(--clr-background-dark);border-radius:var(--border-radius-element)}lr-camera-source .toolbar{position:absolute;bottom:0;display:flex;justify-content:space-between;width:100%;padding:var(--gap-mid);background-color:var(--clr-background-light)}lr-camera-source .content{display:flex;flex:1;justify-content:center;width:100%;padding:var(--gap-mid);padding-top:0;overflow:hidden}lr-camera-source .message-box{--padding: calc(var(--gap-max) * 2);display:flex;flex-direction:column;grid-gap:var(--gap-max);align-items:center;justify-content:center;padding:var(--padding) var(--padding) 0 var(--padding);color:var(--clr-txt)}lr-camera-source .message-box button{color:var(--clr-btn-txt-primary);background-color:var(--clr-btn-bgr-primary)}lr-camera-source .shot-btn{position:absolute;bottom:var(--gap-max);width:calc(var(--ui-size) * 1.8);height:calc(var(--ui-size) * 1.8);color:var(--clr-background-light);background-color:var(--clr-txt);border-radius:50%;opacity:.85;transition:var(--transition-duration) ease}lr-camera-source .shot-btn:hover{transform:scale(1.05);opacity:1}lr-camera-source .shot-btn:active{background-color:var(--clr-txt-mid);opacity:1}lr-camera-source .shot-btn[disabled]{bottom:calc(var(--gap-max) * -1 - var(--gap-mid) - var(--ui-size) * 2)}lr-camera-source .shot-btn lr-icon svg{width:calc(var(--ui-size) / 1.5);height:calc(var(--ui-size) / 1.5)}lr-external-source{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--clr-background-light);overflow:hidden}lr-modal lr-external-source{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height)}lr-external-source>.content{position:relative;display:grid;flex:1;grid-template-rows:1fr min-content}@media only screen and (max-width: 430px){lr-external-source{width:calc(100vw - var(--gap-mid) * 2);height:var(--modal-content-height-fill, 100%)}}lr-external-source iframe{display:block;width:100%;height:100%;border:none}lr-external-source .iframe-wrapper{overflow:hidden}lr-external-source .toolbar{display:grid;grid-gap:var(--gap-mid);grid-template-columns:max-content 1fr max-content max-content;align-items:center;width:100%;padding:var(--gap-mid);border-top:var(--border-light)}lr-external-source .back-btn{padding-left:0}lr-external-source .back-btn:after{content:var(--l10n-back)}lr-external-source .selected-counter{display:flex;grid-gap:var(--gap-mid);align-items:center;justify-content:space-between;padding:var(--gap-mid);color:var(--clr-txt-light)}lr-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--clr-background-light);transition:opacity var(--transition-duration)}lr-modal lr-upload-list{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:max-content;max-height:var(--modal-max-content-height)}lr-upload-list .no-files{height:var(--ui-size);padding:var(--gap-max)}lr-upload-list .files{display:block;flex:1;min-height:var(--ui-size);padding:0 var(--gap-mid);overflow:auto}lr-upload-list .toolbar{display:flex;gap:var(--gap-small);justify-content:space-between;padding:var(--gap-mid);background-color:var(--clr-background-light)}lr-upload-list .toolbar .add-more-btn{padding-left:.2em}lr-upload-list .toolbar-spacer{flex:1}lr-upload-list lr-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--gap-mid) * 2);height:calc(100% - var(--gap-mid) * 2);margin:var(--gap-mid);border-radius:var(--border-radius-element)}lr-upload-list lr-activity-header>.header-text{padding:0 var(--gap-mid)}lr-upload-list .common-error{border-radius:var(--border-radius-element);color:var(--clr-error);background-color:var(--clr-error-message-bgr);display:flex;align-items:center;justify-content:center;padding:var(--gap-mid);margin:var(--gap-small) var(--gap-mid) 0 var(--gap-mid);font-size:.95em}lr-start-from{display:block;overflow-y:auto}lr-start-from .content{display:grid;grid-auto-flow:row;gap:var(--gap-max);width:100%;height:100%;padding:var(--gap-max);background-color:var(--clr-background-light)}lr-modal lr-start-from{width:min(calc(var(--modal-normal-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2))}lr-file-item{display:block}lr-file-item>.inner{position:relative;display:grid;grid-template-columns:32px 1fr max-content;gap:var(--gap-min);align-items:center;margin-bottom:var(--gap-small);padding:var(--gap-mid);overflow:hidden;font-size:.95em;background-color:var(--clr-background);border-radius:var(--border-radius-element);transition:var(--transition-duration)}lr-file-item:last-of-type>.inner{margin-bottom:0}lr-file-item>.inner[focused]{background-color:transparent}lr-file-item>.inner[uploading] .edit-btn{display:none}lr-file-item>:where(.inner[failed],.inner[limit-overflow]){background-color:var(--clr-error-lightest)}lr-file-item .thumb{position:relative;display:inline-flex;width:var(--ui-size);height:var(--ui-size);background-color:var(--clr-shade-lv1);background-position:center center;background-size:cover;border-radius:var(--border-radius-thumb)}lr-file-item .file-name-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--gap-mid);padding-left:var(--gap-mid);overflow:hidden;color:var(--clr-txt-light);transition:color var(--transition-duration)}lr-file-item .file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}lr-file-item .file-error{display:none;color:var(--clr-error);font-size:.85em;line-height:130%}lr-file-item button.remove-btn,lr-file-item button.edit-btn{color:var(--clr-txt-lightest)!important}lr-file-item button.upload-btn{display:none}lr-file-item button:hover{color:var(--clr-txt-light)}lr-file-item .badge{position:absolute;top:calc(var(--ui-size) * -.13);right:calc(var(--ui-size) * -.13);width:calc(var(--ui-size) * .44);height:calc(var(--ui-size) * .44);color:var(--clr-background-light);background-color:var(--clr-txt);border-radius:50%;transform:scale(.3);opacity:0;transition:var(--transition-duration) ease;display:flex;justify-content:center;align-items:center}lr-file-item>.inner:where([failed],[limit-overflow],[finished]) .badge{transform:scale(1);opacity:1}lr-file-item>.inner[finished] .badge{background-color:var(--clr-confirm)}lr-file-item>.inner:where([failed],[limit-overflow]) .badge{background-color:var(--clr-error)}lr-file-item>.inner:where([failed],[limit-overflow]) .file-error{display:block}lr-file-item .badge lr-icon,lr-file-item .badge lr-icon svg{width:100%;height:100%}lr-file-item .progress-bar{top:calc(100% - 2px);height:2px}lr-file-item .file-actions{display:flex;gap:var(--gap-min);align-items:center;justify-content:center}lr-upload-details{display:flex;flex-direction:column;width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height);overflow:hidden;background-color:var(--clr-background-light)}lr-upload-details>.content{position:relative;display:grid;flex:1;grid-template-rows:auto min-content}lr-upload-details lr-tabs .tabs-context{position:relative}lr-upload-details .toolbar{display:grid;grid-template-columns:min-content min-content 1fr min-content;gap:var(--gap-mid);padding:var(--gap-mid);border-top:var(--border-light)}lr-upload-details .toolbar[edit-disabled]{display:flex;justify-content:space-between}lr-upload-details .remove-btn{padding-left:.5em}lr-upload-details .detail-btn{padding-left:0;color:var(--clr-txt);background-color:var(--clr-background)}lr-upload-details .edit-btn{padding-left:.5em}lr-upload-details .details{padding:var(--gap-max)}lr-upload-details .info-block{padding-top:var(--gap-max);padding-bottom:calc(var(--gap-max) + var(--gap-table));color:var(--clr-txt);border-bottom:var(--border-light)}lr-upload-details .info-block:first-of-type{padding-top:0}lr-upload-details .info-block:last-of-type{border-bottom:none}lr-upload-details .info-block>.info-block_name{margin-bottom:.4em;color:var(--clr-txt-light);font-size:.8em}lr-upload-details .cdn-link[disabled]{pointer-events:none}lr-upload-details .cdn-link[disabled]:before{filter:grayscale(1);content:var(--l10n-not-uploaded-yet)}lr-file-preview{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}lr-file-preview>lr-img{display:contents}lr-file-preview>lr-img>.img-view{position:absolute;inset:0;width:100%;max-width:100%;height:100%;max-height:100%;object-fit:scale-down}lr-confirmation-dialog{display:block;padding:var(--gap-mid);padding-top:var(--gap-max)}lr-confirmation-dialog .message{display:flex;justify-content:center;padding:var(--gap-mid);padding-bottom:var(--gap-max);font-weight:500;font-size:1.1em}lr-confirmation-dialog .toolbar{display:grid;grid-template-columns:1fr 1fr;gap:var(--gap-mid);margin-top:var(--gap-mid)}lr-progress-bar-common{position:fixed;right:0;bottom:0;left:0;z-index:10000;display:block;height:var(--gap-mid);background-color:var(--clr-background);transition:opacity .3s}lr-progress-bar-common:not([active]){opacity:0;pointer-events:none}lr-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}lr-progress-bar .progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--clr-accent-light);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}lr-progress-bar .progress--hidden{opacity:0}lr-activity-header{display:flex;gap:var(--gap-mid);justify-content:space-between;padding:var(--gap-mid);color:var(--clr-txt);font-weight:500;font-size:1em;line-height:var(--ui-size)}lr-activity-header lr-icon{height:var(--ui-size)}lr-activity-header>*{display:flex;align-items:center}lr-activity-header button{display:inline-flex;align-items:center;justify-content:center;color:var(--clr-txt-mid)}lr-activity-header button:hover{background-color:var(--clr-background)}lr-activity-header button:active{background-color:var(--clr-background-dark)}lr-copyright{display:flex;align-items:flex-end}lr-copyright .credits{padding:0 var(--gap-mid) var(--gap-mid) calc(var(--gap-mid) * 1.5);color:var(--clr-txt-lightest);font-weight:400;font-size:.85em;opacity:.7;transition:var(--transition-duration) ease}lr-copyright .credits:hover{opacity:1}:host(.lr-cloud-image-editor) lr-icon,.lr-cloud-image-editor lr-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:host(.lr-cloud-image-editor) lr-icon svg,.lr-cloud-image-editor lr-icon svg{width:unset;height:unset}:host(.lr-cloud-image-editor) lr-icon:not([raw]) path,.lr-cloud-image-editor lr-icon:not([raw]) path{stroke-linejoin:round;fill:none;stroke:currentColor;stroke-width:1.2}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--icon-rotate: "M13.5.399902L12 1.9999l1.5 1.6M12.0234 2H14.4C16.3882 2 18 3.61178 18 5.6V8M4 17h9c.5523 0 1-.4477 1-1V7c0-.55228-.4477-1-1-1H4c-.55228 0-1 .44771-1 1v9c0 .5523.44771 1 1 1z";--icon-mirror: "M5.00042.399902l-1.5 1.599998 1.5 1.6M15.0004.399902l1.5 1.599998-1.5 1.6M3.51995 2H16.477M8.50042 16.7V6.04604c0-.30141-.39466-.41459-.5544-.159L1.28729 16.541c-.12488.1998.01877.459.2544.459h6.65873c.16568 0 .3-.1343.3-.3zm2.99998 0V6.04604c0-.30141.3947-.41459.5544-.159L18.7135 16.541c.1249.1998-.0187.459-.2544.459h-6.6587c-.1657 0-.3-.1343-.3-.3z";--icon-flip: "M19.6001 4.99993l-1.6-1.5-1.6 1.5m3.2 9.99997l-1.6 1.5-1.6-1.5M18 3.52337V16.4765M3.3 8.49993h10.654c.3014 0 .4146-.39466.159-.5544L3.459 1.2868C3.25919 1.16192 3 1.30557 3 1.5412v6.65873c0 .16568.13432.3.3.3zm0 2.99997h10.654c.3014 0 .4146.3947.159.5544L3.459 18.7131c-.19981.1248-.459-.0188-.459-.2544v-6.6588c0-.1657.13432-.3.3-.3z";--icon-sad: "M2 17c4.41828-4 11.5817-4 16 0M16.5 5c0 .55228-.4477 1-1 1s-1-.44772-1-1 .4477-1 1-1 1 .44772 1 1zm-11 0c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z";--icon-closeMax: "M3 3l14 14m0-14L3 17";--icon-crop: "M20 14H7.00513C6.45001 14 6 13.55 6 12.9949V0M0 6h13.0667c.5154 0 .9333.41787.9333.93333V20M14.5.399902L13 1.9999l1.5 1.6M13 2h2c1.6569 0 3 1.34315 3 3v2M5.5 19.5999l1.5-1.6-1.5-1.6M7 18H5c-1.65685 0-3-1.3431-3-3v-2";--icon-tuning: "M8 10h11M1 10h4M1 4.5h11m3 0h4m-18 11h11m3 0h4M12 4.5a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0M5 10a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0M12 15.5a1.5 1.5 0 103 0 1.5 1.5 0 10-3 0";--icon-filters: "M4.5 6.5a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0m-3.5 6a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0m7 0a5.5 5.5 0 1011 0 5.5 5.5 0 10-11 0";--icon-done: "M1 10.6316l5.68421 5.6842L19 4";--icon-original: "M0 40L40-.00000133";--icon-slider: "M0 10h11m0 0c0 1.1046.8954 2 2 2s2-.8954 2-2m-4 0c0-1.10457.8954-2 2-2s2 .89543 2 2m0 0h5";--icon-exposure: "M10 20v-3M2.92946 2.92897l2.12132 2.12132M0 10h3m-.07054 7.071l2.12132-2.1213M10 0v3m7.0705 14.071l-2.1213-2.1213M20 10h-3m.0705-7.07103l-2.1213 2.12132M5 10a5 5 0 1010 0 5 5 0 10-10 0";--icon-contrast: "M2 10a8 8 0 1016 0 8 8 0 10-16 0m8-8v16m8-8h-8m7.5977 2.5H10m6.24 2.5H10m7.6-7.5H10M16.2422 5H10";--icon-brightness: "M15 10c0 2.7614-2.2386 5-5 5m5-5c0-2.76142-2.2386-5-5-5m5 5h-5m0 5c-2.76142 0-5-2.2386-5-5 0-2.76142 2.23858-5 5-5m0 10V5m0 15v-3M2.92946 2.92897l2.12132 2.12132M0 10h3m-.07054 7.071l2.12132-2.1213M10 0v3m7.0705 14.071l-2.1213-2.1213M20 10h-3m.0705-7.07103l-2.1213 2.12132M14.3242 7.5H10m4.3242 5H10";--icon-gamma: "M17 3C9 6 2.5 11.5 2.5 17.5m0 0h1m-1 0v-1m14 1h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3 0h1m-3-14v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1m0 3v-1";--icon-enhance: "M19 13h-2m0 0c-2.2091 0-4-1.7909-4-4m4 4c-2.2091 0-4 1.7909-4 4m0-8V7m0 2c0 2.2091-1.7909 4-4 4m-2 0h2m0 0c2.2091 0 4 1.7909 4 4m0 0v2M8 8.5H6.5m0 0c-1.10457 0-2-.89543-2-2m2 2c-1.10457 0-2 .89543-2 2m0-4V5m0 1.5c0 1.10457-.89543 2-2 2M1 8.5h1.5m0 0c1.10457 0 2 .89543 2 2m0 0V12M12 3h-1m0 0c-.5523 0-1-.44772-1-1m1 1c-.5523 0-1 .44772-1 1m0-2V1m0 1c0 .55228-.44772 1-1 1M8 3h1m0 0c.55228 0 1 .44772 1 1m0 0v1";--icon-saturation: ' ';--icon-warmth: ' ';--icon-vibrance: ' '}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--l10n-cancel: "Cancel";--l10n-apply: "Apply";--l10n-brightness: "Brightness";--l10n-exposure: "Exposure";--l10n-gamma: "Gamma";--l10n-contrast: "Contrast";--l10n-saturation: "Saturation";--l10n-vibrance: "Vibrance";--l10n-warmth: "Warmth";--l10n-enhance: "Enhance";--l10n-original: "Original"}:host(.lr-cloud-image-editor),.lr-cloud-image-editor{--rgb-primary-accent: 6, 2, 196;--rgb-text-base: 0, 0, 0;--rgb-text-accent-contrast: 255, 255, 255;--rgb-fill-contrast: 255, 255, 255;--rgb-fill-shaded: 245, 245, 245;--rgb-shadow: 0, 0, 0;--rgb-error: 209, 81, 81;--opacity-shade-mid: .2;--color-primary-accent: rgb(var(--rgb-primary-accent));--color-text-base: rgb(var(--rgb-text-base));--color-text-accent-contrast: rgb(var(--rgb-text-accent-contrast));--color-text-soft: rgb(var(--rgb-fill-contrast));--color-text-error: rgb(var(--rgb-error));--color-fill-contrast: rgb(var(--rgb-fill-contrast));--color-modal-backdrop: rgba(var(--rgb-fill-shaded), .95);--color-image-background: rgba(var(--rgb-fill-shaded));--color-outline: rgba(var(--rgb-text-base), var(--opacity-shade-mid));--color-underline: rgba(var(--rgb-text-base), .08);--color-shade: rgba(var(--rgb-text-base), .02);--color-focus-ring: var(--color-primary-accent);--color-input-placeholder: rgba(var(--rgb-text-base), .32);--color-error: rgb(var(--rgb-error));--font-size-ui: 16px;--font-size-title: 18px;--font-weight-title: 500;--font-size-soft: 14px;--size-touch-area: 40px;--size-panel-heading: 66px;--size-ui-min-width: 130px;--size-line-width: 1px;--size-modal-width: 650px;--border-radius-connect: 2px;--border-radius-editor: 3px;--border-radius-thumb: 4px;--border-radius-ui: 5px;--border-radius-base: 6px;--cldtr-gap-min: 5px;--cldtr-gap-mid-1: 10px;--cldtr-gap-mid-2: 15px;--cldtr-gap-max: 20px;--opacity-min: var(--opacity-shade-mid);--opacity-mid: .1;--opacity-max: .05;--transition-duration-2: var(--transition-duration-all, .2s);--transition-duration-3: var(--transition-duration-all, .3s);--transition-duration-4: var(--transition-duration-all, .4s);--transition-duration-5: var(--transition-duration-all, .5s);--shadow-base: 0px 5px 15px rgba(var(--rgb-shadow), .1), 0px 1px 4px rgba(var(--rgb-shadow), .15);--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading);--transparent-pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);display:block;width:100%;height:100%;max-height:100%}:host(.lr-cloud-image-editor) :is([can-handle-paste]:hover,[can-handle-paste]:focus),.lr-cloud-image-editor :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste: "true"}:host(.lr-cloud-image-editor) :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover),.lr-cloud-image-editor :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect: var(--hover-filter) !important;--opacity-effect: var(--hover-opacity) !important;--color-effect: var(--hover-color-rgb) !important}:host(.lr-cloud-image-editor) :is([tabindex]:active,[with-effects]:active),.lr-cloud-image-editor :is([tabindex]:active,[with-effects]:active){--filter-effect: var(--down-filter) !important;--opacity-effect: var(--down-opacity) !important;--color-effect: var(--down-color-rgb) !important}:host(.lr-cloud-image-editor) :is([tabindex][active],[with-effects][active]),.lr-cloud-image-editor :is([tabindex][active],[with-effects][active]){--filter-effect: var(--active-filter) !important;--opacity-effect: var(--active-opacity) !important;--color-effect: var(--active-color-rgb) !important}:host(.lr-cloud-image-editor) [hidden-scrollbar]::-webkit-scrollbar,.lr-cloud-image-editor [hidden-scrollbar]::-webkit-scrollbar{display:none}:host(.lr-cloud-image-editor) [hidden-scrollbar],.lr-cloud-image-editor [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}:host(.lr-cloud-image-editor.editor_ON),.lr-cloud-image-editor.editor_ON{--modal-header-opacity: 0;--modal-header-height: 0px;--modal-toolbar-height: calc(var(--size-panel-heading) * 2)}:host(.lr-cloud-image-editor.editor_OFF),.lr-cloud-image-editor.editor_OFF{--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading)}:host(.lr-cloud-image-editor)>.wrapper,.lr-cloud-image-editor>.wrapper{--l-min-img-height: var(--modal-toolbar-height);--l-max-img-height: 100%;--l-edit-button-width: 120px;--l-toolbar-horizontal-padding: var(--cldtr-gap-mid-1);position:relative;display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto}@media only screen and (max-width: 800px){:host(.lr-cloud-image-editor)>.wrapper,.lr-cloud-image-editor>.wrapper{--l-edit-button-width: 70px;--l-toolbar-horizontal-padding: var(--cldtr-gap-min)}}:host(.lr-cloud-image-editor)>.wrapper>.viewport,.lr-cloud-image-editor>.wrapper>.viewport{display:flex;align-items:center;justify-content:center;overflow:hidden}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image{--viewer-image-opacity: 1;position:absolute;top:0;left:0;z-index:10;display:block;box-sizing:border-box;width:100%;height:100%;object-fit:scale-down;background-color:var(--color-image-background);transform:scale(1);opacity:var(--viewer-image-opacity);user-select:none;pointer-events:auto}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_visible_viewer,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_hidden_to_cropper,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_hidden_to_cropper{--viewer-image-opacity: 0;background-image:var(--transparent-pixel);transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container>.image.image_hidden_effects,.lr-cloud-image-editor>.wrapper>.viewport>.image_container>.image.image_hidden_effects{--viewer-image-opacity: 0;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4);pointer-events:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.image_container,.lr-cloud-image-editor>.wrapper>.viewport>.image_container{position:relative;display:block;width:100%;height:100%;background-color:var(--color-image-background);transition:var(--transition-duration-3)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar,.lr-cloud-image-editor>.wrapper>.toolbar{position:relative;transition:.3s}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content{position:absolute;bottom:0;left:0;box-sizing:border-box;width:100%;height:var(--modal-toolbar-height);min-height:var(--size-panel-heading);background-color:var(--color-fill-contrast)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content.toolbar_content__viewer,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content.toolbar_content__viewer{display:flex;align-items:center;justify-content:space-between;height:var(--size-panel-heading);padding-right:var(--l-toolbar-horizontal-padding);padding-left:var(--l-toolbar-horizontal-padding)}:host(.lr-cloud-image-editor)>.wrapper>.toolbar>.toolbar_content.toolbar_content__editor,.lr-cloud-image-editor>.wrapper>.toolbar>.toolbar_content.toolbar_content__editor{display:flex}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.info_pan,.lr-cloud-image-editor>.wrapper>.viewport>.info_pan{position:absolute;user-select:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.file_type_outer,.lr-cloud-image-editor>.wrapper>.viewport>.file_type_outer{position:absolute;z-index:2;display:flex;max-width:120px;transform:translate(-40px);user-select:none}:host(.lr-cloud-image-editor)>.wrapper>.viewport>.file_type_outer>.file_type,.lr-cloud-image-editor>.wrapper>.viewport>.file_type_outer>.file_type{padding:4px .8em}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash,.lr-cloud-image-editor>.wrapper>.network_problems_splash{position:absolute;z-index:4;display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--color-fill-contrast)}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_icon,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:rgba(var(--rgb-text-base),.6);background-color:rgba(var(--rgb-fill-shaded));border-radius:50%}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_text,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_content>.network_problems_text{margin-top:var(--cldtr-gap-max);font-size:var(--font-size-ui)}:host(.lr-cloud-image-editor)>.wrapper>.network_problems_splash>.network_problems_footer,.lr-cloud-image-editor>.wrapper>.network_problems_splash>.network_problems_footer{display:flex;align-items:center;justify-content:center;height:var(--size-panel-heading)}lr-crop-frame>.svg{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:inherit;transition:var(--transition-duration-3)}lr-crop-frame>.thumb{--idle-color-rgb: var(--color-text-base);--hover-color-rgb: var(--color-primary-accent);--focus-color-rgb: var(--color-primary-accent);--down-color-rgb: var(--color-primary-accent);--color-effect: var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}lr-crop-frame>.thumb--visible{opacity:1;pointer-events:auto}lr-crop-frame>.thumb--hidden{opacity:0;pointer-events:none}lr-crop-frame>.guides{transition:var(--transition-duration-3)}lr-crop-frame>.guides--hidden{opacity:0}lr-crop-frame>.guides--semi-hidden{opacity:.2}lr-crop-frame>.guides--visible{opacity:1}lr-editor-button-control,lr-editor-crop-button-control,lr-editor-filter-control,lr-editor-operation-control{--l-base-min-width: 40px;--l-base-height: var(--l-base-min-width);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--filter-effect: var(--idle-filter);--idle-color-rgb: var(--rgb-text-base);--idle-opacity: .05;--idle-filter: 1;--hover-color-rgb: var(--idle-color-rgb);--hover-opacity: .08;--hover-filter: .8;--down-color-rgb: var(--hover-color-rgb);--down-opacity: .12;--down-filter: .6;position:relative;display:grid;grid-template-columns:var(--l-base-min-width) auto;align-items:center;height:var(--l-base-height);color:rgba(var(--idle-color-rgb));outline:none;cursor:pointer;transition:var(--l-width-transition)}lr-editor-button-control.active,lr-editor-operation-control.active,lr-editor-crop-button-control.active,lr-editor-filter-control.active{--idle-color-rgb: var(--rgb-primary-accent)}lr-editor-filter-control.not_active .preview[loaded]{opacity:1}lr-editor-filter-control.active .preview{opacity:0}lr-editor-button-control.not_active,lr-editor-operation-control.not_active,lr-editor-crop-button-control.not_active,lr-editor-filter-control.not_active{--idle-color-rgb: var(--rgb-text-base)}lr-editor-button-control>.before,lr-editor-operation-control>.before,lr-editor-crop-button-control>.before,lr-editor-filter-control>.before{position:absolute;right:0;left:0;z-index:-1;width:100%;height:100%;background-color:rgba(var(--color-effect),var(--opacity-effect));border-radius:var(--border-radius-editor);transition:var(--transition-duration-3)}lr-editor-button-control>.title,lr-editor-operation-control>.title,lr-editor-crop-button-control>.title,lr-editor-filter-control>.title{padding-right:var(--cldtr-gap-mid-1);font-size:.7em;letter-spacing:1.004px;text-transform:uppercase}lr-editor-filter-control>.preview{position:absolute;right:0;left:0;z-index:1;width:100%;height:var(--l-base-height);background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);opacity:0;filter:brightness(var(--filter-effect));transition:var(--transition-duration-3)}lr-editor-filter-control>.original-icon{color:var(--color-text-base);opacity:.3}lr-editor-image-cropper{position:absolute;top:0;left:0;z-index:10;display:block;width:100%;height:100%;opacity:0;pointer-events:none;touch-action:none}lr-editor-image-cropper.active_from_editor{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}lr-editor-image-cropper.active_from_viewer{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}lr-editor-image-cropper.inactive_to_editor{opacity:0;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s);pointer-events:none}lr-editor-image-cropper>.canvas{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%}lr-editor-image-fader{position:absolute;top:0;left:0;display:block;width:100%;height:100%}lr-editor-image-fader.active_from_viewer{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-start);pointer-events:auto}lr-editor-image-fader.active_from_cropper{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:auto}lr-editor-image-fader.inactive_to_cropper{z-index:3;transform:scale(1);opacity:0;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}lr-editor-image-fader .fader-image{position:absolute;top:0;left:0;display:block;width:100%;height:100%;object-fit:scale-down;transform:scale(1);user-select:none;content-visibility:auto}lr-editor-image-fader .fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);transform:scale(1);opacity:0;transition:var(--transition-duration-3)}lr-editor-scroller{display:flex;align-items:center;width:100%;height:100%;overflow-x:scroll}lr-editor-slider{display:flex;align-items:center;justify-content:center;width:100%;height:66px}lr-editor-toolbar{position:relative;width:100%;height:100%}@media only screen and (max-width: 600px){lr-editor-toolbar{--l-tab-gap: var(--cldtr-gap-mid-1);--l-slider-padding: var(--cldtr-gap-min);--l-controls-padding: var(--cldtr-gap-min)}}@media only screen and (min-width: 601px){lr-editor-toolbar{--l-tab-gap: calc(var(--cldtr-gap-mid-1) + var(--cldtr-gap-max));--l-slider-padding: var(--cldtr-gap-mid-1);--l-controls-padding: var(--cldtr-gap-mid-1)}}lr-editor-toolbar>.toolbar-container{position:relative;width:100%;height:100%;overflow:hidden}lr-editor-toolbar>.toolbar-container>.sub-toolbar{position:absolute;display:grid;grid-template-rows:1fr 1fr;width:100%;height:100%;background-color:var(--color-fill-contrast);transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--visible{transform:translateY(0);opacity:1;pointer-events:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--top-hidden{transform:translateY(100%);opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar.sub-toolbar--bottom-hidden{transform:translateY(-100%);opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row{display:flex;align-items:center;justify-content:space-between;padding-right:var(--l-controls-padding);padding-left:var(--l-controls-padding)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles{position:relative;display:grid;grid-auto-flow:column;grid-gap:0px var(--l-tab-gap);align-items:center;height:100%}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggles_indicator{position:absolute;bottom:0;left:0;width:var(--size-touch-area);height:2px;background-color:var(--color-primary-accent);transform:translate(0);transition:transform var(--transition-duration-3)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row{position:relative}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;overflow:hidden;opacity:0;content-visibility:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content.tab-content--visible{opacity:1;pointer-events:auto}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content.tab-content--hidden{opacity:0;pointer-events:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggle.tab-toggle--visible{display:contents}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles>.tab-toggle.tab-toggle--hidden{display:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.controls-row>.tab-toggles.tab-toggles--hidden{display:none}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_align{display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;box-sizing:border-box;min-width:100%;padding-left:var(--cldtr-gap-max)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_inner{display:grid;grid-area:inner;grid-auto-flow:column;grid-gap:calc((var(--cldtr-gap-min) - 1px) * 3)}lr-editor-toolbar>.toolbar-container>.sub-toolbar>.tab-content-row>.tab-content .controls-list_inner:last-child{padding-right:var(--cldtr-gap-max)}lr-editor-toolbar .controls-list_last-item{margin-right:var(--cldtr-gap-max)}lr-editor-toolbar .info-tooltip_container{position:absolute;display:flex;align-items:flex-start;justify-content:center;width:100%;height:100%}lr-editor-toolbar .info-tooltip_wrapper{position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2));display:flex;flex-direction:column;justify-content:flex-end;height:100%;pointer-events:none}lr-editor-toolbar .info-tooltip{z-index:3;padding-top:calc(var(--cldtr-gap-min) / 2);padding-right:var(--cldtr-gap-min);padding-bottom:calc(var(--cldtr-gap-min) / 2);padding-left:var(--cldtr-gap-min);color:var(--color-text-base);font-size:.7em;letter-spacing:1px;text-transform:uppercase;background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);transform:translateY(100%);opacity:0;transition:var(--transition-duration-3)}lr-editor-toolbar .info-tooltip_visible{transform:translateY(0);opacity:1}lr-editor-toolbar .slider{padding-right:var(--l-slider-padding);padding-left:var(--l-slider-padding)}lr-btn-ui{--filter-effect: var(--idle-brightness);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--l-transition-effect: var(--css-transition, color var(--transition-duration-2), filter var(--transition-duration-2));display:inline-flex;align-items:center;box-sizing:var(--css-box-sizing, border-box);height:var(--css-height, var(--size-touch-area));padding-right:var(--css-padding-right, var(--cldtr-gap-mid-1));padding-left:var(--css-padding-left, var(--cldtr-gap-mid-1));color:rgba(var(--color-effect),var(--opacity-effect));outline:none;cursor:pointer;filter:brightness(var(--filter-effect));transition:var(--l-transition-effect);user-select:none}lr-btn-ui .text{white-space:nowrap}lr-btn-ui .icon{display:flex;align-items:center;justify-content:center;color:rgba(var(--color-effect),var(--opacity-effect));filter:brightness(var(--filter-effect));transition:var(--l-transition-effect)}lr-btn-ui .icon_left{margin-right:var(--cldtr-gap-mid-1);margin-left:0}lr-btn-ui .icon_right{margin-right:0;margin-left:var(--cldtr-gap-mid-1)}lr-btn-ui .icon_single{margin-right:0;margin-left:0}lr-btn-ui .icon_hidden{display:none;margin:0}lr-btn-ui.primary{--idle-color-rgb: var(--rgb-primary-accent);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--idle-color-rgb);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: .75;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-btn-ui.boring{--idle-color-rgb: var(--rgb-text-base);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--rgb-text-base);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: 1;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-btn-ui.default{--idle-color-rgb: var(--rgb-text-base);--idle-brightness: 1;--idle-opacity: .6;--hover-color-rgb: var(--rgb-primary-accent);--hover-brightness: 1;--hover-opacity: 1;--down-color-rgb: var(--hover-color-rgb);--down-brightness: .75;--down-opacity: 1;--active-color-rgb: var(--rgb-primary-accent);--active-brightness: 1;--active-opacity: 1}lr-line-loader-ui{position:absolute;top:0;left:0;z-index:9999;width:100%;height:2px;opacity:.5}lr-line-loader-ui .inner{width:25%;max-width:200px;height:100%}lr-line-loader-ui .line{width:100%;height:100%;background-color:var(--color-primary-accent);transform:translate(-101%);transition:transform 1s}lr-slider-ui{--l-thumb-size: 24px;--l-zero-dot-size: 5px;--l-zero-dot-offset: 2px;--idle-color-rgb: var(--rgb-text-base);--hover-color-rgb: var(--rgb-primary-accent);--down-color-rgb: var(--rgb-primary-accent);--color-effect: var(--idle-color-rgb);--l-color: rgb(var(--color-effect));position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset)) * 2)}lr-slider-ui .thumb{position:absolute;left:0;width:var(--l-thumb-size);height:var(--l-thumb-size);background-color:var(--l-color);border-radius:50%;transform:translate(0);opacity:1;transition:opacity var(--transition-duration-2)}lr-slider-ui .steps{position:absolute;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:100%;padding-right:calc(var(--l-thumb-size) / 2);padding-left:calc(var(--l-thumb-size) / 2)}lr-slider-ui .border-step{width:0px;height:10px;border-right:1px solid var(--l-color);opacity:.6;transition:var(--transition-duration-2)}lr-slider-ui .minor-step{width:0px;height:4px;border-right:1px solid var(--l-color);opacity:.2;transition:var(--transition-duration-2)}lr-slider-ui .zero-dot{position:absolute;top:calc(100% - var(--l-zero-dot-offset) * 2);left:calc(var(--l-thumb-size) / 2 - var(--l-zero-dot-size) / 2);width:var(--l-zero-dot-size);height:var(--l-zero-dot-size);background-color:var(--color-primary-accent);border-radius:50%;opacity:0;transition:var(--transition-duration-3)}lr-slider-ui .input{position:absolute;width:calc(100% - 10px);height:100%;margin:0;cursor:pointer;opacity:0}lr-presence-toggle.transition{transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}lr-presence-toggle.visible{opacity:1;pointer-events:inherit}lr-presence-toggle.hidden{opacity:0;pointer-events:none}ctx-provider{--color-text-base: black;--color-primary-accent: blue;display:flex;align-items:center;justify-content:center;width:190px;height:40px;padding-right:10px;padding-left:10px;background-color:#f5f5f5;border-radius:3px}lr-cloud-image-editor-activity{position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:var(--clr-background-light)}lr-modal lr-cloud-image-editor-activity{width:min(calc(var(--modal-max-w) - var(--gap-mid) * 2),calc(100vw - var(--gap-mid) * 2));height:var(--modal-content-height-fill, 100%)}lr-select{display:inline-flex}lr-select>button{position:relative;display:inline-flex;align-items:center;padding-right:0!important;color:var(--clr-btn-txt-secondary);background-color:var(--clr-btn-bgr-secondary);box-shadow:var(--shadow-btn-secondary)}lr-select>button>select{position:absolute;display:block;width:100%;height:100%;opacity:0} diff --git a/pyuploadcare/dj/static/uploadcare/uc-file-uploader-inline.min.css b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-inline.min.css new file mode 100644 index 00000000..d3efe328 --- /dev/null +++ b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-inline.min.css @@ -0,0 +1 @@ +:where([uc-wgt-common]){--cfg-init-activity: "start-from";--cfg-done-activity: ""}:where([uc-wgt-common]){--uc-font-family: system-ui;--uc-font-size: 14px;--uc-line-height: normal;--uc-simple-btn-font-family: system-ui;--uc-simple-btn-font-size: 14px;--uc-button-size: 32px;--uc-preview-size: 32px;--uc-padding: 10px;--uc-radius: 8px;--uc-transition: .2s ease;--uc-dialog-width: 430px;--uc-dialog-max-width: 800px;--uc-dialog-max-height: 600px;--uc-simple-btn-padding: 7px 14px;--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}@supports not (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light: 54 112 253;--uc-primary-light: rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light: rgb(var(--uc-primary-rgb-light) / 90%);--uc-primary-transparent-light: rgb(var(--uc-primary-rgb-light) / 10%);--uc-background-light: rgb(255 255 255);--uc-foreground-light: rgb(24 24 24);--uc-primary-foreground-light: #fff;--uc-secondary-light: rgb(24 24 24 / 5%);--uc-secondary-hover-light: rgb(24 24 24 / 8%);--uc-secondary-foreground-light: rgb(24 24 24);--uc-muted-light: rgb(245 245 245);--uc-muted-foreground-light: rgb(113 113 113);--uc-destructive-light: rgb(232 19 20 / 5%);--uc-destructive-foreground-light: rgb(232 19 20);--uc-border-light: rgb(228 228 232);--uc-dialog-shadow-light: 0px 6px 20px rgb(0 0 0 / 10%);--uc-simple-btn-light: rgb(235 235 235);--uc-simple-btn-hover-light: rgb(228 228 228);--uc-simple-btn-foreground-light: rgb(24 24 24);--uc-primary-rgb-dark: 87 154 255;--uc-primary-dark: rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark: rgb(var(--uc-primary-rgb-dark) / 90%);--uc-primary-transparent-dark: rgb(var(--uc-primary-rgb-dark) / 7%);--uc-background-dark: rgb(27 27 27);--uc-foreground-dark: rgb(225 225 225);--uc-primary-foreground-dark: rgb(0 0 0);--uc-secondary-dark: rgb(225 225 225 / 7%);--uc-secondary-hover-dark: rgb(225 225 225 / 10%);--uc-secondary-foreground-dark: rgb(225 225 225);--uc-muted-dark: rgb(36 36 36);--uc-muted-foreground-dark: rgb(152 152 152);--uc-destructive-dark: rgb(244 90 79 / 10%);--uc-destructive-foreground-dark: rgb(244 90 79);--uc-border-dark: rgb(61 61 61);--uc-dialog-shadow-dark: 0px 6px 20px rgb(0 0 0 / 25%);--uc-simple-btn-dark: rgb(36 36 36);--uc-simple-btn-hover-dark: rgb(43 43 43);--uc-simple-btn-foreground-dark: rgb(255 255 255)}}@supports (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light: 59% .22 264;--uc-primary-light: oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light: oklch(var(--uc-primary-oklch-light) / 90%);--uc-primary-transparent-light: oklch(var(--uc-primary-oklch-light) / 10%);--uc-background-light: oklch(100% 0 0);--uc-foreground-light: oklch(21% 0 0);--uc-primary-foreground-light: oklch(100% 0 0);--uc-secondary-light: oklch(21% 0 0 / .05);--uc-secondary-hover-light: oklch(21% 0 0 / .08);--uc-secondary-foreground-light: oklch(21% 0 0);--uc-muted-light: oklch(97% 0 0);--uc-muted-foreground-light: oklch(55% 0 0);--uc-destructive-light: oklch(59% .235 28.5 / .05);--uc-destructive-foreground-light: oklch(59% .235 28.5);--uc-border-light: oklch(92% 0 0);--uc-dialog-shadow-light: 0px 6px 20px oklch(0% 0 0 / .1);--uc-simple-btn-light: oklch(94% 0 0);--uc-simple-btn-hover-light: oklch(92% 0 0);--uc-simple-btn-foreground-light: oklch(20% 0 0);--uc-primary-oklch-dark: 69% .1768 258.4;--uc-primary-dark: oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark: oklch(var(--uc-primary-oklch-dark) / 90%);--uc-primary-transparent-dark: oklch(var(--uc-primary-oklch-dark) / 7%);--uc-background-dark: oklch(22% 0 0);--uc-foreground-dark: oklch(91% 0 0);--uc-primary-foreground-dark: oklch(0% 0 0);--uc-secondary-dark: oklch(91% 0 0 / .07);--uc-secondary-hover-dark: oklch(91% 0 0 / .1);--uc-secondary-foreground-dark: oklch(91% 0 0);--uc-muted-dark: oklch(26% 0 0);--uc-muted-foreground-dark: oklch(68% 0 0);--uc-destructive-dark: oklch(67% .191 27.5 / .1);--uc-destructive-foreground-dark: oklch(67% .191 27.5);--uc-border-dark: oklch(36% 0 0);--uc-dialog-shadow-dark: 0px 6px 20px oklch(0% 0 0 / .25);--uc-simple-btn-dark: oklch(26% 0 0);--uc-simple-btn-hover-dark: oklch(29% 0 0);--uc-simple-btn-foreground-dark: oklch(100% 0 0)}}@media only screen and (max-height: 600px){:where([uc-wgt-common]){--uc-dialog-max-height: 100%}}@media only screen and (max-width: 430px){:where([uc-wgt-common]){--uc-dialog-max-width: 100vw;--uc-dialog-max-height: var(--uploadcare-blocks-window-height)}}@media (prefers-color-scheme: light){:where([uc-wgt-common]){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme: dark){:where([uc-wgt-common]){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light: 59% .22 300;--uc-primary-oklch-dark: 69% .1768 300}:where(.uc-red){--uc-primary-oklch-light: 59% .22 21;--uc-primary-oklch-dark: 69% .1768 21}:where(.uc-orange){--uc-primary-oklch-light: 59% .1724 51.88;--uc-primary-oklch-dark: 69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light: 59% .1724 130;--uc-primary-oklch-dark: 69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light: 59% .1523 174;--uc-primary-oklch-dark: 69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light: 10% 0 0;--uc-primary-oklch-dark: 97% 0 0}:where([uc-wgt-common]){color:var(--uc-foreground);font-size:var(--uc-font-size);line-height:var(--uc-line-height);font-family:var(--uc-font-family)}:where([uc-wgt-common]) *{box-sizing:border-box}:where([uc-wgt-common]) [hidden]{display:none!important}:where([uc-wgt-common]) [activity]:not([active]){display:none}:where([uc-wgt-common]) dialog:not([open]) [activity]{display:none}:where([uc-wgt-common]) button{display:flex;align-items:center;justify-content:center;height:var(--uc-button-size);padding-right:14px;padding-left:14px;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--uc-radius);cursor:pointer;user-select:none;transition:background-color var(--uc-transition)}:where([uc-wgt-common]) button.uc-primary-btn{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-wgt-common]) button.uc-primary-btn:hover{background-color:var(--uc-primary-hover)}:where([uc-wgt-common]) button.uc-secondary-btn{color:var(--uc-secondary-foreground);background-color:var(--uc-secondary)}:where([uc-wgt-common]) button.uc-secondary-btn:hover{background-color:var(--uc-secondary-hover)}:where([uc-wgt-common]) button.uc-mini-btn{height:var(--uc-button-size);padding:0;background-color:transparent;color:var(--uc-secondary-foreground)}:where([uc-wgt-common]) button.uc-mini-btn:hover{background-color:var(--uc-secondary)}:where([uc-wgt-common]) :is(button[disabled],button.uc-primary-btn[disabled],button.uc-secondary-btn[disabled]){opacity:.5;pointer-events:none}:where([uc-wgt-common]) a{color:var(--uc-primary);text-decoration:none}:where([uc-wgt-common]) a[disabled]{pointer-events:none}:where([uc-wgt-common]) input[type=text]{display:flex;width:100%;height:var(--uc-button-size);padding-right:10px;padding-left:10px;color:var(--uc-foreground);font-size:1em;font-family:inherit;background-color:var(--uc-background);border:1px solid var(--uc-border);outline:1px solid transparent;border-radius:var(--uc-radius);transition:border-color var(--uc-transition),outline-color var(--uc-transition)}:where([uc-wgt-common]) input[type=text]::placeholder{color:var(--uc-muted-foreground)}:where([uc-wgt-common]) input[type=text]:focus{outline-color:var(--uc-primary-hover);border-color:var(--uc-primary-hover)}:where([uc-wgt-common]) input[disabled]{opacity:.6;pointer-events:none}uc-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--uc-button-size);height:var(--uc-button-size)}uc-icon svg{width:calc(var(--uc-button-size) / 2);height:calc(var(--uc-button-size) / 2)}uc-range{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--uc-button-size)}uc-range datalist{display:none}uc-range input{width:100%;height:100%;opacity:0}uc-range .uc-track-wrapper{position:absolute;right:10px;left:10px;display:flex;align-items:center;justify-content:center;height:2px;user-select:none;pointer-events:none}uc-range .uc-track{position:absolute;right:0;left:0;display:flex;align-items:center;justify-content:center;height:2px;background-color:currentColor;border-radius:2px;opacity:.5}uc-range .uc-slider{position:absolute;width:16px;height:16px;background-color:currentColor;border-radius:100%;transform:translate(-50%)}uc-range .uc-bar{position:absolute;left:0;height:100%;background-color:currentColor;border-radius:2px}uc-range .uc-caption{position:absolute;display:inline-flex;justify-content:center}uc-config{display:none}:where([uc-simple-btn]){position:relative;display:inline-flex}:where([uc-simple-btn]) button{height:auto;gap:.5em;padding:var(--uc-simple-btn-padding);background-color:var(--uc-simple-btn);color:var(--uc-simple-btn-foreground);font-size:var(--uc-simple-btn-font-size);font-family:var(--uc-simple-btn-font-family)}:where([uc-simple-btn]) button uc-icon{width:auto;height:auto}:where([uc-simple-btn]) button uc-icon svg{width:.9em;height:.9em}:where([uc-simple-btn]) button:hover{background-color:var(--uc-simple-btn-hover)}:where([uc-simple-btn])>uc-drop-area{display:contents}:where([uc-simple-btn]) .uc-visual-drop-area{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--uc-simple-btn-padding);background-color:transparent;color:transparent;font-size:var(--uc-simple-btn-font-size);border:1px dashed var(--uc-simple-btn-foreground);border-radius:inherit;opacity:0;transition:opacity var(--uc-transition)}:where([uc-simple-btn])>uc-drop-area[drag-state=active] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn])>uc-drop-area[drag-state=inactive] .uc-visual-drop-area{opacity:0}:where([uc-simple-btn])>uc-drop-area[drag-state=near] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn])>uc-drop-area[drag-state=over] .uc-visual-drop-area{opacity:1}uc-source-btn>button{display:flex;align-items:center;margin-bottom:2px;padding:2px var(--uc-padding);color:var(--uc-foreground);border-radius:var(--uc-radius);cursor:pointer;transition:background-color var(--uc-transition),color var(--uc-transition);user-select:none;width:100%;background-color:unset;height:unset}uc-source-btn:last-child>button{margin-bottom:0}uc-source-btn>button:hover{color:var(--uc-primary);background-color:var(--uc-primary-transparent)}uc-source-btn uc-icon{display:inline-flex;flex-grow:1;justify-content:center;min-width:var(--uc-button-size);margin-right:var(--uc-padding);opacity:.8}uc-source-btn .uc-txt{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--uc-button-size);padding:0;white-space:nowrap;border:none}:where([uc-drop-area]){padding:2px;overflow:hidden;border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius) * 1.75);transition:border var(--uc-transition),border-radius var(--uc-transition)}:where([uc-drop-area]),:where([uc-drop-area]) .uc-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:where([uc-drop-area]) .uc-text{position:relative;margin:var(--uc-padding);color:var(--uc-muted-foreground);transition:color var(--uc-transition)}:where([uc-drop-area])[ghost][drag-state=inactive]{display:none}:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--uc-background)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.uc-text,.uc-icon-container){color:var(--uc-primary)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--uc-primary);background:var(--uc-primary-transparent);border-color:var(--uc-primary-transparent)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near]){opacity:1}:where([uc-drop-area])[drag-state=over]{border-color:var(--uc-primary);opacity:1}:where([uc-drop-area])[with-icon]{min-height:180px}:where([uc-drop-area])[with-icon] .uc-content-wrapper{display:flex;flex-direction:column}:where([uc-drop-area])[with-icon] .uc-text{color:var(--uc-foreground);font-weight:500;font-size:1.1em}:where([uc-drop-area])[with-icon] .uc-icon-container{position:relative;width:64px;height:64px;margin:var(--uc-padding);overflow:hidden;color:var(--uc-foreground);background-color:var(--uc-muted);border-radius:50%;transition:color var(--uc-transition),background-color var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon{position:absolute;width:32px;height:32px;top:calc(50% - 16px);left:calc(50% - 16px);transition:transform var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon:last-child{transform:translateY(48px)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container,:where([uc-drop-area])[with-icon]:hover .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container{background-color:var(--uc-primary-transparent)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-icon-container{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:last-child{transform:translateY(0)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=near] uc-icon:last-child{transform:scale(1.3)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=over] uc-icon:last-child{transform:scale(1.5)}:where([uc-drop-area])[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--uc-padding) * 2);height:calc(100vh - var(--uc-padding) * 2);margin:var(--uc-padding)}:where([uc-drop-area])[fullscreen] .uc-content-wrapper{width:100%;max-width:calc(var(--uc-dialog-width) * .8);height:180px;color:var(--uc-foreground);background-color:var(--uc-background);border-radius:calc(var(--uc-radius) * 1.75);box-shadow:var(--uc-dialog-shadow);transition:color var(--uc-transition),background-color var(--uc-transition),box-shadow var(--uc-transition),border-radius var(--uc-transition),transform var(--uc-transition)}:where([uc-drop-area])[with-icon][fullscreen][drag-state=active]>.uc-content-wrapper,:where([uc-drop-area])[with-icon][fullscreen][drag-state=near]>.uc-content-wrapper{transform:translateY(10px);opacity:0}:where([uc-drop-area])[with-icon][fullscreen][drag-state=over]>.uc-content-wrapper{transform:translateY(0);opacity:1}:is(:where([uc-drop-area])[with-icon][fullscreen])>.uc-content-wrapper uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[clickable]{cursor:pointer}:where([uc-modal]){--modal-max-content-height: calc( var(--uploadcare-blocks-window-height, 100vh) - 4 * var(--uc-padding) - var(--uc-button-size) );--modal-content-height-fill: var(--uploadcare-blocks-window-height, 100vh)}:where([uc-modal])[dialog-fallback]{--uc-z-max: 2147483647;position:fixed;z-index:var(--uc-z-max);display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;pointer-events:none;inset:0}:where([uc-modal])[dialog-fallback] dialog[open]{z-index:var(--uc-z-max);pointer-events:auto}:where([uc-modal])[dialog-fallback] dialog[open]+.uc-backdrop{position:fixed;top:0;left:0;z-index:calc(var(--uc-z-max) - 1);align-items:center;justify-content:center;width:100vw;height:100vh;background-color:#0000001a;pointer-events:auto}:where([uc-modal])[strokes][dialog-fallback] dialog[open]+.uc-backdrop{background-image:var(--modal-backdrop-background-image)}@supports selector(dialog::backdrop){:where([uc-modal])>dialog::backdrop{background-color:#0000001a}:where([uc-modal])[strokes]>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}:where([uc-modal])>dialog[open]{transform:translateY(0);visibility:visible;opacity:1}:where([uc-modal])>dialog:not([open]){transform:translateY(20px);visibility:hidden;opacity:0}:where([uc-modal])>dialog{display:flex;flex-direction:column;width:max-content;max-width:min(calc(100% - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2));min-height:var(--uc-button-size);max-height:calc(var(--uc-dialog-max-height) - var(--uc-padding) * 2);margin:auto;padding:0;overflow:hidden;background-color:var(--uc-background);border:0;border-radius:calc(var(--uc-radius) * 1.75);box-shadow:var(--uc-dialog-shadow);transition:transform .4s ease,opacity .4s ease}@media only screen and (max-width: 430px),only screen and (max-height: 600px){:where([uc-modal])>dialog>.uc-content{height:var(--modal-max-content-height)}}uc-url-source{display:block;background-color:var(--uc-background)}[uc-modal] uc-url-source{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2))}uc-url-source>.uc-content{display:grid;grid-gap:4px;grid-template-columns:1fr min-content;padding:var(--uc-padding);padding-top:0}uc-url-source .uc-url-input{display:flex}uc-camera-source{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden;background-color:var(--uc-background);border-radius:var(--uc-radius)}[uc-modal] uc-camera-source{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:100vh;max-height:var(--modal-max-content-height)}uc-camera-source.uc-initialized{height:max-content}@media only screen and (max-width: 430px){uc-camera-source{width:calc(100vw - var(--uc-padding) * 2);height:var(--modal-content-height-fill, 100%)}}uc-camera-source video{display:block;width:100%;max-height:100%;object-fit:contain;object-position:center center;background-color:var(--uc-muted);border-radius:var(--uc-radius)}uc-camera-source .uc-toolbar{position:absolute;bottom:0;display:flex;justify-content:space-between;width:100%;padding:var(--uc-padding);background-color:var(--uc-background)}uc-camera-source .uc-content{display:flex;flex:1;justify-content:center;width:100%;padding:var(--uc-padding);padding-top:0;overflow:hidden}uc-camera-source .uc-message-box{display:flex;flex-direction:column;grid-gap:40px;align-items:center;justify-content:center;padding:40px 40px 0;color:var(--uc-foreground)}uc-camera-source .uc-message-box button{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}uc-camera-source .uc-shot-btn{position:absolute;bottom:20px;width:58px;height:58px;color:var(--uc-background);background-color:var(--uc-foreground);border-radius:50%;opacity:.85;transition:bottom var(--uc-transition),opacity var(--uc-transition),transform var(--uc-transition)}uc-camera-source .uc-shot-btn:hover{transform:scale(1.05);opacity:1}uc-camera-source .uc-shot-btn:active{transform:scale(1);opacity:1}uc-camera-source .uc-shot-btn[disabled]{bottom:-80px}uc-camera-source .uc-shot-btn uc-icon svg{width:20px;height:20px}uc-external-source{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--uc-background);overflow:hidden}[uc-modal] uc-external-source{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height)}uc-external-source>.uc-content{position:relative;display:grid;flex:1;grid-template-rows:1fr min-content}@media only screen and (max-width: 430px){uc-external-source{width:calc(100vw - var(--uc-padding) * 2);height:var(--modal-content-height-fill, 100%)}}uc-external-source iframe{display:block;width:100%;height:100%;border:none}uc-external-source .uc-iframe-wrapper{overflow:hidden}uc-external-source .uc-toolbar{display:grid;grid-gap:var(--uc-padding);grid-template-columns:max-content 1fr max-content max-content;align-items:center;width:100%;padding:var(--uc-padding);border-top:1px solid var(--uc-border)}uc-external-source .uc-back-btn{padding-left:0}uc-external-source .uc-selected-counter{display:flex;grid-gap:var(--uc-padding);align-items:center;justify-content:space-between;padding:var(--uc-padding);color:var(--uc-muted-foreground)}uc-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--uc-background);transition:opacity var(--uc-transition)}[uc-modal] uc-upload-list{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:max-content;max-height:var(--modal-max-content-height)}uc-upload-list .uc-no-files{height:32px;padding:20px}uc-upload-list .uc-files{display:block;flex:1;min-height:32px;padding:0 var(--uc-padding);overflow:auto}uc-upload-list .uc-toolbar{display:flex;gap:4px;justify-content:space-between;padding:var(--uc-padding);background-color:var(--uc-background)}uc-upload-list .uc-toolbar-spacer{flex:1}uc-upload-list uc-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--uc-padding) * 2);height:calc(100% - var(--uc-padding) * 2);margin:var(--uc-padding);border-radius:var(--uc-radius)}uc-upload-list uc-activity-header>.uc-header-text{padding:0 var(--uc-padding)}uc-upload-list .uc-common-error{border-radius:var(--uc-radius);color:var(--uc-destructive-foreground);background-color:var(--uc-destructive);display:flex;align-items:center;justify-content:center;padding:var(--uc-padding);margin:4px var(--uc-padding) 0 var(--uc-padding);font-size:.925em}uc-upload-list .uc-add-more-btn uc-icon{display:none}uc-start-from{display:block;overflow-y:auto}uc-start-from .uc-content{display:grid;grid-auto-flow:row;gap:calc(var(--uc-padding) * 2);width:100%;height:100%;padding:calc(var(--uc-padding) * 2);background-color:var(--uc-background)}[uc-modal] uc-start-from{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2))}[uc-modal] uc-start-from uc-drop-area{border-radius:var(--uc-radius)}@media only screen and (max-width: 430px){[uc-modal] uc-start-from uc-drop-area{display:none}}uc-file-item{--uc-file-item-gap: 4px;--uc-file-item-height: calc(var(--uc-preview-size) + var(--uc-padding) * 2 + var(--uc-file-item-gap));display:block;overflow:hidden;min-height:var(--uc-file-item-height)}uc-file-item:last-of-type{--uc-file-item-gap: 0}uc-file-item>.uc-inner{position:relative;display:grid;grid-template-columns:var(--uc-preview-size) 1fr max-content;gap:2px;align-items:center;margin-bottom:var(--uc-file-item-gap);padding:var(--uc-padding);overflow:hidden;font-size:.925em;background-color:var(--uc-muted);border-radius:var(--uc-radius);transition:background-color var(--uc-transition)}uc-file-item>.uc-inner[focused]{background-color:transparent}uc-file-item>.uc-inner[uploading] .uc-edit-btn{display:none}uc-file-item>:where(.uc-inner[failed],.uc-inner[limit-overflow]){background-color:var(--uc-destructive)}uc-file-item .uc-thumb{position:relative;display:inline-flex;width:var(--uc-preview-size);height:var(--uc-preview-size);background-color:var(--uc-secondary);background-position:center center;background-size:cover;border-radius:var(--uc-radius)}uc-file-item .uc-file-name-wrapper{text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--uc-padding);padding-left:var(--uc-padding);overflow:hidden;color:var(--uc-muted-foreground)}uc-file-item .uc-file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}uc-file-item .uc-file-error{display:none;color:var(--uc-destructive-foreground);font-size:.85em}uc-file-item button.uc-remove-btn,uc-file-item button.uc-edit-btn{color:var(--uc-muted-foreground)}uc-file-item button svg{pointer-events:none}uc-file-item button.uc-upload-btn{display:none}uc-file-item .uc-badge{position:absolute;bottom:2px;right:2px;width:14px;height:14px;color:var(--uc-background);background-color:var(--uc-foreground);border-radius:50%;transform:scale(.3);opacity:0;transition:opacity var(--uc-transition),transform var(--uc-transition);display:flex;justify-content:center;align-items:center}uc-file-item>.uc-inner:where([failed],[limit-overflow],[finished]) .uc-badge{transform:scale(1);opacity:1}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-badge{background-color:var(--uc-destructive-foreground)}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-file-error{display:block}uc-file-item .uc-badge uc-icon,uc-file-item .uc-badge uc-icon svg{width:100%;height:100%}uc-file-item .uc-progress-bar{opacity:.5;top:calc(100% - 2px);height:2px}uc-file-item .uc-file-actions{display:flex;gap:2px;align-items:center;justify-content:center}uc-progress-bar-common{position:fixed;right:0;bottom:0;left:0;z-index:10000;display:block;height:10px;background-color:var(--uc-background);transition:opacity .3s}uc-progress-bar-common:not([active]){opacity:0;pointer-events:none}uc-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}uc-progress-bar .uc-progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--uc-primary);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}uc-progress-bar .uc-progress--hidden{opacity:0}uc-activity-header{display:flex;justify-content:space-between;gap:var(--uc-padding);padding:var(--uc-padding);color:var(--uc-foreground);font-weight:500;font-size:1em}uc-activity-header>*{display:flex;align-items:center}uc-copyright{display:flex;width:100%;justify-content:center}uc-copyright .uc-credits{all:unset;position:absolute;bottom:12px;background-color:var(--uc-background);padding:2px 5px;border-radius:6px;color:var(--uc-muted-foreground);font-weight:400;font-size:12px;opacity:.9;cursor:pointer;transition:opacity var(--uc-transition),background-color var(--uc-transition)}uc-copyright .uc-credits:focus-visible{outline:1px auto -webkit-focus-ring-color}uc-copyright .uc-credits:hover{opacity:1;background-color:var(--uc-muted)}[uc-cloud-image-editor]{--color-primary-accent: var(--uc-primary);--color-text-base: var(--uc-foreground);--color-text-accent-contrast: var(--uc-background);--color-fill-contrast: var(--uc-background);--color-modal-backdrop: oklch(0 0 0 / .1);--color-image-background: var(--uc-muted);--color-focus-ring: var(--color-primary-accent);--color-crop-guides: var(--uc-foreground);--font-size-ui: var(--uc-font-size);--size-touch-area: var(--uc-button-size);--size-panel-heading: calc(var(--uc-button-size) + var(--uc-padding) * 2);--size-ui-min-width: 130px;--size-line-width: 1px;--size-modal-width: 650px;--size-icon: calc(var(--uc-button-size) / 2);--border-radius-editor: var(--uc-radius);--border-radius-thumb: var(--uc-radius);--border-radius-ui: var(--uc-radius);--border-radius-base: var(--uc-radius);--cldtr-gap-min: 5px;--cldtr-gap-mid-1: 10px;--cldtr-gap-mid-2: 15px;--cldtr-gap-max: 20px;--transition-duration-2: var(--transition-duration-all, .2s);--transition-duration-3: var(--transition-duration-all, .3s);--transition-duration-4: var(--transition-duration-all, .4s);--transition-duration-5: var(--transition-duration-all, .5s);--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading);--transparent-pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);display:block;width:100%;height:100%;max-height:100%}[uc-cloud-image-editor] :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste: "true"}[uc-cloud-image-editor] :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect: var(--hover-filter) !important;--opacity-effect: var(--hover-opacity) !important;--color-effect: var(--hover-color-rgb) !important;--background-effect: var(--hover-background) !important}[uc-cloud-image-editor] :is([tabindex]:active,[with-effects]:active){--filter-effect: var(--down-filter) !important;--opacity-effect: var(--down-opacity) !important;--color-effect: var(--down-color-rgb) !important;--background-effect: var(--down-background) !important}[uc-cloud-image-editor] :is([tabindex][active],[with-effects][active]){--filter-effect: var(--active-filter) !important;--opacity-effect: var(--active-opacity) !important;--color-effect: var(--active-color-rgb) !important;--background-effect: var(--active-background) !important}[uc-cloud-image-editor] [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor] [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON{--modal-header-opacity: 0;--modal-header-height: 0px;--modal-toolbar-height: calc(var(--size-panel-heading) * 2)}[uc-cloud-image-editor].uc-editor_OFF{--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading)}[uc-cloud-image-editor]>.uc-wrapper{--l-min-img-height: var(--modal-toolbar-height);--l-max-img-height: 100%;--l-edit-button-width: 120px;--l-toolbar-horizontal-padding: var(--cldtr-gap-mid-1);position:relative;display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto}@media only screen and (max-width: 800px){[uc-cloud-image-editor]>.uc-wrapper{--l-edit-button-width: 70px;--l-toolbar-horizontal-padding: var(--cldtr-gap-min)}}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport{display:flex;align-items:center;justify-content:center;overflow:hidden}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity: 1;position:absolute;top:0;left:0;z-index:10;display:block;box-sizing:border-box;width:100%;height:100%;object-fit:scale-down;background-color:var(--color-image-background);transform:scale(1);opacity:var(--viewer-image-opacity);user-select:none;pointer-events:auto}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity: 0;background-image:var(--transparent-pixel);transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity: 0;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4);pointer-events:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container{position:relative;display:block;width:100%;height:100%;background-color:var(--color-image-background);transition:var(--transition-duration-3)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{position:absolute;bottom:0;left:0;box-sizing:border-box;width:100%;height:var(--modal-toolbar-height);min-height:var(--size-panel-heading);background-color:var(--color-fill-contrast)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{display:flex;align-items:center;justify-content:space-between;height:var(--size-panel-heading);padding-right:var(--l-toolbar-horizontal-padding);padding-left:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-file_type_outer{position:absolute;z-index:2;display:flex;max-width:120px;transform:translate(-40px);user-select:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash{position:absolute;z-index:4;display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--color-fill-contrast)}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--uc-foreground);background-color:var(--uc-muted);border-radius:50%}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{margin-top:var(--cldtr-gap-max);font-size:var(--font-size-ui);color:var(--uc-foreground)}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{display:flex;align-items:center;justify-content:center;height:var(--size-panel-heading)}uc-crop-frame>.uc-svg{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:inherit;transition:var(--transition-duration-3)}uc-crop-frame>.uc-thumb{--idle-color-rgb: var(--color-text-base);--hover-color-rgb: var(--color-primary-accent);--focus-color-rgb: var(--color-primary-accent);--down-color-rgb: var(--color-primary-accent);--color-effect: var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame>.uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame>.uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame>.uc-guides{transition:var(--transition-duration-3)}uc-crop-frame>.uc-guides--hidden{opacity:0}uc-crop-frame>.uc-guides--semi-hidden{opacity:.2}uc-crop-frame>.uc-guides--visible{opacity:1}uc-editor-button-control,uc-editor-crop-button-control,uc-editor-filter-control,uc-editor-operation-control{--l-base-min-width: var(--uc-button-size);--l-base-height: var(--uc-button-size);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--background-effect: var(--idle-background);--filter-effect: var(--idle-filter);--idle-color-rgb: var(--uc-secondary-foreground);--idle-opacity: 1;--idle-filter: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-opacity: 1;--hover-filter: .8;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--hover-color-rgb);--down-opacity: 1;--down-filter: .6;--down-background: var(--uc-secondary)}uc-editor-button-control>button,uc-editor-crop-button-control>button,uc-editor-filter-control>button,uc-editor-operation-control>button{all:unset;position:relative;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;align-items:center;height:var(--l-base-height);color:var(--color-effect);opacity:var(--opacity-effect);outline:none;cursor:pointer;transition:var(--l-width-transition)}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-filter-control,uc-editor-operation-control)>uc-icon>svg{width:var(--size-icon);height:var(--size-icon)}uc-editor-filter-control>uc-icon.uc-original-icon>svg{width:100%;height:100%}uc-editor-button-control.uc-active,uc-editor-operation-control.uc-active,uc-editor-crop-button-control.uc-active,uc-editor-filter-control.uc-active{--idle-color-rgb: var(--uc-primary);--idle-background: var(--uc-primary-transparent);--idle-opacity: .9;--hover-color-rgb: var(--uc-primary);--hover-background: var(--uc-primary-transparent);--hover-opacity: 1}uc-editor-filter-control.uc-not_active .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active .uc-preview{opacity:0}uc-editor-button-control.uc-not_active,uc-editor-operation-control.uc-not_active,uc-editor-crop-button-control.uc-not_active,uc-editor-filter-control.uc-not_active{--idle-color-rgb: var(--uc-secondary-foreground)}uc-editor-button-control>button:before,uc-editor-operation-control>button:before,uc-editor-crop-button-control>button:before,uc-editor-filter-control>button:before{position:absolute;content:"";right:0;left:0;z-index:-1;width:100%;height:100%;background-color:var(--background-effect);border-radius:var(--border-radius-editor);transition:var(--transition-duration-3)}uc-editor-button-control>button .uc-title,uc-editor-operation-control>button .uc-title,uc-editor-crop-button-control>button .uc-title,uc-editor-filter-control>button .uc-title{padding-right:var(--cldtr-gap-mid-1);font-size:.7em;letter-spacing:1.004px;text-transform:uppercase}uc-editor-button-control>button uc-icon,uc-editor-operation-control>button uc-icon,uc-editor-crop-button-control>button uc-icon,uc-editor-filter-control>button uc-icon{pointer-events:none}uc-editor-filter-control>button .uc-preview{position:absolute;right:0;left:0;z-index:-1;width:100%;height:var(--l-base-height);background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);opacity:0;filter:brightness(var(--filter-effect));transition:var(--transition-duration-3)}uc-editor-filter-control>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper{position:absolute;top:0;left:0;z-index:10;display:block;width:100%;height:100%;opacity:0;pointer-events:none;touch-action:none;color:var(--color-crop-guides)}uc-editor-image-cropper.uc-active_from_editor{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}uc-editor-image-cropper.uc-active_from_viewer{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}uc-editor-image-cropper.uc-inactive_to_editor{opacity:0;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s);pointer-events:none}uc-editor-image-cropper>.uc-canvas{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%}uc-editor-image-fader{position:absolute;top:0;left:0;display:block;width:100%;height:100%}uc-editor-image-fader.uc-active_from_viewer{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-start);pointer-events:auto}uc-editor-image-fader.uc-active_from_cropper{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:auto}uc-editor-image-fader.uc-inactive_to_cropper{z-index:3;transform:scale(1);opacity:0;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}uc-editor-image-fader .uc-fader-image{position:absolute;top:0;left:0;display:block;width:100%;height:100%;object-fit:scale-down;transform:scale(1);user-select:none;content-visibility:auto}uc-editor-image-fader .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);transform:scale(1);opacity:0;transition:var(--transition-duration-3)}uc-editor-scroller{display:flex;align-items:center;width:100%;height:100%;overflow-x:scroll}uc-editor-slider{display:flex;align-items:center;justify-content:center;width:100%;height:var(--size-panel-heading)}uc-editor-toolbar{position:relative;width:100%;height:100%}@media only screen and (max-width: 600px){uc-editor-toolbar{--l-tab-gap: var(--cldtr-gap-mid-1);--l-slider-padding: var(--uc-padding);--l-controls-padding: var(--uc-padding)}}@media only screen and (min-width: 601px){uc-editor-toolbar{--l-tab-gap: var(--cldtr-gap-max);--l-slider-padding: var(--uc-padding);--l-controls-padding: var(--uc-padding)}}uc-editor-toolbar>.uc-toolbar-container{position:relative;width:100%;height:100%;overflow:hidden}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar{position:absolute;display:grid;grid-template-rows:1fr 1fr;width:100%;height:100%;background-color:var(--color-fill-contrast);transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{transform:translateY(0);opacity:1;pointer-events:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{transform:translateY(100%);opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{transform:translateY(-100%);opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{display:flex;align-items:center;justify-content:space-between;padding-right:var(--l-controls-padding);padding-left:var(--l-controls-padding)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{position:relative;display:grid;grid-auto-flow:column;grid-gap:0px var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{position:absolute;bottom:0;left:0;width:var(--size-touch-area);height:2px;background-color:var(--uc-secondary-foreground);transform:translate(0);transition:transform var(--transition-duration-3)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;overflow:hidden;opacity:0;content-visibility:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden{display:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{width:var(--size-icon);height:var(--size-icon)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;box-sizing:border-box;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;grid-area:inner;grid-auto-flow:column;gap:6px}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar .uc-info-tooltip_container{position:absolute;display:flex;align-items:flex-start;justify-content:center;width:100%;height:100%}uc-editor-toolbar .uc-info-tooltip_wrapper{position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2));display:flex;flex-direction:column;justify-content:flex-end;height:100%;pointer-events:none}uc-editor-toolbar .uc-info-tooltip{z-index:3;padding:3px 6px;color:var(--color-text-base);font-size:.7em;letter-spacing:1px;text-transform:uppercase;background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);transform:translateY(100%);opacity:0;transition:var(--transition-duration-3)}uc-editor-toolbar .uc-info-tooltip_visible{transform:translateY(0);opacity:1}uc-editor-toolbar .uc-slider{padding-right:var(--l-slider-padding);padding-left:var(--l-slider-padding)}uc-btn-ui>button{--filter-effect: var(--idle-brightness);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--background-effect: var(--idle-background);--l-transition-effect: var( --css-transition, color var(--transition-duration-2), background-color var(--transition-duration-2), filter var(--transition-duration-2) );all:unset;display:inline-flex;align-items:center;box-sizing:var(--css-box-sizing, border-box);height:var(--css-height, var(--uc-button-size));padding-right:var(--css-padding-right, 14px);padding-left:var(--css-padding-left, 14px);font-size:1em;color:var(--color-effect);background-color:var(--background-effect);border-radius:var(--uc-radius);opacity:var(--opacity-effect);outline:none;cursor:pointer;filter:brightness(var(--filter-effect));transition:var(--l-transition-effect);user-select:none}uc-btn-ui>button>uc-icon{pointer-events:none}uc-btn-ui .uc-text{white-space:nowrap}uc-btn-ui .uc-icon{display:flex;align-items:center;justify-content:center;color:var(--color-effect);filter:brightness(var(--filter-effect));transition:var(--l-transition-effect)}uc-btn-ui .uc-icon_left{margin-right:var(--cldtr-gap-mid-1);margin-left:0}uc-btn-ui .uc-icon_right{margin-right:0;margin-left:var(--cldtr-gap-mid-1)}uc-btn-ui .uc-icon_single{margin-right:0;margin-left:0}uc-btn-ui .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary>button{--idle-color-rgb: var(--uc-primary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-primary);--hover-color-rgb: var(--uc-primary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-primary-hover);--down-color-rgb: var(--uc-primary-foreground);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-primary);--active-color-rgb: var(--uc-primary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary)}uc-btn-ui.uc-primary-icon>button{--idle-color-rgb: var(--uc-primary);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-primary);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-primary-transparent);--down-color-rgb: var(--uc-primary);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-primary-transparent);--active-color-rgb: var(--uc-primary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary-hover);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent}uc-btn-ui.uc-secondary-icon>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-tab>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-primary);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary-transparent)}uc-line-loader-ui{position:absolute;top:0;left:0;z-index:9999;width:100%;height:2px;opacity:.5}uc-line-loader-ui .uc-inner{width:25%;max-width:200px;height:100%}uc-line-loader-ui .uc-line{width:100%;height:100%;background-color:var(--uc-primary);transform:translate(-101%);transition:transform 1s}uc-slider-ui{--l-thumb-size: 24px;--l-zero-dot-size: 5px;--l-zero-dot-offset: 2px;--idle-color-rgb: var(--uc-foreground);--hover-color-rgb: var(--uc-primary);--down-color-rgb: var(--uc-primary);--color-effect: var(--idle-color-rgb);--l-color: var(--color-effect);position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset)) * 2)}uc-slider-ui .uc-thumb{position:absolute;left:0;width:var(--l-thumb-size);height:var(--l-thumb-size);background-color:var(--l-color);border-radius:50%;transform:translate(0);opacity:1;transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2)}uc-slider-ui .uc-steps{position:absolute;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:100%;padding-right:calc(var(--l-thumb-size) / 2);padding-left:calc(var(--l-thumb-size) / 2)}uc-slider-ui .uc-border-step{width:0px;height:10px;border-right:1px solid var(--l-color);opacity:.6;transition:border-color var(--transition-duration-2)}uc-slider-ui .uc-minor-step{width:0px;height:4px;border-right:1px solid var(--l-color);opacity:.2;transition:border-color var(--transition-duration-2)}uc-slider-ui .uc-zero-dot{position:absolute;top:calc(100% - var(--l-zero-dot-offset) * 2);left:calc(var(--l-thumb-size) / 2 - var(--l-zero-dot-size) / 2);width:var(--l-zero-dot-size);height:var(--l-zero-dot-size);background-color:var(--color-primary-accent);border-radius:50%;opacity:0;transition:var(--transition-duration-3)}uc-slider-ui .uc-input{position:absolute;width:calc(100% - 10px);height:100%;margin:0;cursor:pointer;opacity:0}uc-presence-toggle.uc-transition{transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible{opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden{opacity:0;pointer-events:none}uc-presence-toggle.uc-initial{display:none!important;transition:none!important}[uc-cloud-image-editor] [role=button]:focus-visible,[uc-cloud-image-editor] button:focus-visible{outline:1px auto -webkit-focus-ring-color}:where([uc-cloud-image-editor]) uc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:where([uc-cloud-image-editor]) uc-icon svg{width:calc(var(--uc-button-size) / 2);height:calc(var(--uc-button-size) / 2)}uc-cloud-image-editor-activity{position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:var(--uc-background)}[uc-modal] uc-cloud-image-editor-activity{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:var(--modal-content-height-fill, 100%)}uc-select{display:inline-flex}uc-select select{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--uc-button-size);padding:0 14px;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--uc-radius);cursor:pointer;user-select:none;transition:background-color var(--uc-transition);color:var(--uc-secondary-foreground);background-color:var(--uc-secondary)}:where([uc-wgt-common]) uc-source-btn[type]{all:unset}[uc-file-uploader-inline] uc-start-from{height:100%;container-type:inline-size}[uc-file-uploader-inline]{--cfg-done-activity: "start-from";--cfg-init-activity: "start-from";flex:1}[uc-file-uploader-inline] uc-activity-header:after{width:var(--uc-button-size);height:var(--uc-button-size);content:""}[uc-file-uploader-inline] uc-activity-header .uc-close-btn{display:none}[uc-file-uploader-inline] uc-copyright .uc-credits{position:static}@container (min-width: 500px){[uc-file-uploader-inline] uc-start-from .uc-content{grid-template-columns:1fr max-content;height:100%}[uc-file-uploader-inline] uc-start-from uc-copyright{grid-column:2}[uc-file-uploader-inline] uc-start-from uc-drop-area{grid-row:span 3}[uc-file-uploader-inline] uc-start-from:has(uc-copyright[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline] uc-start-from:has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 2}[uc-file-uploader-inline] uc-start-from:has(uc-copyright[hidden]):has(.uc-cancel-btn[hidden]) uc-drop-area{grid-row:span 1}} diff --git a/pyuploadcare/dj/static/uploadcare/uc-file-uploader-minimal.min.css b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-minimal.min.css new file mode 100644 index 00000000..42584957 --- /dev/null +++ b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-minimal.min.css @@ -0,0 +1 @@ +:where([uc-wgt-common]){--cfg-init-activity: "start-from";--cfg-done-activity: ""}:where([uc-wgt-common]){color:var(--uc-foreground);font-size:var(--uc-font-size);line-height:var(--uc-line-height);font-family:var(--uc-font-family)}:where([uc-wgt-common]) *{box-sizing:border-box}:where([uc-wgt-common]) [hidden]{display:none!important}:where([uc-wgt-common]) [activity]:not([active]){display:none}:where([uc-wgt-common]) dialog:not([open]) [activity]{display:none}:where([uc-wgt-common]) button{display:flex;align-items:center;justify-content:center;height:var(--uc-button-size);padding-right:14px;padding-left:14px;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--uc-radius);cursor:pointer;user-select:none;transition:background-color var(--uc-transition)}:where([uc-wgt-common]) button.uc-primary-btn{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-wgt-common]) button.uc-primary-btn:hover{background-color:var(--uc-primary-hover)}:where([uc-wgt-common]) button.uc-secondary-btn{color:var(--uc-secondary-foreground);background-color:var(--uc-secondary)}:where([uc-wgt-common]) button.uc-secondary-btn:hover{background-color:var(--uc-secondary-hover)}:where([uc-wgt-common]) button.uc-mini-btn{height:var(--uc-button-size);padding:0;background-color:transparent;color:var(--uc-secondary-foreground)}:where([uc-wgt-common]) button.uc-mini-btn:hover{background-color:var(--uc-secondary)}:where([uc-wgt-common]) :is(button[disabled],button.uc-primary-btn[disabled],button.uc-secondary-btn[disabled]){opacity:.5;pointer-events:none}:where([uc-wgt-common]) a{color:var(--uc-primary);text-decoration:none}:where([uc-wgt-common]) a[disabled]{pointer-events:none}:where([uc-wgt-common]) input[type=text]{display:flex;width:100%;height:var(--uc-button-size);padding-right:10px;padding-left:10px;color:var(--uc-foreground);font-size:1em;font-family:inherit;background-color:var(--uc-background);border:1px solid var(--uc-border);outline:1px solid transparent;border-radius:var(--uc-radius);transition:border-color var(--uc-transition),outline-color var(--uc-transition)}:where([uc-wgt-common]) input[type=text]::placeholder{color:var(--uc-muted-foreground)}:where([uc-wgt-common]) input[type=text]:focus{outline-color:var(--uc-primary-hover);border-color:var(--uc-primary-hover)}:where([uc-wgt-common]) input[disabled]{opacity:.6;pointer-events:none}:where([uc-wgt-common]){--uc-font-family: system-ui;--uc-font-size: 14px;--uc-line-height: normal;--uc-simple-btn-font-family: system-ui;--uc-simple-btn-font-size: 14px;--uc-button-size: 32px;--uc-preview-size: 32px;--uc-padding: 10px;--uc-radius: 8px;--uc-transition: .2s ease;--uc-dialog-width: 430px;--uc-dialog-max-width: 800px;--uc-dialog-max-height: 600px;--uc-simple-btn-padding: 7px 14px;--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}@supports not (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light: 54 112 253;--uc-primary-light: rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light: rgb(var(--uc-primary-rgb-light) / 90%);--uc-primary-transparent-light: rgb(var(--uc-primary-rgb-light) / 10%);--uc-background-light: rgb(255 255 255);--uc-foreground-light: rgb(24 24 24);--uc-primary-foreground-light: #fff;--uc-secondary-light: rgb(24 24 24 / 5%);--uc-secondary-hover-light: rgb(24 24 24 / 8%);--uc-secondary-foreground-light: rgb(24 24 24);--uc-muted-light: rgb(245 245 245);--uc-muted-foreground-light: rgb(113 113 113);--uc-destructive-light: rgb(232 19 20 / 5%);--uc-destructive-foreground-light: rgb(232 19 20);--uc-border-light: rgb(228 228 232);--uc-dialog-shadow-light: 0px 6px 20px rgb(0 0 0 / 10%);--uc-simple-btn-light: rgb(235 235 235);--uc-simple-btn-hover-light: rgb(228 228 228);--uc-simple-btn-foreground-light: rgb(24 24 24);--uc-primary-rgb-dark: 87 154 255;--uc-primary-dark: rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark: rgb(var(--uc-primary-rgb-dark) / 90%);--uc-primary-transparent-dark: rgb(var(--uc-primary-rgb-dark) / 7%);--uc-background-dark: rgb(27 27 27);--uc-foreground-dark: rgb(225 225 225);--uc-primary-foreground-dark: rgb(0 0 0);--uc-secondary-dark: rgb(225 225 225 / 7%);--uc-secondary-hover-dark: rgb(225 225 225 / 10%);--uc-secondary-foreground-dark: rgb(225 225 225);--uc-muted-dark: rgb(36 36 36);--uc-muted-foreground-dark: rgb(152 152 152);--uc-destructive-dark: rgb(244 90 79 / 10%);--uc-destructive-foreground-dark: rgb(244 90 79);--uc-border-dark: rgb(61 61 61);--uc-dialog-shadow-dark: 0px 6px 20px rgb(0 0 0 / 25%);--uc-simple-btn-dark: rgb(36 36 36);--uc-simple-btn-hover-dark: rgb(43 43 43);--uc-simple-btn-foreground-dark: rgb(255 255 255)}}@supports (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light: 59% .22 264;--uc-primary-light: oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light: oklch(var(--uc-primary-oklch-light) / 90%);--uc-primary-transparent-light: oklch(var(--uc-primary-oklch-light) / 10%);--uc-background-light: oklch(100% 0 0);--uc-foreground-light: oklch(21% 0 0);--uc-primary-foreground-light: oklch(100% 0 0);--uc-secondary-light: oklch(21% 0 0 / .05);--uc-secondary-hover-light: oklch(21% 0 0 / .08);--uc-secondary-foreground-light: oklch(21% 0 0);--uc-muted-light: oklch(97% 0 0);--uc-muted-foreground-light: oklch(55% 0 0);--uc-destructive-light: oklch(59% .235 28.5 / .05);--uc-destructive-foreground-light: oklch(59% .235 28.5);--uc-border-light: oklch(92% 0 0);--uc-dialog-shadow-light: 0px 6px 20px oklch(0% 0 0 / .1);--uc-simple-btn-light: oklch(94% 0 0);--uc-simple-btn-hover-light: oklch(92% 0 0);--uc-simple-btn-foreground-light: oklch(20% 0 0);--uc-primary-oklch-dark: 69% .1768 258.4;--uc-primary-dark: oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark: oklch(var(--uc-primary-oklch-dark) / 90%);--uc-primary-transparent-dark: oklch(var(--uc-primary-oklch-dark) / 7%);--uc-background-dark: oklch(22% 0 0);--uc-foreground-dark: oklch(91% 0 0);--uc-primary-foreground-dark: oklch(0% 0 0);--uc-secondary-dark: oklch(91% 0 0 / .07);--uc-secondary-hover-dark: oklch(91% 0 0 / .1);--uc-secondary-foreground-dark: oklch(91% 0 0);--uc-muted-dark: oklch(26% 0 0);--uc-muted-foreground-dark: oklch(68% 0 0);--uc-destructive-dark: oklch(67% .191 27.5 / .1);--uc-destructive-foreground-dark: oklch(67% .191 27.5);--uc-border-dark: oklch(36% 0 0);--uc-dialog-shadow-dark: 0px 6px 20px oklch(0% 0 0 / .25);--uc-simple-btn-dark: oklch(26% 0 0);--uc-simple-btn-hover-dark: oklch(29% 0 0);--uc-simple-btn-foreground-dark: oklch(100% 0 0)}}@media only screen and (max-height: 600px){:where([uc-wgt-common]){--uc-dialog-max-height: 100%}}@media only screen and (max-width: 430px){:where([uc-wgt-common]){--uc-dialog-max-width: 100vw;--uc-dialog-max-height: var(--uploadcare-blocks-window-height)}}@media (prefers-color-scheme: light){:where([uc-wgt-common]){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme: dark){:where([uc-wgt-common]){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light: 59% .22 300;--uc-primary-oklch-dark: 69% .1768 300}:where(.uc-red){--uc-primary-oklch-light: 59% .22 21;--uc-primary-oklch-dark: 69% .1768 21}:where(.uc-orange){--uc-primary-oklch-light: 59% .1724 51.88;--uc-primary-oklch-dark: 69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light: 59% .1724 130;--uc-primary-oklch-dark: 69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light: 59% .1523 174;--uc-primary-oklch-dark: 69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light: 10% 0 0;--uc-primary-oklch-dark: 97% 0 0}uc-start-from{display:block;overflow-y:auto}uc-start-from .uc-content{display:grid;grid-auto-flow:row;gap:calc(var(--uc-padding) * 2);width:100%;height:100%;padding:calc(var(--uc-padding) * 2);background-color:var(--uc-background)}[uc-modal] uc-start-from{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2))}[uc-modal] uc-start-from uc-drop-area{border-radius:var(--uc-radius)}@media only screen and (max-width: 430px){[uc-modal] uc-start-from uc-drop-area{display:none}}:where([uc-drop-area]){padding:2px;overflow:hidden;border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius) * 1.75);transition:border var(--uc-transition),border-radius var(--uc-transition)}:where([uc-drop-area]),:where([uc-drop-area]) .uc-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:where([uc-drop-area]) .uc-text{position:relative;margin:var(--uc-padding);color:var(--uc-muted-foreground);transition:color var(--uc-transition)}:where([uc-drop-area])[ghost][drag-state=inactive]{display:none}:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--uc-background)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.uc-text,.uc-icon-container){color:var(--uc-primary)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--uc-primary);background:var(--uc-primary-transparent);border-color:var(--uc-primary-transparent)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near]){opacity:1}:where([uc-drop-area])[drag-state=over]{border-color:var(--uc-primary);opacity:1}:where([uc-drop-area])[with-icon]{min-height:180px}:where([uc-drop-area])[with-icon] .uc-content-wrapper{display:flex;flex-direction:column}:where([uc-drop-area])[with-icon] .uc-text{color:var(--uc-foreground);font-weight:500;font-size:1.1em}:where([uc-drop-area])[with-icon] .uc-icon-container{position:relative;width:64px;height:64px;margin:var(--uc-padding);overflow:hidden;color:var(--uc-foreground);background-color:var(--uc-muted);border-radius:50%;transition:color var(--uc-transition),background-color var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon{position:absolute;width:32px;height:32px;top:calc(50% - 16px);left:calc(50% - 16px);transition:transform var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon:last-child{transform:translateY(48px)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container,:where([uc-drop-area])[with-icon]:hover .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container{background-color:var(--uc-primary-transparent)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-icon-container{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:last-child{transform:translateY(0)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=near] uc-icon:last-child{transform:scale(1.3)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=over] uc-icon:last-child{transform:scale(1.5)}:where([uc-drop-area])[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--uc-padding) * 2);height:calc(100vh - var(--uc-padding) * 2);margin:var(--uc-padding)}:where([uc-drop-area])[fullscreen] .uc-content-wrapper{width:100%;max-width:calc(var(--uc-dialog-width) * .8);height:180px;color:var(--uc-foreground);background-color:var(--uc-background);border-radius:calc(var(--uc-radius) * 1.75);box-shadow:var(--uc-dialog-shadow);transition:color var(--uc-transition),background-color var(--uc-transition),box-shadow var(--uc-transition),border-radius var(--uc-transition),transform var(--uc-transition)}:where([uc-drop-area])[with-icon][fullscreen][drag-state=active]>.uc-content-wrapper,:where([uc-drop-area])[with-icon][fullscreen][drag-state=near]>.uc-content-wrapper{transform:translateY(10px);opacity:0}:where([uc-drop-area])[with-icon][fullscreen][drag-state=over]>.uc-content-wrapper{transform:translateY(0);opacity:1}:is(:where([uc-drop-area])[with-icon][fullscreen])>.uc-content-wrapper uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[clickable]{cursor:pointer}uc-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--uc-background);transition:opacity var(--uc-transition)}[uc-modal] uc-upload-list{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:max-content;max-height:var(--modal-max-content-height)}uc-upload-list .uc-no-files{height:32px;padding:20px}uc-upload-list .uc-files{display:block;flex:1;min-height:32px;padding:0 var(--uc-padding);overflow:auto}uc-upload-list .uc-toolbar{display:flex;gap:4px;justify-content:space-between;padding:var(--uc-padding);background-color:var(--uc-background)}uc-upload-list .uc-toolbar-spacer{flex:1}uc-upload-list uc-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--uc-padding) * 2);height:calc(100% - var(--uc-padding) * 2);margin:var(--uc-padding);border-radius:var(--uc-radius)}uc-upload-list uc-activity-header>.uc-header-text{padding:0 var(--uc-padding)}uc-upload-list .uc-common-error{border-radius:var(--uc-radius);color:var(--uc-destructive-foreground);background-color:var(--uc-destructive);display:flex;align-items:center;justify-content:center;padding:var(--uc-padding);margin:4px var(--uc-padding) 0 var(--uc-padding);font-size:.925em}uc-upload-list .uc-add-more-btn uc-icon{display:none}uc-file-item{--uc-file-item-gap: 4px;--uc-file-item-height: calc(var(--uc-preview-size) + var(--uc-padding) * 2 + var(--uc-file-item-gap));display:block;overflow:hidden;min-height:var(--uc-file-item-height)}uc-file-item:last-of-type{--uc-file-item-gap: 0}uc-file-item>.uc-inner{position:relative;display:grid;grid-template-columns:var(--uc-preview-size) 1fr max-content;gap:2px;align-items:center;margin-bottom:var(--uc-file-item-gap);padding:var(--uc-padding);overflow:hidden;font-size:.925em;background-color:var(--uc-muted);border-radius:var(--uc-radius);transition:background-color var(--uc-transition)}uc-file-item>.uc-inner[focused]{background-color:transparent}uc-file-item>.uc-inner[uploading] .uc-edit-btn{display:none}uc-file-item>:where(.uc-inner[failed],.uc-inner[limit-overflow]){background-color:var(--uc-destructive)}uc-file-item .uc-thumb{position:relative;display:inline-flex;width:var(--uc-preview-size);height:var(--uc-preview-size);background-color:var(--uc-secondary);background-position:center center;background-size:cover;border-radius:var(--uc-radius)}uc-file-item .uc-file-name-wrapper{text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--uc-padding);padding-left:var(--uc-padding);overflow:hidden;color:var(--uc-muted-foreground)}uc-file-item .uc-file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}uc-file-item .uc-file-error{display:none;color:var(--uc-destructive-foreground);font-size:.85em}uc-file-item button.uc-remove-btn,uc-file-item button.uc-edit-btn{color:var(--uc-muted-foreground)}uc-file-item button svg{pointer-events:none}uc-file-item button.uc-upload-btn{display:none}uc-file-item .uc-badge{position:absolute;bottom:2px;right:2px;width:14px;height:14px;color:var(--uc-background);background-color:var(--uc-foreground);border-radius:50%;transform:scale(.3);opacity:0;transition:opacity var(--uc-transition),transform var(--uc-transition);display:flex;justify-content:center;align-items:center}uc-file-item>.uc-inner:where([failed],[limit-overflow],[finished]) .uc-badge{transform:scale(1);opacity:1}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-badge{background-color:var(--uc-destructive-foreground)}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-file-error{display:block}uc-file-item .uc-badge uc-icon,uc-file-item .uc-badge uc-icon svg{width:100%;height:100%}uc-file-item .uc-progress-bar{opacity:.5;top:calc(100% - 2px);height:2px}uc-file-item .uc-file-actions{display:flex;gap:2px;align-items:center;justify-content:center}uc-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--uc-button-size);height:var(--uc-button-size)}uc-icon svg{width:calc(var(--uc-button-size) / 2);height:calc(var(--uc-button-size) / 2)}uc-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}uc-progress-bar .uc-progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--uc-primary);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}uc-progress-bar .uc-progress--hidden{opacity:0}uc-copyright{display:flex;width:100%;justify-content:center}uc-copyright .uc-credits{all:unset;position:absolute;bottom:12px;background-color:var(--uc-background);padding:2px 5px;border-radius:6px;color:var(--uc-muted-foreground);font-weight:400;font-size:12px;opacity:.9;cursor:pointer;transition:opacity var(--uc-transition),background-color var(--uc-transition)}uc-copyright .uc-credits:focus-visible{outline:1px auto -webkit-focus-ring-color}uc-copyright .uc-credits:hover{opacity:1;background-color:var(--uc-muted)}:where([uc-file-uploader-minimal]){--cfg-init-activity: "start-from";--cfg-done-activity: "upload-list";position:relative;display:block}[uc-file-uploader-minimal] uc-start-from .uc-content{display:flex;flex-direction:column;gap:4px;padding:0;overflow:hidden;align-items:center;background-color:transparent}:where([uc-file-uploader-minimal] uc-drop-area){display:flex;position:relative;align-items:center;justify-content:center;width:100%;min-height:calc(var(--uc-preview-size) + var(--uc-padding) * 2 + 8px);padding:0;text-align:center;background-color:var(--uc-muted);border-radius:calc(var(--uc-radius) * 1.75)}:where([uc-file-uploader-minimal] uc-drop-area):before{content:"";z-index:-1;width:100%;height:100%;position:absolute;background-color:var(--uc-background)}[uc-file-uploader-minimal] uc-upload-list uc-activity-header{display:none}[uc-file-uploader-minimal] uc-upload-list>.uc-toolbar{background-color:transparent}[uc-file-uploader-minimal] uc-upload-list{width:100%;height:unset;padding:4px;background-color:var(--uc-background);border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius) * 1.75)}[uc-file-uploader-minimal] uc-upload-list .uc-files{padding:0}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar{display:block;padding:0}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-cancel-btn,[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-upload-btn,[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-done-btn{display:none}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-add-more-btn{width:100%;height:calc(var(--uc-preview-size) + var(--uc-padding) * 2);margin-top:4px}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-add-more-btn[disabled]{display:none}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-add-more-btn>span{display:none}[uc-file-uploader-minimal] uc-upload-list .uc-toolbar .uc-add-more-btn>uc-icon{display:flex}[uc-file-uploader-minimal] uc-file-item .uc-edit-btn{display:none}[uc-file-uploader-minimal] uc-file-item uc-progress-bar{top:0!important;height:100%!important}[uc-file-uploader-minimal] uc-file-item uc-progress-bar .uc-progress{background-color:var(--uc-primary-transparent);border-radius:var(--uc-radius)}[uc-file-uploader-minimal] uc-upload-list uc-drop-area{width:100%;height:100%;margin:0;border-radius:calc(var(--uc-radius) * 1.75)}[uc-file-uploader-minimal] uc-upload-list .uc-common-error{margin:4px 0 0}[uc-file-uploader-minimal] uc-copyright .uc-credits{position:static} diff --git a/pyuploadcare/dj/static/uploadcare/uc-file-uploader-regular.min.css b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-regular.min.css new file mode 100644 index 00000000..0a33de27 --- /dev/null +++ b/pyuploadcare/dj/static/uploadcare/uc-file-uploader-regular.min.css @@ -0,0 +1 @@ +:where([uc-wgt-common]){--cfg-init-activity: "start-from";--cfg-done-activity: ""}:where([uc-wgt-common]){--uc-font-family: system-ui;--uc-font-size: 14px;--uc-line-height: normal;--uc-simple-btn-font-family: system-ui;--uc-simple-btn-font-size: 14px;--uc-button-size: 32px;--uc-preview-size: 32px;--uc-padding: 10px;--uc-radius: 8px;--uc-transition: .2s ease;--uc-dialog-width: 430px;--uc-dialog-max-width: 800px;--uc-dialog-max-height: 600px;--uc-simple-btn-padding: 7px 14px;--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}@supports not (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-rgb-light: 54 112 253;--uc-primary-light: rgb(var(--uc-primary-rgb-light));--uc-primary-hover-light: rgb(var(--uc-primary-rgb-light) / 90%);--uc-primary-transparent-light: rgb(var(--uc-primary-rgb-light) / 10%);--uc-background-light: rgb(255 255 255);--uc-foreground-light: rgb(24 24 24);--uc-primary-foreground-light: #fff;--uc-secondary-light: rgb(24 24 24 / 5%);--uc-secondary-hover-light: rgb(24 24 24 / 8%);--uc-secondary-foreground-light: rgb(24 24 24);--uc-muted-light: rgb(245 245 245);--uc-muted-foreground-light: rgb(113 113 113);--uc-destructive-light: rgb(232 19 20 / 5%);--uc-destructive-foreground-light: rgb(232 19 20);--uc-border-light: rgb(228 228 232);--uc-dialog-shadow-light: 0px 6px 20px rgb(0 0 0 / 10%);--uc-simple-btn-light: rgb(235 235 235);--uc-simple-btn-hover-light: rgb(228 228 228);--uc-simple-btn-foreground-light: rgb(24 24 24);--uc-primary-rgb-dark: 87 154 255;--uc-primary-dark: rgb(var(--uc-primary-rgb-dark));--uc-primary-hover-dark: rgb(var(--uc-primary-rgb-dark) / 90%);--uc-primary-transparent-dark: rgb(var(--uc-primary-rgb-dark) / 7%);--uc-background-dark: rgb(27 27 27);--uc-foreground-dark: rgb(225 225 225);--uc-primary-foreground-dark: rgb(0 0 0);--uc-secondary-dark: rgb(225 225 225 / 7%);--uc-secondary-hover-dark: rgb(225 225 225 / 10%);--uc-secondary-foreground-dark: rgb(225 225 225);--uc-muted-dark: rgb(36 36 36);--uc-muted-foreground-dark: rgb(152 152 152);--uc-destructive-dark: rgb(244 90 79 / 10%);--uc-destructive-foreground-dark: rgb(244 90 79);--uc-border-dark: rgb(61 61 61);--uc-dialog-shadow-dark: 0px 6px 20px rgb(0 0 0 / 25%);--uc-simple-btn-dark: rgb(36 36 36);--uc-simple-btn-hover-dark: rgb(43 43 43);--uc-simple-btn-foreground-dark: rgb(255 255 255)}}@supports (color: oklch(0% 0 0)){:where([uc-wgt-common]){--uc-primary-oklch-light: 59% .22 264;--uc-primary-light: oklch(var(--uc-primary-oklch-light));--uc-primary-hover-light: oklch(var(--uc-primary-oklch-light) / 90%);--uc-primary-transparent-light: oklch(var(--uc-primary-oklch-light) / 10%);--uc-background-light: oklch(100% 0 0);--uc-foreground-light: oklch(21% 0 0);--uc-primary-foreground-light: oklch(100% 0 0);--uc-secondary-light: oklch(21% 0 0 / .05);--uc-secondary-hover-light: oklch(21% 0 0 / .08);--uc-secondary-foreground-light: oklch(21% 0 0);--uc-muted-light: oklch(97% 0 0);--uc-muted-foreground-light: oklch(55% 0 0);--uc-destructive-light: oklch(59% .235 28.5 / .05);--uc-destructive-foreground-light: oklch(59% .235 28.5);--uc-border-light: oklch(92% 0 0);--uc-dialog-shadow-light: 0px 6px 20px oklch(0% 0 0 / .1);--uc-simple-btn-light: oklch(94% 0 0);--uc-simple-btn-hover-light: oklch(92% 0 0);--uc-simple-btn-foreground-light: oklch(20% 0 0);--uc-primary-oklch-dark: 69% .1768 258.4;--uc-primary-dark: oklch(var(--uc-primary-oklch-dark));--uc-primary-hover-dark: oklch(var(--uc-primary-oklch-dark) / 90%);--uc-primary-transparent-dark: oklch(var(--uc-primary-oklch-dark) / 7%);--uc-background-dark: oklch(22% 0 0);--uc-foreground-dark: oklch(91% 0 0);--uc-primary-foreground-dark: oklch(0% 0 0);--uc-secondary-dark: oklch(91% 0 0 / .07);--uc-secondary-hover-dark: oklch(91% 0 0 / .1);--uc-secondary-foreground-dark: oklch(91% 0 0);--uc-muted-dark: oklch(26% 0 0);--uc-muted-foreground-dark: oklch(68% 0 0);--uc-destructive-dark: oklch(67% .191 27.5 / .1);--uc-destructive-foreground-dark: oklch(67% .191 27.5);--uc-border-dark: oklch(36% 0 0);--uc-dialog-shadow-dark: 0px 6px 20px oklch(0% 0 0 / .25);--uc-simple-btn-dark: oklch(26% 0 0);--uc-simple-btn-hover-dark: oklch(29% 0 0);--uc-simple-btn-foreground-dark: oklch(100% 0 0)}}@media only screen and (max-height: 600px){:where([uc-wgt-common]){--uc-dialog-max-height: 100%}}@media only screen and (max-width: 430px){:where([uc-wgt-common]){--uc-dialog-max-width: 100vw;--uc-dialog-max-height: var(--uploadcare-blocks-window-height)}}@media (prefers-color-scheme: light){:where([uc-wgt-common]){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}}@media (prefers-color-scheme: dark){:where([uc-wgt-common]){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}}:where(.uc-light){--uc-background: var(--uc-background-light);--uc-foreground: var(--uc-foreground-light);--uc-primary: var(--uc-primary-light);--uc-primary-hover: var(--uc-primary-hover-light);--uc-primary-transparent: var(--uc-primary-transparent-light);--uc-primary-foreground: var(--uc-primary-foreground-light);--uc-secondary: var(--uc-secondary-light);--uc-secondary-hover: var(--uc-secondary-hover-light);--uc-secondary-foreground: var(--uc-secondary-foreground-light);--uc-muted: var(--uc-muted-light);--uc-muted-foreground: var(--uc-muted-foreground-light);--uc-destructive: var(--uc-destructive-light);--uc-destructive-foreground: var(--uc-destructive-foreground-light);--uc-border: var(--uc-border-light);--uc-dialog-shadow: var(--uc-dialog-shadow-light);--uc-simple-btn: var(--uc-simple-btn-light);--uc-simple-btn-hover: var(--uc-simple-btn-hover-light);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-light)}:where(.uc-dark){--uc-background: var(--uc-background-dark);--uc-foreground: var(--uc-foreground-dark);--uc-primary: var(--uc-primary-dark);--uc-primary-hover: var(--uc-primary-hover-dark);--uc-primary-transparent: var(--uc-primary-transparent-dark);--uc-primary-foreground: var(--uc-primary-foreground-dark);--uc-secondary: var(--uc-secondary-dark);--uc-secondary-hover: var(--uc-secondary-hover-dark);--uc-secondary-foreground: var(--uc-secondary-foreground-dark);--uc-muted: var(--uc-muted-dark);--uc-muted-foreground: var(--uc-muted-foreground-dark);--uc-destructive: var(--uc-destructive-dark);--uc-destructive-foreground: var(--uc-destructive-foreground-dark);--uc-border: var(--uc-border-dark);--uc-dialog-shadow: var(--uc-dialog-shadow-dark);--uc-simple-btn: var(--uc-simple-btn-dark);--uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);--uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark)}:where(.uc-purple){--uc-primary-oklch-light: 59% .22 300;--uc-primary-oklch-dark: 69% .1768 300}:where(.uc-red){--uc-primary-oklch-light: 59% .22 21;--uc-primary-oklch-dark: 69% .1768 21}:where(.uc-orange){--uc-primary-oklch-light: 59% .1724 51.88;--uc-primary-oklch-dark: 69% .1768 51.88}:where(.uc-green){--uc-primary-oklch-light: 59% .1724 130;--uc-primary-oklch-dark: 69% .1768 130}:where(.uc-turquoise){--uc-primary-oklch-light: 59% .1523 174;--uc-primary-oklch-dark: 69% .1768 174}:where(.uc-gray){--uc-primary-oklch-light: 10% 0 0;--uc-primary-oklch-dark: 97% 0 0}:where([uc-wgt-common]){color:var(--uc-foreground);font-size:var(--uc-font-size);line-height:var(--uc-line-height);font-family:var(--uc-font-family)}:where([uc-wgt-common]) *{box-sizing:border-box}:where([uc-wgt-common]) [hidden]{display:none!important}:where([uc-wgt-common]) [activity]:not([active]){display:none}:where([uc-wgt-common]) dialog:not([open]) [activity]{display:none}:where([uc-wgt-common]) button{display:flex;align-items:center;justify-content:center;height:var(--uc-button-size);padding-right:14px;padding-left:14px;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--uc-radius);cursor:pointer;user-select:none;transition:background-color var(--uc-transition)}:where([uc-wgt-common]) button.uc-primary-btn{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-wgt-common]) button.uc-primary-btn:hover{background-color:var(--uc-primary-hover)}:where([uc-wgt-common]) button.uc-secondary-btn{color:var(--uc-secondary-foreground);background-color:var(--uc-secondary)}:where([uc-wgt-common]) button.uc-secondary-btn:hover{background-color:var(--uc-secondary-hover)}:where([uc-wgt-common]) button.uc-mini-btn{height:var(--uc-button-size);padding:0;background-color:transparent;color:var(--uc-secondary-foreground)}:where([uc-wgt-common]) button.uc-mini-btn:hover{background-color:var(--uc-secondary)}:where([uc-wgt-common]) :is(button[disabled],button.uc-primary-btn[disabled],button.uc-secondary-btn[disabled]){opacity:.5;pointer-events:none}:where([uc-wgt-common]) a{color:var(--uc-primary);text-decoration:none}:where([uc-wgt-common]) a[disabled]{pointer-events:none}:where([uc-wgt-common]) input[type=text]{display:flex;width:100%;height:var(--uc-button-size);padding-right:10px;padding-left:10px;color:var(--uc-foreground);font-size:1em;font-family:inherit;background-color:var(--uc-background);border:1px solid var(--uc-border);outline:1px solid transparent;border-radius:var(--uc-radius);transition:border-color var(--uc-transition),outline-color var(--uc-transition)}:where([uc-wgt-common]) input[type=text]::placeholder{color:var(--uc-muted-foreground)}:where([uc-wgt-common]) input[type=text]:focus{outline-color:var(--uc-primary-hover);border-color:var(--uc-primary-hover)}:where([uc-wgt-common]) input[disabled]{opacity:.6;pointer-events:none}uc-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--uc-button-size);height:var(--uc-button-size)}uc-icon svg{width:calc(var(--uc-button-size) / 2);height:calc(var(--uc-button-size) / 2)}uc-range{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--uc-button-size)}uc-range datalist{display:none}uc-range input{width:100%;height:100%;opacity:0}uc-range .uc-track-wrapper{position:absolute;right:10px;left:10px;display:flex;align-items:center;justify-content:center;height:2px;user-select:none;pointer-events:none}uc-range .uc-track{position:absolute;right:0;left:0;display:flex;align-items:center;justify-content:center;height:2px;background-color:currentColor;border-radius:2px;opacity:.5}uc-range .uc-slider{position:absolute;width:16px;height:16px;background-color:currentColor;border-radius:100%;transform:translate(-50%)}uc-range .uc-bar{position:absolute;left:0;height:100%;background-color:currentColor;border-radius:2px}uc-range .uc-caption{position:absolute;display:inline-flex;justify-content:center}uc-config{display:none}:where([uc-simple-btn]){position:relative;display:inline-flex}:where([uc-simple-btn]) button{height:auto;gap:.5em;padding:var(--uc-simple-btn-padding);background-color:var(--uc-simple-btn);color:var(--uc-simple-btn-foreground);font-size:var(--uc-simple-btn-font-size);font-family:var(--uc-simple-btn-font-family)}:where([uc-simple-btn]) button uc-icon{width:auto;height:auto}:where([uc-simple-btn]) button uc-icon svg{width:.9em;height:.9em}:where([uc-simple-btn]) button:hover{background-color:var(--uc-simple-btn-hover)}:where([uc-simple-btn])>uc-drop-area{display:contents}:where([uc-simple-btn]) .uc-visual-drop-area{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--uc-simple-btn-padding);background-color:transparent;color:transparent;font-size:var(--uc-simple-btn-font-size);border:1px dashed var(--uc-simple-btn-foreground);border-radius:inherit;opacity:0;transition:opacity var(--uc-transition)}:where([uc-simple-btn])>uc-drop-area[drag-state=active] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn])>uc-drop-area[drag-state=inactive] .uc-visual-drop-area{opacity:0}:where([uc-simple-btn])>uc-drop-area[drag-state=near] .uc-visual-drop-area{opacity:1}:where([uc-simple-btn])>uc-drop-area[drag-state=over] .uc-visual-drop-area{opacity:1}uc-source-btn>button{display:flex;align-items:center;margin-bottom:2px;padding:2px var(--uc-padding);color:var(--uc-foreground);border-radius:var(--uc-radius);cursor:pointer;transition:background-color var(--uc-transition),color var(--uc-transition);user-select:none;width:100%;background-color:unset;height:unset}uc-source-btn:last-child>button{margin-bottom:0}uc-source-btn>button:hover{color:var(--uc-primary);background-color:var(--uc-primary-transparent)}uc-source-btn uc-icon{display:inline-flex;flex-grow:1;justify-content:center;min-width:var(--uc-button-size);margin-right:var(--uc-padding);opacity:.8}uc-source-btn .uc-txt{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--uc-button-size);padding:0;white-space:nowrap;border:none}:where([uc-drop-area]){padding:2px;overflow:hidden;border:1px dashed var(--uc-border);border-radius:calc(var(--uc-radius) * 1.75);transition:border var(--uc-transition),border-radius var(--uc-transition)}:where([uc-drop-area]),:where([uc-drop-area]) .uc-content-wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:where([uc-drop-area]) .uc-text{position:relative;margin:var(--uc-padding);color:var(--uc-muted-foreground);transition:color var(--uc-transition)}:where([uc-drop-area])[ghost][drag-state=inactive]{display:none}:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state=active],[drag-state=near],[drag-state=over]){background:var(--uc-background)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) :is(.uc-text,.uc-icon-container){color:var(--uc-primary)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near],[drag-state=over],:hover){color:var(--uc-primary);background:var(--uc-primary-transparent);border-color:var(--uc-primary-transparent)}:where([uc-drop-area]):is([drag-state=active],[drag-state=near]){opacity:1}:where([uc-drop-area])[drag-state=over]{border-color:var(--uc-primary);opacity:1}:where([uc-drop-area])[with-icon]{min-height:180px}:where([uc-drop-area])[with-icon] .uc-content-wrapper{display:flex;flex-direction:column}:where([uc-drop-area])[with-icon] .uc-text{color:var(--uc-foreground);font-weight:500;font-size:1.1em}:where([uc-drop-area])[with-icon] .uc-icon-container{position:relative;width:64px;height:64px;margin:var(--uc-padding);overflow:hidden;color:var(--uc-foreground);background-color:var(--uc-muted);border-radius:50%;transition:color var(--uc-transition),background-color var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon{position:absolute;width:32px;height:32px;top:calc(50% - 16px);left:calc(50% - 16px);transition:transform var(--uc-transition)}:where([uc-drop-area])[with-icon] uc-icon:last-child{transform:translateY(48px)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container,:where([uc-drop-area])[with-icon]:hover .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]:hover .uc-icon-container{background-color:var(--uc-primary-transparent)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-icon-container{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) .uc-text{color:var(--uc-primary)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper:is([drag-state=active],[drag-state=near],[drag-state=over]) uc-icon:last-child{transform:translateY(0)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=near] uc-icon:last-child{transform:scale(1.3)}:where([uc-drop-area])[with-icon]>.uc-content-wrapper[drag-state=over] uc-icon:last-child{transform:scale(1.5)}:where([uc-drop-area])[fullscreen]{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;width:calc(100vw - var(--uc-padding) * 2);height:calc(100vh - var(--uc-padding) * 2);margin:var(--uc-padding)}:where([uc-drop-area])[fullscreen] .uc-content-wrapper{width:100%;max-width:calc(var(--uc-dialog-width) * .8);height:180px;color:var(--uc-foreground);background-color:var(--uc-background);border-radius:calc(var(--uc-radius) * 1.75);box-shadow:var(--uc-dialog-shadow);transition:color var(--uc-transition),background-color var(--uc-transition),box-shadow var(--uc-transition),border-radius var(--uc-transition),transform var(--uc-transition)}:where([uc-drop-area])[with-icon][fullscreen][drag-state=active]>.uc-content-wrapper,:where([uc-drop-area])[with-icon][fullscreen][drag-state=near]>.uc-content-wrapper{transform:translateY(10px);opacity:0}:where([uc-drop-area])[with-icon][fullscreen][drag-state=over]>.uc-content-wrapper{transform:translateY(0);opacity:1}:is(:where([uc-drop-area])[with-icon][fullscreen])>.uc-content-wrapper uc-icon:first-child{transform:translateY(-48px)}:where([uc-drop-area])[clickable]{cursor:pointer}:where([uc-modal]){--modal-max-content-height: calc( var(--uploadcare-blocks-window-height, 100vh) - 4 * var(--uc-padding) - var(--uc-button-size) );--modal-content-height-fill: var(--uploadcare-blocks-window-height, 100vh)}:where([uc-modal])[dialog-fallback]{--uc-z-max: 2147483647;position:fixed;z-index:var(--uc-z-max);display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;pointer-events:none;inset:0}:where([uc-modal])[dialog-fallback] dialog[open]{z-index:var(--uc-z-max);pointer-events:auto}:where([uc-modal])[dialog-fallback] dialog[open]+.uc-backdrop{position:fixed;top:0;left:0;z-index:calc(var(--uc-z-max) - 1);align-items:center;justify-content:center;width:100vw;height:100vh;background-color:#0000001a;pointer-events:auto}:where([uc-modal])[strokes][dialog-fallback] dialog[open]+.uc-backdrop{background-image:var(--modal-backdrop-background-image)}@supports selector(dialog::backdrop){:where([uc-modal])>dialog::backdrop{background-color:#0000001a}:where([uc-modal])[strokes]>dialog::backdrop{background-image:var(--modal-backdrop-background-image)}}:where([uc-modal])>dialog[open]{transform:translateY(0);visibility:visible;opacity:1}:where([uc-modal])>dialog:not([open]){transform:translateY(20px);visibility:hidden;opacity:0}:where([uc-modal])>dialog{display:flex;flex-direction:column;width:max-content;max-width:min(calc(100% - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2));min-height:var(--uc-button-size);max-height:calc(var(--uc-dialog-max-height) - var(--uc-padding) * 2);margin:auto;padding:0;overflow:hidden;background-color:var(--uc-background);border:0;border-radius:calc(var(--uc-radius) * 1.75);box-shadow:var(--uc-dialog-shadow);transition:transform .4s ease,opacity .4s ease}@media only screen and (max-width: 430px),only screen and (max-height: 600px){:where([uc-modal])>dialog>.uc-content{height:var(--modal-max-content-height)}}uc-url-source{display:block;background-color:var(--uc-background)}[uc-modal] uc-url-source{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2))}uc-url-source>.uc-content{display:grid;grid-gap:4px;grid-template-columns:1fr min-content;padding:var(--uc-padding);padding-top:0}uc-url-source .uc-url-input{display:flex}uc-camera-source{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow:hidden;background-color:var(--uc-background);border-radius:var(--uc-radius)}[uc-modal] uc-camera-source{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:100vh;max-height:var(--modal-max-content-height)}uc-camera-source.uc-initialized{height:max-content}@media only screen and (max-width: 430px){uc-camera-source{width:calc(100vw - var(--uc-padding) * 2);height:var(--modal-content-height-fill, 100%)}}uc-camera-source video{display:block;width:100%;max-height:100%;object-fit:contain;object-position:center center;background-color:var(--uc-muted);border-radius:var(--uc-radius)}uc-camera-source .uc-toolbar{position:absolute;bottom:0;display:flex;justify-content:space-between;width:100%;padding:var(--uc-padding);background-color:var(--uc-background)}uc-camera-source .uc-content{display:flex;flex:1;justify-content:center;width:100%;padding:var(--uc-padding);padding-top:0;overflow:hidden}uc-camera-source .uc-message-box{display:flex;flex-direction:column;grid-gap:40px;align-items:center;justify-content:center;padding:40px 40px 0;color:var(--uc-foreground)}uc-camera-source .uc-message-box button{color:var(--uc-primary-foreground);background-color:var(--uc-primary)}uc-camera-source .uc-shot-btn{position:absolute;bottom:20px;width:58px;height:58px;color:var(--uc-background);background-color:var(--uc-foreground);border-radius:50%;opacity:.85;transition:bottom var(--uc-transition),opacity var(--uc-transition),transform var(--uc-transition)}uc-camera-source .uc-shot-btn:hover{transform:scale(1.05);opacity:1}uc-camera-source .uc-shot-btn:active{transform:scale(1);opacity:1}uc-camera-source .uc-shot-btn[disabled]{bottom:-80px}uc-camera-source .uc-shot-btn uc-icon svg{width:20px;height:20px}uc-external-source{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--uc-background);overflow:hidden}[uc-modal] uc-external-source{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2));height:var(--modal-content-height-fill, 100%);max-height:var(--modal-max-content-height)}uc-external-source>.uc-content{position:relative;display:grid;flex:1;grid-template-rows:1fr min-content}@media only screen and (max-width: 430px){uc-external-source{width:calc(100vw - var(--uc-padding) * 2);height:var(--modal-content-height-fill, 100%)}}uc-external-source iframe{display:block;width:100%;height:100%;border:none}uc-external-source .uc-iframe-wrapper{overflow:hidden}uc-external-source .uc-toolbar{display:grid;grid-gap:var(--uc-padding);grid-template-columns:max-content 1fr max-content max-content;align-items:center;width:100%;padding:var(--uc-padding);border-top:1px solid var(--uc-border)}uc-external-source .uc-back-btn{padding-left:0}uc-external-source .uc-selected-counter{display:flex;grid-gap:var(--uc-padding);align-items:center;justify-content:space-between;padding:var(--uc-padding);color:var(--uc-muted-foreground)}uc-upload-list{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background-color:var(--uc-background);transition:opacity var(--uc-transition)}[uc-modal] uc-upload-list{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:max-content;max-height:var(--modal-max-content-height)}uc-upload-list .uc-no-files{height:32px;padding:20px}uc-upload-list .uc-files{display:block;flex:1;min-height:32px;padding:0 var(--uc-padding);overflow:auto}uc-upload-list .uc-toolbar{display:flex;gap:4px;justify-content:space-between;padding:var(--uc-padding);background-color:var(--uc-background)}uc-upload-list .uc-toolbar-spacer{flex:1}uc-upload-list uc-drop-area{position:absolute;top:0;left:0;width:calc(100% - var(--uc-padding) * 2);height:calc(100% - var(--uc-padding) * 2);margin:var(--uc-padding);border-radius:var(--uc-radius)}uc-upload-list uc-activity-header>.uc-header-text{padding:0 var(--uc-padding)}uc-upload-list .uc-common-error{border-radius:var(--uc-radius);color:var(--uc-destructive-foreground);background-color:var(--uc-destructive);display:flex;align-items:center;justify-content:center;padding:var(--uc-padding);margin:4px var(--uc-padding) 0 var(--uc-padding);font-size:.925em}uc-upload-list .uc-add-more-btn uc-icon{display:none}uc-start-from{display:block;overflow-y:auto}uc-start-from .uc-content{display:grid;grid-auto-flow:row;gap:calc(var(--uc-padding) * 2);width:100%;height:100%;padding:calc(var(--uc-padding) * 2);background-color:var(--uc-background)}[uc-modal] uc-start-from{width:min(calc(var(--uc-dialog-width) - var(--uc-padding) * 2),calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2))}[uc-modal] uc-start-from uc-drop-area{border-radius:var(--uc-radius)}@media only screen and (max-width: 430px){[uc-modal] uc-start-from uc-drop-area{display:none}}uc-file-item{--uc-file-item-gap: 4px;--uc-file-item-height: calc(var(--uc-preview-size) + var(--uc-padding) * 2 + var(--uc-file-item-gap));display:block;overflow:hidden;min-height:var(--uc-file-item-height)}uc-file-item:last-of-type{--uc-file-item-gap: 0}uc-file-item>.uc-inner{position:relative;display:grid;grid-template-columns:var(--uc-preview-size) 1fr max-content;gap:2px;align-items:center;margin-bottom:var(--uc-file-item-gap);padding:var(--uc-padding);overflow:hidden;font-size:.925em;background-color:var(--uc-muted);border-radius:var(--uc-radius);transition:background-color var(--uc-transition)}uc-file-item>.uc-inner[focused]{background-color:transparent}uc-file-item>.uc-inner[uploading] .uc-edit-btn{display:none}uc-file-item>:where(.uc-inner[failed],.uc-inner[limit-overflow]){background-color:var(--uc-destructive)}uc-file-item .uc-thumb{position:relative;display:inline-flex;width:var(--uc-preview-size);height:var(--uc-preview-size);background-color:var(--uc-secondary);background-position:center center;background-size:cover;border-radius:var(--uc-radius)}uc-file-item .uc-file-name-wrapper{text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding-right:var(--uc-padding);padding-left:var(--uc-padding);overflow:hidden;color:var(--uc-muted-foreground)}uc-file-item .uc-file-name{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}uc-file-item .uc-file-error{display:none;color:var(--uc-destructive-foreground);font-size:.85em}uc-file-item button.uc-remove-btn,uc-file-item button.uc-edit-btn{color:var(--uc-muted-foreground)}uc-file-item button svg{pointer-events:none}uc-file-item button.uc-upload-btn{display:none}uc-file-item .uc-badge{position:absolute;bottom:2px;right:2px;width:14px;height:14px;color:var(--uc-background);background-color:var(--uc-foreground);border-radius:50%;transform:scale(.3);opacity:0;transition:opacity var(--uc-transition),transform var(--uc-transition);display:flex;justify-content:center;align-items:center}uc-file-item>.uc-inner:where([failed],[limit-overflow],[finished]) .uc-badge{transform:scale(1);opacity:1}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-badge{background-color:var(--uc-destructive-foreground)}uc-file-item>.uc-inner:where([failed],[limit-overflow]) .uc-file-error{display:block}uc-file-item .uc-badge uc-icon,uc-file-item .uc-badge uc-icon svg{width:100%;height:100%}uc-file-item .uc-progress-bar{opacity:.5;top:calc(100% - 2px);height:2px}uc-file-item .uc-file-actions{display:flex;gap:2px;align-items:center;justify-content:center}uc-progress-bar-common{position:fixed;right:0;bottom:0;left:0;z-index:10000;display:block;height:10px;background-color:var(--uc-background);transition:opacity .3s}uc-progress-bar-common:not([active]){opacity:0;pointer-events:none}uc-progress-bar{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none}uc-progress-bar .uc-progress{width:calc(var(--l-width) * 1%);height:100%;background-color:var(--uc-primary);transform:translate(0);opacity:1;transition:width .6s,opacity .3s}uc-progress-bar .uc-progress--hidden{opacity:0}uc-activity-header{display:flex;justify-content:space-between;gap:var(--uc-padding);padding:var(--uc-padding);color:var(--uc-foreground);font-weight:500;font-size:1em}uc-activity-header>*{display:flex;align-items:center}uc-copyright{display:flex;width:100%;justify-content:center}uc-copyright .uc-credits{all:unset;position:absolute;bottom:12px;background-color:var(--uc-background);padding:2px 5px;border-radius:6px;color:var(--uc-muted-foreground);font-weight:400;font-size:12px;opacity:.9;cursor:pointer;transition:opacity var(--uc-transition),background-color var(--uc-transition)}uc-copyright .uc-credits:focus-visible{outline:1px auto -webkit-focus-ring-color}uc-copyright .uc-credits:hover{opacity:1;background-color:var(--uc-muted)}[uc-cloud-image-editor]{--color-primary-accent: var(--uc-primary);--color-text-base: var(--uc-foreground);--color-text-accent-contrast: var(--uc-background);--color-fill-contrast: var(--uc-background);--color-modal-backdrop: oklch(0 0 0 / .1);--color-image-background: var(--uc-muted);--color-focus-ring: var(--color-primary-accent);--color-crop-guides: var(--uc-foreground);--font-size-ui: var(--uc-font-size);--size-touch-area: var(--uc-button-size);--size-panel-heading: calc(var(--uc-button-size) + var(--uc-padding) * 2);--size-ui-min-width: 130px;--size-line-width: 1px;--size-modal-width: 650px;--size-icon: calc(var(--uc-button-size) / 2);--border-radius-editor: var(--uc-radius);--border-radius-thumb: var(--uc-radius);--border-radius-ui: var(--uc-radius);--border-radius-base: var(--uc-radius);--cldtr-gap-min: 5px;--cldtr-gap-mid-1: 10px;--cldtr-gap-mid-2: 15px;--cldtr-gap-max: 20px;--transition-duration-2: var(--transition-duration-all, .2s);--transition-duration-3: var(--transition-duration-all, .3s);--transition-duration-4: var(--transition-duration-all, .4s);--transition-duration-5: var(--transition-duration-all, .5s);--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading);--transparent-pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);display:block;width:100%;height:100%;max-height:100%}[uc-cloud-image-editor] :is([can-handle-paste]:hover,[can-handle-paste]:focus){--can-handle-paste: "true"}[uc-cloud-image-editor] :is([tabindex][focus-visible],[tabindex]:hover,[with-effects][focus-visible],[with-effects]:hover){--filter-effect: var(--hover-filter) !important;--opacity-effect: var(--hover-opacity) !important;--color-effect: var(--hover-color-rgb) !important;--background-effect: var(--hover-background) !important}[uc-cloud-image-editor] :is([tabindex]:active,[with-effects]:active){--filter-effect: var(--down-filter) !important;--opacity-effect: var(--down-opacity) !important;--color-effect: var(--down-color-rgb) !important;--background-effect: var(--down-background) !important}[uc-cloud-image-editor] :is([tabindex][active],[with-effects][active]){--filter-effect: var(--active-filter) !important;--opacity-effect: var(--active-opacity) !important;--color-effect: var(--active-color-rgb) !important;--background-effect: var(--active-background) !important}[uc-cloud-image-editor] [hidden-scrollbar]::-webkit-scrollbar{display:none}[uc-cloud-image-editor] [hidden-scrollbar]{-ms-overflow-style:none;scrollbar-width:none}[uc-cloud-image-editor].uc-editor_ON{--modal-header-opacity: 0;--modal-header-height: 0px;--modal-toolbar-height: calc(var(--size-panel-heading) * 2)}[uc-cloud-image-editor].uc-editor_OFF{--modal-header-opacity: 1;--modal-header-height: var(--size-panel-heading);--modal-toolbar-height: var(--size-panel-heading)}[uc-cloud-image-editor]>.uc-wrapper{--l-min-img-height: var(--modal-toolbar-height);--l-max-img-height: 100%;--l-edit-button-width: 120px;--l-toolbar-horizontal-padding: var(--cldtr-gap-mid-1);position:relative;display:grid;grid-template-rows:minmax(var(--l-min-img-height),var(--l-max-img-height)) minmax(var(--modal-toolbar-height),auto);height:100%;overflow:hidden;overflow-y:auto}@media only screen and (max-width: 800px){[uc-cloud-image-editor]>.uc-wrapper{--l-edit-button-width: 70px;--l-toolbar-horizontal-padding: var(--cldtr-gap-min)}}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport{display:flex;align-items:center;justify-content:center;overflow:hidden}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image{--viewer-image-opacity: 1;position:absolute;top:0;left:0;z-index:10;display:block;box-sizing:border-box;width:100%;height:100%;object-fit:scale-down;background-color:var(--color-image-background);transform:scale(1);opacity:var(--viewer-image-opacity);user-select:none;pointer-events:auto}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_visible_viewer{transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-4)}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_to_cropper{--viewer-image-opacity: 0;background-image:var(--transparent-pixel);transform:scale(1);transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container>.uc-image.uc-image_hidden_effects{--viewer-image-opacity: 0;transform:scale(1);transition:opacity var(--transition-duration-3) cubic-bezier(.5,0,1,1),transform var(--transition-duration-4);pointer-events:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-image_container{position:relative;display:block;width:100%;height:100%;background-color:var(--color-image-background);transition:var(--transition-duration-3)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar{position:relative;transition:.3s}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content{position:absolute;bottom:0;left:0;box-sizing:border-box;width:100%;height:var(--modal-toolbar-height);min-height:var(--size-panel-heading);background-color:var(--color-fill-contrast)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__viewer{display:flex;align-items:center;justify-content:space-between;height:var(--size-panel-heading);padding-right:var(--l-toolbar-horizontal-padding);padding-left:var(--l-toolbar-horizontal-padding)}[uc-cloud-image-editor]>.uc-wrapper>.uc-toolbar>.uc-toolbar_content.uc-toolbar_content__editor{display:flex}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-info_pan{position:absolute;user-select:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-file_type_outer{position:absolute;z-index:2;display:flex;max-width:120px;transform:translate(-40px);user-select:none}[uc-cloud-image-editor]>.uc-wrapper>.uc-viewport>.uc-file_type_outer>.uc-file_type{padding:4px .8em}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash{position:absolute;z-index:4;display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--color-fill-contrast)}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--uc-foreground);background-color:var(--uc-muted);border-radius:50%}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_content>.uc-network_problems_text{margin-top:var(--cldtr-gap-max);font-size:var(--font-size-ui);color:var(--uc-foreground)}[uc-cloud-image-editor]>.uc-wrapper>.uc-network_problems_splash>.uc-network_problems_footer{display:flex;align-items:center;justify-content:center;height:var(--size-panel-heading)}uc-crop-frame>.uc-svg{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);opacity:inherit;transition:var(--transition-duration-3)}uc-crop-frame>.uc-thumb{--idle-color-rgb: var(--color-text-base);--hover-color-rgb: var(--color-primary-accent);--focus-color-rgb: var(--color-primary-accent);--down-color-rgb: var(--color-primary-accent);--color-effect: var(--idle-color-rgb);color:var(--color-effect);transition:color var(--transition-duration-3),opacity var(--transition-duration-3)}uc-crop-frame>.uc-thumb--visible{opacity:1;pointer-events:auto}uc-crop-frame>.uc-thumb--hidden{opacity:0;pointer-events:none}uc-crop-frame>.uc-guides{transition:var(--transition-duration-3)}uc-crop-frame>.uc-guides--hidden{opacity:0}uc-crop-frame>.uc-guides--semi-hidden{opacity:.2}uc-crop-frame>.uc-guides--visible{opacity:1}uc-editor-button-control,uc-editor-crop-button-control,uc-editor-filter-control,uc-editor-operation-control{--l-base-min-width: var(--uc-button-size);--l-base-height: var(--uc-button-size);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--background-effect: var(--idle-background);--filter-effect: var(--idle-filter);--idle-color-rgb: var(--uc-secondary-foreground);--idle-opacity: 1;--idle-filter: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-opacity: 1;--hover-filter: .8;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--hover-color-rgb);--down-opacity: 1;--down-filter: .6;--down-background: var(--uc-secondary)}uc-editor-button-control>button,uc-editor-crop-button-control>button,uc-editor-filter-control>button,uc-editor-operation-control>button{all:unset;position:relative;display:grid;grid-template-columns:var(--l-base-min-width) auto;grid-template-rows:100%;align-items:center;height:var(--l-base-height);color:var(--color-effect);opacity:var(--opacity-effect);outline:none;cursor:pointer;transition:var(--l-width-transition)}:where(uc-editor-button-control,uc-editor-crop-button-control,uc-editor-filter-control,uc-editor-operation-control)>uc-icon>svg{width:var(--size-icon);height:var(--size-icon)}uc-editor-filter-control>uc-icon.uc-original-icon>svg{width:100%;height:100%}uc-editor-button-control.uc-active,uc-editor-operation-control.uc-active,uc-editor-crop-button-control.uc-active,uc-editor-filter-control.uc-active{--idle-color-rgb: var(--uc-primary);--idle-background: var(--uc-primary-transparent);--idle-opacity: .9;--hover-color-rgb: var(--uc-primary);--hover-background: var(--uc-primary-transparent);--hover-opacity: 1}uc-editor-filter-control.uc-not_active .uc-preview[loaded]{opacity:1}uc-editor-filter-control.uc-active .uc-preview{opacity:0}uc-editor-button-control.uc-not_active,uc-editor-operation-control.uc-not_active,uc-editor-crop-button-control.uc-not_active,uc-editor-filter-control.uc-not_active{--idle-color-rgb: var(--uc-secondary-foreground)}uc-editor-button-control>button:before,uc-editor-operation-control>button:before,uc-editor-crop-button-control>button:before,uc-editor-filter-control>button:before{position:absolute;content:"";right:0;left:0;z-index:-1;width:100%;height:100%;background-color:var(--background-effect);border-radius:var(--border-radius-editor);transition:var(--transition-duration-3)}uc-editor-button-control>button .uc-title,uc-editor-operation-control>button .uc-title,uc-editor-crop-button-control>button .uc-title,uc-editor-filter-control>button .uc-title{padding-right:var(--cldtr-gap-mid-1);font-size:.7em;letter-spacing:1.004px;text-transform:uppercase}uc-editor-button-control>button uc-icon,uc-editor-operation-control>button uc-icon,uc-editor-crop-button-control>button uc-icon,uc-editor-filter-control>button uc-icon{pointer-events:none}uc-editor-filter-control>button .uc-preview{position:absolute;right:0;left:0;z-index:-1;width:100%;height:var(--l-base-height);background-repeat:no-repeat;background-size:contain;border-radius:var(--border-radius-editor);opacity:0;filter:brightness(var(--filter-effect));transition:var(--transition-duration-3)}uc-editor-filter-control>.uc-original-icon{color:var(--color-effect);opacity:.3}uc-editor-image-cropper{position:absolute;top:0;left:0;z-index:10;display:block;width:100%;height:100%;opacity:0;pointer-events:none;touch-action:none;color:var(--color-crop-guides)}uc-editor-image-cropper.uc-active_from_editor{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}uc-editor-image-cropper.uc-active_from_viewer{transform:scale(1) translate(0);opacity:1;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1) .4s,opacity var(--transition-duration-3);pointer-events:auto}uc-editor-image-cropper.uc-inactive_to_editor{opacity:0;transition:transform var(--transition-duration-4) cubic-bezier(.37,0,.63,1),opacity var(--transition-duration-3) calc(var(--transition-duration-3) + .05s);pointer-events:none}uc-editor-image-cropper>.uc-canvas{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%}uc-editor-image-fader{position:absolute;top:0;left:0;display:block;width:100%;height:100%}uc-editor-image-fader.uc-active_from_viewer{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-start);pointer-events:auto}uc-editor-image-fader.uc-active_from_cropper{z-index:3;transform:scale(1);opacity:1;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:auto}uc-editor-image-fader.uc-inactive_to_cropper{z-index:3;transform:scale(1);opacity:0;transition:transform var(--transition-duration-4),opacity var(--transition-duration-3) steps(1,jump-end);pointer-events:none}uc-editor-image-fader .uc-fader-image{position:absolute;top:0;left:0;display:block;width:100%;height:100%;object-fit:scale-down;transform:scale(1);user-select:none;content-visibility:auto}uc-editor-image-fader .uc-fader-image--preview{background-color:var(--color-image-background);border-top-left-radius:var(--border-radius-base);border-top-right-radius:var(--border-radius-base);transform:scale(1);opacity:0;transition:var(--transition-duration-3)}uc-editor-scroller{display:flex;align-items:center;width:100%;height:100%;overflow-x:scroll}uc-editor-slider{display:flex;align-items:center;justify-content:center;width:100%;height:var(--size-panel-heading)}uc-editor-toolbar{position:relative;width:100%;height:100%}@media only screen and (max-width: 600px){uc-editor-toolbar{--l-tab-gap: var(--cldtr-gap-mid-1);--l-slider-padding: var(--uc-padding);--l-controls-padding: var(--uc-padding)}}@media only screen and (min-width: 601px){uc-editor-toolbar{--l-tab-gap: var(--cldtr-gap-max);--l-slider-padding: var(--uc-padding);--l-controls-padding: var(--uc-padding)}}uc-editor-toolbar>.uc-toolbar-container{position:relative;width:100%;height:100%;overflow:hidden}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar{position:absolute;display:grid;grid-template-rows:1fr 1fr;width:100%;height:100%;background-color:var(--color-fill-contrast);transition:opacity var(--transition-duration-3) ease-in-out,transform var(--transition-duration-3) ease-in-out,visibility var(--transition-duration-3) ease-in-out}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--visible{transform:translateY(0);opacity:1;pointer-events:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--top-hidden{transform:translateY(100%);opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar.uc-sub-toolbar--bottom-hidden{transform:translateY(-100%);opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row{display:flex;align-items:center;justify-content:space-between;padding-right:var(--l-controls-padding);padding-left:var(--l-controls-padding)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles{position:relative;display:grid;grid-auto-flow:column;grid-gap:0px var(--l-tab-gap);align-items:center;height:100%}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggles_indicator{position:absolute;bottom:0;left:0;width:var(--size-touch-area);height:2px;background-color:var(--uc-secondary-foreground);transform:translate(0);transition:transform var(--transition-duration-3)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row{position:relative}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;overflow:hidden;opacity:0;content-visibility:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--visible{opacity:1;pointer-events:auto}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content.uc-tab-content--hidden{opacity:0;pointer-events:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--visible{display:contents}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle.uc-tab-toggle--hidden{display:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles.uc-tab-toggles--hidden{display:none}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui{width:var(--uc-button-size)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-controls-row>.uc-tab-toggles>.uc-tab-toggle>uc-btn-ui>uc-icon>svg{width:var(--size-icon);height:var(--size-icon)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_align{display:grid;grid-template-areas:". inner .";grid-template-columns:1fr auto 1fr;box-sizing:border-box;min-width:100%;padding-left:var(--uc-padding)}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner{display:grid;grid-area:inner;grid-auto-flow:column;gap:6px}uc-editor-toolbar>.uc-toolbar-container>.uc-sub-toolbar>.uc-tab-content-row>.uc-tab-content .uc-controls-list_inner:last-child{padding-right:var(--uc-padding)}uc-editor-toolbar .uc-controls-list_last-item{margin-right:var(--cldtr-gap-max)}uc-editor-toolbar .uc-info-tooltip_container{position:absolute;display:flex;align-items:flex-start;justify-content:center;width:100%;height:100%}uc-editor-toolbar .uc-info-tooltip_wrapper{position:absolute;top:calc(-100% - var(--cldtr-gap-mid-2));display:flex;flex-direction:column;justify-content:flex-end;height:100%;pointer-events:none}uc-editor-toolbar .uc-info-tooltip{z-index:3;padding:3px 6px;color:var(--color-text-base);font-size:.7em;letter-spacing:1px;text-transform:uppercase;background-color:var(--color-text-accent-contrast);border-radius:var(--border-radius-editor);transform:translateY(100%);opacity:0;transition:var(--transition-duration-3)}uc-editor-toolbar .uc-info-tooltip_visible{transform:translateY(0);opacity:1}uc-editor-toolbar .uc-slider{padding-right:var(--l-slider-padding);padding-left:var(--l-slider-padding)}uc-btn-ui>button{--filter-effect: var(--idle-brightness);--opacity-effect: var(--idle-opacity);--color-effect: var(--idle-color-rgb);--background-effect: var(--idle-background);--l-transition-effect: var( --css-transition, color var(--transition-duration-2), background-color var(--transition-duration-2), filter var(--transition-duration-2) );all:unset;display:inline-flex;align-items:center;box-sizing:var(--css-box-sizing, border-box);height:var(--css-height, var(--uc-button-size));padding-right:var(--css-padding-right, 14px);padding-left:var(--css-padding-left, 14px);font-size:1em;color:var(--color-effect);background-color:var(--background-effect);border-radius:var(--uc-radius);opacity:var(--opacity-effect);outline:none;cursor:pointer;filter:brightness(var(--filter-effect));transition:var(--l-transition-effect);user-select:none}uc-btn-ui>button>uc-icon{pointer-events:none}uc-btn-ui .uc-text{white-space:nowrap}uc-btn-ui .uc-icon{display:flex;align-items:center;justify-content:center;color:var(--color-effect);filter:brightness(var(--filter-effect));transition:var(--l-transition-effect)}uc-btn-ui .uc-icon_left{margin-right:var(--cldtr-gap-mid-1);margin-left:0}uc-btn-ui .uc-icon_right{margin-right:0;margin-left:var(--cldtr-gap-mid-1)}uc-btn-ui .uc-icon_single{margin-right:0;margin-left:0}uc-btn-ui .uc-icon_hidden{display:none;margin:0}uc-btn-ui.uc-primary>button{--idle-color-rgb: var(--uc-primary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-primary);--hover-color-rgb: var(--uc-primary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-primary-hover);--down-color-rgb: var(--uc-primary-foreground);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-primary);--active-color-rgb: var(--uc-primary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary)}uc-btn-ui.uc-primary-icon>button{--idle-color-rgb: var(--uc-primary);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-primary);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-primary-transparent);--down-color-rgb: var(--uc-primary);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-primary-transparent);--active-color-rgb: var(--uc-primary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary);padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-secondary>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary-hover);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent}uc-btn-ui.uc-secondary-icon>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-tab>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: transparent;--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: 1;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-secondary-foreground);--active-brightness: 1;--active-opacity: 1;--active-background: transparent;padding:0;width:var(--uc-button-size)}uc-btn-ui.uc-default>button{--idle-color-rgb: var(--uc-secondary-foreground);--idle-brightness: 1;--idle-opacity: 1;--idle-background: var(--uc-secondary);--hover-color-rgb: var(--uc-secondary-foreground);--hover-brightness: 1;--hover-opacity: 1;--hover-background: var(--uc-secondary-hover);--down-color-rgb: var(--uc-secondary-foreground);--down-brightness: .75;--down-opacity: 1;--down-background: var(--uc-secondary);--active-color-rgb: var(--uc-primary);--active-brightness: 1;--active-opacity: 1;--active-background: var(--uc-primary-transparent)}uc-line-loader-ui{position:absolute;top:0;left:0;z-index:9999;width:100%;height:2px;opacity:.5}uc-line-loader-ui .uc-inner{width:25%;max-width:200px;height:100%}uc-line-loader-ui .uc-line{width:100%;height:100%;background-color:var(--uc-primary);transform:translate(-101%);transition:transform 1s}uc-slider-ui{--l-thumb-size: 24px;--l-zero-dot-size: 5px;--l-zero-dot-offset: 2px;--idle-color-rgb: var(--uc-foreground);--hover-color-rgb: var(--uc-primary);--down-color-rgb: var(--uc-primary);--color-effect: var(--idle-color-rgb);--l-color: var(--color-effect);position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset)) * 2)}uc-slider-ui .uc-thumb{position:absolute;left:0;width:var(--l-thumb-size);height:var(--l-thumb-size);background-color:var(--l-color);border-radius:50%;transform:translate(0);opacity:1;transition:opacity var(--transition-duration-2),background-color var(--transition-duration-2)}uc-slider-ui .uc-steps{position:absolute;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:100%;padding-right:calc(var(--l-thumb-size) / 2);padding-left:calc(var(--l-thumb-size) / 2)}uc-slider-ui .uc-border-step{width:0px;height:10px;border-right:1px solid var(--l-color);opacity:.6;transition:border-color var(--transition-duration-2)}uc-slider-ui .uc-minor-step{width:0px;height:4px;border-right:1px solid var(--l-color);opacity:.2;transition:border-color var(--transition-duration-2)}uc-slider-ui .uc-zero-dot{position:absolute;top:calc(100% - var(--l-zero-dot-offset) * 2);left:calc(var(--l-thumb-size) / 2 - var(--l-zero-dot-size) / 2);width:var(--l-zero-dot-size);height:var(--l-zero-dot-size);background-color:var(--color-primary-accent);border-radius:50%;opacity:0;transition:var(--transition-duration-3)}uc-slider-ui .uc-input{position:absolute;width:calc(100% - 10px);height:100%;margin:0;cursor:pointer;opacity:0}uc-presence-toggle.uc-transition{transition:opacity var(--transition-duration-3),visibility var(--transition-duration-3)}uc-presence-toggle.uc-visible{opacity:1;pointer-events:inherit}uc-presence-toggle.uc-hidden{opacity:0;pointer-events:none}uc-presence-toggle.uc-initial{display:none!important;transition:none!important}[uc-cloud-image-editor] [role=button]:focus-visible,[uc-cloud-image-editor] button:focus-visible{outline:1px auto -webkit-focus-ring-color}:where([uc-cloud-image-editor]) uc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}:where([uc-cloud-image-editor]) uc-icon svg{width:calc(var(--uc-button-size) / 2);height:calc(var(--uc-button-size) / 2)}uc-cloud-image-editor-activity{position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:var(--uc-background)}[uc-modal] uc-cloud-image-editor-activity{width:min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),calc(100vw - var(--uc-padding) * 2));height:var(--modal-content-height-fill, 100%)}uc-select{display:inline-flex}uc-select select{position:relative;display:inline-flex;align-items:center;justify-content:center;height:var(--uc-button-size);padding:0 14px;font-size:1em;font-family:inherit;white-space:nowrap;border:none;border-radius:var(--uc-radius);cursor:pointer;user-select:none;transition:background-color var(--uc-transition);color:var(--uc-secondary-foreground);background-color:var(--uc-secondary)}:where([uc-wgt-common]) uc-source-btn[type]{all:unset} diff --git a/pyuploadcare/dj/templates/uploadcare/forms/widgets/file.html b/pyuploadcare/dj/templates/uploadcare/forms/widgets/file.html index 3ef3b710..e25827f9 100644 --- a/pyuploadcare/dj/templates/uploadcare/forms/widgets/file.html +++ b/pyuploadcare/dj/templates/uploadcare/forms/widgets/file.html @@ -16,32 +16,32 @@ {% endif %}
+ - + > - + > - - - + > +
diff --git a/tests/dj/test_conf.py b/tests/dj/test_conf.py index c6919350..9a3e3dce 100644 --- a/tests/dj/test_conf.py +++ b/tests/dj/test_conf.py @@ -51,7 +51,7 @@ def setUp(self): self._original_widget = config["widget"] config["use_hosted_assets"] = True config["widget"] = { - "version": "latest", + "version": "1", "variant": "inline", "build": "", "options": {}, @@ -71,12 +71,14 @@ def test_hosted_js_url(self): config["use_hosted_assets"] = True self.assertEqual( get_widget_js_url(), - "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@latest/web/blocks.js", + "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/file-uploader.min.js", ) def test_local_js_url(self): config["use_hosted_assets"] = False - self.assertEqual(get_widget_js_url(), "uploadcare/blocks.js") + self.assertEqual( + get_widget_js_url(), "uploadcare/file-uploader.min.js" + ) def test_override_js_url(self): config["widget"]["override_js_url"] = "https://example.com/blocks.js" @@ -86,15 +88,15 @@ def test_hosted_css_url(self): config["use_hosted_assets"] = True self.assertEqual( get_widget_css_url("minimal"), - "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@latest" - + "/web/lr-file-uploader-minimal.css", + "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1" + + "/web/uc-file-uploader-minimal.min.css", ) def test_local_css_url(self): config["use_hosted_assets"] = False self.assertEqual( get_widget_css_url("minimal"), - "uploadcare/lr-file-uploader-minimal.css", + "uploadcare/uc-file-uploader-minimal.min.css", ) def test_override_css_url(self): diff --git a/tests/dj/test_forms.py b/tests/dj/test_forms.py index 90061c83..0139eb8a 100644 --- a/tests/dj/test_forms.py +++ b/tests/dj/test_forms.py @@ -44,8 +44,8 @@ class SomeForm(forms.Form): f = SomeForm(label_suffix="") self.assertFalse(f["ff"].field.legacy_widget) ff_str = str(f["ff"]) - self.assertIn("LR.registerBlocks(LR);", ff_str) - self.assertIn("