407 lines
482 KiB
JavaScript
407 lines
482 KiB
JavaScript
var EM=Object.defineProperty,CM=Object.defineProperties;var OM=Object.getOwnPropertyDescriptors;var pu=Object.getOwnPropertySymbols;var o0=Object.prototype.hasOwnProperty,u0=Object.prototype.propertyIsEnumerable;var s0=(e,t,r)=>t in e?EM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ua=(e,t)=>{for(var r in t||(t={}))o0.call(t,r)&&s0(e,r,t[r]);if(pu)for(var r of pu(t))u0.call(t,r)&&s0(e,r,t[r]);return e},rc=(e,t)=>CM(e,OM(t));var f0=(e,t)=>{var r={};for(var n in e)o0.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pu)for(var n of pu(e))t.indexOf(n)<0&&u0.call(e,n)&&(r[n]=e[n]);return r};import{N as Xt,O as zh,P as AM,S as Ot,i as At,s as Tt,e as k,c as H,a as X,d as P,g as U,J as bn,K as yn,L as wn,q as V,o as tt,I as Sn,C as Nt,k as ht,m as vt,Q as pa,R as Le,M as j,T as nn,n as dn,p as gn,z as ae,U as da,V as TM,W as Ku,X as so,r as Pc,Y as d$,G as an,Z as he,_ as MM,b as F,$ as ji,a0 as l0,l as er,a1 as Gn,a2 as Nn,f as Re,E as se,w as st,x as ft,y as ot,B as ut,t as $t,h as bt,a3 as Ya,a4 as xc,a5 as Ic,a6 as qi,j as rr,a7 as xe,a8 as _n,a9 as kr,aa as Us,ab as Sa,ac as Wn,ad as Fe,A as ue,ae as Yu,F as PM,H as Va,af as ks,ag as xM}from"../chunks/index-68fa7044.js";import{r as IM,d as DM,w as RM,b as En}from"../chunks/paths-5d155410.js";function BM(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c0(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 h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(r),!0).forEach(function(n){BM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LM(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var nc=function(){return Math.random().toString(36).substring(7).split("").join(".")};""+nc(),""+nc();function g$(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function FM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(LM(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(f){return f(s)});return i=g$.apply(void 0,u)(a.dispatch),h0(h0({},a),{},{dispatch:i})}}}var zM={isEqual:!0,isMatchingKey:!0,isPromise:!0,maxSize:!0,onCacheAdd:!0,onCacheChange:!0,onCacheHit:!0,transformKey:!0},GM=Array.prototype.slice;function Bu(e){var t=e.length;return t?t===1?[e[0]]:t===2?[e[0],e[1]]:t===3?[e[0],e[1],e[2]]:GM.call(e,0):[]}function NM(e){var t={};for(var r in e)zM[r]||(t[r]=e[r]);return t}function jM(e){return typeof e=="function"&&e.isMemoized}function qM(e,t){return e===t||e!==e&&t!==t}function v0(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r}var UM=function(){function e(t){this.keys=[],this.values=[],this.options=t;var r=typeof t.isMatchingKey=="function";r?this.getKeyIndex=this._getKeyIndexFromMatchingKey:t.maxSize>1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof t.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||r,this.shouldUpdateOnAdd=typeof t.onCacheAdd=="function",this.shouldUpdateOnChange=typeof t.onCacheChange=="function",this.shouldUpdateOnHit=typeof t.onCacheHit=="function"}return Object.defineProperty(e.prototype,"size",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapshot",{get:function(){return{keys:Bu(this.keys),size:this.size,values:Bu(this.values)}},enumerable:!0,configurable:!0}),e.prototype._getKeyIndexFromMatchingKey=function(t){var r=this.options,n=r.isMatchingKey,a=r.maxSize,i=this.keys,s=i.length;if(!s)return-1;if(n(i[0],t))return 0;if(a>1){for(var u=1;u<s;u++)if(n(i[u],t))return u}return-1},e.prototype._getKeyIndexForMany=function(t){var r=this.options.isEqual,n=this.keys,a=n.length;if(!a)return-1;if(a===1)return this._getKeyIndexForSingle(t);var i=t.length,s,u;if(i>1){for(var f=0;f<a;f++)if(s=n[f],s.length===i){for(u=0;u<i&&r(s[u],t[u]);u++);if(u===i)return f}}else for(var f=0;f<a;f++)if(s=n[f],s.length===i&&r(s[0],t[0]))return f;return-1},e.prototype._getKeyIndexForSingle=function(t){var r=this.keys;if(!r.length)return-1;var n=r[0],a=n.length;if(t.length!==a)return-1;var i=this.options.isEqual;if(a>1){for(var s=0;s<a;s++)if(!i(n[s],t[s]))return-1;return 0}return i(n[0],t[0])?0:-1},e.prototype.orderByLru=function(t,r,n){for(var a=this.keys,i=this.values,s=a.length,u=n;u--;)a[u+1]=a[u],i[u+1]=i[u];a[0]=t,i[0]=r;var f=this.options.maxSize;s===f&&n===s?(a.pop(),i.pop()):n>=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 _$(e,t){if(t===void 0&&(t={}),jM(e))return _$(e.fn,v0(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?qM: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,v=t.onCacheHit,p=t.transformKey,g=v0({isEqual:n,isMatchingKey:a,isPromise:s,maxSize:f,onCacheAdd:c,onCacheChange:h,onCacheHit:v,transformKey:p},NM(t)),_=new UM(g),m=_.keys,b=_.values,y=_.canTransformKey,w=_.shouldCloneArguments,O=_.shouldUpdateOnAdd,T=_.shouldUpdateOnChange,A=_.shouldUpdateOnHit,I=function x(){var B=w?Bu(arguments):arguments;y&&(B=p(B));var M=m.length?_.getKeyIndex(B):-1;if(M!==-1)A&&v(_,g,x),M&&(_.orderByLru(m[M],b[M],M),T&&h(_,g,x));else{var L=e.apply(this,arguments),G=w?B:Bu(arguments);_.orderByLru(G,L,m.length),s&&_.updateAsyncCache(x),O&&c(_,g,x),T&&h(_,g,x)}return b[0]};return I.cache=_,I.fn=e,I.isMemoized=!0,I.options=g,I}var kM=typeof WeakSet=="function",p0=Object.keys;function Xu(e,t){return e===t||e!==e&&t!==t}function d0(e){return e.constructor===Object||e.constructor==null}function g0(e){return!!e&&typeof e.then=="function"}function _0(e){return!!(e&&e.$$typeof)}function HM(){var e=[];return{add:function(t){e.push(t)},has:function(t){return e.indexOf(t)!==-1}}}var WM=function(e){return e?function(){return new WeakSet}:HM}(kM);function m$(e){return function(r){var n=e||r;return function(i,s,u){u===void 0&&(u=WM());var f=!!i&&typeof i=="object",c=!!s&&typeof s=="object";if(f||c){var h=f&&u.has(i),v=c&&u.has(s);if(h||v)return h&&v;f&&u.add(i),c&&u.add(s)}return n(i,s,u)}}}function KM(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 YM(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 XM="_owner",VM=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function m0(e,t,r,n){var a=p0(e),i=a.length;if(p0(t).length!==i)return!1;if(i)for(var s=void 0;i-- >0;){if(s=a[i],s===XM){var u=_0(e),f=_0(t);if((u||f)&&u!==f)return!1}if(!VM(t,s)||!r(e[s],t[s],n))return!1}return!0}function ZM(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 JM(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 QM=typeof Map=="function",tP=typeof Set=="function";function Vu(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(d0(n)&&d0(a))return m0(n,a,t,i);var s=Array.isArray(n),u=Array.isArray(a);return s||u?s===u&&KM(n,a,t,i):(s=n instanceof Date,u=a instanceof Date,s||u?s===u&&Xu(n.getTime(),a.getTime()):(s=n instanceof RegExp,u=a instanceof RegExp,s||u?s===u&&ZM(n,a):g0(n)||g0(a)?n===a:QM&&(s=n instanceof Map,u=a instanceof Map,s||u)?s===u&&YM(n,a,t,i):tP&&(s=n instanceof Set,u=a instanceof Set,s||u)?s===u&&JM(n,a,t,i):m0(n,a,t,i)))}return n!==n&&a!==a}return r}var eP=Vu(),rP=Vu(function(){return Xu});Vu(m$());Vu(m$(Xu));function ga(){return ga=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ga.apply(this,arguments)}function nP(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Oi={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void 0,matchesKey:void 0,maxAge:void 0,maxArgs:void 0,maxSize:1,onExpire:void 0,profileName:void 0,serializer:void 0,updateCacheForKey:void 0,transformArgs:void 0,updateExpire:!1};function zs(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,a){if(typeof n=="function")return typeof a=="function"?function(){n.apply(this,arguments),a.apply(this,arguments)}:n;if(typeof a=="function")return a})}function Gh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,a){if(typeof n=="function")return typeof a=="function"?function(){return n(a.apply(this,arguments))}:n;if(typeof a=="function")return a})}function Nh(e,t){for(var r=0;r<e.length;r++)if(e[r].key===t)return r;return-1}function $$(e,t){var r=typeof t=="function"?t:function(n,a){for(var i=0;i<a.length;i++)if(!e(n[i],a[i]))return!1;return!0};return function(n,a){for(var i=0;i<n.length;i++)if(n[i].length===a.length&&r(n[i],a))return i;return-1}}function ac(e,t){return!t||t===Oi?e:ga({},e,t,{onCacheAdd:zs(e.onCacheAdd,t.onCacheAdd),onCacheChange:zs(e.onCacheChange,t.onCacheChange),onCacheHit:zs(e.onCacheHit,t.onCacheHit),transformArgs:Gh(e.transformArgs,t.transformArgs)})}function aP(e){return typeof e=="function"&&e.isMoized}function b$(e,t,r){try{var n=r||t||"anonymous";Object.defineProperty(e,"name",{configurable:!0,enumerable:!1,value:"moized("+n+")",writable:!0})}catch{}}function jh(e,t,r){var n=Nh(e,t);n!==-1&&(clearTimeout(e[n].timeoutId),r&&e.splice(n,1))}function y$(e,t){var r=setTimeout(e,t);return typeof r.unref=="function"&&r.unref(),r}function iP(e,t,r,n){var a=t.maxAge;return function i(s,u,f){var c=s.keys[0];if(Nh(e,c)===-1){var h=function(){var p=$$(r,n),g=p(s.keys,c),_=s.values[g];~g&&(s.keys.splice(g,1),s.values.splice(g,1),typeof t.onCacheChange=="function"&&t.onCacheChange(s,u,f)),jh(e,c,!0),typeof t.onExpire=="function"&&t.onExpire(c)===!1&&(s.keys.unshift(c),s.values.unshift(_),i(s,u,f),typeof t.onCacheChange=="function"&&t.onCacheChange(s,u,f))};e.push({expirationMethod:h,key:c,timeoutId:y$(h,a)})}}}function sP(e,t){return function(n){var a=n.keys[0],i=Nh(e,a);~i&&(jh(e,a,!1),e[i].timeoutId=y$(e[i].expirationMethod,t.maxAge))}}function oP(e,t,r,n){var a=typeof t.maxAge=="number"&&isFinite(t.maxAge)?iP(e,t,r,n):void 0;return{onCacheAdd:a,onCacheHit:a&&t.updateExpire?sP(e,t):void 0}}var Or={anonymousProfileNameCounter:1,isCollectingStats:!1,profiles:{}},$0=!1;function w$(e){e?delete Or.profiles[e]:Or.profiles={}}function uP(e){e===void 0&&(e=!0),Or.isCollectingStats=e}function fP(e){var t=e.profileName;return function(){t&&!Or.profiles[t]&&(Or.profiles[t]={calls:0,hits:0}),Or.profiles[t].calls++}}function lP(e){return function(){var t=Or.profiles,r=e.profileName;t[r]||(t[r]={calls:0,hits:0}),t[r].calls++,t[r].hits++}}function cP(e){var t=new Error().stack,r=e.displayName||e.name||"Anonymous "+Or.anonymousProfileNameCounter++;if(!t)return r;for(var n=t.split(`
|
|
`).slice(3),a,i,s=0;s<n.length;s++)if(a=n[s],a.indexOf("/moize/")===-1&&a.indexOf(" (native)")===-1&&a.indexOf(" Function.")===-1){i=a.replace(/\n/g,"\\n").trim();break}return i?r+" "+i:r}function b0(e,t){return e?(t/e*100).toFixed(4)+"%":"0.0000%"}function qh(e){!Or.isCollectingStats&&!$0&&(console.warn('Stats are not currently being collected, please run "collectStats" to enable them.'),$0=!0);var t=Or.profiles;if(e){if(!t[e])return{calls:0,hits:0,usage:"0.0000%"};var r=t[e];return ga({},r,{usage:b0(r.calls,r.hits)})}var n=Object.keys(Or.profiles).reduce(function(a,i){return a.calls+=t[i].calls,a.hits+=t[i].hits,a},{calls:0,hits:0});return ga({},n,{profiles:Object.keys(t).reduce(function(a,i){return a[i]=qh(i),a},{}),usage:b0(n.calls,n.hits)})}function hP(e){return Or.isCollectingStats?{onCacheAdd:fP(e),onCacheHit:lP(e)}:{}}var vP={arguments:!0,callee:!0,caller:!0,constructor:!0,length:!0,name:!0,prototype:!0};function Uh(e,t,r){r===void 0&&(r=[]),Object.getOwnPropertyNames(e).forEach(function(n){if(!vP[n]&&r.indexOf(n)===-1){var a=Object.getOwnPropertyDescriptor(e,n);a.get||a.set?Object.defineProperty(t,n,a):t[n]=e[n]}})}function pP(e,t){var r=t.expirations,n=e.options,a=$$(n.isEqual,n.isMatchingKey),i=e;i.clear=function(){var s=i._microMemoizeOptions.onCacheChange,u=i.cache;return u.keys.length=0,u.values.length=0,s&&s(u,i.options,i),!0},i.clearStats=function(){w$(i.options.profileName)},i.get=function(s){var u=i._microMemoizeOptions.transformKey,f=i.cache,c=u?u(s):s,h=a(f.keys,c);return h!==-1?i.apply(this,s):void 0},i.getStats=function(){return qh(i.options.profileName)},i.has=function(s){var u=i._microMemoizeOptions.transformKey,f=u?u(s):s;return a(i.cache.keys,f)!==-1},i.keys=function(){return i.cacheSnapshot.keys},i.remove=function(s){var u=i._microMemoizeOptions,f=u.onCacheChange,c=u.transformKey,h=i.cache,v=a(h.keys,c?c(s):s);if(v===-1)return!1;var p=h.keys[v];return h.keys.splice(v,1),h.values.splice(v,1),f&&f(h,i.options,i),jh(r,p,!0),!0},i.set=function(s,u){var f=i._microMemoizeOptions,c=i.cache,h=i.options,v=f.onCacheAdd,p=f.onCacheChange,g=f.transformKey,_=g?g(s):s,m=a(c.keys,_);if(m===-1){var b=h.maxSize-1;c.size>b&&(c.keys.length=b,c.values.length=b),c.keys.unshift(_),c.values.unshift(u),h.isPromise&&c.updateAsyncCache(i),v&&v(c,h,i),p&&p(c,h,i)}else{var y=c.keys[m];c.values[m]=u,m>0&&c.orderByLru(y,u,m),h.isPromise&&c.updateAsyncCache(i),typeof p=="function"&&p(c,h,i)}},i.values=function(){return i.cacheSnapshot.values}}function dP(e,t){var r=t.expirations,n=t.options,a=t.originalFunction,i=e.options;Object.defineProperties(e,{_microMemoizeOptions:{configurable:!0,get:function(){return i}},cacheSnapshot:{configurable:!0,get:function(){var f=e.cache;return{keys:f.keys.slice(0),size:f.size,values:f.values.slice(0)}}},expirations:{configurable:!0,get:function(){return r}},expirationsSnapshot:{configurable:!0,get:function(){return r.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return n}},originalFunction:{configurable:!0,get:function(){return a}}});var s=e;Uh(a,s)}function gP(e,t){return pP(e,t),dP(e,t),e}var _P=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function mP(e,t,r){var n=e(ga({maxArgs:2,isShallowEqual:!0},r,{isReact:!1}));t.displayName||(t.displayName=t.name||"Component");function a(i,s,u){this.props=i,this.context=s,this.updater=u,this.MoizedComponent=n(t)}return a.prototype.isReactComponent={},a.prototype.render=function(){return{$$typeof:_P,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},Uh(t,a,["contextType","contextTypes"]),a.displayName="Moized("+(t.displayName||t.name||"Component")+")",b$(a,t.name,r.profileName),a}function $P(e){return function(t){if(e>=t.length)return t;if(e===0)return[];if(e===1)return[t[0]];if(e===2)return[t[0],t[1]];if(e===3)return[t[0],t[1],t[2]];for(var r=[],n=0;n<e;n++)r[n]=t[n];return r}}function y0(e,t){for(var r=e.length,n=0;n<r;++n)if(e[n]===t)return n+1;return 0}function bP(){var e=[],t=[];return function(n,a){var i=typeof a;if(i==="function"||i==="symbol")return a.toString();if(typeof a=="object"){if(e.length){var s=y0(e,this);s===0?e[e.length]=this:(e.splice(s),t.splice(s)),t[t.length]=n;var u=y0(e,a);if(u!==0)return"[ref="+(t.slice(0,u).join(".")||".")+"]"}else e[0]=a,t[0]=n;return a}return""+a}}function yP(e){var t=typeof e;return e&&(t==="object"||t==="function")?JSON.stringify(e,bP()):e}function wP(e){for(var t="|",r=0;r<e.length;r++)t+=yP(e[r])+"|";return[t]}function SP(e){return typeof e.serializer=="function"?e.serializer:wP}function EP(e,t){return e[0]===t[0]}function ic(e){if(typeof e=="function")return function(t,r,n){return e(n.cache,n.options,n)}}function CP(e){return e.matchesArg||e.isDeepEqual&&eP||e.isShallowEqual&&rP||Xu}function OP(e){return e.matchesKey||e.isSerialized&&EP||void 0}function AP(e){return Gh(e.isSerialized&&SP(e),typeof e.transformArgs=="function"&&e.transformArgs,typeof e.maxArgs=="number"&&$P(e.maxArgs))}function TP(e){var t=e.options.updateCacheForKey,r=function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];if(!t(i))return e.apply(this,i);var u=e.fn.apply(this,i);return e.set(i,u),u};return Uh(e,r),r}var MP=["matchesArg","isDeepEqual","isPromise","isReact","isSerialized","isShallowEqual","matchesKey","maxAge","maxArgs","maxSize","onCacheAdd","onCacheChange","onCacheHit","onExpire","profileName","serializer","updateCacheForKey","transformArgs","updateExpire"],Dt=function e(t,r){var n=r||Oi;if(aP(t)){var a=t.originalFunction,i=ac(t.options,n);return e(a,i)}if(typeof t=="object")return function(x,B){if(typeof x=="function"){var M=ac(t,B);return e(x,M)}var L=ac(t,x);return e(L)};if(n.isReact)return mP(e,t,n);var s=ga({},Oi,n,{maxAge:typeof n.maxAge=="number"&&n.maxAge>=0?n.maxAge:Oi.maxAge,maxArgs:typeof n.maxArgs=="number"&&n.maxArgs>=0?n.maxArgs:Oi.maxArgs,maxSize:typeof n.maxSize=="number"&&n.maxSize>=0?n.maxSize:Oi.maxSize,profileName:n.profileName||cP(t)}),u=[];s.matchesArg,s.isDeepEqual;var f=s.isPromise;s.isReact,s.isSerialized,s.isShallowEqual,s.matchesKey,s.maxAge,s.maxArgs;var c=s.maxSize,h=s.onCacheAdd,v=s.onCacheChange,p=s.onCacheHit;s.onExpire,s.profileName,s.serializer;var g=s.updateCacheForKey;s.transformArgs,s.updateExpire;var _=nP(s,MP),m=CP(s),b=OP(s),y=oP(u,s,m,b),w=hP(s),O=AP(s),T=ga({},_,{isEqual:m,isMatchingKey:b,isPromise:f,maxSize:c,onCacheAdd:ic(zs(h,y.onCacheAdd,w.onCacheAdd)),onCacheChange:ic(v),onCacheHit:ic(zs(p,y.onCacheHit,w.onCacheHit)),transformKey:O}),A=_$(t,T),I=gP(A,{expirations:u,options:s,originalFunction:t});return g&&(I=TP(I)),b$(I,t.name,n.profileName),I};Dt.clearStats=w$;Dt.collectStats=uP;Dt.compose=function(){return Gh.apply(void 0,arguments)||Dt};Dt.deep=Dt({isDeepEqual:!0});Dt.getStats=qh;Dt.infinite=Dt({maxSize:1/0});Dt.isCollectingStats=function(){return Or.isCollectingStats};Dt.isMoized=function(t){return typeof t=="function"&&!!t.isMoized};Dt.matchesArg=function(e){return Dt({matchesArg:e})};Dt.matchesKey=function(e){return Dt({matchesKey:e})};function PP(e,t){if(t===!0)return Dt({maxAge:e,updateExpire:t});if(typeof t=="object"){var r=t.onExpire,n=t.updateExpire;return Dt({maxAge:e,onExpire:r,updateExpire:n})}return Dt(typeof t=="function"?{maxAge:e,onExpire:t,updateExpire:!0}:{maxAge:e})}Dt.maxAge=PP;Dt.maxArgs=function(e){return Dt({maxArgs:e})};Dt.maxSize=function(e){return Dt({maxSize:e})};Dt.profile=function(e){return Dt({profileName:e})};Dt.promise=Dt({isPromise:!0,updateExpire:!0});Dt.react=Dt({isReact:!0});Dt.serialize=Dt({isSerialized:!0});Dt.serializeWith=function(e){return Dt({isSerialized:!0,serializer:e})};Dt.shallow=Dt({isShallowEqual:!0});Dt.transformArgs=function(e){return Dt({transformArgs:e})};Dt.updateCacheForKey=function(e){return Dt({updateCacheForKey:e})};Object.defineProperty(Dt,"default",{configurable:!1,enumerable:!1,value:Dt,writable:!1});function xP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w0(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 S0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w0(Object(r),!0).forEach(function(n){xP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var E0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sc=function(){return Math.random().toString(36).substring(7).split("").join(".")},C0={INIT:"@@redux/INIT"+sc(),REPLACE:"@@redux/REPLACE"+sc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sc()}};function IP(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function S$(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(wr(0));if(typeof t=="function"&&typeof r=="undefined"&&(r=t,t=void 0),typeof r!="undefined"){if(typeof r!="function")throw new Error(wr(1));return r(S$)(e,t)}if(typeof e!="function")throw new Error(wr(2));var a=e,i=t,s=[],u=s,f=!1;function c(){u===s&&(u=s.slice())}function h(){if(f)throw new Error(wr(3));return i}function v(m){if(typeof m!="function")throw new Error(wr(4));if(f)throw new Error(wr(5));var b=!0;return c(),u.push(m),function(){if(!!b){if(f)throw new Error(wr(6));b=!1,c();var w=u.indexOf(m);u.splice(w,1),s=null}}}function p(m){if(!IP(m))throw new Error(wr(7));if(typeof m.type=="undefined")throw new Error(wr(8));if(f)throw new Error(wr(9));try{f=!0,i=a(i,m)}finally{f=!1}for(var b=s=u,y=0;y<b.length;y++){var w=b[y];w()}return m}function g(m){if(typeof m!="function")throw new Error(wr(10));a=m,p({type:C0.REPLACE})}function _(){var m,b=v;return m={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(wr(11));function O(){w.next&&w.next(h())}O();var T=b(O);return{unsubscribe:T}}},m[E0]=function(){return this},m}return p({type:C0.INIT}),n={dispatch:p,subscribe:v,getState:h,replaceReducer:g},n[E0]=_,n}function DP(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function RP(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(wr(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(f){return f(s)});return i=DP.apply(void 0,u)(a.dispatch),S0(S0({},a),{},{dispatch:i})}}}var BP=typeof global=="object"&&global&&global.Object===Object&&global,E$=BP,LP=typeof self=="object"&&self&&self.Object===Object&&self,FP=E$||LP||Function("return this")(),Cn=FP,zP=Cn.Symbol,mn=zP,C$=Object.prototype,GP=C$.hasOwnProperty,NP=C$.toString,As=mn?mn.toStringTag:void 0;function jP(e){var t=GP.call(e,As),r=e[As];try{e[As]=void 0;var n=!0}catch{}var a=NP.call(e);return n&&(t?e[As]=r:delete e[As]),a}var qP=Object.prototype,UP=qP.toString;function kP(e){return UP.call(e)}var HP="[object Null]",WP="[object Undefined]",O0=mn?mn.toStringTag:void 0;function Za(e){return e==null?e===void 0?WP:HP:O0&&O0 in Object(e)?jP(e):kP(e)}function _a(e){return e!=null&&typeof e=="object"}var KP="[object Symbol]";function kh(e){return typeof e=="symbol"||_a(e)&&Za(e)==KP}function Hh(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var YP=Array.isArray,Ar=YP,XP=1/0,A0=mn?mn.prototype:void 0,T0=A0?A0.toString:void 0;function O$(e){if(typeof e=="string")return e;if(Ar(e))return Hh(e,O$)+"";if(kh(e))return T0?T0.call(e):"";var t=e+"";return t=="0"&&1/e==-XP?"-0":t}function Ea(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Wh(e){return e}var VP="[object AsyncFunction]",ZP="[object Function]",JP="[object GeneratorFunction]",QP="[object Proxy]";function Kh(e){if(!Ea(e))return!1;var t=Za(e);return t==ZP||t==JP||t==VP||t==QP}var tx=Cn["__core-js_shared__"],oc=tx,M0=function(){var e=/[^.]+$/.exec(oc&&oc.keys&&oc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ex(e){return!!M0&&M0 in e}var rx=Function.prototype,nx=rx.toString;function Ja(e){if(e!=null){try{return nx.call(e)}catch{}try{return e+""}catch{}}return""}var ax=/[\\^$.*+?()[\]{}|]/g,ix=/^\[object .+?Constructor\]$/,sx=Function.prototype,ox=Object.prototype,ux=sx.toString,fx=ox.hasOwnProperty,lx=RegExp("^"+ux.call(fx).replace(ax,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cx(e){if(!Ea(e)||ex(e))return!1;var t=Kh(e)?lx:ix;return t.test(Ja(e))}function hx(e,t){return e==null?void 0:e[t]}function Qa(e,t){var r=hx(e,t);return cx(r)?r:void 0}var vx=Qa(Cn,"WeakMap"),Dc=vx,P0=Object.create,px=function(){function e(){}return function(t){if(!Ea(t))return{};if(P0)return P0(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),dx=px;function gx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function _x(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var mx=800,$x=16,bx=Date.now;function yx(e){var t=0,r=0;return function(){var n=bx(),a=$x-(n-r);if(r=n,a>0){if(++t>=mx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wx(e){return function(){return e}}var Sx=function(){try{var e=Qa(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Lu=Sx,Ex=Lu?function(e,t){return Lu(e,"toString",{configurable:!0,enumerable:!1,value:wx(t),writable:!0})}:Wh,Cx=Ex,Ox=yx(Cx),Ax=Ox;function Tx(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function Mx(e){return e!==e}function Px(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function xx(e,t,r){return t===t?Px(e,t,r):Tx(e,Mx,r)}function Ix(e,t){var r=e==null?0:e.length;return!!r&&xx(e,t,0)>-1}var Dx=9007199254740991,Rx=/^(?:0|[1-9]\d*)$/;function Yh(e,t){var r=typeof e;return t=t==null?Dx:t,!!t&&(r=="number"||r!="symbol"&&Rx.test(e))&&e>-1&&e%1==0&&e<t}function Zu(e,t,r){t=="__proto__"&&Lu?Lu(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function oo(e,t){return e===t||e!==e&&t!==t}var Bx=Object.prototype,Lx=Bx.hasOwnProperty;function Fx(e,t,r){var n=e[t];(!(Lx.call(e,t)&&oo(n,r))||r===void 0&&!(t in e))&&Zu(e,t,r)}function zx(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],f=n?n(r[u],e[u],u,r,e):void 0;f===void 0&&(f=e[u]),a?Zu(r,u,f):Fx(r,u,f)}return r}var x0=Math.max;function Gx(e,t,r){return t=x0(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=x0(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=n[a];return u[t]=r(s),gx(e,this,u)}}function A$(e,t){return Ax(Gx(e,t,Wh),e+"")}var Nx=9007199254740991;function Xh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Nx}function Ui(e){return e!=null&&Xh(e.length)&&!Kh(e)}function jx(e,t,r){if(!Ea(r))return!1;var n=typeof t;return(n=="number"?Ui(r)&&Yh(t,r.length):n=="string"&&t in r)?oo(r[t],e):!1}function qx(e){return A$(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&jx(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n<a;){var u=r[n];u&&e(t,u,n,i)}return t})}var Ux=Object.prototype;function Vh(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ux;return e===r}function kx(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Hx="[object Arguments]";function I0(e){return _a(e)&&Za(e)==Hx}var T$=Object.prototype,Wx=T$.hasOwnProperty,Kx=T$.propertyIsEnumerable,Yx=I0(function(){return arguments}())?I0:function(e){return _a(e)&&Wx.call(e,"callee")&&!Kx.call(e,"callee")},Hs=Yx;function Xx(){return!1}var M$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D0=M$&&typeof module=="object"&&module&&!module.nodeType&&module,Vx=D0&&D0.exports===M$,R0=Vx?Cn.Buffer:void 0,Zx=R0?R0.isBuffer:void 0,Jx=Zx||Xx,Fu=Jx,Qx="[object Arguments]",tI="[object Array]",eI="[object Boolean]",rI="[object Date]",nI="[object Error]",aI="[object Function]",iI="[object Map]",sI="[object Number]",oI="[object Object]",uI="[object RegExp]",fI="[object Set]",lI="[object String]",cI="[object WeakMap]",hI="[object ArrayBuffer]",vI="[object DataView]",pI="[object Float32Array]",dI="[object Float64Array]",gI="[object Int8Array]",_I="[object Int16Array]",mI="[object Int32Array]",$I="[object Uint8Array]",bI="[object Uint8ClampedArray]",yI="[object Uint16Array]",wI="[object Uint32Array]",Ce={};Ce[pI]=Ce[dI]=Ce[gI]=Ce[_I]=Ce[mI]=Ce[$I]=Ce[bI]=Ce[yI]=Ce[wI]=!0;Ce[Qx]=Ce[tI]=Ce[hI]=Ce[eI]=Ce[vI]=Ce[rI]=Ce[nI]=Ce[aI]=Ce[iI]=Ce[sI]=Ce[oI]=Ce[uI]=Ce[fI]=Ce[lI]=Ce[cI]=!1;function SI(e){return _a(e)&&Xh(e.length)&&!!Ce[Za(e)]}function P$(e){return function(t){return e(t)}}var x$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gs=x$&&typeof module=="object"&&module&&!module.nodeType&&module,EI=Gs&&Gs.exports===x$,uc=EI&&E$.process,CI=function(){try{var e=Gs&&Gs.require&&Gs.require("util").types;return e||uc&&uc.binding&&uc.binding("util")}catch{}}(),B0=CI,L0=B0&&B0.isTypedArray,OI=L0?P$(L0):SI,Zh=OI,AI=Object.prototype,TI=AI.hasOwnProperty;function I$(e,t){var r=Ar(e),n=!r&&Hs(e),a=!r&&!n&&Fu(e),i=!r&&!n&&!a&&Zh(e),s=r||n||a||i,u=s?kx(e.length,String):[],f=u.length;for(var c in e)(t||TI.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Yh(c,f)))&&u.push(c);return u}function D$(e,t){return function(r){return e(t(r))}}var MI=D$(Object.keys,Object),PI=MI,xI=Object.prototype,II=xI.hasOwnProperty;function DI(e){if(!Vh(e))return PI(e);var t=[];for(var r in Object(e))II.call(e,r)&&r!="constructor"&&t.push(r);return t}function Jh(e){return Ui(e)?I$(e):DI(e)}function RI(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var BI=Object.prototype,LI=BI.hasOwnProperty;function FI(e){if(!Ea(e))return RI(e);var t=Vh(e),r=[];for(var n in e)n=="constructor"&&(t||!LI.call(e,n))||r.push(n);return r}function R$(e){return Ui(e)?I$(e,!0):FI(e)}var zI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GI=/^\w*$/;function Qh(e,t){if(Ar(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||kh(e)?!0:GI.test(e)||!zI.test(e)||t!=null&&e in Object(t)}var NI=Qa(Object,"create"),Ws=NI;function jI(){this.__data__=Ws?Ws(null):{},this.size=0}function qI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var UI="__lodash_hash_undefined__",kI=Object.prototype,HI=kI.hasOwnProperty;function WI(e){var t=this.__data__;if(Ws){var r=t[e];return r===UI?void 0:r}return HI.call(t,e)?t[e]:void 0}var KI=Object.prototype,YI=KI.hasOwnProperty;function XI(e){var t=this.__data__;return Ws?t[e]!==void 0:YI.call(t,e)}var VI="__lodash_hash_undefined__";function ZI(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ws&&t===void 0?VI:t,this}function Xa(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xa.prototype.clear=jI;Xa.prototype.delete=qI;Xa.prototype.get=WI;Xa.prototype.has=XI;Xa.prototype.set=ZI;function JI(){this.__data__=[],this.size=0}function Ju(e,t){for(var r=e.length;r--;)if(oo(e[r][0],t))return r;return-1}var QI=Array.prototype,tD=QI.splice;function eD(e){var t=this.__data__,r=Ju(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tD.call(t,r,1),--this.size,!0}function rD(e){var t=this.__data__,r=Ju(t,e);return r<0?void 0:t[r][1]}function nD(e){return Ju(this.__data__,e)>-1}function aD(e,t){var r=this.__data__,n=Ju(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Kn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Kn.prototype.clear=JI;Kn.prototype.delete=eD;Kn.prototype.get=rD;Kn.prototype.has=nD;Kn.prototype.set=aD;var iD=Qa(Cn,"Map"),Ks=iD;function sD(){this.size=0,this.__data__={hash:new Xa,map:new(Ks||Kn),string:new Xa}}function oD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qu(e,t){var r=e.__data__;return oD(t)?r[typeof t=="string"?"string":"hash"]:r.map}function uD(e){var t=Qu(this,e).delete(e);return this.size-=t?1:0,t}function fD(e){return Qu(this,e).get(e)}function lD(e){return Qu(this,e).has(e)}function cD(e,t){var r=Qu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Yn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yn.prototype.clear=sD;Yn.prototype.delete=uD;Yn.prototype.get=fD;Yn.prototype.has=lD;Yn.prototype.set=cD;var hD="Expected a function";function tv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hD);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(tv.Cache||Yn),r}tv.Cache=Yn;var vD=500;function pD(e){var t=tv(e,function(n){return r.size===vD&&r.clear(),n}),r=t.cache;return t}var dD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gD=/\\(\\)?/g,_D=pD(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dD,function(r,n,a,i){t.push(a?i.replace(gD,"$1"):n||r)}),t}),mD=_D;function $D(e){return e==null?"":O$(e)}function B$(e,t){return Ar(e)?e:Qh(e,t)?[e]:mD($D(e))}var bD=1/0;function tf(e){if(typeof e=="string"||kh(e))return e;var t=e+"";return t=="0"&&1/e==-bD?"-0":t}function L$(e,t){t=B$(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[tf(t[r++])];return r&&r==n?e:void 0}function ev(e,t,r){var n=e==null?void 0:L$(e,t);return n===void 0?r:n}function F$(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var F0=mn?mn.isConcatSpreadable:void 0;function yD(e){return Ar(e)||Hs(e)||!!(F0&&e&&e[F0])}function z$(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=yD),a||(a=[]);++i<s;){var u=e[i];t>0&&r(u)?t>1?z$(u,t-1,r,n,a):F$(a,u):n||(a[a.length]=u)}return a}var wD=D$(Object.getPrototypeOf,Object),G$=wD,SD="[object Object]",ED=Function.prototype,CD=Object.prototype,N$=ED.toString,OD=CD.hasOwnProperty,AD=N$.call(Object);function TD(e){if(!_a(e)||Za(e)!=SD)return!1;var t=G$(e);if(t===null)return!0;var r=OD.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&N$.call(r)==AD}function MD(){this.__data__=new Kn,this.size=0}function PD(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function xD(e){return this.__data__.get(e)}function ID(e){return this.__data__.has(e)}var DD=200;function RD(e,t){var r=this.__data__;if(r instanceof Kn){var n=r.__data__;if(!Ks||n.length<DD-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yn(n)}return r.set(e,t),this.size=r.size,this}function vn(e){var t=this.__data__=new Kn(e);this.size=t.size}vn.prototype.clear=MD;vn.prototype.delete=PD;vn.prototype.get=xD;vn.prototype.has=ID;vn.prototype.set=RD;var j$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,z0=j$&&typeof module=="object"&&module&&!module.nodeType&&module,BD=z0&&z0.exports===j$,G0=BD?Cn.Buffer:void 0,N0=G0?G0.allocUnsafe:void 0;function LD(e,t){if(t)return e.slice();var r=e.length,n=N0?N0(r):new e.constructor(r);return e.copy(n),n}function FD(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}function zD(){return[]}var GD=Object.prototype,ND=GD.propertyIsEnumerable,j0=Object.getOwnPropertySymbols,jD=j0?function(e){return e==null?[]:(e=Object(e),FD(j0(e),function(t){return ND.call(e,t)}))}:zD,qD=jD;function UD(e,t,r){var n=t(e);return Ar(e)?n:F$(n,r(e))}function q0(e){return UD(e,Jh,qD)}var kD=Qa(Cn,"DataView"),Rc=kD,HD=Qa(Cn,"Promise"),Bc=HD,WD=Qa(Cn,"Set"),Lc=WD,U0="[object Map]",KD="[object Object]",k0="[object Promise]",H0="[object Set]",W0="[object WeakMap]",K0="[object DataView]",YD=Ja(Rc),XD=Ja(Ks),VD=Ja(Bc),ZD=Ja(Lc),JD=Ja(Dc),Ga=Za;(Rc&&Ga(new Rc(new ArrayBuffer(1)))!=K0||Ks&&Ga(new Ks)!=U0||Bc&&Ga(Bc.resolve())!=k0||Lc&&Ga(new Lc)!=H0||Dc&&Ga(new Dc)!=W0)&&(Ga=function(e){var t=Za(e),r=t==KD?e.constructor:void 0,n=r?Ja(r):"";if(n)switch(n){case YD:return K0;case XD:return U0;case VD:return k0;case ZD:return H0;case JD:return W0}return t});var Y0=Ga,QD=Cn.Uint8Array,zu=QD;function t3(e){var t=new e.constructor(e.byteLength);return new zu(t).set(new zu(e)),t}function e3(e,t){var r=t?t3(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function r3(e){return typeof e.constructor=="function"&&!Vh(e)?dx(G$(e)):{}}var n3="__lodash_hash_undefined__";function a3(e){return this.__data__.set(e,n3),this}function i3(e){return this.__data__.has(e)}function Ys(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yn;++t<r;)this.add(e[t])}Ys.prototype.add=Ys.prototype.push=a3;Ys.prototype.has=i3;function s3(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function q$(e,t){return e.has(t)}var o3=1,u3=2;function U$(e,t,r,n,a,i){var s=r&o3,u=e.length,f=t.length;if(u!=f&&!(s&&f>u))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var v=-1,p=!0,g=r&u3?new Ys:void 0;for(i.set(e,t),i.set(t,e);++v<u;){var _=e[v],m=t[v];if(n)var b=s?n(m,_,v,t,e,i):n(_,m,v,e,t,i);if(b!==void 0){if(b)continue;p=!1;break}if(g){if(!s3(t,function(y,w){if(!q$(g,w)&&(_===y||a(_,y,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(_===m||a(_,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function f3(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function l3(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var c3=1,h3=2,v3="[object Boolean]",p3="[object Date]",d3="[object Error]",g3="[object Map]",_3="[object Number]",m3="[object RegExp]",$3="[object Set]",b3="[object String]",y3="[object Symbol]",w3="[object ArrayBuffer]",S3="[object DataView]",X0=mn?mn.prototype:void 0,fc=X0?X0.valueOf:void 0;function E3(e,t,r,n,a,i,s){switch(r){case S3:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w3:return!(e.byteLength!=t.byteLength||!i(new zu(e),new zu(t)));case v3:case p3:case _3:return oo(+e,+t);case d3:return e.name==t.name&&e.message==t.message;case m3:case b3:return e==t+"";case g3:var u=f3;case $3:var f=n&c3;if(u||(u=l3),e.size!=t.size&&!f)return!1;var c=s.get(e);if(c)return c==t;n|=h3,s.set(e,t);var h=U$(u(e),u(t),n,a,i,s);return s.delete(e),h;case y3:if(fc)return fc.call(e)==fc.call(t)}return!1}var C3=1,O3=Object.prototype,A3=O3.hasOwnProperty;function T3(e,t,r,n,a,i){var s=r&C3,u=q0(e),f=u.length,c=q0(t),h=c.length;if(f!=h&&!s)return!1;for(var v=f;v--;){var p=u[v];if(!(s?p in t:A3.call(t,p)))return!1}var g=i.get(e),_=i.get(t);if(g&&_)return g==t&&_==e;var m=!0;i.set(e,t),i.set(t,e);for(var b=s;++v<f;){p=u[v];var y=e[p],w=t[p];if(n)var O=s?n(w,y,p,t,e,i):n(y,w,p,e,t,i);if(!(O===void 0?y===w||a(y,w,r,n,i):O)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var T=e.constructor,A=t.constructor;T!=A&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof A=="function"&&A instanceof A)&&(m=!1)}return i.delete(e),i.delete(t),m}var M3=1,V0="[object Arguments]",Z0="[object Array]",du="[object Object]",P3=Object.prototype,J0=P3.hasOwnProperty;function x3(e,t,r,n,a,i){var s=Ar(e),u=Ar(t),f=s?Z0:Y0(e),c=u?Z0:Y0(t);f=f==V0?du:f,c=c==V0?du:c;var h=f==du,v=c==du,p=f==c;if(p&&Fu(e)){if(!Fu(t))return!1;s=!0,h=!1}if(p&&!h)return i||(i=new vn),s||Zh(e)?U$(e,t,r,n,a,i):E3(e,t,f,r,n,a,i);if(!(r&M3)){var g=h&&J0.call(e,"__wrapped__"),_=v&&J0.call(t,"__wrapped__");if(g||_){var m=g?e.value():e,b=_?t.value():t;return i||(i=new vn),a(m,b,r,n,i)}}return p?(i||(i=new vn),T3(e,t,r,n,a,i)):!1}function rv(e,t,r,n,a){return e===t?!0:e==null||t==null||!_a(e)&&!_a(t)?e!==e&&t!==t:x3(e,t,r,n,rv,a)}var I3=1,D3=2;function R3(e,t,r,n){var a=r.length,i=a,s=!n;if(e==null)return!i;for(e=Object(e);a--;){var u=r[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){u=r[a];var f=u[0],c=e[f],h=u[1];if(s&&u[2]){if(c===void 0&&!(f in e))return!1}else{var v=new vn;if(n)var p=n(c,h,f,e,t,v);if(!(p===void 0?rv(h,c,I3|D3,n,v):p))return!1}}return!0}function k$(e){return e===e&&!Ea(e)}function B3(e){for(var t=Jh(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,k$(a)]}return t}function H$(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function L3(e){var t=B3(e);return t.length==1&&t[0][2]?H$(t[0][0],t[0][1]):function(r){return r===e||R3(r,e,t)}}function F3(e,t){return e!=null&&t in Object(e)}function z3(e,t,r){t=B$(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var s=tf(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&Xh(a)&&Yh(s,a)&&(Ar(e)||Hs(e)))}function G3(e,t){return e!=null&&z3(e,t,F3)}var N3=1,j3=2;function q3(e,t){return Qh(e)&&k$(t)?H$(tf(e),t):function(r){var n=ev(r,e);return n===void 0&&n===t?G3(r,e):rv(t,n,N3|j3)}}function U3(e){return function(t){return t==null?void 0:t[e]}}function k3(e){return function(t){return L$(t,e)}}function H3(e){return Qh(e)?U3(tf(e)):k3(e)}function W$(e){return typeof e=="function"?e:e==null?Wh:typeof e=="object"?Ar(e)?q3(e[0],e[1]):L3(e):H3(e)}function W3(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),u=s.length;u--;){var f=s[e?u:++a];if(r(i[f],f,i)===!1)break}return t}}var K3=W3(),K$=K3;function Y$(e,t){return e&&K$(e,t,Jh)}function Y3(e,t){return function(r,n){if(r==null)return r;if(!Ui(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}var X3=Y3(Y$),V3=X3;function Fc(e,t,r){(r!==void 0&&!oo(e[t],r)||r===void 0&&!(t in e))&&Zu(e,t,r)}function zc(e){return _a(e)&&Ui(e)}function Gc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Z3(e){return zx(e,R$(e))}function J3(e,t,r,n,a,i,s){var u=Gc(e,r),f=Gc(t,r),c=s.get(f);if(c){Fc(e,r,c);return}var h=i?i(u,f,r+"",e,t,s):void 0,v=h===void 0;if(v){var p=Ar(f),g=!p&&Fu(f),_=!p&&!g&&Zh(f);h=f,p||g||_?Ar(u)?h=u:zc(u)?h=_x(u):g?(v=!1,h=LD(f,!0)):_?(v=!1,h=e3(f,!0)):h=[]:TD(f)||Hs(f)?(h=u,Hs(u)?h=Z3(u):(!Ea(u)||Kh(u))&&(h=r3(f))):v=!1}v&&(s.set(f,h),a(h,f,n,i,s),s.delete(f)),Fc(e,r,h)}function X$(e,t,r,n,a){e!==t&&K$(t,function(i,s){if(a||(a=new vn),Ea(i))J3(e,t,s,r,X$,n,a);else{var u=n?n(Gc(e,s),i,s+"",e,t,a):void 0;u===void 0&&(u=i),Fc(e,s,u)}},R$)}function Q3(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var tR=200;function eR(e,t,r,n){var a=-1,i=Ix,s=!0,u=e.length,f=[],c=t.length;if(!u)return f;r&&(t=Hh(t,P$(r))),n?(i=Q3,s=!1):t.length>=tR&&(i=q$,s=!1,t=new Ys(t));t:for(;++a<u;){var h=e[a],v=r==null?h:r(h);if(h=n||h!==0?h:0,s&&v===v){for(var p=c;p--;)if(t[p]===v)continue t;f.push(h)}else i(t,v,n)||f.push(h)}return f}var rR=A$(function(e,t){return zc(e)?eR(e,z$(t,1,zc,!0)):[]}),Q0=rR;function nR(e,t){var r=-1,n=Ui(e)?Array(e.length):[];return V3(e,function(a,i,s){n[++r]=t(a,i,s)}),n}function V$(e,t){var r=Ar(e)?Hh:nR;return r(e,W$(t))}function Un(e,t){var r={};return t=W$(t),Y$(e,function(n,a,i){Zu(r,a,t(n,a,i))}),r}var aR=qx(function(e,t,r){X$(e,t,r)}),Nc=aR,Er=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},iR=typeof Er=="object"&&Er&&Er.Object===Object&&Er,Z$=iR,sR=Z$,oR=typeof self=="object"&&self&&self.Object===Object&&self,uR=sR||oR||Function("return this")(),On=uR,fR=On,lR=fR.Symbol,ki=lR,t1=ki,J$=Object.prototype,cR=J$.hasOwnProperty,hR=J$.toString,Ts=t1?t1.toStringTag:void 0;function vR(e){var t=cR.call(e,Ts),r=e[Ts];try{e[Ts]=void 0;var n=!0}catch{}var a=hR.call(e);return n&&(t?e[Ts]=r:delete e[Ts]),a}var pR=vR,dR=Object.prototype,gR=dR.toString;function _R(e){return gR.call(e)}var mR=_R,e1=ki,$R=pR,bR=mR,yR="[object Null]",wR="[object Undefined]",r1=e1?e1.toStringTag:void 0;function SR(e){return e==null?e===void 0?wR:yR:r1&&r1 in Object(e)?$R(e):bR(e)}var Hi=SR;function ER(e,t){return function(r){return e(t(r))}}var Q$=ER,CR=Q$,OR=CR(Object.getPrototypeOf,Object),nv=OR;function AR(e){return e!=null&&typeof e=="object"}var Ca=AR,TR=Hi,MR=nv,PR=Ca,xR="[object Object]",IR=Function.prototype,DR=Object.prototype,tb=IR.toString,RR=DR.hasOwnProperty,BR=tb.call(Object);function LR(e){if(!PR(e)||TR(e)!=xR)return!1;var t=MR(e);if(t===null)return!0;var r=RR.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&tb.call(r)==BR}var av=LR;function FR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}var eb=FR;function zR(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),u=s.length;u--;){var f=s[e?u:++a];if(r(i[f],f,i)===!1)break}return t}}var GR=zR,NR=GR,jR=NR(),qR=jR;function UR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kR=UR,HR=Hi,WR=Ca,KR="[object Arguments]";function YR(e){return WR(e)&&HR(e)==KR}var XR=YR,n1=XR,VR=Ca,rb=Object.prototype,ZR=rb.hasOwnProperty,JR=rb.propertyIsEnumerable,QR=n1(function(){return arguments}())?n1:function(e){return VR(e)&&ZR.call(e,"callee")&&!JR.call(e,"callee")},iv=QR,t4=Array.isArray,Pr=t4,Xs={exports:{}};function e4(){return!1}var r4=e4;(function(e,t){var r=On,n=r4,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,u=s?r.Buffer:void 0,f=u?u.isBuffer:void 0,c=f||n;e.exports=c})(Xs,Xs.exports);var n4=9007199254740991,a4=/^(?:0|[1-9]\d*)$/;function i4(e,t){var r=typeof e;return t=t==null?n4:t,!!t&&(r=="number"||r!="symbol"&&a4.test(e))&&e>-1&&e%1==0&&e<t}var sv=i4,s4=9007199254740991;function o4(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s4}var ov=o4,u4=Hi,f4=ov,l4=Ca,c4="[object Arguments]",h4="[object Array]",v4="[object Boolean]",p4="[object Date]",d4="[object Error]",g4="[object Function]",_4="[object Map]",m4="[object Number]",$4="[object Object]",b4="[object RegExp]",y4="[object Set]",w4="[object String]",S4="[object WeakMap]",E4="[object ArrayBuffer]",C4="[object DataView]",O4="[object Float32Array]",A4="[object Float64Array]",T4="[object Int8Array]",M4="[object Int16Array]",P4="[object Int32Array]",x4="[object Uint8Array]",I4="[object Uint8ClampedArray]",D4="[object Uint16Array]",R4="[object Uint32Array]",Oe={};Oe[O4]=Oe[A4]=Oe[T4]=Oe[M4]=Oe[P4]=Oe[x4]=Oe[I4]=Oe[D4]=Oe[R4]=!0;Oe[c4]=Oe[h4]=Oe[E4]=Oe[v4]=Oe[C4]=Oe[p4]=Oe[d4]=Oe[g4]=Oe[_4]=Oe[m4]=Oe[$4]=Oe[b4]=Oe[y4]=Oe[w4]=Oe[S4]=!1;function B4(e){return l4(e)&&f4(e.length)&&!!Oe[u4(e)]}var L4=B4;function F4(e){return function(t){return e(t)}}var uv=F4,Vs={exports:{}};(function(e,t){var r=Z$,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var f=a&&a.require&&a.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(Vs,Vs.exports);var z4=L4,G4=uv,a1=Vs.exports,i1=a1&&a1.isTypedArray,N4=i1?G4(i1):z4,nb=N4,j4=kR,q4=iv,U4=Pr,k4=Xs.exports,H4=sv,W4=nb,K4=Object.prototype,Y4=K4.hasOwnProperty;function X4(e,t){var r=U4(e),n=!r&&q4(e),a=!r&&!n&&k4(e),i=!r&&!n&&!a&&W4(e),s=r||n||a||i,u=s?j4(e.length,String):[],f=u.length;for(var c in e)(t||Y4.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||H4(c,f)))&&u.push(c);return u}var ab=X4,V4=Object.prototype;function Z4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||V4;return e===r}var fv=Z4,J4=Q$,Q4=J4(Object.keys,Object),tB=Q4,eB=fv,rB=tB,nB=Object.prototype,aB=nB.hasOwnProperty;function iB(e){if(!eB(e))return rB(e);var t=[];for(var r in Object(e))aB.call(e,r)&&r!="constructor"&&t.push(r);return t}var sB=iB;function oB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ti=oB,uB=Hi,fB=ti,lB="[object AsyncFunction]",cB="[object Function]",hB="[object GeneratorFunction]",vB="[object Proxy]";function pB(e){if(!fB(e))return!1;var t=uB(e);return t==cB||t==hB||t==lB||t==vB}var ib=pB,dB=ib,gB=ov;function _B(e){return e!=null&&gB(e.length)&&!dB(e)}var ef=_B,mB=ab,$B=sB,bB=ef;function yB(e){return bB(e)?mB(e):$B(e)}var uo=yB,wB=qR,SB=uo;function EB(e,t){return e&&wB(e,t,SB)}var sb=EB,CB=ef;function OB(e,t){return function(r,n){if(r==null)return r;if(!CB(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}var AB=OB,TB=sb,MB=AB,PB=MB(TB),lv=PB,xB=lv;function IB(e,t){var r=[];return xB(e,function(n,a,i){t(n,a,i)&&r.push(n)}),r}var DB=IB;function RB(){this.__data__=[],this.size=0}var BB=RB;function LB(e,t){return e===t||e!==e&&t!==t}var cv=LB,FB=cv;function zB(e,t){for(var r=e.length;r--;)if(FB(e[r][0],t))return r;return-1}var rf=zB,GB=rf,NB=Array.prototype,jB=NB.splice;function qB(e){var t=this.__data__,r=GB(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():jB.call(t,r,1),--this.size,!0}var UB=qB,kB=rf;function HB(e){var t=this.__data__,r=kB(t,e);return r<0?void 0:t[r][1]}var WB=HB,KB=rf;function YB(e){return KB(this.__data__,e)>-1}var XB=YB,VB=rf;function ZB(e,t){var r=this.__data__,n=VB(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var JB=ZB,QB=BB,tL=UB,eL=WB,rL=XB,nL=JB;function Wi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wi.prototype.clear=QB;Wi.prototype.delete=tL;Wi.prototype.get=eL;Wi.prototype.has=rL;Wi.prototype.set=nL;var nf=Wi,aL=nf;function iL(){this.__data__=new aL,this.size=0}var sL=iL;function oL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var uL=oL;function fL(e){return this.__data__.get(e)}var lL=fL;function cL(e){return this.__data__.has(e)}var hL=cL,vL=On,pL=vL["__core-js_shared__"],dL=pL,lc=dL,s1=function(){var e=/[^.]+$/.exec(lc&&lc.keys&&lc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gL(e){return!!s1&&s1 in e}var _L=gL,mL=Function.prototype,$L=mL.toString;function bL(e){if(e!=null){try{return $L.call(e)}catch{}try{return e+""}catch{}}return""}var ob=bL,yL=ib,wL=_L,SL=ti,EL=ob,CL=/[\\^$.*+?()[\]{}|]/g,OL=/^\[object .+?Constructor\]$/,AL=Function.prototype,TL=Object.prototype,ML=AL.toString,PL=TL.hasOwnProperty,xL=RegExp("^"+ML.call(PL).replace(CL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IL(e){if(!SL(e)||wL(e))return!1;var t=yL(e)?xL:OL;return t.test(EL(e))}var DL=IL;function RL(e,t){return e==null?void 0:e[t]}var BL=RL,LL=DL,FL=BL;function zL(e,t){var r=FL(e,t);return LL(r)?r:void 0}var ei=zL,GL=ei,NL=On,jL=GL(NL,"Map"),hv=jL,qL=ei,UL=qL(Object,"create"),af=UL,o1=af;function kL(){this.__data__=o1?o1(null):{},this.size=0}var HL=kL;function WL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KL=WL,YL=af,XL="__lodash_hash_undefined__",VL=Object.prototype,ZL=VL.hasOwnProperty;function JL(e){var t=this.__data__;if(YL){var r=t[e];return r===XL?void 0:r}return ZL.call(t,e)?t[e]:void 0}var QL=JL,tF=af,eF=Object.prototype,rF=eF.hasOwnProperty;function nF(e){var t=this.__data__;return tF?t[e]!==void 0:rF.call(t,e)}var aF=nF,iF=af,sF="__lodash_hash_undefined__";function oF(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=iF&&t===void 0?sF:t,this}var uF=oF,fF=HL,lF=KL,cF=QL,hF=aF,vF=uF;function Ki(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ki.prototype.clear=fF;Ki.prototype.delete=lF;Ki.prototype.get=cF;Ki.prototype.has=hF;Ki.prototype.set=vF;var pF=Ki,u1=pF,dF=nf,gF=hv;function _F(){this.size=0,this.__data__={hash:new u1,map:new(gF||dF),string:new u1}}var mF=_F;function $F(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var bF=$F,yF=bF;function wF(e,t){var r=e.__data__;return yF(t)?r[typeof t=="string"?"string":"hash"]:r.map}var sf=wF,SF=sf;function EF(e){var t=SF(this,e).delete(e);return this.size-=t?1:0,t}var CF=EF,OF=sf;function AF(e){return OF(this,e).get(e)}var TF=AF,MF=sf;function PF(e){return MF(this,e).has(e)}var xF=PF,IF=sf;function DF(e,t){var r=IF(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var RF=DF,BF=mF,LF=CF,FF=TF,zF=xF,GF=RF;function Yi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yi.prototype.clear=BF;Yi.prototype.delete=LF;Yi.prototype.get=FF;Yi.prototype.has=zF;Yi.prototype.set=GF;var vv=Yi,NF=nf,jF=hv,qF=vv,UF=200;function kF(e,t){var r=this.__data__;if(r instanceof NF){var n=r.__data__;if(!jF||n.length<UF-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new qF(n)}return r.set(e,t),this.size=r.size,this}var HF=kF,WF=nf,KF=sL,YF=uL,XF=lL,VF=hL,ZF=HF;function Xi(e){var t=this.__data__=new WF(e);this.size=t.size}Xi.prototype.clear=KF;Xi.prototype.delete=YF;Xi.prototype.get=XF;Xi.prototype.has=VF;Xi.prototype.set=ZF;var pv=Xi,JF="__lodash_hash_undefined__";function QF(e){return this.__data__.set(e,JF),this}var tz=QF;function ez(e){return this.__data__.has(e)}var rz=ez,nz=vv,az=tz,iz=rz;function Gu(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new nz;++t<r;)this.add(e[t])}Gu.prototype.add=Gu.prototype.push=az;Gu.prototype.has=iz;var sz=Gu;function oz(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var uz=oz;function fz(e,t){return e.has(t)}var lz=fz,cz=sz,hz=uz,vz=lz,pz=1,dz=2;function gz(e,t,r,n,a,i){var s=r&pz,u=e.length,f=t.length;if(u!=f&&!(s&&f>u))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var v=-1,p=!0,g=r&dz?new cz:void 0;for(i.set(e,t),i.set(t,e);++v<u;){var _=e[v],m=t[v];if(n)var b=s?n(m,_,v,t,e,i):n(_,m,v,e,t,i);if(b!==void 0){if(b)continue;p=!1;break}if(g){if(!hz(t,function(y,w){if(!vz(g,w)&&(_===y||a(_,y,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(_===m||a(_,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var ub=gz,_z=On,mz=_z.Uint8Array,fb=mz;function $z(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var bz=$z;function yz(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var wz=yz,f1=ki,l1=fb,Sz=cv,Ez=ub,Cz=bz,Oz=wz,Az=1,Tz=2,Mz="[object Boolean]",Pz="[object Date]",xz="[object Error]",Iz="[object Map]",Dz="[object Number]",Rz="[object RegExp]",Bz="[object Set]",Lz="[object String]",Fz="[object Symbol]",zz="[object ArrayBuffer]",Gz="[object DataView]",c1=f1?f1.prototype:void 0,cc=c1?c1.valueOf:void 0;function Nz(e,t,r,n,a,i,s){switch(r){case Gz:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zz:return!(e.byteLength!=t.byteLength||!i(new l1(e),new l1(t)));case Mz:case Pz:case Dz:return Sz(+e,+t);case xz:return e.name==t.name&&e.message==t.message;case Rz:case Lz:return e==t+"";case Iz:var u=Cz;case Bz:var f=n&Az;if(u||(u=Oz),e.size!=t.size&&!f)return!1;var c=s.get(e);if(c)return c==t;n|=Tz,s.set(e,t);var h=Ez(u(e),u(t),n,a,i,s);return s.delete(e),h;case Fz:if(cc)return cc.call(e)==cc.call(t)}return!1}var jz=Nz;function qz(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var dv=qz,Uz=dv,kz=Pr;function Hz(e,t,r){var n=t(e);return kz(e)?n:Uz(n,r(e))}var lb=Hz;function Wz(){return[]}var cb=Wz,Kz=eb,Yz=cb,Xz=Object.prototype,Vz=Xz.propertyIsEnumerable,h1=Object.getOwnPropertySymbols,Zz=h1?function(e){return e==null?[]:(e=Object(e),Kz(h1(e),function(t){return Vz.call(e,t)}))}:Yz,gv=Zz,Jz=lb,Qz=gv,tG=uo;function eG(e){return Jz(e,tG,Qz)}var hb=eG,v1=hb,rG=1,nG=Object.prototype,aG=nG.hasOwnProperty;function iG(e,t,r,n,a,i){var s=r&rG,u=v1(e),f=u.length,c=v1(t),h=c.length;if(f!=h&&!s)return!1;for(var v=f;v--;){var p=u[v];if(!(s?p in t:aG.call(t,p)))return!1}var g=i.get(e),_=i.get(t);if(g&&_)return g==t&&_==e;var m=!0;i.set(e,t),i.set(t,e);for(var b=s;++v<f;){p=u[v];var y=e[p],w=t[p];if(n)var O=s?n(w,y,p,t,e,i):n(y,w,p,e,t,i);if(!(O===void 0?y===w||a(y,w,r,n,i):O)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var T=e.constructor,A=t.constructor;T!=A&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof A=="function"&&A instanceof A)&&(m=!1)}return i.delete(e),i.delete(t),m}var sG=iG,oG=ei,uG=On,fG=oG(uG,"DataView"),lG=fG,cG=ei,hG=On,vG=cG(hG,"Promise"),pG=vG,dG=ei,gG=On,_G=dG(gG,"Set"),mG=_G,$G=ei,bG=On,yG=$G(bG,"WeakMap"),wG=yG,jc=lG,qc=hv,Uc=pG,kc=mG,Hc=wG,vb=Hi,Vi=ob,p1="[object Map]",SG="[object Object]",d1="[object Promise]",g1="[object Set]",_1="[object WeakMap]",m1="[object DataView]",EG=Vi(jc),CG=Vi(qc),OG=Vi(Uc),AG=Vi(kc),TG=Vi(Hc),Na=vb;(jc&&Na(new jc(new ArrayBuffer(1)))!=m1||qc&&Na(new qc)!=p1||Uc&&Na(Uc.resolve())!=d1||kc&&Na(new kc)!=g1||Hc&&Na(new Hc)!=_1)&&(Na=function(e){var t=vb(e),r=t==SG?e.constructor:void 0,n=r?Vi(r):"";if(n)switch(n){case EG:return m1;case CG:return p1;case OG:return d1;case AG:return g1;case TG:return _1}return t});var of=Na,hc=pv,MG=ub,PG=jz,xG=sG,$1=of,b1=Pr,y1=Xs.exports,IG=nb,DG=1,w1="[object Arguments]",S1="[object Array]",gu="[object Object]",RG=Object.prototype,E1=RG.hasOwnProperty;function BG(e,t,r,n,a,i){var s=b1(e),u=b1(t),f=s?S1:$1(e),c=u?S1:$1(t);f=f==w1?gu:f,c=c==w1?gu:c;var h=f==gu,v=c==gu,p=f==c;if(p&&y1(e)){if(!y1(t))return!1;s=!0,h=!1}if(p&&!h)return i||(i=new hc),s||IG(e)?MG(e,t,r,n,a,i):PG(e,t,f,r,n,a,i);if(!(r&DG)){var g=h&&E1.call(e,"__wrapped__"),_=v&&E1.call(t,"__wrapped__");if(g||_){var m=g?e.value():e,b=_?t.value():t;return i||(i=new hc),a(m,b,r,n,i)}}return p?(i||(i=new hc),xG(e,t,r,n,a,i)):!1}var LG=BG,FG=LG,C1=Ca;function pb(e,t,r,n,a){return e===t?!0:e==null||t==null||!C1(e)&&!C1(t)?e!==e&&t!==t:FG(e,t,r,n,pb,a)}var db=pb,zG=pv,GG=db,NG=1,jG=2;function qG(e,t,r,n){var a=r.length,i=a,s=!n;if(e==null)return!i;for(e=Object(e);a--;){var u=r[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){u=r[a];var f=u[0],c=e[f],h=u[1];if(s&&u[2]){if(c===void 0&&!(f in e))return!1}else{var v=new zG;if(n)var p=n(c,h,f,e,t,v);if(!(p===void 0?GG(h,c,NG|jG,n,v):p))return!1}}return!0}var UG=qG,kG=ti;function HG(e){return e===e&&!kG(e)}var gb=HG,WG=gb,KG=uo;function YG(e){for(var t=KG(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,WG(a)]}return t}var XG=YG;function VG(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var _b=VG,ZG=UG,JG=XG,QG=_b;function tN(e){var t=JG(e);return t.length==1&&t[0][2]?QG(t[0][0],t[0][1]):function(r){return r===e||ZG(r,e,t)}}var eN=tN,rN=Hi,nN=Ca,aN="[object Symbol]";function iN(e){return typeof e=="symbol"||nN(e)&&rN(e)==aN}var _v=iN,sN=Pr,oN=_v,uN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fN=/^\w*$/;function lN(e,t){if(sN(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||oN(e)?!0:fN.test(e)||!uN.test(e)||t!=null&&e in Object(t)}var mv=lN,mb=vv,cN="Expected a function";function $v(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cN);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new($v.Cache||mb),r}$v.Cache=mb;var hN=$v,vN=hN,pN=500;function dN(e){var t=vN(e,function(n){return r.size===pN&&r.clear(),n}),r=t.cache;return t}var gN=dN,_N=gN,mN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$N=/\\(\\)?/g,bN=_N(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(mN,function(r,n,a,i){t.push(a?i.replace($N,"$1"):n||r)}),t}),yN=bN;function wN(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var uf=wN,O1=ki,SN=uf,EN=Pr,CN=_v,ON=1/0,A1=O1?O1.prototype:void 0,T1=A1?A1.toString:void 0;function $b(e){if(typeof e=="string")return e;if(EN(e))return SN(e,$b)+"";if(CN(e))return T1?T1.call(e):"";var t=e+"";return t=="0"&&1/e==-ON?"-0":t}var AN=$b,TN=AN;function MN(e){return e==null?"":TN(e)}var PN=MN,xN=Pr,IN=mv,DN=yN,RN=PN;function BN(e,t){return xN(e)?e:IN(e,t)?[e]:DN(RN(e))}var Zi=BN,LN=_v,FN=1/0;function zN(e){if(typeof e=="string"||LN(e))return e;var t=e+"";return t=="0"&&1/e==-FN?"-0":t}var Ji=zN,GN=Zi,NN=Ji;function jN(e,t){t=GN(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[NN(t[r++])];return r&&r==n?e:void 0}var ff=jN,qN=ff;function UN(e,t,r){var n=e==null?void 0:qN(e,t);return n===void 0?r:n}var kN=UN;function HN(e,t){return e!=null&&t in Object(e)}var WN=HN,KN=Zi,YN=iv,XN=Pr,VN=sv,ZN=ov,JN=Ji;function QN(e,t,r){t=KN(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var s=JN(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&ZN(a)&&VN(s,a)&&(XN(e)||YN(e)))}var t6=QN,e6=WN,r6=t6;function n6(e,t){return e!=null&&r6(e,t,e6)}var a6=n6,i6=db,s6=kN,o6=a6,u6=mv,f6=gb,l6=_b,c6=Ji,h6=1,v6=2;function p6(e,t){return u6(e)&&f6(t)?l6(c6(e),t):function(r){var n=s6(r,e);return n===void 0&&n===t?o6(r,e):i6(t,n,h6|v6)}}var d6=p6;function g6(e){return e}var bv=g6;function _6(e){return function(t){return t==null?void 0:t[e]}}var m6=_6,$6=ff;function b6(e){return function(t){return $6(t,e)}}var y6=b6,w6=m6,S6=y6,E6=mv,C6=Ji;function O6(e){return E6(e)?w6(C6(e)):S6(e)}var A6=O6,T6=eN,M6=d6,P6=bv,x6=Pr,I6=A6;function D6(e){return typeof e=="function"?e:e==null?P6:typeof e=="object"?x6(e)?M6(e[0],e[1]):T6(e):I6(e)}var fo=D6,R6="Expected a function";function B6(e){if(typeof e!="function")throw new TypeError(R6);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var bb=B6,L6=eb,F6=DB,z6=fo,G6=Pr,N6=bb;function j6(e,t){var r=G6(e)?L6:F6;return r(e,N6(z6(t)))}var yb=j6,q6=ei,U6=function(){try{var e=q6(Object,"defineProperty");return e({},"",{}),e}catch{}}(),wb=U6,M1=wb;function k6(e,t,r){t=="__proto__"&&M1?M1(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var yv=k6,H6=yv,W6=cv,K6=Object.prototype,Y6=K6.hasOwnProperty;function X6(e,t,r){var n=e[t];(!(Y6.call(e,t)&&W6(n,r))||r===void 0&&!(t in e))&&H6(e,t,r)}var wv=X6,V6=wv,Z6=Zi,J6=sv,P1=ti,Q6=Ji;function t5(e,t,r,n){if(!P1(e))return e;t=Z6(t,e);for(var a=-1,i=t.length,s=i-1,u=e;u!=null&&++a<i;){var f=Q6(t[a]),c=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(a!=s){var h=u[f];c=n?n(h,f,u):void 0,c===void 0&&(c=P1(h)?h:J6(t[a+1])?[]:{})}V6(u,f,c),u=u[f]}return e}var e5=t5,r5=ff,n5=e5,a5=Zi;function i5(e,t,r){for(var n=-1,a=t.length,i={};++n<a;){var s=t[n],u=r5(e,s);r(u,s)&&n5(i,a5(s,e),u)}return i}var s5=i5,o5=dv,u5=nv,f5=gv,l5=cb,c5=Object.getOwnPropertySymbols,h5=c5?function(e){for(var t=[];e;)o5(t,f5(e)),e=u5(e);return t}:l5,Sb=h5;function v5(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var p5=v5,d5=ti,g5=fv,_5=p5,m5=Object.prototype,$5=m5.hasOwnProperty;function b5(e){if(!d5(e))return _5(e);var t=g5(e),r=[];for(var n in e)n=="constructor"&&(t||!$5.call(e,n))||r.push(n);return r}var y5=b5,w5=ab,S5=y5,E5=ef;function C5(e){return E5(e)?w5(e,!0):S5(e)}var Sv=C5,O5=lb,A5=Sb,T5=Sv;function M5(e){return O5(e,T5,A5)}var Ev=M5,P5=uf,x5=fo,I5=s5,D5=Ev;function R5(e,t){if(e==null)return{};var r=P5(D5(e),function(n){return[n]});return t=x5(t),I5(e,r,function(n,a){return t(n,a[0])})}var B5=R5,L5=fo,F5=bb,z5=B5;function G5(e,t){return z5(e,F5(L5(t)))}var Eb=G5;function N5(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Cb=N5,j5=bv;function q5(e){return typeof e=="function"?e:j5}var U5=q5,k5=Cb,H5=lv,W5=U5,K5=Pr;function Y5(e,t){var r=K5(e)?k5:H5;return r(e,W5(t))}var X5=Y5,V5=lv,Z5=ef;function J5(e,t){var r=-1,n=Z5(e)?Array(e.length):[];return V5(e,function(a,i,s){n[++r]=t(a,i,s)}),n}var Q5=J5,tj=uf,ej=fo,rj=Q5,nj=Pr;function aj(e,t){var r=nj(e)?tj:rj;return r(e,ej(t))}var ij=aj,sj=yv,oj=sb,uj=fo;function fj(e,t){var r={};return t=uj(t),oj(e,function(n,a,i){sj(r,a,t(n,a,i))}),r}var lj=fj,cj=wv,hj=yv;function vj(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],f=n?n(r[u],e[u],u,r,e):void 0;f===void 0&&(f=e[u]),a?hj(r,u,f):cj(r,u,f)}return r}var lo=vj,pj=lo,dj=uo;function gj(e,t){return e&&pj(t,dj(t),e)}var _j=gj,mj=lo,$j=Sv;function bj(e,t){return e&&mj(t,$j(t),e)}var yj=bj,Wc={exports:{}};(function(e,t){var r=On,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function f(c,h){if(h)return c.slice();var v=c.length,p=u?u(v):new c.constructor(v);return c.copy(p),p}e.exports=f})(Wc,Wc.exports);function wj(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Sj=wj,Ej=lo,Cj=gv;function Oj(e,t){return Ej(e,Cj(e),t)}var Aj=Oj,Tj=lo,Mj=Sb;function Pj(e,t){return Tj(e,Mj(e),t)}var xj=Pj,Ij=Object.prototype,Dj=Ij.hasOwnProperty;function Rj(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Dj.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Bj=Rj,x1=fb;function Lj(e){var t=new e.constructor(e.byteLength);return new x1(t).set(new x1(e)),t}var Cv=Lj,Fj=Cv;function zj(e,t){var r=t?Fj(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Gj=zj,Nj=/\w*$/;function jj(e){var t=new e.constructor(e.source,Nj.exec(e));return t.lastIndex=e.lastIndex,t}var qj=jj,I1=ki,D1=I1?I1.prototype:void 0,R1=D1?D1.valueOf:void 0;function Uj(e){return R1?Object(R1.call(e)):{}}var kj=Uj,Hj=Cv;function Wj(e,t){var r=t?Hj(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Kj=Wj,Yj=Cv,Xj=Gj,Vj=qj,Zj=kj,Jj=Kj,Qj="[object Boolean]",t8="[object Date]",e8="[object Map]",r8="[object Number]",n8="[object RegExp]",a8="[object Set]",i8="[object String]",s8="[object Symbol]",o8="[object ArrayBuffer]",u8="[object DataView]",f8="[object Float32Array]",l8="[object Float64Array]",c8="[object Int8Array]",h8="[object Int16Array]",v8="[object Int32Array]",p8="[object Uint8Array]",d8="[object Uint8ClampedArray]",g8="[object Uint16Array]",_8="[object Uint32Array]";function m8(e,t,r){var n=e.constructor;switch(t){case o8:return Yj(e);case Qj:case t8:return new n(+e);case u8:return Xj(e,r);case f8:case l8:case c8:case h8:case v8:case p8:case d8:case g8:case _8:return Jj(e,r);case e8:return new n;case r8:case i8:return new n(e);case n8:return Vj(e);case a8:return new n;case s8:return Zj(e)}}var $8=m8,b8=ti,B1=Object.create,y8=function(){function e(){}return function(t){if(!b8(t))return{};if(B1)return B1(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),w8=y8,S8=w8,E8=nv,C8=fv;function O8(e){return typeof e.constructor=="function"&&!C8(e)?S8(E8(e)):{}}var A8=O8,T8=of,M8=Ca,P8="[object Map]";function x8(e){return M8(e)&&T8(e)==P8}var I8=x8,D8=I8,R8=uv,L1=Vs.exports,F1=L1&&L1.isMap,B8=F1?R8(F1):D8,L8=B8,F8=of,z8=Ca,G8="[object Set]";function N8(e){return z8(e)&&F8(e)==G8}var j8=N8,q8=j8,U8=uv,z1=Vs.exports,G1=z1&&z1.isSet,k8=G1?U8(G1):q8,H8=k8,W8=pv,K8=Cb,Y8=wv,X8=_j,V8=yj,Z8=Wc.exports,J8=Sj,Q8=Aj,tq=xj,eq=hb,rq=Ev,nq=of,aq=Bj,iq=$8,sq=A8,oq=Pr,uq=Xs.exports,fq=L8,lq=ti,cq=H8,hq=uo,vq=Sv,pq=1,dq=2,gq=4,Ob="[object Arguments]",_q="[object Array]",mq="[object Boolean]",$q="[object Date]",bq="[object Error]",Ab="[object Function]",yq="[object GeneratorFunction]",wq="[object Map]",Sq="[object Number]",Tb="[object Object]",Eq="[object RegExp]",Cq="[object Set]",Oq="[object String]",Aq="[object Symbol]",Tq="[object WeakMap]",Mq="[object ArrayBuffer]",Pq="[object DataView]",xq="[object Float32Array]",Iq="[object Float64Array]",Dq="[object Int8Array]",Rq="[object Int16Array]",Bq="[object Int32Array]",Lq="[object Uint8Array]",Fq="[object Uint8ClampedArray]",zq="[object Uint16Array]",Gq="[object Uint32Array]",ye={};ye[Ob]=ye[_q]=ye[Mq]=ye[Pq]=ye[mq]=ye[$q]=ye[xq]=ye[Iq]=ye[Dq]=ye[Rq]=ye[Bq]=ye[wq]=ye[Sq]=ye[Tb]=ye[Eq]=ye[Cq]=ye[Oq]=ye[Aq]=ye[Lq]=ye[Fq]=ye[zq]=ye[Gq]=!0;ye[bq]=ye[Ab]=ye[Tq]=!1;function Tu(e,t,r,n,a,i){var s,u=t&pq,f=t&dq,c=t&gq;if(r&&(s=a?r(e,n,a,i):r(e)),s!==void 0)return s;if(!lq(e))return e;var h=oq(e);if(h){if(s=aq(e),!u)return J8(e,s)}else{var v=nq(e),p=v==Ab||v==yq;if(uq(e))return Z8(e,u);if(v==Tb||v==Ob||p&&!a){if(s=f||p?{}:sq(e),!u)return f?tq(e,V8(s,e)):Q8(e,X8(s,e))}else{if(!ye[v])return a?e:{};s=iq(e,v,u)}}i||(i=new W8);var g=i.get(e);if(g)return g;i.set(e,s),cq(e)?e.forEach(function(b){s.add(Tu(b,t,r,b,e,i))}):fq(e)&&e.forEach(function(b,y){s.set(y,Tu(b,t,r,y,e,i))});var _=c?f?rq:eq:f?vq:hq,m=h?void 0:_(e);return K8(m||e,function(b,y){m&&(y=b,b=e[y]),Y8(s,y,Tu(b,t,r,y,e,i))}),s}var Nq=Tu;function jq(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var qq=jq;function Uq(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var kq=Uq,Hq=ff,Wq=kq;function Kq(e,t){return t.length<2?e:Hq(e,Wq(t,0,-1))}var Yq=Kq,Xq=Zi,Vq=qq,Zq=Yq,Jq=Ji;function Qq(e,t){return t=Xq(t,e),e=Zq(e,t),e==null||delete e[Jq(Vq(t))]}var tU=Qq,eU=av;function rU(e){return eU(e)?void 0:e}var nU=rU,N1=ki,aU=iv,iU=Pr,j1=N1?N1.isConcatSpreadable:void 0;function sU(e){return iU(e)||aU(e)||!!(j1&&e&&e[j1])}var oU=sU,uU=dv,fU=oU;function Mb(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=fU),a||(a=[]);++i<s;){var u=e[i];t>0&&r(u)?t>1?Mb(u,t-1,r,n,a):uU(a,u):n||(a[a.length]=u)}return a}var lU=Mb,cU=lU;function hU(e){var t=e==null?0:e.length;return t?cU(e,1):[]}var vU=hU;function pU(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var dU=pU,gU=dU,q1=Math.max;function _U(e,t,r){return t=q1(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=q1(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=n[a];return u[t]=r(s),gU(e,this,u)}}var mU=_U;function $U(e){return function(){return e}}var bU=$U,yU=bU,U1=wb,wU=bv,SU=U1?function(e,t){return U1(e,"toString",{configurable:!0,enumerable:!1,value:yU(t),writable:!0})}:wU,EU=SU,CU=800,OU=16,AU=Date.now;function TU(e){var t=0,r=0;return function(){var n=AU(),a=OU-(n-r);if(r=n,a>0){if(++t>=CU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var MU=TU,PU=EU,xU=MU,IU=xU(PU),DU=IU,RU=vU,BU=mU,LU=DU;function FU(e){return LU(BU(e,void 0,RU),e+"")}var zU=FU,GU=uf,NU=Nq,jU=tU,qU=Zi,UU=lo,kU=nU,HU=zU,WU=Ev,KU=1,YU=2,XU=4,VU=HU(function(e,t){var r={};if(e==null)return r;var n=!1;t=GU(t,function(i){return i=qU(i,e),n||(n=i.length>1),i}),UU(e,WU(e),r),n&&(r=NU(r,KU|YU|XU,kU));for(var a=t.length;a--;)jU(r,t[a]);return r}),ZU=VU;function JU(e){return e}function Pb(e){var t=e;return function(){return t}}function xb(e){return Array.isArray(e)?e:yb((""+e).split("."),function(t){return!t})}var ge="@@updeep/placeholder";function lf(e,t){var r=e.length;for(r>t&&(r=t);e[r-1]===ge;)r-=1;return r}function cn(e){return function t(r){var n=[].slice.call(arguments,1),a=n[0],i=n[1],s=lf(arguments);return s>=1?e(r,a,i):t}}function fn(e){return function t(r,n){var a=[].slice.call(arguments,2),i=a[0],s=a[1],u=lf(arguments,2);if(n===ge||i===ge||s===ge)throw new Error("Can only use placeholder on first argument of this function.");return u>=2?r===ge?cn(function(f,c,h){return e(f,n,c,h)}):e(r,n,i,s):u===1?cn(function(f,c,h){return e(r,f,c,h)}):t}}function xs(e){return function t(r,n,a){var i=[].slice.call(arguments,3),s=i[0],u=i[1],f=lf(arguments,3);if(a===ge||s===ge||u===ge)throw new Error("Can only use placeholder on first or second argument of this function.");return f>=3?r===ge?n===ge?fn(function(c,h,v,p){return e(c,h,a,v,p)}):cn(function(c,h,v){return e(c,n,a,h,v)}):n===ge?cn(function(c,h,v){return e(r,c,a,h,v)}):e(r,n,a,s,u):f===2?r===ge?fn(function(c,h,v,p){return e(c,n,h,v,p)}):cn(function(c,h,v){return e(r,n,c,h,v)}):f===1?fn(function(c,h,v,p){return e(r,c,h,v,p)}):t}}function QU(e){return function t(r,n,a,i){var s=[].slice.call(arguments,4),u=s[0],f=s[1],c=lf(arguments,4);if(i===ge||u===ge||f===ge)throw new Error("Can only use placeholder on first, second or third argument of this function.");return c>=4?r===ge?n===ge?a===ge?xs(function(h,v,p,g,_){return e(h,v,p,i,g,_)}):fn(function(h,v,p,g){return e(h,v,a,i,p,g)}):a===ge?fn(function(h,v,p,g){return e(h,n,v,i,p,g)}):cn(function(h,v,p){return e(h,n,a,i,v,p)}):n===ge?a===ge?fn(function(h,v,p,g){return e(r,h,v,i,p,g)}):cn(function(h,v,p){return e(r,h,a,i,v,p)}):a===ge?cn(function(h,v,p){return e(r,n,h,i,v,p)}):e(r,n,a,i,u,f):c===3?r===ge?n===ge?xs(function(h,v,p,g,_){return e(h,v,a,p,g,_)}):fn(function(h,v,p,g){return e(h,n,a,v,p,g)}):n===ge?fn(function(h,v,p,g){return e(r,h,a,v,p,g)}):cn(function(h,v,p){return e(r,n,a,h,v,p)}):c===2?r===ge?xs(function(h,v,p,g,_){return e(h,n,v,p,g,_)}):fn(function(h,v,p,g){return e(r,n,h,v,p,g)}):c===1?xs(function(h,v,p,g,_){return e(r,h,v,p,g,_)}):t}}function co(e,t){return t===void 0&&(t=e.length),[e,cn,fn,xs,QU][t](e)}var tk=co(function(e,t,r){for(var n=xb(e),a=r,i=0;i<n.length;i+=1){if(a===void 0)return!1;a=a[n[i]]}return typeof t=="function"?t(a):t===a});function Ib(){return(Ib=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Qi(e,t){return t===void 0&&(t=e.length),co(function(){return e.apply(void 0,[].slice.call(arguments))},t)}var Kc={__omitted:!0},ek=Pb(Kc);function rk(e){return!Object.keys(e).length}function nk(e,t){return function(r,n,a){return Object.keys(r).reduce(function(i,s){return n(i,r[s],s)},{})}(e,function(r,n,a){var i=n;return Array.isArray(n)||n===null||typeof n!="object"?typeof n=="function"&&(i=n(t[a])):i=Db(n,t[a]),t[a]!==i&&(r[a]=i),r})}function ak(e,t){var r=[].concat(t);return Object.keys(e).forEach(function(n){r[n]=e[n]}),r}function Db(e,t){if(typeof e=="function")return e.apply(void 0,[t].concat([].slice.call(arguments,2)));if(!av(e))return e;var r=t==null?{}:t,n=nk(e,r);return rk(n)?r:Array.isArray(r)?ak(n,r).filter(function(a){return a!==Kc}):Eb(Ib({},r,n),function(a){return a===Kc})}var ri=Qi(Db,2),Rb=Qi(function(e,t,r,n){var a=typeof e=="function"?e(n):e;return ri(a?t:r,n)}),ik=co(function(e,t,r){return Rb(e,t,function(n){return n},r)}),Bb=Qi(function(e,t){var r=typeof e=="function"?e:ri(e),n=(Array.isArray(t)?ij:lj)(t,r);return function(a,i){var s=!0;return X5(i,function(u,f){if(u!==a[f])return s=!1,!1}),s}(t,n)?t:n}),sk=Qi(function(e,t){return ZU(t,e)}),ok=Qi(function(e,t){return Eb(t,e)}),uk=Qi(function(e,t){var r=yb(t,e);return t.length===r.length?t:r});function fk(e,t){var r;return t==="*"?function(n){var a;return Object.prototype.hasOwnProperty.call(n,"*")?ri(((a={})["*"]=e,a),n):Bb(e,n)}:((r={})[t]=e,r)}var lk=co(function(e,t,r){var n=xb(e).reduceRight(fk,t);return ri(n,r)}),ck=co(function(e,t,r){return ri(t,r===void 0?e:r)}),Ve=ri;Ve._=ge,Ve.constant=Pb,Ve.if=ik,Ve.ifElse=Rb,Ve.is=tk,Ve.freeze=JU,Ve.map=Bb,Ve.omit=sk,Ve.omitBy=ok,Ve.reject=uk,Ve.update=ri,Ve.updateIn=lk,Ve.omitted=ek,Ve.withDefault=ck;function hk(e,t={}){if(!av(e)&&Object.keys(t).length>0)throw new Error("can't have subduxes on a dux which state is not an object");if(Object.keys(t).length===1&&t["*"])return e;const r=Un(t,({initial:n},a)=>a==="*"?[]:n);return Ve(e,r)}function vk(e={},t={}){const r=Object.assign({},e);return Object.values(t).forEach(({actions:n})=>{!n||Object.entries(n).forEach(([a,i])=>{if(r[a]){if(r[a]===i)return;throw new Error(`trying to merge two different actions ${a}`)}r[a]=i})}),r}function pk(e,t={},r={}){const n=V$(r,({selectors:i},s)=>i?s==="*"?{}:Un(i,u=>f=>u(f[s])):{});let a={};for(const i in t)a[i]=s=>(...u)=>{const f=t[i](s)(...u);return Nc(()=>f,Un(r["*"].selectors,h=>()=>h(f)))};return Nc({},...n,e,a)}function k1(e,t,r){let n=function(...a){const i={type:e};return t?i.payload=t(...a):a[0]!==void 0&&(i.payload=a[0]),i};if(r){const a=n;n=(...i)=>r(a(...i),i)}return n.type=e,n}function dk(e,t,r={},n=void 0){const a=Object.keys(r).length>0?Un(r,({upreducer:s})=>s):null,i=s=>u=>{if(!(s!=null&&s.type))throw new Error("upreducer called with a bad action");let f=u!=null?u:e;if(a)if(r["*"])f=Ve.updateIn("*",r["*"].upreducer(s),f);else{const h=Un(a,v=>v(s));f=Ve(h,f)}const c=t[s.type]||t["+"];return c?c(s.payload,s)(f):f};return n?n(i):i}const gk=(e,t)=>r=>n=>a=>e!=="*"&&a.type!==e?n(a):t(r)(n)(a),_k=(e,t)=>r=>{const n=()=>ev(r.getState(),e);return t(Object.assign(Object.assign({},r),{getState:n}))};function Yc(e,t,r){const n=()=>e.getState(),a=i=>e.dispatch(i);return Object.assign(n,Un(r,i=>(...s)=>{let u=i(e.getState());return typeof u=="function"?u(...s):u})),Object.assign(a,Un(t,i=>(...s)=>e.dispatch(i(...s)))),Object.assign(Object.assign({},e),{getState:n,dispatch:a,actions:t,selectors:r})}const Lb=(e,t,r)=>{let n=e,a="*";return Array.isArray(e)&&(a=e[0],n=e[1],n=gk(a,n)),i=>n(Yc(i,t,r))},mk=e=>t=>r=>e.reduceRight((n,a)=>a(t)(n),r);function $k(e=[],t={},r={},n={},a=void 0,i=void 0){let s=V$(n,({middleware:c},h)=>h!=="*"&&c?_k(h,c):void 0).filter(c=>c),f=[...e.map(c=>Lb(c,t,r)),...s];return a&&(f=a(f,i)),mk(f)}var He=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r},ne=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Mu,Sr,ja,Ai,qa,Ti,la,Mi,Is,Pu,Ds,Xc,Vc,Zc,Jc,Qc;class Ke{constructor(t){var r,n,a,i,s;if(Mu.set(this,{}),Sr.set(this,{}),ja.set(this,{}),Ai.set(this,{}),qa.set(this,{}),Ti.set(this,[]),la.set(this,[]),Mi.set(this,void 0),Is.set(this,void 0),Pu.set(this,void 0),Ds.set(this,void 0),Xc.set(this,Dt(hk)),Vc.set(this,Dt(vk)),Zc.set(this,Dt(pk)),Jc.set(this,Dt(dk)),Qc.set(this,Dt($k)),He(this,Mu,(r=t.initial)!==null&&r!==void 0?r:{},"f"),He(this,Sr,(n=t.subduxes)!==null&&n!==void 0?n:{},"f"),t.subduxes&&He(this,Sr,Un(t.subduxes,u=>u instanceof Ke?u:new Ke(u)),"f"),t.actions)for(const[u,f]of Object.entries(t.actions))if(typeof f=="function"&&f.type)ne(this,ja,"f")[u]=f;else{const c=Array.isArray(f)?f:[f];ne(this,ja,"f")[u]=k1(u,...c)}He(this,Ai,(a=t.selectors)!==null&&a!==void 0?a:{},"f"),He(this,Mi,t.mappedSelectors,"f"),He(this,qa,(i=t.mutations)!==null&&i!==void 0?i:{},"f"),Object.keys(ne(this,qa,"f")).filter(u=>u!=="+").filter(u=>!this.actions.hasOwnProperty(u)).forEach(u=>{throw new Error(`action '${u}' is not defined`)}),t.effects&&He(this,Ti,Object.entries(t.effects),"f"),He(this,la,(s=t.reactions)!==null&&s!==void 0?s:[],"f"),He(this,Is,t.mappedReaction,"f"),He(this,Pu,t.upreducerWrapper,"f"),He(this,Ds,t.middlewareWrapper,"f")}setMappedSelector(t,r){He(this,Mi,Object.assign(Object.assign({},ne(this,Mi,"f")),{[t]:r}),"f")}get middleware(){return ne(this,Qc,"f").call(this,ne(this,Ti,"f"),this.actions,this.selectors,ne(this,Sr,"f"),ne(this,Ds,"f"),this)}setMiddlewareWrapper(t){He(this,Ds,t,"f")}get initial(){return ne(this,Xc,"f").call(this,ne(this,Mu,"f"),ne(this,Sr,"f"))}get actions(){return ne(this,Vc,"f").call(this,ne(this,ja,"f"),ne(this,Sr,"f"))}get selectors(){return ne(this,Zc,"f").call(this,ne(this,Ai,"f"),ne(this,Mi,"f"),ne(this,Sr,"f"))}get subduxes(){return ne(this,Sr,"f")}get upreducer(){return ne(this,Jc,"f").call(this,this.initial,ne(this,qa,"f"),ne(this,Sr,"f"),ne(this,Pu,"f"))}get reducer(){return(t,r)=>this.upreducer(r)(t)}addSubscription(t){He(this,la,[...ne(this,la,"f"),t],"f")}addReaction(t){He(this,la,[...ne(this,la,"f"),t],"f")}setAction(t,r){const n=k1(t,r);return He(this,ja,Object.assign(Object.assign({},ne(this,ja,"f")),{[t]:n}),"f"),n}setSelector(t,r){return He(this,Ai,Object.assign(Object.assign({},ne(this,Ai,"f")),{[t]:r}),"f"),r}setMutation(t,r){return typeof t=="function"&&(t=t.type),He(this,qa,Object.assign(Object.assign({},ne(this,qa,"f")),{[t]:r}),"f"),r}addEffect(t,r){return He(this,Ti,[...ne(this,Ti,"f"),[t,r]],"f"),r}augmentMiddlewareApi(t){return Yc(t,this.actions,this.selectors)}splatSubscriber(t,r,n){const a={};return()=>(i,s,u)=>{const f=Object.keys(a),c=Q0(Object.keys(i),f);for(const v of c){let p=Object.assign(Object.assign({},t),{getState:()=>t.getState()[v]});a[v]=[],typeof n=="function"&&(p=Object.assign(Object.assign({},p),n(p,v)));const{unsub:g,subscriber:_,subscriberRaw:m}=r.subscribeAll(p);a[v].push({unsub:g,subscriber:_,subscriberRaw:m}),_()}const h=Q0(f,Object.keys(i));for(const v of h){for(const p of a[v])p.subscriber(),p.unsub();delete a[v]}}}subscribeTo(t,r,n=[]){const a=Yc(Object.assign(Object.assign({},t),{subscribe:h=>this.subscribeTo(t,()=>h)}),this.actions,this.selectors),i=r(a,...n);let s;const u=()=>{const h=t.getState();if(h===s)return;let v=s;s=h,i(h,v,c)};let f=t.subscribe(u);const c=typeof f=="function"?f:f.unsub;return{unsub:c,subscriber:u,subscriberRaw:i}}subscribeAll(t){let r=ne(this,la,"f").map(n=>this.subscribeTo(t,n));for(const n in ne(this,Sr,"f"))if(n!=="*"){const a=Object.assign(Object.assign({},t),{getState:()=>ev(t.getState(),n)});r.push(ne(this,Sr,"f")[n].subscribeAll(a))}return ne(this,Is,"f")&&r.push(this.subscribeTo(t,this.splatSubscriber(t,ne(this,Sr,"f")["*"],ne(this,Is,"f")))),{unsub:()=>r.forEach(({unsub:n})=>n()),subscriber:()=>r.forEach(({subscriber:n})=>n()),subscriberRaw:(...n)=>r.forEach(({subscriberRaw:a})=>a(...n))}}createStore(t,r){const n=(r!=null?r:RP)(this.middleware),a=S$(this.reducer,t!=null?t:this.initial,n);a.actions=this.actions,a.selectors=this.selectors,Nc(a.getState,Un(this.selectors,i=>(...s)=>{let u=i(a.getState());return typeof u=="function"?u(...s):u}));for(const i in this.actions)a.dispatch[i]=(...s)=>a.dispatch(this.actions[i](...s));return this.subscribeAll(a),a}effectToMiddleware(t){return Lb(t,this.actions,this.selectors)}}Mu=new WeakMap,Sr=new WeakMap,ja=new WeakMap,Ai=new WeakMap,qa=new WeakMap,Ti=new WeakMap,la=new WeakMap,Mi=new WeakMap,Is=new WeakMap,Pu=new WeakMap,Ds=new WeakMap,Xc=new WeakMap,Vc=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,Qc=new WeakMap;function bk(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}var Fb=bk;function yk(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),u=s.length;u--;){var f=s[e?u:++a];if(r(i[f],f,i)===!1)break}return t}}var wk=yk,Sk=wk,Ek=Sk(),Ck=Ek;function Ok(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Ak=Ok,Tk=typeof Er=="object"&&Er&&Er.Object===Object&&Er,zb=Tk,Mk=zb,Pk=typeof self=="object"&&self&&self.Object===Object&&self,xk=Mk||Pk||Function("return this")(),An=xk,Ik=An,Dk=Ik.Symbol,ts=Dk,H1=ts,Gb=Object.prototype,Rk=Gb.hasOwnProperty,Bk=Gb.toString,Ms=H1?H1.toStringTag:void 0;function Lk(e){var t=Rk.call(e,Ms),r=e[Ms];try{e[Ms]=void 0;var n=!0}catch{}var a=Bk.call(e);return n&&(t?e[Ms]=r:delete e[Ms]),a}var Fk=Lk,zk=Object.prototype,Gk=zk.toString;function Nk(e){return Gk.call(e)}var jk=Nk,W1=ts,qk=Fk,Uk=jk,kk="[object Null]",Hk="[object Undefined]",K1=W1?W1.toStringTag:void 0;function Wk(e){return e==null?e===void 0?Hk:kk:K1&&K1 in Object(e)?qk(e):Uk(e)}var es=Wk;function Kk(e){return e!=null&&typeof e=="object"}var Oa=Kk,Yk=es,Xk=Oa,Vk="[object Arguments]";function Zk(e){return Xk(e)&&Yk(e)==Vk}var Jk=Zk,Y1=Jk,Qk=Oa,Nb=Object.prototype,tH=Nb.hasOwnProperty,eH=Nb.propertyIsEnumerable,rH=Y1(function(){return arguments}())?Y1:function(e){return Qk(e)&&tH.call(e,"callee")&&!eH.call(e,"callee")},Ov=rH,nH=Array.isArray,xr=nH,Zs={exports:{}};function aH(){return!1}var iH=aH;(function(e,t){var r=An,n=iH,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,u=s?r.Buffer:void 0,f=u?u.isBuffer:void 0,c=f||n;e.exports=c})(Zs,Zs.exports);var sH=9007199254740991,oH=/^(?:0|[1-9]\d*)$/;function uH(e,t){var r=typeof e;return t=t==null?sH:t,!!t&&(r=="number"||r!="symbol"&&oH.test(e))&&e>-1&&e%1==0&&e<t}var Av=uH,fH=9007199254740991;function lH(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fH}var Tv=lH,cH=es,hH=Tv,vH=Oa,pH="[object Arguments]",dH="[object Array]",gH="[object Boolean]",_H="[object Date]",mH="[object Error]",$H="[object Function]",bH="[object Map]",yH="[object Number]",wH="[object Object]",SH="[object RegExp]",EH="[object Set]",CH="[object String]",OH="[object WeakMap]",AH="[object ArrayBuffer]",TH="[object DataView]",MH="[object Float32Array]",PH="[object Float64Array]",xH="[object Int8Array]",IH="[object Int16Array]",DH="[object Int32Array]",RH="[object Uint8Array]",BH="[object Uint8ClampedArray]",LH="[object Uint16Array]",FH="[object Uint32Array]",Ae={};Ae[MH]=Ae[PH]=Ae[xH]=Ae[IH]=Ae[DH]=Ae[RH]=Ae[BH]=Ae[LH]=Ae[FH]=!0;Ae[pH]=Ae[dH]=Ae[AH]=Ae[gH]=Ae[TH]=Ae[_H]=Ae[mH]=Ae[$H]=Ae[bH]=Ae[yH]=Ae[wH]=Ae[SH]=Ae[EH]=Ae[CH]=Ae[OH]=!1;function zH(e){return vH(e)&&hH(e.length)&&!!Ae[cH(e)]}var GH=zH;function NH(e){return function(t){return e(t)}}var Mv=NH,Js={exports:{}};(function(e,t){var r=zb,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var f=a&&a.require&&a.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(Js,Js.exports);var jH=GH,qH=Mv,X1=Js.exports,V1=X1&&X1.isTypedArray,UH=V1?qH(V1):jH,jb=UH,kH=Ak,HH=Ov,WH=xr,KH=Zs.exports,YH=Av,XH=jb,VH=Object.prototype,ZH=VH.hasOwnProperty;function JH(e,t){var r=WH(e),n=!r&&HH(e),a=!r&&!n&&KH(e),i=!r&&!n&&!a&&XH(e),s=r||n||a||i,u=s?kH(e.length,String):[],f=u.length;for(var c in e)(t||ZH.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||YH(c,f)))&&u.push(c);return u}var qb=JH,QH=Object.prototype;function tW(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||QH;return e===r}var Pv=tW;function eW(e,t){return function(r){return e(t(r))}}var Ub=eW,rW=Ub,nW=rW(Object.keys,Object),aW=nW,iW=Pv,sW=aW,oW=Object.prototype,uW=oW.hasOwnProperty;function fW(e){if(!iW(e))return sW(e);var t=[];for(var r in Object(e))uW.call(e,r)&&r!="constructor"&&t.push(r);return t}var lW=fW;function cW(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ni=cW,hW=es,vW=ni,pW="[object AsyncFunction]",dW="[object Function]",gW="[object GeneratorFunction]",_W="[object Proxy]";function mW(e){if(!vW(e))return!1;var t=hW(e);return t==dW||t==gW||t==pW||t==_W}var kb=mW,$W=kb,bW=Tv;function yW(e){return e!=null&&bW(e.length)&&!$W(e)}var cf=yW,wW=qb,SW=lW,EW=cf;function CW(e){return EW(e)?wW(e):SW(e)}var ho=CW,OW=Ck,AW=ho;function TW(e,t){return e&&OW(e,t,AW)}var Hb=TW,MW=cf;function PW(e,t){return function(r,n){if(r==null)return r;if(!MW(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}var xW=PW,IW=Hb,DW=xW,RW=DW(IW),xv=RW,BW=xv;function LW(e,t){var r=[];return BW(e,function(n,a,i){t(n,a,i)&&r.push(n)}),r}var FW=LW;function zW(){this.__data__=[],this.size=0}var GW=zW;function NW(e,t){return e===t||e!==e&&t!==t}var Iv=NW,jW=Iv;function qW(e,t){for(var r=e.length;r--;)if(jW(e[r][0],t))return r;return-1}var hf=qW,UW=hf,kW=Array.prototype,HW=kW.splice;function WW(e){var t=this.__data__,r=UW(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HW.call(t,r,1),--this.size,!0}var KW=WW,YW=hf;function XW(e){var t=this.__data__,r=YW(t,e);return r<0?void 0:t[r][1]}var VW=XW,ZW=hf;function JW(e){return ZW(this.__data__,e)>-1}var QW=JW,t7=hf;function e7(e,t){var r=this.__data__,n=t7(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var r7=e7,n7=GW,a7=KW,i7=VW,s7=QW,o7=r7;function rs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rs.prototype.clear=n7;rs.prototype.delete=a7;rs.prototype.get=i7;rs.prototype.has=s7;rs.prototype.set=o7;var vf=rs,u7=vf;function f7(){this.__data__=new u7,this.size=0}var l7=f7;function c7(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var h7=c7;function v7(e){return this.__data__.get(e)}var p7=v7;function d7(e){return this.__data__.has(e)}var g7=d7,_7=An,m7=_7["__core-js_shared__"],$7=m7,vc=$7,Z1=function(){var e=/[^.]+$/.exec(vc&&vc.keys&&vc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function b7(e){return!!Z1&&Z1 in e}var y7=b7,w7=Function.prototype,S7=w7.toString;function E7(e){if(e!=null){try{return S7.call(e)}catch{}try{return e+""}catch{}}return""}var Wb=E7,C7=kb,O7=y7,A7=ni,T7=Wb,M7=/[\\^$.*+?()[\]{}|]/g,P7=/^\[object .+?Constructor\]$/,x7=Function.prototype,I7=Object.prototype,D7=x7.toString,R7=I7.hasOwnProperty,B7=RegExp("^"+D7.call(R7).replace(M7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function L7(e){if(!A7(e)||O7(e))return!1;var t=C7(e)?B7:P7;return t.test(T7(e))}var F7=L7;function z7(e,t){return e==null?void 0:e[t]}var G7=z7,N7=F7,j7=G7;function q7(e,t){var r=j7(e,t);return N7(r)?r:void 0}var ai=q7,U7=ai,k7=An,H7=U7(k7,"Map"),Dv=H7,W7=ai,K7=W7(Object,"create"),pf=K7,J1=pf;function Y7(){this.__data__=J1?J1(null):{},this.size=0}var X7=Y7;function V7(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Z7=V7,J7=pf,Q7="__lodash_hash_undefined__",tK=Object.prototype,eK=tK.hasOwnProperty;function rK(e){var t=this.__data__;if(J7){var r=t[e];return r===Q7?void 0:r}return eK.call(t,e)?t[e]:void 0}var nK=rK,aK=pf,iK=Object.prototype,sK=iK.hasOwnProperty;function oK(e){var t=this.__data__;return aK?t[e]!==void 0:sK.call(t,e)}var uK=oK,fK=pf,lK="__lodash_hash_undefined__";function cK(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fK&&t===void 0?lK:t,this}var hK=cK,vK=X7,pK=Z7,dK=nK,gK=uK,_K=hK;function ns(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ns.prototype.clear=vK;ns.prototype.delete=pK;ns.prototype.get=dK;ns.prototype.has=gK;ns.prototype.set=_K;var mK=ns,Q1=mK,$K=vf,bK=Dv;function yK(){this.size=0,this.__data__={hash:new Q1,map:new(bK||$K),string:new Q1}}var wK=yK;function SK(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var EK=SK,CK=EK;function OK(e,t){var r=e.__data__;return CK(t)?r[typeof t=="string"?"string":"hash"]:r.map}var df=OK,AK=df;function TK(e){var t=AK(this,e).delete(e);return this.size-=t?1:0,t}var MK=TK,PK=df;function xK(e){return PK(this,e).get(e)}var IK=xK,DK=df;function RK(e){return DK(this,e).has(e)}var BK=RK,LK=df;function FK(e,t){var r=LK(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var zK=FK,GK=wK,NK=MK,jK=IK,qK=BK,UK=zK;function as(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}as.prototype.clear=GK;as.prototype.delete=NK;as.prototype.get=jK;as.prototype.has=qK;as.prototype.set=UK;var Rv=as,kK=vf,HK=Dv,WK=Rv,KK=200;function YK(e,t){var r=this.__data__;if(r instanceof kK){var n=r.__data__;if(!HK||n.length<KK-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new WK(n)}return r.set(e,t),this.size=r.size,this}var XK=YK,VK=vf,ZK=l7,JK=h7,QK=p7,tY=g7,eY=XK;function is(e){var t=this.__data__=new VK(e);this.size=t.size}is.prototype.clear=ZK;is.prototype.delete=JK;is.prototype.get=QK;is.prototype.has=tY;is.prototype.set=eY;var Bv=is,rY="__lodash_hash_undefined__";function nY(e){return this.__data__.set(e,rY),this}var aY=nY;function iY(e){return this.__data__.has(e)}var sY=iY,oY=Rv,uY=aY,fY=sY;function Nu(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new oY;++t<r;)this.add(e[t])}Nu.prototype.add=Nu.prototype.push=uY;Nu.prototype.has=fY;var lY=Nu;function cY(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var hY=cY;function vY(e,t){return e.has(t)}var pY=vY,dY=lY,gY=hY,_Y=pY,mY=1,$Y=2;function bY(e,t,r,n,a,i){var s=r&mY,u=e.length,f=t.length;if(u!=f&&!(s&&f>u))return!1;var c=i.get(e),h=i.get(t);if(c&&h)return c==t&&h==e;var v=-1,p=!0,g=r&$Y?new dY:void 0;for(i.set(e,t),i.set(t,e);++v<u;){var _=e[v],m=t[v];if(n)var b=s?n(m,_,v,t,e,i):n(_,m,v,e,t,i);if(b!==void 0){if(b)continue;p=!1;break}if(g){if(!gY(t,function(y,w){if(!_Y(g,w)&&(_===y||a(_,y,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(_===m||a(_,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var Kb=bY,yY=An,wY=yY.Uint8Array,Yb=wY;function SY(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var EY=SY;function CY(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var OY=CY,t_=ts,e_=Yb,AY=Iv,TY=Kb,MY=EY,PY=OY,xY=1,IY=2,DY="[object Boolean]",RY="[object Date]",BY="[object Error]",LY="[object Map]",FY="[object Number]",zY="[object RegExp]",GY="[object Set]",NY="[object String]",jY="[object Symbol]",qY="[object ArrayBuffer]",UY="[object DataView]",r_=t_?t_.prototype:void 0,pc=r_?r_.valueOf:void 0;function kY(e,t,r,n,a,i,s){switch(r){case UY:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case qY:return!(e.byteLength!=t.byteLength||!i(new e_(e),new e_(t)));case DY:case RY:case FY:return AY(+e,+t);case BY:return e.name==t.name&&e.message==t.message;case zY:case NY:return e==t+"";case LY:var u=MY;case GY:var f=n&xY;if(u||(u=PY),e.size!=t.size&&!f)return!1;var c=s.get(e);if(c)return c==t;n|=IY,s.set(e,t);var h=TY(u(e),u(t),n,a,i,s);return s.delete(e),h;case jY:if(pc)return pc.call(e)==pc.call(t)}return!1}var HY=kY;function WY(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Lv=WY,KY=Lv,YY=xr;function XY(e,t,r){var n=t(e);return YY(e)?n:KY(n,r(e))}var Xb=XY;function VY(){return[]}var Vb=VY,ZY=Fb,JY=Vb,QY=Object.prototype,t9=QY.propertyIsEnumerable,n_=Object.getOwnPropertySymbols,e9=n_?function(e){return e==null?[]:(e=Object(e),ZY(n_(e),function(t){return t9.call(e,t)}))}:JY,Fv=e9,r9=Xb,n9=Fv,a9=ho;function i9(e){return r9(e,a9,n9)}var Zb=i9,a_=Zb,s9=1,o9=Object.prototype,u9=o9.hasOwnProperty;function f9(e,t,r,n,a,i){var s=r&s9,u=a_(e),f=u.length,c=a_(t),h=c.length;if(f!=h&&!s)return!1;for(var v=f;v--;){var p=u[v];if(!(s?p in t:u9.call(t,p)))return!1}var g=i.get(e),_=i.get(t);if(g&&_)return g==t&&_==e;var m=!0;i.set(e,t),i.set(t,e);for(var b=s;++v<f;){p=u[v];var y=e[p],w=t[p];if(n)var O=s?n(w,y,p,t,e,i):n(y,w,p,e,t,i);if(!(O===void 0?y===w||a(y,w,r,n,i):O)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var T=e.constructor,A=t.constructor;T!=A&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof A=="function"&&A instanceof A)&&(m=!1)}return i.delete(e),i.delete(t),m}var l9=f9,c9=ai,h9=An,v9=c9(h9,"DataView"),p9=v9,d9=ai,g9=An,_9=d9(g9,"Promise"),m9=_9,$9=ai,b9=An,y9=$9(b9,"Set"),w9=y9,S9=ai,E9=An,C9=S9(E9,"WeakMap"),O9=C9,th=p9,eh=Dv,rh=m9,nh=w9,ah=O9,Jb=es,ss=Wb,i_="[object Map]",A9="[object Object]",s_="[object Promise]",o_="[object Set]",u_="[object WeakMap]",f_="[object DataView]",T9=ss(th),M9=ss(eh),P9=ss(rh),x9=ss(nh),I9=ss(ah),Ua=Jb;(th&&Ua(new th(new ArrayBuffer(1)))!=f_||eh&&Ua(new eh)!=i_||rh&&Ua(rh.resolve())!=s_||nh&&Ua(new nh)!=o_||ah&&Ua(new ah)!=u_)&&(Ua=function(e){var t=Jb(e),r=t==A9?e.constructor:void 0,n=r?ss(r):"";if(n)switch(n){case T9:return f_;case M9:return i_;case P9:return s_;case x9:return o_;case I9:return u_}return t});var gf=Ua,dc=Bv,D9=Kb,R9=HY,B9=l9,l_=gf,c_=xr,h_=Zs.exports,L9=jb,F9=1,v_="[object Arguments]",p_="[object Array]",_u="[object Object]",z9=Object.prototype,d_=z9.hasOwnProperty;function G9(e,t,r,n,a,i){var s=c_(e),u=c_(t),f=s?p_:l_(e),c=u?p_:l_(t);f=f==v_?_u:f,c=c==v_?_u:c;var h=f==_u,v=c==_u,p=f==c;if(p&&h_(e)){if(!h_(t))return!1;s=!0,h=!1}if(p&&!h)return i||(i=new dc),s||L9(e)?D9(e,t,r,n,a,i):R9(e,t,f,r,n,a,i);if(!(r&F9)){var g=h&&d_.call(e,"__wrapped__"),_=v&&d_.call(t,"__wrapped__");if(g||_){var m=g?e.value():e,b=_?t.value():t;return i||(i=new dc),a(m,b,r,n,i)}}return p?(i||(i=new dc),B9(e,t,r,n,a,i)):!1}var N9=G9,j9=N9,g_=Oa;function Qb(e,t,r,n,a){return e===t?!0:e==null||t==null||!g_(e)&&!g_(t)?e!==e&&t!==t:j9(e,t,r,n,Qb,a)}var ty=Qb,q9=Bv,U9=ty,k9=1,H9=2;function W9(e,t,r,n){var a=r.length,i=a,s=!n;if(e==null)return!i;for(e=Object(e);a--;){var u=r[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){u=r[a];var f=u[0],c=e[f],h=u[1];if(s&&u[2]){if(c===void 0&&!(f in e))return!1}else{var v=new q9;if(n)var p=n(c,h,f,e,t,v);if(!(p===void 0?U9(h,c,k9|H9,n,v):p))return!1}}return!0}var K9=W9,Y9=ni;function X9(e){return e===e&&!Y9(e)}var ey=X9,V9=ey,Z9=ho;function J9(e){for(var t=Z9(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,V9(a)]}return t}var Q9=J9;function tX(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var ry=tX,eX=K9,rX=Q9,nX=ry;function aX(e){var t=rX(e);return t.length==1&&t[0][2]?nX(t[0][0],t[0][1]):function(r){return r===e||eX(r,e,t)}}var iX=aX,sX=es,oX=Oa,uX="[object Symbol]";function fX(e){return typeof e=="symbol"||oX(e)&&sX(e)==uX}var zv=fX,lX=xr,cX=zv,hX=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vX=/^\w*$/;function pX(e,t){if(lX(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||cX(e)?!0:vX.test(e)||!hX.test(e)||t!=null&&e in Object(t)}var Gv=pX,ny=Rv,dX="Expected a function";function Nv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dX);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(Nv.Cache||ny),r}Nv.Cache=ny;var gX=Nv,_X=gX,mX=500;function $X(e){var t=_X(e,function(n){return r.size===mX&&r.clear(),n}),r=t.cache;return t}var bX=$X,yX=bX,wX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,SX=/\\(\\)?/g,EX=yX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wX,function(r,n,a,i){t.push(a?i.replace(SX,"$1"):n||r)}),t}),CX=EX;function OX(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var _f=OX,__=ts,AX=_f,TX=xr,MX=zv,PX=1/0,m_=__?__.prototype:void 0,$_=m_?m_.toString:void 0;function ay(e){if(typeof e=="string")return e;if(TX(e))return AX(e,ay)+"";if(MX(e))return $_?$_.call(e):"";var t=e+"";return t=="0"&&1/e==-PX?"-0":t}var xX=ay,IX=xX;function DX(e){return e==null?"":IX(e)}var RX=DX,BX=xr,LX=Gv,FX=CX,zX=RX;function GX(e,t){return BX(e)?e:LX(e,t)?[e]:FX(zX(e))}var os=GX,NX=zv,jX=1/0;function qX(e){if(typeof e=="string"||NX(e))return e;var t=e+"";return t=="0"&&1/e==-jX?"-0":t}var us=qX,UX=os,kX=us;function HX(e,t){t=UX(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[kX(t[r++])];return r&&r==n?e:void 0}var mf=HX,WX=mf;function KX(e,t,r){var n=e==null?void 0:WX(e,t);return n===void 0?r:n}var YX=KX;function XX(e,t){return e!=null&&t in Object(e)}var VX=XX,ZX=os,JX=Ov,QX=xr,tV=Av,eV=Tv,rV=us;function nV(e,t,r){t=ZX(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var s=rV(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&eV(a)&&tV(s,a)&&(QX(e)||JX(e)))}var aV=nV,iV=VX,sV=aV;function oV(e,t){return e!=null&&sV(e,t,iV)}var uV=oV,fV=ty,lV=YX,cV=uV,hV=Gv,vV=ey,pV=ry,dV=us,gV=1,_V=2;function mV(e,t){return hV(e)&&vV(t)?pV(dV(e),t):function(r){var n=lV(r,e);return n===void 0&&n===t?cV(r,e):fV(t,n,gV|_V)}}var $V=mV;function bV(e){return e}var jv=bV;function yV(e){return function(t){return t==null?void 0:t[e]}}var wV=yV,SV=mf;function EV(e){return function(t){return SV(t,e)}}var CV=EV,OV=wV,AV=CV,TV=Gv,MV=us;function PV(e){return TV(e)?OV(MV(e)):AV(e)}var xV=PV,IV=iX,DV=$V,RV=jv,BV=xr,LV=xV;function FV(e){return typeof e=="function"?e:e==null?RV:typeof e=="object"?BV(e)?DV(e[0],e[1]):IV(e):LV(e)}var vo=FV,zV="Expected a function";function GV(e){if(typeof e!="function")throw new TypeError(zV);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var iy=GV,NV=Fb,jV=FW,qV=vo,UV=xr,kV=iy;function HV(e,t){var r=UV(e)?NV:jV;return r(e,kV(qV(t)))}var sy=HV,WV=Ub,KV=WV(Object.getPrototypeOf,Object),qv=KV,YV=es,XV=qv,VV=Oa,ZV="[object Object]",JV=Function.prototype,QV=Object.prototype,oy=JV.toString,tZ=QV.hasOwnProperty,eZ=oy.call(Object);function rZ(e){if(!VV(e)||YV(e)!=ZV)return!1;var t=XV(e);if(t===null)return!0;var r=tZ.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&oy.call(r)==eZ}var uy=rZ,nZ=ai,aZ=function(){try{var e=nZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),fy=aZ,b_=fy;function iZ(e,t,r){t=="__proto__"&&b_?b_(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Uv=iZ,sZ=Uv,oZ=Iv,uZ=Object.prototype,fZ=uZ.hasOwnProperty;function lZ(e,t,r){var n=e[t];(!(fZ.call(e,t)&&oZ(n,r))||r===void 0&&!(t in e))&&sZ(e,t,r)}var kv=lZ,cZ=kv,hZ=os,vZ=Av,y_=ni,pZ=us;function dZ(e,t,r,n){if(!y_(e))return e;t=hZ(t,e);for(var a=-1,i=t.length,s=i-1,u=e;u!=null&&++a<i;){var f=pZ(t[a]),c=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(a!=s){var h=u[f];c=n?n(h,f,u):void 0,c===void 0&&(c=y_(h)?h:vZ(t[a+1])?[]:{})}cZ(u,f,c),u=u[f]}return e}var gZ=dZ,_Z=mf,mZ=gZ,$Z=os;function bZ(e,t,r){for(var n=-1,a=t.length,i={};++n<a;){var s=t[n],u=_Z(e,s);r(u,s)&&mZ(i,$Z(s,e),u)}return i}var yZ=bZ,wZ=Lv,SZ=qv,EZ=Fv,CZ=Vb,OZ=Object.getOwnPropertySymbols,AZ=OZ?function(e){for(var t=[];e;)wZ(t,EZ(e)),e=SZ(e);return t}:CZ,ly=AZ;function TZ(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var MZ=TZ,PZ=ni,xZ=Pv,IZ=MZ,DZ=Object.prototype,RZ=DZ.hasOwnProperty;function BZ(e){if(!PZ(e))return IZ(e);var t=xZ(e),r=[];for(var n in e)n=="constructor"&&(t||!RZ.call(e,n))||r.push(n);return r}var LZ=BZ,FZ=qb,zZ=LZ,GZ=cf;function NZ(e){return GZ(e)?FZ(e,!0):zZ(e)}var Hv=NZ,jZ=Xb,qZ=ly,UZ=Hv;function kZ(e){return jZ(e,UZ,qZ)}var Wv=kZ,HZ=_f,WZ=vo,KZ=yZ,YZ=Wv;function XZ(e,t){if(e==null)return{};var r=HZ(YZ(e),function(n){return[n]});return t=WZ(t),KZ(e,r,function(n,a){return t(n,a[0])})}var VZ=XZ,ZZ=vo,JZ=iy,QZ=VZ;function tJ(e,t){return QZ(e,JZ(ZZ(t)))}var cy=tJ;function eJ(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var hy=eJ,rJ=jv;function nJ(e){return typeof e=="function"?e:rJ}var aJ=nJ,iJ=hy,sJ=xv,oJ=aJ,uJ=xr;function fJ(e,t){var r=uJ(e)?iJ:sJ;return r(e,oJ(t))}var lJ=fJ,cJ=xv,hJ=cf;function vJ(e,t){var r=-1,n=hJ(e)?Array(e.length):[];return cJ(e,function(a,i,s){n[++r]=t(a,i,s)}),n}var pJ=vJ,dJ=_f,gJ=vo,_J=pJ,mJ=xr;function $J(e,t){var r=mJ(e)?dJ:_J;return r(e,gJ(t))}var bJ=$J,yJ=Uv,wJ=Hb,SJ=vo;function EJ(e,t){var r={};return t=SJ(t),wJ(e,function(n,a,i){yJ(r,a,t(n,a,i))}),r}var CJ=EJ,OJ=kv,AJ=Uv;function TJ(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],f=n?n(r[u],e[u],u,r,e):void 0;f===void 0&&(f=e[u]),a?AJ(r,u,f):OJ(r,u,f)}return r}var po=TJ,MJ=po,PJ=ho;function xJ(e,t){return e&&MJ(t,PJ(t),e)}var IJ=xJ,DJ=po,RJ=Hv;function BJ(e,t){return e&&DJ(t,RJ(t),e)}var LJ=BJ,ih={exports:{}};(function(e,t){var r=An,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function f(c,h){if(h)return c.slice();var v=c.length,p=u?u(v):new c.constructor(v);return c.copy(p),p}e.exports=f})(ih,ih.exports);function FJ(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var zJ=FJ,GJ=po,NJ=Fv;function jJ(e,t){return GJ(e,NJ(e),t)}var qJ=jJ,UJ=po,kJ=ly;function HJ(e,t){return UJ(e,kJ(e),t)}var WJ=HJ,KJ=Object.prototype,YJ=KJ.hasOwnProperty;function XJ(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&YJ.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var VJ=XJ,w_=Yb;function ZJ(e){var t=new e.constructor(e.byteLength);return new w_(t).set(new w_(e)),t}var Kv=ZJ,JJ=Kv;function QJ(e,t){var r=t?JJ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var tQ=QJ,eQ=/\w*$/;function rQ(e){var t=new e.constructor(e.source,eQ.exec(e));return t.lastIndex=e.lastIndex,t}var nQ=rQ,S_=ts,E_=S_?S_.prototype:void 0,C_=E_?E_.valueOf:void 0;function aQ(e){return C_?Object(C_.call(e)):{}}var iQ=aQ,sQ=Kv;function oQ(e,t){var r=t?sQ(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var uQ=oQ,fQ=Kv,lQ=tQ,cQ=nQ,hQ=iQ,vQ=uQ,pQ="[object Boolean]",dQ="[object Date]",gQ="[object Map]",_Q="[object Number]",mQ="[object RegExp]",$Q="[object Set]",bQ="[object String]",yQ="[object Symbol]",wQ="[object ArrayBuffer]",SQ="[object DataView]",EQ="[object Float32Array]",CQ="[object Float64Array]",OQ="[object Int8Array]",AQ="[object Int16Array]",TQ="[object Int32Array]",MQ="[object Uint8Array]",PQ="[object Uint8ClampedArray]",xQ="[object Uint16Array]",IQ="[object Uint32Array]";function DQ(e,t,r){var n=e.constructor;switch(t){case wQ:return fQ(e);case pQ:case dQ:return new n(+e);case SQ:return lQ(e,r);case EQ:case CQ:case OQ:case AQ:case TQ:case MQ:case PQ:case xQ:case IQ:return vQ(e,r);case gQ:return new n;case _Q:case bQ:return new n(e);case mQ:return cQ(e);case $Q:return new n;case yQ:return hQ(e)}}var RQ=DQ,BQ=ni,O_=Object.create,LQ=function(){function e(){}return function(t){if(!BQ(t))return{};if(O_)return O_(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),FQ=LQ,zQ=FQ,GQ=qv,NQ=Pv;function jQ(e){return typeof e.constructor=="function"&&!NQ(e)?zQ(GQ(e)):{}}var qQ=jQ,UQ=gf,kQ=Oa,HQ="[object Map]";function WQ(e){return kQ(e)&&UQ(e)==HQ}var KQ=WQ,YQ=KQ,XQ=Mv,A_=Js.exports,T_=A_&&A_.isMap,VQ=T_?XQ(T_):YQ,ZQ=VQ,JQ=gf,QQ=Oa,ttt="[object Set]";function ett(e){return QQ(e)&&JQ(e)==ttt}var rtt=ett,ntt=rtt,att=Mv,M_=Js.exports,P_=M_&&M_.isSet,itt=P_?att(P_):ntt,stt=itt,ott=Bv,utt=hy,ftt=kv,ltt=IJ,ctt=LJ,htt=ih.exports,vtt=zJ,ptt=qJ,dtt=WJ,gtt=Zb,_tt=Wv,mtt=gf,$tt=VJ,btt=RQ,ytt=qQ,wtt=xr,Stt=Zs.exports,Ett=ZQ,Ctt=ni,Ott=stt,Att=ho,Ttt=Hv,Mtt=1,Ptt=2,xtt=4,vy="[object Arguments]",Itt="[object Array]",Dtt="[object Boolean]",Rtt="[object Date]",Btt="[object Error]",py="[object Function]",Ltt="[object GeneratorFunction]",Ftt="[object Map]",ztt="[object Number]",dy="[object Object]",Gtt="[object RegExp]",Ntt="[object Set]",jtt="[object String]",qtt="[object Symbol]",Utt="[object WeakMap]",ktt="[object ArrayBuffer]",Htt="[object DataView]",Wtt="[object Float32Array]",Ktt="[object Float64Array]",Ytt="[object Int8Array]",Xtt="[object Int16Array]",Vtt="[object Int32Array]",Ztt="[object Uint8Array]",Jtt="[object Uint8ClampedArray]",Qtt="[object Uint16Array]",tet="[object Uint32Array]",we={};we[vy]=we[Itt]=we[ktt]=we[Htt]=we[Dtt]=we[Rtt]=we[Wtt]=we[Ktt]=we[Ytt]=we[Xtt]=we[Vtt]=we[Ftt]=we[ztt]=we[dy]=we[Gtt]=we[Ntt]=we[jtt]=we[qtt]=we[Ztt]=we[Jtt]=we[Qtt]=we[tet]=!0;we[Btt]=we[py]=we[Utt]=!1;function xu(e,t,r,n,a,i){var s,u=t&Mtt,f=t&Ptt,c=t&xtt;if(r&&(s=a?r(e,n,a,i):r(e)),s!==void 0)return s;if(!Ctt(e))return e;var h=wtt(e);if(h){if(s=$tt(e),!u)return vtt(e,s)}else{var v=mtt(e),p=v==py||v==Ltt;if(Stt(e))return htt(e,u);if(v==dy||v==vy||p&&!a){if(s=f||p?{}:ytt(e),!u)return f?dtt(e,ctt(s,e)):ptt(e,ltt(s,e))}else{if(!we[v])return a?e:{};s=btt(e,v,u)}}i||(i=new ott);var g=i.get(e);if(g)return g;i.set(e,s),Ott(e)?e.forEach(function(b){s.add(xu(b,t,r,b,e,i))}):Ett(e)&&e.forEach(function(b,y){s.set(y,xu(b,t,r,y,e,i))});var _=c?f?_tt:gtt:f?Ttt:Att,m=h?void 0:_(e);return utt(m||e,function(b,y){m&&(y=b,b=e[y]),ftt(s,y,xu(b,t,r,y,e,i))}),s}var eet=xu;function ret(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var net=ret;function aet(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var iet=aet,set=mf,oet=iet;function uet(e,t){return t.length<2?e:set(e,oet(t,0,-1))}var fet=uet,cet=os,het=net,vet=fet,pet=us;function det(e,t){return t=cet(t,e),e=vet(e,t),e==null||delete e[pet(het(t))]}var get=det,_et=uy;function met(e){return _et(e)?void 0:e}var $et=met,x_=ts,bet=Ov,yet=xr,I_=x_?x_.isConcatSpreadable:void 0;function wet(e){return yet(e)||bet(e)||!!(I_&&e&&e[I_])}var Eet=wet,Cet=Lv,Oet=Eet;function gy(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=Oet),a||(a=[]);++i<s;){var u=e[i];t>0&&r(u)?t>1?gy(u,t-1,r,n,a):Cet(a,u):n||(a[a.length]=u)}return a}var Aet=gy,Tet=Aet;function Met(e){var t=e==null?0:e.length;return t?Tet(e,1):[]}var Pet=Met;function xet(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Iet=xet,Det=Iet,D_=Math.max;function Ret(e,t,r){return t=D_(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=D_(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=n[a];return u[t]=r(s),Det(e,this,u)}}var Bet=Ret;function Let(e){return function(){return e}}var Fet=Let,zet=Fet,R_=fy,Get=jv,Net=R_?function(e,t){return R_(e,"toString",{configurable:!0,enumerable:!1,value:zet(t),writable:!0})}:Get,jet=Net,qet=800,Uet=16,ket=Date.now;function Het(e){var t=0,r=0;return function(){var n=ket(),a=Uet-(n-r);if(r=n,a>0){if(++t>=qet)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wet=Het,Ket=jet,Yet=Wet,Xet=Yet(Ket),Vet=Xet,Zet=Pet,Jet=Bet,Qet=Vet;function trt(e){return Qet(Jet(e,void 0,Zet),e+"")}var ert=trt,rrt=_f,nrt=eet,art=get,irt=os,srt=po,ort=$et,urt=ert,frt=Wv,lrt=1,crt=2,hrt=4,vrt=urt(function(e,t){var r={};if(e==null)return r;var n=!1;t=rrt(t,function(i){return i=irt(i,e),n||(n=i.length>1),i}),srt(e,frt(e),r),n&&(r=nrt(r,lrt|crt|hrt,ort));for(var a=t.length;a--;)art(r,t[a]);return r}),prt=vrt;function drt(e){return e}function _y(e){var t=e;return function(){return t}}function my(e){return Array.isArray(e)?e:sy((""+e).split("."),function(t){return!t})}var _e="@@updeep/placeholder";function $f(e,t){var r=e.length;for(r>t&&(r=t);e[r-1]===_e;)r-=1;return r}function hn(e){return function t(r){var n=[].slice.call(arguments,1),a=n[0],i=n[1],s=$f(arguments);return s>=1?e(r,a,i):t}}function ln(e){return function t(r,n){var a=[].slice.call(arguments,2),i=a[0],s=a[1],u=$f(arguments,2);if(n===_e||i===_e||s===_e)throw new Error("Can only use placeholder on first argument of this function.");return u>=2?r===_e?hn(function(f,c,h){return e(f,n,c,h)}):e(r,n,i,s):u===1?hn(function(f,c,h){return e(r,f,c,h)}):t}}function Rs(e){return function t(r,n,a){var i=[].slice.call(arguments,3),s=i[0],u=i[1],f=$f(arguments,3);if(a===_e||s===_e||u===_e)throw new Error("Can only use placeholder on first or second argument of this function.");return f>=3?r===_e?n===_e?ln(function(c,h,v,p){return e(c,h,a,v,p)}):hn(function(c,h,v){return e(c,n,a,h,v)}):n===_e?hn(function(c,h,v){return e(r,c,a,h,v)}):e(r,n,a,s,u):f===2?r===_e?ln(function(c,h,v,p){return e(c,n,h,v,p)}):hn(function(c,h,v){return e(r,n,c,h,v)}):f===1?ln(function(c,h,v,p){return e(r,c,h,v,p)}):t}}function grt(e){return function t(r,n,a,i){var s=[].slice.call(arguments,4),u=s[0],f=s[1],c=$f(arguments,4);if(i===_e||u===_e||f===_e)throw new Error("Can only use placeholder on first, second or third argument of this function.");return c>=4?r===_e?n===_e?a===_e?Rs(function(h,v,p,g,_){return e(h,v,p,i,g,_)}):ln(function(h,v,p,g){return e(h,v,a,i,p,g)}):a===_e?ln(function(h,v,p,g){return e(h,n,v,i,p,g)}):hn(function(h,v,p){return e(h,n,a,i,v,p)}):n===_e?a===_e?ln(function(h,v,p,g){return e(r,h,v,i,p,g)}):hn(function(h,v,p){return e(r,h,a,i,v,p)}):a===_e?hn(function(h,v,p){return e(r,n,h,i,v,p)}):e(r,n,a,i,u,f):c===3?r===_e?n===_e?Rs(function(h,v,p,g,_){return e(h,v,a,p,g,_)}):ln(function(h,v,p,g){return e(h,n,a,v,p,g)}):n===_e?ln(function(h,v,p,g){return e(r,h,a,v,p,g)}):hn(function(h,v,p){return e(r,n,a,h,v,p)}):c===2?r===_e?Rs(function(h,v,p,g,_){return e(h,n,v,p,g,_)}):ln(function(h,v,p,g){return e(r,n,h,v,p,g)}):c===1?Rs(function(h,v,p,g,_){return e(r,h,v,p,g,_)}):t}}function go(e,t){return t===void 0&&(t=e.length),[e,hn,ln,Rs,grt][t](e)}var _rt=go(function(e,t,r){for(var n=my(e),a=r,i=0;i<n.length;i+=1){if(a===void 0)return!1;a=a[n[i]]}return typeof t=="function"?t(a):t===a});function $y(){return($y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function fs(e,t){return t===void 0&&(t=e.length),go(function(){return e.apply(void 0,[].slice.call(arguments))},t)}var sh={__omitted:!0},mrt=_y(sh);function $rt(e){return!Object.keys(e).length}function brt(e,t){return function(r,n,a){return Object.keys(r).reduce(function(i,s){return n(i,r[s],s)},{})}(e,function(r,n,a){var i=n;return Array.isArray(n)||n===null||typeof n!="object"?typeof n=="function"&&(i=n(t[a])):i=by(n,t[a]),t[a]!==i&&(r[a]=i),r})}function yrt(e,t){var r=[].concat(t);return Object.keys(e).forEach(function(n){r[n]=e[n]}),r}function by(e,t){if(typeof e=="function")return e.apply(void 0,[t].concat([].slice.call(arguments,2)));if(!uy(e))return e;var r=t==null?{}:t,n=brt(e,r);return $rt(n)?r:Array.isArray(r)?yrt(n,r).filter(function(a){return a!==sh}):cy($y({},r,n),function(a){return a===sh})}var ii=fs(by,2),yy=fs(function(e,t,r,n){var a=typeof e=="function"?e(n):e;return ii(a?t:r,n)}),wrt=go(function(e,t,r){return yy(e,t,function(n){return n},r)}),wy=fs(function(e,t){var r=typeof e=="function"?e:ii(e),n=(Array.isArray(t)?bJ:CJ)(t,r);return function(a,i){var s=!0;return lJ(i,function(u,f){if(u!==a[f])return s=!1,!1}),s}(t,n)?t:n}),Srt=fs(function(e,t){return prt(t,e)}),Ert=fs(function(e,t){return cy(t,e)}),Crt=fs(function(e,t){var r=sy(t,e);return t.length===r.length?t:r});function Ort(e,t){var r;return t==="*"?function(n){var a;return Object.prototype.hasOwnProperty.call(n,"*")?ii(((a={})["*"]=e,a),n):wy(e,n)}:((r={})[t]=e,r)}var Art=go(function(e,t,r){var n=my(e).reduceRight(Ort,t);return ii(n,r)}),Trt=go(function(e,t,r){return ii(t,r===void 0?e:r)}),Rt=ii;Rt._=_e,Rt.constant=_y,Rt.if=wrt,Rt.ifElse=yy,Rt.is=_rt,Rt.freeze=drt,Rt.map=wy,Rt.omit=Srt,Rt.omitBy=Ert,Rt.reject=Crt,Rt.update=ii,Rt.updateIn=Art,Rt.omitted=mrt,Rt.withDefault=Trt;var ju="NOT_FOUND";function Mrt(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:ju},put:function(n,a){t={key:n,value:a}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function Prt(e,t){var r=[];function n(u){var f=r.findIndex(function(h){return t(u,h.key)});if(f>-1){var c=r[f];return f>0&&(r.splice(f,1),r.unshift(c)),c.value}return ju}function a(u,f){n(u)===ju&&(r.unshift({key:u,value:f}),r.length>e&&r.pop())}function i(){return r}function s(){r=[]}return{get:n,put:a,getEntries:i,clear:s}}var xrt=function(t,r){return t===r};function Irt(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var a=r.length,i=0;i<a;i++)if(!e(r[i],n[i]))return!1;return!0}}function Drt(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,a=n===void 0?xrt:n,i=r.maxSize,s=i===void 0?1:i,u=r.resultEqualityCheck,f=Irt(a),c=s===1?Mrt(f):Prt(s,f);function h(){var v=c.get(arguments);if(v===ju){if(v=e.apply(null,arguments),u){var p=c.getEntries(),g=p.find(function(_){return u(_.value,v)});g&&(v=g.value)}c.put(arguments,v)}return v}return h.clearCache=function(){return c.clear()},h}function Rrt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function Brt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var a=function(){for(var s=arguments.length,u=new Array(s),f=0;f<s;f++)u[f]=arguments[f];var c=0,h,v={memoizeOptions:void 0},p=u.pop();if(typeof p=="object"&&(v=p,p=u.pop()),typeof p!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof p+"]");var g=v,_=g.memoizeOptions,m=_===void 0?r:_,b=Array.isArray(m)?m:[m],y=Rrt(u),w=e.apply(void 0,[function(){return c++,p.apply(null,arguments)}].concat(b)),O=e(function(){for(var T=[],A=y.length,I=0;I<A;I++)T.push(y[I].apply(null,arguments));return h=w.apply(null,T),h});return Object.assign(O,{resultFunc:p,memoizedResultFunc:w,dependencies:y,lastResult:function(){return h},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),O};return a}var Yv=Brt(Drt);const Aa=new Ke({initial:{cost:0,mass:0}}),Xv=new Ke({subduxes:{reqs:Aa},initial:{rating:1,advanced:!1},actions:{setDrive:null,setDriveReqs:null}});Xv.setMutation("setDrive",e=>Rt(e));Xv.setMutation("setDriveReqs",e=>Rt({reqs:e}));const Lrt=e=>Yv([t=>t.reqs.mass,t=>t.propulsion.drive.rating,t=>t.propulsion.drive.advanced],(t,r,n)=>e.dispatch.setDriveReqs(Frt(t,r,n)));function Frt(e,t,r=!1){const n=Math.ceil(t*.05*e),a=n*(r?3:2);return{mass:n,cost:a}}const Vv=new Ke({subduxes:{reqs:Aa},initial:{type:"none",uiTransform:""},actions:{setFtl:null,setFtlReqs:null}});Vv.setMutation("setFtl",e=>Rt({type:e}));Vv.setMutation("setFtlReqs",e=>Rt({reqs:e}));function zrt(e,t){if(e==="none")return{cost:0,mass:0};const r=Math.ceil(t/10);return{mass:r,cost:r*(e==="advanced"?3:2)}}const Grt=e=>Yv([t=>t.propulsion.ftl.type,t=>t.reqs.mass],(t,r)=>e.dispatch.setFtlReqs(zrt(t,r))),Nrt=new Ke({subduxes:{drive:Xv,ftl:Vv}});var oh={exports:{}};/**
|
|
* @license
|
|
* Lodash <https://lodash.com/>
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
* Released under MIT license <https://lodash.com/license>
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
*/(function(e,t){(function(){var r,n="4.17.21",a=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",c=500,h="__lodash_placeholder__",v=1,p=2,g=4,_=1,m=2,b=1,y=2,w=4,O=8,T=16,A=32,I=64,x=128,B=256,M=512,L=30,G="...",W=800,at=16,et=1,rt=2,gt=3,lt=1/0,pt=9007199254740991,dt=17976931348623157e292,K=0/0,it=4294967295,jt=it-1,Ft=it>>>1,Vt=[["ary",x],["bind",b],["bindKey",y],["curry",O],["curryRight",T],["flip",M],["partial",A],["partialRight",I],["rearg",B]],_t="[object Arguments]",It="[object Array]",$e="[object AsyncFunction]",ee="[object Boolean]",Ct="[object Date]",Ie="[object DOMException]",ve="[object Error]",le="[object Function]",Ht="[object GeneratorFunction]",yt="[object Map]",wt="[object Number]",pe="[object Null]",Se="[object Object]",Ut="[object Promise]",zt="[object Proxy]",ze="[object RegExp]",Ge="[object Set]",Wr="[object String]",Ir="[object Symbol]",Vn="[object Undefined]",dr="[object WeakMap]",Ta="[object WeakSet]",Ma="[object ArrayBuffer]",Zn="[object DataView]",Jn="[object Float32Array]",fi="[object Float64Array]",cs="[object Int8Array]",li="[object Int16Array]",Gf="[object Int32Array]",Nf="[object Uint8Array]",jf="[object Uint8ClampedArray]",qf="[object Uint16Array]",Uf="[object Uint32Array]",Hw=/\b__p \+= '';/g,Ww=/\b(__p \+=) '' \+/g,Kw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xp=/&(?:amp|lt|gt|quot|#39);/g,Ip=/[&<>"']/g,Yw=RegExp(xp.source),Xw=RegExp(Ip.source),Vw=/<%-([\s\S]+?)%>/g,Zw=/<%([\s\S]+?)%>/g,Dp=/<%=([\s\S]+?)%>/g,Jw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qw=/^\w*$/,tS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kf=/[\\^$.*+?()[\]{}|]/g,eS=RegExp(kf.source),Hf=/^\s+/,rS=/\s/,nS=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,aS=/\{\n\/\* \[wrapped with (.+)\] \*/,iS=/,? & /,sS=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oS=/[()=,{}\[\]\/\s]/,uS=/\\(\\)?/g,fS=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rp=/\w*$/,lS=/^[-+]0x[0-9a-f]+$/i,cS=/^0b[01]+$/i,hS=/^\[object .+?Constructor\]$/,vS=/^0o[0-7]+$/i,pS=/^(?:0|[1-9]\d*)$/,dS=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oo=/($^)/,gS=/['\n\r\u2028\u2029\\]/g,Ao="\\ud800-\\udfff",_S="\\u0300-\\u036f",mS="\\ufe20-\\ufe2f",$S="\\u20d0-\\u20ff",Bp=_S+mS+$S,Lp="\\u2700-\\u27bf",Fp="a-z\\xdf-\\xf6\\xf8-\\xff",bS="\\xac\\xb1\\xd7\\xf7",yS="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wS="\\u2000-\\u206f",SS=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zp="A-Z\\xc0-\\xd6\\xd8-\\xde",Gp="\\ufe0e\\ufe0f",Np=bS+yS+wS+SS,Wf="['\u2019]",ES="["+Ao+"]",jp="["+Np+"]",To="["+Bp+"]",qp="\\d+",CS="["+Lp+"]",Up="["+Fp+"]",kp="[^"+Ao+Np+qp+Lp+Fp+zp+"]",Kf="\\ud83c[\\udffb-\\udfff]",OS="(?:"+To+"|"+Kf+")",Hp="[^"+Ao+"]",Yf="(?:\\ud83c[\\udde6-\\uddff]){2}",Xf="[\\ud800-\\udbff][\\udc00-\\udfff]",ci="["+zp+"]",Wp="\\u200d",Kp="(?:"+Up+"|"+kp+")",AS="(?:"+ci+"|"+kp+")",Yp="(?:"+Wf+"(?:d|ll|m|re|s|t|ve))?",Xp="(?:"+Wf+"(?:D|LL|M|RE|S|T|VE))?",Vp=OS+"?",Zp="["+Gp+"]?",TS="(?:"+Wp+"(?:"+[Hp,Yf,Xf].join("|")+")"+Zp+Vp+")*",MS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",PS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jp=Zp+Vp+TS,xS="(?:"+[CS,Yf,Xf].join("|")+")"+Jp,IS="(?:"+[Hp+To+"?",To,Yf,Xf,ES].join("|")+")",DS=RegExp(Wf,"g"),RS=RegExp(To,"g"),Vf=RegExp(Kf+"(?="+Kf+")|"+IS+Jp,"g"),BS=RegExp([ci+"?"+Up+"+"+Yp+"(?="+[jp,ci,"$"].join("|")+")",AS+"+"+Xp+"(?="+[jp,ci+Kp,"$"].join("|")+")",ci+"?"+Kp+"+"+Yp,ci+"+"+Xp,PS,MS,qp,xS].join("|"),"g"),LS=RegExp("["+Wp+Ao+Bp+Gp+"]"),FS=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zS=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],GS=-1,Ee={};Ee[Jn]=Ee[fi]=Ee[cs]=Ee[li]=Ee[Gf]=Ee[Nf]=Ee[jf]=Ee[qf]=Ee[Uf]=!0,Ee[_t]=Ee[It]=Ee[Ma]=Ee[ee]=Ee[Zn]=Ee[Ct]=Ee[ve]=Ee[le]=Ee[yt]=Ee[wt]=Ee[Se]=Ee[ze]=Ee[Ge]=Ee[Wr]=Ee[dr]=!1;var be={};be[_t]=be[It]=be[Ma]=be[Zn]=be[ee]=be[Ct]=be[Jn]=be[fi]=be[cs]=be[li]=be[Gf]=be[yt]=be[wt]=be[Se]=be[ze]=be[Ge]=be[Wr]=be[Ir]=be[Nf]=be[jf]=be[qf]=be[Uf]=!0,be[ve]=be[le]=be[dr]=!1;var NS={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},jS={"&":"&","<":"<",">":">",'"':""","'":"'"},qS={"&":"&","<":"<",">":">",""":'"',"'":"'"},US={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kS=parseFloat,HS=parseInt,Qp=typeof Er=="object"&&Er&&Er.Object===Object&&Er,WS=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Qp||WS||Function("return this")(),Zf=t&&!t.nodeType&&t,Pa=Zf&&!0&&e&&!e.nodeType&&e,td=Pa&&Pa.exports===Zf,Jf=td&&Qp.process,Dr=function(){try{var z=Pa&&Pa.require&&Pa.require("util").types;return z||Jf&&Jf.binding&&Jf.binding("util")}catch{}}(),ed=Dr&&Dr.isArrayBuffer,rd=Dr&&Dr.isDate,nd=Dr&&Dr.isMap,ad=Dr&&Dr.isRegExp,id=Dr&&Dr.isSet,sd=Dr&&Dr.isTypedArray;function gr(z,Y,q){switch(q.length){case 0:return z.call(Y);case 1:return z.call(Y,q[0]);case 2:return z.call(Y,q[0],q[1]);case 3:return z.call(Y,q[0],q[1],q[2])}return z.apply(Y,q)}function KS(z,Y,q,mt){for(var Bt=-1,oe=z==null?0:z.length;++Bt<oe;){var Ue=z[Bt];Y(mt,Ue,q(Ue),z)}return mt}function Rr(z,Y){for(var q=-1,mt=z==null?0:z.length;++q<mt&&Y(z[q],q,z)!==!1;);return z}function YS(z,Y){for(var q=z==null?0:z.length;q--&&Y(z[q],q,z)!==!1;);return z}function od(z,Y){for(var q=-1,mt=z==null?0:z.length;++q<mt;)if(!Y(z[q],q,z))return!1;return!0}function Qn(z,Y){for(var q=-1,mt=z==null?0:z.length,Bt=0,oe=[];++q<mt;){var Ue=z[q];Y(Ue,q,z)&&(oe[Bt++]=Ue)}return oe}function Mo(z,Y){var q=z==null?0:z.length;return!!q&&hi(z,Y,0)>-1}function Qf(z,Y,q){for(var mt=-1,Bt=z==null?0:z.length;++mt<Bt;)if(q(Y,z[mt]))return!0;return!1}function Me(z,Y){for(var q=-1,mt=z==null?0:z.length,Bt=Array(mt);++q<mt;)Bt[q]=Y(z[q],q,z);return Bt}function ta(z,Y){for(var q=-1,mt=Y.length,Bt=z.length;++q<mt;)z[Bt+q]=Y[q];return z}function tl(z,Y,q,mt){var Bt=-1,oe=z==null?0:z.length;for(mt&&oe&&(q=z[++Bt]);++Bt<oe;)q=Y(q,z[Bt],Bt,z);return q}function XS(z,Y,q,mt){var Bt=z==null?0:z.length;for(mt&&Bt&&(q=z[--Bt]);Bt--;)q=Y(q,z[Bt],Bt,z);return q}function el(z,Y){for(var q=-1,mt=z==null?0:z.length;++q<mt;)if(Y(z[q],q,z))return!0;return!1}var VS=rl("length");function ZS(z){return z.split("")}function JS(z){return z.match(sS)||[]}function ud(z,Y,q){var mt;return q(z,function(Bt,oe,Ue){if(Y(Bt,oe,Ue))return mt=oe,!1}),mt}function Po(z,Y,q,mt){for(var Bt=z.length,oe=q+(mt?1:-1);mt?oe--:++oe<Bt;)if(Y(z[oe],oe,z))return oe;return-1}function hi(z,Y,q){return Y===Y?lE(z,Y,q):Po(z,fd,q)}function QS(z,Y,q,mt){for(var Bt=q-1,oe=z.length;++Bt<oe;)if(mt(z[Bt],Y))return Bt;return-1}function fd(z){return z!==z}function ld(z,Y){var q=z==null?0:z.length;return q?al(z,Y)/q:K}function rl(z){return function(Y){return Y==null?r:Y[z]}}function nl(z){return function(Y){return z==null?r:z[Y]}}function cd(z,Y,q,mt,Bt){return Bt(z,function(oe,Ue,de){q=mt?(mt=!1,oe):Y(q,oe,Ue,de)}),q}function tE(z,Y){var q=z.length;for(z.sort(Y);q--;)z[q]=z[q].value;return z}function al(z,Y){for(var q,mt=-1,Bt=z.length;++mt<Bt;){var oe=Y(z[mt]);oe!==r&&(q=q===r?oe:q+oe)}return q}function il(z,Y){for(var q=-1,mt=Array(z);++q<z;)mt[q]=Y(q);return mt}function eE(z,Y){return Me(Y,function(q){return[q,z[q]]})}function hd(z){return z&&z.slice(0,gd(z)+1).replace(Hf,"")}function _r(z){return function(Y){return z(Y)}}function sl(z,Y){return Me(Y,function(q){return z[q]})}function hs(z,Y){return z.has(Y)}function vd(z,Y){for(var q=-1,mt=z.length;++q<mt&&hi(Y,z[q],0)>-1;);return q}function pd(z,Y){for(var q=z.length;q--&&hi(Y,z[q],0)>-1;);return q}function rE(z,Y){for(var q=z.length,mt=0;q--;)z[q]===Y&&++mt;return mt}var nE=nl(NS),aE=nl(jS);function iE(z){return"\\"+US[z]}function sE(z,Y){return z==null?r:z[Y]}function vi(z){return LS.test(z)}function oE(z){return FS.test(z)}function uE(z){for(var Y,q=[];!(Y=z.next()).done;)q.push(Y.value);return q}function ol(z){var Y=-1,q=Array(z.size);return z.forEach(function(mt,Bt){q[++Y]=[Bt,mt]}),q}function dd(z,Y){return function(q){return z(Y(q))}}function ea(z,Y){for(var q=-1,mt=z.length,Bt=0,oe=[];++q<mt;){var Ue=z[q];(Ue===Y||Ue===h)&&(z[q]=h,oe[Bt++]=q)}return oe}function xo(z){var Y=-1,q=Array(z.size);return z.forEach(function(mt){q[++Y]=mt}),q}function fE(z){var Y=-1,q=Array(z.size);return z.forEach(function(mt){q[++Y]=[mt,mt]}),q}function lE(z,Y,q){for(var mt=q-1,Bt=z.length;++mt<Bt;)if(z[mt]===Y)return mt;return-1}function cE(z,Y,q){for(var mt=q+1;mt--;)if(z[mt]===Y)return mt;return mt}function pi(z){return vi(z)?vE(z):VS(z)}function Kr(z){return vi(z)?pE(z):ZS(z)}function gd(z){for(var Y=z.length;Y--&&rS.test(z.charAt(Y)););return Y}var hE=nl(qS);function vE(z){for(var Y=Vf.lastIndex=0;Vf.test(z);)++Y;return Y}function pE(z){return z.match(Vf)||[]}function dE(z){return z.match(BS)||[]}var gE=function z(Y){Y=Y==null?Ye:di.defaults(Ye.Object(),Y,di.pick(Ye,zS));var q=Y.Array,mt=Y.Date,Bt=Y.Error,oe=Y.Function,Ue=Y.Math,de=Y.Object,ul=Y.RegExp,_E=Y.String,Br=Y.TypeError,Io=q.prototype,mE=oe.prototype,gi=de.prototype,Do=Y["__core-js_shared__"],Ro=mE.toString,ce=gi.hasOwnProperty,$E=0,_d=function(){var o=/[^.]+$/.exec(Do&&Do.keys&&Do.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Bo=gi.toString,bE=Ro.call(de),yE=Ye._,wE=ul("^"+Ro.call(ce).replace(kf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lo=td?Y.Buffer:r,ra=Y.Symbol,Fo=Y.Uint8Array,md=Lo?Lo.allocUnsafe:r,zo=dd(de.getPrototypeOf,de),$d=de.create,bd=gi.propertyIsEnumerable,Go=Io.splice,yd=ra?ra.isConcatSpreadable:r,vs=ra?ra.iterator:r,xa=ra?ra.toStringTag:r,No=function(){try{var o=La(de,"defineProperty");return o({},"",{}),o}catch{}}(),SE=Y.clearTimeout!==Ye.clearTimeout&&Y.clearTimeout,EE=mt&&mt.now!==Ye.Date.now&&mt.now,CE=Y.setTimeout!==Ye.setTimeout&&Y.setTimeout,jo=Ue.ceil,qo=Ue.floor,fl=de.getOwnPropertySymbols,OE=Lo?Lo.isBuffer:r,wd=Y.isFinite,AE=Io.join,TE=dd(de.keys,de),ke=Ue.max,Qe=Ue.min,ME=mt.now,PE=Y.parseInt,Sd=Ue.random,xE=Io.reverse,ll=La(Y,"DataView"),ps=La(Y,"Map"),cl=La(Y,"Promise"),_i=La(Y,"Set"),ds=La(Y,"WeakMap"),gs=La(de,"create"),Uo=ds&&new ds,mi={},IE=Fa(ll),DE=Fa(ps),RE=Fa(cl),BE=Fa(_i),LE=Fa(ds),ko=ra?ra.prototype:r,_s=ko?ko.valueOf:r,Ed=ko?ko.toString:r;function E(o){if(Be(o)&&!Gt(o)&&!(o instanceof Jt)){if(o instanceof Lr)return o;if(ce.call(o,"__wrapped__"))return Cg(o)}return new Lr(o)}var $i=function(){function o(){}return function(l){if(!De(l))return{};if($d)return $d(l);o.prototype=l;var d=new o;return o.prototype=r,d}}();function Ho(){}function Lr(o,l){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}E.templateSettings={escape:Vw,evaluate:Zw,interpolate:Dp,variable:"",imports:{_:E}},E.prototype=Ho.prototype,E.prototype.constructor=E,Lr.prototype=$i(Ho.prototype),Lr.prototype.constructor=Lr;function Jt(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=it,this.__views__=[]}function FE(){var o=new Jt(this.__wrapped__);return o.__actions__=fr(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=fr(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=fr(this.__views__),o}function zE(){if(this.__filtered__){var o=new Jt(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function GE(){var o=this.__wrapped__.value(),l=this.__dir__,d=Gt(o),$=l<0,S=d?o.length:0,C=ZC(0,S,this.__views__),D=C.start,R=C.end,N=R-D,Z=$?R:D-1,Q=this.__iteratees__,nt=Q.length,ct=0,St=Qe(N,this.__takeCount__);if(!d||!$&&S==N&&St==N)return Yd(o,this.__actions__);var Pt=[];t:for(;N--&&ct<St;){Z+=l;for(var Wt=-1,xt=o[Z];++Wt<nt;){var Zt=Q[Wt],re=Zt.iteratee,br=Zt.type,ir=re(xt);if(br==rt)xt=ir;else if(!ir){if(br==et)continue t;break t}}Pt[ct++]=xt}return Pt}Jt.prototype=$i(Ho.prototype),Jt.prototype.constructor=Jt;function Ia(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l<d;){var $=o[l];this.set($[0],$[1])}}function NE(){this.__data__=gs?gs(null):{},this.size=0}function jE(o){var l=this.has(o)&&delete this.__data__[o];return this.size-=l?1:0,l}function qE(o){var l=this.__data__;if(gs){var d=l[o];return d===f?r:d}return ce.call(l,o)?l[o]:r}function UE(o){var l=this.__data__;return gs?l[o]!==r:ce.call(l,o)}function kE(o,l){var d=this.__data__;return this.size+=this.has(o)?0:1,d[o]=gs&&l===r?f:l,this}Ia.prototype.clear=NE,Ia.prototype.delete=jE,Ia.prototype.get=qE,Ia.prototype.has=UE,Ia.prototype.set=kE;function Pn(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l<d;){var $=o[l];this.set($[0],$[1])}}function HE(){this.__data__=[],this.size=0}function WE(o){var l=this.__data__,d=Wo(l,o);if(d<0)return!1;var $=l.length-1;return d==$?l.pop():Go.call(l,d,1),--this.size,!0}function KE(o){var l=this.__data__,d=Wo(l,o);return d<0?r:l[d][1]}function YE(o){return Wo(this.__data__,o)>-1}function XE(o,l){var d=this.__data__,$=Wo(d,o);return $<0?(++this.size,d.push([o,l])):d[$][1]=l,this}Pn.prototype.clear=HE,Pn.prototype.delete=WE,Pn.prototype.get=KE,Pn.prototype.has=YE,Pn.prototype.set=XE;function xn(o){var l=-1,d=o==null?0:o.length;for(this.clear();++l<d;){var $=o[l];this.set($[0],$[1])}}function VE(){this.size=0,this.__data__={hash:new Ia,map:new(ps||Pn),string:new Ia}}function ZE(o){var l=au(this,o).delete(o);return this.size-=l?1:0,l}function JE(o){return au(this,o).get(o)}function QE(o){return au(this,o).has(o)}function tC(o,l){var d=au(this,o),$=d.size;return d.set(o,l),this.size+=d.size==$?0:1,this}xn.prototype.clear=VE,xn.prototype.delete=ZE,xn.prototype.get=JE,xn.prototype.has=QE,xn.prototype.set=tC;function Da(o){var l=-1,d=o==null?0:o.length;for(this.__data__=new xn;++l<d;)this.add(o[l])}function eC(o){return this.__data__.set(o,f),this}function rC(o){return this.__data__.has(o)}Da.prototype.add=Da.prototype.push=eC,Da.prototype.has=rC;function Yr(o){var l=this.__data__=new Pn(o);this.size=l.size}function nC(){this.__data__=new Pn,this.size=0}function aC(o){var l=this.__data__,d=l.delete(o);return this.size=l.size,d}function iC(o){return this.__data__.get(o)}function sC(o){return this.__data__.has(o)}function oC(o,l){var d=this.__data__;if(d instanceof Pn){var $=d.__data__;if(!ps||$.length<a-1)return $.push([o,l]),this.size=++d.size,this;d=this.__data__=new xn($)}return d.set(o,l),this.size=d.size,this}Yr.prototype.clear=nC,Yr.prototype.delete=aC,Yr.prototype.get=iC,Yr.prototype.has=sC,Yr.prototype.set=oC;function Cd(o,l){var d=Gt(o),$=!d&&za(o),S=!d&&!$&&oa(o),C=!d&&!$&&!S&&Si(o),D=d||$||S||C,R=D?il(o.length,_E):[],N=R.length;for(var Z in o)(l||ce.call(o,Z))&&!(D&&(Z=="length"||S&&(Z=="offset"||Z=="parent")||C&&(Z=="buffer"||Z=="byteLength"||Z=="byteOffset")||Bn(Z,N)))&&R.push(Z);return R}function Od(o){var l=o.length;return l?o[wl(0,l-1)]:r}function uC(o,l){return iu(fr(o),Ra(l,0,o.length))}function fC(o){return iu(fr(o))}function hl(o,l,d){(d!==r&&!Xr(o[l],d)||d===r&&!(l in o))&&In(o,l,d)}function ms(o,l,d){var $=o[l];(!(ce.call(o,l)&&Xr($,d))||d===r&&!(l in o))&&In(o,l,d)}function Wo(o,l){for(var d=o.length;d--;)if(Xr(o[d][0],l))return d;return-1}function lC(o,l,d,$){return na(o,function(S,C,D){l($,S,d(S),D)}),$}function Ad(o,l){return o&&on(l,We(l),o)}function cC(o,l){return o&&on(l,cr(l),o)}function In(o,l,d){l=="__proto__"&&No?No(o,l,{configurable:!0,enumerable:!0,value:d,writable:!0}):o[l]=d}function vl(o,l){for(var d=-1,$=l.length,S=q($),C=o==null;++d<$;)S[d]=C?r:Kl(o,l[d]);return S}function Ra(o,l,d){return o===o&&(d!==r&&(o=o<=d?o:d),l!==r&&(o=o>=l?o:l)),o}function Fr(o,l,d,$,S,C){var D,R=l&v,N=l&p,Z=l&g;if(d&&(D=S?d(o,$,S,C):d(o)),D!==r)return D;if(!De(o))return o;var Q=Gt(o);if(Q){if(D=QC(o),!R)return fr(o,D)}else{var nt=tr(o),ct=nt==le||nt==Ht;if(oa(o))return Zd(o,R);if(nt==Se||nt==_t||ct&&!S){if(D=N||ct?{}:gg(o),!R)return N?qC(o,cC(D,o)):jC(o,Ad(D,o))}else{if(!be[nt])return S?o:{};D=tO(o,nt,R)}}C||(C=new Yr);var St=C.get(o);if(St)return St;C.set(o,D),Hg(o)?o.forEach(function(xt){D.add(Fr(xt,l,d,xt,o,C))}):Ug(o)&&o.forEach(function(xt,Zt){D.set(Zt,Fr(xt,l,d,Zt,o,C))});var Pt=Z?N?Dl:Il:N?cr:We,Wt=Q?r:Pt(o);return Rr(Wt||o,function(xt,Zt){Wt&&(Zt=xt,xt=o[Zt]),ms(D,Zt,Fr(xt,l,d,Zt,o,C))}),D}function hC(o){var l=We(o);return function(d){return Td(d,o,l)}}function Td(o,l,d){var $=d.length;if(o==null)return!$;for(o=de(o);$--;){var S=d[$],C=l[S],D=o[S];if(D===r&&!(S in o)||!C(D))return!1}return!0}function Md(o,l,d){if(typeof o!="function")throw new Br(s);return Cs(function(){o.apply(r,d)},l)}function $s(o,l,d,$){var S=-1,C=Mo,D=!0,R=o.length,N=[],Z=l.length;if(!R)return N;d&&(l=Me(l,_r(d))),$?(C=Qf,D=!1):l.length>=a&&(C=hs,D=!1,l=new Da(l));t:for(;++S<R;){var Q=o[S],nt=d==null?Q:d(Q);if(Q=$||Q!==0?Q:0,D&&nt===nt){for(var ct=Z;ct--;)if(l[ct]===nt)continue t;N.push(Q)}else C(l,nt,$)||N.push(Q)}return N}var na=rg(sn),Pd=rg(dl,!0);function vC(o,l){var d=!0;return na(o,function($,S,C){return d=!!l($,S,C),d}),d}function Ko(o,l,d){for(var $=-1,S=o.length;++$<S;){var C=o[$],D=l(C);if(D!=null&&(R===r?D===D&&!$r(D):d(D,R)))var R=D,N=C}return N}function pC(o,l,d,$){var S=o.length;for(d=kt(d),d<0&&(d=-d>S?0:S+d),$=$===r||$>S?S:kt($),$<0&&($+=S),$=d>$?0:Kg($);d<$;)o[d++]=l;return o}function xd(o,l){var d=[];return na(o,function($,S,C){l($,S,C)&&d.push($)}),d}function Xe(o,l,d,$,S){var C=-1,D=o.length;for(d||(d=rO),S||(S=[]);++C<D;){var R=o[C];l>0&&d(R)?l>1?Xe(R,l-1,d,$,S):ta(S,R):$||(S[S.length]=R)}return S}var pl=ng(),Id=ng(!0);function sn(o,l){return o&&pl(o,l,We)}function dl(o,l){return o&&Id(o,l,We)}function Yo(o,l){return Qn(l,function(d){return Ln(o[d])})}function Ba(o,l){l=ia(l,o);for(var d=0,$=l.length;o!=null&&d<$;)o=o[un(l[d++])];return d&&d==$?o:r}function Dd(o,l,d){var $=l(o);return Gt(o)?$:ta($,d(o))}function nr(o){return o==null?o===r?Vn:pe:xa&&xa in de(o)?VC(o):fO(o)}function gl(o,l){return o>l}function dC(o,l){return o!=null&&ce.call(o,l)}function gC(o,l){return o!=null&&l in de(o)}function _C(o,l,d){return o>=Qe(l,d)&&o<ke(l,d)}function _l(o,l,d){for(var $=d?Qf:Mo,S=o[0].length,C=o.length,D=C,R=q(C),N=1/0,Z=[];D--;){var Q=o[D];D&&l&&(Q=Me(Q,_r(l))),N=Qe(Q.length,N),R[D]=!d&&(l||S>=120&&Q.length>=120)?new Da(D&&Q):r}Q=o[0];var nt=-1,ct=R[0];t:for(;++nt<S&&Z.length<N;){var St=Q[nt],Pt=l?l(St):St;if(St=d||St!==0?St:0,!(ct?hs(ct,Pt):$(Z,Pt,d))){for(D=C;--D;){var Wt=R[D];if(!(Wt?hs(Wt,Pt):$(o[D],Pt,d)))continue t}ct&&ct.push(Pt),Z.push(St)}}return Z}function mC(o,l,d,$){return sn(o,function(S,C,D){l($,d(S),C,D)}),$}function bs(o,l,d){l=ia(l,o),o=bg(o,l);var $=o==null?o:o[un(Gr(l))];return $==null?r:gr($,o,d)}function Rd(o){return Be(o)&&nr(o)==_t}function $C(o){return Be(o)&&nr(o)==Ma}function bC(o){return Be(o)&&nr(o)==Ct}function ys(o,l,d,$,S){return o===l?!0:o==null||l==null||!Be(o)&&!Be(l)?o!==o&&l!==l:yC(o,l,d,$,ys,S)}function yC(o,l,d,$,S,C){var D=Gt(o),R=Gt(l),N=D?It:tr(o),Z=R?It:tr(l);N=N==_t?Se:N,Z=Z==_t?Se:Z;var Q=N==Se,nt=Z==Se,ct=N==Z;if(ct&&oa(o)){if(!oa(l))return!1;D=!0,Q=!1}if(ct&&!Q)return C||(C=new Yr),D||Si(o)?vg(o,l,d,$,S,C):YC(o,l,N,d,$,S,C);if(!(d&_)){var St=Q&&ce.call(o,"__wrapped__"),Pt=nt&&ce.call(l,"__wrapped__");if(St||Pt){var Wt=St?o.value():o,xt=Pt?l.value():l;return C||(C=new Yr),S(Wt,xt,d,$,C)}}return ct?(C||(C=new Yr),XC(o,l,d,$,S,C)):!1}function wC(o){return Be(o)&&tr(o)==yt}function ml(o,l,d,$){var S=d.length,C=S,D=!$;if(o==null)return!C;for(o=de(o);S--;){var R=d[S];if(D&&R[2]?R[1]!==o[R[0]]:!(R[0]in o))return!1}for(;++S<C;){R=d[S];var N=R[0],Z=o[N],Q=R[1];if(D&&R[2]){if(Z===r&&!(N in o))return!1}else{var nt=new Yr;if($)var ct=$(Z,Q,N,o,l,nt);if(!(ct===r?ys(Q,Z,_|m,$,nt):ct))return!1}}return!0}function Bd(o){if(!De(o)||aO(o))return!1;var l=Ln(o)?wE:hS;return l.test(Fa(o))}function SC(o){return Be(o)&&nr(o)==ze}function EC(o){return Be(o)&&tr(o)==Ge}function CC(o){return Be(o)&&cu(o.length)&&!!Ee[nr(o)]}function Ld(o){return typeof o=="function"?o:o==null?hr:typeof o=="object"?Gt(o)?Gd(o[0],o[1]):zd(o):a0(o)}function $l(o){if(!Es(o))return TE(o);var l=[];for(var d in de(o))ce.call(o,d)&&d!="constructor"&&l.push(d);return l}function OC(o){if(!De(o))return uO(o);var l=Es(o),d=[];for(var $ in o)$=="constructor"&&(l||!ce.call(o,$))||d.push($);return d}function bl(o,l){return o<l}function Fd(o,l){var d=-1,$=lr(o)?q(o.length):[];return na(o,function(S,C,D){$[++d]=l(S,C,D)}),$}function zd(o){var l=Bl(o);return l.length==1&&l[0][2]?mg(l[0][0],l[0][1]):function(d){return d===o||ml(d,o,l)}}function Gd(o,l){return Fl(o)&&_g(l)?mg(un(o),l):function(d){var $=Kl(d,o);return $===r&&$===l?Yl(d,o):ys(l,$,_|m)}}function Xo(o,l,d,$,S){o!==l&&pl(l,function(C,D){if(S||(S=new Yr),De(C))AC(o,l,D,d,Xo,$,S);else{var R=$?$(Gl(o,D),C,D+"",o,l,S):r;R===r&&(R=C),hl(o,D,R)}},cr)}function AC(o,l,d,$,S,C,D){var R=Gl(o,d),N=Gl(l,d),Z=D.get(N);if(Z){hl(o,d,Z);return}var Q=C?C(R,N,d+"",o,l,D):r,nt=Q===r;if(nt){var ct=Gt(N),St=!ct&&oa(N),Pt=!ct&&!St&&Si(N);Q=N,ct||St||Pt?Gt(R)?Q=R:Ne(R)?Q=fr(R):St?(nt=!1,Q=Zd(N,!0)):Pt?(nt=!1,Q=Jd(N,!0)):Q=[]:Os(N)||za(N)?(Q=R,za(R)?Q=Yg(R):(!De(R)||Ln(R))&&(Q=gg(N))):nt=!1}nt&&(D.set(N,Q),S(Q,N,$,C,D),D.delete(N)),hl(o,d,Q)}function Nd(o,l){var d=o.length;if(!!d)return l+=l<0?d:0,Bn(l,d)?o[l]:r}function jd(o,l,d){l.length?l=Me(l,function(C){return Gt(C)?function(D){return Ba(D,C.length===1?C[0]:C)}:C}):l=[hr];var $=-1;l=Me(l,_r(Mt()));var S=Fd(o,function(C,D,R){var N=Me(l,function(Z){return Z(C)});return{criteria:N,index:++$,value:C}});return tE(S,function(C,D){return NC(C,D,d)})}function TC(o,l){return qd(o,l,function(d,$){return Yl(o,$)})}function qd(o,l,d){for(var $=-1,S=l.length,C={};++$<S;){var D=l[$],R=Ba(o,D);d(R,D)&&ws(C,ia(D,o),R)}return C}function MC(o){return function(l){return Ba(l,o)}}function yl(o,l,d,$){var S=$?QS:hi,C=-1,D=l.length,R=o;for(o===l&&(l=fr(l)),d&&(R=Me(o,_r(d)));++C<D;)for(var N=0,Z=l[C],Q=d?d(Z):Z;(N=S(R,Q,N,$))>-1;)R!==o&&Go.call(R,N,1),Go.call(o,N,1);return o}function Ud(o,l){for(var d=o?l.length:0,$=d-1;d--;){var S=l[d];if(d==$||S!==C){var C=S;Bn(S)?Go.call(o,S,1):Cl(o,S)}}return o}function wl(o,l){return o+qo(Sd()*(l-o+1))}function PC(o,l,d,$){for(var S=-1,C=ke(jo((l-o)/(d||1)),0),D=q(C);C--;)D[$?C:++S]=o,o+=d;return D}function Sl(o,l){var d="";if(!o||l<1||l>pt)return d;do l%2&&(d+=o),l=qo(l/2),l&&(o+=o);while(l);return d}function Yt(o,l){return Nl($g(o,l,hr),o+"")}function xC(o){return Od(Ei(o))}function IC(o,l){var d=Ei(o);return iu(d,Ra(l,0,d.length))}function ws(o,l,d,$){if(!De(o))return o;l=ia(l,o);for(var S=-1,C=l.length,D=C-1,R=o;R!=null&&++S<C;){var N=un(l[S]),Z=d;if(N==="__proto__"||N==="constructor"||N==="prototype")return o;if(S!=D){var Q=R[N];Z=$?$(Q,N,R):r,Z===r&&(Z=De(Q)?Q:Bn(l[S+1])?[]:{})}ms(R,N,Z),R=R[N]}return o}var kd=Uo?function(o,l){return Uo.set(o,l),o}:hr,DC=No?function(o,l){return No(o,"toString",{configurable:!0,enumerable:!1,value:Vl(l),writable:!0})}:hr;function RC(o){return iu(Ei(o))}function zr(o,l,d){var $=-1,S=o.length;l<0&&(l=-l>S?0:S+l),d=d>S?S:d,d<0&&(d+=S),S=l>d?0:d-l>>>0,l>>>=0;for(var C=q(S);++$<S;)C[$]=o[$+l];return C}function BC(o,l){var d;return na(o,function($,S,C){return d=l($,S,C),!d}),!!d}function Vo(o,l,d){var $=0,S=o==null?$:o.length;if(typeof l=="number"&&l===l&&S<=Ft){for(;$<S;){var C=$+S>>>1,D=o[C];D!==null&&!$r(D)&&(d?D<=l:D<l)?$=C+1:S=C}return S}return El(o,l,hr,d)}function El(o,l,d,$){var S=0,C=o==null?0:o.length;if(C===0)return 0;l=d(l);for(var D=l!==l,R=l===null,N=$r(l),Z=l===r;S<C;){var Q=qo((S+C)/2),nt=d(o[Q]),ct=nt!==r,St=nt===null,Pt=nt===nt,Wt=$r(nt);if(D)var xt=$||Pt;else Z?xt=Pt&&($||ct):R?xt=Pt&&ct&&($||!St):N?xt=Pt&&ct&&!St&&($||!Wt):St||Wt?xt=!1:xt=$?nt<=l:nt<l;xt?S=Q+1:C=Q}return Qe(C,jt)}function Hd(o,l){for(var d=-1,$=o.length,S=0,C=[];++d<$;){var D=o[d],R=l?l(D):D;if(!d||!Xr(R,N)){var N=R;C[S++]=D===0?0:D}}return C}function Wd(o){return typeof o=="number"?o:$r(o)?K:+o}function mr(o){if(typeof o=="string")return o;if(Gt(o))return Me(o,mr)+"";if($r(o))return Ed?Ed.call(o):"";var l=o+"";return l=="0"&&1/o==-lt?"-0":l}function aa(o,l,d){var $=-1,S=Mo,C=o.length,D=!0,R=[],N=R;if(d)D=!1,S=Qf;else if(C>=a){var Z=l?null:WC(o);if(Z)return xo(Z);D=!1,S=hs,N=new Da}else N=l?[]:R;t:for(;++$<C;){var Q=o[$],nt=l?l(Q):Q;if(Q=d||Q!==0?Q:0,D&&nt===nt){for(var ct=N.length;ct--;)if(N[ct]===nt)continue t;l&&N.push(nt),R.push(Q)}else S(N,nt,d)||(N!==R&&N.push(nt),R.push(Q))}return R}function Cl(o,l){return l=ia(l,o),o=bg(o,l),o==null||delete o[un(Gr(l))]}function Kd(o,l,d,$){return ws(o,l,d(Ba(o,l)),$)}function Zo(o,l,d,$){for(var S=o.length,C=$?S:-1;($?C--:++C<S)&&l(o[C],C,o););return d?zr(o,$?0:C,$?C+1:S):zr(o,$?C+1:0,$?S:C)}function Yd(o,l){var d=o;return d instanceof Jt&&(d=d.value()),tl(l,function($,S){return S.func.apply(S.thisArg,ta([$],S.args))},d)}function Ol(o,l,d){var $=o.length;if($<2)return $?aa(o[0]):[];for(var S=-1,C=q($);++S<$;)for(var D=o[S],R=-1;++R<$;)R!=S&&(C[S]=$s(C[S]||D,o[R],l,d));return aa(Xe(C,1),l,d)}function Xd(o,l,d){for(var $=-1,S=o.length,C=l.length,D={};++$<S;){var R=$<C?l[$]:r;d(D,o[$],R)}return D}function Al(o){return Ne(o)?o:[]}function Tl(o){return typeof o=="function"?o:hr}function ia(o,l){return Gt(o)?o:Fl(o,l)?[o]:Eg(fe(o))}var LC=Yt;function sa(o,l,d){var $=o.length;return d=d===r?$:d,!l&&d>=$?o:zr(o,l,d)}var Vd=SE||function(o){return Ye.clearTimeout(o)};function Zd(o,l){if(l)return o.slice();var d=o.length,$=md?md(d):new o.constructor(d);return o.copy($),$}function Ml(o){var l=new o.constructor(o.byteLength);return new Fo(l).set(new Fo(o)),l}function FC(o,l){var d=l?Ml(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.byteLength)}function zC(o){var l=new o.constructor(o.source,Rp.exec(o));return l.lastIndex=o.lastIndex,l}function GC(o){return _s?de(_s.call(o)):{}}function Jd(o,l){var d=l?Ml(o.buffer):o.buffer;return new o.constructor(d,o.byteOffset,o.length)}function Qd(o,l){if(o!==l){var d=o!==r,$=o===null,S=o===o,C=$r(o),D=l!==r,R=l===null,N=l===l,Z=$r(l);if(!R&&!Z&&!C&&o>l||C&&D&&N&&!R&&!Z||$&&D&&N||!d&&N||!S)return 1;if(!$&&!C&&!Z&&o<l||Z&&d&&S&&!$&&!C||R&&d&&S||!D&&S||!N)return-1}return 0}function NC(o,l,d){for(var $=-1,S=o.criteria,C=l.criteria,D=S.length,R=d.length;++$<D;){var N=Qd(S[$],C[$]);if(N){if($>=R)return N;var Z=d[$];return N*(Z=="desc"?-1:1)}}return o.index-l.index}function tg(o,l,d,$){for(var S=-1,C=o.length,D=d.length,R=-1,N=l.length,Z=ke(C-D,0),Q=q(N+Z),nt=!$;++R<N;)Q[R]=l[R];for(;++S<D;)(nt||S<C)&&(Q[d[S]]=o[S]);for(;Z--;)Q[R++]=o[S++];return Q}function eg(o,l,d,$){for(var S=-1,C=o.length,D=-1,R=d.length,N=-1,Z=l.length,Q=ke(C-R,0),nt=q(Q+Z),ct=!$;++S<Q;)nt[S]=o[S];for(var St=S;++N<Z;)nt[St+N]=l[N];for(;++D<R;)(ct||S<C)&&(nt[St+d[D]]=o[S++]);return nt}function fr(o,l){var d=-1,$=o.length;for(l||(l=q($));++d<$;)l[d]=o[d];return l}function on(o,l,d,$){var S=!d;d||(d={});for(var C=-1,D=l.length;++C<D;){var R=l[C],N=$?$(d[R],o[R],R,d,o):r;N===r&&(N=o[R]),S?In(d,R,N):ms(d,R,N)}return d}function jC(o,l){return on(o,Ll(o),l)}function qC(o,l){return on(o,pg(o),l)}function Jo(o,l){return function(d,$){var S=Gt(d)?KS:lC,C=l?l():{};return S(d,o,Mt($,2),C)}}function bi(o){return Yt(function(l,d){var $=-1,S=d.length,C=S>1?d[S-1]:r,D=S>2?d[2]:r;for(C=o.length>3&&typeof C=="function"?(S--,C):r,D&&ar(d[0],d[1],D)&&(C=S<3?r:C,S=1),l=de(l);++$<S;){var R=d[$];R&&o(l,R,$,C)}return l})}function rg(o,l){return function(d,$){if(d==null)return d;if(!lr(d))return o(d,$);for(var S=d.length,C=l?S:-1,D=de(d);(l?C--:++C<S)&&$(D[C],C,D)!==!1;);return d}}function ng(o){return function(l,d,$){for(var S=-1,C=de(l),D=$(l),R=D.length;R--;){var N=D[o?R:++S];if(d(C[N],N,C)===!1)break}return l}}function UC(o,l,d){var $=l&b,S=Ss(o);function C(){var D=this&&this!==Ye&&this instanceof C?S:o;return D.apply($?d:this,arguments)}return C}function ag(o){return function(l){l=fe(l);var d=vi(l)?Kr(l):r,$=d?d[0]:l.charAt(0),S=d?sa(d,1).join(""):l.slice(1);return $[o]()+S}}function yi(o){return function(l){return tl(r0(e0(l).replace(DS,"")),o,"")}}function Ss(o){return function(){var l=arguments;switch(l.length){case 0:return new o;case 1:return new o(l[0]);case 2:return new o(l[0],l[1]);case 3:return new o(l[0],l[1],l[2]);case 4:return new o(l[0],l[1],l[2],l[3]);case 5:return new o(l[0],l[1],l[2],l[3],l[4]);case 6:return new o(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new o(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var d=$i(o.prototype),$=o.apply(d,l);return De($)?$:d}}function kC(o,l,d){var $=Ss(o);function S(){for(var C=arguments.length,D=q(C),R=C,N=wi(S);R--;)D[R]=arguments[R];var Z=C<3&&D[0]!==N&&D[C-1]!==N?[]:ea(D,N);if(C-=Z.length,C<d)return fg(o,l,Qo,S.placeholder,r,D,Z,r,r,d-C);var Q=this&&this!==Ye&&this instanceof S?$:o;return gr(Q,this,D)}return S}function ig(o){return function(l,d,$){var S=de(l);if(!lr(l)){var C=Mt(d,3);l=We(l),d=function(R){return C(S[R],R,S)}}var D=o(l,d,$);return D>-1?S[C?l[D]:D]:r}}function sg(o){return Rn(function(l){var d=l.length,$=d,S=Lr.prototype.thru;for(o&&l.reverse();$--;){var C=l[$];if(typeof C!="function")throw new Br(s);if(S&&!D&&nu(C)=="wrapper")var D=new Lr([],!0)}for($=D?$:d;++$<d;){C=l[$];var R=nu(C),N=R=="wrapper"?Rl(C):r;N&&zl(N[0])&&N[1]==(x|O|A|B)&&!N[4].length&&N[9]==1?D=D[nu(N[0])].apply(D,N[3]):D=C.length==1&&zl(C)?D[R]():D.thru(C)}return function(){var Z=arguments,Q=Z[0];if(D&&Z.length==1&&Gt(Q))return D.plant(Q).value();for(var nt=0,ct=d?l[nt].apply(this,Z):Q;++nt<d;)ct=l[nt].call(this,ct);return ct}})}function Qo(o,l,d,$,S,C,D,R,N,Z){var Q=l&x,nt=l&b,ct=l&y,St=l&(O|T),Pt=l&M,Wt=ct?r:Ss(o);function xt(){for(var Zt=arguments.length,re=q(Zt),br=Zt;br--;)re[br]=arguments[br];if(St)var ir=wi(xt),yr=rE(re,ir);if($&&(re=tg(re,$,S,St)),C&&(re=eg(re,C,D,St)),Zt-=yr,St&&Zt<Z){var je=ea(re,ir);return fg(o,l,Qo,xt.placeholder,d,re,je,R,N,Z-Zt)}var Vr=nt?d:this,zn=ct?Vr[o]:o;return Zt=re.length,R?re=lO(re,R):Pt&&Zt>1&&re.reverse(),Q&&N<Zt&&(re.length=N),this&&this!==Ye&&this instanceof xt&&(zn=Wt||Ss(zn)),zn.apply(Vr,re)}return xt}function og(o,l){return function(d,$){return mC(d,o,l($),{})}}function tu(o,l){return function(d,$){var S;if(d===r&&$===r)return l;if(d!==r&&(S=d),$!==r){if(S===r)return $;typeof d=="string"||typeof $=="string"?(d=mr(d),$=mr($)):(d=Wd(d),$=Wd($)),S=o(d,$)}return S}}function Pl(o){return Rn(function(l){return l=Me(l,_r(Mt())),Yt(function(d){var $=this;return o(l,function(S){return gr(S,$,d)})})})}function eu(o,l){l=l===r?" ":mr(l);var d=l.length;if(d<2)return d?Sl(l,o):l;var $=Sl(l,jo(o/pi(l)));return vi(l)?sa(Kr($),0,o).join(""):$.slice(0,o)}function HC(o,l,d,$){var S=l&b,C=Ss(o);function D(){for(var R=-1,N=arguments.length,Z=-1,Q=$.length,nt=q(Q+N),ct=this&&this!==Ye&&this instanceof D?C:o;++Z<Q;)nt[Z]=$[Z];for(;N--;)nt[Z++]=arguments[++R];return gr(ct,S?d:this,nt)}return D}function ug(o){return function(l,d,$){return $&&typeof $!="number"&&ar(l,d,$)&&(d=$=r),l=Fn(l),d===r?(d=l,l=0):d=Fn(d),$=$===r?l<d?1:-1:Fn($),PC(l,d,$,o)}}function ru(o){return function(l,d){return typeof l=="string"&&typeof d=="string"||(l=Nr(l),d=Nr(d)),o(l,d)}}function fg(o,l,d,$,S,C,D,R,N,Z){var Q=l&O,nt=Q?D:r,ct=Q?r:D,St=Q?C:r,Pt=Q?r:C;l|=Q?A:I,l&=~(Q?I:A),l&w||(l&=~(b|y));var Wt=[o,l,S,St,nt,Pt,ct,R,N,Z],xt=d.apply(r,Wt);return zl(o)&&yg(xt,Wt),xt.placeholder=$,wg(xt,o,l)}function xl(o){var l=Ue[o];return function(d,$){if(d=Nr(d),$=$==null?0:Qe(kt($),292),$&&wd(d)){var S=(fe(d)+"e").split("e"),C=l(S[0]+"e"+(+S[1]+$));return S=(fe(C)+"e").split("e"),+(S[0]+"e"+(+S[1]-$))}return l(d)}}var WC=_i&&1/xo(new _i([,-0]))[1]==lt?function(o){return new _i(o)}:Ql;function lg(o){return function(l){var d=tr(l);return d==yt?ol(l):d==Ge?fE(l):eE(l,o(l))}}function Dn(o,l,d,$,S,C,D,R){var N=l&y;if(!N&&typeof o!="function")throw new Br(s);var Z=$?$.length:0;if(Z||(l&=~(A|I),$=S=r),D=D===r?D:ke(kt(D),0),R=R===r?R:kt(R),Z-=S?S.length:0,l&I){var Q=$,nt=S;$=S=r}var ct=N?r:Rl(o),St=[o,l,d,$,S,Q,nt,C,D,R];if(ct&&oO(St,ct),o=St[0],l=St[1],d=St[2],$=St[3],S=St[4],R=St[9]=St[9]===r?N?0:o.length:ke(St[9]-Z,0),!R&&l&(O|T)&&(l&=~(O|T)),!l||l==b)var Pt=UC(o,l,d);else l==O||l==T?Pt=kC(o,l,R):(l==A||l==(b|A))&&!S.length?Pt=HC(o,l,d,$):Pt=Qo.apply(r,St);var Wt=ct?kd:yg;return wg(Wt(Pt,St),o,l)}function cg(o,l,d,$){return o===r||Xr(o,gi[d])&&!ce.call($,d)?l:o}function hg(o,l,d,$,S,C){return De(o)&&De(l)&&(C.set(l,o),Xo(o,l,r,hg,C),C.delete(l)),o}function KC(o){return Os(o)?r:o}function vg(o,l,d,$,S,C){var D=d&_,R=o.length,N=l.length;if(R!=N&&!(D&&N>R))return!1;var Z=C.get(o),Q=C.get(l);if(Z&&Q)return Z==l&&Q==o;var nt=-1,ct=!0,St=d&m?new Da:r;for(C.set(o,l),C.set(l,o);++nt<R;){var Pt=o[nt],Wt=l[nt];if($)var xt=D?$(Wt,Pt,nt,l,o,C):$(Pt,Wt,nt,o,l,C);if(xt!==r){if(xt)continue;ct=!1;break}if(St){if(!el(l,function(Zt,re){if(!hs(St,re)&&(Pt===Zt||S(Pt,Zt,d,$,C)))return St.push(re)})){ct=!1;break}}else if(!(Pt===Wt||S(Pt,Wt,d,$,C))){ct=!1;break}}return C.delete(o),C.delete(l),ct}function YC(o,l,d,$,S,C,D){switch(d){case Zn:if(o.byteLength!=l.byteLength||o.byteOffset!=l.byteOffset)return!1;o=o.buffer,l=l.buffer;case Ma:return!(o.byteLength!=l.byteLength||!C(new Fo(o),new Fo(l)));case ee:case Ct:case wt:return Xr(+o,+l);case ve:return o.name==l.name&&o.message==l.message;case ze:case Wr:return o==l+"";case yt:var R=ol;case Ge:var N=$&_;if(R||(R=xo),o.size!=l.size&&!N)return!1;var Z=D.get(o);if(Z)return Z==l;$|=m,D.set(o,l);var Q=vg(R(o),R(l),$,S,C,D);return D.delete(o),Q;case Ir:if(_s)return _s.call(o)==_s.call(l)}return!1}function XC(o,l,d,$,S,C){var D=d&_,R=Il(o),N=R.length,Z=Il(l),Q=Z.length;if(N!=Q&&!D)return!1;for(var nt=N;nt--;){var ct=R[nt];if(!(D?ct in l:ce.call(l,ct)))return!1}var St=C.get(o),Pt=C.get(l);if(St&&Pt)return St==l&&Pt==o;var Wt=!0;C.set(o,l),C.set(l,o);for(var xt=D;++nt<N;){ct=R[nt];var Zt=o[ct],re=l[ct];if($)var br=D?$(re,Zt,ct,l,o,C):$(Zt,re,ct,o,l,C);if(!(br===r?Zt===re||S(Zt,re,d,$,C):br)){Wt=!1;break}xt||(xt=ct=="constructor")}if(Wt&&!xt){var ir=o.constructor,yr=l.constructor;ir!=yr&&"constructor"in o&&"constructor"in l&&!(typeof ir=="function"&&ir instanceof ir&&typeof yr=="function"&&yr instanceof yr)&&(Wt=!1)}return C.delete(o),C.delete(l),Wt}function Rn(o){return Nl($g(o,r,Tg),o+"")}function Il(o){return Dd(o,We,Ll)}function Dl(o){return Dd(o,cr,pg)}var Rl=Uo?function(o){return Uo.get(o)}:Ql;function nu(o){for(var l=o.name+"",d=mi[l],$=ce.call(mi,l)?d.length:0;$--;){var S=d[$],C=S.func;if(C==null||C==o)return S.name}return l}function wi(o){var l=ce.call(E,"placeholder")?E:o;return l.placeholder}function Mt(){var o=E.iteratee||Zl;return o=o===Zl?Ld:o,arguments.length?o(arguments[0],arguments[1]):o}function au(o,l){var d=o.__data__;return nO(l)?d[typeof l=="string"?"string":"hash"]:d.map}function Bl(o){for(var l=We(o),d=l.length;d--;){var $=l[d],S=o[$];l[d]=[$,S,_g(S)]}return l}function La(o,l){var d=sE(o,l);return Bd(d)?d:r}function VC(o){var l=ce.call(o,xa),d=o[xa];try{o[xa]=r;var $=!0}catch{}var S=Bo.call(o);return $&&(l?o[xa]=d:delete o[xa]),S}var Ll=fl?function(o){return o==null?[]:(o=de(o),Qn(fl(o),function(l){return bd.call(o,l)}))}:tc,pg=fl?function(o){for(var l=[];o;)ta(l,Ll(o)),o=zo(o);return l}:tc,tr=nr;(ll&&tr(new ll(new ArrayBuffer(1)))!=Zn||ps&&tr(new ps)!=yt||cl&&tr(cl.resolve())!=Ut||_i&&tr(new _i)!=Ge||ds&&tr(new ds)!=dr)&&(tr=function(o){var l=nr(o),d=l==Se?o.constructor:r,$=d?Fa(d):"";if($)switch($){case IE:return Zn;case DE:return yt;case RE:return Ut;case BE:return Ge;case LE:return dr}return l});function ZC(o,l,d){for(var $=-1,S=d.length;++$<S;){var C=d[$],D=C.size;switch(C.type){case"drop":o+=D;break;case"dropRight":l-=D;break;case"take":l=Qe(l,o+D);break;case"takeRight":o=ke(o,l-D);break}}return{start:o,end:l}}function JC(o){var l=o.match(aS);return l?l[1].split(iS):[]}function dg(o,l,d){l=ia(l,o);for(var $=-1,S=l.length,C=!1;++$<S;){var D=un(l[$]);if(!(C=o!=null&&d(o,D)))break;o=o[D]}return C||++$!=S?C:(S=o==null?0:o.length,!!S&&cu(S)&&Bn(D,S)&&(Gt(o)||za(o)))}function QC(o){var l=o.length,d=new o.constructor(l);return l&&typeof o[0]=="string"&&ce.call(o,"index")&&(d.index=o.index,d.input=o.input),d}function gg(o){return typeof o.constructor=="function"&&!Es(o)?$i(zo(o)):{}}function tO(o,l,d){var $=o.constructor;switch(l){case Ma:return Ml(o);case ee:case Ct:return new $(+o);case Zn:return FC(o,d);case Jn:case fi:case cs:case li:case Gf:case Nf:case jf:case qf:case Uf:return Jd(o,d);case yt:return new $;case wt:case Wr:return new $(o);case ze:return zC(o);case Ge:return new $;case Ir:return GC(o)}}function eO(o,l){var d=l.length;if(!d)return o;var $=d-1;return l[$]=(d>1?"& ":"")+l[$],l=l.join(d>2?", ":" "),o.replace(nS,`{
|
|
/* [wrapped with `+l+`] */
|
|
`)}function rO(o){return Gt(o)||za(o)||!!(yd&&o&&o[yd])}function Bn(o,l){var d=typeof o;return l=l==null?pt:l,!!l&&(d=="number"||d!="symbol"&&pS.test(o))&&o>-1&&o%1==0&&o<l}function ar(o,l,d){if(!De(d))return!1;var $=typeof l;return($=="number"?lr(d)&&Bn(l,d.length):$=="string"&&l in d)?Xr(d[l],o):!1}function Fl(o,l){if(Gt(o))return!1;var d=typeof o;return d=="number"||d=="symbol"||d=="boolean"||o==null||$r(o)?!0:Qw.test(o)||!Jw.test(o)||l!=null&&o in de(l)}function nO(o){var l=typeof o;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?o!=="__proto__":o===null}function zl(o){var l=nu(o),d=E[l];if(typeof d!="function"||!(l in Jt.prototype))return!1;if(o===d)return!0;var $=Rl(d);return!!$&&o===$[0]}function aO(o){return!!_d&&_d in o}var iO=Do?Ln:ec;function Es(o){var l=o&&o.constructor,d=typeof l=="function"&&l.prototype||gi;return o===d}function _g(o){return o===o&&!De(o)}function mg(o,l){return function(d){return d==null?!1:d[o]===l&&(l!==r||o in de(d))}}function sO(o){var l=fu(o,function($){return d.size===c&&d.clear(),$}),d=l.cache;return l}function oO(o,l){var d=o[1],$=l[1],S=d|$,C=S<(b|y|x),D=$==x&&d==O||$==x&&d==B&&o[7].length<=l[8]||$==(x|B)&&l[7].length<=l[8]&&d==O;if(!(C||D))return o;$&b&&(o[2]=l[2],S|=d&b?0:w);var R=l[3];if(R){var N=o[3];o[3]=N?tg(N,R,l[4]):R,o[4]=N?ea(o[3],h):l[4]}return R=l[5],R&&(N=o[5],o[5]=N?eg(N,R,l[6]):R,o[6]=N?ea(o[5],h):l[6]),R=l[7],R&&(o[7]=R),$&x&&(o[8]=o[8]==null?l[8]:Qe(o[8],l[8])),o[9]==null&&(o[9]=l[9]),o[0]=l[0],o[1]=S,o}function uO(o){var l=[];if(o!=null)for(var d in de(o))l.push(d);return l}function fO(o){return Bo.call(o)}function $g(o,l,d){return l=ke(l===r?o.length-1:l,0),function(){for(var $=arguments,S=-1,C=ke($.length-l,0),D=q(C);++S<C;)D[S]=$[l+S];S=-1;for(var R=q(l+1);++S<l;)R[S]=$[S];return R[l]=d(D),gr(o,this,R)}}function bg(o,l){return l.length<2?o:Ba(o,zr(l,0,-1))}function lO(o,l){for(var d=o.length,$=Qe(l.length,d),S=fr(o);$--;){var C=l[$];o[$]=Bn(C,d)?S[C]:r}return o}function Gl(o,l){if(!(l==="constructor"&&typeof o[l]=="function")&&l!="__proto__")return o[l]}var yg=Sg(kd),Cs=CE||function(o,l){return Ye.setTimeout(o,l)},Nl=Sg(DC);function wg(o,l,d){var $=l+"";return Nl(o,eO($,cO(JC($),d)))}function Sg(o){var l=0,d=0;return function(){var $=ME(),S=at-($-d);if(d=$,S>0){if(++l>=W)return arguments[0]}else l=0;return o.apply(r,arguments)}}function iu(o,l){var d=-1,$=o.length,S=$-1;for(l=l===r?$:l;++d<l;){var C=wl(d,S),D=o[C];o[C]=o[d],o[d]=D}return o.length=l,o}var Eg=sO(function(o){var l=[];return o.charCodeAt(0)===46&&l.push(""),o.replace(tS,function(d,$,S,C){l.push(S?C.replace(uS,"$1"):$||d)}),l});function un(o){if(typeof o=="string"||$r(o))return o;var l=o+"";return l=="0"&&1/o==-lt?"-0":l}function Fa(o){if(o!=null){try{return Ro.call(o)}catch{}try{return o+""}catch{}}return""}function cO(o,l){return Rr(Vt,function(d){var $="_."+d[0];l&d[1]&&!Mo(o,$)&&o.push($)}),o.sort()}function Cg(o){if(o instanceof Jt)return o.clone();var l=new Lr(o.__wrapped__,o.__chain__);return l.__actions__=fr(o.__actions__),l.__index__=o.__index__,l.__values__=o.__values__,l}function hO(o,l,d){(d?ar(o,l,d):l===r)?l=1:l=ke(kt(l),0);var $=o==null?0:o.length;if(!$||l<1)return[];for(var S=0,C=0,D=q(jo($/l));S<$;)D[C++]=zr(o,S,S+=l);return D}function vO(o){for(var l=-1,d=o==null?0:o.length,$=0,S=[];++l<d;){var C=o[l];C&&(S[$++]=C)}return S}function pO(){var o=arguments.length;if(!o)return[];for(var l=q(o-1),d=arguments[0],$=o;$--;)l[$-1]=arguments[$];return ta(Gt(d)?fr(d):[d],Xe(l,1))}var dO=Yt(function(o,l){return Ne(o)?$s(o,Xe(l,1,Ne,!0)):[]}),gO=Yt(function(o,l){var d=Gr(l);return Ne(d)&&(d=r),Ne(o)?$s(o,Xe(l,1,Ne,!0),Mt(d,2)):[]}),_O=Yt(function(o,l){var d=Gr(l);return Ne(d)&&(d=r),Ne(o)?$s(o,Xe(l,1,Ne,!0),r,d):[]});function mO(o,l,d){var $=o==null?0:o.length;return $?(l=d||l===r?1:kt(l),zr(o,l<0?0:l,$)):[]}function $O(o,l,d){var $=o==null?0:o.length;return $?(l=d||l===r?1:kt(l),l=$-l,zr(o,0,l<0?0:l)):[]}function bO(o,l){return o&&o.length?Zo(o,Mt(l,3),!0,!0):[]}function yO(o,l){return o&&o.length?Zo(o,Mt(l,3),!0):[]}function wO(o,l,d,$){var S=o==null?0:o.length;return S?(d&&typeof d!="number"&&ar(o,l,d)&&(d=0,$=S),pC(o,l,d,$)):[]}function Og(o,l,d){var $=o==null?0:o.length;if(!$)return-1;var S=d==null?0:kt(d);return S<0&&(S=ke($+S,0)),Po(o,Mt(l,3),S)}function Ag(o,l,d){var $=o==null?0:o.length;if(!$)return-1;var S=$-1;return d!==r&&(S=kt(d),S=d<0?ke($+S,0):Qe(S,$-1)),Po(o,Mt(l,3),S,!0)}function Tg(o){var l=o==null?0:o.length;return l?Xe(o,1):[]}function SO(o){var l=o==null?0:o.length;return l?Xe(o,lt):[]}function EO(o,l){var d=o==null?0:o.length;return d?(l=l===r?1:kt(l),Xe(o,l)):[]}function CO(o){for(var l=-1,d=o==null?0:o.length,$={};++l<d;){var S=o[l];$[S[0]]=S[1]}return $}function Mg(o){return o&&o.length?o[0]:r}function OO(o,l,d){var $=o==null?0:o.length;if(!$)return-1;var S=d==null?0:kt(d);return S<0&&(S=ke($+S,0)),hi(o,l,S)}function AO(o){var l=o==null?0:o.length;return l?zr(o,0,-1):[]}var TO=Yt(function(o){var l=Me(o,Al);return l.length&&l[0]===o[0]?_l(l):[]}),MO=Yt(function(o){var l=Gr(o),d=Me(o,Al);return l===Gr(d)?l=r:d.pop(),d.length&&d[0]===o[0]?_l(d,Mt(l,2)):[]}),PO=Yt(function(o){var l=Gr(o),d=Me(o,Al);return l=typeof l=="function"?l:r,l&&d.pop(),d.length&&d[0]===o[0]?_l(d,r,l):[]});function xO(o,l){return o==null?"":AE.call(o,l)}function Gr(o){var l=o==null?0:o.length;return l?o[l-1]:r}function IO(o,l,d){var $=o==null?0:o.length;if(!$)return-1;var S=$;return d!==r&&(S=kt(d),S=S<0?ke($+S,0):Qe(S,$-1)),l===l?cE(o,l,S):Po(o,fd,S,!0)}function DO(o,l){return o&&o.length?Nd(o,kt(l)):r}var RO=Yt(Pg);function Pg(o,l){return o&&o.length&&l&&l.length?yl(o,l):o}function BO(o,l,d){return o&&o.length&&l&&l.length?yl(o,l,Mt(d,2)):o}function LO(o,l,d){return o&&o.length&&l&&l.length?yl(o,l,r,d):o}var FO=Rn(function(o,l){var d=o==null?0:o.length,$=vl(o,l);return Ud(o,Me(l,function(S){return Bn(S,d)?+S:S}).sort(Qd)),$});function zO(o,l){var d=[];if(!(o&&o.length))return d;var $=-1,S=[],C=o.length;for(l=Mt(l,3);++$<C;){var D=o[$];l(D,$,o)&&(d.push(D),S.push($))}return Ud(o,S),d}function jl(o){return o==null?o:xE.call(o)}function GO(o,l,d){var $=o==null?0:o.length;return $?(d&&typeof d!="number"&&ar(o,l,d)?(l=0,d=$):(l=l==null?0:kt(l),d=d===r?$:kt(d)),zr(o,l,d)):[]}function NO(o,l){return Vo(o,l)}function jO(o,l,d){return El(o,l,Mt(d,2))}function qO(o,l){var d=o==null?0:o.length;if(d){var $=Vo(o,l);if($<d&&Xr(o[$],l))return $}return-1}function UO(o,l){return Vo(o,l,!0)}function kO(o,l,d){return El(o,l,Mt(d,2),!0)}function HO(o,l){var d=o==null?0:o.length;if(d){var $=Vo(o,l,!0)-1;if(Xr(o[$],l))return $}return-1}function WO(o){return o&&o.length?Hd(o):[]}function KO(o,l){return o&&o.length?Hd(o,Mt(l,2)):[]}function YO(o){var l=o==null?0:o.length;return l?zr(o,1,l):[]}function XO(o,l,d){return o&&o.length?(l=d||l===r?1:kt(l),zr(o,0,l<0?0:l)):[]}function VO(o,l,d){var $=o==null?0:o.length;return $?(l=d||l===r?1:kt(l),l=$-l,zr(o,l<0?0:l,$)):[]}function ZO(o,l){return o&&o.length?Zo(o,Mt(l,3),!1,!0):[]}function JO(o,l){return o&&o.length?Zo(o,Mt(l,3)):[]}var QO=Yt(function(o){return aa(Xe(o,1,Ne,!0))}),tA=Yt(function(o){var l=Gr(o);return Ne(l)&&(l=r),aa(Xe(o,1,Ne,!0),Mt(l,2))}),eA=Yt(function(o){var l=Gr(o);return l=typeof l=="function"?l:r,aa(Xe(o,1,Ne,!0),r,l)});function rA(o){return o&&o.length?aa(o):[]}function nA(o,l){return o&&o.length?aa(o,Mt(l,2)):[]}function aA(o,l){return l=typeof l=="function"?l:r,o&&o.length?aa(o,r,l):[]}function ql(o){if(!(o&&o.length))return[];var l=0;return o=Qn(o,function(d){if(Ne(d))return l=ke(d.length,l),!0}),il(l,function(d){return Me(o,rl(d))})}function xg(o,l){if(!(o&&o.length))return[];var d=ql(o);return l==null?d:Me(d,function($){return gr(l,r,$)})}var iA=Yt(function(o,l){return Ne(o)?$s(o,l):[]}),sA=Yt(function(o){return Ol(Qn(o,Ne))}),oA=Yt(function(o){var l=Gr(o);return Ne(l)&&(l=r),Ol(Qn(o,Ne),Mt(l,2))}),uA=Yt(function(o){var l=Gr(o);return l=typeof l=="function"?l:r,Ol(Qn(o,Ne),r,l)}),fA=Yt(ql);function lA(o,l){return Xd(o||[],l||[],ms)}function cA(o,l){return Xd(o||[],l||[],ws)}var hA=Yt(function(o){var l=o.length,d=l>1?o[l-1]:r;return d=typeof d=="function"?(o.pop(),d):r,xg(o,d)});function Ig(o){var l=E(o);return l.__chain__=!0,l}function vA(o,l){return l(o),o}function su(o,l){return l(o)}var pA=Rn(function(o){var l=o.length,d=l?o[0]:0,$=this.__wrapped__,S=function(C){return vl(C,o)};return l>1||this.__actions__.length||!($ instanceof Jt)||!Bn(d)?this.thru(S):($=$.slice(d,+d+(l?1:0)),$.__actions__.push({func:su,args:[S],thisArg:r}),new Lr($,this.__chain__).thru(function(C){return l&&!C.length&&C.push(r),C}))});function dA(){return Ig(this)}function gA(){return new Lr(this.value(),this.__chain__)}function _A(){this.__values__===r&&(this.__values__=Wg(this.value()));var o=this.__index__>=this.__values__.length,l=o?r:this.__values__[this.__index__++];return{done:o,value:l}}function mA(){return this}function $A(o){for(var l,d=this;d instanceof Ho;){var $=Cg(d);$.__index__=0,$.__values__=r,l?S.__wrapped__=$:l=$;var S=$;d=d.__wrapped__}return S.__wrapped__=o,l}function bA(){var o=this.__wrapped__;if(o instanceof Jt){var l=o;return this.__actions__.length&&(l=new Jt(this)),l=l.reverse(),l.__actions__.push({func:su,args:[jl],thisArg:r}),new Lr(l,this.__chain__)}return this.thru(jl)}function yA(){return Yd(this.__wrapped__,this.__actions__)}var wA=Jo(function(o,l,d){ce.call(o,d)?++o[d]:In(o,d,1)});function SA(o,l,d){var $=Gt(o)?od:vC;return d&&ar(o,l,d)&&(l=r),$(o,Mt(l,3))}function EA(o,l){var d=Gt(o)?Qn:xd;return d(o,Mt(l,3))}var CA=ig(Og),OA=ig(Ag);function AA(o,l){return Xe(ou(o,l),1)}function TA(o,l){return Xe(ou(o,l),lt)}function MA(o,l,d){return d=d===r?1:kt(d),Xe(ou(o,l),d)}function Dg(o,l){var d=Gt(o)?Rr:na;return d(o,Mt(l,3))}function Rg(o,l){var d=Gt(o)?YS:Pd;return d(o,Mt(l,3))}var PA=Jo(function(o,l,d){ce.call(o,d)?o[d].push(l):In(o,d,[l])});function xA(o,l,d,$){o=lr(o)?o:Ei(o),d=d&&!$?kt(d):0;var S=o.length;return d<0&&(d=ke(S+d,0)),hu(o)?d<=S&&o.indexOf(l,d)>-1:!!S&&hi(o,l,d)>-1}var IA=Yt(function(o,l,d){var $=-1,S=typeof l=="function",C=lr(o)?q(o.length):[];return na(o,function(D){C[++$]=S?gr(l,D,d):bs(D,l,d)}),C}),DA=Jo(function(o,l,d){In(o,d,l)});function ou(o,l){var d=Gt(o)?Me:Fd;return d(o,Mt(l,3))}function RA(o,l,d,$){return o==null?[]:(Gt(l)||(l=l==null?[]:[l]),d=$?r:d,Gt(d)||(d=d==null?[]:[d]),jd(o,l,d))}var BA=Jo(function(o,l,d){o[d?0:1].push(l)},function(){return[[],[]]});function LA(o,l,d){var $=Gt(o)?tl:cd,S=arguments.length<3;return $(o,Mt(l,4),d,S,na)}function FA(o,l,d){var $=Gt(o)?XS:cd,S=arguments.length<3;return $(o,Mt(l,4),d,S,Pd)}function zA(o,l){var d=Gt(o)?Qn:xd;return d(o,lu(Mt(l,3)))}function GA(o){var l=Gt(o)?Od:xC;return l(o)}function NA(o,l,d){(d?ar(o,l,d):l===r)?l=1:l=kt(l);var $=Gt(o)?uC:IC;return $(o,l)}function jA(o){var l=Gt(o)?fC:RC;return l(o)}function qA(o){if(o==null)return 0;if(lr(o))return hu(o)?pi(o):o.length;var l=tr(o);return l==yt||l==Ge?o.size:$l(o).length}function UA(o,l,d){var $=Gt(o)?el:BC;return d&&ar(o,l,d)&&(l=r),$(o,Mt(l,3))}var kA=Yt(function(o,l){if(o==null)return[];var d=l.length;return d>1&&ar(o,l[0],l[1])?l=[]:d>2&&ar(l[0],l[1],l[2])&&(l=[l[0]]),jd(o,Xe(l,1),[])}),uu=EE||function(){return Ye.Date.now()};function HA(o,l){if(typeof l!="function")throw new Br(s);return o=kt(o),function(){if(--o<1)return l.apply(this,arguments)}}function Bg(o,l,d){return l=d?r:l,l=o&&l==null?o.length:l,Dn(o,x,r,r,r,r,l)}function Lg(o,l){var d;if(typeof l!="function")throw new Br(s);return o=kt(o),function(){return--o>0&&(d=l.apply(this,arguments)),o<=1&&(l=r),d}}var Ul=Yt(function(o,l,d){var $=b;if(d.length){var S=ea(d,wi(Ul));$|=A}return Dn(o,$,l,d,S)}),Fg=Yt(function(o,l,d){var $=b|y;if(d.length){var S=ea(d,wi(Fg));$|=A}return Dn(l,$,o,d,S)});function zg(o,l,d){l=d?r:l;var $=Dn(o,O,r,r,r,r,r,l);return $.placeholder=zg.placeholder,$}function Gg(o,l,d){l=d?r:l;var $=Dn(o,T,r,r,r,r,r,l);return $.placeholder=Gg.placeholder,$}function Ng(o,l,d){var $,S,C,D,R,N,Z=0,Q=!1,nt=!1,ct=!0;if(typeof o!="function")throw new Br(s);l=Nr(l)||0,De(d)&&(Q=!!d.leading,nt="maxWait"in d,C=nt?ke(Nr(d.maxWait)||0,l):C,ct="trailing"in d?!!d.trailing:ct);function St(je){var Vr=$,zn=S;return $=S=r,Z=je,D=o.apply(zn,Vr),D}function Pt(je){return Z=je,R=Cs(Zt,l),Q?St(je):D}function Wt(je){var Vr=je-N,zn=je-Z,i0=l-Vr;return nt?Qe(i0,C-zn):i0}function xt(je){var Vr=je-N,zn=je-Z;return N===r||Vr>=l||Vr<0||nt&&zn>=C}function Zt(){var je=uu();if(xt(je))return re(je);R=Cs(Zt,Wt(je))}function re(je){return R=r,ct&&$?St(je):($=S=r,D)}function br(){R!==r&&Vd(R),Z=0,$=N=S=R=r}function ir(){return R===r?D:re(uu())}function yr(){var je=uu(),Vr=xt(je);if($=arguments,S=this,N=je,Vr){if(R===r)return Pt(N);if(nt)return Vd(R),R=Cs(Zt,l),St(N)}return R===r&&(R=Cs(Zt,l)),D}return yr.cancel=br,yr.flush=ir,yr}var WA=Yt(function(o,l){return Md(o,1,l)}),KA=Yt(function(o,l,d){return Md(o,Nr(l)||0,d)});function YA(o){return Dn(o,M)}function fu(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new Br(s);var d=function(){var $=arguments,S=l?l.apply(this,$):$[0],C=d.cache;if(C.has(S))return C.get(S);var D=o.apply(this,$);return d.cache=C.set(S,D)||C,D};return d.cache=new(fu.Cache||xn),d}fu.Cache=xn;function lu(o){if(typeof o!="function")throw new Br(s);return function(){var l=arguments;switch(l.length){case 0:return!o.call(this);case 1:return!o.call(this,l[0]);case 2:return!o.call(this,l[0],l[1]);case 3:return!o.call(this,l[0],l[1],l[2])}return!o.apply(this,l)}}function XA(o){return Lg(2,o)}var VA=LC(function(o,l){l=l.length==1&&Gt(l[0])?Me(l[0],_r(Mt())):Me(Xe(l,1),_r(Mt()));var d=l.length;return Yt(function($){for(var S=-1,C=Qe($.length,d);++S<C;)$[S]=l[S].call(this,$[S]);return gr(o,this,$)})}),kl=Yt(function(o,l){var d=ea(l,wi(kl));return Dn(o,A,r,l,d)}),jg=Yt(function(o,l){var d=ea(l,wi(jg));return Dn(o,I,r,l,d)}),ZA=Rn(function(o,l){return Dn(o,B,r,r,r,l)});function JA(o,l){if(typeof o!="function")throw new Br(s);return l=l===r?l:kt(l),Yt(o,l)}function QA(o,l){if(typeof o!="function")throw new Br(s);return l=l==null?0:ke(kt(l),0),Yt(function(d){var $=d[l],S=sa(d,0,l);return $&&ta(S,$),gr(o,this,S)})}function tT(o,l,d){var $=!0,S=!0;if(typeof o!="function")throw new Br(s);return De(d)&&($="leading"in d?!!d.leading:$,S="trailing"in d?!!d.trailing:S),Ng(o,l,{leading:$,maxWait:l,trailing:S})}function eT(o){return Bg(o,1)}function rT(o,l){return kl(Tl(l),o)}function nT(){if(!arguments.length)return[];var o=arguments[0];return Gt(o)?o:[o]}function aT(o){return Fr(o,g)}function iT(o,l){return l=typeof l=="function"?l:r,Fr(o,g,l)}function sT(o){return Fr(o,v|g)}function oT(o,l){return l=typeof l=="function"?l:r,Fr(o,v|g,l)}function uT(o,l){return l==null||Td(o,l,We(l))}function Xr(o,l){return o===l||o!==o&&l!==l}var fT=ru(gl),lT=ru(function(o,l){return o>=l}),za=Rd(function(){return arguments}())?Rd:function(o){return Be(o)&&ce.call(o,"callee")&&!bd.call(o,"callee")},Gt=q.isArray,cT=ed?_r(ed):$C;function lr(o){return o!=null&&cu(o.length)&&!Ln(o)}function Ne(o){return Be(o)&&lr(o)}function hT(o){return o===!0||o===!1||Be(o)&&nr(o)==ee}var oa=OE||ec,vT=rd?_r(rd):bC;function pT(o){return Be(o)&&o.nodeType===1&&!Os(o)}function dT(o){if(o==null)return!0;if(lr(o)&&(Gt(o)||typeof o=="string"||typeof o.splice=="function"||oa(o)||Si(o)||za(o)))return!o.length;var l=tr(o);if(l==yt||l==Ge)return!o.size;if(Es(o))return!$l(o).length;for(var d in o)if(ce.call(o,d))return!1;return!0}function gT(o,l){return ys(o,l)}function _T(o,l,d){d=typeof d=="function"?d:r;var $=d?d(o,l):r;return $===r?ys(o,l,r,d):!!$}function Hl(o){if(!Be(o))return!1;var l=nr(o);return l==ve||l==Ie||typeof o.message=="string"&&typeof o.name=="string"&&!Os(o)}function mT(o){return typeof o=="number"&&wd(o)}function Ln(o){if(!De(o))return!1;var l=nr(o);return l==le||l==Ht||l==$e||l==zt}function qg(o){return typeof o=="number"&&o==kt(o)}function cu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=pt}function De(o){var l=typeof o;return o!=null&&(l=="object"||l=="function")}function Be(o){return o!=null&&typeof o=="object"}var Ug=nd?_r(nd):wC;function $T(o,l){return o===l||ml(o,l,Bl(l))}function bT(o,l,d){return d=typeof d=="function"?d:r,ml(o,l,Bl(l),d)}function yT(o){return kg(o)&&o!=+o}function wT(o){if(iO(o))throw new Bt(i);return Bd(o)}function ST(o){return o===null}function ET(o){return o==null}function kg(o){return typeof o=="number"||Be(o)&&nr(o)==wt}function Os(o){if(!Be(o)||nr(o)!=Se)return!1;var l=zo(o);if(l===null)return!0;var d=ce.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Ro.call(d)==bE}var Wl=ad?_r(ad):SC;function CT(o){return qg(o)&&o>=-pt&&o<=pt}var Hg=id?_r(id):EC;function hu(o){return typeof o=="string"||!Gt(o)&&Be(o)&&nr(o)==Wr}function $r(o){return typeof o=="symbol"||Be(o)&&nr(o)==Ir}var Si=sd?_r(sd):CC;function OT(o){return o===r}function AT(o){return Be(o)&&tr(o)==dr}function TT(o){return Be(o)&&nr(o)==Ta}var MT=ru(bl),PT=ru(function(o,l){return o<=l});function Wg(o){if(!o)return[];if(lr(o))return hu(o)?Kr(o):fr(o);if(vs&&o[vs])return uE(o[vs]());var l=tr(o),d=l==yt?ol:l==Ge?xo:Ei;return d(o)}function Fn(o){if(!o)return o===0?o:0;if(o=Nr(o),o===lt||o===-lt){var l=o<0?-1:1;return l*dt}return o===o?o:0}function kt(o){var l=Fn(o),d=l%1;return l===l?d?l-d:l:0}function Kg(o){return o?Ra(kt(o),0,it):0}function Nr(o){if(typeof o=="number")return o;if($r(o))return K;if(De(o)){var l=typeof o.valueOf=="function"?o.valueOf():o;o=De(l)?l+"":l}if(typeof o!="string")return o===0?o:+o;o=hd(o);var d=cS.test(o);return d||vS.test(o)?HS(o.slice(2),d?2:8):lS.test(o)?K:+o}function Yg(o){return on(o,cr(o))}function xT(o){return o?Ra(kt(o),-pt,pt):o===0?o:0}function fe(o){return o==null?"":mr(o)}var IT=bi(function(o,l){if(Es(l)||lr(l)){on(l,We(l),o);return}for(var d in l)ce.call(l,d)&&ms(o,d,l[d])}),Xg=bi(function(o,l){on(l,cr(l),o)}),vu=bi(function(o,l,d,$){on(l,cr(l),o,$)}),DT=bi(function(o,l,d,$){on(l,We(l),o,$)}),RT=Rn(vl);function BT(o,l){var d=$i(o);return l==null?d:Ad(d,l)}var LT=Yt(function(o,l){o=de(o);var d=-1,$=l.length,S=$>2?l[2]:r;for(S&&ar(l[0],l[1],S)&&($=1);++d<$;)for(var C=l[d],D=cr(C),R=-1,N=D.length;++R<N;){var Z=D[R],Q=o[Z];(Q===r||Xr(Q,gi[Z])&&!ce.call(o,Z))&&(o[Z]=C[Z])}return o}),FT=Yt(function(o){return o.push(r,hg),gr(Vg,r,o)});function zT(o,l){return ud(o,Mt(l,3),sn)}function GT(o,l){return ud(o,Mt(l,3),dl)}function NT(o,l){return o==null?o:pl(o,Mt(l,3),cr)}function jT(o,l){return o==null?o:Id(o,Mt(l,3),cr)}function qT(o,l){return o&&sn(o,Mt(l,3))}function UT(o,l){return o&&dl(o,Mt(l,3))}function kT(o){return o==null?[]:Yo(o,We(o))}function HT(o){return o==null?[]:Yo(o,cr(o))}function Kl(o,l,d){var $=o==null?r:Ba(o,l);return $===r?d:$}function WT(o,l){return o!=null&&dg(o,l,dC)}function Yl(o,l){return o!=null&&dg(o,l,gC)}var KT=og(function(o,l,d){l!=null&&typeof l.toString!="function"&&(l=Bo.call(l)),o[l]=d},Vl(hr)),YT=og(function(o,l,d){l!=null&&typeof l.toString!="function"&&(l=Bo.call(l)),ce.call(o,l)?o[l].push(d):o[l]=[d]},Mt),XT=Yt(bs);function We(o){return lr(o)?Cd(o):$l(o)}function cr(o){return lr(o)?Cd(o,!0):OC(o)}function VT(o,l){var d={};return l=Mt(l,3),sn(o,function($,S,C){In(d,l($,S,C),$)}),d}function ZT(o,l){var d={};return l=Mt(l,3),sn(o,function($,S,C){In(d,S,l($,S,C))}),d}var JT=bi(function(o,l,d){Xo(o,l,d)}),Vg=bi(function(o,l,d,$){Xo(o,l,d,$)}),QT=Rn(function(o,l){var d={};if(o==null)return d;var $=!1;l=Me(l,function(C){return C=ia(C,o),$||($=C.length>1),C}),on(o,Dl(o),d),$&&(d=Fr(d,v|p|g,KC));for(var S=l.length;S--;)Cl(d,l[S]);return d});function t2(o,l){return Zg(o,lu(Mt(l)))}var e2=Rn(function(o,l){return o==null?{}:TC(o,l)});function Zg(o,l){if(o==null)return{};var d=Me(Dl(o),function($){return[$]});return l=Mt(l),qd(o,d,function($,S){return l($,S[0])})}function r2(o,l,d){l=ia(l,o);var $=-1,S=l.length;for(S||(S=1,o=r);++$<S;){var C=o==null?r:o[un(l[$])];C===r&&($=S,C=d),o=Ln(C)?C.call(o):C}return o}function n2(o,l,d){return o==null?o:ws(o,l,d)}function a2(o,l,d,$){return $=typeof $=="function"?$:r,o==null?o:ws(o,l,d,$)}var Jg=lg(We),Qg=lg(cr);function i2(o,l,d){var $=Gt(o),S=$||oa(o)||Si(o);if(l=Mt(l,4),d==null){var C=o&&o.constructor;S?d=$?new C:[]:De(o)?d=Ln(C)?$i(zo(o)):{}:d={}}return(S?Rr:sn)(o,function(D,R,N){return l(d,D,R,N)}),d}function s2(o,l){return o==null?!0:Cl(o,l)}function o2(o,l,d){return o==null?o:Kd(o,l,Tl(d))}function u2(o,l,d,$){return $=typeof $=="function"?$:r,o==null?o:Kd(o,l,Tl(d),$)}function Ei(o){return o==null?[]:sl(o,We(o))}function f2(o){return o==null?[]:sl(o,cr(o))}function l2(o,l,d){return d===r&&(d=l,l=r),d!==r&&(d=Nr(d),d=d===d?d:0),l!==r&&(l=Nr(l),l=l===l?l:0),Ra(Nr(o),l,d)}function c2(o,l,d){return l=Fn(l),d===r?(d=l,l=0):d=Fn(d),o=Nr(o),_C(o,l,d)}function h2(o,l,d){if(d&&typeof d!="boolean"&&ar(o,l,d)&&(l=d=r),d===r&&(typeof l=="boolean"?(d=l,l=r):typeof o=="boolean"&&(d=o,o=r)),o===r&&l===r?(o=0,l=1):(o=Fn(o),l===r?(l=o,o=0):l=Fn(l)),o>l){var $=o;o=l,l=$}if(d||o%1||l%1){var S=Sd();return Qe(o+S*(l-o+kS("1e-"+((S+"").length-1))),l)}return wl(o,l)}var v2=yi(function(o,l,d){return l=l.toLowerCase(),o+(d?t0(l):l)});function t0(o){return Xl(fe(o).toLowerCase())}function e0(o){return o=fe(o),o&&o.replace(dS,nE).replace(RS,"")}function p2(o,l,d){o=fe(o),l=mr(l);var $=o.length;d=d===r?$:Ra(kt(d),0,$);var S=d;return d-=l.length,d>=0&&o.slice(d,S)==l}function d2(o){return o=fe(o),o&&Xw.test(o)?o.replace(Ip,aE):o}function g2(o){return o=fe(o),o&&eS.test(o)?o.replace(kf,"\\$&"):o}var _2=yi(function(o,l,d){return o+(d?"-":"")+l.toLowerCase()}),m2=yi(function(o,l,d){return o+(d?" ":"")+l.toLowerCase()}),$2=ag("toLowerCase");function b2(o,l,d){o=fe(o),l=kt(l);var $=l?pi(o):0;if(!l||$>=l)return o;var S=(l-$)/2;return eu(qo(S),d)+o+eu(jo(S),d)}function y2(o,l,d){o=fe(o),l=kt(l);var $=l?pi(o):0;return l&&$<l?o+eu(l-$,d):o}function w2(o,l,d){o=fe(o),l=kt(l);var $=l?pi(o):0;return l&&$<l?eu(l-$,d)+o:o}function S2(o,l,d){return d||l==null?l=0:l&&(l=+l),PE(fe(o).replace(Hf,""),l||0)}function E2(o,l,d){return(d?ar(o,l,d):l===r)?l=1:l=kt(l),Sl(fe(o),l)}function C2(){var o=arguments,l=fe(o[0]);return o.length<3?l:l.replace(o[1],o[2])}var O2=yi(function(o,l,d){return o+(d?"_":"")+l.toLowerCase()});function A2(o,l,d){return d&&typeof d!="number"&&ar(o,l,d)&&(l=d=r),d=d===r?it:d>>>0,d?(o=fe(o),o&&(typeof l=="string"||l!=null&&!Wl(l))&&(l=mr(l),!l&&vi(o))?sa(Kr(o),0,d):o.split(l,d)):[]}var T2=yi(function(o,l,d){return o+(d?" ":"")+Xl(l)});function M2(o,l,d){return o=fe(o),d=d==null?0:Ra(kt(d),0,o.length),l=mr(l),o.slice(d,d+l.length)==l}function P2(o,l,d){var $=E.templateSettings;d&&ar(o,l,d)&&(l=r),o=fe(o),l=vu({},l,$,cg);var S=vu({},l.imports,$.imports,cg),C=We(S),D=sl(S,C),R,N,Z=0,Q=l.interpolate||Oo,nt="__p += '",ct=ul((l.escape||Oo).source+"|"+Q.source+"|"+(Q===Dp?fS:Oo).source+"|"+(l.evaluate||Oo).source+"|$","g"),St="//# sourceURL="+(ce.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++GS+"]")+`
|
|
`;o.replace(ct,function(xt,Zt,re,br,ir,yr){return re||(re=br),nt+=o.slice(Z,yr).replace(gS,iE),Zt&&(R=!0,nt+=`' +
|
|
__e(`+Zt+`) +
|
|
'`),ir&&(N=!0,nt+=`';
|
|
`+ir+`;
|
|
__p += '`),re&&(nt+=`' +
|
|
((__t = (`+re+`)) == null ? '' : __t) +
|
|
'`),Z=yr+xt.length,xt}),nt+=`';
|
|
`;var Pt=ce.call(l,"variable")&&l.variable;if(!Pt)nt=`with (obj) {
|
|
`+nt+`
|
|
}
|
|
`;else if(oS.test(Pt))throw new Bt(u);nt=(N?nt.replace(Hw,""):nt).replace(Ww,"$1").replace(Kw,"$1;"),nt="function("+(Pt||"obj")+`) {
|
|
`+(Pt?"":`obj || (obj = {});
|
|
`)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
|
|
function print() { __p += __j.call(arguments, '') }
|
|
`:`;
|
|
`)+nt+`return __p
|
|
}`;var Wt=n0(function(){return oe(C,St+"return "+nt).apply(r,D)});if(Wt.source=nt,Hl(Wt))throw Wt;return Wt}function x2(o){return fe(o).toLowerCase()}function I2(o){return fe(o).toUpperCase()}function D2(o,l,d){if(o=fe(o),o&&(d||l===r))return hd(o);if(!o||!(l=mr(l)))return o;var $=Kr(o),S=Kr(l),C=vd($,S),D=pd($,S)+1;return sa($,C,D).join("")}function R2(o,l,d){if(o=fe(o),o&&(d||l===r))return o.slice(0,gd(o)+1);if(!o||!(l=mr(l)))return o;var $=Kr(o),S=pd($,Kr(l))+1;return sa($,0,S).join("")}function B2(o,l,d){if(o=fe(o),o&&(d||l===r))return o.replace(Hf,"");if(!o||!(l=mr(l)))return o;var $=Kr(o),S=vd($,Kr(l));return sa($,S).join("")}function L2(o,l){var d=L,$=G;if(De(l)){var S="separator"in l?l.separator:S;d="length"in l?kt(l.length):d,$="omission"in l?mr(l.omission):$}o=fe(o);var C=o.length;if(vi(o)){var D=Kr(o);C=D.length}if(d>=C)return o;var R=d-pi($);if(R<1)return $;var N=D?sa(D,0,R).join(""):o.slice(0,R);if(S===r)return N+$;if(D&&(R+=N.length-R),Wl(S)){if(o.slice(R).search(S)){var Z,Q=N;for(S.global||(S=ul(S.source,fe(Rp.exec(S))+"g")),S.lastIndex=0;Z=S.exec(Q);)var nt=Z.index;N=N.slice(0,nt===r?R:nt)}}else if(o.indexOf(mr(S),R)!=R){var ct=N.lastIndexOf(S);ct>-1&&(N=N.slice(0,ct))}return N+$}function F2(o){return o=fe(o),o&&Yw.test(o)?o.replace(xp,hE):o}var z2=yi(function(o,l,d){return o+(d?" ":"")+l.toUpperCase()}),Xl=ag("toUpperCase");function r0(o,l,d){return o=fe(o),l=d?r:l,l===r?oE(o)?dE(o):JS(o):o.match(l)||[]}var n0=Yt(function(o,l){try{return gr(o,r,l)}catch(d){return Hl(d)?d:new Bt(d)}}),G2=Rn(function(o,l){return Rr(l,function(d){d=un(d),In(o,d,Ul(o[d],o))}),o});function N2(o){var l=o==null?0:o.length,d=Mt();return o=l?Me(o,function($){if(typeof $[1]!="function")throw new Br(s);return[d($[0]),$[1]]}):[],Yt(function($){for(var S=-1;++S<l;){var C=o[S];if(gr(C[0],this,$))return gr(C[1],this,$)}})}function j2(o){return hC(Fr(o,v))}function Vl(o){return function(){return o}}function q2(o,l){return o==null||o!==o?l:o}var U2=sg(),k2=sg(!0);function hr(o){return o}function Zl(o){return Ld(typeof o=="function"?o:Fr(o,v))}function H2(o){return zd(Fr(o,v))}function W2(o,l){return Gd(o,Fr(l,v))}var K2=Yt(function(o,l){return function(d){return bs(d,o,l)}}),Y2=Yt(function(o,l){return function(d){return bs(o,d,l)}});function Jl(o,l,d){var $=We(l),S=Yo(l,$);d==null&&!(De(l)&&(S.length||!$.length))&&(d=l,l=o,o=this,S=Yo(l,We(l)));var C=!(De(d)&&"chain"in d)||!!d.chain,D=Ln(o);return Rr(S,function(R){var N=l[R];o[R]=N,D&&(o.prototype[R]=function(){var Z=this.__chain__;if(C||Z){var Q=o(this.__wrapped__),nt=Q.__actions__=fr(this.__actions__);return nt.push({func:N,args:arguments,thisArg:o}),Q.__chain__=Z,Q}return N.apply(o,ta([this.value()],arguments))})}),o}function X2(){return Ye._===this&&(Ye._=yE),this}function Ql(){}function V2(o){return o=kt(o),Yt(function(l){return Nd(l,o)})}var Z2=Pl(Me),J2=Pl(od),Q2=Pl(el);function a0(o){return Fl(o)?rl(un(o)):MC(o)}function tM(o){return function(l){return o==null?r:Ba(o,l)}}var eM=ug(),rM=ug(!0);function tc(){return[]}function ec(){return!1}function nM(){return{}}function aM(){return""}function iM(){return!0}function sM(o,l){if(o=kt(o),o<1||o>pt)return[];var d=it,$=Qe(o,it);l=Mt(l),o-=it;for(var S=il($,l);++d<o;)l(d);return S}function oM(o){return Gt(o)?Me(o,un):$r(o)?[o]:fr(Eg(fe(o)))}function uM(o){var l=++$E;return fe(o)+l}var fM=tu(function(o,l){return o+l},0),lM=xl("ceil"),cM=tu(function(o,l){return o/l},1),hM=xl("floor");function vM(o){return o&&o.length?Ko(o,hr,gl):r}function pM(o,l){return o&&o.length?Ko(o,Mt(l,2),gl):r}function dM(o){return ld(o,hr)}function gM(o,l){return ld(o,Mt(l,2))}function _M(o){return o&&o.length?Ko(o,hr,bl):r}function mM(o,l){return o&&o.length?Ko(o,Mt(l,2),bl):r}var $M=tu(function(o,l){return o*l},1),bM=xl("round"),yM=tu(function(o,l){return o-l},0);function wM(o){return o&&o.length?al(o,hr):0}function SM(o,l){return o&&o.length?al(o,Mt(l,2)):0}return E.after=HA,E.ary=Bg,E.assign=IT,E.assignIn=Xg,E.assignInWith=vu,E.assignWith=DT,E.at=RT,E.before=Lg,E.bind=Ul,E.bindAll=G2,E.bindKey=Fg,E.castArray=nT,E.chain=Ig,E.chunk=hO,E.compact=vO,E.concat=pO,E.cond=N2,E.conforms=j2,E.constant=Vl,E.countBy=wA,E.create=BT,E.curry=zg,E.curryRight=Gg,E.debounce=Ng,E.defaults=LT,E.defaultsDeep=FT,E.defer=WA,E.delay=KA,E.difference=dO,E.differenceBy=gO,E.differenceWith=_O,E.drop=mO,E.dropRight=$O,E.dropRightWhile=bO,E.dropWhile=yO,E.fill=wO,E.filter=EA,E.flatMap=AA,E.flatMapDeep=TA,E.flatMapDepth=MA,E.flatten=Tg,E.flattenDeep=SO,E.flattenDepth=EO,E.flip=YA,E.flow=U2,E.flowRight=k2,E.fromPairs=CO,E.functions=kT,E.functionsIn=HT,E.groupBy=PA,E.initial=AO,E.intersection=TO,E.intersectionBy=MO,E.intersectionWith=PO,E.invert=KT,E.invertBy=YT,E.invokeMap=IA,E.iteratee=Zl,E.keyBy=DA,E.keys=We,E.keysIn=cr,E.map=ou,E.mapKeys=VT,E.mapValues=ZT,E.matches=H2,E.matchesProperty=W2,E.memoize=fu,E.merge=JT,E.mergeWith=Vg,E.method=K2,E.methodOf=Y2,E.mixin=Jl,E.negate=lu,E.nthArg=V2,E.omit=QT,E.omitBy=t2,E.once=XA,E.orderBy=RA,E.over=Z2,E.overArgs=VA,E.overEvery=J2,E.overSome=Q2,E.partial=kl,E.partialRight=jg,E.partition=BA,E.pick=e2,E.pickBy=Zg,E.property=a0,E.propertyOf=tM,E.pull=RO,E.pullAll=Pg,E.pullAllBy=BO,E.pullAllWith=LO,E.pullAt=FO,E.range=eM,E.rangeRight=rM,E.rearg=ZA,E.reject=zA,E.remove=zO,E.rest=JA,E.reverse=jl,E.sampleSize=NA,E.set=n2,E.setWith=a2,E.shuffle=jA,E.slice=GO,E.sortBy=kA,E.sortedUniq=WO,E.sortedUniqBy=KO,E.split=A2,E.spread=QA,E.tail=YO,E.take=XO,E.takeRight=VO,E.takeRightWhile=ZO,E.takeWhile=JO,E.tap=vA,E.throttle=tT,E.thru=su,E.toArray=Wg,E.toPairs=Jg,E.toPairsIn=Qg,E.toPath=oM,E.toPlainObject=Yg,E.transform=i2,E.unary=eT,E.union=QO,E.unionBy=tA,E.unionWith=eA,E.uniq=rA,E.uniqBy=nA,E.uniqWith=aA,E.unset=s2,E.unzip=ql,E.unzipWith=xg,E.update=o2,E.updateWith=u2,E.values=Ei,E.valuesIn=f2,E.without=iA,E.words=r0,E.wrap=rT,E.xor=sA,E.xorBy=oA,E.xorWith=uA,E.zip=fA,E.zipObject=lA,E.zipObjectDeep=cA,E.zipWith=hA,E.entries=Jg,E.entriesIn=Qg,E.extend=Xg,E.extendWith=vu,Jl(E,E),E.add=fM,E.attempt=n0,E.camelCase=v2,E.capitalize=t0,E.ceil=lM,E.clamp=l2,E.clone=aT,E.cloneDeep=sT,E.cloneDeepWith=oT,E.cloneWith=iT,E.conformsTo=uT,E.deburr=e0,E.defaultTo=q2,E.divide=cM,E.endsWith=p2,E.eq=Xr,E.escape=d2,E.escapeRegExp=g2,E.every=SA,E.find=CA,E.findIndex=Og,E.findKey=zT,E.findLast=OA,E.findLastIndex=Ag,E.findLastKey=GT,E.floor=hM,E.forEach=Dg,E.forEachRight=Rg,E.forIn=NT,E.forInRight=jT,E.forOwn=qT,E.forOwnRight=UT,E.get=Kl,E.gt=fT,E.gte=lT,E.has=WT,E.hasIn=Yl,E.head=Mg,E.identity=hr,E.includes=xA,E.indexOf=OO,E.inRange=c2,E.invoke=XT,E.isArguments=za,E.isArray=Gt,E.isArrayBuffer=cT,E.isArrayLike=lr,E.isArrayLikeObject=Ne,E.isBoolean=hT,E.isBuffer=oa,E.isDate=vT,E.isElement=pT,E.isEmpty=dT,E.isEqual=gT,E.isEqualWith=_T,E.isError=Hl,E.isFinite=mT,E.isFunction=Ln,E.isInteger=qg,E.isLength=cu,E.isMap=Ug,E.isMatch=$T,E.isMatchWith=bT,E.isNaN=yT,E.isNative=wT,E.isNil=ET,E.isNull=ST,E.isNumber=kg,E.isObject=De,E.isObjectLike=Be,E.isPlainObject=Os,E.isRegExp=Wl,E.isSafeInteger=CT,E.isSet=Hg,E.isString=hu,E.isSymbol=$r,E.isTypedArray=Si,E.isUndefined=OT,E.isWeakMap=AT,E.isWeakSet=TT,E.join=xO,E.kebabCase=_2,E.last=Gr,E.lastIndexOf=IO,E.lowerCase=m2,E.lowerFirst=$2,E.lt=MT,E.lte=PT,E.max=vM,E.maxBy=pM,E.mean=dM,E.meanBy=gM,E.min=_M,E.minBy=mM,E.stubArray=tc,E.stubFalse=ec,E.stubObject=nM,E.stubString=aM,E.stubTrue=iM,E.multiply=$M,E.nth=DO,E.noConflict=X2,E.noop=Ql,E.now=uu,E.pad=b2,E.padEnd=y2,E.padStart=w2,E.parseInt=S2,E.random=h2,E.reduce=LA,E.reduceRight=FA,E.repeat=E2,E.replace=C2,E.result=r2,E.round=bM,E.runInContext=z,E.sample=GA,E.size=qA,E.snakeCase=O2,E.some=UA,E.sortedIndex=NO,E.sortedIndexBy=jO,E.sortedIndexOf=qO,E.sortedLastIndex=UO,E.sortedLastIndexBy=kO,E.sortedLastIndexOf=HO,E.startCase=T2,E.startsWith=M2,E.subtract=yM,E.sum=wM,E.sumBy=SM,E.template=P2,E.times=sM,E.toFinite=Fn,E.toInteger=kt,E.toLength=Kg,E.toLower=x2,E.toNumber=Nr,E.toSafeInteger=xT,E.toString=fe,E.toUpper=I2,E.trim=D2,E.trimEnd=R2,E.trimStart=B2,E.truncate=L2,E.unescape=F2,E.uniqueId=uM,E.upperCase=z2,E.upperFirst=Xl,E.each=Dg,E.eachRight=Rg,E.first=Mg,Jl(E,function(){var o={};return sn(E,function(l,d){ce.call(E.prototype,d)||(o[d]=l)}),o}(),{chain:!1}),E.VERSION=n,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){E[o].placeholder=E}),Rr(["drop","take"],function(o,l){Jt.prototype[o]=function(d){d=d===r?1:ke(kt(d),0);var $=this.__filtered__&&!l?new Jt(this):this.clone();return $.__filtered__?$.__takeCount__=Qe(d,$.__takeCount__):$.__views__.push({size:Qe(d,it),type:o+($.__dir__<0?"Right":"")}),$},Jt.prototype[o+"Right"]=function(d){return this.reverse()[o](d).reverse()}}),Rr(["filter","map","takeWhile"],function(o,l){var d=l+1,$=d==et||d==gt;Jt.prototype[o]=function(S){var C=this.clone();return C.__iteratees__.push({iteratee:Mt(S,3),type:d}),C.__filtered__=C.__filtered__||$,C}}),Rr(["head","last"],function(o,l){var d="take"+(l?"Right":"");Jt.prototype[o]=function(){return this[d](1).value()[0]}}),Rr(["initial","tail"],function(o,l){var d="drop"+(l?"":"Right");Jt.prototype[o]=function(){return this.__filtered__?new Jt(this):this[d](1)}}),Jt.prototype.compact=function(){return this.filter(hr)},Jt.prototype.find=function(o){return this.filter(o).head()},Jt.prototype.findLast=function(o){return this.reverse().find(o)},Jt.prototype.invokeMap=Yt(function(o,l){return typeof o=="function"?new Jt(this):this.map(function(d){return bs(d,o,l)})}),Jt.prototype.reject=function(o){return this.filter(lu(Mt(o)))},Jt.prototype.slice=function(o,l){o=kt(o);var d=this;return d.__filtered__&&(o>0||l<0)?new Jt(d):(o<0?d=d.takeRight(-o):o&&(d=d.drop(o)),l!==r&&(l=kt(l),d=l<0?d.dropRight(-l):d.take(l-o)),d)},Jt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Jt.prototype.toArray=function(){return this.take(it)},sn(Jt.prototype,function(o,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),$=/^(?:head|last)$/.test(l),S=E[$?"take"+(l=="last"?"Right":""):l],C=$||/^find/.test(l);!S||(E.prototype[l]=function(){var D=this.__wrapped__,R=$?[1]:arguments,N=D instanceof Jt,Z=R[0],Q=N||Gt(D),nt=function(Zt){var re=S.apply(E,ta([Zt],R));return $&&ct?re[0]:re};Q&&d&&typeof Z=="function"&&Z.length!=1&&(N=Q=!1);var ct=this.__chain__,St=!!this.__actions__.length,Pt=C&&!ct,Wt=N&&!St;if(!C&&Q){D=Wt?D:new Jt(this);var xt=o.apply(D,R);return xt.__actions__.push({func:su,args:[nt],thisArg:r}),new Lr(xt,ct)}return Pt&&Wt?o.apply(this,R):(xt=this.thru(nt),Pt?$?xt.value()[0]:xt.value():xt)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(o){var l=Io[o],d=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",$=/^(?:pop|shift)$/.test(o);E.prototype[o]=function(){var S=arguments;if($&&!this.__chain__){var C=this.value();return l.apply(Gt(C)?C:[],S)}return this[d](function(D){return l.apply(Gt(D)?D:[],S)})}}),sn(Jt.prototype,function(o,l){var d=E[l];if(d){var $=d.name+"";ce.call(mi,$)||(mi[$]=[]),mi[$].push({name:l,func:d})}}),mi[Qo(r,y).name]=[{name:"wrapper",func:r}],Jt.prototype.clone=FE,Jt.prototype.reverse=zE,Jt.prototype.value=GE,E.prototype.at=pA,E.prototype.chain=dA,E.prototype.commit=gA,E.prototype.next=_A,E.prototype.plant=$A,E.prototype.reverse=bA,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=yA,E.prototype.first=E.prototype.head,vs&&(E.prototype[vs]=mA),E},di=gE();Pa?((Pa.exports=di)._=di,Zf._=di):Ye._=di}).call(Er)})(oh,oh.exports);var jrt=oh.exports;const bf=new Ke({subduxes:{reqs:Aa},initial:{bays:0,squadrons:[]},actions:{setCarrierBays:null,setSquadronType:null}});bf.setMutation("setCarrierBays",e=>Rt({bays:e,reqs:krt(e),squadrons:Urt(e)}));bf.setMutation("setSquadronType",({type:e,id:t})=>r=>Rt.updateIn(["squadrons",t-1],{type:e,reqs:qrt(e)},r));const qu=[{type:"standard",cost:3},{type:"fast",cost:4},{type:"heavy",cost:5},{type:"interceptor",cost:3},{type:"attack",cost:4},{type:"long range",cost:4},{type:"torpedo",cost:6}];function qrt(e){var t;return{mass:6,cost:6*((t=qu.find(r=>r.type===e))==null?void 0:t.cost)}}const Urt=e=>t=>(t.length>e&&(t=t.slice(0,e)),t.length<e&&(t=[...t,...jrt.times(e-t.length,()=>({type:qu[0].type,reqs:{cost:6*qu[0].cost,mass:6}}))]),t);function krt(e){return{mass:9*e,cost:18*e}}const yf=new Ke({actions:{setShipType:null,setShipClass:null,setCarrierBays:bf.actions.setCarrierBays},initial:{shipType:"",shipClass:"",isCarrier:!1,mass:10}});yf.setMutation("setShipType",e=>Rt({shipType:e}));yf.setMutation("setShipClass",e=>Rt({shipClass:e}));yf.setMutation("setCarrierBays",e=>Rt({isCarrier:e>0}));const Zv=new Ke({subduxes:{reqs:Aa},initial:{rating:0,min:0,max:0},actions:{setShipMass:null,setHull:null}});Zv.setMutation("setHull",e=>Rt({rating:e,reqs:{mass:e,cost:2*e}}));Zv.setMutation("setShipMass",e=>t=>{let{rating:r}=t;r>e&&(r=e);const n=Math.ceil(e/10);return r<n&&(r=n),Rt({max:e,min:n,rating:r},t)});const Jv=new Ke({subduxes:{reqs:Aa},initial:{standard:0,advanced:0},actions:{setScreens:null,setScreensReqs:null}});Jv.setMutation("setScreens",e=>Rt(e));Jv.setMutation("setScreensReqs",e=>Rt({reqs:e}));const Hrt=e=>Yv(t=>t.reqs.mass,t=>t.structure.screens.standard,t=>t.structure.screens.advanced,(...t)=>e.dispatch.setScreensReqs(Wrt(...t)));function Wrt(e,t,r){const n=t*Math.max(3,Math.ceil(.05*e)),a=r*Math.max(4,Math.ceil(.075*e));return{mass:n+a,cost:3*n+4*a}}const Sy=new Ke({subduxes:{reqs:Aa},initial:{space:0},actions:{setCargo:null}});Sy.setMutation("setCargo",e=>Rt({space:e,reqs:{mass:e}}));const Qv=new Ke({subduxes:{reqs:Aa},initial:{layers:[]},actions:{setArmorLayers:null,setArmorRating:null}});Qv.setMutation("setArmorRating",({layer:e,rating:t})=>r=>{let n=[...r.layers].map((a,i)=>i===e-1?t:a);return{layers:n,reqs:Ey(n)}});Qv.setMutation("setArmorLayers",e=>t=>{let r=[...t.layers];for(e<t.layers.length&&(r=[...t.layers].slice(0,e));r.length<e;)r.push(0);return{layers:r,reqs:Ey(r)}});function Ey(e){const t=2*e.reduce((n,a)=>n+a,0),r=2*e.map((n,a)=>n*(a+1)).reduce((n,a)=>n+a,0);return{mass:t,cost:r}}const Cy=new Ke({subduxes:{reqs:Aa},initial:{type:"none"},actions:{setStreamlining:null}});Cy.setMutation("setStreamlining",({shipMass:e,type:t})=>Rt({type:t,reqs:Krt({shipMass:e,type:t})}));function Krt({shipMass:e,type:t}){const r=Math.ceil(e*(t==="none"?0:t==="partial"?5:10)/100);return{mass:r,cost:2*r}}const Yrt=new Ke({subduxes:{hull:Zv,screens:Jv,cargo:Sy,streamlining:Cy,armor:Qv},initial:{uiTransform:""}}),Qs=[{name:"beam",type:"beam",reqs:Xrt,initial:{weaponClass:1}},{name:"submunition pack",type:"submunition",reqs:{mass:1,cost:3},initial:{arc:"F"}},{name:"point defence system",type:"pds",reqs:{mass:1,cost:3},initial:{}},{name:"scattergun",type:"scattergun",reqs:{mass:1,cost:4},initial:{}},{name:"needle weapon",type:"needle",reqs:{mass:2,cost:6},initial:{arc:"F"}}],wf=new Ke({initial:[],actions:{addWeapon:null,removeWeapon:null,setWeapon:null}});wf.setMutation("setWeapon",r=>{var n=r,{id:e}=n,t=f0(n,["id"]);return a=>(console.log(e,t,a),a=Rt.map(Rt.if(i=>i.id===e,i=>rc(ua({id:e},t),{reqs:Oy(t)})),a),console.log(a),a)});wf.setMutation("removeWeapon",e=>t=>[...t.filter(r=>r.id!==e)]);wf.setMutation("addWeapon",e=>t=>{const r=Qs.find(n=>n.type===e).initial;return[...t,ua({id:t.length===0?1:t[t.length-1]+1,type:e,reqs:Oy(ua({type:e},r))},r)]});function Oy(e){const{reqs:t}=Qs.find(r=>r.type===e.type)||{};return t?typeof t=="function"?t(e):t:{}}const B_=e=>e.length!==4?!1:!e.some(t=>t.length===1);function Xrt({weaponClass:e,arcs:t}){console.log({weaponClass:e,arcs:t});let r;return e===1&&(r=1),e===2&&(r=2+(t.length>3?1:0)),e==3&&(r=4,B_(t)?r+=2:r+=t.length-1),e==4&&(r=8,B_(t)?r+=4:r+=2*(t.length-1)),{mass:r,cost:3*r}}const L_={cost:0,mass:0},tp=new Ke({subduxes:{weapons:wf},initial:{firecons:{stations:0,reqs:L_},adfc:{rating:0,reqs:L_}},actions:{setADFC:null,setFirecons:null}});tp.setMutation("setFirecons",e=>Rt({firecons:{stations:e,reqs:{cost:4*e,mass:e}}}));tp.setMutation("setADFC",e=>Rt({adfc:{rating:e,reqs:{cost:8*e,mass:2*e}}}));const Xn=new Ke({subduxes:{identification:yf,propulsion:Nrt,structure:Yrt,carrier:bf,weaponry:tp},initial:{reqs:{cost:0,mass:10,usedMass:0}},actions:{setShipReqs:null,setUITransform:null,resetLayout:null}});function Ay(e){return typeof e!="object"?e:Rt.map((t,r)=>r==="uiTransform"?"":Ay(t),e)}Xn.setMutation("resetLayout",()=>Ay);Xn.setMutation("setShipMass",e=>Rt({reqs:{mass:e}}));Xn.setMutation("setShipReqs",e=>Rt({reqs:e}));Xn.setMutation("setUITransform",({system:e,systemId:t,translate:r})=>{const n=r?`translate(${r[0]}px,${r[1]}px)`:"";switch(e){case"firecons":return Rt.updateIn("weaponry.firecons.uiTransform",n);case"weapon":return Rt.updateIn("weaponry.weapons",Rt.map(Rt.if(({id:i})=>i===t,Rt({uiTransform:n}))));case"screens":return Rt.updateIn("structure.screens.uiTransform",n);case"hull":return Rt.updateIn("structure.hull.uiTransform",n);case"internalSystems":const a="structure.uiTransform";return Rt.updateIn(a,n);case"ftl":return Rt.updateIn("propulsion.ftl.uiTransform",n);case"drive":return Rt.updateIn("propulsion.drive.uiTransform",n);default:return i=>i}});Xn.addReaction(Lrt);Xn.addReaction(Grt);Xn.addReaction(Hrt);Xn.addReaction(e=>t=>{let r=0,n=0,a=Object.values(t);for(;a.length>0;){const i=a.shift();typeof i=="object"&&(i.reqs&&(r+=i.reqs.cost,n+=i.reqs.mass),a.push(...Object.values(i)))}e.dispatch.setShipReqs({cost:r,usedMass:n})});let Vrt=g$;var Zrt=(e=void 0)=>{localStorage.getItem("ship")&&(e=JSON.parse(localStorage.getItem("ship")));const t=Xn.createStore(e,a=>Vrt(FM(a)));let r;const n=IM(t.getState(),a=>{t.subscribe(()=>{r!==t.getState()&&(r=t.getState(),a(r),localStorage.setItem("ship",JSON.stringify(r)))})});return{dispatch:t.dispatch,state:n,shipMass:DM(n,a=>a.reqs.mass)}};function Sf(){const e=AM();return t=>{const r=Object.keys(e.$$.callbacks),n=[];return r.forEach(a=>n.push(Xt(t,a,i=>zh(e,i)))),{destroy:()=>{n.forEach(a=>a())}}}}const Jrt=e=>({}),F_=e=>({}),Qrt=e=>({}),z_=e=>({});function G_(e){let t,r;const n=e[4].header,a=Sn(n,e,e[3],z_);return{c(){t=k("header"),a&&a.c()},l(i){t=H(i,"HEADER",{});var s=X(t);a&&a.l(s),s.forEach(P)},m(i,s){U(i,t,s),a&&a.m(t,null),r=!0},p(i,s){a&&a.p&&(!r||s&8)&&bn(a,n,i,i[3],r?wn(n,i[3],s,Qrt):yn(i[3]),z_)},i(i){r||(V(a,i),r=!0)},o(i){tt(a,i),r=!1},d(i){i&&P(t),a&&a.d(i)}}}function N_(e){let t,r;const n=e[4].footer,a=Sn(n,e,e[3],F_);return{c(){t=k("footer"),a&&a.c()},l(i){t=H(i,"FOOTER",{});var s=X(t);a&&a.l(s),s.forEach(P)},m(i,s){U(i,t,s),a&&a.m(t,null),r=!0},p(i,s){a&&a.p&&(!r||s&8)&&bn(a,n,i,i[3],r?wn(n,i[3],s,Jrt):yn(i[3]),F_)},i(i){r||(V(a,i),r=!0)},o(i){tt(a,i),r=!1},d(i){i&&P(t),a&&a.d(i)}}}function tnt(e){let t,r,n,a,i,s,u=e[2].header&&G_(e);const f=e[4].default,c=Sn(f,e,e[3],null);let h=e[2].footer&&N_(e),v=[e[1]],p={};for(let g=0;g<v.length;g+=1)p=Nt(p,v[g]);return{c(){t=k("div"),u&&u.c(),r=ht(),c&&c.c(),n=ht(),h&&h.c(),this.h()},l(g){t=H(g,"DIV",{});var _=X(t);u&&u.l(_),r=vt(_),c&&c.l(_),n=vt(_),h&&h.l(_),_.forEach(P),this.h()},h(){pa(t,p),Le(t,"card",1)},m(g,_){U(g,t,_),u&&u.m(t,null),j(t,r),c&&c.m(t,null),j(t,n),h&&h.m(t,null),a=!0,i||(s=nn(e[0].call(null,t)),i=!0)},p(g,[_]){g[2].header?u?(u.p(g,_),_&4&&V(u,1)):(u=G_(g),u.c(),V(u,1),u.m(t,r)):u&&(dn(),tt(u,1,1,()=>{u=null}),gn()),c&&c.p&&(!a||_&8)&&bn(c,f,g,g[3],a?wn(f,g[3],_,null):yn(g[3]),null),g[2].footer?h?(h.p(g,_),_&4&&V(h,1)):(h=N_(g),h.c(),V(h,1),h.m(t,null)):h&&(dn(),tt(h,1,1,()=>{h=null}),gn()),pa(t,p=ae(v,[_&2&&g[1]])),Le(t,"card",1)},i(g){a||(V(u),V(c,g),V(h),a=!0)},o(g){tt(u),tt(c,g),tt(h),a=!1},d(g){g&&P(t),u&&u.d(),c&&c.d(g),h&&h.d(),i=!1,s()}}}function ent(e,t,r){const n=[];let a=da(t,n),{$$slots:i={},$$scope:s}=t;const u=TM(i),f=Sf();return e.$$set=c=>{t=Nt(Nt({},t),Ku(c)),r(1,a=da(t,n)),"$$scope"in c&&r(3,s=c.$$scope)},[f,a,u,s,i]}class rnt extends Ot{constructor(t){super();At(this,t,ent,tnt,Tt,{})}}function nnt(e){let t,r,n,a;const i=e[7].default,s=Sn(i,e,e[6],null);let u=[e[3]],f={};for(let c=0;c<u.length;c+=1)f=Nt(f,u[c]);return{c(){t=k("nav"),s&&s.c(),this.h()},l(c){t=H(c,"NAV",{});var h=X(t);s&&s.l(h),h.forEach(P),this.h()},h(){pa(t,f),Le(t,"tabs",1),Le(t,"is-full",e[0])},m(c,h){U(c,t,h),s&&s.m(t,null),r=!0,n||(a=nn(e[1].call(null,t)),n=!0)},p(c,[h]){s&&s.p&&(!r||h&64)&&bn(s,i,c,c[6],r?wn(i,c[6],h,null):yn(c[6]),null),pa(t,f=ae(u,[h&8&&c[3]])),Le(t,"tabs",1),Le(t,"is-full",c[0])},i(c){r||(V(s,c),r=!0)},o(c){tt(s,c),r=!1},d(c){c&&P(t),s&&s.d(c),n=!1,a()}}}function ant(e,t,r){const n=["active","full"];let a=da(t,n),i,{$$slots:s={},$$scope:u}=t,{active:f=0}=t,{full:c=!1}=t;const h=Sf(),v=RM(f);so(e,v,g=>r(5,i=g));let p=0;return Pc("tabs:getid",()=>p++),Pc("tabs:active",v),e.$$set=g=>{t=Nt(Nt({},t),Ku(g)),r(3,a=da(t,n)),"active"in g&&r(4,f=g.active),"full"in g&&r(0,c=g.full),"$$scope"in g&&r(6,u=g.$$scope)},e.$$.update=()=>{e.$$.dirty&32&&r(4,f=i)},[c,h,v,a,f,i,u,s]}class int extends Ot{constructor(t){super();At(this,t,ant,nnt,Tt,{active:4,full:0})}}function snt(e){let t,r,n,a;const i=e[8].default,s=Sn(i,e,e[7],null);let u=[e[5]],f={};for(let c=0;c<u.length;c+=1)f=Nt(f,u[c]);return{c(){t=k("span"),s&&s.c(),this.h()},l(c){t=H(c,"SPAN",{});var h=X(t);s&&s.l(h),h.forEach(P),this.h()},h(){pa(t,f),Le(t,"active",e[1]),Le(t,"svelte-3bldsl",!0)},m(c,h){U(c,t,h),s&&s.m(t,null),r=!0,n||(a=[nn(e[2].call(null,t)),Xt(t,"click",d$(e[9]))],n=!0)},p(c,[h]){s&&s.p&&(!r||h&128)&&bn(s,i,c,c[7],r?wn(i,c[7],h,null):yn(c[7]),null),pa(t,f=ae(u,[h&32&&c[5]])),Le(t,"active",c[1]),Le(t,"svelte-3bldsl",!0)},i(c){r||(V(s,c),r=!0)},o(c){tt(s,c),r=!1},d(c){c&&P(t),s&&s.d(c),n=!1,an(a)}}}function ont(e,t,r){let n;const a=["tabid"];let i=da(t,a),s,{$$slots:u={},$$scope:f}=t,{tabid:c=!1}=t;const h=Sf(),v=he("tabs:active");so(e,v,_=>r(6,s=_));const p=he("tabs:getid")(),g=()=>v.set(c===!1?p:c);return e.$$set=_=>{t=Nt(Nt({},t),Ku(_)),r(5,i=da(t,a)),"tabid"in _&&r(0,c=_.tabid),"$$scope"in _&&r(7,f=_.$$scope)},e.$$.update=()=>{e.$$.dirty&65&&r(1,n=s===c||s===p)},[c,n,h,v,p,i,s,f,u,g]}class gc extends Ot{constructor(t){super();At(this,t,ont,snt,Tt,{tabid:0})}}function j_(e,{delay:t=0,duration:r=400,easing:n=MM}={}){const a=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:i=>`opacity: ${i*a}`}}function q_(e){let t,r,n,a,i,s,u,f,c;const h=e[4].default,v=Sn(h,e,e[3],null);let p=[e[2]],g={};for(let _=0;_<p.length;_+=1)g=Nt(g,p[_]);return{c(){t=k("div"),r=k("div"),n=ht(),a=k("div"),v&&v.c(),this.h()},l(_){t=H(_,"DIV",{class:!0});var m=X(t);r=H(m,"DIV",{class:!0}),X(r).forEach(P),n=vt(m),a=H(m,"DIV",{});var b=X(a);v&&v.l(b),b.forEach(P),m.forEach(P),this.h()},h(){F(r,"class","background svelte-4lwi8h"),pa(a,g),Le(a,"modal",1),Le(a,"svelte-4lwi8h",!0),F(t,"class","container svelte-4lwi8h")},m(_,m){U(_,t,m),j(t,r),j(t,n),j(t,a),v&&v.m(a,null),u=!0,f||(c=[Xt(r,"click",e[5]),nn(i=e[1].call(null,a))],f=!0)},p(_,m){v&&v.p&&(!u||m&8)&&bn(v,h,_,_[3],u?wn(h,_[3],m,null):yn(_[3]),null),pa(a,g=ae(p,[m&4&&_[2]])),Le(a,"modal",1),Le(a,"svelte-4lwi8h",!0)},i(_){u||(V(v,_),ji(()=>{s||(s=l0(t,j_,{duration:200},!0)),s.run(1)}),u=!0)},o(_){tt(v,_),s||(s=l0(t,j_,{duration:200},!1)),s.run(0),u=!1},d(_){_&&P(t),v&&v.d(_),_&&s&&s.end(),f=!1,an(c)}}}function unt(e){let t,r,n=e[0]&&q_(e);return{c(){n&&n.c(),t=er()},l(a){n&&n.l(a),t=er()},m(a,i){n&&n.m(a,i),U(a,t,i),r=!0},p(a,[i]){a[0]?n?(n.p(a,i),i&1&&V(n,1)):(n=q_(a),n.c(),V(n,1),n.m(t.parentNode,t)):n&&(dn(),tt(n,1,1,()=>{n=null}),gn())},i(a){r||(V(n),r=!0)},o(a){tt(n),r=!1},d(a){n&&n.d(a),a&&P(t)}}}function fnt(e,t,r){const n=["open"];let a=da(t,n),{$$slots:i={},$$scope:s}=t,{open:u=!1}=t;const f=Sf(),c=h=>r(0,u=!1);return e.$$set=h=>{t=Nt(Nt({},t),Ku(h)),r(2,a=da(t,n)),"open"in h&&r(0,u=h.open),"$$scope"in h&&r(3,s=h.$$scope)},[u,f,a,s,i,c]}class lnt extends Ot{constructor(t){super();At(this,t,fnt,unt,Tt,{open:0})}}function cnt(e){let t,r,n,a,i;return{c(){t=k("a"),r=Gn("svg"),n=Gn("path"),a=Gn("path"),i=Gn("path"),this.h()},l(s){t=H(s,"A",{href:!0,class:!0,"aria-label":!0});var u=X(t);r=Nn(u,"svg",{width:!0,height:!0,viewBox:!0,style:!0,"aria-hidden":!0});var f=X(r);n=Nn(f,"path",{d:!0}),X(n).forEach(P),a=Nn(f,"path",{d:!0,fill:!0,style:!0,class:!0}),X(a).forEach(P),i=Nn(f,"path",{d:!0,fill:!0,class:!0}),X(i).forEach(P),f.forEach(P),u.forEach(P),this.h()},h(){F(n,"d","M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"),F(a,"d","M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"),F(a,"fill","currentColor"),Re(a,"transform-origin","130px 106px"),F(a,"class","octo-arm"),F(i,"d","M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"),F(i,"fill","currentColor"),F(i,"class","octo-body"),F(r,"width","80"),F(r,"height","80"),F(r,"viewBox","0 0 250 250"),Re(r,"fill","#151513"),Re(r,"color","#fff"),Re(r,"position","absolute"),Re(r,"top","0"),Re(r,"border","0"),Re(r,"right","0"),F(r,"aria-hidden","true"),F(t,"href",hnt),F(t,"class","github-corner"),F(t,"aria-label","View source on GitHub")},m(s,u){U(s,t,u),j(t,r),j(r,n),j(r,a),j(r,i)},p:se,i:se,o:se,d(s){s&&P(t)}}}const hnt="https://github.com/aotds/aotds-docks";class vnt extends Ot{constructor(t){super();At(this,t,null,cnt,Tt,{})}}function pnt(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_,m,b,y,w,O,T,A,I;return{c(){t=k("p"),r=$t(`This app is a ship builder for the game
|
|
`),n=k("a"),a=$t("Full Thrust"),i=$t(`
|
|
.`),s=ht(),u=k("p"),f=$t(`The contruction rules are following the
|
|
`),c=k("a"),h=$t("Cross Dimensions rules"),v=$t(`
|
|
as closely as possible.`),p=ht(),g=k("p"),_=$t(`The app is mostly developed for Firefox. I also check as much as I can that
|
|
I don't mess things too badly on Chrome. For the other browsers... caveat
|
|
emptor.`),m=ht(),b=k("p"),y=$t(`Written by
|
|
`),w=k("a"),O=$t("Yanick Champoux"),T=$t(`
|
|
. Code available on
|
|
`),A=k("a"),I=$t("Github"),this.h()},l(x){t=H(x,"P",{class:!0});var B=X(t);r=bt(B,`This app is a ship builder for the game
|
|
`),n=H(B,"A",{href:!0});var M=X(n);a=bt(M,"Full Thrust"),M.forEach(P),i=bt(B,`
|
|
.`),B.forEach(P),s=vt(x),u=H(x,"P",{class:!0});var L=X(u);f=bt(L,`The contruction rules are following the
|
|
`),c=H(L,"A",{href:!0});var G=X(c);h=bt(G,"Cross Dimensions rules"),G.forEach(P),v=bt(L,`
|
|
as closely as possible.`),L.forEach(P),p=vt(x),g=H(x,"P",{class:!0});var W=X(g);_=bt(W,`The app is mostly developed for Firefox. I also check as much as I can that
|
|
I don't mess things too badly on Chrome. For the other browsers... caveat
|
|
emptor.`),W.forEach(P),m=vt(x),b=H(x,"P",{class:!0});var at=X(b);y=bt(at,`Written by
|
|
`),w=H(at,"A",{href:!0});var et=X(w);O=bt(et,"Yanick Champoux"),et.forEach(P),T=bt(at,`
|
|
. Code available on
|
|
`),A=H(at,"A",{href:!0});var rt=X(A);I=bt(rt,"Github"),rt.forEach(P),at.forEach(P),this.h()},h(){F(n,"href","https://shop.groundzerogames.co.uk/rules.html"),F(t,"class","svelte-1mk8yef"),F(c,"href","http://members.ozemail.com.au/~laranzu/fullthrust/rules/"),F(u,"class","svelte-1mk8yef"),F(g,"class","svelte-1mk8yef"),F(w,"href","https://twitter.com/yenzie"),F(A,"href","https://github.com/aotds/aotds-shipyard"),F(b,"class","svelte-1mk8yef")},m(x,B){U(x,t,B),j(t,r),j(t,n),j(n,a),j(t,i),U(x,s,B),U(x,u,B),j(u,f),j(u,c),j(c,h),j(u,v),U(x,p,B),U(x,g,B),j(g,_),U(x,m,B),U(x,b,B),j(b,y),j(b,w),j(w,O),j(b,T),j(b,A),j(A,I)},d(x){x&&P(t),x&&P(s),x&&P(u),x&&P(p),x&&P(g),x&&P(m),x&&P(b)}}}function dnt(e){let t,r;return{c(){t=k("h2"),r=$t("Welcome to the docks"),this.h()},l(n){t=H(n,"H2",{slot:!0,class:!0});var a=X(t);r=bt(a,"Welcome to the docks"),a.forEach(P),this.h()},h(){F(t,"slot","header"),F(t,"class","svelte-1mk8yef")},m(n,a){U(n,t,a),j(t,r)},d(n){n&&P(t)}}}function gnt(e){let t;return{c(){t=k("div"),this.h()},l(r){t=H(r,"DIV",{slot:!0}),X(t).forEach(P),this.h()},h(){F(t,"slot","footer")},m(r,n){U(r,t,n)},d(r){r&&P(t)}}}function _nt(e){let t,r;return t=new rnt({props:{$$slots:{footer:[gnt],header:[dnt],default:[pnt]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&1&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}class mnt extends Ot{constructor(t){super();At(this,t,null,_nt,Tt,{})}}function $nt(e){let t;return{c(){t=$t("editor")},l(r){t=bt(r,"editor")},m(r,n){U(r,t,n)},d(r){r&&P(t)}}}function bnt(e){let t;return{c(){t=$t("json view")},l(r){t=bt(r,"json view")},m(r,n){U(r,t,n)},d(r){r&&P(t)}}}function ynt(e){let t;return{c(){t=$t("print view")},l(r){t=bt(r,"print view")},m(r,n){U(r,t,n)},d(r){r&&P(t)}}}function wnt(e){let t,r,n,a,i,s;return t=new gc({props:{tabid:"editor",$$slots:{default:[$nt]},$$scope:{ctx:e}}}),n=new gc({props:{tabid:"json",$$slots:{default:[bnt]},$$scope:{ctx:e}}}),i=new gc({props:{tabid:"print",$$slots:{default:[ynt]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment),r=ht(),st(n.$$.fragment),a=ht(),st(i.$$.fragment)},l(u){ft(t.$$.fragment,u),r=vt(u),ft(n.$$.fragment,u),a=vt(u),ft(i.$$.fragment,u)},m(u,f){ot(t,u,f),U(u,r,f),ot(n,u,f),U(u,a,f),ot(i,u,f),s=!0},p(u,f){const c={};f&64&&(c.$$scope={dirty:f,ctx:u}),t.$set(c);const h={};f&64&&(h.$$scope={dirty:f,ctx:u}),n.$set(h);const v={};f&64&&(v.$$scope={dirty:f,ctx:u}),i.$set(v)},i(u){s||(V(t.$$.fragment,u),V(n.$$.fragment,u),V(i.$$.fragment,u),s=!0)},o(u){tt(t.$$.fragment,u),tt(n.$$.fragment,u),tt(i.$$.fragment,u),s=!1},d(u){ut(t,u),u&&P(r),ut(n,u),u&&P(a),ut(i,u)}}}function Snt(e){let t,r;return t=new mnt({}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Ent(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_,m,b,y,w,O,T,A,I;function x(G){e[3](G)}let B={$$slots:{default:[wnt]},$$scope:{ctx:e}};e[0]!==void 0&&(B.active=e[0]),m=new int({props:B}),Ya.push(()=>xc(m,"active",x));function M(G){e[4](G)}let L={$$slots:{default:[Snt]},$$scope:{ctx:e}};return e[1]!==void 0&&(L.open=e[1]),w=new lnt({props:L}),Ya.push(()=>xc(w,"open",M)),{c(){t=k("header"),r=k("h1"),n=$t("The Docks"),a=ht(),i=k("h2"),s=$t("a "),u=k("a"),f=$t("Full Thrust"),c=$t(" ship builder"),h=ht(),v=k("a"),p=$t("about the app"),g=ht(),_=k("div"),st(m.$$.fragment),y=ht(),st(w.$$.fragment),this.h()},l(G){t=H(G,"HEADER",{class:!0});var W=X(t);r=H(W,"H1",{class:!0});var at=X(r);n=bt(at,"The Docks"),at.forEach(P),a=vt(W),i=H(W,"H2",{class:!0});var et=X(i);s=bt(et,"a "),u=H(et,"A",{href:!0});var rt=X(u);f=bt(rt,"Full Thrust"),rt.forEach(P),c=bt(et," ship builder"),et.forEach(P),h=vt(W),v=H(W,"A",{class:!0});var gt=X(v);p=bt(gt,"about the app"),gt.forEach(P),W.forEach(P),g=vt(G),_=H(G,"DIV",{class:!0});var lt=X(_);ft(m.$$.fragment,lt),lt.forEach(P),y=vt(G),ft(w.$$.fragment,G),this.h()},h(){F(r,"class","svelte-uwt8cz"),F(u,"href","https://shop.groundzerogames.co.uk/rules.html"),F(i,"class","svelte-uwt8cz"),F(v,"class","svelte-uwt8cz"),F(t,"class","svelte-uwt8cz"),F(_,"class","svelte-uwt8cz")},m(G,W){U(G,t,W),j(t,r),j(r,n),j(t,a),j(t,i),j(i,s),j(i,u),j(u,f),j(i,c),j(t,h),j(t,v),j(v,p),U(G,g,W),U(G,_,W),ot(m,_,null),U(G,y,W),ot(w,G,W),T=!0,A||(I=Xt(v,"click",d$(e[2])),A=!0)},p(G,[W]){const at={};W&64&&(at.$$scope={dirty:W,ctx:G}),!b&&W&1&&(b=!0,at.active=G[0],Ic(()=>b=!1)),m.$set(at);const et={};W&64&&(et.$$scope={dirty:W,ctx:G}),!O&&W&2&&(O=!0,et.open=G[1],Ic(()=>O=!1)),w.$set(et)},i(G){T||(V(m.$$.fragment,G),V(w.$$.fragment,G),T=!0)},o(G){tt(m.$$.fragment,G),tt(w.$$.fragment,G),T=!1},d(G){G&&P(t),G&&P(g),G&&P(_),ut(m),G&&P(y),ut(w,G),A=!1,I()}}}function Cnt(e,t,r){let n=!1,a="editor";const i=qi(),s=()=>r(1,n=!0);function u(c){a=c,r(0,a)}function f(c){n=c,r(1,n)}return e.$$.update=()=>{e.$$.dirty&1&&i("changeTab",a)},[a,n,s,u,f]}class Ont extends Ot{constructor(t){super();At(this,t,Cnt,Ent,Tt,{})}}function U_(e){let t,r;return{c(){t=k("label"),r=$t(e[1]),this.h()},l(n){t=H(n,"LABEL",{class:!0});var a=X(t);r=bt(a,e[1]),a.forEach(P),this.h()},h(){F(t,"class","svelte-i3mp3j")},m(n,a){U(n,t,a),j(t,r)},p(n,a){a&2&&rr(r,n[1])},d(n){n&&P(t)}}}function Ant(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,placeholder:!0}),this.h()},h(){F(t,"type","text"),F(t,"placeholder",e[2])},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=[Xt(t,"input",e[6]),Xt(t,"change",e[5])],r=!0)},p(a,i){i&4&&F(t,"placeholder",a[2]),i&1&&t.value!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,an(n)}}}function Tnt(e){let t,r,n,a=e[1]&&U_(e);const i=e[4].default,s=Sn(i,e,e[3],null),u=s||Ant(e);return{c(){t=k("div"),a&&a.c(),r=ht(),u&&u.c(),this.h()},l(f){t=H(f,"DIV",{class:!0});var c=X(t);a&&a.l(c),r=vt(c),u&&u.l(c),c.forEach(P),this.h()},h(){F(t,"class","svelte-i3mp3j")},m(f,c){U(f,t,c),a&&a.m(t,null),j(t,r),u&&u.m(t,null),n=!0},p(f,[c]){f[1]?a?a.p(f,c):(a=U_(f),a.c(),a.m(t,r)):a&&(a.d(1),a=null),s?s.p&&(!n||c&8)&&bn(s,i,f,f[3],n?wn(i,f[3],c,null):yn(f[3]),null):u&&u.p&&(!n||c&5)&&u.p(f,n?c:-1)},i(f){n||(V(u,f),n=!0)},o(f){tt(u,f),n=!1},d(f){f&&P(t),a&&a.d(),u&&u.d(f)}}}function Mnt(e,t,r){let{$$slots:n={},$$scope:a}=t,{label:i=""}=t,{value:s=""}=t,{placeholder:u}=t;function f(h){zh.call(this,e,h)}function c(){s=this.value,r(0,s)}return e.$$set=h=>{"label"in h&&r(1,i=h.label),"value"in h&&r(0,s=h.value),"placeholder"in h&&r(2,u=h.placeholder),"$$scope"in h&&r(3,a=h.$$scope)},[s,i,u,a,n,f,c]}class qe extends Ot{constructor(t){super();At(this,t,Mnt,Tnt,Tt,{label:1,value:0,placeholder:2})}}const Pnt=[{name:"Scout",mass:[0,10],abbrev:"SC"},{name:"Courier",mass:[4,10],abbrev:"SC"},{name:"Corvette",mass:[8,16],abbrev:"CT"},{name:"Frigate",mass:[14,28],abbrev:"FF"},{name:"Destroyer",mass:[24,36],abbrev:"DD"},{name:"Heavy Destroyer",mass:[30,40],abbrev:"DH"},{name:"Light Cruiser",mass:[40,60],abbrev:"CL"},{name:"Patrol",mass:[50,70],abbrev:"CE"},{name:"Escort Cruiser",mass:[50,70],abbrev:"CE"},{name:"Heavy Cruiser",mass:[60,90],abbrev:"CA"},{name:"Battlecruiser",mass:[80,110],abbrev:"BC"},{name:"Battleship",mass:[100,140],abbrev:"BB"},{name:"Heavy Battleship",mass:[120,160],abbrev:"BDN"},{name:"Dreadnought",mass:[140,180],abbrev:"DN"},{name:"Superdreadnought",mass:[160,300],abbrev:"SDN"},{name:"Escort Carrier",mass:[0,140],abbrev:"CVE",carrier:!0},{name:"Light Carrier",mass:[120,180],abbrev:"CVL",carrier:!0},{name:"Heavy Carrier",mass:[160,300],abbrev:"CVH",carrier:!0},{name:"Attack Carrier",mass:[150,300],abbrev:"CVA",carrier:!0}];function xnt(e=0,t=!1){return Pnt.filter(r=>t==!!r.carrier).filter(r=>r.mass[0]<=e).filter(r=>r.mass[1]>=e)}function k_(e,t,r){const n=e.slice();return n[8]=t[r],n}function H_(e,t){let r,n=t[8]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=$t(n),this.h()},l(s){r=H(s,"OPTION",{});var u=X(r);a=bt(u,n),u.forEach(P),this.h()},h(){r.__value=i=t[8],r.value=r.__value,this.first=r},m(s,u){U(s,r,u),j(r,a)},p(s,u){t=s,u&4&&n!==(n=t[8]+"")&&rr(a,n),u&4&&i!==(i=t[8])&&(r.__value=i,r.value=r.__value)},d(s){s&&P(r)}}}function Int(e){let t,r=[],n=new Map,a,i,s=e[2];const u=f=>f[8];for(let f=0;f<s.length;f+=1){let c=k_(e,s,f),h=u(c);n.set(h,r[f]=H_(h,c))}return{c(){t=k("select");for(let f=0;f<r.length;f+=1)r[f].c();this.h()},l(f){t=H(f,"SELECT",{});var c=X(t);for(let h=0;h<r.length;h+=1)r[h].l(c);c.forEach(P),this.h()},h(){e[1]===void 0&&ji(()=>e[6].call(t))},m(f,c){U(f,t,c);for(let h=0;h<r.length;h+=1)r[h].m(t,null);_n(t,e[1]),a||(i=Xt(t,"change",e[6]),a=!0)},p(f,c){c&4&&(s=f[2],r=kr(r,c,u,1,f,s,n,t,Sa,H_,null,k_)),c&6&&_n(t,f[1])},d(f){f&&P(t);for(let c=0;c<r.length;c+=1)r[c].d();a=!1,i()}}}function Dnt(e){let t,r,n,a,i,s;function u(c){e[5](c)}let f={label:"ship class"};return e[0]!==void 0&&(f.value=e[0]),r=new qe({props:f}),Ya.push(()=>xc(r,"value",u)),i=new qe({props:{label:"ship type",$$slots:{default:[Int]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),a=ht(),st(i.$$.fragment),this.h()},l(c){t=H(c,"DIV",{class:!0});var h=X(t);ft(r.$$.fragment,h),a=vt(h),ft(i.$$.fragment,h),h.forEach(P),this.h()},h(){F(t,"class","svelte-fc2507")},m(c,h){U(c,t,h),ot(r,t,null),j(t,a),ot(i,t,null),s=!0},p(c,[h]){const v={};!n&&h&1&&(n=!0,v.value=c[0],Ic(()=>n=!1)),r.$set(v);const p={};h&2054&&(p.$$scope={dirty:h,ctx:c}),i.$set(p)},i(c){s||(V(r.$$.fragment,c),V(i.$$.fragment,c),s=!0)},o(c){tt(r.$$.fragment,c),tt(i.$$.fragment,c),s=!1},d(c){c&&P(t),ut(r),ut(i)}}}function Rnt(e,t,r){let n,{shipClass:a=""}=t,{shipType:i=""}=t,{mass:s=10}=t,{isCarrier:u=!1}=t;const f=he("ship");function c(v){a=v,r(0,a)}function h(){i=Us(this),r(1,i),r(2,n),r(3,s),r(4,u),r(2,n),r(3,s),r(4,u)}return e.$$set=v=>{"shipClass"in v&&r(0,a=v.shipClass),"shipType"in v&&r(1,i=v.shipType),"mass"in v&&r(3,s=v.mass),"isCarrier"in v&&r(4,u=v.isCarrier)},e.$$.update=()=>{e.$$.dirty&24&&r(2,n=xnt(s,u).map(({name:v})=>v)),e.$$.dirty&6&&n.length>0&&!n.includes(i)&&r(1,i=n[0]),e.$$.dirty&2&&f.dispatch.setShipType(i),e.$$.dirty&1&&f.dispatch.setShipClass(a)},[a,i,n,s,u,c,h]}class Bnt extends Ot{constructor(t){super();At(this,t,Rnt,Dnt,Tt,{shipClass:0,shipType:1,mass:3,isCarrier:4})}}function Lnt(e){let t,r=-e[2]+"",n;return{c(){t=$t("excessive mass: "),n=$t(r)},l(a){t=bt(a,"excessive mass: "),n=bt(a,r)},m(a,i){U(a,t,i),U(a,n,i)},p(a,i){i&4&&r!==(r=-a[2]+"")&&rr(n,r)},d(a){a&&P(t),a&&P(n)}}}function Fnt(e){let t,r;return{c(){t=$t("mass unused: "),r=$t(e[2])},l(n){t=bt(n,"mass unused: "),r=bt(n,e[2])},m(n,a){U(n,t,a),U(n,r,a)},p(n,a){a&4&&rr(r,n[2])},d(n){n&&P(t),n&&P(r)}}}function znt(e){let t,r,n,a,i,s,u,f;function c(p,g){return p[3]?Fnt:Lnt}let h=c(e),v=h(e);return{c(){t=k("input"),r=ht(),n=k("img"),i=ht(),s=k("div"),v.c(),this.h()},l(p){t=H(p,"INPUT",{class:!0,type:!0,min:!0,max:!0}),r=vt(p),n=H(p,"IMG",{class:!0,src:!0,alt:!0}),i=vt(p),s=H(p,"DIV",{class:!0});var g=X(s);v.l(g),g.forEach(P),this.h()},h(){F(t,"class","short svelte-apsdjz"),F(t,"type","number"),F(t,"min","10"),F(t,"max","300"),F(n,"class","mass_symbol svelte-apsdjz"),Wn(n.src,a=En+"/mass.svg")||F(n,"src",a),F(n,"alt","mass"),F(s,"class","note svelte-apsdjz"),Le(s,"warning",!e[3])},m(p,g){U(p,t,g),xe(t,e[0]),U(p,r,g),U(p,n,g),U(p,i,g),U(p,s,g),v.m(s,null),u||(f=Xt(t,"input",e[6]),u=!0)},p(p,g){g&1&&Fe(t.value)!==p[0]&&xe(t,p[0]),h===(h=c(p))&&v?v.p(p,g):(v.d(1),v=h(p),v&&(v.c(),v.m(s,null))),g&8&&Le(s,"warning",!p[3])},d(p){p&&P(t),p&&P(r),p&&P(n),p&&P(i),p&&P(s),v.d(),u=!1,f()}}}function Gnt(e){let t,r;return{c(){t=k("span"),r=$t(e[1]),this.h()},l(n){t=H(n,"SPAN",{class:!0});var a=X(t);r=bt(a,e[1]),a.forEach(P),this.h()},h(){F(t,"class","cost svelte-apsdjz")},m(n,a){U(n,t,a),j(t,r)},p(n,a){a&2&&rr(r,n[1])},d(n){n&&P(t)}}}function Nnt(e){let t,r,n,a,i,s;return r=new qe({props:{label:"ship tonnage",$$slots:{default:[znt]},$$scope:{ctx:e}}}),i=new qe({props:{label:"cost",$$slots:{default:[Gnt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),a=k("div"),st(i.$$.fragment),this.h()},l(u){t=H(u,"DIV",{class:!0});var f=X(t);ft(r.$$.fragment,f),f.forEach(P),n=vt(u),a=H(u,"DIV",{class:!0});var c=X(a);ft(i.$$.fragment,c),c.forEach(P),this.h()},h(){F(t,"class","mass svelte-apsdjz"),F(a,"class","cost svelte-apsdjz")},m(u,f){U(u,t,f),ot(r,t,null),U(u,n,f),U(u,a,f),ot(i,a,null),s=!0},p(u,[f]){const c={};f&141&&(c.$$scope={dirty:f,ctx:u}),r.$set(c);const h={};f&130&&(h.$$scope={dirty:f,ctx:u}),i.$set(h)},i(u){s||(V(r.$$.fragment,u),V(i.$$.fragment,u),s=!0)},o(u){tt(r.$$.fragment,u),tt(i.$$.fragment,u),s=!1},d(u){u&&P(t),ut(r),u&&P(n),u&&P(a),ut(i)}}}function jnt(e,t,r){let n,a,{ship:i=he("ship")}=t,{mass:s=10}=t,{cost:u=10}=t,{usedMass:f=5}=t;function c(){s=Fe(this.value),r(0,s)}return e.$$set=h=>{"ship"in h&&r(4,i=h.ship),"mass"in h&&r(0,s=h.mass),"cost"in h&&r(1,u=h.cost),"usedMass"in h&&r(5,f=h.usedMass)},e.$$.update=()=>{e.$$.dirty&33&&r(2,n=s-f),e.$$.dirty&4&&r(3,a=n>=0),e.$$.dirty&17&&i.dispatch.setShipMass(s)},[s,u,n,a,i,f,c]}class qnt extends Ot{constructor(t){super();At(this,t,jnt,Nnt,Tt,{ship:4,mass:0,cost:1,usedMass:5})}}function Unt(e){let t,r,n,a,i,s,u;const f=e[2].default,c=Sn(f,e,e[1],null);return{c(){t=k("div"),r=k("h2"),n=$t(e[0]),a=ht(),i=k("hr"),s=ht(),c&&c.c(),this.h()},l(h){t=H(h,"DIV",{class:!0});var v=X(t);r=H(v,"H2",{class:!0});var p=X(r);n=bt(p,e[0]),p.forEach(P),a=vt(v),i=H(v,"HR",{class:!0}),v.forEach(P),s=vt(h),c&&c.l(h),this.h()},h(){F(r,"class","svelte-1p2uzx8"),F(i,"class","svelte-1p2uzx8"),F(t,"class","svelte-1p2uzx8")},m(h,v){U(h,t,v),j(t,r),j(r,n),j(t,a),j(t,i),U(h,s,v),c&&c.m(h,v),u=!0},p(h,[v]){(!u||v&1)&&rr(n,h[0]),c&&c.p&&(!u||v&2)&&bn(c,f,h,h[1],u?wn(f,h[1],v,null):yn(h[1]),null)},i(h){u||(V(c,h),u=!0)},o(h){tt(c,h),u=!1},d(h){h&&P(t),h&&P(s),c&&c.d(h)}}}function knt(e,t,r){let{$$slots:n={},$$scope:a}=t,{label:i}=t;return e.$$set=s=>{"label"in s&&r(0,i=s.label),"$$scope"in s&&r(1,a=s.$$scope)},[i,a,n]}class Ef extends Ot{constructor(t){super();At(this,t,knt,Unt,Tt,{label:0})}}function Hnt(e){let t,r,n,a,i,s,u,f,c,h,v,p,g;const _=e[5].default,m=Sn(_,e,e[4],null);return{c(){t=k("div"),r=k("div"),m&&m.c(),n=ht(),a=k("div"),i=k("div"),s=$t(e[0]),u=ht(),f=k("img"),h=ht(),v=k("div"),p=$t(e[1]),this.h()},l(b){t=H(b,"DIV",{class:!0});var y=X(t);r=H(y,"DIV",{class:!0});var w=X(r);m&&m.l(w),w.forEach(P),n=vt(y),a=H(y,"DIV",{class:!0});var O=X(a);i=H(O,"DIV",{class:!0});var T=X(i);s=bt(T,e[0]),u=vt(T),f=H(T,"IMG",{src:!0,alt:!0,class:!0}),T.forEach(P),h=vt(O),v=H(O,"DIV",{class:!0});var A=X(v);p=bt(A,e[1]),A.forEach(P),O.forEach(P),y.forEach(P),this.h()},h(){F(r,"class","svelte-145f253"),Wn(f.src,c=En+"/mass.svg")||F(f,"src",c),F(f,"alt","mass"),F(f,"class","svelte-145f253"),F(i,"class","mass svelte-145f253"),F(v,"class","cost svelte-145f253"),F(a,"class","reqs svelte-145f253"),F(t,"class","ship-item svelte-145f253")},m(b,y){U(b,t,y),j(t,r),m&&m.m(r,null),j(t,n),j(t,a),j(a,i),j(i,s),j(i,u),j(i,f),e[6](i),j(a,h),j(a,v),j(v,p),e[7](v),g=!0},p(b,[y]){m&&m.p&&(!g||y&16)&&bn(m,_,b,b[4],g?wn(_,b[4],y,null):yn(b[4]),null),(!g||y&1)&&rr(s,b[0]),(!g||y&2)&&rr(p,b[1])},i(b){g||(V(m,b),g=!0)},o(b){tt(m,b),g=!1},d(b){b&&P(t),m&&m.d(b),e[6](null),e[7](null)}}}function Wnt(e,t,r){let{$$slots:n={},$$scope:a}=t,{mass:i}=t,{cost:s}=t,u,f;const c=async p=>{!p||(p.classList.remove("updated"),p.offsetWidth,p.classList.add("updated"))};function h(p){Ya[p?"unshift":"push"](()=>{u=p,r(2,u)})}function v(p){Ya[p?"unshift":"push"](()=>{f=p,r(3,f)})}return e.$$set=p=>{"mass"in p&&r(0,i=p.mass),"cost"in p&&r(1,s=p.cost),"$$scope"in p&&r(4,a=p.$$scope)},e.$$.update=()=>{e.$$.dirty&5&&c(u),e.$$.dirty&10&&c(f)},[i,s,u,f,a,n,h,v]}class Hr extends Ot{constructor(t){super();At(this,t,Wnt,Hnt,Tt,{mass:0,cost:1})}}function Knt(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0,max:!0,step:!0}),this.h()},h(){F(t,"class","short svelte-1saxaj4"),F(t,"type","number"),F(t,"min","0"),F(t,"max","20"),F(t,"step","1")},m(a,i){U(a,t,i),xe(t,e[1]),r||(n=Xt(t,"input",e[3]),r=!0)},p(a,i){i&2&&Fe(t.value)!==a[1]&&xe(t,a[1])},d(a){a&&P(t),r=!1,n()}}}function Ynt(e){let t,r,n,a,i,s,u,f,c;return r=new qe({props:{label:"thrust rating",$$slots:{default:[Knt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),a=k("label"),i=k("input"),s=$t(" advanced"),this.h()},l(h){t=H(h,"DIV",{class:!0});var v=X(t);ft(r.$$.fragment,v),n=vt(v),a=H(v,"LABEL",{class:!0});var p=X(a);i=H(p,"INPUT",{type:!0}),s=bt(p," advanced"),p.forEach(P),v.forEach(P),this.h()},h(){F(i,"type","checkbox"),F(a,"class","svelte-1saxaj4"),F(t,"class","svelte-1saxaj4")},m(h,v){U(h,t,v),ot(r,t,null),j(t,n),j(t,a),j(a,i),i.checked=e[0],j(a,s),u=!0,f||(c=Xt(i,"change",e[4]),f=!0)},p(h,v){const p={};v&66&&(p.$$scope={dirty:v,ctx:h}),r.$set(p),v&1&&(i.checked=h[0])},i(h){u||(V(r.$$.fragment,h),u=!0)},o(h){tt(r.$$.fragment,h),u=!1},d(h){h&&P(t),ut(r),f=!1,c()}}}function Xnt(e){let t,r;const n=[e[2]];let a={$$slots:{default:[Ynt]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&4?ae(n,[ue(i[2])]):{};s&67&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function Vnt(e,t,r){let{reqs:n={}}=t,{advanced:a=!1}=t,{rating:i=0}=t;const s=he("ship");function u(){i=Fe(this.value),r(1,i)}function f(){a=this.checked,r(0,a)}return e.$$set=c=>{"reqs"in c&&r(2,n=c.reqs),"advanced"in c&&r(0,a=c.advanced),"rating"in c&&r(1,i=c.rating)},e.$$.update=()=>{e.$$.dirty&3&&s.dispatch.setDrive({rating:i,advanced:a})},[a,i,n,u,f]}class Znt extends Ot{constructor(t){super();At(this,t,Vnt,Xnt,Tt,{reqs:2,advanced:0,rating:1})}}function W_(e,t,r){const n=e.slice();return n[6]=t[r],n}function K_(e,t){let r,n,a,i=t[6]+"",s,u,f,c;return{key:e,first:null,c(){r=k("label"),n=k("input"),a=ht(),s=$t(i),u=ht(),this.h()},l(h){r=H(h,"LABEL",{class:!0});var v=X(r);n=H(v,"INPUT",{type:!0}),a=vt(v),s=bt(v,i),u=vt(v),v.forEach(P),this.h()},h(){F(n,"type","radio"),n.__value=t[6],n.value=n.__value,t[4][0].push(n),F(r,"class","svelte-9i3z5u"),this.first=r},m(h,v){U(h,r,v),j(r,n),n.checked=n.__value===t[0],j(r,a),j(r,s),j(r,u),f||(c=Xt(n,"change",t[3]),f=!0)},p(h,v){t=h,v&1&&(n.checked=n.__value===t[0])},d(h){h&&P(r),t[4][0].splice(t[4][0].indexOf(n),1),f=!1,c()}}}function Jnt(e){let t=[],r=new Map,n,a=e[2];const i=s=>s[6];for(let s=0;s<a.length;s+=1){let u=W_(e,a,s),f=i(u);r.set(f,t[s]=K_(f,u))}return{c(){for(let s=0;s<t.length;s+=1)t[s].c();n=er()},l(s){for(let u=0;u<t.length;u+=1)t[u].l(s);n=er()},m(s,u){for(let f=0;f<t.length;f+=1)t[f].m(s,u);U(s,n,u)},p(s,u){u&5&&(a=s[2],t=kr(t,u,i,1,s,a,r,n.parentNode,Sa,K_,n,W_))},d(s){for(let u=0;u<t.length;u+=1)t[u].d(s);s&&P(n)}}}function Qnt(e){let t,r;return t=new qe({props:{label:"FTL drive",$$slots:{default:[Jnt]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&513&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function tat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[Qnt]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&513&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function eat(e,t,r){const n=["none","standard","advanced"];let{reqs:a={}}=t,{type:i=n[0]}=t;const s=he("ship"),u=[[]];function f(){i=this.__value,r(0,i)}return e.$$set=c=>{"reqs"in c&&r(1,a=c.reqs),"type"in c&&r(0,i=c.type)},e.$$.update=()=>{e.$$.dirty&1&&s.dispatch.setFtl(i)},[i,a,n,f,u]}class rat extends Ot{constructor(t){super();At(this,t,eat,tat,Tt,{reqs:1,type:0})}}function nat(e){let t,r,n,a;const i=[e[0].drive];let s={};for(let c=0;c<i.length;c+=1)s=Nt(s,i[c]);t=new Znt({props:s});const u=[e[0].ftl];let f={};for(let c=0;c<u.length;c+=1)f=Nt(f,u[c]);return n=new rat({props:f}),{c(){st(t.$$.fragment),r=ht(),st(n.$$.fragment)},l(c){ft(t.$$.fragment,c),r=vt(c),ft(n.$$.fragment,c)},m(c,h){ot(t,c,h),U(c,r,h),ot(n,c,h),a=!0},p(c,h){const v=h&1?ae(i,[ue(c[0].drive)]):{};t.$set(v);const p=h&1?ae(u,[ue(c[0].ftl)]):{};n.$set(p)},i(c){a||(V(t.$$.fragment,c),V(n.$$.fragment,c),a=!0)},o(c){tt(t.$$.fragment,c),tt(n.$$.fragment,c),a=!1},d(c){ut(t,c),c&&P(r),ut(n,c)}}}function aat(e){let t,r;return t=new Ef({props:{label:"propulsion",$$slots:{default:[nat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&3&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function iat(e,t,r){let{propulsion:n={}}=t;return e.$$set=a=>{"propulsion"in a&&r(0,n=a.propulsion)},[n]}class sat extends Ot{constructor(t){super();At(this,t,iat,aat,Tt,{propulsion:0})}}function oat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0,max:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min",e[2]),F(t,"max",e[3])},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[4]),r=!0)},p(a,i){i&4&&F(t,"min",a[2]),i&8&&F(t,"max",a[3]),i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function uat(e){let t,r;return t=new qe({props:{label:"hull",$$slots:{default:[oat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&77&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function fat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[uat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&77&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function lat(e,t,r){let{rating:n=0}=t,{reqs:a={}}=t,{min:i=0}=t,{max:s=1}=t;const u=he("ship");function f(){n=Fe(this.value),r(0,n)}return e.$$set=c=>{"rating"in c&&r(0,n=c.rating),"reqs"in c&&r(1,a=c.reqs),"min"in c&&r(2,i=c.min),"max"in c&&r(3,s=c.max)},e.$$.update=()=>{e.$$.dirty&1&&u.dispatch.setHull(n)},[n,a,i,s,f]}class cat extends Ot{constructor(t){super();At(this,t,lat,fat,Tt,{rating:0,reqs:1,min:2,max:3})}}function hat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-1wwwskr"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[3]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function vat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-1wwwskr"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[1]),r||(n=Xt(t,"input",e[4]),r=!0)},p(a,i){i&2&&Fe(t.value)!==a[1]&&xe(t,a[1])},d(a){a&&P(t),r=!1,n()}}}function pat(e){let t,r,n,a,i;return r=new qe({props:{label:"screens",$$slots:{default:[hat]},$$scope:{ctx:e}}}),a=new qe({props:{label:"advanced screens",$$slots:{default:[vat]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),st(a.$$.fragment),this.h()},l(s){t=H(s,"DIV",{class:!0});var u=X(t);ft(r.$$.fragment,u),n=vt(u),ft(a.$$.fragment,u),u.forEach(P),this.h()},h(){F(t,"class","svelte-1wwwskr")},m(s,u){U(s,t,u),ot(r,t,null),j(t,n),ot(a,t,null),i=!0},p(s,u){const f={};u&65&&(f.$$scope={dirty:u,ctx:s}),r.$set(f);const c={};u&66&&(c.$$scope={dirty:u,ctx:s}),a.$set(c)},i(s){i||(V(r.$$.fragment,s),V(a.$$.fragment,s),i=!0)},o(s){tt(r.$$.fragment,s),tt(a.$$.fragment,s),i=!1},d(s){s&&P(t),ut(r),ut(a)}}}function dat(e){let t,r;const n=[e[2]];let a={$$slots:{default:[pat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&4?ae(n,[ue(i[2])]):{};s&67&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function gat(e,t,r){let{reqs:n={}}=t,{standard:a=0}=t,{advanced:i=0}=t;const s=he("ship");function u(){a=Fe(this.value),r(0,a)}function f(){i=Fe(this.value),r(1,i)}return e.$$set=c=>{"reqs"in c&&r(2,n=c.reqs),"standard"in c&&r(0,a=c.standard),"advanced"in c&&r(1,i=c.advanced)},e.$$.update=()=>{e.$$.dirty&3&&s.dispatch.setScreens({standard:a,advanced:i})},[a,i,n,u,f]}class _at extends Ot{constructor(t){super();At(this,t,gat,dat,Tt,{reqs:2,standard:0,advanced:1})}}function mat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[3]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function $at(e){let t,r;return t=new qe({props:{label:"cargo",$$slots:{default:[mat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function bat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[$at]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&17&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function yat(e,t,r){let{ship:n=he("ship")}=t,{space:a=0}=t,{reqs:i={}}=t;function s(){a=Fe(this.value),r(0,a)}return e.$$set=u=>{"ship"in u&&r(2,n=u.ship),"space"in u&&r(0,a=u.space),"reqs"in u&&r(1,i=u.reqs)},e.$$.update=()=>{e.$$.dirty&5&&n.dispatch.setCargo(a)},[a,i,n,s]}class wat extends Ot{constructor(t){super();At(this,t,yat,bat,Tt,{ship:2,space:0,reqs:1})}}function Sat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-ytqr7l"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[2]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function Eat(e){let t,r;return t=new qe({props:{label:`layer ${e[1]}`,$$slots:{default:[Sat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&2&&(i.label=`layer ${n[1]}`),a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Cat(e,t,r){let{layer:n=1}=t,{rating:a=0}=t;const i=he("ship");function s(){a=Fe(this.value),r(0,a)}return e.$$set=u=>{"layer"in u&&r(1,n=u.layer),"rating"in u&&r(0,a=u.rating)},e.$$.update=()=>{e.$$.dirty&3&&i.dispatch.setArmorRating({layer:n,rating:a})},[a,n,s]}class Oat extends Ot{constructor(t){super();At(this,t,Cat,Eat,Tt,{layer:1,rating:0})}}function Y_(e,t,r){const n=e.slice();return n[5]=t[r],n[7]=r,n}function Aat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-n2prux"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[2]),r||(n=Xt(t,"input",e[3]),r=!0)},p(a,i){i&4&&Fe(t.value)!==a[2]&&xe(t,a[2])},d(a){a&&P(t),r=!1,n()}}}function X_(e,t){let r,n,a;return n=new Oat({props:{rating:t[5],layer:t[7]+1}}),{key:e,first:null,c(){r=er(),st(n.$$.fragment),this.h()},l(i){r=er(),ft(n.$$.fragment,i),this.h()},h(){this.first=r},m(i,s){U(i,r,s),ot(n,i,s),a=!0},p(i,s){t=i;const u={};s&1&&(u.rating=t[5]),s&1&&(u.layer=t[7]+1),n.$set(u)},i(i){a||(V(n.$$.fragment,i),a=!0)},o(i){tt(n.$$.fragment,i),a=!1},d(i){i&&P(r),ut(n,i)}}}function Tat(e){let t,r,n,a,i,s=[],u=new Map,f;n=new qe({props:{label:"armour layers",$$slots:{default:[Aat]},$$scope:{ctx:e}}});let c=e[0];const h=v=>v[7];for(let v=0;v<c.length;v+=1){let p=Y_(e,c,v),g=h(p);u.set(g,s[v]=X_(g,p))}return{c(){t=k("div"),r=k("div"),st(n.$$.fragment),a=ht(),i=k("div");for(let v=0;v<s.length;v+=1)s[v].c();this.h()},l(v){t=H(v,"DIV",{});var p=X(t);r=H(p,"DIV",{class:!0});var g=X(r);ft(n.$$.fragment,g),g.forEach(P),a=vt(p),i=H(p,"DIV",{class:!0});var _=X(i);for(let m=0;m<s.length;m+=1)s[m].l(_);_.forEach(P),p.forEach(P),this.h()},h(){F(r,"class","nbr_layers"),F(i,"class","layers svelte-n2prux")},m(v,p){U(v,t,p),j(t,r),ot(n,r,null),j(t,a),j(t,i);for(let g=0;g<s.length;g+=1)s[g].m(i,null);f=!0},p(v,p){const g={};p&260&&(g.$$scope={dirty:p,ctx:v}),n.$set(g),p&1&&(c=v[0],dn(),s=kr(s,p,h,1,v,c,u,i,Yu,X_,null,Y_),gn())},i(v){if(!f){V(n.$$.fragment,v);for(let p=0;p<c.length;p+=1)V(s[p]);f=!0}},o(v){tt(n.$$.fragment,v);for(let p=0;p<s.length;p+=1)tt(s[p]);f=!1},d(v){v&&P(t),ut(n);for(let p=0;p<s.length;p+=1)s[p].d()}}}function Mat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[Tat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&261&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function Pat(e,t,r){let{layers:n=[]}=t,{reqs:a={}}=t,i=n.length;const{dispatch:s}=he("ship");function u(){i=Fe(this.value),r(2,i)}return e.$$set=f=>{"layers"in f&&r(0,n=f.layers),"reqs"in f&&r(1,a=f.reqs)},e.$$.update=()=>{e.$$.dirty&4&&s.setArmorLayers(i)},[n,a,i,u]}class xat extends Ot{constructor(t){super();At(this,t,Pat,Mat,Tt,{layers:0,reqs:1})}}function Iat(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_;return{c(){t=k("div"),r=k("label"),n=k("input"),a=$t(`
|
|
none`),i=ht(),s=k("label"),u=k("input"),f=$t(`
|
|
partial`),c=ht(),h=k("label"),v=k("input"),p=$t(`
|
|
full`),this.h()},l(m){t=H(m,"DIV",{class:!0});var b=X(t);r=H(b,"LABEL",{class:!0});var y=X(r);n=H(y,"INPUT",{type:!0}),a=bt(y,`
|
|
none`),y.forEach(P),i=vt(b),s=H(b,"LABEL",{class:!0});var w=X(s);u=H(w,"INPUT",{type:!0}),f=bt(w,`
|
|
partial`),w.forEach(P),c=vt(b),h=H(b,"LABEL",{class:!0});var O=X(h);v=H(O,"INPUT",{type:!0}),p=bt(O,`
|
|
full`),O.forEach(P),b.forEach(P),this.h()},h(){F(n,"type","radio"),n.__value="none",n.value=n.__value,e[6][0].push(n),F(r,"class","svelte-x5copc"),F(u,"type","radio"),u.__value="partial",u.value=u.__value,e[6][0].push(u),F(s,"class","svelte-x5copc"),F(v,"type","radio"),v.__value="full",v.value=v.__value,e[6][0].push(v),F(h,"class","svelte-x5copc"),F(t,"class","svelte-x5copc")},m(m,b){U(m,t,b),j(t,r),j(r,n),n.checked=n.__value===e[0],j(r,a),j(t,i),j(t,s),j(s,u),u.checked=u.__value===e[0],j(s,f),j(t,c),j(t,h),j(h,v),v.checked=v.__value===e[0],j(h,p),g||(_=[Xt(n,"change",e[5]),Xt(u,"change",e[7]),Xt(v,"change",e[8])],g=!0)},p(m,b){b&1&&(n.checked=n.__value===m[0]),b&1&&(u.checked=u.__value===m[0]),b&1&&(v.checked=v.__value===m[0])},d(m){m&&P(t),e[6][0].splice(e[6][0].indexOf(n),1),e[6][0].splice(e[6][0].indexOf(u),1),e[6][0].splice(e[6][0].indexOf(v),1),g=!1,an(_)}}}function Dat(e){let t,r;return t=new qe({props:{label:"streamlining",$$slots:{default:[Iat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&513&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Rat(e){let t,r;const n=[e[1]];let a={$$slots:{default:[Dat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&513&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function Bat(e,t,r){let n,a=se,i=()=>(a(),a=PM(v,b=>r(4,n=b)),v);e.$$.on_destroy.push(()=>a());let{type:s="none"}=t,{reqs:u={}}=t,{dispatch:f,shipMass:c}=he("ship"),{dispatch:h=f,shipMass:v=c}=t;i();const p=[[]];function g(){s=this.__value,r(0,s)}function _(){s=this.__value,r(0,s)}function m(){s=this.__value,r(0,s)}return e.$$set=b=>{"type"in b&&r(0,s=b.type),"reqs"in b&&r(1,u=b.reqs),"dispatch"in b&&r(3,h=b.dispatch),"shipMass"in b&&i(r(2,v=b.shipMass))},e.$$.update=()=>{e.$$.dirty&25&&h.setStreamlining({type:s,shipMass:n})},[s,u,v,h,n,g,p,_,m]}class Lat extends Ot{constructor(t){super();At(this,t,Bat,Rat,Tt,{type:0,reqs:1,dispatch:3,shipMass:2})}}function Fat(e){let t,r,n,a,i,s,u,f,c,h;const v=[e[0]];let p={};for(let A=0;A<v.length;A+=1)p=Nt(p,v[A]);t=new cat({props:p});const g=[e[1]];let _={};for(let A=0;A<g.length;A+=1)_=Nt(_,g[A]);n=new _at({props:_});const m=[e[4]];let b={};for(let A=0;A<m.length;A+=1)b=Nt(b,m[A]);i=new xat({props:b});const y=[e[2]];let w={};for(let A=0;A<y.length;A+=1)w=Nt(w,y[A]);u=new wat({props:w});const O=[e[3]];let T={};for(let A=0;A<O.length;A+=1)T=Nt(T,O[A]);return c=new Lat({props:T}),{c(){st(t.$$.fragment),r=ht(),st(n.$$.fragment),a=ht(),st(i.$$.fragment),s=ht(),st(u.$$.fragment),f=ht(),st(c.$$.fragment)},l(A){ft(t.$$.fragment,A),r=vt(A),ft(n.$$.fragment,A),a=vt(A),ft(i.$$.fragment,A),s=vt(A),ft(u.$$.fragment,A),f=vt(A),ft(c.$$.fragment,A)},m(A,I){ot(t,A,I),U(A,r,I),ot(n,A,I),U(A,a,I),ot(i,A,I),U(A,s,I),ot(u,A,I),U(A,f,I),ot(c,A,I),h=!0},p(A,I){const x=I&1?ae(v,[ue(A[0])]):{};t.$set(x);const B=I&2?ae(g,[ue(A[1])]):{};n.$set(B);const M=I&16?ae(m,[ue(A[4])]):{};i.$set(M);const L=I&4?ae(y,[ue(A[2])]):{};u.$set(L);const G=I&8?ae(O,[ue(A[3])]):{};c.$set(G)},i(A){h||(V(t.$$.fragment,A),V(n.$$.fragment,A),V(i.$$.fragment,A),V(u.$$.fragment,A),V(c.$$.fragment,A),h=!0)},o(A){tt(t.$$.fragment,A),tt(n.$$.fragment,A),tt(i.$$.fragment,A),tt(u.$$.fragment,A),tt(c.$$.fragment,A),h=!1},d(A){ut(t,A),A&&P(r),ut(n,A),A&&P(a),ut(i,A),A&&P(s),ut(u,A),A&&P(f),ut(c,A)}}}function zat(e){let t,r;return t=new Ef({props:{label:"structure",$$slots:{default:[Fat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&63&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Gat(e,t,r){let{hull:n={}}=t,{screens:a={}}=t,{cargo:i={}}=t,{streamlining:s={}}=t,{armor:u={}}=t;return e.$$set=f=>{"hull"in f&&r(0,n=f.hull),"screens"in f&&r(1,a=f.screens),"cargo"in f&&r(2,i=f.cargo),"streamlining"in f&&r(3,s=f.streamlining),"armor"in f&&r(4,u=f.armor)},[n,a,i,s,u]}class Nat extends Ot{constructor(t){super();At(this,t,Gat,zat,Tt,{hull:0,screens:1,cargo:2,streamlining:3,armor:4})}}function V_(e,t,r){const n=e.slice();return n[0]=t[r],n}function Z_(e,t){let r,n=t[0]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=$t(n),this.h()},l(s){r=H(s,"OPTION",{});var u=X(r);a=bt(u,n),u.forEach(P),this.h()},h(){r.__value=i=t[0],r.value=r.__value,this.first=r},m(s,u){U(s,r,u),j(r,a)},p(s,u){t=s},d(s){s&&P(r)}}}function jat(e){let t,r=[],n=new Map,a,i,s=e[3];const u=f=>f[0];for(let f=0;f<s.length;f+=1){let c=V_(e,s,f),h=u(c);n.set(h,r[f]=Z_(h,c))}return{c(){t=k("select");for(let f=0;f<r.length;f+=1)r[f].c();this.h()},l(f){t=H(f,"SELECT",{class:!0});var c=X(t);for(let h=0;h<r.length;h+=1)r[h].l(c);c.forEach(P),this.h()},h(){F(t,"class","svelte-14clsel"),e[0]===void 0&&ji(()=>e[5].call(t))},m(f,c){U(f,t,c);for(let h=0;h<r.length;h+=1)r[h].m(t,null);_n(t,e[0]),a||(i=Xt(t,"change",e[5]),a=!0)},p(f,c){c&8&&(s=f[3],r=kr(r,c,u,1,f,s,n,t,Sa,Z_,null,V_)),c&9&&_n(t,f[0])},d(f){f&&P(t);for(let c=0;c<r.length;c+=1)r[c].d();a=!1,i()}}}function qat(e){let t,r;return t=new qe({props:{label:`squadron ${e[1]}`,$$slots:{default:[jat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&2&&(i.label=`squadron ${n[1]}`),a&257&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Uat(e){let t,r;const n=[e[2]];let a={$$slots:{default:[qat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&4?ae(n,[ue(i[2])]):{};s&259&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function kat(e,t,r){const n=qu.map(({type:h})=>h);let{id:a=1}=t,{type:i=n[0].type}=t,{reqs:s={}}=t,{dispatch:u}=he("ship"),{dispatch:f=u}=t;function c(){i=Us(this),r(0,i),r(3,n)}return e.$$set=h=>{"id"in h&&r(1,a=h.id),"type"in h&&r(0,i=h.type),"reqs"in h&&r(2,s=h.reqs),"dispatch"in h&&r(4,f=h.dispatch)},e.$$.update=()=>{e.$$.dirty&1&&console.log(i),e.$$.dirty&19&&f.setSquadronType({type:i,id:a})},[i,a,s,n,f,c]}class Hat extends Ot{constructor(t){super();At(this,t,kat,Uat,Tt,{id:1,type:0,reqs:2,dispatch:4})}}function J_(e,t,r){const n=e.slice();return n[5]=t[r],n[7]=r,n}function Wat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{class:!0,type:!0,min:!0}),this.h()},h(){F(t,"class","short svelte-oj0ytd"),F(t,"type","number"),F(t,"min","0")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[3]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function Kat(e){let t,r;return t=new qe({props:{label:"bays",$$slots:{default:[Wat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&257&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Q_(e,t){let r,n,a;const i=[t[5],{id:t[7]+1}];let s={};for(let u=0;u<i.length;u+=1)s=Nt(s,i[u]);return n=new Hat({props:s}),{key:e,first:null,c(){r=er(),st(n.$$.fragment),this.h()},l(u){r=er(),ft(n.$$.fragment,u),this.h()},h(){this.first=r},m(u,f){U(u,r,f),ot(n,u,f),a=!0},p(u,f){t=u;const c=f&4?ae(i,[ue(t[5]),{id:t[7]+1}]):{};n.$set(c)},i(u){a||(V(n.$$.fragment,u),a=!0)},o(u){tt(n.$$.fragment,u),a=!1},d(u){u&&P(r),ut(n,u)}}}function Yat(e){let t,r,n=[],a=new Map,i,s;const u=[e[1]];let f={$$slots:{default:[Kat]},$$scope:{ctx:e}};for(let v=0;v<u.length;v+=1)f=Nt(f,u[v]);t=new Hr({props:f});let c=e[2];const h=v=>v[7];for(let v=0;v<c.length;v+=1){let p=J_(e,c,v),g=h(p);a.set(g,n[v]=Q_(g,p))}return{c(){st(t.$$.fragment),r=ht();for(let v=0;v<n.length;v+=1)n[v].c();i=er()},l(v){ft(t.$$.fragment,v),r=vt(v);for(let p=0;p<n.length;p+=1)n[p].l(v);i=er()},m(v,p){ot(t,v,p),U(v,r,p);for(let g=0;g<n.length;g+=1)n[g].m(v,p);U(v,i,p),s=!0},p(v,p){const g=p&2?ae(u,[ue(v[1])]):{};p&257&&(g.$$scope={dirty:p,ctx:v}),t.$set(g),p&4&&(c=v[2],dn(),n=kr(n,p,h,1,v,c,a,i.parentNode,Yu,Q_,i,J_),gn())},i(v){if(!s){V(t.$$.fragment,v);for(let p=0;p<c.length;p+=1)V(n[p]);s=!0}},o(v){tt(t.$$.fragment,v);for(let p=0;p<n.length;p+=1)tt(n[p]);s=!1},d(v){ut(t,v),v&&P(r);for(let p=0;p<n.length;p+=1)n[p].d(v);v&&P(i)}}}function Xat(e){let t,r;return t=new Ef({props:{label:"carrier",$$slots:{default:[Yat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&263&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Vat(e,t,r){let{bays:n=0}=t,{reqs:a={}}=t,{squadrons:i=[]}=t;const{dispatch:s}=he("ship");function u(){n=Fe(this.value),r(0,n)}return e.$$set=f=>{"bays"in f&&r(0,n=f.bays),"reqs"in f&&r(1,a=f.reqs),"squadrons"in f&&r(2,i=f.squadrons)},e.$$.update=()=>{e.$$.dirty&1&&s.setCarrierBays(n)},[n,a,i,u]}class Zat extends Ot{constructor(t){super();At(this,t,Vat,Xat,Tt,{bays:0,reqs:1,squadrons:2})}}function Jat(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,class:!0}),this.h()},h(){F(t,"type","number"),F(t,"class","short")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[2]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function Qat(e){let t,r;return t=new qe({props:{label:"firecons",$$slots:{default:[Jat]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function tit(e){let t,r;const n=[e[1]];let a={$$slots:{default:[Qat]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&17&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function eit(e,t,r){let{stations:n=0}=t,{reqs:a={}}=t;const{dispatch:i}=he("ship");function s(){n=Fe(this.value),r(0,n)}return e.$$set=u=>{"stations"in u&&r(0,n=u.stations),"reqs"in u&&r(1,a=u.reqs)},e.$$.update=()=>{e.$$.dirty&1&&i.setFirecons(n)},[n,a,s]}class rit extends Ot{constructor(t){super();At(this,t,eit,tit,Tt,{stations:0,reqs:1})}}function nit(e){let t,r,n;return{c(){t=k("input"),this.h()},l(a){t=H(a,"INPUT",{type:!0,class:!0}),this.h()},h(){F(t,"type","number"),F(t,"class","short")},m(a,i){U(a,t,i),xe(t,e[0]),r||(n=Xt(t,"input",e[2]),r=!0)},p(a,i){i&1&&Fe(t.value)!==a[0]&&xe(t,a[0])},d(a){a&&P(t),r=!1,n()}}}function ait(e){let t,r;return t=new qe({props:{label:"ADFC",$$slots:{default:[nit]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&17&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function iit(e){let t,r;const n=[e[1]];let a={$$slots:{default:[ait]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&2?ae(n,[ue(i[1])]):{};s&17&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function sit(e,t,r){let{rating:n=0}=t,{reqs:a={}}=t;const{dispatch:i}=he("ship");function s(){n=Fe(this.value),r(0,n)}return e.$$set=u=>{"rating"in u&&r(0,n=u.rating),"reqs"in u&&r(1,a=u.reqs)},e.$$.update=()=>{e.$$.dirty&1&&i.setADFC(n)},[n,a,s]}class oit extends Ot{constructor(t){super();At(this,t,sit,iit,Tt,{rating:0,reqs:1})}}function tm(e,t,r){const n=e.slice();return n[4]=t[r],n}function em(e,t){let r,n=t[4].name+"",a,i;return{key:e,first:null,c(){r=k("option"),a=$t(n),this.h()},l(s){r=H(s,"OPTION",{});var u=X(r);a=bt(u,n),u.forEach(P),this.h()},h(){r.__value=i=t[4].type,r.value=r.__value,this.first=r},m(s,u){U(s,r,u),j(r,a)},p(s,u){t=s},d(s){s&&P(r)}}}function uit(e){let t,r=[],n=new Map,a,i,s,u,f,c=Qs;const h=v=>v[4].type;for(let v=0;v<c.length;v+=1){let p=tm(e,c,v),g=h(p);n.set(g,r[v]=em(g,p))}return{c(){t=k("select");for(let v=0;v<r.length;v+=1)r[v].c();a=ht(),i=k("button"),s=$t("add weapon"),this.h()},l(v){t=H(v,"SELECT",{class:!0});var p=X(t);for(let _=0;_<r.length;_+=1)r[_].l(p);p.forEach(P),a=vt(v),i=H(v,"BUTTON",{class:!0});var g=X(i);s=bt(g,"add weapon"),g.forEach(P),this.h()},h(){F(t,"class","svelte-e6kwbl"),e[0]===void 0&&ji(()=>e[3].call(t)),F(i,"class","button small primary")},m(v,p){U(v,t,p);for(let g=0;g<r.length;g+=1)r[g].m(t,null);_n(t,e[0]),U(v,a,p),U(v,i,p),j(i,s),u||(f=[Xt(t,"change",e[3]),Xt(i,"click",e[1])],u=!0)},p(v,p){p&0&&(c=Qs,r=kr(r,p,h,1,v,c,n,t,Sa,em,null,tm)),p&1&&_n(t,v[0])},d(v){v&&P(t);for(let p=0;p<r.length;p+=1)r[p].d();v&&P(a),v&&P(i),u=!1,an(f)}}}function fit(e){let t,r;return t=new qe({props:{label:"weapon type",$$slots:{default:[uit]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&129&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function lit(e,t,r){let{ship:n=he("ship")}=t,a=Qs[0].value;const i=()=>n.dispatch.addWeapon(a);function s(){a=Us(this),r(0,a)}return e.$$set=u=>{"ship"in u&&r(2,n=u.ship)},[a,i,n,s]}class cit extends Ot{constructor(t){super();At(this,t,lit,fit,Tt,{ship:2})}}function hit(e){let t,r,n,a;return{c(){t=Gn("g"),r=Gn("path"),this.h()},l(i){t=Nn(i,"g",{transform:!0});var s=X(t);r=Nn(s,"path",{d:!0,class:!0}),X(r).forEach(P),s.forEach(P),this.h()},h(){F(r,"d",e[1]),F(r,"class","svelte-jxsibt"),Le(r,"active",e[0]),F(t,"transform",e[2])},m(i,s){U(i,t,s),j(t,r),n||(a=Xt(r,"click",e[7]),n=!0)},p(i,[s]){s&2&&F(r,"d",i[1]),s&1&&Le(r,"active",i[0]),s&4&&F(t,"transform",i[2])},i:se,o:se,d(i){i&&P(t),n=!1,a()}}}function vit(e,t,r){let{arc:n}=t,{radius:a}=t,{active:i=!1}=t;const s={F:0,FS:300,AS:240,A:180,AP:120,FP:60};let u,f,c,h;function v(p){zh.call(this,e,p)}return e.$$set=p=>{"arc"in p&&r(3,n=p.arc),"radius"in p&&r(4,a=p.radius),"active"in p&&r(0,i=p.active)},e.$$.update=()=>{e.$$.dirty&16&&r(5,u=Math.round(a*(1-Math.sin(60/180*Math.PI)))),e.$$.dirty&16&&r(6,f=Math.round(a*Math.cos(60/180*Math.PI))),e.$$.dirty&112&&r(1,c=`M ${a},${a} L ${a-f},${u} A ${a},${a} 0 0 1 ${a+f},${u} Z`),e.$$.dirty&24&&r(2,h=`rotate(${s[n]},${a},${a})`)},[i,c,h,n,a,u,f,v]}class pit extends Ot{constructor(t){super();At(this,t,vit,hit,Tt,{arc:3,radius:4,active:0})}}function rm(e,t,r){const n=e.slice();return n[8]=t[r],n}function nm(e,t){let r,n,a;function i(){return t[6](t[8])}return n=new pit({props:{arc:t[8],radius:t[1]/2,active:t[0].includes(t[8])}}),n.$on("click",i),{key:e,first:null,c(){r=er(),st(n.$$.fragment),this.h()},l(s){r=er(),ft(n.$$.fragment,s),this.h()},h(){this.first=r},m(s,u){U(s,r,u),ot(n,s,u),a=!0},p(s,u){t=s;const f={};u&2&&(f.radius=t[1]/2),u&1&&(f.active=t[0].includes(t[8])),n.$set(f)},i(s){a||(V(n.$$.fragment,s),a=!0)},o(s){tt(n.$$.fragment,s),a=!1},d(s){s&&P(r),ut(n,s)}}}function dit(e){let t,r=[],n=new Map,a,i,s,u,f,c=e[2];const h=g=>g[8];for(let g=0;g<c.length;g+=1){let _=rm(e,c,g),m=h(_);n.set(m,r[g]=nm(m,_))}const v=e[5].default,p=Sn(v,e,e[4],null);return{c(){t=Gn("svg");for(let g=0;g<r.length;g+=1)r[g].c();a=Gn("circle"),p&&p.c(),this.h()},l(g){t=Nn(g,"svg",{width:!0,height:!0});var _=X(t);for(let m=0;m<r.length;m+=1)r[m].l(_);a=Nn(_,"circle",{cx:!0,cy:!0,r:!0,class:!0}),X(a).forEach(P),p&&p.l(_),_.forEach(P),this.h()},h(){F(a,"cx","50%"),F(a,"cy","50%"),F(a,"r",i=e[1]/3),F(a,"class","svelte-1rig4e6"),F(t,"width",s=e[1]+"px"),F(t,"height",u=e[1]+"px")},m(g,_){U(g,t,_);for(let m=0;m<r.length;m+=1)r[m].m(t,null);j(t,a),p&&p.m(t,null),f=!0},p(g,[_]){_&15&&(c=g[2],dn(),r=kr(r,_,h,1,g,c,n,t,Yu,nm,a,rm),gn()),(!f||_&2&&i!==(i=g[1]/3))&&F(a,"r",i),p&&p.p&&(!f||_&16)&&bn(p,v,g,g[4],f?wn(v,g[4],_,null):yn(g[4]),null),(!f||_&2&&s!==(s=g[1]+"px"))&&F(t,"width",s),(!f||_&2&&u!==(u=g[1]+"px"))&&F(t,"height",u)},i(g){if(!f){for(let _=0;_<c.length;_+=1)V(r[_]);V(p,g),f=!0}},o(g){for(let _=0;_<r.length;_+=1)tt(r[_]);tt(p,g),f=!1},d(g){g&&P(t);for(let _=0;_<r.length;_+=1)r[_].d();p&&p.d(g)}}}function git(e,t,r){let{$$slots:n={},$$scope:a}=t;const i=["FS","F","FP","AP","A","AS"];let{selected:s=[]}=t,{size:u=60}=t;const f=qi(),c=v=>f("click_arc",v),h=v=>c(v);return e.$$set=v=>{"selected"in v&&r(0,s=v.selected),"size"in v&&r(1,u=v.size),"$$scope"in v&&r(4,a=v.$$scope)},[s,u,i,c,a,n,h]}class Cf extends Ot{constructor(t){super();At(this,t,git,dit,Tt,{selected:0,size:1})}}function am(e,t,r){const n=e.slice();return n[2]=t[r],n}function _it(e){let t,r,n,a,i,s,u,f,c,h,v;return{c(){t=k("select"),r=k("option"),n=$t("1"),a=k("option"),i=$t("2"),s=k("option"),u=$t("3"),f=k("option"),c=$t("4"),this.h()},l(p){t=H(p,"SELECT",{});var g=X(t);r=H(g,"OPTION",{});var _=X(r);n=bt(_,"1"),_.forEach(P),a=H(g,"OPTION",{});var m=X(a);i=bt(m,"2"),m.forEach(P),s=H(g,"OPTION",{});var b=X(s);u=bt(b,"3"),b.forEach(P),f=H(g,"OPTION",{});var y=X(f);c=bt(y,"4"),y.forEach(P),g.forEach(P),this.h()},h(){r.__value=1,r.value=r.__value,a.__value=2,a.value=a.__value,s.__value=3,s.value=s.__value,f.__value=4,f.value=f.__value,e[0]===void 0&&ji(()=>e[6].call(t))},m(p,g){U(p,t,g),j(t,r),j(r,n),j(t,a),j(a,i),j(t,s),j(s,u),j(t,f),j(f,c),_n(t,e[0]),h||(v=Xt(t,"change",e[6]),h=!0)},p(p,g){g&1&&_n(t,p[0])},d(p){p&&P(t),h=!1,v()}}}function im(e,t){let r,n=t[2]+"",a,i;return{key:e,first:null,c(){r=k("option"),a=$t(n),this.h()},l(s){r=H(s,"OPTION",{});var u=X(r);a=bt(u,n),u.forEach(P),this.h()},h(){r.__value=i=t[2],r.value=r.__value,this.first=r},m(s,u){U(s,r,u),j(r,a)},p(s,u){t=s,u&1&&n!==(n=t[2]+"")&&rr(a,n),u&1&&i!==(i=t[2])&&(r.__value=i,r.value=r.__value)},d(s){s&&P(r)}}}function mit(e){let t,r=[],n=new Map,a,i,s=e[3][e[0]]||[];const u=f=>f[2];for(let f=0;f<s.length;f+=1){let c=am(e,s,f),h=u(c);n.set(h,r[f]=im(h,c))}return{c(){t=k("select");for(let f=0;f<r.length;f+=1)r[f].c();this.h()},l(f){t=H(f,"SELECT",{});var c=X(t);for(let h=0;h<r.length;h+=1)r[h].l(c);c.forEach(P),this.h()},h(){e[2]===void 0&&ji(()=>e[7].call(t))},m(f,c){U(f,t,c);for(let h=0;h<r.length;h+=1)r[h].m(t,null);_n(t,e[2]),a||(i=Xt(t,"change",e[7]),a=!0)},p(f,c){c&9&&(s=f[3][f[0]]||[],r=kr(r,c,u,1,f,s,n,t,Sa,im,null,am)),c&13&&_n(t,f[2])},d(f){f&&P(t);for(let c=0;c<r.length;c+=1)r[c].d();a=!1,i()}}}function $it(e){let t,r,n,a,i,s,u,f,c;return a=new qe({props:{label:"beam class",$$slots:{default:[_it]},$$scope:{ctx:e}}}),s=new qe({props:{label:"arcs",$$slots:{default:[mit]},$$scope:{ctx:e}}}),f=new Cf({props:{selected:e[1]}}),f.$on("click_arc",e[8]),{c(){t=k("label"),r=$t("beam"),n=ht(),st(a.$$.fragment),i=ht(),st(s.$$.fragment),u=ht(),st(f.$$.fragment)},l(h){t=H(h,"LABEL",{});var v=X(t);r=bt(v,"beam"),v.forEach(P),n=vt(h),ft(a.$$.fragment,h),i=vt(h),ft(s.$$.fragment,h),u=vt(h),ft(f.$$.fragment,h)},m(h,v){U(h,t,v),j(t,r),U(h,n,v),ot(a,h,v),U(h,i,v),ot(s,h,v),U(h,u,v),ot(f,h,v),c=!0},p(h,[v]){const p={};v&16385&&(p.$$scope={dirty:v,ctx:h}),a.$set(p);const g={};v&16389&&(g.$$scope={dirty:v,ctx:h}),s.$set(g);const _={};v&2&&(_.selected=h[1]),f.$set(_)},i(h){c||(V(a.$$.fragment,h),V(s.$$.fragment,h),V(f.$$.fragment,h),c=!0)},o(h){tt(a.$$.fragment,h),tt(s.$$.fragment,h),tt(f.$$.fragment,h),c=!1},d(h){h&&P(t),h&&P(n),ut(a,h),h&&P(i),ut(s,h),h&&P(u),ut(f,h)}}}function bit(e,t,r){let n;const a=["FS","F","FP","AP","A","AS"];let{weaponClass:i=1}=t,{arcs:s=["F"]}=t,u={1:[6],2:[3,6],3:[1,2,3,4,5,6,"broadside"],4:[1,2,3,4,5,6,"broadside"]},f=s.length;const c=["FS","FP","AP","AS"];function h(m){if(f==="broadside"){r(1,s=c);return}let b=a.findIndex(y=>y===m);b===-1&&(b=0),r(1,s=Array.from({length:f}).map((y,w)=>a[(b+w)%a.length])),r(5,n=s.join(","))}const v=qi();function p(){i=Us(this),r(0,i)}function g(){f=Us(this),r(2,f),r(3,u),r(0,i),r(3,u),r(0,i)}const _=({detail:m})=>h(m);return e.$$set=m=>{"weaponClass"in m&&r(0,i=m.weaponClass),"arcs"in m&&r(1,s=m.arcs)},e.$$.update=()=>{e.$$.dirty&2&&r(5,n=s.join(",")),e.$$.dirty&5&&(u[i].includes(f)||(r(2,f=u[i][0]),console.log({nbrArcs:f,label:"in if"}))),e.$$.dirty&6&&s.length!==f&&h(s[0]),e.$$.dirty&2&&console.log("it changed!",s),e.$$.dirty&32&&console.log("it changed!",n),e.$$.dirty&33&&v("change",{weaponClass:i,arcs:n.split(",")})},[i,s,f,u,h,n,p,g,_]}class yit extends Ot{constructor(t){super();At(this,t,bit,$it,Tt,{weaponClass:0,arcs:1})}}function wit(e){let t,r,n,a,i;return a=new Cf({props:{selected:[e[0]]}}),a.$on("click_arc",e[2]),{c(){t=k("label"),r=$t("submunition pack"),n=ht(),st(a.$$.fragment)},l(s){t=H(s,"LABEL",{});var u=X(t);r=bt(u,"submunition pack"),u.forEach(P),n=vt(s),ft(a.$$.fragment,s)},m(s,u){U(s,t,u),j(t,r),U(s,n,u),ot(a,s,u),i=!0},p(s,[u]){const f={};u&1&&(f.selected=[s[0]]),a.$set(f)},i(s){i||(V(a.$$.fragment,s),i=!0)},o(s){tt(a.$$.fragment,s),i=!1},d(s){s&&P(t),s&&P(n),ut(a,s)}}}function Sit(e,t,r){let{arc:n="F"}=t;const a=qi(),i=u=>{a("change",{arc:u})},s=({detail:u})=>i(u);return e.$$set=u=>{"arc"in u&&r(0,n=u.arc)},[n,i,s]}class Eit extends Ot{constructor(t){super();At(this,t,Sit,wit,Tt,{arc:0})}}function Cit(e){let t,r;return{c(){t=k("label"),r=$t("point defence system")},l(n){t=H(n,"LABEL",{});var a=X(t);r=bt(a,"point defence system"),a.forEach(P)},m(n,a){U(n,t,a),j(t,r)},p:se,i:se,o:se,d(n){n&&P(t)}}}class Oit extends Ot{constructor(t){super();At(this,t,null,Cit,Tt,{})}}function Ait(e){let t,r;return{c(){t=k("label"),r=$t("scattergun")},l(n){t=H(n,"LABEL",{});var a=X(t);r=bt(a,"scattergun"),a.forEach(P)},m(n,a){U(n,t,a),j(t,r)},p:se,i:se,o:se,d(n){n&&P(t)}}}class Tit extends Ot{constructor(t){super();At(this,t,null,Ait,Tt,{})}}function Mit(e){let t,r,n,a,i;return a=new Cf({props:{selected:[e[0]]}}),a.$on("click_arc",e[2]),{c(){t=k("label"),r=$t("needle weapon"),n=ht(),st(a.$$.fragment)},l(s){t=H(s,"LABEL",{});var u=X(t);r=bt(u,"needle weapon"),u.forEach(P),n=vt(s),ft(a.$$.fragment,s)},m(s,u){U(s,t,u),j(t,r),U(s,n,u),ot(a,s,u),i=!0},p(s,[u]){const f={};u&1&&(f.selected=[s[0]]),a.$set(f)},i(s){i||(V(a.$$.fragment,s),i=!0)},o(s){tt(a.$$.fragment,s),i=!1},d(s){s&&P(t),s&&P(n),ut(a,s)}}}function Pit(e,t,r){let{arc:n="F"}=t;const a=qi(),i=u=>{a("change",{arc:u})},s=({detail:u})=>i(u);return e.$$set=u=>{"arc"in u&&r(0,n=u.arc)},[n,i,s]}class xit extends Ot{constructor(t){super();At(this,t,Pit,Mit,Tt,{arc:0})}}function Iit(e){let t,r,n,a,i,s,u,f;const c=[e[0]];var h=e[3][e[1]];function v(p){let g={};for(let _=0;_<c.length;_+=1)g=Nt(g,c[_]);return{props:g}}return h&&(i=new h(v()),i.$on("change",e[5])),{c(){t=k("div"),r=k("button"),n=$t("remove"),a=ht(),i&&st(i.$$.fragment),this.h()},l(p){t=H(p,"DIV",{class:!0});var g=X(t);r=H(g,"BUTTON",{class:!0});var _=X(r);n=bt(_,"remove"),_.forEach(P),a=vt(g),i&&ft(i.$$.fragment,g),g.forEach(P),this.h()},h(){F(r,"class","button small red remove"),F(t,"class","weapon_row svelte-1y8jrjk")},m(p,g){U(p,t,g),j(t,r),j(r,n),j(t,a),i&&ot(i,t,null),s=!0,u||(f=Xt(r,"click",e[4]),u=!0)},p(p,g){const _=g&1?ae(c,[ue(p[0])]):{};if(h!==(h=p[3][p[1]])){if(i){dn();const m=i;tt(m.$$.fragment,1,0,()=>{ut(m,1)}),gn()}h?(i=new h(v()),i.$on("change",p[5]),st(i.$$.fragment),V(i.$$.fragment,1),ot(i,t,null)):i=null}else h&&i.$set(_)},i(p){s||(i&&V(i.$$.fragment,p),s=!0)},o(p){i&&tt(i.$$.fragment,p),s=!1},d(p){p&&P(t),i&&ut(i),u=!1,f()}}}function Dit(e){let t,r;const n=[e[2]];let a={$$slots:{default:[Iit]},$$scope:{ctx:e}};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new Hr({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,[s]){const u=s&4?ae(n,[ue(i[2])]):{};s&259&&(u.$$scope={dirty:s,ctx:i}),t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function Rit(e,t,r){let n,a;const i={beam:yit,submunition:Eit,pds:Oit,scattergun:Tit,needle:xit};let{weapon:s={}}=t,{id:u}=t;const f=he("ship"),c=()=>f.dispatch.removeWeapon(u),h=({detail:v})=>{console.log({id:u,type:a}),f.dispatch.setWeapon(ua({id:u,type:a},v))};return e.$$set=v=>{"weapon"in v&&r(0,s=v.weapon),"id"in v&&r(6,u=v.id)},e.$$.update=()=>{e.$$.dirty&1&&r(2,n=s.reqs),e.$$.dirty&1&&r(1,a=s.type)},[s,a,n,i,c,h,u]}class Bit extends Ot{constructor(t){super();At(this,t,Rit,Dit,Tt,{weapon:0,id:6})}}function sm(e,t,r){const n=e.slice();return n[3]=t[r],n}function om(e,t){let r,n,a;return n=new Bit({props:{weapon:t[3],id:t[3].id}}),{key:e,first:null,c(){r=er(),st(n.$$.fragment),this.h()},l(i){r=er(),ft(n.$$.fragment,i),this.h()},h(){this.first=r},m(i,s){U(i,r,s),ot(n,i,s),a=!0},p(i,s){t=i;const u={};s&4&&(u.weapon=t[3]),s&4&&(u.id=t[3].id),n.$set(u)},i(i){a||(V(n.$$.fragment,i),a=!0)},o(i){tt(n.$$.fragment,i),a=!1},d(i){i&&P(r),ut(n,i)}}}function Lit(e){let t,r,n,a,i,s,u=[],f=new Map,c,h;const v=[e[0]];let p={};for(let y=0;y<v.length;y+=1)p=Nt(p,v[y]);t=new rit({props:p});const g=[e[1]];let _={};for(let y=0;y<g.length;y+=1)_=Nt(_,g[y]);n=new oit({props:_}),i=new cit({});let m=e[2];const b=y=>y[3].id;for(let y=0;y<m.length;y+=1){let w=sm(e,m,y),O=b(w);f.set(O,u[y]=om(O,w))}return{c(){st(t.$$.fragment),r=ht(),st(n.$$.fragment),a=ht(),st(i.$$.fragment),s=ht();for(let y=0;y<u.length;y+=1)u[y].c();c=er()},l(y){ft(t.$$.fragment,y),r=vt(y),ft(n.$$.fragment,y),a=vt(y),ft(i.$$.fragment,y),s=vt(y);for(let w=0;w<u.length;w+=1)u[w].l(y);c=er()},m(y,w){ot(t,y,w),U(y,r,w),ot(n,y,w),U(y,a,w),ot(i,y,w),U(y,s,w);for(let O=0;O<u.length;O+=1)u[O].m(y,w);U(y,c,w),h=!0},p(y,w){const O=w&1?ae(v,[ue(y[0])]):{};t.$set(O);const T=w&2?ae(g,[ue(y[1])]):{};n.$set(T),w&4&&(m=y[2],dn(),u=kr(u,w,b,1,y,m,f,c.parentNode,Yu,om,c,sm),gn())},i(y){if(!h){V(t.$$.fragment,y),V(n.$$.fragment,y),V(i.$$.fragment,y);for(let w=0;w<m.length;w+=1)V(u[w]);h=!0}},o(y){tt(t.$$.fragment,y),tt(n.$$.fragment,y),tt(i.$$.fragment,y);for(let w=0;w<u.length;w+=1)tt(u[w]);h=!1},d(y){ut(t,y),y&&P(r),ut(n,y),y&&P(a),ut(i,y),y&&P(s);for(let w=0;w<u.length;w+=1)u[w].d(y);y&&P(c)}}}function Fit(e){let t,r;return t=new Ef({props:{label:"weaponry",$$slots:{default:[Lit]},$$scope:{ctx:e}}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,[a]){const i={};a&71&&(i.$$scope={dirty:a,ctx:n}),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function zit(e,t,r){let{firecons:n={}}=t,{adfc:a={}}=t,{weapons:i=[]}=t;return e.$$set=s=>{"firecons"in s&&r(0,n=s.firecons),"adfc"in s&&r(1,a=s.adfc),"weapons"in s&&r(2,i=s.weapons)},[n,a,i]}class Git extends Ot{constructor(t){super();At(this,t,zit,Fit,Tt,{firecons:0,adfc:1,weapons:2})}}function Nit(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_;const m=[e[0].identification];let b={};for(let M=0;M<m.length;M+=1)b=Nt(b,m[M]);n=new Bnt({props:b});const y=[e[0].reqs];let w={};for(let M=0;M<y.length;M+=1)w=Nt(w,y[M]);i=new qnt({props:w}),u=new sat({props:{propulsion:e[0].propulsion}});const O=[e[0].structure];let T={};for(let M=0;M<O.length;M+=1)T=Nt(T,O[M]);c=new Nat({props:T});const A=[e[0].weaponry];let I={};for(let M=0;M<A.length;M+=1)I=Nt(I,A[M]);v=new Git({props:I});const x=[e[0].carrier];let B={};for(let M=0;M<x.length;M+=1)B=Nt(B,x[M]);return g=new Zat({props:B}),{c(){t=k("main"),r=k("div"),st(n.$$.fragment),a=ht(),st(i.$$.fragment),s=ht(),st(u.$$.fragment),f=ht(),st(c.$$.fragment),h=ht(),st(v.$$.fragment),p=ht(),st(g.$$.fragment),this.h()},l(M){t=H(M,"MAIN",{class:!0});var L=X(t);r=H(L,"DIV",{class:!0});var G=X(r);ft(n.$$.fragment,G),a=vt(G),ft(i.$$.fragment,G),G.forEach(P),s=vt(L),ft(u.$$.fragment,L),f=vt(L),ft(c.$$.fragment,L),h=vt(L),ft(v.$$.fragment,L),p=vt(L),ft(g.$$.fragment,L),L.forEach(P),this.h()},h(){F(r,"class","identification-row svelte-1xmntps"),F(t,"class","svelte-1xmntps")},m(M,L){U(M,t,L),j(t,r),ot(n,r,null),j(r,a),ot(i,r,null),j(t,s),ot(u,t,null),j(t,f),ot(c,t,null),j(t,h),ot(v,t,null),j(t,p),ot(g,t,null),_=!0},p(M,[L]){const G=L&1?ae(m,[ue(M[0].identification)]):{};n.$set(G);const W=L&1?ae(y,[ue(M[0].reqs)]):{};i.$set(W);const at={};L&1&&(at.propulsion=M[0].propulsion),u.$set(at);const et=L&1?ae(O,[ue(M[0].structure)]):{};c.$set(et);const rt=L&1?ae(A,[ue(M[0].weaponry)]):{};v.$set(rt);const gt=L&1?ae(x,[ue(M[0].carrier)]):{};g.$set(gt)},i(M){_||(V(n.$$.fragment,M),V(i.$$.fragment,M),V(u.$$.fragment,M),V(c.$$.fragment,M),V(v.$$.fragment,M),V(g.$$.fragment,M),_=!0)},o(M){tt(n.$$.fragment,M),tt(i.$$.fragment,M),tt(u.$$.fragment,M),tt(c.$$.fragment,M),tt(v.$$.fragment,M),tt(g.$$.fragment,M),_=!1},d(M){M&&P(t),ut(n),ut(i),ut(u),ut(c),ut(v),ut(g)}}}function jit(e,t,r){let n;const{state:a}=he("ship");return so(e,a,i=>r(0,n=i)),[n,a]}class qit extends Ot{constructor(t){super();At(this,t,jit,Nit,Tt,{})}}function Uit(e){let t,r,n,a,i,s,u,f,c,h,v;return{c(){t=k("div"),r=k("button"),n=$t("save"),a=ht(),i=k("pre"),s=k("code"),u=$t(e[0]),f=ht(),c=k("a"),this.h()},l(p){t=H(p,"DIV",{class:!0});var g=X(t);r=H(g,"BUTTON",{class:!0});var _=X(r);n=bt(_,"save"),_.forEach(P),a=vt(g),i=H(g,"PRE",{class:!0});var m=X(i);s=H(m,"CODE",{});var b=X(s);u=bt(b,e[0]),b.forEach(P),m.forEach(P),g.forEach(P),f=vt(p),c=H(p,"A",{href:!0,download:!0}),X(c).forEach(P),this.h()},h(){F(r,"class","button primary svelte-1f6rwrs"),F(i,"class","svelte-1f6rwrs"),F(t,"class","svelte-1f6rwrs"),F(c,"href",e[3]),F(c,"download",e[2]),Re(c,"display","none",!1)},m(p,g){U(p,t,g),j(t,r),j(r,n),j(t,a),j(t,i),j(i,s),j(s,u),U(p,f,g),U(p,c,g),e[8](c),h||(v=Xt(r,"click",e[5]),h=!0)},p(p,[g]){g&1&&rr(u,p[0]),g&8&&F(c,"href",p[3]),g&4&&F(c,"download",p[2])},i:se,o:se,d(p){p&&P(t),p&&P(f),p&&P(c),e[8](null),h=!1,v()}}}function kit(e,t,r){let n,a,i,{ship:s={}}=t,u;const{state:f}=he("ship");so(e,f,p=>r(7,i=p)),qi();let c;function h(){c==null||c.click()}function v(p){Ya[p?"unshift":"push"](()=>{c=p,r(1,c)})}return e.$$set=p=>{"ship"in p&&r(6,s=p.ship)},e.$$.update=()=>{var p,g;e.$$.dirty&64&&r(0,u=JSON.stringify(s,null,2)),e.$$.dirty&128&&r(0,u=JSON.stringify(i,null,2)),e.$$.dirty&1&&r(3,n="data:text/plain;charset=utf-8,"+encodeURIComponent(u)),e.$$.dirty&128&&r(2,a=((g=(p=i==null?void 0:i.identification)==null?void 0:p.shipClass)!=null?g:"ship")+".json")},[u,c,a,n,f,h,s,i,v]}class Hit extends Ot{constructor(t){super();At(this,t,kit,Uit,Tt,{ship:6})}}function Wit(e){let t,r;return{c(){t=k("div"),r=$t(e[0]),this.h()},l(n){t=H(n,"DIV",{class:!0});var a=X(t);r=bt(a,e[0]),a.forEach(P),this.h()},h(){F(t,"class","svelte-uinb9")},m(n,a){U(n,t,a),j(t,r)},p(n,[a]){a&1&&rr(r,n[0])},i:se,o:se,d(n){n&&P(t)}}}function Kit(e,t,r){let{cost:n=0}=t;return e.$$set=a=>{"cost"in a&&r(0,n=a.cost)},[n]}class Yit extends Ot{constructor(t){super();At(this,t,Kit,Wit,Tt,{cost:0})}}function Xit(e){let t,r,n,a;return{c(){t=k("div"),r=$t(e[0]),n=k("img"),this.h()},l(i){t=H(i,"DIV",{});var s=X(t);r=bt(s,e[0]),n=H(s,"IMG",{src:!0,alt:!0,class:!0}),s.forEach(P),this.h()},h(){Wn(n.src,a=En+"/mass.svg")||F(n,"src",a),F(n,"alt","mass"),F(n,"class","svelte-vmvu0j")},m(i,s){U(i,t,s),j(t,r),j(t,n)},p(i,[s]){s&1&&rr(r,i[0])},i:se,o:se,d(i){i&&P(t)}}}function Vit(e,t,r){let{mass:n=0}=t;return e.$$set=a=>{"mass"in a&&r(0,n=a.mass)},[n]}class Zit extends Ot{constructor(t){super();At(this,t,Vit,Xit,Tt,{mass:0})}}function um(e){let t,r;return{c(){t=$t(e[0]),r=$t("-class,")},l(n){t=bt(n,e[0]),r=bt(n,"-class,")},m(n,a){U(n,t,a),U(n,r,a)},p(n,a){a&1&&rr(t,n[0])},d(n){n&&P(t),n&&P(r)}}}function Jit(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_,m=e[0]&&um(e);return v=new Yit({props:{cost:e[2]}}),g=new Zit({props:{mass:e[3]}}),{c(){t=k("h1"),r=$t("ship name: "),n=k("div"),a=ht(),i=k("div"),s=k("h2"),m&&m.c(),u=ht(),f=$t(e[1]),c=ht(),h=k("div"),st(v.$$.fragment),p=$t(`
|
|
\xA0
|
|
`),st(g.$$.fragment),this.h()},l(b){t=H(b,"H1",{class:!0});var y=X(t);r=bt(y,"ship name: "),n=H(y,"DIV",{class:!0}),X(n).forEach(P),y.forEach(P),a=vt(b),i=H(b,"DIV",{class:!0});var w=X(i);s=H(w,"H2",{class:!0});var O=X(s);m&&m.l(O),u=vt(O),f=bt(O,e[1]),O.forEach(P),c=vt(w),h=H(w,"DIV",{class:!0});var T=X(h);ft(v.$$.fragment,T),p=bt(T,`
|
|
\xA0
|
|
`),ft(g.$$.fragment,T),T.forEach(P),w.forEach(P),this.h()},h(){F(n,"class","fill svelte-1v8962g"),F(t,"class","svelte-1v8962g"),F(s,"class","svelte-1v8962g"),F(h,"class","reqs svelte-1v8962g"),F(i,"class","details svelte-1v8962g")},m(b,y){U(b,t,y),j(t,r),j(t,n),U(b,a,y),U(b,i,y),j(i,s),m&&m.m(s,null),j(s,u),j(s,f),j(i,c),j(i,h),ot(v,h,null),j(h,p),ot(g,h,null),_=!0},p(b,[y]){b[0]?m?m.p(b,y):(m=um(b),m.c(),m.m(s,u)):m&&(m.d(1),m=null),(!_||y&2)&&rr(f,b[1]);const w={};y&4&&(w.cost=b[2]),v.$set(w);const O={};y&8&&(O.mass=b[3]),g.$set(O)},i(b){_||(V(v.$$.fragment,b),V(g.$$.fragment,b),_=!0)},o(b){tt(v.$$.fragment,b),tt(g.$$.fragment,b),_=!1},d(b){b&&P(t),b&&P(a),b&&P(i),m&&m.d(),ut(v),ut(g)}}}function Qit(e,t,r){let{shipClass:n}=t,{shipType:a}=t,{cost:i=0}=t,{mass:s=0}=t;return e.$$set=u=>{"shipClass"in u&&r(0,n=u.shipClass),"shipType"in u&&r(1,a=u.shipType),"cost"in u&&r(2,i=u.cost),"mass"in u&&r(3,s=u.mass)},[n,a,i,s]}class tst extends Ot{constructor(t){super();At(this,t,Qit,Jit,Tt,{shipClass:0,shipType:1,cost:2,mass:3})}}function est(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.map(function(n){return n.split(" ").map(function(a){return a?""+e+a:""}).join(" ")}).join(" ")}function rst(e,t){return t.replace(/([^}{]*){/gm,function(r,n){return n.replace(/\.([^{,\s\d.]+)/g,"."+e+"$1")+"{"})}function pn(e,t){return function(r){r&&(e[t]=r)}}function Ty(e,t,r){return function(n){n&&(e[t][r]=n)}}function fm(e,t){return function(r){var n=r.prototype;e.forEach(function(a){t(n,a)})}}function nst(e,t){return t===void 0&&(t={}),function(r,n){e.forEach(function(a){var i=t[a]||a;i in r||(r[i]=function(){for(var s,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];var c=(s=this[n])[a].apply(s,u);return c===this[n]?this:c})})}}var ast=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(r){return this.values[this.keys.indexOf(r)]},t.set=function(r,n){var a=this.keys,i=this.values,s=a.indexOf(r),u=s===-1?a.length:s;a[u]=r,i[u]=n},e}(),ist=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(r){return this.object[r]},t.set=function(r,n){this.object[r]=n},e}(),sst=typeof Map=="function",ost=function(){function e(){}var t=e.prototype;return t.connect=function(r,n){this.prev=r,this.next=n,r&&(r.next=this),n&&(n.prev=this)},t.disconnect=function(){var r=this.prev,n=this.next;r&&(r.next=n),n&&(n.prev=r)},t.getIndex=function(){for(var r=this,n=-1;r;)r=r.prev,++n;return n},e}();function ust(e,t){var r=[],n=[];return e.forEach(function(a){var i=a[0],s=a[1],u=new ost;r[i]=u,n[s]=u}),r.forEach(function(a,i){a.connect(r[i-1])}),e.filter(function(a,i){return!t[i]}).map(function(a,i){var s=a[0],u=a[1];if(s===u)return[0,0];var f=r[s],c=n[u-1],h=f.getIndex();f.disconnect(),c?f.connect(c,c.next):f.connect(void 0,r[0]);var v=f.getIndex();return[h,v]})}var fst=function(){function e(r,n,a,i,s,u,f,c){this.prevList=r,this.list=n,this.added=a,this.removed=i,this.changed=s,this.maintained=u,this.changedBeforeAdded=f,this.fixed=c}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var r=ust(this.changedBeforeAdded,this.fixed),n=this.changed,a=[];this.cacheOrdered=r.filter(function(i,s){var u=i[0],f=i[1],c=n[s],h=c[0],v=c[1];if(u!==f)return a.push([h,v]),!0}),this.cachePureChanged=a},e}();function Of(e,t,r){var n=sst?Map:r?ist:ast,a=r||function(w){return w},i=[],s=[],u=[],f=e.map(a),c=t.map(a),h=new n,v=new n,p=[],g=[],_={},m=[],b=0,y=0;return f.forEach(function(w,O){h.set(w,O)}),c.forEach(function(w,O){v.set(w,O)}),f.forEach(function(w,O){var T=v.get(w);typeof T=="undefined"?(++y,s.push(O)):_[T]=y}),c.forEach(function(w,O){var T=h.get(w);typeof T=="undefined"?(i.push(O),++b):(u.push([T,O]),y=_[O]||0,p.push([T-y,O-b]),g.push(O===T),T!==O&&m.push([T,O]))}),s.reverse(),new fst(e,t,i,s,m,u,p,g)}var lst=function(){function e(r,n){r===void 0&&(r=[]),this.findKeyCallback=n,this.list=[].slice.call(r)}var t=e.prototype;return t.update=function(r){var n=[].slice.call(r),a=Of(this.list,n,this.findKeyCallback);return this.list=n,a},e}(),cst="function",hst="object",vst="string",pst="number",My="undefined",Py=typeof window!==My,dst=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],Cr=1e-7,mu={cm:function(e){return e*96/2.54},mm:function(e){return e*96/254},in:function(e){return e*96},pt:function(e){return e*96/72},pc:function(e){return e*96/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function gst(e,t,r,n){return(e*n+t*r)/(r+n)}function kn(e){return typeof e===My}function ma(e){return e&&typeof e===hst}function si(e){return Array.isArray(e)}function en(e){return typeof e===vst}function _st(e){return typeof e===pst}function xy(e){return typeof e===cst}function mst(e,t){var r=e===""||e==" ",n=t===""||t==" ";return n&&r||e===t}function Iy(e,t,r,n,a){var i=ep(e,t,r);return i?r:$st(e,t,r+1,n,a)}function ep(e,t,r){if(!e.ignore)return null;var n=t.slice(Math.max(r-3,0),r+3).join("");return new RegExp(e.ignore).exec(n)}function $st(e,t,r,n,a){for(var i=function(c){var h=t[c].trim();if(h===e.close&&!ep(e,t,c))return{value:c};var v=c,p=uh(a,function(g){var _=g.open;return _===h});if(p&&(v=Iy(p,t,c,n,a)),v===-1)return s=c,"break";c=v,s=c},s,u=r;u<n;++u){var f=i(u);if(u=s,typeof f=="object")return f.value;if(f==="break")break}return-1}function Dy(e,t){var r=en(t)?{separator:t}:t,n=r.separator,a=n===void 0?",":n,i=r.isSeparateFirst,s=r.isSeparateOnlyOpenClose,u=r.isSeparateOpenClose,f=u===void 0?s:u,c=r.openCloseCharacters,h=c===void 0?dst:c,v=h.map(function(x){var B=x.open,M=x.close;return B===M?B:B+"|"+M}).join("|"),p="(\\s*"+a+"\\s*|"+v+"|\\s+)",g=new RegExp(p,"g"),_=e.split(g).filter(Boolean),m=_.length,b=[],y=[];function w(){return y.length?(b.push(y.join("")),y=[],!0):!1}for(var O=function(x){var B=_[x].trim(),M=x,L=uh(h,function(W){var at=W.open;return at===B}),G=uh(h,function(W){var at=W.close;return at===B});if(L){if(M=Iy(L,_,x,m,h),M!==-1&&f)return w()&&i||(b.push(_.slice(x,M+1).join("")),x=M,i)?(T=x,"break"):(T=x,"continue")}else{if(G&&!ep(G,_,x))throw new Error("invalid format: "+G.close);if(mst(B,a)&&!s)return w(),i?(T=x,"break"):(T=x,"continue")}M===-1&&(M=m-1),y.push(_.slice(x,M+1).join("")),x=M,T=x},T,A=0;A<m;++A){var I=O(A);if(A=T,I==="break")break}return y.length&&b.push(y.join("")),b}function $a(e){return Dy(e,"")}function Ka(e){return Dy(e,",")}function rp(e){var t=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(e);return!t||t.length<4?{}:{prefix:t[1],value:t[2],suffix:t[3]}}function _o(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:"",unit:"",value:NaN};var r=t[1],n=t[2],a=t[3];return{prefix:r,unit:a,value:parseFloat(n)}}function np(e){return e.replace(/[\s-_]([a-z])/g,function(t,r){return r.toUpperCase()})}function _c(e,t){return t===void 0&&(t="-"),e.replace(/([a-z])([A-Z])/g,function(r,n,a){return""+n+t+a.toLowerCase()})}function to(){return Date.now?Date.now():new Date().getTime()}function rn(e,t,r){r===void 0&&(r=-1);for(var n=e.length,a=0;a<n;++a)if(t(e[a],a,e))return a;return r}function uh(e,t,r){var n=rn(e,t);return n>-1?e[n]:r}var ap=function(){var e=to(),t=Py&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return t?t.bind(window):function(r){var n=to(),a=window.setTimeout(function(){r(n-e)},1e3/60);return a}}(),bst=function(){var e=Py&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(t){clearTimeout(t)}}();function Ry(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in t)t.push(r);return t}function Ze(e,t){var r=_o(e),n=r.value,a=r.unit;if(ma(t)){var i=t[a];if(i){if(xy(i))return i(n);if(mu[a])return mu[a](n,i)}}else if(a==="%")return n*t/100;return mu[a]?mu[a](n):n}function yst(e,t,r){return Math.max(t,Math.min(e,r))}function lm(e,t,r){return[[ie(t[0],Cr),ie(t[0]*e[1]/e[0],Cr)],[ie(t[1]*e[0]/e[1],Cr),ie(t[1],Cr)]].filter(function(n){return n.every(function(a,i){return r?a<=t[i]:a>=t[i]})})[0]||e}function wst(e,t,r,n){if(!n)return e.map(function(p,g){return yst(p,t[g],r[g])});var a=e[0],i=e[1],s=lm(e,t,!1),u=s[0],f=s[1],c=lm(e,r,!0),h=c[0],v=c[1];return a<u||i<f?(a=u,i=f):(a>h||i>v)&&(a=h,i=v),[a,i]}function Sst(e){for(var t=e.length,r=0,n=t-1;n>=0;--n)r+=e[n];return r}function eo(e){for(var t=e.length,r=0,n=t-1;n>=0;--n)r+=e[n];return t?r/t:0}function Te(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=Math.atan2(n,r);return a>=0?a:a+Math.PI*2}function Est(e){return[0,1].map(function(t){return eo(e.map(function(r){return r[t]}))})}function fh(e){var t=Est(e),r=Te(t,e[0]),n=Te(t,e[1]);return r<n&&n-r<Math.PI||r>n&&n-r<-Math.PI?1:-1}function jn(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function ie(e,t){return t?Math.round(e/t)*t:e}function cm(e,t){return e.forEach(function(r,n){e[n]=ie(e[n],t)}),e}function Qr(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function Cst(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Ost(e,t){if(e.classList)e.classList.remove(t);else{var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")}}function Zr(e,t,r,n){e.addEventListener(t,r,n)}function vr(e,t,r,n){e.removeEventListener(t,r,n)}/*! *****************************************************************************
|
|
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 lh=function(e,t){return lh=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])},lh(e,t)};function oi(e,t){lh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ca=function(){return ca=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ca.apply(this,arguments)};function By(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Ast(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,a++)n[a]=i[s];return n}function ch(e,t){if(e===t)return!1;for(var r in e)if(!(r in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function ip(e,t){var r=Object.keys(e),n=Object.keys(t),a=Of(r,n,function(f){return f}),i={},s={},u={};return a.added.forEach(function(f){var c=n[f];i[c]=t[c]}),a.removed.forEach(function(f){var c=r[f];s[c]=e[c]}),a.maintained.forEach(function(f){var c=f[0],h=r[c],v=[e[h],t[h]];e[h]!==t[h]&&(u[h]=v)}),{added:i,removed:s,changed:u}}function Ly(e){e.forEach(function(t){t()})}function hm(e){var t=0;return e.map(function(r){return r==null?"$compat"+ ++t:""+r})}function vm(e,t,r,n){if(en(e)||_st(e))return new xst("text_"+e,t,r,n,null,{});var a=typeof e.type=="string"?Ist:e.type.prototype.render?Rst:Dst;return new a(e.type,t,r,n,e.ref,e.props)}function Fy(e){var t=[];return e.forEach(function(r){t=t.concat(si(r)?Fy(r):r)}),t}function pm(e){var t=e.className,r=By(e,["className"]);return t!=null&&(r.class=t),delete r.style,delete r.children,r}function mc(e,t){if(!t)return e;for(var r in t)kn(e[r])&&(e[r]=t[r]);return e}function qr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=t||{},i=a.key,s=a.ref,u=By(a,["key","ref"]);return{type:e,key:i,ref:s,props:ca(ca({},u),{children:Fy(r).filter(function(f){return f!=null&&f!==!1})})}}var mo=function(){function e(r,n,a,i,s,u){u===void 0&&(u={}),this.type=r,this.key=n,this.index=a,this.container=i,this.ref=s,this.props=u,this._providers=[]}var t=e.prototype;return t._should=function(r,n){return!0},t._update=function(r,n,a,i){if(this.base&&!en(n)&&!i&&!this._should(n.props,a))return!1;this.original=n,this._setState(a);var s=this.props;return en(n)||(this.props=n.props,this.ref=n.ref),this._render(r,this.base?s:{},a),!0},t._mounted=function(){var r=this.ref;r&&r(this.base)},t._setState=function(r){},t._updated=function(){var r=this.ref;r&&r(this.base)},t._destroy=function(){var r=this.ref;r&&r(null)},e}();function Tst(e,t,r){var n=ip(e,t),a=n.added,i=n.removed,s=n.changed;for(var u in a)r.setAttribute(u,a[u]);for(var u in s)r.setAttribute(u,s[u][1]);for(var u in i)r.removeAttribute(u)}function Mst(e,t,r){var n=ip(e,t),a=n.added,i=n.removed,s=n.changed;for(var u in i)r.removeEventListener(u);for(var u in a)r.addEventListener(u,a[u]);for(var u in s)r.removeEventListener(u),r.addEventListener(u,s[u][1]);for(var u in i)r.removeEventListener(u)}function Pst(e,t,r){var n=r.style,a=ip(e,t),i=a.added,s=a.removed,u=a.changed;for(var f in i){var c=_c(f,"-");n.setProperty?n.setProperty(c,i[f]):n[c]=i[f]}for(var f in u){var c=_c(f,"-");n.setProperty?n.setProperty(c,u[f][1]):n[c]=u[f][1]}for(var f in s){var c=_c(f,"-");n.removeProperty?n.removeProperty(c):n[c]=""}}function dm(e){var t={},r={};for(var n in e)n.indexOf("on")===0?r[n.replace("on","").toLowerCase()]=e[n]:t[n]=e[n];return{attributes:t,events:r}}var xst=function(e){oi(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}var r=t.prototype;return r._render=function(n){var a=this,i=!this.base;return i&&(this.base=document.createTextNode(this.type.replace("text_",""))),n.push(function(){i?a._mounted():a._updated()}),!0},r._unmount=function(){this.base.parentNode.removeChild(this.base)},t}(mo),Ist=function(e){oi(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.events={},n._isSVG=!1,n}var r=t.prototype;return r.addEventListener=function(n,a){var i=this.events;i[n]=function(s){s.nativeEvent=s,a(s)},this.base.addEventListener(n,i[n])},r.removeEventListener=function(n){var a=this.events;this.base.removeEventListener(n,a[n]),delete a[n]},r._should=function(n){return ch(this.props,n)},r._render=function(n,a){var i=this,s=!this.base;if(s){var u=this._hasSVG();this._isSVG=u;var f=this.props.portalContainer;if(!f){var c=this.type;u?f=document.createElementNS("http://www.w3.org/2000/svg",c):f=document.createElement(c)}this.base=f}$o(this,this._providers,this.props.children,n,null);var h=this.base,v=dm(a),p=v.attributes,g=v.events,_=dm(this.props),m=_.attributes,b=_.events;return Tst(pm(p),pm(m),h),Mst(g,b,this),Pst(a.style||{},this.props.style||{},h),n.push(function(){s?i._mounted():i._updated()}),!0},r._unmount=function(){var n=this.events,a=this.base;for(var i in n)a.removeEventListener(i,n[i]);this._providers.forEach(function(s){s._unmount()}),this.events={},this.props.portalContainer||a.parentNode.removeChild(a)},r._hasSVG=function(){if(this._isSVG||this.type==="svg")return!0;var n=sp(this.container);return n&&"ownerSVGElement"in n},t}(mo);function sp(e){if(!e)return null;var t=e.base;return t instanceof Node?t:sp(e.container)}function ro(e){if(!e)return null;if(e instanceof Node)return e;var t=e.$_provider._providers;return t.length?ro(t[0].base):null}var Dst=function(e){oi(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}var r=t.prototype;return r._render=function(n){var a=this.type(this.props);return $o(this,this._providers,a?[a]:[],n),!0},r._unmount=function(){this._providers.forEach(function(n){n._unmount()})},t}(mo),zy=function(e){oi(t,e);function t(n){var a=e.call(this,"container","container",0,null)||this;return a.base=n,a}var r=t.prototype;return r._render=function(){return!0},r._unmount=function(){},t}(mo),Rst=function(e){oi(t,e);function t(n,a,i,s,u,f){return f===void 0&&(f={}),e.call(this,n,a,i,s,u,mc(f,n.defaultProps))||this}var r=t.prototype;return r._should=function(n,a){return this.base.shouldComponentUpdate(mc(n,this.type.defaultProps),a||this.base.state)},r._render=function(n,a,i){var s=this;this.props=mc(this.props,this.type.defaultProps);var u=!this.base;u?(this.base=new this.type(this.props),this.base.$_provider=this):this.base.props=this.props;var f=this.base,c=f.state,h=f.render();h&&h.props&&!h.props.children.length&&(h.props.children=this.props.children),$o(this,this._providers,h?[h]:[],n,i,null),n.push(function(){u?(s._mounted(),f.componentDidMount()):(s._updated(),f.componentDidUpdate(a,c))})},r._setState=function(n){var a=this.base;!a||!n||(a.state=n)},r._unmount=function(){this._providers.forEach(function(n){n._unmount()}),clearTimeout(this.base.$_timer),this.base.componentWillUnmount()},t}(mo),op=function(){function e(r){r===void 0&&(r={}),this.props=r,this.state={},this.$_timer=0,this.$_state={}}var t=e.prototype;return t.shouldComponentUpdate=function(r,n){return!0},t.render=function(){return null},t.setState=function(r,n,a){var i=this;this.$_timer||(this.$_state={}),clearTimeout(this.$_timer),this.$_timer=0,this.$_state=ca(ca({},this.$_state),r),a?this.$_setState(n,a):this.$_timer=setTimeout(function(){i.$_timer=0,i.$_setState(n,a)})},t.forceUpdate=function(r){this.setState({},r,!0)},t.componentDidMount=function(){},t.componentDidUpdate=function(r,n){},t.componentWillUnmount=function(){},t.$_setState=function(r,n){var a=[],i=this.$_provider,s=$o(i.container,[i],[i.original],a,ca(ca({},this.state),this.$_state),n);s&&(r&&a.push(r),Ly(a))},e}(),up=function(e){oi(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}var r=t.prototype;return r.shouldComponentUpdate=function(n,a){return ch(this.props,n)||ch(this.state,a)},t}(op),Bst=function(e){oi(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}var r=t.prototype;return r.componentDidMount=function(){var n=this.props,a=n.element,i=n.container;this._portalProvider=new zy(i),Iu(a,i,this._portalProvider)},r.componentDidUpdate=function(){var n=this.props,a=n.element,i=n.container;Iu(a,i,this._portalProvider)},r.componentWillUnmount=function(){var n=this.props.container;Iu(null,n,this._portalProvider),this._portalProvider=null},t}(up);function Lst(e,t,r){var n=[];$o(e,e._providers,t,n,r),Ly(n)}function Fst(e,t){for(var r=e._providers,n=r.length,a=t.index+1;a<n;++a){var i=ro(r[a].base);if(i)return i}return null}function zst(e,t,r){var n=r.map(function(f){return en(f)?null:f.key}),a=hm(t.map(function(f){return f.key})),i=hm(n),s=Of(a,i,function(f){return f});s.removed.forEach(function(f){t.splice(f,1)[0]._unmount()}),s.ordered.forEach(function(f){var c=f[0],h=f[1],v=t.splice(c,1)[0];t.splice(h,0,v);var p=ro(v.base),g=ro(t[h+1]&&t[h+1].base);p&&p.parentNode.insertBefore(p,g)}),s.added.forEach(function(f){t.splice(f,0,vm(r[f],n[f],f,e))});var u=s.maintained.filter(function(f){f[0];var c=f[1],h=r[c],v=t[c],p=en(h)?"text_"+h:h.type;return p!==v.type?(v._unmount(),t.splice(c,1,vm(h,n[c],c,e)),!0):(v.index=c,!1)});return Ast(s.added,u.map(function(f){f[0];var c=f[1];return c}))}function $o(e,t,r,n,a,i){var s=zst(e,t,r),u=t.filter(function(c,h){return c._update(n,r[h],a,i)}),f=sp(e);return f&&s.reverse().forEach(function(c){var h=t[c],v=ro(h.base);if(!!v&&f!==v&&!v.parentNode){var p=Fst(e,h);f.insertBefore(v,p)}}),u.length>0}function Iu(e,t,r){r===void 0&&(r=t.__REACT_COMPAT__);var n=!!r;return r||(r=new zy(t)),Lst(r,e?[e]:[]),n||(t.__REACT_COMPAT__=r),r}function gm(e,t,r){var n=t.__REACT_COMPAT__;e&&!n&&(t.innerHTML=""),Iu(e,t,n),r&&r()}function Gst(e,t){return qr(Bst,{element:e,container:t})}var Nst="simple-1.1.0";function fp(e,t){for(var r=e.length,n=0;n<r;++n)if(t(e[n],n))return!0;return!1}function Gy(e,t){for(var r=e.length,n=0;n<r;++n)if(t(e[n],n))return e[n];return null}function jst(e){var t=e;if(typeof t=="undefined"){if(typeof navigator=="undefined"||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function lp(e,t){try{return new RegExp(e,"g").exec(t)}catch{return null}}function qst(){if(typeof navigator=="undefined"||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!!(t&&t.length)}function Ust(e,t){var r=lp("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t);return r?r[3]:""}function hh(e){return e.replace(/_/g,".")}function Ps(e,t){var r=null,n="-1";return fp(e,function(a){var i=lp("("+a.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!i||a.brand?!1:(r=a,n=i[3]||"-1",a.versionAlias?n=a.versionAlias:a.versionTest&&(n=Ust(a.versionTest.toLowerCase(),t)||n),n=hh(n),!0)}),{preset:r,version:n}}function $u(e,t){var r={brand:"",version:"-1"};return fp(e,function(n){var a=Ny(t,n);return a?(r.brand=n.id,r.version=n.versionAlias||a.version,r.version!=="-1"):!1}),r}function Ny(e,t){return Gy(e,function(r){var n=r.brand;return lp(""+t.test,n.toLowerCase())})}var jy=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],qy=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],vh=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Uy=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],ky=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function kst(e){var t=navigator.userAgentData,r=(t.uaList||t.brands).slice(),n=t.mobile||!1,a=r[0],i=(e&&e.platform||t.platform||navigator.platform).toLowerCase(),s={name:a.brand,version:a.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!$u(Uy,r).brand},u={name:"unknown",version:"-1",majorVersion:-1};s.webkit=!s.chromium&&fp(vh,function(p){return Ny(r,p)});var f=$u(qy,r);if(s.chromium=!!f.brand,s.chromiumVersion=f.version,!s.chromium){var c=$u(vh,r);s.webkit=!!c.brand,s.webkitVersion=c.version}var h=Gy(ky,function(p){return new RegExp(""+p.test,"g").exec(i)});u.name=h?h.id:"",e&&(u.version=e.platformVersion);var v=$u(jy,r);return v.brand&&(s.name=v.brand,s.version=e?e.uaFullVersion:v.version),s.webkit&&(u.name=n?"ios":"mac"),u.name==="ios"&&s.webview&&(s.version="-1"),u.version=hh(u.version),s.version=hh(s.version),u.majorVersion=parseInt(u.version,10),s.majorVersion=parseInt(s.version,10),{browser:s,os:u,isMobile:n,isHints:!0}}function Hst(e){var t=jst(e),r=!!/mobi/g.exec(t),n={name:"unknown",version:"-1",majorVersion:-1,webview:!!Ps(Uy,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},a={name:"unknown",version:"-1",majorVersion:-1},i=Ps(jy,t),s=i.preset,u=i.version,f=Ps(ky,t),c=f.preset,h=f.version,v=Ps(qy,t);if(n.chromium=!!v.preset,n.chromiumVersion=v.version,!n.chromium){var p=Ps(vh,t);n.webkit=!!p.preset,n.webkitVersion=p.version}return c&&(a.name=c.id,a.version=h,a.majorVersion=parseInt(h,10)),s&&(n.name=s.id,n.version=u,n.webview&&a.name==="ios"&&n.name!=="safari"&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:a,isMobile:r,isHints:!1}}function Wst(e){return typeof e=="undefined"&&qst()?kst():Hst(e)}function Kst(e,t,r,n,a,i){for(var s=0;s<a;++s){var u=r+s*a,f=n+s*a;e[u]+=e[f]*i,t[u]+=t[f]*i}}function Yst(e,t,r,n,a){for(var i=0;i<a;++i){var s=r+i*a,u=n+i*a,f=e[s],c=t[s];e[s]=e[u],e[u]=f,t[s]=t[u],t[u]=c}}function Xst(e,t,r,n,a){for(var i=0;i<n;++i){var s=r+i*n;e[s]/=a,t[s]/=a}}function Hy(e,t,r){r===void 0&&(r=Math.sqrt(e.length));for(var n=e.slice(),a=0;a<r;++a)n[a*r+t-1]=0,n[(t-1)*r+a]=0;return n[(t-1)*(r+1)]=1,n}function $n(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var r=e.slice(),n=Pe(t),a=0;a<t;++a){var i=t*a+a;if(!ie(r[i],Cr)){for(var s=a+1;s<t;++s)if(r[t*a+s]){Yst(r,n,a,s,t);break}}if(!ie(r[i],Cr))return[];Xst(r,n,a,t,r[i]);for(var s=0;s<t;++s){var u=s,f=s+a*t,c=r[f];!ie(c,Cr)||a===s||Kst(r,n,u,a,t,-c)}}return n}function Vst(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var r=[],n=0;n<t;++n)for(var a=0;a<t;++a)r[a*t+n]=e[t*n+a];return r}function Zst(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var r=[],n=e[t*t-1],a=0;a<t-1;++a)r[a]=e[t*(t-1)+a]/n;return r[t-1]=0,r}function Jst(e,t){for(var r=Pe(t),n=0;n<t-1;++n)r[t*(t-1)+n]=e[n]||0;return r}function bo(e,t){for(var r=e.slice(),n=e.length;n<t-1;++n)r[n]=0;return r[t-1]=1,r}function Hn(e,t,r){if(t===void 0&&(t=Math.sqrt(e.length)),t===r)return e;for(var n=Pe(r),a=Math.min(t,r),i=0;i<a-1;++i){for(var s=0;s<a-1;++s)n[i*r+s]=e[i*t+s];n[(i+1)*r-1]=e[(i+1)*t-1],n[(r-1)*r+i]=e[(t-1)*t+i]}return n[r*r-1]=e[t*t-1],n}function ph(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Pe(e);return t.forEach(function(a){n=me(n,a,e)}),n}function me(e,t,r){r===void 0&&(r=Math.sqrt(e.length));var n=[],a=e.length/r,i=t.length/a;if(a){if(!i)return e}else return t;for(var s=0;s<r;++s)for(var u=0;u<i;++u){n[u*r+s]=0;for(var f=0;f<a;++f)n[u*r+s]+=e[f*r+s]*t[u*a+f]}return n}function Qt(e,t){for(var r=Math.min(e.length,t.length),n=e.slice(),a=0;a<r;++a)n[a]=n[a]+t[a];return n}function qt(e,t){for(var r=Math.min(e.length,t.length),n=e.slice(),a=0;a<r;++a)n[a]=n[a]-t[a];return n}function Qst(e,t){return t===void 0&&(t=e.length===6),t?[e[0],e[1],0,e[2],e[3],0,e[4],e[5],1]:e}function Wy(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function or(e,t,r){r===void 0&&(r=t.length);var n=me(e,t,r),a=n[r-1];return n.map(function(i){return i/a})}function tot(e,t){return me(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function eot(e,t){return me(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function rot(e,t){return me(e,zi(t,4))}function bu(e,t){var r=t[0],n=r===void 0?1:r,a=t[1],i=a===void 0?1:a,s=t[2],u=s===void 0?1:s;return me(e,[n,0,0,0,0,i,0,0,0,0,u,0,0,0,0,1],4)}function ha(e,t){return or(zi(t,3),bo(e,3))}function $c(e,t){var r=t[0],n=r===void 0?0:r,a=t[1],i=a===void 0?0:a,s=t[2],u=s===void 0?0:s;return me(e,[1,0,0,0,0,1,0,0,0,0,1,0,n,i,u,1],4)}function _m(e,t){return me(e,t,4)}function zi(e,t){var r=Math.cos(e),n=Math.sin(e),a=Pe(t);return a[0]=r,a[1]=n,a[t]=-n,a[t+1]=r,a}function Pe(e){for(var t=e*e,r=[],n=0;n<t;++n)r[n]=n%(e+1)?0:1;return r}function Ky(e,t){for(var r=Pe(t),n=Math.min(e.length,t-1),a=0;a<n;++a)r[(t+1)*a]=e[a];return r}function no(e,t){for(var r=Pe(t),n=Math.min(e.length,t-1),a=0;a<n;++a)r[t*(t-1)+a]=e[a];return r}function cp(e,t,r,n,a,i,s,u){var f=e[0],c=e[1],h=t[0],v=t[1],p=r[0],g=r[1],_=n[0],m=n[1],b=a[0],y=a[1],w=i[0],O=i[1],T=s[0],A=s[1],I=u[0],x=u[1],B=[f,0,h,0,p,0,_,0,c,0,v,0,g,0,m,0,1,0,1,0,1,0,1,0,0,f,0,h,0,p,0,_,0,c,0,v,0,g,0,m,0,1,0,1,0,1,0,1,-b*f,-y*f,-w*h,-O*h,-T*p,-A*p,-I*_,-x*_,-b*c,-y*c,-w*v,-O*v,-T*g,-A*g,-I*m,-x*m],M=$n(B,8);if(!M.length)return[];var L=me(M,[b,y,w,O,T,A,I,x],8);return L[8]=1,Hn(Vst(L),3,4)}function not(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function aot(e){return Pi(ka(e))}function iot(e,t){var r=or(e,[t[0],t[1]||0,t[2]||0,1],4),n=r[3]||1;return[r[0]/n,r[1]/n,r[2]/n]}function Pi(e){var t=not();return e.forEach(function(r){var n=r.matrixFunction,a=r.functionValue;!n||(t=n(t,a))}),t}function ka(e){var t=si(e)?e:$a(e);return t.map(function(r){var n=rp(r),a=n.prefix,i=n.value,s=null,u=a,f="";if(a==="translate"||a==="translateX"||a==="translate3d"){var c=Ka(i).map(function(L){return parseFloat(L)}),h=c[0],v=c[1],p=v===void 0?0:v,g=c[2],_=g===void 0?0:g;s=$c,f=[h,p,_]}else if(a==="translateY"){var p=parseFloat(i);s=$c,f=[0,p,0]}else if(a==="translateZ"){var _=parseFloat(i);s=$c,f=[0,0,_]}else if(a==="scale"||a==="scale3d"){var m=Ka(i).map(function(L){return parseFloat(L)}),b=m[0],y=m[1],w=y===void 0?b:y,O=m[2],T=O===void 0?1:O;s=bu,f=[b,w,T]}else if(a==="scaleX"){var b=parseFloat(i);s=bu,f=[b,1,1]}else if(a==="scaleY"){var w=parseFloat(i);s=bu,f=[1,w,1]}else if(a==="scaleZ"){var T=parseFloat(i);s=bu,f=[1,1,T]}else if(a==="rotate"||a==="rotateZ"||a==="rotateX"||a==="rotateY"){var A=_o(i),I=A.unit,x=A.value,B=I==="rad"?x:x*Math.PI/180;a==="rotate"||a==="rotateZ"?(u="rotateZ",s=rot):a==="rotateX"?s=tot:a==="rotateY"&&(s=eot),f=B}else if(a==="matrix3d")s=_m,f=Ka(i).map(function(L){return parseFloat(L)});else if(a==="matrix"){var M=Ka(i).map(function(L){return parseFloat(L)});s=_m,f=[M[0],M[1],0,0,M[2],M[3],0,0,0,0,1,0,M[4],M[5],0,1]}else u="";return{name:a,functionName:u,value:i,matrixFunction:s,functionValue:f}})}/*! *****************************************************************************
|
|
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 dh=function(e,t){return dh=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])},dh(e,t)};function sot(e,t){dh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Yy=typeof Map=="function"?void 0:function(){var e=0;return function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++e)}}(),oot=function(e){sot(t,e);function t(r){return r===void 0&&(r=[]),e.call(this,r,Yy)||this}return t}(lst);function uot(e,t){return Of(e,t,Yy)}var fot=oot;/*! *****************************************************************************
|
|
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.
|
|
***************************************************************************** */function lot(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,a++)n[a]=i[s];return n}function Xy(e){return e.length<3?0:Math.abs(Sst(e.map(function(t,r){var n=e[r+1]||e[0];return t[0]*n[1]-n[0]*t[1]})))/2}function mm(e,t){var r=t.width,n=t.height,a=t.left,i=t.top,s=Af(e),u=s.minX,f=s.minY,c=s.maxX,h=s.maxY,v=r/(c-u),p=n/(h-f);return e.map(function(g){return[a+(g[0]-u)*v,i+(g[1]-f)*p]})}function Af(e){var t=e.map(function(n){return n[0]}),r=e.map(function(n){return n[1]});return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,r),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,r)}}function gh(e,t,r){var n=e[0],a=e[1],i=Af(t),s=i.minX,u=i.minY,f=i.maxX,c=i.maxY,h=[[s,a],[f,a]],v=[[n,u],[n,c]],p=Ns(h[0],h[1]),g=Ns(v[0],v[1]),_=$h(t),m=[],b=[];return _.forEach(function(y){var w=Ns(y[0],y[1]),O=mh(_h(p,w),[h,y]),T=mh(_h(g,w),[v,y]);(O.length!==1||y[0][1]!==a)&&m.push.apply(m,O),(T.length!==1||y[0][0]!==n)&&b.push.apply(b,T),w[0]||m.push.apply(m,O),w[1]||b.push.apply(b,T)}),!!(!r&&(rn(m,function(y){return y[0]===n})>-1||rn(b,function(y){return y[1]===a})>-1)||m.filter(function(y){return y[0]>n}).length%2&&b.filter(function(y){return y[1]>a}).length%2)}function Ns(e,t){var r=e[0],n=e[1],a=t[0],i=t[1];if(r===a&&n===i)return[0,0,0];if(r===a)return[1,0,-r];if(n===i)return[0,1,-n];var s=(a-r)/(n-i),u=-r-s*n;return[1,s,u]}function _h(e,t){var r=e[0],n=e[1],a=e[2],i=t[0],s=t[1],u=t[2],f=r===0&&i===0,c=n===0&&s===0;if(f&&c)return[];if(f){var h=-a/n,v=-u/s;return h!==v?[]:[[-1/0,h],[1/0,h]]}else if(c){var p=-a/r,g=-u/i;return p!==g?[]:[[p,-1/0],[p,1/0]]}else if(r===0){var _=-a/n,m=-(s*_+u)/i;return[[m,_]]}else if(i===0){var _=-u/s,m=-(n*_+a)/r;return[[m,_]]}else if(n===0){var m=-a/r,_=-(i*m+u)/s;return[[m,_]]}else if(s===0){var m=-u/i,_=-(r*m+a)/n;return[[m,_]]}else{var m=(n*u-s*a)/(s*r-n*i),_=-(r*m+a)/n;return[[m,_]]}}function mh(e,t){var r=t.map(function(h){return[0,1].map(function(v){return[Math.min(h[0][v],h[1][v]),Math.max(h[0][v],h[1][v])]})});if(e.length===2){var n=e[0],a=n[0],i=n[1];if(a===e[1][0]){var s=Math.max.apply(Math,r.map(function(h){return h[1][0]})),u=Math.min.apply(Math,r.map(function(h){return h[1][1]}));return s>u?[]:[[a,s],[a,u]]}else if(i===e[1][1]){var f=Math.max.apply(Math,r.map(function(h){return h[0][0]})),c=Math.min.apply(Math,r.map(function(h){return h[0][1]}));return f>c?[]:[[f,i],[c,i]]}}return e.filter(function(h){return r.every(function(v){return v[0][0]<=h[0]&&h[0]<=v[0][1]&&v[1][0]<=h[1]&&h[1]<=v[1][1]})})}function $h(e){return lot(e.slice(1),[e[0]]).map(function(t,r){return[e[r],t]})}function cot(e,t){var r=e.slice(),n=t.slice();fh(r)===-1&&r.reverse(),fh(n)===-1&&n.reverse();var a=$h(r),i=$h(n),s=a.map(function(v){return Ns(v[0],v[1])}),u=i.map(function(v){return Ns(v[0],v[1])}),f=[];s.forEach(function(v,p){var g=a[p],_=[];u.forEach(function(m,b){var y=_h(v,m),w=mh(y,[g,i[b]]);_.push.apply(_,w.map(function(O){return{index1:p,index2:b,pos:O}}))}),_.sort(function(m,b){return jn(g[0],m.pos)-jn(g[0],b.pos)}),f.push.apply(f,_),gh(g[1],n)&&f.push({index1:p,index2:-1,pos:g[1]})}),i.forEach(function(v,p){if(gh(v[1],r)){var g=!1,_=rn(f,function(m){var b=m.index2;return b===p?(g=!0,!1):!!g});_===-1&&(g=!1,_=rn(f,function(m){var b=m.index1,y=m.index2;return b===-1&&y+1===p?(g=!0,!1):!!g})),_===-1?f.push({index1:-1,index2:p,pos:v[1]}):f.splice(_,0,{index1:-1,index2:p,pos:v[1]})}});var c=f.map(function(v){var p=v.pos;return p}),h={};return c.filter(function(v){var p=v[0]+"x"+v[1];return h[p]?!1:(h[p]=!0,!0)})}function hot(e,t){var r=cot(e,t);return Xy(r)}/*! *****************************************************************************
|
|
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<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},bh.apply(this,arguments)};function vot(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,a++)n[a]=i[s];return n}var pot=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(r,n){if(ma(r))for(var a in r)this.on(a,r[a]);else this._addEvent(r,n,{});return this},t.off=function(r,n){if(!r)this._events={};else if(ma(r))for(var a in r)this.off(a);else if(!n)this._events[r]=[];else{var i=this._events[r];if(i){var s=rn(i,function(u){return u.listener===n});s>-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,vot(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}(),Vy=pot;/*! *****************************************************************************
|
|
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 dot(e,t){yh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var xi=function(){return xi=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},xi.apply(this,arguments)};function got(e){var t=e.container;return t===document.body?[t.scrollLeft||document.documentElement.scrollLeft,t.scrollTop||document.documentElement.scrollTop]:[t.scrollLeft,t.scrollTop]}var _ot=function(e){dot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._startRect=null,n._startPos=[],n._prevTime=0,n._timer=0,n._prevScrollPos=[0,0],n._isWait=!1,n}var r=t.prototype;return r.dragStart=function(n,a){var i=a.container,s=0,u=0,f=0,c=0;if(i===document.body)f=window.innerWidth,c=window.innerHeight;else{var h=i.getBoundingClientRect();s=h.top,u=h.left,f=h.width,c=h.height}this._startPos=[n.clientX,n.clientY],this._startRect={top:s,left:u,width:f,height:c},this._prevScrollPos=this._getScrollPosition([0,0],a)},r.drag=function(n,a){var i=n.clientX,s=n.clientY,u=a.threshold,f=u===void 0?0:u,c=this,h=c._startRect,v=c._startPos,p=[0,0];return h.top>s-f?(v[1]>h.top||s<v[1])&&(p[1]=-1):h.top+h.height<s+f&&(v[1]<h.top+h.height||s>v[1])&&(p[1]=1),h.left>i-f?(v[0]>h.left||i<v[0])&&(p[0]=-1):h.left+h.width<i+f&&(v[0]<h.left+h.width||i>v[0])&&(p[0]=1),clearTimeout(this._timer),!p[0]&&!p[1]?!1:this._continueDrag(xi(xi({},a),{direction:p,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,v=n.isDrag,p=this._getScrollPosition(u||[0,0],n),g=p[0]-s[0],_=p[1]-s[1],m=u||[g?Math.abs(g)/g:0,_?Math.abs(_)/_:0];return this._prevScrollPos=p,!g&&!_?!1:(this.trigger("move",{offsetX:m[0]?g:0,offsetY:m[1]?_:0,inputEvent:h}),c&&v&&(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?got: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 v=to(),p=Math.max(u+this._prevTime-v,0);if(p>0)return this._timer=window.setTimeout(function(){a._continueDrag(n)},p),!1;this._prevTime=v;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(xi(xi({},n),{prevScrollPos:g,direction:s,inputEvent:h}))}},t}(Vy),mot=_ot;/*! *****************************************************************************
|
|
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 wh=function(e,t){return wh=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])},wh(e,t)};function $ot(e,t){wh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var jr=function(){return jr=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},jr.apply(this,arguments)};function bot(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=Math.atan2(n,r);return a>=0?a:a+Math.PI*2}function bc(e){return bot([e[0].clientX,e[0].clientY],[e[1].clientX,e[1].clientY])/Math.PI*180}function yot(e){return e.touches&&e.touches.length>=2}function yc(e){return e.touches?wot(e.touches):[Zy(e)]}function $m(e,t,r){var n=r.length,a=js(e,n),i=a.clientX,s=a.clientY,u=a.originalClientX,f=a.originalClientY,c=js(t,n),h=c.clientX,v=c.clientY,p=js(r,n),g=p.clientX,_=p.clientY,m=i-h,b=s-v,y=i-g,w=s-_;return{clientX:u,clientY:f,deltaX:m,deltaY:b,distX:y,distY:w}}function wc(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function wot(e){for(var t=Math.min(e.length,2),r=[],n=0;n<t;++n)r.push(Zy(e[n]));return r}function Zy(e){return{clientX:e.clientX,clientY:e.clientY}}function js(e,t){t===void 0&&(t=e.length);for(var r={clientX:0,clientY:0,originalClientX:0,originalClientY:0},n=0;n<t;++n){var a=e[n];r.originalClientX+="originalClientX"in a?a.originalClientX:a.clientX,r.originalClientY+="originalClientY"in a?a.originalClientY:a.clientY,r.clientX+=a.clientX,r.clientY+=a.clientY}return t?{clientX:r.clientX/t,clientY:r.clientY/t,originalClientX:r.originalClientX/t,originalClientY:r.originalClientY/t}:r}var bm=function(){function e(r){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=r,this.prevClients=r,this.length=r.length}var t=e.prototype;return t.getAngle=function(r){return r===void 0&&(r=this.prevClients),bc(r)},t.getRotation=function(r){return r===void 0&&(r=this.prevClients),bc(r)-bc(this.startClients)},t.getPosition=function(r,n){r===void 0&&(r=this.prevClients);var a=$m(r||this.prevClients,this.prevClients,this.startClients),i=a.deltaX,s=a.deltaY;return this.movement+=Math.sqrt(i*i+s*s),this.prevClients=r,a},t.getPositions=function(r){r===void 0&&(r=this.prevClients);var n=this.prevClients;return this.startClients.map(function(a,i){return $m([r[i]],[n[i]],[a])})},t.getMovement=function(r){var n=this.movement;if(!r)return n;var a=js(r,this.length),i=js(this.prevClients,this.length),s=a.clientX-i.clientX,u=a.clientY-i.clientY;return Math.sqrt(s*s+u*u)+n},t.getDistance=function(r){return r===void 0&&(r=this.prevClients),wc(r)},t.getScale=function(r){return r===void 0&&(r=this.prevClients),wc(r)/wc(this.startClients)},t.move=function(r,n){this.startClients.forEach(function(a){a.clientX-=r,a.clientY-=n})},e}(),ym=["textarea","input"],Sot=function(e){$ot(t,e);function t(n,a){a===void 0&&(a={});var i=e.call(this)||this;i.options={},i.flag=!1,i.pinchFlag=!1,i.datas={},i.isDrag=!1,i.isPinch=!1,i.isMouse=!1,i.isTouch=!1,i.clientStores=[],i.targets=[],i.prevTime=0,i.doubleFlag=!1,i._dragFlag=!1,i.onDragStart=function(p,g){if(g===void 0&&(g=!0),!(!i.flag&&p.cancelable===!1)){var _=i.options,m=_.container,b=_.pinchOutside,y=_.preventRightClick,w=_.preventDefault,O=_.checkInput,T=i.isTouch,A=!i.flag;if(A){var I=document.activeElement,x=p.target,B=x.tagName.toLowerCase(),M=ym.indexOf(B)>-1,L=x.isContentEditable;if(M||L){if(O||I===x||I&&L&&I.isContentEditable&&I.contains(x))return!1}else if((w||p.type==="touchstart")&&I){var G=I.tagName;(I.isContentEditable||ym.indexOf(G)>-1)&&I.blur()}if(i.clientStores=[new bm(yc(p))],i.flag=!0,i.isDrag=!1,i._dragFlag=!0,i.datas={},y&&(p.which===3||p.button===2))return i.initDrag(),!1;i.doubleFlag=to()-i.prevTime<200;var W=i.emit("dragStart",jr({datas:i.datas,inputEvent:p,isTrusted:g,isDouble:i.doubleFlag},i.getCurrentStore().getPosition(),{preventDefault:function(){p.preventDefault()},preventDrag:function(){i._dragFlag=!1}}));W===!1&&i.initDrag(),i.flag&&w&&p.preventDefault()}if(!i.flag)return!1;var at=0;if(A&&T&&b&&(at=setTimeout(function(){Zr(m,"touchstart",i.onDragStart,{passive:!1})})),!A&&T&&b&&vr(m,"touchstart",i.onDragStart),i.flag&&yot(p)){if(clearTimeout(at),A&&p.touches.length!==p.changedTouches.length)return;i.pinchFlag||i.onPinchStart(p)}}},i.onDrag=function(p,g){if(!!i.flag){var _=yc(p),m=i.moveClients(_,p,!1);if(i._dragFlag){if(i.pinchFlag||m.deltaX||m.deltaY){var b=i.emit("drag",jr({},m,{isScroll:!!g,inputEvent:p}));if(b===!1){i.stop();return}}i.pinchFlag&&i.onPinch(p,_)}i.getCurrentStore().getPosition(_,!0)}},i.onDragEnd=function(p){if(!!i.flag){var g=i.options,_=g.pinchOutside,m=g.container;i.isTouch&&_&&vr(m,"touchstart",i.onDragStart),i.flag=!1;var b=i._getPosition(),y=to(),w=!i.isDrag&&i.doubleFlag;i.prevTime=i.isDrag||w?0:y,i.emit("dragEnd",jr({datas:i.datas,isDouble:w,isDrag:i.isDrag,isClick:!i.isDrag,inputEvent:p},b)),i.pinchFlag&&i.onPinchEnd(p),i.clientStores=[]}},i.onBlur=function(){i.onDragEnd()};var s=[].concat(n);i.options=jr({checkInput:!1,container:s.length>1?window:s[0],preventRightClick:!0,preventDefault:!0,checkWindowBlur:!1,pinchThreshold:0,events:["touch","mouse"]},a);var u=i.options,f=u.container,c=u.events,h=u.checkWindowBlur;if(i.isTouch=c.indexOf("touch")>-1,i.isMouse=c.indexOf("mouse")>-1,i.targets=s,i.isMouse&&(s.forEach(function(p){Zr(p,"mousedown",i.onDragStart)}),Zr(f,"mousemove",i.onDrag),Zr(f,"mouseup",i.onDragEnd),Zr(f,"contextmenu",i.onDragEnd)),h&&Zr(window,"blur",i.onBlur),i.isTouch){var v={passive:!1};s.forEach(function(p){Zr(p,"touchstart",i.onDragStart,v)}),Zr(f,"touchmove",i.onDrag,v),Zr(f,"touchend",i.onDragEnd,v),Zr(f,"touchcancel",i.onDragEnd,v)}return i}var r=t.prototype;return r.stop=function(){this.isDrag=!1,this.flag=!1,this.clientStores=[],this.datas={}},r.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(a,i){return a+i.movement},0)},r.isDragging=function(){return this.isDrag},r.isFlag=function(){return this.flag},r.isPinchFlag=function(){return this.pinchFlag},r.isDoubleFlag=function(){return this.doubleFlag},r.isPinching=function(){return this.isPinch},r.scrollBy=function(n,a,i,s){s===void 0&&(s=!0),this.flag&&(this.clientStores[0].move(n,a),s&&this.onDrag(i,!0))},r.move=function(n,a){var i=n[0],s=n[1],u=this.getCurrentStore(),f=u.prevClients;return this.moveClients(f.map(function(c){var h=c.clientX,v=c.clientY;return{clientX:h+i,clientY:v+s,originalClientX:h,originalClientY:v}}),a,!0)},r.triggerDragStart=function(n){this.onDragStart(n,!1)},r.setEventDatas=function(n){var a=this.datas;for(var i in n)a[i]=n[i];return this},r.getCurrentEvent=function(n){return jr({datas:this.datas},this._getPosition(),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},r.getEventDatas=function(){return this.datas},r.unset=function(){var n=this,a=this.targets,i=this.options.container;this.off(),vr(window,"blur",this.onBlur),this.isMouse&&(a.forEach(function(s){vr(s,"mousedown",n.onDragStart)}),vr(i,"mousemove",this.onDrag),vr(i,"mouseup",this.onDragEnd),vr(i,"contextmenu",this.onDragEnd)),this.isTouch&&(a.forEach(function(s){vr(s,"touchstart",n.onDragStart)}),vr(i,"touchstart",this.onDragStart),vr(i,"touchmove",this.onDrag),vr(i,"touchend",this.onDragEnd),vr(i,"touchcancel",this.onDragEnd))},r.onPinchStart=function(n){var a=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>a)){var i=new bm(yc(n));this.pinchFlag=!0,this.clientStores.splice(0,0,i);var s=this.emit("pinchStart",jr({datas:this.datas,angle:i.getAngle(),touches:this.getCurrentStore().getPositions()},i.getPosition(),{inputEvent:n}));s===!1&&(this.pinchFlag=!1)}},r.onPinch=function(n,a){if(!(!this.flag||!this.pinchFlag||a.length<2)){var i=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",jr({datas:this.datas,movement:this.getMovement(a),angle:i.getAngle(a),rotation:i.getRotation(a),touches:i.getPositions(a),scale:i.getScale(a),distance:i.getDistance(a)},i.getPosition(a),{inputEvent:n}))}},r.onPinchEnd=function(n){if(!!this.pinchFlag){var a=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var i=this.getCurrentStore();this.emit("pinchEnd",jr({datas:this.datas,isPinch:a,touches:i.getPositions()},i.getPosition(),{inputEvent:n})),this.isPinch=!1,this.pinchFlag=!1}},r.initDrag=function(){this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1},r.getCurrentStore=function(){return this.clientStores[0]},r.moveClients=function(n,a,i){var s=this._getPosition(n,i);return(s.deltaX||s.deltaY)&&(this.isDrag=!0),jr({datas:this.datas},s,{movement:this.getMovement(n),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:a})},r._getPosition=function(n,a){var i=this.getCurrentStore(),s=i.getPosition(n,a),u=this.clientStores.slice(1).reduce(function(h,v){var p=v.getPosition();return h.distX+=p.distX,h.distY+=p.distY,h},s),f=u.distX,c=u.distY;return jr({},s,{distX:f,distY:c})},t}(Vy),Eot=Sot;function Cot(e){for(var t=5381,r=e.length;r;)t=t*33^e.charCodeAt(--r);return t>>>0}var Oot=Cot;function Aot(e){return Oot(e).toString(36)}function Tot(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}function Mot(e,t,r){return r.original?t:t.replace(/([^};{\s}][^};{]*|^\s*){/mg,function(n,a){var i=a.trim();return(i?Ka(i):[""]).map(function(s){var u=s.trim();return u.indexOf("@")===0?u:u.indexOf(":global")>-1?u.replace(/\:global/g,""):u.indexOf(":host")>-1?""+u.replace(/\:host/g,"."+e):u?"."+e+" "+u:"."+e}).join(", ")+" {"})}function Pot(e,t,r,n){var a=document.createElement("style");return a.setAttribute("type","text/css"),a.setAttribute("data-styled-id",e),r.nonce&&a.setAttribute("nonce",r.nonce),a.innerHTML=Mot(e,t,r),(n||document.head||document.body).appendChild(a),a}function xot(e){var t="rCS"+Aot(e),r=0,n;return{className:t,inject:function(a,i){i===void 0&&(i={});var s=Tot(a),u=r===0,f;return(s||u)&&(f=Pot(t,e,i,s)),u&&(n=f),s||++r,{destroy:function(){s?(a.removeChild(f),f=null):(r>0&&--r,r===0&&n&&(n.parentNode.removeChild(n),n=null))}}}}}/*! *****************************************************************************
|
|
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 Sh=function(e,t){return Sh=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])},Sh(e,t)};function Jy(e,t){Sh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Eh=function(){return Eh=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Eh.apply(this,arguments)};function Iot(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var Dot=function(e){Jy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.injectResult=null,n.tag="div",n}var r=t.prototype;return r.render=function(){var n=this.props,a=n.className,i=a===void 0?"":a;n.cspNonce;var s=n.portalContainer,u=Iot(n,["className","cspNonce","portalContainer"]),f=this.injector.className,c=this.tag,h={};return Nst.indexOf("simple")>-1&&s&&(h={portalContainer:s}),qr(c,Eh({ref:pn(this,"element"),"data-styled-id":f,className:i+" "+f},h,u))},r.componentDidMount=function(){this.injectResult=this.injector.inject(this.element,{nonce:this.props.cspNonce})},r.componentWillUnmount=function(){this.injectResult.destroy(),this.injectResult=null},r.getElement=function(){return this.element},t}(op);function Qy(e,t){var r=xot(t);return function(n){Jy(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.injector=r,i.tag=e,i}return a}(Dot)}/*! *****************************************************************************
|
|
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 Ch=function(e,t){return Ch=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Ch(e,t)};function yo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ch(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var J=function(){return J=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},J.apply(this,arguments)};function Rot(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Bot(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=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}function Lt(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function wo(e,t){var r;return J({events:{},props:(r={},r[e]=Boolean,r),name:e},t)}function Lot(e,t){return'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'+32*e+'px" height="'+32*e+'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate('+t+'deg);transform-origin: 16px 16px"></path></svg>'}function Fot(e){var t=Lot(1,e),r=Math.round(e/45)*45%180,n="ns-resize";return r===135?n="nwse-resize":r===45?n="nesw-resize":r===90&&(n="ew-resize"),"cursor:"+n+";cursor: url('"+t+"') 16 16, "+n+";"}var zot=Wst(),tw=zot.browser.webkit,ew=tw&&function(){var e=typeof window=="undefined"?{userAgent:""}:window.navigator,t=/applewebkit\/([^\s]+)/g.exec(e.userAgent.toLowerCase());return t?parseFloat(t[1])<605:!1}(),hp="moveable-",Got=`
|
|
{
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
left: 0;
|
|
top: 0;
|
|
z-index: 3000;
|
|
--moveable-color: #4af;
|
|
--zoom: 1;
|
|
--zoompx: 1px;
|
|
will-change: transform;
|
|
}
|
|
.control-box {
|
|
z-index: 0;
|
|
}
|
|
.line, .control {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
will-change: transform;
|
|
}
|
|
.control {
|
|
width: 14px;
|
|
height: 14px;
|
|
border-radius: 50%;
|
|
border: 2px solid #fff;
|
|
box-sizing: border-box;
|
|
background: #4af;
|
|
background: var(--moveable-color);
|
|
margin-top: -7px;
|
|
margin-left: -7px;
|
|
border: 2px solid #fff;
|
|
z-index: 10;
|
|
}
|
|
.padding {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
width: 100px;
|
|
height: 100px;
|
|
transform-origin: 0 0;
|
|
}
|
|
.line {
|
|
width: 1px;
|
|
height: 1px;
|
|
background: #4af;
|
|
background: var(--moveable-color);
|
|
transform-origin: 0px 50%;
|
|
}
|
|
.line.dashed {
|
|
box-sizing: border-box;
|
|
background: transparent;
|
|
}
|
|
.line.dashed.horizontal {
|
|
border-top: 1px dashed #4af;
|
|
border-top-color: #4af;
|
|
border-top-color: var(--moveable-color);
|
|
}
|
|
.line.dashed.vertical {
|
|
border-left: 1px dashed #4af;
|
|
border-left-color: #4af;
|
|
border-left-color: var(--moveable-color);
|
|
}
|
|
.line.vertical {
|
|
transform: translateX(-50%);
|
|
}
|
|
.line.horizontal {
|
|
transform: translateY(-50%);
|
|
}
|
|
.line.vertical.bold {
|
|
width: 2px;
|
|
}
|
|
.line.horizontal.bold {
|
|
height: 2px;
|
|
}
|
|
|
|
.control.origin {
|
|
border-color: #f55;
|
|
background: #fff;
|
|
width: 12px;
|
|
height: 12px;
|
|
margin-top: -6px;
|
|
margin-left: -6px;
|
|
pointer-events: none;
|
|
}
|
|
`+[0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return`
|
|
.direction[data-rotation="`+e+`"] {
|
|
`+Fot(e)+`
|
|
}
|
|
`}).join(`
|
|
`)+`
|
|
.group {
|
|
z-index: -1;
|
|
}
|
|
.area {
|
|
position: absolute;
|
|
}
|
|
.area-pieces {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: none;
|
|
}
|
|
.area.avoid, .area.pass {
|
|
pointer-events: none;
|
|
}
|
|
.area.avoid+.area-pieces {
|
|
display: block;
|
|
}
|
|
.area-piece {
|
|
position: absolute;
|
|
}
|
|
|
|
`+(ew?`:global svg *:before {
|
|
content:"";
|
|
transform-origin: inherit;
|
|
}`:"")+`
|
|
`,Not=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],jot=1e-4,Tr=1e-7,yu=1e-9,Bs=Math.pow(10,10),wm=-Bs,rw=["n","w","s","e","nw","ne","sw","se"],qot={n:[0,1],s:[2,3],w:[2,0],e:[1,3],nw:[0],ne:[1],sw:[2],se:[3]},Uot={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},nw=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate"];function kot(e,t){return[e[0]*t[0],e[1]*t[1]]}function Kt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return est.apply(void 0,Lt([hp],e))}function Hot(e){if(!e||e==="none")return[1,0,0,1,0,0];if(ma(e))return e;var t=rp(e).value;return t.split(/s*,\s*/g).map(function(r){return parseFloat(r)})}function vp(e,t,r){return ph(t,no(r,t),e,no(r.map(function(n){return-n}),t))}function Wot(e,t,r){if(t==="%"){var n=pp(e.ownerSVGElement);return n[r?"width":"height"]/100}return 1}function Kot(e){var t=Oh(pr(e,":before"));return t.map(function(r,n){var a=_o(r),i=a.value,s=a.unit;return i*Wot(e,s,n===0)})}function Oh(e){var t=e.transformOrigin;return t?t.split(" "):["0","0"]}function Uu(e,t,r){for(var n=document.body,a=!e||r?e:e.parentElement,i=e===t||a===t,s="relative";a&&a!==n;){t===a&&(i=!0);var u=pr(a),f=u.transform;if(s=u.position,a.tagName.toLowerCase()==="svg"||s!=="static"||f&&f!=="none")break;a=a.parentElement,s="relative"}return{isStatic:s==="static",isEnd:i||!a||a===n,offsetParent:a||n}}function Yot(e,t,r,n){var a,i=e.tagName.toLowerCase(),s=e.offsetLeft,u=e.offsetTop;if(n){var f=(t||document.documentElement).getBoundingClientRect();s-=f.left,u-=f.top}var c=kn(s),h=!c,v,p;return!h&&i!=="svg"?(v=ew?Kot(e):Oh(r).map(function(g){return parseFloat(g)}),p=v.slice(),h=!0,a=Jot(e,v),s=a[0],u=a[1],v[0]=a[2],v[1]=a[3]):(v=Oh(r).map(function(g){return parseFloat(g)}),p=v.slice()),{tagName:i,isSVG:c,hasOffset:h,offset:[s||0,u||0],origin:v,targetOrigin:p}}function aw(e,t,r){r===void 0&&(r=pr(e));var n=pr(document.body),a=n.position;if(!t&&(!a||a==="static"))return[0,0];var i=parseInt(n.marginLeft,10),s=parseInt(n.marginTop,10);return r.position==="absolute"&&((r.top!=="auto"||r.bottom!=="auto")&&(s=0),(r.left!=="auto"||r.right!=="auto")&&(i=0)),[i,s]}function Ah(e){e.forEach(function(t){var r=t.matrix;r&&(t.matrix=Hn(r,3,4))})}function Sm(e,t,r){for(var n=e,a=[],i=!r&&e===t,s=i,u=!1,f=3,c,h,v,p=Uu(t,t,!0).offsetParent;n&&!s;){s=i;var g=pr(n),_=g.position,m=_==="fixed",b=Qst(Hot(g.transform)),y=b.length;!u&&y===16&&(u=!0,f=4,Ah(a),v&&(v=Hn(v,3,4))),u&&y===9&&(b=Hn(b,3,4));var w=Yot(n,t,g,m),O=w.tagName,T=w.hasOffset,A=w.isSVG,I=w.origin,x=w.targetOrigin,B=w.offset,M=B[0],L=B[1];O==="svg"&&v?(a.push({type:"target",target:n,matrix:Zot(n,f)}),a.push({type:"offset",target:n,matrix:Pe(f)})):O==="g"&&e!==n&&(M=0,L=0);var G=Uu(n,t),W=G.offsetParent,at=G.isEnd,et=G.isStatic;tw&&T&&!A&&et&&(_==="relative"||_==="static")&&(M-=W.offsetLeft,L-=W.offsetTop,i=i||at);var rt=0,gt=0;if(T&&p!==W&&(rt=W.clientLeft,gt=W.clientTop),T&&W===document.body){var lt=aw(n,!1,g);M+=lt[0],L+=lt[1]}if(a.push({type:"target",target:n,matrix:vp(b,f,I)}),T?a.push({type:"offset",target:n,matrix:no([M-n.scrollLeft+rt,L-n.scrollTop+gt],f)}):a.push({type:"offset",target:n,origin:I}),v||(v=b),c||(c=I),h||(h=x),s||m)break;n=W,i=at,(!r||n===document.body)&&(s=i)}return v||(v=Pe(f)),c||(c=[0,0]),h||(h=[0,0]),{offsetContainer:p,matrixes:a,targetMatrix:v,transformOrigin:c,targetOrigin:h,is3d:u}}function Xot(e,t,r,n){var a;r===void 0&&(r=t);var i=0,s=0,u=0,f={};if(e){var c=pr(e);i=e.offsetWidth,s=e.offsetHeight,kn(i)&&(a=ow(e,c,!0),i=a[0],s=a[1])}if(e){var h=Vot(e,t,r,n),v=ku(h.allMatrix,h.transformOrigin,i,s);f=J(J({},h),v);var p=ku(h.allMatrix,[50,50],100,100);u=uw([p.pos1,p.pos2],p.direction)}var g=n?4:3;return J({width:i,height:s,rotation:u,rootMatrix:Pe(g),beforeMatrix:Pe(g),offsetMatrix:Pe(g),allMatrix:Pe(g),targetMatrix:Pe(g),targetTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!n,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1},f)}function Vot(e,t,r,n){var a;r===void 0&&(r=t);var i=Sm(e,t),s=i.matrixes,u=i.is3d,f=i.targetMatrix,c=i.transformOrigin,h=i.targetOrigin,v=i.offsetContainer,p=Sm(v,r,!0),g=p.matrixes,_=p.is3d,m=n||_||u,b=m?4:3,y=e.tagName.toLowerCase()!=="svg"&&"ownerSVGElement"in e,w=f,O=Pe(b),T=Pe(b),A=Pe(b),I=Pe(b),x=s.length;g.reverse(),s.reverse(),!u&&m&&(w=Hn(w,3,4),Ah(s)),!_&&m&&Ah(g),g.forEach(function(at){T=me(T,at.matrix,b)});var B=r||document.body,M=((a=g[0])===null||a===void 0?void 0:a.target)||Uu(B,B,!0).offsetParent,L=g.slice(1).reduce(function(at,et){return me(at,et.matrix,b)},Pe(b));s.forEach(function(at,et){if(x-2===et&&(A=O.slice()),x-1===et&&(I=O.slice()),!at.matrix){var rt=s[et+1],gt=Qot(at,rt,M,b,me(L,O,b));at.matrix=no(gt,b)}O=me(O,at.matrix,b)});var G=!y&&u;w||(w=Pe(G?4:3));var W=Tf(y&&w.length===16?Hn(w,4,3):w,G);return T=Hy(T,b,b),{rootMatrix:T,beforeMatrix:A,offsetMatrix:I,allMatrix:O,targetMatrix:w,targetTransform:W,transformOrigin:c,targetOrigin:h,is3d:m}}function Tf(e,t){return t===void 0&&(t=e.length>9),(t?"matrix3d":"matrix")+"("+Wy(e,!t).join(",")+")"}function pp(e){var t=e.clientWidth,r=e.clientHeight;if(!e)return{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:r};var n=e.viewBox,a=n&&n.baseVal||{x:0,y:0,width:0,height:0};return{x:a.x,y:a.y,width:a.width||t,height:a.height||r,clientWidth:t,clientHeight:r}}function Zot(e,t){var r=pp(e),n=r.width,a=r.height,i=r.clientWidth,s=r.clientHeight,u=i/n,f=s/a,c=e.preserveAspectRatio.baseVal,h=c.align,v=c.meetOrSlice,p=[0,0],g=[u,f],_=[0,0];if(h!==1){var m=(h-2)%3,b=Math.floor((h-2)/3);p[0]=n*m/2,p[1]=a*b/2;var y=v===2?Math.max(f,u):Math.min(u,f);g[0]=y,g[1]=y,_[0]=(i-n)/2*m,_[1]=(s-a)/2*b}var w=Ky(g,t);return w[t*(t-1)]=_[0],w[t*(t-1)+1]=_[1],vp(w,t,p)}function Jot(e,t){if(!e.getBBox)return[0,0];var r=e.getBBox(),n=pp(e.ownerSVGElement),a=r.x-n.x,i=r.y-n.y;return[a,i,t[0]-a,t[1]-i]}function Je(e,t,r){return or(e,bo(t,r),r)}function So(e,t,r,n){return[[0,0],[t,0],[0,r],[t,r]].map(function(a){return Je(e,a,n)})}function Ur(e){var t=e.map(function(c){return c[0]}),r=e.map(function(c){return c[1]}),n=Math.min.apply(Math,t),a=Math.min.apply(Math,r),i=Math.max.apply(Math,t),s=Math.max.apply(Math,r),u=i-n,f=s-a;return{left:n,top:a,right:i,bottom:s,width:u,height:f}}function Em(e,t,r,n){var a=So(e,t,r,n);return Ur(a)}function Qot(e,t,r,n,a){var i,s=e.target,u=e.origin,f=t.matrix,c=ow(s,void 0,!0),h=c[0],v=c[1],p=r.getBoundingClientRect(),g=[0,0];r===document.body&&(g=aw(s,!0));for(var _=s.getBoundingClientRect(),m=_.left-p.left+r.scrollLeft-(r.clientLeft||0)+g[0],b=_.top-p.top+r.scrollTop-(r.clientTop||0)+g[1],y=_.width,w=_.height,O=ph(n,a,f),T=Em(O,h,v,n),A=T.left,I=T.top,x=T.width,B=T.height,M=Je(O,u,n),L=qt(M,[A,I]),G=[m+L[0]*y/x,b+L[1]*w/B],W=[0,0],at=0;++at<10;){var et=$n(a,n);i=qt(Je(et,G,n),Je(et,M,n)),W[0]=i[0],W[1]=i[1];var rt=ph(n,a,no(W,n),f),gt=Em(rt,h,v,n),lt=gt.left,pt=gt.top,dt=lt-m,K=pt-b;if(Math.abs(dt)<2&&Math.abs(K)<2)break;G[0]-=dt,G[1]-=K}return W.map(function(it){return Math.round(it)})}function ku(e,t,r,n){var a=e.length===16,i=a?4:3,s=So(e,r,n,i),u=s[0],f=u[0],c=u[1],h=s[1],v=h[0],p=h[1],g=s[2],_=g[0],m=g[1],b=s[3],y=b[0],w=b[1],O=Je(e,t,i),T=O[0],A=O[1],I=Math.min(f,v,_,y),x=Math.min(c,p,m,w),B=Math.max(f,v,_,y),M=Math.max(c,p,m,w);f=f-I||0,v=v-I||0,_=_-I||0,y=y-I||0,c=c-x||0,p=p-x||0,m=m-x||0,w=w-x||0,T=T-I||0,A=A-x||0;var L=fh(s);return{left:I,top:x,right:B,bottom:M,origin:[T,A],pos1:[f,c],pos2:[v,p],pos3:[_,m],pos4:[y,w],direction:L}}function tn(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function iw(e,t){return tn([t[0]-e[0],t[1]-e[1]])}function Ls(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=Te(e,t));var a=iw(e,t);return{transform:"translateY(-50%) translate("+e[0]+"px, "+e[1]+"px) rotate("+n+"rad) scaleY("+r+")",width:a+"px"}}function sw(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r.length,i=r.reduce(function(u,f){return u+f[0]},0)/a,s=r.reduce(function(u,f){return u+f[1]},0)/a;return{transform:"translateZ(0px) translate("+i+"px, "+s+"px) rotate("+e+"rad) scale("+t+")"}}function tut(e){var t=pr(e);return[parseFloat(t.width),parseFloat(t.height)]}function ow(e,t,r,n){t===void 0&&(t=pr(e)),n===void 0&&(n=r||t.boxSizing==="border-box");var a=e.offsetWidth,i=e.offsetHeight,s=!kn(a);if((r||n)&&s)return[a,i];if(!s&&e.tagName.toLowerCase()!=="svg"){var u=e.getBBox();return[u.width,u.height]}if(a=e.clientWidth,i=e.clientHeight,r||n){var f=parseFloat(t.borderLeftWidth)||0,c=parseFloat(t.borderRightWidth)||0,h=parseFloat(t.borderTopWidth)||0,v=parseFloat(t.borderBottomWidth)||0;return[a+f+c,i+h+v]}else{var p=parseFloat(t.paddingLeft)||0,g=parseFloat(t.paddingRight)||0,_=parseFloat(t.paddingTop)||0,m=parseFloat(t.paddingBottom)||0;return[a-p-g,i-_-m]}}function uw(e,t){return Te(t>0?e[0]:e[1],t>0?e[1]:e[0])}function Th(e,t,r,n,a){var i=1,s=[0,0],u=Sc(),f=Sc(),c=Sc(),h=Xot(t,r,a,!1);if(t){var v=h.is3d?4:3,p=ku(h.offsetMatrix,Qt(h.transformOrigin,Zst(h.targetMatrix,v)),h.width,h.height);i=p.direction,s=Qt(p.origin,[p.left-h.left,p.top-h.top]),u=Du(t),f=Du(Uu(n,n,!0).offsetParent||document.body,!0),e&&(c=Du(e))}return J({targetClientRect:u,containerClientRect:f,moveableClientRect:c,beforeDirection:i,beforeOrigin:s,originalBeforeOrigin:s,target:t},h)}function Sc(){return{left:0,right:0,top:0,bottom:0,width:0,height:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0}}function Du(e,t){var r=0,n=0,a=0,i=0;if(e===document.body||e===document.documentElement)a=window.innerWidth,i=window.innerHeight,r=-(document.documentElement.scrollLeft||document.body.scrollLeft),n=-(document.documentElement.scrollTop||document.body.scrollTop);else{var s=e.getBoundingClientRect();r=s.left,n=s.top,a=s.width,i=s.height}var u={left:r,right:r+a,top:n,bottom:n+i,width:a,height:i};return t&&(u.clientLeft=e.clientLeft,u.clientTop=e.clientTop,u.clientWidth=e.clientWidth,u.clientHeight=e.clientHeight,u.scrollWidth=e.scrollWidth,u.scrollHeight=e.scrollHeight,u.overflow=pr(e).overflow!=="visible"),u}function dp(e){if(!!e){var t=e.getAttribute("data-direction");if(!!t){var r=[0,0];return t.indexOf("w")>-1&&(r[0]=-1),t.indexOf("e")>-1&&(r[0]=1),t.indexOf("n")>-1&&(r[1]=-1),t.indexOf("s")>-1&&(r[1]=1),r}}}function gp(e,t){return[Qt(t,e[0]),Qt(t,e[1]),Qt(t,e[2]),Qt(t,e[3])]}function Tn(e){var t=e.left,r=e.top,n=e.pos1,a=e.pos2,i=e.pos3,s=e.pos4;return gp([n,a,i,s],[t,r])}function eut(e){return Math.round(e%1===-.5?e-1:e)}function Ii(e,t){var r;(r=e[t])===null||r===void 0||r.unset(),e[t]=null}function te(e,t,r){var n=t.datas;n.datas||(n.datas={});var a=J(J({},r),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:n.datas});return n.isStartEvent?n.lastEvent=a:n.isStartEvent=!0,a}function Mr(e,t,r){var n=t.datas,a="isDrag"in r?r.isDrag:t.isDrag;return n.datas||(n.datas={}),J(J({isDrag:a},r),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:n.lastEvent,isDouble:t.isDouble,datas:n.datas})}function Et(e,t,r,n){return e.triggerEvent(t,r,n)}function pr(e,t){return window.getComputedStyle(e,t)}function wu(e,t,r){var n={},a={};return e.filter(function(i){var s=i.name;if(n[s]||!t.some(function(u){return i[u]}))return!1;if(!r&&i.ableGroup){if(a[i.ableGroup])return!1;a[i.ableGroup]=!0}return n[s]=!0,!0})}function Mh(e,t){return e===t||e==null&&t==null}function rut(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.length-1,n=0;n<r;++n){var a=e[n];if(!kn(a))return a}return e[r]}function nut(e,t){var r=[],n=[];return e.forEach(function(a,i){var s=t(a,i,e),u=n.indexOf(s),f=r[u]||[];u===-1&&(n.push(s),r.push(f)),f.push(a)}),r}function aut(e,t){var r=[],n={};return e.forEach(function(a,i){var s=t(a,i,e),u=n[s];u||(u=[],n[s]=u,r.push(u)),u.push(a)}),r}function iut(e){return e.reduce(function(t,r){return t.concat(r)},[])}function Gi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.sort(function(r,n){return Math.abs(n)-Math.abs(r)}),e[0]}function Li(e,t,r){return or($n(e,r),bo(t,r),r)}function fw(e,t){var r,n=e.is3d,a=e.rootMatrix,i=n?4:3;return r=Li(a,[t.distX,t.distY],i),t.distX=r[0],t.distY=r[1],t}function Su(e,t,r,n,a){return qt(Je(e,Qt(r,t),a),n)}function Jr(e,t,r){return r?e/t*100+"%":e+"px"}function sut(e,t,r,n){var a=e[t],i=a.direction,s=a.sub,u=e.map(function(){return[0,0]}),f=i?i.split(""):[];if(n&&t<8){var c=f.filter(function(v){return v==="w"||v==="e"})[0],h=f.filter(function(v){return v==="n"||v==="s"})[0];u[t]=r,e.forEach(function(v,p){var g=v.direction;!g||(g.indexOf(c)>-1&&(u[p][0]=r[0]),g.indexOf(h)>-1&&(u[p][1]=r[1]))}),c&&(u[1][0]=r[0]/2,u[5][0]=r[0]/2),h&&(u[3][1]=r[1]/2,u[7][1]=r[1]/2)}else i&&!s?f.forEach(function(v){var p=v==="n"||v==="s";e.forEach(function(g,_){var m=g.direction,b=g.horizontal,y=g.vertical;!m||m.indexOf(v)===-1||(u[_]=[p||!b?0:r[0],!p||!y?0:r[1]])})}):u[t]=r;return u}function Di(e){return Math.abs(e)<=Tr?0:e}function ao(e,t){return t.isRequest?t.requestAble==="resizable"||t.requestAble==="scalable"?t.parentDirection:!1:Qr(t.inputEvent.target,Kt("direction"))}function out(e){var t={};for(var r in e)t[e[r]]=r;return t}function uut(e,t){var r=e.slice(0,t<0?void 0:t),n=e.slice(0,t<0?void 0:t+1),a=e[t]||"",i=t<0?[]:e.slice(t),s=t<0?[]:e.slice(t+1),u=ka(r),f=ka(n),c=ka([a]),h=ka(i),v=ka(s),p=Pi(u),g=Pi(f),_=Pi(h),m=Pi(v),b=me(p,_,4);return{transforms:e,beforeFunctionMatrix:p,beforeFunctionMatrix2:g,targetFunctionMatrix:Pi(c),afterFunctionMatrix:_,afterFunctionMatrix2:m,allFunctionMatrix:b,beforeFunctions:u,beforeFunctions2:f,targetFunction:c[0],afterFunctions:h,afterFunctions2:v,beforeFunctionTexts:r,beforeFunctionTexts2:n,targetFunctionText:a,afterFunctionTexts:i,afterFunctionTexts2:s}}function fut(e){return!e||!ma(e)?!1:si(e)||"length"in e}function Mf(e,t){return e?en(e)?t?document.querySelector(e):e:xy(e)?e():"current"in e?e.current:e:null}function lw(e,t){if(!e)return[];var r=fut(e)?[].slice.call(e):[e];return r.reduce(function(n,a){return en(a)&&t?Lt(Lt([],n),[].slice.call(document.querySelectorAll(a))):(n.push(Mf(a,t)),n)},[])}function lut(e,t){var r=[];return e.forEach(function(n){if(!!n){if(en(n)){t[n]&&r.push.apply(r,t[n]);return}r.push(n)}}),r}function cut(e,t,r){var n=Te(e,t)/Math.PI*180;return n=r>=0?n:180-n,n=n>=0?n:360+n,n}function Cm(e,t){var r=e.rootMatrix,n=e.is3d,a=n?4:3,i=$n(r,a);return n||(i=Hn(i,3,4)),i[12]=0,i[13]=0,i[14]=0,iot(i,t)}var hut=wo("pinchable",{events:{onPinchStart:"pinchStart",onPinch:"pinch",onPinchEnd:"pinchEnd",onPinchGroupStart:"pinchGroupStart",onPinchGroup:"pinchGroup",onPinchGroupEnd:"pinchGroupEnd"},dragStart:function(){return!0},pinchStart:function(e,t){var r=t.datas,n=t.targets,a=t.angle,i=t.originalDatas,s=e.props,u=s.pinchable,f=s.ables;if(!u)return!1;var c="onPinch"+(n?"Group":"")+"Start",h="drag"+(n?"Group":"")+"ControlStart",v=(u===!0?e.controlAbles:f.filter(function(m){return u.indexOf(m.name)>-1})).filter(function(m){return m.canPinch&&m[h]}),p=te(e,t,{});n&&(p.targets=n);var g=Et(e,c,p);r.isPinch=g!==!1,r.ables=v;var _=r.isPinch;return _?(v.forEach(function(m){if(i[m.name]=i[m.name]||{},!!m[h]){var b=J(J({},t),{datas:i[m.name],parentRotate:a,isPinch:!0});m[h](e,b)}}),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},_):!1},pinch:function(e,t){var r=t.datas,n=t.scale,a=t.distance,i=t.originalDatas,s=t.inputEvent,u=t.targets,f=t.angle;if(!!r.isPinch){var c=a*(1-1/n),h=te(e,t,{});u&&(h.targets=u);var v="onPinch"+(u?"Group":"");Et(e,v,h);var p=r.ables,g="drag"+(u?"Group":"")+"Control";return p.forEach(function(_){!_[g]||_[g](e,J(J({},t),{datas:i[_.name],inputEvent:s,parentDistance:c,parentRotate:f,isPinch:!0}))}),h}},pinchEnd:function(e,t){var r=t.datas,n=t.isPinch,a=t.inputEvent,i=t.targets,s=t.originalDatas;if(!!r.isPinch){var u="onPinch"+(i?"Group":"")+"End",f=Mr(e,t,{isDrag:n});i&&(f.targets=i),Et(e,u,f);var c=r.ables,h="drag"+(i?"Group":"")+"ControlEnd";return c.forEach(function(v){!v[h]||v[h](e,J(J({},t),{isDrag:n,datas:s[v.name],inputEvent:a,isPinch:!0}))}),n}},pinchGroupStart:function(e,t){return this.pinchStart(e,J(J({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,J(J({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,J(J({},t),{targets:e.props.targets}))}});function Pf(e,t,r,n,a){var i=t.gesto.move(r,e.inputEvent),s=i.originalDatas||i.datas,u=s.draggable||(s.draggable={});return J(J({},a?fw(t,i):i),{isDrag:!0,isPinch:!!n,parentEvent:!0,datas:u,originalDatas:e.originalDatas})}var Eo=function(){function e(){this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}}}var t=e.prototype;return t.dragStart=function(r,n){this.isDrag=!1,this.isFlag=!1;var a=n.originalDatas;return this.datas=a,a.draggable||(a.draggable={}),J(J({},this.move(r,n.inputEvent)),{type:"dragstart"})},t.drag=function(r,n){return this.move([r[0]-this.prevX,r[1]-this.prevY],n)},t.move=function(r,n){var a,i;return this.isFlag?(a=this.prevX+r[0],i=this.prevY+r[1],this.isDrag=!0):(this.prevX=r[0],this.prevY=r[1],this.startX=r[0],this.startY=r[1],a=r[0],i=r[1],this.isFlag=!0),this.prevX=a,this.prevY=i,{type:"drag",clientX:a,clientY:i,inputEvent:n,isDrag:this.isDrag,distX:a-this.startX,distY:i-this.startY,deltaX:r[0],deltaY:r[1],datas:this.datas.draggable,originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function ba(e,t,r){var n=r.originalDatas;n.groupable=n.groupable||{};var a=n.groupable;a.childDatas=a.childDatas||[];var i=a.childDatas;return e.moveables.map(function(s,u){return i[u]=i[u]||{},i[u][t]=i[u][t]||{},J(J({},r),{datas:i[u][t],originalDatas:i[u]})})}function Ec(e,t,r,n,a,i){var s=!!r.match(/Start$/g),u=!!r.match(/End$/g),f=a.isPinch,c=a.datas,h=ba(e,t.name,a),v=e.moveables,p=h.map(function(g,_){var m=v[_],b=g;s?b=new Eo().dragStart(n,g):(m.state.gesto||(m.state.gesto=c.childGestos[_]),b=Pf(g,m.state,n,f,i));var y=t[r](m,J(J({},b),{parentFlag:!0}));return u&&(m.state.gesto=null),y});return s&&(c.childGestos=v.map(function(g){return g.state.gesto})),p}function qn(e,t,r,n,a,i){a===void 0&&(a=function(h,v){return v});var s=!!r.match(/End$/g),u=ba(e,t.name,n),f=e.moveables,c=u.map(function(h,v){var p=f[v],g=h;g=a(p,h);var _=t[r](p,J(J({},g),{parentFlag:!0}));return _&&i&&i(p,h,_,v),s&&(p.state.gesto=null),_});return c}function cw(e,t){var r=t.clientX,n=t.clientY,a=t.datas,i=e.state,s=i.moveableClientRect,u=i.rootMatrix,f=i.is3d,c=i.pos1,h=s.left,v=s.top,p=f?4:3,g=qt(Li(u,[r-h,n-v],p),c),_=g[0],m=g[1],b=Mn({datas:a,distX:_,distY:m}),y=b[0],w=b[1];return[y,w]}function ui(e,t){var r=t.datas,n=e.state,a=n.allMatrix,i=n.beforeMatrix,s=n.is3d,u=n.left,f=n.top,c=n.origin,h=n.offsetMatrix,v=n.targetMatrix,p=n.transformOrigin,g=s?4:3;r.is3d=s,r.matrix=a,r.targetMatrix=v,r.beforeMatrix=i,r.offsetMatrix=h,r.transformOrigin=p,r.inverseMatrix=$n(a,g),r.inverseBeforeMatrix=$n(i,g),r.absoluteOrigin=bo(Qt([u,f],c),g),r.startDragBeforeDist=or(r.inverseBeforeMatrix,r.absoluteOrigin,g),r.startDragDist=or(r.inverseMatrix,r.absoluteOrigin,g)}function vut(e){return ku(e.datas.beforeTransform,[50,50],100,100).direction}function xf(e,t){var r=e.datas,n=e.originalDatas.beforeRenderable,a=r.transformIndex,i=n.nextTransforms,s=n.nextTransformAppendedIndexes,u=0;a===-1?(u=i.length,r.transformIndex=u):u=a+s.filter(function(v){return v<a}).length;var f=uut(i,u),c=f.targetFunction,h=t==="rotate"?"rotateZ":t;r.beforeFunctionTexts=f.beforeFunctionTexts,r.afterFunctionTexts=f.afterFunctionTexts,r.beforeTransform=f.beforeFunctionMatrix,r.beforeTransform2=f.beforeFunctionMatrix2,r.targetTansform=f.targetFunctionMatrix,r.afterTransform=f.afterFunctionMatrix,r.afterTransform2=f.afterFunctionMatrix2,r.targetAllTransform=f.allFunctionMatrix,c.functionName===h?(r.afterFunctionTexts.splice(0,1),r.isAppendTransform=!1):(r.isAppendTransform=!0,n.nextTransformAppendedIndexes=Lt(Lt([],s),[u]))}function If(e,t,r){return e.beforeFunctionTexts.join(" ")+" "+(e.isAppendTransform?r:t)+" "+e.afterFunctionTexts.join(" ")}function put(e){var t=e.datas,r=e.distX,n=e.distY,a=vw({datas:t,distX:r,distY:n}),i=a[0],s=a[1],u=hw(t,Jst([i,s],4));return or(u,bo([0,0,0],4),4)}function hw(e,t,r){var n=e.beforeTransform,a=e.afterTransform,i=e.beforeTransform2,s=e.afterTransform2,u=e.targetAllTransform,f=r?me(u,t,4):me(t,u,4),c=me($n(r?i:n,4),f,4),h=me(c,$n(r?s:a,4),4);return h}function vw(e){var t=e.datas,r=e.distX,n=e.distY,a=t.inverseBeforeMatrix,i=t.is3d,s=t.startDragBeforeDist,u=t.absoluteOrigin,f=i?4:3;return qt(or(a,Qt(u,[r,n]),f),s)}function Mn(e,t){var r=e.datas,n=e.distX,a=e.distY,i=r.inverseBeforeMatrix,s=r.inverseMatrix,u=r.is3d,f=r.startDragBeforeDist,c=r.startDragDist,h=r.absoluteOrigin,v=u?4:3;return qt(or(t?i:s,Qt(h,[n,a]),v),t?f:c)}function dut(e,t){var r=e.datas,n=e.distX,a=e.distY,i=r.beforeMatrix,s=r.matrix,u=r.is3d,f=r.startDragBeforeDist,c=r.startDragDist,h=r.absoluteOrigin,v=u?4:3;return qt(or(t?i:s,Qt(t?f:c,[n,a]),v),h)}function gut(e,t,r,n,a,i){return n===void 0&&(n=t),a===void 0&&(a=r),i===void 0&&(i=[0,0]),e?e.map(function(s,u){var f=_o(s),c=f.value,h=f.unit,v=u?a:n,p=u?r:t;if(s==="%"||isNaN(c)){var g=v?i[u]/v:0;return p*g}else if(h!=="%")return c;return p*c/100}):i}function pw(e){var t=[];return e[1]>=0&&(e[0]>=0&&t.push(3),e[0]<=0&&t.push(2)),e[1]<=0&&(e[0]>=0&&t.push(1),e[0]<=0&&t.push(0)),t}function dw(e,t){return pw(t).map(function(r){return e[r]})}function ur(e,t){var r=dw(e,t);return[eo(r.map(function(n){return n[0]})),eo(r.map(function(n){return n[1]}))]}function _ut(e,t){return ur(e,t.map(function(r){return-r}))}function mut(e,t,r,n,a,i){var s=So(t,r,n,a),u=ur(s,i),f=e[0]-u[0],c=e[1]-u[1];return[f,c]}function Df(e,t,r,n){return me(e,vp(t,n,r),n)}function $ut(e,t,r){var n=e.transformOrigin,a=e.offsetMatrix,i=e.is3d,s=t.beforeTransform,u=t.afterTransform,f=i?4:3,c=aot([r]);return Df(a,Hn(me(me(s,c,4),u,4),4,f),n,f)}function but(e,t){var r=e.transformOrigin,n=e.offsetMatrix,a=e.is3d,i=e.targetMatrix,s=a?4:3;return Df(n,me(i,Ky(t,s),s),r,s)}function Rf(e){var t=e.originalDatas.beforeRenderable;return{setTransform:function(r,n){n===void 0&&(n=-1),t.startTransforms=si(r)?r:$a(r),Ph(e,n)},setTransformIndex:function(r){Ph(e,r)}}}function Bf(e,t){var r=e.originalDatas.beforeRenderable,n=r.startTransforms;Ph(e,rn(n,function(a){return a.indexOf(t+"(")===0}))}function Ph(e,t){var r=e.originalDatas.beforeRenderable,n=e.datas;if(n.transformIndex=t,t!==-1){var a=r.startTransforms[t];if(!!a){var i=ka([a]);n.startValue=i[0].functionValue}}}function _p(e,t){var r=e.originalDatas.beforeRenderable;r.nextTransforms=$a(t)}function Om(e){var t=e.originalDatas.beforeRenderable;return t.nextTransforms.join(" ")}function gw(e,t,r,n,a){return _p(a,t),{transform:t,drag:sr.drag(e,Pf(a,e.state,r,n,!1))}}function _w(e,t,r,n,a){var i=e.state,s=i.left,u=i.top,f=e.props.groupable,c=$ut(e.state,a,t),h=f?s:0,v=f?u:0,p=$w(e,r,c),g=qt(n,p);return qt(g,[h,v])}function yut(e,t,r,n,a){return _w(e,"scale("+t.join(", ")+")",r,n,a)}function mw(e){var t=e.state,r=t.width,n=t.height,a=t.transformOrigin;return[-1+a[0]/(r/2),-1+a[1]/(n/2)]}function $w(e,t,r){r===void 0&&(r=e.state.allMatrix);var n=e.state,a=n.width,i=n.height,s=n.is3d,u=s?4:3,f=[a/2*(1+t[0]),i/2*(1+t[1])];return Je(r,f,u)}function wut(e,t,r,n){var a=mw(e);return _w(e,"rotate("+t+"deg)",a,r,n)}function Sut(e,t,r,n,a,i){var s=e.props.groupable,u=e.state,f=u.transformOrigin,c=u.targetMatrix,h=u.offsetMatrix,v=u.is3d,p=u.width,g=u.height,_=u.left,m=u.top,b=v?4:3,y=gut(i,t,r,p,g,f),w=s?_:0,O=s?m:0,T=Df(h,c,y,b),A=mut(a,T,t,r,b,n);return qt(A,[w,O])}function Fi(e,t){return ur(Tn(e.state),t)}var Eut=["left","right","center"],Cut=["top","bottom","middle"],ya={start:"left",end:"right",center:"center"},wa={start:"top",end:"bottom",center:"middle"};function ls(e,t){var r=e.props,n=r.snappable,a=r.bounds,i=r.innerBounds,s=r.verticalGuidelines,u=r.horizontalGuidelines,f=r.snapGridWidth,c=r.snapGridHeight,h=e.state,v=h.guidelines,p=h.enableSnap;return!n||!p||t&&n!==!0&&n.indexOf(t)<0?!1:!!(f||c||a||i||v&&v.length||s&&s.length||u&&u.length)}function mp(e){return e===!1?{}:e===!0||!e?{left:!0,right:!0,top:!0,bottom:!0}:e}function Out(e,t){var r=mp(e),n={};for(var a in r)a in t&&r[a]&&(n[a]=t[a]);return n}function $p(e,t){var r=Out(e,t),n=Cut.filter(function(i){return i in r}),a=Eut.filter(function(i){return i in r});return{horizontal:n.map(function(i){return r[i]}),vertical:a.map(function(i){return r[i]})}}function Aut(e,t,r){var n=e.state.elementRects,a=[];return[["vertical",ya,wa],["horizontal",wa,ya]].forEach(function(i){var s=i[0],u=i[1],f=i[2],c=t[u.start],h=t[u.end],v=t[u.center],p=t[f.start],g=t[f.end];function _(y){var w=y.rect;return w[u.end]<c+r?c-w[u.end]:h-r<w[u.start]?w[u.start]-h:-1}var m=n.filter(function(y){var w=y.rect;return w[f.start]>g||w[f.end]<p?!1:_(y)>0}).sort(function(y,w){return _(y)-_(w)}),b=[];m.forEach(function(y){m.forEach(function(w){if(y!==w){var O=y.rect,T=w.rect,A=O[f.start],I=O[f.end],x=T[f.start],B=T[f.end];A>B||x>I||b.push([y,w])}})}),b.forEach(function(y){var w=y[0],O=y[1],T=w.rect,A=O.rect,I=T[u.start],x=T[u.end],B=A[u.start],M=A[u.end],L=0,G=0,W=!1,at=!1,et=!1;if(x<=c&&h<=B){if(at=!0,L=(B-x-(h-c))/2,G=x+L+(h-c)/2,Math.abs(G-v)>r)return}else if(x<B&&M<c+r){if(W=!0,L=B-x,G=M+L,Math.abs(G-c)>r)return}else if(x<B&&h-r<I){if(et=!0,L=B-x,G=I-L,Math.abs(G-h)>r)return}else return;!L||a.push({type:s,pos:s==="vertical"?[G,0]:[0,G],element:O.element,size:0,className:O.className,isStart:W,isCenter:at,isEnd:et,gap:L,hide:!0,gapRects:[w,O]})})}),a}function bw(e,t,r,n,a,i,s){a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s={left:0,top:0,right:0,bottom:0});var u=[],f=s.left,c=s.top,h=s.bottom,v=s.right,p=r+v-f,g=n+h-c;return e&&e.forEach(function(_){u.push({type:"horizontal",pos:[f,ie(_-i+c,.1)],size:p})}),t&&t.forEach(function(_){u.push({type:"vertical",pos:[ie(_-a+f,.1),c],size:g})}),u}function Tut(e,t,r){var n=Je(e,[t.clientLeft,t.clientTop],r);return[t.left+n[0],t.top+n[1]]}function Mut(e,t){if(!t.length)return[];var r=e.state,n=r.containerClientRect,a=r.targetClientRect,i=a.top,s=a.left,u=r.rootMatrix,f=r.is3d,c=f?4:3,h=Tut(u,n,c),v=h[0],p=h[1],g=Tn(r),_=Af(g),m=_.minX,b=_.minY,y=qt([m,b],Li(u,[s-v,i-p],c)).map(function(T){return eut(T)}),w=y[0],O=y[1];return t.map(function(T){var A=T.element.getBoundingClientRect(),I=A.left-v,x=A.top-p,B=x+A.height,M=I+A.width,L=Li(u,[I,x],c),G=L[0],W=L[1],at=Li(u,[M,B],c),et=at[0],rt=at[1];return J(J({},T),{rect:{left:G+w,right:et+w,top:W+O,bottom:rt+O,center:(G+et)/2+w,middle:(W+rt)/2+O}})})}function Put(e){var t=e.state,r=e.props.elementGuidelines,n=r===void 0?[]:r;if(!n.length)return t.elementRects=[],[];var a=(t.elementRects||[]).filter(function(p){return!p.refresh}),i=n.map(function(p){return ma(p)&&"element"in p?p:{element:Mf(p,!0)}}).filter(function(p){return p.element}),s=uot(a.map(function(p){return p.element}),i.map(function(p){return p.element})),u=s.maintained,f=s.added,c=[];u.forEach(function(p){var g=p[0],_=p[1];c[_]=a[g]}),Mut(e,f.map(function(p){return i[p]})).map(function(p,g){c[f[g]]=p}),t.elementRects=c;var h=mp(e.props.elementSnapDirections),v=[];return c.forEach(function(p){var g=p.element,_=p.top,m=_===void 0?h.top:_,b=p.left,y=b===void 0?h.left:b,w=p.right,O=w===void 0?h.right:w,T=p.bottom,A=T===void 0?h.bottom:T,I=p.center,x=I===void 0?h.center:I,B=p.middle,M=B===void 0?h.middle:B,L=p.className,G=p.rect,W=$p({top:m,right:O,left:y,bottom:A,center:x,middle:M},G),at=W.horizontal,et=W.vertical,rt=G.top,gt=G.left,lt=G.right-gt,pt=G.bottom-rt,dt=[lt,pt];et.forEach(function(K){v.push({type:"vertical",element:g,pos:[ie(K,.1),rt],size:pt,sizes:dt,className:L,elementRect:p})}),at.forEach(function(K){v.push({type:"horizontal",element:g,pos:[gt,ie(K,.1)],size:lt,sizes:dt,className:L,elementRect:p})})}),v}function xh(e){var t=e.state,r=t.snapOffset,n=t.containerClientRect,a=n.overflow,i=n.scrollHeight,s=n.scrollWidth,u=n.clientHeight,f=n.clientWidth,c=n.clientLeft,h=n.clientTop,v=e.props,p=v.snapGap,g=p===void 0?!0:p,_=v.verticalGuidelines,m=v.horizontalGuidelines,b=v.snapThreshold,y=b===void 0?5:b,w=v.snapGridWidth,O=w===void 0?0:w,T=v.snapGridHeight,A=T===void 0?0:T,I=Put(e),x=Lt([],I);if(g){var B=Ur(Tn(e.state)),M=B.top,L=B.left,G=B.bottom,W=B.right;x.push.apply(x,Aut(e,{top:M,left:L,bottom:G,right:W,center:(L+W)/2,middle:(M+G)/2},y))}return x.push.apply(x,xut(O,A,a?s:f,a?i:u,c,h)),x.push.apply(x,bw(m||!1,_||!1,a?s:f,a?i:u,c,h,r)),x}function xut(e,t,r,n,a,i){a===void 0&&(a=0),i===void 0&&(i=0);var s=[];if(t)for(var u=0;u<=n;u+=t)s.push({type:"horizontal",pos:[0,ie(u-i,.1)],size:r,hide:!0});if(e)for(var u=0;u<=r;u+=e)s.push({type:"vertical",pos:[ie(u-a,.1),0],size:n,hide:!0});return s}function Lf(e,t,r,n){var a=e.props,i=rut(n,a.snapThreshold,5);return yw(e.state.guidelines,t,r,i)}function yw(e,t,r,n){return{vertical:Tm(e,"vertical",t,n),horizontal:Tm(e,"horizontal",r,n)}}function Iut(e,t,r){var n=r[0],a=r[1],i=t[0],s=t[1],u=qt(r,t),f=u[0],c=u[1],h=c>0,v=f>0;f=Di(f),c=Di(c);var p={isSnap:!1,offset:0,pos:0},g={isSnap:!1,offset:0,pos:0};if(f===0&&c===0)return{vertical:p,horizontal:g};var _=Lf(e,f?[n]:[],c?[a]:[]),m=_.vertical,b=_.horizontal;m.posInfos.filter(function(et){var rt=et.pos;return v?rt>=i:rt<=i}),b.posInfos.filter(function(et){var rt=et.pos;return h?rt>=s:rt<=s}),m.isSnap=m.posInfos.length>0,b.isSnap=b.posInfos.length>0;var y=Ih(m),w=y.isSnap,O=y.guideline,T=Ih(b),A=T.isSnap,I=T.guideline,x=A?I.pos[1]:0,B=w?O.pos[0]:0;if(f===0)A&&(g.isSnap=!0,g.pos=I.pos[1],g.offset=a-g.pos);else if(c===0)w&&(p.isSnap=!0,p.pos=B,p.offset=n-B);else{var M=c/f,L=r[1]-M*n,G=0,W=0,at=!1;w?(W=B,G=M*W+L,at=!0):A&&(G=x,W=(G-L)/M,at=!0),at&&(p.isSnap=!0,p.pos=W,p.offset=n-W,g.isSnap=!0,g.pos=G,g.offset=a-G)}return{vertical:p,horizontal:g}}function Am(e,t,r){var n=$p(e.props.snapDirections,t);return Lf(e,n.vertical,n.horizontal,r)}function Ih(e){var t=e.isSnap;if(!t)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var r=e.posInfos[0],n=r.guidelineInfos[0],a=n.offset,i=n.dist,s=n.guideline;return{isSnap:t,offset:a,dist:i,pos:r.pos,guideline:s}}function Tm(e,t,r,n){if(!e||!e.length)return{isSnap:!1,index:-1,posInfos:[]};var a=t==="vertical",i=a?0:1,s=r.map(function(f,c){var h=e.map(function(v){var p=v.pos,g=f-p[i];return{offset:g,dist:Math.abs(g),guideline:v}}).filter(function(v){var p=v.guideline,g=v.dist,_=p.type;return!(_!==t||g>n)}).sort(function(v,p){return v.dist-p.dist});return{pos:f,index:c,guidelineInfos:h}}).filter(function(f){return f.guidelineInfos.length>0}).sort(function(f,c){return f.guidelineInfos[0].dist-c.guidelineInfos[0].dist}),u=s.length>0;return{isSnap:u,index:u?s[0].index:-1,posInfos:s}}function Dut(e,t,r){var n=[];if(r[0]&&r[1])n=[r,[-r[0],r[1]],[r[0],-r[1]]].map(function(s){return ur(t,s)});else if(!r[0]&&!r[1])for(var a=[t[0],t[1],t[3],t[2],t[0]],i=0;i<4;++i)n.push(a[i]),n.push([(a[i][0]+a[i+1][0])/2,(a[i][1]+a[i+1][1])/2]);else e.props.keepRatio?n=[[-1,-1],[-1,1],[1,-1],[1,1],r].map(function(s){return ur(t,s)}):(n=dw(t,r),n.length>1&&n.push([(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]));return Lf(e,n.map(function(s){return s[0]}),n.map(function(s){return s[1]}),1)}function ww(e,t){var r=Math.abs(e.offset),n=Math.abs(t.offset);return e.isBound&&t.isBound?n-r:e.isBound?-1:t.isBound?1:e.isSnap&&t.isSnap?n-r:e.isSnap?-1:t.isSnap||r<Tr?1:n<Tr?-1:r-n}function Hu(e,t){return e.slice().sort(function(r,n){var a=r.sign[t],i=n.sign[t],s=r.offset[t],u=n.offset[t];if(a){if(!i)return-1}else return 1;return ww({isBound:r.isBound,isSnap:r.isSnap,offset:s},{isBound:n.isBound,isSnap:n.isSnap,offset:u})})[0]}function Rut(e,t){var r=[],n=[-e[0],-e[1]];return e[0]&&e[1]?(r.push([n,[e[0],-e[1]]],[n,[-e[0],e[1]]]),t&&r.push([n,e])):e[0]?t?r.push([n,[n[0],-1]],[n,[n[0],1]],[n,[e[0],-1]],[n,e],[n,[e[0],1]]):r.push([[n[0],-1],[e[0],-1]],[[n[0],0],[e[0],0]],[[n[0],1],[e[0],1]]):e[1]?t?r.push([n,[-1,n[1]]],[n,[1,n[1]]],[n,[-1,e[1]]],[n,[1,e[1]]],[n,e]):r.push([[-1,n[1]],[-1,e[1]]],[[0,n[1]],[0,e[1]]],[[1,n[1]],[1,e[1]]]):r.push([n,[1,0]],[n,[-1,0]],[n,[0,-1]],[n,[0,1]],[[1,0],[1,-1]],[[1,0],[1,1]],[[0,1],[1,1]],[[0,1],[-1,1]],[[-1,0],[-1,-1]],[[-1,0],[-1,1]],[[0,-1],[1,-1]],[[0,-1],[-1,-1]]),r}function Sw(e,t){var r=eo([t[0][0],t[1][0]]),n=eo([t[0][1],t[1][1]]);return{vertical:r<=e[0],horizontal:n<=e[1]}}function Mm(e,t){var r=t[0],n=t[1],a=n[0]-r[0],i=n[1]-r[1];Math.abs(a)<Tr&&(a=0),Math.abs(i)<Tr&&(i=0);var s,u;if(!a)s=r[0],u=e[0];else if(!i)s=r[1],u=e[1];else{var f=i/a;s=f*(e[0]-r[0])+r[1],u=e[1]}return s-u}function Ew(e,t,r){r===void 0&&(r=Tr);var n=Mm(e[0],t)<=0;return e.slice(1).every(function(a){var i=Mm(a,t),s=i<=0;return s===n||Math.abs(i)<=r})}function Pm(e,t,r,n,a){return a===void 0&&(a=0),n&&t-a<=e||!n&&e<=r+a?{isBound:!0,offset:n?t-e:r-e}:{isBound:!1,offset:0}}function But(e,t,r){var n=e.props.innerBounds;if(!n)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var a=n.left,i=n.top,s=n.width,u=n.height,f=[[a,i],[a,i+u]],c=[[a,i],[a+s,i]],h=[[a+s,i],[a+s,i+u]],v=[[a,i+u],[a+s,i+u]],p=Sw(r,t),g=p.horizontal,_=p.vertical;if(Ew([r,[a,i],[a+s,i],[a,i+u],[a+s,i+u]],t))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var m=va(t,c,_),b=va(t,v,_),y=va(t,f,g),w=va(t,h,g),O=m.isBound&&b.isBound,T=m.isBound||b.isBound,A=y.isBound&&w.isBound,I=y.isBound||w.isBound,x=Gi(m.offset,b.offset),B=Gi(y.offset,w.offset),M=[0,0],L=!1,G=!1;return Math.abs(B)<Math.abs(x)?(M=[x,0],L=T,G=O):(M=[0,B],L=I,G=A),{isAllBound:G,isVerticalBound:T,isHorizontalBound:I,isBound:L,offset:M}}function va(e,t,r,n,a){var i=e[0],s=e[1],u=t[0],f=t[1],c=Di(s[1]-i[1]),h=Di(s[0]-i[0]),v=Di(f[1]-u[1]),p=Di(f[0]-u[0]);if(p){if(!v){if(a&&!h)return{isBound:!1,offset:0};if(c){var b=(u[1]-i[1])/(c/h)+i[0];return Pm(b,u[0],f[0],r,n)}else{var _=u[1]-i[1],m=Math.abs(_)<=(n||0);return{isBound:m,offset:m?_:0}}}}else{if(a&&!c)return{isBound:!1,offset:0};if(h){var g=c/h*(u[0]-i[0])+i[1];return Pm(g,u[1],f[1],r,n)}else{var _=u[0]-i[0],m=Math.abs(_)<=(n||0);return{isBound:m,offset:m?_:0}}}return{isBound:!1,offset:0}}function Cw(e,t,r,n){return t.map(function(a){var i=a[0],s=a[1],u=a[2],f=But(e,[s,u],r),c=f.isBound,h=f.offset,v=f.isVerticalBound,p=f.isHorizontalBound,g=Mn({datas:n,distX:h[0],distY:h[1]}).map(function(_,m){return _*(i[m]?2/i[m]:0)});return{sign:i,isBound:c,isVerticalBound:v,isHorizontalBound:p,isSnap:!1,offset:g}})}function Lut(e,t,r){var n,a=Ow(t,[0,0],!1).map(function(p){var g=p[0],_=p[1],m=p[2];return[g.map(function(b){return Math.abs(b)*2}),_,m]}),i=Cw(e,a,ur(t,[0,0]),r),s=Hu(i,0),u=Hu(i,1),f=0,c=0,h=s.isVerticalBound||u.isVerticalBound,v=s.isHorizontalBound||u.isHorizontalBound;return(h||v)&&(n=dut({datas:r,distX:-s.offset[0],distY:-u.offset[1]}),f=n[0],c=n[1]),{vertical:{isBound:h,offset:f},horizontal:{isBound:v,offset:c}}}function Fut(e,t){var r=[],n=e[0],a=e[1];return n&&a?r.push([[0,a*2],e,[-n,a]],[[n*2,0],e,[n,-a]]):n?(r.push([[n*2,0],[n,1],[n,-1]]),t&&r.push([[0,-1],[n,-1],[-n,-1]],[[0,1],[n,1],[-n,1]])):a?(r.push([[0,a*2],[1,a],[-1,a]]),t&&r.push([[-1,0],[-1,a],[-1,-a]],[[1,0],[1,a],[1,-a]])):r.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),r}function Ow(e,t,r){return Fut(t,r).map(function(n){var a=n[0],i=n[1],s=n[2];return[a,ur(e,i),ur(e,s)]})}function xm(e,t,r,n){var a=n?e.map(function(s){return ha(s,n)}):e,i=Lt([r],t);return[[a[0],a[1]],[a[1],a[3]],[a[3],a[2]],[a[2],a[0]]].some(function(s){return!Ew(i,s)})}function zut(e){var t=e[0],r=e[1],n=r[0]-t[0],a=r[1]-t[1];if(!n)return Math.abs(t[0]);if(!a)return Math.abs(t[1]);var i=a/n;return Math.abs((-i*t[0]+t[1])/Math.sqrt(Math.pow(i,2)+1))}function Gut(e){var t=e[0],r=e[1],n=r[0]-t[0],a=r[1]-t[1];if(!n)return[t[0],0];if(!a)return[0,t[1]];var i=a/n,s=-i*t[0]+t[1];return[-s/(i+1/i),s/(i*i+1)]}function Nut(e,t,r,n,a){var i=e.props.innerBounds,s=a*Math.PI/180;if(!i)return[];var u=i.left,f=i.top,c=i.width,h=i.height,v=u-n[0],p=u+c-n[0],g=f-n[1],_=f+h-n[1],m=[[v,g],[p,g],[v,_],[p,_]],b=ur(r,[0,0]);if(!xm(r,m,b,0))return[];var y=[],w=m.map(function(O){return[tn(O),Te([0,0],O)]});return[[r[0],r[1]],[r[1],r[3]],[r[3],r[2]],[r[2],r[0]]].forEach(function(O){var T=Te([0,0],Gut(O)),A=zut(O);y.push.apply(y,w.filter(function(I){var x=I[0];return x&&A<=x}).map(function(I){var x=I[0],B=I[1],M=Math.acos(x?A/x:0),L=B+M,G=B-M;return[s+L-T,s+G-T]}).reduce(function(I,x){return I.push.apply(I,x),I},[]).filter(function(I){return!xm(t,m,b,I)}).map(function(I){return ie(I*180/Math.PI,Tr)}))}),y}function jut(e){var t=e.props.innerBounds;if(!t)return{vertical:[],horizontal:[]};var r=e.getRect(),n=r.pos1,a=r.pos2,i=r.pos3,s=r.pos4,u=[n,a,i,s],f=ur(u,[0,0]),c=t.left,h=t.top,v=t.width,p=t.height,g=[[c,h],[c,h+p]],_=[[c,h],[c+v,h]],m=[[c+v,h],[c+v,h+p]],b=[[c,h+p],[c+v,h+p]],y=[[n,a],[a,s],[s,i],[i,n]],w=[],O=[],T={top:!1,bottom:!1,left:!1,right:!1};return y.forEach(function(A){var I=Sw(f,A),x=I.horizontal,B=I.vertical,M=va(A,_,B,1,!0),L=va(A,b,B,1,!0),G=va(A,g,x,1,!0),W=va(A,m,x,1,!0);M.isBound&&!T.top&&(w.push(h),T.top=!0),L.isBound&&!T.bottom&&(w.push(h+p),T.bottom=!0),G.isBound&&!T.left&&(O.push(c),T.left=!0),W.isBound&&!T.right&&(O.push(c+v),T.right=!0)}),{horizontal:w,vertical:O}}function bp(e,t,r){var n=e||{},a=n.position,i=a===void 0?"client":a,s=n.left,u=s===void 0?-1/0:s,f=n.top,c=f===void 0?-1/0:f,h=n.right,v=h===void 0?1/0:h,p=n.bottom,g=p===void 0?1/0:p,_={position:i,left:u,top:c,right:v,bottom:g};return{vertical:Im(_,t,!0),horizontal:Im(_,r,!1)}}function Ff(e,t){var r=e.state,n=r.containerClientRect,a=n.clientHeight,i=n.clientWidth,s=n.clientLeft,u=n.clientTop,f=r.snapOffset,c=f.left,h=f.top,v=f.right,p=f.bottom,g=t||e.props.bounds||{},_=g.position||"client",m=_==="css",b=g.left,y=b===void 0?-1/0:b,w=g.top,O=w===void 0?-1/0:w,T=g.right,A=T===void 0?m?-1/0:1/0:T,I=g.bottom,x=I===void 0?m?-1/0:1/0:I;return m&&(A=i+v-c-A,x=a+p-h-x),{left:y+c-s,right:A+c-s,top:O+h-u,bottom:x+h-u}}function qut(e,t,r){var n=Ff(e),a=n.left,i=n.top,s=n.right,u=n.bottom,f=r[0],c=r[1],h=qt(r,t),v=h[0],p=h[1];Math.abs(v)<Tr&&(v=0),Math.abs(p)<Tr&&(p=0);var g=p>0,_=v>0,m={isBound:!1,offset:0,pos:0},b={isBound:!1,offset:0,pos:0};if(v===0&&p===0)return{vertical:m,horizontal:b};if(v===0)g?u<c&&(b.pos=u,b.offset=c-u):i>c&&(b.pos=i,b.offset=c-i);else if(p===0)_?s<f&&(m.pos=s,m.offset=f-s):a>f&&(m.pos=a,m.offset=f-a);else{var y=p/v,w=r[1]-y*f,O=0,T=0,A=!1;_&&s<=f?(O=y*s+w,T=s,A=!0):!_&&f<=a&&(O=y*a+w,T=a,A=!0),A&&(O<i||O>u)&&(A=!1),A||(g&&u<=c?(O=u,T=(O-w)/y,A=!0):!g&&c<=i&&(O=i,T=(O-w)/y,A=!0)),A&&(m.isBound=!0,m.pos=T,m.offset=f-T,b.isBound=!0,b.pos=O,b.offset=c-O)}return{vertical:m,horizontal:b}}function Im(e,t,r){var n=e[r?"left":"top"],a=e[r?"right":"bottom"],i=Math.min.apply(Math,t),s=Math.max.apply(Math,t),u=[];return n+1>i&&u.push({isBound:!0,offset:i-n,pos:n}),a-1<s&&u.push({isBound:!0,offset:s-a,pos:a}),u.length||u.push({isBound:!1,offset:0,pos:0}),u.sort(function(f,c){return Math.abs(c.offset)-Math.abs(f.offset)})}function Dm(e,t,r){var n=r?e.map(function(a){return ha(a,r)}):e;return n.some(function(a){return a[0]<t.left&&Math.abs(a[0]-t.left)>.1||a[0]>t.right&&Math.abs(a[0]-t.right)>.1||a[1]<t.top&&Math.abs(a[1]-t.top)>.1||a[1]>t.bottom&&Math.abs(a[1]-t.bottom)>.1})}function Uut(e,t,r){var n=tn(e),a=Math.sqrt(n*n-t*t)||0;return[a,-a].sort(function(i,s){return Math.abs(i-e[r?0:1])-Math.abs(s-e[r?0:1])}).map(function(i){return Te([0,0],r?[i,t]:[t,i])})}function kut(e,t,r,n,a){if(!e.props.bounds)return[];var i=a*Math.PI/180,s=Ff(e),u=s.left,f=s.top,c=s.right,h=s.bottom,v=u-n[0],p=c-n[0],g=f-n[1],_=h-n[1],m={left:v,top:g,right:p,bottom:_};if(!Dm(r,m,0))return[];var b=[];return[[v,0],[p,0],[g,1],[_,1]].forEach(function(y){var w=y[0],O=y[1];r.forEach(function(T){var A=Te([0,0],T);b.push.apply(b,Uut(T,w,O).map(function(I){return i+I-A}).filter(function(I){return!Dm(t,m,I)}).map(function(I){return ie(I*180/Math.PI,Tr)}))})}),b}function Hut(e,t){var r,n=e.direction,a=e.classNames,i=e.size,s=e.pos,u=e.zoom,f=e.key,c=n==="horizontal",h=c?"Y":"X";return t.createElement("div",{key:f,className:a.join(" "),style:(r={},r[c?"width":"height"]=""+i,r.transform="translate("+s[0]+", "+s[1]+") translate"+h+"(-50%) scale"+h+"("+u+")",r)})}function yp(e,t){return Hut(J(J({},e),{classNames:Lt([Kt("line","guideline",e.direction)],e.classNames).filter(function(r){return r}),size:e.size||e.sizeValue+"px",pos:e.pos||e.posValue.map(function(r){return ie(r,.1)+"px"})}),t)}function Rm(e,t,r,n,a,i,s,u){var f=e.props.zoom;return r.map(function(c,h){var v=c.type,p=c.pos,g=[0,0];return g[s]=n,g[s?0:1]=-a+p,yp({key:t+"TargetGuideline"+h,classNames:[Kt("target","bold",v)],posValue:g,sizeValue:i,zoom:f,direction:t},u)})}function Bm(e,t,r,n,a,i){var s=e.props,u=s.zoom,f=s.isDisplayInnerSnapDigit,c=t==="horizontal"?ya:wa,h=a[c.start],v=a[c.end];return r.filter(function(p){var g=p.hide,_=p.elementRect;if(g)return!1;if(f&&_){var m=_.rect;if(m[c.start]<=h&&v<=m[c.end])return!1}return!0}).map(function(p,g){var _=p.pos,m=p.size,b=p.element,y=[-n[0]+_[0],-n[1]+_[1]];return yp({key:t+"-default-guideline-"+g,classNames:b?[Kt("bold")]:[],direction:t,posValue:y,sizeValue:m,zoom:u},i)})}function Fs(e,t,r,n,a,i,s,u){var f,c=e.props,h=c.snapDigit,v=h===void 0?0:h,p=c.isDisplaySnapDigit,g=p===void 0?!0:p,_=c.snapDistFormat,m=_===void 0?function(A){return A}:_,b=c.zoom,y=t==="horizontal"?"X":"Y",w=t==="vertical"?"height":"width",O=Math.abs(a),T=g?parseFloat(O.toFixed(v)):0;return u.createElement("div",{key:t+"-"+r+"-guideline-"+n,className:Kt("guideline-group",t),style:(f={left:i[0]+"px",top:i[1]+"px"},f[w]=O+"px",f)},yp({direction:t,classNames:[Kt(r),s],size:"100%",posValue:[0,0],sizeValue:O,zoom:b},u),u.createElement("div",{className:Kt("size-value","gap"),style:{transform:"translate"+y+"(-50%) scale("+b+")"}},T>0?m(T):""))}function Wut(e,t,r,n){var a=e==="vertical"?0:1,i=e==="vertical"?1:0,s=a?ya:wa,u=r[s.start],f=r[s.end];return nut(t,function(c){return c.pos[a]}).map(function(c){var h=[],v=[],p=[];return c.forEach(function(g){var _,m,b=g.element,y=g.elementRect.rect;if(y[s.end]<u)h.push(g);else if(f<y[s.start])v.push(g);else if(y[s.start]<=u&&f<=y[s.end]&&n){var w=g.pos,O={element:b,rect:J(J({},y),(_={},_[s.end]=y[s.start],_))},T={element:b,rect:J(J({},y),(m={},m[s.start]=y[s.end],m))},A=[0,0],I=[0,0];A[a]=w[a],A[i]=w[i],I[a]=w[a],I[i]=w[i]+g.size,h.push({type:e,pos:A,size:0,elementRect:O}),v.push({type:e,pos:I,size:0,elementRect:T})}}),h.sort(function(g,_){return _.pos[i]-g.pos[i]}),v.sort(function(g,_){return g.pos[i]-_.pos[i]}),{total:c,start:h,end:v,inner:p}})}function Kut(e,t,r,n,a){var i=e.props.isDisplayInnerSnapDigit,s=[];return["vertical","horizontal"].forEach(function(u){var f=t.filter(function(b){return b.type===u}),c=u==="vertical"?1:0,h=c?0:1,v=Wut(u,f,n,i),p=c?wa:ya,g=c?ya:wa,_=n[p.start],m=n[p.end];v.forEach(function(b){var y=b.total,w=b.start,O=b.end,T=b.inner,A=r[h]+y[0].pos[h]-n[g.start],I=n;w.forEach(function(x){var B=x.elementRect.rect,M=I[p.start]-B[p.end];if(M>0){var L=[0,0];L[c]=r[c]+I[p.start]-_-M,L[h]=A,s.push(Fs(e,u,"dashed",s.length,M,L,x.className,a))}I=B}),I=n,O.forEach(function(x){var B=x.elementRect.rect,M=B[p.start]-I[p.end];if(M>0){var L=[0,0];L[c]=r[c]+I[p.end]-_,L[h]=A,s.push(Fs(e,u,"dashed",s.length,M,L,x.className,a))}I=B}),T.forEach(function(x){var B=x.elementRect.rect,M=_-B[p.start],L=B[p.end]-m,G=[0,0],W=[0,0];G[c]=r[c]-M,G[h]=A,W[c]=r[c]+m-_,W[h]=A,s.push(Fs(e,u,"dashed",s.length,M,G,x.className,a)),s.push(Fs(e,u,"dashed",s.length,L,W,x.className,a))})})}),s}function Yut(e,t,r,n,a){var i=[];return["horizontal","vertical"].forEach(function(s){var u=t.filter(function(b){return b.type===s}),f=s==="vertical"?0:1,c=f?0:1,h=f?wa:ya,v=f?ya:wa,p=n[h.start],g=n[h.end],_=n[v.start],m=n[v.end];u.forEach(function(b){var y=b.gap,w=b.gapRects,O=b.className,T=Math.max.apply(Math,Lt([_],w.map(function(x){var B=x.rect;return B[v.start]}))),A=Math.min.apply(Math,Lt([m],w.map(function(x){var B=x.rect;return B[v.end]}))),I=(T+A)/2;T===A||I===(_+m)/2||w.forEach(function(x){var B=x.rect,M=[r[0],r[1]];if(B[h.end]<p)M[f]+=B[h.end]-p;else if(g<B[h.start])M[f]+=B[h.start]-p-y;else return;M[c]+=I-_,i.push(Fs(e,f?"vertical":"horizontal","gap",i.length,y,M,O,a))})})}),i}function Xut(e,t,r,n){var a=t[0]-e[0],i=t[1]-e[1];if(Math.abs(a)<Cr&&(a=0),Math.abs(i)<Cr&&(i=0),!a)return n?[0,0]:[0,r];if(!i)return n?[r,0]:[0,0];var s=i/a,u=e[1]-s*e[0];if(n){var f=s*(t[0]+r)+u;return[r,f-t[1]]}else{var c=(t[1]+r-u)/s;return[c-t[0],r]}}function Dh(e,t,r,n,a){var i=Xut(e,t,r,n);if(!i)return{isOutside:!1,offset:[0,0]};var s=jn(e,t),u=jn(i,e),f=jn(i,t),c=u>s||f>s,h=Mn({datas:a,distX:i[0],distY:i[1]}),v=h[0],p=h[1];return{offset:[v,p],isOutside:c}}function Wu(e,t){return e.isBound?e.offset:t.isSnap?Ih(t).offset:0}function Vut(e,t,r,n,a){var i=t[0],s=t[1],u=r[0],f=r[1],c=n[0],h=n[1],v=a[0],p=a[1],g=-v,_=-p;if(e&&i&&s){g=0,_=0;var m=[];if(u&&f?m.push([0,p],[v,0]):u?m.push([v,0]):f?m.push([0,p]):c&&h?m.push([0,p],[v,0]):c?m.push([v,0]):h&&m.push([0,p]),m.length){m.sort(function(O,T){return tn(qt([i,s],O))-tn(qt([i,s],T))});var b=m[0];if(b[0]&&Math.abs(i)>Cr)g=-b[0],_=s*Math.abs(i+g)/Math.abs(i)-s;else if(b[1]&&Math.abs(s)>Cr){var y=s;_=-b[1],g=i*Math.abs(s+_)/Math.abs(y)-i}if(e&&f&&u)if(Math.abs(g)>Cr&&Math.abs(g)<Math.abs(v)){var w=Math.abs(v)/Math.abs(g);g*=w,_*=w}else if(Math.abs(_)>Cr&&Math.abs(_)<Math.abs(p)){var w=Math.abs(p)/Math.abs(_);g*=w,_*=w}else g=Gi(-v,g),_=Gi(-p,_)}}else g=i||u?-v:0,_=s||f?-p:0;return[g,_]}function Zut(e,t,r,n,a,i){if(!ls(e,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var s=gp(i.absolutePoses,[t,r]),u=Ur(s),f=u.left,c=u.right,h=u.top,v=u.bottom,p={horizontal:s.map(function(et){return et[1]}),vertical:s.map(function(et){return et[0]})},g=mp(e.props.snapDirections),_=$p(g,{left:f,right:c,top:h,bottom:v,center:(f+c)/2,middle:(h+v)/2}),m=zf(e,a,_,p),b=m.vertical,y=m.horizontal,w=Lut(e,s,i),O=w.vertical,T=w.horizontal,A=b.isSnap,I=y.isSnap,x=b.isBound||O.isBound,B=y.isBound||T.isBound,M=Gi(b.offset,O.offset),L=Gi(y.offset,T.offset),G=Vut(n,[t,r],[x,B],[A,I],[M,L]),W=G[0],at=G[1];return[{isBound:x,isSnap:A,offset:W},{isBound:B,isSnap:I,offset:at}]}function zf(e,t,r,n){n===void 0&&(n=r);var a=bp(Ff(e),n.vertical,n.horizontal),i=a.horizontal,s=a.vertical,u=t?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:Lf(e,r.vertical,r.horizontal),f=u.horizontal,c=u.vertical,h=Wu(i[0],f),v=Wu(s[0],c),p=Math.abs(h),g=Math.abs(v);return{horizontal:{isBound:i[0].isBound,isSnap:f.isSnap,snapIndex:f.index,offset:h,dist:p,bounds:i,snap:f},vertical:{isBound:s[0].isBound,isSnap:c.isSnap,snapIndex:c.index,offset:v,dist:g,bounds:s,snap:c}}}function Lm(e,t,r,n,a){var i=bp(t,r,n),s=i.horizontal,u=i.vertical,f=yw(e,r,n,a),c=f.horizontal,h=f.vertical,v=Wu(s[0],c),p=Wu(u[0],h),g=Math.abs(v),_=Math.abs(p);return{horizontal:{isBound:s[0].isBound,isSnap:c.isSnap,snapIndex:c.index,offset:v,dist:g,bounds:s,snap:c},vertical:{isBound:u[0].isBound,isSnap:h.isSnap,snapIndex:h.index,offset:p,dist:_,bounds:u,snap:h}}}function Jut(e,t,r,n){var a=Te(e,t)/Math.PI*180,i=r.vertical,s=i.isBound,u=i.isSnap,f=i.dist,c=r.horizontal,h=c.isBound,v=c.isSnap,p=c.dist,g=a%180,_=g<3||g>177,m=g>87&&g<93;return p<f&&(s||u&&!m&&(!n||!_))?"vertical":h||v&&!_&&(!n||!m)?"horizontal":""}function Qut(e,t,r,n,a,i){return r.map(function(s){var u=s[0],f=s[1],c=ur(t,u),h=ur(t,f),v=n?tft(e,c,h,a):zf(e,a,{vertical:[h[0]],horizontal:[h[1]]}),p=v.horizontal,g=p.offset,_=p.isBound,m=p.isSnap,b=v.vertical,y=b.offset,w=b.isBound,O=b.isSnap,T=qt(f,u);if(!y&&!g)return{isBound:w||_,isSnap:O||m,sign:T,offset:[0,0]};var A=Jut(c,h,v,n);if(!A)return{sign:T,isBound:!1,isSnap:!1,offset:[0,0]};var I=A==="vertical",x=Dh(c,h,-(I?y:g),I,i).offset.map(function(B,M){return B*(T[M]?2/T[M]:0)});return{sign:T,isBound:I?w:_,isSnap:I?O:m,offset:x}})}function Fm(e,t){return e.isBound?e.offset:t.isSnap?t.offset:0}function tft(e,t,r,n){var a=qut(e,t,r),i=a.horizontal,s=a.vertical,u=n?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:Iut(e,t,r),f=u.horizontal,c=u.vertical,h=Fm(i,f),v=Fm(s,c),p=Math.abs(h),g=Math.abs(v);return{horizontal:{isBound:i.isBound,isSnap:f.isSnap,offset:h,dist:p},vertical:{isBound:s.isBound,isSnap:c.isSnap,offset:v,dist:g}}}function eft(e,t,r,n,a){var i=[-r[0],-r[1]],s=e.state,u=s.width,f=s.height,c=e.props.bounds,h=1/0,v=1/0;if(c){var p=[[r[0],-r[1]],[-r[0],r[1]]],g=c.left,_=g===void 0?-1/0:g,m=c.top,b=m===void 0?-1/0:m,y=c.right,w=y===void 0?1/0:y,O=c.bottom,T=O===void 0?1/0:O;p.forEach(function(A){var I=A[0]!==i[0],x=A[1]!==i[1],B=ur(t,A),M=Te(n,B)*360/Math.PI;if(x){var L=B.slice();(Math.abs(M-360)<2||Math.abs(M-180)<2)&&(L[1]=n[1]);var G=Dh(n,L,(n[1]<B[1]?T:b)-B[1],!1,a),W=G.offset,at=W[1],et=G.isOutside;isNaN(at)||(v=f+(et?1:-1)*Math.abs(at))}if(I){var L=B.slice();(Math.abs(M-90)<2||Math.abs(M-270)<2)&&(L[0]=n[0]);var rt=Dh(n,L,(n[0]<B[0]?w:_)-B[0],!0,a),gt=rt.offset[0],lt=rt.isOutside;isNaN(gt)||(h=u+(lt?1:-1)*Math.abs(gt))}})}return{maxWidth:h,maxHeight:v}}function Cc(e){var t=e.state;if(!(t.guidelines&&t.guidelines.length)){var r=e.state.container,n=e.props.snapContainer||r,a=t.containerClientRect,i={left:0,top:0,bottom:0,right:0};if(r!==n){var s=Mf(n,!0);if(s){var u=Du(s),f=Cm(t,[u.left-a.left,u.top-a.top]),c=Cm(t,[u.right-a.right,u.bottom-a.bottom]);i.left=ie(f[0],.1),i.top=ie(f[1],.1),i.right=ie(c[0],.1),i.bottom=ie(c[1],.1)}}t.snapOffset=i,t.guidelines=xh(e),t.enableSnap=!0}}function Aw(e,t,r,n,a,i){var s=So(e,t,r,i?4:3),u=_ut(s,a);return gp(s,qt(n,u))}function rft(e,t,r,n,a,i){var s=Rut(r,n),u=Ow(t,r,n),f=Lt(Lt([],Qut(e,t,s,n,a,i)),Cw(e,u,ur(t,[0,0]),i)),c=Hu(f,0),h=Hu(f,1);return{width:{isBound:c.isBound,offset:c.offset[0]},height:{isBound:h.isBound,offset:h.offset[1]}}}function nft(e,t,r,n,a,i,s,u,f){var c=ur(t,s),h=zf(e,u,{vertical:[c[0]],horizontal:[c[1]]}),v=h.horizontal.offset,p=h.vertical.offset;if(p||v){var g=Mn({datas:f,distX:-p,distY:-v}),_=g[0],m=g[1],b=Math.min(a||1/0,r+s[0]*_),y=Math.min(i||1/0,n+s[1]*m);return[b-r,y-n]}return[0,0]}function Tw(e,t,r,n,a,i,s,u){for(var f=Tn(e.state),c=e.props.keepRatio,h=0,v=0,p=0;p<2;++p){var g=t(h,v),_=rft(e,g,a,c,s,u),m=_.width,b=_.height,y=m.isBound,w=b.isBound,O=m.offset,T=b.offset;if(p===1&&(y||(O=0),w||(T=0)),p===0&&s&&!y&&!w)return[0,0];if(c){var A=Math.abs(O)*(r?1/r:1),I=Math.abs(T)*(n?1/n:1),x=y&&w?A<I:w||!y&&A<I;x?O=r*T/n:T=n*O/r}h+=O,v+=T}if(a[0]&&a[1]){var B=eft(e,f,a,i,u),M=B.maxWidth,L=B.maxHeight,G=nft(e,t(h,v).map(function(et){return et.map(function(rt){return ie(rt,jot)})}),r+h,n+v,M,L,a,s,u),O=G[0],T=G[1];h+=O,v+=T}return[h,v]}function Mw(e,t,r,n){if(!ls(e,"rotatable"))return n;var a=t.pos1,i=t.pos2,s=t.pos3,u=t.pos4,f=n*Math.PI/180,c=[a,i,s,u].map(function(p){return qt(p,r)}),h=c.map(function(p){return ha(p,f)}),v=Lt(Lt([],kut(e,c,h,r,n)),Nut(e,c,h,r,n));return v.sort(function(p,g){return Math.abs(p-n)-Math.abs(g-n)}),v.length?v[0]:n}function aft(e,t,r,n,a,i,s){if(!ls(e,"resizable"))return[0,0];var u=e.state,f=u.allMatrix,c=u.is3d;return Tw(e,function(h,v){return Aw(f,t+h,r+v,a,n,c)},t,r,n,a,i,s)}function ift(e,t,r,n,a){var i=a.width,s=a.height,u=a.fixedPosition;if(!ls(e,"scalable"))return[0,0];var f=a.is3d,c=Tw(e,function(h,v){return Aw(but(a,Qt(t,[h/i,v/s])),i,s,u,r,f)},i,s,r,u,n,a);return[c[0]/i,c[1]/s]}function sft(e,t){t.absolutePoses=Tn(e.state)}function zm(e){var t=[];return e.forEach(function(r){r.guidelineInfos.forEach(function(n){var a=n.guideline;t.indexOf(a)>-1||t.push(a)})}),t}function Gm(e,t,r,n,a,i){var s=bp(Ff(e,i),t,r),u=s.vertical,f=s.horizontal;u.forEach(function(p){p.isBound&&n.push({type:"bounds",pos:p.pos})}),f.forEach(function(p){p.isBound&&a.push({type:"bounds",pos:p.pos})});var c=jut(e),h=c.vertical,v=c.horizontal;h.forEach(function(p){rn(n,function(g){var _=g.type,m=g.pos;return _==="bounds"&&m===p})>=0||n.push({type:"bounds",pos:p})}),v.forEach(function(p){rn(a,function(g){var _=g.type,m=g.pos;return _==="bounds"&&m===p})>=0||a.push({type:"bounds",pos:p})})}var oft={name:"snappable",dragRelation:"strong",props:{snappable:[Boolean,Array],snapContainer:Object,snapDirections:[Boolean,Object],elementSnapDirections:[Boolean,Object],snapGap:Boolean,snapGridWidth:Number,snapGridHeight:Number,isDisplaySnapDigit:Boolean,isDisplayInnerSnapDigit:Boolean,snapDigit:Number,snapThreshold:Number,horizontalGuidelines:Array,verticalGuidelines:Array,elementGuidelines:Array,bounds:Object,innerBounds:Object,snapDistFormat:Function},events:{onSnap:"snap"},css:[`:host {
|
|
--bounds-color: #d66;
|
|
}
|
|
.guideline {
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
}
|
|
.guideline.bounds {
|
|
background: #d66;
|
|
background: var(--bounds-color);
|
|
}
|
|
.guideline-group {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
.guideline-group .size-value {
|
|
position: absolute;
|
|
color: #f55;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
.guideline-group.horizontal .size-value {
|
|
transform-origin: 50% 100%;
|
|
transform: translateX(-50%);
|
|
left: 50%;
|
|
bottom: 5px;
|
|
}
|
|
.guideline-group.vertical .size-value {
|
|
transform-origin: 0% 50%;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
left: 5px;
|
|
}
|
|
.guideline.gap {
|
|
background: #f55;
|
|
}
|
|
.size-value.gap {
|
|
color: #f55;
|
|
}
|
|
`],render:function(e,t){var r=e.state,n=r.top,a=r.left,i=r.pos1,s=r.pos2,u=r.pos3,f=r.pos4,c=r.snapRenderInfo;if(!c||!ls(e,""))return[];r.guidelines=xh(e);var h=Math.min(i[0],s[0],u[0],f[0]),v=Math.min(i[1],s[1],u[1],f[1]),p=c.externalPoses||[],g=Tn(e.state),_=[],m=[],b=[],y=[],w=[],O=Ur(g),T=O.width,A=O.height,I=O.top,x=O.left,B=O.bottom,M=O.right,L={left:x,right:M,top:I,bottom:B,center:(x+M)/2,middle:(I+B)/2},G=p.length>0,W=G?Ur(p):{};if(!c.request){if(c.direction&&w.push(Dut(e,g,c.direction)),c.snap){var at=Ur(g);c.center&&(at.middle=(at.top+at.bottom)/2,at.center=(at.left+at.right)/2),w.push(Am(e,at,1))}G&&(c.center&&(W.middle=(W.top+W.bottom)/2,W.center=(W.left+W.right)/2),w.push(Am(e,W,1))),w.forEach(function(lt){var pt=lt.vertical.posInfos,dt=lt.horizontal.posInfos;_.push.apply(_,pt.filter(function(K){var it=K.guidelineInfos;return it.some(function(jt){var Ft=jt.guideline;return!Ft.hide})}).map(function(K){return{type:"snap",pos:K.pos}})),m.push.apply(m,dt.filter(function(K){var it=K.guidelineInfos;return it.some(function(jt){var Ft=jt.guideline;return!Ft.hide})}).map(function(K){return{type:"snap",pos:K.pos}})),b.push.apply(b,zm(pt)),y.push.apply(y,zm(dt))})}Gm(e,[x,M],[I,B],_,m),G&&Gm(e,[W.left,W.right],[W.top,W.bottom],_,m,c.externalBounds);var et=Lt(Lt([],b),y),rt=et.filter(function(lt){return lt.element&&!lt.gapRects}),gt=et.filter(function(lt){return lt.gapRects});return Et(e,"onSnap",{guidelines:et.filter(function(lt){var pt=lt.element;return!pt}),elements:rt,gaps:gt},!0),Lt(Lt(Lt(Lt(Lt(Lt([],Kut(e,rt,[h,v],L,t)),Yut(e,gt,[h,v],L,t)),Bm(e,"horizontal",y,[a,n],L,t)),Bm(e,"vertical",b,[a,n],L,t)),Rm(e,"horizontal",m,h,n,T,0,t)),Rm(e,"vertical",_,v,a,A,1,t))},dragStart:function(e,t){e.state.snapRenderInfo={request:t.isRequest,snap:!0,center:!0},Cc(e)},drag:function(e){var t=e.state;t.guidelines=xh(e)},pinchStart:function(e){this.unset(e)},dragEnd:function(e){this.unset(e)},dragControlCondition:function(e,t){if(ao(e,t)||Rh(e,t))return!0;if(!t.isRequest&&t.inputEvent)return Qr(t.inputEvent.target,Kt("snap-control"))},dragControlStart:function(e){e.state.snapRenderInfo=null,Cc(e)},dragControl:function(e){this.drag(e)},dragControlEnd:function(e){this.unset(e)},dragGroupStart:function(e,t){this.dragStart(e,t)},dragGroup:function(e){this.drag(e)},dragGroupEnd:function(e){this.unset(e)},dragGroupControlStart:function(e){e.state.snapRenderInfo=null,Cc(e)},dragGroupControl:function(e){this.drag(e)},dragGroupControlEnd:function(e){this.unset(e)},unset:function(e){var t=e.state;t.enableSnap=!1,t.guidelines=[],t.snapRenderInfo=null,t.elementRects=[]}},sr={name:"draggable",props:{draggable:Boolean,throttleDrag:Number,throttleDragRotate:Number,startDragRotate:Number,edgeDraggable:Boolean},events:{onDragStart:"dragStart",onDrag:"drag",onDragEnd:"dragEnd",onDragGroupStart:"dragGroupStart",onDragGroup:"dragGroup",onDragGroupEnd:"dragGroupEnd"},render:function(e,t){var r=e.props,n=r.throttleDragRotate,a=r.zoom,i=e.state,s=i.dragInfo,u=i.beforeOrigin;if(!n||!s)return[];var f=s.dist;if(!f[0]&&!f[1])return[];var c=tn(f),h=Te(f,[0,0]);return[t.createElement("div",{className:Kt("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:c+"px",transform:"translate("+u[0]+"px, "+u[1]+"px) rotate("+h+"rad) scaleY("+a+")"}})]},dragStart:function(e,t){var r=t.datas,n=t.parentEvent,a=t.parentGesto,i=e.state,s=i.target,u=i.gesto;if(u)return!1;i.gesto=a||e.targetGesto;var f=pr(s);r.datas={},r.left=parseFloat(f.left||"")||0,r.top=parseFloat(f.top||"")||0,r.bottom=parseFloat(f.bottom||"")||0,r.right=parseFloat(f.right||"")||0,r.startValue=[0,0],ui(e,t),Bf(t,"translate"),sft(e,r),r.prevDist=[0,0],r.prevBeforeDist=[0,0],r.isDrag=!1,r.deltaOffset=[0,0],r.distOffset=[0,0];var c=te(e,t,J({set:function(v){r.startValue=v}},Rf(t))),h=n||Et(e,"onDragStart",c);return h!==!1?(r.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}):(i.gesto=null,r.isPinch=!1),r.isDrag?c:!1},drag:function(e,t){if(!!t){xf(t,"translate");var r=t.datas,n=t.parentEvent,a=t.parentFlag,i=t.isPinch,s=t.isRequest,u=t.distX,f=t.distY,c=r.isDrag,h=r.prevDist,v=r.prevBeforeDist,p=r.startValue,g=r.distOffset;if(!!c){u+=g[0],f+=g[1];var _=e.props,m=_.parentMoveable,b=n?0:_.throttleDrag||0,y=n?0:_.throttleDragRotate||0,w=!1,O=0;if(!n&&y>0&&(u||f)){var T=_.startDragRotate||0,A=ie(T+Te([0,0],[u,f])*180/Math.PI,y)-T,I=f*Math.abs(Math.cos((A-90)/180*Math.PI)),x=u*Math.abs(Math.cos(A/180*Math.PI)),B=tn([x,I]);O=A*Math.PI/180,u=B*Math.cos(O),f=B*Math.sin(O)}if(!i&&!n&&!a&&(!y||u||f)){var M=Zut(e,u,f,y,s,r),L=M[0],G=M[1],W=L.isSnap,at=L.isBound,et=L.offset,rt=G.isSnap,gt=G.isBound,lt=G.offset;w=W||rt||at||gt,u+=et,f+=lt}var pt=Qt(vw({datas:r,distX:u,distY:f}),p),dt=Qt(put({datas:r,distX:u,distY:f}),p);!y&&!w&&(cm(dt,b),cm(pt,b));var K=qt(pt,p),it=qt(dt,p),jt=qt(it,h),Ft=qt(K,v);r.prevDist=it,r.prevBeforeDist=K,r.passDelta=jt,r.passDist=it;var Vt=r.left+K[0],_t=r.top+K[1],It=r.right-K[0],$e=r.bottom-K[1],ee=If(r,"translate("+dt[0]+"px, "+dt[1]+"px)","translate("+it[0]+"px, "+it[1]+"px)");if(_p(t,ee),e.state.dragInfo.dist=n?[0,0]:it,!(!n&&!m&&jt.every(function(Ht){return!Ht})&&Ft.some(function(Ht){return!Ht}))){var Ct=e.state,Ie=Ct.width,ve=Ct.height,le=te(e,t,{transform:ee,dist:it,delta:jt,translate:dt,beforeDist:K,beforeDelta:Ft,beforeTranslate:pt,left:Vt,top:_t,right:It,bottom:$e,width:Ie,height:ve,isPinch:i});return!n&&Et(e,"onDrag",le),le}}}},dragAfter:function(e,t){var r=t.datas,n=t.datas,a=n.deltaOffset,i=n.distOffset;return a[0]||a[1]?(r.deltaOffset=[0,0],i[0]=a[0],i[1]=a[1],this.drag(e,t)):!1},dragEnd:function(e,t){var r=t.parentEvent,n=t.datas;if(e.state.gesto=null,e.state.dragInfo=null,!!n.isDrag){n.isDrag=!1;var a=Mr(e,t,{});return!r&&Et(e,"onDragEnd",a),a}},dragGroupStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=this.dragStart(e,t);if(!i)return!1;var s=Ec(e,this,"dragStart",[n||0,a||0],t,!1),u=J(J({},i),{targets:e.props.targets,events:s}),f=Et(e,"onDragGroupStart",u);return r.isDrag=f!==!1,r.isDrag?i:!1},dragGroup:function(e,t){var r=t.datas;if(!!r.isDrag){var n=this.drag(e,t),a=t.datas.passDelta,i=Ec(e,this,"drag",a,t,!1);if(!!n){var s=J({targets:e.props.targets,events:i},n);return Et(e,"onDragGroup",s),s}}},dragGroupEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isDrag){this.dragEnd(e,t);var a=Ec(e,this,"dragEnd",[0,0],t,!1);return Et(e,"onDragGroupEnd",Mr(e,t,{targets:e.props.targets,events:a})),r}},request:function(e){var t={},r=e.getRect(),n=0,a=0;return{isControl:!1,requestStart:function(){return{datas:t}},request:function(i){return"x"in i?n=i.x-r.left:"deltaX"in i&&(n+=i.deltaX),"y"in i?a=i.y-r.top:"deltaY"in i&&(a+=i.deltaY),{datas:t,distX:n,distY:a}},requestEnd:function(){return{datas:t,isDrag:!0}}}},unset:function(e){e.state.dragInfo=null}};function wp(e,t,r,n){n===void 0&&(n="");var a=e.state,i=a.renderPoses,s=a.rotation,u=a.direction,f=e.props,c=f.renderDirections,h=c===void 0?t:c,v=f.zoom,p={};if(!h)return[];var g=u>0?1:-1,_=h===!0?rw:h,m=s/Math.PI*180;return _.forEach(function(b){p[b]=!0}),_.map(function(b){var y=qot[b];if(!y||!p[b])return null;var w=(ie(m,15)+g*Uot[b]+720)%180;return r.createElement("div",{className:Kt("control","direction",b,n),"data-rotation":w,"data-direction":b,key:"direction-"+b,style:sw.apply(void 0,Lt([s,v],y.map(function(O){return i[O]})))})})}function Ri(e,t,r,n,a,i){for(var s=[],u=6;u<arguments.length;u++)s[u-6]=arguments[u];var f=Te(r,n),c=t?ie(f/Math.PI*180,15)%180:-1;return e.createElement("div",{key:"line"+i,className:Kt.apply(void 0,Lt(["line","direction",t],s)),"data-rotation":c,"data-line-index":i,"data-direction":t,style:Ls(r,n,a,f)})}function Sp(e,t){return wp(e,rw,t)}function Pw(e,t){return wp(e,["nw","ne","sw","se"],t)}function Oc(e,t,r,n,a,i){var s=e.state.is3d?4:3,u=Je(e.state.rootMatrix,a,s),f=Qt([i.left,i.top],u);t.startAbsoluteOrigin=f,t.prevDeg=Te(f,[r,n])/Math.PI*180,t.prevSnapDeg=t.prevDeg,t.startDeg=t.prevDeg,t.loop=0}function Ac(e,t,r,n,a,i){var s=r.prevDeg,u=Mw(e,t,r.origin,n);r.prevDeg=u;var f=u-s;return[f,u,i+u]}function Ru(e,t,r,n,a,i,s,u){var f=r.prevDeg,c=r.prevSnapDeg,h=r.startDeg,v=r.loop;f>n&&f>270&&n<90?++r.loop:f<n&&f<90&&n>270&&--r.loop;var p=r.loop,g=v*360+c-h+i,_=p*360+n-h+i;r.prevDeg=_-p*360+h-i,_=ie(_,s);var m=a*(_-i);u&&(m=Mw(e,t,r.origin,m),_=m/a+i),r.prevSnapDeg=_-p*360+h-i;var b=a*(_-g);return[b,m,i+m]}function Tc(e,t,r,n,a,i,s,u){return Ru(e,t,r,Te(r.startAbsoluteOrigin,[a,i])/Math.PI*180,n,s,u,!0)}function uft(e,t,r){var n=t[0],a=t[1],i=t[2],s=t[3];if(e!=="none"){var u=(e||"top").split("-"),f=u[0],c=u[1],h=[n,a];f==="left"?h=[i,n]:f==="right"?h=[a,s]:f==="bottom"&&(h=[s,i]);var v=[(h[0][0]+h[1][0])/2,(h[0][1]+h[1][1])/2],p=uw(h,r);if(c){var g=c==="top"||c==="left",_=f==="bottom"||f==="left";v=h[g&&!_||!g&&_?0:1]}return[v,p]}}function Rh(e,t){if(t.isRequest)return t.requestAble==="rotatable";var r=t.inputEvent.target;if(Qr(r,Kt("rotation-control")))return!0;var n=e.props.rotationTarget;return n?lw(n,!0).some(function(a){return a?r===a||r.contains(a):!1}):!1}var fft={name:"rotatable",canPinch:!0,props:{rotatable:Boolean,rotationPosition:String,throttleRotate:Number,renderDirections:Object,rotationTarget:Object},events:{onRotateStart:"rotateStart",onRotate:"rotate",onRotateEnd:"rotateEnd",onRotateGroupStart:"rotateGroupStart",onRotateGroup:"rotateGroup",onRotateGroupEnd:"rotateGroupEnd"},css:[`.rotation {
|
|
position: absolute;
|
|
height: 40px;
|
|
width: 1px;
|
|
transform-origin: 50% 100%;
|
|
height: calc(40px * var(--zoom));
|
|
top: auto;
|
|
left: 0;
|
|
bottom: 100%;
|
|
will-change: transform;
|
|
}
|
|
.rotation .rotation-line {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
transform-origin: 50% 50%;
|
|
}
|
|
.rotation .rotation-control {
|
|
border-color: #4af;
|
|
border-color: var(--moveable-color);
|
|
background:#fff;
|
|
cursor: alias;
|
|
}`],render:function(e,t){var r=e.props,n=r.rotatable,a=r.rotationPosition,i=r.zoom,s=r.renderDirections,u=e.state,f=u.renderPoses,c=u.direction;if(!n)return null;var h=uft(a,f,c),v=[];if(h){var p=h[0],g=h[1];v.push(t.createElement("div",{key:"rotation",className:Kt("rotation"),style:{transform:"translate(-50%) translate("+p[0]+"px, "+p[1]+"px) rotate("+g+"rad)"}},t.createElement("div",{className:Kt("line rotation-line"),style:{transform:"scaleX("+i+")"}}),t.createElement("div",{className:Kt("control rotation-control"),style:{transform:"translate(0.5px) scale("+i+")"}})))}return s&&v.push.apply(v,wp(e,[],t)),v},dragControlCondition:Rh,dragControlStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=t.parentRotate,s=t.parentFlag,u=t.isPinch,f=t.isRequest,c=e.state,h=c.target,v=c.left,p=c.top,g=c.origin,_=c.beforeOrigin,m=c.direction,b=c.beforeDirection,y=c.targetTransform,w=c.moveableClientRect;if(!f&&!h)return!1;var O=e.getRect();if(r.rect=O,r.transform=y,r.left=v,r.top=p,r.fixedPosition=$w(e,mw(e)),r.absoluteInfo={origin:O.origin,startValue:O.rotation},Oc(e,r.absoluteInfo,n,a,g,w),f||u||s){var T=i||0;r.beforeInfo={origin:O.beforeOrigin,prevDeg:T,startDeg:T,prevSnapDeg:T,loop:0},r.afterInfo={origin:O.origin,prevDeg:T,startDeg:T,prevSnapDeg:T,loop:0}}else r.beforeInfo={origin:O.beforeOrigin},r.afterInfo={origin:O.origin},Oc(e,r.beforeInfo,n,a,_,w),Oc(e,r.afterInfo,n,a,g,w);r.direction=m,r.beforeDirection=b,r.startValue=0,r.datas={},Bf(t,"rotate");var A=te(e,t,J(J({set:function(x){r.startValue=x*Math.PI/180}},Rf(t)),{dragStart:sr.dragStart(e,new Eo().dragStart([0,0],t))})),I=Et(e,"onRotateStart",A);return r.isRotate=I!==!1,e.state.snapRenderInfo={request:t.isRequest},r.isRotate?A:!1},dragControl:function(e,t){var r,n,a,i,s,u,f,c,h,v=t.datas,p=t.clientX,g=t.clientY,_=t.parentRotate,m=t.parentFlag,b=t.isPinch,y=t.groupDelta,w=v.beforeDirection,O=v.beforeInfo,T=v.afterInfo,A=v.absoluteInfo,I=v.isRotate,x=v.startValue,B=v.rect;if(!!I){xf(t,"rotate");var M=vut(t),L=w*M,G=e.props,W=G.throttleRotate,at=W===void 0?0:W,et=G.parentMoveable,rt,gt,lt,pt,dt,K,it,jt,Ft,Vt=180/Math.PI*x,_t=A.startValue;if(!m&&"parentDist"in t){var It=t.parentDist;r=Ac(e,B,T,It,L,Vt),rt=r[0],gt=r[1],lt=r[2],n=Ac(e,B,O,It,w,Vt),pt=n[0],dt=n[1],K=n[2],a=Ac(e,B,A,It,L,_t),it=a[0],jt=a[1],Ft=a[2]}else b||m?(i=Ru(e,B,T,_,L,Vt,at),rt=i[0],gt=i[1],lt=i[2],s=Ru(e,B,O,_,w,Vt,at),pt=s[0],dt=s[1],K=s[2],u=Ru(e,B,A,_,L,_t,at),it=u[0],jt=u[1],Ft=u[2]):(f=Tc(e,B,T,L,p,g,Vt,at),rt=f[0],gt=f[1],lt=f[2],c=Tc(e,B,O,w,p,g,Vt,at),pt=c[0],dt=c[1],K=c[2],h=Tc(e,B,A,L,p,g,_t,at),it=h[0],jt=h[1],Ft=h[2]);if(!(!it&&!rt&&!pt&&!et)){var $e=If(v,"rotate("+lt+"deg)","rotate("+gt+"deg)"),ee=wut(e,gt,v.fixedPosition,v),Ct=qt(Qt(y||[0,0],ee),v.prevInverseDist||[0,0]);v.prevInverseDist=ee;var Ie=te(e,t,J({delta:rt,dist:gt,rotate:lt,beforeDist:dt,beforeDelta:pt,beforeRotate:K,absoluteDist:jt,absoluteDelta:it,absoluteRotate:Ft,isPinch:!!b},gw(e,$e,Ct,b,t)));return Et(e,"onRotate",Ie),Ie}}},dragControlEnd:function(e,t){var r=t.datas;if(!!r.isRotate){r.isRotate=!1;var n=Mr(e,t,{});return Et(e,"onRotateEnd",n),n}},dragGroupControlCondition:Rh,dragGroupControlStart:function(e,t){var r=t.datas,n=e.state,a=n.left,i=n.top,s=n.beforeOrigin,u=this.dragControlStart(e,t);if(!u)return!1;u.set(r.beforeDirection*e.rotation);var f=qn(e,this,"dragControlStart",t,function(v,p){var g=v.state,_=g.left,m=g.top,b=g.beforeOrigin,y=Qt(qt([_,m],[a,i]),qt(b,s));return p.datas.groupClient=y,J(J({},p),{parentRotate:0})}),c=J(J({},u),{targets:e.props.targets,events:f}),h=Et(e,"onRotateGroupStart",c);return r.isRotate=h!==!1,r.isRotate?u:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isRotate){var n=this.dragControl(e,t);if(!!n){var a=r.beforeDirection,i=n.beforeDist,s=n.beforeDelta,u=s/180*Math.PI,f=qn(e,this,"dragControl",t,function(h,v){var p=v.datas.groupClient,g=p[0],_=p[1],m=ha([g,_],u*a),b=m[0],y=m[1],w=[b-g,y-_];return v.datas.groupClient=[b,y],J(J({},v),{parentRotate:i,groupDelta:w})});e.rotation=a*n.beforeRotate;var c=J({targets:e.props.targets,events:f,set:function(h){e.rotation=h}},n);return Et(e,"onRotateGroup",c),c}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isRotate){this.dragControlEnd(e,t);var a=qn(e,this,"dragControlEnd",t),i=Mr(e,t,{targets:e.props.targets,events:a});return Et(e,"onRotateGroupEnd",i),r}},request:function(e){var t={},r=0,n=e.getRotation();return{isControl:!0,requestStart:function(){return{datas:t}},request:function(a){return"deltaRotate"in a?r+=a.deltaRotate:"rotate"in a&&(r=a.rotate-n),{datas:t,parentDist:r}},requestEnd:function(){return{datas:t,isDrag:!0}}}}},lft={name:"resizable",ableGroup:"size",canPinch:!0,props:{resizable:Boolean,throttleResize:Number,renderDirections:Array,keepRatio:Boolean},events:{onResizeStart:"resizeStart",onResize:"resize",onResizeEnd:"resizeEnd",onResizeGroupStart:"resizeGroupStart",onResizeGroup:"resizeGroup",onResizeGroupEnd:"resizeGroupEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.edge;if(n)return a?Pw(e,t):Sp(e,t)},dragControlCondition:ao,dragControlStart:function(e,t){var r,n=t.inputEvent,a=t.isPinch,i=t.parentDirection,s=t.datas,u=t.parentFlag,f=i||(a?[0,0]:dp(n.target)),c=e.state,h=c.target,v=c.width,p=c.height;if(!f||!h)return!1;!a&&ui(e,t),s.datas={},s.direction=f,s.startOffsetWidth=v,s.startOffsetHeight=p,s.prevWidth=0,s.prevHeight=0,r=tut(h),s.startWidth=r[0],s.startHeight=r[1];var g=[Math.max(0,v-s.startWidth),Math.max(0,p-s.startHeight)];if(s.minSize=g,s.maxSize=[1/0,1/0],!u){var _=pr(h),m=_.position,b=_.minWidth,y=_.minHeight,w=_.maxWidth,O=_.maxHeight,T=m==="static"||m==="relative",A=T?h.parentElement:h.offsetParent,I=v,x=p;if(A&&(I=A.clientWidth,x=A.clientHeight,T)){var B=pr(A);I-=parseFloat(B.paddingLeft)||0,x-=parseFloat(B.paddingTop)||0}s.minSize=Qt([Ze(b,I)||0,Ze(y,x)||0],g),s.maxSize=Qt([Ze(w,I)||1/0,Ze(O,x)||1/0],g)}var M=e.props.transformOrigin||"% %";s.transformOrigin=M&&en(M)?M.split(" "):M,s.isWidth=!f[0]&&!f[1]||f[0]||!f[1];function L(et){s.ratio=et&&isFinite(et)?et:0}function G(et){s.fixedDirection=et,s.fixedPosition=Fi(e,et)}L(v/p),G([-f[0],-f[1]]);var W=te(e,t,{direction:f,set:function(et){var rt=et[0],gt=et[1];s.startWidth=rt,s.startHeight=gt},setMin:function(et){s.minSize=et},setMax:function(et){s.maxSize=[et[0]||1/0,et[1]||1/0]},setRatio:L,setFixedDirection:G,setOrigin:function(et){s.transformOrigin=et},dragStart:sr.dragStart(e,new Eo().dragStart([0,0],t))}),at=Et(e,"onResizeStart",W);return at!==!1&&(s.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:f}),s.isResize?W:!1},dragControl:function(e,t){var r,n=t.datas,a=t.distX,i=t.distY,s=t.parentFlag,u=t.isPinch,f=t.parentDistance,c=t.parentScale,h=t.parentKeepRatio,v=t.dragClient,p=t.parentDist,g=t.isRequest,_=n.isResize,m=n.transformOrigin,b=n.fixedDirection,y=n.startWidth,w=n.startHeight,O=n.prevWidth,T=n.prevHeight,A=n.minSize,I=n.maxSize,x=n.ratio,B=n.isWidth,M=n.startOffsetWidth,L=n.startOffsetHeight;if(!!_){var G=e.props,W=G.throttleResize,at=W===void 0?0:W,et=G.parentMoveable,rt=G.snapThreshold,gt=rt===void 0?5:rt,lt=n.direction,pt=lt,dt=0,K=0;!lt[0]&&!lt[1]&&(pt=[1,1]);var it=x&&(e.props.keepRatio||h),jt=v;if(v||(!s&&u?jt=Fi(e,[0,0]):jt=n.fixedPosition),p)dt=p[0],K=p[1],it&&(dt?K||(K=dt/x):dt=K*x);else if(c)dt=(c[0]-1)*M,K=(c[1]-1)*L;else if(u)f&&(dt=f,K=f*L/M);else{var Ft=Mn({datas:n,distX:a,distY:i});if(dt=pt[0]*Ft[0],K=pt[1]*Ft[1],it&&M&&L){var Vt=Te([0,0],Ft),_t=Te([0,0],pt),It=tn([dt,K]),$e=Math.cos(Vt-_t)*It;if(!pt[0])K=$e,dt=K/x;else if(!pt[1])dt=$e,K=dt*x;else{var ee=pt[0]*2*M,Ct=pt[1]*2*L,Ie=tn([ee+Ft[0],Ct+Ft[1]])-tn([ee,Ct]),ve=Te([0,0],[x,1]);dt=Math.cos(ve)*Ie,K=Math.sin(ve)*Ie}}else if(!it){var le=Lt([],lt);M||(Ft[0]<0?le[0]=-1:Ft[0]>0&&(le[0]=1)),L||(Ft[1]<0?le[1]=-1:Ft[1]>0&&(le[1]=1)),lt=le,pt=le,dt=pt[0]*Ft[0],K=pt[1]*Ft[1]}}var Ht=pt[0]||it?Math.max(M+dt,Tr):M,yt=pt[1]||it?Math.max(L+K,Tr):L;it&&M&&L&&(B?yt=Ht/x:Ht=yt*x);var wt=[0,0];if(u||(wt=aft(e,Ht,yt,lt,jt,g,n)),p&&(!p[0]&&(wt[0]=0),!p[1]&&(wt[1]=0)),it){pt[0]&&pt[1]&&wt[0]&&wt[1]&&(Math.abs(wt[0])>Math.abs(wt[1])?wt[1]=0:wt[0]=0);var pe=!wt[0]&&!wt[1];pe&&(B?Ht=ie(Ht,at):yt=ie(yt,at)),pt[0]&&!pt[1]||wt[0]&&!wt[1]||pe&&B?(Ht+=wt[0],yt=Ht/x):(!pt[0]&&pt[1]||!wt[0]&&wt[1]||pe&&!B)&&(yt+=wt[1],Ht=yt*x)}else M+dt<-gt&&(wt[0]=0),M+K<-gt&&(wt[1]=0),Ht+=wt[0],yt+=wt[1],wt[0]||(Ht=ie(Ht,at)),wt[1]||(yt=ie(yt,at));r=wst([Ht,yt],A,I,it),Ht=r[0],yt=r[1],Ht=Math.round(Ht),yt=Math.round(yt),dt=Ht-M,K=yt-L;var Se=[dt-O,K-T];n.prevWidth=dt,n.prevHeight=K;var Ut=Sut(e,Ht,yt,b,jt,m);if(!(!et&&Se.every(function(ze){return!ze})&&Ut.every(function(ze){return!ze}))){var zt=te(e,t,{width:y+dt,height:w+K,offsetWidth:Ht,offsetHeight:yt,direction:lt,dist:[dt,K],delta:Se,isPinch:!!u,drag:sr.drag(e,Pf(t,e.state,Ut,!!u,!1))});return Et(e,"onResize",zt),zt}}},dragControlAfter:function(e,t){var r=t.datas,n=r.isResize,a=r.startOffsetWidth,i=r.startOffsetHeight,s=r.prevWidth,u=r.prevHeight;if(!!n){var f=e.state,c=f.width,h=f.height,v=c-(a+s),p=h-(i+u),g=Math.abs(v)>3,_=Math.abs(p)>3;if(g&&(r.startWidth+=v,r.startOffsetWidth+=v,r.prevWidth+=v),_&&(r.startHeight+=p,r.startOffsetHeight+=p,r.prevHeight+=p),g||_)return this.dragControl(e,t)}},dragControlEnd:function(e,t){var r=t.datas;if(!!r.isResize){r.isResize=!1;var n=Mr(e,t,{});return Et(e,"onResizeEnd",n),n}},dragGroupControlCondition:ao,dragGroupControlStart:function(e,t){var r=t.datas,n=this.dragControlStart(e,t);if(!n)return!1;var a=ba(e,"resizable",t);function i(c,h){var v=r.fixedDirection,p=r.fixedPosition,g=Fi(c,v),_=or(zi(-e.rotation/180*Math.PI,3),[g[0]-p[0],g[1]-p[1],1],3),m=_[0],b=_[1];return h.datas.originalX=m,h.datas.originalY=b,h}var s=qn(e,this,"dragControlStart",t,function(c,h){return i(c,h)}),u=J(J({},n),{targets:e.props.targets,events:s,setFixedDirection:function(c){n.setFixedDirection(c),s.forEach(function(h,v){h.setFixedDirection(c),i(e.moveables[v],a[v])})}}),f=Et(e,"onResizeGroupStart",u);return r.isResize=f!==!1,r.isResize?n:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isResize){var n=this.dragControl(e,t);if(!!n){var a=n.offsetWidth,i=n.offsetHeight,s=n.dist,u=e.props.keepRatio,f=[a/(a-s[0]),i/(i-s[1])],c=r.fixedPosition,h=qn(e,this,"dragControl",t,function(p,g){var _=or(zi(e.rotation/180*Math.PI,3),[g.datas.originalX*f[0],g.datas.originalY*f[1],1],3),m=_[0],b=_[1];return J(J({},g),{parentDist:null,parentScale:f,dragClient:Qt(c,[m,b]),parentKeepRatio:u})}),v=J({targets:e.props.targets,events:h},n);return Et(e,"onResizeGroup",v),v}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isResize){this.dragControlEnd(e,t);var a=qn(e,this,"dragControlEnd",t),i=Mr(e,t,{targets:e.props.targets,events:a});return Et(e,"onResizeGroupEnd",i),r}},request:function(e){var t={},r=0,n=0,a=e.getRect();return{isControl:!0,requestStart:function(i){return{datas:t,parentDirection:i.direction||[1,1]}},request:function(i){return"offsetWidth"in i?r=i.offsetWidth-a.offsetWidth:"deltaWidth"in i&&(r+=i.deltaWidth),"offsetHeight"in i?n=i.offsetHeight-a.offsetHeight:"deltaHeight"in i&&(n+=i.deltaHeight),{datas:t,parentDist:[r,n]}},requestEnd:function(){return{datas:t,isDrag:!0}}}}},cft={name:"scalable",ableGroup:"size",canPinch:!0,props:{scalable:Boolean,throttleScale:Number,renderDirections:String,keepRatio:Boolean},events:{onScaleStart:"scaleStart",onScale:"scale",onScaleEnd:"scaleEnd",onScaleGroupStart:"scaleGroupStart",onScaleGroup:"scaleGroup",onScaleGroupEnd:"scaleGroupEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.scalable,i=r.edge;if(!n&&a)return i?Pw(e,t):Sp(e,t)},dragControlCondition:ao,dragControlStart:function(e,t){var r=t.datas,n=t.isPinch,a=t.inputEvent,i=t.parentDirection,s=i||(n?[0,0]:dp(a.target)),u=e.state,f=u.width,c=u.height,h=u.targetTransform,v=u.target,p=u.pos1,g=u.pos2,_=u.pos4;if(!s||!v)return!1;n||ui(e,t),r.datas={},r.transform=h,r.prevDist=[1,1],r.direction=s,r.width=f,r.height=c,r.startValue=[1,1];var m=jn(p,g),b=jn(g,_),y=!s[0]&&!s[1]||s[0]||!s[1];r.scaleWidth=m,r.scaleHeight=b,r.scaleXRatio=m/f,r.scaleYRatio=b/c,Bf(t,"scale"),r.isWidth=y;function w(I){r.ratio=I&&isFinite(I)?I:0}function O(I){r.fixedDirection=I,r.fixedPosition=Fi(e,I)}w(jn(p,g)/jn(g,_)),O([-s[0],-s[1]]);var T=te(e,t,J(J({direction:s,set:function(I){r.startValue=I},setRatio:w,setFixedDirection:O},Rf(t)),{dragStart:sr.dragStart(e,new Eo().dragStart([0,0],t))})),A=Et(e,"onScaleStart",T);return A!==!1&&(r.isScale=!0,e.state.snapRenderInfo={request:t.isRequest,direction:s}),r.isScale?T:!1},dragControl:function(e,t){xf(t,"scale");var r=t.datas,n=t.distX,a=t.distY,i=t.parentScale,s=t.parentDistance,u=t.parentKeepRatio,f=t.parentFlag,c=t.isPinch,h=t.dragClient,v=t.parentDist,p=t.isRequest,g=r.prevDist,_=r.direction,m=r.width,b=r.height,y=r.isScale,w=r.startValue,O=r.isWidth,T=r.ratio,A=r.fixedDirection,I=r.scaleXRatio,x=r.scaleYRatio;if(!y)return!1;var B=e.props,M=B.throttleScale,L=B.parentMoveable,G=_;!_[0]&&!_[1]&&(G=[1,1]);var W=T&&(e.props.keepRatio||u),at=e.state,et=1,rt=1,gt=h;if(h||(!f&&c?gt=Fi(e,[0,0]):gt=r.fixedPosition),v)et=(m+v[0])/m,rt=(b+v[1])/b;else if(i)et=i[0],rt=i[1];else if(c)s&&(et=(m+s)/m,rt=(b+s*b/m)/b);else{var lt=Mn({datas:r,distX:n,distY:a}),pt=G[0]*lt[0]*I,dt=G[1]*lt[1]*x;if(W&&m&&b)if(!G[0])pt=dt*T;else if(!G[1])dt=pt/T;else{var K=tn([pt,dt]),it=Te([0,0],lt),jt=Te([0,0],G),Ft=Math.cos(it-jt)*K,Vt=Te([0,0],[T,1]);pt=Math.cos(Vt)*Ft,dt=Math.sin(Vt)*Ft}et=(m+pt/I)/m,rt=(b+dt/x)/b}et=G[0]||W?et*w[0]:w[0],rt=G[1]||W?rt*w[1]:w[1],et===0&&(et=(g[0]>0?1:-1)*yu),rt===0&&(rt=(g[1]>0?1:-1)*yu);var _t=[et/w[0],rt/w[1]],It=[et,rt];if(!c&&e.props.groupable){var $e=at.snapRenderInfo||{},ee=$e.direction;si(ee)&&(ee[0]||ee[1])&&(at.snapRenderInfo={direction:_,request:t.isRequest})}var Ct=[0,0];if(c||(Ct=ift(e,_t,_,p,r)),W){G[0]&&G[1]&&Ct[0]&&Ct[1]&&(Math.abs(Ct[0]*m)>Math.abs(Ct[1]*b)?Ct[1]=0:Ct[0]=0);var Ie=!Ct[0]&&!Ct[1];if(Ie&&(O?_t[0]=ie(_t[0]*w[0],M)/w[0]:_t[1]=ie(_t[1]*w[1],M)/w[1]),G[0]&&!G[1]||Ct[0]&&!Ct[1]||Ie&&O){_t[0]+=Ct[0];var ve=m*_t[0]*w[0]/T;_t[1]=ve/b/w[1]}else if(!G[0]&&G[1]||!Ct[0]&&Ct[1]||Ie&&!O){_t[1]+=Ct[1];var le=b*_t[1]*w[1]*T;_t[0]=le/m/w[0]}}else _t[0]+=Ct[0],_t[1]+=Ct[1],Ct[0]||(_t[0]=ie(_t[0]*w[0],M)/w[0]),Ct[1]||(_t[1]=ie(_t[1]*w[1],M)/w[1]);_t[0]===0&&(_t[0]=(g[0]>0?1:-1)*yu),_t[1]===0&&(_t[1]=(g[1]>0?1:-1)*yu);var Ht=[_t[0]/g[0],_t[1]/g[1]];It=kot(_t,w);var yt=yut(e,_t,A,gt,r),wt=qt(yt,r.prevInverseDist||[0,0]);if(r.prevDist=_t,r.prevInverseDist=yt,et===g[0]&&rt===g[1]&&wt.every(function(Ut){return!Ut})&&!L)return!1;var pe=If(r,"scale("+It.join(", ")+")","scale("+_t.join(", ")+")"),Se=te(e,t,J({offsetWidth:m,offsetHeight:b,direction:_,scale:It,dist:_t,delta:Ht,isPinch:!!c},gw(e,pe,wt,c,t)));return Et(e,"onScale",Se),Se},dragControlEnd:function(e,t){var r=t.datas,n=t.isDrag;return r.isScale?(r.isScale=!1,Et(e,"onScaleEnd",Mr(e,t,{})),n):!1},dragGroupControlCondition:ao,dragGroupControlStart:function(e,t){var r=t.datas,n=this.dragControlStart(e,t);if(!n)return!1;var a=ba(e,"resizable",t);function i(c,h){var v=r.fixedDirection,p=r.fixedPosition,g=Fi(c,v),_=or(zi(-e.rotation/180*Math.PI,3),[g[0]-p[0],g[1]-p[1],1],3),m=_[0],b=_[1];return h.datas.originalX=m,h.datas.originalY=b,h}r.moveableScale=e.scale;var s=qn(e,this,"dragControlStart",t,function(c,h){return i(c,h)}),u=J(J({},n),{targets:e.props.targets,events:s,setFixedDirection:function(c){n.setFixedDirection(c),s.forEach(function(h,v){h.setFixedDirection(c),i(e.moveables[v],a[v])})}}),f=Et(e,"onScaleGroupStart",u);return r.isScale=f!==!1,r.isScale?u:!1},dragGroupControl:function(e,t){var r=t.datas;if(!!r.isScale){var n=this.dragControl(e,t);if(!!n){var a=r.moveableScale;e.scale=[n.scale[0]*a[0],n.scale[1]*a[1]];var i=e.props.keepRatio,s=n.dist,u=n.scale,f=r.fixedPosition,c=qn(e,this,"dragControl",t,function(v,p){var g=or(zi(e.rotation/180*Math.PI,3),[p.datas.originalX*s[0],p.datas.originalY*s[1],1],3),_=g[0],m=g[1];return J(J({},p),{parentDist:null,parentScale:u,parentKeepRatio:i,dragClient:Qt(f,[_,m])})}),h=J({targets:e.props.targets,events:c},n);return Et(e,"onScaleGroup",h),h}}},dragGroupControlEnd:function(e,t){var r=t.isDrag,n=t.datas;if(!!n.isScale){this.dragControlEnd(e,t);var a=qn(e,this,"dragControlEnd",t),i=Mr(e,t,{targets:e.props.targets,events:a});return Et(e,"onScaleGroupEnd",i),r}},request:function(){var e={},t=0,r=0;return{isControl:!0,requestStart:function(n){return{datas:e,parentDirection:n.direction||[1,1]}},request:function(n){return t+=n.deltaWidth,r+=n.deltaHeight,{datas:e,parentDist:[t,r]}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function fa(e,t){return e.map(function(r,n){return gst(r,t[n],1,2)})}function Nm(e,t,r){var n=Te(e,t),a=Te(e,r),i=a-n;return i>=0?i:i+2*Math.PI}function hft(e,t){var r=Nm(e[0],e[1],e[2]),n=Nm(t[0],t[1],t[2]),a=Math.PI;return!(r>=a&&n<=a||r<=a&&n>=a)}var vft={name:"warpable",ableGroup:"size",props:{warpable:Boolean,renderDirections:Array},events:{onWarpStart:"warpStart",onWarp:"warp",onWarpEnd:"warpEnd"},render:function(e,t){var r=e.props,n=r.resizable,a=r.scalable,i=r.warpable,s=r.zoom;if(n||a||!i)return[];var u=e.state,f=u.pos1,c=u.pos2,h=u.pos3,v=u.pos4,p=fa(f,c),g=fa(c,f),_=fa(f,h),m=fa(h,f),b=fa(h,v),y=fa(v,h),w=fa(c,v),O=fa(v,c);return Lt([t.createElement("div",{className:Kt("line"),key:"middeLine1",style:Ls(p,b,s)}),t.createElement("div",{className:Kt("line"),key:"middeLine2",style:Ls(g,y,s)}),t.createElement("div",{className:Kt("line"),key:"middeLine3",style:Ls(_,w,s)}),t.createElement("div",{className:Kt("line"),key:"middeLine4",style:Ls(m,O,s)})],Sp(e,t))},dragControlCondition:function(e,t){return t.isRequest?!1:Qr(t.inputEvent.target,Kt("direction"))},dragControlStart:function(e,t){var r=t.datas,n=t.inputEvent,a=e.props.target,i=n.target,s=dp(i);if(!s||!a)return!1;var u=e.state,f=u.transformOrigin,c=u.is3d,h=u.targetTransform,v=u.targetMatrix,p=u.width,g=u.height,_=u.left,m=u.top;r.datas={},r.targetTransform=h,r.warpTargetMatrix=c?v:Hn(v,3,4),r.targetInverseMatrix=Hy($n(r.warpTargetMatrix,4),3,4),r.direction=s,r.left=_,r.top=m,r.poses=[[0,0],[p,0],[0,g],[p,g]].map(function(w){return qt(w,f)}),r.nextPoses=r.poses.map(function(w){var O=w[0],T=w[1];return or(r.warpTargetMatrix,[O,T,0,1],4)}),r.startValue=Pe(4),r.prevMatrix=Pe(4),r.absolutePoses=Tn(u),r.posIndexes=pw(s),ui(e,t),Bf(t,"matrix3d"),u.snapRenderInfo={request:t.isRequest,direction:s};var b=te(e,t,J({set:function(w){r.startValue=w}},Rf(t))),y=Et(e,"onWarpStart",b);return y!==!1&&(r.isWarp=!0),r.isWarp},dragControl:function(e,t){var r=t.datas,n=t.isRequest,a=t.distX,i=t.distY,s=r.targetInverseMatrix,u=r.prevMatrix,f=r.isWarp,c=r.startValue,h=r.poses,v=r.posIndexes,p=r.absolutePoses;if(!f)return!1;if(xf(t,"matrix3d"),ls(e,"warpable")){var g=v.map(function(M){return p[M]});g.length>1&&g.push([(g[0][0]+g[1][0])/2,(g[0][1]+g[1][1])/2]);var _=zf(e,n,{horizontal:g.map(function(M){return M[1]+i}),vertical:g.map(function(M){return M[0]+a})}),m=_.horizontal,b=_.vertical;i-=m.offset,a-=b.offset}var y=Mn({datas:r,distX:a,distY:i},!0),w=r.nextPoses.slice();if(v.forEach(function(M){w[M]=Qt(w[M],y)}),!Not.every(function(M){return hft(M.map(function(L){return h[L]}),M.map(function(L){return w[L]}))}))return!1;var O=cp(h[0],h[2],h[1],h[3],w[0],w[2],w[1],w[3]);if(!O.length)return!1;var T=me(s,O,4),A=hw(r,T,!0),I=me($n(u,4),A,4);r.prevMatrix=A;var x=me(c,A,4),B=If(r,"matrix3d("+x.join(", ")+")","matrix3d("+A.join(", ")+")");return _p(t,B),Et(e,"onWarp",te(e,t,{delta:I,matrix:x,dist:A,multiply:me,transform:B})),!0},dragControlEnd:function(e,t){var r=t.datas,n=t.isDrag;return r.isWarp?(r.isWarp=!1,Et(e,"onWarpEnd",Mr(e,t,{})),n):!1}},pft=Kt("area-pieces"),Eu=Kt("area-piece"),xw=Kt("avoid");function Mc(e){var t=e.areaElement,r=e.state,n=r.width,a=r.height;Ost(t,xw),t.style.cssText+="left: 0px; top: 0px; width: "+n+"px; height: "+a+"px"}function jm(e){return e.createElement("div",{key:"area_pieces",className:pft},e.createElement("div",{className:Eu}),e.createElement("div",{className:Eu}),e.createElement("div",{className:Eu}),e.createElement("div",{className:Eu}))}var Iw={name:"dragArea",props:{dragArea:Boolean,passDragArea:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},render:function(e,t){var r=e.props,n=r.target,a=r.dragArea,i=r.groupable,s=r.passDragArea,u=e.state,f=u.width,c=u.height,h=u.renderPoses,v=s?Kt("area","pass"):Kt("area");if(i)return[t.createElement("div",{key:"area",ref:pn(e,"areaElement"),className:v}),jm(t)];if(!n||!a)return[];var p=cp([0,0],[f,0],[0,c],[f,c],h[0],h[1],h[2],h[3]),g=p.length?Tf(p,!0):"none";return[t.createElement("div",{key:"area",ref:pn(e,"areaElement"),className:v,style:{top:"0px",left:"0px",width:f+"px",height:c+"px",transformOrigin:"0 0",transform:g}}),jm(t)]},dragStart:function(e,t){var r=t.datas,n=t.clientX,a=t.clientY,i=t.inputEvent;if(!i)return!1;r.isDragArea=!1;var s=e.areaElement,u=e.state,f=u.moveableClientRect,c=u.renderPoses,h=u.rootMatrix,v=u.is3d,p=f.left,g=f.top,_=Ur(c),m=_.left,b=_.top,y=_.width,w=_.height,O=v?4:3,T=Li(h,[n-p,a-g],O),A=T[0],I=T[1];A-=m,I-=b;var x=[{left:m,top:b,width:y,height:I-10},{left:m,top:b,width:A-10,height:w},{left:m,top:b+I+10,width:y,height:w-I-10},{left:m+A+10,top:b,width:y-A-10,height:w}],B=[].slice.call(s.nextElementSibling.children);x.forEach(function(M,L){B[L].style.cssText="left: "+M.left+"px;top: "+M.top+"px; width: "+M.width+"px; height: "+M.height+"px;"}),Cst(s,xw),u.disableNativeEvent=!0},drag:function(e,t){var r=t.datas,n=t.inputEvent;if(this.enableNativeEvent(e),!n)return!1;r.isDragArea||(r.isDragArea=!0,Mc(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var r=t.inputEvent,n=t.datas;if(!r)return!1;n.isDragArea||Mc(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){Mc(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&ap(function(){t.disableNativeEvent=!1})}},dft=wo("origin",{render:function(e,t){var r=e.props.zoom,n=e.state,a=n.beforeOrigin,i=n.rotation;return[t.createElement("div",{className:Kt("control","origin"),style:sw(i,r,a),key:"beforeOrigin"})]}});function gft(e){var t=e.scrollContainer;return[t.scrollLeft,t.scrollTop]}var _ft={name:"scrollable",canPinch:!0,props:{scrollable:Boolean,scrollContainer:Object,scrollThreshold:Number,getScrollPosition:Function},events:{onScroll:"scroll",onScrollGroup:"scrollGroup"},dragRelation:"strong",dragStart:function(e,t){var r=e.props,n=r.scrollContainer,a=n===void 0?e.getContainer():n,i=new mot,s=Mf(a,!0);t.datas.dragScroll=i;var u=t.isControl?"controlGesto":"targetGesto",f=t.targets;i.on("scroll",function(c){var h=c.container,v=c.direction,p=te(e,t,{scrollContainer:h,direction:v}),g=f?"onScrollGroup":"onScroll";f&&(p.targets=f),Et(e,g,p)}).on("move",function(c){var h=c.offsetX,v=c.offsetY;e[u].scrollBy(h,v,t.inputEvent,!1)}),i.dragStart(t,{container:s})},checkScroll:function(e,t){var r=t.datas.dragScroll;if(!!r){var n=e.props,a=n.scrollContainer,i=a===void 0?e.getContainer():a,s=n.scrollThreshold,u=s===void 0?0:s,f=n.getScrollPosition,c=f===void 0?gft:f;return r.drag(t,{container:i,threshold:u,getScrollPosition:function(h){return c({scrollContainer:h.container,direction:h.direction})}}),!0}},drag:function(e,t){return this.checkScroll(e,t)},dragEnd:function(e,t){t.datas.dragScroll.dragEnd(),t.datas.dragScroll=null},dragControlStart:function(e,t){return this.dragStart(e,J(J({},t),{isControl:!0}))},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupStart:function(e,t){return this.dragStart(e,J(J({},t),{targets:e.props.targets}))},dragGroup:function(e,t){return this.drag(e,J(J({},t),{targets:e.props.targets}))},dragGroupEnd:function(e,t){return this.dragEnd(e,J(J({},t),{targets:e.props.targets}))},dragGroupControlStart:function(e,t){return this.dragStart(e,J(J({},t),{targets:e.props.targets,isControl:!0}))},dragGroupContro:function(e,t){return this.drag(e,J(J({},t),{targets:e.props.targets}))},dragGroupControEnd:function(e,t){return this.dragEnd(e,J(J({},t),{targets:e.props.targets}))}},Dw={name:"",props:{target:Object,dragTarget:Object,container:Object,portalContainer:Object,rootContainer:Object,useResizeObserver:Boolean,zoom:Number,transformOrigin:Array,edge:Boolean,ables:Array,className:String,pinchThreshold:Number,pinchOutside:Boolean,triggerAblesSimultaneously:Boolean,checkInput:Boolean,cspNonce:String,translateZ:Number,hideDefaultLines:Boolean,props:Object},events:{}},mft=wo("padding",{render:function(e,t){var r=e.props;if(r.dragArea)return[];var n=r.padding||{},a=n.left,i=a===void 0?0:a,s=n.top,u=s===void 0?0:s,f=n.right,c=f===void 0?0:f,h=n.bottom,v=h===void 0?0:h,p=e.state,g=p.renderPoses,_=p.pos1,m=p.pos2,b=p.pos3,y=p.pos4,w=[_,m,b,y],O=[];return i>0&&O.push([0,2]),u>0&&O.push([0,1]),c>0&&O.push([1,3]),v>0&&O.push([2,3]),O.map(function(T,A){var I=T[0],x=T[1],B=w[I],M=w[x],L=g[I],G=g[x],W=cp([0,0],[100,0],[0,100],[100,100],B,M,L,G);if(!!W.length)return t.createElement("div",{key:"padding"+A,className:Kt("padding"),style:{transform:Tf(W,!0)}})})}}),qm=["nw","ne","se","sw"];function Cu(e,t){var r=e[0]+e[1],n=r>t?t/r:1;return e[0]*=n,e[1]=t-e[1]*n,e}var $ft=[1,2,5,6],bft=[0,3,4,7],Ha=[1,-1,-1,1],Wa=[1,1,-1,-1];function Ep(e,t,r,n,a,i,s,u,f){i===void 0&&(i=0),s===void 0&&(s=0),u===void 0&&(u=n),f===void 0&&(f=a);var c=[],h=!1,v=e.map(function(p,g){var _=t[g],m=_.horizontal,b=_.vertical;if(b&&!h&&(h=!0,c.push("/")),h){var y=Math.max(0,b===1?p[1]-s:f-p[1]);return c.push(Jr(y,a,r)),y}else{var y=Math.max(0,m===1?p[0]-i:u-p[0]);return c.push(Jr(y,n,r)),y}});return{styles:c,raws:v}}function Rw(e){for(var t=[0,0],r=[0,0],n=e.length,a=0;a<n;++a){var i=e[a];!i.sub||(i.horizontal&&(t[1]===0&&(t[0]=a),t[1]=a-t[0]+1,r[0]=a+1),i.vertical&&(r[1]===0&&(r[0]=a),r[1]=a-r[0]+1))}return{horizontalRange:t,verticalRange:r}}function Bw(e,t,r,n,a,i){var s,u,f,c;i===void 0&&(i=[0,0]);var h=e.indexOf("/"),v=(h>-1?e.slice(0,h):e).length,p=e.slice(0,v),g=e.slice(v+1),_=p[0],m=_===void 0?"0px":_,b=p[1],y=b===void 0?m:b,w=p[2],O=w===void 0?m:w,T=p[3],A=T===void 0?y:T,I=g[0],x=I===void 0?m:I,B=g[1],M=B===void 0?x:B,L=g[2],G=L===void 0?x:L,W=g[3],at=W===void 0?M:W,et=[m,y,O,A].map(function(K){return Ze(K,t)}),rt=[x,M,G,at].map(function(K){return Ze(K,r)}),gt=et.slice(),lt=rt.slice();s=Cu([gt[0],gt[1]],t),gt[0]=s[0],gt[1]=s[1],u=Cu([gt[3],gt[2]],t),gt[3]=u[0],gt[2]=u[1],f=Cu([lt[0],lt[3]],r),lt[0]=f[0],lt[3]=f[1],c=Cu([lt[1],lt[2]],r),lt[1]=c[0],lt[2]=c[1];var pt=gt.slice(0,Math.max(i[0],p.length)),dt=lt.slice(0,Math.max(i[1],g.length));return Lt(Lt([],pt.map(function(K,it){var jt=qm[it];return{horizontal:Ha[it],vertical:0,pos:[n+K,a+(Wa[it]===-1?r:0)],sub:!0,raw:et[it],direction:jt}})),dt.map(function(K,it){var jt=qm[it];return{horizontal:0,vertical:Wa[it],pos:[n+(Ha[it]===-1?t:0),a+K],sub:!0,raw:rt[it],direction:jt}}))}function Lw(e,t,r,n,a){a===void 0&&(a=t.length);var i=Rw(e.slice(n)),s=i.horizontalRange,u=i.verticalRange,f=r-n,c=0;if(f===0)c=a;else if(f>0&&f<s[1])c=s[1]-f;else if(f>=u[0])c=u[0]+u[1]-f;else return;e.splice(r,c),t.splice(r,c)}function Fw(e,t,r,n,a,i,s,u,f,c,h){c===void 0&&(c=0),h===void 0&&(h=0);var v=Rw(e.slice(r)),p=v.horizontalRange,g=v.verticalRange;if(n>-1)for(var _=Ha[n]===1?i-c:u-i,m=p[1];m<=n;++m){var b=Wa[m]===1?h:f,y=0;if(n===m?y=i:m===0?y=c+_:Ha[m]===-1&&(y=u-(t[r][0]-c)),e.splice(r+m,0,{horizontal:Ha[m],vertical:0,pos:[y,b]}),t.splice(r+m,0,[y,b]),m===0)break}else if(a>-1){var w=Wa[a]===1?s-h:f-s;if(p[1]===0&&g[1]===0){var O=[c+w,h];e.push({horizontal:Ha[0],vertical:0,pos:O}),t.push(O)}for(var T=g[0],m=g[1];m<=a;++m){var y=Ha[m]===1?c:u,b=0;if(a===m?b=s:m===0?b=h+w:Wa[m]===1?b=t[r+T][1]:Wa[m]===-1&&(b=f-(t[r+T][1]-h)),e.push({horizontal:0,vertical:Wa[m],pos:[y,b]}),t.push([y,b]),m===0)break}}}function zw(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 yft=[[0,-1,"n"],[1,0,"e"]],wft=[[-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 Cp(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",v=f==="circle";if(f==="polygon")return r.map(function(I){return Jr(I[0],i,n)+" "+Jr(I[1],s,n)});if(h||f==="inset"){var p=r[1][1],g=r[3][0],_=r[7][0],m=r[5][1];if(h)return[p,g,m,_].map(function(I){return I+"px"});var b=[p,i-g,s-m,_].map(function(I,x){return Jr(I,x%2?i:s,n)});if(r.length>8){var y=qt(r[4],r[0]),w=y[0],O=y[1];b.push.apply(b,Lt(["round"],Ep(r.slice(8),c.slice(8),n,w,O,_,p,g,m).styles))}return b}else if(v||f==="ellipse"){var T=r[0],A=Jr(Math.abs(r[1][1]-T[1]),v?Math.sqrt((i*i+s*s)/2):s,n),b=v?[A]:[Jr(Math.abs(r[2][0]-T[0]),i,n),A];return b.push("at",Jr(T[0],i,n),Jr(T[1],s,n)),b}}function Um(e,t,r,n){var a=[n,(n+t)/2,t],i=[e,(e+r)/2,r];return wft.map(function(s){var u=s[0],f=s[1],c=s[2],h=a[u+1],v=i[f+1];return{vertical:Math.abs(f),horizontal:Math.abs(u),direction:c,pos:[h,v]}})}function km(e,t,r,n,a){var i,s,u,f,c,h,v,p=a;if(!p){var g=pr(e),_=g.clipPath;p=_!=="none"?_:g.clip}if(!((!p||p==="none"||p==="auto")&&(p=n,!p))){var m=rp(p),b=m.prefix,y=b===void 0?p:b,w=m.value,O=w===void 0?"":w,T=y==="circle",A=" ";if(y==="polygon"){var I=Ka(O||"0% 0%, 100% 0%, 100% 100%, 0% 100%");A=",";var x=I.map(function(Se){var Ut=Se.split(" "),zt=Ut[0],ze=Ut[1];return{vertical:1,horizontal:1,pos:[Ze(zt,t),Ze(ze,r)]}});return{type:y,clipText:p,poses:x,splitter:A}}else if(T||y==="ellipse"){var B="",M="",L=0,G=0,I=$a(O);if(T){var W="";i=I[0],W=i===void 0?"50%":i,s=I[2],B=s===void 0?"50%":s,u=I[3],M=u===void 0?"50%":u,L=Ze(W,Math.sqrt((t*t+r*r)/2)),G=L}else{var at="",et="";f=I[0],at=f===void 0?"50%":f,c=I[1],et=c===void 0?"50%":c,h=I[3],B=h===void 0?"50%":h,v=I[4],M=v===void 0?"50%":v,L=Ze(at,t),G=Ze(et,r)}var rt=[Ze(B,t),Ze(M,r)],x=Lt([{vertical:1,horizontal:1,pos:rt,direction:"nesw"}],yft.slice(0,T?1:2).map(function(zt){return{vertical:Math.abs(zt[1]),horizontal:zt[0],direction:zt[2],sub:!0,pos:[rt[0]+zt[0]*L,rt[1]+zt[1]*G]}}));return{type:y,clipText:p,radiusX:L,radiusY:G,left:rt[0]-L,top:rt[1]-G,poses:x,splitter:A}}else if(y==="inset"){var I=$a(O||"0 0 0 0"),gt=I.indexOf("round"),lt=(gt>-1?I.slice(0,gt):I).length,pt=I.slice(lt+1),dt=I.slice(0,lt),K=dt[0],it=dt[1],jt=it===void 0?K:it,Ft=dt[2],Vt=Ft===void 0?K:Ft,_t=dt[3],It=_t===void 0?jt:_t,$e=[K,Vt].map(function(zt){return Ze(zt,r)}),ee=$e[0],Ct=$e[1],Ie=[It,jt].map(function(zt){return Ze(zt,t)}),ve=Ie[0],le=Ie[1],Ht=t-le,yt=r-Ct,wt=Bw(pt,Ht-ve,yt-ee,ve,ee),x=Lt(Lt([],Um(ee,Ht,yt,ve)),wt);return{type:"inset",clipText:p,poses:x,top:ee,left:ve,right:Ht,bottom:yt,radius:pt,splitter:A}}else if(y==="rect"){var I=Ka(O||"0px, "+t+"px, "+r+"px, 0px");A=",";var pe=I.map(function(Ir){var Vn=_o(Ir).value;return Vn}),ee=pe[0],le=pe[1],Ct=pe[2],ve=pe[3],x=Um(ee,le,Ct,ve);return{type:"rect",clipText:p,poses:x,top:ee,right:le,bottom:Ct,left:ve,values:I,splitter:A}}}}function Sft(e,t){var r=cw(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,v=f.splitter,p=h.map(function(y){return y.pos});if(c==="polygon")p.splice(u,0,[n,a]);else if(c==="inset"){var g=$ft.indexOf(u),_=bft.indexOf(u),m=h.length;if(Fw(h,p,8,g,_,n,a,p[4][0],p[4][1],p[0][0],p[0][1]),m===h.length)return}else return;var b=Cp(e,s,p);Et(e,"onClip",te(e,t,{clipEventType:"added",clipType:c,poses:p,clipStyles:b,clipStyle:c+"("+b.join(v)+")",distX:0,distY:0}))}function Eft(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(p){return p.pos}),h=c.length;if(s==="polygon")u.splice(a,1),c.splice(a,1);else if(s==="inset"){if(a<8||(Lw(u,c,a,8,h),h===u.length))return}else return;var v=Cp(e,n,c);Et(e,"onClip",te(e,t,{clipEventType:"removed",clipType:s,poses:c,clipStyles:v,clipStyle:s+"("+v.join(f)+")",distX:0,distY:0}))}var Cft={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,v=u.allMatrix,p=u.is3d,g=u.left,_=u.top,m=u.pos1,b=u.pos2,y=u.pos3,w=u.pos4,O=u.clipPathState,T=u.snapBoundInfos,A=u.rotation;if(!f)return[];var I=km(f,c,h,a||"inset",O||n);if(!I)return[];var x=p?4:3,B=I.type,M=I.poses,L=M.map(function(yt){var wt=Je(v,yt.pos,x);return[wt[0]-g,wt[1]-_]}),G=[],W=[],at=B==="rect",et=B==="inset",rt=B==="polygon";if(at||et||rt){var gt=et?L.slice(0,8):L;W=gt.map(function(yt,wt){var pe=wt===0?gt[gt.length-1]:gt[wt-1],Se=Te(pe,yt),Ut=iw(pe,yt);return t.createElement("div",{key:"clipLine"+wt,className:Kt("line","clip-line","snap-control"),"data-clip-index":wt,style:{width:Ut+"px",transform:"translate("+pe[0]+"px, "+pe[1]+"px) rotate("+Se+"rad) scaleY("+s+")"}})})}if(G=L.map(function(yt,wt){return t.createElement("div",{key:"clipControl"+wt,className:Kt("control","clip-control","snap-control"),"data-clip-index":wt,style:{transform:"translate("+yt[0]+"px, "+yt[1]+"px) rotate("+A+"rad) scale("+s+")"}})}),et&&G.push.apply(G,L.slice(8).map(function(yt,wt){return t.createElement("div",{key:"clipRadiusControl"+wt,className:Kt("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+wt,style:{transform:"translate("+yt[0]+"px, "+yt[1]+"px) rotate("+A+"rad) scale("+s+")"}})})),B==="circle"||B==="ellipse"){var lt=I.left,pt=I.top,dt=I.radiusX,K=I.radiusY,it=qt(Je(v,[lt,pt],x),Je(v,[0,0],x)),jt=it[0],Ft=it[1],Vt="none";if(!i){for(var _t=Math.max(10,dt/5,K/5),It=[],$e=0;$e<=_t;++$e){var ee=Math.PI*2/_t*$e;It.push([dt+(dt-s)*Math.cos(ee),K+(K-s)*Math.sin(ee)])}It.push([dt,-2]),It.push([-2,-2]),It.push([-2,K*2+2]),It.push([dt*2+2,K*2+2]),It.push([dt*2+2,-2]),It.push([dt,-2]),Vt="polygon("+It.map(function(yt){return yt[0]+"px "+yt[1]+"px"}).join(", ")+")"}G.push(t.createElement("div",{key:"clipEllipse",className:Kt("clip-ellipse","snap-control"),style:{width:dt*2+"px",height:K*2+"px",clipPath:Vt,transform:"translate("+(-g+jt)+"px, "+(-_+Ft)+"px) "+Tf(v)}}))}if(i){var Ct=Ur(Lt([m,b,y,w],L)),Ie=Ct.width,ve=Ct.height,le=Ct.left,Ht=Ct.top;if(rt||at||et){var It=et?L.slice(0,8):L;G.push(t.createElement("div",{key:"clipArea",className:Kt("clip-area","snap-control"),style:{width:Ie+"px",height:ve+"px",transform:"translate("+le+"px, "+Ht+"px)",clipPath:"polygon("+It.map(function(wt){return wt[0]-le+"px "+(wt[1]-Ht)+"px"}).join(", ")+")"}}))}}return T&&["vertical","horizontal"].forEach(function(yt){var wt=T[yt],pe=yt==="horizontal";wt.isSnap&&W.push.apply(W,wt.snap.posInfos.map(function(Se,Ut){var zt=Se.pos,ze=qt(Je(v,pe?[0,zt]:[zt,0],x),[g,_]),Ge=qt(Je(v,pe?[c,zt]:[zt,h],x),[g,_]);return Ri(t,"",ze,Ge,s,"clip"+yt+"snap"+Ut,"guideline")})),wt.isBound&&W.push.apply(W,wt.bounds.map(function(Se,Ut){var zt=Se.pos,ze=qt(Je(v,pe?[0,zt]:[zt,0],x),[g,_]),Ge=qt(Je(v,pe?[c,zt]:[zt,h],x),[g,_]);return Ri(t,"",ze,Ge,s,"clip"+yt+"bounds"+Ut,"guideline","bounds","bold")}))}),Lt(Lt([],G),W)},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")||"",v=t.datas,p=km(s,u,f,a||"inset",i);if(!p)return!1;var g=p.clipText,_=p.type,m=p.poses,b=Et(e,"onClipStart",te(e,t,{clipType:_,clipStyle:g,poses:m.map(function(y){return y.pos})}));return b===!1?(v.isClipStart=!1,!1):(v.isControl=h&&h.indexOf("clip-control")>-1,v.isLine=h.indexOf("clip-line")>-1,v.isArea=h.indexOf("clip-area")>-1||h.indexOf("clip-ellipse")>-1,v.index=c?parseInt(c.getAttribute("data-clip-index"),10):-1,v.clipPath=p,v.isClipStart=!0,r.clipPathState=g,ui(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 v=Mn(t),p=v[0],g=v[1],_=e.props,m=e.state,b=m.width,y=m.height,w=!f&&!s&&!u,O=h.type,T=h.poses,A=h.splitter,I=T.map(function(Ut){return Ut.pos});w&&(p=-p,g=-g);var x=!s||T[c].direction==="nesw",B=O==="inset"||O==="rect",M=T.map(function(){return[0,0]});if(s&&!x){var L=T[c],G=L.horizontal,W=L.vertical,at=[p*Math.abs(G),g*Math.abs(W)];M=sut(T,c,at,B)}else x&&(M=I.map(function(){return[p,g]}));var et=I.map(function(Ut,zt){return Qt(Ut,M[zt])}),rt=Lt([],et);m.snapBoundInfos=null;var gt=h.type==="circle",lt=h.type==="ellipse";if(gt||lt){var pt=Ur(et),dt=Math.abs(pt.bottom-pt.top),K=Math.abs(lt?pt.right-pt.left:dt),it=et[0][1]+dt,jt=et[0][0]-K,Ft=et[0][0]+K;gt&&(rt.push([Ft,pt.bottom]),M.push([1,0])),rt.push([pt.left,it]),M.push([0,1]),rt.push([jt,pt.bottom]),M.push([1,0])}var Vt=bw((_.clipHorizontalGuidelines||[]).map(function(Ut){return Ze(""+Ut,y)}),(_.clipVerticalGuidelines||[]).map(function(Ut){return Ze(""+Ut,b)}),b,y),_t=[],It=[];if(gt||lt)_t=[rt[4][0],rt[2][0]],It=[rt[1][1],rt[3][1]];else if(B){var $e=[rt[0],rt[2],rt[4],rt[6]],ee=[M[0],M[2],M[4],M[6]];_t=$e.filter(function(Ut,zt){return ee[zt][0]}).map(function(Ut){return Ut[0]}),It=$e.filter(function(Ut,zt){return ee[zt][1]}).map(function(Ut){return Ut[1]})}else _t=rt.filter(function(Ut,zt){return M[zt][0]}).map(function(Ut){return Ut[0]}),It=rt.filter(function(Ut,zt){return M[zt][1]}).map(function(Ut){return Ut[1]});for(var Ct=[0,0],Ie=function(Ut){var zt=Lm(Vt,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},_t,It,5),ze=zt.horizontal,Ge=zt.vertical,Wr=ze.offset,Ir=Ge.offset;if(ze.isBound&&(Ct[1]+=Wr),Ge.isBound&&(Ct[0]+=Ir),(lt||gt)&&M[0][0]===0&&M[0][1]===0){var Vn=Ur(et),dr=Vn.bottom-Vn.top,Ta=lt?Vn.right-Vn.left:dr,Ma=Ge.isBound?Math.abs(Ir):Ge.snapIndex===0?-Ir:Ir,Zn=ze.isBound?Math.abs(Wr):ze.snapIndex===0?-Wr:Wr;Ta-=Ma,dr-=Zn,gt&&(dr=ww(Ge,ze)>0?dr:Ta,Ta=dr);var Jn=rt[0];rt[1][1]=Jn[1]-dr,rt[2][0]=Jn[0]+Ta,rt[3][1]=Jn[1]+dr,rt[4][0]=Jn[0]-Ta}else return rt.forEach(function(fi,cs){var li=M[cs];li[0]&&(fi[0]-=Ir),li[1]&&(fi[1]-=Wr)}),"break"},ve=0;ve<2;++ve){var le=Ie();if(le==="break")break}var Ht=Cp(e,h,et),yt=O+"("+Ht.join(A)+")";if(m.clipPathState=yt,gt||lt)_t=[rt[4][0],rt[2][0]],It=[rt[1][1],rt[3][1]];else if(B){var $e=[rt[0],rt[2],rt[4],rt[6]];_t=$e.map(function(zt){return zt[0]}),It=$e.map(function(zt){return zt[1]})}else _t=rt.map(function(Ut){return Ut[0]}),It=rt.map(function(Ut){return Ut[1]});if(m.snapBoundInfos=Lm(Vt,_.clipTargetBounds&&{left:0,top:0,right:b,bottom:y},_t,It,1),a.draggable){var wt=m.is3d,pe=m.allMatrix,Se=wt?4:3;r=me(pe,[Ct[0],Ct[1],0,0],Se),Ct[0]=r[0],Ct[1]=r[1],a.draggable.deltaOffset=Ct}return Et(e,"onClip",te(e,t,{clipEventType:"changed",clipType:O,poses:et,clipStyle:yt,clipStyles:Ht,distX:p,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",Mr(e,t,{})),a&&(u?Eft(e,t):i&&Sft(e,t)),a||r):!1},unset:function(e){e.state.clipPathState="",e.state.snapBoundInfos=null}},Oft={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":Qr(t.inputEvent.target,Kt("origin"))},dragControlStart:function(e,t){var r=t.datas;ui(e,t);var n=te(e,t,{dragStart:sr.dragStart(e,new Eo().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=Mn(t),s=i[0],u=i[1],f=e.state,c=f.width,h=f.height,v=f.offsetMatrix,p=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 O=Qt(r.startOrigin,y),T=Qt(r.startTargetOrigin,y),A=qt(y,r.prevOrigin),I=Df(v,p,O,b),x=e.getRect(),B=Ur(So(I,c,h,b)),M=[x.left-B.left,x.top-B.top];r.prevOrigin=y;var L=[Jr(T[0],c,m),Jr(T[1],h,m)].join(" "),G=te(e,t,{width:c,height:h,origin:O,dist:y,delta:A,transformOrigin:L,drag:sr.drag(e,Pf(t,e.state,M,!!n,!1))});return Et(e,"onDragOrigin",G),G},dragControlEnd:function(e,t){var r=t.datas;return r.isDragOrigin?(Et(e,"onDragOriginEnd",Mr(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 Aft(e,t,r,n,a,i,s){var u=zw(e),f=u.horizontals,c=u.verticals,h=f.length,v=c.length,p=-1,g=-1;r===0?h===0?p=0:h===1&&(p=1):r===3&&(h<=2?p=2:h<=3&&(p=3)),r===2?v===0?g=0:v<4&&(g=3):r===1&&(v<=1?g=1:v<=2&&(g=2)),Fw(e,t,0,p,g,n,a,i,s)}function Hm(e,t,r,n,a){n===void 0&&(n=[0,0]);var i,s=[];if(a)i=a;else{var u=pr(e);i=u&&u.borderRadius||""}return!i||!a&&i==="0px"?s=[]:s=$a(i),Bw(s,t,r,0,0,n)}function Wm(e,t,r,n,a,i){var s=e.state,u=s.width,f=s.height,c=Ep(i,a,e.props.roundRelative,u,f),h=c.raws,v=c.styles,p=zw(a,h),g=p.horizontals,_=p.verticals,m=v.join(" ");s.borderRadiusState=m,Et(e,"onRound",te(e,t,{horizontals:g,verticals:_,borderRadius:m,width:u,height:f,delta:n,dist:r}))}var Tft={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,v=e.props,p=v.minRoundControls,g=p===void 0?[0,0]:p,_=v.maxRoundControls,m=_===void 0?[4,4]:_,b=v.zoom;if(!n)return null;var y=u?4:3,w=Hm(n,a,i,g,h);if(!w)return null;var O=0,T=0;return w.map(function(A,I){T+=Math.abs(A.horizontal),O+=Math.abs(A.vertical);var x=qt(Je(s,A.pos,y),[f,c]),B=A.vertical?O<=m[1]:T<=m[0];return t.createElement("div",{key:"borderRadiusControl"+I,className:Kt("control","border-radius"),"data-radius-index":I,style:{display:B?"block":"none",transform:"translate("+x[0]+"px, "+x[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",te(e,t,{}));if(h===!1)return!1;n.lineIndex=c,n.controlIndex=f,n.isControl=s,n.isLine=u,ui(e,t);var v=e.props,p=v.roundRelative,g=v.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 O=Hm(b,y,w,_)||[];return n.controlPoses=O,m.borderRadiusState=Ep(O.map(function(T){return T.pos}),O,p,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=Mn(t),s=i[0],u=i[1],f=[s,u],c=qt(f,r.prevDist),h=e.props.maxRoundControls,v=h===void 0?[4,4]:h,p=e.state,g=p.width,_=p.height,m=a[n],b=m.vertical,y=m.horizontal,w=a.map(function(T){var A=T.horizontal,I=T.vertical,x=[A*y*f[0],I*b*f[1]];if(A){if(v[0]===1)return x;if(v[0]<4&&A!==y)return x}else{if(v[1]===0)return x[1]=I*y*f[0]/g*_,x;if(b){if(v[1]===1)return x;if(v[1]<4&&I!==b)return x}}return[0,0]});w[n]=f;var O=a.map(function(T,A){return Qt(T.pos,w[A])});return r.prevDist=[s,u],Wm(e,t,f,c,a,O),!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,v=n.controlPoses,p=v.map(function(O){return O.pos}),g=p.length,_=e.props.roundClickable,m=_===void 0?!0:_;if(a&&m){if(u)Lw(v,p,f,0);else if(c){var b=cw(e,t),y=b[0],w=b[1];Aft(v,p,h,y,w,i,s)}g!==v.length&&Wm(e,t,[0,0],[0,0],v,p)}return Et(e,"onRoundEnd",Mr(e,t,{})),r.borderRadiusState="",!0},unset:function(e){e.state.borderRadiusState=""}};function Mft(e,t){var r=t?"matrix3d("+Pe(4):"matrix("+Pe(3)+")";return e===r||e==="matrix(1,0,0,1,0,0)"}var Gw={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("+Wy(i,!0)+")",f=!s||s==="none"?u:s;t.datas.startTransforms=Mft(f,n)?[]:$a(f)},resetTransform:function(e){e.datas.nextTransforms=e.datas.startTransforms,e.datas.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return te(e,t,{setTransform:function(r){t.datas.startTransforms=si(r)?r:$a(r)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return te(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",te(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){Et(e,"onBeforeRenderEnd",te(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var r=this;this.dragStart(e,t);var n=ba(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",te(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=ba(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",te(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:i}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),Et(e,"onBeforeRenderGroupEnd",te(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)}},Nw={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",te(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",te(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var r=this,n=ba(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragParams(f,s)});Et(e,"onRenderGroup",te(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,transform:Om(t),events:i}))},dragGroupEnd:function(e,t){var r=this,n=ba(e,"beforeRenderable",t),a=e.moveables,i=n.map(function(s,u){var f=a[u];return r.fillDragEndParams(f,s)});Et(e,"onRenderGroupEnd",te(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 te(e,t,{isPinch:!!t.isPinch,transform:Om(t)})},fillDragEndParams:function(e,t){return te(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag})}};function qs(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,v=""+r+n+"Condition",p=a==="End",g=a==="After",_=u&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());_&&e.updateRect(a,!0,!1),a===""&&!c&&fw(e.state,i);var m=Lt([],e[t]);if(c){var b=i.requestAble;m.some(function(M){return M.name===b})||m.push.apply(m,e.props.ables.filter(function(M){return M.name===b}))}if(!m.length)return!1;var y=Lt(Lt([Gw],m),[Nw]).filter(function(M){return M[h]}),w=i.datas;_&&y.forEach(function(M){M.unset&&M.unset(e)});var O=i.inputEvent,T;p&&O&&(T=document.elementFromPoint(i.clientX,i.clientY)||O.target);var A=0,I=y.filter(function(M){var L=M.name,G=w[L]||(w[L]={});if(u&&(G.isEventStart=!M[v]||M[v](e,i)),G.isEventStart){var W=M[h](e,J(J({},i),{resultCount:A,datas:G,originalDatas:w,inputTarget:T}));return u&&W===!1&&(G.isEventStart=!1),A+=W?1:0,W}return!1}),x=I.length,B=!1;return u&&y.length&&!x&&(B=y.filter(function(M){var L=M.name,G=w[L];return G.isEventStart?M.dragRelation==="strong"?(G.isEventStart=!1,!1):!0:!1}).length===0),(p||B)&&(e.state.gesto=null,e.moveables&&e.moveables.forEach(function(M){M.state.gesto=null})),_&&B&&y.forEach(function(M){M.unset&&M.unset(e)}),u&&!c&&x&&(i==null||i.preventDefault()),e.isUnmounted||B?!1:((!u&&x&&!s||p)&&(e.updateRect(p?a:"",!0,!1),e.forceUpdate()),!u&&!p&&!g&&x&&!s&&qs(e,t,r,n,a+"After",i),!0)}function jw(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)||Qr(u,"moveable-area")||Qr(u,"moveable-padding")};return Op(e,a,"targetAbles",r,{dragStart:i,pinchStart:i})}function Op(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 Eot(t,f);return["drag","pinch"].forEach(function(h){["Start","","End"].forEach(function(v){c.on(""+h+v,function(p){var g=p.eventType;if(a[g]&&!a[g](p)){p.stop();return}var _=qs(e,r,h,n,v,p);_||p.stop()})})}),c}var Pft=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}(),Ni=function(e){yo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state=J({container:null,gesto:null,renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1},Th(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(),vr(window,"click",n.onPreventClick,!0)},n.checkUpdateRect=function(){if(!n.isDragging()){var a=n.props.parentMoveable;if(a){a.checkUpdateRect();return}bst(n._observerId),n._observerId=ap(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,v=n.cssStyled,p=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,O=a.direction,T=n.targets,A=(T&&T.length||u)&&w,I=this.isDragging(),x={};return this.getEnabledAbles().forEach(function(B){x["data-able-"+B.name.toLowerCase()]=!0}),qr(v,J({cspNonce:c,ref:pn(this,"controlBox"),className:Kt("control-box",O===-1?"reverse":"",I?"dragging":"")+" "+s},x,{onClick:this.onPreventClick,portalContainer:p,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,Ii(this,"targetGesto"),Ii(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(hp)>-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 v;if(n instanceof Element){var p=n.getBoundingClientRect();v={left:p.left,top:p.top,width:p.width,height:p.height}}else v=J({width:0,height:0},n);var g=v.left,_=v.top,m=v.width,b=v.height,y=mm([s,u,c,f],h),w=hot(y,[[g,_],[g+m,_],[g+m,_+b],[g,_+b]]),O=Xy(y);return!w||!O?0:Math.min(100,w/O*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,v=i.targetClientRect;return s?gh([n,a],mm([u,f,h,c],v)):!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(),v=u?u.props.rootContainer:s.rootContainer;this.updateState(Th(this.controlBox&&this.controlBox.getElement(),c,h,h,v||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=Tn(this.state),i=a[0],s=a[1],u=a[2],f=a[3],c=Ur(a),h=n.width,v=n.height,p=c.width,g=c.height,_=c.left,m=c.top,b=[n.left,n.top],y=Qt(b,n.origin),w=Qt(b,n.beforeOrigin),O=n.transformOrigin;return{width:p,height:g,left:_,top:m,pos1:i,pos2:s,pos3:u,pos4:f,offsetWidth:h,offsetHeight:v,beforeOrigin:w,origin:y,transformOrigin:O,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 cut(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,v=c.request(this),p=i||a.isInstant,g=v.isControl?"controlAbles":"targetAbles",_=(f?"Group":"")+(v.isControl?"Control":""),m={request:function(b){return qs(h,g,"drag",_,"",J(J({},v.request(b)),{requestAble:n,isRequest:!0}),p),this},requestEnd:function(){return qs(h,g,"drag",_,"End",J(J({},v.requestEnd()),{requestAble:n,isRequest:!0}),p),this}};return qs(h,g,"drag",_,"Start",J(J({},v.requestStart(a)),{requestAble:n,isRequest:!0}),p),p?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,v=n.pos3,p=n.pos4,g=n.left,_=n.top,m=a.padding||{},b=m.left,y=b===void 0?0:b,w=m.top,O=w===void 0?0:w,T=m.bottom,A=T===void 0?0:T,I=m.right,x=I===void 0?0:I,B=f?4:3,M=a.groupable?i:Qt(i,[g,_]);n.renderPoses=[Qt(c,Su(u,[-y,-O],s,M,B)),Qt(h,Su(u,[x,-O],s,M,B)),Qt(v,Su(u,[-y,A],s,M,B)),Qt(p,Su(u,[x,A],s,M,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=!Mh(f,a)||!Mh(c,i);if(!!h){var v=i||this.controlBox;v&&this.unsetAbles(),this.updateState({target:a,container:i}),!s&&v&&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]=Qy(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",v=wu(u,[f,c],s),p=wu(u,[h],s);this.enabledAbles=u,this.targetAbles=v,this.controlAbles=p},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:qr};return aut(iut(wu(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&&(Ii(this,"targetGesto"),this.updateState({gesto:null})),i||Ii(this,"controlGesto"),u&&a&&!this.targetGesto&&(this.targetGesto=jw(this,u,"")),!this.controlGesto&&i&&(this.controlGesto=Op(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:qr};return[Ri(f,a?"n":"",u[0],u[1],i,0),Ri(f,a?"e":"",u[1],u[3],i,1),Ri(f,a?"w":"",u[0],u[2],i,2),Ri(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=Ry(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(v){var p=wu(h,[v]),g=p.length>0,_=s[v];if(!g){_&&(_.destroy(),s[v]=null);return}_||(_=new Pft(i,n,v),s[v]=_),_.setAbles(p)})}},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}(up),Ap={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(Ni,{key:"moveable"+c,ref:Ty(e,"moveables",c),target:f,origin:!1,cssStyled:u.cssStyled,customStyledMap:u.customStyledMap,useResizeObserver:u.useResizeObserver,parentMoveable:e,parentPosition:s})})}},xft=wo("clickable",{props:{clickable:Boolean},events:{onClick:"click",onClickGroup:"clickGroup"},always:!0,dragRelation:"weak",dragStart:function(e,t){t.isRequest||Zr(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",te(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=rn(a,function(f){return f.contains(n)}),u=i>-1),Et(e,"onClickGroup",te(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;ap(function(){t.unset(e)})},unset:function(e){vr(window,"click",e.onPreventClick,!0)}});function Ci(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),J(J({},e),{datas:t})}var Ift=wo("edgeDraggable",{dragControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return Qr(r,Kt("direction"))&&Qr(r,Kt("line"))},dragControlStart:function(e,t){return sr.dragStart(e,Ci(t))},dragControl:function(e,t){return sr.drag(e,Ci(t))},dragControlEnd:function(e,t){return sr.dragEnd(e,Ci(t))},dragGroupControlCondition:function(e,t){if(!e.props.edgeDraggable||!t.inputEvent)return!1;var r=t.inputEvent.target;return Qr(r,Kt("direction"))&&Qr(r,Kt("line"))},dragGroupControlStart:function(e,t){return sr.dragGroupStart(e,Ci(t))},dragGroupControl:function(e,t){return sr.dragGroup(e,Ci(t))},dragGroupControlEnd:function(e,t){return sr.dragGroupEnd(e,Ci(t))},unset:function(e){return sr.unset(e)}}),qw={name:"individualGroupable",props:{individualGroupable:Boolean},events:{}},Tp=[Gw,Dw,oft,hut,sr,Ift,fft,lft,cft,vft,_ft,mft,dft,Oft,Cft,Tft,Ap,qw,xft,Iw,Nw],Dft=Tp.reduce(function(e,t){return J(J({},e),"events"in t?t.events:{})},{}),Rft=Tp.reduce(function(e,t){return J(J({},e),t.props)},{}),Bft=out(Dft),Lft=Object.keys(Bft),Fft=Object.keys(Rft);function Ou(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 Au(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 zft(e,t){if(!e.length)return[0,0,0,0];var r=e.map(function(m){var b=m.state;return Tn(b)}),n=Bs,a=Bs,i=0,s=0,u=ie(t,Tr);if(u%90){var f=u/180*Math.PI,c=Math.tan(f),h=-1/c,v=[wm,Bs],p=[wm,Bs];r.forEach(function(m){m.forEach(function(b){var y=b[1]-c*b[0],w=b[1]-h*b[0];v[0]=Math.max(v[0],y),v[1]=Math.min(v[1],y),p[0]=Math.max(p[0],w),p[1]=Math.min(p[1],w)})}),v.forEach(function(m){p.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],O=m[3];return[ha(b,-f),ha(y,-f),ha(w,-f),ha(O,-f)]});i=Ou(g,0)-Au(g,0),s=Ou(g,1)-Au(g,1)}else if(n=Au(r,0),a=Au(r,1),i=Ou(r,0)-n,s=Ou(r,1)-a,u%180){var _=i;i=s,s=_}return[n,a,i,s]}var Gft=function(e){yo(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.differ=new fot,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,v=zft(this.moveables,c),p=v[0],g=v[1],_=v[2],m=v[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=Th(this.controlBox.getElement(),f,this.controlBox.getElement(),this.getContainer(),this.props.rootContainer||y),O=[w.left,w.top],T=Tn(w),A=T[0],I=T[1],x=T[2],B=T[3],M=Af([A,I,x,B]),L=[M.minX,M.minY];w.pos1=qt(A,L),w.pos2=qt(I,L),w.pos3=qt(x,L),w.pos4=qt(B,L),w.left=p-w.left+L[0],w.top=g-w.top+L[1],w.origin=qt(Qt(O,w.origin),L),w.beforeOrigin=qt(Qt(O,w.beforeOrigin),L),w.originalBeforeOrigin=Qt(O,w.originalBeforeOrigin);var G=w.targetClientRect,W=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(J(J({},w),{direction:W,beforeDirection:W}),i)}},r.getRect=function(){return J(J({},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,Lt(Lt([],this.props.ables),[Ap]),"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&&(Ii(this,"targetGesto"),Ii(this,"controlGesto"),n.target=null),n.target||(n.target=this.areaElement,this.controlBox.getElement().style.display="block",this.targetGesto=jw(this,s,"Group"),this.controlGesto=Op(this,this.controlBox.getElement(),"controlAbles","GroupControl"));var u=!Mh(n.container,a.container);u&&(n.container=a.container);var f=this.differ.update(a.targets),c=f.added,h=f.changed,v=f.removed;(u||c.length||h.length||v.length)&&this.updateRect()},r._updateObserver=function(){},t.defaultProps=J(J({},Ni.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(Ni),Nft=function(e){yo(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 qr(s,{cspNonce:i,ref:pn(this,"controlBox"),className:Kt("control-box")},u.map(function(f,c){return qr(Ni,J({key:"moveable"+c,ref:Ty(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 J(J({},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}(Ni),jft=function(e){yo(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=Ry(n).join(`
|
|
`);this.defaultStyled=Qy("div",rst(hp,Got+i))},t.getTotalAbles=function(){return Lt([Dw,Ap,qw,Iw],this.defaultAbles)},r.render=function(){var n=this.constructor;n.defaultStyled||n.makeStyled();var a=this.props,i=a.ables,s=a.props,u=Rot(a,["ables","props"]),f=this._updateRefs(!0),c=lut(f,this.selectorMap),h=c.length>1,v=n.getTotalAbles(),p=Lt(Lt([],v),i||[]),g=J(J(J({},u),s||{}),{ables:p,cssStyled:n.defaultStyled,customStyledMap:n.customStyledMap});return h?u.individualGroupable?qr(Nft,J({key:"individual-group",ref:pn(this,"moveable")},g,{target:null,targets:c})):qr(Gft,J({key:"group",ref:pn(this,"moveable")},g,{target:null,targets:c})):qr(Ni,J({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=lw(this.props.target||this.props.targets),s=typeof document!="undefined",u=a.length!==i.length||a.some(function(h,v){var p=i[v];return!h&&!p?!1:h!==p}),f=this.selectorMap,c={};return this.refTargets.forEach(function(h){en(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,Bot([nst(nw)],t.prototype,"moveable",void 0),t}(up),qft=function(e){yo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.defaultAbles=Tp,t}(jft);/*! *****************************************************************************
|
|
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(e,t){return Bh=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])},Bh(e,t)};function Mp(e,t){Bh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var io=function(){return io=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},io.apply(this,arguments)};function Uft(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=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){Mp(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 Gst(qr(qft,io({ref:pn(this,"moveable")},this.state)),this.state.parentElement)},t}(op),Hft=Fft,Wft=nw,Pp=Lft;/*! *****************************************************************************
|
|
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 Lh=function(){return Lh=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Lh.apply(this,arguments)};function Kft(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,a++)n[a]=i[s];return n}var Yft=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(r,n){if(ma(r))for(var a in r)this.on(a,r[a]);else this._addEvent(r,n,{});return this},t.off=function(r,n){if(!r)this._events={};else if(ma(r))for(var a in r)this.off(a);else if(!n)this._events[r]=[];else{var i=this._events[r];if(i){var s=rn(i,function(u){return u.listener===n});s>-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,Kft(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(Lh({listener:n},a))},e}(),Xft=function(e){Mp(t,e);function t(n,a){a===void 0&&(a={});var i=e.call(this)||this;i.tempElement=document.createElement("div");var s=io({},a),u={};Pp.forEach(function(c){u[np("on "+c)]=function(h){return i.trigger(c,h)}}),gm(qr(kft,io({ref:pn(i,"innerMoveable"),parentElement:n},s,u)),i.tempElement);var f=s.target;return si(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(){gm(null,this.tempElement),this.off(),this.tempElement=null,this.innerMoveable=null},r.getMoveable=function(){return this.innerMoveable.moveable},t=Uft([fm(Wft,function(n,a){n[a]||(n[a]=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var u=this.getMoveable();if(!(!u||!u[a]))return u[a].apply(u,i)})}),fm(Hft,function(n,a){Object.defineProperty(n,a,{get:function(){return this.getMoveable().props[a]},set:function(i){var s;this.setState((s={},s[a]=i,s))},enumerable:!0,configurable:!0})})],t),t}(Yft),Vft=function(e){Mp(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Xft),Uw=Vft;function Km(e,t){let r=[0,0];t=ua({originDraggable:!0,originRelative:!0,draggable:!0,throttleDrag:0,zoom:1,origin:!1,onDrag(a){r=a.beforeTranslate,e.dispatchEvent(new CustomEvent("translate",{detail:r}))},target:e},t);const n=new Uw(document.body,t);return Pp.forEach(a=>{const i=np(`on ${a}`);n.on(a,s=>{const u=t[i]&&t[i](s),f=e.dispatchEvent(new CustomEvent(a,{detail:s}));return kn(u)?kn(f)?void 0:f:u})}),n}function Co(e,t){let r=t.disabled?void 0:Km(t);const n=()=>{!r||(r.destroy(),r=void 0)};return{destroy:n,update:async i=>{i.disabled?n():r||(r=Km(e,i))}}}function Ym(e){let t,r,n,a,i;return{c(){t=k("img"),this.h()},l(s){t=H(s,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){var s;F(t,"class","ftl svelte-1kuvs8v"),Wn(t.src,r=En+"/icons/ftl-drive.svg")||F(t,"src",r),F(t,"alt","ftl drive"),Re(t,"transform",(s=e[0])==null?void 0:s.uiTransform,!1)},m(s,u){U(s,t,u),a||(i=[nn(n=Co.call(null,t,{disabled:!e[2]})),Xt(t,"translate",e[7])],a=!0)},p(s,u){var f;n&&Va(n.update)&&u&4&&n.update.call(null,{disabled:!s[2]}),u&1&&Re(t,"transform",(f=s[0])==null?void 0:f.uiTransform,!1)},d(s){s&&P(t),a=!1,an(i)}}}function Xm(e){let t,r,n,a,i;return{c(){t=k("div"),r=$t(e[1]),this.h()},l(s){t=H(s,"DIV",{class:!0,style:!0});var u=X(t);r=bt(u,e[1]),u.forEach(P),this.h()},h(){var s;F(t,"class","thrust svelte-1kuvs8v"),Re(t,"background-image","url("+En+"/icons/standard-drive.svg)"),Re(t,"transform",(s=e[4])==null?void 0:s.uiTransform,!1)},m(s,u){U(s,t,u),j(t,r),a||(i=[nn(n=Co.call(null,t,{disabled:!e[2]})),Xt(t,"translate",e[8])],a=!0)},p(s,u){var f;u&2&&rr(r,s[1]),n&&Va(n.update)&&u&4&&n.update.call(null,{disabled:!s[2]}),u&16&&Re(t,"transform",(f=s[4])==null?void 0:f.uiTransform,!1)},d(s){s&&P(t),a=!1,an(i)}}}function Zft(e){let t,r,n,a,i,s,u,f,c=e[0]!=="none"&&Ym(e),h=e[1]>0&&Xm(e);return{c(){t=k("div"),c&&c.c(),r=ht(),h&&h.c(),n=ht(),a=k("img"),this.h()},l(v){t=H(v,"DIV",{class:!0});var p=X(t);c&&c.l(p),r=vt(p),h&&h.l(p),n=vt(p),a=H(p,"IMG",{class:!0,src:!0,alt:!0}),p.forEach(P),this.h()},h(){var v;F(a,"class","internal svelte-1kuvs8v"),Wn(a.src,i=En+"/icons/internal-systems.svg")||F(a,"src",i),F(a,"alt","internal systems"),Re(a,"transform",(v=e[3])==null?void 0:v.uiTransform,!1),F(t,"class","main_systems svelte-1kuvs8v")},m(v,p){U(v,t,p),c&&c.m(t,null),j(t,r),h&&h.m(t,null),j(t,n),j(t,a),e[9](a),u||(f=[nn(s=Co.call(null,a,{disabled:!e[2]})),Xt(a,"translate",e[10])],u=!0)},p(v,[p]){var g;v[0]!=="none"?c?c.p(v,p):(c=Ym(v),c.c(),c.m(t,r)):c&&(c.d(1),c=null),v[1]>0?h?h.p(v,p):(h=Xm(v),h.c(),h.m(t,n)):h&&(h.d(1),h=null),s&&Va(s.update)&&p&4&&s.update.call(null,{disabled:!v[2]}),p&8&&Re(a,"transform",(g=v[3])==null?void 0:g.uiTransform,!1)},i:se,o:se,d(v){v&&P(t),c&&c.d(),h&&h.d(),e[9](null),u=!1,an(f)}}}function Jft(e,t,r){let{ftl:n="none"}=t,{engine:a=0}=t,{isMovable:i=!1}=t,{structure:s={}}=t,{drive:u={}}=t;const f=he("ship");let c;const h=({detail:_})=>{f.dispatch.setUITransform({system:"ftl",translate:_})},v=({detail:_})=>{f.dispatch.setUITransform({system:"drive",translate:_})};function p(_){Ya[_?"unshift":"push"](()=>{c=_,r(5,c)})}const g=({detail:_})=>{f.dispatch.setUITransform({system:"internalSystems",translate:_})};return e.$$set=_=>{"ftl"in _&&r(0,n=_.ftl),"engine"in _&&r(1,a=_.engine),"isMovable"in _&&r(2,i=_.isMovable),"structure"in _&&r(3,s=_.structure),"drive"in _&&r(4,u=_.drive)},[n,a,i,s,u,c,f,h,v,p,g]}class Qft extends Ot{constructor(t){super();At(this,t,Jft,Zft,Tt,{ftl:0,engine:1,isMovable:2,structure:3,drive:4})}}function Vm(e,t,r){const n=e.slice();return n[11]=t[r],n[13]=r,n}function Zm(e,t,r){const n=e.slice();return n[14]=t[r],n[16]=r,n}function Jm(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){Wn(t.src,r=En+"/icons/crew-star.svg")||F(t,"src",r),F(t,"alt","crew loss threshold"),F(t,"class","svelte-oub5")},m(n,a){U(n,t,a)},p:se,d(n){n&&P(t)}}}function Qm(e,t){let r,n=t[14]&&Jm();return{key:e,first:null,c(){r=k("div"),n&&n.c(),this.h()},l(a){r=H(a,"DIV",{class:!0});var i=X(r);n&&n.l(i),i.forEach(P),this.h()},h(){F(r,"class","cell svelte-oub5"),this.first=r},m(a,i){U(a,r,i),n&&n.m(r,null)},p(a,i){t=a,t[14]?n?n.p(t,i):(n=Jm(),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},d(a){a&&P(r),n&&n.d()}}}function t$(e,t){let r,n=[],a=new Map,i,s=t[11];const u=f=>f[16];for(let f=0;f<s.length;f+=1){let c=Zm(t,s,f),h=u(c);a.set(h,n[f]=Qm(h,c))}return{key:e,first:null,c(){r=k("div");for(let f=0;f<n.length;f+=1)n[f].c();i=ht(),this.h()},l(f){r=H(f,"DIV",{class:!0});var c=X(r);for(let h=0;h<n.length;h+=1)n[h].l(c);i=vt(c),c.forEach(P),this.h()},h(){F(r,"class","row svelte-oub5"),this.first=r},m(f,c){U(f,r,c);for(let h=0;h<n.length;h+=1)n[h].m(r,null);j(r,i)},p(f,c){t=f,c&4&&(s=t[11],n=kr(n,c,u,1,t,s,a,r,Sa,Qm,i,Zm))},d(f){f&&P(r);for(let c=0;c<n.length;c+=1)n[c].d()}}}function tlt(e){let t,r=[],n=new Map,a,i,s,u=e[2];const f=c=>c[13];for(let c=0;c<u.length;c+=1){let h=Vm(e,u,c),v=f(h);n.set(v,r[c]=t$(v,h))}return{c(){t=k("div");for(let c=0;c<r.length;c+=1)r[c].c();this.h()},l(c){t=H(c,"DIV",{});var h=X(t);for(let v=0;v<r.length;v+=1)r[v].l(h);h.forEach(P),this.h()},h(){var c;Re(t,"transform",(c=e[0])==null?void 0:c.uiTransform,!1)},m(c,h){U(c,t,h);for(let v=0;v<r.length;v+=1)r[v].m(t,null);i||(s=[nn(a=Co.call(null,t,{disabled:!e[1]})),Xt(t,"translate",e[10])],i=!0)},p(c,[h]){var v;h&4&&(u=c[2],r=kr(r,h,f,1,c,u,n,t,Sa,t$,null,Vm)),a&&Va(a.update)&&h&2&&a.update.call(null,{disabled:!c[1]}),h&1&&Re(t,"transform",(v=c[0])==null?void 0:v.uiTransform,!1)},i:se,o:se,d(c){c&&P(t);for(let h=0;h<r.length;h+=1)r[h].d();i=!1,an(s)}}}function Fh(e,t){if(t<=1)return[e];let r=e.length/t;return e.length%t&&r++,[e.slice(0,r),...Fh(e.slice(r),t-1)]}function elt(e,t,r){let{shipMass:n=0}=t,{rating:a=0}=t,{advanced:i=!1}=t,{hull:s={}}=t,{isMovable:u=!1}=t;const f=he("ship");let c,h,v,p=[];const g=({detail:_})=>{f.dispatch.setUITransform({system:"hull",translate:_})};return e.$$set=_=>{"shipMass"in _&&r(4,n=_.shipMass),"rating"in _&&r(5,a=_.rating),"advanced"in _&&r(6,i=_.advanced),"hull"in _&&r(0,s=_.hull),"isMovable"in _&&r(1,u=_.isMovable)},e.$$.update=()=>{e.$$.dirty&64&&r(7,c=i?3:4),e.$$.dirty&32&&r(8,h=Array(a).fill(!1)),e.$$.dirty&16&&r(9,v=Math.ceil(n/20)),e.$$.dirty&768&&r(8,h=Fh(h,v).map(_=>(_[_.length-1]=!0,_)).flat()),e.$$.dirty&384&&r(2,p=Fh(h,c))},[s,u,p,f,n,a,i,c,h,v,g]}class rlt extends Ot{constructor(t){super();At(this,t,elt,tlt,Tt,{shipMass:4,rating:5,advanced:6,hull:0,isMovable:1})}}function e$(e,t,r){const n=e.slice();return n[1]=t[r],n[3]=r,n}function r$(e,t,r){const n=e.slice();return n[4]=t[r],n}function n$(e){let t;return{c(){t=k("div"),this.h()},l(r){t=H(r,"DIV",{class:!0}),X(t).forEach(P),this.h()},h(){F(t,"class","cell svelte-86wmvt")},m(r,n){U(r,t,n)},d(r){r&&P(t)}}}function a$(e,t){let r,n,a=Array.from({length:t[1]}),i=[];for(let s=0;s<a.length;s+=1)i[s]=n$(r$(t,a,s));return{key:e,first:null,c(){r=k("div");for(let s=0;s<i.length;s+=1)i[s].c();n=ht(),this.h()},l(s){r=H(s,"DIV",{class:!0});var u=X(r);for(let f=0;f<i.length;f+=1)i[f].l(u);n=vt(u),u.forEach(P),this.h()},h(){F(r,"class","layer"),this.first=r},m(s,u){U(s,r,u);for(let f=0;f<i.length;f+=1)i[f].m(r,null);j(r,n)},p(s,u){if(t=s,u&1){const f=a.length;a=Array.from({length:t[1]});let c;for(c=f;c<a.length;c+=1)r$(t,a,c),i[c]||(i[c]=n$(),i[c].c(),i[c].m(r,n));for(c=a.length;c<f;c+=1)i[c].d(1);i.length=a.length}},d(s){s&&P(r),ks(i,s)}}}function nlt(e){let t,r=[],n=new Map,a=e[0];const i=s=>s[3];for(let s=0;s<a.length;s+=1){let u=e$(e,a,s),f=i(u);n.set(f,r[s]=a$(f,u))}return{c(){t=k("div");for(let s=0;s<r.length;s+=1)r[s].c();this.h()},l(s){t=H(s,"DIV",{class:!0});var u=X(t);for(let f=0;f<r.length;f+=1)r[f].l(u);u.forEach(P),this.h()},h(){F(t,"class","layers svelte-86wmvt")},m(s,u){U(s,t,u);for(let f=0;f<r.length;f+=1)r[f].m(t,null)},p(s,[u]){u&1&&(a=s[0],r=kr(r,u,i,1,s,a,n,t,Sa,a$,null,e$))},i:se,o:se,d(s){s&&P(t);for(let u=0;u<r.length;u+=1)r[u].d()}}}function alt(e,t,r){let{armor:n=[]}=t;return console.log(n),e.$$set=a=>{"armor"in a&&r(0,n=a.armor)},[n]}class ilt extends Ot{constructor(t){super();At(this,t,alt,nlt,Tt,{armor:0})}}function slt(e){var s;let t,r,n,a,i;return r=new ilt({props:{armour:e[0].armour}}),a=new rlt({props:{isMovable:e[2],hull:(s=e[0])==null?void 0:s.hull,rating:e[0].hull.rating,advanced:e[0].hull.advanced,ship_mass:e[1]}}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),st(a.$$.fragment)},l(u){t=H(u,"DIV",{});var f=X(t);ft(r.$$.fragment,f),n=vt(f),ft(a.$$.fragment,f),f.forEach(P)},m(u,f){U(u,t,f),ot(r,t,null),j(t,n),ot(a,t,null),i=!0},p(u,[f]){var v;const c={};f&1&&(c.armour=u[0].armour),r.$set(c);const h={};f&4&&(h.isMovable=u[2]),f&1&&(h.hull=(v=u[0])==null?void 0:v.hull),f&1&&(h.rating=u[0].hull.rating),f&1&&(h.advanced=u[0].hull.advanced),f&2&&(h.ship_mass=u[1]),a.$set(h)},i(u){i||(V(r.$$.fragment,u),V(a.$$.fragment,u),i=!0)},o(u){tt(r.$$.fragment,u),tt(a.$$.fragment,u),i=!1},d(u){u&&P(t),ut(r),ut(a)}}}function olt(e,t,r){let{structure:n={}}=t,{ship_mass:a=0}=t,{isMovable:i=!1}=t;return e.$$set=s=>{"structure"in s&&r(0,n=s.structure),"ship_mass"in s&&r(1,a=s.ship_mass),"isMovable"in s&&r(2,i=s.isMovable)},[n,a,i]}class ult extends Ot{constructor(t){super();At(this,t,olt,slt,Tt,{structure:0,ship_mass:1,isMovable:2})}}function i$(e,t){let r=[0,0],n=t.ship,a=t.system;delete t.ship,delete t.system,Array.isArray(a)?a={system:a[0],systemId:a[1]}:a={system:a},t=ua({originDraggable:!0,originRelative:!0,draggable:!0,throttleDrag:0,zoom:1,origin:!1,onDrag(s){r=s.beforeTranslate,e.dispatchEvent(new CustomEvent("translate",{detail:r})),n.dispatch.setUITransform(rc(ua({},a),{translate:r}))},target:e},t);const i=new Uw(document.body,t);return Pp.forEach(s=>{const u=np(`on ${s}`);i.on(s,f=>{const c=t[u]&&t[u](f),h=e.dispatchEvent(new CustomEvent(s,{detail:f}));return kn(c)?kn(h)?void 0:h:c})}),i}function kw(e,t){let r=t.disabled?void 0:i$(t);const n=()=>{!r||(r.destroy(),r=void 0)};return{destroy:n,update:async i=>{i.disabled?n():r||(r=i$(e,i))}}}function flt(e){let t,r;return{c(){t=Gn("text"),r=$t(e[0]),this.h()},l(n){t=Nn(n,"text",{x:!0,y:!0,class:!0});var a=X(t);r=bt(a,e[0]),a.forEach(P),this.h()},h(){F(t,"x","50%"),F(t,"y","50%"),F(t,"class","svelte-1u8rlr5")},m(n,a){U(n,t,a),j(t,r)},p(n,a){a&1&&rr(r,n[0])},d(n){n&&P(t)}}}function llt(e){let t,r,n,a,i,s;return r=new Cf({props:{selected:e[1],size:"40",$$slots:{default:[flt]},$$scope:{ctx:e}}}),{c(){t=k("div"),st(r.$$.fragment),this.h()},l(u){t=H(u,"DIV",{class:!0});var f=X(t);ft(r.$$.fragment,f),f.forEach(P),this.h()},h(){F(t,"class","svelte-1u8rlr5"),Re(t,"transform",e[2],!1)},m(u,f){U(u,t,f),ot(r,t,null),a=!0,i||(s=nn(n=kw.call(null,t,{disabled:!e[3],ship:e[5],system:["weapon",e[4]]})),i=!0)},p(u,[f]){const c={};f&2&&(c.selected=u[1]),f&65&&(c.$$scope={dirty:f,ctx:u}),r.$set(c),n&&Va(n.update)&&f&24&&n.update.call(null,{disabled:!u[3],ship:u[5],system:["weapon",u[4]]}),f&4&&Re(t,"transform",u[2],!1)},i(u){a||(V(r.$$.fragment,u),a=!0)},o(u){tt(r.$$.fragment,u),a=!1},d(u){u&&P(t),ut(r),i=!1,s()}}}function clt(e,t,r){let{weaponClass:n=1}=t,{arcs:a=[]}=t,{uiTransform:i=""}=t,{isMovable:s=!1}=t,{id:u=-1}=t;const f=he("ship");return e.$$set=c=>{"weaponClass"in c&&r(0,n=c.weaponClass),"arcs"in c&&r(1,a=c.arcs),"uiTransform"in c&&r(2,i=c.uiTransform),"isMovable"in c&&r(3,s=c.isMovable),"id"in c&&r(4,u=c.id)},[n,a,i,s,u,f]}class hlt extends Ot{constructor(t){super();At(this,t,clt,llt,Tt,{weaponClass:0,arcs:1,uiTransform:2,isMovable:3,id:4})}}function s$(e,t,r){const n=e.slice();return n[4]=t[r],n}function o$(e){let t,r;const n=[{isMovable:e[0]},e[4]];let a={};for(let i=0;i<n.length;i+=1)a=Nt(a,n[i]);return t=new hlt({props:a}),{c(){st(t.$$.fragment)},l(i){ft(t.$$.fragment,i)},m(i,s){ot(t,i,s),r=!0},p(i,s){const u=s&3?ae(n,[s&1&&{isMovable:i[0]},s&2&&ue(i[4])]):{};t.$set(u)},i(i){r||(V(t.$$.fragment,i),r=!0)},o(i){tt(t.$$.fragment,i),r=!1},d(i){ut(t,i)}}}function vlt(e){let t,r,n,a=e[1],i=[];for(let u=0;u<a.length;u+=1)i[u]=o$(s$(e,a,u));const s=u=>tt(i[u],1,1,()=>{i[u]=null});return{c(){t=k("div"),r=k("div");for(let u=0;u<i.length;u+=1)i[u].c();this.h()},l(u){t=H(u,"DIV",{class:!0});var f=X(t);r=H(f,"DIV",{class:!0});var c=X(r);for(let h=0;h<i.length;h+=1)i[h].l(c);c.forEach(P),f.forEach(P),this.h()},h(){F(r,"class","beams svelte-18nuiwu"),F(t,"class","weapons svelte-18nuiwu")},m(u,f){U(u,t,f),j(t,r);for(let c=0;c<i.length;c+=1)i[c].m(r,null);n=!0},p(u,[f]){if(f&3){a=u[1];let c;for(c=0;c<a.length;c+=1){const h=s$(u,a,c);i[c]?(i[c].p(h,f),V(i[c],1)):(i[c]=o$(h),i[c].c(),V(i[c],1),i[c].m(r,null))}for(dn(),c=a.length;c<i.length;c+=1)s(c);gn()}},i(u){if(!n){for(let f=0;f<a.length;f+=1)V(i[f]);n=!0}},o(u){i=i.filter(Boolean);for(let f=0;f<i.length;f+=1)tt(i[f]);n=!1},d(u){u&&P(t),ks(i,u)}}}function plt(e,t,r){let{weapons:n=[]}=t,{isMovable:a=!1}=t,i=[];return he("ship"),e.$$set=s=>{"weapons"in s&&r(2,n=s.weapons),"isMovable"in s&&r(0,a=s.isMovable)},e.$$.update=()=>{e.$$.dirty&4&&r(1,i=n.filter(({type:s})=>s==="beam"))},[a,i,n]}class dlt extends Ot{constructor(t){super();At(this,t,plt,vlt,Tt,{weapons:2,isMovable:0})}}function Bi(e,t){return t===void 0&&(t=e,e=0),Array.from({length:1+t-e}).map((r,n)=>n+e)}function u$(e,t,r){const n=e.slice();return n[4]=t[r],n}function f$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{class:!0,src:!0,alt:!0}),this.h()},h(){F(t,"class","firecon svelte-d2fjdl"),Wn(t.src,r=En+"/icons/firecon.svg")||F(t,"src",r),F(t,"alt","firecon")},m(n,a){U(n,t,a)},p:se,d(n){n&&P(t)}}}function glt(e){let t,r,n,a,i=Bi(1,e[0]),s=[];for(let u=0;u<i.length;u+=1)s[u]=f$(u$(e,i,u));return{c(){t=k("div");for(let u=0;u<s.length;u+=1)s[u].c();this.h()},l(u){t=H(u,"DIV",{class:!0});var f=X(t);for(let c=0;c<s.length;c+=1)s[c].l(f);f.forEach(P),this.h()},h(){F(t,"class","svelte-d2fjdl"),Re(t,"transform",e[2],!1)},m(u,f){U(u,t,f);for(let c=0;c<s.length;c+=1)s[c].m(t,null);n||(a=nn(r=kw.call(null,t,{disabled:!e[1],ship:e[3],system:"firecons"})),n=!0)},p(u,[f]){if(f&1){i=Bi(1,u[0]);let c;for(c=0;c<i.length;c+=1){const h=u$(u,i,c);s[c]?s[c].p(h,f):(s[c]=f$(),s[c].c(),s[c].m(t,null))}for(;c<s.length;c+=1)s[c].d(1);s.length=i.length}r&&Va(r.update)&&f&2&&r.update.call(null,{disabled:!u[1],ship:u[3],system:"firecons"}),f&4&&Re(t,"transform",u[2],!1)},i:se,o:se,d(u){u&&P(t),ks(s,u),n=!1,a()}}}function _lt(e,t,r){let{stations:n=0}=t,{isMovable:a=!1}=t,{uiTransform:i=""}=t;const s=he("ship");return e.$$set=u=>{"stations"in u&&r(0,n=u.stations),"isMovable"in u&&r(1,a=u.isMovable),"uiTransform"in u&&r(2,i=u.uiTransform)},[n,a,i,s]}class mlt extends Ot{constructor(t){super();At(this,t,_lt,glt,Tt,{stations:0,isMovable:1,uiTransform:2})}}function l$(e,t,r){const n=e.slice();return n[6]=t[r],n}function c$(e,t,r){const n=e.slice();return n[6]=t[r],n}function h$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){Wn(t.src,r=En+"/icons/screen.svg")||F(t,"src",r),F(t,"alt","screen"),F(t,"class","svelte-kh7po5")},m(n,a){U(n,t,a)},p:se,d(n){n&&P(t)}}}function v$(e){let t,r;return{c(){t=k("img"),this.h()},l(n){t=H(n,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){Wn(t.src,r=En+"/icons/screen-advanced.svg")||F(t,"src",r),F(t,"alt","advanced screen"),F(t,"class","svelte-kh7po5")},m(n,a){U(n,t,a)},p:se,d(n){n&&P(t)}}}function $lt(e){let t,r,n,a,i,s=Bi(1,e[0]),u=[];for(let h=0;h<s.length;h+=1)u[h]=h$(c$(e,s,h));let f=Bi(1,e[1]),c=[];for(let h=0;h<f.length;h+=1)c[h]=v$(l$(e,f,h));return{c(){t=k("div");for(let h=0;h<u.length;h+=1)u[h].c();r=ht();for(let h=0;h<c.length;h+=1)c[h].c();this.h()},l(h){t=H(h,"DIV",{class:!0});var v=X(t);for(let p=0;p<u.length;p+=1)u[p].l(v);r=vt(v);for(let p=0;p<c.length;p+=1)c[p].l(v);v.forEach(P),this.h()},h(){F(t,"class","svelte-kh7po5"),Re(t,"transform",e[2],!1)},m(h,v){U(h,t,v);for(let p=0;p<u.length;p+=1)u[p].m(t,null);j(t,r);for(let p=0;p<c.length;p+=1)c[p].m(t,null);a||(i=[nn(n=Co.call(null,t,{disabled:!e[3]})),Xt(t,"translate",e[5])],a=!0)},p(h,[v]){if(v&1){s=Bi(1,h[0]);let p;for(p=0;p<s.length;p+=1){const g=c$(h,s,p);u[p]?u[p].p(g,v):(u[p]=h$(),u[p].c(),u[p].m(t,r))}for(;p<u.length;p+=1)u[p].d(1);u.length=s.length}if(v&2){f=Bi(1,h[1]);let p;for(p=0;p<f.length;p+=1){const g=l$(h,f,p);c[p]?c[p].p(g,v):(c[p]=v$(),c[p].c(),c[p].m(t,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=f.length}n&&Va(n.update)&&v&8&&n.update.call(null,{disabled:!h[3]}),v&4&&Re(t,"transform",h[2],!1)},i:se,o:se,d(h){h&&P(t),ks(u,h),ks(c,h),a=!1,an(i)}}}function blt(e,t,r){let{standard:n=0}=t,{advanced:a=0}=t,{uiTransform:i=""}=t,{isMovable:s=!1}=t;const u=he("ship"),f=({detail:c})=>{u.dispatch.setUITransform({system:"screens",translate:c})};return e.$$set=c=>{"standard"in c&&r(0,n=c.standard),"advanced"in c&&r(1,a=c.advanced),"uiTransform"in c&&r(2,i=c.uiTransform),"isMovable"in c&&r(3,s=c.isMovable)},[n,a,i,s,u,f]}class ylt extends Ot{constructor(t){super();At(this,t,blt,$lt,Tt,{standard:0,advanced:1,uiTransform:2,isMovable:3})}}function wlt(e){let t,r,n,a,i;const s=[{isMovable:e[2]},e[0]];let u={};for(let h=0;h<s.length;h+=1)u=Nt(u,s[h]);r=new mlt({props:u});const f=[{isMovable:e[2]},e[1]];let c={};for(let h=0;h<f.length;h+=1)c=Nt(c,f[h]);return a=new ylt({props:c}),{c(){t=k("div"),st(r.$$.fragment),n=ht(),st(a.$$.fragment),this.h()},l(h){t=H(h,"DIV",{class:!0});var v=X(t);ft(r.$$.fragment,v),n=vt(v),ft(a.$$.fragment,v),v.forEach(P),this.h()},h(){F(t,"class","svelte-pscno5")},m(h,v){U(h,t,v),ot(r,t,null),j(t,n),ot(a,t,null),i=!0},p(h,[v]){const p=v&5?ae(s,[v&4&&{isMovable:h[2]},v&1&&ue(h[0])]):{};r.$set(p);const g=v&6?ae(f,[v&4&&{isMovable:h[2]},v&2&&ue(h[1])]):{};a.$set(g)},i(h){i||(V(r.$$.fragment,h),V(a.$$.fragment,h),i=!0)},o(h){tt(r.$$.fragment,h),tt(a.$$.fragment,h),i=!1},d(h){h&&P(t),ut(r),ut(a)}}}function Slt(e,t,r){let{firecons:n=0}=t,{screens:a={}}=t,{isMovable:i=!1}=t;return e.$$set=s=>{"firecons"in s&&r(0,n=s.firecons),"screens"in s&&r(1,a=s.screens),"isMovable"in s&&r(2,i=s.isMovable)},[n,a,i]}class Elt extends Ot{constructor(t){super();At(this,t,Slt,wlt,Tt,{firecons:0,screens:1,isMovable:2})}}function Clt(e){var L,G,W,at,et,rt,gt,lt,pt,dt;let t,r,n,a,i,s,u,f,c,h,v,p,g,_,m,b,y,w,O,T,A,I,x,B,M;return h=new tst({props:{shipClass:e[1].identification.shipClass,shipType:e[1].identification.shipType,cost:(L=e[1].reqs)==null?void 0:L.cost,mass:(G=e[1].reqs)==null?void 0:G.mass}}),g=new ult({props:{structure:e[1].structure,shipMass:e[1].identification.mass,isMovable:e[0]}}),m=new Elt({props:{isMovable:e[0],firecons:e[1].weaponry.firecons,screens:e[1].structure.screens}}),y=new dlt({props:{isMovable:e[0],weapons:e[1].weaponry.weapons}}),O=new Qft({props:{isMovable:e[0],ftl:(at=(W=e[1])==null?void 0:W.propulsion)==null?void 0:at.ftl,engine:(gt=(rt=(et=e[1])==null?void 0:et.propulsion)==null?void 0:rt.drive)==null?void 0:gt.rating,drive:(pt=(lt=e[1])==null?void 0:lt.propulsion)==null?void 0:pt.drive,structure:(dt=e[1])==null?void 0:dt.structure}}),{c(){t=k("div"),r=k("label"),n=k("input"),a=$t(" edit layout"),i=ht(),s=k("button"),u=$t("reset layout"),f=ht(),c=k("div"),st(h.$$.fragment),v=ht(),p=k("div"),st(g.$$.fragment),_=ht(),st(m.$$.fragment),b=ht(),st(y.$$.fragment),w=ht(),st(O.$$.fragment),T=ht(),A=k("div"),I=$t("Printing this page will only prints the ship sheet."),this.h()},l(K){t=H(K,"DIV",{class:!0});var it=X(t);r=H(it,"LABEL",{});var jt=X(r);n=H(jt,"INPUT",{type:!0}),a=bt(jt," edit layout"),jt.forEach(P),i=vt(it),s=H(it,"BUTTON",{class:!0});var Ft=X(s);u=bt(Ft,"reset layout"),Ft.forEach(P),it.forEach(P),f=vt(K),c=H(K,"DIV",{class:!0});var Vt=X(c);ft(h.$$.fragment,Vt),v=vt(Vt),p=H(Vt,"DIV",{class:!0});var _t=X(p);ft(g.$$.fragment,_t),_=vt(_t),ft(m.$$.fragment,_t),_t.forEach(P),b=vt(Vt),ft(y.$$.fragment,Vt),w=vt(Vt),ft(O.$$.fragment,Vt),Vt.forEach(P),T=vt(K),A=H(K,"DIV",{class:!0});var It=X(A);I=bt(It,"Printing this page will only prints the ship sheet."),It.forEach(P),this.h()},h(){F(n,"type","checkbox"),F(s,"class","button error"),F(t,"class","notice svelte-d4x2tt"),F(p,"class","section-2 svelte-d4x2tt"),F(c,"class","print-output svelte-d4x2tt"),F(A,"class","notice svelte-d4x2tt")},m(K,it){U(K,t,it),j(t,r),j(r,n),n.checked=e[0],j(r,a),j(t,i),j(t,s),j(s,u),U(K,f,it),U(K,c,it),ot(h,c,null),j(c,v),j(c,p),ot(g,p,null),j(p,_),ot(m,p,null),j(c,b),ot(y,c,null),j(c,w),ot(O,c,null),U(K,T,it),U(K,A,it),j(A,I),x=!0,B||(M=[Xt(n,"change",e[3]),Xt(s,"click",e[2])],B=!0)},p(K,[it]){var $e,ee,Ct,Ie,ve,le,Ht,yt,wt,pe;it&1&&(n.checked=K[0]);const jt={};it&2&&(jt.shipClass=K[1].identification.shipClass),it&2&&(jt.shipType=K[1].identification.shipType),it&2&&(jt.cost=($e=K[1].reqs)==null?void 0:$e.cost),it&2&&(jt.mass=(ee=K[1].reqs)==null?void 0:ee.mass),h.$set(jt);const Ft={};it&2&&(Ft.structure=K[1].structure),it&2&&(Ft.shipMass=K[1].identification.mass),it&1&&(Ft.isMovable=K[0]),g.$set(Ft);const Vt={};it&1&&(Vt.isMovable=K[0]),it&2&&(Vt.firecons=K[1].weaponry.firecons),it&2&&(Vt.screens=K[1].structure.screens),m.$set(Vt);const _t={};it&1&&(_t.isMovable=K[0]),it&2&&(_t.weapons=K[1].weaponry.weapons),y.$set(_t);const It={};it&1&&(It.isMovable=K[0]),it&2&&(It.ftl=(Ie=(Ct=K[1])==null?void 0:Ct.propulsion)==null?void 0:Ie.ftl),it&2&&(It.engine=(Ht=(le=(ve=K[1])==null?void 0:ve.propulsion)==null?void 0:le.drive)==null?void 0:Ht.rating),it&2&&(It.drive=(wt=(yt=K[1])==null?void 0:yt.propulsion)==null?void 0:wt.drive),it&2&&(It.structure=(pe=K[1])==null?void 0:pe.structure),O.$set(It)},i(K){x||(V(h.$$.fragment,K),V(g.$$.fragment,K),V(m.$$.fragment,K),V(y.$$.fragment,K),V(O.$$.fragment,K),x=!0)},o(K){tt(h.$$.fragment,K),tt(g.$$.fragment,K),tt(m.$$.fragment,K),tt(y.$$.fragment,K),tt(O.$$.fragment,K),x=!1},d(K){K&&P(t),K&&P(f),K&&P(c),ut(h),ut(g),ut(m),ut(y),ut(O),K&&P(T),K&&P(A),B=!1,an(M)}}}function Olt(e,t,r){let{ship:n={}}=t,{isMovable:a=!1}=t;const{dispatch:i}=he("ship"),s=()=>{r(0,a=!1),i.resetLayout()};function u(){a=this.checked,r(0,a)}return e.$$set=f=>{"ship"in f&&r(1,n=f.ship),"isMovable"in f&&r(0,a=f.isMovable)},[a,n,s,u]}class Alt extends Ot{constructor(t){super();At(this,t,Olt,Clt,Tt,{ship:1,isMovable:0})}}function p$(e){let t,r;return t=new Alt({props:{ship:e[1]}}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p(n,a){const i={};a&2&&(i.ship=n[1]),t.$set(i)},i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Tlt(e){let t,r,n,a,i,s,u,f,c,h,v,p,g,_;a=new vnt({}),s=new Ont({}),s.$on("changeTab",e[3]),c=new qit({}),p=new Hit({});let m=e[0]==="print"&&p$(e);return{c(){t=k("meta"),r=ht(),n=k("main"),st(a.$$.fragment),i=ht(),st(s.$$.fragment),u=ht(),f=k("div"),st(c.$$.fragment),h=ht(),v=k("div"),st(p.$$.fragment),g=ht(),m&&m.c(),this.h()},l(b){const y=xM('[data-svelte="svelte-wq1q9u"]',document.head);t=H(y,"META",{name:!0,content:!0}),y.forEach(P),r=vt(b),n=H(b,"MAIN",{class:!0});var w=X(n);ft(a.$$.fragment,w),i=vt(w),ft(s.$$.fragment,w),u=vt(w),f=H(w,"DIV",{class:!0});var O=X(f);ft(c.$$.fragment,O),O.forEach(P),h=vt(w),v=H(w,"DIV",{class:!0});var T=X(v);ft(p.$$.fragment,T),T.forEach(P),g=vt(w),m&&m.l(w),w.forEach(P),this.h()},h(){F(t,"name","viewport"),F(t,"content","width=960"),F(f,"class","svelte-khn038"),Le(f,"hide",e[0]!=="editor"),F(v,"class","svelte-khn038"),Le(v,"hide",e[0]!=="json"),F(n,"class","svelte-khn038")},m(b,y){j(document.head,t),U(b,r,y),U(b,n,y),ot(a,n,null),j(n,i),ot(s,n,null),j(n,u),j(n,f),ot(c,f,null),j(n,h),j(n,v),ot(p,v,null),j(n,g),m&&m.m(n,null),_=!0},p(b,[y]){y&1&&Le(f,"hide",b[0]!=="editor"),y&1&&Le(v,"hide",b[0]!=="json"),b[0]==="print"?m?(m.p(b,y),y&1&&V(m,1)):(m=p$(b),m.c(),V(m,1),m.m(n,null)):m&&(dn(),tt(m,1,1,()=>{m=null}),gn())},i(b){_||(V(a.$$.fragment,b),V(s.$$.fragment,b),V(c.$$.fragment,b),V(p.$$.fragment,b),V(m),_=!0)},o(b){tt(a.$$.fragment,b),tt(s.$$.fragment,b),tt(c.$$.fragment,b),tt(p.$$.fragment,b),tt(m),_=!1},d(b){P(t),b&&P(r),b&&P(n),ut(a),ut(s),ut(c),ut(p),m&&m.d()}}}function Mlt(e,t,r){let n,a="editor";const{state:i}=he("ship");so(e,i,u=>r(1,n=u));const s=({detail:u})=>r(0,a=u);return e.$$.update=()=>{e.$$.dirty&1&&console.log(a)},[a,n,i,s]}class Plt extends Ot{constructor(t){super();At(this,t,Mlt,Tlt,Tt,{})}}function xlt(e){let t,r;return t=new Plt({}),{c(){st(t.$$.fragment)},l(n){ft(t.$$.fragment,n)},m(n,a){ot(t,n,a),r=!0},p:se,i(n){r||(V(t.$$.fragment,n),r=!0)},o(n){tt(t.$$.fragment,n),r=!1},d(n){ut(t,n)}}}function Ilt(e){return Pc("ship",Zrt()),[]}class Llt extends Ot{constructor(t){super();At(this,t,Ilt,xlt,Tt,{})}}export{Llt as default};
|