{e|=1<
{n.delete(e),n.size===0&&(u(),u=null)}}return{set:a,update:l,subscribe:f}}function G(s,i,u){const n=!Array.isArray(s),a=n?[s]:s,l=i.length<2;return A(u,f=>{let t=!1;const r=[];let e=0,d=b;const _=()=>{if(e)return;d();const c=i(n?r[0]:r,f);l?f(c):d=z(c)?c:b},h=a.map((c,p)=>q(c,y=>{r[p]=y,e&=~(1<
{e|=1<
{"status"in s&&t(0,a=s.status),"error"in s&&t(1,f=s.error)},[a,f]}class G extends w{constructor(l){super();y(this,l,B,A,z,{status:0,error:1})}}export{G as default,F as load};
+import{S as w,i as y,s as z,e as E,t as v,c as d,a as b,h as P,d as o,g as u,M as R,j as N,k as S,l as C,m as j,E as H}from"./chunks/index-3711c71a.js";function M(r){let l,t=r[1].frame+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].frame+"")&&N(a,t)},d(f){f&&o(l)}}}function h(r){let l,t=r[1].stack+"",a;return{c(){l=E("pre"),a=v(t)},l(f){l=d(f,"PRE",{});var s=b(l);a=P(s,t),s.forEach(o)},m(f,s){u(f,l,s),R(l,a)},p(f,s){s&2&&t!==(t=f[1].stack+"")&&N(a,t)},d(f){f&&o(l)}}}function A(r){let l,t,a,f,s=r[1].message+"",c,k,n,p,i=r[1].frame&&M(r),_=r[1].stack&&h(r);return{c(){l=E("h1"),t=v(r[0]),a=S(),f=E("pre"),c=v(s),k=S(),i&&i.c(),n=S(),_&&_.c(),p=C()},l(e){l=d(e,"H1",{});var m=b(l);t=P(m,r[0]),m.forEach(o),a=j(e),f=d(e,"PRE",{});var q=b(f);c=P(q,s),q.forEach(o),k=j(e),i&&i.l(e),n=j(e),_&&_.l(e),p=C()},m(e,m){u(e,l,m),R(l,t),u(e,a,m),u(e,f,m),R(f,c),u(e,k,m),i&&i.m(e,m),u(e,n,m),_&&_.m(e,m),u(e,p,m)},p(e,[m]){m&1&&N(t,e[0]),m&2&&s!==(s=e[1].message+"")&&N(c,s),e[1].frame?i?i.p(e,m):(i=M(e),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),e[1].stack?_?_.p(e,m):(_=h(e),_.c(),_.m(p.parentNode,p)):_&&(_.d(1),_=null)},i:H,o:H,d(e){e&&o(l),e&&o(a),e&&o(f),e&&o(k),i&&i.d(e),e&&o(n),_&&_.d(e),e&&o(p)}}}function F({error:r,status:l}){return{props:{error:r,status:l}}}function B(r,l,t){let{status:a}=l,{error:f}=l;return r.$$set=s=>{"status"in s&&t(0,a=s.status),"error"in s&&t(1,f=s.error)},[a,f]}class G extends w{constructor(l){super();y(this,l,B,A,z,{status:0,error:1})}}export{G as default,F as load};
diff --git a/docs/_app/layout.svelte-a7c34f1e.js b/docs/_app/layout.svelte-4620a56f.js
similarity index 88%
rename from docs/_app/layout.svelte-a7c34f1e.js
rename to docs/_app/layout.svelte-4620a56f.js
index 15421f8..751358c 100644
--- a/docs/_app/layout.svelte-a7c34f1e.js
+++ b/docs/_app/layout.svelte-4620a56f.js
@@ -1 +1 @@
-import{S as l,i,s as r,I as u,J as f,K as _,L as c,q as p,o as d}from"./chunks/index-68fa7044.js";function m(n){let s;const o=n[1].default,e=u(o,n,n[0],null);return{c(){e&&e.c()},l(t){e&&e.l(t)},m(t,a){e&&e.m(t,a),s=!0},p(t,[a]){e&&e.p&&(!s||a&1)&&f(e,o,t,t[0],s?c(o,t[0],a,null):_(t[0]),null)},i(t){s||(p(e,t),s=!0)},o(t){d(e,t),s=!1},d(t){e&&e.d(t)}}}function $(n,s,o){let{$$slots:e={},$$scope:t}=s;return n.$$set=a=>{"$$scope"in a&&o(0,t=a.$$scope)},[t,e]}class h extends l{constructor(s){super();i(this,s,$,m,r,{})}}export{h as default};
+import{S as l,i,s as r,I as u,J as f,K as _,L as c,q as p,o as d}from"./chunks/index-3711c71a.js";function m(n){let s;const o=n[1].default,e=u(o,n,n[0],null);return{c(){e&&e.c()},l(t){e&&e.l(t)},m(t,a){e&&e.m(t,a),s=!0},p(t,[a]){e&&e.p&&(!s||a&1)&&f(e,o,t,t[0],s?c(o,t[0],a,null):_(t[0]),null)},i(t){s||(p(e,t),s=!0)},o(t){d(e,t),s=!1},d(t){e&&e.d(t)}}}function $(n,s,o){let{$$slots:e={},$$scope:t}=s;return n.$$set=a=>{"$$scope"in a&&o(0,t=a.$$scope)},[t,e]}class h extends l{constructor(s){super();i(this,s,$,m,r,{})}}export{h as default};
diff --git a/docs/_app/manifest.json b/docs/_app/manifest.json
index 9429440..e33c5a9 100644
--- a/docs/_app/manifest.json
+++ b/docs/_app/manifest.json
@@ -1,11 +1,11 @@
{
".svelte-kit/runtime/client/start.js": {
- "file": "start-c91a3eca.js",
+ "file": "start-91f194db.js",
"src": ".svelte-kit/runtime/client/start.js",
"isEntry": true,
"imports": [
- "_index-68fa7044.js",
- "_paths-5d155410.js"
+ "_index-3711c71a.js",
+ "_paths-5193a87e.js"
],
"dynamicImports": [
".svelte-kit/runtime/components/layout.svelte",
@@ -14,47 +14,47 @@
]
},
".svelte-kit/runtime/components/layout.svelte": {
- "file": "layout.svelte-a7c34f1e.js",
+ "file": "layout.svelte-4620a56f.js",
"src": ".svelte-kit/runtime/components/layout.svelte",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
- "_index-68fa7044.js"
+ "_index-3711c71a.js"
]
},
".svelte-kit/runtime/components/error.svelte": {
- "file": "error.svelte-7544dc29.js",
+ "file": "error.svelte-a52588a9.js",
"src": ".svelte-kit/runtime/components/error.svelte",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
- "_index-68fa7044.js"
+ "_index-3711c71a.js"
]
},
"src/routes/index.svelte": {
- "file": "pages/index.svelte-bdd7f07b.js",
+ "file": "pages/index.svelte-87b4df47.js",
"src": "src/routes/index.svelte",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
- "_index-68fa7044.js",
- "_paths-5d155410.js"
+ "_index-3711c71a.js",
+ "_paths-5193a87e.js"
],
"css": [
- "assets/pages/index.svelte-3edfd478.css"
+ "assets/pages/index.svelte-455f749d.css"
],
"assets": [
"assets/Faktos-34d5460e.ttf",
"assets/Dosis-VariableFont_wght-994868c0.ttf"
]
},
- "_index-68fa7044.js": {
- "file": "chunks/index-68fa7044.js"
+ "_index-3711c71a.js": {
+ "file": "chunks/index-3711c71a.js"
},
- "_paths-5d155410.js": {
- "file": "chunks/paths-5d155410.js",
+ "_paths-5193a87e.js": {
+ "file": "chunks/paths-5193a87e.js",
"imports": [
- "_index-68fa7044.js"
+ "_index-3711c71a.js"
]
}
}
\ No newline at end of file
diff --git a/docs/_app/pages/index.svelte-87b4df47.js b/docs/_app/pages/index.svelte-87b4df47.js
new file mode 100644
index 0000000..6dfac80
--- /dev/null
+++ b/docs/_app/pages/index.svelte-87b4df47.js
@@ -0,0 +1,406 @@
+var SM=Object.defineProperty,EM=Object.defineProperties;var CM=Object.getOwnPropertyDescriptors;var hu=Object.getOwnPropertySymbols;var i0=Object.prototype.hasOwnProperty,s0=Object.prototype.propertyIsEnumerable;var a0=(e,t,r)=>t in e?SM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wi=(e,t)=>{for(var r in t||(t={}))i0.call(t,r)&&a0(e,r,t[r]);if(hu)for(var r of hu(t))s0.call(t,r)&&a0(e,r,t[r]);return e},tc=(e,t)=>EM(e,CM(t));var o0=(e,t)=>{var r={};for(var n in e)i0.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hu)for(var n of hu(e))t.indexOf(n)<0&&s0.call(e,n)&&(r[n]=e[n]);return r};import{N as ae,O as Fh,P as OM,S as Ct,i as Ot,s as At,e as k,c as H,a as V,d as M,g as q,J as _n,K as mn,L as $n,q as W,o as X,I as bn,C as Bt,k as ht,m as pt,Q as la,R as Me,M as j,T as Hu,n as pr,p as vr,z as ne,U as ca,V as AM,W as Li,X as ao,r as Mc,Y as p$,G as io,Z as Ne,_ as TM,b as F,$ as Ni,a0 as u0,l as je,a1 as Fn,a2 as zn,f as Ln,E as se,w as st,x as ft,y as ot,B as ut,t as mt,h as $t,a3 as Nn,a4 as Pc,a5 as xc,a6 as Wa,j as er,a7 as xe,a8 as vn,a9 as Hr,aa as js,ab as $a,ac as kn,ad as Be,A as ue,ae as Wu,F as MM,af as PM,v as xM,ag as IM,D as DM,ah as qs,ai as RM}from"../chunks/index-3711c71a.js";import{r as BM,d as LM,w as FM,b as yn}from"../chunks/paths-5193a87e.js";function zM(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function l0(e){for(var t=1;t p[1])&&(v[1]=1),h.left>i-f?(p[0]>h.left||i p[0])&&(v[0]=1),clearTimeout(this._timer),!v[0]&&!v[1]?!1:this._continueDrag(Mi(Mi({},a),{direction:v,inputEvent:n,isDrag:!0}))},r.checkScroll=function(n){var a=this;if(this._isWait)return!1;var i=n.prevScrollPos,s=i===void 0?this._prevScrollPos:i,u=n.direction,f=n.throttleTime,c=f===void 0?0:f,h=n.inputEvent,p=n.isDrag,v=this._getScrollPosition(u||[0,0],n),g=v[0]-s[0],_=v[1]-s[1],m=u||[g?Math.abs(g)/g:0,_?Math.abs(_)/_:0];return this._prevScrollPos=v,!g&&!_?!1:(this.trigger("move",{offsetX:m[0]?g:0,offsetY:m[1]?_:0,inputEvent:h}),c&&p&&(this._timer=window.setTimeout(function(){a._continueDrag(n)},c)),!0)},r.dragEnd=function(){clearTimeout(this._timer)},r._getScrollPosition=function(n,a){var i=a.container,s=a.getScrollPosition,u=s===void 0?$ot:s;return u({container:i,direction:n})},r._continueDrag=function(n){var a=this,i=n.container,s=n.direction,u=n.throttleTime,f=n.useScroll,c=n.isDrag,h=n.inputEvent;if(!(c&&this._isWait)){var p=Js(),v=Math.max(u+this._prevTime-p,0);if(v>0)return this._timer=window.setTimeout(function(){a._continueDrag(n)},v),!1;this._prevTime=p;var g=this._getScrollPosition(s,n);return this._prevScrollPos=g,c&&(this._isWait=!0),this.trigger("scroll",{container:i,direction:s,inputEvent:h}),this._isWait=!1,f||this.checkScroll(Mi(Mi({},n),{prevScrollPos:g,direction:s,inputEvent:h}))}},t}(Yy),yot=bot;/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */var yh=function(e,t){return yh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},yh(e,t)};function wot(e,t){yh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qr=function(){return qr=Object.assign||function(t){for(var r,n=1,a=arguments.length;n=0?a:a+Math.PI*2}function mc(e){return Sot([e[0].clientX,e[0].clientY],[e[1].clientX,e[1].clientY])/Math.PI*180}function Eot(e){return e.touches&&e.touches.length>=2}function $c(e){return e.touches?Cot(e.touches):[Xy(e)]}function _m(e,t,r){var n=r.length,a=Gs(e,n),i=a.clientX,s=a.clientY,u=a.originalClientX,f=a.originalClientY,c=Gs(t,n),h=c.clientX,p=c.clientY,v=Gs(r,n),g=v.clientX,_=v.clientY,m=i-h,b=s-p,y=i-g,w=s-_;return{clientX:u,clientY:f,deltaX:m,deltaY:b,distX:y,distY:w}}function bc(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function Cot(e){for(var t=Math.min(e.length,2),r=[],n=0;n 0&&f(T)?u>1?ft(T,u-1,f,p,d):Kn(d,T):p||(d[d.length]=T)}return d}var zu=$h(),kc=$h(!0);function nn(i,u){return i&&zu(i,u,ut)}function Hu(i,u){return i&&kc(i,u,ut)}function Za(i,u){return Un(u,function(f){return In(i[f])})}function hr(i,u){u=kn(u,i);for(var f=0,p=u.length;i!=null&&f u}function Dy(i,u){return i!=null&&De.call(i,u)}function Fy(i,u){return i!=null&&u in Fe(i)}function Ny(i,u,f){return i>=ht(u,f)&&i 1?f[d-1]:n,A=d>2?f[2]:n;for(y=i.length>3&&typeof y=="function"?(d--,y):n,A&&dt(f[0],f[1],A)&&(y=d<3?n:y,d=1),u=Fe(u);++p 1),y}),rn(i,lo(i),f),p&&(f=Kt(f,_|v|$,p0));for(var d=u.length;d--;)to(f,u[d]);return f});function yA(i,u){return hp(i,hs(he(u)))}var bA=Cn(function(i,u){return i==null?{}:Yy(i,u)});function hp(i,u){if(i==null)return{};var f=We(lo(i),function(p){return[p]});return u=he(u),rh(i,f,function(p,d){return u(p,d[0])})}function wA(i,u,f){u=kn(u,i);var p=-1,d=u.length;for(d||(d=1,i=n);++p1){for(var f=0;f1){for(var s=0;s=f&&(a.length=i.length=f)},e.prototype.updateAsyncCache=function(t){var r=this,n=this.options,a=n.onCacheChange,i=n.onCacheHit,s=this.keys[0],u=this.values[0];this.values[0]=u.then(function(f){return r.shouldUpdateOnHit&&i(r,r.options,t),r.shouldUpdateOnChange&&a(r,r.options,t),f},function(f){var c=r.getKeyIndex(s);throw c!==-1&&(r.keys.splice(c,1),r.values.splice(c,1)),f})},e}();function d$(e,t){if(t===void 0&&(t={}),kM(e))return d$(e.fn,c0(e.options,t));if(typeof e!="function")throw new TypeError("You must pass a function to `memoize`.");var r=t.isEqual,n=r===void 0?HM:r,a=t.isMatchingKey,i=t.isPromise,s=i===void 0?!1:i,u=t.maxSize,f=u===void 0?1:u,c=t.onCacheAdd,h=t.onCacheChange,p=t.onCacheHit,v=t.transformKey,g=c0({isEqual:n,isMatchingKey:a,isPromise:s,maxSize:f,onCacheAdd:c,onCacheChange:h,onCacheHit:p,transformKey:v},UM(t)),_=new WM(g),m=_.keys,b=_.values,y=_.canTransformKey,w=_.shouldCloneArguments,C=_.shouldUpdateOnAdd,T=_.shouldUpdateOnChange,A=_.shouldUpdateOnHit,x=function I(){var B=w?Du(arguments):arguments;y&&(B=v(B));var P=m.length?_.getKeyIndex(B):-1;if(P!==-1)A&&p(_,g,I),P&&(_.orderByLru(m[P],b[P],P),T&&h(_,g,I));else{var L=e.apply(this,arguments),G=w?B:Du(arguments);_.orderByLru(G,L,m.length),s&&_.updateAsyncCache(I),C&&c(_,g,I),T&&h(_,g,I)}return b[0]};return x.cache=_,x.fn=e,x.isMemoized=!0,x.options=g,x}var KM=typeof WeakSet=="function",h0=Object.keys;function Ku(e,t){return e===t||e!==e&&t!==t}function p0(e){return e.constructor===Object||e.constructor==null}function v0(e){return!!e&&typeof e.then=="function"}function d0(e){return!!(e&&e.$$typeof)}function YM(){var e=[];return{add:function(t){e.push(t)},has:function(t){return e.indexOf(t)!==-1}}}var XM=function(e){return e?function(){return new WeakSet}:YM}(KM);function g$(e){return function(r){var n=e||r;return function(i,s,u){u===void 0&&(u=XM());var f=!!i&&typeof i=="object",c=!!s&&typeof s=="object";if(f||c){var h=f&&u.has(i),p=c&&u.has(s);if(h||p)return h&&p;f&&u.add(i),c&&u.add(s)}return n(i,s,u)}}}function VM(e,t,r,n){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!r(e[a],t[a],n))return!1;return!0}function ZM(e,t,r,n){var a=e.size===t.size;return a&&e.size&&e.forEach(function(i,s){a&&(a=!1,t.forEach(function(u,f){!a&&r(s,f,n)&&(a=r(i,u,n))}))}),a}var JM="_owner",QM=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function g0(e,t,r,n){var a=h0(e),i=a.length;if(h0(t).length!==i)return!1;if(i)for(var s=void 0;i-- >0;){if(s=a[i],s===JM){var u=d0(e),f=d0(t);if((u||f)&&u!==f)return!1}if(!QM(t,s)||!r(e[s],t[s],n))return!1}return!0}function tP(e,t){return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.sticky===t.sticky&&e.lastIndex===t.lastIndex}function eP(e,t,r,n){var a=e.size===t.size;return a&&e.size&&e.forEach(function(i){a&&(a=!1,t.forEach(function(s){a||(a=r(i,s,n))}))}),a}var rP=typeof Map=="function",nP=typeof Set=="function";function Yu(e){var t=typeof e=="function"?e(r):r;function r(n,a,i){if(n===a)return!0;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(p0(n)&&p0(a))return g0(n,a,t,i);var s=Array.isArray(n),u=Array.isArray(a);return s||u?s===u&&VM(n,a,t,i):(s=n instanceof Date,u=a instanceof Date,s||u?s===u&&Ku(n.getTime(),a.getTime()):(s=n instanceof RegExp,u=a instanceof RegExp,s||u?s===u&&tP(n,a):v0(n)||v0(a)?n===a:rP&&(s=n instanceof Map,u=a instanceof Map,s||u)?s===u&&ZM(n,a,t,i):nP&&(s=n instanceof Set,u=a instanceof Set,s||u)?s===u&&eP(n,a,t,i):g0(n,a,t,i)))}return n!==n&&a!==a}return r}var aP=Yu(),iP=Yu(function(){return Ku});Yu(g$());Yu(g$(Ku));function ha(){return ha=Object.assign||function(e){for(var t=1;t-1;)R!==o&&Fo.call(R,N,1),Fo.call(o,N,1);return o}function jd(o,l){for(var d=o?l.length:0,$=d-1;d--;){var S=l[d];if(d==$||S!==O){var O=S;In(S)?Fo.call(o,S,1):Sl(o,S)}}return o}function bl(o,l){return o+No(yd()*(l-o+1))}function MC(o,l,d,$){for(var S=-1,O=ke(Go((l-o)/(d||1)),0),D=U(O);O--;)D[$?O:++S]=o,o+=d;return D}function yl(o,l){var d="";if(!o||l<1||l>it)return d;do l%2&&(d+=o),l=No(l/2),l&&(o+=o);while(l);return d}function Wt(o,l){return zl(_g(o,l,cr),o+"")}function PC(o){return Ed(yi(o))}function xC(o,l){var d=yi(o);return nu(d,Pa(l,0,d.length))}function bs(o,l,d,$){if(!De(o))return o;l=ra(l,o);for(var S=-1,O=l.length,D=O-1,R=o;R!=null&&++S>>1,D=o[O];D!==null&&!br(D)&&(d?D<=l:D-1?S[O?l[D]:D]:r}}function ag(o){return xn(function(l){var d=l.length,$=d,S=Fr.prototype.thru;for(o&&l.reverse();$--;){var O=l[$];if(typeof O!="function")throw new Lr(s);if(S&&!D&&eu(O)=="wrapper")var D=new Fr([],!0)}for($=D?$:d;++$l){var $=o;o=l,l=$}if(d||o%1||l%1){var S=yd();return Qe(o+S*(l-o+US("1e-"+((S+"").length-1))),l)}return bl(o,l)}var hT=mi(function(o,l,d){return l=l.toLowerCase(),o+(d?Jg(l):l)});function Jg(o){return Kl(oe(o).toLowerCase())}function Qg(o){return o=oe(o),o&&o.replace(vS,rE).replace(DS,"")}function pT(o,l,d){o=oe(o),l=$r(l);var $=o.length;d=d===r?$:Pa(qt(d),0,$);var S=d;return d-=l.length,d>=0&&o.slice(d,S)==l}function vT(o){return o=oe(o),o&&Yw.test(o)?o.replace(Pv,nE):o}function dT(o){return o=oe(o),o&&tS.test(o)?o.replace(qf,"\\$&"):o}var gT=mi(function(o,l,d){return o+(d?"-":"")+l.toLowerCase()}),_T=mi(function(o,l,d){return o+(d?" ":"")+l.toLowerCase()}),mT=rg("toLowerCase");function $T(o,l,d){o=oe(o),l=qt(l);var $=l?ci(o):0;if(!l||$>=l)return o;var S=(l-$)/2;return Qo(No(S),d)+o+Qo(Go(S),d)}function bT(o,l,d){o=oe(o),l=qt(l);var $=l?ci(o):0;return l&&$.1||a[0]>t.right&&Math.abs(a[0]-t.right)>.1||a[1]=u[0])c=u[0]+u[1]-f;else return;e.splice(r,c),t.splice(r,c)}function Bw(e,t,r,n,a,i,s,u,f,c,h){c===void 0&&(c=0),h===void 0&&(h=0);var p=Iw(e.slice(r)),v=p.horizontalRange,g=p.verticalRange;if(n>-1)for(var _=ja[n]===1?i-c:u-i,m=v[1];m<=n;++m){var b=qa[m]===1?h:f,y=0;if(n===m?y=i:m===0?y=c+_:ja[m]===-1&&(y=u-(t[r][0]-c)),e.splice(r+m,0,{horizontal:ja[m],vertical:0,pos:[y,b]}),t.splice(r+m,0,[y,b]),m===0)break}else if(a>-1){var w=qa[a]===1?s-h:f-s;if(v[1]===0&&g[1]===0){var C=[c+w,h];e.push({horizontal:ja[0],vertical:0,pos:C}),t.push(C)}for(var T=g[0],m=g[1];m<=a;++m){var y=ja[m]===1?c:u,b=0;if(a===m?b=s:m===0?b=h+w:qa[m]===1?b=t[r+T][1]:qa[m]===-1&&(b=f-(t[r+T][1]-h)),e.push({horizontal:0,vertical:qa[m],pos:[y,b]}),t.push([y,b]),m===0)break}}}function Lw(e,t){t===void 0&&(t=e.map(function(a){return a.raw}));var r=e.map(function(a,i){return a.horizontal?t[i]:null}).filter(function(a){return a!=null}),n=e.map(function(a,i){return a.vertical?t[i]:null}).filter(function(a){return a!=null});return{horizontals:r,verticals:n}}var Eft=[[0,-1,"n"],[1,0,"e"]],Cft=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function Sv(e,t,r){var n=e.props.clipRelative,a=e.state,i=a.width,s=a.height,u=t,f=u.type,c=u.poses,h=f==="rect",p=f==="circle";if(f==="polygon")return r.map(function(x){return Qr(x[0],i,n)+" "+Qr(x[1],s,n)});if(h||f==="inset"){var v=r[1][1],g=r[3][0],_=r[7][0],m=r[5][1];if(h)return[v,g,m,_].map(function(x){return x+"px"});var b=[v,i-g,s-m,_].map(function(x,I){return Qr(x,I%2?i:s,n)});if(r.length>8){var y=Gt(r[4],r[0]),w=y[0],C=y[1];b.push.apply(b,Rt(["round"],wv(r.slice(8),c.slice(8),n,w,C,_,v,g,m).styles))}return b}else if(p||f==="ellipse"){var T=r[0],A=Qr(Math.abs(r[1][1]-T[1]),p?Math.sqrt((i*i+s*s)/2):s,n),b=p?[A]:[Qr(Math.abs(r[2][0]-T[0]),i,n),A];return b.push("at",Qr(T[0],i,n),Qr(T[1],s,n)),b}}function jm(e,t,r,n){var a=[n,(n+t)/2,t],i=[e,(e+r)/2,r];return Cft.map(function(s){var u=s[0],f=s[1],c=s[2],h=a[u+1],p=i[f+1];return{vertical:Math.abs(f),horizontal:Math.abs(u),direction:c,pos:[h,p]}})}function qm(e,t,r,n,a){var i,s,u,f,c,h,p,v=a;if(!v){var g=dr(e),_=g.clipPath;v=_!=="none"?_:g.clip}if(!((!v||v==="none"||v==="auto")&&(v=n,!v))){var m=ev(v),b=m.prefix,y=b===void 0?v:b,w=m.value,C=w===void 0?"":w,T=y==="circle",A=" ";if(y==="polygon"){var x=Ua(C||"0% 0%, 100% 0%, 100% 100%, 0% 100%");A=",";var I=x.map(function(be){var jt=be.split(" "),Ft=jt[0],Le=jt[1];return{vertical:1,horizontal:1,pos:[Ze(Ft,t),Ze(Le,r)]}});return{type:y,clipText:v,poses:I,splitter:A}}else if(T||y==="ellipse"){var B="",P="",L=0,G=0,x=da(C);if(T){var K="";i=x[0],K=i===void 0?"50%":i,s=x[2],B=s===void 0?"50%":s,u=x[3],P=u===void 0?"50%":u,L=Ze(K,Math.sqrt((t*t+r*r)/2)),G=L}else{var at="",et="";f=x[0],at=f===void 0?"50%":f,c=x[1],et=c===void 0?"50%":c,h=x[3],B=h===void 0?"50%":h,p=x[4],P=p===void 0?"50%":p,L=Ze(at,t),G=Ze(et,r)}var rt=[Ze(B,t),Ze(P,r)],I=Rt([{vertical:1,horizontal:1,pos:rt,direction:"nesw"}],Eft.slice(0,T?1:2).map(function(Ft){return{vertical:Math.abs(Ft[1]),horizontal:Ft[0],direction:Ft[2],sub:!0,pos:[rt[0]+Ft[0]*L,rt[1]+Ft[1]*G]}}));return{type:y,clipText:v,radiusX:L,radiusY:G,left:rt[0]-L,top:rt[1]-G,poses:I,splitter:A}}else if(y==="inset"){var x=da(C||"0 0 0 0"),gt=x.indexOf("round"),Z=(gt>-1?x.slice(0,gt):x).length,it=x.slice(Z+1),ct=x.slice(0,Z),lt=ct[0],dt=ct[1],Ut=dt===void 0?lt:dt,Lt=ct[2],ve=Lt===void 0?lt:Lt,bt=ct[3],Nt=bt===void 0?Ut:bt,de=[lt,ve].map(function(Ft){return Ze(Ft,r)}),Jt=de[0],Tt=de[1],Ie=[Nt,Ut].map(function(Ft){return Ze(Ft,t)}),Oe=Ie[0],ge=Ie[1],Kt=t-ge,wt=r-Tt,St=Dw(it,Kt-Oe,wt-Jt,Oe,Jt),I=Rt(Rt([],jm(Jt,Kt,wt,Oe)),St);return{type:"inset",clipText:v,poses:I,top:Jt,left:Oe,right:Kt,bottom:wt,radius:it,splitter:A}}else if(y==="rect"){var x=Ua(C||"0px, "+t+"px, "+r+"px, 0px");A=",";var Ae=x.map(function(Dr){var Kn=go(Dr).value;return Kn}),Jt=Ae[0],ge=Ae[1],Tt=Ae[2],Oe=Ae[3],I=jm(Jt,ge,Tt,Oe);return{type:"rect",clipText:v,poses:I,top:Jt,right:ge,bottom:Tt,left:Oe,values:x,splitter:A}}}}function Oft(e,t){var r=fw(e,t),n=r[0],a=r[1],i=t.datas,s=i.clipPath,u=i.index,f=s,c=f.type,h=f.poses,p=f.splitter,v=h.map(function(y){return y.pos});if(c==="polygon")v.splice(u,0,[n,a]);else if(c==="inset"){var g=wft.indexOf(u),_=Sft.indexOf(u),m=h.length;if(Bw(h,v,8,g,_,n,a,v[4][0],v[4][1],v[0][0],v[0][1]),m===h.length)return}else return;var b=Sv(e,s,v);Et(e,"onClip",Zt(e,t,{clipEventType:"added",clipType:c,poses:v,clipStyles:b,clipStyle:c+"("+b.join(p)+")",distX:0,distY:0}))}function Aft(e,t){var r=t.datas,n=r.clipPath,a=r.index,i=n,s=i.type,u=i.poses,f=i.splitter,c=u.map(function(v){return v.pos}),h=c.length;if(s==="polygon")u.splice(a,1),c.splice(a,1);else if(s==="inset"){if(a<8||(Rw(u,c,a,8,h),h===u.length))return}else return;var p=Sv(e,n,c);Et(e,"onClip",Zt(e,t,{clipEventType:"removed",clipType:s,poses:c,clipStyles:p,clipStyle:s+"("+p.join(f)+")",distX:0,distY:0}))}var Tft={name:"clippable",props:{clippable:Boolean,defaultClipPath:String,customClipPath:String,clipRelative:Boolean,clipArea:Boolean,dragWithClip:Boolean,clipTargetBounds:Boolean,clipVerticalGuidelines:Array,clipHorizontalGuidelines:Array,clipSnapThreshold:Boolean},events:{onClipStart:"clipStart",onClip:"clip",onClipEnd:"clipEnd"},css:[`.control.clip-control {
+ background: #6d6;
+ cursor: pointer;
+}
+.control.clip-control.clip-radius {
+ background: #d66;
+}
+.line.clip-line {
+ background: #6e6;
+ cursor: move;
+ z-index: 1;
+}
+.clip-area {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.clip-ellipse {
+ position: absolute;
+ cursor: move;
+ border: 1px solid #6d6;
+ border: var(--zoompx) solid #6d6;
+ border-radius: 50%;
+ transform-origin: 0px 0px;
+}`,`:host {
+ --bounds-color: #d66;
+}`,`.guideline {
+ pointer-events: none;
+ z-index: 2;
+}`,`.line.guideline.bounds {
+ background: #d66;
+ background: var(--bounds-color);
+}`],render:function(e,t){var r=e.props,n=r.customClipPath,a=r.defaultClipPath,i=r.clipArea,s=r.zoom,u=e.state,f=u.target,c=u.width,h=u.height,p=u.allMatrix,v=u.is3d,g=u.left,_=u.top,m=u.pos1,b=u.pos2,y=u.pos3,w=u.pos4,C=u.clipPathState,T=u.snapBoundInfos,A=u.rotation;if(!f)return[];var x=qm(f,c,h,a||"inset",C||n);if(!x)return[];var I=v?4:3,B=x.type,P=x.poses,L=P.map(function(wt){var St=Je(p,wt.pos,I);return[St[0]-g,St[1]-_]}),G=[],K=[],at=B==="rect",et=B==="inset",rt=B==="polygon";if(at||et||rt){var gt=et?L.slice(0,8):L;K=gt.map(function(wt,St){var Ae=St===0?gt[gt.length-1]:gt[St-1],be=Ce(Ae,wt),jt=nw(Ae,wt);return t.createElement("div",{key:"clipLine"+St,className:Ht("line","clip-line","snap-control"),"data-clip-index":St,style:{width:jt+"px",transform:"translate("+Ae[0]+"px, "+Ae[1]+"px) rotate("+be+"rad) scaleY("+s+")"}})})}if(G=L.map(function(wt,St){return t.createElement("div",{key:"clipControl"+St,className:Ht("control","clip-control","snap-control"),"data-clip-index":St,style:{transform:"translate("+wt[0]+"px, "+wt[1]+"px) rotate("+A+"rad) scale("+s+")"}})}),et&&G.push.apply(G,L.slice(8).map(function(wt,St){return t.createElement("div",{key:"clipRadiusControl"+St,className:Ht("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+St,style:{transform:"translate("+wt[0]+"px, "+wt[1]+"px) rotate("+A+"rad) scale("+s+")"}})})),B==="circle"||B==="ellipse"){var Z=x.left,it=x.top,ct=x.radiusX,lt=x.radiusY,dt=Gt(Je(p,[Z,it],I),Je(p,[0,0],I)),Ut=dt[0],Lt=dt[1],ve="none";if(!i){for(var bt=Math.max(10,ct/5,lt/5),Nt=[],de=0;de<=bt;++de){var Jt=Math.PI*2/bt*de;Nt.push([ct+(ct-s)*Math.cos(Jt),lt+(lt-s)*Math.sin(Jt)])}Nt.push([ct,-2]),Nt.push([-2,-2]),Nt.push([-2,lt*2+2]),Nt.push([ct*2+2,lt*2+2]),Nt.push([ct*2+2,-2]),Nt.push([ct,-2]),ve="polygon("+Nt.map(function(wt){return wt[0]+"px "+wt[1]+"px"}).join(", ")+")"}G.push(t.createElement("div",{key:"clipEllipse",className:Ht("clip-ellipse","snap-control"),style:{width:ct*2+"px",height:lt*2+"px",clipPath:ve,transform:"translate("+(-g+Ut)+"px, "+(-_+Lt)+"px) "+Of(p)}}))}if(i){var Tt=kr(Rt([m,b,y,w],L)),Ie=Tt.width,Oe=Tt.height,ge=Tt.left,Kt=Tt.top;if(rt||at||et){var Nt=et?L.slice(0,8):L;G.push(t.createElement("div",{key:"clipArea",className:Ht("clip-area","snap-control"),style:{width:Ie+"px",height:Oe+"px",transform:"translate("+ge+"px, "+Kt+"px)",clipPath:"polygon("+Nt.map(function(St){return St[0]-ge+"px "+(St[1]-Kt)+"px"}).join(", ")+")"}}))}}return T&&["vertical","horizontal"].forEach(function(wt){var St=T[wt],Ae=wt==="horizontal";St.isSnap&&K.push.apply(K,St.snap.posInfos.map(function(be,jt){var Ft=be.pos,Le=Gt(Je(p,Ae?[0,Ft]:[Ft,0],I),[g,_]),Fe=Gt(Je(p,Ae?[c,Ft]:[Ft,h],I),[g,_]);return Ii(t,"",Le,Fe,s,"clip"+wt+"snap"+jt,"guideline")})),St.isBound&&K.push.apply(K,St.bounds.map(function(be,jt){var Ft=be.pos,Le=Gt(Je(p,Ae?[0,Ft]:[Ft,0],I),[g,_]),Fe=Gt(Je(p,Ae?[c,Ft]:[Ft,h],I),[g,_]);return Ii(t,"",Le,Fe,s,"clip"+wt+"bounds"+jt,"guideline","bounds","bold")}))}),Rt(Rt([],G),K)},dragControlCondition:function(e,t){return t.inputEvent&&(t.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(e,t){var r=e.props,n=r.dragWithClip,a=n===void 0?!0:n;return a?!1:this.dragControlStart(e,t)},drag:function(e,t){return this.dragControl(e,t)},dragEnd:function(e,t){return this.dragControlEnd(e,t)},dragControlStart:function(e,t){var r=e.state,n=e.props,a=n.defaultClipPath,i=n.customClipPath,s=r.target,u=r.width,f=r.height,c=t.inputEvent?t.inputEvent.target:null,h=c&&c.getAttribute("class")||"",p=t.datas,v=qm(s,u,f,a||"inset",i);if(!v)return!1;var g=v.clipText,_=v.type,m=v.poses,b=Et(e,"onClipStart",Zt(e,t,{clipType:_,clipStyle:g,poses:m.map(function(y){return y.pos})}));return b===!1?(p.isClipStart=!1,!1):(p.isControl=h&&h.indexOf("clip-control")>-1,p.isLine=h.indexOf("clip-line")>-1,p.isArea=h.indexOf("clip-area")>-1||h.indexOf("clip-ellipse")>-1,p.index=c?parseInt(c.getAttribute("data-clip-index"),10):-1,p.clipPath=v,p.isClipStart=!0,r.clipPathState=g,ii(e,t),!0)},dragControl:function(e,t){var r,n=t.datas,a=t.originalDatas;if(!n.isClipStart)return!1;var i=n,s=i.isControl,u=i.isLine,f=i.isArea,c=i.index,h=i.clipPath;if(!h)return!1;var p=On(t),v=p[0],g=p[1],_=e.props,m=e.state,b=m.width,y=m.height,w=!f&&!s&&!u,C=h.type,T=h.poses,A=h.splitter,x=T.map(function(jt){return jt.pos});w&&(v=-v,g=-g);var I=!s||T[c].direction==="nesw",B=C==="inset"||C==="rect",P=T.map(function(){return[0,0]});if(s&&!I){var L=T[c],G=L.horizontal,K=L.vertical,at=[v*Math.abs(G),g*Math.abs(K)];P=fut(T,c,at,B)}else I&&(P=x.map(function(){return[v,g]}));var et=x.map(function(jt,Ft){return Vt(jt,P[Ft])}),rt=Rt([],et);m.snapBoundInfos=null;var gt=h.type==="circle",Z=h.type==="ellipse";if(gt||Z){var it=kr(et),ct=Math.abs(it.bottom-it.top),lt=Math.abs(Z?it.right-it.left:ct),dt=et[0][1]+ct,Ut=et[0][0]-lt,Lt=et[0][0]+lt;gt&&(rt.push([Lt,it.bottom]),P.push([1,0])),rt.push([it.left,dt]),P.push([0,1]),rt.push([Ut,it.bottom]),P.push([1,0])}var ve=mw((_.clipHorizontalGuidelines||[]).map(function(jt){return Ze(""+jt,y)}),(_.clipVerticalGuidelines||[]).map(function(jt){return Ze(""+jt,b)}),b,y),bt=[],Nt=[];if(gt||Z)bt=[rt[4][0],rt[2][0]],Nt=[rt[1][1],rt[3][1]];else if(B){var de=[rt[0],rt[2],rt[4],rt[6]],Jt=[P[0],P[2],P[4],P[6]];bt=de.filter(function(jt,Ft){return Jt[Ft][0]}).map(function(jt){return jt[0]}),Nt=de.filter(function(jt,Ft){return Jt[Ft][1]}).map(function(jt){return jt[1]})}else bt=rt.filter(function(jt,Ft){return P[Ft][0]}).map(function(jt){return jt[0]}),Nt=rt.filter(function(jt,Ft){return P[Ft][1]}).map(function(jt){return jt[1]});for(var Tt=[0,0],Ie=function(jt){var Ft=Rm(ve,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},bt,Nt,5),Le=Ft.horizontal,Fe=Ft.vertical,Kr=Le.offset,Dr=Fe.offset;if(Le.isBound&&(Tt[1]+=Kr),Fe.isBound&&(Tt[0]+=Dr),(Z||gt)&&P[0][0]===0&&P[0][1]===0){var Kn=kr(et),gr=Kn.bottom-Kn.top,Ea=Z?Kn.right-Kn.left:gr,Ca=Fe.isBound?Math.abs(Dr):Fe.snapIndex===0?-Dr:Dr,Yn=Le.isBound?Math.abs(Kr):Le.snapIndex===0?-Kr:Kr;Ea-=Ca,gr-=Yn,gt&&(gr=bw(Fe,Le)>0?gr:Ea,Ea=gr);var Xn=rt[0];rt[1][1]=Xn[1]-gr,rt[2][0]=Xn[0]+Ea,rt[3][1]=Xn[1]+gr,rt[4][0]=Xn[0]-Ea}else return rt.forEach(function(si,fs){var oi=P[fs];oi[0]&&(si[0]-=Dr),oi[1]&&(si[1]-=Kr)}),"break"},Oe=0;Oe<2;++Oe){var ge=Ie();if(ge==="break")break}var Kt=Sv(e,h,et),wt=C+"("+Kt.join(A)+")";if(m.clipPathState=wt,gt||Z)bt=[rt[4][0],rt[2][0]],Nt=[rt[1][1],rt[3][1]];else if(B){var de=[rt[0],rt[2],rt[4],rt[6]];bt=de.map(function(Ft){return Ft[0]}),Nt=de.map(function(Ft){return Ft[1]})}else bt=rt.map(function(jt){return jt[0]}),Nt=rt.map(function(jt){return jt[1]});if(m.snapBoundInfos=Rm(ve,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},bt,Nt,1),a.draggable){var St=m.is3d,Ae=m.allMatrix,be=St?4:3;r=pe(Ae,[Tt[0],Tt[1],0,0],be),Tt[0]=r[0],Tt[1]=r[1],a.draggable.deltaOffset=Tt}return Et(e,"onClip",Zt(e,t,{clipEventType:"changed",clipType:C,poses:et,clipStyle:wt,clipStyles:Kt,distX:v,distY:g})),!0},dragControlEnd:function(e,t){this.unset(e);var r=t.isDrag,n=t.datas,a=t.isDouble,i=n.isLine,s=n.isClipStart,u=n.isControl;return s?(Et(e,"onClipEnd",Pr(e,t,{})),a&&(u?Aft(e,t):i&&Oft(e,t)),a||r):!1},unset:function(e){e.state.clipPathState="",e.state.snapBoundInfos=null}},Mft={name:"originDraggable",props:{originDraggable:Boolean,originRelative:Boolean},events:{onDragOriginStart:"dragOriginStart",onDragOrigin:"dragOrigin",onDragOriginEnd:"dragOriginEnd"},css:[`:host[data-able-origindraggable] .control.origin {
+ pointer-events: auto;
+}`],dragControlCondition:function(e,t){return t.isRequest?t.requestAble==="originDraggable":tn(t.inputEvent.target,Ht("origin"))},dragControlStart:function(e,t){var r=t.datas;ii(e,t);var n=Zt(e,t,{dragStart:ir.dragStart(e,new So().dragStart([0,0],t))}),a=Et(e,"onDragOriginStart",n);return r.startOrigin=e.state.transformOrigin,r.startTargetOrigin=e.state.targetOrigin,r.prevOrigin=[0,0],r.isDragOrigin=!0,a===!1?(r.isDragOrigin=!1,!1):n},dragControl:function(e,t){var r=t.datas,n=t.isPinch,a=t.isRequest;if(!r.isDragOrigin)return!1;var i=On(t),s=i[0],u=i[1],f=e.state,c=f.width,h=f.height,p=f.offsetMatrix,v=f.targetMatrix,g=f.is3d,_=e.props.originRelative,m=_===void 0?!0:_,b=g?4:3,y=[s,u];if(a){var w=t.distOrigin;(w[0]||w[1])&&(y=w)}var C=Vt(r.startOrigin,y),T=Vt(r.startTargetOrigin,y),A=Gt(y,r.prevOrigin),x=xf(p,v,C,b),I=e.getRect(),B=kr(wo(x,c,h,b)),P=[I.left-B.left,I.top-B.top];r.prevOrigin=y;var L=[Qr(T[0],c,m),Qr(T[1],h,m)].join(" "),G=Zt(e,t,{width:c,height:h,origin:C,dist:y,delta:A,transformOrigin:L,drag:ir.drag(e,Tf(t,e.state,P,!!n,!1))});return Et(e,"onDragOrigin",G),G},dragControlEnd:function(e,t){var r=t.datas;return r.isDragOrigin?(Et(e,"onDragOriginEnd",Pr(e,t,{})),!0):!1},dragGroupControlCondition:function(e,t){return this.dragControlCondition(e,t)},dragGroupControlStart:function(e,t){var r=this.dragControlStart(e,t);return!!r},dragGroupControl:function(e,t){var r=this.dragControl(e,t);return r?(e.transformOrigin=r.transformOrigin,!0):!1},request:function(e){var t={},r=e.getRect(),n=0,a=0,i=r.transformOrigin,s=[0,0];return{isControl:!0,requestStart:function(){return{datas:t}},request:function(u){return"deltaOrigin"in u?(s[0]+=u.deltaOrigin[0],s[1]+=u.deltaOrigin[1]):"origin"in u?(s[0]=u.origin[0]-i[0],s[1]=u.origin[1]-i[1]):("x"in u?n=u.x-r.left:"deltaX"in u&&(n+=u.deltaX),"y"in u?a=u.y-r.top:"deltaY"in u&&(a+=u.deltaY)),{datas:t,distX:n,distY:a,distOrigin:s}},requestEnd:function(){return{datas:t,isDrag:!0}}}}};function Pft(e,t,r,n,a,i,s){var u=Lw(e),f=u.horizontals,c=u.verticals,h=f.length,p=c.length,v=-1,g=-1;r===0?h===0?v=0:h===1&&(v=1):r===3&&(h<=2?v=2:h<=3&&(v=3)),r===2?p===0?g=0:p<4&&(g=3):r===1&&(p<=1?g=1:p<=2&&(g=2)),Bw(e,t,0,v,g,n,a,i,s)}function Um(e,t,r,n,a){n===void 0&&(n=[0,0]);var i,s=[];if(a)i=a;else{var u=dr(e);i=u&&u.borderRadius||""}return!i||!a&&i==="0px"?s=[]:s=da(i),Dw(s,t,r,0,0,n)}function km(e,t,r,n,a,i){var s=e.state,u=s.width,f=s.height,c=wv(i,a,e.props.roundRelative,u,f),h=c.raws,p=c.styles,v=Lw(a,h),g=v.horizontals,_=v.verticals,m=p.join(" ");s.borderRadiusState=m,Et(e,"onRound",Zt(e,t,{horizontals:g,verticals:_,borderRadius:m,width:u,height:f,delta:n,dist:r}))}var xft={name:"roundable",props:{roundable:Boolean,roundRelative:Boolean,minRoundControls:Array,maxRoundControls:Array,roundClickable:Boolean},events:{onRoundStart:"roundStart",onRound:"round",onRoundEnd:"roundEnd"},css:[`.control.border-radius {
+ background: #d66;
+ cursor: pointer;
+}`,`:host[data-able-roundable] .line.direction {
+ cursor: pointer;
+}`],render:function(e,t){var r=e.state,n=r.target,a=r.width,i=r.height,s=r.allMatrix,u=r.is3d,f=r.left,c=r.top,h=r.borderRadiusState,p=e.props,v=p.minRoundControls,g=v===void 0?[0,0]:v,_=p.maxRoundControls,m=_===void 0?[4,4]:_,b=p.zoom;if(!n)return null;var y=u?4:3,w=Um(n,a,i,g,h);if(!w)return null;var C=0,T=0;return w.map(function(A,x){T+=Math.abs(A.horizontal),C+=Math.abs(A.vertical);var I=Gt(Je(s,A.pos,y),[f,c]),B=A.vertical?C<=m[1]:T<=m[0];return t.createElement("div",{key:"borderRadiusControl"+x,className:Ht("control","border-radius"),"data-radius-index":x,style:{display:B?"block":"none",transform:"translate("+I[0]+"px, "+I[1]+"px) scale("+b+")"}})})},dragControlCondition:function(e,t){if(!t.inputEvent||t.isRequest)return!1;var r=t.inputEvent.target.getAttribute("class")||"";return r.indexOf("border-radius")>-1||r.indexOf("moveable-line")>-1&&r.indexOf("moveable-direction")>-1},dragControlStart:function(e,t){var r=t.inputEvent,n=t.datas,a=r.target,i=a.getAttribute("class")||"",s=i.indexOf("border-radius")>-1,u=i.indexOf("moveable-line")>-1&&i.indexOf("moveable-direction")>-1,f=s?parseInt(a.getAttribute("data-radius-index"),10):-1,c=u?parseInt(a.getAttribute("data-line-index"),10):-1;if(!s&&!u)return!1;var h=Et(e,"onRoundStart",Zt(e,t,{}));if(h===!1)return!1;n.lineIndex=c,n.controlIndex=f,n.isControl=s,n.isLine=u,ii(e,t);var p=e.props,v=p.roundRelative,g=p.minRoundControls,_=g===void 0?[0,0]:g,m=e.state,b=m.target,y=m.width,w=m.height;n.isRound=!0,n.prevDist=[0,0];var C=Um(b,y,w,_)||[];return n.controlPoses=C,m.borderRadiusState=wv(C.map(function(T){return T.pos}),C,v,y,w).styles.join(" "),!0},dragControl:function(e,t){var r=t.datas;if(!r.isRound||!r.isControl||!r.controlPoses.length)return!1;var n=r.controlIndex,a=r.controlPoses,i=On(t),s=i[0],u=i[1],f=[s,u],c=Gt(f,r.prevDist),h=e.props.maxRoundControls,p=h===void 0?[4,4]:h,v=e.state,g=v.width,_=v.height,m=a[n],b=m.vertical,y=m.horizontal,w=a.map(function(T){var A=T.horizontal,x=T.vertical,I=[A*y*f[0],x*b*f[1]];if(A){if(p[0]===1)return I;if(p[0]<4&&A!==y)return I}else{if(p[1]===0)return I[1]=x*y*f[0]/g*_,I;if(b){if(p[1]===1)return I;if(p[1]<4&&x!==b)return I}}return[0,0]});w[n]=f;var C=a.map(function(T,A){return Vt(T.pos,w[A])});return r.prevDist=[s,u],km(e,t,f,c,a,C),!0},dragControlEnd:function(e,t){var r=e.state;r.borderRadiusState="";var n=t.datas,a=t.isDouble;if(!n.isRound)return!1;var i=r.width,s=r.height,u=n.isControl,f=n.controlIndex,c=n.isLine,h=n.lineIndex,p=n.controlPoses,v=p.map(function(C){return C.pos}),g=v.length,_=e.props.roundClickable,m=_===void 0?!0:_;if(a&&m){if(u)Rw(p,v,f,0);else if(c){var b=fw(e,t),y=b[0],w=b[1];Pft(p,v,h,y,w,i,s)}g!==p.length&&km(e,t,[0,0],[0,0],p,v)}return Et(e,"onRoundEnd",Pr(e,t,{})),r.borderRadiusState="",!0},unset:function(e){e.state.borderRadiusState=""}};function Ift(e,t){var r=t?"matrix3d("+Pe(4):"matrix("+Pe(3)+")";return e===r||e==="matrix(1,0,0,1,0,0)"}var Fw={isPinch:!0,name:"beforeRenderable",props:{},events:{onBeforeRenderStart:"beforeRenderStart",onBeforeRender:"beforeRender",onBeforeRenderEnd:"beforeRenderEnd",onBeforeRenderGroupStart:"beforeRenderGroupStart",onBeforeRenderGroup:"beforeRenderGroup",onBeforeRenderGroupEnd:"beforeRenderGroupEnd"},dragRelation:"weak",setTransform:function(e,t){var r=e.state,n=r.is3d,a=r.target,i=r.targetMatrix,s=a==null?void 0:a.style.transform,u=n?"matrix3d("+i.join(",")+")":"matrix("+ky(i,!0)+")",f=!s||s==="none"?u:s;t.datas.startTransforms=Ift(f,n)?[]:da(f)},resetTransform:function(e){e.datas.nextTransforms=e.datas.startTransforms,e.datas.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return Zt(e,t,{setTransform:function(r){t.datas.startTransforms=ni(r)?r:da(r)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),Et(e,"onBeforeRenderStart",this.fillDragStartParams(e,t))},drag:function(e,t){this.resetTransform(t),Et(e,"onBeforeRender",Zt(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){Et(e,"onBeforeRenderEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var r=this;this.dragStart(e,t);var n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.setTransform(f,s),r.fillDragStartParams(f,s)});Et(e,"onBeforeRenderGroupStart",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:i}))},dragGroup:function(e,t){var r=this;this.drag(e,t);var n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.resetTransform(s),r.fillDragParams(f,s)});Et(e,"onBeforeRenderGroup",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:i}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),Et(e,"onBeforeRenderGroupEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},zw={name:"renderable",props:{},events:{onRenderStart:"renderStart",onRender:"render",onRenderEnd:"renderEnd",onRenderGroupStart:"renderGroupStart",onRenderGroup:"renderGroup",onRenderGroupEnd:"renderGroupEnd"},dragRelation:"weak",dragStart:function(e,t){Et(e,"onRenderStart",Zt(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){Et(e,"onRender",this.fillDragParams(e,t))},dragAfter:function(e,t){if(t.resultCount)return this.drag(e,t)},dragEnd:function(e,t){Et(e,"onRenderEnd",this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){Et(e,"onRenderGroupStart",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var r=this,n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragParams(f,s)});Et(e,"onRenderGroup",Zt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,transform:Em(t),events:i}))},dragGroupEnd:function(e,t){var r=this,n=ga(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragEndParams(f,s)});Et(e,"onRenderGroupEnd",Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:i}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch,transform:Em(t)})},fillDragEndParams:function(e,t){return Zt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag})}};function Ns(e,t,r,n,a,i,s){var u=a==="Start",f=e.state.target,c=i.isRequest;if(!f||u&&n.indexOf("Control")>-1&&!c&&e.areaElement===i.inputEvent.target)return!1;var h=""+r+n+a,p=""+r+n+"Condition",v=a==="End",g=a==="After",_=u&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());_&&e.updateRect(a,!0,!1),a===""&&!c&&ow(e.state,i);var m=Rt([],e[t]);if(c){var b=i.requestAble;m.some(function(P){return P.name===b})||m.push.apply(m,e.props.ables.filter(function(P){return P.name===b}))}if(!m.length)return!1;var y=Rt(Rt([Fw],m),[zw]).filter(function(P){return P[h]}),w=i.datas;_&&y.forEach(function(P){P.unset&&P.unset(e)});var C=i.inputEvent,T;v&&C&&(T=document.elementFromPoint(i.clientX,i.clientY)||C.target);var A=0,x=y.filter(function(P){var L=P.name,G=w[L]||(w[L]={});if(u&&(G.isEventStart=!P[p]||P[p](e,i)),G.isEventStart){var K=P[h](e,Q(Q({},i),{resultCount:A,datas:G,originalDatas:w,inputTarget:T}));return u&&K===!1&&(G.isEventStart=!1),A+=K?1:0,K}return!1}),I=x.length,B=!1;return u&&y.length&&!I&&(B=y.filter(function(P){var L=P.name,G=w[L];return G.isEventStart?P.dragRelation==="strong"?(G.isEventStart=!1,!1):!0:!1}).length===0),(v||B)&&(e.state.gesto=null,e.moveables&&e.moveables.forEach(function(P){P.state.gesto=null})),_&&B&&y.forEach(function(P){P.unset&&P.unset(e)}),u&&!c&&I&&(i==null||i.preventDefault()),e.isUnmounted||B?!1:((!u&&I&&!s||v)&&(e.updateRect(v?a:"",!0,!1),e.forceUpdate()),!u&&!v&&!g&&I&&!s&&Ns(e,t,r,n,a+"After",i),!0)}function Gw(e,t,r){var n=e.controlBox.getElement(),a=[];a.push(n),(!e.props.dragArea||e.props.dragTarget)&&a.push(t);var i=function(s){var u=s.inputEvent.target,f=e.areaElement;return u===f||!e.isMoveableElement(u)&&!e.controlBox.getElement().contains(u)||tn(u,"moveable-area")||tn(u,"moveable-padding")};return Ev(e,a,"targetAbles",r,{dragStart:i,pinchStart:i})}function Ev(e,t,r,n,a){a===void 0&&(a={});var i=e.props,s=i.pinchOutside,u=i.pinchThreshold,f={preventDefault:!1,container:window,pinchThreshold:u,pinchOutside:s},c=new Aot(t,f);return["drag","pinch"].forEach(function(h){["Start","","End"].forEach(function(p){c.on(""+h+p,function(v){var g=v.eventType;if(a[g]&&!a[g](v)){v.stop();return}var _=Ns(e,r,h,n,p,v);_||v.stop()})})}),c}var Dft=function(){function e(r,n,a){var i=this;this.target=r,this.moveable=n,this.eventName=a,this.ables=[],this.onEvent=function(s){var u=i.eventName,f=i.moveable;f.state.disableNativeEvent||i.ables.forEach(function(c){c[u](f,{inputEvent:s})})},this.target.addEventListener(this.eventName.toLowerCase(),this.onEvent)}var t=e.prototype;return t.setAbles=function(r){this.ables=r},t.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this.onEvent),this.target=null,this.moveable=null},e}(),Gi=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state=Q({container:null,gesto:null,renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1},Ah(null)),n.enabledAbles=[],n.targetAbles=[],n.controlAbles=[],n.rotation=0,n.scale=[1,1],n.isUnmounted=!1,n.events={mouseEnter:null,mouseLeave:null},n._prevTarget=null,n._prevDragArea=!1,n._observer=null,n._observerId=0,n.onPreventClick=function(a){a.stopPropagation(),hr(window,"click",n.onPreventClick,!0)},n.checkUpdateRect=function(){if(!n.isDragging()){var a=n.props.parentMoveable;if(a){a.checkUpdateRect();return}Sst(n._observerId),n._observerId=rv(function(){n.isDragging()||n.updateRect()})}},n}var r=t.prototype;return r.render=function(){var n=this.props,a=this.state,i=n.parentPosition,s=n.className,u=n.target,f=n.zoom,c=n.cspNonce,h=n.translateZ,p=n.cssStyled,v=n.portalContainer;this.checkUpdate(),this.updateRenderPoses();var g=i||{left:0,top:0},_=g.left,m=g.top,b=a.left,y=a.top,w=a.target,C=a.direction,T=n.targets,A=(T&&T.length||u)&&w,x=this.isDragging(),I={};return this.getEnabledAbles().forEach(function(B){I["data-able-"+B.name.toLowerCase()]=!0}),Ur(p,Q({cspNonce:c,ref:pn(this,"controlBox"),className:Ht("control-box",C===-1?"reverse":"",x?"dragging":"")+" "+s},I,{onClick:this.onPreventClick,portalContainer:v,style:{position:"absolute",display:A?"block":"none",transform:"translate3d("+(b-_)+"px, "+(y-m)+"px, "+h+")","--zoom":f,"--zoompx":f+"px"}}),this.renderAbles(),this._renderLines())},r.componentDidMount=function(){this.controlBox.getElement();var n=this.props,a=n.parentMoveable,i=n.container,s=n.wrapperMoveable;this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),!i&&!a&&!s&&this.updateRect("",!1,!0),this.updateCheckInput(),this._updateObserver(this.props)},r.componentDidUpdate=function(n){this._updateNativeEvents(),this._updateEvents(),this._updateTargets(),this.updateCheckInput(),this._updateObserver(n)},r.componentWillUnmount=function(){this.isUnmounted=!0,Pi(this,"targetGesto"),Pi(this,"controlGesto");var n=this.events;for(var a in n){var i=n[a];i&&i.destroy()}},r.getContainer=function(){var n=this.props,a=n.parentMoveable,i=n.wrapperMoveable,s=n.container;return s||i&&i.getContainer()||a&&a.getContainer()||this.controlBox.getElement().parentElement},r.isMoveableElement=function(n){return n&&(n.getAttribute("class")||"").indexOf(lv)>-1},r.dragStart=function(n){return this.targetGesto&&this.targetGesto.triggerDragStart(n),this},r.hitTest=function(n){var a=this.state,i=a.target,s=a.pos1,u=a.pos2,f=a.pos3,c=a.pos4,h=a.targetClientRect;if(!i)return 0;var p;if(n instanceof Element){var v=n.getBoundingClientRect();p={left:v.left,top:v.top,width:v.width,height:v.height}}else p=Q({width:0,height:0},n);var g=p.left,_=p.top,m=p.width,b=p.height,y=gm([s,u,c,f],h),w=dot(y,[[g,_],[g+m,_],[g+m,_+b],[g,_+b]]),C=Ky(y);return!w||!C?0:Math.min(100,w/C*100)},r.isInside=function(n,a){var i=this.state,s=i.target,u=i.pos1,f=i.pos2,c=i.pos3,h=i.pos4,p=i.targetClientRect;return s?dh([n,a],gm([u,f,h,c],p)):!1},r.updateRect=function(n,a,i){i===void 0&&(i=!0);var s=this.props,u=s.parentMoveable,f=this.state,c=f.target||this.props.target,h=this.getContainer(),p=u?u.props.rootContainer:s.rootContainer;this.updateState(Ah(this.controlBox&&this.controlBox.getElement(),c,h,h,p||h),u?!1:i)},r.isDragging=function(){return(this.targetGesto?this.targetGesto.isFlag():!1)||(this.controlGesto?this.controlGesto.isFlag():!1)},r.updateTarget=function(n){this.updateRect(n,!0)},r.getRect=function(){var n=this.state,a=Cn(this.state),i=a[0],s=a[1],u=a[2],f=a[3],c=kr(a),h=n.width,p=n.height,v=c.width,g=c.height,_=c.left,m=c.top,b=[n.left,n.top],y=Vt(b,n.origin),w=Vt(b,n.beforeOrigin),C=n.transformOrigin;return{width:v,height:g,left:_,top:m,pos1:i,pos2:s,pos3:u,pos4:f,offsetWidth:h,offsetHeight:p,beforeOrigin:w,origin:y,transformOrigin:C,rotation:this.getRotation()}},r.getManager=function(){return this},r.getRotation=function(){var n=this.state,a=n.pos1,i=n.pos2,s=n.direction;return vut(a,i,s)},r.request=function(n,a,i){a===void 0&&(a={});var s=this.props,u=s.ables,f=s.groupable,c=u.filter(function(b){return b.name===n})[0];if(this.isDragging()||!c||!c.request)return{request:function(){return this},requestEnd:function(){return this}};var h=this,p=c.request(this),v=i||a.isInstant,g=p.isControl?"controlAbles":"targetAbles",_=(f?"Group":"")+(p.isControl?"Control":""),m={request:function(b){return Ns(h,g,"drag",_,"",Q(Q({},p.request(b)),{requestAble:n,isRequest:!0}),v),this},requestEnd:function(){return Ns(h,g,"drag",_,"End",Q(Q({},p.requestEnd()),{requestAble:n,isRequest:!0}),v),this}};return Ns(h,g,"drag",_,"Start",Q(Q({},p.requestStart(a)),{requestAble:n,isRequest:!0}),v),v?m.request(a).requestEnd():m},r.destroy=function(){this.componentWillUnmount()},r.updateRenderPoses=function(){var n=this.state,a=this.props,i=n.originalBeforeOrigin,s=n.transformOrigin,u=n.allMatrix,f=n.is3d,c=n.pos1,h=n.pos2,p=n.pos3,v=n.pos4,g=n.left,_=n.top,m=a.padding||{},b=m.left,y=b===void 0?0:b,w=m.top,C=w===void 0?0:w,T=m.bottom,A=T===void 0?0:T,x=m.right,I=x===void 0?0:x,B=f?4:3,P=a.groupable?i:Vt(i,[g,_]);n.renderPoses=[Vt(c,yu(u,[-y,-C],s,P,B)),Vt(h,yu(u,[I,-C],s,P,B)),Vt(p,yu(u,[-y,A],s,P,B)),Vt(v,yu(u,[I,A],s,P,B))]},r.checkUpdate=function(){var n=this.props,a=n.target,i=n.container,s=n.parentMoveable,u=this.state,f=u.target,c=u.container;if(!(!f&&!a)){this.updateAbles();var h=!Th(f,a)||!Th(c,i);if(!!h){var p=i||this.controlBox;p&&this.unsetAbles(),this.updateState({target:a,container:i}),!s&&p&&this.updateRect("End",!1,!1)}}},r.triggerEvent=function(n,a){var i=this.props[n];return i&&i(a)},r.useCSS=function(n,a){var i=this.props.customStyledMap,s=n+a;return i[s]||(i[s]=Zy(n,a)),i[s]},r.unsetAbles=function(){var n=this;this.targetAbles.forEach(function(a){a.unset&&a.unset(n)})},r.updateAbles=function(n,a){n===void 0&&(n=this.props.ables),a===void 0&&(a="");var i=this.props,s=i.triggerAblesSimultaneously,u=n.filter(function(g){return g&&(g.always&&i[g.name]!==!1||i[g.name])}),f="drag"+a+"Start",c="pinch"+a+"Start",h="drag"+a+"ControlStart",p=bu(u,[f,c],s),v=bu(u,[h],s);this.enabledAbles=u,this.targetAbles=p,this.controlAbles=v},r.updateState=function(n,a){if(a)this.setState(n);else{var i=this.state;for(var s in n)i[s]=n[s]}},r.getEnabledAbles=function(){var n=this.props,a=n.ables;return a.filter(function(i){return i&&n[i.name]})},r.renderAbles=function(){var n=this,a=this.props,i=a.triggerAblesSimultaneously,s={createElement:Ur};return out(uut(bu(this.getEnabledAbles(),["render"],i).map(function(u){var f=u.render;return f(n,s)||[]})).filter(function(u){return u}),function(u){var f=u.key;return f}).map(function(u){return u[0]})},r.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},r._updateObserver=function(n){var a,i=this.props,s=i.target;if(!window.ResizeObserver||!s||!i.useResizeObserver){(a=this._observer)===null||a===void 0||a.disconnect();return}if(!(n.target===s&&this._observer)){var u=new ResizeObserver(this.checkUpdateRect);u.observe(s,{box:"border-box"}),this._observer=u}},r._updateEvents=function(){var n=this.controlBox.getElement(),a=this.targetAbles.length,i=this.controlAbles.length,s=this.props,u=s.dragTarget||s.target,f=!a&&this.targetGesto||this._isTargetChanged(!0);f&&(Pi(this,"targetGesto"),this.updateState({gesto:null})),i||Pi(this,"controlGesto"),u&&a&&!this.targetGesto&&(this.targetGesto=Gw(this,u,"")),!this.controlGesto&&i&&(this.controlGesto=Ev(this,n,"controlAbles","Control"))},r._updateTargets=function(){var n=this.props;this._prevTarget=n.dragTarget||n.target,this._prevDragArea=n.dragArea},r._renderLines=function(){var n=this.props,a=n.edge,i=n.zoom,s=n.hideDefaultLines;if(s)return[];var u=this.state.renderPoses,f={createElement:Ur};return[Ii(f,a?"n":"",u[0],u[1],i,0),Ii(f,a?"e":"",u[1],u[3],i,1),Ii(f,a?"w":"",u[0],u[2],i,2),Ii(f,a?"s":"",u[2],u[3],i,3)]},r._isTargetChanged=function(n){var a=this.props,i=a.dragTarget||a.target,s=this._prevTarget,u=this._prevDragArea,f=a.dragArea,c=!f&&s!==i,h=(n||f)&&u!==f;return c||h},r._updateNativeEvents=function(){var n=this,a=this.props,i=a.dragArea?this.areaElement:this.state.target,s=this.events,u=Iy(s);if(this._isTargetChanged())for(var f in s){var c=s[f];c&&c.destroy(),s[f]=null}if(!!i){var h=this.enabledAbles;u.forEach(function(p){var v=bu(h,[p]),g=v.length>0,_=s[p];if(!g){_&&(_.destroy(),s[p]=null);return}_||(_=new Dft(i,n,p),s[p]=_),_.setAbles(v)})}},t.defaultProps={target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,edge:!1,parentMoveable:null,wrapperMoveable:null,parentPosition:null,portalContainer:null,useResizeObserver:!1,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{}},t}(sv),Cv={name:"groupable",props:{defaultGroupRotate:Number,defaultGroupOrigin:String,groupable:Boolean},events:{},render:function(e,t){var r=e.props.targets||[];e.moveables=[];var n=e.state,a=n.left,i=n.top,s={left:a,top:i},u=e.props;return r.map(function(f,c){return t.createElement(Gi,{key:"moveable"+c,ref:Cy(e,"moveables",c),target:f,origin:!1,cssStyled:u.cssStyled,customStyledMap:u.customStyledMap,useResizeObserver:u.useResizeObserver,parentMoveable:e,parentPosition:s})})}},Rft=yo("clickable",{props:{clickable:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},always:!0,dragRelation:"weak",dragStart:function(e,t){t.isRequest||Jr(window,"click",e.onPreventClick,!0)},dragControlStart:function(e,t){this.dragStart(e,t)},dragGroupStart:function(e,t){this.dragStart(e,t),t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){this.endEvent(e);var r=e.state.target,n=t.inputEvent,a=t.inputTarget,i=e.isMoveableElement(a),s=!i&&e.controlBox.getElement().contains(a);if((!t.isDrag||s)&&this.unset(e),!(!n||!a||t.isDrag||e.isMoveableElement(a)||s)){var u=r.contains(a);Et(e,"onClick",Zt(e,t,{isDouble:t.isDouble,inputTarget:a,isTarget:r===a,containsTarget:u}))}},dragGroupEnd:function(e,t){this.endEvent(e);var r=t.inputEvent,n=t.inputTarget;if(!(!r||!n||t.isDrag||e.isMoveableElement(n)||t.datas.inputTarget===n)){var a=e.props.targets,i=a.indexOf(n),s=i>-1,u=!1;i===-1&&(i=nn(a,function(f){return f.contains(n)}),u=i>-1),Et(e,"onClickGroup",Zt(e,t,{isDouble:t.isDouble,targets:a,inputTarget:n,targetIndex:i,isTarget:s,containsTarget:u}))}},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)},endEvent:function(e){var t=this;rv(function(){t.unset(e)})},unset:function(e){hr(window,"click",e.onPreventClick,!0)}});function Si(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),Q(Q({},e),{datas:t})}var Bft=yo("edgeDraggable",{dragControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return tn(r,Ht("direction"))&&tn(r,Ht("line"))},dragControlStart:function(e,t){return ir.dragStart(e,Si(t))},dragControl:function(e,t){return ir.drag(e,Si(t))},dragControlEnd:function(e,t){return ir.dragEnd(e,Si(t))},dragGroupControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return tn(r,Ht("direction"))&&tn(r,Ht("line"))},dragGroupControlStart:function(e,t){return ir.dragGroupStart(e,Si(t))},dragGroupControl:function(e,t){return ir.dragGroup(e,Si(t))},dragGroupControlEnd:function(e,t){return ir.dragGroupEnd(e,Si(t))},unset:function(e){return ir.unset(e)}}),Nw={name:"individualGroupable",props:{individualGroupable:Boolean},events:{}},Ov=[Fw,xw,lft,dut,ir,Bft,hft,pft,vft,gft,bft,yft,mft,Mft,Tft,xft,Cv,Nw,Rft,Pw,zw],Lft=Ov.reduce(function(e,t){return Q(Q({},e),"events"in t?t.events:{})},{}),Fft=Ov.reduce(function(e,t){return Q(Q({},e),t.props)},{}),zft=lut(Lft),Gft=Object.keys(zft),Nft=Object.keys(Fft);function Eu(e,t){return Math.max.apply(Math,e.map(function(r){var n=r[0],a=r[1],i=r[2],s=r[3];return Math.max(n[t],a[t],i[t],s[t])}))}function Cu(e,t){return Math.min.apply(Math,e.map(function(r){var n=r[0],a=r[1],i=r[2],s=r[3];return Math.min(n[t],a[t],i[t],s[t])}))}function jft(e,t){if(!e.length)return[0,0,0,0];var r=e.map(function(m){var b=m.state;return Cn(b)}),n=Ds,a=Ds,i=0,s=0,u=re(t,Mr);if(u%90){var f=u/180*Math.PI,c=Math.tan(f),h=-1/c,p=[bm,Ds],v=[bm,Ds];r.forEach(function(m){m.forEach(function(b){var y=b[1]-c*b[0],w=b[1]-h*b[0];p[0]=Math.max(p[0],y),p[1]=Math.min(p[1],y),v[0]=Math.max(v[0],w),v[1]=Math.min(v[1],w)})}),p.forEach(function(m){v.forEach(function(b){var y=(b-m)/(c-h),w=c*y+m;n=Math.min(n,y),a=Math.min(a,w)})});var g=r.map(function(m){var b=m[0],y=m[1],w=m[2],C=m[3];return[ua(b,-f),ua(y,-f),ua(w,-f),ua(C,-f)]});i=Eu(g,0)-Cu(g,0),s=Eu(g,1)-Cu(g,1)}else if(n=Cu(r,0),a=Cu(r,1),i=Eu(r,0)-n,s=Eu(r,1)-a,u%180){var _=i;i=s,s=_}return[n,a,i,s]}var qft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.differ=new hot,n.moveables=[],n.transformOrigin="50% 50%",n}var r=t.prototype;return r.checkUpdate=function(){this.updateAbles()},r.updateRect=function(n,a,i){if(i===void 0&&(i=!0),!!this.controlBox){this.moveables.forEach(function(at){at.updateRect(n,!1,!1)});var s=this.state,u=this.props,f=s.target||u.target;(!a||n!==""&&u.updateGroup)&&(this.rotation=u.defaultGroupRotate,this.transformOrigin=u.defaultGroupOrigin||"50% 50%",this.scale=[1,1]);var c=this.rotation,h=this.scale,p=jft(this.moveables,c),v=p[0],g=p[1],_=p[2],m=p[3],b="rotate("+c+"deg) scale("+(h[0]>=0?1:-1)+", "+(h[1]>=0?1:-1)+")";f.style.cssText+="left:0px;top:0px; transform-origin: "+this.transformOrigin+"; width:"+_+"px; height:"+m+"px;"+("transform:"+b),s.width=_,s.height=m;var y=this.getContainer(),w=Ah(this.controlBox.getElement(),f,this.controlBox.getElement(),this.getContainer(),this.props.rootContainer||y),C=[w.left,w.top],T=Cn(w),A=T[0],x=T[1],I=T[2],B=T[3],P=Cf([A,x,I,B]),L=[P.minX,P.minY];w.pos1=Gt(A,L),w.pos2=Gt(x,L),w.pos3=Gt(I,L),w.pos4=Gt(B,L),w.left=v-w.left+L[0],w.top=g-w.top+L[1],w.origin=Gt(Vt(C,w.origin),L),w.beforeOrigin=Gt(Vt(C,w.beforeOrigin),L),w.originalBeforeOrigin=Vt(C,w.originalBeforeOrigin);var G=w.targetClientRect,K=h[0]*h[1]>0?1:-1;G.top+=w.top-s.top,G.left+=w.left-s.left,f.style.transform="translate("+-L[0]+"px, "+-L[1]+"px) "+b,this.updateState(Q(Q({},w),{direction:K,beforeDirection:K}),i)}},r.getRect=function(){return Q(Q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},r.triggerEvent=function(n,a,i){if(i||n.indexOf("Group")>-1)return e.prototype.triggerEvent.call(this,n,a)},r.updateAbles=function(){e.prototype.updateAbles.call(this,Rt(Rt([],this.props.ables),[Cv]),"Group")},r._updateTargets=function(){e.prototype._updateTargets.call(this),this._prevTarget=this.props.dragTarget||this.areaElement},r._updateEvents=function(){var n=this.state,a=this.props,i=this._prevTarget,s=a.dragTarget||this.areaElement;i!==s&&(Pi(this,"targetGesto"),Pi(this,"controlGesto"),n.target=null),n.target||(n.target=this.areaElement,this.controlBox.getElement().style.display="block",this.targetGesto=Gw(this,s,"Group"),this.controlGesto=Ev(this,this.controlBox.getElement(),"controlAbles","GroupControl"));var u=!Th(n.container,a.container);u&&(n.container=a.container);var f=this.differ.update(a.targets),c=f.added,h=f.changed,p=f.removed;(u||c.length||h.length||p.length)&&this.updateRect()},r._updateObserver=function(){},t.defaultProps=Q(Q({},Gi.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(Gi),Uft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.moveables=[],n}var r=t.prototype;return r.render=function(){var n=this,a=this.props,i=a.cspNonce,s=a.cssStyled,u=a.targets;return Ur(s,{cspNonce:i,ref:pn(this,"controlBox"),className:Ht("control-box")},u.map(function(f,c){return Ur(Gi,Q({key:"moveable"+c,ref:Cy(n,"moveables",c)},n.props,{target:f,wrapperMoveable:n}))}))},r.componentDidUpdate=function(){},r.updateRect=function(n,a,i){i===void 0&&(i=!0),this.moveables.forEach(function(s){s.updateRect(n,a,i)})},r.getRect=function(){return Q(Q({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},r.request=function(){return{request:function(){return this},requestEnd:function(){return this}}},r.dragStart=function(){return this},r.hitTest=function(){return 0},r.isInside=function(){return!1},r.isDragging=function(){return!1},r.updateRenderPoses=function(){},r.checkUpdate=function(){},r.triggerEvent=function(){},r.updateAbles=function(){},r._updateEvents=function(){},r._updateObserver=function(){},t}(Gi),kft=function(e){bo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.refTargets=[],n.selectorMap={},n}var r=t.prototype;return t.makeStyled=function(){var n={},a=this.getTotalAbles();a.forEach(function(s){var u=s.css;!u||u.forEach(function(f){n[f]=!0})});var i=Iy(n).join(`
+`);this.defaultStyled=Zy("div",ist(lv,qot+i))},t.getTotalAbles=function(){return Rt([xw,Cv,Nw,Pw],this.defaultAbles)},r.render=function(){var n=this.constructor;n.defaultStyled||n.makeStyled();var a=this.props,i=a.ables,s=a.props,u=Fot(a,["ables","props"]),f=this._updateRefs(!0),c=put(f,this.selectorMap),h=c.length>1,p=n.getTotalAbles(),v=Rt(Rt([],p),i||[]),g=Q(Q(Q({},u),s||{}),{ables:v,cssStyled:n.defaultStyled,customStyledMap:n.customStyledMap});return h?u.individualGroupable?Ur(Uft,Q({key:"individual-group",ref:pn(this,"moveable")},g,{target:null,targets:c})):Ur(qft,Q({key:"group",ref:pn(this,"moveable")},g,{target:null,targets:c})):Ur(Gi,Q({key:"single",ref:pn(this,"moveable")},g,{target:c[0]}))},r.componentDidMount=function(){this._updateRefs()},r.componentDidUpdate=function(){this._updateRefs()},r.getManager=function(){return this.moveable},r._updateRefs=function(n){var a=this.refTargets,i=uw(this.props.target||this.props.targets),s=typeof document!="undefined",u=a.length!==i.length||a.some(function(h,p){var v=i[p];return!h&&!v?!1:h!==v}),f=this.selectorMap,c={};return this.refTargets.forEach(function(h){rn(h)&&(!f[h]&&s?(u=!0,c[h]=[].slice.call(document.querySelectorAll(h))):c[h]=f[h])}),this.refTargets=i,this.selectorMap=c,!n&&u&&this.forceUpdate(),i},t.defaultAbles=[],t.customStyledMap={},t.defaultStyled=null,zot([sst(ew)],t.prototype,"moveable",void 0),t}(sv),Hft=function(e){bo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.defaultAbles=Ov,t}(kft);/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */var Rh=function(e,t){return Rh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},Rh(e,t)};function Av(e,t){Rh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var no=function(){return no=Object.assign||function(t){for(var r,n=1,a=arguments.length;n=0;u--)(s=e[u])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}var Kft=function(e){Av(t,e);function t(n){var a=e.call(this,n)||this;return a.state={},a.state=a.props,a}var r=t.prototype;return r.render=function(){return qst(Ur(Hft,no({ref:pn(this,"moveable")},this.state)),this.state.parentElement)},t}(iv),jw=Nft,qw=ew,Uw=Gft;/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */var Bh=function(){return Bh=Object.assign||function(t){for(var r,n=1,a=arguments.length;n-1&&i.splice(s,1)}}return this},t.once=function(r,n){var a=this;return n&&this._addEvent(r,n,{once:!0}),new Promise(function(i){a._addEvent(r,i,{once:!0})})},t.emit=function(r,n){var a=this;n===void 0&&(n={});var i=this._events[r];if(!r||!i)return!0;var s=!1;return n.eventType=r,n.stop=function(){s=!0},n.currentTarget=this,Yft(i).forEach(function(u){u.listener(n),u.once&&a.off(r,u.listener)}),!s},t.trigger=function(r,n){return n===void 0&&(n={}),this.emit(r,n)},t._addEvent=function(r,n,a){var i=this._events;i[r]=i[r]||[];var s=i[r];s.push(Bh({listener:n},a))},e}(),Vft=function(e){Av(t,e);function t(n,a){a===void 0&&(a={});var i=e.call(this)||this;i.tempElement=document.createElement("div");var s=no({},a),u={};Uw.forEach(function(c){u[xy("on "+c)]=function(h){return i.trigger(c,h)}}),vm(Ur(Kft,no({ref:pn(i,"innerMoveable"),parentElement:n},s,u)),i.tempElement);var f=s.target;return ni(f)&&f.length>1&&i.updateRect(),i}var r=t.prototype;return r.setState=function(n,a){this.innerMoveable.setState(n,a)},r.destroy=function(){vm(null,this.tempElement),this.off(),this.tempElement=null,this.innerMoveable=null},r.getMoveable=function(){return this.innerMoveable.moveable},t=Wft([om(qw,function(n,a){n[a]||(n[a]=function(){for(var i=[],s=0;s0){if(++e>=HN)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var VN=YN,ZN=zN,XN=VN,JN=XN(ZN),QN=JN,ej=RN,tj=jN,nj=QN;function rj(t){return nj(tj(t,void 0,ej),t+"")}var ij=rj,aj=ks,sj=sN,uj=yN,oj=fi,lj=da,fj=AN,cj=ij,hj=pf,pj=1,gj=2,_j=4,vj=cj(function(t,e){var n={};if(t==null)return n;var r=!1;e=aj(e,function(s){return s=oj(s,t),r||(r=s.length>1),s}),lj(t,hj(t),n),r&&(n=sj(n,pj|gj|_j,fj));for(var a=e.length;a--;)uj(n,e[a]);return n}),dj=vj;function $j(t){return t}function a$(t){var e=t;return function(){return e}}function s$(t){return Array.isArray(t)?t:Zd((""+t).split("."),function(e){return!e})}var Ne="@@updeep/placeholder";function Vs(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===Ne;)n-=1;return n}function on(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=Vs(arguments);return o>=1?t(n,a,s):e}}function sn(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=Vs(arguments,2);if(r===Ne||s===Ne||o===Ne)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===Ne?on(function(c,h,g){return t(c,r,h,g)}):t(n,r,s,o):l===1?on(function(c,h,g){return t(n,c,h,g)}):e}}function Vi(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=Vs(arguments,3);if(a===Ne||o===Ne||l===Ne)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===Ne?r===Ne?sn(function(h,g,_,v){return t(h,g,a,_,v)}):on(function(h,g,_){return t(h,r,a,g,_)}):r===Ne?on(function(h,g,_){return t(n,h,a,g,_)}):t(n,r,a,o,l):c===2?n===Ne?sn(function(h,g,_,v){return t(h,r,g,_,v)}):on(function(h,g,_){return t(n,r,h,g,_)}):c===1?sn(function(h,g,_,v){return t(n,h,g,_,v)}):e}}function mj(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=Vs(arguments,4);if(s===Ne||l===Ne||c===Ne)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===Ne?r===Ne?a===Ne?Vi(function(g,_,v,$,b){return t(g,_,v,s,$,b)}):sn(function(g,_,v,$){return t(g,_,a,s,v,$)}):a===Ne?sn(function(g,_,v,$){return t(g,r,_,s,v,$)}):on(function(g,_,v){return t(g,r,a,s,_,v)}):r===Ne?a===Ne?sn(function(g,_,v,$){return t(n,g,_,s,v,$)}):on(function(g,_,v){return t(n,g,a,s,_,v)}):a===Ne?on(function(g,_,v){return t(n,r,g,s,_,v)}):t(n,r,a,s,l,c):h===3?n===Ne?r===Ne?Vi(function(g,_,v,$,b){return t(g,_,a,v,$,b)}):sn(function(g,_,v,$){return t(g,r,a,_,v,$)}):r===Ne?sn(function(g,_,v,$){return t(n,g,a,_,v,$)}):on(function(g,_,v){return t(n,r,a,g,_,v)}):h===2?n===Ne?Vi(function(g,_,v,$,b){return t(g,r,_,v,$,b)}):sn(function(g,_,v,$){return t(n,r,g,_,v,$)}):h===1?Vi(function(g,_,v,$,b){return t(n,g,_,v,$,b)}):e}}function $a(t,e){return e===void 0&&(e=t.length),[t,on,sn,Vi,mj][e](t)}var yj=$a(function(t,e,n){for(var r=s$(t),a=n,s=0;s0){if(++e>=sZ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var fZ=lZ,cZ=aZ,hZ=fZ,pZ=hZ(cZ),gZ=pZ,_Z=YV,vZ=QV,dZ=gZ;function $Z(t){return dZ(vZ(t,void 0,_Z),t+"")}var mZ=$Z,yZ=nu,bZ=bV,wZ=DV,AZ=yi,OZ=ba,TZ=jV,SZ=mZ,CZ=Df,EZ=1,IZ=2,PZ=4,MZ=SZ(function(t,e){var n={};if(t==null)return n;var r=!1;e=yZ(e,function(s){return s=AZ(s,t),r||(r=s.length>1),s}),OZ(t,CZ(t),n),r&&(n=bZ(n,EZ|IZ|PZ,TZ));for(var a=e.length;a--;)wZ(n,e[a]);return n}),xZ=MZ;function RZ(t){return t}function W$(t){var e=t;return function(){return e}}function k$(t){return Array.isArray(t)?t:D$((""+t).split("."),function(e){return!e})}var je="@@updeep/placeholder";function iu(t,e){var n=t.length;for(n>e&&(n=e);t[n-1]===je;)n-=1;return n}function ln(t){return function e(n){var r=[].slice.call(arguments,1),a=r[0],s=r[1],o=iu(arguments);return o>=1?t(n,a,s):e}}function un(t){return function e(n,r){var a=[].slice.call(arguments,2),s=a[0],o=a[1],l=iu(arguments,2);if(r===je||s===je||o===je)throw new Error("Can only use placeholder on first argument of this function.");return l>=2?n===je?ln(function(c,h,g){return t(c,r,h,g)}):t(n,r,s,o):l===1?ln(function(c,h,g){return t(n,c,h,g)}):e}}function Ji(t){return function e(n,r,a){var s=[].slice.call(arguments,3),o=s[0],l=s[1],c=iu(arguments,3);if(a===je||o===je||l===je)throw new Error("Can only use placeholder on first or second argument of this function.");return c>=3?n===je?r===je?un(function(h,g,_,v){return t(h,g,a,_,v)}):ln(function(h,g,_){return t(h,r,a,g,_)}):r===je?ln(function(h,g,_){return t(n,h,a,g,_)}):t(n,r,a,o,l):c===2?n===je?un(function(h,g,_,v){return t(h,r,g,_,v)}):ln(function(h,g,_){return t(n,r,h,g,_)}):c===1?un(function(h,g,_,v){return t(n,h,g,_,v)}):e}}function LZ(t){return function e(n,r,a,s){var o=[].slice.call(arguments,4),l=o[0],c=o[1],h=iu(arguments,4);if(s===je||l===je||c===je)throw new Error("Can only use placeholder on first, second or third argument of this function.");return h>=4?n===je?r===je?a===je?Ji(function(g,_,v,$,b){return t(g,_,v,s,$,b)}):un(function(g,_,v,$){return t(g,_,a,s,v,$)}):a===je?un(function(g,_,v,$){return t(g,r,_,s,v,$)}):ln(function(g,_,v){return t(g,r,a,s,_,v)}):r===je?a===je?un(function(g,_,v,$){return t(n,g,_,s,v,$)}):ln(function(g,_,v){return t(n,g,a,s,_,v)}):a===je?ln(function(g,_,v){return t(n,r,g,s,_,v)}):t(n,r,a,s,l,c):h===3?n===je?r===je?Ji(function(g,_,v,$,b){return t(g,_,a,v,$,b)}):un(function(g,_,v,$){return t(g,r,a,_,v,$)}):r===je?un(function(g,_,v,$){return t(n,g,a,_,v,$)}):ln(function(g,_,v){return t(n,r,a,g,_,v)}):h===2?n===je?Ji(function(g,_,v,$,b){return t(g,r,_,v,$,b)}):un(function(g,_,v,$){return t(n,r,g,_,v,$)}):h===1?Ji(function(g,_,v,$,b){return t(n,g,_,v,$,b)}):e}}function wa(t,e){return e===void 0&&(e=t.length),[t,ln,un,Ji,LZ][e](t)}var DZ=wa(function(t,e,n){for(var r=k$(t),a=n,s=0;s