@dxyl/utils 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +8985 -0
- package/dist/index.umd.js +28 -0
- package/lib/glslang/glslang.d.ts +14 -0
- package/lib/glslang/glslang.js +113 -0
- package/lib/glslang/glslang.wasm +0 -0
- package/lib/twgsl/twgsl.js +53 -0
- package/lib/twgsl/twgsl.wasm +0 -0
- package/package.json +27 -34
- package/readme.md +0 -0
- package/types/Color.d.ts +69 -0
- package/types/Options.d.ts +70 -0
- package/types/antv-util/color/arr2rgb.d.ts +12 -0
- package/types/antv-util/color/gradient.d.ts +6 -0
- package/types/antv-util/color/index.d.ts +4 -0
- package/types/antv-util/color/rgb2arr.d.ts +6 -0
- package/types/antv-util/color/tocssgradient.d.ts +1 -0
- package/types/antv-util/color/torgb.d.ts +6 -0
- package/types/antv-util/helper/index.d.ts +2 -0
- package/types/antv-util/helper/mod.d.ts +1 -0
- package/types/antv-util/helper/to-radian.d.ts +1 -0
- package/types/antv-util/index.d.ts +3 -0
- package/types/antv-util/matrix/index.d.ts +27 -0
- package/types/antv-util/path/convert/path-2-absolute.d.ts +2 -0
- package/types/antv-util/path/convert/path-2-curve.d.ts +2 -0
- package/types/antv-util/path/convert/path-2-string.d.ts +6 -0
- package/types/antv-util/path/index.d.ts +17 -0
- package/types/antv-util/path/parser/finalize-segment.d.ts +5 -0
- package/types/antv-util/path/parser/is-arc-command.d.ts +4 -0
- package/types/antv-util/path/parser/is-digit-start.d.ts +6 -0
- package/types/antv-util/path/parser/is-path-command.d.ts +4 -0
- package/types/antv-util/path/parser/is-space.d.ts +4 -0
- package/types/antv-util/path/parser/params-count.d.ts +13 -0
- package/types/antv-util/path/parser/params-parser.d.ts +10 -0
- package/types/antv-util/path/parser/parse-path-string.d.ts +6 -0
- package/types/antv-util/path/parser/path-parser.d.ts +16 -0
- package/types/antv-util/path/parser/scan-flag.d.ts +6 -0
- package/types/antv-util/path/parser/scan-param.d.ts +6 -0
- package/types/antv-util/path/parser/scan-segment.d.ts +6 -0
- package/types/antv-util/path/parser/skip-spaces.d.ts +7 -0
- package/types/antv-util/path/process/arc-2-cubic.d.ts +7 -0
- package/types/antv-util/path/process/clone-path.d.ts +2 -0
- package/types/antv-util/path/process/fix-arc.d.ts +2 -0
- package/types/antv-util/path/process/line-2-cubic.d.ts +1 -0
- package/types/antv-util/path/process/normalize-path.d.ts +8 -0
- package/types/antv-util/path/process/normalize-segment.d.ts +6 -0
- package/types/antv-util/path/process/quad-2-cubic.d.ts +1 -0
- package/types/antv-util/path/process/reverse-curve.d.ts +2 -0
- package/types/antv-util/path/process/round-path.d.ts +6 -0
- package/types/antv-util/path/process/segment-2-cubic.d.ts +2 -0
- package/types/antv-util/path/types.d.ts +122 -0
- package/types/antv-util/path/util/distance-square-root.d.ts +1 -0
- package/types/antv-util/path/util/equalize-segments.d.ts +2 -0
- package/types/antv-util/path/util/get-draw-direction.d.ts +2 -0
- package/types/antv-util/path/util/get-path-area.d.ts +8 -0
- package/types/antv-util/path/util/get-path-bbox-total-length.d.ts +5 -0
- package/types/antv-util/path/util/get-path-bbox.d.ts +5 -0
- package/types/antv-util/path/util/get-point-at-length.d.ts +5 -0
- package/types/antv-util/path/util/get-properties-at-length.d.ts +6 -0
- package/types/antv-util/path/util/get-properties-at-point.d.ts +7 -0
- package/types/antv-util/path/util/get-rotated-curve.d.ts +2 -0
- package/types/antv-util/path/util/get-total-length.d.ts +8 -0
- package/types/antv-util/path/util/is-absolute-array.d.ts +6 -0
- package/types/antv-util/path/util/is-curve-array.d.ts +9 -0
- package/types/antv-util/path/util/is-normalized-array.d.ts +7 -0
- package/types/antv-util/path/util/is-path-array.d.ts +5 -0
- package/types/antv-util/path/util/is-point-in-stroke.d.ts +5 -0
- package/types/antv-util/path/util/mid-point.d.ts +1 -0
- package/types/antv-util/path/util/path-length-factory.d.ts +7 -0
- package/types/antv-util/path/util/rotate-vector.d.ts +4 -0
- package/types/antv-util/path/util/segment-arc-factory.d.ts +6 -0
- package/types/antv-util/path/util/segment-cubic-factory.d.ts +6 -0
- package/types/antv-util/path/util/segment-line-factory.d.ts +6 -0
- package/types/antv-util/path/util/segment-quad-factory.d.ts +6 -0
- package/types/callbacks.d.ts +30 -0
- package/types/color/colord/src/colorModels/cmyk.d.ts +23 -0
- package/types/color/colord/src/colorModels/cmykString.d.ts +7 -0
- package/types/color/colord/src/colorModels/hex.d.ts +5 -0
- package/types/color/colord/src/colorModels/hsl.d.ts +8 -0
- package/types/color/colord/src/colorModels/hslString.d.ts +7 -0
- package/types/color/colord/src/colorModels/hsv.d.ts +6 -0
- package/types/color/colord/src/colorModels/hwb.d.ts +6 -0
- package/types/color/colord/src/colorModels/hwbString.d.ts +7 -0
- package/types/color/colord/src/colorModels/lab.d.ts +18 -0
- package/types/color/colord/src/colorModels/lch.d.ts +19 -0
- package/types/color/colord/src/colorModels/lchString.d.ts +7 -0
- package/types/color/colord/src/colorModels/rgb.d.ts +13 -0
- package/types/color/colord/src/colorModels/rgbString.d.ts +7 -0
- package/types/color/colord/src/colorModels/xyz.d.ts +30 -0
- package/types/color/colord/src/colord.d.ts +103 -0
- package/types/color/colord/src/constants.d.ts +10 -0
- package/types/color/colord/src/extend.d.ts +4 -0
- package/types/color/colord/src/get/getBrightness.d.ts +7 -0
- package/types/color/colord/src/get/getContrast.d.ts +6 -0
- package/types/color/colord/src/get/getLuminance.d.ts +6 -0
- package/types/color/colord/src/get/getPerceivedDifference.d.ts +24 -0
- package/types/color/colord/src/helpers.d.ts +20 -0
- package/types/color/colord/src/index.d.ts +5 -0
- package/types/color/colord/src/manipulate/changeAlpha.d.ts +2 -0
- package/types/color/colord/src/manipulate/invert.d.ts +2 -0
- package/types/color/colord/src/manipulate/lighten.d.ts +2 -0
- package/types/color/colord/src/manipulate/mix.d.ts +2 -0
- package/types/color/colord/src/manipulate/saturate.d.ts +2 -0
- package/types/color/colord/src/parse.d.ts +8 -0
- package/types/color/colord/src/plugins/a11y.d.ts +38 -0
- package/types/color/colord/src/plugins/cmyk.d.ts +24 -0
- package/types/color/colord/src/plugins/harmonies.d.ts +16 -0
- package/types/color/colord/src/plugins/hwb.d.ts +23 -0
- package/types/color/colord/src/plugins/lab.d.ts +23 -0
- package/types/color/colord/src/plugins/lch.d.ts +24 -0
- package/types/color/colord/src/plugins/minify.d.ts +20 -0
- package/types/color/colord/src/plugins/mix.d.ts +27 -0
- package/types/color/colord/src/plugins/names.d.ts +19 -0
- package/types/color/colord/src/plugins/xyz.d.ts +14 -0
- package/types/color/colord/src/random.d.ts +2 -0
- package/types/color/colord/src/types.d.ts +67 -0
- package/types/data/immer.d.ts +262 -0
- package/types/data/immutable.d.ts +5127 -0
- package/types/data/mobx.d.ts +154 -0
- package/types/data/reactivity.d.ts +755 -0
- package/types/data/signals.d.ts +144 -0
- package/types/deepmerge.d.ts +16 -0
- package/types/events/eventTarget.d.ts +93 -0
- package/types/events/event_emiter.d.ts +43 -0
- package/types/events/eventemitter3.d.ts +135 -0
- package/types/events/mitt.d.ts +21 -0
- package/types/fast-deep-equal.d.ts +1 -0
- package/types/index.d.ts +20 -0
- package/types/ismobilejs.d.ts +46 -0
- package/types/lodash/augment.d.ts +2 -0
- package/types/lodash/cache.d.ts +14 -0
- package/types/lodash/clamp.d.ts +2 -0
- package/types/lodash/clear-animation-frame.d.ts +1 -0
- package/types/lodash/clone.d.ts +2 -0
- package/types/lodash/contains.d.ts +2 -0
- package/types/lodash/debounce.d.ts +2 -0
- package/types/lodash/deep-mix.d.ts +2 -0
- package/types/lodash/difference.d.ts +11 -0
- package/types/lodash/each.d.ts +2 -0
- package/types/lodash/ends-with.d.ts +3 -0
- package/types/lodash/every.d.ts +7 -0
- package/types/lodash/extend.d.ts +2 -0
- package/types/lodash/filter.d.ts +2 -0
- package/types/lodash/find-index.d.ts +2 -0
- package/types/lodash/find.d.ts +3 -0
- package/types/lodash/first-value.d.ts +2 -0
- package/types/lodash/fixed-base.d.ts +2 -0
- package/types/lodash/flatten-deep.d.ts +12 -0
- package/types/lodash/flatten.d.ts +11 -0
- package/types/lodash/for-in.d.ts +2 -0
- package/types/lodash/get-range.d.ts +6 -0
- package/types/lodash/get-type.d.ts +2 -0
- package/types/lodash/get-wrap-behavior.d.ts +9 -0
- package/types/lodash/get.d.ts +8 -0
- package/types/lodash/group-by.d.ts +6 -0
- package/types/lodash/group-to-map.d.ts +8 -0
- package/types/lodash/group.d.ts +2 -0
- package/types/lodash/has-key.d.ts +2 -0
- package/types/lodash/has-value.d.ts +2 -0
- package/types/lodash/has.d.ts +2 -0
- package/types/lodash/head.d.ts +1 -0
- package/types/lodash/identity.d.ts +2 -0
- package/types/lodash/index-of.d.ts +2 -0
- package/types/lodash/index.d.ts +108 -0
- package/types/lodash/is-arguments.d.ts +2 -0
- package/types/lodash/is-array-like.d.ts +2 -0
- package/types/lodash/is-array.d.ts +2 -0
- package/types/lodash/is-boolean.d.ts +2 -0
- package/types/lodash/is-date.d.ts +2 -0
- package/types/lodash/is-decimal.d.ts +2 -0
- package/types/lodash/is-element.d.ts +6 -0
- package/types/lodash/is-empty.d.ts +2 -0
- package/types/lodash/is-equal-with.d.ts +24 -0
- package/types/lodash/is-equal.d.ts +2 -0
- package/types/lodash/is-error.d.ts +2 -0
- package/types/lodash/is-even.d.ts +2 -0
- package/types/lodash/is-finite.d.ts +1 -0
- package/types/lodash/is-function.d.ts +2 -0
- package/types/lodash/is-integer.d.ts +2 -0
- package/types/lodash/is-match.d.ts +2 -0
- package/types/lodash/is-negative.d.ts +2 -0
- package/types/lodash/is-nil.d.ts +2 -0
- package/types/lodash/is-null.d.ts +2 -0
- package/types/lodash/is-number-equal.d.ts +1 -0
- package/types/lodash/is-number.d.ts +2 -0
- package/types/lodash/is-object-like.d.ts +2 -0
- package/types/lodash/is-object.d.ts +2 -0
- package/types/lodash/is-odd.d.ts +2 -0
- package/types/lodash/is-plain-object.d.ts +2 -0
- package/types/lodash/is-positive.d.ts +2 -0
- package/types/lodash/is-prototype.d.ts +2 -0
- package/types/lodash/is-reg-exp.d.ts +2 -0
- package/types/lodash/is-segment-equal.d.ts +2 -0
- package/types/lodash/is-string.d.ts +2 -0
- package/types/lodash/is-type.d.ts +2 -0
- package/types/lodash/is-undefined.d.ts +2 -0
- package/types/lodash/keys.d.ts +2 -0
- package/types/lodash/last.d.ts +1 -0
- package/types/lodash/lower-case.d.ts +2 -0
- package/types/lodash/lower-first.d.ts +2 -0
- package/types/lodash/map-values.d.ts +6 -0
- package/types/lodash/map.d.ts +2 -0
- package/types/lodash/max-by.d.ts +16 -0
- package/types/lodash/max.d.ts +19 -0
- package/types/lodash/memoize.d.ts +11 -0
- package/types/lodash/merge.d.ts +7 -0
- package/types/lodash/min-by.d.ts +16 -0
- package/types/lodash/min.d.ts +19 -0
- package/types/lodash/mix.d.ts +1 -0
- package/types/lodash/mod.d.ts +2 -0
- package/types/lodash/noop.d.ts +2 -0
- package/types/lodash/number2color.d.ts +2 -0
- package/types/lodash/omit.d.ts +3 -0
- package/types/lodash/parse-radius.d.ts +9 -0
- package/types/lodash/pick.d.ts +16 -0
- package/types/lodash/pull-at.d.ts +2 -0
- package/types/lodash/pull.d.ts +2 -0
- package/types/lodash/reduce.d.ts +3 -0
- package/types/lodash/remove.d.ts +2 -0
- package/types/lodash/request-animation-frame.d.ts +1 -0
- package/types/lodash/set.d.ts +8 -0
- package/types/lodash/size.d.ts +1 -0
- package/types/lodash/some.d.ts +7 -0
- package/types/lodash/sort-by.d.ts +7 -0
- package/types/lodash/starts-with.d.ts +3 -0
- package/types/lodash/substitute.d.ts +5 -0
- package/types/lodash/throttle.d.ts +6 -0
- package/types/lodash/to-array.d.ts +2 -0
- package/types/lodash/to-degree.d.ts +2 -0
- package/types/lodash/to-integer.d.ts +1 -0
- package/types/lodash/to-radian.d.ts +2 -0
- package/types/lodash/to-string.d.ts +2 -0
- package/types/lodash/types/index.d.ts +3 -0
- package/types/lodash/union.d.ts +2 -0
- package/types/lodash/uniq.d.ts +1 -0
- package/types/lodash/unique-id.d.ts +2 -0
- package/types/lodash/upper-case.d.ts +2 -0
- package/types/lodash/upper-first.d.ts +2 -0
- package/types/lodash/values-of-key.d.ts +2 -0
- package/types/lodash/values.d.ts +2 -0
- package/types/lodash/wrap-behavior.d.ts +9 -0
- package/types/parse-svg-path.d.ts +19 -0
- package/types/priority_queue.d.ts +41 -0
- package/types/radash/array.d.ts +209 -0
- package/types/radash/async.d.ts +99 -0
- package/types/radash/curry.d.ts +113 -0
- package/types/radash/index.d.ts +10 -0
- package/types/radash/number.d.ts +27 -0
- package/types/radash/object.d.ts +112 -0
- package/types/radash/random.d.ts +11 -0
- package/types/radash/series.d.ts +13 -0
- package/types/radash/string.d.ts +71 -0
- package/types/radash/typed.d.ts +26 -0
- package/types/stats.module.d.ts +3 -0
- package/README.md +0 -1
- package/dist/cjs/index.js +0 -19
- package/dist/umd/index.js +0 -23
- package/esm/extend.js +0 -3
- package/esm/index.js +0 -3
- package/lib/extend.js +0 -6
- package/lib/index.js +0 -6
- package/src/extend.ts +0 -6
- package/src/index.ts +0 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
(function(M,Ze){typeof exports=="object"&&typeof module<"u"?Ze(exports):typeof define=="function"&&define.amd?define(["exports"],Ze):(M=typeof globalThis<"u"?globalThis:M||self,Ze((M.dxMyth=M.dxMyth||{},M.dxMyth.utils={})))})(this,function(M){"use strict";class Ze{NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3;data=null;type;bubbles;cancelBubble=!1;cancelable;composed;defaultPrevented;isTrusted;target;currentTarget;eventPhase;timeStamp;stopImmediatePropagationInternal=!1;constructor(e,r){this.type=e,this.bubbles=r?.bubbles??!1,this.cancelable=r?.cancelable??!1,this.composed=r?.composed??!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.currentTarget=null,this.eventPhase=0,this.timeStamp=Date.now()}setData(e){return this.data=e,this}initEvent(e,r,n){this.type=e,this.bubbles=r??!1,this.cancelable=n??!1,this.defaultPrevented=!1}stopPropagation(){this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.stopPropagation(),this.stopImmediatePropagationInternal=!0}composedPath(){const e=[];let r=this.target;for(;r;)e.push(r),r=r.parentNode;return e}}class Yu{listeners=new Map;parentNode=null;constructor(){}addEventListener(e,r,n){const i={once:!1,passive:!1,capture:!1};typeof n!="object"&&n!==null?i.capture=!!n:Object.assign(i,n),this.listeners.has(e)||this.listeners.set(e,{capture:[],bubble:[]});const s=this.listeners.get(e),o={...i,handle:r};i.capture?s.capture.push(o):s.bubble.push(o)}dispatchEvent(e){e.currentTarget=this,e.target=this;const r=e.composedPath(),n=[],i=[],s=[];for(const a of r){const u=a.listeners?.get(e.type);u&&(s.push(a),n.unshift(u.capture),i.push(u.bubble))}let o=s.length-1;t:for(const a of n){const u=s[o--];e.target=u,e.eventPhase=u===this?e.AT_TARGET:e.CAPTURING_PHASE;for(const f of a)if(typeof f.handle=="function"?f.handle.call(this,e):f.handle&&typeof f.handle.handleEvent=="function"&&f.handle.handleEvent(e),f.once&&u.removeEventListener(e.type,f.handle),e.stopImmediatePropagationInternal)break;if(e.cancelBubble)break t}if(!e.cancelBubble){let a=0;for(const u of i){const f=s[a++];e.target=f,e.eventPhase=f===this?e.AT_TARGET:e.BUBBLING_PHASE;for(const c of u)if(typeof c.handle=="function"?c.handle.call(this,e):c.handle&&typeof c.handle.handleEvent=="function"&&c.handle.handleEvent(e),c.once&&f.removeEventListener(e.type,c.handle),e.stopImmediatePropagationInternal)break;if(e.cancelBubble||!e.bubbles)break}}return e.eventPhase=e.NONE,!e.defaultPrevented}removeEventListener(e,r,n){if(!r||!this.listeners.has(e))return;const i=typeof n=="boolean"?n:n?.capture??!1,s=this.listeners.get(e);i?s.capture=s.capture.filter(o=>o.handle!==r):s.bubble=s.bubble.filter(o=>o.handle!==r),s.capture.length===0&&s.bubble.length===0&&this.listeners.delete(e)}}var Zu=Object.prototype.hasOwnProperty,X="~";function Je(){}Object.create&&(Je.prototype=Object.create(null),new Je().__proto__||(X=!1));function Ju(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function Ls(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new Ju(r,n||t,i),o=X?X+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function Vr(t,e){--t._eventsCount===0?t._events=new Je:delete t._events[e]}function H(){this._events=new Je,this._eventsCount=0}H.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)Zu.call(r,n)&&e.push(X?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e},H.prototype.listeners=function(e){var r=X?X+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o},H.prototype.listenerCount=function(e){var r=X?X+e:e,n=this._events[r];return n?n.fn?1:n.length:0},H.prototype.emit=function(e,r,n,i,s,o){var a=X?X+e:e;if(!this._events[a])return!1;var u=this._events[a],f=arguments.length,c,h;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,i),!0;case 5:return u.fn.call(u.context,r,n,i,s),!0;case 6:return u.fn.call(u.context,r,n,i,s,o),!0}for(h=1,c=new Array(f-1);h<f;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c)}else{var l=u.length,p;for(h=0;h<l;h++)switch(u[h].once&&this.removeListener(e,u[h].fn,void 0,!0),f){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,r);break;case 3:u[h].fn.call(u[h].context,r,n);break;case 4:u[h].fn.call(u[h].context,r,n,i);break;default:if(!c)for(p=1,c=new Array(f-1);p<f;p++)c[p-1]=arguments[p];u[h].fn.apply(u[h].context,c)}}return!0},H.prototype.on=function(e,r,n){return Ls(this,e,r,n,!1)},H.prototype.once=function(e,r,n){return Ls(this,e,r,n,!0)},H.prototype.removeListener=function(e,r,n,i){var s=X?X+e:e;if(!this._events[s])return this;if(!r)return Vr(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&Vr(this,s);else{for(var a=0,u=[],f=o.length;a<f;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&u.push(o[a]);u.length?this._events[s]=u.length===1?u[0]:u:Vr(this,s)}return this},H.prototype.removeAllListeners=function(e){var r;return e?(r=X?X+e:e,this._events[r]&&Vr(this,r)):(this._events=new Je,this._eventsCount=0),this},H.prototype.off=H.prototype.removeListener,H.prototype.addListener=H.prototype.on,H.prefixed=X,H.EventEmitter=H;class Qu{firing=!1;memory;fired=!1;locked=!1;list=[];queue=[];firingIndex=-1;destroyedList=!1;options={once:!1,memory:!0,unique:!0,stopOnFalse:!1};constructor(e){this.options=Object.assign(this.options,e??{})}_fire(){const e=this.queue;for(this.locked=this.locked||this.options.once,this.fired=this.firing=!0;e.length;this.firingIndex=-1)for(this.memory=e.shift();++this.firingIndex<this.list.length;)this.list[this.firingIndex].apply(this.memory[0],this.memory[1])===!1&&this.options.stopOnFalse&&(this.firingIndex=this.list.length,this.memory=!1);this.options.memory||(this.memory=!1),this.firing=!1,this.locked&&(this.memory?this.list=[]:(this.list=[],this.destroyedList=!0))}add(...e){return this.destroyedList||(this.memory&&!this.firing&&(this.firingIndex=this.list.length-1,this.queue.push(this.memory)),e.forEach(r=>{typeof r=="function"?(!this.options.unique||!this.has(r))&&this.list.push(r):r&&r.length&&Array.isArray(r)&&this.add(...r)}),this.memory&&!this.firing&&this._fire()),this}remove(...e){return e.forEach(r=>{for(var n=0;(n=this.list.indexOf(r,n))>-1;)this.list.splice(n,1),n<=this.firingIndex&&this.firingIndex--}),this}has(e){return e?this.list.indexOf(e)>-1:this.list.length>0}empty(){return this.list&&(this.list=[]),this}disable(){return this.locked=!0,this.queue=[],this.list=[],this.destroyedList=!0,this.memory=null,this}disabled(){return this.destroyedList}lock(){return this.locked=!0,this.queue=[],!this.memory&&!this.firing&&(this.list=[],this.memory=null,this.destroyedList=!0),this}fireWith(e,r){return this.locked||(r=r||[],r=[e,r.slice?r.slice():r],this.queue.push(r),this.firing||this._fire()),this}fire(...e){return this.fireWith(this,e),this}}class Xu{heap;compare;constructor(e){this.heap=[],this.compare=e}get size(){return this.heap.length}isEmpty(){return this.size===0}top(){return this.peek()}peek(){return this.isEmpty()?null:this.heap[0]}enqueue(e){this.heap.push(e),this.siftUp(this.size-1)}push(e){this.enqueue(e)}pop(){return this.dequeue()}dequeue(){if(this.isEmpty())return null;const e=this.heap[0],r=this.heap.pop();return this.isEmpty()||(this.heap[0]=r,this.siftDown(0)),e}siftUp(e){for(;e>0;){const r=Math.floor((e-1)/2);if(this.compare(this.heap[e],this.heap[r])>=0)break;this.swap(e,r),e=r}}siftDown(e){const r=this.size;for(;e<r;){const n=2*e+1,i=2*e+2;let s=e;if(n<r&&this.compare(this.heap[n],this.heap[s])<0&&(s=n),i<r&&this.compare(this.heap[i],this.heap[s])<0&&(s=i),s===e)break;this.swap(e,s),e=s}}swap(e,r){[this.heap[e],this.heap[r]]=[this.heap[r],this.heap[e]]}clear(){this.heap=[]}}const Ds=t=>!!t&&t.constructor===Symbol,Qe=Array.isArray,ri=t=>!!t&&t.constructor===Object,ks=t=>t==null||typeof t!="object"&&typeof t!="function",Xe=t=>!!(t&&t.constructor&&t.call&&t.apply),tf=t=>typeof t=="string"||t instanceof String,ef=t=>de(t)&&t%1===0,rf=t=>de(t)&&t%1!==0,de=t=>{try{return Number(t)===t}catch{return!1}},Bs=t=>Object.prototype.toString.call(t)==="[object Date]",Us=t=>!(!t||!t.then||!Xe(t.then)),nf=t=>{if(t===!0||t===!1||t==null)return!0;if(de(t))return t===0;if(Bs(t))return isNaN(t.getTime());if(Xe(t)||Ds(t))return!1;const e=t.length;if(de(e))return e===0;const r=t.size;return de(r)?r===0:Object.keys(t).length===0},Ws=(t,e)=>{if(Object.is(t,e))return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const r=Reflect.ownKeys(t),n=Reflect.ownKeys(e);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Reflect.has(e,r[i])||!Ws(t[r[i]],e[r[i]]))return!1;return!0},sf=(t,e)=>t.reduce((r,n)=>{const i=e(n);return r[i]||(r[i]=[]),r[i].push(n),r},{});function of(...t){return!t||!t.length?[]:new Array(Math.max(...t.map(({length:e})=>e))).fill([]).map((e,r)=>t.map(n=>n[r]))}function af(t,e){if(!t||!t.length)return{};const r=Xe(e)?e:Qe(e)?(n,i)=>e[i]:(n,i)=>e;return t.reduce((n,i,s)=>(n[i]=r(i,s),n),{})}const ni=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function uf(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const ff=(t,e=void 0)=>t?.length>0?t[0]:e,cf=(t,e=void 0)=>t?.length>0?t[t.length-1]:e,Ks=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)},hf=(t,e,r="asc")=>{if(!t)return[];const n=(s,o)=>`${e(s)}`.localeCompare(e(o)),i=(s,o)=>`${e(o)}`.localeCompare(e(s));return t.slice().sort(r==="desc"?i:n)},lf=(t,e)=>t?t.reduce((r,n)=>{const i=e(n);return r[i]=(r[i]??0)+1,r},{}):{},pf=(t,e,r)=>{if(!t)return[];if(e===void 0)return[...t];for(let n=0;n<t.length;n++){const i=t[n];if(r(i,n))return[...t.slice(0,n),e,...t.slice(n+1,t.length)]}return[...t]},Hs=(t,e,r=n=>n)=>t.reduce((n,i)=>(n[e(i)]=r(i),n),{}),_f=(t,e,r)=>t?t.reduce((n,i,s)=>(r(i,s)&&n.push(e(i,s)),n),[]):[];function df(t,e){const r=e??(n=>n);return ni(t,(n,i)=>r(n)>r(i)?n:i)}function yf(t,e){const r=e??(n=>n);return ni(t,(n,i)=>r(n)<r(i)?n:i)}const gf=(t,e=2)=>{const r=Math.ceil(t.length/e);return new Array(r).fill(null).map((n,i)=>t.slice(i*e,i*e+e))},vf=(t,e)=>{const r=t.reduce((n,i)=>{const s=e?e(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)};function*ii(t,e,r=i=>i,n=1){const i=Xe(r)?r:()=>r,s=e?t:0,o=e??t;for(let a=s;a<=o&&(yield i(a),!(a+n>o));a+=n);}const si=(t,e,r,n)=>Array.from(ii(t,e,r,n)),mf=t=>t.reduce((e,r)=>(e.push(...r),e),[]),wf=(t,e,r)=>{if(!t||!e)return!1;const n=r??(s=>s),i=e.reduce((s,o)=>(s[n(o)]=!0,s),{});return t.some(s=>i[n(s)])},Gs=(t,e)=>t?t.reduce((r,n)=>{const[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]],bf=(t,e,r)=>!e&&!t?[]:e?t?r?t.reduce((n,i)=>{const s=e.find(o=>r(i)===r(o));return s?n.push(s):n.push(i),n},[]):t:[]:t,Sf=(t,e,r)=>{if(!t&&!e)return[];if(!e)return[...t];if(!t)return[e];for(let n=0;n<t.length;n++){const i=t[n];if(r(i,n))return[...t.slice(0,n),e,...t.slice(n+1,t.length)]}return[...t,e]},Af=(t,e,r,n)=>{if(!t&&!e)return[];if(!t)return[e];if(!e)return[...t];const i=r?(a,u)=>r(a,u)===r(e,u):a=>a===e;return t.find(i)?t.filter((a,u)=>!i(a,u)):(n?.strategy??"append")==="append"?[...t,e]:[e,...t]},Of=t=>t?.filter(e=>!!e)??[],Vs=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},Ef=(t,e,r=n=>n)=>{if(!t?.length&&!e?.length)return[];if(t?.length===void 0)return[...e];if(!e?.length)return[...t];const n=e.reduce((i,s)=>(i[r(s)]=!0,i),{});return t.filter(i=>!n[r(i)])};function Mf(t,e){if(t.length===0)return t;const r=e%t.length;return r===0?t:[...t.slice(-r,t.length),...t.slice(0,-r)]}const xf=async(t,e,r)=>{const n=r!==void 0;if(!n&&t?.length<1)throw new Error("Cannot reduce empty array with no init value");const i=n?t:t.slice(1);let s=n?r:t[0];for(const[o,a]of i.entries())s=await e(s,a,o);return s},If=async(t,e)=>{if(!t)return[];let r=[],n=0;for(const i of t){const s=await e(i,n++);r.push(s)}return r},Tf=async t=>{const e=[],r=(s,o)=>e.push({fn:s,rethrow:o?.rethrow??!1}),[n,i]=await ye(t)(r);for(const{fn:s,rethrow:o}of e){const[a]=await ye(s)(n);if(a&&o)throw a}if(n)throw n;return i};class Ys extends Error{errors;constructor(e=[]){super();const r=e.find(n=>n.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(n=>n.stack)?.stack??this.stack,this.errors=e}}const zf=async(t,e,r)=>{const n=e.map((f,c)=>({index:c,item:f})),i=async f=>{const c=[];for(;;){const h=n.pop();if(!h)return f(c);const[l,p]=await ye(r)(h.item);c.push({error:l,result:p,index:h.index})}},s=si(1,t).map(()=>new Promise(i)),o=await Promise.all(s),[a,u]=Gs(Ks(o.flat(),f=>f.index),f=>!!f.error);if(a.length>0)throw new Ys(a.map(f=>f.error));return u.map(f=>f.result)};async function Rf(t){const e=Qe(t)?t.map(i=>[null,i]):Object.entries(t),r=await Promise.all(e.map(([i,s])=>s.then(o=>({result:o,exc:null,key:i})).catch(o=>({result:null,exc:o,key:i})))),n=r.filter(i=>i.exc);if(n.length>0)throw new Ys(n.map(i=>i.exc));return Qe(t)?r.map(i=>i.result):r.reduce((i,s)=>({...i,[s.key]:s.result}),{})}const Ff=async(t,e)=>{const r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(const s of ii(1,r)){const[o,a]=await ye(e)(u=>{throw{_exited:u}});if(!o)return a;if(o._exited)throw o._exited;if(s===r)throw o;n&&await oi(n),i&&await oi(i(s))}},oi=t=>new Promise(e=>setTimeout(e,t)),ye=t=>(...e)=>{try{const r=t(...e);return Us(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}},Pf=(t,e)=>{const r=i=>{if(e&&!e(i))throw i},n=i=>i instanceof Promise;try{const i=t();return n(i)?i.catch(r):i}catch(i){return r(i)}};function Cf(...t){return(...e)=>t.slice(1).reduce((r,n)=>n(r),t[0](...e))}function $f(...t){return t.reverse().reduce((e,r)=>r(e))}const qf=(t,...e)=>(...r)=>t(...e,...r),Nf=(t,e)=>r=>t({...e,...r}),jf=t=>new Proxy({},{get:(e,r)=>t(r)}),Lf=(t,e,r,n)=>function(...s){const o=r?r(...s):JSON.stringify({args:s}),a=t[o];if(a!==void 0&&(!a.exp||a.exp>new Date().getTime()))return a.value;const u=e(...s);return t[o]={exp:n?new Date().getTime()+n:null,value:u},u},Df=(t,e={})=>Lf({},t,e.key??null,e.ttl??null),kf=({delay:t},e)=>{let r,n=!0;const i=(...s)=>{n?(clearTimeout(r),r=setTimeout(()=>{n&&e(...s),r=void 0},t)):e(...s)};return i.isPending=()=>r!==void 0,i.cancel=()=>{n=!1},i.flush=(...s)=>e(...s),i},Bf=({interval:t},e)=>{let r=!0,n;const i=(...s)=>{r&&(e(...s),r=!1,n=setTimeout(()=>{r=!0,n=void 0},t))};return i.isThrottled=()=>n!==void 0,i},Uf=(t,e)=>{const r=()=>{};return new Proxy(Object.assign(r,t),{get:(n,i)=>n[i],set:(n,i,s)=>(n[i]=s,!0),apply:(n,i,s)=>e(Object.assign({},n))(...s)})};function Wf(t,e,r){return typeof t=="number"&&typeof e=="number"&&(typeof r>"u"||typeof r=="number")?(typeof r>"u"&&(r=e,e=0),t>=Math.min(e,r)&&t<Math.max(e,r)):!1}const Kf=(t,e)=>{const r=e===void 0?0:e;if(t==null)return r;const n=parseFloat(t);return isNaN(n)?r:n},Zs=(t,e)=>{const r=e===void 0?0:e;if(t==null)return r;const n=parseInt(t);return isNaN(n)?r:n},Hf=(t,e=r=>r===void 0)=>t?Object.keys(t).reduce((n,i)=>(e(t[i])||(n[i]=t[i]),n),{}):{},ai=(t,e)=>Object.keys(t).reduce((n,i)=>(n[e(i,t[i])]=t[i],n),{}),Gf=(t,e)=>Object.keys(t).reduce((n,i)=>(n[i]=e(t[i],i),n),{}),Vf=(t,e)=>t?Object.entries(t).reduce((r,[n,i])=>{const[s,o]=e(n,i);return r[s]=o,r},{}):{},Yf=t=>t?Object.keys(t).reduce((r,n)=>(r[t[n]]=n,r),{}):{},Zf=t=>ai(t,e=>e.toLowerCase()),Jf=t=>ai(t,e=>e.toUpperCase()),Js=t=>{if(ks(t))return t;if(typeof t=="function")return t.bind({});const e=new t.constructor;return Object.getOwnPropertyNames(t).forEach(r=>{e[r]=t[r]}),e},Qf=(t,e)=>{if(!t)return[];const r=Object.entries(t);return r.length===0?[]:r.reduce((n,i)=>(n.push(e(i[0],i[1])),n),[])},Xf=(t,e)=>t?e.reduce((r,n)=>(Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]),r),{}):{},tc=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},Qs=(t,e,r)=>{const n=e.split(/[\.\[\]]/g);let i=t;for(const s of n){if(i===null||i===void 0)return r;const o=s.replace(/['"]/g,"");o.trim()!==""&&(i=i[o])}return i===void 0?r:i},Xs=(t,e,r)=>{if(!t)return{};if(!e||r===void 0)return t;const n=e.split(/[\.\[\]]/g).filter(o=>!!o.trim()),i=o=>{if(n.length>1){const a=n.shift(),u=Zs(n[0],null)!==null;o[a]=o[a]===void 0?u?[]:{}:o[a],i(o[a])}else o[n[0]]=r},s=Js(t);return i(s),s},to=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:ri(t[n])?to(t[n],i):i}),{}),eo=t=>{if(!t)return[];const e=(r,n)=>ri(r)?Object.entries(r).flatMap(([i,s])=>e(s,[...n,i])):Qe(r)?r.flatMap((i,s)=>e(i,[...n,`${s}`])):[n.join(".")];return e(t,[])},ec=t=>t?Hs(eo(t),e=>e,e=>Qs(t,e)):{},rc=t=>t?Object.keys(t).reduce((e,r)=>Xs(e,r,t[r]),{}):{},ui=(t,e)=>Math.floor(Math.random()*(e-t+1)+t),nc=t=>{const e=t.length;if(e===0)return null;const r=ui(0,e-1);return t[r]},ic=t=>t.map(e=>({rand:Math.random(),value:e})).sort((e,r)=>e.rand-r.rand).map(e=>e.value),sc=(t,e="")=>{const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"+e;return Vs(t,n=>n+r.charAt(ui(0,r.length-1)),"")},oc=(t,e=r=>`${r}`)=>{const{indexesByKey:r,itemsByIndex:n}=t.reduce((h,l,p)=>({indexesByKey:{...h.indexesByKey,[e(l)]:p},itemsByIndex:{...h.itemsByIndex,[p]:l}}),{indexesByKey:{},itemsByIndex:{}}),i=(h,l)=>r[e(h)]<r[e(l)]?h:l,s=(h,l)=>r[e(h)]>r[e(l)]?h:l,o=()=>n[0],a=()=>n[t.length-1],u=(h,l)=>n[r[e(h)]+1]??l??o(),f=(h,l)=>n[r[e(h)]-1]??l??a();return{min:i,max:s,first:o,last:a,next:u,previous:f,spin:(h,l)=>{if(l===0)return h;const p=Math.abs(l),_=p>t.length?p%t.length:p;return si(0,_-1).reduce(d=>l>0?u(d):f(d),h)}}},tr=t=>{if(!t||t.length===0)return"";const e=t.toLowerCase();return e.substring(0,1).toUpperCase()+e.substring(1,e.length)},ac=Object.freeze(Object.defineProperty({__proto__:null,all:Rf,alphabetical:hf,assign:to,boil:ni,callable:Uf,camel:t=>{const e=t?.replace(/([A-Z])+/g,tr)?.split(/(?=[A-Z])|[\.\-\s_]/).map(r=>r.toLowerCase())??[];return e.length===0?"":e.length===1?e[0]:e.reduce((r,n)=>`${r}${n.charAt(0).toUpperCase()}${n.slice(1)}`)},capitalize:tr,chain:Cf,clone:Js,cluster:gf,compose:$f,construct:rc,counting:lf,crush:ec,dash:t=>{const e=t?.replace(/([A-Z])+/g,tr)?.split(/(?=[A-Z])|[\.\-\s_]/).map(r=>r.toLowerCase())??[];return e.length===0?"":e.length===1?e[0]:e.reduce((r,n)=>`${r}-${n.toLowerCase()}`)},debounce:kf,defer:Tf,diff:Ef,draw:nc,first:ff,flat:mf,fork:Gs,get:Qs,group:sf,guard:Pf,inRange:Wf,intersects:wf,invert:Yf,isArray:Qe,isDate:Bs,isEmpty:nf,isEqual:Ws,isFloat:rf,isFunction:Xe,isInt:ef,isNumber:de,isObject:ri,isPrimitive:ks,isPromise:Us,isString:tf,isSymbol:Ds,iterate:Vs,keys:eo,last:cf,list:si,listify:Qf,lowerize:Zf,map:If,mapEntries:Vf,mapKeys:ai,mapValues:Gf,max:df,memo:Df,merge:bf,min:yf,objectify:Hs,omit:tc,parallel:zf,partial:qf,partob:Nf,pascal:t=>{const e=t?.split(/[\.\-\s_]/).map(r=>r.toLowerCase())??[];return e.length===0?"":e.map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},pick:Xf,proxied:jf,random:ui,range:ii,reduce:xf,replace:pf,replaceOrAppend:Sf,retry:Ff,select:_f,series:oc,set:Xs,shake:Hf,shift:Mf,shuffle:ic,sift:Of,sleep:oi,snake:(t,e)=>{const r=t?.replace(/([A-Z])+/g,tr).split(/(?=[A-Z])|[\.\-\s_]/).map(i=>i.toLowerCase())??[];if(r.length===0)return"";if(r.length===1)return r[0];const n=r.reduce((i,s)=>`${i}_${s.toLowerCase()}`);return e?.splitOnNumber===!1?n:n.replace(/([A-Za-z]{1}[0-9]{1})/,i=>`${i[0]}_${i[1]}`)},sort:Ks,sum:uf,template:(t,e,r=/\{\{(.+?)\}\}/g)=>Array.from(t.matchAll(r)).reduce((n,i)=>n.replace(i[0],e[i[1]]),t),throttle:Bf,title:t=>t?t.split(/(?=[A-Z])|[\.\-\s_]/).map(e=>e.trim()).filter(e=>!!e).map(e=>tr(e.toLowerCase())).join(" "):"",toFloat:Kf,toInt:Zs,toggle:Af,trim:(t,e=" ")=>{if(!t)return"";const r=e.replace(/[\W]{1}/g,"\\$&"),n=new RegExp(`^[${r}]+|[${r}]+$`,"g");return t.replace(n,"")},try:ye,tryit:ye,uid:sc,unique:vf,upperize:Jf,zip:of,zipToObject:af},Symbol.toStringTag,{value:"Module"})),it=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},Yr=function(t,e){return it(t)?t.indexOf(e)>-1:!1},ro=function(t,e){if(!it(t))return t;const r=[];for(let n=0;n<t.length;n++){const i=t[n];e(i,n)&&r.push(i)}return r},uc=function(t,e=[]){return ro(t,r=>!Yr(e,r))},fc={}.toString,At=(t,e)=>fc.call(t)==="[object "+e+"]",ft=t=>At(t,"Function"),Wt=function(t){return t==null},N=t=>Array.isArray?Array.isArray(t):At(t,"Array"),Zr=t=>{const e=typeof t;return t!==null&&e==="object"||e==="function"};function ge(t,e){if(!t)return;let r;if(N(t))for(let n=0,i=t.length;n<i&&(r=e(t[n],n),r!==!1);n++);else if(Zr(t)){for(const n in t)if(t.hasOwnProperty(n)&&(r=e(t[n],n),r===!1))break}}const no=Object.keys?t=>Object.keys(t):t=>{const e=[];return ge(t,(r,n)=>{ft(t)&&n==="prototype"||e.push(n)}),e};function io(t,e){const r=no(e),n=r.length;if(Wt(t))return!n;for(let i=0;i<n;i+=1){const s=r[i];if(e[s]!==t[s]||!(s in t))return!1}return!0}const Jr=function(t){return typeof t=="object"&&t!==null},ve=function(t){if(!Jr(t)||!At(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function cc(t,e){if(!N(t))return null;let r;if(ft(e)&&(r=e),ve(e)&&(r=n=>io(n,e)),r){for(let n=0;n<t.length;n+=1)if(r(t[n]))return t[n]}return null}function hc(t,e,r=0){for(let n=r;n<t.length;n++)if(e(t[n],n))return n;return-1}const lc=function(t,e){let r=null;for(let n=0;n<t.length;n++){const s=t[n][e];if(!Wt(s)){N(s)?r=s[0]:r=s;break}}return r},pc=function(t){if(!N(t))return[];let e=[];for(let r=0;r<t.length;r++)e=e.concat(t[r]);return e},so=function(t,e=[]){if(!N(t))e.push(t);else for(let r=0;r<t.length;r+=1)so(t[r],e);return e},oo=t=>{if(N(t))return t.reduce((e,r)=>Math.max(e,r),t[0])},ao=t=>{if(N(t))return t.reduce((e,r)=>Math.min(e,r),t[0])},_c=function(t){let e=t.filter(i=>!isNaN(i));if(!e.length)return{min:0,max:0};if(N(t[0])){let i=[];for(let s=0;s<t.length;s++)i=i.concat(t[s]);e=i}const r=oo(e);return{min:ao(e),max:r}},uo=Array.prototype,dc=uo.splice,yc=uo.indexOf,gc=function(t,...e){for(let r=0;r<e.length;r++){const n=e[r];let i=-1;for(;(i=yc.call(t,n))>-1;)dc.call(t,i,1)}return t},vc=Array.prototype.splice,fo=function(e,r){if(!it(e))return[];let n=e?r.length:0;const i=n-1;for(;n--;){let s;const o=r[n];(n===i||o!==s)&&(s=o,vc.call(e,o,1))}return e},co=function(t,e,r){if(!N(t)&&!ve(t))return t;let n=r;return ge(t,(i,s)=>{n=e(n,i,s)}),n},mc=function(t,e){const r=[];if(!it(t))return r;let n=-1;const i=[],s=t.length;for(;++n<s;){const o=t[n];e(o,n,t)&&(r.push(o),i.push(n))}return fo(t,i),r},Kt=t=>At(t,"String");function wc(t,e){let r;if(ft(e))r=(n,i)=>e(n)-e(i);else{let n=[];Kt(e)?n.push(e):N(e)&&(n=e),r=(i,s)=>{for(let o=0;o<n.length;o+=1){const a=n[o];if(i[a]>s[a])return 1;if(i[a]<s[a])return-1}return 0}}return t.sort(r),t}function ho(t,e=new Map){const r=[];if(Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const s=t[n];e.has(s)||(r.push(s),e.set(s,!0))}return r}const bc=function(...t){return ho([].concat(...t))},Sc=(t,e)=>{const r=[],n={};for(let i=0;i<t.length;i++){let o=t[i][e];if(!Wt(o)){N(o)||(o=[o]);for(let a=0;a<o.length;a++){const u=o[a];n[u]||(r.push(u),n[u]=!0)}}}return r};function Ac(t){if(it(t))return t[0]}function Oc(t){if(it(t)){const e=t;return e[e.length-1]}}function Ec(t,e){return N(t)||Kt(t)?t[0]===e:!1}function Mc(t,e){return N(t)||Kt(t)?t[t.length-1]===e:!1}const xc=function(t,e){for(let r=0;r<t.length;r++)if(!e(t[r],r))return!1;return!0},Ic=function(t,e){for(let r=0;r<t.length;r++)if(e(t[r],r))return!0;return!1},Tc=Object.prototype.hasOwnProperty;function lo(t,e){if(!e||!N(t))return{};const r={},n=ft(e)?e:s=>s[e];let i;for(let s=0;s<t.length;s++){const o=t[s];i=n(o),Tc.call(r,i)?r[i].push(o):r[i]=[o]}return r}function po(t,e){if(!e)return{0:t};if(!ft(e)){const r=N(e)?e:e.replace(/\s+/g,"").split("*");e=function(n){let i="_";for(let s=0,o=r.length;s<o;s++)i+=n[r[s]]&&n[r[s]].toString();return i}}return lo(t,e)}const zc=(t,e)=>{if(!e)return[t];const r=po(t,e),n=[];for(const i in r)n.push(r[i]);return n};function Rc(t,e){return t["_wrap_"+e]}function Fc(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];const r=n=>{t[e](n)};return t["_wrap_"+e]=r,r}const _o={};function Pc(t){let e=_o[t];if(!e){let r=t.toString(16);for(let n=r.length;n<6;n++)r="0"+r;e="#"+r,_o[t]=e}return e}function Cc(t){let e=0,r=0,n=0,i=0;return N(t)?t.length===1?e=r=n=i=t[0]:t.length===2?(e=n=t[0],r=i=t[1]):t.length===3?(e=t[0],r=i=t[1],n=t[2]):(e=t[0],r=t[1],n=t[2],i=t[3]):e=r=n=i=t,{r1:e,r2:r,r3:n,r4:i}}const $c=function(t,e,r){return t<e?e:t>r?r:t},qc=function(t,e){const r=e.toString(),n=r.indexOf(".");if(n===-1)return Math.round(t);let i=r.substr(n+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},Ct=function(t){return At(t,"Number")},Nc=function(t){return Ct(t)&&t%1!==0},jc=function(t){return Ct(t)&&t%2===0},Lc=Number.isInteger?Number.isInteger:function(t){return Ct(t)&&t%1===0},Dc=function(t){return Ct(t)&&t<0},kc=1e-5;function Bc(t,e,r=kc){return Math.abs(t-e)<r}const Uc=function(t){return Ct(t)&&t%2!==0},Wc=function(t){return Ct(t)&&t>0},Kc=(t,e)=>{if(!N(t))return;let r,n=-1/0;for(let i=0;i<t.length;i++){const s=t[i],o=ft(e)?e(s):s[e];o>n&&(r=s,n=o)}return r},Hc=(t,e)=>{if(!N(t))return;let r,n=1/0;for(let i=0;i<t.length;i++){const s=t[i],o=ft(e)?e(s):s[e];o<n&&(r=s,n=o)}return r},Gc=function(t,e){return(t%e+e)%e},Vc=180/Math.PI,Yc=function(t){return Vc*t},Zc=parseInt,Jc=Math.PI/180,Qc=function(t){return Jc*t},yo=(t,e)=>t.hasOwnProperty(e),go=Object.values?t=>Object.values(t):t=>{const e=[];return ge(t,(r,n)=>{ft(t)&&n==="prototype"||e.push(r)}),e},Xc=(t,e)=>Yr(go(t),e),er=t=>Wt(t)?"":t.toString(),th=function(t){return er(t).toLowerCase()},eh=function(t){const e=er(t);return e.charAt(0).toLowerCase()+e.substring(1)};function rh(t,e){return!t||!e?t:t.replace(/\\?\{([^{}]+)\}/g,(r,n)=>r.charAt(0)==="\\"?r.slice(1):e[n]===void 0?"":e[n])}const nh=function(t){return er(t).toUpperCase()},ih=function(t){const e=er(t);return e.charAt(0).toUpperCase()+e.substring(1)},sh={}.toString,vo=function(t){return sh.call(t).replace(/^\[object /,"").replace(/]$/,"")},oh=function(t){return At(t,"Arguments")},ah=function(t){return At(t,"Boolean")},uh=function(t){return At(t,"Date")},fh=function(t){return At(t,"Error")};function ch(t){return Ct(t)&&isFinite(t)}const hh=function(t){return t===null},lh=Object.prototype,mo=function(t){const e=t&&t.constructor,r=typeof e=="function"&&e.prototype||lh;return t===r},ph=function(t){return At(t,"RegExp")},_h=function(t){return t===void 0},dh=function(t){return t instanceof Element||t instanceof HTMLDocument};function yh(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(r){return setTimeout(r,16)})(t)}function gh(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)}function fi(t,e){for(const r in e)e.hasOwnProperty(r)&&r!=="constructor"&&e[r]!==void 0&&(t[r]=e[r])}function me(t,e,r,n){return e&&fi(t,e),r&&fi(t,r),n&&fi(t,n),t}const vh=function(...t){const e=t[0];for(let r=1;r<t.length;r++){let n=t[r];ft(n)&&(n=n.prototype),me(e.prototype,n)}},ci=function(t){if(typeof t!="object"||t===null)return t;let e;if(N(t)){e=[];for(let r=0,n=t.length;r<n;r++)typeof t[r]=="object"&&t[r]!=null?e[r]=ci(t[r]):e[r]=t[r]}else{e={};for(const r in t)typeof t[r]=="object"&&t[r]!=null?e[r]=ci(t[r]):e[r]=t[r]}return e};function mh(t,e,r){let n;return function(){const i=this,s=arguments,o=function(){n=null,r||t.apply(i,s)},a=r&&!n;clearTimeout(n),n=setTimeout(o,e),a&&t.apply(i,s)}}const wh=(t,e)=>{if(!ft(t))throw new TypeError("Expected a function");const r=function(...n){const i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);const o=t.apply(this,n);return s.set(i,o),o};return r.cache=new Map,r},bh=5;function wo(t,e,r,n){r=r||0,n=n||bh;for(const i in e)if(e.hasOwnProperty(i)){const s=e[i];s!==null&&ve(s)?(ve(t[i])||(t[i]={}),r<n?wo(t[i],s,r+1,n):t[i]=e[i]):N(s)?(t[i]=[],t[i]=t[i].concat(s)):s!==void 0&&(t[i]=s)}}const Sh=function(t,...e){for(let r=0;r<e.length;r+=1)wo(t,e[r]);return t},Ah=function(t,e,r,n){ft(e)||(r=e,e=t,t=function(){});const i=Object.create?function(o,a){return Object.create(o,{constructor:{value:a}})}:function(o,a){function u(){}u.prototype=o;const f=new u;return f.constructor=a,f},s=i(e.prototype,t);return t.prototype=me(s,t.prototype),t.superclass=i(e.prototype,e),me(s,r),me(t,n),t},Oh=function(t,e){if(!it(t))return-1;const r=Array.prototype.indexOf;if(r)return r.call(t,e);let n=-1;for(let i=0;i<t.length;i++)if(t[i]===e){n=i;break}return n},Eh=Object.prototype.hasOwnProperty;function Mh(t){if(Wt(t))return!0;if(it(t))return!t.length;const e=vo(t);if(e==="Map"||e==="Set")return!t.size;if(mo(t))return!Object.keys(t).length;for(const r in t)if(Eh.call(t,r))return!1;return!0}const Qr=(t,e)=>{if(t===e)return!0;if(!t||!e||Kt(t)||Kt(e))return!1;if(it(t)||it(e)){if(t.length!==e.length)return!1;let r=!0;for(let n=0;n<t.length&&(r=Qr(t[n],e[n]),!!r);n++);return r}if(Jr(t)||Jr(e)){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=!0;for(let s=0;s<r.length&&(i=Qr(t[r[s]],e[r[s]]),!!i);s++);return i}return!1},xh=(t,e,r)=>ft(r)?!!r(t,e):Qr(t,e),Ih=(t,e)=>{if(!it(t))return t;const r=[];for(let n=0;n<t.length;n++){const i=t[n];r.push(e(i,n))}return r},Th=t=>t,zh=(t,e=Th)=>{const r={};return Zr(t)&&!Wt(t)&&Object.keys(t).forEach(n=>{r[n]=e(t[n],n)}),r},Rh=(t,e,r)=>{let n=0;const i=Kt(e)?e.split("."):e;for(;t&&n<i.length;)t=t[i[n++]];return t===void 0||n<i.length?r:t},Fh=(t,e,r)=>{let n=t;const i=Kt(e)?e.split("."):e;return i.forEach((s,o)=>{o<i.length-1?(Zr(n[s])||(n[s]=Ct(i[o+1])?[]:{}),n=n[s]):n[s]=r}),t},Ph=Object.prototype.hasOwnProperty,Ch=(t,e)=>{if(t===null||!ve(t))return{};const r={};return ge(e,n=>{Ph.call(t,n)&&(r[n]=t[n])}),r},$h=(t,e)=>co(t,(r,n,i)=>(e.includes(i)||(r[i]=n),r),{}),qh=(t,e,r)=>{let n,i,s,o,a=0;r||(r={});const u=function(){a=r.leading===!1?0:Date.now(),n=null,o=t.apply(i,s),n||(i=s=null)},f=function(){const c=Date.now();!a&&r.leading===!1&&(a=c);const h=e-(c-a);return i=this,s=arguments,h<=0||h>e?(n&&(clearTimeout(n),n=null),a=c,o=t.apply(i,s),n||(i=s=null)):!n&&r.trailing!==!1&&(n=setTimeout(u,h)),o};return f.cancel=function(){clearTimeout(n),a=0,n=i=s=null},f},Nh=t=>it(t)?Array.prototype.slice.call(t):[],Xr={},jh=t=>(t=t||"g",Xr[t]?Xr[t]+=1:Xr[t]=1,t+Xr[t]),Lh=()=>{},Dh=t=>t;function kh(t){return Wt(t)?0:it(t)?t.length:Object.keys(t).length}class Bh{map={};has(e){return this.map[e]!==void 0}get(e,r){const n=this.map[e];return n===void 0?r:n}set(e,r){this.map[e]=r}clear(){this.map={}}delete(e){delete this.map[e]}size(){return Object.keys(this.map).length}}const Uh=Object.freeze(Object.defineProperty({__proto__:null,Cache:Bh,assign:me,augment:vh,clamp:$c,clearAnimationFrame:gh,clone:ci,contains:Yr,debounce:mh,deepMix:Sh,difference:uc,each:ge,endsWith:Mc,every:xc,extend:Ah,filter:ro,find:cc,findIndex:hc,firstValue:lc,fixedBase:qc,flatten:pc,flattenDeep:so,forIn:ge,get:Rh,getRange:_c,getType:vo,getWrapBehavior:Rc,group:zc,groupBy:lo,groupToMap:po,has:yo,hasKey:yo,hasValue:Xc,head:Ac,identity:Dh,includes:Yr,indexOf:Oh,isArguments:oh,isArray:N,isArrayLike:it,isBoolean:ah,isDate:uh,isDecimal:Nc,isElement:dh,isEmpty:Mh,isEqual:Qr,isEqualWith:xh,isError:fh,isEven:jc,isFinite:ch,isFunction:ft,isInteger:Lc,isMatch:io,isNegative:Dc,isNil:Wt,isNull:hh,isNumber:Ct,isNumberEqual:Bc,isObject:Zr,isObjectLike:Jr,isOdd:Uc,isPlainObject:ve,isPositive:Wc,isPrototype:mo,isRegExp:ph,isString:Kt,isType:At,isUndefined:_h,keys:no,last:Oc,lowerCase:th,lowerFirst:eh,map:Ih,mapValues:zh,max:oo,maxBy:Kc,memoize:wh,min:ao,minBy:Hc,mix:me,mod:Gc,noop:Lh,number2color:Pc,omit:$h,parseRadius:Cc,pick:Ch,pull:gc,pullAt:fo,reduce:co,remove:mc,requestAnimationFrame:yh,set:Fh,size:kh,some:Ic,sortBy:wc,startsWith:Ec,substitute:rh,throttle:qh,toArray:Nh,toDegree:Yc,toInteger:Zc,toRadian:Qc,toString:er,union:bc,uniq:ho,uniqueId:jh,upperCase:nh,upperFirst:ih,values:go,valuesOfKey:Sc,wrapBehavior:Fc},Symbol.toStringTag,{value:"Module"}));function bo(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]}function hi(t){const e=Math.round(t).toString(16);return e.length===1?`0${e}`:e}function So(t){return`#${hi(t[0])}${hi(t[1])}${hi(t[2])}`}const Wh=/rgba?\(([\s.,0-9]+)\)/;function Kh(){const t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t}let tn;function Ao(t){if(t[0]==="#"&&t.length===7)return t;tn||(tn=Kh()),tn.style.color=t;let e=document.defaultView.getComputedStyle(tn,"").getPropertyValue("color");const n=Wh.exec(e)[1].split(/\s*,\s*/).map(i=>Number(i));return e=So(n),e}function li(t,e,r,n){return t[n]+(e[n]-t[n])*r}function Hh(t,e){const r=isNaN(Number(e))||e<0?0:e>1?1:Number(e),n=t.length-1,i=Math.floor(n*r),s=n*r-i,o=t[i],a=i===n?o:t[i+1];return So([li(o,a,s,0),li(o,a,s,1),li(o,a,s,2)])}function Gh(t){const r=(typeof t=="string"?t.split("-"):t).map(n=>bo(n.indexOf("#")===-1?Ao(n):n));return n=>Hh(r,n)}const Vh=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Yh=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Zh=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function Jh(t){return/^[r,R,L,l]{1}[\s]*\(/.test(t)}function Qh(t){if(Jh(t)){let e="",r;if(t[0]==="l"){const i=Vh.exec(t),s=+i[1]+90;r=i[2],e=`linear-gradient(${s}deg, `}else t[0]==="r"&&(e="radial-gradient(",r=Yh.exec(t)[4]);const n=r.match(Zh);return n.forEach((i,s)=>{const o=i.split(":");e+=`${o[1]} ${Number(o[0])*100}%`,s!==n.length-1&&(e+=", ")}),e+=")",e}return t}var Oo=typeof Float32Array<"u"?Float32Array:Array;function en(t,e,r){var n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],f=e[6],c=e[7],h=e[8],l=r[0],p=r[1],_=r[2],d=r[3],y=r[4],m=r[5],v=r[6],w=r[7],g=r[8];return t[0]=l*n+p*o+_*f,t[1]=l*i+p*a+_*c,t[2]=l*s+p*u+_*h,t[3]=d*n+y*o+m*f,t[4]=d*i+y*a+m*c,t[5]=d*s+y*u+m*h,t[6]=v*n+w*o+g*f,t[7]=v*i+w*a+g*c,t[8]=v*s+w*u+g*h,t}function Xh(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function tl(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function el(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function rl(){var t=new Oo(2);return Oo!=Float32Array&&(t[0]=0,t[1]=0),t}function nl(t,e){var r=t[0],n=t[1],i=e[0],s=e[1];return Math.abs(Math.atan2(n*i-r*s,r*i+n*s))}(function(){var t=rl();return function(e,r,n,i,s,o){var a,u;for(r||(r=2),n||(n=0),i?u=Math.min(i*r+n,e.length):u=e.length,a=n;a<u;a+=r)t[0]=e[a],t[1]=e[a+1],s(t,t,o),e[a]=t[0],e[a+1]=t[1];return e}})();function il(t,e,r){const n=[0,0,0,0,0,0,0,0,0];return Xh(n,r),en(t,n,e)}function sl(t,e,r){const n=[0,0,0,0,0,0,0,0,0];return tl(n,r),en(t,n,e)}function ol(t,e,r){const n=[0,0,0,0,0,0,0,0,0];return el(n,r),en(t,n,e)}function al(t,e,r){return en(t,r,e)}function ul(t,e){const r=t?[].concat(t):[1,0,0,0,1,0,0,0,1];for(let n=0,i=e.length;n<i;n++){const s=e[n];switch(s[0]){case"t":il(r,r,[s[1],s[2]]);break;case"s":ol(r,r,[s[1],s[2]]);break;case"r":sl(r,r,s[1]);break;case"m":al(r,r,s[1]);break}}return r}function Eo(t,e){return t[0]*e[1]-e[0]*t[1]}function fl(t,e,r){const n=nl(t,e),i=Eo(t,e)>=0;return r?i?Math.PI*2-n:n:i?n:Math.PI*2-n}function cl(t,e,r){return r?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}function we(t){return t.map(e=>Array.isArray(e)?[].concat(e):e)}function hl(t,e){if(e==="off")return we(t);const r=typeof e=="number"&&e>=1?10**e:1;return t.map(n=>{const i=n.slice(1).map(Number).map(s=>e?Math.round(s*r)/r:Math.round(s));return[n[0]].concat(i)})}function ll(t,e="off"){return hl(t,e).map(r=>r[0]+r.slice(1).join(" ")).join("")}const Mo={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function pl(t,e,r){if(t[r].length>7){t[r].shift();const n=t[r];let i=r;for(;n.length;)e[r]="A",t.splice(i+=1,0,["C"].concat(n.splice(0,6)));t.splice(r,1)}}const rr={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function xo(t){return Array.isArray(t)&&t.every(e=>{const r=e[0].toLowerCase();return rr[r]===e.length-1&&"achlmqstvz".includes(r)})}function Io(t){return xo(t)&&t.every(([e])=>e===e.toUpperCase())}function To(t){return Io(t)&&t.every(([e])=>"ACLMQZ".includes(e))}function zo(t){let e=t.pathValue[t.segmentStart],r=e.toLowerCase();const{data:n}=t;for(;n.length>=rr[r]&&(r==="m"&&n.length>2?(t.segments.push([e].concat(n.splice(0,2))),r="l",e=e==="m"?"l":"L"):t.segments.push([e].concat(n.splice(0,rr[r]))),!!rr[r]););}function _l(t){const{index:e,pathValue:r}=t,n=r.charCodeAt(e);if(n===48){t.param=0,t.index+=1;return}if(n===49){t.param=1,t.index+=1;return}t.err=`[path-util]: invalid Arc flag "${r[e]}", expecting 0 or 1 at index ${e}`}function dl(t){return t>=48&&t<=57||t===43||t===45||t===46}function be(t){return t>=48&&t<=57}function yl(t){const{max:e,pathValue:r,index:n}=t;let i=n,s=!1,o=!1,a=!1,u=!1,f;if(i>=e){t.err=`[path-util]: Invalid path value at index ${i}, "pathValue" is missing param`;return}if(f=r.charCodeAt(i),(f===43||f===45)&&(i+=1,f=r.charCodeAt(i)),!be(f)&&f!==46){t.err=`[path-util]: Invalid path value at index ${i}, "${r[i]}" is not a number`;return}if(f!==46){if(s=f===48,i+=1,f=r.charCodeAt(i),s&&i<e&&f&&be(f)){t.err=`[path-util]: Invalid path value at index ${n}, "${r[n]}" illegal number`;return}for(;i<e&&be(r.charCodeAt(i));)i+=1,o=!0;f=r.charCodeAt(i)}if(f===46){for(u=!0,i+=1;be(r.charCodeAt(i));)i+=1,a=!0;f=r.charCodeAt(i)}if(f===101||f===69){if(u&&!o&&!a){t.err=`[path-util]: Invalid path value at index ${i}, "${r[i]}" invalid float exponent`;return}if(i+=1,f=r.charCodeAt(i),(f===43||f===45)&&(i+=1),i<e&&be(r.charCodeAt(i)))for(;i<e&&be(r.charCodeAt(i));)i+=1;else{t.err=`[path-util]: Invalid path value at index ${i}, "${r[i]}" invalid integer exponent`;return}}t.index=i,t.param=+t.pathValue.slice(n,i)}function gl(t){const e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&e.includes(t)}function rn(t){const{pathValue:e,max:r}=t;for(;t.index<r&&gl(e.charCodeAt(t.index));)t.index+=1}function vl(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function ml(t){return(t|32)===97}function wl(t){const{max:e,pathValue:r,index:n}=t,i=r.charCodeAt(n),s=rr[r[n].toLowerCase()];if(t.segmentStart=n,!vl(i)){t.err=`[path-util]: Invalid path value "${r[n]}" is not a path command`;return}if(t.index+=1,rn(t),t.data=[],!s){zo(t);return}for(;;){for(let o=s;o>0;o-=1){if(ml(i)&&(o===3||o===4)?_l(t):yl(t),t.err.length)return;t.data.push(t.param),rn(t),t.index<e&&r.charCodeAt(t.index)===44&&(t.index+=1,rn(t))}if(t.index>=t.max||!dl(r.charCodeAt(t.index)))break}zo(t)}class bl{pathValue;segments;max;index;param;segmentStart;data;err;constructor(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}}function pi(t){if(xo(t))return we(t);const e=new bl(t);for(rn(e);e.index<e.max&&!e.err.length;)wl(e);return e.err?e.err:e.segments}function Ro(t){if(Io(t))return we(t);const e=pi(t);let r=0,n=0,i=0,s=0;return e.map(o=>{const a=o.slice(1).map(Number),[u]=o,f=u.toUpperCase();if(u==="M")return[r,n]=a,i=r,s=n,["M",r,n];let c;if(u!==f)switch(f){case"A":c=[f,a[0],a[1],a[2],a[3],a[4],a[5]+r,a[6]+n];break;case"V":c=[f,a[0]+n];break;case"H":c=[f,a[0]+r];break;default:{const l=a.map((p,_)=>p+(_%2?n:r));c=[f].concat(l)}}else c=[f].concat(a);const h=c.length;switch(f){case"Z":r=i,n=s;break;case"H":[,r]=c;break;case"V":[,n]=c;break;default:r=c[h-2],n=c[h-1],f==="M"&&(i=r,s=n)}return c})}function Sl(t,e){const[r]=t,{x1:n,y1:i,x2:s,y2:o}=e,a=t.slice(1).map(Number);let u=t;if("TQ".includes(r)||(e.qx=null,e.qy=null),r==="H")u=["L",t[1],i];else if(r==="V")u=["L",n,t[1]];else if(r==="S"){const f=n*2-s,c=i*2-o;e.x1=f,e.y1=c,u=["C",f,c].concat(a)}else if(r==="T"){const f=n*2-e.qx,c=i*2-e.qy;e.qx=f,e.qy=c,u=["Q",f,c].concat(a)}else if(r==="Q"){const[f,c]=a;e.qx=f,e.qy=c}return u}function nn(t){if(To(t))return we(t);const e=Ro(t),r={...Mo},n=e.length;let i="";for(let s=0;s<n;s+=1){[i]=e[s],e[s]=Sl(e[s],r);const o=e[s],a=o.length;r.x1=+o[a-2],r.y1=+o[a-1],r.x2=+o[a-4]||r.x1,r.y2=+o[a-3]||r.y1}return e}function Al(t){return To(t)&&t.every(([e])=>"MC".includes(e))}function sn(t,e,r){const n=t*Math.cos(r)-e*Math.sin(r),i=t*Math.sin(r)+e*Math.cos(r);return{x:n,y:i}}function Fo(t,e,r,n,i,s,o,a,u,f){let c=t,h=e,l=r,p=n,_=a,d=u;const y=Math.PI*120/180,m=Math.PI/180*(+i||0);let v=[],w,g,b,O,F;if(f)[g,b,O,F]=f;else{w=sn(c,h,-m),c=w.x,h=w.y,w=sn(_,d,-m),_=w.x,d=w.y;const W=(c-_)/2,Mt=(h-d)/2;let _e=W*W/(l*l)+Mt*Mt/(p*p);_e>1&&(_e=Math.sqrt(_e),l*=_e,p*=_e);const Ns=l*l,js=p*p,Vu=(s===o?-1:1)*Math.sqrt(Math.abs((Ns*js-Ns*Mt*Mt-js*W*W)/(Ns*Mt*Mt+js*W*W)));O=Vu*l*Mt/p+(c+_)/2,F=Vu*-p*W/l+(h+d)/2,g=Math.asin(((h-F)/p*10**9>>0)/10**9),b=Math.asin(((d-F)/p*10**9>>0)/10**9),g=c<O?Math.PI-g:g,b=_<O?Math.PI-b:b,g<0&&(g=Math.PI*2+g),b<0&&(b=Math.PI*2+b),o&&g>b&&(g-=Math.PI*2),!o&&b>g&&(b-=Math.PI*2)}let Ft=b-g;if(Math.abs(Ft)>y){const W=b,Mt=_,_e=d;b=g+y*(o&&b>g?1:-1),_=O+l*Math.cos(b),d=F+p*Math.sin(b),v=Fo(_,d,l,p,i,0,o,Mt,_e,[b,W,O,F])}Ft=b-g;const Ye=Math.cos(g),Qn=Math.sin(g),Pt=Math.cos(b),Xn=Math.sin(b),Kr=Math.tan(Ft/4),ti=4/3*l*Kr,ei=4/3*p*Kr,Bt=[c,h],Ut=[c+ti*Qn,h-ei*Ye],Hr=[_+ti*Xn,d-ei*Pt],Gr=[_,d];if(Ut[0]=2*Bt[0]-Ut[0],Ut[1]=2*Bt[1]-Ut[1],f)return Ut.concat(Hr,Gr,v);v=Ut.concat(Hr,Gr,v);const qs=[];for(let W=0,Mt=v.length;W<Mt;W+=1)qs[W]=W%2?sn(v[W-1],v[W],m).y:sn(v[W],v[W+1],m).x;return qs}function Ol(t,e,r,n,i,s){const o=.3333333333333333,a=2/3;return[o*t+a*r,o*e+a*n,o*i+a*r,o*s+a*n,i,s]}function gt(t,e,r){const n=t[0],i=t[1],s=e[0],o=e[1];return[n+(s-n)*r,i+(o-i)*r]}function Se(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function nr(t,e,r,n,i){const s=Se([t,e],[r,n]);let o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:e};else if(i>=s)o={x:r,y:n};else{const[a,u]=gt([t,e],[r,n],i/s);o={x:a,y:u}}return{length:s,point:o,min:{x:Math.min(t,r),y:Math.min(e,n)},max:{x:Math.max(t,r),y:Math.max(e,n)}}}function Po(t,e,r,n){const s=[t,e],o=[r,n],a=gt(s,o,.5),u=gt(o,a,.5),f=gt(a,u,.5),c=gt(u,f,.5),h=gt(f,c,.5),l=nr(s[0],s[1],a[0],a[1],f[0]).point,p=nr(h[0],h[1],c[0],c[1],u[0]).point;return[l.x,l.y,p.x,p.y,r,n]}function El(t,e){const[r]=t,n=t.slice(1).map(Number),[i,s]=n;let o;const{x1:a,y1:u,x:f,y:c}=e;switch("TQ".includes(r)||(e.qx=null,e.qy=null),r){case"M":return e.x=i,e.y=s,t;case"A":return o=[a,u].concat(n),["C"].concat(Fo(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return e.qx=i,e.qy=s,o=[a,u].concat(n),["C"].concat(Ol(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(Po(a,u,i,s));case"Z":return a===f&&u===c?["C",a,u,f,c,f,c]:["C"].concat(Po(a,u,f,c))}return t}function Co(t,e=!1){if(Al(t)){const c=we(t);return e?[c,[]]:c}const r=nn(t),n={...Mo},i=[];let s="",o=r.length,a,u;const f=[];for(let c=0;c<o;c+=1){r[c]&&([s]=r[c]),i[c]=s;const h=El(r[c],n);r[c]=h,pl(r,i,c),o=r.length,s==="Z"&&f.push(c),a=r[c],u=a.length,n.x1=+a[u-2],n.y1=+a[u-1],n.x2=+a[u-4]||n.x1,n.y2=+a[u-3]||n.y1}return e?[r,f]:r}function Ml(t){const e=t.slice(1).map((r,n,i)=>n?i[n-1].slice(-2).concat(r.slice(1)):t[0].slice(1).concat(r.slice(1))).map(r=>r.map((n,i)=>r[r.length-i-2*(1-i%2)])).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(r=>["C"].concat(r.slice(2))))}function $o(t,e){const{x:r,y:n}=t,{x:i,y:s}=e,o=r*i+n*s,a=Math.sqrt((r**2+n**2)*(i**2+s**2));return(r*s-n*i<0?-1:1)*Math.acos(o/a)}function xl(t,e,r,n,i,s,o,a,u,f){const{abs:c,sin:h,cos:l,sqrt:p,PI:_}=Math;let d=c(r),y=c(n);const v=(i%360+360)%360*(_/180);if(t===a&&e===u)return{x:t,y:e};if(d===0||y===0)return nr(t,e,a,u,f).point;const w=(t-a)/2,g=(e-u)/2,b={x:l(v)*w+h(v)*g,y:-h(v)*w+l(v)*g},O=b.x**2/d**2+b.y**2/y**2;O>1&&(d*=p(O),y*=p(O));const F=d**2*y**2-d**2*b.y**2-y**2*b.x**2,Ft=d**2*b.y**2+y**2*b.x**2;let Ye=F/Ft;Ye=Ye<0?0:Ye;const Qn=(s!==o?1:-1)*p(Ye),Pt={x:Qn*(d*b.y/y),y:Qn*(-(y*b.x)/d)},Xn={x:l(v)*Pt.x-h(v)*Pt.y+(t+a)/2,y:h(v)*Pt.x+l(v)*Pt.y+(e+u)/2},Kr={x:(b.x-Pt.x)/d,y:(b.y-Pt.y)/y},ti=$o({x:1,y:0},Kr),ei={x:(-b.x-Pt.x)/d,y:(-b.y-Pt.y)/y};let Bt=$o(Kr,ei);!o&&Bt>0?Bt-=2*_:o&&Bt<0&&(Bt+=2*_),Bt%=2*_;const Ut=ti+Bt*f,Hr=d*l(Ut),Gr=y*h(Ut);return{x:l(v)*Hr-h(v)*Gr+Xn.x,y:h(v)*Hr+l(v)*Gr+Xn.y}}function Il(t,e,r,n,i,s,o,a,u,f){const c=typeof f=="number";let h=t,l=e,p=0,_=[h,l,p],d=[h,l],y=0,m={x:0,y:0},v=[{x:h,y:l}];c&&f<=0&&(m={x:h,y:l});const w=100;for(let g=0;g<=w;g+=1){if(y=g/w,{x:h,y:l}=xl(t,e,r,n,i,s,o,a,u,y),v=v.concat({x:h,y:l}),p+=Se(d,[h,l]),d=[h,l],c&&p>=f&&f>_[2]){const b=(p-f)/(p-_[2]);m={x:d[0]*(1-b)+_[0]*b,y:d[1]*(1-b)+_[1]*b}}_=[h,l,p]}return c&&f>=p&&(m={x:a,y:u}),{length:p,point:m,min:{x:Math.min.apply(null,v.map(g=>g.x)),y:Math.min.apply(null,v.map(g=>g.y))},max:{x:Math.max.apply(null,v.map(g=>g.x)),y:Math.max.apply(null,v.map(g=>g.y))}}}function Tl(t,e,r,n,i,s,o,a,u){const f=1-u;return{x:f**3*t+3*f**2*u*r+3*f*u**2*i+u**3*o,y:f**3*e+3*f**2*u*n+3*f*u**2*s+u**3*a}}function qo(t,e,r,n,i,s,o,a,u){const f=typeof u=="number";let c=t,h=e,l=0,p=[c,h,l],_=[c,h],d=0,y={x:0,y:0},m=[{x:c,y:h}];f&&u<=0&&(y={x:c,y:h});const v=30;for(let w=0;w<=v;w+=1){if(d=w/v,{x:c,y:h}=Tl(t,e,r,n,i,s,o,a,d),m=m.concat({x:c,y:h}),l+=Se(_,[c,h]),_=[c,h],f&&l>=u&&u>p[2]){const g=(l-u)/(l-p[2]);y={x:_[0]*(1-g)+p[0]*g,y:_[1]*(1-g)+p[1]*g}}p=[c,h,l]}return f&&u>=l&&(y={x:o,y:a}),{length:l,point:y,min:{x:Math.min.apply(null,m.map(w=>w.x)),y:Math.min.apply(null,m.map(w=>w.y))},max:{x:Math.max.apply(null,m.map(w=>w.x)),y:Math.max.apply(null,m.map(w=>w.y))}}}function zl(t,e,r,n,i,s,o){const a=1-o;return{x:a**2*t+2*a*o*r+o**2*i,y:a**2*e+2*a*o*n+o**2*s}}function Rl(t,e,r,n,i,s,o){const a=typeof o=="number";let u=t,f=e,c=0,h=[u,f,c],l=[u,f],p=0,_={x:0,y:0},d=[{x:u,y:f}];a&&o<=0&&(_={x:u,y:f});const y=30;for(let m=0;m<=y;m+=1){if(p=m/y,{x:u,y:f}=zl(t,e,r,n,i,s,p),d=d.concat({x:u,y:f}),c+=Se(l,[u,f]),l=[u,f],a&&c>=o&&o>h[2]){const v=(c-o)/(c-h[2]);_={x:l[0]*(1-v)+h[0]*v,y:l[1]*(1-v)+h[1]*v}}h=[u,f,c]}return a&&o>=c&&(_={x:i,y:s}),{length:c,point:_,min:{x:Math.min.apply(null,d.map(m=>m.x)),y:Math.min.apply(null,d.map(m=>m.y))},max:{x:Math.max.apply(null,d.map(m=>m.x)),y:Math.max.apply(null,d.map(m=>m.y))}}}function on(t,e){const r=nn(t),n=typeof e=="number";let i,s=[],o,a=0,u=0,f=0,c=0,h,l=[],p=[],_=0,d={x:0,y:0},y=d,m=d,v=d,w=0;for(let g=0,b=r.length;g<b;g+=1)h=r[g],[o]=h,i=o==="M",s=i?s:[a,u].concat(h.slice(1)),i?([,f,c]=h,d={x:f,y:c},y=d,_=0,n&&e<.001&&(v=d)):o==="L"?{length:_,min:d,max:y,point:m}=nr(s[0],s[1],s[2],s[3],(e||0)-w):o==="A"?{length:_,min:d,max:y,point:m}=Il(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],(e||0)-w):o==="C"?{length:_,min:d,max:y,point:m}=qo(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],(e||0)-w):o==="Q"?{length:_,min:d,max:y,point:m}=Rl(s[0],s[1],s[2],s[3],s[4],s[5],(e||0)-w):o==="Z"&&(s=[a,u,f,c],{length:_,min:d,max:y,point:m}=nr(s[0],s[1],s[2],s[3],(e||0)-w)),n&&w<e&&w+_>=e&&(v=m),p.push(y),l.push(d),w+=_,[a,u]=o!=="Z"?h.slice(-2):[f,c];return n&&e>=w&&(v={x:a,y:u}),{length:w,point:v,min:{x:Math.min.apply(null,l.map(g=>g.x)),y:Math.min.apply(null,l.map(g=>g.y))},max:{x:Math.max.apply(null,p.map(g=>g.x)),y:Math.max.apply(null,p.map(g=>g.y))}}}function Fl(t){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};const{min:{x:e,y:r},max:{x:n,y:i}}=on(t),s=n-e,o=i-r;return{width:s,height:o,x:e,y:r,x2:n,y2:i,cx:e+s/2,cy:r+o/2,cz:Math.max(s,o)+Math.min(s,o)/2}}function ir(t){return on(t).length}function Pl(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};const{length:e,min:{x:r,y:n},max:{x:i,y:s}}=on(t),o=i-r,a=s-n;return{length:e,width:o,height:a,x:r,y:n,x2:i,y2:s,cx:r+o/2,cy:n+a/2,cz:Math.max(o,a)+Math.min(o,a)/2}}function Cl(t){const e=t.length,r=e-1;return t.map((n,i)=>t.map((s,o)=>{let a=i+o,u;return o===0||t[a]&&t[a][0]==="M"?(u=t[a],["M"].concat(u.slice(-2))):(a>=e&&(a-=r),t[a])}))}function $l(t,e){const r=t.length-1,n=[];let i=0,s=0;const o=Cl(t);return o.forEach((a,u)=>{t.slice(1).forEach((f,c)=>{s+=Se(t[(u+c)%r].slice(-2),e[c%r].slice(-2))}),n[u]=s,s=0}),i=n.indexOf(Math.min.apply(null,n)),o[i]}function ql(t,e,r,n,i,s,o,a){return 3*((a-e)*(r+i)-(o-t)*(n+s)+n*(t-i)-r*(e-s)+a*(i+t/3)-o*(s+e/3))/20}function No(t){let e=0,r=0,n=0;return Co(t).map(i=>{switch(i[0]){case"M":return[,e,r]=i,0;default:const[s,o,a,u,f,c]=i.slice(1);return n=ql(e,r,s,o,a,u,f,c),[e,r]=i.slice(-2),n}}).reduce((i,s)=>i+s,0)}function Nl(t){return No(t)>=0}function an(t,e){return on(t,e).point}function jl(t,e){const r=pi(t);if(typeof r=="string")throw TypeError(r);let n=r.slice(),i=ir(n),s=n.length-1,o=0,a=0,u=r[0];const[f,c]=u.slice(-2),h={x:f,y:c};if(s<=0||!e||!Number.isFinite(e))return{segment:u,index:0,length:a,point:h,lengthAtSegment:o};if(e>=i)return n=r.slice(0,-1),o=ir(n),a=i-o,{segment:r[s],index:s,length:a,lengthAtSegment:o};const l=[];for(;s>0;)u=n[s],n=n.slice(0,-1),o=ir(n),a=i-o,i=o,l.push({segment:u,index:s,length:a,lengthAtSegment:o}),s-=1;return l.find(({lengthAtSegment:p})=>p<=e)}function Ll(t,e){const r=pi(t),n=nn(r),i=ir(r),s=g=>{const b=g.x-e.x,O=g.y-e.y;return b*b+O*O};let o=8,a,u=0,f={x:0,y:0},c=0,h=1/0;for(let g=0;g<=i;g+=o)a=an(n,g),u=s(a),u<h&&(f=a,c=g,h=u);o/=2;let l,p,_=0,d=0,y=0,m=0;for(;o>.5;)_=c-o,l=an(n,_),y=s(l),d=c+o,p=an(n,d),m=s(p),_>=0&&y<h?(f=l,c=_,h=y):d<=i&&m<h?(f=p,c=d,h=m):o/=2;const v=jl(r,c),w=Math.sqrt(h);return{closest:f,distance:w,segment:v}}function Dl(t,e){const{distance:r}=Ll(t,e);return Math.abs(r)<.001}function kl(t,e=.5){const r=t.slice(0,2),n=t.slice(2,4),i=t.slice(4,6),s=t.slice(6,8),o=gt(r,n,e),a=gt(n,i,e),u=gt(i,s,e),f=gt(o,a,e),c=gt(a,u,e),h=gt(f,c,e);return[["C"].concat(o,f,h),["C"].concat(c,u,s)]}function jo(t){return t.map((e,r,n)=>{const i=r&&n[r-1].slice(-2).concat(e.slice(1)),s=r?qo(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]).length:0;let o;return r?o=s?kl(i):[e,e]:o=[e],{s:e,ss:o,l:s}})}function Lo(t,e,r){const n=jo(t),i=jo(e),s=n.length,o=i.length,a=n.filter(y=>y.l).length,u=i.filter(y=>y.l).length,f=n.filter(y=>y.l).reduce((y,{l:m})=>y+m,0)/a||0,c=i.filter(y=>y.l).reduce((y,{l:m})=>y+m,0)/u||0,h=r||Math.max(s,o),l=[f,c],p=[h-s,h-o];let _=0;const d=[n,i].map((y,m)=>y.l===h?y.map(v=>v.s):y.map((v,w)=>(_=w&&p[m]&&v.l>=l[m],p[m]-=_?1:0,_?v.ss:[v.s])).flat());return d[0].length===d[1].length?d:Lo(d[0],d[1],h)}const Bl=Object.freeze(Object.defineProperty({__proto__:null,angleTo:fl,clonePath:we,direction:Eo,distanceSquareRoot:Se,equalizeSegments:Lo,getDrawDirection:Nl,getPathArea:No,getPathBBox:Fl,getPathBBoxTotalLength:Pl,getPointAtLength:an,getRotatedCurve:$l,getTotalLength:ir,gradient:Gh,isPointInStroke:Dl,normalizePath:nn,path2Absolute:Ro,path2Curve:Co,path2String:ll,reverseCurve:Ml,rgb2arr:bo,toCSSGradient:Qh,toRGB:Ao,transform:ul,vertical:cl},Symbol.toStringTag,{value:"Module"}));var un=Symbol.for("immer-nothing"),Ae=Symbol.for("immer-draftable"),x=Symbol.for("immer-state"),Do=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function j(t,...e){if(process.env.NODE_ENV!=="production"){const r=Do[t],n=typeof r=="function"?r.apply(null,e):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ne=Object.getPrototypeOf;function $t(t){return!!t&&!!t[x]}function Ot(t){return t?ko(t)||Array.isArray(t)||!!t[Ae]||!!t.constructor?.[Ae]||or(t)||ar(t):!1}var Ul=Object.prototype.constructor.toString();function ko(t){if(!t||typeof t!="object")return!1;const e=ne(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Ul}function Wl(t){return $t(t)||j(15,t),t[x].base_}function Oe(t,e){ie(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function ie(t){const e=t[x];return e?e.type_:Array.isArray(t)?1:or(t)?2:ar(t)?3:0}function sr(t,e){return ie(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function _i(t,e){return ie(t)===2?t.get(e):t[e]}function Bo(t,e,r){const n=ie(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Kl(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function or(t){return t instanceof Map}function ar(t){return t instanceof Set}function k(t){return t.copy_||t.base_}function di(t,e){if(or(t))return new Map(t);if(ar(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=ko(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[x];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){const o=i[s],a=n[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[o]})}return Object.create(ne(t),n)}else{const n=ne(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function fn(t,e=!1){return cn(t)||$t(t)||!Ot(t)||(ie(t)>1&&(t.set=t.add=t.clear=t.delete=Hl),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>fn(n,!0))),t}function Hl(){j(2)}function cn(t){return Object.isFrozen(t)}var yi={};function se(t){const e=yi[t];return e||j(0,t),e}function Uo(t,e){yi[t]||(yi[t]=e)}var ur;function hn(){return ur}function Gl(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wo(t,e){e&&(se("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function gi(t){vi(t),t.drafts_.forEach(Vl),t.drafts_=null}function vi(t){t===ur&&(ur=t.parent_)}function Ko(t){return ur=Gl(ur,t)}function Vl(t){const e=t[x];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ho(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[x].modified_&&(gi(e),j(4)),Ot(t)&&(t=ln(e,t),e.parent_||pn(e,t)),e.patches_&&se("Patches").generateReplacementPatches_(r[x].base_,t,e.patches_,e.inversePatches_)):t=ln(e,r,[]),gi(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==un?t:void 0}function ln(t,e,r){if(cn(e))return e;const n=e[x];if(!n)return Oe(e,(i,s)=>Go(t,n,e,i,s,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return pn(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let s=i,o=!1;n.type_===3&&(s=new Set(i),i.clear(),o=!0),Oe(s,(a,u)=>Go(t,n,i,a,u,r,o)),pn(t,i,!1),r&&t.patches_&&se("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function Go(t,e,r,n,i,s,o){if(process.env.NODE_ENV!=="production"&&i===r&&j(5),$t(i)){const a=s&&e&&e.type_!==3&&!sr(e.assigned_,n)?s.concat(n):void 0,u=ln(t,i,a);if(Bo(r,n,u),$t(u))t.canAutoFreeze_=!1;else return}else o&&r.add(i);if(Ot(i)&&!cn(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ln(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&pn(t,i)}}function pn(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&fn(e,r)}function Yl(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:hn(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,s=mi;r&&(i=[n],s=fr);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,a}var mi={get(t,e){if(e===x)return t;const r=k(t);if(!sr(r,e))return Zl(t,r,e);const n=r[e];return t.finalized_||!Ot(n)?n:n===wi(t.base_,e)?(bi(t),t.copy_[e]=cr(n,t)):n},has(t,e){return e in k(t)},ownKeys(t){return Reflect.ownKeys(k(t))},set(t,e,r){const n=Vo(k(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=wi(k(t),e),s=i?.[x];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(Kl(r,i)&&(r!==void 0||sr(t.base_,e)))return!0;bi(t),qt(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return wi(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,bi(t),qt(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=k(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){j(11)},getPrototypeOf(t){return ne(t.base_)},setPrototypeOf(){j(12)}},fr={};Oe(mi,(t,e)=>{fr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),fr.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&j(13),fr.set.call(this,t,e,void 0)},fr.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&j(14),mi.set.call(this,t[0],e,r,t[0])};function wi(t,e){const r=t[x];return(r?k(r):t)[e]}function Zl(t,e,r){const n=Vo(e,r);return n?"value"in n?n.value:n.get?.call(t.draft_):void 0}function Vo(t,e){if(!(e in t))return;let r=ne(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=ne(r)}}function qt(t){t.modified_||(t.modified_=!0,t.parent_&&qt(t.parent_))}function bi(t){t.copy_||(t.copy_=di(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Yo=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const s=r;r=e;const o=this;return function(u=s,...f){return o.produce(u,c=>r.call(this,c,...f))}}typeof r!="function"&&j(6),n!==void 0&&typeof n!="function"&&j(7);let i;if(Ot(e)){const s=Ko(this),o=cr(e,void 0);let a=!0;try{i=r(o),a=!1}finally{a?gi(s):vi(s)}return Wo(s,n),Ho(i,s)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===un&&(i=void 0),this.autoFreeze_&&fn(i,!0),n){const s=[],o=[];se("Patches").generateReplacementPatches_(e,i,s,o),n(s,o)}return i}else j(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...a)=>this.produceWithPatches(o,u=>e(u,...a));let n,i;return[this.produce(e,r,(o,a)=>{n=o,i=a}),n,i]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Ot(t)||j(8),$t(t)&&(t=Zo(t));const e=Ko(this),r=cr(t,void 0);return r[x].isManual_=!0,vi(e),r}finishDraft(t,e){const r=t&&t[x];(!r||!r.isManual_)&&j(9);const{scope_:n}=r;return Wo(n,e),Ho(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=se("Patches").applyPatches_;return $t(t)?n(t,e):this.produce(t,i=>n(i,e))}};function cr(t,e){const r=or(t)?se("MapSet").proxyMap_(t,e):ar(t)?se("MapSet").proxySet_(t,e):Yl(t,e);return(e?e.scope_:hn()).drafts_.push(r),r}function Zo(t){return $t(t)||j(10,t),Jo(t)}function Jo(t){if(!Ot(t)||cn(t))return t;const e=t[x];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=di(t,e.scope_.immer_.useStrictShallowCopy_)}else r=di(t,!0);return Oe(r,(n,i)=>{Bo(r,n,Jo(i))}),e&&(e.finalized_=!1),r}function Jl(){process.env.NODE_ENV!=="production"&&Do.push('Sets cannot have "replace" patches.',function(l){return"Unsupported patch operation: "+l},function(l){return"Cannot apply patch, path doesn't resolve: "+l},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",r="add",n="remove";function i(l,p,_,d){switch(l.type_){case 0:case 2:return o(l,p,_,d);case 1:return s(l,p,_,d);case 3:return a(l,p,_,d)}}function s(l,p,_,d){let{base_:y,assigned_:m}=l,v=l.copy_;v.length<y.length&&([y,v]=[v,y],[_,d]=[d,_]);for(let w=0;w<y.length;w++)if(m[w]&&v[w]!==y[w]){const g=p.concat([w]);_.push({op:e,path:g,value:h(v[w])}),d.push({op:e,path:g,value:h(y[w])})}for(let w=y.length;w<v.length;w++){const g=p.concat([w]);_.push({op:r,path:g,value:h(v[w])})}for(let w=v.length-1;y.length<=w;--w){const g=p.concat([w]);d.push({op:n,path:g})}}function o(l,p,_,d){const{base_:y,copy_:m}=l;Oe(l.assigned_,(v,w)=>{const g=_i(y,v),b=_i(m,v),O=w?sr(y,v)?e:r:n;if(g===b&&O===e)return;const F=p.concat(v);_.push(O===n?{op:O,path:F}:{op:O,path:F,value:b}),d.push(O===r?{op:n,path:F}:O===n?{op:r,path:F,value:h(g)}:{op:e,path:F,value:h(g)})})}function a(l,p,_,d){let{base_:y,copy_:m}=l,v=0;y.forEach(w=>{if(!m.has(w)){const g=p.concat([v]);_.push({op:n,path:g,value:w}),d.unshift({op:r,path:g,value:w})}v++}),v=0,m.forEach(w=>{if(!y.has(w)){const g=p.concat([v]);_.push({op:r,path:g,value:w}),d.unshift({op:n,path:g,value:w})}v++})}function u(l,p,_,d){_.push({op:e,path:[],value:p===un?void 0:p}),d.push({op:e,path:[],value:l})}function f(l,p){return p.forEach(_=>{const{path:d,op:y}=_;let m=l;for(let b=0;b<d.length-1;b++){const O=ie(m);let F=d[b];typeof F!="string"&&typeof F!="number"&&(F=""+F),(O===0||O===1)&&(F==="__proto__"||F==="constructor")&&j(19),typeof m=="function"&&F==="prototype"&&j(19),m=_i(m,F),typeof m!="object"&&j(18,d.join("/"))}const v=ie(m),w=c(_.value),g=d[d.length-1];switch(y){case e:switch(v){case 2:return m.set(g,w);case 3:j(16);default:return m[g]=w}case r:switch(v){case 1:return g==="-"?m.push(w):m.splice(g,0,w);case 2:return m.set(g,w);case 3:return m.add(w);default:return m[g]=w}case n:switch(v){case 1:return m.splice(g,1);case 2:return m.delete(g);case 3:return m.delete(_.value);default:return delete m[g]}default:j(17,y)}}),l}function c(l){if(!Ot(l))return l;if(Array.isArray(l))return l.map(c);if(or(l))return new Map(Array.from(l.entries()).map(([_,d])=>[_,c(d)]));if(ar(l))return new Set(Array.from(l).map(c));const p=Object.create(ne(l));for(const _ in l)p[_]=c(l[_]);return sr(l,Ae)&&(p[Ae]=l[Ae]),p}function h(l){return $t(l)?c(l):l}Uo("Patches",{applyPatches_:f,generatePatches_:i,generateReplacementPatches_:u})}function Ql(){class t extends Map{constructor(u,f){super(),this[x]={type_:2,parent_:f,scope_:f?f.scope_:hn(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:u,draft_:this,isManual_:!1,revoked_:!1}}get size(){return k(this[x]).size}has(u){return k(this[x]).has(u)}set(u,f){const c=this[x];return o(c),(!k(c).has(u)||k(c).get(u)!==f)&&(r(c),qt(c),c.assigned_.set(u,!0),c.copy_.set(u,f),c.assigned_.set(u,!0)),this}delete(u){if(!this.has(u))return!1;const f=this[x];return o(f),r(f),qt(f),f.base_.has(u)?f.assigned_.set(u,!1):f.assigned_.delete(u),f.copy_.delete(u),!0}clear(){const u=this[x];o(u),k(u).size&&(r(u),qt(u),u.assigned_=new Map,Oe(u.base_,f=>{u.assigned_.set(f,!1)}),u.copy_.clear())}forEach(u,f){const c=this[x];k(c).forEach((h,l,p)=>{u.call(f,this.get(l),l,this)})}get(u){const f=this[x];o(f);const c=k(f).get(u);if(f.finalized_||!Ot(c)||c!==f.base_.get(u))return c;const h=cr(c,f);return r(f),f.copy_.set(u,h),h}keys(){return k(this[x]).keys()}values(){const u=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=u.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const u=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=u.next();if(f.done)return f;const c=this.get(f.value);return{done:!1,value:[f.value,c]}}}}[Symbol.iterator](){return this.entries()}}function e(a,u){return new t(a,u)}function r(a){a.copy_||(a.assigned_=new Map,a.copy_=new Map(a.base_))}class n extends Set{constructor(u,f){super(),this[x]={type_:3,parent_:f,scope_:f?f.scope_:hn(),modified_:!1,finalized_:!1,copy_:void 0,base_:u,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return k(this[x]).size}has(u){const f=this[x];return o(f),f.copy_?!!(f.copy_.has(u)||f.drafts_.has(u)&&f.copy_.has(f.drafts_.get(u))):f.base_.has(u)}add(u){const f=this[x];return o(f),this.has(u)||(s(f),qt(f),f.copy_.add(u)),this}delete(u){if(!this.has(u))return!1;const f=this[x];return o(f),s(f),qt(f),f.copy_.delete(u)||(f.drafts_.has(u)?f.copy_.delete(f.drafts_.get(u)):!1)}clear(){const u=this[x];o(u),k(u).size&&(s(u),qt(u),u.copy_.clear())}values(){const u=this[x];return o(u),s(u),u.copy_.values()}entries(){const u=this[x];return o(u),s(u),u.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(u,f){const c=this.values();let h=c.next();for(;!h.done;)u.call(f,h.value,h.value,this),h=c.next()}}function i(a,u){return new n(a,u)}function s(a){a.copy_||(a.copy_=new Set,a.base_.forEach(u=>{if(Ot(u)){const f=cr(u,a);a.drafts_.set(u,f),a.copy_.add(f)}else a.copy_.add(u)}))}function o(a){a.revoked_&&j(3,JSON.stringify(k(a)))}Uo("MapSet",{proxyMap_:e,proxySet_:i})}var ct=new Yo,Xl=ct.produce,tp=ct.produceWithPatches.bind(ct),ep=ct.setAutoFreeze.bind(ct),rp=ct.setUseStrictShallowCopy.bind(ct),np=ct.applyPatches.bind(ct),ip=ct.createDraft.bind(ct),sp=ct.finishDraft.bind(ct);function op(t){return t}function ap(t){return t}const up=Object.freeze(Object.defineProperty({__proto__:null,Immer:Yo,applyPatches:np,castDraft:op,castImmutable:ap,createDraft:ip,current:Zo,enableMapSet:Ql,enablePatches:Jl,finishDraft:sp,freeze:fn,immerable:Ae,isDraft:$t,isDraftable:Ot,nothing:un,original:Wl,produce:Xl,produceWithPatches:tp,setAutoFreeze:ep,setUseStrictShallowCopy:rp},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
|
+
* @license
|
|
3
|
+
* MIT License
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/var hr="delete",z=5,ht=1<<z,tt=ht-1,S={};function Si(){return{value:!1}}function vt(t){t&&(t.value=!0)}function Ai(){}function Ee(t){return t.size===void 0&&(t.size=t.__iterate(Qo)),t.size}function Ht(t,e){if(typeof e!="number"){var r=e>>>0;if(""+r!==e||r===4294967295)return NaN;e=r}return e<0?Ee(t)+e:e}function Qo(){return!0}function lr(t,e,r){return(t===0&&!ta(t)||r!==void 0&&t<=-r)&&(e===void 0||r!==void 0&&e>=r)}function Me(t,e){return Xo(t,e,0)}function pr(t,e){return Xo(t,e,e)}function Xo(t,e,r){return t===void 0?r:ta(t)?e===1/0?e:Math.max(0,e+t)|0:e===void 0||e===t?t:Math.min(e,t)|0}function ta(t){return t<0||t===0&&1/t===-1/0}var ea="@@__IMMUTABLE_ITERABLE__@@";function st(t){return!!(t&&t[ea])}var _n="@@__IMMUTABLE_KEYED__@@";function P(t){return!!(t&&t[_n])}var dn="@@__IMMUTABLE_INDEXED__@@";function ot(t){return!!(t&&t[dn])}function yn(t){return P(t)||ot(t)}var B=function(e){return st(e)?e:V(e)},mt=function(t){function e(r){return P(r)?r:Yt(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(B),oe=function(t){function e(r){return ot(r)?r:bt(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(B),xe=function(t){function e(r){return st(r)&&!yn(r)?r:ze(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(B);B.Keyed=mt,B.Indexed=oe,B.Set=xe;var ra="@@__IMMUTABLE_SEQ__@@";function gn(t){return!!(t&&t[ra])}var na="@@__IMMUTABLE_RECORD__@@";function Gt(t){return!!(t&&t[na])}function wt(t){return st(t)||Gt(t)}var Vt="@@__IMMUTABLE_ORDERED__@@";function Et(t){return!!(t&&t[Vt])}var Ie=0,lt=1,pt=2,Oi=typeof Symbol=="function"&&Symbol.iterator,ia="@@iterator",vn=Oi||ia,A=function(e){this.next=e};A.prototype.toString=function(){return"[Iterator]"},A.KEYS=Ie,A.VALUES=lt,A.ENTRIES=pt,A.prototype.inspect=A.prototype.toSource=function(){return this.toString()},A.prototype[vn]=function(){return this};function $(t,e,r,n){var i=t===Ie?e:t===lt?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function G(){return{value:void 0,done:!0}}function Ei(t){return Array.isArray(t)?!0:!!mn(t)}function sa(t){return t&&typeof t.next=="function"}function Mi(t){var e=mn(t);return e&&e.call(t)}function mn(t){var e=t&&(Oi&&t[Oi]||t[ia]);if(typeof e=="function")return e}function fp(t){var e=mn(t);return e&&e===t.entries}function cp(t){var e=mn(t);return e&&e===t.keys}var Te=Object.prototype.hasOwnProperty;function xi(t){return Array.isArray(t)||typeof t=="string"?!0:t&&typeof t=="object"&&Number.isInteger(t.length)&&t.length>=0&&(t.length===0?Object.keys(t).length===1:t.hasOwnProperty(t.length-1))}var V=function(t){function e(r){return r==null?Ti():wt(r)?r.toSeq():lp(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(n,i){var s=this._cache;if(s){for(var o=s.length,a=0;a!==o;){var u=s[i?o-++a:a++];if(n(u[1],u[0],this)===!1)break}return a}return this.__iterateUncached(n,i)},e.prototype.__iterator=function(n,i){var s=this._cache;if(s){var o=s.length,a=0;return new A(function(){if(a===o)return G();var u=s[i?o-++a:a++];return $(n,u[0],u[1])})}return this.__iteratorUncached(n,i)},e}(B),Yt=function(t){function e(r){return r==null?Ti().toKeyedSeq():st(r)?P(r)?r.toSeq():r.fromEntrySeq():Gt(r)?r.toSeq():zi(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(V),bt=function(t){function e(r){return r==null?Ti():st(r)?P(r)?r.entrySeq():r.toIndexedSeq():Gt(r)?r.toSeq().entrySeq():aa(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(V),ze=function(t){function e(r){return(st(r)&&!yn(r)?r:bt(r)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(V);V.isSeq=gn,V.Keyed=Yt,V.Set=ze,V.Indexed=bt,V.prototype[ra]=!0;var Re=function(t){function e(r){this._array=r,this.size=r.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,i){return this.has(n)?this._array[Ht(this,n)]:i},e.prototype.__iterate=function(n,i){for(var s=this._array,o=s.length,a=0;a!==o;){var u=i?o-++a:a++;if(n(s[u],u,this)===!1)break}return a},e.prototype.__iterator=function(n,i){var s=this._array,o=s.length,a=0;return new A(function(){if(a===o)return G();var u=i?o-++a:a++;return $(n,u,s[u])})},e}(bt),Ii=function(t){function e(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,i){return i!==void 0&&!this.has(n)?i:this._object[n]},e.prototype.has=function(n){return Te.call(this._object,n)},e.prototype.__iterate=function(n,i){for(var s=this._object,o=this._keys,a=o.length,u=0;u!==a;){var f=o[i?a-++u:u++];if(n(s[f],f,this)===!1)break}return u},e.prototype.__iterator=function(n,i){var s=this._object,o=this._keys,a=o.length,u=0;return new A(function(){if(u===a)return G();var f=o[i?a-++u:u++];return $(n,f,s[f])})},e}(Yt);Ii.prototype[Vt]=!0;var hp=function(t){function e(r){this._collection=r,this.size=r.length||r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(n,i){if(i)return this.cacheResult().__iterate(n,i);var s=this._collection,o=Mi(s),a=0;if(sa(o))for(var u;!(u=o.next()).done&&n(u.value,a++,this)!==!1;);return a},e.prototype.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var s=this._collection,o=Mi(s);if(!sa(o))return new A(G);var a=0;return new A(function(){var u=o.next();return u.done?u:$(n,a++,u.value)})},e}(bt),oa;function Ti(){return oa||(oa=new Re([]))}function zi(t){var e=Ri(t);if(e)return e.fromEntrySeq();if(typeof t=="object")return new Ii(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function aa(t){var e=Ri(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function lp(t){var e=Ri(t);if(e)return fp(t)?e.fromEntrySeq():cp(t)?e.toSetSeq():e;if(typeof t=="object")return new Ii(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function Ri(t){return xi(t)?new Re(t):Ei(t)?new hp(t):void 0}var ua="@@__IMMUTABLE_MAP__@@";function wn(t){return!!(t&&t[ua])}function Fi(t){return wn(t)&&Et(t)}function Pi(t){return!!(t&&typeof t.equals=="function"&&typeof t.hashCode=="function")}function U(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if(typeof t.valueOf=="function"&&typeof e.valueOf=="function"){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(Pi(t)&&Pi(e)&&t.equals(e))}var _r=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(e,r){e|=0,r|=0;var n=e&65535,i=r&65535;return n*i+((e>>>16)*i+n*(r>>>16)<<16>>>0)|0};function bn(t){return t>>>1&1073741824|t&3221225471}var pp=Object.prototype.valueOf;function at(t){if(t==null)return fa(t);if(typeof t.hashCode=="function")return bn(t.hashCode(t));var e=mp(t);if(e==null)return fa(e);switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return _p(e);case"string":return e.length>wp?dp(e):Ci(e);case"object":case"function":return gp(e);case"symbol":return yp(e);default:if(typeof e.toString=="function")return Ci(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function fa(t){return t===null?1108378658:1108378659}function _p(t){if(t!==t||t===1/0)return 0;var e=t|0;for(e!==t&&(e^=t*4294967295);t>4294967295;)t/=4294967295,e^=t;return bn(e)}function dp(t){var e=Li[t];return e===void 0&&(e=Ci(t),ji===bp&&(ji=0,Li={}),ji++,Li[t]=e),e}function Ci(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return bn(e)}function yp(t){var e=pa[t];return e!==void 0||(e=la(),pa[t]=e),e}function gp(t){var e;if($i&&(e=qi.get(t),e!==void 0)||(e=t[ae],e!==void 0)||!ha&&(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[ae],e!==void 0||(e=vp(t),e!==void 0)))return e;if(e=la(),$i)qi.set(t,e);else{if(ca!==void 0&&ca(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(ha)Object.defineProperty(t,ae,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable!==void 0&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[ae]=e;else if(t.nodeType!==void 0)t[ae]=e;else throw new Error("Unable to set a non-enumerable property on object.")}return e}var ca=Object.isExtensible,ha=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function vp(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function mp(t){return t.valueOf!==pp&&typeof t.valueOf=="function"?t.valueOf(t):t}function la(){var t=++Ni;return Ni&1073741824&&(Ni=0),t}var $i=typeof WeakMap=="function",qi;$i&&(qi=new WeakMap);var pa=Object.create(null),Ni=0,ae="__immutablehash__";typeof Symbol=="function"&&(ae=Symbol(ae));var wp=16,bp=255,ji=0,Li={},Sn=function(t){function e(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,i){return this._iter.get(n,i)},e.prototype.has=function(n){return this._iter.has(n)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var n=this,i=Di(this,!0);return this._useKeys||(i.valueSeq=function(){return n._iter.toSeq().reverse()}),i},e.prototype.map=function(n,i){var s=this,o=va(this,n,i);return this._useKeys||(o.valueSeq=function(){return s._iter.toSeq().map(n,i)}),o},e.prototype.__iterate=function(n,i){var s=this;return this._iter.__iterate(function(o,a){return n(o,a,s)},i)},e.prototype.__iterator=function(n,i){return this._iter.__iterator(n,i)},e}(Yt);Sn.prototype[Vt]=!0;var _a=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,i){var s=this,o=0;return i&&Ee(this),this._iter.__iterate(function(a){return n(a,i?s.size-++o:o++,s)},i)},e.prototype.__iterator=function(n,i){var s=this,o=this._iter.__iterator(lt,i),a=0;return i&&Ee(this),new A(function(){var u=o.next();return u.done?u:$(n,i?s.size-++a:a++,u.value,u)})},e}(bt),da=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,i){var s=this;return this._iter.__iterate(function(o){return n(o,o,s)},i)},e.prototype.__iterator=function(n,i){var s=this._iter.__iterator(lt,i);return new A(function(){var o=s.next();return o.done?o:$(n,o.value,o.value,o)})},e}(ze),ya=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(n,i){var s=this;return this._iter.__iterate(function(o){if(o){Aa(o);var a=st(o);return n(a?o.get(1):o[1],a?o.get(0):o[0],s)}},i)},e.prototype.__iterator=function(n,i){var s=this._iter.__iterator(lt,i);return new A(function(){for(;;){var o=s.next();if(o.done)return o;var a=o.value;if(a){Aa(a);var u=st(a);return $(n,u?a.get(0):a[0],u?a.get(1):a[1],o)}}})},e}(Yt);_a.prototype.cacheResult=Sn.prototype.cacheResult=da.prototype.cacheResult=ya.prototype.cacheResult=Ui;function ga(t){var e=xt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},e.has=function(r){return t.includes(r)},e.includes=function(r){return t.has(r)},e.cacheResult=Ui,e.__iterateUncached=function(r,n){var i=this;return t.__iterate(function(s,o){return r(o,s,i)!==!1},n)},e.__iteratorUncached=function(r,n){if(r===pt){var i=t.__iterator(r,n);return new A(function(){var s=i.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s})}return t.__iterator(r===lt?Ie:lt,n)},e}function va(t,e,r){var n=xt(t);return n.size=t.size,n.has=function(i){return t.has(i)},n.get=function(i,s){var o=t.get(i,S);return o===S?s:e.call(r,o,i,t)},n.__iterateUncached=function(i,s){var o=this;return t.__iterate(function(a,u,f){return i(e.call(r,a,u,f),u,o)!==!1},s)},n.__iteratorUncached=function(i,s){var o=t.__iterator(pt,s);return new A(function(){var a=o.next();if(a.done)return a;var u=a.value,f=u[0];return $(i,f,e.call(r,u[1],f,t),a)})},n}function Di(t,e){var r=this,n=xt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var i=ga(t);return i.reverse=function(){return t.flip()},i}),n.get=function(i,s){return t.get(e?i:-1-i,s)},n.has=function(i){return t.has(e?i:-1-i)},n.includes=function(i){return t.includes(i)},n.cacheResult=Ui,n.__iterate=function(i,s){var o=this,a=0;return s&&Ee(t),t.__iterate(function(u,f){return i(u,e?f:s?o.size-++a:a++,o)},!s)},n.__iterator=function(i,s){var o=0;s&&Ee(t);var a=t.__iterator(pt,!s);return new A(function(){var u=a.next();if(u.done)return u;var f=u.value;return $(i,e?f[0]:s?r.size-++o:o++,f[1],u)})},n}function ma(t,e,r,n){var i=xt(t);return n&&(i.has=function(s){var o=t.get(s,S);return o!==S&&!!e.call(r,o,s,t)},i.get=function(s,o){var a=t.get(s,S);return a!==S&&e.call(r,a,s,t)?a:o}),i.__iterateUncached=function(s,o){var a=this,u=0;return t.__iterate(function(f,c,h){if(e.call(r,f,c,h))return u++,s(f,n?c:u-1,a)},o),u},i.__iteratorUncached=function(s,o){var a=t.__iterator(pt,o),u=0;return new A(function(){for(;;){var f=a.next();if(f.done)return f;var c=f.value,h=c[0],l=c[1];if(e.call(r,l,h,t))return $(s,n?h:u++,l,f)}})},i}function Sp(t,e,r){var n=fe().asMutable();return t.__iterate(function(i,s){n.update(e.call(r,i,s,t),0,function(o){return o+1})}),n.asImmutable()}function Ap(t,e,r){var n=P(t),i=(Et(t)?zt():fe()).asMutable();t.__iterate(function(o,a){i.update(e.call(r,o,a,t),function(u){return u=u||[],u.push(n?[a,o]:o),u})});var s=Bi(t);return i.map(function(o){return R(t,s(o))}).asImmutable()}function Op(t,e,r){var n=P(t),i=[[],[]];t.__iterate(function(o,a){i[e.call(r,o,a,t)?1:0].push(n?[a,o]:o)});var s=Bi(t);return i.map(function(o){return R(t,s(o))})}function ki(t,e,r,n){var i=t.size;if(lr(e,r,i))return t;if(typeof i>"u"&&(e<0||r<0))return ki(t.toSeq().cacheResult(),e,r,n);var s=Me(e,i),o=pr(r,i),a=o-s,u;a===a&&(u=a<0?0:a);var f=xt(t);return f.size=u===0?u:t.size&&u||void 0,!n&&gn(t)&&u>=0&&(f.get=function(c,h){return c=Ht(this,c),c>=0&&c<u?t.get(c+s,h):h}),f.__iterateUncached=function(c,h){var l=this;if(u===0)return 0;if(h)return this.cacheResult().__iterate(c,h);var p=0,_=!0,d=0;return t.__iterate(function(y,m){if(!(_&&(_=p++<s)))return d++,c(y,n?m:d-1,l)!==!1&&d!==u}),d},f.__iteratorUncached=function(c,h){if(u!==0&&h)return this.cacheResult().__iterator(c,h);if(u===0)return new A(G);var l=t.__iterator(c,h),p=0,_=0;return new A(function(){for(;p++<s;)l.next();if(++_>u)return G();var d=l.next();return n||c===lt||d.done?d:c===Ie?$(c,_-1,void 0,d):$(c,_-1,d.value[1],d)})},f}function Ep(t,e,r){var n=xt(t);return n.__iterateUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterate(i,s);var a=0;return t.__iterate(function(u,f,c){return e.call(r,u,f,c)&&++a&&i(u,f,o)}),a},n.__iteratorUncached=function(i,s){var o=this;if(s)return this.cacheResult().__iterator(i,s);var a=t.__iterator(pt,s),u=!0;return new A(function(){if(!u)return G();var f=a.next();if(f.done)return f;var c=f.value,h=c[0],l=c[1];return e.call(r,l,h,o)?i===pt?f:$(i,h,l,f):(u=!1,G())})},n}function wa(t,e,r,n){var i=xt(t);return i.__iterateUncached=function(s,o){var a=this;if(o)return this.cacheResult().__iterate(s,o);var u=!0,f=0;return t.__iterate(function(c,h,l){if(!(u&&(u=e.call(r,c,h,l))))return f++,s(c,n?h:f-1,a)}),f},i.__iteratorUncached=function(s,o){var a=this;if(o)return this.cacheResult().__iterator(s,o);var u=t.__iterator(pt,o),f=!0,c=0;return new A(function(){var h,l,p;do{if(h=u.next(),h.done)return n||s===lt?h:s===Ie?$(s,c++,void 0,h):$(s,c++,h.value[1],h);var _=h.value;l=_[0],p=_[1],f&&(f=e.call(r,p,l,a))}while(f);return s===pt?h:$(s,l,p,h)})},i}var Mp=function(t){function e(r){this._wrappedIterables=r.flatMap(function(n){return n._wrappedIterables?n._wrappedIterables:[n]}),this.size=this._wrappedIterables.reduce(function(n,i){if(n!==void 0){var s=i.size;if(s!==void 0)return n+s}},0),this[_n]=this._wrappedIterables[0][_n],this[dn]=this._wrappedIterables[0][dn],this[Vt]=this._wrappedIterables[0][Vt]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(n,i){if(this._wrappedIterables.length!==0){if(i)return this.cacheResult().__iterate(n,i);for(var s=0,o=P(this),a=o?pt:lt,u=this._wrappedIterables[s].__iterator(a,i),f=!0,c=0;f;){for(var h=u.next();h.done;){if(s++,s===this._wrappedIterables.length)return c;u=this._wrappedIterables[s].__iterator(a,i),h=u.next()}var l=o?n(h.value[1],h.value[0],this):n(h.value,c,this);f=l!==!1,c++}return c}},e.prototype.__iteratorUncached=function(n,i){var s=this;if(this._wrappedIterables.length===0)return new A(G);if(i)return this.cacheResult().__iterator(n,i);var o=0,a=this._wrappedIterables[o].__iterator(n,i);return new A(function(){for(var u=a.next();u.done;){if(o++,o===s._wrappedIterables.length)return u;a=s._wrappedIterables[o].__iterator(n,i),u=a.next()}return u})},e}(V);function xp(t,e){var r=P(t),n=[t].concat(e).map(function(s){return st(s)?r&&(s=mt(s)):s=r?zi(s):aa(Array.isArray(s)?s:[s]),s}).filter(function(s){return s.size!==0});if(n.length===0)return t;if(n.length===1){var i=n[0];if(i===t||r&&P(i)||ot(t)&&ot(i))return i}return new Mp(n)}function ba(t,e,r){var n=xt(t);return n.__iterateUncached=function(i,s){if(s)return this.cacheResult().__iterate(i,s);var o=0,a=!1;function u(f,c){f.__iterate(function(h,l){return(!e||c<e)&&st(h)?u(h,c+1):(o++,i(h,r?l:o-1,n)===!1&&(a=!0)),!a},s)}return u(t,0),o},n.__iteratorUncached=function(i,s){if(s)return this.cacheResult().__iterator(i,s);var o=t.__iterator(i,s),a=[],u=0;return new A(function(){for(;o;){var f=o.next();if(f.done!==!1){o=a.pop();continue}var c=f.value;if(i===pt&&(c=c[1]),(!e||a.length<e)&&st(c))a.push(o),o=c.__iterator(i,s);else return r?f:$(i,u++,c,f)}return G()})},n}function Ip(t,e,r){var n=Bi(t);return t.toSeq().map(function(i,s){return n(e.call(r,i,s,t))}).flatten(!0)}function Tp(t,e){var r=xt(t);return r.size=t.size&&t.size*2-1,r.__iterateUncached=function(n,i){var s=this,o=0;return t.__iterate(function(a){return(!o||n(e,o++,s)!==!1)&&n(a,o++,s)!==!1},i),o},r.__iteratorUncached=function(n,i){var s=t.__iterator(lt,i),o=0,a;return new A(function(){return(!a||o%2)&&(a=s.next(),a.done)?a:o%2?$(n,o++,e):$(n,o++,a.value,a)})},r}function Fe(t,e,r){e||(e=Oa);var n=P(t),i=0,s=t.toSeq().map(function(o,a){return[a,o,i++,r?r(o,a,t):o]}).valueSeq().toArray();return s.sort(function(o,a){return e(o[3],a[3])||o[2]-a[2]}).forEach(n?function(o,a){s[a].length=2}:function(o,a){s[a]=o[1]}),n?Yt(s):ot(t)?bt(s):ze(s)}function An(t,e,r){if(e||(e=Oa),r){var n=t.toSeq().map(function(i,s){return[i,r(i,s,t)]}).reduce(function(i,s){return Sa(e,i[1],s[1])?s:i});return n&&n[0]}return t.reduce(function(i,s){return Sa(e,i,s)?s:i})}function Sa(t,e,r){var n=t(r,e);return n===0&&r!==e&&(r==null||r!==r)||n>0}function On(t,e,r,n){var i=xt(t),s=new Re(r).map(function(o){return o.size});return i.size=n?s.max():s.min(),i.__iterate=function(o,a){for(var u=this.__iterator(lt,a),f,c=0;!(f=u.next()).done&&o(f.value,c++,this)!==!1;);return c},i.__iteratorUncached=function(o,a){var u=r.map(function(h){return h=B(h),Mi(a?h.reverse():h)}),f=0,c=!1;return new A(function(){var h;return c||(h=u.map(function(l){return l.next()}),c=n?h.every(function(l){return l.done}):h.some(function(l){return l.done})),c?G():$(o,f++,e.apply(null,h.map(function(l){return l.value})))})},i}function R(t,e){return t===e?t:gn(t)?e:t.constructor(e)}function Aa(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Bi(t){return P(t)?mt:ot(t)?oe:xe}function xt(t){return Object.create((P(t)?Yt:ot(t)?bt:ze).prototype)}function Ui(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Oa(t,e){return t===void 0&&e===void 0?0:t===void 0?1:e===void 0?-1:t>e?1:t<e?-1:0}function It(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function dr(t,e){if(!t)throw new Error(e)}function _t(t){dr(t!==1/0,"Cannot perform this action with an infinite size.")}function Ea(t){if(xi(t)&&typeof t!="string")return t;if(Et(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}var zp=Object.prototype.toString;function Wi(t){if(!t||typeof t!="object"||zp.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e,n=Object.getPrototypeOf(e);n!==null;)r=n,n=Object.getPrototypeOf(r);return r===e}function Zt(t){return typeof t=="object"&&(wt(t)||Array.isArray(t)||Wi(t))}function yr(t){try{return typeof t=="string"?JSON.stringify(t):String(t)}catch{return JSON.stringify(t)}}function Ma(t,e){return wt(t)?t.has(e):Zt(t)&&Te.call(t,e)}function Ki(t,e,r){return wt(t)?t.get(e,r):Ma(t,e)?typeof t.get=="function"?t.get(e):t[e]:r}function En(t){if(Array.isArray(t))return It(t);var e={};for(var r in t)Te.call(t,r)&&(e[r]=t[r]);return e}function xa(t,e){if(!Zt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(wt(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!Te.call(t,e))return t;var r=En(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function Ia(t,e,r){if(!Zt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(wt(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(Te.call(t,e)&&r===t[e])return t;var n=En(t);return n[e]=r,n}function ue(t,e,r,n){n||(n=r,r=void 0);var i=Ta(wt(t),t,Ea(e),0,r,n);return i===S?r:i}function Ta(t,e,r,n,i,s){var o=e===S;if(n===r.length){var a=o?i:e,u=s(a);return u===a?e:u}if(!o&&!Zt(e))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(r).slice(0,n).map(yr)+"]: "+e);var f=r[n],c=o?S:Ki(e,f,S),h=Ta(c===S?t:wt(c),c,r,n+1,i,s);return h===c?e:h===S?xa(e,f):Ia(o?t?Tt():{}:e,f,h)}function za(t,e,r){return ue(t,e,S,function(){return r})}function Hi(t,e){return za(this,t,e)}function Ra(t,e){return ue(t,e,function(){return S})}function Gi(t){return Ra(this,t)}function Vi(t,e,r,n){return ue(t,[e],r,n)}function Yi(t,e,r){return arguments.length===1?t(this):Vi(this,t,e,r)}function Zi(t,e,r){return ue(this,t,e,r)}function Fa(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ca(this,t)}function Pa(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if(typeof t!="function")throw new TypeError("Invalid merger function: "+t);return Ca(this,e,t)}function Ca(t,e,r){for(var n=[],i=0;i<e.length;i++){var s=mt(e[i]);s.size!==0&&n.push(s)}return n.length===0?t:t.toSeq().size===0&&!t.__ownerID&&n.length===1?Gt(t)?t:t.constructor(n[0]):t.withMutations(function(o){for(var a=r?function(f,c){Vi(o,c,S,function(h){return h===S?f:r(h,f,c)})}:function(f,c){o.set(c,f)},u=0;u<n.length;u++)n[u].forEach(a)})}function Rp(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return vr(t,e)}function Fp(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return vr(e,r,t)}function Pp(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return gr(t,e)}function Cp(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return gr(e,r,t)}function gr(t,e,r){return vr(t,e,$p(r))}function vr(t,e,r){if(!Zt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(wt(t))return typeof r=="function"&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),i=t,s=n?oe:mt,o=n?function(u){i===t&&(i=En(i)),i.push(u)}:function(u,f){var c=Te.call(i,f),h=c&&r?r(i[f],u,f):u;(!c||h!==i[f])&&(i===t&&(i=En(i)),i[f]=h)},a=0;a<e.length;a++)s(e[a]).forEach(o);return i}function $p(t){function e(r,n,i){return Zt(r)&&Zt(n)&&qp(r,n)?vr(r,[n],e):t?t(r,n,i):n}return e}function qp(t,e){var r=V(t),n=V(e);return ot(r)===ot(n)&&P(r)===P(n)}function $a(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return gr(this,t)}function qa(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return gr(this,e,t)}function Ji(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return ue(this,t,Tt(),function(n){return vr(n,e)})}function Qi(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return ue(this,t,Tt(),function(n){return gr(n,e)})}function mr(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function wr(){return this.__ownerID?this:this.__ensureOwner(new Ai)}function br(){return this.__ensureOwner()}function Xi(){return this.__altered}var fe=function(t){function e(r){return r==null?Tt():wn(r)&&!Et(r)?r:Tt().withMutations(function(n){var i=t(r);_t(i.size),i.forEach(function(s,o){return n.set(o,s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(n,i){return this._root?this._root.get(0,void 0,n,i):i},e.prototype.set=function(n,i){return La(this,n,i)},e.prototype.remove=function(n){return La(this,n,S)},e.prototype.deleteAll=function(n){var i=B(n);return i.size===0?this:this.withMutations(function(s){i.forEach(function(o){return s.remove(o)})})},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Tt()},e.prototype.sort=function(n){return zt(Fe(this,n))},e.prototype.sortBy=function(n,i){return zt(Fe(this,i,n))},e.prototype.map=function(n,i){var s=this;return this.withMutations(function(o){o.forEach(function(a,u){o.set(u,n.call(i,a,u,s))})})},e.prototype.__iterator=function(n,i){return new Np(this,n,i)},e.prototype.__iterate=function(n,i){var s=this,o=0;return this._root&&this._root.iterate(function(a){return o++,n(a[1],a[0],s)},i),o},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?es(this.size,this._root,n,this.__hash):this.size===0?Tt():(this.__ownerID=n,this.__altered=!1,this)},e}(mt);fe.isMap=wn;var q=fe.prototype;q[ua]=!0,q[hr]=q.remove,q.removeAll=q.deleteAll,q.setIn=Hi,q.removeIn=q.deleteIn=Gi,q.update=Yi,q.updateIn=Zi,q.merge=q.concat=Fa,q.mergeWith=Pa,q.mergeDeep=$a,q.mergeDeepWith=qa,q.mergeIn=Ji,q.mergeDeepIn=Qi,q.withMutations=mr,q.wasAltered=Xi,q.asImmutable=br,q["@@transducer/init"]=q.asMutable=wr,q["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},q["@@transducer/result"]=function(t){return t.asImmutable()};var Sr=function(e,r){this.ownerID=e,this.entries=r};Sr.prototype.get=function(e,r,n,i){for(var s=this.entries,o=0,a=s.length;o<a;o++)if(U(n,s[o][0]))return s[o][1];return i},Sr.prototype.update=function(e,r,n,i,s,o,a){for(var u=s===S,f=this.entries,c=0,h=f.length;c<h&&!U(i,f[c][0]);c++);var l=c<h;if(l?f[c][1]===s:u)return this;if(vt(a),(u||!l)&&vt(o),!(u&&f.length===1)){if(!l&&!u&&f.length>=Up)return jp(e,f,i,s);var p=e&&e===this.ownerID,_=p?f:It(f);return l?u?c===h-1?_.pop():_[c]=_.pop():_[c]=[i,s]:_.push([i,s]),p?(this.entries=_,this):new Sr(e,_)}};var Pe=function(e,r,n){this.ownerID=e,this.bitmap=r,this.nodes=n};Pe.prototype.get=function(e,r,n,i){r===void 0&&(r=at(n));var s=1<<((e===0?r:r>>>e)&tt),o=this.bitmap;return(o&s)===0?i:this.nodes[ka(o&s-1)].get(e+z,r,n,i)},Pe.prototype.update=function(e,r,n,i,s,o,a){n===void 0&&(n=at(i));var u=(r===0?n:n>>>r)&tt,f=1<<u,c=this.bitmap,h=(c&f)!==0;if(!h&&s===S)return this;var l=ka(c&f-1),p=this.nodes,_=h?p[l]:void 0,d=rs(_,e,r+z,n,i,s,o,a);if(d===_)return this;if(!h&&d&&p.length>=Wp)return Dp(e,p,c,u,d);if(h&&!d&&p.length===2&&Da(p[l^1]))return p[l^1];if(h&&d&&p.length===1&&Da(d))return d;var y=e&&e===this.ownerID,m=h?d?c:c^f:c|f,v=h?d?Ba(p,l,d,y):Bp(p,l,y):kp(p,l,d,y);return y?(this.bitmap=m,this.nodes=v,this):new Pe(e,m,v)};var Ar=function(e,r,n){this.ownerID=e,this.count=r,this.nodes=n};Ar.prototype.get=function(e,r,n,i){r===void 0&&(r=at(n));var s=(e===0?r:r>>>e)&tt,o=this.nodes[s];return o?o.get(e+z,r,n,i):i},Ar.prototype.update=function(e,r,n,i,s,o,a){n===void 0&&(n=at(i));var u=(r===0?n:n>>>r)&tt,f=s===S,c=this.nodes,h=c[u];if(f&&!h)return this;var l=rs(h,e,r+z,n,i,s,o,a);if(l===h)return this;var p=this.count;if(!h)p++;else if(!l&&(p--,p<Kp))return Lp(e,c,p,u);var _=e&&e===this.ownerID,d=Ba(c,u,l,_);return _?(this.count=p,this.nodes=d,this):new Ar(e,p,d)};var Ce=function(e,r,n){this.ownerID=e,this.keyHash=r,this.entries=n};Ce.prototype.get=function(e,r,n,i){for(var s=this.entries,o=0,a=s.length;o<a;o++)if(U(n,s[o][0]))return s[o][1];return i},Ce.prototype.update=function(e,r,n,i,s,o,a){n===void 0&&(n=at(i));var u=s===S;if(n!==this.keyHash)return u?this:(vt(a),vt(o),ns(this,e,r,n,[i,s]));for(var f=this.entries,c=0,h=f.length;c<h&&!U(i,f[c][0]);c++);var l=c<h;if(l?f[c][1]===s:u)return this;if(vt(a),(u||!l)&&vt(o),u&&h===2)return new Nt(e,this.keyHash,f[c^1]);var p=e&&e===this.ownerID,_=p?f:It(f);return l?u?c===h-1?_.pop():_[c]=_.pop():_[c]=[i,s]:_.push([i,s]),p?(this.entries=_,this):new Ce(e,this.keyHash,_)};var Nt=function(e,r,n){this.ownerID=e,this.keyHash=r,this.entry=n};Nt.prototype.get=function(e,r,n,i){return U(n,this.entry[0])?this.entry[1]:i},Nt.prototype.update=function(e,r,n,i,s,o,a){var u=s===S,f=U(i,this.entry[0]);if(f?s===this.entry[1]:u)return this;if(vt(a),u){vt(o);return}return f?e&&e===this.ownerID?(this.entry[1]=s,this):new Nt(e,this.keyHash,[i,s]):(vt(o),ns(this,e,r,at(i),[i,s]))},Sr.prototype.iterate=Ce.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},Pe.prototype.iterate=Ar.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var s=r[e?i-n:n];if(s&&s.iterate(t,e)===!1)return!1}},Nt.prototype.iterate=function(t,e){return t(this.entry)};var Np=function(t){function e(r,n,i){this._type=n,this._reverse=i,this._stack=r._root&&Na(r._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var n=this._type,i=this._stack;i;){var s=i.node,o=i.index++,a=void 0;if(s.entry){if(o===0)return ts(n,s.entry)}else if(s.entries){if(a=s.entries.length-1,o<=a)return ts(n,s.entries[this._reverse?a-o:o])}else if(a=s.nodes.length-1,o<=a){var u=s.nodes[this._reverse?a-o:o];if(u){if(u.entry)return ts(n,u.entry);i=this._stack=Na(u,i)}continue}i=this._stack=this._stack.__prev}return G()},e}(A);function ts(t,e){return $(t,e[0],e[1])}function Na(t,e){return{node:t,index:0,__prev:e}}function es(t,e,r,n){var i=Object.create(q);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var ja;function Tt(){return ja||(ja=es(0))}function La(t,e,r){var n,i;if(t._root){var s=Si(),o=Si();if(n=rs(t._root,t.__ownerID,0,void 0,e,r,s,o),!o.value)return t;i=t.size+(s.value?r===S?-1:1:0)}else{if(r===S)return t;i=1,n=new Sr(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?es(i,n):Tt()}function rs(t,e,r,n,i,s,o,a){return t?t.update(e,r,n,i,s,o,a):s===S?t:(vt(a),vt(o),new Nt(e,n,[i,s]))}function Da(t){return t.constructor===Nt||t.constructor===Ce}function ns(t,e,r,n,i){if(t.keyHash===n)return new Ce(e,n,[t.entry,i]);var s=(r===0?t.keyHash:t.keyHash>>>r)&tt,o=(r===0?n:n>>>r)&tt,a,u=s===o?[ns(t,e,r+z,n,i)]:(a=new Nt(e,n,i),s<o?[t,a]:[a,t]);return new Pe(e,1<<s|1<<o,u)}function jp(t,e,r,n){t||(t=new Ai);for(var i=new Nt(t,at(r),[r,n]),s=0;s<e.length;s++){var o=e[s];i=i.update(t,0,void 0,o[0],o[1])}return i}function Lp(t,e,r,n){for(var i=0,s=0,o=new Array(r),a=0,u=1,f=e.length;a<f;a++,u<<=1){var c=e[a];c!==void 0&&a!==n&&(i|=u,o[s++]=c)}return new Pe(t,i,o)}function Dp(t,e,r,n,i){for(var s=0,o=new Array(ht),a=0;r!==0;a++,r>>>=1)o[a]=r&1?e[s++]:void 0;return o[n]=i,new Ar(t,s+1,o)}function ka(t){return t-=t>>1&1431655765,t=(t&858993459)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,t&127}function Ba(t,e,r,n){var i=n?t:It(t);return i[e]=r,i}function kp(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var s=new Array(i),o=0,a=0;a<i;a++)a===e?(s[a]=r,o=-1):s[a]=t[a+o];return s}function Bp(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),s=0,o=0;o<n;o++)o===e&&(s=1),i[o]=t[o+s];return i}var Up=ht/4,Wp=ht/2,Kp=ht/4,Ua="@@__IMMUTABLE_LIST__@@";function is(t){return!!(t&&t[Ua])}var Or=function(t){function e(r){var n=Mn();if(r==null)return n;if(is(r))return r;var i=t(r),s=i.size;return s===0?n:(_t(s),s>0&&s<ht?Mr(0,s,z,null,new Jt(i.toArray())):n.withMutations(function(o){o.setSize(s),i.forEach(function(a,u){return o.set(u,a)})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(n,i){if(n=Ht(this,n),n>=0&&n<this.size){n+=this._origin;var s=Ka(this,n);return s&&s.array[n&tt]}return i},e.prototype.set=function(n,i){return Hp(this,n,i)},e.prototype.remove=function(n){return this.has(n)?n===0?this.shift():n===this.size-1?this.pop():this.splice(n,1):this},e.prototype.insert=function(n,i){return this.splice(n,0,i)},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=z,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):Mn()},e.prototype.push=function(){var n=arguments,i=this.size;return this.withMutations(function(s){Qt(s,0,i+n.length);for(var o=0;o<n.length;o++)s.set(i+o,n[o])})},e.prototype.pop=function(){return Qt(this,0,-1)},e.prototype.unshift=function(){var n=arguments;return this.withMutations(function(i){Qt(i,-n.length);for(var s=0;s<n.length;s++)i.set(s,n[s])})},e.prototype.shift=function(){return Qt(this,1)},e.prototype.shuffle=function(n){return n===void 0&&(n=Math.random),this.withMutations(function(i){for(var s=i.size,o,a;s;)o=Math.floor(n()*s--),a=i.get(o),i.set(o,i.get(s)),i.set(s,a)})},e.prototype.concat=function(){for(var n=arguments,i=[],s=0;s<arguments.length;s++){var o=n[s],a=t(typeof o!="string"&&Ei(o)?o:[o]);a.size!==0&&i.push(a)}return i.length===0?this:this.size===0&&!this.__ownerID&&i.length===1?this.constructor(i[0]):this.withMutations(function(u){i.forEach(function(f){return f.forEach(function(c){return u.push(c)})})})},e.prototype.setSize=function(n){return Qt(this,0,n)},e.prototype.map=function(n,i){var s=this;return this.withMutations(function(o){for(var a=0;a<s.size;a++)o.set(a,n.call(i,o.get(a),a,s))})},e.prototype.slice=function(n,i){var s=this.size;return lr(n,i,s)?this:Qt(this,Me(n,s),pr(i,s))},e.prototype.__iterator=function(n,i){var s=i?this.size:0,o=Wa(this,i);return new A(function(){var a=o();return a===Er?G():$(n,i?--s:s++,a)})},e.prototype.__iterate=function(n,i){for(var s=i?this.size:0,o=Wa(this,i),a;(a=o())!==Er&&n(a,i?--s:s++,this)!==!1;);return s},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?Mr(this._origin,this._capacity,this._level,this._root,this._tail,n,this.__hash):this.size===0?Mn():(this.__ownerID=n,this.__altered=!1,this)},e}(oe);Or.isList=is;var L=Or.prototype;L[Ua]=!0,L[hr]=L.remove,L.merge=L.concat,L.setIn=Hi,L.deleteIn=L.removeIn=Gi,L.update=Yi,L.updateIn=Zi,L.mergeIn=Ji,L.mergeDeepIn=Qi,L.withMutations=mr,L.wasAltered=Xi,L.asImmutable=br,L["@@transducer/init"]=L.asMutable=wr,L["@@transducer/step"]=function(t,e){return t.push(e)},L["@@transducer/result"]=function(t){return t.asImmutable()};var Jt=function(e,r){this.array=e,this.ownerID=r};Jt.prototype.removeBefore=function(e,r,n){if((n&(1<<r+z)-1)===0||this.array.length===0)return this;var i=n>>>r&tt;if(i>=this.array.length)return new Jt([],e);var s=i===0,o;if(r>0){var a=this.array[i];if(o=a&&a.removeBefore(e,r-z,n),o===a&&s)return this}if(s&&!o)return this;var u=$e(this,e);if(!s)for(var f=0;f<i;f++)u.array[f]=void 0;return o&&(u.array[i]=o),u},Jt.prototype.removeAfter=function(e,r,n){if(n===(r?1<<r+z:ht)||this.array.length===0)return this;var i=n-1>>>r&tt;if(i>=this.array.length)return this;var s;if(r>0){var o=this.array[i];if(s=o&&o.removeAfter(e,r-z,n),s===o&&i===this.array.length-1)return this}var a=$e(this,e);return a.array.splice(i+1),s&&(a.array[i]=s),a};var Er={};function Wa(t,e){var r=t._origin,n=t._capacity,i=xr(n),s=t._tail;return o(t._root,t._level,0);function o(f,c,h){return c===0?a(f,h):u(f,c,h)}function a(f,c){var h=c===i?s&&s.array:f&&f.array,l=c>r?0:r-c,p=n-c;return p>ht&&(p=ht),function(){if(l===p)return Er;var _=e?--p:l++;return h&&h[_]}}function u(f,c,h){var l,p=f&&f.array,_=h>r?0:r-h>>c,d=(n-h>>c)+1;return d>ht&&(d=ht),function(){for(;;){if(l){var y=l();if(y!==Er)return y;l=null}if(_===d)return Er;var m=e?--d:_++;l=o(p&&p[m],c-z,h+(m<<c))}}}}function Mr(t,e,r,n,i,s,o){var a=Object.create(L);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=s,a.__hash=o,a.__altered=!1,a}function Mn(){return Mr(0,0,z)}function Hp(t,e,r){if(e=Ht(t,e),e!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(o){e<0?Qt(o,e).set(0,r):Qt(o,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,s=Si();return e>=xr(t._capacity)?n=ss(n,t.__ownerID,0,e,r,s):i=ss(i,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Mr(t._origin,t._capacity,t._level,i,n):t}function ss(t,e,r,n,i,s){var o=n>>>r&tt,a=t&&o<t.array.length;if(!a&&i===void 0)return t;var u;if(r>0){var f=t&&t.array[o],c=ss(f,e,r-z,n,i,s);return c===f?t:(u=$e(t,e),u.array[o]=c,u)}return a&&t.array[o]===i?t:(s&&vt(s),u=$e(t,e),i===void 0&&o===u.array.length-1?u.array.pop():u.array[o]=i,u)}function $e(t,e){return e&&t&&e===t.ownerID?t:new Jt(t?t.array.slice():[],e)}function Ka(t,e){if(e>=xr(t._capacity))return t._tail;if(e<1<<t._level+z){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&tt],n-=z;return r}}function Qt(t,e,r){e!==void 0&&(e|=0),r!==void 0&&(r|=0);var n=t.__ownerID||new Ai,i=t._origin,s=t._capacity,o=i+e,a=r===void 0?s:r<0?s+r:i+r;if(o===i&&a===s)return t;if(o>=a)return t.clear();for(var u=t._level,f=t._root,c=0;o+c<0;)f=new Jt(f&&f.array.length?[void 0,f]:[],n),u+=z,c+=1<<u;c&&(o+=c,i+=c,a+=c,s+=c);for(var h=xr(s),l=xr(a);l>=1<<u+z;)f=new Jt(f&&f.array.length?[f]:[],n),u+=z;var p=t._tail,_=l<h?Ka(t,a-1):l>h?new Jt([],n):p;if(p&&l>h&&o<s&&p.array.length){f=$e(f,n);for(var d=f,y=u;y>z;y-=z){var m=h>>>y&tt;d=d.array[m]=$e(d.array[m],n)}d.array[h>>>z&tt]=p}if(a<s&&(_=_&&_.removeAfter(n,0,a)),o>=l)o-=l,a-=l,u=z,f=null,_=_&&_.removeBefore(n,0,o);else if(o>i||l<h){for(c=0;f;){var v=o>>>u&tt;if(v!==l>>>u&tt)break;v&&(c+=(1<<u)*v),u-=z,f=f.array[v]}f&&o>i&&(f=f.removeBefore(n,u,o-c)),f&&l<h&&(f=f.removeAfter(n,u,l-c)),c&&(o-=c,a-=c)}return t.__ownerID?(t.size=a-o,t._origin=o,t._capacity=a,t._level=u,t._root=f,t._tail=_,t.__hash=void 0,t.__altered=!0,t):Mr(o,a,u,f,_)}function xr(t){return t<ht?0:t-1>>>z<<z}var zt=function(t){function e(r){return r==null?Ir():Fi(r)?r:Ir().withMutations(function(n){var i=mt(r);_t(i.size),i.forEach(function(s,o){return n.set(o,s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(n,i){var s=this._map.get(n);return s!==void 0?this._list.get(s)[1]:i},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Ir()},e.prototype.set=function(n,i){return Ga(this,n,i)},e.prototype.remove=function(n){return Ga(this,n,S)},e.prototype.__iterate=function(n,i){var s=this;return this._list.__iterate(function(o){return o&&n(o[1],o[0],s)},i)},e.prototype.__iterator=function(n,i){return this._list.fromEntrySeq().__iterator(n,i)},e.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n),s=this._list.__ensureOwner(n);return n?os(i,s,n,this.__hash):this.size===0?Ir():(this.__ownerID=n,this.__altered=!1,this._map=i,this._list=s,this)},e}(fe);zt.isOrderedMap=Fi,zt.prototype[Vt]=!0,zt.prototype[hr]=zt.prototype.remove;function os(t,e,r,n){var i=Object.create(zt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Ha;function Ir(){return Ha||(Ha=os(Tt(),Mn()))}function Ga(t,e,r){var n=t._map,i=t._list,s=n.get(e),o=s!==void 0,a,u;if(r===S){if(!o)return t;i.size>=ht&&i.size>=n.size*2?(u=i.filter(function(f,c){return f!==void 0&&s!==c}),a=u.toKeyedSeq().map(function(f){return f[0]}).flip().toMap(),t.__ownerID&&(a.__ownerID=u.__ownerID=t.__ownerID)):(a=n.remove(e),u=s===i.size-1?i.pop():i.set(s,void 0))}else if(o){if(r===i.get(s)[1])return t;a=n,u=i.set(s,[e,r])}else a=n.set(e,i.size),u=i.set(i.size,[e,r]);return t.__ownerID?(t.size=a.size,t._map=a,t._list=u,t.__hash=void 0,t.__altered=!0,t):os(a,u)}var Va="@@__IMMUTABLE_STACK__@@";function xn(t){return!!(t&&t[Va])}var In=function(t){function e(r){return r==null?Tn():xn(r)?r:Tn().pushAll(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(n,i){var s=this._head;for(n=Ht(this,n);s&&n--;)s=s.next;return s?s.value:i},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var i=this.size+arguments.length,s=this._head,o=arguments.length-1;o>=0;o--)s={value:n[o],next:s};return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):Tr(i,s)},e.prototype.pushAll=function(n){if(n=t(n),n.size===0)return this;if(this.size===0&&xn(n))return n;_t(n.size);var i=this.size,s=this._head;return n.__iterate(function(o){i++,s={value:o,next:s}},!0),this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):Tr(i,s)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},e.prototype.slice=function(n,i){if(lr(n,i,this.size))return this;var s=Me(n,this.size),o=pr(i,this.size);if(o!==this.size)return t.prototype.slice.call(this,n,i);for(var a=this.size-s,u=this._head;s--;)u=u.next;return this.__ownerID?(this.size=a,this._head=u,this.__hash=void 0,this.__altered=!0,this):Tr(a,u)},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?Tr(this.size,this._head,n,this.__hash):this.size===0?Tn():(this.__ownerID=n,this.__altered=!1,this)},e.prototype.__iterate=function(n,i){var s=this;if(i)return new Re(this.toArray()).__iterate(function(u,f){return n(u,f,s)},i);for(var o=0,a=this._head;a&&n(a.value,o++,this)!==!1;)a=a.next;return o},e.prototype.__iterator=function(n,i){if(i)return new Re(this.toArray()).__iterator(n,i);var s=0,o=this._head;return new A(function(){if(o){var a=o.value;return o=o.next,$(n,s++,a)}return G()})},e}(oe);In.isStack=xn;var et=In.prototype;et[Va]=!0,et.shift=et.pop,et.unshift=et.push,et.unshiftAll=et.pushAll,et.withMutations=mr,et.wasAltered=Xi,et.asImmutable=br,et["@@transducer/init"]=et.asMutable=wr,et["@@transducer/step"]=function(t,e){return t.unshift(e)},et["@@transducer/result"]=function(t){return t.asImmutable()};function Tr(t,e,r,n){var i=Object.create(et);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Ya;function Tn(){return Ya||(Ya=Tr(0))}var Za="@@__IMMUTABLE_SET__@@";function zn(t){return!!(t&&t[Za])}function as(t){return zn(t)&&Et(t)}function us(t,e){if(t===e)return!0;if(!st(e)||t.size!==void 0&&e.size!==void 0&&t.size!==e.size||t.__hash!==void 0&&e.__hash!==void 0&&t.__hash!==e.__hash||P(t)!==P(e)||ot(t)!==ot(e)||Et(t)!==Et(e))return!1;if(t.size===0&&e.size===0)return!0;var r=!yn(t);if(Et(t)){var n=t.entries();return e.every(function(u,f){var c=n.next().value;return c&&U(c[1],u)&&(r||U(c[0],f))})&&n.next().done}var i=!1;if(t.size===void 0)if(e.size===void 0)typeof t.cacheResult=="function"&&t.cacheResult();else{i=!0;var s=t;t=e,e=s}var o=!0,a=e.__iterate(function(u,f){if(r?!t.has(u):i?!U(u,t.get(f,S)):!U(t.get(f,S),u))return o=!1,!1});return o&&t.size===a}function ce(t,e){var r=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Rn(t){if(!t||typeof t!="object")return t;if(!st(t)){if(!Zt(t))return t;t=V(t)}if(P(t)){var e={};return t.__iterate(function(n,i){e[i]=Rn(n)}),e}var r=[];return t.__iterate(function(n){r.push(Rn(n))}),r}var zr=function(t){function e(r){return r==null?Rr():zn(r)&&!Et(r)?r:Rr().withMutations(function(n){var i=t(r);_t(i.size),i.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(mt(n).keySeq())},e.intersect=function(n){return n=B(n).toArray(),n.length?K.intersect.apply(e(n.pop()),n):Rr()},e.union=function(n){return n=B(n).toArray(),n.length?K.union.apply(e(n.pop()),n):Rr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(n){return this._map.has(n)},e.prototype.add=function(n){return Fn(this,this._map.set(n,n))},e.prototype.remove=function(n){return Fn(this,this._map.remove(n))},e.prototype.clear=function(){return Fn(this,this._map.clear())},e.prototype.map=function(n,i){var s=this,o=!1,a=Fn(this,this._map.mapEntries(function(u){var f=u[1],c=n.call(i,f,f,s);return c!==f&&(o=!0),[c,c]},i));return o?a:this},e.prototype.union=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];return n=n.filter(function(s){return s.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(s){for(var o=0;o<n.length;o++)typeof n[o]=="string"?s.add(n[o]):t(n[o]).forEach(function(a){return s.add(a)})})},e.prototype.intersect=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(o){return t(o)});var s=[];return this.forEach(function(o){n.every(function(a){return a.includes(o)})||s.push(o)}),this.withMutations(function(o){s.forEach(function(a){o.remove(a)})})},e.prototype.subtract=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(o){return t(o)});var s=[];return this.forEach(function(o){n.some(function(a){return a.includes(o)})&&s.push(o)}),this.withMutations(function(o){s.forEach(function(a){o.remove(a)})})},e.prototype.sort=function(n){return je(Fe(this,n))},e.prototype.sortBy=function(n,i){return je(Fe(this,i,n))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(n,i){var s=this;return this._map.__iterate(function(o){return n(o,o,s)},i)},e.prototype.__iterator=function(n,i){return this._map.__iterator(n,i)},e.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n);return n?this.__make(i,n):this.size===0?this.__empty():(this.__ownerID=n,this._map=i,this)},e}(xe);zr.isSet=zn;var K=zr.prototype;K[Za]=!0,K[hr]=K.remove,K.merge=K.concat=K.union,K.withMutations=mr,K.asImmutable=br,K["@@transducer/init"]=K.asMutable=wr,K["@@transducer/step"]=function(t,e){return t.add(e)},K["@@transducer/result"]=function(t){return t.asImmutable()},K.__empty=Rr,K.__make=Ja;function Fn(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:e.size===0?t.__empty():t.__make(e)}function Ja(t,e){var r=Object.create(K);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}var Qa;function Rr(){return Qa||(Qa=Ja(Tt()))}var Xa=function(t){function e(r,n,i){if(i===void 0&&(i=1),!(this instanceof e))return new e(r,n,i);if(dr(i!==0,"Cannot step a Range by 0"),dr(r!==void 0,"You must define a start value when using Range"),dr(n!==void 0,"You must define an end value when using Range"),i=Math.abs(i),n<r&&(i=-i),this._start=r,this._end=n,this._step=i,this.size=Math.max(0,Math.ceil((n-r)/i-1)+1),this.size===0){if(fs)return fs;fs=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step!==1?" by "+this._step:"")+" ]"},e.prototype.get=function(n,i){return this.has(n)?this._start+Ht(this,n)*this._step:i},e.prototype.includes=function(n){var i=(n-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},e.prototype.slice=function(n,i){return lr(n,i,this.size)?this:(n=Me(n,this.size),i=pr(i,this.size),i<=n?new e(0,0):new e(this.get(n,this._end),this.get(i,this._end),this._step))},e.prototype.indexOf=function(n){var i=n-this._start;if(i%this._step===0){var s=i/this._step;if(s>=0&&s<this.size)return s}return-1},e.prototype.lastIndexOf=function(n){return this.indexOf(n)},e.prototype.__iterate=function(n,i){for(var s=this.size,o=this._step,a=i?this._start+(s-1)*o:this._start,u=0;u!==s&&n(a,i?s-++u:u++,this)!==!1;)a+=i?-o:o;return u},e.prototype.__iterator=function(n,i){var s=this.size,o=this._step,a=i?this._start+(s-1)*o:this._start,u=0;return new A(function(){if(u===s)return G();var f=a;return a+=i?-o:o,$(n,i?s-++u:u++,f)})},e.prototype.equals=function(n){return n instanceof e?this._start===n._start&&this._end===n._end&&this._step===n._step:us(this,n)},e}(bt),fs;function cs(t,e,r){for(var n=Ea(e),i=0;i!==n.length;)if(t=Ki(t,n[i++],S),t===S)return r;return t}function tu(t,e){return cs(this,t,e)}function eu(t,e){return cs(t,e,S)!==S}function Gp(t){return eu(this,t)}function ru(){_t(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t}B.Iterator=A,ce(B,{toArray:function(){_t(this.size);var e=new Array(this.size||0),r=P(this),n=0;return this.__iterate(function(i,s){e[n++]=r?[s,i]:i}),e},toIndexedSeq:function(){return new _a(this)},toJS:function(){return Rn(this)},toKeyedSeq:function(){return new Sn(this,!0)},toMap:function(){return fe(this.toKeyedSeq())},toObject:ru,toOrderedMap:function(){return zt(this.toKeyedSeq())},toOrderedSet:function(){return je(P(this)?this.valueSeq():this)},toSet:function(){return zr(P(this)?this.valueSeq():this)},toSetSeq:function(){return new da(this)},toSeq:function(){return ot(this)?this.toIndexedSeq():P(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return In(P(this)?this.valueSeq():this)},toList:function(){return Or(P(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,r){return this.size===0?e+r:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return R(this,xp(this,e))},includes:function(e){return this.some(function(r){return U(r,e)})},entries:function(){return this.__iterator(pt)},every:function(e,r){_t(this.size);var n=!0;return this.__iterate(function(i,s,o){if(!e.call(r,i,s,o))return n=!1,!1}),n},filter:function(e,r){return R(this,ma(this,e,r,!0))},partition:function(e,r){return Op(this,e,r)},find:function(e,r,n){var i=this.findEntry(e,r);return i?i[1]:n},forEach:function(e,r){return _t(this.size),this.__iterate(r?e.bind(r):e)},join:function(e){_t(this.size),e=e!==void 0?""+e:",";var r="",n=!0;return this.__iterate(function(i){n?n=!1:r+=e,r+=i!=null?i.toString():""}),r},keys:function(){return this.__iterator(Ie)},map:function(e,r){return R(this,va(this,e,r))},reduce:function(e,r,n){return nu(this,e,r,n,arguments.length<2,!1)},reduceRight:function(e,r,n){return nu(this,e,r,n,arguments.length<2,!0)},reverse:function(){return R(this,Di(this,!0))},slice:function(e,r){return R(this,ki(this,e,r,!0))},some:function(e,r){_t(this.size);var n=!1;return this.__iterate(function(i,s,o){if(e.call(r,i,s,o))return n=!0,!1}),n},sort:function(e){return R(this,Fe(this,e))},values:function(){return this.__iterator(lt)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(e,r){return Ee(e?this.toSeq().filter(e,r):this)},countBy:function(e,r){return Sp(this,e,r)},equals:function(e){return us(this,e)},entrySeq:function(){var e=this;if(e._cache)return new Re(e._cache);var r=e.toSeq().map(Yp).toIndexedSeq();return r.fromEntrySeq=function(){return e.toSeq()},r},filterNot:function(e,r){return this.filter(hs(e),r)},findEntry:function(e,r,n){var i=n;return this.__iterate(function(s,o,a){if(e.call(r,s,o,a))return i=[o,s],!1}),i},findKey:function(e,r){var n=this.findEntry(e,r);return n&&n[0]},findLast:function(e,r,n){return this.toKeyedSeq().reverse().find(e,r,n)},findLastEntry:function(e,r,n){return this.toKeyedSeq().reverse().findEntry(e,r,n)},findLastKey:function(e,r){return this.toKeyedSeq().reverse().findKey(e,r)},first:function(e){return this.find(Qo,null,e)},flatMap:function(e,r){return R(this,Ip(this,e,r))},flatten:function(e){return R(this,ba(this,e,!0))},fromEntrySeq:function(){return new ya(this)},get:function(e,r){return this.find(function(n,i){return U(i,e)},void 0,r)},getIn:tu,groupBy:function(e,r){return Ap(this,e,r)},has:function(e){return this.get(e,S)!==S},hasIn:Gp,isSubset:function(e){return e=typeof e.includes=="function"?e:B(e),this.every(function(r){return e.includes(r)})},isSuperset:function(e){return e=typeof e.isSubset=="function"?e:B(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(r){return U(r,e)})},keySeq:function(){return this.toSeq().map(Vp).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return An(this,e)},maxBy:function(e,r){return An(this,r,e)},min:function(e){return An(this,e?iu(e):ou)},minBy:function(e,r){return An(this,r?iu(r):ou,e)},rest:function(){return this.slice(1)},skip:function(e){return e===0?this:this.slice(Math.max(0,e))},skipLast:function(e){return e===0?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,r){return R(this,wa(this,e,r,!0))},skipUntil:function(e,r){return this.skipWhile(hs(e),r)},sortBy:function(e,r){return R(this,Fe(this,r,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,r){return R(this,Ep(this,e,r))},takeUntil:function(e,r){return this.takeWhile(hs(e),r)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Zp(this))}});var Y=B.prototype;Y[ea]=!0,Y[vn]=Y.values,Y.toJSON=Y.toArray,Y.__toStringMapper=yr,Y.inspect=Y.toSource=function(){return this.toString()},Y.chain=Y.flatMap,Y.contains=Y.includes,ce(mt,{flip:function(){return R(this,ga(this))},mapEntries:function(e,r){var n=this,i=0;return R(this,this.toSeq().map(function(s,o){return e.call(r,[o,s],i++,n)}).fromEntrySeq())},mapKeys:function(e,r){var n=this;return R(this,this.toSeq().flip().map(function(i,s){return e.call(r,i,s,n)}).flip())}});var Fr=mt.prototype;Fr[_n]=!0,Fr[vn]=Y.entries,Fr.toJSON=ru,Fr.__toStringMapper=function(t,e){return yr(e)+": "+yr(t)},ce(oe,{toKeyedSeq:function(){return new Sn(this,!1)},filter:function(e,r){return R(this,ma(this,e,r,!1))},findIndex:function(e,r){var n=this.findEntry(e,r);return n?n[0]:-1},indexOf:function(e){var r=this.keyOf(e);return r===void 0?-1:r},lastIndexOf:function(e){var r=this.lastKeyOf(e);return r===void 0?-1:r},reverse:function(){return R(this,Di(this,!1))},slice:function(e,r){return R(this,ki(this,e,r,!1))},splice:function(e,r){var n=arguments.length;if(r=Math.max(r||0,0),n===0||n===2&&!r)return this;e=Me(e,e<0?this.count():this.size);var i=this.slice(0,e);return R(this,n===1?i:i.concat(It(arguments,2),this.slice(e+r)))},findLastIndex:function(e,r){var n=this.findLastEntry(e,r);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return R(this,ba(this,e,!1))},get:function(e,r){return e=Ht(this,e),e<0||this.size===1/0||this.size!==void 0&&e>this.size?r:this.find(function(n,i){return i===e},void 0,r)},has:function(e){return e=Ht(this,e),e>=0&&(this.size!==void 0?this.size===1/0||e<this.size:this.indexOf(e)!==-1)},interpose:function(e){return R(this,Tp(this,e))},interleave:function(){var e=[this].concat(It(arguments)),r=On(this.toSeq(),bt.of,e),n=r.flatten(!0);return r.size&&(n.size=r.size*e.length),R(this,n)},keySeq:function(){return Xa(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,r){return R(this,wa(this,e,r,!1))},zip:function(){var e=[this].concat(It(arguments));return R(this,On(this,su,e))},zipAll:function(){var e=[this].concat(It(arguments));return R(this,On(this,su,e,!0))},zipWith:function(e){var r=It(arguments);return r[0]=this,R(this,On(this,e,r))}});var qe=oe.prototype;qe[dn]=!0,qe[Vt]=!0,ce(xe,{get:function(e,r){return this.has(e)?e:r},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var Ne=xe.prototype;Ne.has=Y.includes,Ne.contains=Ne.includes,Ne.keys=Ne.values,ce(Yt,Fr),ce(bt,qe),ce(ze,Ne);function nu(t,e,r,n,i,s){return _t(t.size),t.__iterate(function(o,a,u){i?(i=!1,r=o):r=e.call(n,r,o,a,u)},s),r}function Vp(t,e){return e}function Yp(t,e){return[e,t]}function hs(t){return function(){return!t.apply(this,arguments)}}function iu(t){return function(){return-t.apply(this,arguments)}}function su(){return It(arguments)}function ou(t,e){return t<e?1:t>e?-1:0}function Zp(t){if(t.size===1/0)return 0;var e=Et(t),r=P(t),n=e?1:0;return t.__iterate(r?e?function(i,s){n=31*n+au(at(i),at(s))|0}:function(i,s){n=n+au(at(i),at(s))|0}:e?function(i){n=31*n+at(i)|0}:function(i){n=n+at(i)|0}),Jp(t.size,n)}function Jp(t,e){return e=_r(e,3432918353),e=_r(e<<15|e>>>-15,461845907),e=_r(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=_r(e^e>>>16,2246822507),e=_r(e^e>>>13,3266489909),e=bn(e^e>>>16),e}function au(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var je=function(t){function e(r){return r==null?ls():as(r)?r:ls().withMutations(function(n){var i=xe(r);_t(i.size),i.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(mt(n).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(zr);je.isOrderedSet=as;var he=je.prototype;he[Vt]=!0,he.zip=qe.zip,he.zipWith=qe.zipWith,he.zipAll=qe.zipAll,he.__empty=ls,he.__make=uu;function uu(t,e){var r=Object.create(he);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}var fu;function ls(){return fu||(fu=uu(Ir()))}var Qp={LeftThenRight:-1,RightThenLeft:1};function Xp(t){if(Gt(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(wt(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(t===null||typeof t!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var D=function(e,r){var n;Xp(e);var i=function(a){var u=this;if(a instanceof i)return a;if(!(this instanceof i))return new i(a);if(!n){n=!0;var f=Object.keys(e),c=s._indices={};s._name=r,s._keys=f,s._defaultValues=e;for(var h=0;h<f.length;h++){var l=f[h];c[l]=h,s[l]?typeof console=="object"&&console.warn&&console.warn("Cannot define "+_s(this)+' with property "'+l+'" since that property name is part of the Record API.'):t_(s,l)}}return this.__ownerID=void 0,this._values=Or().withMutations(function(p){p.setSize(u._keys.length),mt(a).forEach(function(_,d){p.set(u._indices[d],_===u._defaultValues[d]?void 0:_)})}),this},s=i.prototype=Object.create(C);return s.constructor=i,r&&(i.displayName=r),i};D.prototype.toString=function(){for(var e=_s(this)+" { ",r=this._keys,n,i=0,s=r.length;i!==s;i++)n=r[i],e+=(i?", ":"")+n+": "+yr(this.get(n));return e+" }"},D.prototype.equals=function(e){return this===e||Gt(e)&&Le(this).equals(Le(e))},D.prototype.hashCode=function(){return Le(this).hashCode()},D.prototype.has=function(e){return this._indices.hasOwnProperty(e)},D.prototype.get=function(e,r){if(!this.has(e))return r;var n=this._indices[e],i=this._values.get(n);return i===void 0?this._defaultValues[e]:i},D.prototype.set=function(e,r){if(this.has(e)){var n=this._values.set(this._indices[e],r===this._defaultValues[e]?void 0:r);if(n!==this._values&&!this.__ownerID)return ps(this,n)}return this},D.prototype.remove=function(e){return this.set(e)},D.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:ps(this,e)},D.prototype.wasAltered=function(){return this._values.wasAltered()},D.prototype.toSeq=function(){return Le(this)},D.prototype.toJS=function(){return Rn(this)},D.prototype.entries=function(){return this.__iterator(pt)},D.prototype.__iterator=function(e,r){return Le(this).__iterator(e,r)},D.prototype.__iterate=function(e,r){return Le(this).__iterate(e,r)},D.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var r=this._values.__ensureOwner(e);return e?ps(this,r,e):(this.__ownerID=e,this._values=r,this)},D.isRecord=Gt,D.getDescriptiveName=_s;var C=D.prototype;C[na]=!0,C[hr]=C.remove,C.deleteIn=C.removeIn=Gi,C.getIn=tu,C.hasIn=Y.hasIn,C.merge=Fa,C.mergeWith=Pa,C.mergeIn=Ji,C.mergeDeep=$a,C.mergeDeepWith=qa,C.mergeDeepIn=Qi,C.setIn=Hi,C.update=Yi,C.updateIn=Zi,C.withMutations=mr,C.asMutable=wr,C.asImmutable=br,C[vn]=C.entries,C.toJSON=C.toObject=Y.toObject,C.inspect=C.toSource=function(){return this.toString()};function ps(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function _s(t){return t.constructor.displayName||t.constructor.name||"Record"}function Le(t){return zi(t._keys.map(function(e){return[e,t.get(e)]}))}function t_(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(r){dr(this.__ownerID,"Cannot set on an immutable record."),this.set(e,r)}})}catch{}}var e_=function(t){function e(r,n){if(!(this instanceof e))return new e(r,n);if(this._value=r,this.size=n===void 0?1/0:Math.max(0,n),this.size===0){if(ds)return ds;ds=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(n,i){return this.has(n)?this._value:i},e.prototype.includes=function(n){return U(this._value,n)},e.prototype.slice=function(n,i){var s=this.size;return lr(n,i,s)?this:new e(this._value,pr(i,s)-Me(n,s))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(n){return U(this._value,n)?0:-1},e.prototype.lastIndexOf=function(n){return U(this._value,n)?this.size:-1},e.prototype.__iterate=function(n,i){for(var s=this.size,o=0;o!==s&&n(this._value,i?s-++o:o++,this)!==!1;);return o},e.prototype.__iterator=function(n,i){var s=this,o=this.size,a=0;return new A(function(){return a===o?G():$(n,i?o-++a:a++,s._value)})},e.prototype.equals=function(n){return n instanceof e?U(this._value,n._value):us(this,n)},e}(bt),ds;function r_(t,e){return cu([],e||n_,t,"",e&&e.length>2?[]:void 0,{"":t})}function cu(t,e,r,n,i,s){if(typeof r!="string"&&!wt(r)&&(xi(r)||Ei(r)||Wi(r))){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),i&&n!==""&&i.push(n);var o=e.call(s,n,V(r).map(function(a,u){return cu(t,e,a,u,i,r)}),i&&i.slice());return t.pop(),i&&i.pop(),o}return r}function n_(t,e){return ot(e)?e.toList():P(e)?e.toMap():e.toSet()}var i_="5.1.3",s_=B;const o_=Object.freeze(Object.defineProperty({__proto__:null,Collection:B,Iterable:s_,List:Or,Map:fe,OrderedMap:zt,OrderedSet:je,PairSorting:Qp,Range:Xa,Record:D,Repeat:e_,Seq:V,Set:zr,Stack:In,fromJS:r_,get:Ki,getIn:cs,has:Ma,hasIn:eu,hash:at,is:U,isAssociative:yn,isCollection:st,isImmutable:wt,isIndexed:ot,isKeyed:P,isList:is,isMap:wn,isOrdered:Et,isOrderedMap:Fi,isOrderedSet:as,isPlainObject:Wi,isRecord:Gt,isSeq:gn,isSet:zn,isStack:xn,isValueObject:Pi,merge:Rp,mergeDeep:Pp,mergeDeepWith:Cp,mergeWith:Fp,remove:xa,removeIn:Ra,set:Ia,setIn:za,update:Vi,updateIn:ue,version:i_},Symbol.toStringTag,{value:"Module"}));/**
|
|
25
|
+
* @vue/reactivity v3.5.16
|
|
26
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
27
|
+
* @license MIT
|
|
28
|
+
**//*! #__NO_SIDE_EFFECTS__ */function a_(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const u_=Object.freeze({}),f_=()=>{},Pn=Object.assign,c_=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},h_=Object.prototype.hasOwnProperty,Cn=(t,e)=>h_.call(t,e),jt=Array.isArray,De=t=>$n(t)==="[object Map]",l_=t=>$n(t)==="[object Set]",Pr=t=>typeof t=="function",p_=t=>typeof t=="string",Cr=t=>typeof t=="symbol",ke=t=>t!==null&&typeof t=="object",__=Object.prototype.toString,$n=t=>__.call(t),hu=t=>$n(t).slice(8,-1),d_=t=>$n(t)==="[object Object]",ys=t=>p_(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,y_=(t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),Xt=(t,e)=>!Object.is(t,e),g_=(t,e,r,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})};function dt(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let Z;class lu{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Z,!e&&Z&&(this.index=(Z.scopes||(Z.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].pause();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].resume();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].resume()}}run(e){if(this._active){const r=Z;try{return Z=this,e()}finally{Z=r}}else dt("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=Z,Z=this)}off(){this._on>0&&--this._on===0&&(Z=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function v_(t){return new lu(t)}function pu(){return Z}function m_(t,e=!1){Z?Z.cleanups.push(t):e||dt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let E;const w_={ACTIVE:1,1:"ACTIVE",RUNNING:2,2:"RUNNING",TRACKING:4,4:"TRACKING",NOTIFIED:8,8:"NOTIFIED",DIRTY:16,16:"DIRTY",ALLOW_RECURSE:32,32:"ALLOW_RECURSE",PAUSED:64,64:"PAUSED",EVALUATED:128,128:"EVALUATED"},gs=new WeakSet;class $r{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Z&&Z.active&&Z.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,gs.has(this)&&(gs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||du(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,mu(this),yu(this);const e=E,r=yt;E=this,yt=!0;try{return this.fn()}finally{E!==this&&dt("Active effect was not restored correctly - this is likely a Vue internal bug."),gu(this),E=e,yt=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)bs(e);this.deps=this.depsTail=void 0,mu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?gs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ws(this)&&this.run()}get dirty(){return ws(this)}}let _u=0,qr,Nr;function du(t,e=!1){if(t.flags|=8,e){t.next=Nr,Nr=t;return}t.next=qr,qr=t}function vs(){_u++}function ms(){if(--_u>0)return;if(Nr){let e=Nr;for(Nr=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;qr;){let e=qr;for(qr=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function yu(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function gu(t){let e,r=t.depsTail,n=r;for(;n;){const i=n.prevDep;n.version===-1?(n===r&&(r=i),bs(n),b_(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=r}function ws(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(vu(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function vu(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===jr)||(t.globalVersion=jr,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!ws(t))))return;t.flags|=2;const e=t.dep,r=E,n=yt;E=t,yt=!0;try{yu(t);const i=t.fn(t._value);(e.version===0||Xt(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{E=r,yt=n,gu(t),t.flags&=-3}}function bs(t,e=!1){const{dep:r,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),r.subsHead===t&&(r.subsHead=i),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let s=r.computed.deps;s;s=s.nextDep)bs(s,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function b_(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}function S_(t,e){t.effect instanceof $r&&(t=t.effect.fn);const r=new $r(t);e&&Pn(r,e);try{r.run()}catch(i){throw r.stop(),i}const n=r.run.bind(r);return n.effect=r,n}function A_(t){t.effect.stop()}let yt=!0;const Ss=[];function As(){Ss.push(yt),yt=!1}function O_(){Ss.push(yt),yt=!0}function Os(){const t=Ss.pop();yt=t===void 0?!0:t}function E_(t,e=!1){E instanceof $r?E.cleanup=t:e||dt("onEffectCleanup() was called when there was no active effect to associate with.")}function mu(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=E;E=void 0;try{e()}finally{E=r}}}let jr=0;class M_{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qn{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.subsHead=void 0}track(e){if(!E||!yt||E===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==E)r=this.activeLink=new M_(E,this),E.deps?(r.prevDep=E.depsTail,E.depsTail.nextDep=r,E.depsTail=r):E.deps=E.depsTail=r,wu(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=E.depsTail,r.nextDep=void 0,E.depsTail.nextDep=r,E.depsTail=r,E.deps===r&&(E.deps=n)}return E.onTrack&&E.onTrack(Pn({effect:E},e)),r}trigger(e){this.version++,jr++,this.notify(e)}notify(e){vs();try{for(let r=this.subsHead;r;r=r.nextSub)r.sub.onTrigger&&!(r.sub.flags&8)&&r.sub.onTrigger(Pn({effect:r.sub},e));for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{ms()}}}function wu(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)wu(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}const Nn=new WeakMap,te=Symbol("Object iterate"),jn=Symbol("Map keys iterate"),Be=Symbol("Array iterate");function rt(t,e,r){if(yt&&E){let n=Nn.get(t);n||Nn.set(t,n=new Map);let i=n.get(r);i||(n.set(r,i=new qn),i.map=n,i.key=r),i.track({target:t,type:e,key:r})}}function Lt(t,e,r,n,i,s){const o=Nn.get(t);if(!o){jr++;return}const a=u=>{u&&u.trigger({target:t,type:e,key:r,newValue:n,oldValue:i,oldTarget:s})};if(vs(),e==="clear")o.forEach(a);else{const u=jt(t),f=u&&ys(r);if(u&&r==="length"){const c=Number(n);o.forEach((h,l)=>{(l==="length"||l===Be||!Cr(l)&&l>=c)&&a(h)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),f&&a(o.get(Be)),e){case"add":u?f&&a(o.get("length")):(a(o.get(te)),De(t)&&a(o.get(jn)));break;case"delete":u||(a(o.get(te)),De(t)&&a(o.get(jn)));break;case"set":De(t)&&a(o.get(te));break}}ms()}function x_(t,e){const r=Nn.get(t);return r&&r.get(e)}function le(t){const e=I(t);return e===t?e:(rt(e,"iterate",Be),St(t)?e:e.map(J))}function Ln(t){return rt(t=I(t),"iterate",Be),t}const I_={__proto__:null,[Symbol.iterator](){return Es(this,Symbol.iterator,J)},concat(...t){return le(this).concat(...t.map(e=>jt(e)?le(e):e))},entries(){return Es(this,"entries",t=>(t[1]=J(t[1]),t))},every(t,e){return Dt(this,"every",t,e,void 0,arguments)},filter(t,e){return Dt(this,"filter",t,e,r=>r.map(J),arguments)},find(t,e){return Dt(this,"find",t,e,J,arguments)},findIndex(t,e){return Dt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Dt(this,"findLast",t,e,J,arguments)},findLastIndex(t,e){return Dt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Dt(this,"forEach",t,e,void 0,arguments)},includes(...t){return Ms(this,"includes",t)},indexOf(...t){return Ms(this,"indexOf",t)},join(t){return le(this).join(t)},lastIndexOf(...t){return Ms(this,"lastIndexOf",t)},map(t,e){return Dt(this,"map",t,e,void 0,arguments)},pop(){return Lr(this,"pop")},push(...t){return Lr(this,"push",t)},reduce(t,...e){return bu(this,"reduce",t,e)},reduceRight(t,...e){return bu(this,"reduceRight",t,e)},shift(){return Lr(this,"shift")},some(t,e){return Dt(this,"some",t,e,void 0,arguments)},splice(...t){return Lr(this,"splice",t)},toReversed(){return le(this).toReversed()},toSorted(t){return le(this).toSorted(t)},toSpliced(...t){return le(this).toSpliced(...t)},unshift(...t){return Lr(this,"unshift",t)},values(){return Es(this,"values",J)}};function Es(t,e,r){const n=Ln(t),i=n[e]();return n!==t&&!St(t)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=r(s.value)),s}),i}const T_=Array.prototype;function Dt(t,e,r,n,i,s){const o=Ln(t),a=o!==t&&!St(t),u=o[e];if(u!==T_[e]){const h=u.apply(t,s);return a?J(h):h}let f=r;o!==t&&(a?f=function(h,l){return r.call(this,J(h),l,t)}:r.length>2&&(f=function(h,l){return r.call(this,h,l,t)}));const c=u.call(o,f,n);return a&&i?i(c):c}function bu(t,e,r,n){const i=Ln(t);let s=r;return i!==t&&(St(t)?r.length>3&&(s=function(o,a,u){return r.call(this,o,a,u,t)}):s=function(o,a,u){return r.call(this,o,J(a),u,t)}),i[e](s,...n)}function Ms(t,e,r){const n=I(t);rt(n,"iterate",Be);const i=n[e](...r);return(i===-1||i===!1)&&zs(r[0])?(r[0]=I(r[0]),n[e](...r)):i}function Lr(t,e,r=[]){As(),vs();const n=I(t)[e].apply(t,r);return ms(),Os(),n}const z_=a_("__proto__,__v_isRef,__isVue"),Su=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Cr));function R_(t){Cr(t)||(t=String(t));const e=I(this);return rt(e,"has",t),e.hasOwnProperty(t)}class Au{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const i=this._isReadonly,s=this._isShallow;if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return s;if(r==="__v_raw")return n===(i?s?zu:Tu:s?Iu:xu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=jt(e);if(!i){let u;if(o&&(u=I_[r]))return u;if(r==="hasOwnProperty")return R_}const a=Reflect.get(e,r,nt(e)?e:n);return(Cr(r)?Su.has(r):z_(r))||(i||rt(e,"get",r),s)?a:nt(a)?o&&ys(r)?a:a.value:ke(a)?i?Ts(a):Is(a):a}}class Ou extends Au{constructor(e=!1){super(!1,e)}set(e,r,n,i){let s=e[r];if(!this._isShallow){const u=ee(s);if(!St(n)&&!ee(n)&&(s=I(s),n=I(n)),!jt(e)&&nt(s)&&!nt(n))return u?!1:(s.value=n,!0)}const o=jt(e)&&ys(r)?Number(r)<e.length:Cn(e,r),a=Reflect.set(e,r,n,nt(e)?e:i);return e===I(i)&&(o?Xt(n,s)&&Lt(e,"set",r,n,s):Lt(e,"add",r,n)),a}deleteProperty(e,r){const n=Cn(e,r),i=e[r],s=Reflect.deleteProperty(e,r);return s&&n&&Lt(e,"delete",r,void 0,i),s}has(e,r){const n=Reflect.has(e,r);return(!Cr(r)||!Su.has(r))&&rt(e,"has",r),n}ownKeys(e){return rt(e,"iterate",jt(e)?"length":te),Reflect.ownKeys(e)}}class Eu extends Au{constructor(e=!1){super(!0,e)}set(e,r){return dt(`Set operation on key "${String(r)}" failed: target is readonly.`,e),!0}deleteProperty(e,r){return dt(`Delete operation on key "${String(r)}" failed: target is readonly.`,e),!0}}const F_=new Ou,P_=new Eu,C_=new Ou(!0),$_=new Eu(!0),xs=t=>t,Dn=t=>Reflect.getPrototypeOf(t);function q_(t,e,r){return function(...n){const i=this.__v_raw,s=I(i),o=De(s),a=t==="entries"||t===Symbol.iterator&&o,u=t==="keys"&&o,f=i[t](...n),c=r?xs:e?Wn:J;return!e&&rt(s,"iterate",u?jn:te),{next(){const{value:h,done:l}=f.next();return l?{value:h,done:l}:{value:a?[c(h[0]),c(h[1])]:c(h),done:l}},[Symbol.iterator](){return this}}}}function kn(t){return function(...e){{const r=e[0]?`on key "${e[0]}" `:"";dt(`${y_(t)} operation ${r}failed: target is readonly.`,I(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function N_(t,e){const r={get(i){const s=this.__v_raw,o=I(s),a=I(i);t||(Xt(i,a)&&rt(o,"get",i),rt(o,"get",a));const{has:u}=Dn(o),f=e?xs:t?Wn:J;if(u.call(o,i))return f(s.get(i));if(u.call(o,a))return f(s.get(a));s!==o&&s.get(i)},get size(){const i=this.__v_raw;return!t&&rt(I(i),"iterate",te),Reflect.get(i,"size",i)},has(i){const s=this.__v_raw,o=I(s),a=I(i);return t||(Xt(i,a)&&rt(o,"has",i),rt(o,"has",a)),i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){const o=this,a=o.__v_raw,u=I(a),f=e?xs:t?Wn:J;return!t&&rt(u,"iterate",te),a.forEach((c,h)=>i.call(s,f(c),f(h),o))}};return Pn(r,t?{add:kn("add"),set:kn("set"),delete:kn("delete"),clear:kn("clear")}:{add(i){!e&&!St(i)&&!ee(i)&&(i=I(i));const s=I(this);return Dn(s).has.call(s,i)||(s.add(i),Lt(s,"add",i,i)),this},set(i,s){!e&&!St(s)&&!ee(s)&&(s=I(s));const o=I(this),{has:a,get:u}=Dn(o);let f=a.call(o,i);f?Mu(o,a,i):(i=I(i),f=a.call(o,i));const c=u.call(o,i);return o.set(i,s),f?Xt(s,c)&&Lt(o,"set",i,s,c):Lt(o,"add",i,s),this},delete(i){const s=I(this),{has:o,get:a}=Dn(s);let u=o.call(s,i);u?Mu(s,o,i):(i=I(i),u=o.call(s,i));const f=a?a.call(s,i):void 0,c=s.delete(i);return u&&Lt(s,"delete",i,void 0,f),c},clear(){const i=I(this),s=i.size!==0,o=De(i)?new Map(i):new Set(i),a=i.clear();return s&&Lt(i,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{r[i]=q_(i,t,e)}),r}function Bn(t,e){const r=N_(t,e);return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Cn(r,i)&&i in n?r:n,i,s)}const j_={get:Bn(!1,!1)},L_={get:Bn(!1,!0)},D_={get:Bn(!0,!1)},k_={get:Bn(!0,!0)};function Mu(t,e,r){const n=I(r);if(n!==r&&e.call(t,n)){const i=hu(t);dt(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const xu=new WeakMap,Iu=new WeakMap,Tu=new WeakMap,zu=new WeakMap;function B_(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function U_(t){return t.__v_skip||!Object.isExtensible(t)?0:B_(hu(t))}function Is(t){return ee(t)?t:Un(t,!1,F_,j_,xu)}function W_(t){return Un(t,!1,C_,L_,Iu)}function Ts(t){return Un(t,!0,P_,D_,Tu)}function K_(t){return Un(t,!0,$_,k_,zu)}function Un(t,e,r,n,i){if(!ke(t))return dt(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=U_(t);if(s===0)return t;const o=i.get(t);if(o)return o;const a=new Proxy(t,s===2?n:r);return i.set(t,a),a}function Ue(t){return ee(t)?Ue(t.__v_raw):!!(t&&t.__v_isReactive)}function ee(t){return!!(t&&t.__v_isReadonly)}function St(t){return!!(t&&t.__v_isShallow)}function zs(t){return t?!!t.__v_raw:!1}function I(t){const e=t&&t.__v_raw;return e?I(e):t}function H_(t){return!Cn(t,"__v_skip")&&Object.isExtensible(t)&&g_(t,"__v_skip",!0),t}const J=t=>ke(t)?Is(t):t,Wn=t=>ke(t)?Ts(t):t;function nt(t){return t?t.__v_isRef===!0:!1}function Ru(t){return Fu(t,!1)}function G_(t){return Fu(t,!0)}function Fu(t,e){return nt(t)?t:new V_(t,e)}class V_{constructor(e,r){this.dep=new qn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:I(e),this._value=r?e:J(e),this.__v_isShallow=r}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||St(e)||ee(e);e=n?e:I(e),Xt(e,r)&&(this._rawValue=e,this._value=n?e:J(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:r}))}}function Y_(t){t.dep&&t.dep.trigger({target:t,type:"set",key:"value",newValue:t._value})}function Rs(t){return nt(t)?t.value:t}function Z_(t){return Pr(t)?t():Rs(t)}const J_={get:(t,e,r)=>e==="__v_raw"?t:Rs(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return nt(i)&&!nt(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function Q_(t){return Ue(t)?t:new Proxy(t,J_)}class X_{constructor(e){this.__v_isRef=!0,this._value=void 0;const r=this.dep=new qn,{get:n,set:i}=e(r.track.bind(r),r.trigger.bind(r));this._get=n,this._set=i}get value(){return this._value=this._get()}set value(e){this._set(e)}}function td(t){return new X_(t)}function ed(t){zs(t)||dt("toRefs() expects a reactive object but received a plain one.");const e=jt(t)?new Array(t.length):{};for(const r in t)e[r]=Pu(t,r);return e}class rd{constructor(e,r,n){this._object=e,this._key=r,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return x_(I(this._object),this._key)}}class nd{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function id(t,e,r){return nt(t)?t:Pr(t)?new nd(t):ke(t)&&arguments.length>1?Pu(t,e,r):Ru(t)}function Pu(t,e,r){const n=t[e];return nt(n)?n:new rd(t,e,r)}class sd{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new qn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&E!==this)return du(this,!0),!0}get value(){const e=this.dep.track({target:this,type:"get",key:"value"});return vu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):dt("Write operation failed: computed value is readonly")}}function od(t,e,r=!1){let n,i;Pr(t)?n=t:(n=t.get,i=t.set);const s=new sd(n,i,r);return e&&!r&&(s.onTrack=e.onTrack,s.onTrigger=e.onTrigger),s}const ad={GET:"get",HAS:"has",ITERATE:"iterate"},ud={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fd={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw",IS_REF:"__v_isRef"},cd={WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP"},Kn={},Hn=new WeakMap;let re;function hd(){return re}function Cu(t,e=!1,r=re){if(r){let n=Hn.get(r);n||Hn.set(r,n=[]),n.push(t)}else e||dt("onWatcherCleanup() was called when there was no active watcher to associate with.")}function ld(t,e,r=u_){const{immediate:n,deep:i,once:s,scheduler:o,augmentJob:a,call:u}=r,f=b=>{(r.onWarn||dt)("Invalid watch source: ",b,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=b=>i?b:St(b)||i===!1||i===0?kt(b,1):kt(b);let h,l,p,_,d=!1,y=!1;if(nt(t)?(l=()=>t.value,d=St(t)):Ue(t)?(l=()=>c(t),d=!0):jt(t)?(y=!0,d=t.some(b=>Ue(b)||St(b)),l=()=>t.map(b=>{if(nt(b))return b.value;if(Ue(b))return c(b);if(Pr(b))return u?u(b,2):b();f(b)})):Pr(t)?e?l=u?()=>u(t,2):t:l=()=>{if(p){As();try{p()}finally{Os()}}const b=re;re=h;try{return u?u(t,3,[_]):t(_)}finally{re=b}}:(l=f_,f(t)),e&&i){const b=l,O=i===!0?1/0:i;l=()=>kt(b(),O)}const m=pu(),v=()=>{h.stop(),m&&m.active&&c_(m.effects,h)};if(s&&e){const b=e;e=(...O)=>{b(...O),v()}}let w=y?new Array(t.length).fill(Kn):Kn;const g=b=>{if(!(!(h.flags&1)||!h.dirty&&!b))if(e){const O=h.run();if(i||d||(y?O.some((F,Ft)=>Xt(F,w[Ft])):Xt(O,w))){p&&p();const F=re;re=h;try{const Ft=[O,w===Kn?void 0:y&&w[0]===Kn?[]:w,_];w=O,u?u(e,3,Ft):e(...Ft)}finally{re=F}}}else h.run()};return a&&a(g),h=new $r(l),h.scheduler=o?()=>o(g,!1):g,_=b=>Cu(b,!1,h),p=h.onStop=()=>{const b=Hn.get(h);if(b){if(u)u(b,4);else for(const O of b)O();Hn.delete(h)}},h.onTrack=r.onTrack,h.onTrigger=r.onTrigger,e?n?g(!0):w=h.run():o?o(g.bind(null,!0),!0):h.run(),v.pause=h.pause.bind(h),v.resume=h.resume.bind(h),v.stop=v,v}function kt(t,e=1/0,r){if(e<=0||!ke(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,nt(t))kt(t.value,e,r);else if(jt(t))for(let n=0;n<t.length;n++)kt(t[n],e,r);else if(l_(t)||De(t))t.forEach(n=>{kt(n,e,r)});else if(d_(t)){for(const n in t)kt(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&kt(t[n],e,r)}return t}const pd=Object.freeze(Object.defineProperty({__proto__:null,ARRAY_ITERATE_KEY:Be,EffectFlags:w_,EffectScope:lu,ITERATE_KEY:te,MAP_KEY_ITERATE_KEY:jn,ReactiveEffect:$r,ReactiveFlags:fd,TrackOpTypes:ad,TriggerOpTypes:ud,WatchErrorCodes:cd,computed:od,customRef:td,effect:S_,effectScope:v_,enableTracking:O_,getCurrentScope:pu,getCurrentWatcher:hd,isProxy:zs,isReactive:Ue,isReadonly:ee,isRef:nt,isShallow:St,markRaw:H_,onEffectCleanup:E_,onScopeDispose:m_,onWatcherCleanup:Cu,pauseTracking:As,proxyRefs:Q_,reactive:Is,reactiveReadArray:le,readonly:Ts,ref:Ru,resetTracking:Os,shallowReactive:W_,shallowReadArray:Ln,shallowReadonly:K_,shallowRef:G_,stop:A_,toRaw:I,toReactive:J,toReadonly:Wn,toRef:id,toRefs:ed,toValue:Z_,track:rt,traverse:kt,trigger:Lt,triggerRef:Y_,unref:Rs,watch:ld},Symbol.toStringTag,{value:"Module"})),_d=Symbol.for("preact-signals"),Rt=1,We=2,Dr=4,Ke=8,Gn=16,He=32;function Vn(){Br++}function Yn(){if(Br>1){Br--;return}let t,e=!1;for(;kr!==void 0;){let r=kr;for(kr=void 0,Fs++;r!==void 0;){const n=r._nextBatchedEffect;if(r._nextBatchedEffect=void 0,r._flags&=~We,!(r._flags&Ke)&&qu(r))try{r._callback()}catch(i){e||(t=i,e=!0)}r=n}}if(Fs=0,Br--,e)throw t}function dd(t){if(Br>0)return t();Vn();try{return t()}finally{Yn()}}let T;function yd(t){const e=T;T=void 0;try{return t()}finally{T=e}}let kr,Br=0,Fs=0,Zn=0;function $u(t){if(T===void 0)return;let e=t._node;if(e===void 0||e._target!==T)return e={_version:0,_source:t,_prevSource:T._sources,_nextSource:void 0,_target:T,_prevTarget:void 0,_nextTarget:void 0,_rollbackNode:e},T._sources!==void 0&&(T._sources._nextSource=e),T._sources=e,t._node=e,T._flags&He&&t._subscribe(e),e;if(e._version===-1)return e._version=0,e._nextSource!==void 0&&(e._nextSource._prevSource=e._prevSource,e._prevSource!==void 0&&(e._prevSource._nextSource=e._nextSource),e._prevSource=T._sources,e._nextSource=void 0,T._sources._nextSource=e,T._sources=e),e}function Q(t){this._value=t,this._version=0,this._node=void 0,this._targets=void 0}Q.prototype.brand=_d,Q.prototype._refresh=function(){return!0},Q.prototype._subscribe=function(t){this._targets!==t&&t._prevTarget===void 0&&(t._nextTarget=this._targets,this._targets!==void 0&&(this._targets._prevTarget=t),this._targets=t)},Q.prototype._unsubscribe=function(t){if(this._targets!==void 0){const e=t._prevTarget,r=t._nextTarget;e!==void 0&&(e._nextTarget=r,t._prevTarget=void 0),r!==void 0&&(r._prevTarget=e,t._nextTarget=void 0),t===this._targets&&(this._targets=r)}},Q.prototype.subscribe=function(t){return Du(()=>{const e=this.value,r=T;T=void 0;try{t(e)}finally{T=r}})},Q.prototype.valueOf=function(){return this.value},Q.prototype.toString=function(){return this.value+""},Q.prototype.toJSON=function(){return this.value},Q.prototype.peek=function(){const t=T;T=void 0;try{return this.value}finally{T=t}},Object.defineProperty(Q.prototype,"value",{get(){const t=$u(this);return t!==void 0&&(t._version=this._version),this._value},set(t){if(t!==this._value){if(Fs>100)throw new Error("Cycle detected");this._value=t,this._version++,Zn++,Vn();try{for(let e=this._targets;e!==void 0;e=e._nextTarget)e._target._notify()}finally{Yn()}}}});function gd(t){return new Q(t)}function qu(t){for(let e=t._sources;e!==void 0;e=e._nextSource)if(e._source._version!==e._version||!e._source._refresh()||e._source._version!==e._version)return!0;return!1}function Nu(t){for(let e=t._sources;e!==void 0;e=e._nextSource){const r=e._source._node;if(r!==void 0&&(e._rollbackNode=r),e._source._node=e,e._version=-1,e._nextSource===void 0){t._sources=e;break}}}function ju(t){let e=t._sources,r;for(;e!==void 0;){const n=e._prevSource;e._version===-1?(e._source._unsubscribe(e),n!==void 0&&(n._nextSource=e._nextSource),e._nextSource!==void 0&&(e._nextSource._prevSource=n)):r=e,e._source._node=e._rollbackNode,e._rollbackNode!==void 0&&(e._rollbackNode=void 0),e=n}t._sources=r}function pe(t){Q.call(this,void 0),this._fn=t,this._sources=void 0,this._globalVersion=Zn-1,this._flags=Dr}pe.prototype=new Q,pe.prototype._refresh=function(){if(this._flags&=~We,this._flags&Rt)return!1;if((this._flags&(Dr|He))===He||(this._flags&=~Dr,this._globalVersion===Zn))return!0;if(this._globalVersion=Zn,this._flags|=Rt,this._version>0&&!qu(this))return this._flags&=~Rt,!0;const t=T;try{Nu(this),T=this;const e=this._fn();(this._flags&Gn||this._value!==e||this._version===0)&&(this._value=e,this._flags&=~Gn,this._version++)}catch(e){this._value=e,this._flags|=Gn,this._version++}return T=t,ju(this),this._flags&=~Rt,!0},pe.prototype._subscribe=function(t){if(this._targets===void 0){this._flags|=Dr|He;for(let e=this._sources;e!==void 0;e=e._nextSource)e._source._subscribe(e)}Q.prototype._subscribe.call(this,t)},pe.prototype._unsubscribe=function(t){if(this._targets!==void 0&&(Q.prototype._unsubscribe.call(this,t),this._targets===void 0)){this._flags&=~He;for(let e=this._sources;e!==void 0;e=e._nextSource)e._source._unsubscribe(e)}},pe.prototype._notify=function(){if(!(this._flags&We)){this._flags|=Dr|We;for(let t=this._targets;t!==void 0;t=t._nextTarget)t._target._notify()}},Object.defineProperty(pe.prototype,"value",{get(){if(this._flags&Rt)throw new Error("Cycle detected");const t=$u(this);if(this._refresh(),t!==void 0&&(t._version=this._version),this._flags&Gn)throw this._value;return this._value}});function vd(t){return new pe(t)}function Lu(t){const e=t._cleanup;if(t._cleanup=void 0,typeof e=="function"){Vn();const r=T;T=void 0;try{e()}catch(n){throw t._flags&=~Rt,t._flags|=Ke,Ps(t),n}finally{T=r,Yn()}}}function Ps(t){for(let e=t._sources;e!==void 0;e=e._nextSource)e._source._unsubscribe(e);t._fn=void 0,t._sources=void 0,Lu(t)}function md(t){if(T!==this)throw new Error("Out-of-order effect");ju(this),T=t,this._flags&=~Rt,this._flags&Ke&&Ps(this),Yn()}function Ur(t){this._fn=t,this._cleanup=void 0,this._sources=void 0,this._nextBatchedEffect=void 0,this._flags=He}Ur.prototype._callback=function(){const t=this._start();try{if(this._flags&Ke||this._fn===void 0)return;const e=this._fn();typeof e=="function"&&(this._cleanup=e)}finally{t()}},Ur.prototype._start=function(){if(this._flags&Rt)throw new Error("Cycle detected");this._flags|=Rt,this._flags&=~Ke,Lu(this),Nu(this),Vn();const t=T;return T=this,md.bind(this,t)},Ur.prototype._notify=function(){this._flags&We||(this._flags|=We,this._nextBatchedEffect=kr,kr=this)},Ur.prototype._dispose=function(){this._flags|=Ke,this._flags&Rt||Ps(this)};function Du(t){const e=new Ur(t);try{e._callback()}catch(r){throw e._dispose(),r}return e._dispose.bind(e)}const wd=Object.freeze(Object.defineProperty({__proto__:null,Signal:Q,batch:dd,computed:vd,effect:Du,signal:gd,untracked:yd},Symbol.toStringTag,{value:"Module"}));function Jn(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Jn(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!Jn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}class bd{name;fields;parent;context;options;current;dirty;constructor(e,r){this.context=e,this.options=r,this.current=this.default(),this.dirty=!0,r.overrideMethods&&Object.assign(this,r.overrideMethods),this.options.init?.call(this)}equal(e,r){return Jn(e,r)}default(){return typeof this.options.default=="function"?this.options.default(this.context):this.options.default}reset(){this.set(this.default())}shouldUpdate(e){return!(!this.dirty&&this.equal(this.current,e))}set(e){return this.shouldUpdate(e)?(this.options.set?.call(this,e,this.context),this.current=this.options.map,this.dirty=!1,!0):!1}get(){return this.current}dispose(){this.options.dispose?.call(this)}}class Cs{static create(e,r){return new Cs(e,r)}context;options=new Map;optionClass=new Map;constructor(e,r){return this.context=e,r&&this.initOptions(r),new Proxy(this,{get(n,i){return n.options.has(i)?n.getOption(i):Reflect.get(n,i)}})}register(e,r){this.optionClass.set(e,r)}defineGetter(e){Object.defineProperty(this,e,{get:()=>this.getOption(e),enumerable:!0})}initOptions(e){for(let r in e)if(this.optionClass.has(r)){const n=this.optionClass.get(r),i=new n(this.context,e[r]);this.addOptionFromInstance(r,i)}else this.addOptionFromConfig(r,e[r])}getOption(e){return this.options.get(e)}removeOption(e){this.options.has(e)&&(this.options.get(e).dispose(),this.options.delete(e))}addOptionFromInstance(e,r){this.options.has(e)||(r.parent=this,r.name=e,this.options.set(e,r))}addOptionFromConfig(e,r){this.addOptionFromInstance(e,new bd(this.context,r))}}function Sd(t){return Ad(t)&&!Od(t)}function Ad(t){return!!t&&typeof t=="object"}function Od(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||xd(t)}var Ed=typeof Symbol=="function"&&Symbol.for,Md=Ed?Symbol.for("react.element"):60103;function xd(t){return t.$$typeof===Md}var Id=Sd;function Td(t){return Array.isArray(t)?[]:{}}function Wr(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Ge(Td(t),t,e):t}function zd(t,e,r){return t.concat(e).map(function(n){return Wr(n,r)})}function Rd(t,e){if(!e.customMerge)return Ge;var r=e.customMerge(t);return typeof r=="function"?r:Ge}function Fd(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function ku(t){return Object.keys(t).concat(Fd(t))}function Bu(t,e){try{return e in t}catch{return!1}}function Pd(t,e){return Bu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Cd(t,e,r){var n={};return r.isMergeableObject(t)&&ku(t).forEach(function(i){n[i]=Wr(t[i],r)}),ku(e).forEach(function(i){Pd(t,i)||(Bu(t,i)&&r.isMergeableObject(e[i])?n[i]=Rd(i,r)(t[i],e[i],r):n[i]=Wr(e[i],r))}),n}function Ge(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||zd,r.isMergeableObject=r.isMergeableObject||Id,r.cloneUnlessOtherwiseSpecified=Wr;var n=Array.isArray(e),i=Array.isArray(t),s=n===i;return s?n?r.arrayMerge?.(t,e,r):Cd(t,e,r):Wr(e,r)}function $d(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Ge(r,n,e)},{})}Ge.all=$d;function Ve(t,e=0,r=1){return Math.min(Math.max(t,e),r)}function Uu(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r);let s=0,o,a=(n+i)/2;if(n==i)s=o=0;else{const u=n-i;switch(o=a>.5?u/(2-n-i):u/(n+i),n){case t:s=(e-r)/u+(e<r?6:0);break;case e:s=(r-t)/u+2;break;case r:s=(t-e)/u+4;break}s/=6}return{h:s,s:o,l:a}}function $s(t,e,r){let n,i,s;if(e==0)n=i=s=r;else{const o=(f,c,h)=>(h<0&&(h+=1),h>1&&(h-=1),h<.16666666666666666?f+(c-f)*6*h:h<.5?c:h<.6666666666666666?f+(c-f)*(.6666666666666666-h)*6:f),a=r<.5?r*(1+e):r+e-r*e,u=2*r-a;n=o(u,a,t+1/3),i=o(u,a,t),s=o(u,a,t-1/3)}return{r:n*255,g:i*255,b:s*255}}function qd(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r);let s=0,o,a=n;const u=n-i;if(o=n==0?0:u/n,n==i)s=0;else{switch(n){case t:s=(e-r)/u+(e<r?6:0);break;case e:s=(r-t)/u+2;break;case r:s=(t-e)/u+4;break}s/=6}return{h:s,s:o,v:a}}function Wu(t,e,r){let n=0,i=0,s=0;const o=Math.floor(t*6),a=t*6-o,u=r*(1-e),f=r*(1-a*e),c=r*(1-(1-a)*e);switch(o%6){case 0:n=r,i=c,s=u;break;case 1:n=f,i=r,s=u;break;case 2:n=u,i=r,s=c;break;case 3:n=u,i=f,s=r;break;case 4:n=c,i=u,s=r;break;case 5:n=r,i=u,s=f;break}return{r:n*255,g:i*255,b:s*255}}function Nd(t,e,r){const n=r+e*Math.min(r,1-r),i=n===0?0:2*(1-r/n);return{h:t,s:i,v:n}}function jd(t,e,r){const n=(2-e)*r/2,i=e===0?e:n<=1?e*r/(2-e*r):e*r/(2-e);return{h:t,s:i,l:n}}function Ku(t){typeof t=="string"&&(t=t.replace("#",""),t=t.length===3?t.replace(/(\w)/g,"$1$1"):t,t=parseInt("0x"+t,16));const e=t,r=e>>16&255,n=e>>8&255,i=e&255;return{r,g:n,b:i}}function Hu(t,e,r){const n=t.r+(e.r-t.r)*r,i=t.g+(e.g-t.g)*r,s=t.b+(e.b-t.b)*r;return{r:n,g:i,b:s}}const Gu={aliceblue:Float32Array.of(.941,.973,1,1),antiquewhite:Float32Array.of(.98,.922,.843,1),aqua:Float32Array.of(0,1,1,1),aquamarine:Float32Array.of(.498,1,.831,1),azure:Float32Array.of(.941,1,1,1),beige:Float32Array.of(.961,.961,.863,1),bisque:Float32Array.of(1,.894,.769,1),black:Float32Array.of(0,0,0,1),blanchedalmond:Float32Array.of(1,.922,.804,1),blue:Float32Array.of(0,0,1,1),blueviolet:Float32Array.of(.541,.169,.886,1),brown:Float32Array.of(.647,.165,.165,1),burlywood:Float32Array.of(.871,.722,.529,1),cadetblue:Float32Array.of(.373,.62,.627,1),chartreuse:Float32Array.of(.498,1,0,1),chocolate:Float32Array.of(.824,.412,.118,1),coral:Float32Array.of(1,.498,.314,1),cornflowerblue:Float32Array.of(.392,.584,.929,1),cornsilk:Float32Array.of(1,.973,.863,1),crimson:Float32Array.of(.863,.078,.235,1),cyan:Float32Array.of(0,1,1,1),darkblue:Float32Array.of(0,0,.545,1),darkcyan:Float32Array.of(0,.545,.545,1),darkgoldenrod:Float32Array.of(.722,.525,.043,1),darkgray:Float32Array.of(.663,.663,.663,1),darkgreen:Float32Array.of(0,.392,0,1),darkgrey:Float32Array.of(.663,.663,.663,1),darkkhaki:Float32Array.of(.741,.718,.42,1),darkmagenta:Float32Array.of(.545,0,.545,1),darkolivegreen:Float32Array.of(.333,.42,.184,1),darkorange:Float32Array.of(1,.549,0,1),darkorchid:Float32Array.of(.6,.196,.8,1),darkred:Float32Array.of(.545,0,0,1),darksalmon:Float32Array.of(.914,.588,.478,1),darkseagreen:Float32Array.of(.561,.737,.561,1),darkslateblue:Float32Array.of(.282,.239,.545,1),darkslategray:Float32Array.of(.184,.31,.31,1),darkslategrey:Float32Array.of(.184,.31,.31,1),darkturquoise:Float32Array.of(0,.808,.82,1),darkviolet:Float32Array.of(.58,0,.827,1),deeppink:Float32Array.of(1,.078,.576,1),deepskyblue:Float32Array.of(0,.749,1,1),dimgray:Float32Array.of(.412,.412,.412,1),dimgrey:Float32Array.of(.412,.412,.412,1),dodgerblue:Float32Array.of(.118,.565,1,1),firebrick:Float32Array.of(.698,.133,.133,1),floralwhite:Float32Array.of(1,.98,.941,1),forestgreen:Float32Array.of(.133,.545,.133,1),fuchsia:Float32Array.of(1,0,1,1),gainsboro:Float32Array.of(.863,.863,.863,1),ghostwhite:Float32Array.of(.973,.973,1,1),gold:Float32Array.of(1,.843,0,1),goldenrod:Float32Array.of(.855,.647,.125,1),gray:Float32Array.of(.502,.502,.502,1),green:Float32Array.of(0,.502,0,1),greenyellow:Float32Array.of(.678,1,.184,1),grey:Float32Array.of(.502,.502,.502,1),honeydew:Float32Array.of(.941,1,.941,1),hotpink:Float32Array.of(1,.412,.706,1),indianred:Float32Array.of(.804,.361,.361,1),indigo:Float32Array.of(.294,0,.51,1),ivory:Float32Array.of(1,1,.941,1),khaki:Float32Array.of(.941,.902,.549,1),lavender:Float32Array.of(.902,.902,.98,1),lavenderblush:Float32Array.of(1,.941,.961,1),lawngreen:Float32Array.of(.486,.988,0,1),lemonchiffon:Float32Array.of(1,.98,.804,1),lightblue:Float32Array.of(.678,.847,.902,1),lightcoral:Float32Array.of(.941,.502,.502,1),lightcyan:Float32Array.of(.878,1,1,1),lightgoldenrodyellow:Float32Array.of(.98,.98,.824,1),lightgray:Float32Array.of(.827,.827,.827,1),lightgreen:Float32Array.of(.565,.933,.565,1),lightgrey:Float32Array.of(.827,.827,.827,1),lightpink:Float32Array.of(1,.714,.757,1),lightsalmon:Float32Array.of(1,.627,.478,1),lightseagreen:Float32Array.of(.125,.698,.667,1),lightskyblue:Float32Array.of(.529,.808,.98,1),lightslategray:Float32Array.of(.467,.533,.6,1),lightslategrey:Float32Array.of(.467,.533,.6,1),lightsteelblue:Float32Array.of(.69,.769,.871,1),lightyellow:Float32Array.of(1,1,.878,1),lime:Float32Array.of(0,1,0,1),limegreen:Float32Array.of(.196,.804,.196,1),linen:Float32Array.of(.98,.941,.902,1),magenta:Float32Array.of(1,0,1,1),maroon:Float32Array.of(.502,0,0,1),mediumaquamarine:Float32Array.of(.4,.804,.667,1),mediumblue:Float32Array.of(0,0,.804,1),mediumorchid:Float32Array.of(.729,.333,.827,1),mediumpurple:Float32Array.of(.576,.439,.859,1),mediumseagreen:Float32Array.of(.235,.702,.443,1),mediumslateblue:Float32Array.of(.482,.408,.933,1),mediumspringgreen:Float32Array.of(0,.98,.604,1),mediumturquoise:Float32Array.of(.282,.82,.8,1),mediumvioletred:Float32Array.of(.78,.082,.522,1),midnightblue:Float32Array.of(.098,.098,.439,1),mintcream:Float32Array.of(.961,1,.98,1),mistyrose:Float32Array.of(1,.894,.882,1),moccasin:Float32Array.of(1,.894,.71,1),navajowhite:Float32Array.of(1,.871,.678,1),navy:Float32Array.of(0,0,.502,1),oldlace:Float32Array.of(.992,.961,.902,1),olive:Float32Array.of(.502,.502,0,1),olivedrab:Float32Array.of(.42,.557,.137,1),orange:Float32Array.of(1,.647,0,1),orangered:Float32Array.of(1,.271,0,1),orchid:Float32Array.of(.855,.439,.839,1),palegoldenrod:Float32Array.of(.933,.91,.667,1),palegreen:Float32Array.of(.596,.984,.596,1),paleturquoise:Float32Array.of(.686,.933,.933,1),palevioletred:Float32Array.of(.859,.439,.576,1),papayawhip:Float32Array.of(1,.937,.835,1),peachpuff:Float32Array.of(1,.855,.725,1),peru:Float32Array.of(.804,.522,.247,1),pink:Float32Array.of(1,.753,.796,1),plum:Float32Array.of(.867,.627,.867,1),powderblue:Float32Array.of(.69,.878,.902,1),purple:Float32Array.of(.502,0,.502,1),rebeccapurple:Float32Array.of(.4,.2,.6,1),red:Float32Array.of(1,0,0,1),rosybrown:Float32Array.of(.737,.561,.561,1),royalblue:Float32Array.of(.255,.412,.882,1),saddlebrown:Float32Array.of(.545,.271,.075,1),salmon:Float32Array.of(.98,.502,.447,1),sandybrown:Float32Array.of(.957,.643,.376,1),seagreen:Float32Array.of(.18,.545,.341,1),seashell:Float32Array.of(1,.961,.933,1),sienna:Float32Array.of(.627,.322,.176,1),silver:Float32Array.of(.753,.753,.753,1),skyblue:Float32Array.of(.529,.808,.922,1),slateblue:Float32Array.of(.416,.353,.804,1),slategray:Float32Array.of(.439,.502,.565,1),slategrey:Float32Array.of(.439,.502,.565,1),snow:Float32Array.of(1,.98,.98,1),springgreen:Float32Array.of(0,1,.498,1),steelblue:Float32Array.of(.275,.51,.706,1),tan:Float32Array.of(.824,.706,.549,1),teal:Float32Array.of(0,.502,.502,1),thistle:Float32Array.of(.847,.749,.847,1),tomato:Float32Array.of(1,.388,.278,1),transparent:Float32Array.of(0,0,0,0),turquoise:Float32Array.of(.251,.878,.816,1),violet:Float32Array.of(.933,.51,.933,1),wheat:Float32Array.of(.961,.871,.702,1),white:Float32Array.of(1,1,1,1),whitesmoke:Float32Array.of(.961,.961,.961,1),yellow:Float32Array.of(1,1,0,1),yellowgreen:Float32Array.of(.604,.804,.196,1)};class ut{static Transparent=ut.fromRGBA(0,0,0,0);static BLACK=ut.fromRGB(0,0,0);static WHITE=ut.fromRGB(255,255,255);static isColor(e){return typeof e=="string"||typeof e=="number"||e instanceof ut}static parse(e){const r=typeof e=="string";if(r&&e.toLowerCase().startsWith("rgb")){const n=e.match(/rgba?\s*\(([^)]+)\)\s*/i);if(n){const i=n[1].split(",").map(parseInt),s=this.fromRGB(i[0],i[1],i[2]);return i.length===4&&(s.alpha=i[3]),s}}else if(r&&e.startsWith("#")||typeof e=="number")return this.fromRGB(Ku(e));if(r&&Gu[e]){const n=Gu[e];return this.fromRGB(n[0]*255>>0,n[1]*255>>0,n[2]*255>>0)}else if(typeof e=="object"&&e!==null)return this.fromRGB(e);return this.fromRGB(0,0,0)}static fromRGB(e,r,n){return e!==null&&typeof e=="object"?new ut(e.r,e.g,e.b):new ut(e,r,n)}static fromRGBA(e,r,n,i){return e!==null&&typeof e=="object"?new ut(e.r,e.g,e.b,r):new ut(e,r,n,i)}static fromHSL(e,r,n){const{r:i,g:s,b:o}=$s(e,r,n);return new ut(i,s,o)}static fromHSV(e,r,n){const{r:i,g:s,b:o}=Wu(e,r,n);return new ut(i,s,o)}_r=0;_g=0;_b=0;_a=1;constructor(e=0,r=0,n=0,i=1){this._r=e,this._g=r,this._b=n,this._a=i}copy(e){return this._r=e.r,this._g=e.g,this._b=e.b,this.alpha=e.alpha,this}clone(){return ut.fromRGB(0,0,0).copy(this)}setRGB(e,r,n){return this._r=e,this._g=r,this._b=n,this}normalize(){return this.r=Ve(this._r/255,0,1),this.g=Ve(this._g/255,0,1),this.b=Ve(this._b/255,0,1),this}set r(e){this._r=e}get r(){return this._r}set g(e){this._g=e}get g(){return this._g}set b(e){this._b=e}get b(){return this._b}get a(){return this.alpha}set a(e){this.alpha=e}set alpha(e){this._a=Math.max(0,Math.min(1,e))}get alpha(){return this._a}equals(e){return this.r!==e.r||this.g!==e.g||this.b!==e.b||this.alpha!==e.alpha}setOpacity(e){return this.alpha=e,this}mix(e,r,n=.5){const{r:i,g:s,b:o}=Hu(e,r,n);return new ut(i,s,o)}setRBG(e,r,n){return this.r=e,this.g=r,this.b=n,this}setRGBColor(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}brighten(e){const{h:r,s:n,l:i}=Uu(this.r,this.g,this.b);return this.setRGBColor($s(r,n,i*(1+e)))}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}round(){return this.r=Math.round(this.r),this.g=Math.round(this.g),this.b=Math.round(this.b),this}floor(){return this.r=Math.floor(this.r),this.g=Math.floor(this.g),this.b=Math.floor(this.b),this}clamp(e=0,r=1){return this.r=Ve(this.r,e,r),this.g=Ve(this.g,e,r),this.b=Ve(this.b,e,r),this}toCssRGB(){return`rgb(${Math.round(this.r)},${Math.round(this.g)},${Math.round(this.b)})`}}M.Callbacks=Qu,M.Color=ut,M.Event=Ze,M.EventEmitter=H,M.EventTarget=Yu,M.Immutable=o_,M.Options=Cs,M.PriorityQueue=Xu,M.antvUtil=Bl,M.deepmerge=Ge,M.fastDeepEqual=Jn,M.hexToRgb=Ku,M.hslToHsv=Nd,M.hslToRgb=$s,M.hsvToHsl=jd,M.hsvToRgb=Wu,M.immer=up,M.lerpColor=Hu,M.lodash=Uh,M.radash=ac,M.reactivity=pd,M.rgbToHsl=Uu,M.rgbToHsv=qd,M.signals=wd,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare type ShaderStage = 'vertex' | 'fragment' | 'compute';
|
|
2
|
+
declare type SpirvVersion = '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5';
|
|
3
|
+
|
|
4
|
+
declare interface ResultZeroCopy {
|
|
5
|
+
readonly data: Uint32Array;
|
|
6
|
+
free(): void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface Glslang {
|
|
10
|
+
compileGLSLZeroCopy(glsl: string, shader_stage: ShaderStage, gen_debug: boolean, spirv_version?: SpirvVersion): ResultZeroCopy;
|
|
11
|
+
compileGLSL(glsl: string, shader_type: ShaderStage, gen_debug: boolean, spirv_version?: SpirvVersion): Uint32Array;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function(): Promise<Glslang>;
|