polotno-node 2.12.6 → 2.12.7
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/assets/index-D-sgi3lN.js +620 -0
- package/dist/assets/{index.es-f4ckIryE.js → index.es-CKyJ52Wy.js} +5 -5
- package/dist/assets/purify.es-CQJ0hv7W.js +2 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/index-C06Gosi7.js +0 -613
- package/dist/assets/purify.es-Ci5xwkH_.js +0 -2
|
@@ -1,613 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=t(a);fetch(a.href,i)}})();var bh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zc(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var D0={exports:{}},jr={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var fy;function Q_(){if(fy)return jr;fy=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;function y(H){return H===null||typeof H!="object"?null:(H=p&&H[p]||H["@@iterator"],typeof H=="function"?H:null)}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function w(H,q,D){this.props=H,this.context=q,this.refs=S,this.updater=D||f}w.prototype.isReactComponent={},w.prototype.setState=function(H,q){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,q,"setState")},w.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function b(){}b.prototype=w.prototype;function g(H,q,D){this.props=H,this.context=q,this.refs=S,this.updater=D||f}var v=g.prototype=new b;v.constructor=g,_(v,w.prototype),v.isPureReactComponent=!0;var E=Array.isArray,x=Object.prototype.hasOwnProperty,j={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function T(H,q,D){var $,ne={},Z=null,Q=null;if(q!=null)for($ in q.ref!==void 0&&(Q=q.ref),q.key!==void 0&&(Z=""+q.key),q)x.call(q,$)&&!N.hasOwnProperty($)&&(ne[$]=q[$]);var oe=arguments.length-2;if(oe===1)ne.children=D;else if(1<oe){for(var se=Array(oe),ue=0;ue<oe;ue++)se[ue]=arguments[ue+2];ne.children=se}if(H&&H.defaultProps)for($ in oe=H.defaultProps,oe)ne[$]===void 0&&(ne[$]=oe[$]);return{$$typeof:e,type:H,key:Z,ref:Q,props:ne,_owner:j.current}}function F(H,q){return{$$typeof:e,type:H.type,key:q,ref:H.ref,props:H.props,_owner:H._owner}}function C(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function A(H){var q={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(D){return q[D]})}var L=/\/+/g;function O(H,q){return typeof H=="object"&&H!==null&&H.key!=null?A(""+H.key):q.toString(36)}function I(H,q,D,$,ne){var Z=typeof H;(Z==="undefined"||Z==="boolean")&&(H=null);var Q=!1;if(H===null)Q=!0;else switch(Z){case"string":case"number":Q=!0;break;case"object":switch(H.$$typeof){case e:case r:Q=!0}}if(Q)return Q=H,ne=ne(Q),H=$===""?"."+O(Q,0):$,E(ne)?(D="",H!=null&&(D=H.replace(L,"$&/")+"/"),I(ne,q,D,"",function(ue){return ue})):ne!=null&&(C(ne)&&(ne=F(ne,D+(!ne.key||Q&&Q.key===ne.key?"":(""+ne.key).replace(L,"$&/")+"/")+H)),q.push(ne)),1;if(Q=0,$=$===""?".":$+":",E(H))for(var oe=0;oe<H.length;oe++){Z=H[oe];var se=$+O(Z,oe);Q+=I(Z,q,D,se,ne)}else if(se=y(H),typeof se=="function")for(H=se.call(H),oe=0;!(Z=H.next()).done;)Z=Z.value,se=$+O(Z,oe++),Q+=I(Z,q,D,se,ne);else if(Z==="object")throw q=String(H),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Q}function M(H,q,D){if(H==null)return H;var $=[],ne=0;return I(H,$,"","",function(Z){return q.call(D,Z,ne++)}),$}function G(H){if(H._status===-1){var q=H._result;q=q(),q.then(function(D){(H._status===0||H._status===-1)&&(H._status=1,H._result=D)},function(D){(H._status===0||H._status===-1)&&(H._status=2,H._result=D)}),H._status===-1&&(H._status=0,H._result=q)}if(H._status===1)return H._result.default;throw H._result}var W={current:null},Y={transition:null},te={ReactCurrentDispatcher:W,ReactCurrentBatchConfig:Y,ReactCurrentOwner:j};function V(){throw Error("act(...) is not supported in production builds of React.")}return jr.Children={map:M,forEach:function(H,q,D){M(H,function(){q.apply(this,arguments)},D)},count:function(H){var q=0;return M(H,function(){q++}),q},toArray:function(H){return M(H,function(q){return q})||[]},only:function(H){if(!C(H))throw Error("React.Children.only expected to receive a single React element child.");return H}},jr.Component=w,jr.Fragment=t,jr.Profiler=a,jr.PureComponent=g,jr.StrictMode=n,jr.Suspense=c,jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,jr.act=V,jr.cloneElement=function(H,q,D){if(H==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+H+".");var $=_({},H.props),ne=H.key,Z=H.ref,Q=H._owner;if(q!=null){if(q.ref!==void 0&&(Z=q.ref,Q=j.current),q.key!==void 0&&(ne=""+q.key),H.type&&H.type.defaultProps)var oe=H.type.defaultProps;for(se in q)x.call(q,se)&&!N.hasOwnProperty(se)&&($[se]=q[se]===void 0&&oe!==void 0?oe[se]:q[se])}var se=arguments.length-2;if(se===1)$.children=D;else if(1<se){oe=Array(se);for(var ue=0;ue<se;ue++)oe[ue]=arguments[ue+2];$.children=oe}return{$$typeof:e,type:H.type,key:ne,ref:Z,props:$,_owner:Q}},jr.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},H.Provider={$$typeof:i,_context:H},H.Consumer=H},jr.createElement=T,jr.createFactory=function(H){var q=T.bind(null,H);return q.type=H,q},jr.createRef=function(){return{current:null}},jr.forwardRef=function(H){return{$$typeof:s,render:H}},jr.isValidElement=C,jr.lazy=function(H){return{$$typeof:d,_payload:{_status:-1,_result:H},_init:G}},jr.memo=function(H,q){return{$$typeof:u,type:H,compare:q===void 0?null:q}},jr.startTransition=function(H){var q=Y.transition;Y.transition={};try{H()}finally{Y.transition=q}},jr.unstable_act=V,jr.useCallback=function(H,q){return W.current.useCallback(H,q)},jr.useContext=function(H){return W.current.useContext(H)},jr.useDebugValue=function(){},jr.useDeferredValue=function(H){return W.current.useDeferredValue(H)},jr.useEffect=function(H,q){return W.current.useEffect(H,q)},jr.useId=function(){return W.current.useId()},jr.useImperativeHandle=function(H,q,D){return W.current.useImperativeHandle(H,q,D)},jr.useInsertionEffect=function(H,q){return W.current.useInsertionEffect(H,q)},jr.useLayoutEffect=function(H,q){return W.current.useLayoutEffect(H,q)},jr.useMemo=function(H,q){return W.current.useMemo(H,q)},jr.useReducer=function(H,q,D){return W.current.useReducer(H,q,D)},jr.useRef=function(H){return W.current.useRef(H)},jr.useState=function(H){return W.current.useState(H)},jr.useSyncExternalStore=function(H,q,D){return W.current.useSyncExternalStore(H,q,D)},jr.useTransition=function(){return W.current.useTransition()},jr.version="18.3.1",jr}var hy;function fi(){return hy||(hy=1,D0.exports=Q_()),D0.exports}var ei=fi();const Ur=mp(ei);var t1={},B0={exports:{}},hs={},q0={exports:{}},z0={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var dy;function J_(){return dy||(dy=1,function(e){function r(Y,te){var V=Y.length;Y.push(te);e:for(;0<V;){var H=V-1>>>1,q=Y[H];if(0<a(q,te))Y[H]=te,Y[V]=q,V=H;else break e}}function t(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var te=Y[0],V=Y.pop();if(V!==te){Y[0]=V;e:for(var H=0,q=Y.length,D=q>>>1;H<D;){var $=2*(H+1)-1,ne=Y[$],Z=$+1,Q=Y[Z];if(0>a(ne,V))Z<q&&0>a(Q,ne)?(Y[H]=Q,Y[Z]=V,H=Z):(Y[H]=ne,Y[$]=V,H=$);else if(Z<q&&0>a(Q,V))Y[H]=Q,Y[Z]=V,H=Z;else break e}}return te}function a(Y,te){var V=Y.sortIndex-te.sortIndex;return V!==0?V:Y.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],d=1,p=null,y=3,f=!1,_=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(Y){for(var te=t(u);te!==null;){if(te.callback===null)n(u);else if(te.startTime<=Y)n(u),te.sortIndex=te.expirationTime,r(c,te);else break;te=t(u)}}function E(Y){if(S=!1,v(Y),!_)if(t(c)!==null)_=!0,G(x);else{var te=t(u);te!==null&&W(E,te.startTime-Y)}}function x(Y,te){_=!1,S&&(S=!1,b(T),T=-1),f=!0;var V=y;try{for(v(te),p=t(c);p!==null&&(!(p.expirationTime>te)||Y&&!A());){var H=p.callback;if(typeof H=="function"){p.callback=null,y=p.priorityLevel;var q=H(p.expirationTime<=te);te=e.unstable_now(),typeof q=="function"?p.callback=q:p===t(c)&&n(c),v(te)}else n(c);p=t(c)}if(p!==null)var D=!0;else{var $=t(u);$!==null&&W(E,$.startTime-te),D=!1}return D}finally{p=null,y=V,f=!1}}var j=!1,N=null,T=-1,F=5,C=-1;function A(){return!(e.unstable_now()-C<F)}function L(){if(N!==null){var Y=e.unstable_now();C=Y;var te=!0;try{te=N(!0,Y)}finally{te?O():(j=!1,N=null)}}else j=!1}var O;if(typeof g=="function")O=function(){g(L)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,M=I.port2;I.port1.onmessage=L,O=function(){M.postMessage(null)}}else O=function(){w(L,0)};function G(Y){N=Y,j||(j=!0,O())}function W(Y,te){T=w(function(){Y(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Y){Y.callback=null},e.unstable_continueExecution=function(){_||f||(_=!0,G(x))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return t(c)},e.unstable_next=function(Y){switch(y){case 1:case 2:case 3:var te=3;break;default:te=y}var V=y;y=te;try{return Y()}finally{y=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,te){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var V=y;y=Y;try{return te()}finally{y=V}},e.unstable_scheduleCallback=function(Y,te,V){var H=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?H+V:H):V=H,Y){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=V+q,Y={id:d++,callback:te,priorityLevel:Y,startTime:V,expirationTime:q,sortIndex:-1},V>H?(Y.sortIndex=V,r(u,Y),t(c)===null&&Y===t(u)&&(S?(b(T),T=-1):S=!0,W(E,V-H))):(Y.sortIndex=q,r(c,Y),_||f||(_=!0,G(x))),Y},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(Y){var te=y;return function(){var V=y;y=te;try{return Y.apply(this,arguments)}finally{y=V}}}}(z0)),z0}var py;function F2(){return py||(py=1,q0.exports=J_()),q0.exports}/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var gy;function e7(){if(gy)return hs;gy=1;var e=fi(),r=F2();function t(l){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+l,k=1;k<arguments.length;k++)h+="&args[]="+encodeURIComponent(arguments[k]);return"Minified React error #"+l+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function i(l,h){o(l,h),o(l+"Capture",h)}function o(l,h){for(a[l]=h,l=0;l<h.length;l++)n.add(h[l])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function y(l){return c.call(p,l)?!0:c.call(d,l)?!1:u.test(l)?p[l]=!0:(d[l]=!0,!1)}function f(l,h,k,z){if(k!==null&&k.type===0)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":return z?!1:k!==null?!k.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function _(l,h,k,z){if(h===null||typeof h>"u"||f(l,h,k,z))return!0;if(z)return!1;if(k!==null)switch(k.type){case 3:return!h;case 4:return h===!1;case 5:return isNaN(h);case 6:return isNaN(h)||1>h}return!1}function S(l,h,k,z,J,ie,de){this.acceptsBooleans=h===2||h===3||h===4,this.attributeName=z,this.attributeNamespace=J,this.mustUseProperty=k,this.propertyName=l,this.type=h,this.sanitizeURL=ie,this.removeEmptyString=de}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){w[l]=new S(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var h=l[0];w[h]=new S(h,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){w[l]=new S(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){w[l]=new S(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){w[l]=new S(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){w[l]=new S(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){w[l]=new S(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){w[l]=new S(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){w[l]=new S(l,5,!1,l.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function g(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var h=l.replace(b,g);w[h]=new S(h,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var h=l.replace(b,g);w[h]=new S(h,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var h=l.replace(b,g);w[h]=new S(h,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){w[l]=new S(l,1,!1,l.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){w[l]=new S(l,1,!1,l.toLowerCase(),null,!0,!0)});function v(l,h,k,z){var J=w.hasOwnProperty(h)?w[h]:null;(J!==null?J.type!==0:z||!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(_(h,k,J,z)&&(k=null),z||J===null?y(h)&&(k===null?l.removeAttribute(h):l.setAttribute(h,""+k)):J.mustUseProperty?l[J.propertyName]=k===null?J.type===3?!1:"":k:(h=J.attributeName,z=J.attributeNamespace,k===null?l.removeAttribute(h):(J=J.type,k=J===3||J===4&&k===!0?"":""+k,z?l.setAttributeNS(z,h,k):l.setAttribute(h,k))))}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),j=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),A=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Y=Symbol.iterator;function te(l){return l===null||typeof l!="object"?null:(l=Y&&l[Y]||l["@@iterator"],typeof l=="function"?l:null)}var V=Object.assign,H;function q(l){if(H===void 0)try{throw Error()}catch(k){var h=k.stack.trim().match(/\n( *(at )?)/);H=h&&h[1]||""}return`
|
|
26
|
-
`+H+l}var D=!1;function $(l,h){if(!l||D)return"";D=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(st){var z=st}Reflect.construct(l,[],h)}else{try{h.call()}catch(st){z=st}l.call(h.prototype)}else{try{throw Error()}catch(st){z=st}l()}}catch(st){if(st&&z&&typeof st.stack=="string"){for(var J=st.stack.split(`
|
|
27
|
-
`),ie=z.stack.split(`
|
|
28
|
-
`),de=J.length-1,Re=ie.length-1;1<=de&&0<=Re&&J[de]!==ie[Re];)Re--;for(;1<=de&&0<=Re;de--,Re--)if(J[de]!==ie[Re]){if(de!==1||Re!==1)do if(de--,Re--,0>Re||J[de]!==ie[Re]){var Ue=`
|
|
29
|
-
`+J[de].replace(" at new "," at ");return l.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",l.displayName)),Ue}while(1<=de&&0<=Re);break}}}finally{D=!1,Error.prepareStackTrace=k}return(l=l?l.displayName||l.name:"")?q(l):""}function ne(l){switch(l.tag){case 5:return q(l.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return l=$(l.type,!1),l;case 11:return l=$(l.type.render,!1),l;case 1:return l=$(l.type,!0),l;default:return""}}function Z(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case N:return"Fragment";case j:return"Portal";case F:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case A:return(l.displayName||"Context")+".Consumer";case C:return(l._context.displayName||"Context")+".Provider";case L:var h=l.render;return l=l.displayName,l||(l=h.displayName||h.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case M:return h=l.displayName||null,h!==null?h:Z(l.type)||"Memo";case G:h=l._payload,l=l._init;try{return Z(l(h))}catch{}}return null}function Q(l){var h=l.type;switch(l.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=h.render,l=l.displayName||l.name||"",h.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(h);case 8:return h===T?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function oe(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function se(l){var h=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function ue(l){var h=se(l)?"checked":"value",k=Object.getOwnPropertyDescriptor(l.constructor.prototype,h),z=""+l[h];if(!l.hasOwnProperty(h)&&typeof k<"u"&&typeof k.get=="function"&&typeof k.set=="function"){var J=k.get,ie=k.set;return Object.defineProperty(l,h,{configurable:!0,get:function(){return J.call(this)},set:function(de){z=""+de,ie.call(this,de)}}),Object.defineProperty(l,h,{enumerable:k.enumerable}),{getValue:function(){return z},setValue:function(de){z=""+de},stopTracking:function(){l._valueTracker=null,delete l[h]}}}}function ve(l){l._valueTracker||(l._valueTracker=ue(l))}function Pe(l){if(!l)return!1;var h=l._valueTracker;if(!h)return!0;var k=h.getValue(),z="";return l&&(z=se(l)?l.checked?"true":"false":l.value),l=z,l!==k?(h.setValue(l),!0):!1}function ke(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Ne(l,h){var k=h.checked;return V({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:k??l._wrapperState.initialChecked})}function xe(l,h){var k=h.defaultValue==null?"":h.defaultValue,z=h.checked!=null?h.checked:h.defaultChecked;k=oe(h.value!=null?h.value:k),l._wrapperState={initialChecked:z,initialValue:k,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function ye(l,h){h=h.checked,h!=null&&v(l,"checked",h,!1)}function Ie(l,h){ye(l,h);var k=oe(h.value),z=h.type;if(k!=null)z==="number"?(k===0&&l.value===""||l.value!=k)&&(l.value=""+k):l.value!==""+k&&(l.value=""+k);else if(z==="submit"||z==="reset"){l.removeAttribute("value");return}h.hasOwnProperty("value")?_e(l,h.type,k):h.hasOwnProperty("defaultValue")&&_e(l,h.type,oe(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(l.defaultChecked=!!h.defaultChecked)}function me(l,h,k){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var z=h.type;if(!(z!=="submit"&&z!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+l._wrapperState.initialValue,k||h===l.value||(l.value=h),l.defaultValue=h}k=l.name,k!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,k!==""&&(l.name=k)}function _e(l,h,k){(h!=="number"||ke(l.ownerDocument)!==l)&&(k==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+k&&(l.defaultValue=""+k))}var Ae=Array.isArray;function Le(l,h,k,z){if(l=l.options,h){h={};for(var J=0;J<k.length;J++)h["$"+k[J]]=!0;for(k=0;k<l.length;k++)J=h.hasOwnProperty("$"+l[k].value),l[k].selected!==J&&(l[k].selected=J),J&&z&&(l[k].defaultSelected=!0)}else{for(k=""+oe(k),h=null,J=0;J<l.length;J++){if(l[J].value===k){l[J].selected=!0,z&&(l[J].defaultSelected=!0);return}h!==null||l[J].disabled||(h=l[J])}h!==null&&(h.selected=!0)}}function ge(l,h){if(h.dangerouslySetInnerHTML!=null)throw Error(t(91));return V({},h,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function Te(l,h){var k=h.value;if(k==null){if(k=h.children,h=h.defaultValue,k!=null){if(h!=null)throw Error(t(92));if(Ae(k)){if(1<k.length)throw Error(t(93));k=k[0]}h=k}h==null&&(h=""),k=h}l._wrapperState={initialValue:oe(k)}}function Fe(l,h){var k=oe(h.value),z=oe(h.defaultValue);k!=null&&(k=""+k,k!==l.value&&(l.value=k),h.defaultValue==null&&l.defaultValue!==k&&(l.defaultValue=k)),z!=null&&(l.defaultValue=""+z)}function Ke(l){var h=l.textContent;h===l._wrapperState.initialValue&&h!==""&&h!==null&&(l.value=h)}function it(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rt(l,h){return l==null||l==="http://www.w3.org/1999/xhtml"?it(h):l==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var at,bt=function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,k,z,J){MSApp.execUnsafeLocalFunction(function(){return l(h,k,z,J)})}:l}(function(l,h){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=h;else{for(at=at||document.createElement("div"),at.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=at.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;h.firstChild;)l.appendChild(h.firstChild)}});function yt(l,h){if(h){var k=l.firstChild;if(k&&k===l.lastChild&&k.nodeType===3){k.nodeValue=h;return}}l.textContent=h}var ht={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zt=["Webkit","ms","Moz","O"];Object.keys(ht).forEach(function(l){zt.forEach(function(h){h=h+l.charAt(0).toUpperCase()+l.substring(1),ht[h]=ht[l]})});function Ot(l,h,k){return h==null||typeof h=="boolean"||h===""?"":k||typeof h!="number"||h===0||ht.hasOwnProperty(l)&&ht[l]?(""+h).trim():h+"px"}function Ut(l,h){l=l.style;for(var k in h)if(h.hasOwnProperty(k)){var z=k.indexOf("--")===0,J=Ot(k,h[k],z);k==="float"&&(k="cssFloat"),z?l.setProperty(k,J):l[k]=J}}var $t=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oe(l,h){if(h){if($t[l]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(t(137,l));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(t(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(t(61))}if(h.style!=null&&typeof h.style!="object")throw Error(t(62))}}function Me(l,h){if(l.indexOf("-")===-1)return typeof h.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mt=null;function Mt(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var Lt=null,At=null,fr=null;function Qt(l){if(l=vu(l)){if(typeof Lt!="function")throw Error(t(280));var h=l.stateNode;h&&(h=yi(h),Lt(l.stateNode,l.type,h))}}function ze(l){At?fr?fr.push(l):fr=[l]:At=l}function qe(){if(At){var l=At,h=fr;if(fr=At=null,Qt(l),h)for(l=0;l<h.length;l++)Qt(h[l])}}function vt(l,h){return l(h)}function pt(){}var Je=!1;function _t(l,h,k){if(Je)return l(h,k);Je=!0;try{return vt(l,h,k)}finally{Je=!1,(At!==null||fr!==null)&&(pt(),qe())}}function Ye(l,h){var k=l.stateNode;if(k===null)return null;var z=yi(k);if(z===null)return null;k=z[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(z=!z.disabled)||(l=l.type,z=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!z;break e;default:l=!1}if(l)return null;if(k&&typeof k!="function")throw Error(t(231,h,typeof k));return k}var Pt=!1;if(s)try{var Dt={};Object.defineProperty(Dt,"passive",{get:function(){Pt=!0}}),window.addEventListener("test",Dt,Dt),window.removeEventListener("test",Dt,Dt)}catch{Pt=!1}function Wt(l,h,k,z,J,ie,de,Re,Ue){var st=Array.prototype.slice.call(arguments,3);try{h.apply(k,st)}catch(Et){this.onError(Et)}}var Zt=!1,rr=null,_r=!1,Hn=null,ti={onError:function(l){Zt=!0,rr=l}};function Vn(l,h,k,z,J,ie,de,Re,Ue){Zt=!1,rr=null,Wt.apply(ti,arguments)}function Ci(l,h,k,z,J,ie,de,Re,Ue){if(Vn.apply(this,arguments),Zt){if(Zt){var st=rr;Zt=!1,rr=null}else throw Error(t(198));_r||(_r=!0,Hn=st)}}function En(l){var h=l,k=l;if(l.alternate)for(;h.return;)h=h.return;else{l=h;do h=l,(h.flags&4098)!==0&&(k=h.return),l=h.return;while(l)}return h.tag===3?k:null}function ki(l){if(l.tag===13){var h=l.memoizedState;if(h===null&&(l=l.alternate,l!==null&&(h=l.memoizedState)),h!==null)return h.dehydrated}return null}function bi(l){if(En(l)!==l)throw Error(t(188))}function _a(l){var h=l.alternate;if(!h){if(h=En(l),h===null)throw Error(t(188));return h!==l?null:l}for(var k=l,z=h;;){var J=k.return;if(J===null)break;var ie=J.alternate;if(ie===null){if(z=J.return,z!==null){k=z;continue}break}if(J.child===ie.child){for(ie=J.child;ie;){if(ie===k)return bi(J),l;if(ie===z)return bi(J),h;ie=ie.sibling}throw Error(t(188))}if(k.return!==z.return)k=J,z=ie;else{for(var de=!1,Re=J.child;Re;){if(Re===k){de=!0,k=J,z=ie;break}if(Re===z){de=!0,z=J,k=ie;break}Re=Re.sibling}if(!de){for(Re=ie.child;Re;){if(Re===k){de=!0,k=ie,z=J;break}if(Re===z){de=!0,z=ie,k=J;break}Re=Re.sibling}if(!de)throw Error(t(189))}}if(k.alternate!==z)throw Error(t(190))}if(k.tag!==3)throw Error(t(188));return k.stateNode.current===k?l:h}function ua(l){return l=_a(l),l!==null?ao(l):null}function ao(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var h=ao(l);if(h!==null)return h;l=l.sibling}return null}var ws=r.unstable_scheduleCallback,Go=r.unstable_cancelCallback,tu=r.unstable_shouldYield,mc=r.unstable_requestPaint,Nn=r.unstable_now,Bu=r.unstable_getCurrentPriorityLevel,oo=r.unstable_ImmediatePriority,dl=r.unstable_UserBlockingPriority,Vs=r.unstable_NormalPriority,qu=r.unstable_LowPriority,ru=r.unstable_IdlePriority,so=null,hi=null;function $r(l){if(hi&&typeof hi.onCommitFiberRoot=="function")try{hi.onCommitFiberRoot(so,l,void 0,(l.current.flags&128)===128)}catch{}}var Ar=Math.clz32?Math.clz32:Li,nn=Math.log,di=Math.LN2;function Li(l){return l>>>=0,l===0?32:31-(nn(l)/di|0)|0}var Ma=64,Ia=4194304;function ri(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Ni(l,h){var k=l.pendingLanes;if(k===0)return 0;var z=0,J=l.suspendedLanes,ie=l.pingedLanes,de=k&268435455;if(de!==0){var Re=de&~J;Re!==0?z=ri(Re):(ie&=de,ie!==0&&(z=ri(ie)))}else de=k&~J,de!==0?z=ri(de):ie!==0&&(z=ri(ie));if(z===0)return 0;if(h!==0&&h!==z&&(h&J)===0&&(J=z&-z,ie=h&-h,J>=ie||J===16&&(ie&4194240)!==0))return h;if((z&4)!==0&&(z|=k&16),h=l.entangledLanes,h!==0)for(l=l.entanglements,h&=z;0<h;)k=31-Ar(h),J=1<<k,z|=l[k],h&=~J;return z}function pl(l,h){switch(l){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ca(l,h){for(var k=l.suspendedLanes,z=l.pingedLanes,J=l.expirationTimes,ie=l.pendingLanes;0<ie;){var de=31-Ar(ie),Re=1<<de,Ue=J[de];Ue===-1?((Re&k)===0||(Re&z)!==0)&&(J[de]=pl(Re,h)):Ue<=h&&(l.expiredLanes|=Re),ie&=~Re}}function Wo(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function nu(){var l=Ma;return Ma<<=1,(Ma&4194240)===0&&(Ma=64),l}function fa(l){for(var h=[],k=0;31>k;k++)h.push(l);return h}function Gs(l,h,k){l.pendingLanes|=h,h!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,h=31-Ar(h),l[h]=k}function af(l,h){var k=l.pendingLanes&~h;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=h,l.mutableReadLanes&=h,l.entangledLanes&=h,h=l.entanglements;var z=l.eventTimes;for(l=l.expirationTimes;0<k;){var J=31-Ar(k),ie=1<<J;h[J]=0,z[J]=-1,l[J]=-1,k&=~ie}}function iu(l,h){var k=l.entangledLanes|=h;for(l=l.entanglements;k;){var z=31-Ar(k),J=1<<z;J&h|l[z]&h&&(l[z]|=h),k&=~J}}var Tr=0;function _s(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var Ws,$s,yc,$o,Ss,xs=!1,Es=[],fn=null,Yo=null,ja=null,It=new Map,Ys=new Map,lo=[],Oo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zu(l,h){switch(l){case"focusin":case"focusout":fn=null;break;case"dragenter":case"dragleave":Yo=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":It.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(h.pointerId)}}function Xs(l,h,k,z,J,ie){return l===null||l.nativeEvent!==ie?(l={blockedOn:h,domEventName:k,eventSystemFlags:z,nativeEvent:ie,targetContainers:[J]},h!==null&&(h=vu(h),h!==null&&$s(h)),l):(l.eventSystemFlags|=z,h=l.targetContainers,J!==null&&h.indexOf(J)===-1&&h.push(J),l)}function Tn(l,h,k,z,J){switch(h){case"focusin":return fn=Xs(fn,l,h,k,z,J),!0;case"dragenter":return Yo=Xs(Yo,l,h,k,z,J),!0;case"mouseover":return ja=Xs(ja,l,h,k,z,J),!0;case"pointerover":var ie=J.pointerId;return It.set(ie,Xs(It.get(ie)||null,l,h,k,z,J)),!0;case"gotpointercapture":return ie=J.pointerId,Ys.set(ie,Xs(Ys.get(ie)||null,l,h,k,z,J)),!0}return!1}function Ks(l){var h=Ls(l.target);if(h!==null){var k=En(h);if(k!==null){if(h=k.tag,h===13){if(h=ki(k),h!==null){l.blockedOn=h,Ss(l.priority,function(){yc(k)});return}}else if(h===3&&k.stateNode.current.memoizedState.isDehydrated){l.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}l.blockedOn=null}function au(l){if(l.blockedOn!==null)return!1;for(var h=l.targetContainers;0<h.length;){var k=gl(l.domEventName,l.eventSystemFlags,h[0],l.nativeEvent);if(k===null){k=l.nativeEvent;var z=new k.constructor(k.type,k);mt=z,k.target.dispatchEvent(z),mt=null}else return h=vu(k),h!==null&&$s(h),l.blockedOn=k,!1;h.shift()}return!0}function ou(l,h,k){au(l)&&k.delete(h)}function of(){xs=!1,fn!==null&&au(fn)&&(fn=null),Yo!==null&&au(Yo)&&(Yo=null),ja!==null&&au(ja)&&(ja=null),It.forEach(ou),Ys.forEach(ou)}function uo(l,h){l.blockedOn===h&&(l.blockedOn=null,xs||(xs=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,of)))}function ni(l){function h(J){return uo(J,l)}if(0<Es.length){uo(Es[0],l);for(var k=1;k<Es.length;k++){var z=Es[k];z.blockedOn===l&&(z.blockedOn=null)}}for(fn!==null&&uo(fn,l),Yo!==null&&uo(Yo,l),ja!==null&&uo(ja,l),It.forEach(h),Ys.forEach(h),k=0;k<lo.length;k++)z=lo[k],z.blockedOn===l&&(z.blockedOn=null);for(;0<lo.length&&(k=lo[0],k.blockedOn===null);)Ks(k),k.blockedOn===null&&lo.shift()}var Fa=E.ReactCurrentBatchConfig,su=!0;function Ti(l,h,k,z){var J=Tr,ie=Fa.transition;Fa.transition=null;try{Tr=1,Ao(l,h,k,z)}finally{Tr=J,Fa.transition=ie}}function Da(l,h,k,z){var J=Tr,ie=Fa.transition;Fa.transition=null;try{Tr=4,Ao(l,h,k,z)}finally{Tr=J,Fa.transition=ie}}function Ao(l,h,k,z){if(su){var J=gl(l,h,k,z);if(J===null)du(l,h,z,Ps,k),zu(l,z);else if(Tn(J,l,h,k,z))z.stopPropagation();else if(zu(l,z),h&4&&-1<Oo.indexOf(l)){for(;J!==null;){var ie=vu(J);if(ie!==null&&Ws(ie),ie=gl(l,h,k,z),ie===null&&du(l,h,z,Ps,k),ie===J)break;J=ie}J!==null&&z.stopPropagation()}else du(l,h,z,null,k)}}var Ps=null;function gl(l,h,k,z){if(Ps=null,l=Mt(z),l=Ls(l),l!==null)if(h=En(l),h===null)l=null;else if(k=h.tag,k===13){if(l=ki(h),l!==null)return l;l=null}else if(k===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;l=null}else h!==l&&(l=null);return Ps=l,null}function Uu(l){switch(l){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bu()){case oo:return 1;case dl:return 4;case Vs:case qu:return 16;case ru:return 536870912;default:return 16}default:return 16}}var ii=null,Ri=null,Mi=null;function vl(){if(Mi)return Mi;var l,h=Ri,k=h.length,z,J="value"in ii?ii.value:ii.textContent,ie=J.length;for(l=0;l<k&&h[l]===J[l];l++);var de=k-l;for(z=1;z<=de&&h[k-z]===J[ie-z];z++);return Mi=J.slice(l,1<z?1-z:void 0)}function Sa(l){var h=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&h===13&&(l=13)):l=h,l===10&&(l=13),32<=l||l===13?l:0}function vn(){return!0}function Ii(){return!1}function mn(l){function h(k,z,J,ie,de){this._reactName=k,this._targetInst=J,this.type=z,this.nativeEvent=ie,this.target=de,this.currentTarget=null;for(var Re in l)l.hasOwnProperty(Re)&&(k=l[Re],this[Re]=k?k(ie):ie[Re]);return this.isDefaultPrevented=(ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue===!1)?vn:Ii,this.isPropagationStopped=Ii,this}return V(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),h}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ji=mn(Qi),Ba=V({},Qi,{view:0,detail:0}),lu=mn(Ba),Os,Zs,Gn,pi=V({},Ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ft,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Gn&&(Gn&&l.type==="mousemove"?(Os=l.screenX-Gn.screenX,Zs=l.screenY-Gn.screenY):Zs=Os=0,Gn=l),Os)},movementY:function(l){return"movementY"in l?l.movementY:Zs}}),Zr=mn(pi),Qs=V({},pi,{dataTransfer:0}),qa=mn(Qs),ml=V({},Ba,{relatedTarget:0}),Xo=mn(ml),yl=V({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),Ko=mn(yl),uu=V({},Qi,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),X=mn(uu),fe=V({},Qi,{data:0}),Ce=mn(fe),De={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},et={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ft={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function St(l){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(l):(l=ft[l])?!!h[l]:!1}function Ft(){return St}var nr=V({},Ba,{key:function(l){if(l.key){var h=De[l.key]||l.key;if(h!=="Unidentified")return h}return l.type==="keypress"?(l=Sa(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?et[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ft,charCode:function(l){return l.type==="keypress"?Sa(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Sa(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),gr=mn(nr),dr=V({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sr=mn(dr),Pn=V({},Ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ft}),yn=mn(Pn),Rn=V({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kn=mn(Rn),ai=V({},pi,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),za=mn(ai),xa=[9,13,27,32],Ea=s&&"CompositionEvent"in window,Zo=null;s&&"documentMode"in document&&(Zo=document.documentMode);var Qo=s&&"TextEvent"in window&&!Zo,ji=s&&(!Ea||Zo&&8<Zo&&11>=Zo),Ua=" ",Js=!1;function bl(l,h){switch(l){case"keyup":return xa.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ea(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Qr=!1;function el(l,h){switch(l){case"compositionend":return ea(h);case"keypress":return h.which!==32?null:(Js=!0,Ua);case"textInput":return l=h.data,l===Ua&&Js?null:l;default:return null}}function wl(l,h){if(Qr)return l==="compositionend"||!Ea&&bl(l,h)?(l=vl(),Mi=Ri=ii=null,Qr=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return ji&&h.locale!=="ko"?null:h.data;default:return null}}var Pa={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ha(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h==="input"?!!Pa[l.type]:h==="textarea"}function wi(l,h,k,z){ze(z),h=bc(h,"onChange"),0<h.length&&(k=new Ji("onChange","change",null,k,z),l.push({event:k,listeners:h}))}var tl=null,co=null;function Hu(l){fu(l,0)}function gi(l){var h=si(l);if(Pe(h))return l}function Fi(l,h){if(l==="change")return h}var As=!1;if(s){var Co;if(s){var vi="oninput"in document;if(!vi){var Jo=document.createElement("div");Jo.setAttribute("oninput","return;"),vi=typeof Jo.oninput=="function"}Co=vi}else Co=!1;As=Co&&(!document.documentMode||9<document.documentMode)}function oi(){tl&&(tl.detachEvent("onpropertychange",Di),co=tl=null)}function Di(l){if(l.propertyName==="value"&&gi(co)){var h=[];wi(h,co,l,Mt(l)),_t(Hu,h)}}function es(l,h,k){l==="focusin"?(oi(),tl=h,co=k,tl.attachEvent("onpropertychange",Di)):l==="focusout"&&oi()}function Vr(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return gi(co)}function fo(l,h){if(l==="click")return gi(h)}function rl(l,h){if(l==="input"||l==="change")return gi(h)}function ko(l,h){return l===h&&(l!==0||1/l===1/h)||l!==l&&h!==h}var Rr=typeof Object.is=="function"?Object.is:ko;function Lo(l,h){if(Rr(l,h))return!0;if(typeof l!="object"||l===null||typeof h!="object"||h===null)return!1;var k=Object.keys(l),z=Object.keys(h);if(k.length!==z.length)return!1;for(z=0;z<k.length;z++){var J=k[z];if(!c.call(h,J)||!Rr(l[J],h[J]))return!1}return!0}function Wn(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function kr(l,h){var k=Wn(l);l=0;for(var z;k;){if(k.nodeType===3){if(z=l+k.textContent.length,l<=h&&z>=h)return{node:k,offset:h-l};l=z}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=Wn(k)}}function bn(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?bn(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function $n(){for(var l=window,h=ke();h instanceof l.HTMLIFrameElement;){try{var k=typeof h.contentWindow.location.href=="string"}catch{k=!1}if(k)l=h.contentWindow;else break;h=ke(l.document)}return h}function ts(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}function No(l){var h=$n(),k=l.focusedElem,z=l.selectionRange;if(h!==k&&k&&k.ownerDocument&&bn(k.ownerDocument.documentElement,k)){if(z!==null&&ts(k)){if(h=z.start,l=z.end,l===void 0&&(l=h),"selectionStart"in k)k.selectionStart=h,k.selectionEnd=Math.min(l,k.value.length);else if(l=(h=k.ownerDocument||document)&&h.defaultView||window,l.getSelection){l=l.getSelection();var J=k.textContent.length,ie=Math.min(z.start,J);z=z.end===void 0?ie:Math.min(z.end,J),!l.extend&&ie>z&&(J=z,z=ie,ie=J),J=kr(k,ie);var de=kr(k,z);J&&de&&(l.rangeCount!==1||l.anchorNode!==J.node||l.anchorOffset!==J.offset||l.focusNode!==de.node||l.focusOffset!==de.offset)&&(h=h.createRange(),h.setStart(J.node,J.offset),l.removeAllRanges(),ie>z?(l.addRange(h),l.extend(de.node,de.offset)):(h.setEnd(de.node,de.offset),l.addRange(h)))}}for(h=[],l=k;l=l.parentNode;)l.nodeType===1&&h.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<h.length;k++)l=h[k],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var To=s&&"documentMode"in document&&11>=document.documentMode,Va=null,On=null,ho=null,Ro=!1;function Mo(l,h,k){var z=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;Ro||Va==null||Va!==ke(z)||(z=Va,"selectionStart"in z&&ts(z)?z={start:z.selectionStart,end:z.selectionEnd}:(z=(z.ownerDocument&&z.ownerDocument.defaultView||window).getSelection(),z={anchorNode:z.anchorNode,anchorOffset:z.anchorOffset,focusNode:z.focusNode,focusOffset:z.focusOffset}),ho&&Lo(ho,z)||(ho=z,z=bc(On,"onSelect"),0<z.length&&(h=new Ji("onSelect","select",null,h,k),l.push({event:h,listeners:z}),h.target=Va)))}function Bi(l,h){var k={};return k[l.toLowerCase()]=h.toLowerCase(),k["Webkit"+l]="webkit"+h,k["Moz"+l]="moz"+h,k}var an={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionend:Bi("Transition","TransitionEnd")},_i={},Jr={};s&&(Jr=document.createElement("div").style,"AnimationEvent"in window||(delete an.animationend.animation,delete an.animationiteration.animation,delete an.animationstart.animation),"TransitionEvent"in window||delete an.transitionend.transition);function Gr(l){if(_i[l])return _i[l];if(!an[l])return l;var h=an[l],k;for(k in h)if(h.hasOwnProperty(k)&&k in Jr)return _i[l]=h[k];return l}var Mn=Gr("animationend"),Zn=Gr("animationiteration"),Io=Gr("animationstart"),_l=Gr("transitionend"),nl=new Map,cu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jo(l,h){nl.set(l,h),i(h,[l])}for(var Sl=0;Sl<cu.length;Sl++){var mi=cu[Sl],Ga=mi.toLowerCase(),xl=mi[0].toUpperCase()+mi.slice(1);jo(Ga,"on"+xl)}jo(Mn,"onAnimationEnd"),jo(Zn,"onAnimationIteration"),jo(Io,"onAnimationStart"),jo("dblclick","onDoubleClick"),jo("focusin","onFocus"),jo("focusout","onBlur"),jo(_l,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function El(l,h,k){var z=l.type||"unknown-event";l.currentTarget=k,Ci(z,h,void 0,l),l.currentTarget=null}function fu(l,h){h=(h&4)!==0;for(var k=0;k<l.length;k++){var z=l[k],J=z.event;z=z.listeners;e:{var ie=void 0;if(h)for(var de=z.length-1;0<=de;de--){var Re=z[de],Ue=Re.instance,st=Re.currentTarget;if(Re=Re.listener,Ue!==ie&&J.isPropagationStopped())break e;El(J,Re,st),ie=Ue}else for(de=0;de<z.length;de++){if(Re=z[de],Ue=Re.instance,st=Re.currentTarget,Re=Re.listener,Ue!==ie&&J.isPropagationStopped())break e;El(J,Re,st),ie=Ue}}}if(_r)throw l=Hn,_r=!1,Hn=null,l}function on(l,h){var k=h[ha];k===void 0&&(k=h[ha]=new Set);var z=l+"__bubble";k.has(z)||(hu(h,l,2,!1),k.add(z))}function Vu(l,h,k){var z=0;h&&(z|=4),hu(k,l,z,h)}var Pl="_reactListening"+Math.random().toString(36).slice(2);function Cs(l){if(!l[Pl]){l[Pl]=!0,n.forEach(function(k){k!=="selectionchange"&&(sf.has(k)||Vu(k,!1,l),Vu(k,!0,l))});var h=l.nodeType===9?l:l.ownerDocument;h===null||h[Pl]||(h[Pl]=!0,Vu("selectionchange",!1,h))}}function hu(l,h,k,z){switch(Uu(h)){case 1:var J=Ti;break;case 4:J=Da;break;default:J=Ao}k=J.bind(null,h,k,l),J=void 0,!Pt||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(J=!0),z?J!==void 0?l.addEventListener(h,k,{capture:!0,passive:J}):l.addEventListener(h,k,!0):J!==void 0?l.addEventListener(h,k,{passive:J}):l.addEventListener(h,k,!1)}function du(l,h,k,z,J){var ie=z;if((h&1)===0&&(h&2)===0&&z!==null)e:for(;;){if(z===null)return;var de=z.tag;if(de===3||de===4){var Re=z.stateNode.containerInfo;if(Re===J||Re.nodeType===8&&Re.parentNode===J)break;if(de===4)for(de=z.return;de!==null;){var Ue=de.tag;if((Ue===3||Ue===4)&&(Ue=de.stateNode.containerInfo,Ue===J||Ue.nodeType===8&&Ue.parentNode===J))return;de=de.return}for(;Re!==null;){if(de=Ls(Re),de===null)return;if(Ue=de.tag,Ue===5||Ue===6){z=ie=de;continue e}Re=Re.parentNode}}z=z.return}_t(function(){var st=ie,Et=Mt(k),Ct=[];e:{var xt=nl.get(l);if(xt!==void 0){var Vt=Ji,Jt=l;switch(l){case"keypress":if(Sa(k)===0)break e;case"keydown":case"keyup":Vt=gr;break;case"focusin":Jt="focus",Vt=Xo;break;case"focusout":Jt="blur",Vt=Xo;break;case"beforeblur":case"afterblur":Vt=Xo;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Vt=Zr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Vt=qa;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Vt=yn;break;case Mn:case Zn:case Io:Vt=Ko;break;case _l:Vt=Kn;break;case"scroll":Vt=lu;break;case"wheel":Vt=za;break;case"copy":case"cut":case"paste":Vt=X;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Vt=Sr}var ar=(h&4)!==0,Wi=!ar&&l==="scroll",tt=ar?xt!==null?xt+"Capture":null:xt;ar=[];for(var Ge=st,nt;Ge!==null;){nt=Ge;var Nt=nt.stateNode;if(nt.tag===5&&Nt!==null&&(nt=Nt,tt!==null&&(Nt=Ye(Ge,tt),Nt!=null&&ar.push(pu(Ge,Nt,nt)))),Wi)break;Ge=Ge.return}0<ar.length&&(xt=new Vt(xt,Jt,null,k,Et),Ct.push({event:xt,listeners:ar}))}}if((h&7)===0){e:{if(xt=l==="mouseover"||l==="pointerover",Vt=l==="mouseout"||l==="pointerout",xt&&k!==mt&&(Jt=k.relatedTarget||k.fromElement)&&(Ls(Jt)||Jt[Ui]))break e;if((Vt||xt)&&(xt=Et.window===Et?Et:(xt=Et.ownerDocument)?xt.defaultView||xt.parentWindow:window,Vt?(Jt=k.relatedTarget||k.toElement,Vt=st,Jt=Jt?Ls(Jt):null,Jt!==null&&(Wi=En(Jt),Jt!==Wi||Jt.tag!==5&&Jt.tag!==6)&&(Jt=null)):(Vt=null,Jt=st),Vt!==Jt)){if(ar=Zr,Nt="onMouseLeave",tt="onMouseEnter",Ge="mouse",(l==="pointerout"||l==="pointerover")&&(ar=Sr,Nt="onPointerLeave",tt="onPointerEnter",Ge="pointer"),Wi=Vt==null?xt:si(Vt),nt=Jt==null?xt:si(Jt),xt=new ar(Nt,Ge+"leave",Vt,k,Et),xt.target=Wi,xt.relatedTarget=nt,Nt=null,Ls(Et)===st&&(ar=new ar(tt,Ge+"enter",Jt,k,Et),ar.target=nt,ar.relatedTarget=Wi,Nt=ar),Wi=Nt,Vt&&Jt)t:{for(ar=Vt,tt=Jt,Ge=0,nt=ar;nt;nt=il(nt))Ge++;for(nt=0,Nt=tt;Nt;Nt=il(Nt))nt++;for(;0<Ge-nt;)ar=il(ar),Ge--;for(;0<nt-Ge;)tt=il(tt),nt--;for(;Ge--;){if(ar===tt||tt!==null&&ar===tt.alternate)break t;ar=il(ar),tt=il(tt)}ar=null}else ar=null;Vt!==null&&Bf(Ct,xt,Vt,ar,!1),Jt!==null&&Wi!==null&&Bf(Ct,Wi,Jt,ar,!0)}}e:{if(xt=st?si(st):window,Vt=xt.nodeName&&xt.nodeName.toLowerCase(),Vt==="select"||Vt==="input"&&xt.type==="file")var or=Fi;else if(Ha(xt))if(As)or=rl;else{or=Vr;var ur=es}else(Vt=xt.nodeName)&&Vt.toLowerCase()==="input"&&(xt.type==="checkbox"||xt.type==="radio")&&(or=fo);if(or&&(or=or(l,st))){wi(Ct,or,k,Et);break e}ur&&ur(l,xt,st),l==="focusout"&&(ur=xt._wrapperState)&&ur.controlled&&xt.type==="number"&&_e(xt,"number",xt.value)}switch(ur=st?si(st):window,l){case"focusin":(Ha(ur)||ur.contentEditable==="true")&&(Va=ur,On=st,ho=null);break;case"focusout":ho=On=Va=null;break;case"mousedown":Ro=!0;break;case"contextmenu":case"mouseup":case"dragend":Ro=!1,Mo(Ct,k,Et);break;case"selectionchange":if(To)break;case"keydown":case"keyup":Mo(Ct,k,Et)}var cr;if(Ea)e:{switch(l){case"compositionstart":var mr="onCompositionStart";break e;case"compositionend":mr="onCompositionEnd";break e;case"compositionupdate":mr="onCompositionUpdate";break e}mr=void 0}else Qr?bl(l,k)&&(mr="onCompositionEnd"):l==="keydown"&&k.keyCode===229&&(mr="onCompositionStart");mr&&(ji&&k.locale!=="ko"&&(Qr||mr!=="onCompositionStart"?mr==="onCompositionEnd"&&Qr&&(cr=vl()):(ii=Et,Ri="value"in ii?ii.value:ii.textContent,Qr=!0)),ur=bc(st,mr),0<ur.length&&(mr=new Ce(mr,l,null,k,Et),Ct.push({event:mr,listeners:ur}),cr?mr.data=cr:(cr=ea(k),cr!==null&&(mr.data=cr)))),(cr=Qo?el(l,k):wl(l,k))&&(st=bc(st,"onBeforeInput"),0<st.length&&(Et=new Ce("onBeforeInput","beforeinput",null,k,Et),Ct.push({event:Et,listeners:st}),Et.data=cr))}fu(Ct,h)})}function pu(l,h,k){return{instance:l,listener:h,currentTarget:k}}function bc(l,h){for(var k=h+"Capture",z=[];l!==null;){var J=l,ie=J.stateNode;J.tag===5&&ie!==null&&(J=ie,ie=Ye(l,k),ie!=null&&z.unshift(pu(l,ie,J)),ie=Ye(l,h),ie!=null&&z.push(pu(l,ie,J))),l=l.return}return z}function il(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function Bf(l,h,k,z,J){for(var ie=h._reactName,de=[];k!==null&&k!==z;){var Re=k,Ue=Re.alternate,st=Re.stateNode;if(Ue!==null&&Ue===z)break;Re.tag===5&&st!==null&&(Re=st,J?(Ue=Ye(k,ie),Ue!=null&&de.unshift(pu(k,Ue,Re))):J||(Ue=Ye(k,ie),Ue!=null&&de.push(pu(k,Ue,Re)))),k=k.return}de.length!==0&&l.push({event:h,listeners:de})}var qh=/\r\n?/g,qf=/\u0000|\uFFFD/g;function lf(l){return(typeof l=="string"?l:""+l).replace(qh,`
|
|
30
|
-
`).replace(qf,"")}function Gu(l,h,k){if(h=lf(h),lf(l)!==h&&k)throw Error(t(425))}function ks(){}var Wu=null,Ol=null;function uf(l,h){return l==="textarea"||l==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var Wa=typeof setTimeout=="function"?setTimeout:void 0,wc=typeof clearTimeout=="function"?clearTimeout:void 0,$u=typeof Promise=="function"?Promise:void 0,zf=typeof queueMicrotask=="function"?queueMicrotask:typeof $u<"u"?function(l){return $u.resolve(null).then(l).catch(Uf)}:Wa;function Uf(l){setTimeout(function(){throw l})}function _c(l,h){var k=h,z=0;do{var J=k.nextSibling;if(l.removeChild(k),J&&J.nodeType===8)if(k=J.data,k==="/$"){if(z===0){l.removeChild(J),ni(h);return}z--}else k!=="$"&&k!=="$?"&&k!=="$!"||z++;k=J}while(k);ni(h)}function qi(l){for(;l!=null;l=l.nextSibling){var h=l.nodeType;if(h===1||h===3)break;if(h===8){if(h=l.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return l}function zi(l){l=l.previousSibling;for(var h=0;l;){if(l.nodeType===8){var k=l.data;if(k==="$"||k==="$!"||k==="$?"){if(h===0)return l;h--}else k==="/$"&&h++}l=l.previousSibling}return null}var ta=Math.random().toString(36).slice(2),po="__reactFiber$"+ta,gu="__reactProps$"+ta,Ui="__reactContainer$"+ta,ha="__reactEvents$"+ta,Hf="__reactListeners$"+ta,Vf="__reactHandles$"+ta;function Ls(l){var h=l[po];if(h)return h;for(var k=l.parentNode;k;){if(h=k[Ui]||k[po]){if(k=h.alternate,h.child!==null||k!==null&&k.child!==null)for(l=zi(l);l!==null;){if(k=l[po])return k;l=zi(l)}return h}l=k,k=l.parentNode}return null}function vu(l){return l=l[po]||l[Ui],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function si(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(t(33))}function yi(l){return l[gu]||null}var Sc=[],rs=-1;function go(l){return{current:l}}function Yr(l){0>rs||(l.current=Sc[rs],Sc[rs]=null,rs--)}function en(l,h){rs++,Sc[rs]=l.current,l.current=h}var ns={},Si=go(ns),ra=go(!1),al=ns;function Al(l,h){var k=l.type.contextTypes;if(!k)return ns;var z=l.stateNode;if(z&&z.__reactInternalMemoizedUnmaskedChildContext===h)return z.__reactInternalMemoizedMaskedChildContext;var J={},ie;for(ie in k)J[ie]=h[ie];return z&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=h,l.__reactInternalMemoizedMaskedChildContext=J),J}function na(l){return l=l.childContextTypes,l!=null}function mu(){Yr(ra),Yr(Si)}function cf(l,h,k){if(Si.current!==ns)throw Error(t(168));en(Si,h),en(ra,k)}function Yu(l,h,k){var z=l.stateNode;if(h=h.childContextTypes,typeof z.getChildContext!="function")return k;z=z.getChildContext();for(var J in z)if(!(J in h))throw Error(t(108,Q(l)||"Unknown",J));return V({},k,z)}function is(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||ns,al=Si.current,en(Si,l),en(ra,ra.current),!0}function Gf(l,h,k){var z=l.stateNode;if(!z)throw Error(t(169));k?(l=Yu(l,h,al),z.__reactInternalMemoizedMergedChildContext=l,Yr(ra),Yr(Si),en(Si,l)):Yr(ra),en(ra,k)}var as=null,Cl=!1,R=!1;function U(l){as===null?as=[l]:as.push(l)}function ee(l){Cl=!0,U(l)}function ae(){if(!R&&as!==null){R=!0;var l=0,h=Tr;try{var k=as;for(Tr=1;l<k.length;l++){var z=k[l];do z=z(!0);while(z!==null)}as=null,Cl=!1}catch(J){throw as!==null&&(as=as.slice(l+1)),ws(oo,ae),J}finally{Tr=h,R=!1}}return null}var ce=[],he=0,pe=null,be=0,we=[],Ee=0,Be=null,Qe=1,$e="";function We(l,h){ce[he++]=be,ce[he++]=pe,pe=l,be=h}function wt(l,h,k){we[Ee++]=Qe,we[Ee++]=$e,we[Ee++]=Be,Be=l;var z=Qe;l=$e;var J=32-Ar(z)-1;z&=~(1<<J),k+=1;var ie=32-Ar(h)+J;if(30<ie){var de=J-J%5;ie=(z&(1<<de)-1).toString(32),z>>=de,J-=de,Qe=1<<32-Ar(h)+J|k<<J|z,$e=ie+l}else Qe=1<<ie|k<<J|z,$e=l}function lt(l){l.return!==null&&(We(l,1),wt(l,1,0))}function je(l){for(;l===pe;)pe=ce[--he],ce[he]=null,be=ce[--he],ce[he]=null;for(;l===Be;)Be=we[--Ee],we[Ee]=null,$e=we[--Ee],we[Ee]=null,Qe=we[--Ee],we[Ee]=null}var He=null,Ve=null,ct=!1,gt=null;function Bt(l,h){var k=ul(5,null,null,0);k.elementType="DELETED",k.stateNode=h,k.return=l,h=l.deletions,h===null?(l.deletions=[k],l.flags|=16):h.push(k)}function jt(l,h){switch(l.tag){case 5:var k=l.type;return h=h.nodeType!==1||k.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(l.stateNode=h,He=l,Ve=qi(h.firstChild),!0):!1;case 6:return h=l.pendingProps===""||h.nodeType!==3?null:h,h!==null?(l.stateNode=h,He=l,Ve=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(k=Be!==null?{id:Qe,overflow:$e}:null,l.memoizedState={dehydrated:h,treeContext:k,retryLane:1073741824},k=ul(18,null,null,0),k.stateNode=h,k.return=l,l.child=k,He=l,Ve=null,!0):!1;default:return!1}}function ir(l){return(l.mode&1)!==0&&(l.flags&128)===0}function Rt(l){if(ct){var h=Ve;if(h){var k=h;if(!jt(l,h)){if(ir(l))throw Error(t(418));h=qi(k.nextSibling);var z=He;h&&jt(l,h)?Bt(z,k):(l.flags=l.flags&-4097|2,ct=!1,He=l)}}else{if(ir(l))throw Error(t(418));l.flags=l.flags&-4097|2,ct=!1,He=l}}}function Mr(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;He=l}function Fr(l){if(l!==He)return!1;if(!ct)return Mr(l),ct=!0,!1;var h;if((h=l.tag!==3)&&!(h=l.tag!==5)&&(h=l.type,h=h!=="head"&&h!=="body"&&!uf(l.type,l.memoizedProps)),h&&(h=Ve)){if(ir(l))throw Lr(),Error(t(418));for(;h;)Bt(l,h),h=qi(h.nextSibling)}if(Mr(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(t(317));e:{for(l=l.nextSibling,h=0;l;){if(l.nodeType===8){var k=l.data;if(k==="/$"){if(h===0){Ve=qi(l.nextSibling);break e}h--}else k!=="$"&&k!=="$!"&&k!=="$?"||h++}l=l.nextSibling}Ve=null}}else Ve=He?qi(l.stateNode.nextSibling):null;return!0}function Lr(){for(var l=Ve;l;)l=qi(l.nextSibling)}function yr(){Ve=He=null,ct=!1}function Wr(l){gt===null?gt=[l]:gt.push(l)}var Xr=E.ReactCurrentBatchConfig;function Xt(l,h,k){if(l=k.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(k._owner){if(k=k._owner,k){if(k.tag!==1)throw Error(t(309));var z=k.stateNode}if(!z)throw Error(t(147,l));var J=z,ie=""+l;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===ie?h.ref:(h=function(de){var Re=J.refs;de===null?delete Re[ie]:Re[ie]=de},h._stringRef=ie,h)}if(typeof l!="string")throw Error(t(284));if(!k._owner)throw Error(t(290,l))}return l}function Dr(l,h){throw l=Object.prototype.toString.call(h),Error(t(31,l==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":l))}function An(l){var h=l._init;return h(l._payload)}function In(l){function h(tt,Ge){if(l){var nt=tt.deletions;nt===null?(tt.deletions=[Ge],tt.flags|=16):nt.push(Ge)}}function k(tt,Ge){if(!l)return null;for(;Ge!==null;)h(tt,Ge),Ge=Ge.sibling;return null}function z(tt,Ge){for(tt=new Map;Ge!==null;)Ge.key!==null?tt.set(Ge.key,Ge):tt.set(Ge.index,Ge),Ge=Ge.sibling;return tt}function J(tt,Ge){return tt=jc(tt,Ge),tt.index=0,tt.sibling=null,tt}function ie(tt,Ge,nt){return tt.index=nt,l?(nt=tt.alternate,nt!==null?(nt=nt.index,nt<Ge?(tt.flags|=2,Ge):nt):(tt.flags|=2,Ge)):(tt.flags|=1048576,Ge)}function de(tt){return l&&tt.alternate===null&&(tt.flags|=2),tt}function Re(tt,Ge,nt,Nt){return Ge===null||Ge.tag!==6?(Ge=T0(nt,tt.mode,Nt),Ge.return=tt,Ge):(Ge=J(Ge,nt),Ge.return=tt,Ge)}function Ue(tt,Ge,nt,Nt){var or=nt.type;return or===N?Et(tt,Ge,nt.props.children,Nt,nt.key):Ge!==null&&(Ge.elementType===or||typeof or=="object"&&or!==null&&or.$$typeof===G&&An(or)===Ge.type)?(Nt=J(Ge,nt.props),Nt.ref=Xt(tt,Ge,nt),Nt.return=tt,Nt):(Nt=$p(nt.type,nt.key,nt.props,null,tt.mode,Nt),Nt.ref=Xt(tt,Ge,nt),Nt.return=tt,Nt)}function st(tt,Ge,nt,Nt){return Ge===null||Ge.tag!==4||Ge.stateNode.containerInfo!==nt.containerInfo||Ge.stateNode.implementation!==nt.implementation?(Ge=R0(nt,tt.mode,Nt),Ge.return=tt,Ge):(Ge=J(Ge,nt.children||[]),Ge.return=tt,Ge)}function Et(tt,Ge,nt,Nt,or){return Ge===null||Ge.tag!==7?(Ge=mf(nt,tt.mode,Nt,or),Ge.return=tt,Ge):(Ge=J(Ge,nt),Ge.return=tt,Ge)}function Ct(tt,Ge,nt){if(typeof Ge=="string"&&Ge!==""||typeof Ge=="number")return Ge=T0(""+Ge,tt.mode,nt),Ge.return=tt,Ge;if(typeof Ge=="object"&&Ge!==null){switch(Ge.$$typeof){case x:return nt=$p(Ge.type,Ge.key,Ge.props,null,tt.mode,nt),nt.ref=Xt(tt,null,Ge),nt.return=tt,nt;case j:return Ge=R0(Ge,tt.mode,nt),Ge.return=tt,Ge;case G:var Nt=Ge._init;return Ct(tt,Nt(Ge._payload),nt)}if(Ae(Ge)||te(Ge))return Ge=mf(Ge,tt.mode,nt,null),Ge.return=tt,Ge;Dr(tt,Ge)}return null}function xt(tt,Ge,nt,Nt){var or=Ge!==null?Ge.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number")return or!==null?null:Re(tt,Ge,""+nt,Nt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case x:return nt.key===or?Ue(tt,Ge,nt,Nt):null;case j:return nt.key===or?st(tt,Ge,nt,Nt):null;case G:return or=nt._init,xt(tt,Ge,or(nt._payload),Nt)}if(Ae(nt)||te(nt))return or!==null?null:Et(tt,Ge,nt,Nt,null);Dr(tt,nt)}return null}function Vt(tt,Ge,nt,Nt,or){if(typeof Nt=="string"&&Nt!==""||typeof Nt=="number")return tt=tt.get(nt)||null,Re(Ge,tt,""+Nt,or);if(typeof Nt=="object"&&Nt!==null){switch(Nt.$$typeof){case x:return tt=tt.get(Nt.key===null?nt:Nt.key)||null,Ue(Ge,tt,Nt,or);case j:return tt=tt.get(Nt.key===null?nt:Nt.key)||null,st(Ge,tt,Nt,or);case G:var ur=Nt._init;return Vt(tt,Ge,nt,ur(Nt._payload),or)}if(Ae(Nt)||te(Nt))return tt=tt.get(nt)||null,Et(Ge,tt,Nt,or,null);Dr(Ge,Nt)}return null}function Jt(tt,Ge,nt,Nt){for(var or=null,ur=null,cr=Ge,mr=Ge=0,La=null;cr!==null&&mr<nt.length;mr++){cr.index>mr?(La=cr,cr=null):La=cr.sibling;var un=xt(tt,cr,nt[mr],Nt);if(un===null){cr===null&&(cr=La);break}l&&cr&&un.alternate===null&&h(tt,cr),Ge=ie(un,Ge,mr),ur===null?or=un:ur.sibling=un,ur=un,cr=La}if(mr===nt.length)return k(tt,cr),ct&&We(tt,mr),or;if(cr===null){for(;mr<nt.length;mr++)cr=Ct(tt,nt[mr],Nt),cr!==null&&(Ge=ie(cr,Ge,mr),ur===null?or=cr:ur.sibling=cr,ur=cr);return ct&&We(tt,mr),or}for(cr=z(tt,cr);mr<nt.length;mr++)La=Vt(cr,tt,mr,nt[mr],Nt),La!==null&&(l&&La.alternate!==null&&cr.delete(La.key===null?mr:La.key),Ge=ie(La,Ge,mr),ur===null?or=La:ur.sibling=La,ur=La);return l&&cr.forEach(function(Fc){return h(tt,Fc)}),ct&&We(tt,mr),or}function ar(tt,Ge,nt,Nt){var or=te(nt);if(typeof or!="function")throw Error(t(150));if(nt=or.call(nt),nt==null)throw Error(t(151));for(var ur=or=null,cr=Ge,mr=Ge=0,La=null,un=nt.next();cr!==null&&!un.done;mr++,un=nt.next()){cr.index>mr?(La=cr,cr=null):La=cr.sibling;var Fc=xt(tt,cr,un.value,Nt);if(Fc===null){cr===null&&(cr=La);break}l&&cr&&Fc.alternate===null&&h(tt,cr),Ge=ie(Fc,Ge,mr),ur===null?or=Fc:ur.sibling=Fc,ur=Fc,cr=La}if(un.done)return k(tt,cr),ct&&We(tt,mr),or;if(cr===null){for(;!un.done;mr++,un=nt.next())un=Ct(tt,un.value,Nt),un!==null&&(Ge=ie(un,Ge,mr),ur===null?or=un:ur.sibling=un,ur=un);return ct&&We(tt,mr),or}for(cr=z(tt,cr);!un.done;mr++,un=nt.next())un=Vt(cr,tt,mr,un.value,Nt),un!==null&&(l&&un.alternate!==null&&cr.delete(un.key===null?mr:un.key),Ge=ie(un,Ge,mr),ur===null?or=un:ur.sibling=un,ur=un);return l&&cr.forEach(function(Z_){return h(tt,Z_)}),ct&&We(tt,mr),or}function Wi(tt,Ge,nt,Nt){if(typeof nt=="object"&&nt!==null&&nt.type===N&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case x:e:{for(var or=nt.key,ur=Ge;ur!==null;){if(ur.key===or){if(or=nt.type,or===N){if(ur.tag===7){k(tt,ur.sibling),Ge=J(ur,nt.props.children),Ge.return=tt,tt=Ge;break e}}else if(ur.elementType===or||typeof or=="object"&&or!==null&&or.$$typeof===G&&An(or)===ur.type){k(tt,ur.sibling),Ge=J(ur,nt.props),Ge.ref=Xt(tt,ur,nt),Ge.return=tt,tt=Ge;break e}k(tt,ur);break}else h(tt,ur);ur=ur.sibling}nt.type===N?(Ge=mf(nt.props.children,tt.mode,Nt,nt.key),Ge.return=tt,tt=Ge):(Nt=$p(nt.type,nt.key,nt.props,null,tt.mode,Nt),Nt.ref=Xt(tt,Ge,nt),Nt.return=tt,tt=Nt)}return de(tt);case j:e:{for(ur=nt.key;Ge!==null;){if(Ge.key===ur)if(Ge.tag===4&&Ge.stateNode.containerInfo===nt.containerInfo&&Ge.stateNode.implementation===nt.implementation){k(tt,Ge.sibling),Ge=J(Ge,nt.children||[]),Ge.return=tt,tt=Ge;break e}else{k(tt,Ge);break}else h(tt,Ge);Ge=Ge.sibling}Ge=R0(nt,tt.mode,Nt),Ge.return=tt,tt=Ge}return de(tt);case G:return ur=nt._init,Wi(tt,Ge,ur(nt._payload),Nt)}if(Ae(nt))return Jt(tt,Ge,nt,Nt);if(te(nt))return ar(tt,Ge,nt,Nt);Dr(tt,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"?(nt=""+nt,Ge!==null&&Ge.tag===6?(k(tt,Ge.sibling),Ge=J(Ge,nt),Ge.return=tt,tt=Ge):(k(tt,Ge),Ge=T0(nt,tt.mode,Nt),Ge.return=tt,tt=Ge),de(tt)):k(tt,Ge)}return Wi}var li=In(!0),xr=In(!1),Hi=go(null),wn=null,jn=null,ui=null;function xi(){ui=jn=wn=null}function da(l){var h=Hi.current;Yr(Hi),l._currentValue=h}function $a(l,h,k){for(;l!==null;){var z=l.alternate;if((l.childLanes&h)!==h?(l.childLanes|=h,z!==null&&(z.childLanes|=h)):z!==null&&(z.childLanes&h)!==h&&(z.childLanes|=h),l===k)break;l=l.return}}function pn(l,h){wn=l,ui=jn=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&h)!==0&&(le=!0),l.firstContext=null)}function Fn(l){var h=l._currentValue;if(ui!==l)if(l={context:l,memoizedValue:h,next:null},jn===null){if(wn===null)throw Error(t(308));jn=l,wn.dependencies={lanes:0,firstContext:l}}else jn=jn.next=l;return h}var ia=null;function Do(l){ia===null?ia=[l]:ia.push(l)}function vo(l,h,k,z){var J=h.interleaved;return J===null?(k.next=k,Do(h)):(k.next=J.next,J.next=k),h.interleaved=k,Ir(l,z)}function Ir(l,h){l.lanes|=h;var k=l.alternate;for(k!==null&&(k.lanes|=h),k=l,l=l.return;l!==null;)l.childLanes|=h,k=l.alternate,k!==null&&(k.childLanes|=h),k=l,l=l.return;return k.tag===3?k.stateNode:null}var mo=!1;function yu(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xu(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Ya(l,h){return{eventTime:l,lane:h,tag:0,payload:null,callback:null,next:null}}function Oa(l,h,k){var z=l.updateQueue;if(z===null)return null;if(z=z.shared,(rn&2)!==0){var J=z.pending;return J===null?h.next=h:(h.next=J.next,J.next=h),z.pending=h,Ir(l,k)}return J=z.interleaved,J===null?(h.next=h,Do(z)):(h.next=J.next,J.next=h),z.interleaved=h,Ir(l,k)}function kl(l,h,k){if(h=h.updateQueue,h!==null&&(h=h.shared,(k&4194240)!==0)){var z=h.lanes;z&=l.pendingLanes,k|=z,h.lanes=k,iu(l,k)}}function pa(l,h){var k=l.updateQueue,z=l.alternate;if(z!==null&&(z=z.updateQueue,k===z)){var J=null,ie=null;if(k=k.firstBaseUpdate,k!==null){do{var de={eventTime:k.eventTime,lane:k.lane,tag:k.tag,payload:k.payload,callback:k.callback,next:null};ie===null?J=ie=de:ie=ie.next=de,k=k.next}while(k!==null);ie===null?J=ie=h:ie=ie.next=h}else J=ie=h;k={baseState:z.baseState,firstBaseUpdate:J,lastBaseUpdate:ie,shared:z.shared,effects:z.effects},l.updateQueue=k;return}l=k.lastBaseUpdate,l===null?k.firstBaseUpdate=h:l.next=h,k.lastBaseUpdate=h}function Bo(l,h,k,z){var J=l.updateQueue;mo=!1;var ie=J.firstBaseUpdate,de=J.lastBaseUpdate,Re=J.shared.pending;if(Re!==null){J.shared.pending=null;var Ue=Re,st=Ue.next;Ue.next=null,de===null?ie=st:de.next=st,de=Ue;var Et=l.alternate;Et!==null&&(Et=Et.updateQueue,Re=Et.lastBaseUpdate,Re!==de&&(Re===null?Et.firstBaseUpdate=st:Re.next=st,Et.lastBaseUpdate=Ue))}if(ie!==null){var Ct=J.baseState;de=0,Et=st=Ue=null,Re=ie;do{var xt=Re.lane,Vt=Re.eventTime;if((z&xt)===xt){Et!==null&&(Et=Et.next={eventTime:Vt,lane:0,tag:Re.tag,payload:Re.payload,callback:Re.callback,next:null});e:{var Jt=l,ar=Re;switch(xt=h,Vt=k,ar.tag){case 1:if(Jt=ar.payload,typeof Jt=="function"){Ct=Jt.call(Vt,Ct,xt);break e}Ct=Jt;break e;case 3:Jt.flags=Jt.flags&-65537|128;case 0:if(Jt=ar.payload,xt=typeof Jt=="function"?Jt.call(Vt,Ct,xt):Jt,xt==null)break e;Ct=V({},Ct,xt);break e;case 2:mo=!0}}Re.callback!==null&&Re.lane!==0&&(l.flags|=64,xt=J.effects,xt===null?J.effects=[Re]:xt.push(Re))}else Vt={eventTime:Vt,lane:xt,tag:Re.tag,payload:Re.payload,callback:Re.callback,next:null},Et===null?(st=Et=Vt,Ue=Ct):Et=Et.next=Vt,de|=xt;if(Re=Re.next,Re===null){if(Re=J.shared.pending,Re===null)break;xt=Re,Re=xt.next,xt.next=null,J.lastBaseUpdate=xt,J.shared.pending=null}}while(!0);if(Et===null&&(Ue=Ct),J.baseState=Ue,J.firstBaseUpdate=st,J.lastBaseUpdate=Et,h=J.shared.interleaved,h!==null){J=h;do de|=J.lane,J=J.next;while(J!==h)}else ie===null&&(J.shared.lanes=0);df|=de,l.lanes=de,l.memoizedState=Ct}}function hn(l,h,k){if(l=h.effects,h.effects=null,l!==null)for(h=0;h<l.length;h++){var z=l[h],J=z.callback;if(J!==null){if(z.callback=null,z=k,typeof J!="function")throw Error(t(191,J));J.call(z)}}}var vr={},Kr=go(vr),_n=go(vr),Cn=go(vr);function Qn(l){if(l===vr)throw Error(t(174));return l}function qo(l,h){switch(en(Cn,h),en(_n,l),en(Kr,vr),l=h.nodeType,l){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:rt(null,"");break;default:l=l===8?h.parentNode:h,h=l.namespaceURI||null,l=l.tagName,h=rt(h,l)}Yr(Kr),en(Kr,h)}function sn(){Yr(Kr),Yr(_n),Yr(Cn)}function bu(l){Qn(Cn.current);var h=Qn(Kr.current),k=rt(h,l.type);h!==k&&(en(_n,l),en(Kr,k))}function Ns(l){_n.current===l&&(Yr(Kr),Yr(_n))}var ln=go(0);function Xa(l){for(var h=l;h!==null;){if(h.tag===13){var k=h.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||k.data==="$?"||k.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Ll=[];function aa(){for(var l=0;l<Ll.length;l++)Ll[l]._workInProgressVersionPrimary=null;Ll.length=0}var wu=E.ReactCurrentDispatcher,_u=E.ReactCurrentBatchConfig,Ei=0,tn=null,Dn=null,Bn=null,Ka=!1,yo=!1,Za=0,xc=0;function qn(){throw Error(t(321))}function Su(l,h){if(h===null)return!1;for(var k=0;k<h.length&&k<l.length;k++)if(!Rr(l[k],h[k]))return!1;return!0}function ol(l,h,k,z,J,ie){if(Ei=ie,tn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,wu.current=l===null||l.memoizedState===null?d0:Eu,l=k(z,J),yo){ie=0;do{if(yo=!1,Za=0,25<=ie)throw Error(t(301));ie+=1,Bn=Dn=null,h.updateQueue=null,wu.current=$f,l=k(z,J)}while(yo)}if(wu.current=Ac,h=Dn!==null&&Dn.next!==null,Ei=0,Bn=Dn=tn=null,Ka=!1,h)throw Error(t(300));return l}function Qa(){var l=Za!==0;return Za=0,l}function gn(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bn===null?tn.memoizedState=Bn=l:Bn=Bn.next=l,Bn}function ci(){if(Dn===null){var l=tn.alternate;l=l!==null?l.memoizedState:null}else l=Dn.next;var h=Bn===null?tn.memoizedState:Bn.next;if(h!==null)Bn=h,Dn=l;else{if(l===null)throw Error(t(310));Dn=l,l={memoizedState:Dn.memoizedState,baseState:Dn.baseState,baseQueue:Dn.baseQueue,queue:Dn.queue,next:null},Bn===null?tn.memoizedState=Bn=l:Bn=Bn.next=l}return Bn}function oa(l,h){return typeof h=="function"?h(l):h}function Vi(l){var h=ci(),k=h.queue;if(k===null)throw Error(t(311));k.lastRenderedReducer=l;var z=Dn,J=z.baseQueue,ie=k.pending;if(ie!==null){if(J!==null){var de=J.next;J.next=ie.next,ie.next=de}z.baseQueue=J=ie,k.pending=null}if(J!==null){ie=J.next,z=z.baseState;var Re=de=null,Ue=null,st=ie;do{var Et=st.lane;if((Ei&Et)===Et)Ue!==null&&(Ue=Ue.next={lane:0,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null}),z=st.hasEagerState?st.eagerState:l(z,st.action);else{var Ct={lane:Et,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null};Ue===null?(Re=Ue=Ct,de=z):Ue=Ue.next=Ct,tn.lanes|=Et,df|=Et}st=st.next}while(st!==null&&st!==ie);Ue===null?de=z:Ue.next=Re,Rr(z,h.memoizedState)||(le=!0),h.memoizedState=z,h.baseState=de,h.baseQueue=Ue,k.lastRenderedState=z}if(l=k.interleaved,l!==null){J=l;do ie=J.lane,tn.lanes|=ie,df|=ie,J=J.next;while(J!==l)}else J===null&&(k.lanes=0);return[h.memoizedState,k.dispatch]}function Ts(l){var h=ci(),k=h.queue;if(k===null)throw Error(t(311));k.lastRenderedReducer=l;var z=k.dispatch,J=k.pending,ie=h.memoizedState;if(J!==null){k.pending=null;var de=J=J.next;do ie=l(ie,de.action),de=de.next;while(de!==J);Rr(ie,h.memoizedState)||(le=!0),h.memoizedState=ie,h.baseQueue===null&&(h.baseState=ie),k.lastRenderedState=ie}return[ie,z]}function Ec(){}function Ku(l,h){var k=tn,z=ci(),J=h(),ie=!Rr(z.memoizedState,J);if(ie&&(z.memoizedState=J,le=!0),z=z.queue,Oc(ff.bind(null,k,z,l),[l]),z.getSnapshot!==h||ie||Bn!==null&&Bn.memoizedState.tag&1){if(k.flags|=2048,Aa(9,os.bind(null,k,z,J,h),void 0,null),ka===null)throw Error(t(349));(Ei&30)!==0||Wf(k,h,J)}return J}function Wf(l,h,k){l.flags|=16384,l={getSnapshot:h,value:k},h=tn.updateQueue,h===null?(h={lastEffect:null,stores:null},tn.updateQueue=h,h.stores=[l]):(k=h.stores,k===null?h.stores=[l]:k.push(l))}function os(l,h,k,z){h.value=k,h.getSnapshot=z,Nl(h)&&xu(l)}function ff(l,h,k){return k(function(){Nl(h)&&xu(l)})}function Nl(l){var h=l.getSnapshot;l=l.value;try{var k=h();return!Rr(l,k)}catch{return!0}}function xu(l){var h=Ir(l,1);h!==null&&Il(h,l,1,-1)}function zo(l){var h=gn();return typeof l=="function"&&(l=l()),h.memoizedState=h.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:l},h.queue=l,l=l.dispatch=Rp.bind(null,tn,l),[h.memoizedState,l]}function Aa(l,h,k,z){return l={tag:l,create:h,destroy:k,deps:z,next:null},h=tn.updateQueue,h===null?(h={lastEffect:null,stores:null},tn.updateQueue=h,h.lastEffect=l.next=l):(k=h.lastEffect,k===null?h.lastEffect=l.next=l:(z=k.next,k.next=l,l.next=z,h.lastEffect=l)),l}function ss(){return ci().memoizedState}function Ja(l,h,k,z){var J=gn();tn.flags|=l,J.memoizedState=Aa(1|h,k,void 0,z===void 0?null:z)}function ls(l,h,k,z){var J=ci();z=z===void 0?null:z;var ie=void 0;if(Dn!==null){var de=Dn.memoizedState;if(ie=de.destroy,z!==null&&Su(z,de.deps)){J.memoizedState=Aa(h,k,ie,z);return}}tn.flags|=l,J.memoizedState=Aa(1|h,k,ie,z)}function Pc(l,h){return Ja(8390656,8,l,h)}function Oc(l,h){return ls(2048,8,l,h)}function hf(l,h){return ls(4,2,l,h)}function Zu(l,h){return ls(4,4,l,h)}function us(l,h){if(typeof h=="function")return l=l(),h(l),function(){h(null)};if(h!=null)return l=l(),h.current=l,function(){h.current=null}}function kp(l,h,k){return k=k!=null?k.concat([l]):null,ls(4,4,us.bind(null,h,l),k)}function Tl(){}function zh(l,h){var k=ci();h=h===void 0?null:h;var z=k.memoizedState;return z!==null&&h!==null&&Su(h,z[1])?z[0]:(k.memoizedState=[l,h],l)}function zn(l,h){var k=ci();h=h===void 0?null:h;var z=k.memoizedState;return z!==null&&h!==null&&Su(h,z[1])?z[0]:(l=l(),k.memoizedState=[l,h],l)}function Lp(l,h,k){return(Ei&21)===0?(l.baseState&&(l.baseState=!1,le=!0),l.memoizedState=k):(Rr(k,h)||(k=nu(),tn.lanes|=k,df|=k,l.baseState=!0),h)}function Np(l,h){var k=Tr;Tr=k!==0&&4>k?k:4,l(!0);var z=_u.transition;_u.transition={};try{l(!1),h()}finally{Tr=k,_u.transition=z}}function Tp(){return ci().memoizedState}function h0(l,h,k){var z=Mc(l);if(k={lane:z,action:k,hasEagerState:!1,eagerState:null,next:null},Uh(l))Mp(h,k);else if(k=vo(l,h,k,z),k!==null){var J=Ho();Il(k,l,z,J),Uo(k,h,z)}}function Rp(l,h,k){var z=Mc(l),J={lane:z,action:k,hasEagerState:!1,eagerState:null,next:null};if(Uh(l))Mp(h,J);else{var ie=l.alternate;if(l.lanes===0&&(ie===null||ie.lanes===0)&&(ie=h.lastRenderedReducer,ie!==null))try{var de=h.lastRenderedState,Re=ie(de,k);if(J.hasEagerState=!0,J.eagerState=Re,Rr(Re,de)){var Ue=h.interleaved;Ue===null?(J.next=J,Do(h)):(J.next=Ue.next,Ue.next=J),h.interleaved=J;return}}catch{}finally{}k=vo(l,h,J,z),k!==null&&(J=Ho(),Il(k,l,z,J),Uo(k,h,z))}}function Uh(l){var h=l.alternate;return l===tn||h!==null&&h===tn}function Mp(l,h){yo=Ka=!0;var k=l.pending;k===null?h.next=h:(h.next=k.next,k.next=h),l.pending=h}function Uo(l,h,k){if((k&4194240)!==0){var z=h.lanes;z&=l.pendingLanes,k|=z,h.lanes=k,iu(l,k)}}var Ac={readContext:Fn,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},d0={readContext:Fn,useCallback:function(l,h){return gn().memoizedState=[l,h===void 0?null:h],l},useContext:Fn,useEffect:Pc,useImperativeHandle:function(l,h,k){return k=k!=null?k.concat([l]):null,Ja(4194308,4,us.bind(null,h,l),k)},useLayoutEffect:function(l,h){return Ja(4194308,4,l,h)},useInsertionEffect:function(l,h){return Ja(4,2,l,h)},useMemo:function(l,h){var k=gn();return h=h===void 0?null:h,l=l(),k.memoizedState=[l,h],l},useReducer:function(l,h,k){var z=gn();return h=k!==void 0?k(h):h,z.memoizedState=z.baseState=h,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:h},z.queue=l,l=l.dispatch=h0.bind(null,tn,l),[z.memoizedState,l]},useRef:function(l){var h=gn();return l={current:l},h.memoizedState=l},useState:zo,useDebugValue:Tl,useDeferredValue:function(l){return gn().memoizedState=l},useTransition:function(){var l=zo(!1),h=l[0];return l=Np.bind(null,l[1]),gn().memoizedState=l,[h,l]},useMutableSource:function(){},useSyncExternalStore:function(l,h,k){var z=tn,J=gn();if(ct){if(k===void 0)throw Error(t(407));k=k()}else{if(k=h(),ka===null)throw Error(t(349));(Ei&30)!==0||Wf(z,h,k)}J.memoizedState=k;var ie={value:k,getSnapshot:h};return J.queue=ie,Pc(ff.bind(null,z,ie,l),[l]),z.flags|=2048,Aa(9,os.bind(null,z,ie,k,h),void 0,null),k},useId:function(){var l=gn(),h=ka.identifierPrefix;if(ct){var k=$e,z=Qe;k=(z&~(1<<32-Ar(z)-1)).toString(32)+k,h=":"+h+"R"+k,k=Za++,0<k&&(h+="H"+k.toString(32)),h+=":"}else k=xc++,h=":"+h+"r"+k.toString(32)+":";return l.memoizedState=h},unstable_isNewReconciler:!1},Eu={readContext:Fn,useCallback:zh,useContext:Fn,useEffect:Oc,useImperativeHandle:kp,useInsertionEffect:hf,useLayoutEffect:Zu,useMemo:zn,useReducer:Vi,useRef:ss,useState:function(){return Vi(oa)},useDebugValue:Tl,useDeferredValue:function(l){var h=ci();return Lp(h,Dn.memoizedState,l)},useTransition:function(){var l=Vi(oa)[0],h=ci().memoizedState;return[l,h]},useMutableSource:Ec,useSyncExternalStore:Ku,useId:Tp,unstable_isNewReconciler:!1},$f={readContext:Fn,useCallback:zh,useContext:Fn,useEffect:Oc,useImperativeHandle:kp,useInsertionEffect:hf,useLayoutEffect:Zu,useMemo:zn,useReducer:Ts,useRef:ss,useState:function(){return Ts(oa)},useDebugValue:Tl,useDeferredValue:function(l){var h=ci();return Dn===null?h.memoizedState=l:Lp(h,Dn.memoizedState,l)},useTransition:function(){var l=Ts(oa)[0],h=ci().memoizedState;return[l,h]},useMutableSource:Ec,useSyncExternalStore:Ku,useId:Tp,unstable_isNewReconciler:!1};function ga(l,h){if(l&&l.defaultProps){h=V({},h),l=l.defaultProps;for(var k in l)h[k]===void 0&&(h[k]=l[k]);return h}return h}function Cc(l,h,k,z){h=l.memoizedState,k=k(z,h),k=k==null?h:V({},h,k),l.memoizedState=k,l.lanes===0&&(l.updateQueue.baseState=k)}var kc={isMounted:function(l){return(l=l._reactInternals)?En(l)===l:!1},enqueueSetState:function(l,h,k){l=l._reactInternals;var z=Ho(),J=Mc(l),ie=Ya(z,J);ie.payload=h,k!=null&&(ie.callback=k),h=Oa(l,ie,J),h!==null&&(Il(h,l,J,z),kl(h,l,J))},enqueueReplaceState:function(l,h,k){l=l._reactInternals;var z=Ho(),J=Mc(l),ie=Ya(z,J);ie.tag=1,ie.payload=h,k!=null&&(ie.callback=k),h=Oa(l,ie,J),h!==null&&(Il(h,l,J,z),kl(h,l,J))},enqueueForceUpdate:function(l,h){l=l._reactInternals;var k=Ho(),z=Mc(l),J=Ya(k,z);J.tag=2,h!=null&&(J.callback=h),h=Oa(l,J,z),h!==null&&(Il(h,l,z,k),kl(h,l,z))}};function Yf(l,h,k,z,J,ie,de){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(z,ie,de):h.prototype&&h.prototype.isPureReactComponent?!Lo(k,z)||!Lo(J,ie):!0}function Ip(l,h,k){var z=!1,J=ns,ie=h.contextType;return typeof ie=="object"&&ie!==null?ie=Fn(ie):(J=na(h)?al:Si.current,z=h.contextTypes,ie=(z=z!=null)?Al(l,J):ns),h=new h(k,ie),l.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=kc,l.stateNode=h,h._reactInternals=l,z&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=J,l.__reactInternalMemoizedMaskedChildContext=ie),h}function Hh(l,h,k,z){l=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(k,z),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(k,z),h.state!==l&&kc.enqueueReplaceState(h,h.state,null)}function Xf(l,h,k,z){var J=l.stateNode;J.props=k,J.state=l.memoizedState,J.refs={},yu(l);var ie=h.contextType;typeof ie=="object"&&ie!==null?J.context=Fn(ie):(ie=na(h)?al:Si.current,J.context=Al(l,ie)),J.state=l.memoizedState,ie=h.getDerivedStateFromProps,typeof ie=="function"&&(Cc(l,h,ie,k),J.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof J.getSnapshotBeforeUpdate=="function"||typeof J.UNSAFE_componentWillMount!="function"&&typeof J.componentWillMount!="function"||(h=J.state,typeof J.componentWillMount=="function"&&J.componentWillMount(),typeof J.UNSAFE_componentWillMount=="function"&&J.UNSAFE_componentWillMount(),h!==J.state&&kc.enqueueReplaceState(J,J.state,null),Bo(l,k,J,z),J.state=l.memoizedState),typeof J.componentDidMount=="function"&&(l.flags|=4194308)}function Qu(l,h){try{var k="",z=h;do k+=ne(z),z=z.return;while(z);var J=k}catch(ie){J=`
|
|
31
|
-
Error generating stack: `+ie.message+`
|
|
32
|
-
`+ie.stack}return{value:l,source:h,stack:J,digest:null}}function Kf(l,h,k){return{value:l,source:null,stack:k??null,digest:h??null}}function Lc(l,h){try{console.error(h.value)}catch(k){setTimeout(function(){throw k})}}var p0=typeof WeakMap=="function"?WeakMap:Map;function jp(l,h,k){k=Ya(-1,k),k.tag=3,k.payload={element:null};var z=h.value;return k.callback=function(){zp||(zp=!0,E0=z),Lc(l,h)},k}function m(l,h,k){k=Ya(-1,k),k.tag=3;var z=l.type.getDerivedStateFromError;if(typeof z=="function"){var J=h.value;k.payload=function(){return z(J)},k.callback=function(){Lc(l,h)}}var ie=l.stateNode;return ie!==null&&typeof ie.componentDidCatch=="function"&&(k.callback=function(){Lc(l,h),typeof z!="function"&&(Tc===null?Tc=new Set([this]):Tc.add(this));var de=h.stack;this.componentDidCatch(h.value,{componentStack:de!==null?de:""})}),k}function P(l,h,k){var z=l.pingCache;if(z===null){z=l.pingCache=new p0;var J=new Set;z.set(h,J)}else J=z.get(h),J===void 0&&(J=new Set,z.set(h,J));J.has(k)||(J.add(k),l=q_.bind(null,l,h,k),h.then(l,l))}function B(l){do{var h;if((h=l.tag===13)&&(h=l.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return l;l=l.return}while(l!==null);return null}function K(l,h,k,z,J){return(l.mode&1)===0?(l===h?l.flags|=65536:(l.flags|=128,k.flags|=131072,k.flags&=-52805,k.tag===1&&(k.alternate===null?k.tag=17:(h=Ya(-1,1),h.tag=2,Oa(k,h,1))),k.lanes|=1),l):(l.flags|=65536,l.lanes=J,l)}var re=E.ReactCurrentOwner,le=!1;function Se(l,h,k,z){h.child=l===null?xr(h,null,k,z):li(h,l.child,k,z)}function Xe(l,h,k,z,J){k=k.render;var ie=h.ref;return pn(h,J),z=ol(l,h,k,z,ie,J),k=Qa(),l!==null&&!le?(h.updateQueue=l.updateQueue,h.flags&=-2053,l.lanes&=~J,Ca(l,h,J)):(ct&&k&<(h),h.flags|=1,Se(l,h,z,J),h.child)}function ut(l,h,k,z,J){if(l===null){var ie=k.type;return typeof ie=="function"&&!N0(ie)&&ie.defaultProps===void 0&&k.compare===null&&k.defaultProps===void 0?(h.tag=15,h.type=ie,kt(l,h,ie,z,J)):(l=$p(k.type,null,z,h,h.mode,J),l.ref=h.ref,l.return=h,h.child=l)}if(ie=l.child,(l.lanes&J)===0){var de=ie.memoizedProps;if(k=k.compare,k=k!==null?k:Lo,k(de,z)&&l.ref===h.ref)return Ca(l,h,J)}return h.flags|=1,l=jc(ie,z),l.ref=h.ref,l.return=h,h.child=l}function kt(l,h,k,z,J){if(l!==null){var ie=l.memoizedProps;if(Lo(ie,z)&&l.ref===h.ref)if(le=!1,h.pendingProps=z=ie,(l.lanes&J)!==0)(l.flags&131072)!==0&&(le=!0);else return h.lanes=l.lanes,Ca(l,h,J)}return qt(l,h,k,z,J)}function Yt(l,h,k){var z=h.pendingProps,J=z.children,ie=l!==null?l.memoizedState:null;if(z.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},en(Qf,Rs),Rs|=k;else{if((k&1073741824)===0)return l=ie!==null?ie.baseLanes|k:k,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:l,cachePool:null,transitions:null},h.updateQueue=null,en(Qf,Rs),Rs|=l,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},z=ie!==null?ie.baseLanes:k,en(Qf,Rs),Rs|=z}else ie!==null?(z=ie.baseLanes|k,h.memoizedState=null):z=k,en(Qf,Rs),Rs|=z;return Se(l,h,J,k),h.child}function br(l,h){var k=h.ref;(l===null&&k!==null||l!==null&&l.ref!==k)&&(h.flags|=512,h.flags|=2097152)}function qt(l,h,k,z,J){var ie=na(k)?al:Si.current;return ie=Al(h,ie),pn(h,J),k=ol(l,h,k,z,ie,J),z=Qa(),l!==null&&!le?(h.updateQueue=l.updateQueue,h.flags&=-2053,l.lanes&=~J,Ca(l,h,J)):(ct&&z&<(h),h.flags|=1,Se(l,h,k,J),h.child)}function kn(l,h,k,z,J){if(na(k)){var ie=!0;is(h)}else ie=!1;if(pn(h,J),h.stateNode===null)Br(l,h),Ip(h,k,z),Xf(h,k,z,J),z=!0;else if(l===null){var de=h.stateNode,Re=h.memoizedProps;de.props=Re;var Ue=de.context,st=k.contextType;typeof st=="object"&&st!==null?st=Fn(st):(st=na(k)?al:Si.current,st=Al(h,st));var Et=k.getDerivedStateFromProps,Ct=typeof Et=="function"||typeof de.getSnapshotBeforeUpdate=="function";Ct||typeof de.UNSAFE_componentWillReceiveProps!="function"&&typeof de.componentWillReceiveProps!="function"||(Re!==z||Ue!==st)&&Hh(h,de,z,st),mo=!1;var xt=h.memoizedState;de.state=xt,Bo(h,z,de,J),Ue=h.memoizedState,Re!==z||xt!==Ue||ra.current||mo?(typeof Et=="function"&&(Cc(h,k,Et,z),Ue=h.memoizedState),(Re=mo||Yf(h,k,Re,z,xt,Ue,st))?(Ct||typeof de.UNSAFE_componentWillMount!="function"&&typeof de.componentWillMount!="function"||(typeof de.componentWillMount=="function"&&de.componentWillMount(),typeof de.UNSAFE_componentWillMount=="function"&&de.UNSAFE_componentWillMount()),typeof de.componentDidMount=="function"&&(h.flags|=4194308)):(typeof de.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=z,h.memoizedState=Ue),de.props=z,de.state=Ue,de.context=st,z=Re):(typeof de.componentDidMount=="function"&&(h.flags|=4194308),z=!1)}else{de=h.stateNode,Xu(l,h),Re=h.memoizedProps,st=h.type===h.elementType?Re:ga(h.type,Re),de.props=st,Ct=h.pendingProps,xt=de.context,Ue=k.contextType,typeof Ue=="object"&&Ue!==null?Ue=Fn(Ue):(Ue=na(k)?al:Si.current,Ue=Al(h,Ue));var Vt=k.getDerivedStateFromProps;(Et=typeof Vt=="function"||typeof de.getSnapshotBeforeUpdate=="function")||typeof de.UNSAFE_componentWillReceiveProps!="function"&&typeof de.componentWillReceiveProps!="function"||(Re!==Ct||xt!==Ue)&&Hh(h,de,z,Ue),mo=!1,xt=h.memoizedState,de.state=xt,Bo(h,z,de,J);var Jt=h.memoizedState;Re!==Ct||xt!==Jt||ra.current||mo?(typeof Vt=="function"&&(Cc(h,k,Vt,z),Jt=h.memoizedState),(st=mo||Yf(h,k,st,z,xt,Jt,Ue)||!1)?(Et||typeof de.UNSAFE_componentWillUpdate!="function"&&typeof de.componentWillUpdate!="function"||(typeof de.componentWillUpdate=="function"&&de.componentWillUpdate(z,Jt,Ue),typeof de.UNSAFE_componentWillUpdate=="function"&&de.UNSAFE_componentWillUpdate(z,Jt,Ue)),typeof de.componentDidUpdate=="function"&&(h.flags|=4),typeof de.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof de.componentDidUpdate!="function"||Re===l.memoizedProps&&xt===l.memoizedState||(h.flags|=4),typeof de.getSnapshotBeforeUpdate!="function"||Re===l.memoizedProps&&xt===l.memoizedState||(h.flags|=1024),h.memoizedProps=z,h.memoizedState=Jt),de.props=z,de.state=Jt,de.context=Ue,z=st):(typeof de.componentDidUpdate!="function"||Re===l.memoizedProps&&xt===l.memoizedState||(h.flags|=4),typeof de.getSnapshotBeforeUpdate!="function"||Re===l.memoizedProps&&xt===l.memoizedState||(h.flags|=1024),z=!1)}return dn(l,h,k,z,ie,J)}function dn(l,h,k,z,J,ie){br(l,h);var de=(h.flags&128)!==0;if(!z&&!de)return J&&Gf(h,k,!1),Ca(l,h,ie);z=h.stateNode,re.current=h;var Re=de&&typeof k.getDerivedStateFromError!="function"?null:z.render();return h.flags|=1,l!==null&&de?(h.child=li(h,l.child,null,ie),h.child=li(h,null,Re,ie)):Se(l,h,Re,ie),h.memoizedState=z.state,J&&Gf(h,k,!0),h.child}function eo(l){var h=l.stateNode;h.pendingContext?cf(l,h.pendingContext,h.pendingContext!==h.context):h.context&&cf(l,h.context,!1),qo(l,h.containerInfo)}function sl(l,h,k,z,J){return yr(),Wr(J),h.flags|=256,Se(l,h,k,z),h.child}var ot={dehydrated:null,treeContext:null,retryLane:0};function Ze(l){return{baseLanes:l,cachePool:null,transitions:null}}function dt(l,h,k){var z=h.pendingProps,J=ln.current,ie=!1,de=(h.flags&128)!==0,Re;if((Re=de)||(Re=l!==null&&l.memoizedState===null?!1:(J&2)!==0),Re?(ie=!0,h.flags&=-129):(l===null||l.memoizedState!==null)&&(J|=1),en(ln,J&1),l===null)return Rt(h),l=h.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((h.mode&1)===0?h.lanes=1:l.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(de=z.children,l=z.fallback,ie?(z=h.mode,ie=h.child,de={mode:"hidden",children:de},(z&1)===0&&ie!==null?(ie.childLanes=0,ie.pendingProps=de):ie=Yp(de,z,0,null),l=mf(l,z,k,null),ie.return=h,l.return=h,ie.sibling=l,h.child=ie,h.child.memoizedState=Ze(k),h.memoizedState=ot,l):Ht(h,de));if(J=l.memoizedState,J!==null&&(Re=J.dehydrated,Re!==null))return Cr(l,h,de,z,Re,J,k);if(ie){ie=z.fallback,de=h.mode,J=l.child,Re=J.sibling;var Ue={mode:"hidden",children:z.children};return(de&1)===0&&h.child!==J?(z=h.child,z.childLanes=0,z.pendingProps=Ue,h.deletions=null):(z=jc(J,Ue),z.subtreeFlags=J.subtreeFlags&14680064),Re!==null?ie=jc(Re,ie):(ie=mf(ie,de,k,null),ie.flags|=2),ie.return=h,z.return=h,z.sibling=ie,h.child=z,z=ie,ie=h.child,de=l.child.memoizedState,de=de===null?Ze(k):{baseLanes:de.baseLanes|k,cachePool:null,transitions:de.transitions},ie.memoizedState=de,ie.childLanes=l.childLanes&~k,h.memoizedState=ot,z}return ie=l.child,l=ie.sibling,z=jc(ie,{mode:"visible",children:z.children}),(h.mode&1)===0&&(z.lanes=k),z.return=h,z.sibling=null,l!==null&&(k=h.deletions,k===null?(h.deletions=[l],h.flags|=16):k.push(l)),h.child=z,h.memoizedState=null,z}function Ht(l,h){return h=Yp({mode:"visible",children:h},l.mode,0,null),h.return=l,l.child=h}function lr(l,h,k,z){return z!==null&&Wr(z),li(h,l.child,null,k),l=Ht(h,h.pendingProps.children),l.flags|=2,h.memoizedState=null,l}function Cr(l,h,k,z,J,ie,de){if(k)return h.flags&256?(h.flags&=-257,z=Kf(Error(t(422))),lr(l,h,de,z)):h.memoizedState!==null?(h.child=l.child,h.flags|=128,null):(ie=z.fallback,J=h.mode,z=Yp({mode:"visible",children:z.children},J,0,null),ie=mf(ie,J,de,null),ie.flags|=2,z.return=h,ie.return=h,z.sibling=ie,h.child=z,(h.mode&1)!==0&&li(h,l.child,null,de),h.child.memoizedState=Ze(de),h.memoizedState=ot,ie);if((h.mode&1)===0)return lr(l,h,de,null);if(J.data==="$!"){if(z=J.nextSibling&&J.nextSibling.dataset,z)var Re=z.dgst;return z=Re,ie=Error(t(419)),z=Kf(ie,z,void 0),lr(l,h,de,z)}if(Re=(de&l.childLanes)!==0,le||Re){if(z=ka,z!==null){switch(de&-de){case 4:J=2;break;case 16:J=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:J=32;break;case 536870912:J=268435456;break;default:J=0}J=(J&(z.suspendedLanes|de))!==0?0:J,J!==0&&J!==ie.retryLane&&(ie.retryLane=J,Ir(l,J),Il(z,l,J,-1))}return L0(),z=Kf(Error(t(421))),lr(l,h,de,z)}return J.data==="$?"?(h.flags|=128,h.child=l.child,h=z_.bind(null,l),J._reactRetry=h,null):(l=ie.treeContext,Ve=qi(J.nextSibling),He=h,ct=!0,gt=null,l!==null&&(we[Ee++]=Qe,we[Ee++]=$e,we[Ee++]=Be,Qe=l.id,$e=l.overflow,Be=h),h=Ht(h,z.children),h.flags|=4096,h)}function wr(l,h,k){l.lanes|=h;var z=l.alternate;z!==null&&(z.lanes|=h),$a(l.return,h,k)}function zr(l,h,k,z,J){var ie=l.memoizedState;ie===null?l.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:z,tail:k,tailMode:J}:(ie.isBackwards=h,ie.rendering=null,ie.renderingStartTime=0,ie.last=z,ie.tail=k,ie.tailMode=J)}function Gi(l,h,k){var z=h.pendingProps,J=z.revealOrder,ie=z.tail;if(Se(l,h,z.children,k),z=ln.current,(z&2)!==0)z=z&1|2,h.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=h.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&wr(l,k,h);else if(l.tag===19)wr(l,k,h);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===h)break e;for(;l.sibling===null;){if(l.return===null||l.return===h)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}z&=1}if(en(ln,z),(h.mode&1)===0)h.memoizedState=null;else switch(J){case"forwards":for(k=h.child,J=null;k!==null;)l=k.alternate,l!==null&&Xa(l)===null&&(J=k),k=k.sibling;k=J,k===null?(J=h.child,h.child=null):(J=k.sibling,k.sibling=null),zr(h,!1,J,k,ie);break;case"backwards":for(k=null,J=h.child,h.child=null;J!==null;){if(l=J.alternate,l!==null&&Xa(l)===null){h.child=J;break}l=J.sibling,J.sibling=k,k=J,J=l}zr(h,!0,k,null,ie);break;case"together":zr(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Br(l,h){(h.mode&1)===0&&l!==null&&(l.alternate=null,h.alternate=null,h.flags|=2)}function Ca(l,h,k){if(l!==null&&(h.dependencies=l.dependencies),df|=h.lanes,(k&h.childLanes)===0)return null;if(l!==null&&h.child!==l.child)throw Error(t(153));if(h.child!==null){for(l=h.child,k=jc(l,l.pendingProps),h.child=k,k.return=h;l.sibling!==null;)l=l.sibling,k=k.sibling=jc(l,l.pendingProps),k.return=h;k.sibling=null}return h.child}function g0(l,h,k){switch(h.tag){case 3:eo(h),yr();break;case 5:bu(h);break;case 1:na(h.type)&&is(h);break;case 4:qo(h,h.stateNode.containerInfo);break;case 10:var z=h.type._context,J=h.memoizedProps.value;en(Hi,z._currentValue),z._currentValue=J;break;case 13:if(z=h.memoizedState,z!==null)return z.dehydrated!==null?(en(ln,ln.current&1),h.flags|=128,null):(k&h.child.childLanes)!==0?dt(l,h,k):(en(ln,ln.current&1),l=Ca(l,h,k),l!==null?l.sibling:null);en(ln,ln.current&1);break;case 19:if(z=(k&h.childLanes)!==0,(l.flags&128)!==0){if(z)return Gi(l,h,k);h.flags|=128}if(J=h.memoizedState,J!==null&&(J.rendering=null,J.tail=null,J.lastEffect=null),en(ln,ln.current),z)break;return null;case 22:case 23:return h.lanes=0,Yt(l,h,k)}return Ca(l,h,k)}var jm,v0,Fm,Dm;jm=function(l,h){for(var k=h.child;k!==null;){if(k.tag===5||k.tag===6)l.appendChild(k.stateNode);else if(k.tag!==4&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===h)break;for(;k.sibling===null;){if(k.return===null||k.return===h)return;k=k.return}k.sibling.return=k.return,k=k.sibling}},v0=function(){},Fm=function(l,h,k,z){var J=l.memoizedProps;if(J!==z){l=h.stateNode,Qn(Kr.current);var ie=null;switch(k){case"input":J=Ne(l,J),z=Ne(l,z),ie=[];break;case"select":J=V({},J,{value:void 0}),z=V({},z,{value:void 0}),ie=[];break;case"textarea":J=ge(l,J),z=ge(l,z),ie=[];break;default:typeof J.onClick!="function"&&typeof z.onClick=="function"&&(l.onclick=ks)}Oe(k,z);var de;k=null;for(st in J)if(!z.hasOwnProperty(st)&&J.hasOwnProperty(st)&&J[st]!=null)if(st==="style"){var Re=J[st];for(de in Re)Re.hasOwnProperty(de)&&(k||(k={}),k[de]="")}else st!=="dangerouslySetInnerHTML"&&st!=="children"&&st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&st!=="autoFocus"&&(a.hasOwnProperty(st)?ie||(ie=[]):(ie=ie||[]).push(st,null));for(st in z){var Ue=z[st];if(Re=J!=null?J[st]:void 0,z.hasOwnProperty(st)&&Ue!==Re&&(Ue!=null||Re!=null))if(st==="style")if(Re){for(de in Re)!Re.hasOwnProperty(de)||Ue&&Ue.hasOwnProperty(de)||(k||(k={}),k[de]="");for(de in Ue)Ue.hasOwnProperty(de)&&Re[de]!==Ue[de]&&(k||(k={}),k[de]=Ue[de])}else k||(ie||(ie=[]),ie.push(st,k)),k=Ue;else st==="dangerouslySetInnerHTML"?(Ue=Ue?Ue.__html:void 0,Re=Re?Re.__html:void 0,Ue!=null&&Re!==Ue&&(ie=ie||[]).push(st,Ue)):st==="children"?typeof Ue!="string"&&typeof Ue!="number"||(ie=ie||[]).push(st,""+Ue):st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&(a.hasOwnProperty(st)?(Ue!=null&&st==="onScroll"&&on("scroll",l),ie||Re===Ue||(ie=[])):(ie=ie||[]).push(st,Ue))}k&&(ie=ie||[]).push("style",k);var st=ie;(h.updateQueue=st)&&(h.flags|=4)}},Dm=function(l,h,k,z){k!==z&&(h.flags|=4)};function Vh(l,h){if(!ct)switch(l.tailMode){case"hidden":h=l.tail;for(var k=null;h!==null;)h.alternate!==null&&(k=h),h=h.sibling;k===null?l.tail=null:k.sibling=null;break;case"collapsed":k=l.tail;for(var z=null;k!==null;)k.alternate!==null&&(z=k),k=k.sibling;z===null?h||l.tail===null?l.tail=null:l.tail.sibling=null:z.sibling=null}}function bo(l){var h=l.alternate!==null&&l.alternate.child===l.child,k=0,z=0;if(h)for(var J=l.child;J!==null;)k|=J.lanes|J.childLanes,z|=J.subtreeFlags&14680064,z|=J.flags&14680064,J.return=l,J=J.sibling;else for(J=l.child;J!==null;)k|=J.lanes|J.childLanes,z|=J.subtreeFlags,z|=J.flags,J.return=l,J=J.sibling;return l.subtreeFlags|=z,l.childLanes=k,h}function L_(l,h,k){var z=h.pendingProps;switch(je(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bo(h),null;case 1:return na(h.type)&&mu(),bo(h),null;case 3:return z=h.stateNode,sn(),Yr(ra),Yr(Si),aa(),z.pendingContext&&(z.context=z.pendingContext,z.pendingContext=null),(l===null||l.child===null)&&(Fr(h)?h.flags|=4:l===null||l.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,gt!==null&&(A0(gt),gt=null))),v0(l,h),bo(h),null;case 5:Ns(h);var J=Qn(Cn.current);if(k=h.type,l!==null&&h.stateNode!=null)Fm(l,h,k,z,J),l.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!z){if(h.stateNode===null)throw Error(t(166));return bo(h),null}if(l=Qn(Kr.current),Fr(h)){z=h.stateNode,k=h.type;var ie=h.memoizedProps;switch(z[po]=h,z[gu]=ie,l=(h.mode&1)!==0,k){case"dialog":on("cancel",z),on("close",z);break;case"iframe":case"object":case"embed":on("load",z);break;case"video":case"audio":for(J=0;J<Fo.length;J++)on(Fo[J],z);break;case"source":on("error",z);break;case"img":case"image":case"link":on("error",z),on("load",z);break;case"details":on("toggle",z);break;case"input":xe(z,ie),on("invalid",z);break;case"select":z._wrapperState={wasMultiple:!!ie.multiple},on("invalid",z);break;case"textarea":Te(z,ie),on("invalid",z)}Oe(k,ie),J=null;for(var de in ie)if(ie.hasOwnProperty(de)){var Re=ie[de];de==="children"?typeof Re=="string"?z.textContent!==Re&&(ie.suppressHydrationWarning!==!0&&Gu(z.textContent,Re,l),J=["children",Re]):typeof Re=="number"&&z.textContent!==""+Re&&(ie.suppressHydrationWarning!==!0&&Gu(z.textContent,Re,l),J=["children",""+Re]):a.hasOwnProperty(de)&&Re!=null&&de==="onScroll"&&on("scroll",z)}switch(k){case"input":ve(z),me(z,ie,!0);break;case"textarea":ve(z),Ke(z);break;case"select":case"option":break;default:typeof ie.onClick=="function"&&(z.onclick=ks)}z=J,h.updateQueue=z,z!==null&&(h.flags|=4)}else{de=J.nodeType===9?J:J.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=it(k)),l==="http://www.w3.org/1999/xhtml"?k==="script"?(l=de.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof z.is=="string"?l=de.createElement(k,{is:z.is}):(l=de.createElement(k),k==="select"&&(de=l,z.multiple?de.multiple=!0:z.size&&(de.size=z.size))):l=de.createElementNS(l,k),l[po]=h,l[gu]=z,jm(l,h,!1,!1),h.stateNode=l;e:{switch(de=Me(k,z),k){case"dialog":on("cancel",l),on("close",l),J=z;break;case"iframe":case"object":case"embed":on("load",l),J=z;break;case"video":case"audio":for(J=0;J<Fo.length;J++)on(Fo[J],l);J=z;break;case"source":on("error",l),J=z;break;case"img":case"image":case"link":on("error",l),on("load",l),J=z;break;case"details":on("toggle",l),J=z;break;case"input":xe(l,z),J=Ne(l,z),on("invalid",l);break;case"option":J=z;break;case"select":l._wrapperState={wasMultiple:!!z.multiple},J=V({},z,{value:void 0}),on("invalid",l);break;case"textarea":Te(l,z),J=ge(l,z),on("invalid",l);break;default:J=z}Oe(k,J),Re=J;for(ie in Re)if(Re.hasOwnProperty(ie)){var Ue=Re[ie];ie==="style"?Ut(l,Ue):ie==="dangerouslySetInnerHTML"?(Ue=Ue?Ue.__html:void 0,Ue!=null&&bt(l,Ue)):ie==="children"?typeof Ue=="string"?(k!=="textarea"||Ue!=="")&&yt(l,Ue):typeof Ue=="number"&&yt(l,""+Ue):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(a.hasOwnProperty(ie)?Ue!=null&&ie==="onScroll"&&on("scroll",l):Ue!=null&&v(l,ie,Ue,de))}switch(k){case"input":ve(l),me(l,z,!1);break;case"textarea":ve(l),Ke(l);break;case"option":z.value!=null&&l.setAttribute("value",""+oe(z.value));break;case"select":l.multiple=!!z.multiple,ie=z.value,ie!=null?Le(l,!!z.multiple,ie,!1):z.defaultValue!=null&&Le(l,!!z.multiple,z.defaultValue,!0);break;default:typeof J.onClick=="function"&&(l.onclick=ks)}switch(k){case"button":case"input":case"select":case"textarea":z=!!z.autoFocus;break e;case"img":z=!0;break e;default:z=!1}}z&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return bo(h),null;case 6:if(l&&h.stateNode!=null)Dm(l,h,l.memoizedProps,z);else{if(typeof z!="string"&&h.stateNode===null)throw Error(t(166));if(k=Qn(Cn.current),Qn(Kr.current),Fr(h)){if(z=h.stateNode,k=h.memoizedProps,z[po]=h,(ie=z.nodeValue!==k)&&(l=He,l!==null))switch(l.tag){case 3:Gu(z.nodeValue,k,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&Gu(z.nodeValue,k,(l.mode&1)!==0)}ie&&(h.flags|=4)}else z=(k.nodeType===9?k:k.ownerDocument).createTextNode(z),z[po]=h,h.stateNode=z}return bo(h),null;case 13:if(Yr(ln),z=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(ct&&Ve!==null&&(h.mode&1)!==0&&(h.flags&128)===0)Lr(),yr(),h.flags|=98560,ie=!1;else if(ie=Fr(h),z!==null&&z.dehydrated!==null){if(l===null){if(!ie)throw Error(t(318));if(ie=h.memoizedState,ie=ie!==null?ie.dehydrated:null,!ie)throw Error(t(317));ie[po]=h}else yr(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;bo(h),ie=!1}else gt!==null&&(A0(gt),gt=null),ie=!0;if(!ie)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=k,h):(z=z!==null,z!==(l!==null&&l.memoizedState!==null)&&z&&(h.child.flags|=8192,(h.mode&1)!==0&&(l===null||(ln.current&1)!==0?va===0&&(va=3):L0())),h.updateQueue!==null&&(h.flags|=4),bo(h),null);case 4:return sn(),v0(l,h),l===null&&Cs(h.stateNode.containerInfo),bo(h),null;case 10:return da(h.type._context),bo(h),null;case 17:return na(h.type)&&mu(),bo(h),null;case 19:if(Yr(ln),ie=h.memoizedState,ie===null)return bo(h),null;if(z=(h.flags&128)!==0,de=ie.rendering,de===null)if(z)Vh(ie,!1);else{if(va!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(de=Xa(l),de!==null){for(h.flags|=128,Vh(ie,!1),z=de.updateQueue,z!==null&&(h.updateQueue=z,h.flags|=4),h.subtreeFlags=0,z=k,k=h.child;k!==null;)ie=k,l=z,ie.flags&=14680066,de=ie.alternate,de===null?(ie.childLanes=0,ie.lanes=l,ie.child=null,ie.subtreeFlags=0,ie.memoizedProps=null,ie.memoizedState=null,ie.updateQueue=null,ie.dependencies=null,ie.stateNode=null):(ie.childLanes=de.childLanes,ie.lanes=de.lanes,ie.child=de.child,ie.subtreeFlags=0,ie.deletions=null,ie.memoizedProps=de.memoizedProps,ie.memoizedState=de.memoizedState,ie.updateQueue=de.updateQueue,ie.type=de.type,l=de.dependencies,ie.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),k=k.sibling;return en(ln,ln.current&1|2),h.child}l=l.sibling}ie.tail!==null&&Nn()>Jf&&(h.flags|=128,z=!0,Vh(ie,!1),h.lanes=4194304)}else{if(!z)if(l=Xa(de),l!==null){if(h.flags|=128,z=!0,k=l.updateQueue,k!==null&&(h.updateQueue=k,h.flags|=4),Vh(ie,!0),ie.tail===null&&ie.tailMode==="hidden"&&!de.alternate&&!ct)return bo(h),null}else 2*Nn()-ie.renderingStartTime>Jf&&k!==1073741824&&(h.flags|=128,z=!0,Vh(ie,!1),h.lanes=4194304);ie.isBackwards?(de.sibling=h.child,h.child=de):(k=ie.last,k!==null?k.sibling=de:h.child=de,ie.last=de)}return ie.tail!==null?(h=ie.tail,ie.rendering=h,ie.tail=h.sibling,ie.renderingStartTime=Nn(),h.sibling=null,k=ln.current,en(ln,z?k&1|2:k&1),h):(bo(h),null);case 22:case 23:return k0(),z=h.memoizedState!==null,l!==null&&l.memoizedState!==null!==z&&(h.flags|=8192),z&&(h.mode&1)!==0?(Rs&1073741824)!==0&&(bo(h),h.subtreeFlags&6&&(h.flags|=8192)):bo(h),null;case 24:return null;case 25:return null}throw Error(t(156,h.tag))}function N_(l,h){switch(je(h),h.tag){case 1:return na(h.type)&&mu(),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return sn(),Yr(ra),Yr(Si),aa(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 5:return Ns(h),null;case 13:if(Yr(ln),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(t(340));yr()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return Yr(ln),null;case 4:return sn(),null;case 10:return da(h.type._context),null;case 22:case 23:return k0(),null;case 24:return null;default:return null}}var Fp=!1,wo=!1,T_=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function Zf(l,h){var k=l.ref;if(k!==null)if(typeof k=="function")try{k(null)}catch(z){Pi(l,h,z)}else k.current=null}function m0(l,h,k){try{k()}catch(z){Pi(l,h,z)}}var Bm=!1;function R_(l,h){if(Wu=su,l=$n(),ts(l)){if("selectionStart"in l)var k={start:l.selectionStart,end:l.selectionEnd};else e:{k=(k=l.ownerDocument)&&k.defaultView||window;var z=k.getSelection&&k.getSelection();if(z&&z.rangeCount!==0){k=z.anchorNode;var J=z.anchorOffset,ie=z.focusNode;z=z.focusOffset;try{k.nodeType,ie.nodeType}catch{k=null;break e}var de=0,Re=-1,Ue=-1,st=0,Et=0,Ct=l,xt=null;t:for(;;){for(var Vt;Ct!==k||J!==0&&Ct.nodeType!==3||(Re=de+J),Ct!==ie||z!==0&&Ct.nodeType!==3||(Ue=de+z),Ct.nodeType===3&&(de+=Ct.nodeValue.length),(Vt=Ct.firstChild)!==null;)xt=Ct,Ct=Vt;for(;;){if(Ct===l)break t;if(xt===k&&++st===J&&(Re=de),xt===ie&&++Et===z&&(Ue=de),(Vt=Ct.nextSibling)!==null)break;Ct=xt,xt=Ct.parentNode}Ct=Vt}k=Re===-1||Ue===-1?null:{start:Re,end:Ue}}else k=null}k=k||{start:0,end:0}}else k=null;for(Ol={focusedElem:l,selectionRange:k},su=!1,Kt=h;Kt!==null;)if(h=Kt,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Kt=l;else for(;Kt!==null;){h=Kt;try{var Jt=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Jt!==null){var ar=Jt.memoizedProps,Wi=Jt.memoizedState,tt=h.stateNode,Ge=tt.getSnapshotBeforeUpdate(h.elementType===h.type?ar:ga(h.type,ar),Wi);tt.__reactInternalSnapshotBeforeUpdate=Ge}break;case 3:var nt=h.stateNode.containerInfo;nt.nodeType===1?nt.textContent="":nt.nodeType===9&&nt.documentElement&&nt.removeChild(nt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Nt){Pi(h,h.return,Nt)}if(l=h.sibling,l!==null){l.return=h.return,Kt=l;break}Kt=h.return}return Jt=Bm,Bm=!1,Jt}function Gh(l,h,k){var z=h.updateQueue;if(z=z!==null?z.lastEffect:null,z!==null){var J=z=z.next;do{if((J.tag&l)===l){var ie=J.destroy;J.destroy=void 0,ie!==void 0&&m0(h,k,ie)}J=J.next}while(J!==z)}}function Dp(l,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var k=h=h.next;do{if((k.tag&l)===l){var z=k.create;k.destroy=z()}k=k.next}while(k!==h)}}function y0(l){var h=l.ref;if(h!==null){var k=l.stateNode;switch(l.tag){case 5:l=k;break;default:l=k}typeof h=="function"?h(l):h.current=l}}function qm(l){var h=l.alternate;h!==null&&(l.alternate=null,qm(h)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(h=l.stateNode,h!==null&&(delete h[po],delete h[gu],delete h[ha],delete h[Hf],delete h[Vf])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function zm(l){return l.tag===5||l.tag===3||l.tag===4}function Um(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||zm(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function b0(l,h,k){var z=l.tag;if(z===5||z===6)l=l.stateNode,h?k.nodeType===8?k.parentNode.insertBefore(l,h):k.insertBefore(l,h):(k.nodeType===8?(h=k.parentNode,h.insertBefore(l,k)):(h=k,h.appendChild(l)),k=k._reactRootContainer,k!=null||h.onclick!==null||(h.onclick=ks));else if(z!==4&&(l=l.child,l!==null))for(b0(l,h,k),l=l.sibling;l!==null;)b0(l,h,k),l=l.sibling}function w0(l,h,k){var z=l.tag;if(z===5||z===6)l=l.stateNode,h?k.insertBefore(l,h):k.appendChild(l);else if(z!==4&&(l=l.child,l!==null))for(w0(l,h,k),l=l.sibling;l!==null;)w0(l,h,k),l=l.sibling}var to=null,Rl=!1;function Nc(l,h,k){for(k=k.child;k!==null;)Hm(l,h,k),k=k.sibling}function Hm(l,h,k){if(hi&&typeof hi.onCommitFiberUnmount=="function")try{hi.onCommitFiberUnmount(so,k)}catch{}switch(k.tag){case 5:wo||Zf(k,h);case 6:var z=to,J=Rl;to=null,Nc(l,h,k),to=z,Rl=J,to!==null&&(Rl?(l=to,k=k.stateNode,l.nodeType===8?l.parentNode.removeChild(k):l.removeChild(k)):to.removeChild(k.stateNode));break;case 18:to!==null&&(Rl?(l=to,k=k.stateNode,l.nodeType===8?_c(l.parentNode,k):l.nodeType===1&&_c(l,k),ni(l)):_c(to,k.stateNode));break;case 4:z=to,J=Rl,to=k.stateNode.containerInfo,Rl=!0,Nc(l,h,k),to=z,Rl=J;break;case 0:case 11:case 14:case 15:if(!wo&&(z=k.updateQueue,z!==null&&(z=z.lastEffect,z!==null))){J=z=z.next;do{var ie=J,de=ie.destroy;ie=ie.tag,de!==void 0&&((ie&2)!==0||(ie&4)!==0)&&m0(k,h,de),J=J.next}while(J!==z)}Nc(l,h,k);break;case 1:if(!wo&&(Zf(k,h),z=k.stateNode,typeof z.componentWillUnmount=="function"))try{z.props=k.memoizedProps,z.state=k.memoizedState,z.componentWillUnmount()}catch(Re){Pi(k,h,Re)}Nc(l,h,k);break;case 21:Nc(l,h,k);break;case 22:k.mode&1?(wo=(z=wo)||k.memoizedState!==null,Nc(l,h,k),wo=z):Nc(l,h,k);break;default:Nc(l,h,k)}}function Vm(l){var h=l.updateQueue;if(h!==null){l.updateQueue=null;var k=l.stateNode;k===null&&(k=l.stateNode=new T_),h.forEach(function(z){var J=U_.bind(null,l,z);k.has(z)||(k.add(z),z.then(J,J))})}}function Ml(l,h){var k=h.deletions;if(k!==null)for(var z=0;z<k.length;z++){var J=k[z];try{var ie=l,de=h,Re=de;e:for(;Re!==null;){switch(Re.tag){case 5:to=Re.stateNode,Rl=!1;break e;case 3:to=Re.stateNode.containerInfo,Rl=!0;break e;case 4:to=Re.stateNode.containerInfo,Rl=!0;break e}Re=Re.return}if(to===null)throw Error(t(160));Hm(ie,de,J),to=null,Rl=!1;var Ue=J.alternate;Ue!==null&&(Ue.return=null),J.return=null}catch(st){Pi(J,h,st)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)Gm(h,l),h=h.sibling}function Gm(l,h){var k=l.alternate,z=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(Ml(h,l),Pu(l),z&4){try{Gh(3,l,l.return),Dp(3,l)}catch(ar){Pi(l,l.return,ar)}try{Gh(5,l,l.return)}catch(ar){Pi(l,l.return,ar)}}break;case 1:Ml(h,l),Pu(l),z&512&&k!==null&&Zf(k,k.return);break;case 5:if(Ml(h,l),Pu(l),z&512&&k!==null&&Zf(k,k.return),l.flags&32){var J=l.stateNode;try{yt(J,"")}catch(ar){Pi(l,l.return,ar)}}if(z&4&&(J=l.stateNode,J!=null)){var ie=l.memoizedProps,de=k!==null?k.memoizedProps:ie,Re=l.type,Ue=l.updateQueue;if(l.updateQueue=null,Ue!==null)try{Re==="input"&&ie.type==="radio"&&ie.name!=null&&ye(J,ie),Me(Re,de);var st=Me(Re,ie);for(de=0;de<Ue.length;de+=2){var Et=Ue[de],Ct=Ue[de+1];Et==="style"?Ut(J,Ct):Et==="dangerouslySetInnerHTML"?bt(J,Ct):Et==="children"?yt(J,Ct):v(J,Et,Ct,st)}switch(Re){case"input":Ie(J,ie);break;case"textarea":Fe(J,ie);break;case"select":var xt=J._wrapperState.wasMultiple;J._wrapperState.wasMultiple=!!ie.multiple;var Vt=ie.value;Vt!=null?Le(J,!!ie.multiple,Vt,!1):xt!==!!ie.multiple&&(ie.defaultValue!=null?Le(J,!!ie.multiple,ie.defaultValue,!0):Le(J,!!ie.multiple,ie.multiple?[]:"",!1))}J[gu]=ie}catch(ar){Pi(l,l.return,ar)}}break;case 6:if(Ml(h,l),Pu(l),z&4){if(l.stateNode===null)throw Error(t(162));J=l.stateNode,ie=l.memoizedProps;try{J.nodeValue=ie}catch(ar){Pi(l,l.return,ar)}}break;case 3:if(Ml(h,l),Pu(l),z&4&&k!==null&&k.memoizedState.isDehydrated)try{ni(h.containerInfo)}catch(ar){Pi(l,l.return,ar)}break;case 4:Ml(h,l),Pu(l);break;case 13:Ml(h,l),Pu(l),J=l.child,J.flags&8192&&(ie=J.memoizedState!==null,J.stateNode.isHidden=ie,!ie||J.alternate!==null&&J.alternate.memoizedState!==null||(x0=Nn())),z&4&&Vm(l);break;case 22:if(Et=k!==null&&k.memoizedState!==null,l.mode&1?(wo=(st=wo)||Et,Ml(h,l),wo=st):Ml(h,l),Pu(l),z&8192){if(st=l.memoizedState!==null,(l.stateNode.isHidden=st)&&!Et&&(l.mode&1)!==0)for(Kt=l,Et=l.child;Et!==null;){for(Ct=Kt=Et;Kt!==null;){switch(xt=Kt,Vt=xt.child,xt.tag){case 0:case 11:case 14:case 15:Gh(4,xt,xt.return);break;case 1:Zf(xt,xt.return);var Jt=xt.stateNode;if(typeof Jt.componentWillUnmount=="function"){z=xt,k=xt.return;try{h=z,Jt.props=h.memoizedProps,Jt.state=h.memoizedState,Jt.componentWillUnmount()}catch(ar){Pi(z,k,ar)}}break;case 5:Zf(xt,xt.return);break;case 22:if(xt.memoizedState!==null){Ym(Ct);continue}}Vt!==null?(Vt.return=xt,Kt=Vt):Ym(Ct)}Et=Et.sibling}e:for(Et=null,Ct=l;;){if(Ct.tag===5){if(Et===null){Et=Ct;try{J=Ct.stateNode,st?(ie=J.style,typeof ie.setProperty=="function"?ie.setProperty("display","none","important"):ie.display="none"):(Re=Ct.stateNode,Ue=Ct.memoizedProps.style,de=Ue!=null&&Ue.hasOwnProperty("display")?Ue.display:null,Re.style.display=Ot("display",de))}catch(ar){Pi(l,l.return,ar)}}}else if(Ct.tag===6){if(Et===null)try{Ct.stateNode.nodeValue=st?"":Ct.memoizedProps}catch(ar){Pi(l,l.return,ar)}}else if((Ct.tag!==22&&Ct.tag!==23||Ct.memoizedState===null||Ct===l)&&Ct.child!==null){Ct.child.return=Ct,Ct=Ct.child;continue}if(Ct===l)break e;for(;Ct.sibling===null;){if(Ct.return===null||Ct.return===l)break e;Et===Ct&&(Et=null),Ct=Ct.return}Et===Ct&&(Et=null),Ct.sibling.return=Ct.return,Ct=Ct.sibling}}break;case 19:Ml(h,l),Pu(l),z&4&&Vm(l);break;case 21:break;default:Ml(h,l),Pu(l)}}function Pu(l){var h=l.flags;if(h&2){try{e:{for(var k=l.return;k!==null;){if(zm(k)){var z=k;break e}k=k.return}throw Error(t(160))}switch(z.tag){case 5:var J=z.stateNode;z.flags&32&&(yt(J,""),z.flags&=-33);var ie=Um(l);w0(l,ie,J);break;case 3:case 4:var de=z.stateNode.containerInfo,Re=Um(l);b0(l,Re,de);break;default:throw Error(t(161))}}catch(Ue){Pi(l,l.return,Ue)}l.flags&=-3}h&4096&&(l.flags&=-4097)}function M_(l,h,k){Kt=l,Wm(l)}function Wm(l,h,k){for(var z=(l.mode&1)!==0;Kt!==null;){var J=Kt,ie=J.child;if(J.tag===22&&z){var de=J.memoizedState!==null||Fp;if(!de){var Re=J.alternate,Ue=Re!==null&&Re.memoizedState!==null||wo;Re=Fp;var st=wo;if(Fp=de,(wo=Ue)&&!st)for(Kt=J;Kt!==null;)de=Kt,Ue=de.child,de.tag===22&&de.memoizedState!==null?Xm(J):Ue!==null?(Ue.return=de,Kt=Ue):Xm(J);for(;ie!==null;)Kt=ie,Wm(ie),ie=ie.sibling;Kt=J,Fp=Re,wo=st}$m(l)}else(J.subtreeFlags&8772)!==0&&ie!==null?(ie.return=J,Kt=ie):$m(l)}}function $m(l){for(;Kt!==null;){var h=Kt;if((h.flags&8772)!==0){var k=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:wo||Dp(5,h);break;case 1:var z=h.stateNode;if(h.flags&4&&!wo)if(k===null)z.componentDidMount();else{var J=h.elementType===h.type?k.memoizedProps:ga(h.type,k.memoizedProps);z.componentDidUpdate(J,k.memoizedState,z.__reactInternalSnapshotBeforeUpdate)}var ie=h.updateQueue;ie!==null&&hn(h,ie,z);break;case 3:var de=h.updateQueue;if(de!==null){if(k=null,h.child!==null)switch(h.child.tag){case 5:k=h.child.stateNode;break;case 1:k=h.child.stateNode}hn(h,de,k)}break;case 5:var Re=h.stateNode;if(k===null&&h.flags&4){k=Re;var Ue=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":Ue.autoFocus&&k.focus();break;case"img":Ue.src&&(k.src=Ue.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var st=h.alternate;if(st!==null){var Et=st.memoizedState;if(Et!==null){var Ct=Et.dehydrated;Ct!==null&&ni(Ct)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}wo||h.flags&512&&y0(h)}catch(xt){Pi(h,h.return,xt)}}if(h===l){Kt=null;break}if(k=h.sibling,k!==null){k.return=h.return,Kt=k;break}Kt=h.return}}function Ym(l){for(;Kt!==null;){var h=Kt;if(h===l){Kt=null;break}var k=h.sibling;if(k!==null){k.return=h.return,Kt=k;break}Kt=h.return}}function Xm(l){for(;Kt!==null;){var h=Kt;try{switch(h.tag){case 0:case 11:case 15:var k=h.return;try{Dp(4,h)}catch(Ue){Pi(h,k,Ue)}break;case 1:var z=h.stateNode;if(typeof z.componentDidMount=="function"){var J=h.return;try{z.componentDidMount()}catch(Ue){Pi(h,J,Ue)}}var ie=h.return;try{y0(h)}catch(Ue){Pi(h,ie,Ue)}break;case 5:var de=h.return;try{y0(h)}catch(Ue){Pi(h,de,Ue)}}}catch(Ue){Pi(h,h.return,Ue)}if(h===l){Kt=null;break}var Re=h.sibling;if(Re!==null){Re.return=h.return,Kt=Re;break}Kt=h.return}}var I_=Math.ceil,Bp=E.ReactCurrentDispatcher,_0=E.ReactCurrentOwner,ll=E.ReactCurrentBatchConfig,rn=0,ka=null,sa=null,ro=0,Rs=0,Qf=go(0),va=0,Wh=null,df=0,qp=0,S0=0,$h=null,cs=null,x0=0,Jf=1/0,Ju=null,zp=!1,E0=null,Tc=null,Up=!1,Rc=null,Hp=0,Yh=0,P0=null,Vp=-1,Gp=0;function Ho(){return(rn&6)!==0?Nn():Vp!==-1?Vp:Vp=Nn()}function Mc(l){return(l.mode&1)===0?1:(rn&2)!==0&&ro!==0?ro&-ro:Xr.transition!==null?(Gp===0&&(Gp=nu()),Gp):(l=Tr,l!==0||(l=window.event,l=l===void 0?16:Uu(l.type)),l)}function Il(l,h,k,z){if(50<Yh)throw Yh=0,P0=null,Error(t(185));Gs(l,k,z),((rn&2)===0||l!==ka)&&(l===ka&&((rn&2)===0&&(qp|=k),va===4&&Ic(l,ro)),fs(l,z),k===1&&rn===0&&(h.mode&1)===0&&(Jf=Nn()+500,Cl&&ae()))}function fs(l,h){var k=l.callbackNode;ca(l,h);var z=Ni(l,l===ka?ro:0);if(z===0)k!==null&&Go(k),l.callbackNode=null,l.callbackPriority=0;else if(h=z&-z,l.callbackPriority!==h){if(k!=null&&Go(k),h===1)l.tag===0?ee(Zm.bind(null,l)):U(Zm.bind(null,l)),zf(function(){(rn&6)===0&&ae()}),k=null;else{switch(_s(z)){case 1:k=oo;break;case 4:k=dl;break;case 16:k=Vs;break;case 536870912:k=ru;break;default:k=Vs}k=ay(k,Km.bind(null,l))}l.callbackPriority=h,l.callbackNode=k}}function Km(l,h){if(Vp=-1,Gp=0,(rn&6)!==0)throw Error(t(327));var k=l.callbackNode;if(eh()&&l.callbackNode!==k)return null;var z=Ni(l,l===ka?ro:0);if(z===0)return null;if((z&30)!==0||(z&l.expiredLanes)!==0||h)h=Wp(l,z);else{h=z;var J=rn;rn|=2;var ie=Jm();(ka!==l||ro!==h)&&(Ju=null,Jf=Nn()+500,gf(l,h));do try{D_();break}catch(Re){Qm(l,Re)}while(!0);xi(),Bp.current=ie,rn=J,sa!==null?h=0:(ka=null,ro=0,h=va)}if(h!==0){if(h===2&&(J=Wo(l),J!==0&&(z=J,h=O0(l,J))),h===1)throw k=Wh,gf(l,0),Ic(l,z),fs(l,Nn()),k;if(h===6)Ic(l,z);else{if(J=l.current.alternate,(z&30)===0&&!j_(J)&&(h=Wp(l,z),h===2&&(ie=Wo(l),ie!==0&&(z=ie,h=O0(l,ie))),h===1))throw k=Wh,gf(l,0),Ic(l,z),fs(l,Nn()),k;switch(l.finishedWork=J,l.finishedLanes=z,h){case 0:case 1:throw Error(t(345));case 2:vf(l,cs,Ju);break;case 3:if(Ic(l,z),(z&130023424)===z&&(h=x0+500-Nn(),10<h)){if(Ni(l,0)!==0)break;if(J=l.suspendedLanes,(J&z)!==z){Ho(),l.pingedLanes|=l.suspendedLanes&J;break}l.timeoutHandle=Wa(vf.bind(null,l,cs,Ju),h);break}vf(l,cs,Ju);break;case 4:if(Ic(l,z),(z&4194240)===z)break;for(h=l.eventTimes,J=-1;0<z;){var de=31-Ar(z);ie=1<<de,de=h[de],de>J&&(J=de),z&=~ie}if(z=J,z=Nn()-z,z=(120>z?120:480>z?480:1080>z?1080:1920>z?1920:3e3>z?3e3:4320>z?4320:1960*I_(z/1960))-z,10<z){l.timeoutHandle=Wa(vf.bind(null,l,cs,Ju),z);break}vf(l,cs,Ju);break;case 5:vf(l,cs,Ju);break;default:throw Error(t(329))}}}return fs(l,Nn()),l.callbackNode===k?Km.bind(null,l):null}function O0(l,h){var k=$h;return l.current.memoizedState.isDehydrated&&(gf(l,h).flags|=256),l=Wp(l,h),l!==2&&(h=cs,cs=k,h!==null&&A0(h)),l}function A0(l){cs===null?cs=l:cs.push.apply(cs,l)}function j_(l){for(var h=l;;){if(h.flags&16384){var k=h.updateQueue;if(k!==null&&(k=k.stores,k!==null))for(var z=0;z<k.length;z++){var J=k[z],ie=J.getSnapshot;J=J.value;try{if(!Rr(ie(),J))return!1}catch{return!1}}}if(k=h.child,h.subtreeFlags&16384&&k!==null)k.return=h,h=k;else{if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Ic(l,h){for(h&=~S0,h&=~qp,l.suspendedLanes|=h,l.pingedLanes&=~h,l=l.expirationTimes;0<h;){var k=31-Ar(h),z=1<<k;l[k]=-1,h&=~z}}function Zm(l){if((rn&6)!==0)throw Error(t(327));eh();var h=Ni(l,0);if((h&1)===0)return fs(l,Nn()),null;var k=Wp(l,h);if(l.tag!==0&&k===2){var z=Wo(l);z!==0&&(h=z,k=O0(l,z))}if(k===1)throw k=Wh,gf(l,0),Ic(l,h),fs(l,Nn()),k;if(k===6)throw Error(t(345));return l.finishedWork=l.current.alternate,l.finishedLanes=h,vf(l,cs,Ju),fs(l,Nn()),null}function C0(l,h){var k=rn;rn|=1;try{return l(h)}finally{rn=k,rn===0&&(Jf=Nn()+500,Cl&&ae())}}function pf(l){Rc!==null&&Rc.tag===0&&(rn&6)===0&&eh();var h=rn;rn|=1;var k=ll.transition,z=Tr;try{if(ll.transition=null,Tr=1,l)return l()}finally{Tr=z,ll.transition=k,rn=h,(rn&6)===0&&ae()}}function k0(){Rs=Qf.current,Yr(Qf)}function gf(l,h){l.finishedWork=null,l.finishedLanes=0;var k=l.timeoutHandle;if(k!==-1&&(l.timeoutHandle=-1,wc(k)),sa!==null)for(k=sa.return;k!==null;){var z=k;switch(je(z),z.tag){case 1:z=z.type.childContextTypes,z!=null&&mu();break;case 3:sn(),Yr(ra),Yr(Si),aa();break;case 5:Ns(z);break;case 4:sn();break;case 13:Yr(ln);break;case 19:Yr(ln);break;case 10:da(z.type._context);break;case 22:case 23:k0()}k=k.return}if(ka=l,sa=l=jc(l.current,null),ro=Rs=h,va=0,Wh=null,S0=qp=df=0,cs=$h=null,ia!==null){for(h=0;h<ia.length;h++)if(k=ia[h],z=k.interleaved,z!==null){k.interleaved=null;var J=z.next,ie=k.pending;if(ie!==null){var de=ie.next;ie.next=J,z.next=de}k.pending=z}ia=null}return l}function Qm(l,h){do{var k=sa;try{if(xi(),wu.current=Ac,Ka){for(var z=tn.memoizedState;z!==null;){var J=z.queue;J!==null&&(J.pending=null),z=z.next}Ka=!1}if(Ei=0,Bn=Dn=tn=null,yo=!1,Za=0,_0.current=null,k===null||k.return===null){va=1,Wh=h,sa=null;break}e:{var ie=l,de=k.return,Re=k,Ue=h;if(h=ro,Re.flags|=32768,Ue!==null&&typeof Ue=="object"&&typeof Ue.then=="function"){var st=Ue,Et=Re,Ct=Et.tag;if((Et.mode&1)===0&&(Ct===0||Ct===11||Ct===15)){var xt=Et.alternate;xt?(Et.updateQueue=xt.updateQueue,Et.memoizedState=xt.memoizedState,Et.lanes=xt.lanes):(Et.updateQueue=null,Et.memoizedState=null)}var Vt=B(de);if(Vt!==null){Vt.flags&=-257,K(Vt,de,Re,ie,h),Vt.mode&1&&P(ie,st,h),h=Vt,Ue=st;var Jt=h.updateQueue;if(Jt===null){var ar=new Set;ar.add(Ue),h.updateQueue=ar}else Jt.add(Ue);break e}else{if((h&1)===0){P(ie,st,h),L0();break e}Ue=Error(t(426))}}else if(ct&&Re.mode&1){var Wi=B(de);if(Wi!==null){(Wi.flags&65536)===0&&(Wi.flags|=256),K(Wi,de,Re,ie,h),Wr(Qu(Ue,Re));break e}}ie=Ue=Qu(Ue,Re),va!==4&&(va=2),$h===null?$h=[ie]:$h.push(ie),ie=de;do{switch(ie.tag){case 3:ie.flags|=65536,h&=-h,ie.lanes|=h;var tt=jp(ie,Ue,h);pa(ie,tt);break e;case 1:Re=Ue;var Ge=ie.type,nt=ie.stateNode;if((ie.flags&128)===0&&(typeof Ge.getDerivedStateFromError=="function"||nt!==null&&typeof nt.componentDidCatch=="function"&&(Tc===null||!Tc.has(nt)))){ie.flags|=65536,h&=-h,ie.lanes|=h;var Nt=m(ie,Re,h);pa(ie,Nt);break e}}ie=ie.return}while(ie!==null)}ty(k)}catch(or){h=or,sa===k&&k!==null&&(sa=k=k.return);continue}break}while(!0)}function Jm(){var l=Bp.current;return Bp.current=Ac,l===null?Ac:l}function L0(){(va===0||va===3||va===2)&&(va=4),ka===null||(df&268435455)===0&&(qp&268435455)===0||Ic(ka,ro)}function Wp(l,h){var k=rn;rn|=2;var z=Jm();(ka!==l||ro!==h)&&(Ju=null,gf(l,h));do try{F_();break}catch(J){Qm(l,J)}while(!0);if(xi(),rn=k,Bp.current=z,sa!==null)throw Error(t(261));return ka=null,ro=0,va}function F_(){for(;sa!==null;)ey(sa)}function D_(){for(;sa!==null&&!tu();)ey(sa)}function ey(l){var h=iy(l.alternate,l,Rs);l.memoizedProps=l.pendingProps,h===null?ty(l):sa=h,_0.current=null}function ty(l){var h=l;do{var k=h.alternate;if(l=h.return,(h.flags&32768)===0){if(k=L_(k,h,Rs),k!==null){sa=k;return}}else{if(k=N_(k,h),k!==null){k.flags&=32767,sa=k;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{va=6,sa=null;return}}if(h=h.sibling,h!==null){sa=h;return}sa=h=l}while(h!==null);va===0&&(va=5)}function vf(l,h,k){var z=Tr,J=ll.transition;try{ll.transition=null,Tr=1,B_(l,h,k,z)}finally{ll.transition=J,Tr=z}return null}function B_(l,h,k,z){do eh();while(Rc!==null);if((rn&6)!==0)throw Error(t(327));k=l.finishedWork;var J=l.finishedLanes;if(k===null)return null;if(l.finishedWork=null,l.finishedLanes=0,k===l.current)throw Error(t(177));l.callbackNode=null,l.callbackPriority=0;var ie=k.lanes|k.childLanes;if(af(l,ie),l===ka&&(sa=ka=null,ro=0),(k.subtreeFlags&2064)===0&&(k.flags&2064)===0||Up||(Up=!0,ay(Vs,function(){return eh(),null})),ie=(k.flags&15990)!==0,(k.subtreeFlags&15990)!==0||ie){ie=ll.transition,ll.transition=null;var de=Tr;Tr=1;var Re=rn;rn|=4,_0.current=null,R_(l,k),Gm(k,l),No(Ol),su=!!Wu,Ol=Wu=null,l.current=k,M_(k),mc(),rn=Re,Tr=de,ll.transition=ie}else l.current=k;if(Up&&(Up=!1,Rc=l,Hp=J),ie=l.pendingLanes,ie===0&&(Tc=null),$r(k.stateNode),fs(l,Nn()),h!==null)for(z=l.onRecoverableError,k=0;k<h.length;k++)J=h[k],z(J.value,{componentStack:J.stack,digest:J.digest});if(zp)throw zp=!1,l=E0,E0=null,l;return(Hp&1)!==0&&l.tag!==0&&eh(),ie=l.pendingLanes,(ie&1)!==0?l===P0?Yh++:(Yh=0,P0=l):Yh=0,ae(),null}function eh(){if(Rc!==null){var l=_s(Hp),h=ll.transition,k=Tr;try{if(ll.transition=null,Tr=16>l?16:l,Rc===null)var z=!1;else{if(l=Rc,Rc=null,Hp=0,(rn&6)!==0)throw Error(t(331));var J=rn;for(rn|=4,Kt=l.current;Kt!==null;){var ie=Kt,de=ie.child;if((Kt.flags&16)!==0){var Re=ie.deletions;if(Re!==null){for(var Ue=0;Ue<Re.length;Ue++){var st=Re[Ue];for(Kt=st;Kt!==null;){var Et=Kt;switch(Et.tag){case 0:case 11:case 15:Gh(8,Et,ie)}var Ct=Et.child;if(Ct!==null)Ct.return=Et,Kt=Ct;else for(;Kt!==null;){Et=Kt;var xt=Et.sibling,Vt=Et.return;if(qm(Et),Et===st){Kt=null;break}if(xt!==null){xt.return=Vt,Kt=xt;break}Kt=Vt}}}var Jt=ie.alternate;if(Jt!==null){var ar=Jt.child;if(ar!==null){Jt.child=null;do{var Wi=ar.sibling;ar.sibling=null,ar=Wi}while(ar!==null)}}Kt=ie}}if((ie.subtreeFlags&2064)!==0&&de!==null)de.return=ie,Kt=de;else e:for(;Kt!==null;){if(ie=Kt,(ie.flags&2048)!==0)switch(ie.tag){case 0:case 11:case 15:Gh(9,ie,ie.return)}var tt=ie.sibling;if(tt!==null){tt.return=ie.return,Kt=tt;break e}Kt=ie.return}}var Ge=l.current;for(Kt=Ge;Kt!==null;){de=Kt;var nt=de.child;if((de.subtreeFlags&2064)!==0&&nt!==null)nt.return=de,Kt=nt;else e:for(de=Ge;Kt!==null;){if(Re=Kt,(Re.flags&2048)!==0)try{switch(Re.tag){case 0:case 11:case 15:Dp(9,Re)}}catch(or){Pi(Re,Re.return,or)}if(Re===de){Kt=null;break e}var Nt=Re.sibling;if(Nt!==null){Nt.return=Re.return,Kt=Nt;break e}Kt=Re.return}}if(rn=J,ae(),hi&&typeof hi.onPostCommitFiberRoot=="function")try{hi.onPostCommitFiberRoot(so,l)}catch{}z=!0}return z}finally{Tr=k,ll.transition=h}}return!1}function ry(l,h,k){h=Qu(k,h),h=jp(l,h,1),l=Oa(l,h,1),h=Ho(),l!==null&&(Gs(l,1,h),fs(l,h))}function Pi(l,h,k){if(l.tag===3)ry(l,l,k);else for(;h!==null;){if(h.tag===3){ry(h,l,k);break}else if(h.tag===1){var z=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof z.componentDidCatch=="function"&&(Tc===null||!Tc.has(z))){l=Qu(k,l),l=m(h,l,1),h=Oa(h,l,1),l=Ho(),h!==null&&(Gs(h,1,l),fs(h,l));break}}h=h.return}}function q_(l,h,k){var z=l.pingCache;z!==null&&z.delete(h),h=Ho(),l.pingedLanes|=l.suspendedLanes&k,ka===l&&(ro&k)===k&&(va===4||va===3&&(ro&130023424)===ro&&500>Nn()-x0?gf(l,0):S0|=k),fs(l,h)}function ny(l,h){h===0&&((l.mode&1)===0?h=1:(h=Ia,Ia<<=1,(Ia&130023424)===0&&(Ia=4194304)));var k=Ho();l=Ir(l,h),l!==null&&(Gs(l,h,k),fs(l,k))}function z_(l){var h=l.memoizedState,k=0;h!==null&&(k=h.retryLane),ny(l,k)}function U_(l,h){var k=0;switch(l.tag){case 13:var z=l.stateNode,J=l.memoizedState;J!==null&&(k=J.retryLane);break;case 19:z=l.stateNode;break;default:throw Error(t(314))}z!==null&&z.delete(h),ny(l,k)}var iy;iy=function(l,h,k){if(l!==null)if(l.memoizedProps!==h.pendingProps||ra.current)le=!0;else{if((l.lanes&k)===0&&(h.flags&128)===0)return le=!1,g0(l,h,k);le=(l.flags&131072)!==0}else le=!1,ct&&(h.flags&1048576)!==0&&wt(h,be,h.index);switch(h.lanes=0,h.tag){case 2:var z=h.type;Br(l,h),l=h.pendingProps;var J=Al(h,Si.current);pn(h,k),J=ol(null,h,z,l,J,k);var ie=Qa();return h.flags|=1,typeof J=="object"&&J!==null&&typeof J.render=="function"&&J.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,na(z)?(ie=!0,is(h)):ie=!1,h.memoizedState=J.state!==null&&J.state!==void 0?J.state:null,yu(h),J.updater=kc,h.stateNode=J,J._reactInternals=h,Xf(h,z,l,k),h=dn(null,h,z,!0,ie,k)):(h.tag=0,ct&&ie&<(h),Se(null,h,J,k),h=h.child),h;case 16:z=h.elementType;e:{switch(Br(l,h),l=h.pendingProps,J=z._init,z=J(z._payload),h.type=z,J=h.tag=V_(z),l=ga(z,l),J){case 0:h=qt(null,h,z,l,k);break e;case 1:h=kn(null,h,z,l,k);break e;case 11:h=Xe(null,h,z,l,k);break e;case 14:h=ut(null,h,z,ga(z.type,l),k);break e}throw Error(t(306,z,""))}return h;case 0:return z=h.type,J=h.pendingProps,J=h.elementType===z?J:ga(z,J),qt(l,h,z,J,k);case 1:return z=h.type,J=h.pendingProps,J=h.elementType===z?J:ga(z,J),kn(l,h,z,J,k);case 3:e:{if(eo(h),l===null)throw Error(t(387));z=h.pendingProps,ie=h.memoizedState,J=ie.element,Xu(l,h),Bo(h,z,null,k);var de=h.memoizedState;if(z=de.element,ie.isDehydrated)if(ie={element:z,isDehydrated:!1,cache:de.cache,pendingSuspenseBoundaries:de.pendingSuspenseBoundaries,transitions:de.transitions},h.updateQueue.baseState=ie,h.memoizedState=ie,h.flags&256){J=Qu(Error(t(423)),h),h=sl(l,h,z,k,J);break e}else if(z!==J){J=Qu(Error(t(424)),h),h=sl(l,h,z,k,J);break e}else for(Ve=qi(h.stateNode.containerInfo.firstChild),He=h,ct=!0,gt=null,k=xr(h,null,z,k),h.child=k;k;)k.flags=k.flags&-3|4096,k=k.sibling;else{if(yr(),z===J){h=Ca(l,h,k);break e}Se(l,h,z,k)}h=h.child}return h;case 5:return bu(h),l===null&&Rt(h),z=h.type,J=h.pendingProps,ie=l!==null?l.memoizedProps:null,de=J.children,uf(z,J)?de=null:ie!==null&&uf(z,ie)&&(h.flags|=32),br(l,h),Se(l,h,de,k),h.child;case 6:return l===null&&Rt(h),null;case 13:return dt(l,h,k);case 4:return qo(h,h.stateNode.containerInfo),z=h.pendingProps,l===null?h.child=li(h,null,z,k):Se(l,h,z,k),h.child;case 11:return z=h.type,J=h.pendingProps,J=h.elementType===z?J:ga(z,J),Xe(l,h,z,J,k);case 7:return Se(l,h,h.pendingProps,k),h.child;case 8:return Se(l,h,h.pendingProps.children,k),h.child;case 12:return Se(l,h,h.pendingProps.children,k),h.child;case 10:e:{if(z=h.type._context,J=h.pendingProps,ie=h.memoizedProps,de=J.value,en(Hi,z._currentValue),z._currentValue=de,ie!==null)if(Rr(ie.value,de)){if(ie.children===J.children&&!ra.current){h=Ca(l,h,k);break e}}else for(ie=h.child,ie!==null&&(ie.return=h);ie!==null;){var Re=ie.dependencies;if(Re!==null){de=ie.child;for(var Ue=Re.firstContext;Ue!==null;){if(Ue.context===z){if(ie.tag===1){Ue=Ya(-1,k&-k),Ue.tag=2;var st=ie.updateQueue;if(st!==null){st=st.shared;var Et=st.pending;Et===null?Ue.next=Ue:(Ue.next=Et.next,Et.next=Ue),st.pending=Ue}}ie.lanes|=k,Ue=ie.alternate,Ue!==null&&(Ue.lanes|=k),$a(ie.return,k,h),Re.lanes|=k;break}Ue=Ue.next}}else if(ie.tag===10)de=ie.type===h.type?null:ie.child;else if(ie.tag===18){if(de=ie.return,de===null)throw Error(t(341));de.lanes|=k,Re=de.alternate,Re!==null&&(Re.lanes|=k),$a(de,k,h),de=ie.sibling}else de=ie.child;if(de!==null)de.return=ie;else for(de=ie;de!==null;){if(de===h){de=null;break}if(ie=de.sibling,ie!==null){ie.return=de.return,de=ie;break}de=de.return}ie=de}Se(l,h,J.children,k),h=h.child}return h;case 9:return J=h.type,z=h.pendingProps.children,pn(h,k),J=Fn(J),z=z(J),h.flags|=1,Se(l,h,z,k),h.child;case 14:return z=h.type,J=ga(z,h.pendingProps),J=ga(z.type,J),ut(l,h,z,J,k);case 15:return kt(l,h,h.type,h.pendingProps,k);case 17:return z=h.type,J=h.pendingProps,J=h.elementType===z?J:ga(z,J),Br(l,h),h.tag=1,na(z)?(l=!0,is(h)):l=!1,pn(h,k),Ip(h,z,J),Xf(h,z,J,k),dn(null,h,z,!0,l,k);case 19:return Gi(l,h,k);case 22:return Yt(l,h,k)}throw Error(t(156,h.tag))};function ay(l,h){return ws(l,h)}function H_(l,h,k,z){this.tag=l,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=z,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ul(l,h,k,z){return new H_(l,h,k,z)}function N0(l){return l=l.prototype,!(!l||!l.isReactComponent)}function V_(l){if(typeof l=="function")return N0(l)?1:0;if(l!=null){if(l=l.$$typeof,l===L)return 11;if(l===M)return 14}return 2}function jc(l,h){var k=l.alternate;return k===null?(k=ul(l.tag,h,l.key,l.mode),k.elementType=l.elementType,k.type=l.type,k.stateNode=l.stateNode,k.alternate=l,l.alternate=k):(k.pendingProps=h,k.type=l.type,k.flags=0,k.subtreeFlags=0,k.deletions=null),k.flags=l.flags&14680064,k.childLanes=l.childLanes,k.lanes=l.lanes,k.child=l.child,k.memoizedProps=l.memoizedProps,k.memoizedState=l.memoizedState,k.updateQueue=l.updateQueue,h=l.dependencies,k.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},k.sibling=l.sibling,k.index=l.index,k.ref=l.ref,k}function $p(l,h,k,z,J,ie){var de=2;if(z=l,typeof l=="function")N0(l)&&(de=1);else if(typeof l=="string")de=5;else e:switch(l){case N:return mf(k.children,J,ie,h);case T:de=8,J|=8;break;case F:return l=ul(12,k,h,J|2),l.elementType=F,l.lanes=ie,l;case O:return l=ul(13,k,h,J),l.elementType=O,l.lanes=ie,l;case I:return l=ul(19,k,h,J),l.elementType=I,l.lanes=ie,l;case W:return Yp(k,J,ie,h);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case C:de=10;break e;case A:de=9;break e;case L:de=11;break e;case M:de=14;break e;case G:de=16,z=null;break e}throw Error(t(130,l==null?l:typeof l,""))}return h=ul(de,k,h,J),h.elementType=l,h.type=z,h.lanes=ie,h}function mf(l,h,k,z){return l=ul(7,l,z,h),l.lanes=k,l}function Yp(l,h,k,z){return l=ul(22,l,z,h),l.elementType=W,l.lanes=k,l.stateNode={isHidden:!1},l}function T0(l,h,k){return l=ul(6,l,null,h),l.lanes=k,l}function R0(l,h,k){return h=ul(4,l.children!==null?l.children:[],l.key,h),h.lanes=k,h.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},h}function G_(l,h,k,z,J){this.tag=h,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.identifierPrefix=z,this.onRecoverableError=J,this.mutableSourceEagerHydrationData=null}function M0(l,h,k,z,J,ie,de,Re,Ue){return l=new G_(l,h,k,Re,Ue),h===1?(h=1,ie===!0&&(h|=8)):h=0,ie=ul(3,null,null,h),l.current=ie,ie.stateNode=l,ie.memoizedState={element:z,isDehydrated:k,cache:null,transitions:null,pendingSuspenseBoundaries:null},yu(ie),l}function W_(l,h,k){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:z==null?null:""+z,children:l,containerInfo:h,implementation:k}}function oy(l){if(!l)return ns;l=l._reactInternals;e:{if(En(l)!==l||l.tag!==1)throw Error(t(170));var h=l;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(na(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(t(171))}if(l.tag===1){var k=l.type;if(na(k))return Yu(l,k,h)}return h}function sy(l,h,k,z,J,ie,de,Re,Ue){return l=M0(k,z,!0,l,J,ie,de,Re,Ue),l.context=oy(null),k=l.current,z=Ho(),J=Mc(k),ie=Ya(z,J),ie.callback=h??null,Oa(k,ie,J),l.current.lanes=J,Gs(l,J,z),fs(l,z),l}function Xp(l,h,k,z){var J=h.current,ie=Ho(),de=Mc(J);return k=oy(k),h.context===null?h.context=k:h.pendingContext=k,h=Ya(ie,de),h.payload={element:l},z=z===void 0?null:z,z!==null&&(h.callback=z),l=Oa(J,h,de),l!==null&&(Il(l,J,de,ie),kl(l,J,de)),de}function Kp(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function ly(l,h){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var k=l.retryLane;l.retryLane=k!==0&&k<h?k:h}}function I0(l,h){ly(l,h),(l=l.alternate)&&ly(l,h)}function $_(){return null}var uy=typeof reportError=="function"?reportError:function(l){console.error(l)};function j0(l){this._internalRoot=l}Zp.prototype.render=j0.prototype.render=function(l){var h=this._internalRoot;if(h===null)throw Error(t(409));Xp(l,h,null,null)},Zp.prototype.unmount=j0.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var h=l.containerInfo;pf(function(){Xp(null,l,null,null)}),h[Ui]=null}};function Zp(l){this._internalRoot=l}Zp.prototype.unstable_scheduleHydration=function(l){if(l){var h=$o();l={blockedOn:null,target:l,priority:h};for(var k=0;k<lo.length&&h!==0&&h<lo[k].priority;k++);lo.splice(k,0,l),k===0&&Ks(l)}};function F0(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function Qp(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function cy(){}function Y_(l,h,k,z,J){if(J){if(typeof z=="function"){var ie=z;z=function(){var st=Kp(de);ie.call(st)}}var de=sy(h,z,l,0,null,!1,!1,"",cy);return l._reactRootContainer=de,l[Ui]=de.current,Cs(l.nodeType===8?l.parentNode:l),pf(),de}for(;J=l.lastChild;)l.removeChild(J);if(typeof z=="function"){var Re=z;z=function(){var st=Kp(Ue);Re.call(st)}}var Ue=M0(l,0,!1,null,null,!1,!1,"",cy);return l._reactRootContainer=Ue,l[Ui]=Ue.current,Cs(l.nodeType===8?l.parentNode:l),pf(function(){Xp(h,Ue,k,z)}),Ue}function Jp(l,h,k,z,J){var ie=k._reactRootContainer;if(ie){var de=ie;if(typeof J=="function"){var Re=J;J=function(){var Ue=Kp(de);Re.call(Ue)}}Xp(h,de,l,J)}else de=Y_(k,h,l,J,z);return Kp(de)}Ws=function(l){switch(l.tag){case 3:var h=l.stateNode;if(h.current.memoizedState.isDehydrated){var k=ri(h.pendingLanes);k!==0&&(iu(h,k|1),fs(h,Nn()),(rn&6)===0&&(Jf=Nn()+500,ae()))}break;case 13:pf(function(){var z=Ir(l,1);if(z!==null){var J=Ho();Il(z,l,1,J)}}),I0(l,1)}},$s=function(l){if(l.tag===13){var h=Ir(l,134217728);if(h!==null){var k=Ho();Il(h,l,134217728,k)}I0(l,134217728)}},yc=function(l){if(l.tag===13){var h=Mc(l),k=Ir(l,h);if(k!==null){var z=Ho();Il(k,l,h,z)}I0(l,h)}},$o=function(){return Tr},Ss=function(l,h){var k=Tr;try{return Tr=l,h()}finally{Tr=k}},Lt=function(l,h,k){switch(h){case"input":if(Ie(l,k),h=k.name,k.type==="radio"&&h!=null){for(k=l;k.parentNode;)k=k.parentNode;for(k=k.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<k.length;h++){var z=k[h];if(z!==l&&z.form===l.form){var J=yi(z);if(!J)throw Error(t(90));Pe(z),Ie(z,J)}}}break;case"textarea":Fe(l,k);break;case"select":h=k.value,h!=null&&Le(l,!!k.multiple,h,!1)}},vt=C0,pt=pf;var X_={usingClientEntryPoint:!1,Events:[vu,si,yi,ze,qe,C0]},Xh={findFiberByHostInstance:Ls,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},K_={bundleType:Xh.bundleType,version:Xh.version,rendererPackageName:Xh.rendererPackageName,rendererConfig:Xh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=ua(l),l===null?null:l.stateNode},findFiberByHostInstance:Xh.findFiberByHostInstance||$_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var e1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e1.isDisabled&&e1.supportsFiber)try{so=e1.inject(K_),hi=e1}catch{}}return hs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X_,hs.createPortal=function(l,h){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!F0(h))throw Error(t(200));return W_(l,h,null,k)},hs.createRoot=function(l,h){if(!F0(l))throw Error(t(299));var k=!1,z="",J=uy;return h!=null&&(h.unstable_strictMode===!0&&(k=!0),h.identifierPrefix!==void 0&&(z=h.identifierPrefix),h.onRecoverableError!==void 0&&(J=h.onRecoverableError)),h=M0(l,1,!1,null,null,k,!1,z,J),l[Ui]=h.current,Cs(l.nodeType===8?l.parentNode:l),new j0(h)},hs.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var h=l._reactInternals;if(h===void 0)throw typeof l.render=="function"?Error(t(188)):(l=Object.keys(l).join(","),Error(t(268,l)));return l=ua(h),l=l===null?null:l.stateNode,l},hs.flushSync=function(l){return pf(l)},hs.hydrate=function(l,h,k){if(!Qp(h))throw Error(t(200));return Jp(null,l,h,!0,k)},hs.hydrateRoot=function(l,h,k){if(!F0(l))throw Error(t(405));var z=k!=null&&k.hydratedSources||null,J=!1,ie="",de=uy;if(k!=null&&(k.unstable_strictMode===!0&&(J=!0),k.identifierPrefix!==void 0&&(ie=k.identifierPrefix),k.onRecoverableError!==void 0&&(de=k.onRecoverableError)),h=sy(h,null,l,1,k??null,J,!1,ie,de),l[Ui]=h.current,Cs(l),z)for(l=0;l<z.length;l++)k=z[l],J=k._getVersion,J=J(k._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[k,J]:h.mutableSourceEagerHydrationData.push(k,J);return new Zp(h)},hs.render=function(l,h,k){if(!Qp(h))throw Error(t(200));return Jp(null,l,h,!1,k)},hs.unmountComponentAtNode=function(l){if(!Qp(l))throw Error(t(40));return l._reactRootContainer?(pf(function(){Jp(null,null,l,!1,function(){l._reactRootContainer=null,l[Ui]=null})}),!0):!1},hs.unstable_batchedUpdates=C0,hs.unstable_renderSubtreeIntoContainer=function(l,h,k,z){if(!Qp(k))throw Error(t(200));if(l==null||l._reactInternals===void 0)throw Error(t(38));return Jp(l,h,k,!1,z)},hs.version="18.3.1-next-f1338f8080-20240426",hs}var vy;function uw(){if(vy)return B0.exports;vy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),B0.exports=e7(),B0.exports}var my;function t7(){if(my)return t1;my=1;var e=uw();return t1.createRoot=e.createRoot,t1.hydrateRoot=e.hydrateRoot,t1}var r7=t7();const cw=mp(r7);var Kh={};function Pr(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var n7={};function q1(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:n7}var fw=Object.assign,E1=Object.getOwnPropertyDescriptor,Nu=Object.defineProperty,yp=Object.prototype,c2=[];Object.freeze(c2);var D2={};Object.freeze(D2);var i7=typeof Proxy<"u",a7=Object.toString();function hw(){i7||Pr("Proxy not available")}function dw(e){var r=!1;return function(){if(!r)return r=!0,e.apply(this,arguments)}}var ch=function(){};function Bs(e){return typeof e=="function"}function Af(e){var r=typeof e;switch(r){case"string":case"symbol":case"number":return!0}return!1}function z1(e){return e!==null&&typeof e=="object"}function dc(e){if(!z1(e))return!1;var r=Object.getPrototypeOf(e);if(r==null)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t.toString()===a7}function pw(e){var r=e==null?void 0:e.constructor;return r?r.name==="GeneratorFunction"||r.displayName==="GeneratorFunction":!1}function bp(e,r,t){Nu(e,r,{enumerable:!1,writable:!0,configurable:!0,value:t})}function gw(e,r,t){Nu(e,r,{enumerable:!1,writable:!1,configurable:!0,value:t})}function Qc(e,r){var t="isMobX"+e;return r.prototype[t]=!0,function(n){return z1(n)&&n[t]===!0}}function Th(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function o7(e){var r=Object.getPrototypeOf(e),t=Object.getPrototypeOf(r),n=Object.getPrototypeOf(t);return n===null}function uc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var vw=typeof Object.getOwnPropertySymbols<"u";function s7(e){var r=Object.keys(e);if(!vw)return r;var t=Object.getOwnPropertySymbols(e);return t.length?[].concat(r,t.filter(function(n){return yp.propertyIsEnumerable.call(e,n)})):r}var wh=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:vw?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function mw(e){return e===null?null:typeof e=="object"?""+e:e}function cc(e,r){return yp.hasOwnProperty.call(e,r)}var l7=Object.getOwnPropertyDescriptors||function(r){var t={};return wh(r).forEach(function(n){t[n]=E1(r,n)}),t};function js(e,r){return!!(e&r)}function Fs(e,r,t){return t?e|=r:e&=~r,e}function yy(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function u7(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f7(n.key),n)}}function Rh(e,r,t){return r&&u7(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fh(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=h7(e))||r){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},$c.apply(null,arguments)}function yw(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,f2(e,r)}function f2(e,r){return f2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},f2(e,r)}function c7(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function f7(e){var r=c7(e,"string");return typeof r=="symbol"?r:r+""}function h7(e,r){if(e){if(typeof e=="string")return yy(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?yy(e,r):void 0}}var ku=Symbol("mobx-stored-annotations");function Wl(e){function r(t,n){if(_p(n))return e.decorate_20223_(t,n);wp(t,n,e)}return Object.assign(r,e)}function wp(e,r,t){cc(e,ku)||bp(e,ku,$c({},e[ku])),_7(t)||(e[ku][r]=t)}function d7(e){return cc(e,ku)||bp(e,ku,$c({},e[ku])),e[ku]}function _p(e){return typeof e=="object"&&typeof e.kind=="string"}var sr=Symbol("mobx administration"),Jc=function(){function e(t){t===void 0&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=cn.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var r=e.prototype;return r.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},r.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},r.reportObserved=function(){return Fw(this)},r.reportChanged=function(){ps(),Dw(this),gs()},r.toString=function(){return this.name_},Rh(e,[{key:"isBeingObserved",get:function(){return js(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return js(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Jc.isBeingObservedMask_=1;Jc.isPendingUnobservationMask_=2;Jc.diffValueMask_=4;var B2=Qc("Atom",Jc);function cp(e,r,t){r===void 0&&(r=ch),t===void 0&&(t=ch);var n=new Jc(e);return r!==ch&&$w(n,r),t!==ch&&G2(n,t),n}function p7(e,r){return e===r}function g7(e,r){return tm(e,r)}function v7(e,r){return tm(e,r,1)}function m7(e,r){return Object.is?Object.is(e,r):e===r?e!==0||1/e===1/r:e!==e&&r!==r}var Cf={identity:p7,structural:g7,default:m7,shallow:v7};function kf(e,r,t){return X1(e)?e:Array.isArray(e)?Ln.array(e,{name:t}):dc(e)?Ln.object(e,void 0,{name:t}):Th(e)?Ln.map(e,{name:t}):uc(e)?Ln.set(e,{name:t}):typeof e=="function"&&!xh(e)&&!Eh(e)?pw(e)?Nf(e):_h(t,e):e}function y7(e,r,t){if(e==null||Ta(e)||Vo(e)||io(e)||ma(e))return e;if(Array.isArray(e))return Ln.array(e,{name:t,deep:!1});if(dc(e))return Ln.object(e,void 0,{name:t,deep:!1});if(Th(e))return Ln.map(e,{name:t,deep:!1});if(uc(e))return Ln.set(e,{name:t,deep:!1})}function U1(e){return e}function b7(e,r){return tm(e,r)?r:e}var bw="override",w7=Wl({annotationType_:bw,make_:S7,extend_:x7,decorate_20223_:E7});function _7(e){return e.annotationType_===bw}function S7(e,r){return 0}function x7(e,r,t,n){Pr("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function E7(e,r){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Sp(e,r){return{annotationType_:e,options_:r,make_:P7,extend_:O7,decorate_20223_:A7}}function P7(e,r,t,n){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,r,t,!1)===null?0:1;if(n===e.target_)return this.extend_(e,r,t,!1)===null?0:2;if(xh(t.value))return 1;var i=ww(e,this,r,t,!1);return Nu(n,r,i),2}function O7(e,r,t,n){var a=ww(e,this,r,t);return e.defineProperty_(r,a,n)}function A7(e,r){var t=r.kind,n=r.name,a=r.addInitializer,i=this,o=function(u){var d,p,y,f;return Yc((d=(p=i.options_)==null?void 0:p.name)!=null?d:n.toString(),u,(y=(f=i.options_)==null?void 0:f.autoAction)!=null?y:!1)};if(t=="field")return function(c){var u,d=c;return xh(d)||(d=o(d)),(u=i.options_)!=null&&u.bound&&(d=d.bind(this),d.isMobxAction=!0),d};if(t=="method"){var s;return xh(e)||(e=o(e)),(s=this.options_)!=null&&s.bound&&a(function(){var c=this,u=c[n].bind(c);u.isMobxAction=!0,c[n]=u}),e}Pr("Cannot apply '"+i.annotationType_+"' to '"+String(n)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+i.annotationType_+"' can only be used on properties with a function value."))}function C7(e,r,t,n){r.annotationType_,n.value}function ww(e,r,t,n,a){var i,o,s,c,u,d,p;a===void 0&&(a=Tt.safeDescriptors),C7(e,r,t,n);var y=n.value;if((i=r.options_)!=null&&i.bound){var f;y=y.bind((f=e.proxy_)!=null?f:e.target_)}return{value:Yc((o=(s=r.options_)==null?void 0:s.name)!=null?o:t.toString(),y,(c=(u=r.options_)==null?void 0:u.autoAction)!=null?c:!1,(d=r.options_)!=null&&d.bound?(p=e.proxy_)!=null?p:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function _w(e,r){return{annotationType_:e,options_:r,make_:k7,extend_:L7,decorate_20223_:N7}}function k7(e,r,t,n){var a;if(n===e.target_)return this.extend_(e,r,t,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!cc(e.target_,r)||!Eh(e.target_[r]))&&this.extend_(e,r,t,!1)===null)return 0;if(Eh(t.value))return 1;var i=Sw(e,this,r,t,!1,!1);return Nu(n,r,i),2}function L7(e,r,t,n){var a,i=Sw(e,this,r,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(r,i,n)}function N7(e,r){var t,n=r.name,a=r.addInitializer;return Eh(e)||(e=Nf(e)),(t=this.options_)!=null&&t.bound&&a(function(){var i=this,o=i[n].bind(i);o.isMobXFlow=!0,i[n]=o}),e}function T7(e,r,t,n){r.annotationType_,n.value}function Sw(e,r,t,n,a,i){i===void 0&&(i=Tt.safeDescriptors),T7(e,r,t,n);var o=n.value;if(Eh(o)||(o=Nf(o)),a){var s;o=o.bind((s=e.proxy_)!=null?s:e.target_),o.isMobXFlow=!0}return{value:o,configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function q2(e,r){return{annotationType_:e,options_:r,make_:R7,extend_:M7,decorate_20223_:I7}}function R7(e,r,t){return this.extend_(e,r,t,!1)===null?0:1}function M7(e,r,t,n){return j7(e,this,r,t),e.defineComputedProperty_(r,$c({},this.options_,{get:t.get,set:t.set}),n)}function I7(e,r){var t=this,n=r.name,a=r.addInitializer;return a(function(){var i=Mf(this)[sr],o=$c({},t.options_,{get:e,context:this});o.name||(o.name="ObservableObject."+n.toString()),i.values_.set(n,new Xl(o))}),function(){return this[sr].getObservablePropValue_(n)}}function j7(e,r,t,n){r.annotationType_,n.get}function H1(e,r){return{annotationType_:e,options_:r,make_:F7,extend_:D7,decorate_20223_:B7}}function F7(e,r,t){return this.extend_(e,r,t,!1)===null?0:1}function D7(e,r,t,n){var a,i;return q7(e,this),e.defineObservableProperty_(r,t.value,(a=(i=this.options_)==null?void 0:i.enhancer)!=null?a:kf,n)}function B7(e,r){var t=this,n=r.kind,a=r.name,i=new WeakSet;function o(s,c){var u,d,p=Mf(s)[sr],y=new Gc(c,(u=(d=t.options_)==null?void 0:d.enhancer)!=null?u:kf,"ObservableObject."+a.toString(),!1);p.values_.set(a,y),i.add(s)}if(n=="accessor")return{get:function(){return i.has(this)||o(this,e.get.call(this)),this[sr].getObservablePropValue_(a)},set:function(c){return i.has(this)||o(this,c),this[sr].setObservablePropValue_(a,c)},init:function(c){return i.has(this)||o(this,c),c}}}function q7(e,r,t,n){r.annotationType_}var z7="true",U7=xw();function xw(e){return{annotationType_:z7,options_:e,make_:H7,extend_:V7,decorate_20223_:G7}}function H7(e,r,t,n){var a,i;if(t.get)return Tf.make_(e,r,t,n);if(t.set){var o=Yc(r.toString(),t.set);return n===e.target_?e.defineProperty_(r,{configurable:Tt.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(Nu(n,r,{configurable:!0,set:o}),2)}if(n!==e.target_&&typeof t.value=="function"){var s;if(pw(t.value)){var c,u=(c=this.options_)!=null&&c.autoBind?Nf.bound:Nf;return u.make_(e,r,t,n)}var d=(s=this.options_)!=null&&s.autoBind?_h.bound:_h;return d.make_(e,r,t,n)}var p=((a=this.options_)==null?void 0:a.deep)===!1?Ln.ref:Ln;if(typeof t.value=="function"&&(i=this.options_)!=null&&i.autoBind){var y;t.value=t.value.bind((y=e.proxy_)!=null?y:e.target_)}return p.make_(e,r,t,n)}function V7(e,r,t,n){var a,i;if(t.get)return Tf.extend_(e,r,t,n);if(t.set)return e.defineProperty_(r,{configurable:Tt.safeDescriptors?e.isPlainObject_:!0,set:Yc(r.toString(),t.set)},n);if(typeof t.value=="function"&&(a=this.options_)!=null&&a.autoBind){var o;t.value=t.value.bind((o=e.proxy_)!=null?o:e.target_)}var s=((i=this.options_)==null?void 0:i.deep)===!1?Ln.ref:Ln;return s.extend_(e,r,t,n)}function G7(e,r){Pr("'"+this.annotationType_+"' cannot be used as a decorator")}var W7="observable",$7="observable.ref",Y7="observable.shallow",X7="observable.struct",Ew={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ew);function r1(e){return e||Ew}var h2=H1(W7),K7=H1($7,{enhancer:U1}),Z7=H1(Y7,{enhancer:y7}),Q7=H1(X7,{enhancer:b7}),Pw=Wl(h2);function n1(e){return e.deep===!0?kf:e.deep===!1?U1:e9(e.defaultDecorator)}function J7(e){var r;return e?(r=e.defaultDecorator)!=null?r:xw(e):void 0}function e9(e){var r,t;return e&&(r=(t=e.options_)==null?void 0:t.enhancer)!=null?r:kf}function Ow(e,r,t){if(_p(r))return h2.decorate_20223_(e,r);if(Af(r)){wp(e,r,h2);return}return X1(e)?e:dc(e)?Ln.object(e,r,t):Array.isArray(e)?Ln.array(e,r):Th(e)?Ln.map(e,r):uc(e)?Ln.set(e,r):typeof e=="object"&&e!==null?e:Ln.box(e,r)}fw(Ow,Pw);var t9={box:function(r,t){var n=r1(t);return new Gc(r,n1(n),n.name,!0,n.equals)},array:function(r,t){var n=r1(t);return(Tt.useProxies===!1||n.proxy===!1?sS:Z9)(r,n1(n),n.name)},map:function(r,t){var n=r1(t);return new Z1(r,n1(n),n.name)},set:function(r,t){var n=r1(t);return new J2(r,n1(n),n.name)},object:function(r,t,n){return ef(function(){return W2(Tt.useProxies===!1||(n==null?void 0:n.proxy)===!1?Mf({},n):$9({},n),r,t)})},ref:Wl(K7),shallow:Wl(Z7),deep:Pw,struct:Wl(Q7)},Ln=fw(Ow,t9),Aw="computed",r9="computed.struct",d2=q2(Aw),n9=q2(r9,{equals:Cf.structural}),Tf=function(r,t){if(_p(t))return d2.decorate_20223_(r,t);if(Af(t))return wp(r,t,d2);if(dc(r))return Wl(q2(Aw,r));var n=dc(t)?t:{};return n.get=r,n.name||(n.name=r.name||""),new Xl(n)};Object.assign(Tf,d2);Tf.struct=Wl(n9);var by,wy,P1=0,i9=1,a9=(by=(wy=E1(function(){},"name"))==null?void 0:wy.configurable)!=null?by:!1,_y={value:"action",configurable:!0,writable:!1,enumerable:!1};function Yc(e,r,t,n){t===void 0&&(t=!1);function a(){return Cw(e,t,r,n||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return r.toString()},a9&&(_y.value=e,Nu(a,"name",_y)),a}function Cw(e,r,t,n,a){var i=kw(e,r);try{return t.apply(n,a)}catch(o){throw i.error_=o,o}finally{Lw(i)}}function kw(e,r,t,n){var a=!1,i=0,o=Tt.trackingDerivation,s=!r||!o;ps();var c=Tt.allowStateChanges;s&&(Rf(),c=V1(!0));var u=W1(!0),d={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:c,prevAllowStateReads_:u,notifySpy_:a,startTime_:i,actionId_:i9++,parentActionId_:P1};return P1=d.actionId_,d}function Lw(e){P1!==e.actionId_&&Pr(30),P1=e.parentActionId_,e.error_!==void 0&&(Tt.suppressReactionErrors=!0),G1(e.prevAllowStateChanges_),ph(e.prevAllowStateReads_),gs(),e.runAsAction_&&fc(e.prevDerivation_),Tt.suppressReactionErrors=!1}function z2(e,r){var t=V1(e);try{return r()}finally{G1(t)}}function V1(e){var r=Tt.allowStateChanges;return Tt.allowStateChanges=e,r}function G1(e){Tt.allowStateChanges=e}var Gc=function(e){function r(n,a,i,o,s){var c;return i===void 0&&(i="ObservableValue"),s===void 0&&(s=Cf.default),c=e.call(this,i)||this,c.enhancer=void 0,c.name_=void 0,c.equals=void 0,c.hasUnreportedChange_=!1,c.interceptors_=void 0,c.changeListeners_=void 0,c.value_=void 0,c.dehancer=void 0,c.enhancer=a,c.name_=i,c.equals=s,c.value_=a(n,void 0,i),c}yw(r,e);var t=r.prototype;return t.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},t.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==Tt.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(cl(this)){var i=fl(this,{object:this,type:Tu,newValue:a});if(!i)return Tt.UNCHANGED;a=i.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?Tt.UNCHANGED:a},t.setNewValue_=function(a){var i=this.value_;this.value_=a,this.reportChanged(),$l(this)&&Yl(this,{type:Tu,object:this,newValue:a,oldValue:i})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(a){return xp(this,a)},t.observe_=function(a,i){return i&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:Tu,newValue:this.value_,oldValue:void 0}),Ep(this,a)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return mw(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},r}(Jc),U2=Qc("ObservableValue",Gc),Xl=function(){function e(t){this.dependenciesState_=cn.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=cn.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new A1(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=O1.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||Pr(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=Yc("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?Cf.structural:Cf.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var r=e.prototype;return r.onBecomeStale_=function(){g9(this)},r.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},r.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},r.get=function(){if(this.isComputing&&Pr(32,this.name_,this.derivation),Tt.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)p2(this)&&(this.warnAboutUntrackedRead_(),ps(),this.value_=this.computeValue_(!1),gs());else if(Fw(this),p2(this)){var n=Tt.trackingContext;this.keepAlive_&&!n&&(Tt.trackingContext=this),this.trackAndCompute()&&p9(this),Tt.trackingContext=n}var a=this.value_;if(p1(a))throw a.cause;return a},r.set=function(n){if(this.setter_){this.isRunningSetter&&Pr(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else Pr(34,this.name_)},r.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===cn.NOT_TRACKING_,i=this.computeValue_(!0),o=a||p1(n)||p1(i)||!this.equals_(n,i);return o&&(this.value_=i),o},r.computeValue_=function(n){this.isComputing=!0;var a=V1(!1),i;if(n)i=Nw(this,this.derivation,this.scope_);else if(Tt.disableErrorBoundaries===!0)i=this.derivation.call(this.scope_);else try{i=this.derivation.call(this.scope_)}catch(o){i=new A1(o)}return G1(a),this.isComputing=!1,i},r.suspend_=function(){this.keepAlive_||(g2(this),this.value_=void 0)},r.observe_=function(n,a){var i=this,o=!0,s=void 0;return V2(function(){var c=i.get();if(!o||a){var u=Rf();n({observableKind:"computed",debugObjectName:i.name_,type:Tu,object:i,newValue:c,oldValue:s}),fc(u)}o=!1,s=c})},r.warnAboutUntrackedRead_=function(){},r.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},r.valueOf=function(){return mw(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},Rh(e,[{key:"isComputing",get:function(){return js(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return js(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return js(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return js(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Xl.isComputingMask_=1;Xl.isRunningSetterMask_=2;Xl.isBeingObservedMask_=4;Xl.isPendingUnobservationMask_=8;Xl.diffValueMask_=16;var Lf=Qc("ComputedValue",Xl),cn;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(cn||(cn={}));var O1;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(O1||(O1={}));var A1=function(r){this.cause=void 0,this.cause=r};function p1(e){return e instanceof A1}function p2(e){switch(e.dependenciesState_){case cn.UP_TO_DATE_:return!1;case cn.NOT_TRACKING_:case cn.STALE_:return!0;case cn.POSSIBLY_STALE_:{for(var r=W1(!0),t=Rf(),n=e.observing_,a=n.length,i=0;i<a;i++){var o=n[i];if(Lf(o)){if(Tt.disableErrorBoundaries)o.get();else try{o.get()}catch{return fc(t),ph(r),!0}if(e.dependenciesState_===cn.STALE_)return fc(t),ph(r),!0}}return Tw(e),fc(t),ph(r),!1}}}function o9(){return Tt.trackingDerivation!==null}function Nw(e,r,t){var n=W1(!0);Tw(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Tt.runId;var a=Tt.trackingDerivation;Tt.trackingDerivation=e,Tt.inBatch++;var i;if(Tt.disableErrorBoundaries===!0)i=r.call(t);else try{i=r.call(t)}catch(o){i=new A1(o)}return Tt.inBatch--,Tt.trackingDerivation=a,s9(e),ph(n),i}function s9(e){for(var r=e.observing_,t=e.observing_=e.newObserving_,n=cn.UP_TO_DATE_,a=0,i=e.unboundDepsCount_,o=0;o<i;o++){var s=t[o];s.diffValue===0&&(s.diffValue=1,a!==o&&(t[a]=s),a++),s.dependenciesState_>n&&(n=s.dependenciesState_)}for(t.length=a,e.newObserving_=null,i=r.length;i--;){var c=r[i];c.diffValue===0&&Iw(c,e),c.diffValue=0}for(;a--;){var u=t[a];u.diffValue===1&&(u.diffValue=0,d9(u,e))}n!==cn.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function g2(e){var r=e.observing_;e.observing_=[];for(var t=r.length;t--;)Iw(r[t],e);e.dependenciesState_=cn.NOT_TRACKING_}function H2(e){var r=Rf();try{return e()}finally{fc(r)}}function Rf(){var e=Tt.trackingDerivation;return Tt.trackingDerivation=null,e}function fc(e){Tt.trackingDerivation=e}function W1(e){var r=Tt.allowStateReads;return Tt.allowStateReads=e,r}function ph(e){Tt.allowStateReads=e}function Tw(e){if(e.dependenciesState_!==cn.UP_TO_DATE_){e.dependenciesState_=cn.UP_TO_DATE_;for(var r=e.observing_,t=r.length;t--;)r[t].lowestObserverState_=cn.UP_TO_DATE_}}var l9=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],ap=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},g1=!0,Rw=!1,Tt=function(){var e=q1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(g1=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ap().version&&(g1=!1),g1?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ap):(setTimeout(function(){Rw||Pr(35)},1),new ap)}();function u9(){if((Tt.pendingReactions.length||Tt.inBatch||Tt.isRunningReactions)&&Pr(36),Rw=!0,g1){var e=q1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),Tt=new ap}}function Mw(){return Tt}function c9(){var e=new ap;for(var r in e)l9.indexOf(r)===-1&&(Tt[r]=e[r]);Tt.allowStateChanges=!Tt.enforceActions}function f9(e){return e.observers_&&e.observers_.size>0}function h9(e){return e.observers_}function d9(e,r){e.observers_.add(r),e.lowestObserverState_>r.dependenciesState_&&(e.lowestObserverState_=r.dependenciesState_)}function Iw(e,r){e.observers_.delete(r),e.observers_.size===0&&jw(e)}function jw(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,Tt.pendingUnobservations.push(e))}function ps(){Tt.inBatch++}function gs(){if(--Tt.inBatch===0){Bw();for(var e=Tt.pendingUnobservations,r=0;r<e.length;r++){var t=e[r];t.isPendingUnobservation=!1,t.observers_.size===0&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof Xl&&t.suspend_())}Tt.pendingUnobservations=[]}}function Fw(e){var r=Tt.trackingDerivation;return r!==null?(r.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=r.runId_,r.newObserving_[r.unboundDepsCount_++]=e,!e.isBeingObserved&&Tt.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&Tt.inBatch>0&&jw(e),!1)}function Dw(e){e.lowestObserverState_!==cn.STALE_&&(e.lowestObserverState_=cn.STALE_,e.observers_.forEach(function(r){r.dependenciesState_===cn.UP_TO_DATE_&&r.onBecomeStale_(),r.dependenciesState_=cn.STALE_}))}function p9(e){e.lowestObserverState_!==cn.STALE_&&(e.lowestObserverState_=cn.STALE_,e.observers_.forEach(function(r){r.dependenciesState_===cn.POSSIBLY_STALE_?r.dependenciesState_=cn.STALE_:r.dependenciesState_===cn.UP_TO_DATE_&&(e.lowestObserverState_=cn.UP_TO_DATE_)}))}function g9(e){e.lowestObserverState_===cn.UP_TO_DATE_&&(e.lowestObserverState_=cn.POSSIBLY_STALE_,e.observers_.forEach(function(r){r.dependenciesState_===cn.UP_TO_DATE_&&(r.dependenciesState_=cn.POSSIBLY_STALE_,r.onBecomeStale_())}))}var Kl=function(){function e(t,n,a,i){t===void 0&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=cn.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=O1.NONE,this.name_=t,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var r=e.prototype;return r.onBecomeStale_=function(){this.schedule_()},r.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Tt.pendingReactions.push(this),Bw())},r.runReaction_=function(){if(!this.isDisposed){ps(),this.isScheduled=!1;var n=Tt.trackingContext;if(Tt.trackingContext=this,p2(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}Tt.trackingContext=n,gs()}},r.track=function(n){if(!this.isDisposed){ps(),this.isRunning=!0;var a=Tt.trackingContext;Tt.trackingContext=this;var i=Nw(this,n,void 0);Tt.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&g2(this),p1(i)&&this.reportExceptionInDerivation_(i.cause),gs()}},r.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(Tt.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";Tt.suppressReactionErrors||console.error(i,n),Tt.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},r.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ps(),g2(this),gs()))},r.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[sr]=this,i},r.toString=function(){return"Reaction["+this.name_+"]"},r.trace=function(n){},Rh(e,[{key:"isDisposed",get:function(){return js(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return js(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return js(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return js(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=Fs(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return js(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Fs(this.flags_,e.diffValueMask_,n===1)}}])}();Kl.isDisposedMask_=1;Kl.isScheduledMask_=2;Kl.isTrackPendingMask_=4;Kl.isRunningMask_=8;Kl.diffValueMask_=16;function v9(e){return Tt.globalReactionErrorHandlers.push(e),function(){var r=Tt.globalReactionErrorHandlers.indexOf(e);r>=0&&Tt.globalReactionErrorHandlers.splice(r,1)}}var m9=100,v2=function(r){return r()};function Bw(){Tt.inBatch>0||Tt.isRunningReactions||v2(y9)}function y9(){Tt.isRunningReactions=!0;for(var e=Tt.pendingReactions,r=0;e.length>0;){++r===m9&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var t=e.splice(0),n=0,a=t.length;n<a;n++)t[n].runReaction_()}Tt.isRunningReactions=!1}var C1=Qc("Reaction",Kl);function b9(e){var r=v2;v2=function(n){return e(function(){return r(n)})}}function op(){return!1}function qw(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var zw="action",w9="action.bound",Uw="autoAction",_9="autoAction.bound",Hw="<unnamed action>",m2=Sp(zw),S9=Sp(w9,{bound:!0}),y2=Sp(Uw,{autoAction:!0}),x9=Sp(_9,{autoAction:!0,bound:!0});function Vw(e){var r=function(n,a){if(Bs(n))return Yc(n.name||Hw,n,e);if(Bs(a))return Yc(n,a,e);if(_p(a))return(e?y2:m2).decorate_20223_(n,a);if(Af(a))return wp(n,a,e?y2:m2);if(Af(n))return Wl(Sp(e?Uw:zw,{name:n,autoAction:e}))};return r}var la=Vw(!1);Object.assign(la,m2);var _h=Vw(!0);Object.assign(_h,y2);la.bound=Wl(S9);_h.bound=Wl(x9);function Sh(e){return Cw(e.name||Hw,!1,e,this,void 0)}function xh(e){return Bs(e)&&e.isMobxAction===!0}function V2(e,r){var t,n,a,i;r===void 0&&(r=D2);var o=(t=(n=r)==null?void 0:n.name)!=null?t:"Autorun",s=!r.scheduler&&!r.delay,c;if(s)c=new Kl(o,function(){this.track(p)},r.onError,r.requiresObservable);else{var u=Gw(r),d=!1;c=new Kl(o,function(){d||(d=!0,u(function(){d=!1,c.isDisposed||c.track(p)}))},r.onError,r.requiresObservable)}function p(){e(c)}return(a=r)!=null&&(a=a.signal)!=null&&a.aborted||c.schedule_(),c.getDisposer_((i=r)==null?void 0:i.signal)}var E9=function(r){return r()};function Gw(e){return e.scheduler?e.scheduler:e.delay?function(r){return setTimeout(r,e.delay)}:E9}function Ww(e,r,t){var n,a,i;t===void 0&&(t=D2);var o=(n=t.name)!=null?n:"Reaction",s=la(o,t.onError?P9(t.onError,r):r),c=!t.scheduler&&!t.delay,u=Gw(t),d=!0,p=!1,y,f=t.compareStructural?Cf.structural:t.equals||Cf.default,_=new Kl(o,function(){d||c?S():p||(p=!0,u(S))},t.onError,t.requiresObservable);function S(){if(p=!1,!_.isDisposed){var w=!1,b=y;_.track(function(){var g=z2(!1,function(){return e(_)});w=d||!f(y,g),y=g}),(d&&t.fireImmediately||!d&&w)&&s(y,b,_),d=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||_.schedule_(),_.getDisposer_((i=t)==null?void 0:i.signal)}function P9(e,r){return function(){try{return r.apply(this,arguments)}catch(t){e.call(this,t)}}}var O9="onBO",A9="onBUO";function $w(e,r,t){return Yw(O9,e,r,t)}function G2(e,r,t){return Yw(A9,e,r,t)}function Yw(e,r,t,n){var a=typeof n=="function"?Mu(r,t):Mu(r),i=Bs(n)?n:t,o=e+"L";return a[o]?a[o].add(i):a[o]=new Set([i]),function(){var s=a[o];s&&(s.delete(i),s.size===0&&delete a[o])}}var C9="never",i1="always",k9="observed";function Xw(e){e.isolateGlobalState===!0&&u9();var r=e.useProxies,t=e.enforceActions;if(r!==void 0&&(Tt.useProxies=r===i1?!0:r===C9?!1:typeof Proxy<"u"),r==="ifavailable"&&(Tt.verifyProxies=!0),t!==void 0){var n=t===i1?i1:t===k9;Tt.enforceActions=n,Tt.allowStateChanges=!(n===!0||n===i1)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(Tt[a]=!!e[a])}),Tt.allowStateReads=!Tt.observableRequiresReaction,e.reactionScheduler&&b9(e.reactionScheduler)}function W2(e,r,t,n){var a=l7(r);return ef(function(){var i=Mf(e,n)[sr];wh(a).forEach(function(o){i.extend_(o,a[o],t&&o in t?t[o]:!0)})}),e}function Kw(e,r){return Zw(Mu(e,r))}function Zw(e){var r={name:e.name_};return e.observing_&&e.observing_.length>0&&(r.dependencies=N9(e.observing_).map(Zw)),r}function L9(e,r){return Qw(Mu(e,r))}function Qw(e){var r={name:e.name_};return f9(e)&&(r.observers=Array.from(h9(e)).map(Qw)),r}function N9(e){return Array.from(new Set(e))}var T9=0;function $1(){this.message="FLOW_CANCELLED"}$1.prototype=Object.create(Error.prototype);function R9(e){return e instanceof $1}var U0=_w("flow"),M9=_w("flow.bound",{bound:!0}),Nf=Object.assign(function(r,t){if(_p(t))return U0.decorate_20223_(r,t);if(Af(t))return wp(r,t,U0);var n=r,a=n.name||"<unnamed flow>",i=function(){var s=this,c=arguments,u=++T9,d=la(a+" - runid: "+u+" - init",n).apply(s,c),p,y=void 0,f=new Promise(function(_,S){var w=0;p=S;function b(E){y=void 0;var x;try{x=la(a+" - runid: "+u+" - yield "+w++,d.next).call(d,E)}catch(j){return S(j)}v(x)}function g(E){y=void 0;var x;try{x=la(a+" - runid: "+u+" - yield "+w++,d.throw).call(d,E)}catch(j){return S(j)}v(x)}function v(E){if(Bs(E==null?void 0:E.then)){E.then(v,S);return}return E.done?_(E.value):(y=Promise.resolve(E.value),y.then(b,g))}b(void 0)});return f.cancel=la(a+" - runid: "+u+" - cancel",function(){try{y&&Sy(y);var _=d.return(void 0),S=Promise.resolve(_.value);S.then(ch,ch),Sy(S),p(new $1)}catch(w){p(w)}}),f};return i.isMobXFlow=!0,i},U0);Nf.bound=Wl(M9);function Sy(e){Bs(e.cancel)&&e.cancel()}function I9(e){return e}function Eh(e){return(e==null?void 0:e.isMobXFlow)===!0}function $2(e,r,t){var n;return io(e)||Vo(e)||U2(e)?n=Zl(e):Ta(e)&&(n=Zl(e,r)),n.dehancer=typeof r=="function"?r:t,function(){n.dehancer=void 0}}function Y1(e,r,t){return Bs(t)?F9(e,r,t):j9(e,r)}function j9(e,r){return Zl(e).intercept_(r)}function F9(e,r,t){return Zl(e,r).intercept_(t)}function Jw(e,r){if(r===void 0)return Lf(e);if(Ta(e)===!1||!e[sr].values_.has(r))return!1;var t=Mu(e,r);return Lf(t)}function D9(e){return Jw(e)}function e6(e,r){return Jw(e,r)}function t6(e,r){return e?r!==void 0?Ta(e)?e[sr].values_.has(r):!1:Ta(e)||!!e[sr]||B2(e)||C1(e)||Lf(e):!1}function X1(e){return t6(e)}function r6(e,r){return t6(e,r)}function fp(e){if(Ta(e))return e[sr].keys_();if(io(e)||ma(e))return Array.from(e.keys());if(Vo(e))return e.map(function(r,t){return t});Pr(5)}function Y2(e){if(Ta(e))return fp(e).map(function(r){return e[r]});if(io(e))return fp(e).map(function(r){return e.get(r)});if(ma(e))return Array.from(e.values());if(Vo(e))return e.slice();Pr(6)}function n6(e){if(Ta(e))return fp(e).map(function(r){return[r,e[r]]});if(io(e))return fp(e).map(function(r){return[r,e.get(r)]});if(ma(e))return Array.from(e.entries());if(Vo(e))return e.map(function(r,t){return[t,r]});Pr(7)}function X2(e,r,t){if(arguments.length===2&&!ma(e)){ps();var n=r;try{for(var a in n)X2(e,a,n[a])}finally{gs()}return}Ta(e)?e[sr].set_(r,t):io(e)?e.set(r,t):ma(e)?e.add(r):Vo(e)?(typeof r!="number"&&(r=parseInt(r,10)),r<0&&Pr("Invalid index: '"+r+"'"),ps(),r>=e.length&&(e.length=r+1),e[r]=t,gs()):Pr(8)}function B9(e,r){Ta(e)?e[sr].delete_(r):io(e)||ma(e)?e.delete(r):Vo(e)?(typeof r!="number"&&(r=parseInt(r,10)),e.splice(r,1)):Pr(9)}function i6(e,r){if(Ta(e))return e[sr].has_(r);if(io(e))return e.has(r);if(ma(e))return e.has(r);if(Vo(e))return r>=0&&r<e.length;Pr(10)}function q9(e,r){if(i6(e,r)){if(Ta(e))return e[sr].get_(r);if(io(e))return e.get(r);if(Vo(e))return e[r];Pr(11)}}function K2(e,r,t){if(Ta(e))return e[sr].defineProperty_(r,t);Pr(39)}function a6(e){if(Ta(e))return e[sr].ownKeys_();Pr(38)}function K1(e,r,t,n){return Bs(t)?U9(e,r,t,n):z9(e,r,t)}function z9(e,r,t){return Zl(e).observe_(r,t)}function U9(e,r,t,n){return Zl(e,r).observe_(t,n)}function a1(e,r,t){return e.set(r,t),t}function oh(e,r){if(e==null||typeof e!="object"||e instanceof Date||!X1(e))return e;if(U2(e)||Lf(e))return oh(e.get(),r);if(r.has(e))return r.get(e);if(Vo(e)){var t=a1(r,e,new Array(e.length));return e.forEach(function(o,s){t[s]=oh(o,r)}),t}if(ma(e)){var n=a1(r,e,new Set);return e.forEach(function(o){n.add(oh(o,r))}),n}if(io(e)){var a=a1(r,e,new Map);return e.forEach(function(o,s){a.set(s,oh(o,r))}),a}else{var i=a1(r,e,{});return a6(e).forEach(function(o){yp.propertyIsEnumerable.call(e,o)&&(i[o]=oh(e[o],r))}),i}}function H9(e,r){return oh(e,new Map)}function V9(){}function Cu(e,r){r===void 0&&(r=void 0),ps();try{return e.apply(r)}finally{gs()}}function b2(e,r,t){return arguments.length===1||r&&typeof r=="object"?G9(e,r):o6(e,r,t||{})}function o6(e,r,t){var n;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!o[sr].isDisposed)if(o(),t.onError)t.onError(a);else throw a},t.timeout)}t.name="When";var i=Yc("When-effect",r),o=V2(function(s){var c=z2(!1,e);c&&(s.dispose(),n&&clearTimeout(n),i())},t);return o}function G9(e,r){var t;if(r!=null&&(t=r.signal)!=null&&t.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,a,i=new Promise(function(o,s){var c,u=o6(e,o,$c({},r,{onError:s}));n=function(){u(),s(new Error("WHEN_CANCELLED"))},a=function(){u(),s(new Error("WHEN_ABORTED"))},r==null||(c=r.signal)==null||c.addEventListener==null||c.addEventListener("abort",a)}).finally(function(){var o;return r==null||(o=r.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",a)});return i.cancel=n,i}function th(e){return e[sr]}var W9={has:function(r,t){return th(r).has_(t)},get:function(r,t){return th(r).get_(t)},set:function(r,t,n){var a;return Af(t)?(a=th(r).set_(t,n,!0))!=null?a:!0:!1},deleteProperty:function(r,t){var n;return Af(t)?(n=th(r).delete_(t,!0))!=null?n:!0:!1},defineProperty:function(r,t,n){var a;return(a=th(r).defineProperty_(t,n))!=null?a:!0},ownKeys:function(r){return th(r).ownKeys_()},preventExtensions:function(r){Pr(13)}};function $9(e,r){var t,n;return hw(),e=Mf(e,r),(n=(t=e[sr]).proxy_)!=null?n:t.proxy_=new Proxy(e,W9)}function cl(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function xp(e,r){var t=e.interceptors_||(e.interceptors_=[]);return t.push(r),dw(function(){var n=t.indexOf(r);n!==-1&&t.splice(n,1)})}function fl(e,r){var t=Rf();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a<i&&(r=n[a](r),r&&!r.type&&Pr(14),!!r);a++);return r}finally{fc(t)}}function $l(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Ep(e,r){var t=e.changeListeners_||(e.changeListeners_=[]);return t.push(r),dw(function(){var n=t.indexOf(r);n!==-1&&t.splice(n,1)})}function Yl(e,r){var t=Rf(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a<i;a++)n[a](r);fc(t)}}function Z2(e,r,t){return ef(function(){var n,a=Mf(e,t)[sr];(n=r)!=null||(r=d7(e)),wh(r).forEach(function(i){return a.make_(i,r[i])})}),e}var H0=Symbol("mobx-keys");function Y9(e,r,t){return dc(e)?W2(e,e,r,t):(ef(function(){var n=Mf(e,t)[sr];if(!e[H0]){var a=Object.getPrototypeOf(e),i=new Set([].concat(wh(e),wh(a)));i.delete("constructor"),i.delete(sr),bp(a,H0,i)}e[H0].forEach(function(o){return n.make_(o,r&&o in r?r[o]:!0)})}),e)}var xy="splice",Tu="update",X9=1e4,K9={get:function(r,t){var n=r[sr];return t===sr?n:t==="length"?n.getArrayLength_():typeof t=="string"&&!isNaN(t)?n.get_(parseInt(t)):cc(k1,t)?k1[t]:r[t]},set:function(r,t,n){var a=r[sr];return t==="length"&&a.setArrayLength_(n),typeof t=="symbol"||isNaN(t)?r[t]=n:a.set_(parseInt(t),n),!0},preventExtensions:function(){Pr(15)}},Q2=function(){function e(t,n,a,i){t===void 0&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=a,this.legacyMode_=i,this.atom_=new Jc(t),this.enhancer_=function(o,s){return n(o,s,"ObservableArray[..]")}}var r=e.prototype;return r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},r.intercept_=function(n){return xp(this,n)},r.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Ep(this,n)},r.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},r.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Pr("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o<n-a;o++)i[o]=void 0;this.spliceWithArray_(a,0,i)}else this.spliceWithArray_(n,a-n)},r.updateArrayLength_=function(n,a){n!==this.lastKnownLength_&&Pr(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&f6(n+a+1)},r.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),i===void 0&&(i=c2),cl(this)){var c=fl(this,{object:this.proxy_,type:xy,index:n,removedCount:a,added:i});if(!c)return c2;a=c.removedCount,i=c.added}if(i=i.length===0?i:i.map(function(p){return o.enhancer_(p,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var d=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,d),this.dehanceValues_(d)},r.spliceItemsIntoValues_=function(n,a,i){if(i.length<X9){var o;return(o=this.values_).splice.apply(o,[n,a].concat(i))}else{var s=this.values_.slice(n,n+a),c=this.values_.slice(n+a);this.values_.length+=i.length-a;for(var u=0;u<i.length;u++)this.values_[n+u]=i[u];for(var d=0;d<c.length;d++)this.values_[n+i.length+d]=c[d];return s}},r.notifyArrayChildUpdate_=function(n,a,i){var o=!this.owned_&&op(),s=$l(this),c=s||o?{observableKind:"array",object:this.proxy_,type:Tu,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:i}:null;this.atom_.reportChanged(),s&&Yl(this,c)},r.notifyArraySplice_=function(n,a,i){var o=!this.owned_&&op(),s=$l(this),c=s||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:xy,index:n,removed:i,added:a,removedCount:i.length,addedCount:a.length}:null;this.atom_.reportChanged(),s&&Yl(this,c)},r.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},r.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&Pr(17,n,i.length),n<i.length){this.atom_;var o=i[n];if(cl(this)){var s=fl(this,{type:Tu,object:this.proxy_,index:n,newValue:a});if(!s)return;a=s.newValue}a=this.enhancer_(a,o);var c=a!==o;c&&(i[n]=a,this.notifyArrayChildUpdate_(n,a,o))}else{for(var u=new Array(n+1-i.length),d=0;d<u.length-1;d++)u[d]=void 0;u[u.length-1]=a,this.spliceWithArray_(i.length,0,u)}},e}();function Z9(e,r,t,n){return t===void 0&&(t="ObservableArray"),n===void 0&&(n=!1),hw(),ef(function(){var a=new Q2(t,r,n,!1);gw(a.values_,sr,a);var i=new Proxy(a.values_,K9);return a.proxy_=i,e&&e.length&&a.spliceWithArray_(0,0,e),i})}var k1={clear:function(){return this.splice(0)},replace:function(r){var t=this[sr];return t.spliceWithArray_(0,t.values_.length,r)},toJSON:function(){return this.slice()},splice:function(r,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];var o=this[sr];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(r);case 2:return o.spliceWithArray_(r,t)}return o.spliceWithArray_(r,t,a)},spliceWithArray:function(r,t,n){return this[sr].spliceWithArray_(r,t,n)},push:function(){for(var r=this[sr],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r.spliceWithArray_(r.values_.length,0,n),r.values_.length},pop:function(){return this.splice(Math.max(this[sr].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var r=this[sr],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r.spliceWithArray_(0,0,n),r.values_.length},reverse:function(){return Tt.trackingDerivation&&Pr(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Tt.trackingDerivation&&Pr(37,"sort");var r=this.slice();return r.sort.apply(r,arguments),this.replace(r),this},remove:function(r){var t=this[sr],n=t.dehanceValues_(t.values_).indexOf(r);return n>-1?(this.splice(n,1),!0):!1}};Yn("at",zs);Yn("concat",zs);Yn("flat",zs);Yn("includes",zs);Yn("indexOf",zs);Yn("join",zs);Yn("lastIndexOf",zs);Yn("slice",zs);Yn("toString",zs);Yn("toLocaleString",zs);Yn("toSorted",zs);Yn("toSpliced",zs);Yn("with",zs);Yn("every",Ql);Yn("filter",Ql);Yn("find",Ql);Yn("findIndex",Ql);Yn("findLast",Ql);Yn("findLastIndex",Ql);Yn("flatMap",Ql);Yn("forEach",Ql);Yn("map",Ql);Yn("some",Ql);Yn("toReversed",Ql);Yn("reduce",s6);Yn("reduceRight",s6);function Yn(e,r){typeof Array.prototype[e]=="function"&&(k1[e]=r(e))}function zs(e){return function(){var r=this[sr];r.atom_.reportObserved();var t=r.dehanceValues_(r.values_);return t[e].apply(t,arguments)}}function Ql(e){return function(r,t){var n=this,a=this[sr];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return r.call(t,o,s,n)})}}function s6(e){return function(){var r=this,t=this[sr];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,r)},n[e].apply(n,arguments)}}var Q9=Qc("ObservableArrayAdministration",Q2);function Vo(e){return z1(e)&&Q9(e[sr])}var J9={},Hc="add",L1="delete",Z1=function(){function e(t,n,a){var i=this;n===void 0&&(n=kf),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[sr]=J9,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Bs(Map)||Pr(18),ef(function(){i.keysAtom_=cp("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,t&&i.merge(t)})}var r=e.prototype;return r.has_=function(n){return this.data_.has(n)},r.has=function(n){var a=this;if(!Tt.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new Gc(this.has_(n),U1,"ObservableMap.key?",!1);this.hasMap_.set(n,o),G2(o,function(){return a.hasMap_.delete(n)})}return i.get()},r.set=function(n,a){var i=this.has_(n);if(cl(this)){var o=fl(this,{type:i?Tu:Hc,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},r.delete=function(n){var a=this;if(this.keysAtom_,cl(this)){var i=fl(this,{type:L1,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=op(),s=$l(this),c=s||o?{observableKind:"map",debugObjectName:this.name_,type:L1,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return Cu(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(n))==null||u.setNewValue_(!1);var d=a.data_.get(n);d.setNewValue_(void 0),a.data_.delete(n)}),s&&Yl(this,c),!0}return!1},r.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==Tt.UNCHANGED){var o=op(),s=$l(this),c=s||o?{observableKind:"map",debugObjectName:this.name_,type:Tu,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Yl(this,c)}},r.addValue_=function(n,a){var i=this;this.keysAtom_,Cu(function(){var u,d=new Gc(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,d),a=d.value_,(u=i.hasMap_.get(n))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=op(),s=$l(this),c=s||o?{observableKind:"map",debugObjectName:this.name_,type:Hc,object:this,name:n,newValue:a}:null;s&&Yl(this,c)},r.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},r.values=function(){var n=this,a=this.keys();return Ey({next:function(){var o=a.next(),s=o.done,c=o.value;return{done:s,value:s?void 0:n.get(c)}}})},r.entries=function(){var n=this,a=this.keys();return Ey({next:function(){var o=a.next(),s=o.done,c=o.value;return{done:s,value:s?void 0:[c,n.get(c)]}}})},r[Symbol.iterator]=function(){return this.entries()},r.forEach=function(n,a){for(var i=fh(this),o;!(o=i()).done;){var s=o.value,c=s[0],u=s[1];n.call(a,u,c,this)}},r.merge=function(n){var a=this;return io(n)&&(n=new Map(n)),Cu(function(){dc(n)?s7(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Th(n)?(o7(n)||Pr(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&Pr(20,n)}),this},r.clear=function(){var n=this;Cu(function(){H2(function(){for(var a=fh(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},r.replace=function(n){var a=this;return Cu(function(){for(var i=eS(n),o=new Map,s=!1,c=fh(a.data_.keys()),u;!(u=c()).done;){var d=u.value;if(!i.has(d)){var p=a.delete(d);if(p)s=!0;else{var y=a.data_.get(d);o.set(d,y)}}}for(var f=fh(i.entries()),_;!(_=f()).done;){var S=_.value,w=S[0],b=S[1],g=a.data_.has(w);if(a.set(w,b),a.data_.has(w)){var v=a.data_.get(w);o.set(w,v),g||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var E=a.data_.keys(),x=o.keys(),j=E.next(),N=x.next();!j.done;){if(j.value!==N.value){a.keysAtom_.reportChanged();break}j=E.next(),N=x.next()}a.data_=o}),this},r.toString=function(){return"[object ObservableMap]"},r.toJSON=function(){return Array.from(this)},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},Rh(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),io=Qc("ObservableMap",Z1);function Ey(e){return e[Symbol.toStringTag]="MapIterator",rm(e)}function eS(e){if(Th(e)||io(e))return e;if(Array.isArray(e))return new Map(e);if(dc(e)){var r=new Map;for(var t in e)r.set(t,e[t]);return r}else return Pr(21,e)}var tS={},J2=function(){function e(t,n,a){var i=this;n===void 0&&(n=kf),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[sr]=tS,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Bs(Set)||Pr(22),this.enhancer_=function(o,s){return n(o,s,a)},ef(function(){i.atom_=cp(i.name_),t&&i.replace(t)})}var r=e.prototype;return r.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},r.clear=function(){var n=this;Cu(function(){H2(function(){for(var a=fh(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},r.forEach=function(n,a){for(var i=fh(this),o;!(o=i()).done;){var s=o.value;n.call(a,s,s,this)}},r.add=function(n){var a=this;if(this.atom_,cl(this)){var i=fl(this,{type:Hc,object:this,newValue:n});if(!i)return this;n=i.newValue}if(!this.has(n)){Cu(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=$l(this),c=s||o?{observableKind:"set",debugObjectName:this.name_,type:Hc,object:this,newValue:n}:null;s&&Yl(this,c)}return this},r.delete=function(n){var a=this;if(cl(this)){var i=fl(this,{type:L1,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,s=$l(this),c=s||o?{observableKind:"set",debugObjectName:this.name_,type:L1,object:this,oldValue:n}:null;return Cu(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&Yl(this,c),!0}return!1},r.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},r.entries=function(){var n=this.values();return Py({next:function(){var i=n.next(),o=i.value,s=i.done;return s?{value:void 0,done:s}:{value:[o,o],done:s}}})},r.keys=function(){return this.values()},r.values=function(){this.atom_.reportObserved();var n=this,a=this.data_.values();return Py({next:function(){var o=a.next(),s=o.value,c=o.done;return c?{value:void 0,done:c}:{value:n.dehanceValue_(s),done:c}}})},r.intersection=function(n){if(uc(n)&&!ma(n))return n.intersection(this);var a=new Set(this);return a.intersection(n)},r.union=function(n){if(uc(n)&&!ma(n))return n.union(this);var a=new Set(this);return a.union(n)},r.difference=function(n){return new Set(this).difference(n)},r.symmetricDifference=function(n){if(uc(n)&&!ma(n))return n.symmetricDifference(this);var a=new Set(this);return a.symmetricDifference(n)},r.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},r.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},r.isDisjointFrom=function(n){if(uc(n)&&!ma(n))return n.isDisjointFrom(this);var a=new Set(this);return a.isDisjointFrom(n)},r.replace=function(n){var a=this;return ma(n)&&(n=new Set(n)),Cu(function(){Array.isArray(n)?(a.clear(),n.forEach(function(i){return a.add(i)})):uc(n)?(a.clear(),n.forEach(function(i){return a.add(i)})):n!=null&&Pr("Cannot initialize set from "+n)}),this},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},r.toJSON=function(){return Array.from(this)},r.toString=function(){return"[object ObservableSet]"},r[Symbol.iterator]=function(){return this.values()},Rh(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),ma=Qc("ObservableSet",J2);function Py(e){return e[Symbol.toStringTag]="SetIterator",rm(e)}var Oy=Object.create(null),Ay="remove",l6=function(){function e(t,n,a,i){n===void 0&&(n=new Map),i===void 0&&(i=U7),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=n,this.name_=a,this.defaultAnnotation_=i,this.keysAtom_=new Jc("ObservableObject.keys"),this.isPlainObject_=dc(this.target_)}var r=e.prototype;return r.getObservablePropValue_=function(n){return this.values_.get(n).get()},r.setObservablePropValue_=function(n,a){var i=this.values_.get(n);if(i instanceof Xl)return i.set(a),!0;if(cl(this)){var o=fl(this,{type:Tu,object:this.proxy_||this.target_,name:n,newValue:a});if(!o)return null;a=o.newValue}if(a=i.prepareNewValue_(a),a!==Tt.UNCHANGED){var s=$l(this),c=!1,u=s||c?{type:Tu,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Yl(this,u)}return!0},r.get_=function(n){return Tt.trackingDerivation&&!cc(this.target_,n)&&this.has_(n),this.target_[n]},r.set_=function(n,a,i){return i===void 0&&(i=!1),cc(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,a):i?Reflect.set(this.target_,n,a):(this.target_[n]=a,!0):this.extend_(n,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,i)},r.has_=function(n){if(!Tt.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(n);return a||(a=new Gc(n in this.target_,U1,"ObservableObject.key?",!1),this.pendingKeys_.set(n,a)),a.get()},r.make_=function(n,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(n in this.target_)){var i;if((i=this.target_[ku])!=null&&i[n])return;Pr(1,a.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==yp;){var s=E1(o,n);if(s){var c=a.make_(this,n,s,o);if(c===0)return;if(c===1)break}o=Object.getPrototypeOf(o)}ky(this,a,n)}},r.extend_=function(n,a,i,o){if(o===void 0&&(o=!1),i===!0&&(i=this.defaultAnnotation_),i===!1)return this.defineProperty_(n,a,o);var s=i.extend_(this,n,a,o);return s&&ky(this,i,n),s},r.defineProperty_=function(n,a,i){i===void 0&&(i=!1),this.keysAtom_;try{ps();var o=this.delete_(n);if(!o)return o;if(cl(this)){var s=fl(this,{object:this.proxy_||this.target_,name:n,type:Hc,newValue:a.value});if(!s)return null;var c=s.newValue;a.value!==c&&(a=$c({},a,{value:c}))}if(i){if(!Reflect.defineProperty(this.target_,n,a))return!1}else Nu(this.target_,n,a);this.notifyPropertyAddition_(n,a.value)}finally{gs()}return!0},r.defineObservableProperty_=function(n,a,i,o){o===void 0&&(o=!1),this.keysAtom_;try{ps();var s=this.delete_(n);if(!s)return s;if(cl(this)){var c=fl(this,{object:this.proxy_||this.target_,name:n,type:Hc,newValue:a});if(!c)return null;a=c.newValue}var u=Cy(n),d={configurable:Tt.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(o){if(!Reflect.defineProperty(this.target_,n,d))return!1}else Nu(this.target_,n,d);var p=new Gc(a,i,"ObservableObject.key",!1);this.values_.set(n,p),this.notifyPropertyAddition_(n,p.value_)}finally{gs()}return!0},r.defineComputedProperty_=function(n,a,i){i===void 0&&(i=!1),this.keysAtom_;try{ps();var o=this.delete_(n);if(!o)return o;if(cl(this)){var s=fl(this,{object:this.proxy_||this.target_,name:n,type:Hc,newValue:void 0});if(!s)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var c=Cy(n),u={configurable:Tt.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:c.get,set:c.set};if(i){if(!Reflect.defineProperty(this.target_,n,u))return!1}else Nu(this.target_,n,u);this.values_.set(n,new Xl(a)),this.notifyPropertyAddition_(n,void 0)}finally{gs()}return!0},r.delete_=function(n,a){if(a===void 0&&(a=!1),this.keysAtom_,!cc(this.target_,n))return!0;if(cl(this)){var i=fl(this,{object:this.proxy_||this.target_,name:n,type:Ay});if(!i)return null}try{var o;ps();var s=$l(this),c=!1,u=this.values_.get(n),d=void 0;if(!u&&(s||c)){var p;d=(p=E1(this.target_,n))==null?void 0:p.value}if(a){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(u&&(this.values_.delete(n),u instanceof Gc&&(d=u.value_),Dw(u)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(n))==null||o.set(n in this.target_),s||c){var y={type:Ay,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:d,name:n};s&&Yl(this,y)}}finally{gs()}return!0},r.observe_=function(n,a){return Ep(this,n)},r.intercept_=function(n){return xp(this,n)},r.notifyPropertyAddition_=function(n,a){var i,o=$l(this),s=!1;if(o||s){var c=o||s?{type:Hc,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;o&&Yl(this,c)}(i=this.pendingKeys_)==null||(i=i.get(n))==null||i.set(!0),this.keysAtom_.reportChanged()},r.ownKeys_=function(){return this.keysAtom_.reportObserved(),wh(this.target_)},r.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Mf(e,r){var t;if(cc(e,sr))return e;var n=(t=r==null?void 0:r.name)!=null?t:"ObservableObject",a=new l6(e,new Map,String(n),J7(r));return bp(e,sr,a),e}var rS=Qc("ObservableObjectAdministration",l6);function Cy(e){return Oy[e]||(Oy[e]={get:function(){return this[sr].getObservablePropValue_(e)},set:function(t){return this[sr].setObservablePropValue_(e,t)}})}function Ta(e){return z1(e)?rS(e[sr]):!1}function ky(e,r,t){var n;(n=e.target_[ku])==null||delete n[t]}var nS=c6(0),iS=function(){var e=!1,r={};return Object.defineProperty(r,"0",{set:function(){e=!0}}),Object.create(r)[0]=1,e===!1}(),V0=0,u6=function(){};function aS(e,r){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,r):e.prototype.__proto__!==void 0?e.prototype.__proto__=r:e.prototype=r}aS(u6,Array.prototype);var em=function(e){function r(n,a,i,o){var s;return i===void 0&&(i="ObservableArray"),o===void 0&&(o=!1),s=e.call(this)||this,ef(function(){var c=new Q2(i,a,o,!0);c.proxy_=s,gw(s,sr,c),n&&n.length&&s.spliceWithArray(0,0,n),iS&&Object.defineProperty(s,"0",nS)}),s}yw(r,e);var t=r.prototype;return t.concat=function(){this[sr].atom_.reportObserved();for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),i.map(function(s){return Vo(s)?s.slice():s}))},t[Symbol.iterator]=function(){var n=this,a=0;return rm({next:function(){return a<n.length?{value:n[a++],done:!1}:{done:!0,value:void 0}}})},Rh(r,[{key:"length",get:function(){return this[sr].getArrayLength_()},set:function(a){this[sr].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(u6);Object.entries(k1).forEach(function(e){var r=e[0],t=e[1];r!=="concat"&&bp(em.prototype,r,t)});function c6(e){return{enumerable:!1,configurable:!0,get:function(){return this[sr].get_(e)},set:function(t){this[sr].set_(e,t)}}}function oS(e){Nu(em.prototype,""+e,c6(e))}function f6(e){if(e>V0){for(var r=V0;r<e+100;r++)oS(r);V0=e}}f6(1e3);function sS(e,r,t){return new em(e,r,t)}function Mu(e,r){if(typeof e=="object"&&e!==null){if(Vo(e))return r!==void 0&&Pr(23),e[sr].atom_;if(ma(e))return e.atom_;if(io(e)){if(r===void 0)return e.keysAtom_;var t=e.data_.get(r)||e.hasMap_.get(r);return t||Pr(25,r,N1(e)),t}if(Ta(e)){if(!r)return Pr(26);var n=e[sr].values_.get(r);return n||Pr(27,r,N1(e)),n}if(B2(e)||Lf(e)||C1(e))return e}else if(Bs(e)&&C1(e[sr]))return e[sr];Pr(28)}function Zl(e,r){if(e||Pr(29),r!==void 0)return Zl(Mu(e,r));if(B2(e)||Lf(e)||C1(e)||io(e)||ma(e))return e;if(e[sr])return e[sr];Pr(24,e)}function N1(e,r){var t;if(r!==void 0)t=Mu(e,r);else{if(xh(e))return e.name;Ta(e)||io(e)||ma(e)?t=Zl(e):t=Mu(e)}return t.name_}function ef(e){var r=Rf(),t=V1(!0);ps();try{return e()}finally{gs(),G1(t),fc(r)}}var Ly=yp.toString;function tm(e,r,t){return t===void 0&&(t=-1),w2(e,r,t)}function w2(e,r,t,n,a){if(e===r)return e!==0||1/e===1/r;if(e==null||r==null)return!1;if(e!==e)return r!==r;var i=typeof e;if(i!=="function"&&i!=="object"&&typeof r!="object")return!1;var o=Ly.call(e);if(o!==Ly.call(r))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:+e==0?1/+e===1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Ny(e),r=Ny(r);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof r!="object")return!1;var c=e.constructor,u=r.constructor;if(c!==u&&!(Bs(c)&&c instanceof c&&Bs(u)&&u instanceof u)&&"constructor"in e&&"constructor"in r)return!1}if(t===0)return!1;t<0&&(t=-1),n=n||[],a=a||[];for(var d=n.length;d--;)if(n[d]===e)return a[d]===r;if(n.push(e),a.push(r),s){if(d=e.length,d!==r.length)return!1;for(;d--;)if(!w2(e[d],r[d],t-1,n,a))return!1}else{var p=Object.keys(e),y=p.length;if(Object.keys(r).length!==y)return!1;for(var f=0;f<y;f++){var _=p[f];if(!(cc(r,_)&&w2(e[_],r[_],t-1,n,a)))return!1}}return n.pop(),a.pop(),!0}function Ny(e){return Vo(e)?e.slice():Th(e)||io(e)||uc(e)||ma(e)?Array.from(e.entries()):e}var Ty,lS=((Ty=q1().Iterator)==null?void 0:Ty.prototype)||{};function rm(e){return e[Symbol.iterator]=uS,Object.assign(Object.create(lS),e)}function uS(){return this}["Symbol","Map","Set"].forEach(function(e){var r=q1();typeof r[e]>"u"&&Pr("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:qw,extras:{getDebugName:N1},$mobx:sr});const cS=Object.freeze(Object.defineProperty({__proto__:null,$mobx:sr,FlowCancellationError:$1,ObservableMap:Z1,ObservableSet:J2,Reaction:Kl,_allowStateChanges:z2,_allowStateChangesInsideComputed:Sh,_allowStateReadsEnd:ph,_allowStateReadsStart:W1,_autoAction:_h,_endAction:Lw,_getAdministration:Zl,_getGlobalState:Mw,_interceptReads:$2,_isComputingDerivation:o9,_resetGlobalState:c9,_startAction:kw,action:la,autorun:V2,comparer:Cf,computed:Tf,configure:Xw,createAtom:cp,defineProperty:K2,entries:n6,extendObservable:W2,flow:Nf,flowResult:I9,get:q9,getAtom:Mu,getDebugName:N1,getDependencyTree:Kw,getObserverTree:L9,has:i6,intercept:Y1,isAction:xh,isBoxedObservable:U2,isComputed:D9,isComputedProp:e6,isFlow:Eh,isFlowCancellationError:R9,isObservable:X1,isObservableArray:Vo,isObservableMap:io,isObservableObject:Ta,isObservableProp:r6,isObservableSet:ma,keys:fp,makeAutoObservable:Y9,makeObservable:Z2,observable:Ln,observe:K1,onBecomeObserved:$w,onBecomeUnobserved:G2,onReactionError:v9,override:w7,ownKeys:a6,reaction:Ww,remove:B9,runInAction:Sh,set:X2,spy:qw,toJS:H9,trace:V9,transaction:Cu,untracked:H2,values:Y2,when:b2},Symbol.toStringTag,{value:"Module"}));if(!ei.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Z2)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var fS=uw();function hS(e){e()}function h6(e){e||(e=hS),Xw({reactionScheduler:e})}var dS=function(){return!0};function pS(e){return Kw(e)}var d6=!1;function p6(e){d6=e}function nm(){return d6}var gS=1e4,vS=1e4,mS=function(){function e(r){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=gS),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var a=Date.now();t.registrations.forEach(function(i,o){a-i.registeredAt>=n&&(t.finalize(i.value),t.registrations.delete(o))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.registrations.delete(r)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,vS))}}),e}(),yS=typeof FinalizationRegistry<"u"?FinalizationRegistry:mS,T1=new yS(function(e){var r;(r=e.reaction)===null||r===void 0||r.dispose(),e.reaction=null}),G0={exports:{}},W0={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var Ry;function bS(){if(Ry)return W0;Ry=1;var e=fi();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var t=typeof Object.is=="function"?Object.is:r,n=e.useState,a=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function s(p,y){var f=y(),_=n({inst:{value:f,getSnapshot:y}}),S=_[0].inst,w=_[1];return i(function(){S.value=f,S.getSnapshot=y,c(S)&&w({inst:S})},[p,f,y]),a(function(){return c(S)&&w({inst:S}),p(function(){c(S)&&w({inst:S})})},[p]),o(f),f}function c(p){var y=p.getSnapshot;p=p.value;try{var f=y();return!t(p,f)}catch{return!0}}function u(p,y){return y()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return W0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,W0}var My;function wS(){return My||(My=1,G0.exports=bS()),G0.exports}var _S=wS();function Iy(e){e.reaction=new Kl("observer".concat(e.name),function(){var r;e.stateVersion=Symbol(),(r=e.onStoreChange)===null||r===void 0||r.call(e)})}function im(e,r){if(r===void 0&&(r="observed"),nm())return e();var t=Ur.useRef(null);if(!t.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:r,subscribe:function(s){return T1.unregister(n),n.onStoreChange=s,n.reaction||(Iy(n),n.stateVersion=Symbol()),function(){var c;n.onStoreChange=null,(c=n.reaction)===null||c===void 0||c.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};t.current=n}var a=t.current;a.reaction||(Iy(a),T1.register(t,a,a)),Ur.useDebugValue(a.reaction,pS),_S.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);var i,o;if(a.reaction.track(function(){try{i=e()}catch(s){o=s}}),o)throw o;return i}var $0,Y0,g6=typeof Symbol=="function"&&Symbol.for,SS=(Y0=($0=Object.getOwnPropertyDescriptor(function(){},"name"))===null||$0===void 0?void 0:$0.configurable)!==null&&Y0!==void 0?Y0:!1,jy=g6?Symbol.for("react.forward_ref"):typeof ei.forwardRef=="function"&&ei.forwardRef(function(e){return null}).$$typeof,Fy=g6?Symbol.for("react.memo"):typeof ei.memo=="function"&&ei.memo(function(e){return null}).$$typeof;function xS(e,r){var t;if(Fy&&e.$$typeof===Fy)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(nm())return e;var n=(t=r==null?void 0:r.forwardRef)!==null&&t!==void 0?t:!1,a=e,i=e.displayName||e.name;if(jy&&e.$$typeof===jy&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,c){return im(function(){return a(s,c)},i)};return o.displayName=e.displayName,SS&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=ei.forwardRef(o)),o=ei.memo(o),PS(e,o),o}var ES={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function PS(e,r){Object.keys(e).forEach(function(t){ES[t]||Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}function v6(e){var r=e.children,t=e.render;r&&t&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var n=r||t;return typeof n!="function"?null:im(n)}v6.displayName="Observer";function OS(e,r){return ei.useState(function(){return Ln(e(),r,{autoBind:!0})})[0]}function m6(e){var r=ei.useState(function(){return Ln(e,{},{deep:!1})})[0];return Sh(function(){Object.assign(r,e)}),r}function AS(e,r){var t=r&&m6(r);return ei.useState(function(){return Ln(e(t),void 0,{autoBind:!0})})[0]}var X0;h6(fS.unstable_batchedUpdates);var CS=(X0=T1.finalizeAllImmediately)!==null&&X0!==void 0?X0:function(){};function kS(e,r){return r===void 0&&(r="observed"),im(e,r)}function LS(e){p6(e)}const NS=Object.freeze(Object.defineProperty({__proto__:null,Observer:v6,_observerFinalizationRegistry:T1,clearTimers:CS,enableStaticRendering:p6,isObserverBatched:dS,isUsingStaticRendering:nm,observer:xS,observerBatching:h6,useAsObservableSource:m6,useLocalObservable:OS,useLocalStore:AS,useObserver:kS,useStaticRendering:LS},Symbol.toStringTag,{value:"Module"})),Us=Zc(NS);var yf={};const qs=Zc(cS);var v1={exports:{}},Zh={},K0={},Z0={},Dy;function Nr(){return Dy||(Dy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const r=Math.PI/180;function t(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof bh<"u"?bh:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.20",isBrowser:t(),isUnminified:/param/.test((function(a){}).toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*r:a},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const n=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=n,e.Konva._injectGlobal(e.Konva)}(Z0)),Z0}var Q0={},By;function Ai(){return By||(By=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const r=Nr();class t{constructor(E=[1,0,0,1,0,0]){this.dirty=!1,this.m=E&&E.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(E){E.m[0]=this.m[0],E.m[1]=this.m[1],E.m[2]=this.m[2],E.m[3]=this.m[3],E.m[4]=this.m[4],E.m[5]=this.m[5]}point(E){const x=this.m;return{x:x[0]*E.x+x[2]*E.y+x[4],y:x[1]*E.x+x[3]*E.y+x[5]}}translate(E,x){return this.m[4]+=this.m[0]*E+this.m[2]*x,this.m[5]+=this.m[1]*E+this.m[3]*x,this}scale(E,x){return this.m[0]*=E,this.m[1]*=E,this.m[2]*=x,this.m[3]*=x,this}rotate(E){const x=Math.cos(E),j=Math.sin(E),N=this.m[0]*x+this.m[2]*j,T=this.m[1]*x+this.m[3]*j,F=this.m[0]*-j+this.m[2]*x,C=this.m[1]*-j+this.m[3]*x;return this.m[0]=N,this.m[1]=T,this.m[2]=F,this.m[3]=C,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(E,x){const j=this.m[0]+this.m[2]*x,N=this.m[1]+this.m[3]*x,T=this.m[2]+this.m[0]*E,F=this.m[3]+this.m[1]*E;return this.m[0]=j,this.m[1]=N,this.m[2]=T,this.m[3]=F,this}multiply(E){const x=this.m[0]*E.m[0]+this.m[2]*E.m[1],j=this.m[1]*E.m[0]+this.m[3]*E.m[1],N=this.m[0]*E.m[2]+this.m[2]*E.m[3],T=this.m[1]*E.m[2]+this.m[3]*E.m[3],F=this.m[0]*E.m[4]+this.m[2]*E.m[5]+this.m[4],C=this.m[1]*E.m[4]+this.m[3]*E.m[5]+this.m[5];return this.m[0]=x,this.m[1]=j,this.m[2]=N,this.m[3]=T,this.m[4]=F,this.m[5]=C,this}invert(){const E=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),x=this.m[3]*E,j=-this.m[1]*E,N=-this.m[2]*E,T=this.m[0]*E,F=E*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),C=E*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=x,this.m[1]=j,this.m[2]=N,this.m[3]=T,this.m[4]=F,this.m[5]=C,this}getMatrix(){return this.m}decompose(){const E=this.m[0],x=this.m[1],j=this.m[2],N=this.m[3],T=this.m[4],F=this.m[5],C=E*N-x*j,A={x:T,y:F,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(E!=0||x!=0){const L=Math.sqrt(E*E+x*x);A.rotation=x>0?Math.acos(E/L):-Math.acos(E/L),A.scaleX=L,A.scaleY=C/L,A.skewX=(E*j+x*N)/C,A.skewY=0}else if(j!=0||N!=0){const L=Math.sqrt(j*j+N*N);A.rotation=Math.PI/2-(N>0?Math.acos(-j/L):-Math.acos(j/L)),A.scaleX=C/L,A.scaleY=L,A.skewX=0,A.skewY=(E*j+x*N)/C}return A.rotation=e.Util._getRotation(A.rotation),A}}e.Transform=t;const n="[object Array]",a="[object Number]",i="[object String]",o="[object Boolean]",s=Math.PI/180,c=180/Math.PI,u="#",d="",p="0",y="Konva warning: ",f="Konva error: ",_="rgb(",S={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},w=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let b=[];const g=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(v){setTimeout(v,60)};e.Util={_isElement(v){return!!(v&&v.nodeType==1)},_isFunction(v){return!!(v&&v.constructor&&v.call&&v.apply)},_isPlainObject(v){return!!v&&v.constructor===Object},_isArray(v){return Object.prototype.toString.call(v)===n},_isNumber(v){return Object.prototype.toString.call(v)===a&&!isNaN(v)&&isFinite(v)},_isString(v){return Object.prototype.toString.call(v)===i},_isBoolean(v){return Object.prototype.toString.call(v)===o},isObject(v){return v instanceof Object},isValidSelector(v){if(typeof v!="string")return!1;const E=v[0];return E==="#"||E==="."||E===E.toUpperCase()},_sign(v){return v===0||v>0?1:-1},requestAnimFrame(v){b.push(v),b.length===1&&g(function(){const E=b;b=[],E.forEach(function(x){x()})})},createCanvasElement(){const v=document.createElement("canvas");try{v.style=v.style||{}}catch{}return v},createImageElement(){return document.createElement("img")},_isInDocument(v){for(;v=v.parentNode;)if(v==document)return!0;return!1},_urlToImage(v,E){const x=e.Util.createImageElement();x.onload=function(){E(x)},x.src=v},_rgbToHex(v,E,x){return((1<<24)+(v<<16)+(E<<8)+x).toString(16).slice(1)},_hexToRgb(v){v=v.replace(u,d);const E=parseInt(v,16);return{r:E>>16&255,g:E>>8&255,b:E&255}},getRandomColor(){let v=(Math.random()*16777215<<0).toString(16);for(;v.length<6;)v=p+v;return u+v},getRGB(v){let E;return v in S?(E=S[v],{r:E[0],g:E[1],b:E[2]}):v[0]===u?this._hexToRgb(v.substring(1)):v.substr(0,4)===_?(E=w.exec(v.replace(/ /g,"")),{r:parseInt(E[1],10),g:parseInt(E[2],10),b:parseInt(E[3],10)}):{r:0,g:0,b:0}},colorToRGBA(v){return v=v||"black",e.Util._namedColorToRBA(v)||e.Util._hex3ColorToRGBA(v)||e.Util._hex4ColorToRGBA(v)||e.Util._hex6ColorToRGBA(v)||e.Util._hex8ColorToRGBA(v)||e.Util._rgbColorToRGBA(v)||e.Util._rgbaColorToRGBA(v)||e.Util._hslColorToRGBA(v)},_namedColorToRBA(v){const E=S[v.toLowerCase()];return E?{r:E[0],g:E[1],b:E[2],a:1}:null},_rgbColorToRGBA(v){if(v.indexOf("rgb(")===0){v=v.match(/rgb\(([^)]+)\)/)[1];const E=v.split(/ *, */).map(Number);return{r:E[0],g:E[1],b:E[2],a:1}}},_rgbaColorToRGBA(v){if(v.indexOf("rgba(")===0){v=v.match(/rgba\(([^)]+)\)/)[1];const E=v.split(/ *, */).map((x,j)=>x.slice(-1)==="%"?j===3?parseInt(x)/100:parseInt(x)/100*255:Number(x));return{r:E[0],g:E[1],b:E[2],a:E[3]}}},_hex8ColorToRGBA(v){if(v[0]==="#"&&v.length===9)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:parseInt(v.slice(7,9),16)/255}},_hex6ColorToRGBA(v){if(v[0]==="#"&&v.length===7)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:1}},_hex4ColorToRGBA(v){if(v[0]==="#"&&v.length===5)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:parseInt(v[4]+v[4],16)/255}},_hex3ColorToRGBA(v){if(v[0]==="#"&&v.length===4)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:1}},_hslColorToRGBA(v){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(v)){const[E,...x]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(v),j=Number(x[0])/360,N=Number(x[1])/100,T=Number(x[2])/100;let F,C,A;if(N===0)return A=T*255,{r:Math.round(A),g:Math.round(A),b:Math.round(A),a:1};T<.5?F=T*(1+N):F=T+N-T*N;const L=2*T-F,O=[0,0,0];for(let I=0;I<3;I++)C=j+1/3*-(I-1),C<0&&C++,C>1&&C--,6*C<1?A=L+(F-L)*6*C:2*C<1?A=F:3*C<2?A=L+(F-L)*(2/3-C)*6:A=L,O[I]=A*255;return{r:Math.round(O[0]),g:Math.round(O[1]),b:Math.round(O[2]),a:1}}},haveIntersection(v,E){return!(E.x>v.x+v.width||E.x+E.width<v.x||E.y>v.y+v.height||E.y+E.height<v.y)},cloneObject(v){const E={};for(const x in v)this._isPlainObject(v[x])?E[x]=this.cloneObject(v[x]):this._isArray(v[x])?E[x]=this.cloneArray(v[x]):E[x]=v[x];return E},cloneArray(v){return v.slice(0)},degToRad(v){return v*s},radToDeg(v){return v*c},_degToRad(v){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(v)},_radToDeg(v){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(v)},_getRotation(v){return r.Konva.angleDeg?e.Util.radToDeg(v):v},_capitalize(v){return v.charAt(0).toUpperCase()+v.slice(1)},throw(v){throw new Error(f+v)},error(v){console.error(f+v)},warn(v){r.Konva.showWarnings&&console.warn(y+v)},each(v,E){for(const x in v)E(x,v[x])},_inRange(v,E,x){return E<=v&&v<x},_getProjectionToSegment(v,E,x,j,N,T){let F,C,A;const L=(v-x)*(v-x)+(E-j)*(E-j);if(L==0)F=v,C=E,A=(N-x)*(N-x)+(T-j)*(T-j);else{const O=((N-v)*(x-v)+(T-E)*(j-E))/L;O<0?(F=v,C=E,A=(v-N)*(v-N)+(E-T)*(E-T)):O>1?(F=x,C=j,A=(x-N)*(x-N)+(j-T)*(j-T)):(F=v+O*(x-v),C=E+O*(j-E),A=(F-N)*(F-N)+(C-T)*(C-T))}return[F,C,A]},_getProjectionToLine(v,E,x){const j=e.Util.cloneObject(v);let N=Number.MAX_VALUE;return E.forEach(function(T,F){if(!x&&F===E.length-1)return;const C=E[(F+1)%E.length],A=e.Util._getProjectionToSegment(T.x,T.y,C.x,C.y,v.x,v.y),L=A[0],O=A[1],I=A[2];I<N&&(j.x=L,j.y=O,N=I)}),j},_prepareArrayForTween(v,E,x){const j=[],N=[];if(v.length>E.length){const F=E;E=v,v=F}for(let F=0;F<v.length;F+=2)j.push({x:v[F],y:v[F+1]});for(let F=0;F<E.length;F+=2)N.push({x:E[F],y:E[F+1]});const T=[];return N.forEach(function(F){const C=e.Util._getProjectionToLine(F,j,x);T.push(C.x),T.push(C.y)}),T},_prepareToStringify(v){let E;v.visitedByCircularReferenceRemoval=!0;for(const x in v)if(v.hasOwnProperty(x)&&v[x]&&typeof v[x]=="object"){if(E=Object.getOwnPropertyDescriptor(v,x),v[x].visitedByCircularReferenceRemoval||e.Util._isElement(v[x]))if(E.configurable)delete v[x];else return null;else if(e.Util._prepareToStringify(v[x])===null)if(E.configurable)delete v[x];else return null}return delete v.visitedByCircularReferenceRemoval,v},_assign(v,E){for(const x in E)v[x]=E[x];return v},_getFirstPointerId(v){return v.touches?v.changedTouches[0].identifier:v.pointerId||999},releaseCanvas(...v){r.Konva.releaseCanvasOnDestroy&&v.forEach(E=>{E.width=0,E.height=0})},drawRoundedRectPath(v,E,x,j){let N=0,T=0,F=0,C=0;typeof j=="number"?N=T=F=C=Math.min(j,E/2,x/2):(N=Math.min(j[0]||0,E/2,x/2),T=Math.min(j[1]||0,E/2,x/2),C=Math.min(j[2]||0,E/2,x/2),F=Math.min(j[3]||0,E/2,x/2)),v.moveTo(N,0),v.lineTo(E-T,0),v.arc(E-T,T,T,Math.PI*3/2,0,!1),v.lineTo(E,x-C),v.arc(E-C,x-C,C,0,Math.PI/2,!1),v.lineTo(F,x),v.arc(F,x-F,F,Math.PI/2,Math.PI,!1),v.lineTo(0,N),v.arc(N,N,N,Math.PI,Math.PI*3/2,!1)}}}(Q0)),Q0}var Qh={},J0={},ds={},qy;function Hr(){if(qy)return ds;qy=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.RGBComponent=n,ds.alphaComponent=a,ds.getNumberValidator=i,ds.getNumberOrArrayOfNumbersValidator=o,ds.getNumberOrAutoValidator=s,ds.getStringValidator=c,ds.getStringOrGradientValidator=u,ds.getFunctionValidator=d,ds.getNumberArrayValidator=p,ds.getBooleanValidator=y,ds.getComponentValidator=f;const e=Nr(),r=Ai();function t(_){return r.Util._isString(_)?'"'+_+'"':Object.prototype.toString.call(_)==="[object Number]"||r.Util._isBoolean(_)?_:Object.prototype.toString.call(_)}function n(_){return _>255?255:_<0?0:Math.round(_)}function a(_){return _>1?1:_<1e-4?1e-4:_}function i(){if(e.Konva.isUnminified)return function(_,S){return r.Util._isNumber(_)||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a number.'),_}}function o(_){if(e.Konva.isUnminified)return function(S,w){let b=r.Util._isNumber(S),g=r.Util._isArray(S)&&S.length==_;return!b&&!g&&r.Util.warn(t(S)+' is a not valid value for "'+w+'" attribute. The value should be a number or Array<number>('+_+")"),S}}function s(){if(e.Konva.isUnminified)return function(_,S){var w=r.Util._isNumber(_),b=_==="auto";return w||b||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a number or "auto".'),_}}function c(){if(e.Konva.isUnminified)return function(_,S){return r.Util._isString(_)||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a string.'),_}}function u(){if(e.Konva.isUnminified)return function(_,S){const w=r.Util._isString(_),b=Object.prototype.toString.call(_)==="[object CanvasGradient]"||_&&_.addColorStop;return w||b||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a string or a native gradient.'),_}}function d(){if(e.Konva.isUnminified)return function(_,S){return r.Util._isFunction(_)||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a function.'),_}}function p(){if(e.Konva.isUnminified)return function(_,S){const w=Int8Array?Object.getPrototypeOf(Int8Array):null;return w&&_ instanceof w||(r.Util._isArray(_)?_.forEach(function(b){r.Util._isNumber(b)||r.Util.warn('"'+S+'" attribute has non numeric element '+b+". Make sure that all elements are numbers.")}):r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a array of numbers.')),_}}function y(){if(e.Konva.isUnminified)return function(_,S){var w=_===!0||_===!1;return w||r.Util.warn(t(_)+' is a not valid value for "'+S+'" attribute. The value should be a boolean.'),_}}function f(_){if(e.Konva.isUnminified)return function(S,w){return S==null||r.Util.isObject(S)||r.Util.warn(t(S)+' is a not valid value for "'+w+'" attribute. The value should be an object with properties '+_),S}}return ds}var zy;function qr(){return zy||(zy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const r=Ai(),t=Hr(),n="get",a="set";e.Factory={addGetterSetter(i,o,s,c,u){e.Factory.addGetter(i,o,s),e.Factory.addSetter(i,o,c,u),e.Factory.addOverloadedGetterSetter(i,o)},addGetter(i,o,s){var c=n+r.Util._capitalize(o);i.prototype[c]=i.prototype[c]||function(){const u=this.attrs[o];return u===void 0?s:u}},addSetter(i,o,s,c){var u=a+r.Util._capitalize(o);i.prototype[u]||e.Factory.overWriteSetter(i,o,s,c)},overWriteSetter(i,o,s,c){var u=a+r.Util._capitalize(o);i.prototype[u]=function(d){return s&&d!==void 0&&d!==null&&(d=s.call(this,d,o)),this._setAttr(o,d),c&&c.call(this),this}},addComponentsGetterSetter(i,o,s,c,u){const d=s.length,p=r.Util._capitalize,y=n+p(o),f=a+p(o);i.prototype[y]=function(){const S={};for(let w=0;w<d;w++){const b=s[w];S[b]=this.getAttr(o+p(b))}return S};const _=(0,t.getComponentValidator)(s);i.prototype[f]=function(S){const w=this.attrs[o];c&&(S=c.call(this,S,o)),_&&_.call(this,S,o);for(const b in S)S.hasOwnProperty(b)&&this._setAttr(o+p(b),S[b]);return S||s.forEach(b=>{this._setAttr(o+p(b),void 0)}),this._fireChangeEvent(o,w,S),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(i,o)},addOverloadedGetterSetter(i,o){var s=r.Util._capitalize(o),c=a+s,u=n+s;i.prototype[o]=function(){return arguments.length?(this[c](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(i,o,s,c){r.Util.error("Adding deprecated "+o);const u=n+r.Util._capitalize(o),d=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[u]=function(){r.Util.error(d);const p=this.attrs[o];return p===void 0?s:p},e.Factory.addSetter(i,o,c,function(){r.Util.error(d)}),e.Factory.addOverloadedGetterSetter(i,o)},backCompat(i,o){r.Util.each(o,function(s,c){const u=i.prototype[c],d=n+r.Util._capitalize(s),p=a+r.Util._capitalize(s);function y(){u.apply(this,arguments),r.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}i.prototype[s]=y,i.prototype[d]=y,i.prototype[p]=y})},afterSetFilter(){this._filterUpToDate=!1}}}(J0)),J0}var ec={},tc={},Uy;function y6(){if(Uy)return tc;Uy=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.HitContext=tc.SceneContext=tc.Context=void 0;const e=Ai(),r=Nr();function t(b){const g=[],v=b.length,E=e.Util;for(let x=0;x<v;x++){let j=b[x];E._isNumber(j)?j=Math.round(j*1e3)/1e3:E._isString(j)||(j=j+""),g.push(j)}return g}const n=",",a="(",i=")",o="([",s="])",c=";",u="()",d="=",p=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],y=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],f=100;let _=class{constructor(g){this.canvas=g,r.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(g){g.fillEnabled()&&this._fill(g)}_fill(g){}strokeShape(g){g.hasStroke()&&this._stroke(g)}_stroke(g){}fillStrokeShape(g){g.attrs.fillAfterStrokeEnabled?(this.strokeShape(g),this.fillShape(g)):(this.fillShape(g),this.strokeShape(g))}getTrace(g,v){let E=this.traceArr,x=E.length,j="",N,T,F,C;for(N=0;N<x;N++)T=E[N],F=T.method,F?(C=T.args,j+=F,g?j+=u:e.Util._isArray(C[0])?j+=o+C.join(n)+s:(v&&(C=C.map(A=>typeof A=="number"?Math.floor(A):A)),j+=a+C.join(n)+i)):(j+=T.property,g||(j+=d+T.val)),j+=c;return j}clearTrace(){this.traceArr=[]}_trace(g){let v=this.traceArr,E;v.push(g),E=v.length,E>=f&&v.shift()}reset(){const g=this.getCanvas().getPixelRatio();this.setTransform(1*g,0,0,1*g,0,0)}getCanvas(){return this.canvas}clear(g){const v=this.getCanvas();g?this.clearRect(g.x||0,g.y||0,g.width||0,g.height||0):this.clearRect(0,0,v.getWidth()/v.pixelRatio,v.getHeight()/v.pixelRatio)}_applyLineCap(g){const v=g.attrs.lineCap;v&&this.setAttr("lineCap",v)}_applyOpacity(g){const v=g.getAbsoluteOpacity();v!==1&&this.setAttr("globalAlpha",v)}_applyLineJoin(g){const v=g.attrs.lineJoin;v&&this.setAttr("lineJoin",v)}setAttr(g,v){this._context[g]=v}arc(g,v,E,x,j,N){this._context.arc(g,v,E,x,j,N)}arcTo(g,v,E,x,j){this._context.arcTo(g,v,E,x,j)}beginPath(){this._context.beginPath()}bezierCurveTo(g,v,E,x,j,N){this._context.bezierCurveTo(g,v,E,x,j,N)}clearRect(g,v,E,x){this._context.clearRect(g,v,E,x)}clip(...g){this._context.clip.apply(this._context,g)}closePath(){this._context.closePath()}createImageData(g,v){const E=arguments;if(E.length===2)return this._context.createImageData(g,v);if(E.length===1)return this._context.createImageData(g)}createLinearGradient(g,v,E,x){return this._context.createLinearGradient(g,v,E,x)}createPattern(g,v){return this._context.createPattern(g,v)}createRadialGradient(g,v,E,x,j,N){return this._context.createRadialGradient(g,v,E,x,j,N)}drawImage(g,v,E,x,j,N,T,F,C){const A=arguments,L=this._context;A.length===3?L.drawImage(g,v,E):A.length===5?L.drawImage(g,v,E,x,j):A.length===9&&L.drawImage(g,v,E,x,j,N,T,F,C)}ellipse(g,v,E,x,j,N,T,F){this._context.ellipse(g,v,E,x,j,N,T,F)}isPointInPath(g,v,E,x){return E?this._context.isPointInPath(E,g,v,x):this._context.isPointInPath(g,v,x)}fill(...g){this._context.fill.apply(this._context,g)}fillRect(g,v,E,x){this._context.fillRect(g,v,E,x)}strokeRect(g,v,E,x){this._context.strokeRect(g,v,E,x)}fillText(g,v,E,x){x?this._context.fillText(g,v,E,x):this._context.fillText(g,v,E)}measureText(g){return this._context.measureText(g)}getImageData(g,v,E,x){return this._context.getImageData(g,v,E,x)}lineTo(g,v){this._context.lineTo(g,v)}moveTo(g,v){this._context.moveTo(g,v)}rect(g,v,E,x){this._context.rect(g,v,E,x)}roundRect(g,v,E,x,j){this._context.roundRect(g,v,E,x,j)}putImageData(g,v,E){this._context.putImageData(g,v,E)}quadraticCurveTo(g,v,E,x){this._context.quadraticCurveTo(g,v,E,x)}restore(){this._context.restore()}rotate(g){this._context.rotate(g)}save(){this._context.save()}scale(g,v){this._context.scale(g,v)}setLineDash(g){this._context.setLineDash?this._context.setLineDash(g):"mozDash"in this._context?this._context.mozDash=g:"webkitLineDash"in this._context&&(this._context.webkitLineDash=g)}getLineDash(){return this._context.getLineDash()}setTransform(g,v,E,x,j,N){this._context.setTransform(g,v,E,x,j,N)}stroke(g){g?this._context.stroke(g):this._context.stroke()}strokeText(g,v,E,x){this._context.strokeText(g,v,E,x)}transform(g,v,E,x,j,N){this._context.transform(g,v,E,x,j,N)}translate(g,v){this._context.translate(g,v)}_enableTrace(){let g=this,v=p.length,E=this.setAttr,x,j;const N=function(T){let F=g[T],C;g[T]=function(){return j=t(Array.prototype.slice.call(arguments,0)),C=F.apply(g,arguments),g._trace({method:T,args:j}),C}};for(x=0;x<v;x++)N(p[x]);g.setAttr=function(){E.apply(g,arguments);const T=arguments[0];let F=arguments[1];(T==="shadowOffsetX"||T==="shadowOffsetY"||T==="shadowBlur")&&(F=F/this.canvas.getPixelRatio()),g._trace({property:T,val:F})}}_applyGlobalCompositeOperation(g){const v=g.attrs.globalCompositeOperation;!v||v==="source-over"||this.setAttr("globalCompositeOperation",v)}};tc.Context=_,y.forEach(function(b){Object.defineProperty(_.prototype,b,{get(){return this._context[b]},set(g){this._context[b]=g}})});class S extends _{constructor(g,{willReadFrequently:v=!1}={}){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:v})}_fillColor(g){const v=g.fill();this.setAttr("fillStyle",v),g._fillFunc(this)}_fillPattern(g){this.setAttr("fillStyle",g._getFillPattern()),g._fillFunc(this)}_fillLinearGradient(g){const v=g._getLinearGradient();v&&(this.setAttr("fillStyle",v),g._fillFunc(this))}_fillRadialGradient(g){const v=g._getRadialGradient();v&&(this.setAttr("fillStyle",v),g._fillFunc(this))}_fill(g){const v=g.fill(),E=g.getFillPriority();if(v&&E==="color"){this._fillColor(g);return}const x=g.getFillPatternImage();if(x&&E==="pattern"){this._fillPattern(g);return}const j=g.getFillLinearGradientColorStops();if(j&&E==="linear-gradient"){this._fillLinearGradient(g);return}const N=g.getFillRadialGradientColorStops();if(N&&E==="radial-gradient"){this._fillRadialGradient(g);return}v?this._fillColor(g):x?this._fillPattern(g):j?this._fillLinearGradient(g):N&&this._fillRadialGradient(g)}_strokeLinearGradient(g){const v=g.getStrokeLinearGradientStartPoint(),E=g.getStrokeLinearGradientEndPoint(),x=g.getStrokeLinearGradientColorStops(),j=this.createLinearGradient(v.x,v.y,E.x,E.y);if(x){for(let N=0;N<x.length;N+=2)j.addColorStop(x[N],x[N+1]);this.setAttr("strokeStyle",j)}}_stroke(g){const v=g.dash(),E=g.getStrokeScaleEnabled();if(g.hasStroke()){if(!E){this.save();const j=this.getCanvas().getPixelRatio();this.setTransform(j,0,0,j,0,0)}this._applyLineCap(g),v&&g.dashEnabled()&&(this.setLineDash(v),this.setAttr("lineDashOffset",g.dashOffset())),this.setAttr("lineWidth",g.strokeWidth()),g.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),g.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(g):this.setAttr("strokeStyle",g.stroke()),g._strokeFunc(this),E||this.restore()}}_applyShadow(g){var v,E,x;const j=(v=g.getShadowRGBA())!==null&&v!==void 0?v:"black",N=(E=g.getShadowBlur())!==null&&E!==void 0?E:5,T=(x=g.getShadowOffset())!==null&&x!==void 0?x:{x:0,y:0},F=g.getAbsoluteScale(),C=this.canvas.getPixelRatio(),A=F.x*C,L=F.y*C;this.setAttr("shadowColor",j),this.setAttr("shadowBlur",N*Math.min(Math.abs(A),Math.abs(L))),this.setAttr("shadowOffsetX",T.x*A),this.setAttr("shadowOffsetY",T.y*L)}}tc.SceneContext=S;class w extends _{constructor(g){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:!0})}_fill(g){this.save(),this.setAttr("fillStyle",g.colorKey),g._fillFuncHit(this),this.restore()}strokeShape(g){g.hasHitStroke()&&this._stroke(g)}_stroke(g){if(g.hasHitStroke()){const v=g.getStrokeScaleEnabled();if(!v){this.save();const j=this.getCanvas().getPixelRatio();this.setTransform(j,0,0,j,0,0)}this._applyLineCap(g);const E=g.hitStrokeWidth(),x=E==="auto"?g.strokeWidth():E;this.setAttr("lineWidth",x),this.setAttr("strokeStyle",g.colorKey),g._strokeFuncHit(this),v||this.restore()}}}return tc.HitContext=w,tc}var Hy;function Q1(){if(Hy)return ec;Hy=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.HitCanvas=ec.SceneCanvas=ec.Canvas=void 0;const e=Ai(),r=y6(),t=Nr();let n;function a(){if(n)return n;const c=e.Util.createCanvasElement(),u=c.getContext("2d");return n=function(){const d=t.Konva._global.devicePixelRatio||1,p=u.webkitBackingStorePixelRatio||u.mozBackingStorePixelRatio||u.msBackingStorePixelRatio||u.oBackingStorePixelRatio||u.backingStorePixelRatio||1;return d/p}(),e.Util.releaseCanvas(c),n}let i=class{constructor(u){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const p=(u||{}).pixelRatio||t.Konva.pixelRatio||a();this.pixelRatio=p,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(u){const d=this.pixelRatio;this.pixelRatio=u,this.setSize(this.getWidth()/d,this.getHeight()/d)}setWidth(u){this.width=this._canvas.width=u*this.pixelRatio,this._canvas.style.width=u+"px";const d=this.pixelRatio;this.getContext()._context.scale(d,d)}setHeight(u){this.height=this._canvas.height=u*this.pixelRatio,this._canvas.style.height=u+"px";const d=this.pixelRatio;this.getContext()._context.scale(d,d)}getWidth(){return this.width}getHeight(){return this.height}setSize(u,d){this.setWidth(u||0),this.setHeight(d||0)}toDataURL(u,d){try{return this._canvas.toDataURL(u,d)}catch{try{return this._canvas.toDataURL()}catch(y){return e.Util.error("Unable to get data URL. "+y.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};ec.Canvas=i;class o extends i{constructor(u={width:0,height:0,willReadFrequently:!1}){super(u),this.context=new r.SceneContext(this,{willReadFrequently:u.willReadFrequently}),this.setSize(u.width,u.height)}}ec.SceneCanvas=o;class s extends i{constructor(u={width:0,height:0}){super(u),this.hitCanvas=!0,this.context=new r.HitContext(this),this.setSize(u.width,u.height)}}return ec.HitCanvas=s,ec}var eg={},Vy;function am(){return Vy||(Vy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const r=Nr(),t=Ai();e.DD={get isDragging(){let n=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return e.DD._dragElements.forEach(a=>{n=a.node}),n},_dragElements:new Map,_drag(n){const a=[];e.DD._dragElements.forEach((i,o)=>{const{node:s}=i,c=s.getStage();c.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=t.Util._getFirstPointerId(n));const u=c._changedPointerPositions.find(d=>d.id===i.pointerId);if(u){if(i.dragStatus!=="dragging"){const d=s.dragDistance();if(Math.max(Math.abs(u.x-i.startPointerPos.x),Math.abs(u.y-i.startPointerPos.y))<d||(s.startDrag({evt:n}),!s.isDragging()))return}s._setDragPosition(n,i),a.push(s)}}),a.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const a=[];e.DD._dragElements.forEach(i=>{const{node:o}=i,s=o.getStage();if(n&&s.setPointersPositions(n),!s._changedPointerPositions.find(d=>d.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,i.dragStatus="stopped");const u=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;u&&a.indexOf(u)===-1&&a.push(u)}),a.forEach(i=>{i.draw()})},_endDragAfter(n){e.DD._dragElements.forEach((a,i)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:n},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},r.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(eg)),eg}var Gy;function Zi(){if(Gy)return Qh;Gy=1,Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.Node=void 0;const e=Ai(),r=qr(),t=Q1(),n=Nr(),a=am(),i=Hr(),o="absoluteOpacity",s="allEventListeners",c="absoluteTransform",u="absoluteScale",d="canvas",p="Change",y="children",f="konva",_="listening",S="mouseenter",w="mouseleave",b="set",g="Shape",v=" ",E="stage",x="transform",j="Stage",N="visible",T=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(v);let F=1;class C{constructor(O){this._id=F++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(O),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(O){(O===x||O===c)&&this._cache.get(O)?this._cache.get(O).dirty=!0:O?this._cache.delete(O):this._cache.clear()}_getCache(O,I){let M=this._cache.get(O);return(M===void 0||(O===x||O===c)&&M.dirty===!0)&&(M=I.call(this),this._cache.set(O,M)),M}_calculate(O,I,M){if(!this._attachedDepsListeners.get(O)){const G=I.map(W=>W+"Change.konva").join(v);this.on(G,()=>{this._clearCache(O)}),this._attachedDepsListeners.set(O,!0)}return this._getCache(O,M)}_getCanvasCache(){return this._cache.get(d)}_clearSelfAndDescendantCache(O){this._clearCache(O),O===c&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(d)){const{scene:O,filter:I,hit:M}=this._cache.get(d);e.Util.releaseCanvas(O,I,M),this._cache.delete(d)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(O){const I=O||{};let M={};(I.x===void 0||I.y===void 0||I.width===void 0||I.height===void 0)&&(M=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let G=Math.ceil(I.width||M.width),W=Math.ceil(I.height||M.height),Y=I.pixelRatio,te=I.x===void 0?Math.floor(M.x):I.x,V=I.y===void 0?Math.floor(M.y):I.y,H=I.offset||0,q=I.drawBorder||!1,D=I.hitCanvasPixelRatio||1;if(!G||!W){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const $=Math.abs(Math.round(M.x)-te)>.5?1:0,ne=Math.abs(Math.round(M.y)-V)>.5?1:0;G+=H*2+$,W+=H*2+ne,te-=H,V-=H;const Z=new t.SceneCanvas({pixelRatio:Y,width:G,height:W}),Q=new t.SceneCanvas({pixelRatio:Y,width:0,height:0,willReadFrequently:!0}),oe=new t.HitCanvas({pixelRatio:D,width:G,height:W}),se=Z.getContext(),ue=oe.getContext();return oe.isCache=!0,Z.isCache=!0,this._cache.delete(d),this._filterUpToDate=!1,I.imageSmoothingEnabled===!1&&(Z.getContext()._context.imageSmoothingEnabled=!1,Q.getContext()._context.imageSmoothingEnabled=!1),se.save(),ue.save(),se.translate(-te,-V),ue.translate(-te,-V),this._isUnderCache=!0,this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(u),this.drawScene(Z,this),this.drawHit(oe,this),this._isUnderCache=!1,se.restore(),ue.restore(),q&&(se.save(),se.beginPath(),se.rect(0,0,G,W),se.closePath(),se.setAttr("strokeStyle","red"),se.setAttr("lineWidth",5),se.stroke(),se.restore()),this._cache.set(d,{scene:Z,filter:Q,hit:oe,x:te,y:V}),this._requestDraw(),this}isCached(){return this._cache.has(d)}getClientRect(O){throw new Error('abstract "getClientRect" method call')}_transformedRect(O,I){const M=[{x:O.x,y:O.y},{x:O.x+O.width,y:O.y},{x:O.x+O.width,y:O.y+O.height},{x:O.x,y:O.y+O.height}];let G=1/0,W=1/0,Y=-1/0,te=-1/0;const V=this.getAbsoluteTransform(I);return M.forEach(function(H){const q=V.point(H);G===void 0&&(G=Y=q.x,W=te=q.y),G=Math.min(G,q.x),W=Math.min(W,q.y),Y=Math.max(Y,q.x),te=Math.max(te,q.y)}),{x:G,y:W,width:Y-G,height:te-W}}_drawCachedSceneCanvas(O){O.save(),O._applyOpacity(this),O._applyGlobalCompositeOperation(this);const I=this._getCanvasCache();O.translate(I.x,I.y);const M=this._getCachedSceneCanvas(),G=M.pixelRatio;O.drawImage(M._canvas,0,0,M.width/G,M.height/G),O.restore()}_drawCachedHitCanvas(O){const I=this._getCanvasCache(),M=I.hit;O.save(),O.translate(I.x,I.y),O.drawImage(M._canvas,0,0,M.width/M.pixelRatio,M.height/M.pixelRatio),O.restore()}_getCachedSceneCanvas(){let O=this.filters(),I=this._getCanvasCache(),M=I.scene,G=I.filter,W=G.getContext(),Y,te,V,H;if(O){if(!this._filterUpToDate){const q=M.pixelRatio;G.setSize(M.width/M.pixelRatio,M.height/M.pixelRatio);try{for(Y=O.length,W.clear(),W.drawImage(M._canvas,0,0,M.getWidth()/q,M.getHeight()/q),te=W.getImageData(0,0,G.getWidth(),G.getHeight()),V=0;V<Y;V++){if(H=O[V],typeof H!="function"){e.Util.error("Filter should be type of function, but got "+typeof H+" instead. Please check correct filters");continue}H.call(this,te),W.putImageData(te,0,0)}}catch(D){e.Util.error("Unable to apply filter. "+D.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return G}return M}on(O,I){if(this._cache&&this._cache.delete(s),arguments.length===3)return this._delegate.apply(this,arguments);let M=O.split(v),G=M.length,W,Y,te,V,H;for(W=0;W<G;W++)Y=M[W],te=Y.split("."),V=te[0],H=te[1]||"",this.eventListeners[V]||(this.eventListeners[V]=[]),this.eventListeners[V].push({name:H,handler:I});return this}off(O,I){let M=(O||"").split(v),G=M.length,W,Y,te,V,H,q;if(this._cache&&this._cache.delete(s),!O)for(Y in this.eventListeners)this._off(Y);for(W=0;W<G;W++)if(te=M[W],V=te.split("."),H=V[0],q=V[1],H)this.eventListeners[H]&&this._off(H,q,I);else for(Y in this.eventListeners)this._off(Y,q,I);return this}dispatchEvent(O){const I={target:this,type:O.type,evt:O};return this.fire(O.type,I),this}addEventListener(O,I){return this.on(O,function(M){I.call(this,M.evt)}),this}removeEventListener(O){return this.off(O),this}_delegate(O,I,M){const G=this;this.on(O,function(W){const Y=W.target.findAncestors(I,!0,G);for(let te=0;te<Y.length;te++)W=e.Util.cloneObject(W),W.currentTarget=Y[te],M.call(Y[te],W)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(E),this._clearSelfAndDescendantCache(N),this._clearSelfAndDescendantCache(_)}_remove(){this._clearCaches();const O=this.getParent();O&&O.children&&(O.children.splice(this.index,1),O._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(O){const I="get"+e.Util._capitalize(O);return e.Util._isFunction(this[I])?this[I]():this.attrs[O]}getAncestors(){let O=this.getParent(),I=[];for(;O;)I.push(O),O=O.getParent();return I}getAttrs(){return this.attrs||{}}setAttrs(O){return this._batchTransformChanges(()=>{let I,M;if(!O)return this;for(I in O)I!==y&&(M=b+e.Util._capitalize(I),e.Util._isFunction(this[M])?this[M](O[I]):this._setAttr(I,O[I]))}),this}isListening(){return this._getCache(_,this._isListening)}_isListening(O){if(!this.listening())return!1;const M=this.getParent();return M&&M!==O&&this!==O?M._isListening(O):!0}isVisible(){return this._getCache(N,this._isVisible)}_isVisible(O){if(!this.visible())return!1;const M=this.getParent();return M&&M!==O&&this!==O?M._isVisible(O):!0}shouldDrawHit(O,I=!1){if(O)return this._isVisible(O)&&this._isListening(O);const M=this.getLayer();let G=!1;a.DD._dragElements.forEach(Y=>{Y.dragStatus==="dragging"&&(Y.node.nodeType==="Stage"||Y.node.getLayer()===M)&&(G=!0)});const W=!I&&!n.Konva.hitOnDragEnabled&&(G||n.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!W}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let O=this.getDepth(),I=this,M=0,G,W,Y,te;function V(q){for(G=[],W=q.length,Y=0;Y<W;Y++)te=q[Y],M++,te.nodeType!==g&&(G=G.concat(te.getChildren().slice())),te._id===I._id&&(Y=W);G.length>0&&G[0].getDepth()<=O&&V(G)}const H=this.getStage();return I.nodeType!==j&&H&&V(H.getChildren()),M}getDepth(){let O=0,I=this.parent;for(;I;)O++,I=I.parent;return O}_batchTransformChanges(O){this._batchingTransformChange=!0,O(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(c)),this._needClearTransformCache=!1}setPosition(O){return this._batchTransformChanges(()=>{this.x(O.x),this.y(O.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const O=this.getStage();if(!O)return null;const I=O.getPointerPosition();if(!I)return null;const M=this.getAbsoluteTransform().copy();return M.invert(),M.point(I)}getAbsolutePosition(O){let I=!1,M=this.parent;for(;M;){if(M.isCached()){I=!0;break}M=M.parent}I&&!O&&(O=!0);const G=this.getAbsoluteTransform(O).getMatrix(),W=new e.Transform,Y=this.offset();return W.m=G.slice(),W.translate(Y.x,Y.y),W.getTranslation()}setAbsolutePosition(O){const{x:I,y:M,...G}=this._clearTransform();this.attrs.x=I,this.attrs.y=M,this._clearCache(x);const W=this._getAbsoluteTransform().copy();return W.invert(),W.translate(O.x,O.y),O={x:this.attrs.x+W.getTranslation().x,y:this.attrs.y+W.getTranslation().y},this._setTransform(G),this.setPosition({x:O.x,y:O.y}),this._clearCache(x),this._clearSelfAndDescendantCache(c),this}_setTransform(O){let I;for(I in O)this.attrs[I]=O[I]}_clearTransform(){const O={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,O}move(O){let I=O.x,M=O.y,G=this.x(),W=this.y();return I!==void 0&&(G+=I),M!==void 0&&(W+=M),this.setPosition({x:G,y:W}),this}_eachAncestorReverse(O,I){let M=[],G=this.getParent(),W,Y;if(!(I&&I._id===this._id)){for(M.unshift(this);G&&(!I||G._id!==I._id);)M.unshift(G),G=G.parent;for(W=M.length,Y=0;Y<W;Y++)O(M[Y])}}rotate(O){return this.rotation(this.rotation()+O),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const O=this.index,I=this.parent.getChildren().length;return O<I-1?(this.parent.children.splice(O,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const O=this.index,I=this.parent.getChildren().length;return O<I-1?(this.parent.children.splice(O,1),this.parent.children.splice(O+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const O=this.index;return O>0?(this.parent.children.splice(O,1),this.parent.children.splice(O-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const O=this.index;return O>0?(this.parent.children.splice(O,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(O){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(O<0||O>=this.parent.children.length)&&e.Util.warn("Unexpected value "+O+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const I=this.index;return this.parent.children.splice(I,1),this.parent.children.splice(O,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(o,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let O=this.opacity();const I=this.getParent();return I&&!I._isUnderCache&&(O*=I.getAbsoluteOpacity()),O}moveTo(O){return this.getParent()!==O&&(this._remove(),O.add(this)),this}toObject(){let O=this.getAttrs(),I,M,G,W,Y;const te={attrs:{},className:this.getClassName()};for(I in O)M=O[I],Y=e.Util.isObject(M)&&!e.Util._isPlainObject(M)&&!e.Util._isArray(M),!Y&&(G=typeof this[I]=="function"&&this[I],delete O[I],W=G?G.call(this):null,O[I]=M,W!==M&&(te.attrs[I]=M));return e.Util._prepareToStringify(te)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(O,I,M){const G=[];I&&this._isMatch(O)&&G.push(this);let W=this.parent;for(;W;){if(W===M)return G;W._isMatch(O)&&G.push(W),W=W.parent}return G}isAncestorOf(O){return!1}findAncestor(O,I,M){return this.findAncestors(O,I,M)[0]}_isMatch(O){if(!O)return!1;if(typeof O=="function")return O(this);let I=O.replace(/ /g,"").split(","),M=I.length,G,W;for(G=0;G<M;G++)if(W=I[G],e.Util.isValidSelector(W)||(e.Util.warn('Selector "'+W+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),W.charAt(0)==="#"){if(this.id()===W.slice(1))return!0}else if(W.charAt(0)==="."){if(this.hasName(W.slice(1)))return!0}else if(this.className===W||this.nodeType===W)return!0;return!1}getLayer(){const O=this.getParent();return O?O.getLayer():null}getStage(){return this._getCache(E,this._getStage)}_getStage(){const O=this.getParent();return O?O.getStage():null}fire(O,I={},M){return I.target=I.target||this,M?this._fireAndBubble(O,I):this._fire(O,I),this}getAbsoluteTransform(O){return O?this._getAbsoluteTransform(O):this._getCache(c,this._getAbsoluteTransform)}_getAbsoluteTransform(O){let I;if(O)return I=new e.Transform,this._eachAncestorReverse(function(M){const G=M.transformsEnabled();G==="all"?I.multiply(M.getTransform()):G==="position"&&I.translate(M.x()-M.offsetX(),M.y()-M.offsetY())},O),I;{I=this._cache.get(c)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(I):I.reset();const M=this.transformsEnabled();if(M==="all")I.multiply(this.getTransform());else if(M==="position"){const G=this.attrs.x||0,W=this.attrs.y||0,Y=this.attrs.offsetX||0,te=this.attrs.offsetY||0;I.translate(G-Y,W-te)}return I.dirty=!1,I}}getAbsoluteScale(O){let I=this;for(;I;)I._isUnderCache&&(O=I),I=I.getParent();const G=this.getAbsoluteTransform(O).decompose();return{x:G.scaleX,y:G.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var O,I;const M=this._cache.get(x)||new e.Transform;M.reset();const G=this.x(),W=this.y(),Y=n.Konva.getAngle(this.rotation()),te=(O=this.attrs.scaleX)!==null&&O!==void 0?O:1,V=(I=this.attrs.scaleY)!==null&&I!==void 0?I:1,H=this.attrs.skewX||0,q=this.attrs.skewY||0,D=this.attrs.offsetX||0,$=this.attrs.offsetY||0;return(G!==0||W!==0)&&M.translate(G,W),Y!==0&&M.rotate(Y),(H!==0||q!==0)&&M.skew(H,q),(te!==1||V!==1)&&M.scale(te,V),(D!==0||$!==0)&&M.translate(-1*D,-1*$),M.dirty=!1,M}clone(O){let I=e.Util.cloneObject(this.attrs),M,G,W,Y,te;for(M in O)I[M]=O[M];const V=new this.constructor(I);for(M in this.eventListeners)for(G=this.eventListeners[M],W=G.length,Y=0;Y<W;Y++)te=G[Y],te.name.indexOf(f)<0&&(V.eventListeners[M]||(V.eventListeners[M]=[]),V.eventListeners[M].push(te));return V}_toKonvaCanvas(O){O=O||{};const I=this.getClientRect(),M=this.getStage(),G=O.x!==void 0?O.x:Math.floor(I.x),W=O.y!==void 0?O.y:Math.floor(I.y),Y=O.pixelRatio||1,te=new t.SceneCanvas({width:O.width||Math.ceil(I.width)||(M?M.width():0),height:O.height||Math.ceil(I.height)||(M?M.height():0),pixelRatio:Y}),V=te.getContext(),H=new t.SceneCanvas({width:te.width/te.pixelRatio+Math.abs(G),height:te.height/te.pixelRatio+Math.abs(W),pixelRatio:te.pixelRatio});return O.imageSmoothingEnabled===!1&&(V._context.imageSmoothingEnabled=!1),V.save(),(G||W)&&V.translate(-1*G,-1*W),this.drawScene(te,void 0,H),V.restore(),te}toCanvas(O){return this._toKonvaCanvas(O)._canvas}toDataURL(O){O=O||{};const I=O.mimeType||null,M=O.quality||null,G=this._toKonvaCanvas(O).toDataURL(I,M);return O.callback&&O.callback(G),G}toImage(O){return new Promise((I,M)=>{try{const G=O==null?void 0:O.callback;G&&delete O.callback,e.Util._urlToImage(this.toDataURL(O),function(W){I(W),G==null||G(W)})}catch(G){M(G)}})}toBlob(O){return new Promise((I,M)=>{try{const G=O==null?void 0:O.callback;G&&delete O.callback,this.toCanvas(O).toBlob(W=>{I(W),G==null||G(W)},O==null?void 0:O.mimeType,O==null?void 0:O.quality)}catch(G){M(G)}})}setSize(O){return this.width(O.width),this.height(O.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():n.Konva.dragDistance}_off(O,I,M){let G=this.eventListeners[O],W,Y,te;for(W=0;W<G.length;W++)if(Y=G[W].name,te=G[W].handler,(Y!=="konva"||I==="konva")&&(!I||Y===I)&&(!M||M===te)){if(G.splice(W,1),G.length===0){delete this.eventListeners[O];break}W--}}_fireChangeEvent(O,I,M){this._fire(O+p,{oldVal:I,newVal:M})}addName(O){if(!this.hasName(O)){const I=this.name(),M=I?I+" "+O:O;this.name(M)}return this}hasName(O){if(!O)return!1;const I=this.name();return I?(I||"").split(/\s/g).indexOf(O)!==-1:!1}removeName(O){const I=(this.name()||"").split(/\s/g),M=I.indexOf(O);return M!==-1&&(I.splice(M,1),this.name(I.join(" "))),this}setAttr(O,I){const M=this[b+e.Util._capitalize(O)];return e.Util._isFunction(M)?M.call(this,I):this._setAttr(O,I),this}_requestDraw(){if(n.Konva.autoDrawEnabled){const O=this.getLayer()||this.getStage();O==null||O.batchDraw()}}_setAttr(O,I){const M=this.attrs[O];M===I&&!e.Util.isObject(I)||(I==null?delete this.attrs[O]:this.attrs[O]=I,this._shouldFireChangeEvents&&this._fireChangeEvent(O,M,I),this._requestDraw())}_setComponentAttr(O,I,M){let G;M!==void 0&&(G=this.attrs[O],G||(this.attrs[O]=this.getAttr(O)),this.attrs[O][I]=M,this._fireChangeEvent(O,G,M))}_fireAndBubble(O,I,M){if(I&&this.nodeType===g&&(I.target=this),!((O===S||O===w)&&(M&&(this===M||this.isAncestorOf&&this.isAncestorOf(M))||this.nodeType==="Stage"&&!M))){this._fire(O,I);const W=(O===S||O===w)&&M&&M.isAncestorOf&&M.isAncestorOf(this)&&!M.isAncestorOf(this.parent);(I&&!I.cancelBubble||!I)&&this.parent&&this.parent.isListening()&&!W&&(M&&M.parent?this._fireAndBubble.call(this.parent,O,I,M):this._fireAndBubble.call(this.parent,O,I))}}_getProtoListeners(O){var I,M,G;const W=(I=this._cache.get(s))!==null&&I!==void 0?I:{};let Y=W==null?void 0:W[O];if(Y===void 0){Y=[];let te=Object.getPrototypeOf(this);for(;te;){const V=(G=(M=te.eventListeners)===null||M===void 0?void 0:M[O])!==null&&G!==void 0?G:[];Y.push(...V),te=Object.getPrototypeOf(te)}W[O]=Y,this._cache.set(s,W)}return Y}_fire(O,I){I=I||{},I.currentTarget=this,I.type=O;const M=this._getProtoListeners(O);if(M)for(var G=0;G<M.length;G++)M[G].handler.call(this,I);const W=this.eventListeners[O];if(W)for(var G=0;G<W.length;G++)W[G].handler.call(this,I)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(O){const I=O?O.pointerId:void 0,M=this.getStage(),G=this.getAbsolutePosition();if(!M)return;const W=M._getPointerById(I)||M._changedPointerPositions[0]||G;a.DD._dragElements.set(this._id,{node:this,startPointerPos:W,offset:{x:W.x-G.x,y:W.y-G.y},dragStatus:"ready",pointerId:I})}startDrag(O,I=!0){a.DD._dragElements.has(this._id)||this._createDragElement(O);const M=a.DD._dragElements.get(this._id);M.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:O&&O.evt},I)}_setDragPosition(O,I){const M=this.getStage()._getPointerById(I.pointerId);if(!M)return;let G={x:M.x-I.offset.x,y:M.y-I.offset.y};const W=this.dragBoundFunc();if(W!==void 0){const Y=W.call(this,G,O);Y?G=Y:e.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==G.x||this._lastPos.y!==G.y)&&(this.setAbsolutePosition(G),this._requestDraw()),this._lastPos=G}stopDrag(O){const I=a.DD._dragElements.get(this._id);I&&(I.dragStatus="stopped"),a.DD._endDragBefore(O),a.DD._endDragAfter(O)}setDraggable(O){this._setAttr("draggable",O),this._dragChange()}isDragging(){const O=a.DD._dragElements.get(this._id);return O?O.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(O){if(!(!(O.evt.button!==void 0)||n.Konva.dragButtons.indexOf(O.evt.button)>=0)||this.isDragging())return;let G=!1;a.DD._dragElements.forEach(W=>{this.isAncestorOf(W.node)&&(G=!0)}),G||this._createDragElement(O)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const I=a.DD._dragElements.get(this._id),M=I&&I.dragStatus==="dragging",G=I&&I.dragStatus==="ready";M?this.stopDrag():G&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(O={x:0,y:0}){const I=this.getStage();if(!I)return!1;const M={x:-O.x,y:-O.y,width:I.width()+2*O.x,height:I.height()+2*O.y};return e.Util.haveIntersection(M,this.getClientRect())}static create(O,I){return e.Util._isString(O)&&(O=JSON.parse(O)),this._createNode(O,I)}static _createNode(O,I){let M=C.prototype.getClassName.call(O),G=O.children,W,Y,te;I&&(O.attrs.container=I),n.Konva[M]||(e.Util.warn('Can not find a node with class name "'+M+'". Fallback to "Shape".'),M="Shape");const V=n.Konva[M];if(W=new V(O.attrs),G)for(Y=G.length,te=0;te<Y;te++)W.add(C._createNode(G[te]));return W}}Qh.Node=C,C.prototype.nodeType="Node",C.prototype._attrsAffectingSize=[],C.prototype.eventListeners={},C.prototype.on.call(C.prototype,T,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(x),this._clearSelfAndDescendantCache(c)}),C.prototype.on.call(C.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(N)}),C.prototype.on.call(C.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(_)}),C.prototype.on.call(C.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(o)});const A=r.Factory.addGetterSetter;return A(C,"zIndex"),A(C,"absolutePosition"),A(C,"position"),A(C,"x",0,(0,i.getNumberValidator)()),A(C,"y",0,(0,i.getNumberValidator)()),A(C,"globalCompositeOperation","source-over",(0,i.getStringValidator)()),A(C,"opacity",1,(0,i.getNumberValidator)()),A(C,"name","",(0,i.getStringValidator)()),A(C,"id","",(0,i.getStringValidator)()),A(C,"rotation",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"scale",["x","y"]),A(C,"scaleX",1,(0,i.getNumberValidator)()),A(C,"scaleY",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"skew",["x","y"]),A(C,"skewX",0,(0,i.getNumberValidator)()),A(C,"skewY",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(C,"offset",["x","y"]),A(C,"offsetX",0,(0,i.getNumberValidator)()),A(C,"offsetY",0,(0,i.getNumberValidator)()),A(C,"dragDistance",void 0,(0,i.getNumberValidator)()),A(C,"width",0,(0,i.getNumberValidator)()),A(C,"height",0,(0,i.getNumberValidator)()),A(C,"listening",!0,(0,i.getBooleanValidator)()),A(C,"preventDefault",!0,(0,i.getBooleanValidator)()),A(C,"filters",void 0,function(L){return this._filterUpToDate=!1,L}),A(C,"visible",!0,(0,i.getBooleanValidator)()),A(C,"transformsEnabled","all",(0,i.getStringValidator)()),A(C,"size"),A(C,"dragBoundFunc"),A(C,"draggable",!1,(0,i.getBooleanValidator)()),r.Factory.backCompat(C,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),Qh}var Jh={},Wy;function J1(){if(Wy)return Jh;Wy=1,Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.Container=void 0;const e=qr(),r=Zi(),t=Hr();let n=class extends r.Node{constructor(){super(...arguments),this.children=[]}getChildren(i){if(!i)return this.children||[];const o=this.children||[],s=[];return o.forEach(function(c){i(c)&&s.push(c)}),s}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.destroy()}),this.children=[],this._requestDraw(),this}add(...i){if(i.length===0)return this;if(i.length>1){for(let s=0;s<i.length;s++)this.add(i[s]);return this}const o=i[0];return o.getParent()?(o.moveTo(this),this):(this._validateAdd(o),o.index=this.getChildren().length,o.parent=this,o._clearCaches(),this.getChildren().push(o),this._fire("add",{child:o}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(i){return this._generalFind(i,!1)}findOne(i){const o=this._generalFind(i,!0);return o.length>0?o[0]:void 0}_generalFind(i,o){const s=[];return this._descendants(c=>{const u=c._isMatch(i);return u&&s.push(c),!!(u&&o)}),s}_descendants(i){let o=!1;const s=this.getChildren();for(const c of s){if(o=i(c),o)return!0;if(c.hasChildren()&&(o=c._descendants(i),o))return!0}return!1}toObject(){const i=r.Node.prototype.toObject.call(this);return i.children=[],this.getChildren().forEach(o=>{i.children.push(o.toObject())}),i}isAncestorOf(i){let o=i.getParent();for(;o;){if(o._id===this._id)return!0;o=o.getParent()}return!1}clone(i){const o=r.Node.prototype.clone.call(this,i);return this.getChildren().forEach(function(s){o.add(s.clone())}),o}getAllIntersections(i){const o=[];return this.find("Shape").forEach(s=>{s.isVisible()&&s.intersects(i)&&o.push(s)}),o}_clearSelfAndDescendantCache(i){var o;super._clearSelfAndDescendantCache(i),!this.isCached()&&((o=this.children)===null||o===void 0||o.forEach(function(s){s._clearSelfAndDescendantCache(i)}))}_setChildrenIndices(){var i;(i=this.children)===null||i===void 0||i.forEach(function(o,s){o.index=s}),this._requestDraw()}drawScene(i,o,s){const c=this.getLayer(),u=i||c&&c.getCanvas(),d=u&&u.getContext(),p=this._getCanvasCache(),y=p&&p.scene,f=u&&u.isCache;if(!this.isVisible()&&!f)return this;if(y){d.save();const _=this.getAbsoluteTransform(o).getMatrix();d.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedSceneCanvas(d),d.restore()}else this._drawChildren("drawScene",u,o,s);return this}drawHit(i,o){if(!this.shouldDrawHit(o))return this;const s=this.getLayer(),c=i||s&&s.hitCanvas,u=c&&c.getContext(),d=this._getCanvasCache();if(d&&d.hit){u.save();const y=this.getAbsoluteTransform(o).getMatrix();u.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedHitCanvas(u),u.restore()}else this._drawChildren("drawHit",c,o);return this}_drawChildren(i,o,s,c){var u;const d=o&&o.getContext(),p=this.clipWidth(),y=this.clipHeight(),f=this.clipFunc(),_=typeof p=="number"&&typeof y=="number"||f,S=s===this;if(_){d.save();const b=this.getAbsoluteTransform(s);let g=b.getMatrix();d.transform(g[0],g[1],g[2],g[3],g[4],g[5]),d.beginPath();let v;if(f)v=f.call(this,d,this);else{const E=this.clipX(),x=this.clipY();d.rect(E||0,x||0,p,y)}d.clip.apply(d,v),g=b.copy().invert().getMatrix(),d.transform(g[0],g[1],g[2],g[3],g[4],g[5])}const w=!S&&this.globalCompositeOperation()!=="source-over"&&i==="drawScene";w&&(d.save(),d._applyGlobalCompositeOperation(this)),(u=this.children)===null||u===void 0||u.forEach(function(b){b[i](o,s,c)}),w&&d.restore(),_&&d.restore()}getClientRect(i={}){var o;const s=i.skipTransform,c=i.relativeTo;let u,d,p,y,f={x:1/0,y:1/0,width:0,height:0};const _=this;(o=this.children)===null||o===void 0||o.forEach(function(b){if(!b.visible())return;const g=b.getClientRect({relativeTo:_,skipShadow:i.skipShadow,skipStroke:i.skipStroke});g.width===0&&g.height===0||(u===void 0?(u=g.x,d=g.y,p=g.x+g.width,y=g.y+g.height):(u=Math.min(u,g.x),d=Math.min(d,g.y),p=Math.max(p,g.x+g.width),y=Math.max(y,g.y+g.height)))});const S=this.find("Shape");let w=!1;for(let b=0;b<S.length;b++)if(S[b]._isVisible(this)){w=!0;break}return w&&u!==void 0?f={x:u,y:d,width:p-u,height:y-d}:f={x:0,y:0,width:0,height:0},s?f:this._transformedRect(f,c)}};return Jh.Container=n,e.Factory.addComponentsGetterSetter(n,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(n,"clipX",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipY",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipWidth",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipHeight",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipFunc"),Jh}var tg={},Dc={},$y;function b6(){if($y)return Dc;$y=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.getCapturedShape=n,Dc.createEvent=a,Dc.hasPointerCapture=i,Dc.setPointerCapture=o,Dc.releaseCapture=s;const e=Nr(),r=new Map,t=e.Konva._global.PointerEvent!==void 0;function n(c){return r.get(c)}function a(c){return{evt:c,pointerId:c.pointerId}}function i(c,u){return r.get(c)===u}function o(c,u){s(c),u.getStage()&&(r.set(c,u),t&&u._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function s(c,u){const d=r.get(c);if(!d)return;const p=d.getStage();p&&p.content,r.delete(c),t&&d._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return Dc}var Yy;function TS(){return Yy||(Yy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const r=Ai(),t=qr(),n=J1(),a=Nr(),i=Q1(),o=am(),s=Nr(),c=b6(),u="Stage",d="string",p="px",y="mouseout",f="mouseleave",_="mouseover",S="mouseenter",w="mousemove",b="mousedown",g="mouseup",v="pointermove",E="pointerdown",x="pointerup",j="pointercancel",N="lostpointercapture",T="pointerout",F="pointerleave",C="pointerover",A="pointerenter",L="contextmenu",O="touchstart",I="touchend",M="touchmove",G="touchcancel",W="wheel",Y=5,te=[[S,"_pointerenter"],[b,"_pointerdown"],[w,"_pointermove"],[g,"_pointerup"],[f,"_pointerleave"],[O,"_pointerdown"],[M,"_pointermove"],[I,"_pointerup"],[G,"_pointercancel"],[_,"_pointerover"],[W,"_wheel"],[L,"_contextmenu"],[E,"_pointerdown"],[v,"_pointermove"],[x,"_pointerup"],[j,"_pointercancel"],[N,"_lostpointercapture"]],V={mouse:{[T]:y,[F]:f,[C]:_,[A]:S,[v]:w,[E]:b,[x]:g,[j]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[T]:"touchout",[F]:"touchleave",[C]:"touchover",[A]:"touchenter",[v]:M,[E]:O,[x]:I,[j]:G,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[T]:T,[F]:F,[C]:C,[A]:A,[v]:v,[E]:E,[x]:x,[j]:j,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},H=Z=>Z.indexOf("pointer")>=0?"pointer":Z.indexOf("touch")>=0?"touch":"mouse",q=Z=>{const Q=H(Z);if(Q==="pointer")return a.Konva.pointerEventsEnabled&&V.pointer;if(Q==="touch")return V.touch;if(Q==="mouse")return V.mouse};function D(Z={}){return(Z.clipFunc||Z.clipWidth||Z.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Z}const $="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class ne extends n.Container{constructor(Q){super(D(Q)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{D(this.attrs)}),this._checkVisibility()}_validateAdd(Q){const oe=Q.getType()==="Layer",se=Q.getType()==="FastLayer";oe||se||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const Q=this.visible()?"":"none";this.content.style.display=Q}setContainer(Q){if(typeof Q===d){if(Q.charAt(0)==="."){const se=Q.slice(1);Q=document.getElementsByClassName(se)[0]}else{var oe;Q.charAt(0)!=="#"?oe=Q:oe=Q.slice(1),Q=document.getElementById(oe)}if(!Q)throw"Can not find container in document with id "+oe}return this._setAttr("container",Q),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),Q.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const Q=this.children,oe=Q.length;for(let se=0;se<oe;se++)Q[se].clear();return this}clone(Q){return Q||(Q={}),Q.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,Q)}destroy(){super.destroy();const Q=this.content;Q&&r.Util._isInDocument(Q)&&this.container().removeChild(Q);const oe=e.stages.indexOf(this);return oe>-1&&e.stages.splice(oe,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const Q=this._pointerPositions[0]||this._changedPointerPositions[0];return Q?{x:Q.x,y:Q.y}:(r.Util.warn($),null)}_getPointerById(Q){return this._pointerPositions.find(oe=>oe.id===Q)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(Q){Q=Q||{},Q.x=Q.x||0,Q.y=Q.y||0,Q.width=Q.width||this.width(),Q.height=Q.height||this.height();const oe=new i.SceneCanvas({width:Q.width,height:Q.height,pixelRatio:Q.pixelRatio||1}),se=oe.getContext()._context,ue=this.children;return(Q.x||Q.y)&&se.translate(-1*Q.x,-1*Q.y),ue.forEach(function(ve){if(!ve.isVisible())return;const Pe=ve._toKonvaCanvas(Q);se.drawImage(Pe._canvas,Q.x,Q.y,Pe.getWidth()/Pe.getPixelRatio(),Pe.getHeight()/Pe.getPixelRatio())}),oe}getIntersection(Q){if(!Q)return null;const oe=this.children,se=oe.length,ue=se-1;for(let ve=ue;ve>=0;ve--){const Pe=oe[ve].getIntersection(Q);if(Pe)return Pe}return null}_resizeDOM(){const Q=this.width(),oe=this.height();this.content&&(this.content.style.width=Q+p,this.content.style.height=oe+p),this.bufferCanvas.setSize(Q,oe),this.bufferHitCanvas.setSize(Q,oe),this.children.forEach(se=>{se.setSize({width:Q,height:oe}),se.draw()})}add(Q,...oe){if(arguments.length>1){for(let ue=0;ue<arguments.length;ue++)this.add(arguments[ue]);return this}super.add(Q);const se=this.children.length;return se>Y&&r.Util.warn("The stage has "+se+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),Q.setSize({width:this.width(),height:this.height()}),Q.draw(),a.Konva.isBrowser&&this.content.appendChild(Q.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(Q){return c.hasPointerCapture(Q,this)}setPointerCapture(Q){c.setPointerCapture(Q,this)}releaseCapture(Q){c.releaseCapture(Q,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&te.forEach(([Q,oe])=>{this.content.addEventListener(Q,se=>{this[oe](se)},{passive:!1})})}_pointerenter(Q){this.setPointersPositions(Q);const oe=q(Q.type);oe&&this._fire(oe.pointerenter,{evt:Q,target:this,currentTarget:this})}_pointerover(Q){this.setPointersPositions(Q);const oe=q(Q.type);oe&&this._fire(oe.pointerover,{evt:Q,target:this,currentTarget:this})}_getTargetShape(Q){let oe=this[Q+"targetShape"];return oe&&!oe.getStage()&&(oe=null),oe}_pointerleave(Q){const oe=q(Q.type),se=H(Q.type);if(!oe)return;this.setPointersPositions(Q);const ue=this._getTargetShape(se),ve=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;ue&&ve?(ue._fireAndBubble(oe.pointerout,{evt:Q}),ue._fireAndBubble(oe.pointerleave,{evt:Q}),this._fire(oe.pointerleave,{evt:Q,target:this,currentTarget:this}),this[se+"targetShape"]=null):ve&&(this._fire(oe.pointerleave,{evt:Q,target:this,currentTarget:this}),this._fire(oe.pointerout,{evt:Q,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(Q){const oe=q(Q.type),se=H(Q.type);if(!oe)return;this.setPointersPositions(Q);let ue=!1;this._changedPointerPositions.forEach(ve=>{const Pe=this.getIntersection(ve);if(o.DD.justDragged=!1,a.Konva["_"+se+"ListenClick"]=!0,!Pe||!Pe.isListening()){this[se+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&Pe.setPointerCapture(ve.id),this[se+"ClickStartShape"]=Pe,Pe._fireAndBubble(oe.pointerdown,{evt:Q,pointerId:ve.id}),ue=!0;const ke=Q.type.indexOf("touch")>=0;Pe.preventDefault()&&Q.cancelable&&ke&&Q.preventDefault()}),ue||this._fire(oe.pointerdown,{evt:Q,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(Q){const oe=q(Q.type),se=H(Q.type);if(!oe||(a.Konva.isDragging()&&o.DD.node.preventDefault()&&Q.cancelable&&Q.preventDefault(),this.setPointersPositions(Q),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const ve={};let Pe=!1;const ke=this._getTargetShape(se);this._changedPointerPositions.forEach(Ne=>{const xe=c.getCapturedShape(Ne.id)||this.getIntersection(Ne),ye=Ne.id,Ie={evt:Q,pointerId:ye},me=ke!==xe;if(me&&ke&&(ke._fireAndBubble(oe.pointerout,{...Ie},xe),ke._fireAndBubble(oe.pointerleave,{...Ie},xe)),xe){if(ve[xe._id])return;ve[xe._id]=!0}xe&&xe.isListening()?(Pe=!0,me&&(xe._fireAndBubble(oe.pointerover,{...Ie},ke),xe._fireAndBubble(oe.pointerenter,{...Ie},ke),this[se+"targetShape"]=xe),xe._fireAndBubble(oe.pointermove,{...Ie})):ke&&(this._fire(oe.pointerover,{evt:Q,target:this,currentTarget:this,pointerId:ye}),this[se+"targetShape"]=null)}),Pe||this._fire(oe.pointermove,{evt:Q,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(Q){const oe=q(Q.type),se=H(Q.type);if(!oe)return;this.setPointersPositions(Q);const ue=this[se+"ClickStartShape"],ve=this[se+"ClickEndShape"],Pe={};let ke=!1;this._changedPointerPositions.forEach(Ne=>{const xe=c.getCapturedShape(Ne.id)||this.getIntersection(Ne);if(xe){if(xe.releaseCapture(Ne.id),Pe[xe._id])return;Pe[xe._id]=!0}const ye=Ne.id,Ie={evt:Q,pointerId:ye};let me=!1;a.Konva["_"+se+"InDblClickWindow"]?(me=!0,clearTimeout(this[se+"DblTimeout"])):o.DD.justDragged||(a.Konva["_"+se+"InDblClickWindow"]=!0,clearTimeout(this[se+"DblTimeout"])),this[se+"DblTimeout"]=setTimeout(function(){a.Konva["_"+se+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),xe&&xe.isListening()?(ke=!0,this[se+"ClickEndShape"]=xe,xe._fireAndBubble(oe.pointerup,{...Ie}),a.Konva["_"+se+"ListenClick"]&&ue&&ue===xe&&(xe._fireAndBubble(oe.pointerclick,{...Ie}),me&&ve&&ve===xe&&xe._fireAndBubble(oe.pointerdblclick,{...Ie}))):(this[se+"ClickEndShape"]=null,a.Konva["_"+se+"ListenClick"]&&this._fire(oe.pointerclick,{evt:Q,target:this,currentTarget:this,pointerId:ye}),me&&this._fire(oe.pointerdblclick,{evt:Q,target:this,currentTarget:this,pointerId:ye}))}),ke||this._fire(oe.pointerup,{evt:Q,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+se+"ListenClick"]=!1,Q.cancelable&&se!=="touch"&&se!=="pointer"&&Q.preventDefault()}_contextmenu(Q){this.setPointersPositions(Q);const oe=this.getIntersection(this.getPointerPosition());oe&&oe.isListening()?oe._fireAndBubble(L,{evt:Q}):this._fire(L,{evt:Q,target:this,currentTarget:this})}_wheel(Q){this.setPointersPositions(Q);const oe=this.getIntersection(this.getPointerPosition());oe&&oe.isListening()?oe._fireAndBubble(W,{evt:Q}):this._fire(W,{evt:Q,target:this,currentTarget:this})}_pointercancel(Q){this.setPointersPositions(Q);const oe=c.getCapturedShape(Q.pointerId)||this.getIntersection(this.getPointerPosition());oe&&oe._fireAndBubble(x,c.createEvent(Q)),c.releaseCapture(Q.pointerId)}_lostpointercapture(Q){c.releaseCapture(Q.pointerId)}setPointersPositions(Q){const oe=this._getContentPosition();let se=null,ue=null;Q=Q||window.event,Q.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(Q.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-oe.left)/oe.scaleX,y:(ve.clientY-oe.top)/oe.scaleY})}),Array.prototype.forEach.call(Q.changedTouches||Q.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-oe.left)/oe.scaleX,y:(ve.clientY-oe.top)/oe.scaleY})})):(se=(Q.clientX-oe.left)/oe.scaleX,ue=(Q.clientY-oe.top)/oe.scaleY,this.pointerPos={x:se,y:ue},this._pointerPositions=[{x:se,y:ue,id:r.Util._getFirstPointerId(Q)}],this._changedPointerPositions=[{x:se,y:ue,id:r.Util._getFirstPointerId(Q)}])}_setPointerPosition(Q){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(Q)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const Q=this.content.getBoundingClientRect();return{top:Q.top,left:Q.left,scaleX:Q.width/this.content.clientWidth||1,scaleY:Q.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!a.Konva.isBrowser)return;const Q=this.container();if(!Q)throw"Stage has no container. A container is required.";Q.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),Q.appendChild(this.content),this._resizeDOM()}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(Q){Q.batchDraw()}),this}}e.Stage=ne,ne.prototype.nodeType=u,(0,s._registerNode)(ne),t.Factory.addGetterSetter(ne,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(Z=>{Z.batchDraw()})})}(tg)),tg}var ed={},rg={},Xy;function Ra(){return Xy||(Xy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const r=Nr(),t=Ai(),n=qr(),a=Zi(),i=Hr(),o=Nr(),s=b6(),c="hasShadow",u="shadowRGBA",d="patternImage",p="linearGradient",y="radialGradient";let f;function _(){return f||(f=t.Util.createCanvasElement().getContext("2d"),f)}e.shapes={};function S(F){const C=this.attrs.fillRule;C?F.fill(C):F.fill()}function w(F){F.stroke()}function b(F){const C=this.attrs.fillRule;C?F.fill(C):F.fill()}function g(F){F.stroke()}function v(){this._clearCache(c)}function E(){this._clearCache(u)}function x(){this._clearCache(d)}function j(){this._clearCache(p)}function N(){this._clearCache(y)}class T extends a.Node{constructor(C){super(C);let A;for(;A=t.Util.getRandomColor(),!(A&&!(A in e.shapes)););this.colorKey=A,e.shapes[A]=this}getContext(){return t.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return t.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(d,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const A=_().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(A&&A.setTransform){const L=new t.Transform;L.translate(this.fillPatternX(),this.fillPatternY()),L.rotate(r.Konva.getAngle(this.fillPatternRotation())),L.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),L.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const O=L.getMatrix(),I=typeof DOMMatrix>"u"?{a:O[0],b:O[1],c:O[2],d:O[3],e:O[4],f:O[5]}:new DOMMatrix(O);A.setTransform(I)}return A}}_getLinearGradient(){return this._getCache(p,this.__getLinearGradient)}__getLinearGradient(){const C=this.fillLinearGradientColorStops();if(C){const A=_(),L=this.fillLinearGradientStartPoint(),O=this.fillLinearGradientEndPoint(),I=A.createLinearGradient(L.x,L.y,O.x,O.y);for(let M=0;M<C.length;M+=2)I.addColorStop(C[M],C[M+1]);return I}}_getRadialGradient(){return this._getCache(y,this.__getRadialGradient)}__getRadialGradient(){const C=this.fillRadialGradientColorStops();if(C){const A=_(),L=this.fillRadialGradientStartPoint(),O=this.fillRadialGradientEndPoint(),I=A.createRadialGradient(L.x,L.y,this.fillRadialGradientStartRadius(),O.x,O.y,this.fillRadialGradientEndRadius());for(let M=0;M<C.length;M+=2)I.addColorStop(C[M],C[M+1]);return I}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const C=t.Util.colorToRGBA(this.shadowColor());if(C)return"rgba("+C.r+","+C.g+","+C.b+","+C.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const C=this.hitStrokeWidth();return C==="auto"?this.hasStroke():this.strokeEnabled()&&!!C}intersects(C){const A=this.getStage();if(!A)return!1;const L=A.bufferHitCanvas;return L.getContext().clear(),this.drawHit(L,void 0,!0),L.context.getImageData(Math.round(C.x),Math.round(C.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(C){var A;if(!((A=this.attrs.perfectDrawEnabled)!==null&&A!==void 0?A:!0))return!1;const O=C||this.hasFill(),I=this.hasStroke(),M=this.getAbsoluteOpacity()!==1;if(O&&I&&M)return!0;const G=this.hasShadow(),W=this.shadowForStrokeEnabled();return!!(O&&I&&G&&W)}setStrokeHitEnabled(C){t.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),C?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const C=this.size();return{x:this._centroid?-C.width/2:0,y:this._centroid?-C.height/2:0,width:C.width,height:C.height}}getClientRect(C={}){let A=!1,L=this.getParent();for(;L;){if(L.isCached()){A=!0;break}L=L.getParent()}const O=C.skipTransform,I=C.relativeTo||A&&this.getStage()||void 0,M=this.getSelfRect(),W=!C.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,Y=M.width+W,te=M.height+W,V=!C.skipShadow&&this.hasShadow(),H=V?this.shadowOffsetX():0,q=V?this.shadowOffsetY():0,D=Y+Math.abs(H),$=te+Math.abs(q),ne=V&&this.shadowBlur()||0,Z=D+ne*2,Q=$+ne*2,oe={width:Z,height:Q,x:-(W/2+ne)+Math.min(H,0)+M.x,y:-(W/2+ne)+Math.min(q,0)+M.y};return O?oe:this._transformedRect(oe,I)}drawScene(C,A,L){const O=this.getLayer();let I=C||O.getCanvas(),M=I.getContext(),G=this._getCanvasCache(),W=this.getSceneFunc(),Y=this.hasShadow(),te,V;const H=I.isCache,q=A===this;if(!this.isVisible()&&!q)return this;if(G){M.save();const $=this.getAbsoluteTransform(A).getMatrix();return M.transform($[0],$[1],$[2],$[3],$[4],$[5]),this._drawCachedSceneCanvas(M),M.restore(),this}if(!W)return this;if(M.save(),this._useBufferCanvas()&&!H){te=this.getStage();const $=L||te.bufferCanvas;V=$.getContext(),V.clear(),V.save(),V._applyLineJoin(this);var D=this.getAbsoluteTransform(A).getMatrix();V.transform(D[0],D[1],D[2],D[3],D[4],D[5]),W.call(this,V,this),V.restore();const ne=$.pixelRatio;Y&&M._applyShadow(this),M._applyOpacity(this),M._applyGlobalCompositeOperation(this),M.drawImage($._canvas,0,0,$.width/ne,$.height/ne)}else{if(M._applyLineJoin(this),!q){var D=this.getAbsoluteTransform(A).getMatrix();M.transform(D[0],D[1],D[2],D[3],D[4],D[5]),M._applyOpacity(this),M._applyGlobalCompositeOperation(this)}Y&&M._applyShadow(this),W.call(this,M,this)}return M.restore(),this}drawHit(C,A,L=!1){if(!this.shouldDrawHit(A,L))return this;const O=this.getLayer(),I=C||O.hitCanvas,M=I&&I.getContext(),G=this.hitFunc()||this.sceneFunc(),W=this._getCanvasCache(),Y=W&&W.hit;if(this.colorKey||t.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),Y){M.save();const V=this.getAbsoluteTransform(A).getMatrix();return M.transform(V[0],V[1],V[2],V[3],V[4],V[5]),this._drawCachedHitCanvas(M),M.restore(),this}if(!G)return this;if(M.save(),M._applyLineJoin(this),!(this===A)){const V=this.getAbsoluteTransform(A).getMatrix();M.transform(V[0],V[1],V[2],V[3],V[4],V[5])}return G.call(this,M,this),M.restore(),this}drawHitFromCache(C=0){const A=this._getCanvasCache(),L=this._getCachedSceneCanvas(),O=A.hit,I=O.getContext(),M=O.getWidth(),G=O.getHeight();I.clear(),I.drawImage(L._canvas,0,0,M,G);try{const W=I.getImageData(0,0,M,G),Y=W.data,te=Y.length,V=t.Util._hexToRgb(this.colorKey);for(let H=0;H<te;H+=4)Y[H+3]>C?(Y[H]=V.r,Y[H+1]=V.g,Y[H+2]=V.b,Y[H+3]=255):Y[H+3]=0;I.putImageData(W,0,0)}catch(W){t.Util.error("Unable to draw hit graph from cached scene canvas. "+W.message)}return this}hasPointerCapture(C){return s.hasPointerCapture(C,this)}setPointerCapture(C){s.setPointerCapture(C,this)}releaseCapture(C){s.releaseCapture(C,this)}}e.Shape=T,T.prototype._fillFunc=S,T.prototype._strokeFunc=w,T.prototype._fillFuncHit=b,T.prototype._strokeFuncHit=g,T.prototype._centroid=!1,T.prototype.nodeType="Shape",(0,o._registerNode)(T),T.prototype.eventListeners={},T.prototype.on.call(T.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),T.prototype.on.call(T.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",E),T.prototype.on.call(T.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",x),T.prototype.on.call(T.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",j),T.prototype.on.call(T.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",N),n.Factory.addGetterSetter(T,"stroke",void 0,(0,i.getStringOrGradientValidator)()),n.Factory.addGetterSetter(T,"strokeWidth",2,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(T,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(T,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(T,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(T,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),n.Factory.addGetterSetter(T,"lineJoin"),n.Factory.addGetterSetter(T,"lineCap"),n.Factory.addGetterSetter(T,"sceneFunc"),n.Factory.addGetterSetter(T,"hitFunc"),n.Factory.addGetterSetter(T,"dash"),n.Factory.addGetterSetter(T,"dashOffset",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"shadowColor",void 0,(0,i.getStringValidator)()),n.Factory.addGetterSetter(T,"shadowBlur",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"shadowOpacity",1,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(T,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(T,"shadowOffsetX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"shadowOffsetY",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillPatternImage"),n.Factory.addGetterSetter(T,"fill",void 0,(0,i.getStringOrGradientValidator)()),n.Factory.addGetterSetter(T,"fillPatternX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillPatternY",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(T,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(T,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(T,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(T,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(T,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(T,"fillEnabled",!0),n.Factory.addGetterSetter(T,"strokeEnabled",!0),n.Factory.addGetterSetter(T,"shadowEnabled",!0),n.Factory.addGetterSetter(T,"dashEnabled",!0),n.Factory.addGetterSetter(T,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(T,"fillPriority","color"),n.Factory.addComponentsGetterSetter(T,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(T,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(T,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(T,"fillPatternScaleX",1,(0,i.getNumberValidator)()),n.Factory.addGetterSetter(T,"fillPatternScaleY",1,(0,i.getNumberValidator)()),n.Factory.addComponentsGetterSetter(T,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(T,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(T,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(T,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(T,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(T,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(T,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(T,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(T,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(T,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(T,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(T,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(T,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(T,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(T,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(T,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(T,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(T,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(T,"fillPatternRotation",0),n.Factory.addGetterSetter(T,"fillRule",void 0,(0,i.getStringValidator)()),n.Factory.backCompat(T,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(rg)),rg}var Ky;function w6(){if(Ky)return ed;Ky=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.Layer=void 0;const e=Ai(),r=J1(),t=Zi(),n=qr(),a=Q1(),i=Hr(),o=Ra(),s=Nr(),c="#",u="beforeDraw",d="draw",p=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],y=p.length;class f extends r.Container{constructor(S){super(S),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(S){return this.getContext().clear(S),this.getHitCanvas().getContext().clear(S),this}setZIndex(S){super.setZIndex(S);const w=this.getStage();return w&&w.content&&(w.content.removeChild(this.getNativeCanvasElement()),S<w.children.length-1?w.content.insertBefore(this.getNativeCanvasElement(),w.children[S+1].getCanvas()._canvas):w.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const S=this.getStage();return S&&S.content&&(S.content.removeChild(this.getNativeCanvasElement()),S.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const w=this.getStage();return!w||!w.content?!1:(w.content.removeChild(this.getNativeCanvasElement()),this.index<w.children.length-1?w.content.insertBefore(this.getNativeCanvasElement(),w.children[this.index+1].getCanvas()._canvas):w.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const S=this.getStage();if(S){const w=S.children;S.content&&(S.content.removeChild(this.getNativeCanvasElement()),S.content.insertBefore(this.getNativeCanvasElement(),w[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const S=this.getStage();if(S){const w=S.children;S.content&&(S.content.removeChild(this.getNativeCanvasElement()),S.content.insertBefore(this.getNativeCanvasElement(),w[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const S=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),S&&S.parentNode&&e.Util._isInDocument(S)&&S.parentNode.removeChild(S),this}getStage(){return this.parent}setSize({width:S,height:w}){return this.canvas.setSize(S,w),this.hitCanvas.setSize(S,w),this._setSmoothEnabled(),this}_validateAdd(S){const w=S.getType();w!=="Group"&&w!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(S){return S=S||{},S.width=S.width||this.getWidth(),S.height=S.height||this.getHeight(),S.x=S.x!==void 0?S.x:this.x(),S.y=S.y!==void 0?S.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,S)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(S){if(!this.isListening()||!this.isVisible())return null;let w=1,b=!1;for(;;){for(let g=0;g<y;g++){const v=p[g],E=this._getIntersection({x:S.x+v.x*w,y:S.y+v.y*w}),x=E.shape;if(x)return x;if(b=!!E.antialiased,!E.antialiased)break}if(b)w+=1;else return null}}_getIntersection(S){const w=this.hitCanvas.pixelRatio,b=this.hitCanvas.context.getImageData(Math.round(S.x*w),Math.round(S.y*w),1,1).data,g=b[3];if(g===255){const v=e.Util._rgbToHex(b[0],b[1],b[2]),E=o.shapes[c+v];return E?{shape:E}:{antialiased:!0}}else if(g>0)return{antialiased:!0};return{}}drawScene(S,w){const b=this.getLayer(),g=S||b&&b.getCanvas();return this._fire(u,{node:this}),this.clearBeforeDraw()&&g.getContext().clear(),r.Container.prototype.drawScene.call(this,g,w),this._fire(d,{node:this}),this}drawHit(S,w){const b=this.getLayer(),g=S||b&&b.hitCanvas;return b&&b.clearBeforeDraw()&&b.getHitCanvas().getContext().clear(),r.Container.prototype.drawHit.call(this,g,w),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(S){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(S)}getHitGraphEnabled(S){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const S=this.parent;!!this.hitCanvas._canvas.parentNode?S.content.removeChild(this.hitCanvas._canvas):S.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}return ed.Layer=f,f.prototype.nodeType="Layer",(0,s._registerNode)(f),n.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),n.Factory.addGetterSetter(f,"clearBeforeDraw",!0),n.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,i.getBooleanValidator)()),ed}var td={},Zy;function RS(){if(Zy)return td;Zy=1,Object.defineProperty(td,"__esModule",{value:!0}),td.FastLayer=void 0;const e=Ai(),r=w6(),t=Nr();class n extends r.Layer{constructor(i){super(i),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}return td.FastLayer=n,n.prototype.nodeType="FastLayer",(0,t._registerNode)(n),td}var rd={},Qy;function om(){if(Qy)return rd;Qy=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.Group=void 0;const e=Ai(),r=J1(),t=Nr();class n extends r.Container{_validateAdd(i){const o=i.getType();o!=="Group"&&o!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}}return rd.Group=n,n.prototype.nodeType="Group",(0,t._registerNode)(n),rd}var nd={},Jy;function sm(){if(Jy)return nd;Jy=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Animation=void 0;const e=Nr(),r=Ai(),t=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let n=class sh{constructor(i,o){this.id=sh.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t(),frameRate:0},this.func=i,this.setLayers(o)}setLayers(i){let o=[];return i&&(o=Array.isArray(i)?i:[i]),this.layers=o,this}getLayers(){return this.layers}addLayer(i){const o=this.layers,s=o.length;for(let c=0;c<s;c++)if(o[c]._id===i._id)return!1;return this.layers.push(i),!0}isRunning(){const o=sh.animations,s=o.length;for(let c=0;c<s;c++)if(o[c].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=t(),sh._addAnimation(this),this}stop(){return sh._removeAnimation(this),this}_updateFrameObject(i){this.frame.timeDiff=i-this.frame.lastTime,this.frame.lastTime=i,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(i){this.animations.push(i),this._handleAnimation()}static _removeAnimation(i){const o=i.id,s=this.animations,c=s.length;for(let u=0;u<c;u++)if(s[u].id===o){this.animations.splice(u,1);break}}static _runFrames(){const i={},o=this.animations;for(let s=0;s<o.length;s++){const c=o[s],u=c.layers,d=c.func;c._updateFrameObject(t());const p=u.length;let y;if(d?y=d.call(c,c.frame)!==!1:y=!0,!!y)for(let f=0;f<p;f++){const _=u[f];_._id!==void 0&&(i[_._id]=_)}}for(const s in i)i.hasOwnProperty(s)&&i[s].batchDraw()}static _animationLoop(){const i=sh;i.animations.length?(i._runFrames(),r.Util.requestAnimFrame(i._animationLoop)):i.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,r.Util.requestAnimFrame(this._animationLoop))}};return nd.Animation=n,n.animations=[],n.animIdCounter=0,n.animRunning=!1,nd}var ng={},e5;function MS(){return e5||(e5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const r=Ai(),t=sm(),n=Zi(),a=Nr(),i={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,s=2,c=3,u=["fill","stroke","shadowColor"];let d=0;class p{constructor(_,S,w,b,g,v,E){this.prop=_,this.propFunc=S,this.begin=b,this._pos=b,this.duration=v,this._change=0,this.prevPos=0,this.yoyo=E,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=w,this._change=g-this.begin,this.pause()}fire(_){const S=this[_];S&&S()}setTime(_){_>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():_<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=_,this.update())}getTime(){return this._time}setPosition(_){this.prevPos=this._pos,this.propFunc(_),this._pos=_}getPosition(_){return _===void 0&&(_=this._time),this.func(_,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(_){this.pause(),this._time=_,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const _=this.getTimer()-this._startTime;this.state===s?this.setTime(_):this.state===c&&this.setTime(this.duration-_)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class y{constructor(_){const S=this,w=_.node,b=w._id,g=_.easing||e.Easings.Linear,v=!!_.yoyo;let E,x;typeof _.duration>"u"?E=.3:_.duration===0?E=.001:E=_.duration,this.node=w,this._id=d++;const j=w.getLayer()||(w instanceof a.Konva.Stage?w.getLayers():null);j||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new t.Animation(function(){S.tween.onEnterFrame()},j),this.tween=new p(x,function(N){S._tweenFunc(N)},g,0,1,E*1e3,v),this._addListeners(),y.attrs[b]||(y.attrs[b]={}),y.attrs[b][this._id]||(y.attrs[b][this._id]={}),y.tweens[b]||(y.tweens[b]={});for(x in _)i[x]===void 0&&this._addAttr(x,_[x]);this.reset(),this.onFinish=_.onFinish,this.onReset=_.onReset,this.onUpdate=_.onUpdate}_addAttr(_,S){const w=this.node,b=w._id;let g,v,E,x,j;const N=y.tweens[b][_];N&&delete y.attrs[b][N][_];let T=w.getAttr(_);if(r.Util._isArray(S))if(g=[],v=Math.max(S.length,T.length),_==="points"&&S.length!==T.length&&(S.length>T.length?(x=T,T=r.Util._prepareArrayForTween(T,S,w.closed())):(E=S,S=r.Util._prepareArrayForTween(S,T,w.closed()))),_.indexOf("fill")===0)for(let F=0;F<v;F++)if(F%2===0)g.push(S[F]-T[F]);else{const C=r.Util.colorToRGBA(T[F]);j=r.Util.colorToRGBA(S[F]),T[F]=C,g.push({r:j.r-C.r,g:j.g-C.g,b:j.b-C.b,a:j.a-C.a})}else for(let F=0;F<v;F++)g.push(S[F]-T[F]);else u.indexOf(_)!==-1?(T=r.Util.colorToRGBA(T),j=r.Util.colorToRGBA(S),g={r:j.r-T.r,g:j.g-T.g,b:j.b-T.b,a:j.a-T.a}):g=S-T;y.attrs[b][this._id][_]={start:T,diff:g,end:S,trueEnd:E,trueStart:x},y.tweens[b][_]=this._id}_tweenFunc(_){const S=this.node,w=y.attrs[S._id][this._id];let b,g,v,E,x,j,N,T;for(b in w){if(g=w[b],v=g.start,E=g.diff,T=g.end,r.Util._isArray(v))if(x=[],N=Math.max(v.length,T.length),b.indexOf("fill")===0)for(j=0;j<N;j++)j%2===0?x.push((v[j]||0)+E[j]*_):x.push("rgba("+Math.round(v[j].r+E[j].r*_)+","+Math.round(v[j].g+E[j].g*_)+","+Math.round(v[j].b+E[j].b*_)+","+(v[j].a+E[j].a*_)+")");else for(j=0;j<N;j++)x.push((v[j]||0)+E[j]*_);else u.indexOf(b)!==-1?x="rgba("+Math.round(v.r+E.r*_)+","+Math.round(v.g+E.g*_)+","+Math.round(v.b+E.b*_)+","+(v.a+E.a*_)+")":x=v+E*_;S.setAttr(b,x)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const _=this.node,S=y.attrs[_._id][this._id];S.points&&S.points.trueEnd&&_.setAttr("points",S.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const _=this.node,S=y.attrs[_._id][this._id];S.points&&S.points.trueStart&&_.points(S.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(_){return this.tween.seek(_*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const _=this.node._id,S=this._id,w=y.tweens[_];this.pause();for(const b in w)delete y.tweens[_][b];delete y.attrs[_][S]}}e.Tween=y,y.attrs={},y.tweens={},n.Node.prototype.to=function(f){const _=f.onFinish;f.node=this,f.onFinish=function(){this.destroy(),_&&_()},new y(f).play()},e.Easings={BackEaseIn(f,_,S,w){return S*(f/=w)*f*((1.70158+1)*f-1.70158)+_},BackEaseOut(f,_,S,w){return S*((f=f/w-1)*f*((1.70158+1)*f+1.70158)+1)+_},BackEaseInOut(f,_,S,w){let b=1.70158;return(f/=w/2)<1?S/2*(f*f*(((b*=1.525)+1)*f-b))+_:S/2*((f-=2)*f*(((b*=1.525)+1)*f+b)+2)+_},ElasticEaseIn(f,_,S,w,b,g){let v=0;return f===0?_:(f/=w)===1?_+S:(g||(g=w*.3),!b||b<Math.abs(S)?(b=S,v=g/4):v=g/(2*Math.PI)*Math.asin(S/b),-(b*Math.pow(2,10*(f-=1))*Math.sin((f*w-v)*(2*Math.PI)/g))+_)},ElasticEaseOut(f,_,S,w,b,g){let v=0;return f===0?_:(f/=w)===1?_+S:(g||(g=w*.3),!b||b<Math.abs(S)?(b=S,v=g/4):v=g/(2*Math.PI)*Math.asin(S/b),b*Math.pow(2,-10*f)*Math.sin((f*w-v)*(2*Math.PI)/g)+S+_)},ElasticEaseInOut(f,_,S,w,b,g){let v=0;return f===0?_:(f/=w/2)===2?_+S:(g||(g=w*(.3*1.5)),!b||b<Math.abs(S)?(b=S,v=g/4):v=g/(2*Math.PI)*Math.asin(S/b),f<1?-.5*(b*Math.pow(2,10*(f-=1))*Math.sin((f*w-v)*(2*Math.PI)/g))+_:b*Math.pow(2,-10*(f-=1))*Math.sin((f*w-v)*(2*Math.PI)/g)*.5+S+_)},BounceEaseOut(f,_,S,w){return(f/=w)<1/2.75?S*(7.5625*f*f)+_:f<2/2.75?S*(7.5625*(f-=1.5/2.75)*f+.75)+_:f<2.5/2.75?S*(7.5625*(f-=2.25/2.75)*f+.9375)+_:S*(7.5625*(f-=2.625/2.75)*f+.984375)+_},BounceEaseIn(f,_,S,w){return S-e.Easings.BounceEaseOut(w-f,0,S,w)+_},BounceEaseInOut(f,_,S,w){return f<w/2?e.Easings.BounceEaseIn(f*2,0,S,w)*.5+_:e.Easings.BounceEaseOut(f*2-w,0,S,w)*.5+S*.5+_},EaseIn(f,_,S,w){return S*(f/=w)*f+_},EaseOut(f,_,S,w){return-S*(f/=w)*(f-2)+_},EaseInOut(f,_,S,w){return(f/=w/2)<1?S/2*f*f+_:-S/2*(--f*(f-2)-1)+_},StrongEaseIn(f,_,S,w){return S*(f/=w)*f*f*f*f+_},StrongEaseOut(f,_,S,w){return S*((f=f/w-1)*f*f*f*f+1)+_},StrongEaseInOut(f,_,S,w){return(f/=w/2)<1?S/2*f*f*f*f*f+_:S/2*((f-=2)*f*f*f*f+2)+_},Linear(f,_,S,w){return S*f/w+_}}}(ng)),ng}var t5;function _2(){return t5||(t5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=Nr(),t=Ai(),n=Zi(),a=J1(),i=TS(),o=w6(),s=RS(),c=om(),u=am(),d=Ra(),p=sm(),y=MS(),f=y6(),_=Q1();e.Konva=t.Util._assign(r.Konva,{Util:t.Util,Transform:t.Transform,Node:n.Node,Container:a.Container,Stage:i.Stage,stages:i.stages,Layer:o.Layer,FastLayer:s.FastLayer,Group:c.Group,DD:u.DD,Shape:d.Shape,shapes:d.shapes,Animation:p.Animation,Tween:y.Tween,Easings:y.Easings,Context:f.Context,Canvas:_.Canvas}),e.default=e.Konva}(K0)),K0}var id={},r5;function IS(){if(r5)return id;r5=1,Object.defineProperty(id,"__esModule",{value:!0}),id.Arc=void 0;const e=qr(),r=Ra(),t=Nr(),n=Hr(),a=Nr();class i extends r.Shape{_sceneFunc(s){const c=t.Konva.getAngle(this.angle()),u=this.clockwise();s.beginPath(),s.arc(0,0,this.outerRadius(),0,c,u),s.arc(0,0,this.innerRadius(),c,0,!u),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(s){this.outerRadius(s/2)}setHeight(s){this.outerRadius(s/2)}getSelfRect(){const s=this.innerRadius(),c=this.outerRadius(),u=this.clockwise(),d=t.Konva.getAngle(u?360-this.angle():this.angle()),p=Math.cos(Math.min(d,Math.PI)),y=1,f=Math.sin(Math.min(Math.max(Math.PI,d),3*Math.PI/2)),_=Math.sin(Math.min(d,Math.PI/2)),S=p*(p>0?s:c),w=y*c,b=f*(f>0?s:c),g=_*(_>0?c:s);return{x:S,y:u?-1*g:b,width:w-S,height:g-b}}}return id.Arc=i,i.prototype._centroid=!0,i.prototype.className="Arc",i.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1,(0,n.getBooleanValidator)()),id}var ad={},od={},n5;function _6(){if(n5)return od;n5=1,Object.defineProperty(od,"__esModule",{value:!0}),od.Line=void 0;const e=qr(),r=Nr(),t=Ra(),n=Hr();function a(s,c,u,d,p,y,f){const _=Math.sqrt(Math.pow(u-s,2)+Math.pow(d-c,2)),S=Math.sqrt(Math.pow(p-u,2)+Math.pow(y-d,2)),w=f*_/(_+S),b=f*S/(_+S),g=u-w*(p-s),v=d-w*(y-c),E=u+b*(p-s),x=d+b*(y-c);return[g,v,E,x]}function i(s,c){const u=s.length,d=[];for(let p=2;p<u-2;p+=2){const y=a(s[p-2],s[p-1],s[p],s[p+1],s[p+2],s[p+3],c);isNaN(y[0])||(d.push(y[0]),d.push(y[1]),d.push(s[p]),d.push(s[p+1]),d.push(y[2]),d.push(y[3]))}return d}class o extends t.Shape{constructor(c){super(c),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(c){let u=this.points(),d=u.length,p=this.tension(),y=this.closed(),f=this.bezier(),_,S,w;if(d){if(c.beginPath(),c.moveTo(u[0],u[1]),p!==0&&d>4){for(_=this.getTensionPoints(),S=_.length,w=y?0:4,y||c.quadraticCurveTo(_[0],_[1],_[2],_[3]);w<S-2;)c.bezierCurveTo(_[w++],_[w++],_[w++],_[w++],_[w++],_[w++]);y||c.quadraticCurveTo(_[S-2],_[S-1],u[d-2],u[d-1])}else if(f)for(w=2;w<d;)c.bezierCurveTo(u[w++],u[w++],u[w++],u[w++],u[w++],u[w++]);else for(w=2;w<d;w+=2)c.lineTo(u[w],u[w+1]);y?(c.closePath(),c.fillStrokeShape(this)):c.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():i(this.points(),this.tension())}_getTensionPointsClosed(){const c=this.points(),u=c.length,d=this.tension(),p=a(c[u-2],c[u-1],c[0],c[1],c[2],c[3],d),y=a(c[u-4],c[u-3],c[u-2],c[u-1],c[0],c[1],d),f=i(c,d);return[p[2],p[3]].concat(f).concat([y[0],y[1],c[u-2],c[u-1],y[2],y[3],p[0],p[1],c[0],c[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let c=this.points();if(c.length<4)return{x:c[0]||0,y:c[1]||0,width:0,height:0};this.tension()!==0?c=[c[0],c[1],...this._getTensionPoints(),c[c.length-2],c[c.length-1]]:c=this.points();let u=c[0],d=c[0],p=c[1],y=c[1],f,_;for(let S=0;S<c.length/2;S++)f=c[S*2],_=c[S*2+1],u=Math.min(u,f),d=Math.max(d,f),p=Math.min(p,_),y=Math.max(y,_);return{x:u,y:p,width:d-u,height:y-p}}}return od.Line=o,o.prototype.className="Line",o.prototype._attrsAffectingSize=["points","bezier","tension"],(0,r._registerNode)(o),e.Factory.addGetterSetter(o,"closed",!1),e.Factory.addGetterSetter(o,"bezier",!1),e.Factory.addGetterSetter(o,"tension",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(o,"points",[],(0,n.getNumberArrayValidator)()),od}var sd={},ig={},i5;function jS(){return i5||(i5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const r=(o,s,c)=>{let u,d;const y=c/2;u=0;for(let f=0;f<20;f++)d=y*e.tValues[20][f]+y,u+=e.cValues[20][f]*n(o,s,d);return y*u};e.getCubicArcLength=r;const t=(o,s,c)=>{c===void 0&&(c=1);const u=o[0]-2*o[1]+o[2],d=s[0]-2*s[1]+s[2],p=2*o[1]-2*o[0],y=2*s[1]-2*s[0],f=4*(u*u+d*d),_=4*(u*p+d*y),S=p*p+y*y;if(f===0)return c*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(s[2]-s[0],2));const w=_/(2*f),b=S/f,g=c+w,v=b-w*w,E=g*g+v>0?Math.sqrt(g*g+v):0,x=w*w+v>0?Math.sqrt(w*w+v):0,j=w+Math.sqrt(w*w+v)!==0?v*Math.log(Math.abs((g+E)/(w+x))):0;return Math.sqrt(f)/2*(g*E-w*x+j)};e.getQuadraticArcLength=t;function n(o,s,c){const u=a(1,c,o),d=a(1,c,s),p=u*u+d*d;return Math.sqrt(p)}const a=(o,s,c)=>{const u=c.length-1;let d,p;if(u===0)return 0;if(o===0){p=0;for(let y=0;y<=u;y++)p+=e.binomialCoefficients[u][y]*Math.pow(1-s,u-y)*Math.pow(s,y)*c[y];return p}else{d=new Array(u);for(let y=0;y<u;y++)d[y]=u*(c[y+1]-c[y]);return a(o-1,s,d)}},i=(o,s,c)=>{let u=1,d=o/s,p=(o-c(d))/s,y=0;for(;u>.001;){const f=c(d+p),_=Math.abs(o-f)/s;if(_<u)u=_,d+=p;else{const S=c(d-p),w=Math.abs(o-S)/s;w<u?(u=w,d-=p):p/=2}if(y++,y>500)break}return d};e.t2length=i}(ig)),ig}var a5;function lm(){if(a5)return sd;a5=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.Path=void 0;const e=qr(),r=Ra(),t=Nr(),n=jS();class a extends r.Shape{constructor(o){super(o),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(o){const s=this.dataArray;o.beginPath();let c=!1;for(let E=0;E<s.length;E++){const x=s[E].command,j=s[E].points;switch(x){case"L":o.lineTo(j[0],j[1]);break;case"M":o.moveTo(j[0],j[1]);break;case"C":o.bezierCurveTo(j[0],j[1],j[2],j[3],j[4],j[5]);break;case"Q":o.quadraticCurveTo(j[0],j[1],j[2],j[3]);break;case"A":var u=j[0],d=j[1],p=j[2],y=j[3],f=j[4],_=j[5],S=j[6],w=j[7],b=p>y?p:y,g=p>y?1:p/y,v=p>y?y/p:1;o.translate(u,d),o.rotate(S),o.scale(g,v),o.arc(0,0,b,f,f+_,1-w),o.scale(1/g,1/v),o.rotate(-S),o.translate(-u,-d);break;case"z":c=!0,o.closePath();break}}!c&&!this.hasFill()?o.strokeShape(this):o.fillStrokeShape(this)}getSelfRect(){let o=[];this.dataArray.forEach(function(f){if(f.command==="A"){const _=f.points[4],S=f.points[5],w=f.points[4]+S;let b=Math.PI/180;if(Math.abs(_-w)<b&&(b=Math.abs(_-w)),S<0)for(let g=_-b;g>w;g-=b){const v=a.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],g,0);o.push(v.x,v.y)}else for(let g=_+b;g<w;g+=b){const v=a.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],g,0);o.push(v.x,v.y)}}else if(f.command==="C")for(let _=0;_<=1;_+=.01){const S=a.getPointOnCubicBezier(_,f.start.x,f.start.y,f.points[0],f.points[1],f.points[2],f.points[3],f.points[4],f.points[5]);o.push(S.x,S.y)}else o=o.concat(f.points)});let s=o[0],c=o[0],u=o[1],d=o[1],p,y;for(let f=0;f<o.length/2;f++)p=o[f*2],y=o[f*2+1],isNaN(p)||(s=Math.min(s,p),c=Math.max(c,p)),isNaN(y)||(u=Math.min(u,y),d=Math.max(d,y));return{x:s,y:u,width:c-s,height:d-u}}getLength(){return this.pathLength}getPointAtLength(o){return a.getPointAtLengthOfDataArray(o,this.dataArray)}static getLineLength(o,s,c,u){return Math.sqrt((c-o)*(c-o)+(u-s)*(u-s))}static getPathLength(o){let s=0;for(let c=0;c<o.length;++c)s+=o[c].pathLength;return s}static getPointAtLengthOfDataArray(o,s){let c,u=0,d=s.length;if(!d)return null;for(;u<d&&o>s[u].pathLength;)o-=s[u].pathLength,++u;if(u===d)return c=s[u-1].points.slice(-2),{x:c[0],y:c[1]};if(o<.01)return c=s[u].points.slice(0,2),{x:c[0],y:c[1]};const p=s[u],y=p.points;switch(p.command){case"L":return a.getPointOnLine(o,p.start.x,p.start.y,y[0],y[1]);case"C":return a.getPointOnCubicBezier((0,n.t2length)(o,a.getPathLength(s),E=>(0,n.getCubicArcLength)([p.start.x,y[0],y[2],y[4]],[p.start.y,y[1],y[3],y[5]],E)),p.start.x,p.start.y,y[0],y[1],y[2],y[3],y[4],y[5]);case"Q":return a.getPointOnQuadraticBezier((0,n.t2length)(o,a.getPathLength(s),E=>(0,n.getQuadraticArcLength)([p.start.x,y[0],y[2]],[p.start.y,y[1],y[3]],E)),p.start.x,p.start.y,y[0],y[1],y[2],y[3]);case"A":var f=y[0],_=y[1],S=y[2],w=y[3],b=y[4],g=y[5],v=y[6];return b+=g*o/p.pathLength,a.getPointOnEllipticalArc(f,_,S,w,b,v)}return null}static getPointOnLine(o,s,c,u,d,p,y){p=p??s,y=y??c;const f=this.getLineLength(s,c,u,d);if(f<1e-10)return{x:s,y:c};if(u===s)return{x:p,y:y+(d>c?o:-o)};const _=(d-c)/(u-s),S=Math.sqrt(o*o/(1+_*_))*(u<s?-1:1),w=_*S;if(Math.abs(y-c-_*(p-s))<1e-10)return{x:p+S,y:y+w};const b=((p-s)*(u-s)+(y-c)*(d-c))/(f*f),g=s+b*(u-s),v=c+b*(d-c),E=this.getLineLength(p,y,g,v),x=Math.sqrt(o*o-E*E),j=Math.sqrt(x*x/(1+_*_))*(u<s?-1:1),N=_*j;return{x:g+j,y:v+N}}static getPointOnCubicBezier(o,s,c,u,d,p,y,f,_){function S(x){return x*x*x}function w(x){return 3*x*x*(1-x)}function b(x){return 3*x*(1-x)*(1-x)}function g(x){return(1-x)*(1-x)*(1-x)}const v=f*S(o)+p*w(o)+u*b(o)+s*g(o),E=_*S(o)+y*w(o)+d*b(o)+c*g(o);return{x:v,y:E}}static getPointOnQuadraticBezier(o,s,c,u,d,p,y){function f(g){return g*g}function _(g){return 2*g*(1-g)}function S(g){return(1-g)*(1-g)}const w=p*f(o)+u*_(o)+s*S(o),b=y*f(o)+d*_(o)+c*S(o);return{x:w,y:b}}static getPointOnEllipticalArc(o,s,c,u,d,p){const y=Math.cos(p),f=Math.sin(p),_={x:c*Math.cos(d),y:u*Math.sin(d)};return{x:o+(_.x*y-_.y*f),y:s+(_.x*f+_.y*y)}}static parsePathData(o){if(!o)return[];let s=o;const c=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];s=s.replace(new RegExp(" ","g"),",");for(var u=0;u<c.length;u++)s=s.replace(new RegExp(c[u],"g"),"|"+c[u]);const d=s.split("|"),p=[],y=[];let f=0,_=0;const S=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let w;for(u=1;u<d.length;u++){let O=d[u],I=O.charAt(0);for(O=O.slice(1),y.length=0;w=S.exec(O);)y.push(w[0]);const M=[];for(let G=0,W=y.length;G<W;G++){if(y[G]==="00"){M.push(0,0);continue}const Y=parseFloat(y[G]);isNaN(Y)?M.push(0):M.push(Y)}for(;M.length>0&&!isNaN(M[0]);){let G="",W=[];const Y=f,te=_;var b,g,v,E,x,j,N,T,F,C;switch(I){case"l":f+=M.shift(),_+=M.shift(),G="L",W.push(f,_);break;case"L":f=M.shift(),_=M.shift(),W.push(f,_);break;case"m":var A=M.shift(),L=M.shift();if(f+=A,_+=L,G="M",p.length>2&&p[p.length-1].command==="z"){for(let V=p.length-2;V>=0;V--)if(p[V].command==="M"){f=p[V].points[0]+A,_=p[V].points[1]+L;break}}W.push(f,_),I="l";break;case"M":f=M.shift(),_=M.shift(),G="M",W.push(f,_),I="L";break;case"h":f+=M.shift(),G="L",W.push(f,_);break;case"H":f=M.shift(),G="L",W.push(f,_);break;case"v":_+=M.shift(),G="L",W.push(f,_);break;case"V":_=M.shift(),G="L",W.push(f,_);break;case"C":W.push(M.shift(),M.shift(),M.shift(),M.shift()),f=M.shift(),_=M.shift(),W.push(f,_);break;case"c":W.push(f+M.shift(),_+M.shift(),f+M.shift(),_+M.shift()),f+=M.shift(),_+=M.shift(),G="C",W.push(f,_);break;case"S":g=f,v=_,b=p[p.length-1],b.command==="C"&&(g=f+(f-b.points[2]),v=_+(_-b.points[3])),W.push(g,v,M.shift(),M.shift()),f=M.shift(),_=M.shift(),G="C",W.push(f,_);break;case"s":g=f,v=_,b=p[p.length-1],b.command==="C"&&(g=f+(f-b.points[2]),v=_+(_-b.points[3])),W.push(g,v,f+M.shift(),_+M.shift()),f+=M.shift(),_+=M.shift(),G="C",W.push(f,_);break;case"Q":W.push(M.shift(),M.shift()),f=M.shift(),_=M.shift(),W.push(f,_);break;case"q":W.push(f+M.shift(),_+M.shift()),f+=M.shift(),_+=M.shift(),G="Q",W.push(f,_);break;case"T":g=f,v=_,b=p[p.length-1],b.command==="Q"&&(g=f+(f-b.points[0]),v=_+(_-b.points[1])),f=M.shift(),_=M.shift(),G="Q",W.push(g,v,f,_);break;case"t":g=f,v=_,b=p[p.length-1],b.command==="Q"&&(g=f+(f-b.points[0]),v=_+(_-b.points[1])),f+=M.shift(),_+=M.shift(),G="Q",W.push(g,v,f,_);break;case"A":E=M.shift(),x=M.shift(),j=M.shift(),N=M.shift(),T=M.shift(),F=f,C=_,f=M.shift(),_=M.shift(),G="A",W=this.convertEndpointToCenterParameterization(F,C,f,_,N,T,E,x,j);break;case"a":E=M.shift(),x=M.shift(),j=M.shift(),N=M.shift(),T=M.shift(),F=f,C=_,f+=M.shift(),_+=M.shift(),G="A",W=this.convertEndpointToCenterParameterization(F,C,f,_,N,T,E,x,j);break}p.push({command:G||I,points:W,start:{x:Y,y:te},pathLength:this.calcLength(Y,te,G||I,W)})}(I==="z"||I==="Z")&&p.push({command:"z",points:[],start:void 0,pathLength:0})}return p}static calcLength(o,s,c,u){let d,p,y,f;const _=a;switch(c){case"L":return _.getLineLength(o,s,u[0],u[1]);case"C":return(0,n.getCubicArcLength)([o,u[0],u[2],u[4]],[s,u[1],u[3],u[5]],1);case"Q":return(0,n.getQuadraticArcLength)([o,u[0],u[2]],[s,u[1],u[3]],1);case"A":d=0;var S=u[4],w=u[5],b=u[4]+w,g=Math.PI/180;if(Math.abs(S-b)<g&&(g=Math.abs(S-b)),p=_.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],S,0),w<0)for(f=S-g;f>b;f-=g)y=_.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],f,0),d+=_.getLineLength(p.x,p.y,y.x,y.y),p=y;else for(f=S+g;f<b;f+=g)y=_.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],f,0),d+=_.getLineLength(p.x,p.y,y.x,y.y),p=y;return y=_.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],b,0),d+=_.getLineLength(p.x,p.y,y.x,y.y),d}return 0}static convertEndpointToCenterParameterization(o,s,c,u,d,p,y,f,_){const S=_*(Math.PI/180),w=Math.cos(S)*(o-c)/2+Math.sin(S)*(s-u)/2,b=-1*Math.sin(S)*(o-c)/2+Math.cos(S)*(s-u)/2,g=w*w/(y*y)+b*b/(f*f);g>1&&(y*=Math.sqrt(g),f*=Math.sqrt(g));let v=Math.sqrt((y*y*(f*f)-y*y*(b*b)-f*f*(w*w))/(y*y*(b*b)+f*f*(w*w)));d===p&&(v*=-1),isNaN(v)&&(v=0);const E=v*y*b/f,x=v*-f*w/y,j=(o+c)/2+Math.cos(S)*E-Math.sin(S)*x,N=(s+u)/2+Math.sin(S)*E+Math.cos(S)*x,T=function(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])},F=function(M,G){return(M[0]*G[0]+M[1]*G[1])/(T(M)*T(G))},C=function(M,G){return(M[0]*G[1]<M[1]*G[0]?-1:1)*Math.acos(F(M,G))},A=C([1,0],[(w-E)/y,(b-x)/f]),L=[(w-E)/y,(b-x)/f],O=[(-1*w-E)/y,(-1*b-x)/f];let I=C(L,O);return F(L,O)<=-1&&(I=Math.PI),F(L,O)>=1&&(I=0),p===0&&I>0&&(I=I-2*Math.PI),p===1&&I<0&&(I=I+2*Math.PI),[j,N,y,f,A,I,S,p]}}return sd.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),sd}var o5;function FS(){if(o5)return ad;o5=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.Arrow=void 0;const e=qr(),r=_6(),t=Hr(),n=Nr(),a=lm();class i extends r.Line{_sceneFunc(s){super._sceneFunc(s);const c=Math.PI*2,u=this.points();let d=u;const p=this.tension()!==0&&u.length>4;p&&(d=this.getTensionPoints());const y=this.pointerLength(),f=u.length;let _,S;if(p){const g=[d[d.length-4],d[d.length-3],d[d.length-2],d[d.length-1],u[f-2],u[f-1]],v=a.Path.calcLength(d[d.length-4],d[d.length-3],"C",g),E=a.Path.getPointOnQuadraticBezier(Math.min(1,1-y/v),g[0],g[1],g[2],g[3],g[4],g[5]);_=u[f-2]-E.x,S=u[f-1]-E.y}else _=u[f-2]-u[f-4],S=u[f-1]-u[f-3];const w=(Math.atan2(S,_)+c)%c,b=this.pointerWidth();this.pointerAtEnding()&&(s.save(),s.beginPath(),s.translate(u[f-2],u[f-1]),s.rotate(w),s.moveTo(0,0),s.lineTo(-y,b/2),s.lineTo(-y,-b/2),s.closePath(),s.restore(),this.__fillStroke(s)),this.pointerAtBeginning()&&(s.save(),s.beginPath(),s.translate(u[0],u[1]),p?(_=(d[0]+d[2])/2-u[0],S=(d[1]+d[3])/2-u[1]):(_=u[2]-u[0],S=u[3]-u[1]),s.rotate((Math.atan2(-S,-_)+c)%c),s.moveTo(0,0),s.lineTo(-y,b/2),s.lineTo(-y,-b/2),s.closePath(),s.restore(),this.__fillStroke(s))}__fillStroke(s){const c=this.dashEnabled();c&&(this.attrs.dashEnabled=!1,s.setLineDash([])),s.fillStrokeShape(this),c&&(this.attrs.dashEnabled=!0)}getSelfRect(){const s=super.getSelfRect(),c=this.pointerWidth()/2;return{x:s.x,y:s.y-c,width:s.width,height:s.height+c*2}}}return ad.Arrow=i,i.prototype.className="Arrow",(0,n._registerNode)(i),e.Factory.addGetterSetter(i,"pointerLength",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerWidth",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerAtBeginning",!1),e.Factory.addGetterSetter(i,"pointerAtEnding",!0),ad}var ld={},s5;function DS(){if(s5)return ld;s5=1,Object.defineProperty(ld,"__esModule",{value:!0}),ld.Circle=void 0;const e=qr(),r=Ra(),t=Hr(),n=Nr();class a extends r.Shape{_sceneFunc(o){o.beginPath(),o.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(o){this.radius()!==o/2&&this.radius(o/2)}setHeight(o){this.radius()!==o/2&&this.radius(o/2)}}return ld.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),ld}var ud={},l5;function BS(){if(l5)return ud;l5=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.Ellipse=void 0;const e=qr(),r=Ra(),t=Hr(),n=Nr();class a extends r.Shape{_sceneFunc(o){const s=this.radiusX(),c=this.radiusY();o.beginPath(),o.save(),s!==c&&o.scale(1,c/s),o.arc(0,0,s,0,Math.PI*2,!1),o.restore(),o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(o){this.radiusX(o/2)}setHeight(o){this.radiusY(o/2)}}return ud.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,n._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,t.getNumberValidator)()),ud}var cd={},u5;function qS(){if(u5)return cd;u5=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.Image=void 0;const e=Ai(),r=qr(),t=Ra(),n=Nr(),a=Hr();class i extends t.Shape{constructor(s){super(s),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",c=>{this._removeImageLoad(c.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const s=this.image();s&&s.complete||s&&s.readyState===4||s&&s.addEventListener&&s.addEventListener("load",this._loadListener)}_removeImageLoad(s){s&&s.removeEventListener&&s.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const s=!!this.cornerRadius(),c=this.hasShadow();return s&&c?!0:super._useBufferCanvas(!0)}_sceneFunc(s){const c=this.getWidth(),u=this.getHeight(),d=this.cornerRadius(),p=this.attrs.image;let y;if(p){const f=this.attrs.cropWidth,_=this.attrs.cropHeight;f&&_?y=[p,this.cropX(),this.cropY(),f,_,0,0,c,u]:y=[p,0,0,c,u]}(this.hasFill()||this.hasStroke()||d)&&(s.beginPath(),d?e.Util.drawRoundedRectPath(s,c,u,d):s.rect(0,0,c,u),s.closePath(),s.fillStrokeShape(this)),p&&(d&&s.clip(),s.drawImage.apply(s,y))}_hitFunc(s){const c=this.width(),u=this.height(),d=this.cornerRadius();s.beginPath(),d?e.Util.drawRoundedRectPath(s,c,u,d):s.rect(0,0,c,u),s.closePath(),s.fillStrokeShape(this)}getWidth(){var s,c;return(s=this.attrs.width)!==null&&s!==void 0?s:(c=this.image())===null||c===void 0?void 0:c.width}getHeight(){var s,c;return(s=this.attrs.height)!==null&&s!==void 0?s:(c=this.image())===null||c===void 0?void 0:c.height}static fromURL(s,c,u=null){const d=e.Util.createImageElement();d.onload=function(){const p=new i({image:d});c(p)},d.onerror=u,d.crossOrigin="Anonymous",d.src=s}}return cd.Image=i,i.prototype.className="Image",(0,n._registerNode)(i),r.Factory.addGetterSetter(i,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),r.Factory.addGetterSetter(i,"image"),r.Factory.addComponentsGetterSetter(i,"crop",["x","y","width","height"]),r.Factory.addGetterSetter(i,"cropX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropY",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropWidth",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(i,"cropHeight",0,(0,a.getNumberValidator)()),cd}var bf={},c5;function zS(){if(c5)return bf;c5=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Tag=bf.Label=void 0;const e=qr(),r=Ra(),t=om(),n=Hr(),a=Nr(),i=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],o="Change.konva",s="none",c="up",u="right",d="down",p="left",y=i.length;class f extends t.Group{constructor(w){super(w),this.on("add.konva",function(b){this._addListeners(b.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(w){let b=this,g;const v=function(){b._sync()};for(g=0;g<y;g++)w.on(i[g]+o,v)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let w=this.getText(),b=this.getTag(),g,v,E,x,j,N,T;if(w&&b){switch(g=w.width(),v=w.height(),E=b.pointerDirection(),x=b.pointerWidth(),T=b.pointerHeight(),j=0,N=0,E){case c:j=g/2,N=-1*T;break;case u:j=g+x,N=v/2;break;case d:j=g/2,N=v+T;break;case p:j=-1*x,N=v/2;break}b.setAttrs({x:-1*j,y:-1*N,width:g,height:v}),w.setAttrs({x:-1*j,y:-1*N})}}}bf.Label=f,f.prototype.className="Label",(0,a._registerNode)(f);class _ extends r.Shape{_sceneFunc(w){const b=this.width(),g=this.height(),v=this.pointerDirection(),E=this.pointerWidth(),x=this.pointerHeight(),j=this.cornerRadius();let N=0,T=0,F=0,C=0;typeof j=="number"?N=T=F=C=Math.min(j,b/2,g/2):(N=Math.min(j[0]||0,b/2,g/2),T=Math.min(j[1]||0,b/2,g/2),C=Math.min(j[2]||0,b/2,g/2),F=Math.min(j[3]||0,b/2,g/2)),w.beginPath(),w.moveTo(N,0),v===c&&(w.lineTo((b-E)/2,0),w.lineTo(b/2,-1*x),w.lineTo((b+E)/2,0)),w.lineTo(b-T,0),w.arc(b-T,T,T,Math.PI*3/2,0,!1),v===u&&(w.lineTo(b,(g-x)/2),w.lineTo(b+E,g/2),w.lineTo(b,(g+x)/2)),w.lineTo(b,g-C),w.arc(b-C,g-C,C,0,Math.PI/2,!1),v===d&&(w.lineTo((b+E)/2,g),w.lineTo(b/2,g+x),w.lineTo((b-E)/2,g)),w.lineTo(F,g),w.arc(F,g-F,F,Math.PI/2,Math.PI,!1),v===p&&(w.lineTo(0,(g+x)/2),w.lineTo(-1*E,g/2),w.lineTo(0,(g-x)/2)),w.lineTo(0,N),w.arc(N,N,N,Math.PI,Math.PI*3/2,!1),w.closePath(),w.fillStrokeShape(this)}getSelfRect(){let w=0,b=0,g=this.pointerWidth(),v=this.pointerHeight(),E=this.pointerDirection(),x=this.width(),j=this.height();return E===c?(b-=v,j+=v):E===d?j+=v:E===p?(w-=g*1.5,x+=g):E===u&&(x+=g*1.5),{x:w,y:b,width:x,height:j}}}return bf.Tag=_,_.prototype.className="Tag",(0,a._registerNode)(_),e.Factory.addGetterSetter(_,"pointerDirection",s),e.Factory.addGetterSetter(_,"pointerWidth",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(_,"pointerHeight",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(_,"cornerRadius",0,(0,n.getNumberOrArrayOfNumbersValidator)(4)),bf}var fd={},f5;function S6(){if(f5)return fd;f5=1,Object.defineProperty(fd,"__esModule",{value:!0}),fd.Rect=void 0;const e=qr(),r=Ra(),t=Nr(),n=Ai(),a=Hr();class i extends r.Shape{_sceneFunc(s){const c=this.cornerRadius(),u=this.width(),d=this.height();s.beginPath(),c?n.Util.drawRoundedRectPath(s,u,d,c):s.rect(0,0,u,d),s.closePath(),s.fillStrokeShape(this)}}return fd.Rect=i,i.prototype.className="Rect",(0,t._registerNode)(i),e.Factory.addGetterSetter(i,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),fd}var hd={},h5;function US(){if(h5)return hd;h5=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.RegularPolygon=void 0;const e=qr(),r=Ra(),t=Hr(),n=Nr();class a extends r.Shape{_sceneFunc(o){const s=this._getPoints();o.beginPath(),o.moveTo(s[0].x,s[0].y);for(let c=1;c<s.length;c++)o.lineTo(s[c].x,s[c].y);o.closePath(),o.fillStrokeShape(this)}_getPoints(){const o=this.attrs.sides,s=this.attrs.radius||0,c=[];for(let u=0;u<o;u++)c.push({x:s*Math.sin(u*2*Math.PI/o),y:-1*s*Math.cos(u*2*Math.PI/o)});return c}getSelfRect(){const o=this._getPoints();let s=o[0].x,c=o[0].y,u=o[0].x,d=o[0].y;return o.forEach(p=>{s=Math.min(s,p.x),c=Math.max(c,p.x),u=Math.min(u,p.y),d=Math.max(d,p.y)}),{x:s,y:u,width:c-s,height:d-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(o){this.radius(o/2)}setHeight(o){this.radius(o/2)}}return hd.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"sides",0,(0,t.getNumberValidator)()),hd}var dd={},d5;function HS(){if(d5)return dd;d5=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.Ring=void 0;const e=qr(),r=Ra(),t=Hr(),n=Nr(),a=Math.PI*2;class i extends r.Shape{_sceneFunc(s){s.beginPath(),s.arc(0,0,this.innerRadius(),0,a,!1),s.moveTo(this.outerRadius(),0),s.arc(0,0,this.outerRadius(),a,0,!0),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(s){this.outerRadius(s/2)}setHeight(s){this.outerRadius(s/2)}}return dd.Ring=i,i.prototype.className="Ring",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,t.getNumberValidator)()),dd}var pd={},p5;function VS(){if(p5)return pd;p5=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.Sprite=void 0;const e=qr(),r=Ra(),t=sm(),n=Hr(),a=Nr();class i extends r.Shape{constructor(s){super(s),this._updated=!0,this.anim=new t.Animation(()=>{const c=this._updated;return this._updated=!1,c}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(s){const c=this.animation(),u=this.frameIndex(),d=u*4,p=this.animations()[c],y=this.frameOffsets(),f=p[d+0],_=p[d+1],S=p[d+2],w=p[d+3],b=this.image();if((this.hasFill()||this.hasStroke())&&(s.beginPath(),s.rect(0,0,S,w),s.closePath(),s.fillStrokeShape(this)),b)if(y){const g=y[c],v=u*2;s.drawImage(b,f,_,S,w,g[v+0],g[v+1],S,w)}else s.drawImage(b,f,_,S,w,0,0,S,w)}_hitFunc(s){const c=this.animation(),u=this.frameIndex(),d=u*4,p=this.animations()[c],y=this.frameOffsets(),f=p[d+2],_=p[d+3];if(s.beginPath(),y){const S=y[c],w=u*2;s.rect(S[w+0],S[w+1],f,_)}else s.rect(0,0,f,_);s.closePath(),s.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const s=this;this.interval=setInterval(function(){s._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const s=this.getLayer();this.anim.setLayers(s),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const s=this.frameIndex(),c=this.animation(),u=this.animations(),d=u[c],p=d.length/4;s<p-1?this.frameIndex(s+1):this.frameIndex(0)}}return pd.Sprite=i,i.prototype.className="Sprite",(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"animation"),e.Factory.addGetterSetter(i,"animations"),e.Factory.addGetterSetter(i,"frameOffsets"),e.Factory.addGetterSetter(i,"image"),e.Factory.addGetterSetter(i,"frameIndex",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"frameRate",17,(0,n.getNumberValidator)()),e.Factory.backCompat(i,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),pd}var gd={},g5;function GS(){if(g5)return gd;g5=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.Star=void 0;const e=qr(),r=Ra(),t=Hr(),n=Nr();class a extends r.Shape{_sceneFunc(o){const s=this.innerRadius(),c=this.outerRadius(),u=this.numPoints();o.beginPath(),o.moveTo(0,0-c);for(let d=1;d<u*2;d++){const p=d%2===0?c:s,y=p*Math.sin(d*Math.PI/u),f=-1*p*Math.cos(d*Math.PI/u);o.lineTo(y,f)}o.closePath(),o.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(o){this.outerRadius(o/2)}setHeight(o){this.outerRadius(o/2)}}return gd.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"numPoints",5,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"outerRadius",0,(0,t.getNumberValidator)()),gd}var rh={},v5;function x6(){if(v5)return rh;v5=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.Text=void 0,rh.stringToArray=o;const e=Ai(),r=qr(),t=Ra(),n=Nr(),a=Hr(),i=Nr();function o(q){return[...q].reduce((D,$,ne,Z)=>{if(new RegExp("\\p{Emoji}","u").test($)){const Q=Z[ne+1];Q&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(Q)?(D.push($+Q),Z[ne+1]=""):D.push($)}else new RegExp("\\p{Regional_Indicator}{2}","u").test($+(Z[ne+1]||""))?D.push($+Z[ne+1]):ne>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test($)?D[D.length-1]+=$:$&&D.push($);return D},[])}const s="auto",c="center",u="inherit",d="justify",p="Change.konva",y="2d",f="-",_="left",S="text",w="Text",b="top",g="bottom",v="middle",E="normal",x="px ",j=" ",N="right",T="rtl",F="word",C="char",A="none",L="…",O=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],I=O.length;function M(q){return q.split(",").map(D=>{D=D.trim();const $=D.indexOf(" ")>=0,ne=D.indexOf('"')>=0||D.indexOf("'")>=0;return $&&!ne&&(D=`"${D}"`),D}).join(", ")}let G;function W(){return G||(G=e.Util.createCanvasElement().getContext(y),G)}function Y(q){q.fillText(this._partialText,this._partialTextX,this._partialTextY)}function te(q){q.setAttr("miterLimit",2),q.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function V(q){return q=q||{},!q.fillLinearGradientColorStops&&!q.fillRadialGradientColorStops&&!q.fillPatternImage&&(q.fill=q.fill||"black"),q}class H extends t.Shape{constructor(D){super(V(D)),this._partialTextX=0,this._partialTextY=0;for(let $=0;$<I;$++)this.on(O[$]+p,this._setTextData);this._setTextData()}_sceneFunc(D){const $=this.textArr,ne=$.length;if(!this.text())return;let Z=this.padding(),Q=this.fontSize(),oe=this.lineHeight()*Q,se=this.verticalAlign(),ue=this.direction(),ve=0,Pe=this.align(),ke=this.getWidth(),Ne=this.letterSpacing(),xe=this.fill(),ye=this.textDecoration(),Ie=ye.indexOf("underline")!==-1,me=ye.indexOf("line-through")!==-1,_e;ue=ue===u?D.direction:ue;let Ae=oe/2,Le=v;if(n.Konva._fixTextRendering){const yt=this.measureSize("M");Le="alphabetic",Ae=(yt.fontBoundingBoxAscent-yt.fontBoundingBoxDescent)/2+oe/2}var ge=0,Te=0;for(ue===T&&D.setAttr("direction",ue),D.setAttr("font",this._getContextFont()),D.setAttr("textBaseline",Le),D.setAttr("textAlign",_),se===v?ve=(this.getHeight()-ne*oe-Z*2)/2:se===g&&(ve=this.getHeight()-ne*oe-Z*2),D.translate(Z,ve+Z),_e=0;_e<ne;_e++){var ge=0,Te=0,Fe=$[_e],Ke=Fe.text,it=Fe.width,rt=Fe.lastInParagraph,at,bt;if(D.save(),Pe===N?ge+=ke-it-Z*2:Pe===c&&(ge+=(ke-it-Z*2)/2),Ie){D.save(),D.beginPath();const zt=n.Konva._fixTextRendering?Math.round(Q/4):Math.round(Q/2),Ot=ge,Ut=Ae+Te+zt;D.moveTo(Ot,Ut),at=Ke.split(" ").length-1,bt=Pe===d&&!rt?ke-Z*2:it,D.lineTo(Ot+Math.round(bt),Ut),D.lineWidth=Q/15;const $t=this._getLinearGradient();D.strokeStyle=$t||xe,D.stroke(),D.restore()}if(me){D.save(),D.beginPath();const zt=n.Konva._fixTextRendering?-Math.round(Q/4):0;D.moveTo(ge,Ae+Te+zt),at=Ke.split(" ").length-1,bt=Pe===d&&!rt?ke-Z*2:it,D.lineTo(ge+Math.round(bt),Ae+Te+zt),D.lineWidth=Q/15;const Ot=this._getLinearGradient();D.strokeStyle=Ot||xe,D.stroke(),D.restore()}if(ue!==T&&(Ne!==0||Pe===d)){at=Ke.split(" ").length-1;const zt=o(Ke);for(let Ot=0;Ot<zt.length;Ot++){const Ut=zt[Ot];Ut===" "&&!rt&&Pe===d&&(ge+=(ke-Z*2-it)/at),this._partialTextX=ge,this._partialTextY=Ae+Te,this._partialText=Ut,D.fillStrokeShape(this),ge+=this.measureSize(Ut).width+Ne}}else Ne!==0&&D.setAttr("letterSpacing",`${Ne}px`),this._partialTextX=ge,this._partialTextY=Ae+Te,this._partialText=Ke,D.fillStrokeShape(this);D.restore(),ne>1&&(Ae+=oe)}}_hitFunc(D){const $=this.getWidth(),ne=this.getHeight();D.beginPath(),D.rect(0,0,$,ne),D.closePath(),D.fillStrokeShape(this)}setText(D){const $=e.Util._isString(D)?D:D==null?"":D+"";return this._setAttr(S,$),this}getWidth(){return this.attrs.width===s||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===s||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(D){var $,ne,Z,Q,oe,se,ue,ve,Pe,ke,Ne;let xe=W(),ye=this.fontSize(),Ie;xe.save(),xe.font=this._getContextFont(),Ie=xe.measureText(D),xe.restore();const me=ye/100;return{actualBoundingBoxAscent:($=Ie.actualBoundingBoxAscent)!==null&&$!==void 0?$:71.58203125*me,actualBoundingBoxDescent:(ne=Ie.actualBoundingBoxDescent)!==null&&ne!==void 0?ne:0,actualBoundingBoxLeft:(Z=Ie.actualBoundingBoxLeft)!==null&&Z!==void 0?Z:-7.421875*me,actualBoundingBoxRight:(Q=Ie.actualBoundingBoxRight)!==null&&Q!==void 0?Q:75.732421875*me,alphabeticBaseline:(oe=Ie.alphabeticBaseline)!==null&&oe!==void 0?oe:0,emHeightAscent:(se=Ie.emHeightAscent)!==null&&se!==void 0?se:100*me,emHeightDescent:(ue=Ie.emHeightDescent)!==null&&ue!==void 0?ue:-20*me,fontBoundingBoxAscent:(ve=Ie.fontBoundingBoxAscent)!==null&&ve!==void 0?ve:91*me,fontBoundingBoxDescent:(Pe=Ie.fontBoundingBoxDescent)!==null&&Pe!==void 0?Pe:21*me,hangingBaseline:(ke=Ie.hangingBaseline)!==null&&ke!==void 0?ke:72.80000305175781*me,ideographicBaseline:(Ne=Ie.ideographicBaseline)!==null&&Ne!==void 0?Ne:-21*me,width:Ie.width,height:ye}}_getContextFont(){return this.fontStyle()+j+this.fontVariant()+j+(this.fontSize()+x)+M(this.fontFamily())}_addTextLine(D){this.align()===d&&(D=D.trim());const ne=this._getTextWidth(D);return this.textArr.push({text:D,width:ne,lastInParagraph:!1})}_getTextWidth(D){const $=this.letterSpacing(),ne=D.length;return W().measureText(D).width+$*ne}_setTextData(){let D=this.text().split(`
|
|
43
|
-
`),$=+this.fontSize(),ne=0,Z=this.lineHeight()*$,Q=this.attrs.width,oe=this.attrs.height,se=Q!==s&&Q!==void 0,ue=oe!==s&&oe!==void 0,ve=this.padding(),Pe=Q-ve*2,ke=oe-ve*2,Ne=0,xe=this.wrap(),ye=xe!==A,Ie=xe!==C&&ye,me=this.ellipsis();this.textArr=[],W().font=this._getContextFont();const _e=me?this._getTextWidth(L):0;for(let Ae=0,Le=D.length;Ae<Le;++Ae){let ge=D[Ae],Te=this._getTextWidth(ge);if(se&&Te>Pe)for(;ge.length>0;){let Fe=0,Ke=o(ge).length,it="",rt=0;for(;Fe<Ke;){const at=Fe+Ke>>>1,bt=o(ge),yt=bt.slice(0,at+1).join(""),ht=this._getTextWidth(yt);(me&&ue&&Ne+Z>ke?ht+_e:ht)<=Pe?(Fe=at+1,it=yt,rt=ht):Ke=at}if(it){if(Ie){const yt=o(ge),ht=o(it),zt=yt[ht.length],Ot=zt===j||zt===f;let Ut;if(Ot&&rt<=Pe)Ut=ht.length;else{const $t=ht.lastIndexOf(j),Oe=ht.lastIndexOf(f);Ut=Math.max($t,Oe)+1}Ut>0&&(Fe=Ut,it=yt.slice(0,Fe).join(""),rt=this._getTextWidth(it))}if(it=it.trimRight(),this._addTextLine(it),ne=Math.max(ne,rt),Ne+=Z,this._shouldHandleEllipsis(Ne)){this._tryToAddEllipsisToLastLine();break}if(ge=o(ge).slice(Fe).join("").trimLeft(),ge.length>0&&(Te=this._getTextWidth(ge),Te<=Pe)){this._addTextLine(ge),Ne+=Z,ne=Math.max(ne,Te);break}}else break}else this._addTextLine(ge),Ne+=Z,ne=Math.max(ne,Te),this._shouldHandleEllipsis(Ne)&&Ae<Le-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),ue&&Ne+Z>ke)break}this.textHeight=$,this.textWidth=ne}_shouldHandleEllipsis(D){const $=+this.fontSize(),ne=this.lineHeight()*$,Z=this.attrs.height,Q=Z!==s&&Z!==void 0,oe=this.padding(),se=Z-oe*2;return!(this.wrap()!==A)||Q&&D+ne>se}_tryToAddEllipsisToLastLine(){const D=this.attrs.width,$=D!==s&&D!==void 0,ne=this.padding(),Z=D-ne*2,Q=this.ellipsis(),oe=this.textArr[this.textArr.length-1];!oe||!Q||($&&(this._getTextWidth(oe.text+L)<Z||(oe.text=oe.text.slice(0,oe.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(oe.text+L))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const D=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,$=this.hasShadow();return D&&$?!0:super._useBufferCanvas()}}return rh.Text=H,H.prototype._fillFunc=Y,H.prototype._strokeFunc=te,H.prototype.className=w,H.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,i._registerNode)(H),r.Factory.overWriteSetter(H,"width",(0,a.getNumberOrAutoValidator)()),r.Factory.overWriteSetter(H,"height",(0,a.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(H,"direction",u),r.Factory.addGetterSetter(H,"fontFamily","Arial"),r.Factory.addGetterSetter(H,"fontSize",12,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(H,"fontStyle",E),r.Factory.addGetterSetter(H,"fontVariant",E),r.Factory.addGetterSetter(H,"padding",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(H,"align",_),r.Factory.addGetterSetter(H,"verticalAlign",b),r.Factory.addGetterSetter(H,"lineHeight",1,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(H,"wrap",F),r.Factory.addGetterSetter(H,"ellipsis",!1,(0,a.getBooleanValidator)()),r.Factory.addGetterSetter(H,"letterSpacing",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(H,"text","",(0,a.getStringValidator)()),r.Factory.addGetterSetter(H,"textDecoration",""),rh}var vd={},m5;function WS(){if(m5)return vd;m5=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.TextPath=void 0;const e=Ai(),r=qr(),t=Ra(),n=lm(),a=x6(),i=Hr(),o=Nr(),s="",c="normal";function u(y){y.fillText(this.partialText,0,0)}function d(y){y.strokeText(this.partialText,0,0)}class p extends t.Shape{constructor(f){super(f),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return n.Path.getPathLength(this.dataArray)}_getPointAtLength(f){if(!this.attrs.data)return null;const _=this.pathLength;return f-1>_?null:n.Path.getPointAtLengthOfDataArray(f,this.dataArray)}_readDataAttribute(){this.dataArray=n.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(f){f.setAttr("font",this._getContextFont()),f.setAttr("textBaseline",this.textBaseline()),f.setAttr("textAlign","left"),f.save();const _=this.textDecoration(),S=this.fill(),w=this.fontSize(),b=this.glyphInfo;_==="underline"&&f.beginPath();for(let g=0;g<b.length;g++){f.save();const v=b[g].p0;f.translate(v.x,v.y),f.rotate(b[g].rotation),this.partialText=b[g].text,f.fillStrokeShape(this),_==="underline"&&(g===0&&f.moveTo(0,w/2+1),f.lineTo(w,w/2+1)),f.restore()}_==="underline"&&(f.strokeStyle=S,f.lineWidth=w/20,f.stroke()),f.restore()}_hitFunc(f){f.beginPath();const _=this.glyphInfo;if(_.length>=1){const S=_[0].p0;f.moveTo(S.x,S.y)}for(let S=0;S<_.length;S++){const w=_[S].p1;f.lineTo(w.x,w.y)}f.setAttr("lineWidth",this.fontSize()),f.setAttr("strokeStyle",this.colorKey),f.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(f){return a.Text.prototype.setText.call(this,f)}_getContextFont(){return a.Text.prototype._getContextFont.call(this)}_getTextSize(f){const S=this.dummyCanvas.getContext("2d");S.save(),S.font=this._getContextFont();const w=S.measureText(f);return S.restore(),{width:w.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:f,height:_}=this._getTextSize(this.attrs.text);if(this.textWidth=f,this.textHeight=_,this.glyphInfo=[],!this.attrs.data)return null;const S=this.letterSpacing(),w=this.align(),b=this.kerningFunc(),g=Math.max(this.textWidth+((this.attrs.text||"").length-1)*S,0);let v=0;w==="center"&&(v=Math.max(0,this.pathLength/2-g/2)),w==="right"&&(v=Math.max(0,this.pathLength-g));const E=(0,a.stringToArray)(this.text());let x=v;for(let j=0;j<E.length;j++){const N=this._getPointAtLength(x);if(!N)return;let T=this._getTextSize(E[j]).width+S;if(E[j]===" "&&w==="justify"){const I=this.text().split(" ").length-1;T+=(this.pathLength-g)/I}const F=this._getPointAtLength(x+T);if(!F)return;const C=n.Path.getLineLength(N.x,N.y,F.x,F.y);let A=0;if(b)try{A=b(E[j-1],E[j])*this.fontSize()}catch{A=0}N.x+=A,F.x+=A,this.textWidth+=A;const L=n.Path.getPointOnLine(A+C/2,N.x,N.y,F.x,F.y),O=Math.atan2(F.y-N.y,F.x-N.x);this.glyphInfo.push({transposeX:L.x,transposeY:L.y,text:E[j],rotation:O,p0:N,p1:F}),x+=T}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const f=[];this.glyphInfo.forEach(function(x){f.push(x.p0.x),f.push(x.p0.y),f.push(x.p1.x),f.push(x.p1.y)});let _=f[0]||0,S=f[0]||0,w=f[1]||0,b=f[1]||0,g,v;for(let x=0;x<f.length/2;x++)g=f[x*2],v=f[x*2+1],_=Math.min(_,g),S=Math.max(S,g),w=Math.min(w,v),b=Math.max(b,v);const E=this.fontSize();return{x:_-E/2,y:w-E/2,width:S-_+E,height:b-w+E}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return vd.TextPath=p,p.prototype._fillFunc=u,p.prototype._strokeFunc=d,p.prototype._fillFuncHit=u,p.prototype._strokeFuncHit=d,p.prototype.className="TextPath",p.prototype._attrsAffectingSize=["text","fontSize","data"],(0,o._registerNode)(p),r.Factory.addGetterSetter(p,"data"),r.Factory.addGetterSetter(p,"fontFamily","Arial"),r.Factory.addGetterSetter(p,"fontSize",12,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(p,"fontStyle",c),r.Factory.addGetterSetter(p,"align","left"),r.Factory.addGetterSetter(p,"letterSpacing",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(p,"textBaseline","middle"),r.Factory.addGetterSetter(p,"fontVariant",c),r.Factory.addGetterSetter(p,"text",s),r.Factory.addGetterSetter(p,"textDecoration",""),r.Factory.addGetterSetter(p,"kerningFunc",void 0),vd}var md={},y5;function $S(){if(y5)return md;y5=1,Object.defineProperty(md,"__esModule",{value:!0}),md.Transformer=void 0;const e=Ai(),r=qr(),t=Zi(),n=Ra(),a=S6(),i=om(),o=Nr(),s=Hr(),c=Nr(),u="tr-konva",d=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(T=>T+`.${u}`).join(" "),p="nodesRect",y=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],f={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},_="ontouchstart"in o.Konva._global;function S(T,F,C){if(T==="rotater")return C;F+=e.Util.degToRad(f[T]||0);const A=(e.Util.radToDeg(F)%360+360)%360;return e.Util._inRange(A,315+22.5,360)||e.Util._inRange(A,0,22.5)?"ns-resize":e.Util._inRange(A,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(A,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(A,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(A,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(A,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(A,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(A,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+A),"pointer")}const w=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function b(T){return{x:T.x+T.width/2*Math.cos(T.rotation)+T.height/2*Math.sin(-T.rotation),y:T.y+T.height/2*Math.cos(T.rotation)+T.width/2*Math.sin(T.rotation)}}function g(T,F,C){const A=C.x+(T.x-C.x)*Math.cos(F)-(T.y-C.y)*Math.sin(F),L=C.y+(T.x-C.x)*Math.sin(F)+(T.y-C.y)*Math.cos(F);return{...T,rotation:T.rotation+F,x:A,y:L}}function v(T,F){const C=b(T);return g(T,F,C)}function E(T,F,C){let A=F;for(let L=0;L<T.length;L++){const O=o.Konva.getAngle(T[L]),I=Math.abs(O-F)%(Math.PI*2);Math.min(I,Math.PI*2-I)<C&&(A=O)}return A}let x=0;class j extends i.Group{constructor(F){super(F),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(d,this.update),this.getNode()&&this.update()}attachTo(F){return this.setNode(F),this}setNode(F){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([F])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return u+this._id}setNodes(F=[]){this._nodes&&this._nodes.length&&this.detach();const C=F.filter(L=>L.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=F=C,F.length===1&&this.useSingleNodeRotation()?this.rotation(F[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(L=>{const O=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(L._attrsAffectingSize.length){const I=L._attrsAffectingSize.map(M=>M+"Change."+this._getEventNamespace()).join(" ");L.on(I,O)}L.on(y.map(I=>I+`.${this._getEventNamespace()}`).join(" "),O),L.on(`absoluteTransformChange.${this._getEventNamespace()}`,O),this._proxyDrag(L)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(F){let C;F.on(`dragstart.${this._getEventNamespace()}`,A=>{C=F.getAbsolutePosition(),!this.isDragging()&&F!==this.findOne(".back")&&this.startDrag(A,!1)}),F.on(`dragmove.${this._getEventNamespace()}`,A=>{if(!C)return;const L=F.getAbsolutePosition(),O=L.x-C.x,I=L.y-C.y;this.nodes().forEach(M=>{if(M===F||M.isDragging())return;const G=M.getAbsolutePosition();M.setAbsolutePosition({x:G.x+O,y:G.y+I}),M.startDrag(A)}),C=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(F=>{F.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(p),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(p,this.__getNodeRect)}__getNodeShape(F,C=this.rotation(),A){const L=F.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),O=F.getAbsoluteScale(A),I=F.getAbsolutePosition(A),M=L.x*O.x-F.offsetX()*O.x,G=L.y*O.y-F.offsetY()*O.y,W=(o.Konva.getAngle(F.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),Y={x:I.x+M*Math.cos(W)+G*Math.sin(-W),y:I.y+G*Math.cos(W)+M*Math.sin(W),width:L.width*O.x,height:L.height*O.y,rotation:W};return g(Y,-o.Konva.getAngle(C),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const C=[];this.nodes().map(W=>{const Y=W.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),te=[{x:Y.x,y:Y.y},{x:Y.x+Y.width,y:Y.y},{x:Y.x+Y.width,y:Y.y+Y.height},{x:Y.x,y:Y.y+Y.height}],V=W.getAbsoluteTransform();te.forEach(function(H){const q=V.point(H);C.push(q)})});const A=new e.Transform;A.rotate(-o.Konva.getAngle(this.rotation()));let L=1/0,O=1/0,I=-1/0,M=-1/0;C.forEach(function(W){const Y=A.point(W);L===void 0&&(L=I=Y.x,O=M=Y.y),L=Math.min(L,Y.x),O=Math.min(O,Y.y),I=Math.max(I,Y.x),M=Math.max(M,Y.y)}),A.invert();const G=A.point({x:L,y:O});return{x:G.x,y:G.y,width:I-L,height:M-O,rotation:o.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),w.forEach(F=>{this._createAnchor(F)}),this._createAnchor("rotater")}_createAnchor(F){const C=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:F+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:_?10:"auto"}),A=this;C.on("mousedown touchstart",function(L){A._handleMouseDown(L)}),C.on("dragstart",L=>{C.stopDrag(),L.cancelBubble=!0}),C.on("dragend",L=>{L.cancelBubble=!0}),C.on("mouseenter",()=>{const L=o.Konva.getAngle(this.rotation()),O=this.rotateAnchorCursor(),I=S(F,L,O);C.getStage().content&&(C.getStage().content.style.cursor=I),this._cursorChange=!0}),C.on("mouseout",()=>{C.getStage().content&&(C.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(C)}_createBack(){const F=new n.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(C,A){const L=A.getParent(),O=L.padding();C.beginPath(),C.rect(-O,-O,A.width()+O*2,A.height()+O*2),C.moveTo(A.width()/2,-O),L.rotateEnabled()&&L.rotateLineVisible()&&C.lineTo(A.width()/2,-L.rotateAnchorOffset()*e.Util._sign(A.height())-O),C.fillStrokeShape(A)},hitFunc:(C,A)=>{if(!this.shouldOverdrawWholeArea())return;const L=this.padding();C.beginPath(),C.rect(-L,-L,A.width()+L*2,A.height()+L*2),C.fillStrokeShape(A)}});this.add(F),this._proxyDrag(F),F.on("dragstart",C=>{C.cancelBubble=!0}),F.on("dragmove",C=>{C.cancelBubble=!0}),F.on("dragend",C=>{C.cancelBubble=!0}),this.on("dragmove",C=>{this.update()})}_handleMouseDown(F){if(this._transforming)return;this._movingAnchorName=F.target.name().split(" ")[0];const C=this._getNodeRect(),A=C.width,L=C.height,O=Math.sqrt(Math.pow(A,2)+Math.pow(L,2));this.sin=Math.abs(L/O),this.cos=Math.abs(A/O),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const I=F.target.getAbsolutePosition(),M=F.target.getStage().getPointerPosition();this._anchorDragOffset={x:M.x-I.x,y:M.y-I.y},x++,this._fire("transformstart",{evt:F.evt,target:this.getNode()}),this._nodes.forEach(G=>{G._fire("transformstart",{evt:F.evt,target:G})})}_handleMouseMove(F){let C,A,L;const O=this.findOne("."+this._movingAnchorName),I=O.getStage();I.setPointersPositions(F);const M=I.getPointerPosition();let G={x:M.x-this._anchorDragOffset.x,y:M.y-this._anchorDragOffset.y};const W=O.getAbsolutePosition();this.anchorDragBoundFunc()&&(G=this.anchorDragBoundFunc()(W,G,F)),O.setAbsolutePosition(G);const Y=O.getAbsolutePosition();if(W.x===Y.x&&W.y===Y.y)return;if(this._movingAnchorName==="rotater"){const se=this._getNodeRect();C=O.x()-se.width/2,A=-O.y()+se.height/2;let ue=Math.atan2(-A,C)+Math.PI/2;se.height<0&&(ue-=Math.PI);const Pe=o.Konva.getAngle(this.rotation())+ue,ke=o.Konva.getAngle(this.rotationSnapTolerance()),xe=E(this.rotationSnaps(),Pe,ke)-se.rotation,ye=v(se,xe);this._fitNodesInto(ye,F);return}const te=this.shiftBehavior();let V;te==="inverted"?V=this.keepRatio()&&!F.shiftKey:te==="none"?V=this.keepRatio():V=this.keepRatio()||F.shiftKey;var ne=this.centeredScaling()||F.altKey;if(this._movingAnchorName==="top-left"){if(V){var H=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};L=Math.sqrt(Math.pow(H.x-O.x(),2)+Math.pow(H.y-O.y(),2));var q=this.findOne(".top-left").x()>H.x?-1:1,D=this.findOne(".top-left").y()>H.y?-1:1;C=L*this.cos*q,A=L*this.sin*D,this.findOne(".top-left").x(H.x-C),this.findOne(".top-left").y(H.y-A)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(O.y());else if(this._movingAnchorName==="top-right"){if(V){var H=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};L=Math.sqrt(Math.pow(O.x()-H.x,2)+Math.pow(H.y-O.y(),2));var q=this.findOne(".top-right").x()<H.x?-1:1,D=this.findOne(".top-right").y()>H.y?-1:1;C=L*this.cos*q,A=L*this.sin*D,this.findOne(".top-right").x(H.x+C),this.findOne(".top-right").y(H.y-A)}var $=O.position();this.findOne(".top-left").y($.y),this.findOne(".bottom-right").x($.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(O.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(O.x());else if(this._movingAnchorName==="bottom-left"){if(V){var H=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};L=Math.sqrt(Math.pow(H.x-O.x(),2)+Math.pow(O.y()-H.y,2));var q=H.x<O.x()?-1:1,D=O.y()<H.y?-1:1;C=L*this.cos*q,A=L*this.sin*D,O.x(H.x-C),O.y(H.y+A)}$=O.position(),this.findOne(".top-left").x($.x),this.findOne(".bottom-right").y($.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(O.y());else if(this._movingAnchorName==="bottom-right"){if(V){var H=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};L=Math.sqrt(Math.pow(O.x()-H.x,2)+Math.pow(O.y()-H.y,2));var q=this.findOne(".bottom-right").x()<H.x?-1:1,D=this.findOne(".bottom-right").y()<H.y?-1:1;C=L*this.cos*q,A=L*this.sin*D,this.findOne(".bottom-right").x(H.x+C),this.findOne(".bottom-right").y(H.y+A)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var ne=this.centeredScaling()||F.altKey;if(ne){const se=this.findOne(".top-left"),ue=this.findOne(".bottom-right"),ve=se.x(),Pe=se.y(),ke=this.getWidth()-ue.x(),Ne=this.getHeight()-ue.y();ue.move({x:-ve,y:-Pe}),se.move({x:ke,y:Ne})}const Z=this.findOne(".top-left").getAbsolutePosition();C=Z.x,A=Z.y;const Q=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),oe=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:C,y:A,width:Q,height:oe,rotation:o.Konva.getAngle(this.rotation())},F)}_handleMouseUp(F){this._removeEvents(F)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(F){var C;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const A=this.getNode();x--,this._fire("transformend",{evt:F,target:A}),(C=this.getLayer())===null||C===void 0||C.batchDraw(),A&&this._nodes.forEach(L=>{var O;L._fire("transformend",{evt:F,target:L}),(O=L.getLayer())===null||O===void 0||O.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(F,C){const A=this._getNodeRect(),L=1;if(e.Util._inRange(F.width,-this.padding()*2-L,L)){this.update();return}if(e.Util._inRange(F.height,-this.padding()*2-L,L)){this.update();return}const O=new e.Transform;if(O.rotate(o.Konva.getAngle(this.rotation())),this._movingAnchorName&&F.width<0&&this._movingAnchorName.indexOf("left")>=0){const V=O.point({x:-this.padding()*2,y:0});F.x+=V.x,F.y+=V.y,F.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y}else if(this._movingAnchorName&&F.width<0&&this._movingAnchorName.indexOf("right")>=0){const V=O.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,F.width+=this.padding()*2}if(this._movingAnchorName&&F.height<0&&this._movingAnchorName.indexOf("top")>=0){const V=O.point({x:0,y:-this.padding()*2});F.x+=V.x,F.y+=V.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,F.height+=this.padding()*2}else if(this._movingAnchorName&&F.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const V=O.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=V.x,this._anchorDragOffset.y-=V.y,F.height+=this.padding()*2}if(this.boundBoxFunc()){const V=this.boundBoxFunc()(A,F);V?F=V:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const I=1e7,M=new e.Transform;M.translate(A.x,A.y),M.rotate(A.rotation),M.scale(A.width/I,A.height/I);const G=new e.Transform,W=F.width/I,Y=F.height/I;this.flipEnabled()===!1?(G.translate(F.x,F.y),G.rotate(F.rotation),G.translate(F.width<0?F.width:0,F.height<0?F.height:0),G.scale(Math.abs(W),Math.abs(Y))):(G.translate(F.x,F.y),G.rotate(F.rotation),G.scale(W,Y));const te=G.multiply(M.invert());this._nodes.forEach(V=>{var H;const q=V.getParent().getAbsoluteTransform(),D=V.getTransform().copy();D.translate(V.offsetX(),V.offsetY());const $=new e.Transform;$.multiply(q.copy().invert()).multiply(te).multiply(q).multiply(D);const ne=$.decompose();V.setAttrs(ne),(H=V.getLayer())===null||H===void 0||H.batchDraw()}),this.rotation(e.Util._getRotation(F.rotation)),this._nodes.forEach(V=>{this._fire("transform",{evt:C,target:V}),V._fire("transform",{evt:C,target:V})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(F,C){this.findOne(F).setAttrs(C)}update(){var F;const C=this._getNodeRect();this.rotation(e.Util._getRotation(C.rotation));const A=C.width,L=C.height,O=this.enabledAnchors(),I=this.resizeEnabled(),M=this.padding(),G=this.anchorSize(),W=this.find("._anchor");W.forEach(te=>{te.setAttrs({width:G,height:G,offsetX:G/2,offsetY:G/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:G/2+M,offsetY:G/2+M,visible:I&&O.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:A/2,y:0,offsetY:G/2+M,visible:I&&O.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:A,y:0,offsetX:G/2-M,offsetY:G/2+M,visible:I&&O.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:L/2,offsetX:G/2+M,visible:I&&O.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:A,y:L/2,offsetX:G/2-M,visible:I&&O.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:L,offsetX:G/2+M,offsetY:G/2-M,visible:I&&O.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:A/2,y:L,offsetY:G/2-M,visible:I&&O.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:A,y:L,offsetX:G/2-M,offsetY:G/2-M,visible:I&&O.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:A/2,y:-this.rotateAnchorOffset()*e.Util._sign(L)-M,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:A,height:L,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const Y=this.anchorStyleFunc();Y&&W.forEach(te=>{Y(te)}),(F=this.getLayer())===null||F===void 0||F.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const F=this.findOne("."+this._movingAnchorName);F&&F.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),i.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return t.Node.prototype.toObject.call(this)}clone(F){return t.Node.prototype.clone.call(this,F)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}md.Transformer=j,j.isTransforming=()=>x>0;function N(T){return T instanceof Array||e.Util.warn("enabledAnchors value should be an array"),T instanceof Array&&T.forEach(function(F){w.indexOf(F)===-1&&e.Util.warn("Unknown anchor name: "+F+". Available names are: "+w.join(", "))}),T||[]}return j.prototype.className="Transformer",(0,c._registerNode)(j),r.Factory.addGetterSetter(j,"enabledAnchors",w,N),r.Factory.addGetterSetter(j,"flipEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter(j,"resizeEnabled",!0),r.Factory.addGetterSetter(j,"anchorSize",10,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"rotateEnabled",!0),r.Factory.addGetterSetter(j,"rotateLineVisible",!0),r.Factory.addGetterSetter(j,"rotationSnaps",[]),r.Factory.addGetterSetter(j,"rotateAnchorOffset",50,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"rotateAnchorCursor","crosshair"),r.Factory.addGetterSetter(j,"rotationSnapTolerance",5,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"borderEnabled",!0),r.Factory.addGetterSetter(j,"anchorStroke","rgb(0, 161, 255)"),r.Factory.addGetterSetter(j,"anchorStrokeWidth",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"anchorFill","white"),r.Factory.addGetterSetter(j,"anchorCornerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"borderStroke","rgb(0, 161, 255)"),r.Factory.addGetterSetter(j,"borderStrokeWidth",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"borderDash"),r.Factory.addGetterSetter(j,"keepRatio",!0),r.Factory.addGetterSetter(j,"shiftBehavior","default"),r.Factory.addGetterSetter(j,"centeredScaling",!1),r.Factory.addGetterSetter(j,"ignoreStroke",!1),r.Factory.addGetterSetter(j,"padding",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(j,"nodes"),r.Factory.addGetterSetter(j,"node"),r.Factory.addGetterSetter(j,"boundBoxFunc"),r.Factory.addGetterSetter(j,"anchorDragBoundFunc"),r.Factory.addGetterSetter(j,"anchorStyleFunc"),r.Factory.addGetterSetter(j,"shouldOverdrawWholeArea",!1),r.Factory.addGetterSetter(j,"useSingleNodeRotation",!0),r.Factory.backCompat(j,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),md}var yd={},b5;function YS(){if(b5)return yd;b5=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.Wedge=void 0;const e=qr(),r=Ra(),t=Nr(),n=Hr(),a=Nr();class i extends r.Shape{_sceneFunc(s){s.beginPath(),s.arc(0,0,this.radius(),0,t.Konva.getAngle(this.angle()),this.clockwise()),s.lineTo(0,0),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(s){this.radius(s/2)}setHeight(s){this.radius(s/2)}}return yd.Wedge=i,i.prototype.className="Wedge",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(i),e.Factory.addGetterSetter(i,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1),e.Factory.backCompat(i,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),yd}var bd={},w5;function XS(){if(w5)return bd;w5=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.Blur=void 0;const e=qr(),r=Zi(),t=Hr();function n(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],i=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function o(c,u){const d=c.data,p=c.width,y=c.height;let f,_,S,w,b,g,v,E,x,j,N,T,F,C,A,L,O,I,M,G,W,Y,te,V;const H=u+u+1,q=p-1,D=y-1,$=u+1,ne=$*($+1)/2,Z=new n,Q=a[u],oe=i[u];let se=null,ue=Z,ve=null,Pe=null;for(S=1;S<H;S++)ue=ue.next=new n,S===$&&(se=ue);for(ue.next=Z,v=g=0,_=0;_<y;_++){for(L=O=I=M=E=x=j=N=0,T=$*(G=d[g]),F=$*(W=d[g+1]),C=$*(Y=d[g+2]),A=$*(te=d[g+3]),E+=ne*G,x+=ne*W,j+=ne*Y,N+=ne*te,ue=Z,S=0;S<$;S++)ue.r=G,ue.g=W,ue.b=Y,ue.a=te,ue=ue.next;for(S=1;S<$;S++)w=g+((q<S?q:S)<<2),E+=(ue.r=G=d[w])*(V=$-S),x+=(ue.g=W=d[w+1])*V,j+=(ue.b=Y=d[w+2])*V,N+=(ue.a=te=d[w+3])*V,L+=G,O+=W,I+=Y,M+=te,ue=ue.next;for(ve=Z,Pe=se,f=0;f<p;f++)d[g+3]=te=N*Q>>oe,te!==0?(te=255/te,d[g]=(E*Q>>oe)*te,d[g+1]=(x*Q>>oe)*te,d[g+2]=(j*Q>>oe)*te):d[g]=d[g+1]=d[g+2]=0,E-=T,x-=F,j-=C,N-=A,T-=ve.r,F-=ve.g,C-=ve.b,A-=ve.a,w=v+((w=f+u+1)<q?w:q)<<2,L+=ve.r=d[w],O+=ve.g=d[w+1],I+=ve.b=d[w+2],M+=ve.a=d[w+3],E+=L,x+=O,j+=I,N+=M,ve=ve.next,T+=G=Pe.r,F+=W=Pe.g,C+=Y=Pe.b,A+=te=Pe.a,L-=G,O-=W,I-=Y,M-=te,Pe=Pe.next,g+=4;v+=p}for(f=0;f<p;f++){for(O=I=M=L=x=j=N=E=0,g=f<<2,T=$*(G=d[g]),F=$*(W=d[g+1]),C=$*(Y=d[g+2]),A=$*(te=d[g+3]),E+=ne*G,x+=ne*W,j+=ne*Y,N+=ne*te,ue=Z,S=0;S<$;S++)ue.r=G,ue.g=W,ue.b=Y,ue.a=te,ue=ue.next;for(b=p,S=1;S<=u;S++)g=b+f<<2,E+=(ue.r=G=d[g])*(V=$-S),x+=(ue.g=W=d[g+1])*V,j+=(ue.b=Y=d[g+2])*V,N+=(ue.a=te=d[g+3])*V,L+=G,O+=W,I+=Y,M+=te,ue=ue.next,S<D&&(b+=p);for(g=f,ve=Z,Pe=se,_=0;_<y;_++)w=g<<2,d[w+3]=te=N*Q>>oe,te>0?(te=255/te,d[w]=(E*Q>>oe)*te,d[w+1]=(x*Q>>oe)*te,d[w+2]=(j*Q>>oe)*te):d[w]=d[w+1]=d[w+2]=0,E-=T,x-=F,j-=C,N-=A,T-=ve.r,F-=ve.g,C-=ve.b,A-=ve.a,w=f+((w=_+$)<D?w:D)*p<<2,E+=L+=ve.r=d[w],x+=O+=ve.g=d[w+1],j+=I+=ve.b=d[w+2],N+=M+=ve.a=d[w+3],ve=ve.next,T+=G=Pe.r,F+=W=Pe.g,C+=Y=Pe.b,A+=te=Pe.a,L-=G,O-=W,I-=Y,M-=te,Pe=Pe.next,g+=p}}const s=function(u){const d=Math.round(this.blurRadius());d>0&&o(u,d)};return bd.Blur=s,e.Factory.addGetterSetter(r.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),bd}var wd={},_5;function KS(){if(_5)return wd;_5=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.Brighten=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=this.brightness()*255,o=a.data,s=o.length;for(let c=0;c<s;c+=4)o[c]+=i,o[c+1]+=i,o[c+2]+=i};return wd.Brighten=n,e.Factory.addGetterSetter(r.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),wd}var _d={},S5;function ZS(){if(S5)return _d;S5=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.Contrast=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=Math.pow((this.contrast()+100)/100,2),o=a.data,s=o.length;let c=150,u=150,d=150;for(let p=0;p<s;p+=4)c=o[p],u=o[p+1],d=o[p+2],c/=255,c-=.5,c*=i,c+=.5,c*=255,u/=255,u-=.5,u*=i,u+=.5,u*=255,d/=255,d-=.5,d*=i,d+=.5,d*=255,c=c<0?0:c>255?255:c,u=u<0?0:u>255?255:u,d=d<0?0:d>255?255:d,o[p]=c,o[p+1]=u,o[p+2]=d};return _d.Contrast=n,e.Factory.addGetterSetter(r.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),_d}var Sd={},x5;function QS(){if(x5)return Sd;x5=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.Emboss=void 0;const e=qr(),r=Zi(),t=Ai(),n=Hr(),a=function(i){const o=this.embossStrength()*10,s=this.embossWhiteLevel()*255,c=this.embossDirection(),u=this.embossBlend(),d=i.data,p=i.width,y=i.height,f=p*4;let _=0,S=0,w=y;switch(c){case"top-left":_=-1,S=-1;break;case"top":_=-1,S=0;break;case"top-right":_=-1,S=1;break;case"right":_=0,S=1;break;case"bottom-right":_=1,S=1;break;case"bottom":_=1,S=0;break;case"bottom-left":_=1,S=-1;break;case"left":_=0,S=-1;break;default:t.Util.error("Unknown emboss direction: "+c)}do{const b=(w-1)*f;let g=_;w+g<1&&(g=0),w+g>y&&(g=0);const v=(w-1+g)*p*4;let E=p;do{const x=b+(E-1)*4;let j=S;E+j<1&&(j=0),E+j>p&&(j=0);const N=v+(E-1+j)*4,T=d[x]-d[N],F=d[x+1]-d[N+1],C=d[x+2]-d[N+2];let A=T;const L=A>0?A:-A,O=F>0?F:-F,I=C>0?C:-C;if(O>L&&(A=F),I>L&&(A=C),A*=o,u){const M=d[x]+A,G=d[x+1]+A,W=d[x+2]+A;d[x]=M>255?255:M<0?0:M,d[x+1]=G>255?255:G<0?0:G,d[x+2]=W>255?255:W<0?0:W}else{let M=s-A;M<0?M=0:M>255&&(M=255),d[x]=d[x+1]=d[x+2]=M}}while(--E)}while(--w)};return Sd.Emboss=a,e.Factory.addGetterSetter(r.Node,"embossStrength",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossWhiteLevel",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossDirection","top-left",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter),Sd}var xd={},E5;function JS(){if(E5)return xd;E5=1,Object.defineProperty(xd,"__esModule",{value:!0}),xd.Enhance=void 0;const e=qr(),r=Zi(),t=Hr();function n(i,o,s,c,u){const d=s-o,p=u-c;if(d===0)return c+p/2;if(p===0)return c;let y=(i-o)/d;return y=p*y+c,y}const a=function(i){const o=i.data,s=o.length;let c=o[0],u=c,d,p=o[1],y=p,f,_=o[2],S=_,w;const b=this.enhance();if(b===0)return;for(let A=0;A<s;A+=4)d=o[A+0],d<c?c=d:d>u&&(u=d),f=o[A+1],f<p?p=f:f>y&&(y=f),w=o[A+2],w<_?_=w:w>S&&(S=w);u===c&&(u=255,c=0),y===p&&(y=255,p=0),S===_&&(S=255,_=0);let g,v,E,x,j,N,T,F,C;b>0?(v=u+b*(255-u),E=c-b*(c-0),j=y+b*(255-y),N=p-b*(p-0),F=S+b*(255-S),C=_-b*(_-0)):(g=(u+c)*.5,v=u+b*(u-g),E=c+b*(c-g),x=(y+p)*.5,j=y+b*(y-x),N=p+b*(p-x),T=(S+_)*.5,F=S+b*(S-T),C=_+b*(_-T));for(let A=0;A<s;A+=4)o[A+0]=n(o[A+0],c,u,E,v),o[A+1]=n(o[A+1],p,y,N,j),o[A+2]=n(o[A+2],_,S,C,F)};return xd.Enhance=a,e.Factory.addGetterSetter(r.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),xd}var Ed={},P5;function ex(){if(P5)return Ed;P5=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.Grayscale=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4){const i=.34*t[a]+.5*t[a+1]+.16*t[a+2];t[a]=i,t[a+1]=i,t[a+2]=i}};return Ed.Grayscale=e,Ed}var Pd={},O5;function tx(){if(O5)return Pd;O5=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.HSL=void 0;const e=qr(),r=Zi(),t=Hr();e.Factory.addGetterSetter(r.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"luminance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter);const n=function(a){const i=a.data,o=i.length,s=1,c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,d=this.luminance()*127,p=s*c*Math.cos(u*Math.PI/180),y=s*c*Math.sin(u*Math.PI/180),f=.299*s+.701*p+.167*y,_=.587*s-.587*p+.33*y,S=.114*s-.114*p-.497*y,w=.299*s-.299*p-.328*y,b=.587*s+.413*p+.035*y,g=.114*s-.114*p+.293*y,v=.299*s-.3*p+1.25*y,E=.587*s-.586*p-1.05*y,x=.114*s+.886*p-.2*y;let j,N,T,F;for(let C=0;C<o;C+=4)j=i[C+0],N=i[C+1],T=i[C+2],F=i[C+3],i[C+0]=f*j+_*N+S*T+d,i[C+1]=w*j+b*N+g*T+d,i[C+2]=v*j+E*N+x*T+d,i[C+3]=F};return Pd.HSL=n,Pd}var Od={},A5;function rx(){if(A5)return Od;A5=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.HSV=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=a.data,o=i.length,s=Math.pow(2,this.value()),c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,d=s*c*Math.cos(u*Math.PI/180),p=s*c*Math.sin(u*Math.PI/180),y=.299*s+.701*d+.167*p,f=.587*s-.587*d+.33*p,_=.114*s-.114*d-.497*p,S=.299*s-.299*d-.328*p,w=.587*s+.413*d+.035*p,b=.114*s-.114*d+.293*p,g=.299*s-.3*d+1.25*p,v=.587*s-.586*d-1.05*p,E=.114*s+.886*d-.2*p;let x,j,N,T;for(let F=0;F<o;F+=4)x=i[F+0],j=i[F+1],N=i[F+2],T=i[F+3],i[F+0]=y*x+f*j+_*N,i[F+1]=S*x+w*j+b*N,i[F+2]=g*x+v*j+E*N,i[F+3]=T};return Od.HSV=n,e.Factory.addGetterSetter(r.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"value",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Od}var Ad={},C5;function nx(){if(C5)return Ad;C5=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.Invert=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4)t[a]=255-t[a],t[a+1]=255-t[a+1],t[a+2]=255-t[a+2]};return Ad.Invert=e,Ad}var Cd={},k5;function ix(){if(k5)return Cd;k5=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.Kaleidoscope=void 0;const e=qr(),r=Zi(),t=Ai(),n=Hr(),a=function(s,c,u){const d=s.data,p=c.data,y=s.width,f=s.height,_=u.polarCenterX||y/2,S=u.polarCenterY||f/2;let w=Math.sqrt(_*_+S*S),b=y-_,g=f-S;const v=Math.sqrt(b*b+g*g);w=v>w?v:w;const E=f,x=y,j=360/x*Math.PI/180;for(let N=0;N<x;N+=1){const T=Math.sin(N*j),F=Math.cos(N*j);for(let C=0;C<E;C+=1){b=Math.floor(_+w*C/E*F),g=Math.floor(S+w*C/E*T);let A=(g*y+b)*4;const L=d[A+0],O=d[A+1],I=d[A+2],M=d[A+3];A=(N+C*y)*4,p[A+0]=L,p[A+1]=O,p[A+2]=I,p[A+3]=M}}},i=function(s,c,u){const d=s.data,p=c.data,y=s.width,f=s.height,_=u.polarCenterX||y/2,S=u.polarCenterY||f/2;let w=Math.sqrt(_*_+S*S),b=y-_,g=f-S;const v=Math.sqrt(b*b+g*g);w=v>w?v:w;const E=f,x=y,j=0;let N,T;for(b=0;b<y;b+=1)for(g=0;g<f;g+=1){const F=b-_,C=g-S,A=Math.sqrt(F*F+C*C)*E/w;let L=(Math.atan2(C,F)*180/Math.PI+360+j)%360;L=L*x/360,N=Math.floor(L),T=Math.floor(A);let O=(T*y+N)*4;const I=d[O+0],M=d[O+1],G=d[O+2],W=d[O+3];O=(g*y+b)*4,p[O+0]=I,p[O+1]=M,p[O+2]=G,p[O+3]=W}},o=function(s){const c=s.width,u=s.height;let d,p,y,f,_,S,w,b,g,v,E=Math.round(this.kaleidoscopePower());const x=Math.round(this.kaleidoscopeAngle()),j=Math.floor(c*(x%360)/360);if(E<1)return;const N=t.Util.createCanvasElement();N.width=c,N.height=u;const T=N.getContext("2d").getImageData(0,0,c,u);t.Util.releaseCanvas(N),a(s,T,{polarCenterX:c/2,polarCenterY:u/2});let F=c/Math.pow(2,E);for(;F<=8;)F=F*2,E-=1;F=Math.ceil(F);let C=F,A=0,L=C,O=1;for(j+F>c&&(A=C,L=0,O=-1),p=0;p<u;p+=1)for(d=A;d!==L;d+=O)y=Math.round(d+j)%c,g=(c*p+y)*4,_=T.data[g+0],S=T.data[g+1],w=T.data[g+2],b=T.data[g+3],v=(c*p+d)*4,T.data[v+0]=_,T.data[v+1]=S,T.data[v+2]=w,T.data[v+3]=b;for(p=0;p<u;p+=1)for(C=Math.floor(F),f=0;f<E;f+=1){for(d=0;d<C+1;d+=1)g=(c*p+d)*4,_=T.data[g+0],S=T.data[g+1],w=T.data[g+2],b=T.data[g+3],v=(c*p+C*2-d-1)*4,T.data[v+0]=_,T.data[v+1]=S,T.data[v+2]=w,T.data[v+3]=b;C*=2}i(T,s,{})};return Cd.Kaleidoscope=o,e.Factory.addGetterSetter(r.Node,"kaleidoscopePower",2,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"kaleidoscopeAngle",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Cd}var kd={},L5;function ax(){if(L5)return kd;L5=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.Mask=void 0;const e=qr(),r=Zi(),t=Hr();function n(y,f,_){let S=(_*y.width+f)*4;const w=[];return w.push(y.data[S++],y.data[S++],y.data[S++],y.data[S++]),w}function a(y,f){return Math.sqrt(Math.pow(y[0]-f[0],2)+Math.pow(y[1]-f[1],2)+Math.pow(y[2]-f[2],2))}function i(y){const f=[0,0,0];for(let _=0;_<y.length;_++)f[0]+=y[_][0],f[1]+=y[_][1],f[2]+=y[_][2];return f[0]/=y.length,f[1]/=y.length,f[2]/=y.length,f}function o(y,f){const _=n(y,0,0),S=n(y,y.width-1,0),w=n(y,0,y.height-1),b=n(y,y.width-1,y.height-1),g=f||10;if(a(_,S)<g&&a(S,b)<g&&a(b,w)<g&&a(w,_)<g){const v=i([S,_,b,w]),E=[];for(let x=0;x<y.width*y.height;x++){const j=a(v,[y.data[x*4],y.data[x*4+1],y.data[x*4+2]]);E[x]=j<g?0:255}return E}}function s(y,f){for(let _=0;_<y.width*y.height;_++)y.data[4*_+3]=f[_]}function c(y,f,_){const S=[1,1,1,1,0,1,1,1,1],w=Math.round(Math.sqrt(S.length)),b=Math.floor(w/2),g=[];for(let v=0;v<_;v++)for(let E=0;E<f;E++){const x=v*f+E;let j=0;for(let N=0;N<w;N++)for(let T=0;T<w;T++){const F=v+N-b,C=E+T-b;if(F>=0&&F<_&&C>=0&&C<f){const A=F*f+C,L=S[N*w+T];j+=y[A]*L}}g[x]=j===255*8?255:0}return g}function u(y,f,_){const S=[1,1,1,1,1,1,1,1,1],w=Math.round(Math.sqrt(S.length)),b=Math.floor(w/2),g=[];for(let v=0;v<_;v++)for(let E=0;E<f;E++){const x=v*f+E;let j=0;for(let N=0;N<w;N++)for(let T=0;T<w;T++){const F=v+N-b,C=E+T-b;if(F>=0&&F<_&&C>=0&&C<f){const A=F*f+C,L=S[N*w+T];j+=y[A]*L}}g[x]=j>=255*4?255:0}return g}function d(y,f,_){const S=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],w=Math.round(Math.sqrt(S.length)),b=Math.floor(w/2),g=[];for(let v=0;v<_;v++)for(let E=0;E<f;E++){const x=v*f+E;let j=0;for(let N=0;N<w;N++)for(let T=0;T<w;T++){const F=v+N-b,C=E+T-b;if(F>=0&&F<_&&C>=0&&C<f){const A=F*f+C,L=S[N*w+T];j+=y[A]*L}}g[x]=j}return g}const p=function(y){const f=this.threshold();let _=o(y,f);return _&&(_=c(_,y.width,y.height),_=u(_,y.width,y.height),_=d(_,y.width,y.height),s(y,_)),y};return kd.Mask=p,e.Factory.addGetterSetter(r.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),kd}var Ld={},N5;function ox(){if(N5)return Ld;N5=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.Noise=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=this.noise()*255,o=a.data,s=o.length,c=i/2;for(let u=0;u<s;u+=4)o[u+0]+=c-2*c*Math.random(),o[u+1]+=c-2*c*Math.random(),o[u+2]+=c-2*c*Math.random()};return Ld.Noise=n,e.Factory.addGetterSetter(r.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Ld}var Nd={},T5;function sx(){if(T5)return Nd;T5=1,Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.Pixelate=void 0;const e=qr(),r=Ai(),t=Zi(),n=Hr(),a=function(i){let o=Math.ceil(this.pixelSize()),s=i.width,c=i.height,u,d,p,y,f,_,S,w=Math.ceil(s/o),b=Math.ceil(c/o),g,v,E,x,j,N,T,F=i.data;if(o<=0){r.Util.error("pixelSize value can not be <= 0");return}for(j=0;j<w;j+=1)for(N=0;N<b;N+=1){for(y=0,f=0,_=0,S=0,g=j*o,v=g+o,E=N*o,x=E+o,T=0,u=g;u<v;u+=1)if(!(u>=s))for(d=E;d<x;d+=1)d>=c||(p=(s*d+u)*4,y+=F[p+0],f+=F[p+1],_+=F[p+2],S+=F[p+3],T+=1);for(y=y/T,f=f/T,_=_/T,S=S/T,u=g;u<v;u+=1)if(!(u>=s))for(d=E;d<x;d+=1)d>=c||(p=(s*d+u)*4,F[p+0]=y,F[p+1]=f,F[p+2]=_,F[p+3]=S)}};return Nd.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Nd}var Td={},R5;function lx(){if(R5)return Td;R5=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.Posterize=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=Math.round(this.levels()*254)+1,o=a.data,s=o.length,c=255/i;for(let u=0;u<s;u+=1)o[u]=Math.floor(o[u]/c)*c};return Td.Posterize=n,e.Factory.addGetterSetter(r.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Td}var Rd={},M5;function ux(){if(M5)return Rd;M5=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.RGB=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=a.data,o=i.length,s=this.red(),c=this.green(),u=this.blue();for(let d=0;d<o;d+=4){const p=(.34*i[d]+.5*i[d+1]+.16*i[d+2])/255;i[d]=p*s,i[d+1]=p*c,i[d+2]=p*u,i[d+3]=i[d+3]}};return Rd.RGB=n,e.Factory.addGetterSetter(r.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),Rd}var Md={},I5;function cx(){if(I5)return Md;I5=1,Object.defineProperty(Md,"__esModule",{value:!0}),Md.RGBA=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=a.data,o=i.length,s=this.red(),c=this.green(),u=this.blue(),d=this.alpha();for(let p=0;p<o;p+=4){const y=1-d;i[p]=s*d+i[p]*y,i[p+1]=c*d+i[p+1]*y,i[p+2]=u*d+i[p+2]*y}};return Md.RGBA=n,e.Factory.addGetterSetter(r.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(r.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(r.Node,"alpha",1,function(a){return this._filterUpToDate=!1,a>1?1:a<0?0:a}),Md}var Id={},j5;function fx(){if(j5)return Id;j5=1,Object.defineProperty(Id,"__esModule",{value:!0}),Id.Sepia=void 0;const e=function(r){const t=r.data,n=t.length;for(let a=0;a<n;a+=4){const i=t[a+0],o=t[a+1],s=t[a+2];t[a+0]=Math.min(255,i*.393+o*.769+s*.189),t[a+1]=Math.min(255,i*.349+o*.686+s*.168),t[a+2]=Math.min(255,i*.272+o*.534+s*.131)}};return Id.Sepia=e,Id}var jd={},F5;function hx(){if(F5)return jd;F5=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.Solarize=void 0;const e=function(r){const t=r.data,n=r.width,a=r.height,i=n*4;let o=a;do{const s=(o-1)*i;let c=n;do{const u=s+(c-1)*4;let d=t[u],p=t[u+1],y=t[u+2];d>127&&(d=255-d),p>127&&(p=255-p),y>127&&(y=255-y),t[u]=d,t[u+1]=p,t[u+2]=y}while(--c)}while(--o)};return jd.Solarize=e,jd}var Fd={},D5;function dx(){if(D5)return Fd;D5=1,Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.Threshold=void 0;const e=qr(),r=Zi(),t=Hr(),n=function(a){const i=this.threshold()*255,o=a.data,s=o.length;for(let c=0;c<s;c+=1)o[c]=o[c]<i?0:255};return Fd.Threshold=n,e.Factory.addGetterSetter(r.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Fd}var B5;function px(){if(B5)return Zh;B5=1,Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.Konva=void 0;const e=_2(),r=IS(),t=FS(),n=DS(),a=BS(),i=qS(),o=zS(),s=_6(),c=lm(),u=S6(),d=US(),p=HS(),y=VS(),f=GS(),_=x6(),S=WS(),w=$S(),b=YS(),g=XS(),v=KS(),E=ZS(),x=QS(),j=JS(),N=ex(),T=tx(),F=rx(),C=nx(),A=ix(),L=ax(),O=ox(),I=sx(),M=lx(),G=ux(),W=cx(),Y=fx(),te=hx(),V=dx();return Zh.Konva=e.Konva.Util._assign(e.Konva,{Arc:r.Arc,Arrow:t.Arrow,Circle:n.Circle,Ellipse:a.Ellipse,Image:i.Image,Label:o.Label,Tag:o.Tag,Line:s.Line,Path:c.Path,Rect:u.Rect,RegularPolygon:d.RegularPolygon,Ring:p.Ring,Sprite:y.Sprite,Star:f.Star,Text:_.Text,TextPath:S.TextPath,Transformer:w.Transformer,Wedge:b.Wedge,Filters:{Blur:g.Blur,Brighten:v.Brighten,Contrast:E.Contrast,Emboss:x.Emboss,Enhance:j.Enhance,Grayscale:N.Grayscale,HSL:T.HSL,HSV:F.HSV,Invert:C.Invert,Kaleidoscope:A.Kaleidoscope,Mask:L.Mask,Noise:O.Noise,Pixelate:I.Pixelate,Posterize:M.Posterize,RGB:G.RGB,RGBA:W.RGBA,Sepia:Y.Sepia,Solarize:te.Solarize,Threshold:V.Threshold}}),Zh}var gx=v1.exports,q5;function Hs(){if(q5)return v1.exports;q5=1,Object.defineProperty(gx,"__esModule",{value:!0});const e=px();return v1.exports=e.Konva,v1.exports}Hs();var o1={exports:{}},z5;function vx(){return z5||(z5=1,function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Konva=void 0;var t=_2();Object.defineProperty(r,"Konva",{enumerable:!0,get:function(){return t.Konva}});const n=_2();e.exports=n.Konva}(o1,o1.exports)),o1.exports}var mx=vx();const hp=mp(mx);var ag={exports:{}};/**
|
|
44
|
-
* @license React
|
|
45
|
-
* react-reconciler.production.min.js
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license found in the
|
|
50
|
-
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var og,U5;function yx(){return U5||(U5=1,og=function(r){var t={},n=fi(),a=F2(),i=Object.assign;function o(m){for(var P="https://reactjs.org/docs/error-decoder.html?invariant="+m,B=1;B<arguments.length;B++)P+="&args[]="+encodeURIComponent(arguments[B]);return"Minified React error #"+m+"; visit "+P+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=Symbol.for("react.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),_=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),x=Symbol.iterator;function j(m){return m===null||typeof m!="object"?null:(m=x&&m[x]||m["@@iterator"],typeof m=="function"?m:null)}function N(m){if(m==null)return null;if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case d:return"Fragment";case u:return"Portal";case y:return"Profiler";case p:return"StrictMode";case w:return"Suspense";case b:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case _:return(m.displayName||"Context")+".Consumer";case f:return(m._context.displayName||"Context")+".Provider";case S:var P=m.render;return m=m.displayName,m||(m=P.displayName||P.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case g:return P=m.displayName||null,P!==null?P:N(m.type)||"Memo";case v:P=m._payload,m=m._init;try{return N(m(P))}catch{}}return null}function T(m){var P=m.type;switch(m.tag){case 24:return"Cache";case 9:return(P.displayName||"Context")+".Consumer";case 10:return(P._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return m=P.render,m=m.displayName||m.name||"",P.displayName||(m!==""?"ForwardRef("+m+")":"ForwardRef");case 7:return"Fragment";case 5:return P;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return N(P);case 8:return P===p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P}return null}function F(m){var P=m,B=m;if(m.alternate)for(;P.return;)P=P.return;else{m=P;do P=m,(P.flags&4098)!==0&&(B=P.return),m=P.return;while(m)}return P.tag===3?B:null}function C(m){if(F(m)!==m)throw Error(o(188))}function A(m){var P=m.alternate;if(!P){if(P=F(m),P===null)throw Error(o(188));return P!==m?null:m}for(var B=m,K=P;;){var re=B.return;if(re===null)break;var le=re.alternate;if(le===null){if(K=re.return,K!==null){B=K;continue}break}if(re.child===le.child){for(le=re.child;le;){if(le===B)return C(re),m;if(le===K)return C(re),P;le=le.sibling}throw Error(o(188))}if(B.return!==K.return)B=re,K=le;else{for(var Se=!1,Xe=re.child;Xe;){if(Xe===B){Se=!0,B=re,K=le;break}if(Xe===K){Se=!0,K=re,B=le;break}Xe=Xe.sibling}if(!Se){for(Xe=le.child;Xe;){if(Xe===B){Se=!0,B=le,K=re;break}if(Xe===K){Se=!0,K=le,B=re;break}Xe=Xe.sibling}if(!Se)throw Error(o(189))}}if(B.alternate!==K)throw Error(o(190))}if(B.tag!==3)throw Error(o(188));return B.stateNode.current===B?m:P}function L(m){return m=A(m),m!==null?O(m):null}function O(m){if(m.tag===5||m.tag===6)return m;for(m=m.child;m!==null;){var P=O(m);if(P!==null)return P;m=m.sibling}return null}function I(m){if(m.tag===5||m.tag===6)return m;for(m=m.child;m!==null;){if(m.tag!==4){var P=I(m);if(P!==null)return P}m=m.sibling}return null}var M=Array.isArray,G=r.getPublicInstance,W=r.getRootHostContext,Y=r.getChildHostContext,te=r.prepareForCommit,V=r.resetAfterCommit,H=r.createInstance,q=r.appendInitialChild,D=r.finalizeInitialChildren,$=r.prepareUpdate,ne=r.shouldSetTextContent,Z=r.createTextInstance,Q=r.scheduleTimeout,oe=r.cancelTimeout,se=r.noTimeout,ue=r.isPrimaryRenderer,ve=r.supportsMutation,Pe=r.supportsPersistence,ke=r.supportsHydration,Ne=r.getInstanceFromNode,xe=r.preparePortalMount,ye=r.getCurrentEventPriority,Ie=r.detachDeletedInstance,me=r.supportsMicrotasks,_e=r.scheduleMicrotask,Ae=r.supportsTestSelectors,Le=r.findFiberRoot,ge=r.getBoundingRect,Te=r.getTextContent,Fe=r.isHiddenSubtree,Ke=r.matchAccessibilityRole,it=r.setFocusIfFocusable,rt=r.setupIntersectionObserver,at=r.appendChild,bt=r.appendChildToContainer,yt=r.commitTextUpdate,ht=r.commitMount,zt=r.commitUpdate,Ot=r.insertBefore,Ut=r.insertInContainerBefore,$t=r.removeChild,Oe=r.removeChildFromContainer,Me=r.resetTextContent,mt=r.hideInstance,Mt=r.hideTextInstance,Lt=r.unhideInstance,At=r.unhideTextInstance,fr=r.clearContainer,Qt=r.cloneInstance,ze=r.createContainerChildSet,qe=r.appendChildToContainerChildSet,vt=r.finalizeContainerChildren,pt=r.replaceContainerChildren,Je=r.cloneHiddenInstance,_t=r.cloneHiddenTextInstance,Ye=r.canHydrateInstance,Pt=r.canHydrateTextInstance,Dt=r.canHydrateSuspenseInstance,Wt=r.isSuspenseInstancePending,Zt=r.isSuspenseInstanceFallback,rr=r.getSuspenseInstanceFallbackErrorDetails,_r=r.registerSuspenseInstanceRetry,Hn=r.getNextHydratableSibling,ti=r.getFirstHydratableChild,Vn=r.getFirstHydratableChildWithinContainer,Ci=r.getFirstHydratableChildWithinSuspenseInstance,En=r.hydrateInstance,ki=r.hydrateTextInstance,bi=r.hydrateSuspenseInstance,_a=r.getNextHydratableInstanceAfterSuspenseInstance,ua=r.commitHydratedContainer,ao=r.commitHydratedSuspenseInstance,ws=r.clearSuspenseBoundary,Go=r.clearSuspenseBoundaryFromContainer,tu=r.shouldDeleteUnhydratedTailInstances,mc=r.didNotMatchHydratedContainerTextInstance,Nn=r.didNotMatchHydratedTextInstance,Bu;function oo(m){if(Bu===void 0)try{throw Error()}catch(B){var P=B.stack.trim().match(/\n( *(at )?)/);Bu=P&&P[1]||""}return`
|
|
52
|
-
`+Bu+m}var dl=!1;function Vs(m,P){if(!m||dl)return"";dl=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(P)if(P=function(){throw Error()},Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(kt){var K=kt}Reflect.construct(m,[],P)}else{try{P.call()}catch(kt){K=kt}m.call(P.prototype)}else{try{throw Error()}catch(kt){K=kt}m()}}catch(kt){if(kt&&K&&typeof kt.stack=="string"){for(var re=kt.stack.split(`
|
|
53
|
-
`),le=K.stack.split(`
|
|
54
|
-
`),Se=re.length-1,Xe=le.length-1;1<=Se&&0<=Xe&&re[Se]!==le[Xe];)Xe--;for(;1<=Se&&0<=Xe;Se--,Xe--)if(re[Se]!==le[Xe]){if(Se!==1||Xe!==1)do if(Se--,Xe--,0>Xe||re[Se]!==le[Xe]){var ut=`
|
|
55
|
-
`+re[Se].replace(" at new "," at ");return m.displayName&&ut.includes("<anonymous>")&&(ut=ut.replace("<anonymous>",m.displayName)),ut}while(1<=Se&&0<=Xe);break}}}finally{dl=!1,Error.prepareStackTrace=B}return(m=m?m.displayName||m.name:"")?oo(m):""}var qu=Object.prototype.hasOwnProperty,ru=[],so=-1;function hi(m){return{current:m}}function $r(m){0>so||(m.current=ru[so],ru[so]=null,so--)}function Ar(m,P){so++,ru[so]=m.current,m.current=P}var nn={},di=hi(nn),Li=hi(!1),Ma=nn;function Ia(m,P){var B=m.type.contextTypes;if(!B)return nn;var K=m.stateNode;if(K&&K.__reactInternalMemoizedUnmaskedChildContext===P)return K.__reactInternalMemoizedMaskedChildContext;var re={},le;for(le in B)re[le]=P[le];return K&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=P,m.__reactInternalMemoizedMaskedChildContext=re),re}function ri(m){return m=m.childContextTypes,m!=null}function Ni(){$r(Li),$r(di)}function pl(m,P,B){if(di.current!==nn)throw Error(o(168));Ar(di,P),Ar(Li,B)}function ca(m,P,B){var K=m.stateNode;if(P=P.childContextTypes,typeof K.getChildContext!="function")return B;K=K.getChildContext();for(var re in K)if(!(re in P))throw Error(o(108,T(m)||"Unknown",re));return i({},B,K)}function Wo(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||nn,Ma=di.current,Ar(di,m),Ar(Li,Li.current),!0}function nu(m,P,B){var K=m.stateNode;if(!K)throw Error(o(169));B?(m=ca(m,P,Ma),K.__reactInternalMemoizedMergedChildContext=m,$r(Li),$r(di),Ar(di,m)):$r(Li),Ar(Li,B)}var fa=Math.clz32?Math.clz32:iu,Gs=Math.log,af=Math.LN2;function iu(m){return m>>>=0,m===0?32:31-(Gs(m)/af|0)|0}var Tr=64,_s=4194304;function Ws(m){switch(m&-m){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return m&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return m&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return m}}function $s(m,P){var B=m.pendingLanes;if(B===0)return 0;var K=0,re=m.suspendedLanes,le=m.pingedLanes,Se=B&268435455;if(Se!==0){var Xe=Se&~re;Xe!==0?K=Ws(Xe):(le&=Se,le!==0&&(K=Ws(le)))}else Se=B&~re,Se!==0?K=Ws(Se):le!==0&&(K=Ws(le));if(K===0)return 0;if(P!==0&&P!==K&&(P&re)===0&&(re=K&-K,le=P&-P,re>=le||re===16&&(le&4194240)!==0))return P;if((K&4)!==0&&(K|=B&16),P=m.entangledLanes,P!==0)for(m=m.entanglements,P&=K;0<P;)B=31-fa(P),re=1<<B,K|=m[B],P&=~re;return K}function yc(m,P){switch(m){case 1:case 2:case 4:return P+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return P+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $o(m,P){for(var B=m.suspendedLanes,K=m.pingedLanes,re=m.expirationTimes,le=m.pendingLanes;0<le;){var Se=31-fa(le),Xe=1<<Se,ut=re[Se];ut===-1?((Xe&B)===0||(Xe&K)!==0)&&(re[Se]=yc(Xe,P)):ut<=P&&(m.expiredLanes|=Xe),le&=~Xe}}function Ss(m){return m=m.pendingLanes&-1073741825,m!==0?m:m&1073741824?1073741824:0}function xs(){var m=Tr;return Tr<<=1,(Tr&4194240)===0&&(Tr=64),m}function Es(m){for(var P=[],B=0;31>B;B++)P.push(m);return P}function fn(m,P,B){m.pendingLanes|=P,P!==536870912&&(m.suspendedLanes=0,m.pingedLanes=0),m=m.eventTimes,P=31-fa(P),m[P]=B}function Yo(m,P){var B=m.pendingLanes&~P;m.pendingLanes=P,m.suspendedLanes=0,m.pingedLanes=0,m.expiredLanes&=P,m.mutableReadLanes&=P,m.entangledLanes&=P,P=m.entanglements;var K=m.eventTimes;for(m=m.expirationTimes;0<B;){var re=31-fa(B),le=1<<re;P[re]=0,K[re]=-1,m[re]=-1,B&=~le}}function ja(m,P){var B=m.entangledLanes|=P;for(m=m.entanglements;B;){var K=31-fa(B),re=1<<K;re&P|m[K]&P&&(m[K]|=P),B&=~re}}var It=0;function Ys(m){return m&=-m,1<m?4<m?(m&268435455)!==0?16:536870912:4:1}var lo=a.unstable_scheduleCallback,Oo=a.unstable_cancelCallback,zu=a.unstable_shouldYield,Xs=a.unstable_requestPaint,Tn=a.unstable_now,Ks=a.unstable_ImmediatePriority,au=a.unstable_UserBlockingPriority,ou=a.unstable_NormalPriority,of=a.unstable_IdlePriority,uo=null,ni=null;function Fa(m){if(ni&&typeof ni.onCommitFiberRoot=="function")try{ni.onCommitFiberRoot(uo,m,void 0,(m.current.flags&128)===128)}catch{}}function su(m,P){return m===P&&(m!==0||1/m===1/P)||m!==m&&P!==P}var Ti=typeof Object.is=="function"?Object.is:su,Da=null,Ao=!1,Ps=!1;function gl(m){Da===null?Da=[m]:Da.push(m)}function Uu(m){Ao=!0,gl(m)}function ii(){if(!Ps&&Da!==null){Ps=!0;var m=0,P=It;try{var B=Da;for(It=1;m<B.length;m++){var K=B[m];do K=K(!0);while(K!==null)}Da=null,Ao=!1}catch(re){throw Da!==null&&(Da=Da.slice(m+1)),lo(Ks,ii),re}finally{It=P,Ps=!1}}return null}var Ri=[],Mi=0,vl=null,Sa=0,vn=[],Ii=0,mn=null,Qi=1,Ji="";function Ba(m,P){Ri[Mi++]=Sa,Ri[Mi++]=vl,vl=m,Sa=P}function lu(m,P,B){vn[Ii++]=Qi,vn[Ii++]=Ji,vn[Ii++]=mn,mn=m;var K=Qi;m=Ji;var re=32-fa(K)-1;K&=~(1<<re),B+=1;var le=32-fa(P)+re;if(30<le){var Se=re-re%5;le=(K&(1<<Se)-1).toString(32),K>>=Se,re-=Se,Qi=1<<32-fa(P)+re|B<<re|K,Ji=le+m}else Qi=1<<le|B<<re|K,Ji=m}function Os(m){m.return!==null&&(Ba(m,1),lu(m,1,0))}function Zs(m){for(;m===vl;)vl=Ri[--Mi],Ri[Mi]=null,Sa=Ri[--Mi],Ri[Mi]=null;for(;m===mn;)mn=vn[--Ii],vn[Ii]=null,Ji=vn[--Ii],vn[Ii]=null,Qi=vn[--Ii],vn[Ii]=null}var Gn=null,pi=null,Zr=!1,Qs=!1,qa=null;function ml(m,P){var B=Uo(5,null,null,0);B.elementType="DELETED",B.stateNode=P,B.return=m,P=m.deletions,P===null?(m.deletions=[B],m.flags|=16):P.push(B)}function Xo(m,P){switch(m.tag){case 5:return P=Ye(P,m.type,m.pendingProps),P!==null?(m.stateNode=P,Gn=m,pi=ti(P),!0):!1;case 6:return P=Pt(P,m.pendingProps),P!==null?(m.stateNode=P,Gn=m,pi=null,!0):!1;case 13:if(P=Dt(P),P!==null){var B=mn!==null?{id:Qi,overflow:Ji}:null;return m.memoizedState={dehydrated:P,treeContext:B,retryLane:1073741824},B=Uo(18,null,null,0),B.stateNode=P,B.return=m,m.child=B,Gn=m,pi=null,!0}return!1;default:return!1}}function yl(m){return(m.mode&1)!==0&&(m.flags&128)===0}function Ko(m){if(Zr){var P=pi;if(P){var B=P;if(!Xo(m,P)){if(yl(m))throw Error(o(418));P=Hn(B);var K=Gn;P&&Xo(m,P)?ml(K,B):(m.flags=m.flags&-4097|2,Zr=!1,Gn=m)}}else{if(yl(m))throw Error(o(418));m.flags=m.flags&-4097|2,Zr=!1,Gn=m}}}function uu(m){for(m=m.return;m!==null&&m.tag!==5&&m.tag!==3&&m.tag!==13;)m=m.return;Gn=m}function X(m){if(!ke||m!==Gn)return!1;if(!Zr)return uu(m),Zr=!0,!1;if(m.tag!==3&&(m.tag!==5||tu(m.type)&&!ne(m.type,m.memoizedProps))){var P=pi;if(P){if(yl(m))throw fe(),Error(o(418));for(;P;)ml(m,P),P=Hn(P)}}if(uu(m),m.tag===13){if(!ke)throw Error(o(316));if(m=m.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));pi=_a(m)}else pi=Gn?Hn(m.stateNode):null;return!0}function fe(){for(var m=pi;m;)m=Hn(m)}function Ce(){ke&&(pi=Gn=null,Qs=Zr=!1)}function De(m){qa===null?qa=[m]:qa.push(m)}var et=s.ReactCurrentBatchConfig;function ft(m,P){if(Ti(m,P))return!0;if(typeof m!="object"||m===null||typeof P!="object"||P===null)return!1;var B=Object.keys(m),K=Object.keys(P);if(B.length!==K.length)return!1;for(K=0;K<B.length;K++){var re=B[K];if(!qu.call(P,re)||!Ti(m[re],P[re]))return!1}return!0}function St(m){switch(m.tag){case 5:return oo(m.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 2:case 15:return m=Vs(m.type,!1),m;case 11:return m=Vs(m.type.render,!1),m;case 1:return m=Vs(m.type,!0),m;default:return""}}function Ft(m,P,B){if(m=B.ref,m!==null&&typeof m!="function"&&typeof m!="object"){if(B._owner){if(B=B._owner,B){if(B.tag!==1)throw Error(o(309));var K=B.stateNode}if(!K)throw Error(o(147,m));var re=K,le=""+m;return P!==null&&P.ref!==null&&typeof P.ref=="function"&&P.ref._stringRef===le?P.ref:(P=function(Se){var Xe=re.refs;Se===null?delete Xe[le]:Xe[le]=Se},P._stringRef=le,P)}if(typeof m!="string")throw Error(o(284));if(!B._owner)throw Error(o(290,m))}return m}function nr(m,P){throw m=Object.prototype.toString.call(P),Error(o(31,m==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":m))}function gr(m){var P=m._init;return P(m._payload)}function dr(m){function P(ot,Ze){if(m){var dt=ot.deletions;dt===null?(ot.deletions=[Ze],ot.flags|=16):dt.push(Ze)}}function B(ot,Ze){if(!m)return null;for(;Ze!==null;)P(ot,Ze),Ze=Ze.sibling;return null}function K(ot,Ze){for(ot=new Map;Ze!==null;)Ze.key!==null?ot.set(Ze.key,Ze):ot.set(Ze.index,Ze),Ze=Ze.sibling;return ot}function re(ot,Ze){return ot=Eu(ot,Ze),ot.index=0,ot.sibling=null,ot}function le(ot,Ze,dt){return ot.index=dt,m?(dt=ot.alternate,dt!==null?(dt=dt.index,dt<Ze?(ot.flags|=2,Ze):dt):(ot.flags|=2,Ze)):(ot.flags|=1048576,Ze)}function Se(ot){return m&&ot.alternate===null&&(ot.flags|=2),ot}function Xe(ot,Ze,dt,Ht){return Ze===null||Ze.tag!==6?(Ze=kc(dt,ot.mode,Ht),Ze.return=ot,Ze):(Ze=re(Ze,dt),Ze.return=ot,Ze)}function ut(ot,Ze,dt,Ht){var lr=dt.type;return lr===d?Yt(ot,Ze,dt.props.children,Ht,dt.key):Ze!==null&&(Ze.elementType===lr||typeof lr=="object"&&lr!==null&&lr.$$typeof===v&&gr(lr)===Ze.type)?(Ht=re(Ze,dt.props),Ht.ref=Ft(ot,Ze,dt),Ht.return=ot,Ht):(Ht=$f(dt.type,dt.key,dt.props,null,ot.mode,Ht),Ht.ref=Ft(ot,Ze,dt),Ht.return=ot,Ht)}function kt(ot,Ze,dt,Ht){return Ze===null||Ze.tag!==4||Ze.stateNode.containerInfo!==dt.containerInfo||Ze.stateNode.implementation!==dt.implementation?(Ze=Yf(dt,ot.mode,Ht),Ze.return=ot,Ze):(Ze=re(Ze,dt.children||[]),Ze.return=ot,Ze)}function Yt(ot,Ze,dt,Ht,lr){return Ze===null||Ze.tag!==7?(Ze=ga(dt,ot.mode,Ht,lr),Ze.return=ot,Ze):(Ze=re(Ze,dt),Ze.return=ot,Ze)}function br(ot,Ze,dt){if(typeof Ze=="string"&&Ze!==""||typeof Ze=="number")return Ze=kc(""+Ze,ot.mode,dt),Ze.return=ot,Ze;if(typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case c:return dt=$f(Ze.type,Ze.key,Ze.props,null,ot.mode,dt),dt.ref=Ft(ot,null,Ze),dt.return=ot,dt;case u:return Ze=Yf(Ze,ot.mode,dt),Ze.return=ot,Ze;case v:var Ht=Ze._init;return br(ot,Ht(Ze._payload),dt)}if(M(Ze)||j(Ze))return Ze=ga(Ze,ot.mode,dt,null),Ze.return=ot,Ze;nr(ot,Ze)}return null}function qt(ot,Ze,dt,Ht){var lr=Ze!==null?Ze.key:null;if(typeof dt=="string"&&dt!==""||typeof dt=="number")return lr!==null?null:Xe(ot,Ze,""+dt,Ht);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case c:return dt.key===lr?ut(ot,Ze,dt,Ht):null;case u:return dt.key===lr?kt(ot,Ze,dt,Ht):null;case v:return lr=dt._init,qt(ot,Ze,lr(dt._payload),Ht)}if(M(dt)||j(dt))return lr!==null?null:Yt(ot,Ze,dt,Ht,null);nr(ot,dt)}return null}function kn(ot,Ze,dt,Ht,lr){if(typeof Ht=="string"&&Ht!==""||typeof Ht=="number")return ot=ot.get(dt)||null,Xe(Ze,ot,""+Ht,lr);if(typeof Ht=="object"&&Ht!==null){switch(Ht.$$typeof){case c:return ot=ot.get(Ht.key===null?dt:Ht.key)||null,ut(Ze,ot,Ht,lr);case u:return ot=ot.get(Ht.key===null?dt:Ht.key)||null,kt(Ze,ot,Ht,lr);case v:var Cr=Ht._init;return kn(ot,Ze,dt,Cr(Ht._payload),lr)}if(M(Ht)||j(Ht))return ot=ot.get(dt)||null,Yt(Ze,ot,Ht,lr,null);nr(Ze,Ht)}return null}function dn(ot,Ze,dt,Ht){for(var lr=null,Cr=null,wr=Ze,zr=Ze=0,Gi=null;wr!==null&&zr<dt.length;zr++){wr.index>zr?(Gi=wr,wr=null):Gi=wr.sibling;var Br=qt(ot,wr,dt[zr],Ht);if(Br===null){wr===null&&(wr=Gi);break}m&&wr&&Br.alternate===null&&P(ot,wr),Ze=le(Br,Ze,zr),Cr===null?lr=Br:Cr.sibling=Br,Cr=Br,wr=Gi}if(zr===dt.length)return B(ot,wr),Zr&&Ba(ot,zr),lr;if(wr===null){for(;zr<dt.length;zr++)wr=br(ot,dt[zr],Ht),wr!==null&&(Ze=le(wr,Ze,zr),Cr===null?lr=wr:Cr.sibling=wr,Cr=wr);return Zr&&Ba(ot,zr),lr}for(wr=K(ot,wr);zr<dt.length;zr++)Gi=kn(wr,ot,zr,dt[zr],Ht),Gi!==null&&(m&&Gi.alternate!==null&&wr.delete(Gi.key===null?zr:Gi.key),Ze=le(Gi,Ze,zr),Cr===null?lr=Gi:Cr.sibling=Gi,Cr=Gi);return m&&wr.forEach(function(Ca){return P(ot,Ca)}),Zr&&Ba(ot,zr),lr}function eo(ot,Ze,dt,Ht){var lr=j(dt);if(typeof lr!="function")throw Error(o(150));if(dt=lr.call(dt),dt==null)throw Error(o(151));for(var Cr=lr=null,wr=Ze,zr=Ze=0,Gi=null,Br=dt.next();wr!==null&&!Br.done;zr++,Br=dt.next()){wr.index>zr?(Gi=wr,wr=null):Gi=wr.sibling;var Ca=qt(ot,wr,Br.value,Ht);if(Ca===null){wr===null&&(wr=Gi);break}m&&wr&&Ca.alternate===null&&P(ot,wr),Ze=le(Ca,Ze,zr),Cr===null?lr=Ca:Cr.sibling=Ca,Cr=Ca,wr=Gi}if(Br.done)return B(ot,wr),Zr&&Ba(ot,zr),lr;if(wr===null){for(;!Br.done;zr++,Br=dt.next())Br=br(ot,Br.value,Ht),Br!==null&&(Ze=le(Br,Ze,zr),Cr===null?lr=Br:Cr.sibling=Br,Cr=Br);return Zr&&Ba(ot,zr),lr}for(wr=K(ot,wr);!Br.done;zr++,Br=dt.next())Br=kn(wr,ot,zr,Br.value,Ht),Br!==null&&(m&&Br.alternate!==null&&wr.delete(Br.key===null?zr:Br.key),Ze=le(Br,Ze,zr),Cr===null?lr=Br:Cr.sibling=Br,Cr=Br);return m&&wr.forEach(function(g0){return P(ot,g0)}),Zr&&Ba(ot,zr),lr}function sl(ot,Ze,dt,Ht){if(typeof dt=="object"&&dt!==null&&dt.type===d&&dt.key===null&&(dt=dt.props.children),typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case c:e:{for(var lr=dt.key,Cr=Ze;Cr!==null;){if(Cr.key===lr){if(lr=dt.type,lr===d){if(Cr.tag===7){B(ot,Cr.sibling),Ze=re(Cr,dt.props.children),Ze.return=ot,ot=Ze;break e}}else if(Cr.elementType===lr||typeof lr=="object"&&lr!==null&&lr.$$typeof===v&&gr(lr)===Cr.type){B(ot,Cr.sibling),Ze=re(Cr,dt.props),Ze.ref=Ft(ot,Cr,dt),Ze.return=ot,ot=Ze;break e}B(ot,Cr);break}else P(ot,Cr);Cr=Cr.sibling}dt.type===d?(Ze=ga(dt.props.children,ot.mode,Ht,dt.key),Ze.return=ot,ot=Ze):(Ht=$f(dt.type,dt.key,dt.props,null,ot.mode,Ht),Ht.ref=Ft(ot,Ze,dt),Ht.return=ot,ot=Ht)}return Se(ot);case u:e:{for(Cr=dt.key;Ze!==null;){if(Ze.key===Cr)if(Ze.tag===4&&Ze.stateNode.containerInfo===dt.containerInfo&&Ze.stateNode.implementation===dt.implementation){B(ot,Ze.sibling),Ze=re(Ze,dt.children||[]),Ze.return=ot,ot=Ze;break e}else{B(ot,Ze);break}else P(ot,Ze);Ze=Ze.sibling}Ze=Yf(dt,ot.mode,Ht),Ze.return=ot,ot=Ze}return Se(ot);case v:return Cr=dt._init,sl(ot,Ze,Cr(dt._payload),Ht)}if(M(dt))return dn(ot,Ze,dt,Ht);if(j(dt))return eo(ot,Ze,dt,Ht);nr(ot,dt)}return typeof dt=="string"&&dt!==""||typeof dt=="number"?(dt=""+dt,Ze!==null&&Ze.tag===6?(B(ot,Ze.sibling),Ze=re(Ze,dt),Ze.return=ot,ot=Ze):(B(ot,Ze),Ze=kc(dt,ot.mode,Ht),Ze.return=ot,ot=Ze),Se(ot)):B(ot,Ze)}return sl}var Sr=dr(!0),Pn=dr(!1),yn=hi(null),Rn=null,Kn=null,ai=null;function za(){ai=Kn=Rn=null}function xa(m,P,B){ue?(Ar(yn,P._currentValue),P._currentValue=B):(Ar(yn,P._currentValue2),P._currentValue2=B)}function Ea(m){var P=yn.current;$r(yn),ue?m._currentValue=P:m._currentValue2=P}function Zo(m,P,B){for(;m!==null;){var K=m.alternate;if((m.childLanes&P)!==P?(m.childLanes|=P,K!==null&&(K.childLanes|=P)):K!==null&&(K.childLanes&P)!==P&&(K.childLanes|=P),m===B)break;m=m.return}}function Qo(m,P){Rn=m,ai=Kn=null,m=m.dependencies,m!==null&&m.firstContext!==null&&((m.lanes&P)!==0&&(si=!0),m.firstContext=null)}function ji(m){var P=ue?m._currentValue:m._currentValue2;if(ai!==m)if(m={context:m,memoizedValue:P,next:null},Kn===null){if(Rn===null)throw Error(o(308));Kn=m,Rn.dependencies={lanes:0,firstContext:m}}else Kn=Kn.next=m;return P}var Ua=null;function Js(m){Ua===null?Ua=[m]:Ua.push(m)}function bl(m,P,B,K){var re=P.interleaved;return re===null?(B.next=B,Js(P)):(B.next=re.next,re.next=B),P.interleaved=B,ea(m,K)}function ea(m,P){m.lanes|=P;var B=m.alternate;for(B!==null&&(B.lanes|=P),B=m,m=m.return;m!==null;)m.childLanes|=P,B=m.alternate,B!==null&&(B.childLanes|=P),B=m,m=m.return;return B.tag===3?B.stateNode:null}var Qr=!1;function el(m){m.updateQueue={baseState:m.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wl(m,P){m=m.updateQueue,P.updateQueue===m&&(P.updateQueue={baseState:m.baseState,firstBaseUpdate:m.firstBaseUpdate,lastBaseUpdate:m.lastBaseUpdate,shared:m.shared,effects:m.effects})}function Pa(m,P){return{eventTime:m,lane:P,tag:0,payload:null,callback:null,next:null}}function Ha(m,P,B){var K=m.updateQueue;if(K===null)return null;if(K=K.shared,(vr&2)!==0){var re=K.pending;return re===null?P.next=P:(P.next=re.next,re.next=P),K.pending=P,ea(m,B)}return re=K.interleaved,re===null?(P.next=P,Js(K)):(P.next=re.next,re.next=P),K.interleaved=P,ea(m,B)}function wi(m,P,B){if(P=P.updateQueue,P!==null&&(P=P.shared,(B&4194240)!==0)){var K=P.lanes;K&=m.pendingLanes,B|=K,P.lanes=B,ja(m,B)}}function tl(m,P){var B=m.updateQueue,K=m.alternate;if(K!==null&&(K=K.updateQueue,B===K)){var re=null,le=null;if(B=B.firstBaseUpdate,B!==null){do{var Se={eventTime:B.eventTime,lane:B.lane,tag:B.tag,payload:B.payload,callback:B.callback,next:null};le===null?re=le=Se:le=le.next=Se,B=B.next}while(B!==null);le===null?re=le=P:le=le.next=P}else re=le=P;B={baseState:K.baseState,firstBaseUpdate:re,lastBaseUpdate:le,shared:K.shared,effects:K.effects},m.updateQueue=B;return}m=B.lastBaseUpdate,m===null?B.firstBaseUpdate=P:m.next=P,B.lastBaseUpdate=P}function co(m,P,B,K){var re=m.updateQueue;Qr=!1;var le=re.firstBaseUpdate,Se=re.lastBaseUpdate,Xe=re.shared.pending;if(Xe!==null){re.shared.pending=null;var ut=Xe,kt=ut.next;ut.next=null,Se===null?le=kt:Se.next=kt,Se=ut;var Yt=m.alternate;Yt!==null&&(Yt=Yt.updateQueue,Xe=Yt.lastBaseUpdate,Xe!==Se&&(Xe===null?Yt.firstBaseUpdate=kt:Xe.next=kt,Yt.lastBaseUpdate=ut))}if(le!==null){var br=re.baseState;Se=0,Yt=kt=ut=null,Xe=le;do{var qt=Xe.lane,kn=Xe.eventTime;if((K&qt)===qt){Yt!==null&&(Yt=Yt.next={eventTime:kn,lane:0,tag:Xe.tag,payload:Xe.payload,callback:Xe.callback,next:null});e:{var dn=m,eo=Xe;switch(qt=P,kn=B,eo.tag){case 1:if(dn=eo.payload,typeof dn=="function"){br=dn.call(kn,br,qt);break e}br=dn;break e;case 3:dn.flags=dn.flags&-65537|128;case 0:if(dn=eo.payload,qt=typeof dn=="function"?dn.call(kn,br,qt):dn,qt==null)break e;br=i({},br,qt);break e;case 2:Qr=!0}}Xe.callback!==null&&Xe.lane!==0&&(m.flags|=64,qt=re.effects,qt===null?re.effects=[Xe]:qt.push(Xe))}else kn={eventTime:kn,lane:qt,tag:Xe.tag,payload:Xe.payload,callback:Xe.callback,next:null},Yt===null?(kt=Yt=kn,ut=br):Yt=Yt.next=kn,Se|=qt;if(Xe=Xe.next,Xe===null){if(Xe=re.shared.pending,Xe===null)break;qt=Xe,Xe=qt.next,qt.next=null,re.lastBaseUpdate=qt,re.shared.pending=null}}while(!0);if(Yt===null&&(ut=br),re.baseState=ut,re.firstBaseUpdate=kt,re.lastBaseUpdate=Yt,P=re.shared.interleaved,P!==null){re=P;do Se|=re.lane,re=re.next;while(re!==P)}else le===null&&(re.shared.lanes=0);Ns|=Se,m.lanes=Se,m.memoizedState=br}}function Hu(m,P,B){if(m=P.effects,P.effects=null,m!==null)for(P=0;P<m.length;P++){var K=m[P],re=K.callback;if(re!==null){if(K.callback=null,K=B,typeof re!="function")throw Error(o(191,re));re.call(K)}}}var gi={},Fi=hi(gi),As=hi(gi),Co=hi(gi);function vi(m){if(m===gi)throw Error(o(174));return m}function Jo(m,P){Ar(Co,P),Ar(As,m),Ar(Fi,gi),m=W(P),$r(Fi),Ar(Fi,m)}function oi(){$r(Fi),$r(As),$r(Co)}function Di(m){var P=vi(Co.current),B=vi(Fi.current);P=Y(B,m.type,P),B!==P&&(Ar(As,m),Ar(Fi,P))}function es(m){As.current===m&&($r(Fi),$r(As))}var Vr=hi(0);function fo(m){for(var P=m;P!==null;){if(P.tag===13){var B=P.memoizedState;if(B!==null&&(B=B.dehydrated,B===null||Wt(B)||Zt(B)))return P}else if(P.tag===19&&P.memoizedProps.revealOrder!==void 0){if((P.flags&128)!==0)return P}else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return null;P=P.return}P.sibling.return=P.return,P=P.sibling}return null}var rl=[];function ko(){for(var m=0;m<rl.length;m++){var P=rl[m];ue?P._workInProgressVersionPrimary=null:P._workInProgressVersionSecondary=null}rl.length=0}var Rr=s.ReactCurrentDispatcher,Lo=s.ReactCurrentBatchConfig,Wn=0,kr=null,bn=null,$n=null,ts=!1,No=!1,To=0,Va=0;function On(){throw Error(o(321))}function ho(m,P){if(P===null)return!1;for(var B=0;B<P.length&&B<m.length;B++)if(!Ti(m[B],P[B]))return!1;return!0}function Ro(m,P,B,K,re,le){if(Wn=le,kr=P,P.memoizedState=null,P.updateQueue=null,P.lanes=0,Rr.current=m===null||m.memoizedState===null?Wu:Ol,m=B(K,re),No){le=0;do{if(No=!1,To=0,25<=le)throw Error(o(301));le+=1,$n=bn=null,P.updateQueue=null,Rr.current=uf,m=B(K,re)}while(No)}if(Rr.current=ks,P=bn!==null&&bn.next!==null,Wn=0,$n=bn=kr=null,ts=!1,P)throw Error(o(300));return m}function Mo(){var m=To!==0;return To=0,m}function Bi(){var m={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?kr.memoizedState=$n=m:$n=$n.next=m,$n}function an(){if(bn===null){var m=kr.alternate;m=m!==null?m.memoizedState:null}else m=bn.next;var P=$n===null?kr.memoizedState:$n.next;if(P!==null)$n=P,bn=m;else{if(m===null)throw Error(o(310));bn=m,m={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},$n===null?kr.memoizedState=$n=m:$n=$n.next=m}return $n}function _i(m,P){return typeof P=="function"?P(m):P}function Jr(m){var P=an(),B=P.queue;if(B===null)throw Error(o(311));B.lastRenderedReducer=m;var K=bn,re=K.baseQueue,le=B.pending;if(le!==null){if(re!==null){var Se=re.next;re.next=le.next,le.next=Se}K.baseQueue=re=le,B.pending=null}if(re!==null){le=re.next,K=K.baseState;var Xe=Se=null,ut=null,kt=le;do{var Yt=kt.lane;if((Wn&Yt)===Yt)ut!==null&&(ut=ut.next={lane:0,action:kt.action,hasEagerState:kt.hasEagerState,eagerState:kt.eagerState,next:null}),K=kt.hasEagerState?kt.eagerState:m(K,kt.action);else{var br={lane:Yt,action:kt.action,hasEagerState:kt.hasEagerState,eagerState:kt.eagerState,next:null};ut===null?(Xe=ut=br,Se=K):ut=ut.next=br,kr.lanes|=Yt,Ns|=Yt}kt=kt.next}while(kt!==null&&kt!==le);ut===null?Se=K:ut.next=Xe,Ti(K,P.memoizedState)||(si=!0),P.memoizedState=K,P.baseState=Se,P.baseQueue=ut,B.lastRenderedState=K}if(m=B.interleaved,m!==null){re=m;do le=re.lane,kr.lanes|=le,Ns|=le,re=re.next;while(re!==m)}else re===null&&(B.lanes=0);return[P.memoizedState,B.dispatch]}function Gr(m){var P=an(),B=P.queue;if(B===null)throw Error(o(311));B.lastRenderedReducer=m;var K=B.dispatch,re=B.pending,le=P.memoizedState;if(re!==null){B.pending=null;var Se=re=re.next;do le=m(le,Se.action),Se=Se.next;while(Se!==re);Ti(le,P.memoizedState)||(si=!0),P.memoizedState=le,P.baseQueue===null&&(P.baseState=le),B.lastRenderedState=le}return[le,K]}function Mn(){}function Zn(m,P){var B=kr,K=an(),re=P(),le=!Ti(K.memoizedState,re);if(le&&(K.memoizedState=re,si=!0),K=K.queue,El(nl.bind(null,B,K,m),[m]),K.getSnapshot!==P||le||$n!==null&&$n.memoizedState.tag&1){if(B.flags|=2048,mi(9,_l.bind(null,B,K,re,P),void 0,null),Kr===null)throw Error(o(349));(Wn&30)!==0||Io(B,P,re)}return re}function Io(m,P,B){m.flags|=16384,m={getSnapshot:P,value:B},P=kr.updateQueue,P===null?(P={lastEffect:null,stores:null},kr.updateQueue=P,P.stores=[m]):(B=P.stores,B===null?P.stores=[m]:B.push(m))}function _l(m,P,B,K){P.value=B,P.getSnapshot=K,cu(P)&&jo(m)}function nl(m,P,B){return B(function(){cu(P)&&jo(m)})}function cu(m){var P=m.getSnapshot;m=m.value;try{var B=P();return!Ti(m,B)}catch{return!0}}function jo(m){var P=ea(m,1);P!==null&&oa(P,m,1,-1)}function Sl(m){var P=Bi();return typeof m=="function"&&(m=m()),P.memoizedState=P.baseState=m,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:m},P.queue=m,m=m.dispatch=qh.bind(null,kr,m),[P.memoizedState,m]}function mi(m,P,B,K){return m={tag:m,create:P,destroy:B,deps:K,next:null},P=kr.updateQueue,P===null?(P={lastEffect:null,stores:null},kr.updateQueue=P,P.lastEffect=m.next=m):(B=P.lastEffect,B===null?P.lastEffect=m.next=m:(K=B.next,B.next=m,m.next=K,P.lastEffect=m)),m}function Ga(){return an().memoizedState}function xl(m,P,B,K){var re=Bi();kr.flags|=m,re.memoizedState=mi(1|P,B,void 0,K===void 0?null:K)}function Fo(m,P,B,K){var re=an();K=K===void 0?null:K;var le=void 0;if(bn!==null){var Se=bn.memoizedState;if(le=Se.destroy,K!==null&&ho(K,Se.deps)){re.memoizedState=mi(P,B,le,K);return}}kr.flags|=m,re.memoizedState=mi(1|P,B,le,K)}function sf(m,P){return xl(8390656,8,m,P)}function El(m,P){return Fo(2048,8,m,P)}function fu(m,P){return Fo(4,2,m,P)}function on(m,P){return Fo(4,4,m,P)}function Vu(m,P){if(typeof P=="function")return m=m(),P(m),function(){P(null)};if(P!=null)return m=m(),P.current=m,function(){P.current=null}}function Pl(m,P,B){return B=B!=null?B.concat([m]):null,Fo(4,4,Vu.bind(null,P,m),B)}function Cs(){}function hu(m,P){var B=an();P=P===void 0?null:P;var K=B.memoizedState;return K!==null&&P!==null&&ho(P,K[1])?K[0]:(B.memoizedState=[m,P],m)}function du(m,P){var B=an();P=P===void 0?null:P;var K=B.memoizedState;return K!==null&&P!==null&&ho(P,K[1])?K[0]:(m=m(),B.memoizedState=[m,P],m)}function pu(m,P,B){return(Wn&21)===0?(m.baseState&&(m.baseState=!1,si=!0),m.memoizedState=B):(Ti(B,P)||(B=xs(),kr.lanes|=B,Ns|=B,m.baseState=!0),P)}function bc(m,P){var B=It;It=B!==0&&4>B?B:4,m(!0);var K=Lo.transition;Lo.transition={};try{m(!1),P()}finally{It=B,Lo.transition=K}}function il(){return an().memoizedState}function Bf(m,P,B){var K=ci(m);if(B={lane:K,action:B,hasEagerState:!1,eagerState:null,next:null},qf(m))lf(P,B);else if(B=bl(m,P,B,K),B!==null){var re=gn();oa(B,m,K,re),Gu(B,P,K)}}function qh(m,P,B){var K=ci(m),re={lane:K,action:B,hasEagerState:!1,eagerState:null,next:null};if(qf(m))lf(P,re);else{var le=m.alternate;if(m.lanes===0&&(le===null||le.lanes===0)&&(le=P.lastRenderedReducer,le!==null))try{var Se=P.lastRenderedState,Xe=le(Se,B);if(re.hasEagerState=!0,re.eagerState=Xe,Ti(Xe,Se)){var ut=P.interleaved;ut===null?(re.next=re,Js(P)):(re.next=ut.next,ut.next=re),P.interleaved=re;return}}catch{}finally{}B=bl(m,P,re,K),B!==null&&(re=gn(),oa(B,m,K,re),Gu(B,P,K))}}function qf(m){var P=m.alternate;return m===kr||P!==null&&P===kr}function lf(m,P){No=ts=!0;var B=m.pending;B===null?P.next=P:(P.next=B.next,B.next=P),m.pending=P}function Gu(m,P,B){if((B&4194240)!==0){var K=P.lanes;K&=m.pendingLanes,B|=K,P.lanes=B,ja(m,B)}}var ks={readContext:ji,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},Wu={readContext:ji,useCallback:function(m,P){return Bi().memoizedState=[m,P===void 0?null:P],m},useContext:ji,useEffect:sf,useImperativeHandle:function(m,P,B){return B=B!=null?B.concat([m]):null,xl(4194308,4,Vu.bind(null,P,m),B)},useLayoutEffect:function(m,P){return xl(4194308,4,m,P)},useInsertionEffect:function(m,P){return xl(4,2,m,P)},useMemo:function(m,P){var B=Bi();return P=P===void 0?null:P,m=m(),B.memoizedState=[m,P],m},useReducer:function(m,P,B){var K=Bi();return P=B!==void 0?B(P):P,K.memoizedState=K.baseState=P,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:P},K.queue=m,m=m.dispatch=Bf.bind(null,kr,m),[K.memoizedState,m]},useRef:function(m){var P=Bi();return m={current:m},P.memoizedState=m},useState:Sl,useDebugValue:Cs,useDeferredValue:function(m){return Bi().memoizedState=m},useTransition:function(){var m=Sl(!1),P=m[0];return m=bc.bind(null,m[1]),Bi().memoizedState=m,[P,m]},useMutableSource:function(){},useSyncExternalStore:function(m,P,B){var K=kr,re=Bi();if(Zr){if(B===void 0)throw Error(o(407));B=B()}else{if(B=P(),Kr===null)throw Error(o(349));(Wn&30)!==0||Io(K,P,B)}re.memoizedState=B;var le={value:B,getSnapshot:P};return re.queue=le,sf(nl.bind(null,K,le,m),[m]),K.flags|=2048,mi(9,_l.bind(null,K,le,B,P),void 0,null),B},useId:function(){var m=Bi(),P=Kr.identifierPrefix;if(Zr){var B=Ji,K=Qi;B=(K&~(1<<32-fa(K)-1)).toString(32)+B,P=":"+P+"R"+B,B=To++,0<B&&(P+="H"+B.toString(32)),P+=":"}else B=Va++,P=":"+P+"r"+B.toString(32)+":";return m.memoizedState=P},unstable_isNewReconciler:!1},Ol={readContext:ji,useCallback:hu,useContext:ji,useEffect:El,useImperativeHandle:Pl,useInsertionEffect:fu,useLayoutEffect:on,useMemo:du,useReducer:Jr,useRef:Ga,useState:function(){return Jr(_i)},useDebugValue:Cs,useDeferredValue:function(m){var P=an();return pu(P,bn.memoizedState,m)},useTransition:function(){var m=Jr(_i)[0],P=an().memoizedState;return[m,P]},useMutableSource:Mn,useSyncExternalStore:Zn,useId:il,unstable_isNewReconciler:!1},uf={readContext:ji,useCallback:hu,useContext:ji,useEffect:El,useImperativeHandle:Pl,useInsertionEffect:fu,useLayoutEffect:on,useMemo:du,useReducer:Gr,useRef:Ga,useState:function(){return Gr(_i)},useDebugValue:Cs,useDeferredValue:function(m){var P=an();return bn===null?P.memoizedState=m:pu(P,bn.memoizedState,m)},useTransition:function(){var m=Gr(_i)[0],P=an().memoizedState;return[m,P]},useMutableSource:Mn,useSyncExternalStore:Zn,useId:il,unstable_isNewReconciler:!1};function Wa(m,P){if(m&&m.defaultProps){P=i({},P),m=m.defaultProps;for(var B in m)P[B]===void 0&&(P[B]=m[B]);return P}return P}function wc(m,P,B,K){P=m.memoizedState,B=B(K,P),B=B==null?P:i({},P,B),m.memoizedState=B,m.lanes===0&&(m.updateQueue.baseState=B)}var $u={isMounted:function(m){return(m=m._reactInternals)?F(m)===m:!1},enqueueSetState:function(m,P,B){m=m._reactInternals;var K=gn(),re=ci(m),le=Pa(K,re);le.payload=P,B!=null&&(le.callback=B),P=Ha(m,le,re),P!==null&&(oa(P,m,re,K),wi(P,m,re))},enqueueReplaceState:function(m,P,B){m=m._reactInternals;var K=gn(),re=ci(m),le=Pa(K,re);le.tag=1,le.payload=P,B!=null&&(le.callback=B),P=Ha(m,le,re),P!==null&&(oa(P,m,re,K),wi(P,m,re))},enqueueForceUpdate:function(m,P){m=m._reactInternals;var B=gn(),K=ci(m),re=Pa(B,K);re.tag=2,P!=null&&(re.callback=P),P=Ha(m,re,K),P!==null&&(oa(P,m,K,B),wi(P,m,K))}};function zf(m,P,B,K,re,le,Se){return m=m.stateNode,typeof m.shouldComponentUpdate=="function"?m.shouldComponentUpdate(K,le,Se):P.prototype&&P.prototype.isPureReactComponent?!ft(B,K)||!ft(re,le):!0}function Uf(m,P,B){var K=!1,re=nn,le=P.contextType;return typeof le=="object"&&le!==null?le=ji(le):(re=ri(P)?Ma:di.current,K=P.contextTypes,le=(K=K!=null)?Ia(m,re):nn),P=new P(B,le),m.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=$u,m.stateNode=P,P._reactInternals=m,K&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=re,m.__reactInternalMemoizedMaskedChildContext=le),P}function _c(m,P,B,K){m=P.state,typeof P.componentWillReceiveProps=="function"&&P.componentWillReceiveProps(B,K),typeof P.UNSAFE_componentWillReceiveProps=="function"&&P.UNSAFE_componentWillReceiveProps(B,K),P.state!==m&&$u.enqueueReplaceState(P,P.state,null)}function qi(m,P,B,K){var re=m.stateNode;re.props=B,re.state=m.memoizedState,re.refs={},el(m);var le=P.contextType;typeof le=="object"&&le!==null?re.context=ji(le):(le=ri(P)?Ma:di.current,re.context=Ia(m,le)),re.state=m.memoizedState,le=P.getDerivedStateFromProps,typeof le=="function"&&(wc(m,P,le,B),re.state=m.memoizedState),typeof P.getDerivedStateFromProps=="function"||typeof re.getSnapshotBeforeUpdate=="function"||typeof re.UNSAFE_componentWillMount!="function"&&typeof re.componentWillMount!="function"||(P=re.state,typeof re.componentWillMount=="function"&&re.componentWillMount(),typeof re.UNSAFE_componentWillMount=="function"&&re.UNSAFE_componentWillMount(),P!==re.state&&$u.enqueueReplaceState(re,re.state,null),co(m,B,re,K),re.state=m.memoizedState),typeof re.componentDidMount=="function"&&(m.flags|=4194308)}function zi(m,P){try{var B="",K=P;do B+=St(K),K=K.return;while(K);var re=B}catch(le){re=`
|
|
56
|
-
Error generating stack: `+le.message+`
|
|
57
|
-
`+le.stack}return{value:m,source:P,stack:re,digest:null}}function ta(m,P,B){return{value:m,source:null,stack:B??null,digest:P??null}}function po(m,P){try{console.error(P.value)}catch(B){setTimeout(function(){throw B})}}var gu=typeof WeakMap=="function"?WeakMap:Map;function Ui(m,P,B){B=Pa(-1,B),B.tag=3,B.payload={element:null};var K=P.value;return B.callback=function(){Dn||(Dn=!0,Bn=K),po(m,P)},B}function ha(m,P,B){B=Pa(-1,B),B.tag=3;var K=m.type.getDerivedStateFromError;if(typeof K=="function"){var re=P.value;B.payload=function(){return K(re)},B.callback=function(){po(m,P)}}var le=m.stateNode;return le!==null&&typeof le.componentDidCatch=="function"&&(B.callback=function(){po(m,P),typeof K!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var Se=P.stack;this.componentDidCatch(P.value,{componentStack:Se!==null?Se:""})}),B}function Hf(m,P,B){var K=m.pingCache;if(K===null){K=m.pingCache=new gu;var re=new Set;K.set(P,re)}else re=K.get(P),re===void 0&&(re=new Set,K.set(P,re));re.has(B)||(re.add(B),m=Lp.bind(null,m,P,B),P.then(m,m))}function Vf(m){do{var P;if((P=m.tag===13)&&(P=m.memoizedState,P=P!==null?P.dehydrated!==null:!0),P)return m;m=m.return}while(m!==null);return null}function Ls(m,P,B,K,re){return(m.mode&1)===0?(m===P?m.flags|=65536:(m.flags|=128,B.flags|=131072,B.flags&=-52805,B.tag===1&&(B.alternate===null?B.tag=17:(P=Pa(-1,1),P.tag=2,Ha(B,P,1))),B.lanes|=1),m):(m.flags|=65536,m.lanes=re,m)}var vu=s.ReactCurrentOwner,si=!1;function yi(m,P,B,K){P.child=m===null?Pn(P,null,B,K):Sr(P,m.child,B,K)}function Sc(m,P,B,K,re){B=B.render;var le=P.ref;return Qo(P,re),K=Ro(m,P,B,K,le,re),B=Mo(),m!==null&&!si?(P.updateQueue=m.updateQueue,P.flags&=-2053,m.lanes&=~re,ee(m,P,re)):(Zr&&B&&Os(P),P.flags|=1,yi(m,P,K,re),P.child)}function rs(m,P,B,K,re){if(m===null){var le=B.type;return typeof le=="function"&&!Ac(le)&&le.defaultProps===void 0&&B.compare===null&&B.defaultProps===void 0?(P.tag=15,P.type=le,go(m,P,le,K,re)):(m=$f(B.type,null,K,P,P.mode,re),m.ref=P.ref,m.return=P,P.child=m)}if(le=m.child,(m.lanes&re)===0){var Se=le.memoizedProps;if(B=B.compare,B=B!==null?B:ft,B(Se,K)&&m.ref===P.ref)return ee(m,P,re)}return P.flags|=1,m=Eu(le,K),m.ref=P.ref,m.return=P,P.child=m}function go(m,P,B,K,re){if(m!==null){var le=m.memoizedProps;if(ft(le,K)&&m.ref===P.ref)if(si=!1,P.pendingProps=K=le,(m.lanes&re)!==0)(m.flags&131072)!==0&&(si=!0);else return P.lanes=m.lanes,ee(m,P,re)}return ns(m,P,B,K,re)}function Yr(m,P,B){var K=P.pendingProps,re=K.children,le=m!==null?m.memoizedState:null;if(K.mode==="hidden")if((P.mode&1)===0)P.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ar(qo,Qn),Qn|=B;else{if((B&1073741824)===0)return m=le!==null?le.baseLanes|B:B,P.lanes=P.childLanes=1073741824,P.memoizedState={baseLanes:m,cachePool:null,transitions:null},P.updateQueue=null,Ar(qo,Qn),Qn|=m,null;P.memoizedState={baseLanes:0,cachePool:null,transitions:null},K=le!==null?le.baseLanes:B,Ar(qo,Qn),Qn|=K}else le!==null?(K=le.baseLanes|B,P.memoizedState=null):K=B,Ar(qo,Qn),Qn|=K;return yi(m,P,re,B),P.child}function en(m,P){var B=P.ref;(m===null&&B!==null||m!==null&&m.ref!==B)&&(P.flags|=512,P.flags|=2097152)}function ns(m,P,B,K,re){var le=ri(B)?Ma:di.current;return le=Ia(P,le),Qo(P,re),B=Ro(m,P,B,K,le,re),K=Mo(),m!==null&&!si?(P.updateQueue=m.updateQueue,P.flags&=-2053,m.lanes&=~re,ee(m,P,re)):(Zr&&K&&Os(P),P.flags|=1,yi(m,P,B,re),P.child)}function Si(m,P,B,K,re){if(ri(B)){var le=!0;Wo(P)}else le=!1;if(Qo(P,re),P.stateNode===null)U(m,P),Uf(P,B,K),qi(P,B,K,re),K=!0;else if(m===null){var Se=P.stateNode,Xe=P.memoizedProps;Se.props=Xe;var ut=Se.context,kt=B.contextType;typeof kt=="object"&&kt!==null?kt=ji(kt):(kt=ri(B)?Ma:di.current,kt=Ia(P,kt));var Yt=B.getDerivedStateFromProps,br=typeof Yt=="function"||typeof Se.getSnapshotBeforeUpdate=="function";br||typeof Se.UNSAFE_componentWillReceiveProps!="function"&&typeof Se.componentWillReceiveProps!="function"||(Xe!==K||ut!==kt)&&_c(P,Se,K,kt),Qr=!1;var qt=P.memoizedState;Se.state=qt,co(P,K,Se,re),ut=P.memoizedState,Xe!==K||qt!==ut||Li.current||Qr?(typeof Yt=="function"&&(wc(P,B,Yt,K),ut=P.memoizedState),(Xe=Qr||zf(P,B,Xe,K,qt,ut,kt))?(br||typeof Se.UNSAFE_componentWillMount!="function"&&typeof Se.componentWillMount!="function"||(typeof Se.componentWillMount=="function"&&Se.componentWillMount(),typeof Se.UNSAFE_componentWillMount=="function"&&Se.UNSAFE_componentWillMount()),typeof Se.componentDidMount=="function"&&(P.flags|=4194308)):(typeof Se.componentDidMount=="function"&&(P.flags|=4194308),P.memoizedProps=K,P.memoizedState=ut),Se.props=K,Se.state=ut,Se.context=kt,K=Xe):(typeof Se.componentDidMount=="function"&&(P.flags|=4194308),K=!1)}else{Se=P.stateNode,wl(m,P),Xe=P.memoizedProps,kt=P.type===P.elementType?Xe:Wa(P.type,Xe),Se.props=kt,br=P.pendingProps,qt=Se.context,ut=B.contextType,typeof ut=="object"&&ut!==null?ut=ji(ut):(ut=ri(B)?Ma:di.current,ut=Ia(P,ut));var kn=B.getDerivedStateFromProps;(Yt=typeof kn=="function"||typeof Se.getSnapshotBeforeUpdate=="function")||typeof Se.UNSAFE_componentWillReceiveProps!="function"&&typeof Se.componentWillReceiveProps!="function"||(Xe!==br||qt!==ut)&&_c(P,Se,K,ut),Qr=!1,qt=P.memoizedState,Se.state=qt,co(P,K,Se,re);var dn=P.memoizedState;Xe!==br||qt!==dn||Li.current||Qr?(typeof kn=="function"&&(wc(P,B,kn,K),dn=P.memoizedState),(kt=Qr||zf(P,B,kt,K,qt,dn,ut)||!1)?(Yt||typeof Se.UNSAFE_componentWillUpdate!="function"&&typeof Se.componentWillUpdate!="function"||(typeof Se.componentWillUpdate=="function"&&Se.componentWillUpdate(K,dn,ut),typeof Se.UNSAFE_componentWillUpdate=="function"&&Se.UNSAFE_componentWillUpdate(K,dn,ut)),typeof Se.componentDidUpdate=="function"&&(P.flags|=4),typeof Se.getSnapshotBeforeUpdate=="function"&&(P.flags|=1024)):(typeof Se.componentDidUpdate!="function"||Xe===m.memoizedProps&&qt===m.memoizedState||(P.flags|=4),typeof Se.getSnapshotBeforeUpdate!="function"||Xe===m.memoizedProps&&qt===m.memoizedState||(P.flags|=1024),P.memoizedProps=K,P.memoizedState=dn),Se.props=K,Se.state=dn,Se.context=ut,K=kt):(typeof Se.componentDidUpdate!="function"||Xe===m.memoizedProps&&qt===m.memoizedState||(P.flags|=4),typeof Se.getSnapshotBeforeUpdate!="function"||Xe===m.memoizedProps&&qt===m.memoizedState||(P.flags|=1024),K=!1)}return ra(m,P,B,K,le,re)}function ra(m,P,B,K,re,le){en(m,P);var Se=(P.flags&128)!==0;if(!K&&!Se)return re&&nu(P,B,!1),ee(m,P,le);K=P.stateNode,vu.current=P;var Xe=Se&&typeof B.getDerivedStateFromError!="function"?null:K.render();return P.flags|=1,m!==null&&Se?(P.child=Sr(P,m.child,null,le),P.child=Sr(P,null,Xe,le)):yi(m,P,Xe,le),P.memoizedState=K.state,re&&nu(P,B,!0),P.child}function al(m){var P=m.stateNode;P.pendingContext?pl(m,P.pendingContext,P.pendingContext!==P.context):P.context&&pl(m,P.context,!1),Jo(m,P.containerInfo)}function Al(m,P,B,K,re){return Ce(),De(re),P.flags|=256,yi(m,P,B,K),P.child}var na={dehydrated:null,treeContext:null,retryLane:0};function mu(m){return{baseLanes:m,cachePool:null,transitions:null}}function cf(m,P,B){var K=P.pendingProps,re=Vr.current,le=!1,Se=(P.flags&128)!==0,Xe;if((Xe=Se)||(Xe=m!==null&&m.memoizedState===null?!1:(re&2)!==0),Xe?(le=!0,P.flags&=-129):(m===null||m.memoizedState!==null)&&(re|=1),Ar(Vr,re&1),m===null)return Ko(P),m=P.memoizedState,m!==null&&(m=m.dehydrated,m!==null)?((P.mode&1)===0?P.lanes=1:Zt(m)?P.lanes=8:P.lanes=1073741824,null):(Se=K.children,m=K.fallback,le?(K=P.mode,le=P.child,Se={mode:"hidden",children:Se},(K&1)===0&&le!==null?(le.childLanes=0,le.pendingProps=Se):le=Cc(Se,K,0,null),m=ga(m,K,B,null),le.return=P,m.return=P,le.sibling=m,P.child=le,P.child.memoizedState=mu(B),P.memoizedState=na,m):Yu(P,Se));if(re=m.memoizedState,re!==null&&(Xe=re.dehydrated,Xe!==null))return Gf(m,P,Se,K,Xe,re,B);if(le){le=K.fallback,Se=P.mode,re=m.child,Xe=re.sibling;var ut={mode:"hidden",children:K.children};return(Se&1)===0&&P.child!==re?(K=P.child,K.childLanes=0,K.pendingProps=ut,P.deletions=null):(K=Eu(re,ut),K.subtreeFlags=re.subtreeFlags&14680064),Xe!==null?le=Eu(Xe,le):(le=ga(le,Se,B,null),le.flags|=2),le.return=P,K.return=P,K.sibling=le,P.child=K,K=le,le=P.child,Se=m.child.memoizedState,Se=Se===null?mu(B):{baseLanes:Se.baseLanes|B,cachePool:null,transitions:Se.transitions},le.memoizedState=Se,le.childLanes=m.childLanes&~B,P.memoizedState=na,K}return le=m.child,m=le.sibling,K=Eu(le,{mode:"visible",children:K.children}),(P.mode&1)===0&&(K.lanes=B),K.return=P,K.sibling=null,m!==null&&(B=P.deletions,B===null?(P.deletions=[m],P.flags|=16):B.push(m)),P.child=K,P.memoizedState=null,K}function Yu(m,P){return P=Cc({mode:"visible",children:P},m.mode,0,null),P.return=m,m.child=P}function is(m,P,B,K){return K!==null&&De(K),Sr(P,m.child,null,B),m=Yu(P,P.pendingProps.children),m.flags|=2,P.memoizedState=null,m}function Gf(m,P,B,K,re,le,Se){if(B)return P.flags&256?(P.flags&=-257,K=ta(Error(o(422))),is(m,P,Se,K)):P.memoizedState!==null?(P.child=m.child,P.flags|=128,null):(le=K.fallback,re=P.mode,K=Cc({mode:"visible",children:K.children},re,0,null),le=ga(le,re,Se,null),le.flags|=2,K.return=P,le.return=P,K.sibling=le,P.child=K,(P.mode&1)!==0&&Sr(P,m.child,null,Se),P.child.memoizedState=mu(Se),P.memoizedState=na,le);if((P.mode&1)===0)return is(m,P,Se,null);if(Zt(re))return K=rr(re).digest,le=Error(o(419)),K=ta(le,K,void 0),is(m,P,Se,K);if(B=(Se&m.childLanes)!==0,si||B){if(K=Kr,K!==null){switch(Se&-Se){case 4:re=2;break;case 16:re=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:re=32;break;case 536870912:re=268435456;break;default:re=0}re=(re&(K.suspendedLanes|Se))!==0?0:re,re!==0&&re!==le.retryLane&&(le.retryLane=re,ea(m,re),oa(K,m,re,-1))}return Ja(),K=ta(Error(o(421))),is(m,P,Se,K)}return Wt(re)?(P.flags|=128,P.child=m.child,P=Tp.bind(null,m),_r(re,P),null):(m=le.treeContext,ke&&(pi=Ci(re),Gn=P,Zr=!0,qa=null,Qs=!1,m!==null&&(vn[Ii++]=Qi,vn[Ii++]=Ji,vn[Ii++]=mn,Qi=m.id,Ji=m.overflow,mn=P)),P=Yu(P,K.children),P.flags|=4096,P)}function as(m,P,B){m.lanes|=P;var K=m.alternate;K!==null&&(K.lanes|=P),Zo(m.return,P,B)}function Cl(m,P,B,K,re){var le=m.memoizedState;le===null?m.memoizedState={isBackwards:P,rendering:null,renderingStartTime:0,last:K,tail:B,tailMode:re}:(le.isBackwards=P,le.rendering=null,le.renderingStartTime=0,le.last=K,le.tail=B,le.tailMode=re)}function R(m,P,B){var K=P.pendingProps,re=K.revealOrder,le=K.tail;if(yi(m,P,K.children,B),K=Vr.current,(K&2)!==0)K=K&1|2,P.flags|=128;else{if(m!==null&&(m.flags&128)!==0)e:for(m=P.child;m!==null;){if(m.tag===13)m.memoizedState!==null&&as(m,B,P);else if(m.tag===19)as(m,B,P);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===P)break e;for(;m.sibling===null;){if(m.return===null||m.return===P)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}K&=1}if(Ar(Vr,K),(P.mode&1)===0)P.memoizedState=null;else switch(re){case"forwards":for(B=P.child,re=null;B!==null;)m=B.alternate,m!==null&&fo(m)===null&&(re=B),B=B.sibling;B=re,B===null?(re=P.child,P.child=null):(re=B.sibling,B.sibling=null),Cl(P,!1,re,B,le);break;case"backwards":for(B=null,re=P.child,P.child=null;re!==null;){if(m=re.alternate,m!==null&&fo(m)===null){P.child=re;break}m=re.sibling,re.sibling=B,B=re,re=m}Cl(P,!0,B,null,le);break;case"together":Cl(P,!1,null,null,void 0);break;default:P.memoizedState=null}return P.child}function U(m,P){(P.mode&1)===0&&m!==null&&(m.alternate=null,P.alternate=null,P.flags|=2)}function ee(m,P,B){if(m!==null&&(P.dependencies=m.dependencies),Ns|=P.lanes,(B&P.childLanes)===0)return null;if(m!==null&&P.child!==m.child)throw Error(o(153));if(P.child!==null){for(m=P.child,B=Eu(m,m.pendingProps),P.child=B,B.return=P;m.sibling!==null;)m=m.sibling,B=B.sibling=Eu(m,m.pendingProps),B.return=P;B.sibling=null}return P.child}function ae(m,P,B){switch(P.tag){case 3:al(P),Ce();break;case 5:Di(P);break;case 1:ri(P.type)&&Wo(P);break;case 4:Jo(P,P.stateNode.containerInfo);break;case 10:xa(P,P.type._context,P.memoizedProps.value);break;case 13:var K=P.memoizedState;if(K!==null)return K.dehydrated!==null?(Ar(Vr,Vr.current&1),P.flags|=128,null):(B&P.child.childLanes)!==0?cf(m,P,B):(Ar(Vr,Vr.current&1),m=ee(m,P,B),m!==null?m.sibling:null);Ar(Vr,Vr.current&1);break;case 19:if(K=(B&P.childLanes)!==0,(m.flags&128)!==0){if(K)return R(m,P,B);P.flags|=128}var re=P.memoizedState;if(re!==null&&(re.rendering=null,re.tail=null,re.lastEffect=null),Ar(Vr,Vr.current),K)break;return null;case 22:case 23:return P.lanes=0,Yr(m,P,B)}return ee(m,P,B)}function ce(m){m.flags|=4}function he(m,P){if(m!==null&&m.child===P.child)return!0;if((P.flags&16)!==0)return!1;for(m=P.child;m!==null;){if((m.flags&12854)!==0||(m.subtreeFlags&12854)!==0)return!1;m=m.sibling}return!0}var pe,be,we,Ee;if(ve)pe=function(m,P){for(var B=P.child;B!==null;){if(B.tag===5||B.tag===6)q(m,B.stateNode);else if(B.tag!==4&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===P)break;for(;B.sibling===null;){if(B.return===null||B.return===P)return;B=B.return}B.sibling.return=B.return,B=B.sibling}},be=function(){},we=function(m,P,B,K,re){if(m=m.memoizedProps,m!==K){var le=P.stateNode,Se=vi(Fi.current);B=$(le,B,m,K,re,Se),(P.updateQueue=B)&&ce(P)}},Ee=function(m,P,B,K){B!==K&&ce(P)};else if(Pe){pe=function(m,P,B,K){for(var re=P.child;re!==null;){if(re.tag===5){var le=re.stateNode;B&&K&&(le=Je(le,re.type,re.memoizedProps,re)),q(m,le)}else if(re.tag===6)le=re.stateNode,B&&K&&(le=_t(le,re.memoizedProps,re)),q(m,le);else if(re.tag!==4){if(re.tag===22&&re.memoizedState!==null)le=re.child,le!==null&&(le.return=re),pe(m,re,!0,!0);else if(re.child!==null){re.child.return=re,re=re.child;continue}}if(re===P)break;for(;re.sibling===null;){if(re.return===null||re.return===P)return;re=re.return}re.sibling.return=re.return,re=re.sibling}};var Be=function(m,P,B,K){for(var re=P.child;re!==null;){if(re.tag===5){var le=re.stateNode;B&&K&&(le=Je(le,re.type,re.memoizedProps,re)),qe(m,le)}else if(re.tag===6)le=re.stateNode,B&&K&&(le=_t(le,re.memoizedProps,re)),qe(m,le);else if(re.tag!==4){if(re.tag===22&&re.memoizedState!==null)le=re.child,le!==null&&(le.return=re),Be(m,re,!0,!0);else if(re.child!==null){re.child.return=re,re=re.child;continue}}if(re===P)break;for(;re.sibling===null;){if(re.return===null||re.return===P)return;re=re.return}re.sibling.return=re.return,re=re.sibling}};be=function(m,P){var B=P.stateNode;if(!he(m,P)){m=B.containerInfo;var K=ze(m);Be(K,P,!1,!1),B.pendingChildren=K,ce(P),vt(m,K)}},we=function(m,P,B,K,re){var le=m.stateNode,Se=m.memoizedProps;if((m=he(m,P))&&Se===K)P.stateNode=le;else{var Xe=P.stateNode,ut=vi(Fi.current),kt=null;Se!==K&&(kt=$(Xe,B,Se,K,re,ut)),m&&kt===null?P.stateNode=le:(le=Qt(le,kt,B,Se,K,P,m,Xe),D(le,B,K,re,ut)&&ce(P),P.stateNode=le,m?ce(P):pe(le,P,!1,!1))}},Ee=function(m,P,B,K){B!==K?(m=vi(Co.current),B=vi(Fi.current),P.stateNode=Z(K,m,B,P),ce(P)):P.stateNode=m.stateNode}}else be=function(){},we=function(){},Ee=function(){};function Qe(m,P){if(!Zr)switch(m.tailMode){case"hidden":P=m.tail;for(var B=null;P!==null;)P.alternate!==null&&(B=P),P=P.sibling;B===null?m.tail=null:B.sibling=null;break;case"collapsed":B=m.tail;for(var K=null;B!==null;)B.alternate!==null&&(K=B),B=B.sibling;K===null?P||m.tail===null?m.tail=null:m.tail.sibling=null:K.sibling=null}}function $e(m){var P=m.alternate!==null&&m.alternate.child===m.child,B=0,K=0;if(P)for(var re=m.child;re!==null;)B|=re.lanes|re.childLanes,K|=re.subtreeFlags&14680064,K|=re.flags&14680064,re.return=m,re=re.sibling;else for(re=m.child;re!==null;)B|=re.lanes|re.childLanes,K|=re.subtreeFlags,K|=re.flags,re.return=m,re=re.sibling;return m.subtreeFlags|=K,m.childLanes=B,P}function We(m,P,B){var K=P.pendingProps;switch(Zs(P),P.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(P),null;case 1:return ri(P.type)&&Ni(),$e(P),null;case 3:return B=P.stateNode,oi(),$r(Li),$r(di),ko(),B.pendingContext&&(B.context=B.pendingContext,B.pendingContext=null),(m===null||m.child===null)&&(X(P)?ce(P):m===null||m.memoizedState.isDehydrated&&(P.flags&256)===0||(P.flags|=1024,qa!==null&&(Ku(qa),qa=null))),be(m,P),$e(P),null;case 5:es(P),B=vi(Co.current);var re=P.type;if(m!==null&&P.stateNode!=null)we(m,P,re,K,B),m.ref!==P.ref&&(P.flags|=512,P.flags|=2097152);else{if(!K){if(P.stateNode===null)throw Error(o(166));return $e(P),null}if(m=vi(Fi.current),X(P)){if(!ke)throw Error(o(175));m=En(P.stateNode,P.type,P.memoizedProps,B,m,P,!Qs),P.updateQueue=m,m!==null&&ce(P)}else{var le=H(re,K,B,m,P);pe(le,P,!1,!1),P.stateNode=le,D(le,re,K,B,m)&&ce(P)}P.ref!==null&&(P.flags|=512,P.flags|=2097152)}return $e(P),null;case 6:if(m&&P.stateNode!=null)Ee(m,P,m.memoizedProps,K);else{if(typeof K!="string"&&P.stateNode===null)throw Error(o(166));if(m=vi(Co.current),B=vi(Fi.current),X(P)){if(!ke)throw Error(o(176));if(m=P.stateNode,B=P.memoizedProps,(K=ki(m,B,P,!Qs))&&(re=Gn,re!==null))switch(re.tag){case 3:mc(re.stateNode.containerInfo,m,B,(re.mode&1)!==0);break;case 5:Nn(re.type,re.memoizedProps,re.stateNode,m,B,(re.mode&1)!==0)}K&&ce(P)}else P.stateNode=Z(K,m,B,P)}return $e(P),null;case 13:if($r(Vr),K=P.memoizedState,m===null||m.memoizedState!==null&&m.memoizedState.dehydrated!==null){if(Zr&&pi!==null&&(P.mode&1)!==0&&(P.flags&128)===0)fe(),Ce(),P.flags|=98560,re=!1;else if(re=X(P),K!==null&&K.dehydrated!==null){if(m===null){if(!re)throw Error(o(318));if(!ke)throw Error(o(344));if(re=P.memoizedState,re=re!==null?re.dehydrated:null,!re)throw Error(o(317));bi(re,P)}else Ce(),(P.flags&128)===0&&(P.memoizedState=null),P.flags|=4;$e(P),re=!1}else qa!==null&&(Ku(qa),qa=null),re=!0;if(!re)return P.flags&65536?P:null}return(P.flags&128)!==0?(P.lanes=B,P):(B=K!==null,B!==(m!==null&&m.memoizedState!==null)&&B&&(P.child.flags|=8192,(P.mode&1)!==0&&(m===null||(Vr.current&1)!==0?sn===0&&(sn=3):Ja())),P.updateQueue!==null&&(P.flags|=4),$e(P),null);case 4:return oi(),be(m,P),m===null&&xe(P.stateNode.containerInfo),$e(P),null;case 10:return Ea(P.type._context),$e(P),null;case 17:return ri(P.type)&&Ni(),$e(P),null;case 19:if($r(Vr),re=P.memoizedState,re===null)return $e(P),null;if(K=(P.flags&128)!==0,le=re.rendering,le===null)if(K)Qe(re,!1);else{if(sn!==0||m!==null&&(m.flags&128)!==0)for(m=P.child;m!==null;){if(le=fo(m),le!==null){for(P.flags|=128,Qe(re,!1),m=le.updateQueue,m!==null&&(P.updateQueue=m,P.flags|=4),P.subtreeFlags=0,m=B,B=P.child;B!==null;)K=B,re=m,K.flags&=14680066,le=K.alternate,le===null?(K.childLanes=0,K.lanes=re,K.child=null,K.subtreeFlags=0,K.memoizedProps=null,K.memoizedState=null,K.updateQueue=null,K.dependencies=null,K.stateNode=null):(K.childLanes=le.childLanes,K.lanes=le.lanes,K.child=le.child,K.subtreeFlags=0,K.deletions=null,K.memoizedProps=le.memoizedProps,K.memoizedState=le.memoizedState,K.updateQueue=le.updateQueue,K.type=le.type,re=le.dependencies,K.dependencies=re===null?null:{lanes:re.lanes,firstContext:re.firstContext}),B=B.sibling;return Ar(Vr,Vr.current&1|2),P.child}m=m.sibling}re.tail!==null&&Tn()>_u&&(P.flags|=128,K=!0,Qe(re,!1),P.lanes=4194304)}else{if(!K)if(m=fo(le),m!==null){if(P.flags|=128,K=!0,m=m.updateQueue,m!==null&&(P.updateQueue=m,P.flags|=4),Qe(re,!0),re.tail===null&&re.tailMode==="hidden"&&!le.alternate&&!Zr)return $e(P),null}else 2*Tn()-re.renderingStartTime>_u&&B!==1073741824&&(P.flags|=128,K=!0,Qe(re,!1),P.lanes=4194304);re.isBackwards?(le.sibling=P.child,P.child=le):(m=re.last,m!==null?m.sibling=le:P.child=le,re.last=le)}return re.tail!==null?(P=re.tail,re.rendering=P,re.tail=P.sibling,re.renderingStartTime=Tn(),P.sibling=null,m=Vr.current,Ar(Vr,K?m&1|2:m&1),P):($e(P),null);case 22:case 23:return xu(),B=P.memoizedState!==null,m!==null&&m.memoizedState!==null!==B&&(P.flags|=8192),B&&(P.mode&1)!==0?(Qn&1073741824)!==0&&($e(P),ve&&P.subtreeFlags&6&&(P.flags|=8192)):$e(P),null;case 24:return null;case 25:return null}throw Error(o(156,P.tag))}function wt(m,P){switch(Zs(P),P.tag){case 1:return ri(P.type)&&Ni(),m=P.flags,m&65536?(P.flags=m&-65537|128,P):null;case 3:return oi(),$r(Li),$r(di),ko(),m=P.flags,(m&65536)!==0&&(m&128)===0?(P.flags=m&-65537|128,P):null;case 5:return es(P),null;case 13:if($r(Vr),m=P.memoizedState,m!==null&&m.dehydrated!==null){if(P.alternate===null)throw Error(o(340));Ce()}return m=P.flags,m&65536?(P.flags=m&-65537|128,P):null;case 19:return $r(Vr),null;case 4:return oi(),null;case 10:return Ea(P.type._context),null;case 22:case 23:return xu(),null;case 24:return null;default:return null}}var lt=!1,je=!1,He=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function ct(m,P){var B=m.ref;if(B!==null)if(typeof B=="function")try{B(null)}catch(K){zn(m,P,K)}else B.current=null}function gt(m,P,B){try{B()}catch(K){zn(m,P,K)}}var Bt=!1;function jt(m,P){for(te(m.containerInfo),Ve=P;Ve!==null;)if(m=Ve,P=m.child,(m.subtreeFlags&1028)!==0&&P!==null)P.return=m,Ve=P;else for(;Ve!==null;){m=Ve;try{var B=m.alternate;if((m.flags&1024)!==0)switch(m.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var K=B.memoizedProps,re=B.memoizedState,le=m.stateNode,Se=le.getSnapshotBeforeUpdate(m.elementType===m.type?K:Wa(m.type,K),re);le.__reactInternalSnapshotBeforeUpdate=Se}break;case 3:ve&&fr(m.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Xe){zn(m,m.return,Xe)}if(P=m.sibling,P!==null){P.return=m.return,Ve=P;break}Ve=m.return}return B=Bt,Bt=!1,B}function ir(m,P,B){var K=P.updateQueue;if(K=K!==null?K.lastEffect:null,K!==null){var re=K=K.next;do{if((re.tag&m)===m){var le=re.destroy;re.destroy=void 0,le!==void 0&>(P,B,le)}re=re.next}while(re!==K)}}function Rt(m,P){if(P=P.updateQueue,P=P!==null?P.lastEffect:null,P!==null){var B=P=P.next;do{if((B.tag&m)===m){var K=B.create;B.destroy=K()}B=B.next}while(B!==P)}}function Mr(m){var P=m.ref;if(P!==null){var B=m.stateNode;switch(m.tag){case 5:m=G(B);break;default:m=B}typeof P=="function"?P(m):P.current=m}}function Fr(m){var P=m.alternate;P!==null&&(m.alternate=null,Fr(P)),m.child=null,m.deletions=null,m.sibling=null,m.tag===5&&(P=m.stateNode,P!==null&&Ie(P)),m.stateNode=null,m.return=null,m.dependencies=null,m.memoizedProps=null,m.memoizedState=null,m.pendingProps=null,m.stateNode=null,m.updateQueue=null}function Lr(m){return m.tag===5||m.tag===3||m.tag===4}function yr(m){e:for(;;){for(;m.sibling===null;){if(m.return===null||Lr(m.return))return null;m=m.return}for(m.sibling.return=m.return,m=m.sibling;m.tag!==5&&m.tag!==6&&m.tag!==18;){if(m.flags&2||m.child===null||m.tag===4)continue e;m.child.return=m,m=m.child}if(!(m.flags&2))return m.stateNode}}function Wr(m,P,B){var K=m.tag;if(K===5||K===6)m=m.stateNode,P?Ut(B,m,P):bt(B,m);else if(K!==4&&(m=m.child,m!==null))for(Wr(m,P,B),m=m.sibling;m!==null;)Wr(m,P,B),m=m.sibling}function Xr(m,P,B){var K=m.tag;if(K===5||K===6)m=m.stateNode,P?Ot(B,m,P):at(B,m);else if(K!==4&&(m=m.child,m!==null))for(Xr(m,P,B),m=m.sibling;m!==null;)Xr(m,P,B),m=m.sibling}var Xt=null,Dr=!1;function An(m,P,B){for(B=B.child;B!==null;)In(m,P,B),B=B.sibling}function In(m,P,B){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(uo,B)}catch{}switch(B.tag){case 5:je||ct(B,P);case 6:if(ve){var K=Xt,re=Dr;Xt=null,An(m,P,B),Xt=K,Dr=re,Xt!==null&&(Dr?Oe(Xt,B.stateNode):$t(Xt,B.stateNode))}else An(m,P,B);break;case 18:ve&&Xt!==null&&(Dr?Go(Xt,B.stateNode):ws(Xt,B.stateNode));break;case 4:ve?(K=Xt,re=Dr,Xt=B.stateNode.containerInfo,Dr=!0,An(m,P,B),Xt=K,Dr=re):(Pe&&(K=B.stateNode.containerInfo,re=ze(K),pt(K,re)),An(m,P,B));break;case 0:case 11:case 14:case 15:if(!je&&(K=B.updateQueue,K!==null&&(K=K.lastEffect,K!==null))){re=K=K.next;do{var le=re,Se=le.destroy;le=le.tag,Se!==void 0&&((le&2)!==0||(le&4)!==0)&>(B,P,Se),re=re.next}while(re!==K)}An(m,P,B);break;case 1:if(!je&&(ct(B,P),K=B.stateNode,typeof K.componentWillUnmount=="function"))try{K.props=B.memoizedProps,K.state=B.memoizedState,K.componentWillUnmount()}catch(Xe){zn(B,P,Xe)}An(m,P,B);break;case 21:An(m,P,B);break;case 22:B.mode&1?(je=(K=je)||B.memoizedState!==null,An(m,P,B),je=K):An(m,P,B);break;default:An(m,P,B)}}function li(m){var P=m.updateQueue;if(P!==null){m.updateQueue=null;var B=m.stateNode;B===null&&(B=m.stateNode=new He),P.forEach(function(K){var re=h0.bind(null,m,K);B.has(K)||(B.add(K),K.then(re,re))})}}function xr(m,P){var B=P.deletions;if(B!==null)for(var K=0;K<B.length;K++){var re=B[K];try{var le=m,Se=P;if(ve){var Xe=Se;e:for(;Xe!==null;){switch(Xe.tag){case 5:Xt=Xe.stateNode,Dr=!1;break e;case 3:Xt=Xe.stateNode.containerInfo,Dr=!0;break e;case 4:Xt=Xe.stateNode.containerInfo,Dr=!0;break e}Xe=Xe.return}if(Xt===null)throw Error(o(160));In(le,Se,re),Xt=null,Dr=!1}else In(le,Se,re);var ut=re.alternate;ut!==null&&(ut.return=null),re.return=null}catch(kt){zn(re,P,kt)}}if(P.subtreeFlags&12854)for(P=P.child;P!==null;)Hi(P,m),P=P.sibling}function Hi(m,P){var B=m.alternate,K=m.flags;switch(m.tag){case 0:case 11:case 14:case 15:if(xr(P,m),wn(m),K&4){try{ir(3,m,m.return),Rt(3,m)}catch(qt){zn(m,m.return,qt)}try{ir(5,m,m.return)}catch(qt){zn(m,m.return,qt)}}break;case 1:xr(P,m),wn(m),K&512&&B!==null&&ct(B,B.return);break;case 5:if(xr(P,m),wn(m),K&512&&B!==null&&ct(B,B.return),ve){if(m.flags&32){var re=m.stateNode;try{Me(re)}catch(qt){zn(m,m.return,qt)}}if(K&4&&(re=m.stateNode,re!=null)){var le=m.memoizedProps;if(B=B!==null?B.memoizedProps:le,K=m.type,P=m.updateQueue,m.updateQueue=null,P!==null)try{zt(re,P,K,B,le,m)}catch(qt){zn(m,m.return,qt)}}}break;case 6:if(xr(P,m),wn(m),K&4&&ve){if(m.stateNode===null)throw Error(o(162));re=m.stateNode,le=m.memoizedProps,B=B!==null?B.memoizedProps:le;try{yt(re,B,le)}catch(qt){zn(m,m.return,qt)}}break;case 3:if(xr(P,m),wn(m),K&4){if(ve&&ke&&B!==null&&B.memoizedState.isDehydrated)try{ua(P.containerInfo)}catch(qt){zn(m,m.return,qt)}if(Pe){re=P.containerInfo,le=P.pendingChildren;try{pt(re,le)}catch(qt){zn(m,m.return,qt)}}}break;case 4:if(xr(P,m),wn(m),K&4&&Pe){le=m.stateNode,re=le.containerInfo,le=le.pendingChildren;try{pt(re,le)}catch(qt){zn(m,m.return,qt)}}break;case 13:xr(P,m),wn(m),re=m.child,re.flags&8192&&(le=re.memoizedState!==null,re.stateNode.isHidden=le,!le||re.alternate!==null&&re.alternate.memoizedState!==null||(wu=Tn())),K&4&&li(m);break;case 22:var Se=B!==null&&B.memoizedState!==null;if(m.mode&1?(je=(B=je)||Se,xr(P,m),je=B):xr(P,m),wn(m),K&8192){if(B=m.memoizedState!==null,(m.stateNode.isHidden=B)&&!Se&&(m.mode&1)!==0)for(Ve=m,K=m.child;K!==null;){for(P=Ve=K;Ve!==null;){Se=Ve;var Xe=Se.child;switch(Se.tag){case 0:case 11:case 14:case 15:ir(4,Se,Se.return);break;case 1:ct(Se,Se.return);var ut=Se.stateNode;if(typeof ut.componentWillUnmount=="function"){var kt=Se,Yt=Se.return;try{var br=kt;ut.props=br.memoizedProps,ut.state=br.memoizedState,ut.componentWillUnmount()}catch(qt){zn(kt,Yt,qt)}}break;case 5:ct(Se,Se.return);break;case 22:if(Se.memoizedState!==null){da(P);continue}}Xe!==null?(Xe.return=Se,Ve=Xe):da(P)}K=K.sibling}if(ve){e:if(K=null,ve)for(P=m;;){if(P.tag===5){if(K===null){K=P;try{re=P.stateNode,B?mt(re):Lt(P.stateNode,P.memoizedProps)}catch(qt){zn(m,m.return,qt)}}}else if(P.tag===6){if(K===null)try{le=P.stateNode,B?Mt(le):At(le,P.memoizedProps)}catch(qt){zn(m,m.return,qt)}}else if((P.tag!==22&&P.tag!==23||P.memoizedState===null||P===m)&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===m)break e;for(;P.sibling===null;){if(P.return===null||P.return===m)break e;K===P&&(K=null),P=P.return}K===P&&(K=null),P.sibling.return=P.return,P=P.sibling}}}break;case 19:xr(P,m),wn(m),K&4&&li(m);break;case 21:break;default:xr(P,m),wn(m)}}function wn(m){var P=m.flags;if(P&2){try{if(ve){e:{for(var B=m.return;B!==null;){if(Lr(B)){var K=B;break e}B=B.return}throw Error(o(160))}switch(K.tag){case 5:var re=K.stateNode;K.flags&32&&(Me(re),K.flags&=-33);var le=yr(m);Xr(m,le,re);break;case 3:case 4:var Se=K.stateNode.containerInfo,Xe=yr(m);Wr(m,Xe,Se);break;default:throw Error(o(161))}}}catch(ut){zn(m,m.return,ut)}m.flags&=-3}P&4096&&(m.flags&=-4097)}function jn(m,P,B){Ve=m,ui(m)}function ui(m,P,B){for(var K=(m.mode&1)!==0;Ve!==null;){var re=Ve,le=re.child;if(re.tag===22&&K){var Se=re.memoizedState!==null||lt;if(!Se){var Xe=re.alternate,ut=Xe!==null&&Xe.memoizedState!==null||je;Xe=lt;var kt=je;if(lt=Se,(je=ut)&&!kt)for(Ve=re;Ve!==null;)Se=Ve,ut=Se.child,Se.tag===22&&Se.memoizedState!==null?$a(re):ut!==null?(ut.return=Se,Ve=ut):$a(re);for(;le!==null;)Ve=le,ui(le),le=le.sibling;Ve=re,lt=Xe,je=kt}xi(m)}else(re.subtreeFlags&8772)!==0&&le!==null?(le.return=re,Ve=le):xi(m)}}function xi(m){for(;Ve!==null;){var P=Ve;if((P.flags&8772)!==0){var B=P.alternate;try{if((P.flags&8772)!==0)switch(P.tag){case 0:case 11:case 15:je||Rt(5,P);break;case 1:var K=P.stateNode;if(P.flags&4&&!je)if(B===null)K.componentDidMount();else{var re=P.elementType===P.type?B.memoizedProps:Wa(P.type,B.memoizedProps);K.componentDidUpdate(re,B.memoizedState,K.__reactInternalSnapshotBeforeUpdate)}var le=P.updateQueue;le!==null&&Hu(P,le,K);break;case 3:var Se=P.updateQueue;if(Se!==null){if(B=null,P.child!==null)switch(P.child.tag){case 5:B=G(P.child.stateNode);break;case 1:B=P.child.stateNode}Hu(P,Se,B)}break;case 5:var Xe=P.stateNode;B===null&&P.flags&4&&ht(Xe,P.type,P.memoizedProps,P);break;case 6:break;case 4:break;case 12:break;case 13:if(ke&&P.memoizedState===null){var ut=P.alternate;if(ut!==null){var kt=ut.memoizedState;if(kt!==null){var Yt=kt.dehydrated;Yt!==null&&ao(Yt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}je||P.flags&512&&Mr(P)}catch(br){zn(P,P.return,br)}}if(P===m){Ve=null;break}if(B=P.sibling,B!==null){B.return=P.return,Ve=B;break}Ve=P.return}}function da(m){for(;Ve!==null;){var P=Ve;if(P===m){Ve=null;break}var B=P.sibling;if(B!==null){B.return=P.return,Ve=B;break}Ve=P.return}}function $a(m){for(;Ve!==null;){var P=Ve;try{switch(P.tag){case 0:case 11:case 15:var B=P.return;try{Rt(4,P)}catch(ut){zn(P,B,ut)}break;case 1:var K=P.stateNode;if(typeof K.componentDidMount=="function"){var re=P.return;try{K.componentDidMount()}catch(ut){zn(P,re,ut)}}var le=P.return;try{Mr(P)}catch(ut){zn(P,le,ut)}break;case 5:var Se=P.return;try{Mr(P)}catch(ut){zn(P,Se,ut)}}}catch(ut){zn(P,P.return,ut)}if(P===m){Ve=null;break}var Xe=P.sibling;if(Xe!==null){Xe.return=P.return,Ve=Xe;break}Ve=P.return}}var pn=0,Fn=1,ia=2,Do=3,vo=4;if(typeof Symbol=="function"&&Symbol.for){var Ir=Symbol.for;pn=Ir("selector.component"),Fn=Ir("selector.has_pseudo_class"),ia=Ir("selector.role"),Do=Ir("selector.test_id"),vo=Ir("selector.text")}function mo(m){var P=Ne(m);if(P!=null){if(typeof P.memoizedProps["data-testname"]!="string")throw Error(o(364));return P}if(m=Le(m),m===null)throw Error(o(362));return m.stateNode.current}function yu(m,P){switch(P.$$typeof){case pn:if(m.type===P.value)return!0;break;case Fn:e:{P=P.value,m=[m,0];for(var B=0;B<m.length;){var K=m[B++],re=m[B++],le=P[re];if(K.tag!==5||!Fe(K)){for(;le!=null&&yu(K,le);)re++,le=P[re];if(re===P.length){P=!0;break e}else for(K=K.child;K!==null;)m.push(K,re),K=K.sibling}}P=!1}return P;case ia:if(m.tag===5&&Ke(m.stateNode,P.value))return!0;break;case vo:if((m.tag===5||m.tag===6)&&(m=Te(m),m!==null&&0<=m.indexOf(P.value)))return!0;break;case Do:if(m.tag===5&&(m=m.memoizedProps["data-testname"],typeof m=="string"&&m.toLowerCase()===P.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Xu(m){switch(m.$$typeof){case pn:return"<"+(N(m.value)||"Unknown")+">";case Fn:return":has("+(Xu(m)||"")+")";case ia:return'[role="'+m.value+'"]';case vo:return'"'+m.value+'"';case Do:return'[data-testname="'+m.value+'"]';default:throw Error(o(365))}}function Ya(m,P){var B=[];m=[m,0];for(var K=0;K<m.length;){var re=m[K++],le=m[K++],Se=P[le];if(re.tag!==5||!Fe(re)){for(;Se!=null&&yu(re,Se);)le++,Se=P[le];if(le===P.length)B.push(re);else for(re=re.child;re!==null;)m.push(re,le),re=re.sibling}}return B}function Oa(m,P){if(!Ae)throw Error(o(363));m=mo(m),m=Ya(m,P),P=[],m=Array.from(m);for(var B=0;B<m.length;){var K=m[B++];if(K.tag===5)Fe(K)||P.push(K.stateNode);else for(K=K.child;K!==null;)m.push(K),K=K.sibling}return P}var kl=Math.ceil,pa=s.ReactCurrentDispatcher,Bo=s.ReactCurrentOwner,hn=s.ReactCurrentBatchConfig,vr=0,Kr=null,_n=null,Cn=0,Qn=0,qo=hi(0),sn=0,bu=null,Ns=0,ln=0,Xa=0,Ll=null,aa=null,wu=0,_u=1/0,Ei=null;function tn(){_u=Tn()+500}var Dn=!1,Bn=null,Ka=null,yo=!1,Za=null,xc=0,qn=0,Su=null,ol=-1,Qa=0;function gn(){return(vr&6)!==0?Tn():ol!==-1?ol:ol=Tn()}function ci(m){return(m.mode&1)===0?1:(vr&2)!==0&&Cn!==0?Cn&-Cn:et.transition!==null?(Qa===0&&(Qa=xs()),Qa):(m=It,m!==0?m:ye())}function oa(m,P,B,K){if(50<qn)throw qn=0,Su=null,Error(o(185));fn(m,B,K),((vr&2)===0||m!==Kr)&&(m===Kr&&((vr&2)===0&&(ln|=B),sn===4&&os(m,Cn)),Vi(m,K),B===1&&vr===0&&(P.mode&1)===0&&(tn(),Ao&&ii()))}function Vi(m,P){var B=m.callbackNode;$o(m,P);var K=$s(m,m===Kr?Cn:0);if(K===0)B!==null&&Oo(B),m.callbackNode=null,m.callbackPriority=0;else if(P=K&-K,m.callbackPriority!==P){if(B!=null&&Oo(B),P===1)m.tag===0?Uu(ff.bind(null,m)):gl(ff.bind(null,m)),me?_e(function(){(vr&6)===0&&ii()}):lo(Ks,ii),B=null;else{switch(Ys(K)){case 1:B=Ks;break;case 4:B=au;break;case 16:B=ou;break;case 536870912:B=of;break;default:B=ou}B=Uh(B,Ts.bind(null,m))}m.callbackPriority=P,m.callbackNode=B}}function Ts(m,P){if(ol=-1,Qa=0,(vr&6)!==0)throw Error(o(327));var B=m.callbackNode;if(Tl()&&m.callbackNode!==B)return null;var K=$s(m,m===Kr?Cn:0);if(K===0)return null;if((K&30)!==0||(K&m.expiredLanes)!==0||P)P=ls(m,K);else{P=K;var re=vr;vr|=2;var le=ss();(Kr!==m||Cn!==P)&&(Ei=null,tn(),zo(m,P));do try{Oc();break}catch(Xe){Aa(m,Xe)}while(!0);za(),pa.current=le,vr=re,_n!==null?P=0:(Kr=null,Cn=0,P=sn)}if(P!==0){if(P===2&&(re=Ss(m),re!==0&&(K=re,P=Ec(m,re))),P===1)throw B=bu,zo(m,0),os(m,K),Vi(m,Tn()),B;if(P===6)os(m,K);else{if(re=m.current.alternate,(K&30)===0&&!Wf(re)&&(P=ls(m,K),P===2&&(le=Ss(m),le!==0&&(K=le,P=Ec(m,le))),P===1))throw B=bu,zo(m,0),os(m,K),Vi(m,Tn()),B;switch(m.finishedWork=re,m.finishedLanes=K,P){case 0:case 1:throw Error(o(345));case 2:us(m,aa,Ei);break;case 3:if(os(m,K),(K&130023424)===K&&(P=wu+500-Tn(),10<P)){if($s(m,0)!==0)break;if(re=m.suspendedLanes,(re&K)!==K){gn(),m.pingedLanes|=m.suspendedLanes&re;break}m.timeoutHandle=Q(us.bind(null,m,aa,Ei),P);break}us(m,aa,Ei);break;case 4:if(os(m,K),(K&4194240)===K)break;for(P=m.eventTimes,re=-1;0<K;){var Se=31-fa(K);le=1<<Se,Se=P[Se],Se>re&&(re=Se),K&=~le}if(K=re,K=Tn()-K,K=(120>K?120:480>K?480:1080>K?1080:1920>K?1920:3e3>K?3e3:4320>K?4320:1960*kl(K/1960))-K,10<K){m.timeoutHandle=Q(us.bind(null,m,aa,Ei),K);break}us(m,aa,Ei);break;case 5:us(m,aa,Ei);break;default:throw Error(o(329))}}}return Vi(m,Tn()),m.callbackNode===B?Ts.bind(null,m):null}function Ec(m,P){var B=Ll;return m.current.memoizedState.isDehydrated&&(zo(m,P).flags|=256),m=ls(m,P),m!==2&&(P=aa,aa=B,P!==null&&Ku(P)),m}function Ku(m){aa===null?aa=m:aa.push.apply(aa,m)}function Wf(m){for(var P=m;;){if(P.flags&16384){var B=P.updateQueue;if(B!==null&&(B=B.stores,B!==null))for(var K=0;K<B.length;K++){var re=B[K],le=re.getSnapshot;re=re.value;try{if(!Ti(le(),re))return!1}catch{return!1}}}if(B=P.child,P.subtreeFlags&16384&&B!==null)B.return=P,P=B;else{if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return!0;P=P.return}P.sibling.return=P.return,P=P.sibling}}return!0}function os(m,P){for(P&=~Xa,P&=~ln,m.suspendedLanes|=P,m.pingedLanes&=~P,m=m.expirationTimes;0<P;){var B=31-fa(P),K=1<<B;m[B]=-1,P&=~K}}function ff(m){if((vr&6)!==0)throw Error(o(327));Tl();var P=$s(m,0);if((P&1)===0)return Vi(m,Tn()),null;var B=ls(m,P);if(m.tag!==0&&B===2){var K=Ss(m);K!==0&&(P=K,B=Ec(m,K))}if(B===1)throw B=bu,zo(m,0),os(m,P),Vi(m,Tn()),B;if(B===6)throw Error(o(345));return m.finishedWork=m.current.alternate,m.finishedLanes=P,us(m,aa,Ei),Vi(m,Tn()),null}function Nl(m){Za!==null&&Za.tag===0&&(vr&6)===0&&Tl();var P=vr;vr|=1;var B=hn.transition,K=It;try{if(hn.transition=null,It=1,m)return m()}finally{It=K,hn.transition=B,vr=P,(vr&6)===0&&ii()}}function xu(){Qn=qo.current,$r(qo)}function zo(m,P){m.finishedWork=null,m.finishedLanes=0;var B=m.timeoutHandle;if(B!==se&&(m.timeoutHandle=se,oe(B)),_n!==null)for(B=_n.return;B!==null;){var K=B;switch(Zs(K),K.tag){case 1:K=K.type.childContextTypes,K!=null&&Ni();break;case 3:oi(),$r(Li),$r(di),ko();break;case 5:es(K);break;case 4:oi();break;case 13:$r(Vr);break;case 19:$r(Vr);break;case 10:Ea(K.type._context);break;case 22:case 23:xu()}B=B.return}if(Kr=m,_n=m=Eu(m.current,null),Cn=Qn=P,sn=0,bu=null,Xa=ln=Ns=0,aa=Ll=null,Ua!==null){for(P=0;P<Ua.length;P++)if(B=Ua[P],K=B.interleaved,K!==null){B.interleaved=null;var re=K.next,le=B.pending;if(le!==null){var Se=le.next;le.next=re,K.next=Se}B.pending=K}Ua=null}return m}function Aa(m,P){do{var B=_n;try{if(za(),Rr.current=ks,ts){for(var K=kr.memoizedState;K!==null;){var re=K.queue;re!==null&&(re.pending=null),K=K.next}ts=!1}if(Wn=0,$n=bn=kr=null,No=!1,To=0,Bo.current=null,B===null||B.return===null){sn=1,bu=P,_n=null;break}e:{var le=m,Se=B.return,Xe=B,ut=P;if(P=Cn,Xe.flags|=32768,ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var kt=ut,Yt=Xe,br=Yt.tag;if((Yt.mode&1)===0&&(br===0||br===11||br===15)){var qt=Yt.alternate;qt?(Yt.updateQueue=qt.updateQueue,Yt.memoizedState=qt.memoizedState,Yt.lanes=qt.lanes):(Yt.updateQueue=null,Yt.memoizedState=null)}var kn=Vf(Se);if(kn!==null){kn.flags&=-257,Ls(kn,Se,Xe,le,P),kn.mode&1&&Hf(le,kt,P),P=kn,ut=kt;var dn=P.updateQueue;if(dn===null){var eo=new Set;eo.add(ut),P.updateQueue=eo}else dn.add(ut);break e}else{if((P&1)===0){Hf(le,kt,P),Ja();break e}ut=Error(o(426))}}else if(Zr&&Xe.mode&1){var sl=Vf(Se);if(sl!==null){(sl.flags&65536)===0&&(sl.flags|=256),Ls(sl,Se,Xe,le,P),De(zi(ut,Xe));break e}}le=ut=zi(ut,Xe),sn!==4&&(sn=2),Ll===null?Ll=[le]:Ll.push(le),le=Se;do{switch(le.tag){case 3:le.flags|=65536,P&=-P,le.lanes|=P;var ot=Ui(le,ut,P);tl(le,ot);break e;case 1:Xe=ut;var Ze=le.type,dt=le.stateNode;if((le.flags&128)===0&&(typeof Ze.getDerivedStateFromError=="function"||dt!==null&&typeof dt.componentDidCatch=="function"&&(Ka===null||!Ka.has(dt)))){le.flags|=65536,P&=-P,le.lanes|=P;var Ht=ha(le,Xe,P);tl(le,Ht);break e}}le=le.return}while(le!==null)}Zu(B)}catch(lr){P=lr,_n===B&&B!==null&&(_n=B=B.return);continue}break}while(!0)}function ss(){var m=pa.current;return pa.current=ks,m===null?ks:m}function Ja(){(sn===0||sn===3||sn===2)&&(sn=4),Kr===null||(Ns&268435455)===0&&(ln&268435455)===0||os(Kr,Cn)}function ls(m,P){var B=vr;vr|=2;var K=ss();(Kr!==m||Cn!==P)&&(Ei=null,zo(m,P));do try{Pc();break}catch(re){Aa(m,re)}while(!0);if(za(),vr=B,pa.current=K,_n!==null)throw Error(o(261));return Kr=null,Cn=0,sn}function Pc(){for(;_n!==null;)hf(_n)}function Oc(){for(;_n!==null&&!zu();)hf(_n)}function hf(m){var P=Rp(m.alternate,m,Qn);m.memoizedProps=m.pendingProps,P===null?Zu(m):_n=P,Bo.current=null}function Zu(m){var P=m;do{var B=P.alternate;if(m=P.return,(P.flags&32768)===0){if(B=We(B,P,Qn),B!==null){_n=B;return}}else{if(B=wt(B,P),B!==null){B.flags&=32767,_n=B;return}if(m!==null)m.flags|=32768,m.subtreeFlags=0,m.deletions=null;else{sn=6,_n=null;return}}if(P=P.sibling,P!==null){_n=P;return}_n=P=m}while(P!==null);sn===0&&(sn=5)}function us(m,P,B){var K=It,re=hn.transition;try{hn.transition=null,It=1,kp(m,P,B,K)}finally{hn.transition=re,It=K}return null}function kp(m,P,B,K){do Tl();while(Za!==null);if((vr&6)!==0)throw Error(o(327));B=m.finishedWork;var re=m.finishedLanes;if(B===null)return null;if(m.finishedWork=null,m.finishedLanes=0,B===m.current)throw Error(o(177));m.callbackNode=null,m.callbackPriority=0;var le=B.lanes|B.childLanes;if(Yo(m,le),m===Kr&&(_n=Kr=null,Cn=0),(B.subtreeFlags&2064)===0&&(B.flags&2064)===0||yo||(yo=!0,Uh(ou,function(){return Tl(),null})),le=(B.flags&15990)!==0,(B.subtreeFlags&15990)!==0||le){le=hn.transition,hn.transition=null;var Se=It;It=1;var Xe=vr;vr|=4,Bo.current=null,jt(m,B),Hi(B,m),V(m.containerInfo),m.current=B,jn(B),Xs(),vr=Xe,It=Se,hn.transition=le}else m.current=B;if(yo&&(yo=!1,Za=m,xc=re),le=m.pendingLanes,le===0&&(Ka=null),Fa(B.stateNode),Vi(m,Tn()),P!==null)for(K=m.onRecoverableError,B=0;B<P.length;B++)re=P[B],K(re.value,{componentStack:re.stack,digest:re.digest});if(Dn)throw Dn=!1,m=Bn,Bn=null,m;return(xc&1)!==0&&m.tag!==0&&Tl(),le=m.pendingLanes,(le&1)!==0?m===Su?qn++:(qn=0,Su=m):qn=0,ii(),null}function Tl(){if(Za!==null){var m=Ys(xc),P=hn.transition,B=It;try{if(hn.transition=null,It=16>m?16:m,Za===null)var K=!1;else{if(m=Za,Za=null,xc=0,(vr&6)!==0)throw Error(o(331));var re=vr;for(vr|=4,Ve=m.current;Ve!==null;){var le=Ve,Se=le.child;if((Ve.flags&16)!==0){var Xe=le.deletions;if(Xe!==null){for(var ut=0;ut<Xe.length;ut++){var kt=Xe[ut];for(Ve=kt;Ve!==null;){var Yt=Ve;switch(Yt.tag){case 0:case 11:case 15:ir(8,Yt,le)}var br=Yt.child;if(br!==null)br.return=Yt,Ve=br;else for(;Ve!==null;){Yt=Ve;var qt=Yt.sibling,kn=Yt.return;if(Fr(Yt),Yt===kt){Ve=null;break}if(qt!==null){qt.return=kn,Ve=qt;break}Ve=kn}}}var dn=le.alternate;if(dn!==null){var eo=dn.child;if(eo!==null){dn.child=null;do{var sl=eo.sibling;eo.sibling=null,eo=sl}while(eo!==null)}}Ve=le}}if((le.subtreeFlags&2064)!==0&&Se!==null)Se.return=le,Ve=Se;else e:for(;Ve!==null;){if(le=Ve,(le.flags&2048)!==0)switch(le.tag){case 0:case 11:case 15:ir(9,le,le.return)}var ot=le.sibling;if(ot!==null){ot.return=le.return,Ve=ot;break e}Ve=le.return}}var Ze=m.current;for(Ve=Ze;Ve!==null;){Se=Ve;var dt=Se.child;if((Se.subtreeFlags&2064)!==0&&dt!==null)dt.return=Se,Ve=dt;else e:for(Se=Ze;Ve!==null;){if(Xe=Ve,(Xe.flags&2048)!==0)try{switch(Xe.tag){case 0:case 11:case 15:Rt(9,Xe)}}catch(lr){zn(Xe,Xe.return,lr)}if(Xe===Se){Ve=null;break e}var Ht=Xe.sibling;if(Ht!==null){Ht.return=Xe.return,Ve=Ht;break e}Ve=Xe.return}}if(vr=re,ii(),ni&&typeof ni.onPostCommitFiberRoot=="function")try{ni.onPostCommitFiberRoot(uo,m)}catch{}K=!0}return K}finally{It=B,hn.transition=P}}return!1}function zh(m,P,B){P=zi(B,P),P=Ui(m,P,1),m=Ha(m,P,1),P=gn(),m!==null&&(fn(m,1,P),Vi(m,P))}function zn(m,P,B){if(m.tag===3)zh(m,m,B);else for(;P!==null;){if(P.tag===3){zh(P,m,B);break}else if(P.tag===1){var K=P.stateNode;if(typeof P.type.getDerivedStateFromError=="function"||typeof K.componentDidCatch=="function"&&(Ka===null||!Ka.has(K))){m=zi(B,m),m=ha(P,m,1),P=Ha(P,m,1),m=gn(),P!==null&&(fn(P,1,m),Vi(P,m));break}}P=P.return}}function Lp(m,P,B){var K=m.pingCache;K!==null&&K.delete(P),P=gn(),m.pingedLanes|=m.suspendedLanes&B,Kr===m&&(Cn&B)===B&&(sn===4||sn===3&&(Cn&130023424)===Cn&&500>Tn()-wu?zo(m,0):Xa|=B),Vi(m,P)}function Np(m,P){P===0&&((m.mode&1)===0?P=1:(P=_s,_s<<=1,(_s&130023424)===0&&(_s=4194304)));var B=gn();m=ea(m,P),m!==null&&(fn(m,P,B),Vi(m,B))}function Tp(m){var P=m.memoizedState,B=0;P!==null&&(B=P.retryLane),Np(m,B)}function h0(m,P){var B=0;switch(m.tag){case 13:var K=m.stateNode,re=m.memoizedState;re!==null&&(B=re.retryLane);break;case 19:K=m.stateNode;break;default:throw Error(o(314))}K!==null&&K.delete(P),Np(m,B)}var Rp;Rp=function(m,P,B){if(m!==null)if(m.memoizedProps!==P.pendingProps||Li.current)si=!0;else{if((m.lanes&B)===0&&(P.flags&128)===0)return si=!1,ae(m,P,B);si=(m.flags&131072)!==0}else si=!1,Zr&&(P.flags&1048576)!==0&&lu(P,Sa,P.index);switch(P.lanes=0,P.tag){case 2:var K=P.type;U(m,P),m=P.pendingProps;var re=Ia(P,di.current);Qo(P,B),re=Ro(null,P,K,m,re,B);var le=Mo();return P.flags|=1,typeof re=="object"&&re!==null&&typeof re.render=="function"&&re.$$typeof===void 0?(P.tag=1,P.memoizedState=null,P.updateQueue=null,ri(K)?(le=!0,Wo(P)):le=!1,P.memoizedState=re.state!==null&&re.state!==void 0?re.state:null,el(P),re.updater=$u,P.stateNode=re,re._reactInternals=P,qi(P,K,m,B),P=ra(null,P,K,!0,le,B)):(P.tag=0,Zr&&le&&Os(P),yi(null,P,re,B),P=P.child),P;case 16:K=P.elementType;e:{switch(U(m,P),m=P.pendingProps,re=K._init,K=re(K._payload),P.type=K,re=P.tag=d0(K),m=Wa(K,m),re){case 0:P=ns(null,P,K,m,B);break e;case 1:P=Si(null,P,K,m,B);break e;case 11:P=Sc(null,P,K,m,B);break e;case 14:P=rs(null,P,K,Wa(K.type,m),B);break e}throw Error(o(306,K,""))}return P;case 0:return K=P.type,re=P.pendingProps,re=P.elementType===K?re:Wa(K,re),ns(m,P,K,re,B);case 1:return K=P.type,re=P.pendingProps,re=P.elementType===K?re:Wa(K,re),Si(m,P,K,re,B);case 3:e:{if(al(P),m===null)throw Error(o(387));K=P.pendingProps,le=P.memoizedState,re=le.element,wl(m,P),co(P,K,null,B);var Se=P.memoizedState;if(K=Se.element,ke&&le.isDehydrated)if(le={element:K,isDehydrated:!1,cache:Se.cache,pendingSuspenseBoundaries:Se.pendingSuspenseBoundaries,transitions:Se.transitions},P.updateQueue.baseState=le,P.memoizedState=le,P.flags&256){re=zi(Error(o(423)),P),P=Al(m,P,K,B,re);break e}else if(K!==re){re=zi(Error(o(424)),P),P=Al(m,P,K,B,re);break e}else for(ke&&(pi=Vn(P.stateNode.containerInfo),Gn=P,Zr=!0,qa=null,Qs=!1),B=Pn(P,null,K,B),P.child=B;B;)B.flags=B.flags&-3|4096,B=B.sibling;else{if(Ce(),K===re){P=ee(m,P,B);break e}yi(m,P,K,B)}P=P.child}return P;case 5:return Di(P),m===null&&Ko(P),K=P.type,re=P.pendingProps,le=m!==null?m.memoizedProps:null,Se=re.children,ne(K,re)?Se=null:le!==null&&ne(K,le)&&(P.flags|=32),en(m,P),yi(m,P,Se,B),P.child;case 6:return m===null&&Ko(P),null;case 13:return cf(m,P,B);case 4:return Jo(P,P.stateNode.containerInfo),K=P.pendingProps,m===null?P.child=Sr(P,null,K,B):yi(m,P,K,B),P.child;case 11:return K=P.type,re=P.pendingProps,re=P.elementType===K?re:Wa(K,re),Sc(m,P,K,re,B);case 7:return yi(m,P,P.pendingProps,B),P.child;case 8:return yi(m,P,P.pendingProps.children,B),P.child;case 12:return yi(m,P,P.pendingProps.children,B),P.child;case 10:e:{if(K=P.type._context,re=P.pendingProps,le=P.memoizedProps,Se=re.value,xa(P,K,Se),le!==null)if(Ti(le.value,Se)){if(le.children===re.children&&!Li.current){P=ee(m,P,B);break e}}else for(le=P.child,le!==null&&(le.return=P);le!==null;){var Xe=le.dependencies;if(Xe!==null){Se=le.child;for(var ut=Xe.firstContext;ut!==null;){if(ut.context===K){if(le.tag===1){ut=Pa(-1,B&-B),ut.tag=2;var kt=le.updateQueue;if(kt!==null){kt=kt.shared;var Yt=kt.pending;Yt===null?ut.next=ut:(ut.next=Yt.next,Yt.next=ut),kt.pending=ut}}le.lanes|=B,ut=le.alternate,ut!==null&&(ut.lanes|=B),Zo(le.return,B,P),Xe.lanes|=B;break}ut=ut.next}}else if(le.tag===10)Se=le.type===P.type?null:le.child;else if(le.tag===18){if(Se=le.return,Se===null)throw Error(o(341));Se.lanes|=B,Xe=Se.alternate,Xe!==null&&(Xe.lanes|=B),Zo(Se,B,P),Se=le.sibling}else Se=le.child;if(Se!==null)Se.return=le;else for(Se=le;Se!==null;){if(Se===P){Se=null;break}if(le=Se.sibling,le!==null){le.return=Se.return,Se=le;break}Se=Se.return}le=Se}yi(m,P,re.children,B),P=P.child}return P;case 9:return re=P.type,K=P.pendingProps.children,Qo(P,B),re=ji(re),K=K(re),P.flags|=1,yi(m,P,K,B),P.child;case 14:return K=P.type,re=Wa(K,P.pendingProps),re=Wa(K.type,re),rs(m,P,K,re,B);case 15:return go(m,P,P.type,P.pendingProps,B);case 17:return K=P.type,re=P.pendingProps,re=P.elementType===K?re:Wa(K,re),U(m,P),P.tag=1,ri(K)?(m=!0,Wo(P)):m=!1,Qo(P,B),Uf(P,K,re),qi(P,K,re,B),ra(null,P,K,!0,m,B);case 19:return R(m,P,B);case 22:return Yr(m,P,B)}throw Error(o(156,P.tag))};function Uh(m,P){return lo(m,P)}function Mp(m,P,B,K){this.tag=m,this.key=B,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=P,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=K,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Uo(m,P,B,K){return new Mp(m,P,B,K)}function Ac(m){return m=m.prototype,!(!m||!m.isReactComponent)}function d0(m){if(typeof m=="function")return Ac(m)?1:0;if(m!=null){if(m=m.$$typeof,m===S)return 11;if(m===g)return 14}return 2}function Eu(m,P){var B=m.alternate;return B===null?(B=Uo(m.tag,P,m.key,m.mode),B.elementType=m.elementType,B.type=m.type,B.stateNode=m.stateNode,B.alternate=m,m.alternate=B):(B.pendingProps=P,B.type=m.type,B.flags=0,B.subtreeFlags=0,B.deletions=null),B.flags=m.flags&14680064,B.childLanes=m.childLanes,B.lanes=m.lanes,B.child=m.child,B.memoizedProps=m.memoizedProps,B.memoizedState=m.memoizedState,B.updateQueue=m.updateQueue,P=m.dependencies,B.dependencies=P===null?null:{lanes:P.lanes,firstContext:P.firstContext},B.sibling=m.sibling,B.index=m.index,B.ref=m.ref,B}function $f(m,P,B,K,re,le){var Se=2;if(K=m,typeof m=="function")Ac(m)&&(Se=1);else if(typeof m=="string")Se=5;else e:switch(m){case d:return ga(B.children,re,le,P);case p:Se=8,re|=8;break;case y:return m=Uo(12,B,P,re|2),m.elementType=y,m.lanes=le,m;case w:return m=Uo(13,B,P,re),m.elementType=w,m.lanes=le,m;case b:return m=Uo(19,B,P,re),m.elementType=b,m.lanes=le,m;case E:return Cc(B,re,le,P);default:if(typeof m=="object"&&m!==null)switch(m.$$typeof){case f:Se=10;break e;case _:Se=9;break e;case S:Se=11;break e;case g:Se=14;break e;case v:Se=16,K=null;break e}throw Error(o(130,m==null?m:typeof m,""))}return P=Uo(Se,B,P,re),P.elementType=m,P.type=K,P.lanes=le,P}function ga(m,P,B,K){return m=Uo(7,m,K,P),m.lanes=B,m}function Cc(m,P,B,K){return m=Uo(22,m,K,P),m.elementType=E,m.lanes=B,m.stateNode={isHidden:!1},m}function kc(m,P,B){return m=Uo(6,m,null,P),m.lanes=B,m}function Yf(m,P,B){return P=Uo(4,m.children!==null?m.children:[],m.key,P),P.lanes=B,P.stateNode={containerInfo:m.containerInfo,pendingChildren:null,implementation:m.implementation},P}function Ip(m,P,B,K,re){this.tag=P,this.containerInfo=m,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=se,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Es(0),this.expirationTimes=Es(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Es(0),this.identifierPrefix=K,this.onRecoverableError=re,ke&&(this.mutableSourceEagerHydrationData=null)}function Hh(m,P,B,K,re,le,Se,Xe,ut){return m=new Ip(m,P,B,Xe,ut),P===1?(P=1,le===!0&&(P|=8)):P=0,le=Uo(3,null,null,P),m.current=le,le.stateNode=m,le.memoizedState={element:K,isDehydrated:B,cache:null,transitions:null,pendingSuspenseBoundaries:null},el(le),m}function Xf(m){if(!m)return nn;m=m._reactInternals;e:{if(F(m)!==m||m.tag!==1)throw Error(o(170));var P=m;do{switch(P.tag){case 3:P=P.stateNode.context;break e;case 1:if(ri(P.type)){P=P.stateNode.__reactInternalMemoizedMergedChildContext;break e}}P=P.return}while(P!==null);throw Error(o(171))}if(m.tag===1){var B=m.type;if(ri(B))return ca(m,B,P)}return P}function Qu(m){var P=m._reactInternals;if(P===void 0)throw typeof m.render=="function"?Error(o(188)):(m=Object.keys(m).join(","),Error(o(268,m)));return m=L(P),m===null?null:m.stateNode}function Kf(m,P){if(m=m.memoizedState,m!==null&&m.dehydrated!==null){var B=m.retryLane;m.retryLane=B!==0&&B<P?B:P}}function Lc(m,P){Kf(m,P),(m=m.alternate)&&Kf(m,P)}function p0(m){return m=L(m),m===null?null:m.stateNode}function jp(){return null}return t.attemptContinuousHydration=function(m){if(m.tag===13){var P=ea(m,134217728);if(P!==null){var B=gn();oa(P,m,134217728,B)}Lc(m,134217728)}},t.attemptDiscreteHydration=function(m){if(m.tag===13){var P=ea(m,1);if(P!==null){var B=gn();oa(P,m,1,B)}Lc(m,1)}},t.attemptHydrationAtCurrentPriority=function(m){if(m.tag===13){var P=ci(m),B=ea(m,P);if(B!==null){var K=gn();oa(B,m,P,K)}Lc(m,P)}},t.attemptSynchronousHydration=function(m){switch(m.tag){case 3:var P=m.stateNode;if(P.current.memoizedState.isDehydrated){var B=Ws(P.pendingLanes);B!==0&&(ja(P,B|1),Vi(P,Tn()),(vr&6)===0&&(tn(),ii()))}break;case 13:Nl(function(){var K=ea(m,1);if(K!==null){var re=gn();oa(K,m,1,re)}}),Lc(m,1)}},t.batchedUpdates=function(m,P){var B=vr;vr|=1;try{return m(P)}finally{vr=B,vr===0&&(tn(),Ao&&ii())}},t.createComponentSelector=function(m){return{$$typeof:pn,value:m}},t.createContainer=function(m,P,B,K,re,le,Se){return Hh(m,P,!1,null,B,K,re,le,Se)},t.createHasPseudoClassSelector=function(m){return{$$typeof:Fn,value:m}},t.createHydrationContainer=function(m,P,B,K,re,le,Se,Xe,ut){return m=Hh(B,K,!0,m,re,le,Se,Xe,ut),m.context=Xf(null),B=m.current,K=gn(),re=ci(B),le=Pa(K,re),le.callback=P??null,Ha(B,le,re),m.current.lanes=re,fn(m,re,K),Vi(m,K),m},t.createPortal=function(m,P,B){var K=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:K==null?null:""+K,children:m,containerInfo:P,implementation:B}},t.createRoleSelector=function(m){return{$$typeof:ia,value:m}},t.createTestNameSelector=function(m){return{$$typeof:Do,value:m}},t.createTextSelector=function(m){return{$$typeof:vo,value:m}},t.deferredUpdates=function(m){var P=It,B=hn.transition;try{return hn.transition=null,It=16,m()}finally{It=P,hn.transition=B}},t.discreteUpdates=function(m,P,B,K,re){var le=It,Se=hn.transition;try{return hn.transition=null,It=1,m(P,B,K,re)}finally{It=le,hn.transition=Se,vr===0&&tn()}},t.findAllNodes=Oa,t.findBoundingRects=function(m,P){if(!Ae)throw Error(o(363));P=Oa(m,P),m=[];for(var B=0;B<P.length;B++)m.push(ge(P[B]));for(P=m.length-1;0<P;P--){B=m[P];for(var K=B.x,re=K+B.width,le=B.y,Se=le+B.height,Xe=P-1;0<=Xe;Xe--)if(P!==Xe){var ut=m[Xe],kt=ut.x,Yt=kt+ut.width,br=ut.y,qt=br+ut.height;if(K>=kt&&le>=br&&re<=Yt&&Se<=qt){m.splice(P,1);break}else if(K!==kt||B.width!==ut.width||qt<le||br>Se){if(!(le!==br||B.height!==ut.height||Yt<K||kt>re)){kt>K&&(ut.width+=kt-K,ut.x=K),Yt<re&&(ut.width=re-kt),m.splice(P,1);break}}else{br>le&&(ut.height+=br-le,ut.y=le),qt<Se&&(ut.height=Se-br),m.splice(P,1);break}}}return m},t.findHostInstance=Qu,t.findHostInstanceWithNoPortals=function(m){return m=A(m),m=m!==null?I(m):null,m===null?null:m.stateNode},t.findHostInstanceWithWarning=function(m){return Qu(m)},t.flushControlled=function(m){var P=vr;vr|=1;var B=hn.transition,K=It;try{hn.transition=null,It=1,m()}finally{It=K,hn.transition=B,vr=P,vr===0&&(tn(),ii())}},t.flushPassiveEffects=Tl,t.flushSync=Nl,t.focusWithin=function(m,P){if(!Ae)throw Error(o(363));for(m=mo(m),P=Ya(m,P),P=Array.from(P),m=0;m<P.length;){var B=P[m++];if(!Fe(B)){if(B.tag===5&&it(B.stateNode))return!0;for(B=B.child;B!==null;)P.push(B),B=B.sibling}}return!1},t.getCurrentUpdatePriority=function(){return It},t.getFindAllNodesFailureDescription=function(m,P){if(!Ae)throw Error(o(363));var B=0,K=[];m=[mo(m),0];for(var re=0;re<m.length;){var le=m[re++],Se=m[re++],Xe=P[Se];if((le.tag!==5||!Fe(le))&&(yu(le,Xe)&&(K.push(Xu(Xe)),Se++,Se>B&&(B=Se)),Se<P.length))for(le=le.child;le!==null;)m.push(le,Se),le=le.sibling}if(B<P.length){for(m=[];B<P.length;B++)m.push(Xu(P[B]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(K.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+m.join(" > ")}return null},t.getPublicRootInstance=function(m){if(m=m.current,!m.child)return null;switch(m.child.tag){case 5:return G(m.child.stateNode);default:return m.child.stateNode}},t.injectIntoDevTools=function(m){if(m={bundleType:m.bundleType,version:m.version,rendererPackageName:m.rendererPackageName,rendererConfig:m.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:p0,findFiberByHostInstance:m.findFiberByHostInstance||jp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")m=!1;else{var P=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(P.isDisabled||!P.supportsFiber)m=!0;else{try{uo=P.inject(m),ni=P}catch{}m=!!P.checkDCE}}return m},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(m,P,B,K){if(!Ae)throw Error(o(363));m=Oa(m,P);var re=rt(m,B,K).disconnect;return{disconnect:function(){re()}}},t.registerMutableSourceForHydration=function(m,P){var B=P._getVersion;B=B(P._source),m.mutableSourceEagerHydrationData==null?m.mutableSourceEagerHydrationData=[P,B]:m.mutableSourceEagerHydrationData.push(P,B)},t.runWithPriority=function(m,P){var B=It;try{return It=m,P()}finally{It=B}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(m,P,B,K){var re=P.current,le=gn(),Se=ci(re);return B=Xf(B),P.context===null?P.context=B:P.pendingContext=B,P=Pa(le,Se),P.payload={element:m},K=K===void 0?null:K,K!==null&&(P.callback=K),m=Ha(re,P,Se),m!==null&&(oa(m,re,Se,le),wi(m,re,Se)),Se},t}),og}var H5;function bx(){return H5||(H5=1,ag.exports=yx()),ag.exports}var wx=bx();const _x=mp(wx);var sg={exports:{}},Bc={};/**
|
|
62
|
-
* @license React
|
|
63
|
-
* react-reconciler-constants.production.min.js
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the MIT license found in the
|
|
68
|
-
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var V5;function Sx(){return V5||(V5=1,Bc.ConcurrentRoot=1,Bc.ContinuousEventPriority=4,Bc.DefaultEventPriority=16,Bc.DiscreteEventPriority=1,Bc.IdleEventPriority=536870912,Bc.LegacyRoot=0),Bc}var G5;function xx(){return G5||(G5=1,sg.exports=Sx()),sg.exports}var E6=xx(),Ex=Nr();const W5={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let $5=!1,Y5=!1;const um=".react-konva-event";let P6=!1;function Px(e){P6=e}const Ox=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
70
|
-
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
71
|
-
Consider to add onDragMove or onDragEnd events.
|
|
72
|
-
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
73
|
-
`,Ax=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
74
|
-
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
75
|
-
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
76
|
-
`,Cx={};function e0(e,r,t=Cx){if(!$5&&"zIndex"in r&&(console.warn(Ax),$5=!0),!Y5&&r.draggable){var n=r.x!==void 0||r.y!==void 0,a=r.onDragEnd||r.onDragMove;n&&!a&&(console.warn(Ox),Y5=!0)}for(var i in t)if(!W5[i]){var o=i.slice(0,2)==="on",s=t[i]!==r[i];if(o&&s){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,t[i])}var u=!r.hasOwnProperty(i);u&&e.setAttr(i,void 0)}var d=P6||r._useStrictMode,p={},y=!1;const f={};for(var i in r)if(!W5[i]){var o=i.slice(0,2)==="on",_=t[i]!==r[i];if(o&&_){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),r[i]&&(f[c]=r[i])}!o&&(r[i]!==t[i]||d&&r[i]!==e.getAttr(i))&&(y=!0,p[i]=r[i])}y&&(e.setAttrs(p),tf(e));for(var c in f)e.on(c+um,f[c])}function tf(e){if(!Ex.Konva.autoDrawEnabled){var r=e.getLayer()||e.getStage();r&&r.batchDraw()}}var lg=F2();const O6={},kx={};hp.Node.prototype._applyProps=e0;function Lx(e,r){if(typeof r=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${r}`);return}e.add(r),tf(e)}function Nx(e,r,t){let n=hp[e];n||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),n=hp.Group);const a={},i={};for(var o in r){var s=o.slice(0,2)==="on";s?i[o]=r[o]:a[o]=r[o]}const c=new n(a);return e0(c,i),c}function Tx(e,r,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Rx(e,r,t){return!1}function Mx(e){return e}function Ix(){return null}function jx(){return null}function Fx(e,r,t,n){return kx}function Dx(){}function Bx(e){}function qx(e,r){return!1}function zx(){return O6}function Ux(){return O6}const Hx=setTimeout,Vx=clearTimeout,Gx=-1;function Wx(e,r){return!1}const $x=!1,Yx=!0,Xx=!0;function Kx(e,r){r.parent===e?r.moveToTop():e.add(r),tf(e)}function Zx(e,r){r.parent===e?r.moveToTop():e.add(r),tf(e)}function A6(e,r,t){r._remove(),e.add(r),r.setZIndex(t.getZIndex()),tf(e)}function Qx(e,r,t){A6(e,r,t)}function Jx(e,r){r.destroy(),r.off(um),tf(e)}function eE(e,r){r.destroy(),r.off(um),tf(e)}function tE(e,r,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function rE(e,r,t){}function nE(e,r,t,n,a){e0(e,a,n)}function iE(e){e.hide(),tf(e)}function aE(e){}function oE(e,r){(r.visible==null||r.visible)&&e.show()}function sE(e,r){}function lE(e){}function uE(){}const cE=()=>E6.DefaultEventPriority,fE=Object.freeze(Object.defineProperty({__proto__:null,appendChild:Kx,appendChildToContainer:Zx,appendInitialChild:Lx,cancelTimeout:Vx,clearContainer:lE,commitMount:rE,commitTextUpdate:tE,commitUpdate:nE,createInstance:Nx,createTextInstance:Tx,detachDeletedInstance:uE,finalizeInitialChildren:Rx,getChildHostContext:Ux,getCurrentEventPriority:cE,getPublicInstance:Mx,getRootHostContext:zx,hideInstance:iE,hideTextInstance:aE,idlePriority:lg.unstable_IdlePriority,insertBefore:A6,insertInContainerBefore:Qx,isPrimaryRenderer:$x,noTimeout:Gx,now:lg.unstable_now,prepareForCommit:Ix,preparePortalMount:jx,prepareUpdate:Fx,removeChild:Jx,removeChildFromContainer:eE,resetAfterCommit:Dx,resetTextContent:Bx,run:lg.unstable_runWithPriority,scheduleTimeout:Hx,shouldDeprioritizeSubtree:qx,shouldSetTextContent:Wx,supportsMutation:Xx,unhideInstance:oE,unhideTextInstance:sE,warnsIfNotActing:Yx},Symbol.toStringTag,{value:"Module"}));var hE=Object.defineProperty,dE=Object.defineProperties,pE=Object.getOwnPropertyDescriptors,X5=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,K5=(e,r,t)=>r in e?hE(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Z5=(e,r)=>{for(var t in r||(r={}))gE.call(r,t)&&K5(e,t,r[t]);if(X5)for(var t of X5(r))vE.call(r,t)&&K5(e,t,r[t]);return e},mE=(e,r)=>dE(e,pE(r)),Q5,J5;typeof window<"u"&&((Q5=window.document)!=null&&Q5.createElement||((J5=window.navigator)==null?void 0:J5.product)==="ReactNative")?ei.useLayoutEffect:ei.useEffect;function C6(e,r,t){if(!e)return;if(t(e)===!0)return e;let n=e.child;for(;n;){const a=C6(n,r,t);if(a)return a;n=n.sibling}}function k6(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const eb=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=eb;return}return eb.apply(this,arguments)};const cm=k6(ei.createContext(null));class L6 extends ei.Component{render(){return ei.createElement(cm.Provider,{value:this._reactInternals},this.props.children)}}function yE(){const e=ei.useContext(cm);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const r=ei.useId();return ei.useMemo(()=>{for(const n of[e,e==null?void 0:e.alternate]){if(!n)continue;const a=C6(n,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===r)return!0;o=o.next}});if(a)return a}},[e,r])}function bE(){const e=yE(),[r]=ei.useState(()=>new Map);r.clear();let t=e;for(;t;){if(t.type&&typeof t.type=="object"){const a=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;a&&a!==cm&&!r.has(a)&&r.set(a,ei.useContext(k6(a)))}t=t.return}return r}function N6(){const e=bE();return ei.useMemo(()=>Array.from(e.keys()).reduce((r,t)=>n=>ei.createElement(r,null,ei.createElement(t.Provider,mE(Z5({},n),{value:e.get(t)}))),r=>ei.createElement(L6,Z5({},r))),[e])}function wE(e){const r=Ur.useRef({});return Ur.useLayoutEffect(()=>{r.current=e}),Ur.useLayoutEffect(()=>()=>{r.current={}},[]),r.current}const _E=e=>{const r=Ur.useRef(),t=Ur.useRef(),n=Ur.useRef(),a=wE(e),i=N6(),o=s=>{const{forwardedRef:c}=e;c&&(typeof c=="function"?c(s):c.current=s)};return Ur.useLayoutEffect(()=>(t.current=new hp.Stage({width:e.width,height:e.height,container:r.current}),o(t.current),n.current=hh.createContainer(t.current,E6.LegacyRoot,!1,null),hh.updateContainer(Ur.createElement(i,{},e.children),n.current),()=>{hp.isBrowser&&(o(null),hh.updateContainer(null,n.current,null),t.current.destroy())}),[]),Ur.useLayoutEffect(()=>{o(t.current),e0(t.current,e,a),hh.updateContainer(Ur.createElement(i,{},e.children),n.current,null)}),Ur.createElement("div",{ref:r,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},SE="Layer",xE="FastLayer",R1="Group",EE="Label",PE="Rect",OE="Circle",AE="Ellipse",CE="Wedge",kE="Line",LE="Sprite",NE="Image",TE="Text",RE="TextPath",ME="Star",IE="Ring",jE="Arc",FE="Tag",DE="Path",BE="RegularPolygon",qE="Arrow",zE="Shape",UE="Transformer",hh=_x(fE);hh.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:Ur.version,rendererPackageName:"react-konva"});const HE=Ur.forwardRef((e,r)=>Ur.createElement(L6,{},Ur.createElement(_E,{...e,forwardedRef:r}))),VE=Px,GE=Object.freeze(Object.defineProperty({__proto__:null,Arc:jE,Arrow:qE,Circle:OE,Ellipse:AE,FastLayer:xE,Group:R1,Image:NE,KonvaRenderer:hh,Label:EE,Layer:SE,Line:kE,Path:DE,Rect:PE,RegularPolygon:BE,Ring:IE,Shape:zE,Sprite:LE,Stage:HE,Star:ME,Tag:FE,Text:TE,TextPath:RE,Transformer:UE,Wedge:CE,useStrictMode:VE},Symbol.toStringTag,{value:"Module"})),Fu=Zc(GE);var ug,tb;function t0(){if(tb)return ug;tb=1;var e=fi();return ug=function(t,n,a){const i=e.useRef("loading"),o=e.useRef(),[s,c]=e.useState(0),u=e.useRef(),d=e.useRef(),p=e.useRef();return(u.current!==t||d.current!==n||p.current!==a)&&(i.current="loading",o.current=void 0,u.current=t,d.current=n,p.current=a),e.useLayoutEffect(function(){if(!t)return;var y=document.createElement("img");function f(){y.decode().catch(()=>{}).finally(()=>{i.current="loaded",o.current=y,c(Math.random())})}function _(){i.current="failed",o.current=void 0,c(Math.random())}return y.addEventListener("load",f),y.addEventListener("error",_),n&&(y.crossOrigin=n),a&&(y.referrerPolicy=a),y.src=t,function(){y.removeEventListener("load",f),y.removeEventListener("error",_)}},[t,n,a]),[o.current,i.current]},ug}var Dd={},Bd={},WE=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const $E=e=>{const r=window.getComputedStyle(e).position;return!(r==="absolute"||r==="relative")};function T6(e=()=>{}){const r=Ur.useRef(e);return r.current=e,Ur.useCallback((...t)=>r.current.apply(null,t),[])}const YE=({children:e,groupProps:r,divProps:t,transform:n,transformFunc:a,parentNodeFunc:i})=>{const o=N6(),s=Ur.useRef(null),[c]=Ur.useState(()=>document.createElement("div")),u=Ur.useMemo(()=>cw.createRoot(c),[c]),d=n??!0,p=T6(()=>{if(d&&s.current){let w=s.current.getAbsoluteTransform().decompose();a&&(w=a(w)),c.style.position="absolute",c.style.zIndex="10",c.style.top="0px",c.style.left="0px",c.style.transform=`translate(${w.x}px, ${w.y}px) rotate(${w.rotation}deg) scaleX(${w.scaleX}) scaleY(${w.scaleY})`,c.style.transformOrigin="top left"}else c.style.position="",c.style.zIndex="",c.style.top="",c.style.left="",c.style.transform="",c.style.transformOrigin="";const y=t||{},{style:f}=y,_=WE(y,["style"]);Object.assign(c.style,f),Object.assign(c,_)});return Ur.useLayoutEffect(()=>{var y;const f=s.current;if(!f)return;const _=i?i({stage:f.getStage()}):(y=f.getStage())===null||y===void 0?void 0:y.container();if(_)return _.appendChild(c),d&&$E(_)&&(_.style.position="relative"),f.on("absoluteTransformChange",p),p(),()=>{var S;f.off("absoluteTransformChange",p),(S=c.parentNode)===null||S===void 0||S.removeChild(c)}},[d,i]),Ur.useLayoutEffect(()=>{p()},[t,a]),Ur.useLayoutEffect(()=>{u.render(Ur.createElement(o,null,e))}),Ur.useLayoutEffect(()=>()=>{setTimeout(()=>{u.unmount()})},[]),Ur.createElement(R1,Object.assign({ref:s},r))},XE=({selector:e,enabled:r,children:t})=>{const n=Ur.useRef(null),a=Ur.useRef(null),i=Ur.useRef(null),o=r??!0;return Ur.useLayoutEffect(()=>{if(!n.current||!a.current)return;i.current=a.current;const c=n.current.getStage().findOne(e);o&&c?a.current.moveTo(c):a.current.moveTo(n.current);const u=n.current.getLayer();if(u&&(u.batchDraw(),c)){const d=c.getLayer();if(!d)return;d.batchDraw()}},[e,o]),Ur.useEffect(()=>()=>{var s;(s=i.current)===null||s===void 0||s.destroy()},[]),Ur.createElement(R1,{name:"_outer_portal",ref:n},Ur.createElement(R1,{name:"_inner_portal",ref:a},t))};var KE=t0();const ZE=mp(KE),QE=Object.freeze(Object.defineProperty({__proto__:null,Html:YE,Portal:XE,useEvent:T6,useImage:ZE},Symbol.toStringTag,{value:"Module"})),Mh=Zc(QE);function JE(e,r){return Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(r))),e}function R6(e,r,t){const n=r-1,a=t[I6(n,t.length)];return a.marker!=="Z"?a:R6(e,n,t)}function M6(e,r,t){const n=r+1,a=t[I6(n,t.length)];return a.marker==="Z"?M6(e,n,t):a}function eP(e,r,t){let n=t[r-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"L":case"A":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"H":e.marker="L",e.values.x+=n.values.x,e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x,e.values.y+=n.values.y;break;case"C":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"S":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"Q":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y;break;case"T":e.values.x+=n.values.x,e.values.y+=n.values.y;break}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x;break}if(e.marker==="Z"){let a=function(o,s){return o[s].marker==="M"?o[s]:a(o,s-1)},i=a(t,r);e.values.x=i.values.x,e.values.y=i.values.y}return e}function tP(e,r){const t=[];switch(e.toUpperCase()){case"M":for(let n=0;n<r.length;n+=2){let a;e===e.toUpperCase()?a=n===0?"M":"L":a=n===0?"m":"l",t.push({marker:a,values:{x:r[n],y:r[n+1]}})}break;case"L":for(let n=0;n<r.length;n+=2)t.push({marker:e,values:{x:r[n],y:r[n+1]}});break;case"H":for(let n=0;n<r.length;n++)t.push({marker:e,values:{x:r[n],y:0}});break;case"V":for(let n=0;n<r.length;n++)t.push({marker:e,values:{x:0,y:r[n]}});break;case"C":for(let n=0;n<r.length;n+=6)t.push({marker:e,values:{x1:r[n],y1:r[n+1],x2:r[n+2],y2:r[n+3],x:r[n+4],y:r[n+5]}});break;case"S":for(let n=0;n<r.length;n+=4)t.push({marker:e,values:{x2:r[n],y2:r[n+1],x:r[n+2],y:r[n+3]}});break;case"Q":for(let n=0;n<r.length;n+=4)t.push({marker:e,values:{x1:r[n],y1:r[n+1],x:r[n+2],y:r[n+3]}});break;case"T":for(let n=0;n<r.length;n+=2)t.push({marker:e,values:{x:r[n],y:r[n+1]}});break;case"A":for(let n=0;n<r.length;n+=7)t.push({marker:e,values:{radiusX:r[n],radiusY:r[n+1],rotation:r[n+2],largeArc:r[n+3],sweep:r[n+4],x:r[n+5],y:r[n+6]}});break;case"Z":t.push({marker:e,values:{x:0,y:0}});break}return t}function I6(e,r){return(e%r+r)%r}function rP(e,r,t){if(r!==0&&e.marker==="L"){let n=t[r-1];["x","y"].every(i=>Math.round(Math.abs(n.values[i]-e.values[i]))===0)&&(e.overlap=!0)}return e}function S2(e,r){const t=["x","y"].every(n=>Math.round(Math.abs(e[r].values[n]-e[0].values[n]))===0);e[r].marker==="L"&&t&&(e[r].overlap=!0,S2(e,r-1)),e[r].marker==="Z"&&S2(e,r-1)}function nP(e,r,t){const n=nb(e.values,t.values),a=nb(r.values,e.values);return Math.min(a,n)}function rb(e,r){return Math.atan2(r.x-e.x,r.y-e.y)}function nb(e,r){const t=e.x-r.x,n=e.y-r.y;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}function ib(e,r){return Math.sin(e)*r}function ab(e,r){return Math.cos(e)*r}function ob(e,r){const t=r/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?r:t}function iP(e,r){return r*Math.tan(e)}function aP(e,r){let t,n=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=ob(e/2,-r):(t=ob(e/2,r),n=1,t===1/0&&(t=r)),{offset:t,sweepFlag:n}}function oP(e){const r=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(t=>{let n="";if(t.marker!=="Z"){const a=Object.keys(t.values);n=r.filter(i=>a.indexOf(i)!==-1).map(i=>t.values[i]).join()}return`${t.marker}${n}`}).join("").trim()}function j6(e){const r=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(r)].map(n=>({marker:n[0],index:n.index})).reduceRight((n,a)=>{const i=e.substring(a.index,n.length?n[n.length-1].index:e.length);return n.concat([{marker:a.marker,index:a.index,chunk:i.length>0?i.substr(1,i.length-1):i}])},[]).reverse().flatMap(n=>{const a=n.chunk.match(t),i=a?a.map(parseFloat):[];return tP(n.marker,i)}).map(eP)}function F6(e,r,t){let n=[],a=[];return t&&e.forEach(i=>JE(i,t)),e.forEach(i=>{i.marker==="M"&&n.push([]),n[n.length-1].push(i)}),n.forEach(i=>{i.map(rP),S2(i,i.length-1);const o=i[i.length-1].marker=="Z";i.filter(s=>!s.overlap).map((s,c,u)=>{const p=R6(s,c,u),y=M6(s,c,u),f=rb(s.values,p.values),_=rb(s.values,y.values),S=_-f,w=S*(180/Math.PI),b=nP(s,p,y),g=Math.abs(iP(S/2,b/2)),v=Math.min(r,g),E=aP(S,v),x=E.offset,j=E.sweepFlag,N=(c==0||c==u.length-1)&&!o;switch(s.marker){case"M":case"L":const T=[s.values.x+ib(f,x),s.values.y+ab(f,x)],F=[s.values.x+ib(_,x),s.values.y+ab(_,x)];N?a.push({marker:s.marker,values:s.values}):a.push({marker:s.marker,values:{x:parseFloat(T[0].toFixed(3)),y:parseFloat(T[1].toFixed(3))}}),!N&&(y.marker==="L"||y.marker==="M")&&a.push({marker:"A",radius:v,values:{radiusX:parseFloat(v.toFixed(3)),radiusY:parseFloat(v.toFixed(3)),rotation:w,largeArc:0,sweep:j,x:parseFloat(F[0].toFixed(3)),y:parseFloat(F[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":a.push({marker:s.marker,values:s.values});break}})}),{path:oP(a),commands:a}}function sP(e,r,t){return F6([...j6(e)],r,t)}const lP=Object.freeze(Object.defineProperty({__proto__:null,parsePath:j6,roundCommands:F6,roundCorners:sP},Symbol.toStringTag,{value:"Module"})),uP=Zc(lP);var jl={},qd={},s1={},sb;function cP(){if(sb)return s1;sb=1;var e=e||{};e.stringify=function(){var r={"visit_linear-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return r.visit_gradient(t)},"visit_radial-gradient":function(t){return r.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return r.visit_gradient(t)},visit_gradient:function(t){var n=r.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+r.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,a=r.visit(t.at),i=r.visit(t.style);return i&&(n+=" "+i),a&&(n+=" at "+a),n},"visit_default-radial":function(t){var n="",a=r.visit(t.at);return a&&(n+=a),n},"visit_extent-keyword":function(t){var n=t.value,a=r.visit(t.at);return a&&(n+=" at "+a),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return r.visit(t.value.x)+" "+r.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return r.visit_color(t.value,t)},visit_hex:function(t){return r.visit_color("#"+t.value,t)},visit_rgb:function(t){return r.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return r.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return r.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return r.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return r.visit_color("var("+t.value+")",t)},visit_color:function(t,n){var a=t,i=r.visit(n.length);return i&&(a+=" "+i),a},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",a=t.length;return t.forEach(function(i,o){n+=r.visit(i),o<a-1&&(n+=", ")}),n},visit_object:function(t){return t.width&&t.height?r.visit(t.width)+" "+r.visit(t.height):""},visit:function(t){if(!t)return"";if(t instanceof Array)return r.visit_array(t);if(typeof t=="object"&&!t.type)return r.visit_object(t);if(t.type){var n=r["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return r.visit(t)}}();var e=e||{};return e.parse=function(){var r={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,radianValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))rad/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-zA-Z0-9-,\s\#]+)/,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i},t="";function n(D){var $=new Error(t+": "+D);throw $.source=t,$}function a(){var D=i();return t.length>0&&n("Invalid input not EOF"),D}function i(){return E(o)}function o(){return s("linear-gradient",r.linearGradient,u)||s("repeating-linear-gradient",r.repeatingLinearGradient,u)||s("radial-gradient",r.radialGradient,y)||s("repeating-radial-gradient",r.repeatingRadialGradient,y)}function s(D,$,ne){return c($,function(Z){var Q=ne();return Q&&(H(r.comma)||n("Missing comma before color stops")),{type:D,orientation:Q,colorStops:E(x)}})}function c(D,$){var ne=H(D);if(ne){H(r.startCall)||n("Missing (");var Z=$(ne);return H(r.endCall)||n("Missing )"),Z}}function u(){var D=d();if(D)return D;var $=V("position-keyword",r.positionKeywords,1);return $?{type:"directional",value:$.value}:p()}function d(){return V("directional",r.sideOrCorner,1)}function p(){return V("angular",r.angleValue,1)||V("angular",r.radianValue,1)}function y(){var D,$=f(),ne;return $&&(D=[],D.push($),ne=t,H(r.comma)&&($=f(),$?D.push($):t=ne)),D}function f(){var D=_()||S();if(D)D.at=b();else{var $=w();if($){D=$;var ne=b();ne&&(D.at=ne)}else{var Z=b();if(Z)D={type:"default-radial",at:Z};else{var Q=g();Q&&(D={type:"default-radial",at:Q})}}}return D}function _(){var D=V("shape",/^(circle)/i,0);return D&&(D.style=te()||w()),D}function S(){var D=V("shape",/^(ellipse)/i,0);return D&&(D.style=g()||G()||w()),D}function w(){return V("extent-keyword",r.extentKeywords,1)}function b(){if(V("position",/^at/,0)){var D=g();return D||n("Missing positioning value"),D}}function g(){var D=v();if(D.x||D.y)return{type:"position",value:D}}function v(){return{x:G(),y:G()}}function E(D){var $=D(),ne=[];if($)for(ne.push($);H(r.comma);)$=D(),$?ne.push($):n("One extra comma");return ne}function x(){var D=j();return D||n("Expected color definition"),D.length=G(),D}function j(){return T()||O()||L()||C()||F()||A()||N()}function N(){return V("literal",r.literalColor,0)}function T(){return V("hex",r.hexColor,1)}function F(){return c(r.rgbColor,function(){return{type:"rgb",value:E(M)}})}function C(){return c(r.rgbaColor,function(){return{type:"rgba",value:E(M)}})}function A(){return c(r.varColor,function(){return{type:"var",value:I()}})}function L(){return c(r.hslColor,function(){var D=H(r.percentageValue);D&&n("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");var $=M();H(r.comma);var ne=H(r.percentageValue),Z=ne?ne[1]:null;H(r.comma),ne=H(r.percentageValue);var Q=ne?ne[1]:null;return(!Z||!Q)&&n("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[$,Z,Q]}})}function O(){return c(r.hslaColor,function(){var D=M();H(r.comma);var $=H(r.percentageValue),ne=$?$[1]:null;H(r.comma),$=H(r.percentageValue);var Z=$?$[1]:null;H(r.comma);var Q=M();return(!ne||!Z)&&n("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[D,ne,Z,Q]}})}function I(){return H(r.variableName)[1]}function M(){return H(r.number)[1]}function G(){return V("%",r.percentageValue,1)||W()||Y()||te()}function W(){return V("position-keyword",r.positionKeywords,1)}function Y(){return c(r.calcValue,function(){for(var D=1,$=0;D>0&&$<t.length;){var ne=t.charAt($);ne==="("?D++:ne===")"&&D--,$++}D>0&&n("Missing closing parenthesis in calc() expression");var Z=t.substring(0,$-1);return q($-1),{type:"calc",value:Z}})}function te(){return V("px",r.pixelValue,1)||V("em",r.emValue,1)}function V(D,$,ne){var Z=H($);if(Z)return{type:D,value:Z[ne]}}function H(D){var $,ne;return ne=/^[\n\r\t\s]+/.exec(t),ne&&q(ne[0].length),$=D.exec(t),$&&q($[0].length),$}function q(D){t=t.substr(D)}return function(D){return t=D.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),a()}}(),s1.parse=e.parse,s1.stringify=e.stringify,s1}var lb;function fm(){return lb||(lb=1,function(e){var r=qd&&qd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const t=r(cP());e.isGradient=a=>a.indexOf("linear-gradient")>=0;const n=a=>a.type==="hex"?"#"+a.value:a.type==="literal"?a.value:`${a.type}(${a.value.join(",")})`;e.parseColor=a=>{if(!(0,e.isGradient)(a))return{rotation:0,stops:[{offset:0,color:a},{offset:1,color:a}]};const i=t.default.parse(a)[0];return{rotation:parseFloat(i.orientation.value),stops:i.colorStops.map((o,s)=>({color:n(o),offset:o.length?parseFloat(o.length.value)/100:s/(i.colorStops.length-1)}))}}}(qd)),qd}var ub;function Pp(){return ub||(ub=1,function(e){var r,t=jl&&jl.__createBinding||(Object.create?function(u,d,p,y){y===void 0&&(y=p);var f=Object.getOwnPropertyDescriptor(d,p);f&&!("get"in f?!d.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(u,y,f)}:function(u,d,p,y){y===void 0&&(y=p),u[y]=d[p]}),n=jl&&jl.__setModuleDefault||(Object.create?function(u,d){Object.defineProperty(u,"default",{enumerable:!0,value:d})}:function(u,d){u.default=d}),a=jl&&jl.__importStar||(r=function(u){return r=Object.getOwnPropertyNames||function(d){var p=[];for(var y in d)Object.prototype.hasOwnProperty.call(d,y)&&(p[p.length]=y);return p},r(u)},function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p=r(u),y=0;y<p.length;y++)p[y]!=="default"&&t(d,u,p[y]);return n(d,u),d}),i=jl&&jl.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const o=i(fi()),s=a(fm()),c=i(Hs());e.useColor=(u,d=u.fill,p="fill")=>o.default.useMemo(()=>{if(!s.isGradient(d))return{[p]:d};const{stops:y,rotation:f}=s.parseColor(d),_=u.a.width/2,S=u.a.height/2,w=(f%180+180)%180,b=w>45&&w<135?u.a.width:u.a.height,g=c.default.Util.degToRad(f)-Math.PI/2,v=[];return y.forEach(({offset:E,color:x})=>{v.push(E,x)}),p==="fill"?{fillLinearGradientStartPointX:_-b/2*Math.cos(g),fillLinearGradientStartPointY:S-b/2*Math.sin(g),fillLinearGradientColorStops:v,fillLinearGradientEndPointX:_+b/2*Math.cos(g),fillLinearGradientEndPointY:S+b/2*Math.sin(g),fill:y[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:_-b/2*Math.cos(g),strokeLinearGradientStartPointY:S-b/2*Math.sin(g),strokeLinearGradientColorStops:v,strokeLinearGradientEndPointX:_+b/2*Math.cos(g),strokeLinearGradientEndPointY:S+b/2*Math.sin(g)}},[d,u.width,u.height])}(jl)),jl}var cg={},zd={},cb;function If(){return cb||(cb=1,function(e){var r=zd&&zd.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=function(i,o){const s=t.default.useRef();t.default.useLayoutEffect(()=>{s.current&&s.current.destroy()},[o]),t.default.useLayoutEffect(()=>{if(!a)return;const c=i.current.opacity();return c?(i.current.opacity(0),s.current=new n.default.Tween({node:i.current,opacity:c,onFinish:()=>{var u;(u=s.current)===null||u===void 0||u.destroy()}}),s.current.play(),()=>{var u;(u=s.current)===null||u===void 0||u.destroy()}):void 0},[])};const t=r(fi()),n=r(Hs());let a=!1;e.toggleFadeInAnimation=(i=!a)=>{a=i},e.isAnimationUsed=()=>a}(zd)),zd}var fb;function jf(){return fb||(fb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0,e.incrementLoader=function(u){t+=1;let d=!1;const p=setTimeout(()=>{d||(c(`Timeout loading asset ${u}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",u),d=!0,o())},a);return()=>{d||(clearTimeout(p),o())}},e.decrementLoader=o,e.whenLoaded=function(){return new Promise(u=>{return d=()=>{(0,r.isAnimationUsed)()?setTimeout(u,300):u(!0)},void(t===0?d():n.push(d));var d})},e.onLoadError=function(u){s.push(u)},e.triggerLoadError=c;const r=If();let t=0,n=[],a=3e4;e.setAssetLoadTimeout=u=>{a=u},e.getAssetLoadTimeout=()=>a;let i=6e3;function o(){t-=1,t===0&&(n.forEach(u=>u()),n=[])}e.setFontLoadTimeout=u=>{i=u},e.getFontLoadTimeout=()=>i;let s=[];function c(u){s.forEach(d=>d(u))}}(cg)),cg}var rc={},hb;function Ih(){return hb||(hb=1,function(e){var r,t=rc&&rc.__createBinding||(Object.create?function(b,g,v,E){E===void 0&&(E=v);var x=Object.getOwnPropertyDescriptor(g,v);x&&!("get"in x?!g.__esModule:x.writable||x.configurable)||(x={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,E,x)}:function(b,g,v,E){E===void 0&&(E=v),b[E]=g[v]}),n=rc&&rc.__setModuleDefault||(Object.create?function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}:function(b,g){b.default=g}),a=rc&&rc.__importStar||(r=function(b){return r=Object.getOwnPropertyNames||function(g){var v=[];for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&(v[v.length]=E);return v},r(b)},function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v=r(b),E=0;E<v.length;E++)v[E]!=="default"&&t(g,b,v[E]);return n(g,b),g});Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=function(){return c.value},e.setGoogleFonts=function(b){b!=="default"?(c.value=!0,s.splice(0,s.length),s.push(...b)):c.value=!1},e.getFontsList=function(){return s},e.addGlobalFont=function(b){e.globalFonts.push(b)},e.removeGlobalFont=function(b){const g=e.globalFonts.findIndex(v=>v.fontFamily===b);g!==-1&&e.globalFonts.splice(g,1)},e.replaceGlobalFonts=function(b){e.globalFonts.replace(b)},e.loadFont=async function(b,g,v){var E;if(y[b])return;const x=!!(!((E=document.fonts)===null||E===void 0)&&E.load),j=p("Arial","Arial",g,v);if(x)try{if(await document.fonts.load(`16px '${b}', ${g} ${v}`),j!==p(b,"Arial",g,v))return void(y[b]=!0)}catch{}const N=p("Times","Times",g,v),T=p(b,"Arial",g,v),F=Math.min(6e3,(0,o.getFontLoadTimeout)())/60;for(let C=0;C<F;C++){const A=p(b,"Arial",g,v),L=p(b,"Times",g,v);if(A!==T||A!==j||L!==N)return void(y[b]=!0);await new Promise(O=>setTimeout(O,60))}console.warn(`Timeout for loading font "${b}". Looks like polotno can't load it. Is it a correct font family?`),(0,o.triggerLoadError)(`Timeout for loading font "${b}"`)},e.setGoogleFontsVariants=function(b){_=b},e.getGoogleFontsVariants=function(){return _},e.getGoogleFontsUrl=S,e.injectGoogleFont=function(b){if(f[b])return;const g=S(b),v=document.createElement("link");v.type="text/css",v.href=g,v.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(v),f[b]=!0},e.injectCustomFont=function(b){const g=b.fontFamily;if(w[g]||!b.url&&!b.styles)return;const v=document.createElement("style");v.type="text/css";const E=b.styles||(b.url?[{src:`url("${b.url}")`}]:[]);let x="";E.forEach(j=>{x+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${g}';
|
|
79
|
-
src: ${j.src};
|
|
80
|
-
font-style: ${j.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${j.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),v.innerHTML=x,document.getElementsByTagName("head")[0].appendChild(v),w[b.fontFamily]=!0};const i=a(qs),o=jf();let s=i.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),c=i.observable({value:!1});e.globalFonts=i.observable([]);var u="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",d=document.createElement("canvas");function p(b,g="Arial",v="normal",E="normal"){var x=d.getContext("2d");return x.font=`${v} ${E} 40px '${b}', ${g}`,x.measureText(u).width}const y={Arial:!0};e.isFontLoaded=b=>!!y[b];const f={};let _="400,400italic,700,700italic";function S(b){return`https://fonts.googleapis.com/css?family=${b.replace(/ /g,"+")}:${_}`}const w={}}(rc)),rc}var nc={},db;function gc(){return db||(db=1,function(e){var r,t=nc&&nc.__createBinding||(Object.create?function(o,s,c,u){u===void 0&&(u=c);var d=Object.getOwnPropertyDescriptor(s,c);d&&!("get"in d?!s.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(o,u,d)}:function(o,s,c,u){u===void 0&&(u=c),o[u]=s[c]}),n=nc&&nc.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),a=nc&&nc.__importStar||(r=function(o){return r=Object.getOwnPropertyNames||function(s){var c=[];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(c[c.length]=u);return c},r(o)},function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var c=r(o),u=0;u<c.length;u++)c[u]!=="default"&&t(s,o,c[u]);return n(s,o),s});Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextSplitAllowed=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const i=a(qs);e.flags=i.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),e.setTextVerticalResizeEnabled=i.action(o=>{e.flags.textVerticalResizeEnabled=o}),e.useRemoveBackground=i.action(o=>{e.flags.removeBackgroundEnabled=o}),e.useHtmlTextRender=i.action(o=>{e.flags.htmlRenderEnabled=o}),e.setDownScalingEnabled=i.action(o=>{e.flags.imageDownScalingEnabled=o}),e.useDownScaling=i.action(o=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),(0,e.setDownScalingEnabled)(o)}),e.setForceTextFit=i.action(o=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),e.flags.textOverflow="change-font-size"}),e.setTextOverflow=i.action(o=>{e.flags.textOverflow=o}),e.setTextSplitAllowed=i.action(o=>{e.flags.textSplitAllowed=o}),e.setAnimationsEnabled=i.action(o=>{e.flags.animationsEnabled=o})}(nc)),nc}var fg={},pb;function D6(){return pb||(pb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=function(r=""){return(r.match(/<\/p>/gi)||[]).length>1&&(r=r.replace(/<\/p>/gi,(t,n,a)=>(a.slice(n+t.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
|
-
`:t)),r.replace(/(<([^>]+)>)/gi,"")},e.sanitizeHtml=function(r){return r?/<[a-z][a-z0-9]*(\s[^>]*)?>[^<]*<\/[a-z][a-z0-9]*>/i.test(r)?(r=r.replace(/<(?![a-z/!])/gi,"<")).replace(/([^a-z0-9"'\s/])>/gi,"$1>"):r.replace(/</g,"<").replace(/>/g,">"):""}}(fg)),fg}var Ud={},gb;function Op(){return gb||(gb=1,function(e){var r=Ud&&Ud.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=function(a,i){var o;const s={filters:[]},c={};i.brightnessEnabled&&(s.filters.push(t.default.Filters.Brighten),s.brightness=i.brightness),i.blurEnabled&&(s.filters.push(t.default.Filters.Blur),s.blurRadius=i.blurRadius,i.type==="text"&&i.lineHeight<1&&(c.offset=i.fontSize)),i.sepiaEnabled&&s.filters.push(t.default.Filters.Sepia),i.grayscaleEnabled&&s.filters.push(t.default.Filters.Grayscale),i.filters.forEach((u,d)=>{const p=n[d];p&&s.filters.push(p(u.intensity))}),a.setAttrs(s),s.filters.length?a.cache(Object.assign(Object.assign({},c),{pixelRatio:i.store._elementsPixelRatio})):a.clearCache(),(o=a.getLayer())===null||o===void 0||o.batchDraw()};const t=r(Hs()),n={warm:a=>i=>{const o=i.data;for(let s=0;s<o.length;s+=4)o[s]=Math.min(o[s]+30*a,255),o[s+1]=Math.min(o[s+1]+15*a,255);return i},cold:a=>i=>{const o=i.data;for(let s=0;s<o.length;s+=4)o[s]=Math.min(o[s]-15*a,255),o[s+1]=Math.min(o[s+1]-10*a,255),o[s+2]=Math.min(o[s+2]+15*a,255);return i},natural:a=>i=>{const o=i.data;a=Math.max(0,Math.min(a,1));for(let s=0;s<o.length;s+=4){o[s]=Math.min(o[s]*(1+.1*a),255),o[s+1]=Math.min(o[s+1]*(1+.1*a),255),o[s+2]=Math.min(o[s+2]*(1+.1*a),255);const c=(o[s]+o[s+1]+o[s+2])/3;o[s]=Math.min((o[s]-c)*(1+.2*a)+c,255),o[s+1]=Math.min((o[s+1]-c)*(1+.2*a)+c,255),o[s+2]=Math.min((o[s+2]-c)*(1+.2*a)+c,255)}return i},temperature:a=>i=>{const o=i.data,s=(a=Math.max(-100,Math.min(100,a)))/100;for(let c=0;c<o.length;c+=4){const u=o[c],d=(o[c+1],o[c+2]);o[c]=Math.min(Math.max(u+15*s,0),255),o[c+2]=Math.min(Math.max(d-15*s,0),255)}return i},contrast:a=>i=>{const o=i.data,s=259*((a=Math.max(-100,Math.min(100,a)))+255)/(255*(259-a));for(let c=0;c<o.length;c+=4)o[c]=Math.min(Math.max(s*(o[c]-128)+128,0),255),o[c+1]=Math.min(Math.max(s*(o[c+1]-128)+128,0),255),o[c+2]=Math.min(Math.max(s*(o[c+2]-128)+128,0),255);return i},shadows:a=>i=>{const o=i.data;a=Math.max(-100,Math.min(100,a))/100;for(let s=0;s<o.length;s+=4){const c=(o[s]+o[s+1]+o[s+2])/3;if(c<128){const u=1+a*(1-c/128)*2;o[s]=Math.min(Math.max(o[s]*u,0),255),o[s+1]=Math.min(Math.max(o[s+1]*u,0),255),o[s+2]=Math.min(Math.max(o[s+2]*u,0),255)}}return i},white:a=>i=>{const o=i.data;a=Math.max(-100,Math.min(100,a))/100;for(let s=0;s<o.length;s+=4){const c=o[s],u=o[s+1],d=o[s+2],p=(c+u+d)/3;if(p>128){const y=1+a*((p-128)/127);o[s]=Math.min(Math.max(c*y,0),255),o[s+1]=Math.min(Math.max(u*y,0),255),o[s+2]=Math.min(Math.max(d*y,0),255)}}return i},black:a=>i=>{const o=i.data;a=Math.max(-100,Math.min(100,a))/100;for(let s=0;s<o.length;s+=4){const c=o[s],u=o[s+1],d=o[s+2],p=(c+u+d)/3;if(p<128){const y=1+a*((128-p)/128);o[s]=Math.min(Math.max(c*y,0),255),o[s+1]=Math.min(Math.max(u*y,0),255),o[s+2]=Math.min(Math.max(d*y,0),255)}}return i},vibrance:a=>i=>{const o=i.data;a=Math.max(-100,Math.min(100,a))/100;for(let s=0;s<o.length;s+=4){const c=o[s],u=o[s+1],d=o[s+2],p=Math.max(c,u,d),y=a<0?(1-(p===0?0:(p-(c+u+d)/3)/p))*a*1.5:.5*a;o[s]=Math.min(Math.max(c-(p-c)*y,0),255),o[s+1]=Math.min(Math.max(u-(p-u)*y,0),255),o[s+2]=Math.min(Math.max(d-(p-d)*y,0),255)}return i},saturation:a=>i=>{const o=i.data;a=Math.max(-100,Math.min(100,a))/100;for(let s=0;s<o.length;s+=4){const c=o[s],u=o[s+1],d=o[s+2],p=.2126*c+.7152*u+.0722*d;o[s]=Math.min(Math.max(p+(c-p)*(1+a),0),255),o[s+1]=Math.min(Math.max(p+(u-p)*(1+a),0),255),o[s+2]=Math.min(Math.max(p+(d-p)*(1+a),0),255)}return i}}}(Ud)),Ud}var Hd={},vb;function rf(){return vb||(vb=1,function(e){var r=Hd&&Hd.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.isTouchDevice=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const t=r(fi());e.MOBILE_BREAKPOINT=800,e.isMobile=()=>window.innerWidth<=e.MOBILE_BREAKPOINT,e.mobileStyle=n=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${n}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${n}
|
|
91
|
-
}
|
|
92
|
-
`,e.isTouchDevice=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,e.useMobile=()=>{const[n,a]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const i=()=>{a((0,e.isMobile)())};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]),n}}(Hd)),Hd}var mb={},B6="warn";function q6(e){B6=e}function z6(){return B6}function fP(e){q6(e)}var ya;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(ya||(ya={}));var x2=function(e,r){return x2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},x2(e,r)};function Xn(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");x2(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var ba=function(){return ba=Object.assign||function(r){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},ba.apply(this,arguments)};function hP(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t}function U6(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(t=0)),t;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,a=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(d){u=[6,d],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function sp(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Iu(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),a,i=[],o;try{for(;(r===void 0||r-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return i}function ju(e,r,t){if(arguments.length===2)for(var n=0,a=r.length,i;n<a;n++)(i||!(n in r))&&(i||(i=Array.prototype.slice.call(r,0,n)),i[n]=r[n]);return e.concat(i||Array.prototype.slice.call(r))}function Ap(e){return tr(e).type}function dP(e,r){return tr(e).getChildType(r)}function H6(e,r){return tr(e).onPatch(r)}function pP(e,r){return tr(e).onSnapshot(r)}function Ph(e,r){tr(e).applyPatches(bm(r))}function gP(e,r){var t={patches:[],inversePatches:[]},n={},a,i={get recording(){return!!a},get patches(){return n.patches||(n.patches=t.patches.slice()),n.patches},get reversedInversePatches(){return n.reversedInversePatches||(n.reversedInversePatches=t.inversePatches.slice().reverse()),n.reversedInversePatches},get inversePatches(){return n.inversePatches||(n.inversePatches=t.inversePatches.slice()),n.inversePatches},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=H6(e,function(o,s){r&&!r(o,s,gm())||(t.patches.push(o),t.inversePatches.push(s),n.patches=void 0,n.inversePatches=void 0,n.reversedInversePatches=void 0)}))},replay:function(o){Ph(o||e,t.patches)},undo:function(o){Ph(o||e,t.inversePatches.slice().reverse())}};return i.resume(),i}function vP(e){var r=tr(e);if(!r.isRoot)throw new Gt("`protect` can only be invoked on root nodes");r.isProtectionEnabled=!0}function mP(e){var r=tr(e);if(!r.isRoot)throw new Gt("`unprotect` can only be invoked on root nodes");r.isProtectionEnabled=!1}function yP(e){return tr(e).isProtected}function V6(e,r){return tr(e).applySnapshot(r)}function hm(e,r){r===void 0&&(r=!0);var t=tr(e);return r?t.snapshot:t.type.getSnapshot(t,!1)}function bP(e,r){r===void 0&&(r=1);for(var t=tr(e).parent;t;){if(--r===0)return!0;t=t.parent}return!1}function wP(e,r){r===void 0&&(r=1);for(var t=r,n=tr(e).parent;n;){if(--t===0)return n.storedValue;n=n.parent}throw new Gt("Failed to find the parent of ".concat(tr(e)," at depth ").concat(r))}function _P(e,r){for(var t=tr(e).parent;t;){if(r.is(t.storedValue))return!0;t=t.parent}return!1}function SP(e,r){for(var t=tr(e).parent;t;){if(r.is(t.storedValue))return t.storedValue;t=t.parent}throw new Gt("Failed to find the parent of ".concat(tr(e)," of a given type"))}function G6(e){return tr(e).root.storedValue}function W6(e){return tr(e).path}function xP(e){return Lh(tr(e).path)}function EP(e){return tr(e).isRoot}function PP(e,r){var t=c8(tr(e),r);return t?t.value:void 0}function OP(e,r,t){var n=tr(r).root.identifierCache.resolve(e,jh(t));return n==null?void 0:n.value}function $6(e){return tr(e).identifier}function AP(e,r){r===void 0&&(r=!0);try{var t=e();if(t==null)return;if(xn(t))return r?dm(t)?t:void 0:t;throw new Gt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof wm)return;throw n}}function CP(e,r){r===void 0&&(r=!0);try{var t=e();if(t==null)return!1;if(xn(t))return r?dm(t):!0;throw new Gt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof wm)return!1;throw n}}function Y6(e,r){var t=c8(tr(e),r,!1);if(t!==void 0)try{return t.value}catch{return}}function kP(e,r){return u8(tr(e),tr(r))}function LP(e,r){r===void 0&&(r=!0);var t=tr(e);return t.type.create(t.snapshot,r===!0?t.root.environment:r===!1?void 0:r)}function NP(e){return tr(e).detach(),e}function TP(e){var r=tr(e);r.isRoot?r.die():r.parent.removeChild(r.subpath)}function dm(e){return tr(e).observableIsAlive}function RP(e,r){var t=tr(e);return t.addDisposer(r),r}function MP(e){var r=tr(e),t=r.root.environment;if(!t)throw new Gt("Failed to find the environment of ".concat(r," ").concat(r.path));return t}function IP(e){var r=tr(e),t=r.root.environment;return!!t}function X6(e,r){var t=tr(e);t.getChildren().forEach(function(n){xn(n.storedValue)&&X6(n.storedValue,r)}),r(t.storedValue)}function K6(e){var r;return xn(e)?r=Ap(e):r=e,{name:r.name,properties:ba({},r.properties)}}function jP(e){var r=tr(e).type,t=ba(ba({},K6(r)),{actions:[],volatile:[],views:[],flowActions:[]}),n=Object.getOwnPropertyNames(e);return n.forEach(function(a){if(!(a in t.properties)){var i=Object.getOwnPropertyDescriptor(e,a);if(i.get){e6(e,a)?t.views.push(a):t.volatile.push(a);return}i.value._isFlowAction===!0&&t.flowActions.push(a),i.value._isMSTAction===!0?t.actions.push(a):r6(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function FP(e){return e}function DP(e){return e}function BP(e){return e}function qP(e){return tr(e).nodeId}var Z6=function(){function e(r,t,n,a){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:no.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=a,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(r){var t=this.isAlive;this._state=r;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._hookSubscribers&&this._hookSubscribers.emit(r,this,r)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){return this._hookSubscribers||(this._hookSubscribers=new g8),this._hookSubscribers.register(r,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){this._parent=r,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.pathAtom||(this.pathAtom=cp("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Wc(this._subpath):""),this.parent.getEscapedPath(r)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==no.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===no.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=cp("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.state===no.CREATED){if(this.parent){if(this.parent.state!==no.FINALIZED)return;this.fireHook(ya.afterAttach)}this.state=no.FINALIZED,r&&r()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=no.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(ya.beforeDestroy)}}),e}(),dp=function(e){Xn(r,e);function r(t,n,a,i,o){var s=e.call(this,t,n,a,i)||this;try{s.storedValue=t.createNewInstance(o)}catch(c){throw s.state=no.DEAD,c}return s.state=no.CREATED,s.finalizeCreation(),s}return Object.defineProperty(r.prototype,"root",{get:function(){if(!this.parent)throw new Gt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.parent!==t,i=this.subpath!==n;!a&&!i||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(r.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(r.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(t).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(r.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===no.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(r.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(r.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(r.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(r.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.fireInternalHook(t)}}),r}(Z6);dp.prototype.die=la(dp.prototype.die);var zP=1,Vl;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Vl||(Vl={}));var Is;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Is||(Is={}));var UP={onError:function(e){throw e}},vs=function(e){Xn(r,e);function r(t,n,a,i,o){var s=e.call(this,t,n,a,i)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++zP}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Vl.UNINITIALIZED}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=Tf(function(){return s.getSnapshot()}),s.unbox=s.unbox.bind(s),s._initialSnapshot=o,s.identifierAttribute=t.identifierAttribute,n||(s.identifierCache=new lO),s._childNodes=t.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var c=s._initialSnapshot[s.identifierAttribute];if(c===void 0){var u=s._childNodes[s.identifierAttribute];u&&(c=u.value)}if(typeof c!="string"&&typeof c!="number")throw new Gt("Instance identifier '".concat(s.identifierAttribute,"' for type '").concat(s.type.name,"' must be a string or a number"));s.identifier=jh(c),s.unnormalizedIdentifier=c}return n?n.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return Object.defineProperty(r.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)}}),Object.defineProperty(r.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(t){t===void 0&&(t=!0),this._observableInstanceState===Vl.UNINITIALIZED&&this.createObservableInstance(t)}}),Object.defineProperty(r.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,a,i,o;t===void 0&&(t=!0),this._observableInstanceState=Vl.CREATING;for(var s=[],c=this.parent;c&&c._observableInstanceState===Vl.UNINITIALIZED;)s.unshift(c),c=c.parent;try{for(var u=sp(s),d=u.next();!d.done;d=u.next()){var p=d.value;p.createObservableInstanceIfNeeded(!1)}}catch(S){n={error:S}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}var y=this.type;try{this.storedValue=y.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,y.finalizeNewInstance(this,this.storedValue)}catch(S){throw this.state=no.DEAD,S}finally{this._isRunningAction=!1}if(this._observableInstanceState=Vl.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=Ch,this.state=no.CREATED,t){this.fireHook(ya.afterCreate),this.finalizeCreation();try{for(var f=sp(s.reverse()),_=f.next();!_.done;_=f.next()){var p=_.value;p.fireHook(ya.afterCreate),p.finalizeCreation()}}catch(S){i={error:S}}finally{try{_&&!_.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}}),Object.defineProperty(r.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(ya.beforeDetach);var t=this.state;this.state=no.DETACHING;var n=this.root,a=n.environment,i=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=a,this.identifierCache=i}finally{this.state=t}}}}),Object.defineProperty(r.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t!==this.parent,i=n!==this.subpath;!a&&!i||(a?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,n),this.fireHook(ya.afterAttach)):i&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(r.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.fireInternalHook(t);var a=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[t];typeof a=="function"&&(Sh?Sh(function(){a.apply(n.storedValue)}):a.apply(this.storedValue))}}),Object.defineProperty(r.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Vl.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(r.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(r.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,n=this._childNodes,a=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(n,a),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(r.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(r.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=z6();if(!this.isAlive&&n!=="ignore"){var a=this._getAssertAliveError(t);switch(n){case"error":throw new Gt(a);case"warn":_O(a)}}}}),Object.defineProperty(r.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",a=t.subpath&&Wc(t.subpath)||"",i=t.actionContext||pm();i&&i.type!=="action"&&i.parentActionEvent&&(i=i.parentActionEvent);var o="";if(i&&i.name!=null){var s=i&&i.context&&W6(i.context)||n;o="".concat(s,".").concat(i.name,"()")}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '".concat(this.type.name,"', Path upon death: '").concat(n,"', Subpath: '").concat(a,"', Action: '").concat(o,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return this._observableInstanceState===Vl.CREATED?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(Ch),this._autoUnbox=!1;try{return this._observableInstanceState===Vl.CREATED?this.type.getChildren(this):h8(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.type.getChildType(t)}}),Object.defineProperty(r.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw new Gt("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.type.removeChild(this,t)}}),Object.defineProperty(r.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t)}}),Object.defineProperty(r.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(t).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(r.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this.baseFinalizeCreation(function(){var n,a;try{for(var i=sp(t.getChildren()),o=i.next();!o.done;o=i.next()){var s=o.value;s.finalizeCreation()}}catch(c){n={error:c}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}t.fireInternalHook(ya.afterCreationFinalization)})}}),Object.defineProperty(r.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new Gt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(r.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this._applyPatches=pp(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(a){if(!a.path){t.type.applySnapshot(t,a.value);return}var i=Lh(a.path),o=f8(t,i.slice(0,-1));o.applyPatchLocally(i[i.length-1],a)})}),this._applySnapshot=pp(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==t.snapshot)return t.type.applySnapshot(t,n)}),Ef(this.storedValue,"$treenode",this),Ef(this.storedValue,"toJSON",cO)}}),Object.defineProperty(r.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===no.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(r.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Vl.UNINITIALIZED&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Is.Dispose),this._internalEventsClear(Is.Dispose))}}),Object.defineProperty(r.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(r.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._addSnapshotReaction(),this._internalEventsRegister(Is.Snapshot,t)}}),Object.defineProperty(r.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Is.Snapshot,t)}}),Object.defineProperty(r.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Is.Patch,t)}}),Object.defineProperty(r.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._internalEventsHasSubscribers(Is.Patch)){var a=n.path.substr(this.path.length)+(t.path?"/"+t.path:""),i=yO({},t,{path:a}),o=Iu(AO(i),2),s=o[0],c=o[1];this._internalEventsEmit(Is.Patch,s,c)}this.parent&&this.parent.emitPatch(t,n)}}),Object.defineProperty(r.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Is.Dispose,t)}}),Object.defineProperty(r.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Is.Dispose,t,!0);return}throw new Gt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(r.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._internalEventsHas(Is.Dispose,t))throw new Gt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Is.Dispose,t)}}),Object.defineProperty(r.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.middlewares){var n=this.middlewares.indexOf(t);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(r.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var i={handler:t,includeHooks:n};return this.middlewares?this.middlewares.push(i):this.middlewares=[i],function(){a.removeMiddleware(i)}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,n)}}),Object.defineProperty(r.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;if(!this._hasSnapshotReaction){var n=Ww(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},UP);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(r.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)}}),Object.defineProperty(r.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){return a===void 0&&(a=!1),this._internalEvents||(this._internalEvents=new g8),this._internalEvents.register(t,n,a)}}),Object.defineProperty(r.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!!this._internalEvents&&this._internalEvents.has(t,n)}}),Object.defineProperty(r.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this._internalEvents&&this._internalEvents.unregister(t,n)}}),Object.defineProperty(r.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var n,a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];this._internalEvents&&(n=this._internalEvents).emit.apply(n,ju([t],Iu(a),!1))}}),Object.defineProperty(r.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEvents&&this._internalEvents.clear(t)}}),Object.defineProperty(r.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),r}(Z6);vs.prototype.createObservableInstance=la(vs.prototype.createObservableInstance);vs.prototype.detach=la(vs.prototype.detach);vs.prototype.die=la(vs.prototype.die);var Q6,Or;(function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(Or||(Or={}));var J6="cannotDetermine",HP=Symbol("$type"),pc=function(){function e(r){Object.defineProperty(this,Q6,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){return hc(this,r),this.instantiate(null,"",t,r).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){throw new Gt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=l8(r);if(n){var a=Ap(r);return this.isAssignableFrom(a)?ms():ys(t,r)}return this.isValidSnapshot(r,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.validate(r,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new Gt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw new Gt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw new Gt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw new Gt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();Q6=HP;pc.prototype.create=la(pc.prototype.create);var Oh=function(e){Xn(r,e);function r(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(r.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t===void 0&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.createObservableInstanceIfNeeded(),t.storedValue}}),Object.defineProperty(r.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!t.identifierAttribute||t.identifier===jh(n[t.identifierAttribute])}}),Object.defineProperty(r.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t.isDetaching?!1:t.snapshot===n||xn(n)&&tr(n)===t?!0:t.type===this&&d8(n)&&!xn(n)&&this.isMatchingSnapshotId(t,n)?(t.applySnapshot(n),!0):!1}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.tryToReconcileNode(t,n);if(o)return t.setParent(a,i),t;if(t.die(),xn(n)&&this.isAssignableFrom(Ap(n))){var s=tr(n);return s.setParent(a,i),s}return this.instantiate(a,i,void 0,n)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),r}(pc);Oh.prototype.create=la(Oh.prototype.create);var Ff=function(e){Xn(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t}}),Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t.isDetaching&&t.type===this&&t.storedValue===n)return t;var o=this.instantiate(a,i,void 0,n);return t.die(),o}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),r}(pc);function wa(e){return typeof e=="object"&&e&&e.isType===!0}var Ou=new Map;function VP(e){return function(t,n,a){switch(t.type){case"action":if(!e.filter||e.filter(t)===!0){var i=e.onStart(t);e.onResume(t,i),Ou.set(t.id,{call:t,context:i,async:!1});try{var o=n(t);return e.onSuspend(t,i),Ou.get(t.id).async===!1&&(Ou.delete(t.id),e.onSuccess(t,i,o)),o}catch(c){throw Ou.delete(t.id),e.onFail(t,i,c),c}}else return n(t);case"flow_spawn":{var s=Ou.get(t.rootId);return s.async=!0,n(t)}case"flow_resume":case"flow_resume_error":{var s=Ou.get(t.rootId);e.onResume(t,s.context);try{return n(t)}finally{e.onSuspend(t,s.context)}}case"flow_throw":{var s=Ou.get(t.rootId);return Ou.delete(t.rootId),e.onFail(t,s.context,t.args[0]),n(t)}case"flow_return":{var s=Ou.get(t.rootId);return Ou.delete(t.rootId),e.onSuccess(t,s.context,t.args[0]),n(t)}}}}var GP=function(){function e(r,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),r&&r.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,r))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function WP(e){var r=new Map;return function(n,a){var i=n.parentActionEvent?r.get(n.parentActionEvent.id):void 0;if(n.type==="action"){var o=ba(ba({},n),{env:i&&i.call.env,parentCall:i&&i.call}),s=!e.filter||e.filter(o),c=s?e:void 0,u=new GP(c,o);r.set(n.id,u);var d=void 0;try{d=a(n)}catch(y){throw r.delete(n.id),u.finish(y),y}return u.hasFlowsPending||(r.delete(n.id),u.finish()),d}else{if(!i)return a(n);switch(n.type){case"flow_spawn":return i.incFlowsPending(),a(n);case"flow_resume":case"flow_resume_error":return a(n);case"flow_throw":{var p=n.args[0];try{return a(n)}finally{i.decFlowsPending(),i.hasFlowsPending||(r.delete(n.parentActionEvent.id),i.finish(p))}}case"flow_return":try{return a(n)}finally{i.decFlowsPending(),i.hasFlowsPending||(r.delete(n.parentActionEvent.id),i.finish())}}}}}function $P(e,r,t,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(kh(n))return n;if(xn(n))return l1("[MSTNode: ".concat(Ap(n).name,"]"));if(typeof n=="function")return l1("[function]");if(typeof n=="object"&&!xf(n)&&!ym(n))return l1("[object ".concat(n&&n.constructor&&n.constructor.name||"Complex Object","]"));try{return JSON.stringify(n),n}catch(a){return l1(""+a)}}function YP(e,r){return r&&typeof r=="object"&&"$MST_DATE"in r?new Date(r.$MST_DATE):r}function l1(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function e8(e,r){Sh(function(){bm(r).forEach(function(t){return XP(e,t)})})}function XP(e,r){var t=Y6(e,r.path||"");if(!t)throw new Gt("Invalid action path: ".concat(r.path||""));var n=tr(t);if(r.name==="@APPLY_PATCHES")return Ph.call(null,t,r.args[0]);if(r.name==="@APPLY_SNAPSHOT")return V6.call(null,t,r.args[0]);if(typeof t[r.name]!="function")throw new Gt("Action '".concat(r.name,"' does not exist in '").concat(n.path,"'"));return t[r.name].apply(t,r.args?r.args.map(function(a){return YP(n,a)}):[])}function KP(e,r){var t=[],n=function(o){var s=r?r(o,gm()):!0;s&&t.push(o)},a,i={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=t8(e,n))},replay:function(o){e8(o,t)}};return i.resume(),i}function t8(e,r,t){return t===void 0&&(t=!1),i8(e,function(a,i){if(a.type==="action"&&a.id===a.rootId){var o=tr(a.context),s={name:a.name,path:u8(tr(e),o),args:a.args.map(function(u,d){return $P(o,a.name,d,u)})};if(t){var c=i(a);return r(s),c}else return r(s),i(a)}else return i(a)})}var ZP=1,lp;function pm(){return lp}function r8(){return ZP++}function E2(e,r){var t=tr(e.context);e.type==="action"&&t.assertAlive({actionContext:e});var n=t._isRunningAction;t._isRunningAction=!0;var a=lp;lp=e;try{return eO(t,e,r)}finally{lp=a,t._isRunningAction=n}}function n8(e){if(e)return e.type==="action"?e:e.parentActionEvent}function pp(e,r,t){var n=function(){var a=r8(),i=lp,o=n8(i);return E2({type:"action",name:r,id:a,args:v8(arguments),context:e,tree:G6(e),rootId:i?i.rootId:a,parentId:i?i.id:0,allParentIds:i?ju(ju([],Iu(i.allParentIds),!1),[i.id],!1):[],parentEvent:i,parentActionEvent:o},t)};return n._isMSTAction=!0,n._isFlowAction=t._isFlowAction,n}function i8(e,r,t){t===void 0&&(t=!0);var n=tr(e);return n.addMiddleWare(r,t)}function QP(e,r,t){t===void 0&&(t=!0);var n={handler:e,includeHooks:t};return r.$mst_middleware=r.$mst_middleware||[],r.$mst_middleware.push(n),r}var JP=function(){function e(r,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=r;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.middlewares[this.arrayIndex];if(r){var t=r[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function eO(e,r,t){var n=new JP(e,t);if(n.isEmpty)return la(t).apply(null,r.args);var a=null;function i(o){var s=n.getNextMiddleware(),c=s&&s.handler;if(!c)return la(t).apply(null,o.args);if(!s.includeHooks&&ya[o.name])return i(o);function u(p,y){a=i(p),y&&(a=y(a))}function d(p){a=p}return c(o,u,d),a}return i(r)}function gm(){for(var e=pm();e&&e.type!=="action";)e=e.parentActionEvent;return e}function a8(e,r,t){for(var n=typeof r=="number"?r:r.id,a=t?e:e.parentActionEvent;a;){if(a.id===n)return!0;a=a.parentActionEvent}return!1}function tO(e,r){return a8(e,r,!1)}function rO(e,r){return a8(e,r,!0)}function nO(e){try{return JSON.stringify(e)}catch(r){return"<Unserializable: ".concat(r,">")}}function o8(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):xn(e)?"<".concat(e,">"):"`".concat(nO(e),"`")}function iO(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function aO(e){var r=e.value,t=e.context[e.context.length-1].type,n=e.context.map(function(s){var c=s.path;return c}).filter(function(s){return s.length>0}).join("/"),a=n.length>0?'at path "/'.concat(n,'" '):"",i=xn(r)?"value of type ".concat(tr(r).type.name,":"):kh(r)?"value":"snapshot",o=t&&xn(r)&&t.is(tr(r).snapshot);return"".concat(a).concat(i," ").concat(o8(r)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?C8(t)||kh(r)?".":", expected an instance of `".concat(t.name,"` or a snapshot like `").concat(t.describe(),"` instead.")+(o?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function vm(e,r,t){return e.concat([{path:r,type:t}])}function ms(){return Ah}function ys(e,r,t){return[{context:e,value:r,message:t}]}function r0(e){return e.reduce(function(r,t){return r.concat(t)},[])}function hc(e,r){SO()&&s8(e,r)}function s8(e,r){var t=e.validate(r,[{path:"",type:e}]);if(t.length>0)throw new Gt(oO(e,r,t))}function oO(e,r,t){if(t.length!==0)return"Error while converting ".concat(iO(o8(r))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(aO).join(`
|
|
95
|
-
`)}var sO=0,lO=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:sO++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:Ln.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:Ln.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.lastCacheModificationPerId.get(r);this.lastCacheModificationPerId.set(r,t===void 0?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.lastCacheModificationPerId.get(r)||0;return"".concat(this.cacheId,"-").concat(t)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){if(t===void 0&&(t=!0),r.identifierAttribute){var n=r.identifier;this.cache.has(n)||this.cache.set(n,Ln.array([],n0));var a=this.cache.get(n);if(a.indexOf(r)!==-1)throw new Gt("Already registered");a.push(r),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this;Y2(r.identifierCache.cache).forEach(function(n){return n.forEach(function(a){t.addNodeToCache(a)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.identifierAttribute){var t=r.identifier,n=this.cache.get(t);n&&(n.remove(r),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(r.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this,n=new e,a=r.path+"/";return n6(this.cache).forEach(function(i){for(var o=Iu(i,2),s=o[0],c=o[1],u=!1,d=c.length-1;d>=0;d--){var p=c[d];(p===r||p.path.indexOf(a)===0)&&(n.addNodeToCache(p,!1),c.splice(d,1),c.length||t.cache.delete(s),u=!0)}u&&t.updateLastCacheModificationPerId(s)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.cache.get(t);return n?n.some(function(a){return r.isAssignableFrom(a.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.cache.get(t);if(!n)return null;var a=n.filter(function(i){return r.isAssignableFrom(i.type)});switch(a.length){case 0:return null;case 1:return a[0];default:throw new Gt("Cannot resolve a reference to type '".concat(r.name,"' with id: '").concat(t,"' unambigously, there are multiple candidates: ").concat(a.map(function(i){return i.path}).join(", ")))}}}),e}();function mm(e,r,t,n,a){var i=l8(a);if(i){if(i.parent)throw new Gt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(r?r.path:"","/").concat(t,"', but it lives already at '").concat(i.path,"'"));return r&&i.setParent(r,t),i}return new vs(e,r,t,n,a)}function nf(e,r,t,n,a){return new dp(e,r,t,n,a)}function uO(e){return e instanceof dp||e instanceof vs}var no;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"})(no||(no={}));function xn(e){return!!(e&&e.$treenode)}function tr(e){if(!xn(e))throw new Gt("Value ".concat(e," is no MST Node"));return e.$treenode}function l8(e){return e&&e.$treenode||null}function cO(){return tr(this).snapshot}var fO=function(e){return".."};function u8(e,r){if(e.root!==r.root)throw new Gt("Cannot calculate relative path: objects '".concat(e,"' and '").concat(r,"' are not part of the same object tree"));for(var t=Lh(e.path),n=Lh(r.path),a=0;a<t.length&&t[a]===n[a];a++);return t.slice(a).map(fO).join("/")+M1(n.slice(a))}function c8(e,r,t){return t===void 0&&(t=!0),f8(e,Lh(r),t)}function f8(e,r,t){t===void 0&&(t=!0);var n=e;try{for(var a=0;a<r.length;a++){var i=r[a];if(i===".."){if(n=n.parent,n)continue}else{if(i===".")continue;if(n){if(n instanceof dp){var o=n.value;xn(o)&&(n=tr(o))}if(n instanceof vs){var s=n.getChildType(i);if(s&&(n=n.getChildNode(i),n))continue}}}throw new Gt("Could not resolve '".concat(i,"' in path '").concat(M1(r.slice(0,a))||"/","' while resolving '").concat(M1(r),"'"))}}catch(c){if(!t)return;throw c}return n}function h8(e){if(!e)return Ah;var r=Object.keys(e);if(!r.length)return Ah;var t=new Array(r.length);return r.forEach(function(n,a){t[a]=e[n]}),t}function hO(e){return m8(e)}var dO=Object.toString(),Ah=Object.freeze([]),Ch=Object.freeze({}),n0=Mw().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(n0);var Gt=function(e){Xn(r,e);function r(t){return t===void 0&&(t="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(t))||this}return r}(Error);function pO(e){return e}var gO=Number.isInteger;function vO(e){return Number(e)===e&&e%1!==0}function mO(e){return Number.isFinite(e)}function ym(e){return Array.isArray(e)||Vo(e)}function bm(e){return e?ym(e)?e:[e]:Ah}function yO(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var n=0;n<r.length;n++){var a=r[n];for(var i in a)e[i]=a[i]}return e}function xf(e){var r;if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t==null?!0:((r=t.constructor)===null||r===void 0?void 0:r.toString())===dO}function d8(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function kh(e,r){return r===void 0&&(r=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||r&&e instanceof Date}function p8(e){return typeof e!="function"}function bO(e,r,t){Ta(e)?K2(e,r,t):Object.defineProperty(e,r,t)}function Ef(e,r,t){bO(e,r,{enumerable:!1,writable:!1,configurable:!0,value:t})}var wO=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this;return t===void 0&&(t=!1),t?this.handlers.unshift(r):this.handlers.push(r),function(){n.unregister(r)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.handlers.indexOf(r)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.handlers.indexOf(r);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=this.handlers.slice();n.forEach(function(a){return a.apply(void 0,ju([],Iu(r),!1))})}}),e}(),g8=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=this.eventHandlers&&this.eventHandlers[r];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var a=this.eventHandlers[r];return a||(a=this.eventHandlers[r]=new wO),a.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.eventHandlers&&this.eventHandlers[r];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var n=this.eventHandlers&&this.eventHandlers[r];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.eventHandlers&&delete this.eventHandlers[r]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var t,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var i=this.eventHandlers&&this.eventHandlers[r];i&&(t=i).emit.apply(t,ju([],Iu(n),!1))}}),e}();function v8(e){for(var r=new Array(e.length),t=0;t<e.length;t++)r[t]=e[t];return r}function hg(e,r){return e.indexOf(r)===0}function _O(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function SO(){return typeof process<"u"&&mb&&mb.ENABLE_TYPE_CHECK==="true"}function dg(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function m8(e){return OO(e.name,e)}function xO(e){return e}function EO(e){return function(){var r,t=[];for(r=0;r<arguments.length;r++)t[r]=arguments[r];return U6(this,function(n){switch(n.label){case 0:return[4,e.apply(void 0,ju([],Iu(t),!1))];case 1:return[2,n.sent()]}})}}function PO(e){return U6(this,function(r){switch(r.label){case 0:return[4,e];case 1:return[2,r.sent()]}})}function OO(e,r){var t=function(){var a=r8(),i=pm();if(!i)throw new Gt("a mst flow must always have a parent context");var o=n8(i);if(!o)throw new Gt("a mst flow must always have a parent action context");var s={name:e,id:a,tree:i.tree,context:i.context,parentId:i.id,allParentIds:ju(ju([],Iu(i.allParentIds),!1),[i.id],!1),rootId:i.rootId,parentEvent:i,parentActionEvent:o},c=arguments;function u(d,p,y){return d.$mst_middleware=t.$mst_middleware,E2(ba(ba({},s),{type:p,args:[y]}),d)}return new Promise(function(d,p){var y,f=function(){y=r.apply(null,arguments),_(void 0)};f.$mst_middleware=t.$mst_middleware,E2(ba(ba({},s),{type:"flow_spawn",args:v8(c)}),f);function _(b){var g;try{var v=u(function(E){g=y.next(E)},"flow_resume",b);v instanceof Error&&(g=y.throw(v))}catch(E){dg(function(){u(function(x){p(E)},"flow_throw",E)});return}w(g)}function S(b){var g;try{u(function(v){g=y.throw(v)},"flow_resume_error",b)}catch(v){dg(function(){u(function(E){p(v)},"flow_throw",v)});return}w(g)}function w(b){if(b.done){dg(function(){u(function(g){d(g)},"flow_return",b.value)});return}if(!b.value||typeof b.value.then!="function")throw new Gt("Only promises can be yielded to `async`, got: "+b);return b.value.then(_,S)}})};return t._isFlowAction=!0,t}function AO(e){if(!("oldValue"in e))throw new Gt("Patches without `oldValue` field cannot be inversed");return[CO(e),kO(e)]}function CO(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function kO(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function LO(e){return typeof e=="number"}function Wc(e){return LO(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function y8(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function M1(e){if(e.length===0)return"";var r=function(t){return t.map(Wc).join("/")};return e[0]==="."||e[0]===".."?r(e):"/"+r(e)}function Lh(e){var r=e.split("/").map(y8),t=e===""||e==="."||e===".."||hg(e,"/")||hg(e,"./")||hg(e,"../");if(!t)throw new Gt("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return r[0]===""&&r.shift(),r}var pg=Symbol("$preProcessorFailed"),NO=function(e){Xn(r,e);function r(t,n,a){var i=e.call(this,a||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(r.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t}}),Object.defineProperty(r.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(t){try{return this.preProcessSnapshot(t)}catch{return pg}}}),Object.defineProperty(r.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,t,n.storedValue):t}}),Object.defineProperty(r.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;TO(t.type,this,"create"),t instanceof vs&&(t.hasSnapshotPostProcessor=!!this._processors.postProcessor);var a=t.getSnapshot;t.getSnapshot=function(){return n.postProcessSnapshot(a.call(t),t)},L8(this._subtype)||(t.getReconciliationType=function(){return n})}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=xn(i)?i:this.preProcessSnapshot(i),s=this._subtype.instantiate(t,n,a,o);return this._fixNode(s),s}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this._subtype.reconcile(t,xn(n)?n:this.preProcessSnapshot(n),a,i);return o!==t&&this._fixNode(o),o}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=!0);var a=this._subtype.getSnapshot(t);return n?this.postProcessSnapshot(a,t):a}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.preProcessSnapshotSafe(t);return a===pg?ys(n,t,"Failed to preprocess value"):this._subtype.validate(a,n)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(r.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=wa(t)?this._subtype:xn(t)?hm(t,!1):this.preProcessSnapshotSafe(t);return n===pg?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!(this._subtype instanceof Oh))return!1;var a=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(t,a)}}),r}(pc);function TO(e,r){for(var t,n,a=[],i=2;i<arguments.length;i++)a[i-2]=arguments[i];try{for(var o=sp(a),s=o.next();!s.done;s=o.next()){var c=s.value;e[c]=r[c].bind(r)}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}function RO(e,r,t){return new NO(e,r,t)}var yb="Map.put can only be used to store complex values that have an identifier type attribute";function b8(e,r){var t,n,a=e.getSubTypes();if(a===J6)return!1;if(a){var i=bm(a);try{for(var o=sp(i),s=o.next();!s.done;s=o.next()){var c=s.value;if(!b8(c,r))return!1}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}return e instanceof gp&&r.push(e),!0}var Uc;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Uc||(Uc={}));var MO=function(e){Xn(r,e);function r(t,n){return e.call(this,t,Ln.ref.enhancer,n)||this}return Object.defineProperty(r.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(r.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(r.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(r.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(r.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!t)throw new Gt("Map.put cannot be used to set empty values");if(xn(t)){var n=tr(t);if(n.identifier===null)throw new Gt(yb);return this.set(n.identifier,t),t}else if(d8(t)){var a=tr(this),i=a.type;if(i.identifierMode!==Uc.YES)throw new Gt(yb);var o=i.mapIdentifierAttribute,s=t[o];if(!_m(s)){var c=this.put(i.getChildType().create(t,a.environment));return this.put(hm(c))}var u=jh(s);return this.set(u,t),this.get(u)}else throw new Gt("Map.put can only be used to store complex values")}}),r}(Z1),I1=function(e){Xn(r,e);function r(t,n,a){a===void 0&&(a=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Uc.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=a,i}return Object.defineProperty(r.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new r(this.name,this._subType,n)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._determineIdentifierMode(),mm(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Uc.UNKNOWN){var t=[];if(b8(this._subType,t)){var n=t.reduce(function(a,i){if(!i.identifierAttribute)return a;if(a&&a!==i.identifierAttribute)throw new Gt("The objects in a map should all have the same identifier attribute, expected '".concat(a,"', but child of type '").concat(i.name,"' declared attribute '").concat(i.identifierAttribute,"' as identifier"));return i.identifierAttribute},void 0);n?(this.identifierMode=Uc.YES,this.mapIdentifierAttribute=n):this.identifierMode=Uc.NO}}}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type._subType,i={};return Object.keys(n).forEach(function(o){i[o]=a.instantiate(t,o,void 0,n[o])}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new MO(t,this.name)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){$2(n,t.unbox);var a=t.type;a.hookInitializers.forEach(function(i){var o=i(n);Object.keys(o).forEach(function(s){var c=o[s],u=pp(n,s,c);Ef(n,s,u)})}),Y1(n,this.willChange),K1(n,this.didChange)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return Y2(t.storedValue)}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t.storedValue.get(""+n);if(!a)throw new Gt("Not a child "+n);return a}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=tr(t.object),a=t.name;n.assertWritable({subpath:a});var i=n.type,o=i._subType;switch(t.type){case"update":{var s=t.newValue,c=t.object.get(a);if(s===c)return null;hc(o,s),t.newValue=o.reconcile(n.getChildNode(a),t.newValue,n,a),i.processIdentifier(a,t.newValue)}break;case"add":hc(o,t.newValue),t.newValue=o.instantiate(n,a,void 0,t.newValue),i.processIdentifier(a,t.newValue);break}return t}}),Object.defineProperty(r.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.identifierMode===Uc.YES&&n instanceof vs){var a=n.identifier;if(a!==t)throw new Gt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(a,"', but expected: '").concat(t,"'"))}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return t.getChildren().forEach(function(a){n[a.subpath]=a.snapshot}),n}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=tr(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:Wc(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Wc(t.name),value:t.newValue.snapshot,oldValue:void 0},n);case"delete":var a=t.oldValue.snapshot;return t.oldValue.die(),void n.emitPatch({op:"remove",path:Wc(t.name),oldValue:a},n)}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=t.storedValue;switch(a.op){case"add":case"replace":i.set(n,a.value);break;case"remove":i.delete(n);break}}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=t.storedValue,i={};if(Array.from(a.keys()).forEach(function(s){i[s]=!1}),n)for(var o in n)a.set(o,n[o]),i[""+o]=!0;Object.keys(i).forEach(function(s){i[s]===!1&&a.delete(s)})}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return xf(t)?r0(Object.keys(t).map(function(i){return a._subType.validate(t[i],vm(n,i,a._subType))})):ys(n,t,"Value is not a plain object")}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Ch}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.delete(n)}}),r}(Oh);I1.prototype.applySnapshot=la(I1.prototype.applySnapshot);function IO(e){return new I1("Map<string, ".concat(e.name,">"),e)}function jO(e){return wa(e)&&(e.flags&Or.Map)>0}var j1=function(e){Xn(r,e);function r(t,n,a){a===void 0&&(a=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=a,i}return Object.defineProperty(r.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new r(this.name,this._subType,n)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return mm(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=[]);var a=t.type._subType,i={};return n.forEach(function(o,s){var c=""+s;i[c]=a.instantiate(t,c,void 0,o)}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ba(ba({},n0),{name:this.name});return Ln.array(h8(t),n)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Zl(n).dehancer=t.unbox;var a=t.type;a.hookInitializers.forEach(function(i){var o=i(n);Object.keys(o).forEach(function(s){var c=o[s],u=pp(n,s,c);Ef(n,s,u)})}),Y1(n,this.willChange),K1(n,this.didChange)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue.slice()}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=Number(n);if(a<t.storedValue.length)return t.storedValue[a];throw new Gt("Not a child: "+n)}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=tr(t.object);n.assertWritable({subpath:""+t.index});var a=n.type._subType,i=n.getChildren();switch(t.type){case"update":{if(t.newValue===t.object[t.index])return null;var o=bb(n,a,[i[t.index]],[t.newValue],[t.index]);if(!o)return null;t.newValue=o[0]}break;case"splice":{var s=t.index,c=t.removedCount,u=t.added,d=bb(n,a,i.slice(s,s+c),u,u.map(function(y,f){return s+f}));if(!d)return null;t.added=d;for(var p=s+c;p<i.length;p++)i[p].setParent(n,""+(p+u.length-c))}break}return t}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=[];return Object.keys(t).forEach(function(a){n.push(t[a].getSnapshot())}),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=tr(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"splice":if(t.removedCount&&t.addedCount===t.object.length)return void n.emitPatch({op:"replace",path:"",value:n.snapshot,oldValue:t.removed.map(function(i){return i.snapshot})},n);for(var a=t.removedCount-1;a>=0;a--)n.emitPatch({op:"remove",path:""+(t.index+a),oldValue:t.removed[a].snapshot},n);for(var a=0;a<t.addedCount;a++)n.emitPatch({op:"add",path:""+(t.index+a),value:t.added[a].snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=t.storedValue,o=n==="-"?i.length:Number(n);switch(a.op){case"replace":i[o]=a.value;break;case"add":i.splice(o,0,a.value);break;case"remove":i.splice(o,1);break}}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=t.storedValue;a.replace(n)}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return ym(t)?r0(t.map(function(i,o){return a._subType.validate(i,vm(n,""+o,a._subType))})):ys(n,t,"Value is not an array")}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Ah}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.splice(Number(n),1)}}),r}(Oh);j1.prototype.applySnapshot=la(j1.prototype.applySnapshot);function FO(e){return new j1("".concat(e.name,"[]"),e)}function bb(e,r,t,n,a){for(var i=!0,o=0;;o++){var s=o<=n.length-1,c=t[o],u=s?n[o]:void 0,d=""+a[o];if(uO(u)&&(u=u.storedValue),!c&&!s)break;if(!s)i=!1,t.splice(o,1),c instanceof vs&&c.createObservableInstanceIfNeeded(),c.die(),o--;else if(c)if(wb(c,u))t[o]=gg(r,e,d,u,c);else{for(var y=void 0,f=o;f<t.length;f++)if(wb(t[f],u)){y=t.splice(f,1)[0];break}i=!1;var p=gg(r,e,d,u,y);t.splice(o,0,p)}else{if(xn(u)&&tr(u).parent===e)throw new Gt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(e.path,"/").concat(d,"', but it lives already at '").concat(tr(u).path,"'"));i=!1;var p=gg(r,e,d,u);t.splice(o,0,p)}}return i?null:t}function gg(e,r,t,n,a){hc(e,n);function i(){if(xn(n)){var s=tr(n);if(s.assertAlive(Ch),s.parent!==null&&s.parent===r)return s.setParent(r,t),s}return a?e.reconcile(a,n,r,t):e.instantiate(r,t,void 0,n)}var o=i();return a&&a!==o&&(a instanceof vs&&a.createObservableInstanceIfNeeded(),a.die()),o}function wb(e,r){if(!e.isAlive)return!1;if(xn(r)){var t=tr(r);return t.isAlive&&t===e}if(e.snapshot===r)return!0;if(!(e instanceof vs))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&xf(r)&&n.is(r)&&n.isMatchingSnapshotId(e,r)}function DO(e){return wa(e)&&(e.flags&Or.Array)>0}var _b="preProcessSnapshot",Sb="postProcessSnapshot";function BO(){return tr(this).toString()}var xb={name:"AnonymousModel",properties:{},initializers:Ah};function qO(e){var r=Object.keys(e),t=new Set;return r.forEach(function(n){if(t.has(n))throw new Gt("".concat(n," is declared twice in the model. Model should not contain the same keys"));t.add(n)}),r.reduce(function(n,a){if(a in ya)throw new Gt("Hook '".concat(a,"' was defined as property. Hooks should be defined as part of the actions"));var i=Object.getOwnPropertyDescriptor(e,a);if("get"in i)throw new Gt("Getters are not supported as properties. Please use views instead");var o=i.value;if(o==null)throw new Gt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(kh(o))n[a]=Pf(WO(o),o);else if(o instanceof I1)n[a]=Pf(o,{});else if(o instanceof j1)n[a]=Pf(o,[]);else if(!wa(o))throw new Gt("Invalid type definition for property '".concat(a,"', cannot infer a type from a value like '").concat(o,"' (").concat(typeof o,")"));return n},ba({},e))}var gp=function(e){Xn(r,e);function r(t){var n=e.call(this,t.name||xb.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({name:a})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({properties:a})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var i=n.preProcessor;return i?n.cloneAndEnhance({preProcessor:function(o){return i(a(o))}}):n.cloneAndEnhance({preProcessor:a})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var i=n.postProcessor;return i?n.cloneAndEnhance({postProcessor:function(o){return a(i(o))}}):n.cloneAndEnhance({postProcessor:a})}}),Object.assign(n,xb,t),n.properties=qO(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(r.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=void 0;return this.forAllProps(function(n,a){if(a.flags&Or.Identifier){if(t)throw new Gt("Cannot define property '".concat(n,"' as object identifier, property '").concat(t,"' is already defined as identifier property"));t=n}}),t}}),Object.defineProperty(r.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new r({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})}}),Object.defineProperty(r.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){return n.instantiateActions(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Gt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(a){if(a===_b)throw new Gt("Cannot define action '".concat(_b,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===Sb)throw new Gt("Cannot define action '".concat(Sb,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var i=n[a],o=t[a];if(a in ya&&o){var s=i;i=function(){o.apply(null,arguments),s.apply(null,arguments)}}var c=i.$mst_middleware,u=i.bind(n);u._isFlowAction=i._isFlowAction||!1,u.$mst_middleware=c;var d=pp(t,a,u);n[a]=d,Ef(t,a,d)})}}),Object.defineProperty(r.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;if(typeof t!="function")throw new Gt("You passed an ".concat(typeof t," to volatile state as an argument, when function is expected"));var a=function(i){return n.instantiateVolatileState(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Gt("volatile state initializer should return a plain object containing state");X2(t,n)}}),Object.defineProperty(r.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){var o=t(i),s=o.actions,c=o.views,u=o.state,d=hP(o,["actions","views","state"]);for(var p in d)throw new Gt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(p,"'"));return u&&n.instantiateVolatileState(i,u),c&&n.instantiateViews(i,c),s&&n.instantiateActions(i,s),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(i){return n.instantiateViews(i,t(i)),i};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(r.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!xf(n))throw new Gt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(a){var i,o=Object.getOwnPropertyDescriptor(n,a);if("get"in o)K2(t,a,o),Z2(t,(i={},i[a]=Tf,i));else if(typeof o.value=="function")Ef(t,a,o.value);else throw new Gt("A view member should either be a function or getter based property")})}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=xn(i)?i:this.applySnapshotPreProcessor(i);return mm(this,t,n,a,o)}}),Object.defineProperty(r.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type,i={};return a.forAllProps(function(o,s){i[o]=s.instantiate(t,o,void 0,n[o])}),i}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ba(ba({},n0),{name:this.name});return Ln.object(t,Ch,n)}}),Object.defineProperty(r.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Ef(n,"toString",BO),this.forAllProps(function(a){$2(n,a,t.unbox)}),this.initializers.reduce(function(a,i){return i(a)},n),Y1(n,this.willChange),K1(n,this.didChange)}}),Object.defineProperty(r.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=tr(n.object),i=n.name;a.assertWritable({subpath:i});var o=a.type.properties[i];return o&&(hc(o,n.newValue),n.newValue=o.reconcile(a.getChildNode(i),n.newValue,a,i)),n}}),Object.defineProperty(r.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=tr(n.object),i=a.type.properties[n.name];if(i){var o=n.oldValue?n.oldValue.snapshot:void 0;a.emitPatch({op:"replace",path:Wc(n.name),value:n.newValue.snapshot,oldValue:o},a)}}}),Object.defineProperty(r.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=[];return this.forAllProps(function(i){a.push(n.getChildNode(t,i))}),a}}),Object.defineProperty(r.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a;if(!(n in this.properties))throw new Gt("Not a value property: "+n);var i=Zl(t.storedValue,n),o=(a=i.raw)===null||a===void 0?void 0:a.call(i);if(!o)throw new Gt("Node not available for property "+n);return o}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var i={};return this.forAllProps(function(o,s){try{var c=Mu(t.storedValue,o);c.reportObserved()}catch{throw new Gt("".concat(o," property is declared twice"))}i[o]=a.getChildNode(t,o).snapshot}),n?this.applySnapshotPostProcessor(i):i}}),Object.defineProperty(r.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(r.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){if(!(a.op==="replace"||a.op==="add"))throw new Gt("object does not support operation ".concat(a.op));t.storedValue[n]=a.value}}),Object.defineProperty(r.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){hc(this,n);var a=this.applySnapshotPreProcessor(n);this.forAllProps(function(i){t.storedValue[i]=a[i]})}}),Object.defineProperty(r.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.preProcessor;return n?n.call(null,t):t}}),Object.defineProperty(r.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.postProcessor;return n?n.call(null,t):t}}),Object.defineProperty(r.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.properties[t]}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,i=this.applySnapshotPreProcessor(t);return xf(i)?r0(this.propertyNames.map(function(o){return a.properties[o].validate(i[o],vm(n,o,a.properties[o]))})):ys(n,i,"Value is not a plain object")}}),Object.defineProperty(r.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.propertyNames.forEach(function(a){return t(a,n.properties[a])})}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;return"{ "+this.propertyNames.map(function(n){return n+": "+t.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(r.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Ch}}),Object.defineProperty(r.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue[n]=void 0}}),r}(Oh);gp.prototype.applySnapshot=la(gp.prototype.applySnapshot);function zO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new gp({name:t,properties:n})}function UO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string",n=t?e[0]:"AnonymousModel";return t&&e.shift(),e.reduce(function(a,i){return a.cloneAndEnhance({name:a.name+"_"+i.name,properties:i.properties,initializers:i.initializers,preProcessor:function(o){return i.applySnapshotPreProcessor(a.applySnapshotPreProcessor(o))},postProcessor:function(o){return i.applySnapshotPostProcessor(a.applySnapshotPostProcessor(o))}})}).named(n)}function w8(e){return wa(e)&&(e.flags&Or.Object)>0}var vc=function(e){Xn(r,e);function r(t,n,a,i){i===void 0&&(i=pO);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=n,o}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.initializer(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(kh(t)&&this.checker(t))return ms();var a=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return ys(n,t,"Value is not a ".concat(a))}}),r}(Ff),_8=new vc("string",Or.String,function(e){return typeof e=="string"}),S8=new vc("number",Or.Number,function(e){return typeof e=="number"}),HO=new vc("integer",Or.Integer,function(e){return gO(e)}),VO=new vc("float",Or.Float,function(e){return vO(e)}),GO=new vc("finite",Or.Finite,function(e){return mO(e)}),x8=new vc("boolean",Or.Boolean,function(e){return typeof e=="boolean"}),E8=new vc("null",Or.Null,function(e){return e===null}),P8=new vc("undefined",Or.Undefined,function(e){return e===void 0}),O8=new vc("Date",Or.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});O8.getSnapshot=function(e){return e.storedValue.getTime()};var A8=O8;function WO(e){switch(typeof e){case"string":return _8;case"number":return S8;case"boolean":return x8;case"object":if(e instanceof Date)return A8}throw new Gt("Cannot determine primitive type from value "+e)}function C8(e){return wa(e)&&(e.flags&(Or.String|Or.Number|Or.Integer|Or.Boolean|Or.Date))>0}var $O=function(e){Xn(r,e);function r(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Literal}),n.value=t,n}return Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return kh(t)&&t===this.value?ms():ys(n,t,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),r}(Ff);function k8(e){return new $O(e)}function YO(e){return wa(e)&&(e.flags&Or.Literal)>0}var XO=function(e){Xn(r,e);function r(t,n,a,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this._subtype.validate(t,n);if(a.length>0)return a;var i=xn(t)?tr(t).snapshot:t;return this._predicate(i)?ms():ys(n,t,this._message(t))}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),r}(pc);function KO(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=typeof e[0]=="string"?e.shift():wa(e[0])?e[0].name:null,n=e[0],a=e[1],i=e[2]?e[2]:function(o){return"Value does not respect the refinement predicate"};return new XO(t,n,a,i)}function ZO(e){return wa(e)&&(e.flags&Or.Refinement)>0}function QO(e,r){var t=typeof e=="string"?r:e,n=i0.apply(void 0,ju([],Iu(t.map(function(a){return k8(""+a)})),!1));return typeof e=="string"&&(n.name=e),n}var JO=function(e){Xn(r,e);function r(t,n,a){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),a=ba({eager:!0,dispatcher:void 0},a),i._dispatcher=a.dispatcher,a.eager||(i._eager=!1),i}return Object.defineProperty(r.prototype,"flags",{get:function(){var t=Or.Union;return this._types.forEach(function(n){t|=n.flags}),t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._types.some(function(n){return n.isAssignableFrom(t)})}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.determineType(i,void 0);if(!o)throw new Gt("No matching type for union "+this.describe());return o.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.determineType(n,t.getReconciliationType());if(!o)throw new Gt("No matching type for union "+this.describe());return o.reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._dispatcher?this._dispatcher(t):n?n.is(t)?n:this._types.filter(function(a){return a!==n}).find(function(a){return a.is(t)}):this._types.find(function(a){return a.is(t)})}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._dispatcher)return this._dispatcher(t).validate(t,n);for(var a=[],i=0,o=0;o<this._types.length;o++){var s=this._types[o],c=s.validate(t,n);if(c.length===0){if(this._eager)return ms();i++}else a.push(c)}return i===1?ms():ys(n,t,"No type is applicable for the union").concat(r0(a))}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),r}(pc);function i0(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var n=wa(e)?void 0:e,a=wa(e)?ju([e],Iu(r),!1):r,i="("+a.map(function(o){return o.name}).join(" | ")+")";return new JO(i,a,n)}function L8(e){return wa(e)&&(e.flags&Or.Union)>0}var eA=function(e){Xn(r,e);function r(t,n,a){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:a}),i}return Object.defineProperty(r.prototype,"flags",{get:function(){return this._subtype.flags|Or.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(this.optionalValues.indexOf(i)>=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,n,a,o)}return this._subtype.instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this._subtype.reconcile(t,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),a,i)}}),Object.defineProperty(r.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&hc(this,t),t}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.optionalValues.indexOf(t)>=0?ms():this._subtype.validate(t,n)}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),r}(pc);function tA(e,r){if(typeof r!="function"&&xn(r))throw new Gt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Pf(e,r,t){return tA(e,r),new eA(e,r,t||rA)}var rA=[void 0];function nA(e){return wa(e)&&(e.flags&Or.Optional)>0}var iA=Pf(P8,void 0),aA=Pf(E8,null);function N8(e){return i0(e,iA)}function oA(e){return i0(e,aA)}var sA=function(e){Xn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a}return Object.defineProperty(r.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Or.Late},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(a){if(a instanceof ReferenceError)n=void 0;else throw a}if(t&&n===void 0)throw new Gt("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.getSubType(!0).instantiate(t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.getSubType(!0).reconcile(t,n,a,i)}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.getSubType(!1);return a?a.validate(t,n):ms()}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getSubType(!1);return n?n.isAssignableFrom(t):!1}}),Object.defineProperty(r.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t||J6}}),r}(pc);function lA(e,r){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?r:e;return new sA(t,n)}function uA(e){return wa(e)&&(e.flags&Or.Late)>0}function cA(e,r){return new fA(e,r)}var fA=function(e){Xn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:Ln.array()}),b2(function(){return a.pendingNodeList.length>0&&a.pendingNodeList.some(function(i){return i.isAlive&&a.options.shouldLoadPredicate(i.parent?i.parent.value:null)})},function(){a.options.loadType().then(la(function(i){a.loadedType=i,a.pendingNodeList.forEach(function(o){o.parent&&a.loadedType&&o.parent.applyPatches([{op:"replace",path:"/".concat(o.subpath),value:o.snapshot}])})}))}),a}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this;if(this.loadedType)return this.loadedType.instantiate(t,n,a,i);var s=nf(this,t,n,a,i);return this.pendingNodeList.push(s),b2(function(){return!s.isAlive},function(){return o.pendingNodeList.splice(o.pendingNodeList.indexOf(s),1)}),s}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.loadedType?this.loadedType.validate(t,n):p8(t)?ms():ys(n,t,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return this.loadedType?(t.die(),this.loadedType.instantiate(a,i,a.environment,n)):e.prototype.reconcile.call(this,t,n,a,i)}}),r}(Ff),T8=function(e){Xn(r,e);function r(t){var n=e.call(this,t?"frozen(".concat(t.name,")"):"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Frozen}),n}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return p8(t)?this.subType?this.subType.validate(t,n):ms():ys(n,t,"Value is not serializable and cannot be frozen")}}),r}(Ff),Eb=new T8;function hA(e){return arguments.length===0?Eb:wa(e)?new T8(e):Pf(Eb,e)}function dA(e){return wa(e)&&(e.flags&Or.Frozen)>0}function pA(e){switch(e){case ya.beforeDestroy:return"destroy";case ya.beforeDetach:return"detach";default:return}}var gA=function(){function e(r,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),_m(r))this.identifier=r;else if(xn(r)){var n=tr(r);if(!n.identifierAttribute)throw new Gt("Can only store references with a defined identifier attribute.");var a=n.unnormalizedIdentifier;if(a==null)throw new Gt("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new Gt("Can only store references to tree nodes or identifiers, got: '".concat(r,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var t=jh(this.identifier),n=r.root,a=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==a){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new wm("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(r.path,")"));this.resolvedReference={node:o,lastCacheModification:a}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),wm=function(e){Xn(r,e);function r(t){var n=e.call(this,t)||this;return Object.setPrototypeOf(n,r.prototype),n}return r}(Error),R8=function(e){Xn(r,e);function r(t,n){var a=e.call(this,"reference(".concat(t.name,")"))||this;return Object.defineProperty(a,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(a,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Reference}),a}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.targetType.isAssignableFrom(t)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return _m(t)?ms():ys(n,t,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(r.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=n.parent;if(!(!o||!o.isAlive)){var s=o.storedValue;s&&this.onInvalidated({cause:t,parent:s,invalidTarget:i?i.storedValue:void 0,invalidId:a,replaceRef:function(c){Ph(n.root.storedValue,{op:"replace",value:c,path:n.path})},removeRef:function(){w8(o.type)?this.replaceRef(void 0):Ph(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(r.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,i=this.getValue(t);if(i){var o=tr(i),s=function(d,p){var y=pA(p);y&&a.fireInvalidated(y,t,n,o)},c=o.registerHook(ya.beforeDetach,s),u=o.registerHook(ya.beforeDestroy,s);return function(){c(),u()}}}}),Object.defineProperty(r.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var i=this;if(this.onInvalidated){var o;t.registerHook(ya.beforeDestroy,function(){o&&o()});var s=function(c){o&&o();var u=t.parent,d=u&&u.storedValue;if(u&&u.isAlive&&d){var p=void 0;a?p=!!a.get(n,d):p=t.root.identifierCache.has(i.targetType,jh(n)),p?o=i.addTargetNodeWatcher(t,n):c||i.fireInvalidated("invalidSnapshotReference",t,n,null)}};t.state===no.FINALIZED?s(!0):(t.isRoot||t.root.registerHook(ya.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(ya.afterAttach,function(){s(!1)}))}}}),r}(Ff),vA=function(e){Xn(r,e);function r(t,n){return e.call(this,t,n)||this}return Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=t.storedValue;return n.resolvedValue}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.storedValue;return n.identifier}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=xn(i)?$6(i):i,s=new gA(i,this.targetType),c=nf(this,t,n,a,s);return s.node=c,this.watchTargetNodeForInvalidations(c,o,void 0),c}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t.isDetaching&&t.type===this){var o=xn(n),s=t.storedValue;if(!o&&s.identifier===n||o&&s.resolvedValue===n)return t.setParent(a,i),t}var c=this.instantiate(a,i,void 0,n);return t.die(),c}}),r}(R8),mA=function(e){Xn(r,e);function r(t,n,a){var i=e.call(this,t,a)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return Object.defineProperty(r.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=this.options.get(t.storedValue,t.parent?t.parent.storedValue:null);return n}}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=xn(i)?this.options.set(i,t?t.storedValue:null):i,s=nf(this,t,n,a,o);return this.watchTargetNodeForInvalidations(s,o,this.options),s}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=xn(n)?this.options.set(n,t?t.storedValue:null):n;if(!t.isDetaching&&t.type===this&&t.storedValue===o)return t.setParent(a,i),t;var s=this.instantiate(a,i,void 0,o);return t.die(),s}}),r}(R8);function M8(e,r){var t=r||void 0,n=r?r.onInvalidated:void 0;return t&&(t.get||t.set)?new mA(e,{get:t.get,set:t.set},n):new vA(e,n)}function yA(e){return wa(e)&&(e.flags&Or.Reference)>0}function bA(e,r){var t=M8(e,ba(ba({},r),{onInvalidated:function(n){r&&r.onInvalidated&&r.onInvalidated(n),n.removeRef()}}));return r&&r.acceptsUndefined===!1?t:N8(t)}var I8=function(e){Xn(r,e);function r(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Identifier}),a}return Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(!t||!(t.type instanceof gp))throw new Gt("Identifier types can only be instantiated as direct child of a model type");return nf(this,t,n,a,i)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){if(t.storedValue!==n)throw new Gt("Tried to change identifier from '".concat(t.storedValue,"' to '").concat(n,"'. Changing identifiers is not allowed."));return t.setParent(a,i),t}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return typeof t!==this.validType?ys(n,t,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):ms()}}),r}(Ff),wA=function(e){Xn(r,e);function r(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Identifier}),t}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),r}(I8),_A=function(e){Xn(r,e);function r(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),r}(I8),SA=new wA,xA=new _A;function EA(e){return wa(e)&&(e.flags&Or.Identifier)>0}function jh(e){return""+e}function _m(e){return typeof e=="string"||typeof e=="number"}function PA(e){return new OA(e)}var OA=function(e){Xn(r,e);function r(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Or.Custom}),n}return Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.options.isTargetType(t))return ms();var a=this.options.getValidationMessage(t);return a?ys(n,t,"Invalid value for type '".concat(this.name,"': ").concat(a)):ms()}}),Object.defineProperty(r.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.options.toSnapshot(t.storedValue)}}),Object.defineProperty(r.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=this.options.isTargetType(i)?i:this.options.fromSnapshot(i,t&&t.root.environment);return nf(this,t,n,a,o)}}),Object.defineProperty(r.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,i){var o=!this.options.isTargetType(n);if(!t.isDetaching){var s=t.type===this&&(o?n===t.snapshot:n===t.storedValue);if(s)return t.setParent(a,i),t}var c=o?this.options.fromSnapshot(n,a.root.environment):n,u=this.instantiate(a,i,void 0,c);return t.die(),u}}),r}(Ff),Pb={enumeration:QO,model:zO,compose:UO,custom:PA,reference:M8,safeReference:bA,union:i0,optional:Pf,literal:k8,maybe:N8,maybeNull:oA,refinement:KO,string:_8,boolean:x8,number:S8,integer:HO,float:VO,finite:GO,Date:A8,map:IO,array:FO,frozen:hA,identifier:SA,identifierNumber:xA,late:lA,lazy:cA,undefined:P8,null:E8,snapshotProcessor:RO};const AA=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:RP,addMiddleware:i8,applyAction:e8,applyPatch:Ph,applySnapshot:V6,cast:FP,castFlowReturn:xO,castToReferenceSnapshot:BP,castToSnapshot:DP,clone:LP,createActionTrackingMiddleware:VP,createActionTrackingMiddleware2:WP,decorate:QP,destroy:TP,detach:NP,escapeJsonPath:Wc,flow:m8,getChildType:dP,getEnv:MP,getIdentifier:$6,getLivelinessChecking:z6,getMembers:jP,getNodeId:qP,getParent:wP,getParentOfType:SP,getPath:W6,getPathParts:xP,getPropertyMembers:K6,getRelativePath:kP,getRoot:G6,getRunningActionContext:gm,getSnapshot:hm,getType:Ap,hasEnv:IP,hasParent:bP,hasParentOfType:_P,isActionContextChildOf:tO,isActionContextThisOrChildOf:rO,isAlive:dm,isArrayType:DO,isFrozenType:dA,isIdentifierType:EA,isLateType:uA,isLiteralType:YO,isMapType:jO,isModelType:w8,isOptionalType:nA,isPrimitiveType:C8,isProtected:yP,isReferenceType:yA,isRefinementType:ZO,isRoot:EP,isStateTreeNode:xn,isType:wa,isUnionType:L8,isValidReference:CP,joinJsonPath:M1,onAction:t8,onPatch:H6,onSnapshot:pP,process:hO,protect:vP,recordActions:KP,recordPatches:gP,resolveIdentifier:OP,resolvePath:PP,setLivelinessChecking:q6,setLivelynessChecking:fP,splitJsonPath:Lh,t:Pb,toGenerator:PO,toGeneratorFunction:EO,tryReference:AP,tryResolve:Y6,typecheck:s8,types:Pb,unescapeJsonPath:y8,unprotect:mP,walk:X6},Symbol.toStringTag,{value:"Module"})),hl=Zc(AA);var vg={},Ob;function j8(){return Ob||(Ob=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getLimitedFontSize=function({oldText:r,newText:t,element:n}){if(!(t.length/Math.max(20,r.length)>=4))return n.fontSize;const a=n.width*n.page.computedHeight/t.length,i=1.5*Math.sqrt(a),o=n.fontSize;return Math.min(o,Math.max(5,Math.round(i)))}}(vg)),vg}var Ab;function F8(){return Ab||(Ab=1,function(e){var r=Bd&&Bd.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=x,e.getDir=j,e.usePrevious=F;const t=r(fi()),n=Us,a=Fu,i=Mh,o=qs,s=r(Hs()),c=uP,u=Pp(),d=jf(),p=Ih(),y=gc(),f=D6(),_=Op(),S=If(),w=rf(),b=hl,g=j8();s.default._fixTextRendering=!0;const v=document.createElement("style");v.type="text/css",document.head.appendChild(v);const E={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function x(C){C=C.replace(/\s/g,"");let A=0;for(var L=0;L<C.length;L++)O=C[L],I="֑-߿יִ-﷽ﹰ-ﻼ",new RegExp("^[^"+I+"]*?["+I+"]").test(O)&&(A+=1);var O,I;return A>C.length/2}function j(C){return x(C)?"rtl":"ltr"}const N=(0,n.observer)(({textNodeRef:C,element:A,onBlur:L,selectAll:O,cursorPosition:I})=>{const[M,G]=t.default.useState(E),W=C.current;t.default.useLayoutEffect(()=>{const q={};q.width=W.width()-2*W.padding()+"px",q.height=W.height()-2*W.padding()+W.fontSize()*W.lineHeight()+"px",q.fontSize=W.fontSize()+"px",q.lineHeight=W.lineHeight()+.01,q.fontFamily=W.fontFamily(),q.textAlign=W.align(),q.color=W.fill(),q.fontWeight=A.fontWeight,q.fontStyle=A.fontStyle,q.letterSpacing=A.letterSpacing+"em",q.opacity=Math.max(A.a.opacity,.2);const D=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${M.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;v.innerHTML="",v.appendChild(document.createTextNode(D)),JSON.stringify(q)!==JSON.stringify(M)&&G(q)});const Y=t.default.useRef(null);t.default.useLayoutEffect(()=>{var q;const D=Y.current;if(!D)return;(q=Y.current)===null||q===void 0||q.focus();const $=I||D.value.length;D.selectionStart=D.selectionEnd=$,O&&(D==null||D.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",L);const q=D=>{var $;!(($=Y.current)===null||$===void 0)&&$.contains(D.target)||L()};return window.addEventListener("touchstart",q),()=>{window.removeEventListener("blur",L),window.removeEventListener("touchstart",q)}},[]);let te=0;const V=W.textArr.length*W.lineHeight()*W.fontSize();A.verticalAlign==="middle"&&(te=(A.a.height-V)/2),A.verticalAlign==="bottom"&&(te=A.a.height-V);const H=(0,f.removeTags)(A.text);return t.default.createElement("textarea",{className:"polotno-input",ref:Y,dir:j(H),style:Object.assign(Object.assign(Object.assign({},E),M),{paddingTop:te+"px"}),value:H,onChange:q=>{const D=(0,g.getLimitedFontSize)({oldText:A.text,newText:q.target.value,element:A});A.set({text:q.target.value,fontSize:D})},placeholder:A.placeholder,onBlur:L})}),T=C=>t.default.createElement(i.Html,null,t.default.createElement(N,Object.assign({},C)));function F(C){const A=t.default.useRef(C),L=t.default.useRef(C);return t.default.useMemo(()=>{L.current=A.current,A.current=C},[C]),L.current}e.useFontLoader=(C,A)=>{const[L,O]=t.default.useReducer(M=>M+1,0),I=t.default.useRef((0,p.isFontLoaded)(A));return t.default.useLayoutEffect(()=>{if(I.current=(0,p.isFontLoaded)(A),I.current)return;let M=!0;return(async()=>{I.current=!1,O();const G=(0,d.incrementLoader)(`text ${A}`);await C.loadFont(A),setTimeout(G,100),M&&(I.current=!0,O())})(),()=>{M=!1}},[A]),[I.current]},e.getLineHeight=({fontLoaded:C,fontFamily:A,fontSize:L,lineHeight:O})=>t.default.useMemo(()=>{if(typeof O=="number")return O;const I=document.createElement("div");I.style.fontFamily=A,I.style.fontSize=L+"px",I.style.lineHeight=O,I.innerText="Test text",document.body.appendChild(I);const M=I.offsetHeight;return document.body.removeChild(I),M/L},[C,A,L,O]),e.TextElement=(0,n.observer)(({element:C,store:A})=>{const L=t.default.useRef(null),O=t.default.useRef(null),{editorEnabled:I,selectAll:M}=(Ie=>{const[me,_e]=t.default.useState(!1),Ae=t.default.useRef(!1);return t.default.useEffect(()=>{var Le=!0;return setTimeout(()=>{Le&&(Ie._editModeEnabled&&(Ae.current=!0),_e(!0),setTimeout(()=>{Ae.current=!1},50))},50),()=>{Le=!1}},[]),{editorEnabled:me&&Ie._editModeEnabled,selectAll:Ae.current}})(C),[G,W]=t.default.useState(!1),Y=t.default.useRef(C.a.height),te=A.selectedShapes.indexOf(C)>=0&&C.selectable,{textVerticalResizeEnabled:V}=y.flags,H=F(C.fontFamily),[q,D]=t.default.useState([]);t.default.useEffect(()=>{var Ie,me;const _e=(me=(Ie=L.current)===null||Ie===void 0?void 0:Ie.textArr)!==null&&me!==void 0?me:[];JSON.stringify(_e)!==JSON.stringify(q)&&D(_e)}),t.default.useEffect(()=>{if(C.a.width)return;const Ie=L.current;Ie.width(600),C.set({width:1.4*Ie.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,o.autorun)(()=>{const Ie=L.current;(0,_.applyFilter)(Ie,C)}));const[$]=(0,e.useFontLoader)(A,C.fontFamily),ne=(0,f.removeTags)(C.text),Z=()=>{const Ie=L.current.clone({height:void 0}),me=Math.ceil(Ie.fontSize()*Ie.lineHeight()*Ie.textArr.length+1);return Ie.destroy(),me};t.default.useLayoutEffect(()=>{if(!$)return;const{textOverflow:Ie,textSplitAllowed:me}=y.flags;if(C.a.height){if(!A.isPlaying)if(Ie!=="change-font-size"||G){if(Ie==="resize"){const _e=Z();V&&C.a.height<_e&&A.history.ignore(()=>{var Ae;(0,b.isAlive)(C)&&C.set({height:_e}),(Ae=L.current)===null||Ae===void 0||Ae.height(_e)},!1,!0),V||C.a.height===_e||G||A.history.ignore(()=>{var Ae;(0,b.isAlive)(C)&&C.set({height:_e}),(Ae=L.current)===null||Ae===void 0||Ae.height(_e)},!1,!0)}}else{const _e=function(Le,ge,Te=!1){const Fe=Le.fontSize(),Ke=Le.height(),it=(0,f.removeTags)(ge.text);let rt=ge.a.fontSize;Le.height(void 0);const at=Math.round(2*ge.a.fontSize)-1;for(let bt=1;bt<at;bt++){const yt=ge.a.height&&Le.height()>ge.a.height;let ht=it.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((Ut,$t)=>/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test($t)?Ut.concat($t.split("")):Ut.concat($t),[]),zt=Le.textArr.map(Ut=>Ut.text).join(";");const Ot=ht.find(Ut=>!zt.includes(Ut)||(zt=zt.replace(Ut,""),!1));if(!(yt||Ot&&!Te))break;rt-=.5,Le.fontSize(rt)}return Le.fontSize(Fe),Le.height(Ke),rt}(L.current,C,me);if(_e!==C.a.fontSize)return void A.history.ignore(()=>{C.set({fontSize:_e})},!1,!0);const Ae=Z();C.a.height===Ae||V||A.history.ignore(()=>{C.set({height:Ae})},!1,!0)}}else{const _e=Z();A.history.ignore(()=>{C.set({height:_e})},!1,!0)}}),t.default.useLayoutEffect(()=>{const Ie=L.current;Ie&&(Ie.width(Ie.width()+1e-8),Ie._setTextData(),(0,_.applyFilter)(Ie,C))},[$]);const Q=t.default.useRef(null),oe=t.default.useRef(0),se=Ie=>{Ie.evt.preventDefault(),A.selectedShapes.find(_e=>_e===C)&&C.contentEditable&&(oe.current=function(_e){var Ae;const Le=_e.target,ge=function(at){var bt=at.getAbsoluteTransform().copy();bt.invert();var yt=at.getStage().getPointerPosition();return bt.point(yt)}(Le),Te=Le.textArr,Fe=Math.floor(ge.y/(Le.fontSize()*Le.lineHeight())),Ke=Te.slice(0,Fe).reduce((at,bt)=>at+bt.text.length,Fe),it=(Ae=Te[Fe])!==null&&Ae!==void 0?Ae:Te[0];let rt=0;return Le.align()==="right"?rt=Le.width()-it.width:Le.align()==="center"&&(rt=Le.width()/2-it.width/2),Ke+Math.round((ge.x-rt)/it.width*it.text.length)}(Ie),C.toggleEditMode())},ue=!ne&&C.placeholder?.6:C.a.opacity;(0,S.useFadeIn)(L,ue);const ve=(0,e.getLineHeight)({fontLoaded:$,fontFamily:C.fontFamily,fontSize:C.a.fontSize,lineHeight:C.lineHeight}),Pe=C.selectable||A.role==="admin",ke=(0,u.useColor)(C),Ne=t.default.useMemo(()=>C.backgroundEnabled?function({lines:Ie,lineHeight:me,width:_e,align:Ae="left",padding:Le=0,cornerRadius:ge=0}){var Te;Ie.forEach((rt,at)=>{rt.cx=_e/2,Ae==="right"?rt.cx=_e-rt.width/2:Ae==="left"&&(rt.cx=rt.width/2),Ae!=="justify"||rt.lastInParagraph||(rt.width=_e),Ae==="justify"&&(rt.cx=rt.width/2)});let Fe=`M ${(Te=Ie[0])===null||Te===void 0?void 0:Te.cx} ${-Le}`;Ie.forEach((rt,at)=>{const{cx:bt}=rt,yt=Ie[at-1];yt&&yt.width>rt.width?Fe+=` L ${bt+rt.width/2+Le} ${at*me+Le}`:Fe+=` L ${bt+rt.width/2+Le} ${at*me-Le}`;const ht=Ie[at+1];ht&&ht.width>rt.width?Fe+=` L ${bt+rt.width/2+Le} ${(at+1)*me-Le}`:Fe+=` L ${bt+rt.width/2+Le} ${(at+1)*me+Le}`});for(var Ke=Ie.length-1;Ke>=0;Ke--){const rt=Ie[Ke],{cx:at}=rt,bt=Ie[Ke+1];bt&&bt.width>rt.width?Fe+=` L ${at-rt.width/2-Le} ${(Ke+1)*me-Le}`:Fe+=` L ${at-rt.width/2-Le} ${(Ke+1)*me+Le}`;const yt=Ie[Ke-1];yt&&yt.width>rt.width?Fe+=` L ${at-rt.width/2-Le} ${Ke*me+Le}`:Fe+=` L ${at-rt.width/2-Le} ${Ke*me-Le}`}Fe+=" Z";const it=(0,c.parsePath)(Fe);return(0,c.roundCommands)(it,ge).path}({lines:JSON.parse(JSON.stringify(q)),cornerRadius:C.backgroundCornerRadius*(C.a.fontSize*ve*.5),lineHeight:ve*C.a.fontSize,padding:C.backgroundPadding*(C.a.fontSize*ve*.5),width:C.a.width,align:C.align}):"",[C.backgroundEnabled,C.backgroundCornerRadius,C.a.fontSize,ve,C.backgroundPadding,C.a.width,C.align,q]),xe=(0,w.isTouchDevice)();let ye=0;return C.verticalAlign==="middle"?ye=(C.a.height-q.length*ve*C.a.fontSize)/2:C.verticalAlign==="bottom"&&(ye=C.a.height-q.length*ve*C.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:O,x:C.a.x,y:C.a.y,rotation:C.a.rotation,hideInExport:!C.showInExport,listening:!1,visible:C.backgroundEnabled,opacity:C.backgroundOpacity*ue,data:Ne,fill:C.backgroundColor,offsetY:-ye}),t.default.createElement(a.Text,Object.assign({ref:L,id:C.id,name:"element",hideInExport:!C.showInExport,editModeEnabled:C._editModeEnabled,x:C.a.x,y:C.a.y,rotation:C.a.rotation,width:C.a.width,height:C.a.height,text:ne||C.placeholder,direction:j(ne)},ke,{stroke:C.stroke,lineJoin:"round",strokeWidth:C.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:C.a.fontSize,fontFamily:`"${C.fontFamily}", "${H}"`,fontStyle:C.fontStyle+" "+C.fontWeight,textDecoration:C.textDecoration,align:C.align,verticalAlign:C.verticalAlign,draggable:xe?C.draggable&&te:C.draggable,preventDefault:!xe||te,opacity:ue,visible:!C._editModeEnabled,ellipsis:y.flags.textOverflow==="ellipsis",shadowEnabled:C.shadowEnabled,shadowBlur:C.shadowBlur,shadowOffsetX:C.shadowOffsetX,shadowOffsetY:C.shadowOffsetY,shadowColor:C.shadowColor,shadowOpacity:C.shadowOpacity,lineHeight:ve,letterSpacing:C.letterSpacing*C.a.fontSize,listening:Pe,onDragMove:Ie=>{C.set({x:Ie.target.x(),y:Ie.target.y()})},onDragEnd:Ie=>{C.set({x:Ie.target.x(),y:Ie.target.y()})},onClick:se,onTap:se,onTransformStart:()=>{W(!0),Y.current=L.current.height()},onTransform:Ie=>{var me,_e,Ae;const Le=Ie.target;(me=O.current)===null||me===void 0||me.setAttrs({x:Le.x(),y:Le.y(),rotation:Le.rotation(),scale:Le.scale()});const ge=((_e=Le.getStage())===null||_e===void 0?void 0:_e.findOne("Transformer")).getActiveAnchor();if(ge==="middle-left"||ge==="middle-right"){const Fe=Le.scaleX(),Ke=Le.width()*Fe,it=C.a.fontSize;let rt=Ke;Ke<it&&(rt=it,Q.current&&Le.position(Q.current)),Le.width(rt),Le.scaleX(1),Le.scaleY(1);const at=Z();if(y.flags.textOverflow!=="ellipsis"){const yt=Math.max(at,Y.current);Le.height(yt),C.set({height:Le.height()})}const bt=y.flags.textVerticalResizeEnabled?Math.max(at,Y.current):Z();C.set({x:Le.x(),width:Le.width(),rotation:Le.rotation(),height:bt}),(0,_.applyFilter)(Le,C)}if(ge==="top-center"||ge==="bottom-center"){let Fe=y.flags.textOverflow==="resize"?Z():ve*C.a.fontSize;Ie.target.height(Math.max(Fe,Ie.target.height()*Ie.target.scaleY())),Ie.target.scaleY(1)}Q.current=Ie.target.position();const Te=Ie.target.scaleX();(Ae=O.current)===null||Ae===void 0||Ae.setAttrs({scaleX:1,scaleY:1}),Ie.target.scaleX(1),Ie.target.scaleY(1),C.set({fontSize:C.a.fontSize*Te,width:Ie.target.width()*Te,x:Ie.target.x(),y:Ie.target.y(),rotation:Ie.target.rotation(),height:Ie.target.height()*Te,shadowBlur:C.shadowBlur*Te,shadowOffsetX:C.shadowOffsetX*Te,shadowOffsetY:C.shadowOffsetY*Te,strokeWidth:C.strokeWidth*Te})},onTransformEnd:Ie=>{var me;const _e=Ie.target.scaleX();Ie.target.scaleX(1),Ie.target.scaleY(1),C.set({fontSize:Math.round(C.a.fontSize*_e),width:Math.ceil(Ie.target.width()*_e),x:Ie.target.x(),y:Ie.target.y(),rotation:Ie.target.rotation(),height:Ie.target.height()*_e,shadowBlur:C.shadowBlur*_e,shadowOffsetX:C.shadowOffsetX*_e,shadowOffsetY:C.shadowOffsetY*_e,strokeWidth:C.strokeWidth*_e}),(me=O.current)===null||me===void 0||me.setAttrs({scaleX:1,scaleY:1}),W(!1)}})),I&&t.default.createElement(a.Group,{x:C.a.x,y:C.a.y,rotation:C.a.rotation},t.default.createElement(T,{textNodeRef:L,element:C,selectAll:M,cursorPosition:oe.current,onBlur:()=>{C.toggleEditMode(!1),C.text===""&&C.removable&&!C.placeholder&&A.deleteElements([C.id])}})))})}(Bd)),Bd}var Fl={},Vd={},mg={exports:{}},yg={exports:{}},Cb;function Sm(){return Cb||(Cb=1,function(e,r){e.exports=t;function t(a){return n.bind(null,a)}function n(a){var i=[].slice.call(arguments,1);i.unshift("["+a+"]"),process.stderr.write(i.join(" ")+`
|
|
102
|
-
`)}}(yg)),yg.exports}var kb;function D8(){return kb||(kb=1,function(e,r){Sm()("lex"),e.exports=t;function t(n){var a="",i,o=0,s=-1,c=0,u=1,d="before-selector",p=[d],y={},f=[],_=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function S(){return T(),n[s]}function w(W){return W?p[p.length-1-W]:d}function b(W){var Y=s+1;return W===n.slice(Y,Y+W.length)}function g(W){var Y=n.slice(s).indexOf(W);return Y>0?Y:!1}function v(W){return W===E(1)}function E(W){return n[s+(W||1)]}function x(){var W=p.pop();return d=p[p.length-1],W}function j(W){return d=W,p.push(d),p.length}function N(W){var Y=d;return p[p.length-1]=d=W,Y}function T(W){if((W||1)==1)n[s]==`
|
|
103
|
-
`?(u++,o=1):o++,s++;else{var Y=n.slice(s,s+W).split(`
|
|
104
|
-
`);Y.length>1&&(u+=Y.length-1,o=1),o+=Y[Y.length-1].length,s=s+W}}function F(){y.end={line:u,col:o},f.push(y),a="",y={}}function C(W){y={type:W,start:{line:u,col:o}}}for(;i=S();)switch(i){case" ":switch(w()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":a+=i;break}break;case`
|
|
105
|
-
`:case" ":case"\r":case"\f":switch(w()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":a+=i;break;case"at-value":i===`
|
|
106
|
-
`&&(y.value=a.trim(),F(),x());break}break;case":":switch(w()){case"name":y.name=a.trim(),a="",N("before-value");break;case"before-selector":a+=i,C("selector"),j("selector");break;case"before-value":N("value"),a+=i;break;default:a+=i;break}break;case";":switch(w()){case"name":case"before-value":case"value":a.trim().length>0&&(y.value=a.trim(),F()),N("before-name");break;case"value-paren":a+=i;break;case"at-value":y.value=a.trim(),F(),x();break;case"before-name":break;default:a+=i;break}break;case"{":switch(w()){case"selector":if(E(-1)==="\\"){a+=i;break}y.text=a.trim(),F(),N("before-name"),c=c+1;break;case"at-group":switch(y.name=a.trim(),y.type){case"font-face":case"viewport":case"page":j("before-name");break;default:j("before-selector")}F(),c=c+1;break;case"name":case"at-rule":y.name=a.trim(),F(),j("before-name"),c=c+1;break;case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":N("value"),a+=i;break}break;case"}":switch(w()){case"before-name":case"name":case"before-value":case"value":a&&(y.value=a.trim()),y.name&&y.value&&F(),C("end"),F(),x(),w()==="at-group"&&(C("at-group-end"),F(),x()),c>0&&(c=c-1);break;case"at-group":case"before-selector":case"selector":if(E(-1)==="\\"){a+=i;break}c>0&&w(1)==="at-group"&&(C("at-group-end"),F()),c>1&&x(),c>0&&(c=c-1);break;case"double-string":case"single-string":case"comment":a+=i;break}break;case'"':case"'":switch(w()){case"double-string":i==='"'&&E(-1)!=="\\"&&x();break;case"single-string":i==="'"&&E(-1)!=="\\"&&x();break;case"before-at-value":N("at-value"),j(i==='"'?"double-string":"single-string");break;case"before-value":N("value"),j(i==='"'?"double-string":"single-string");break;case"comment":break;default:E(-1)!=="\\"&&j(i==='"'?"double-string":"single-string")}a+=i;break;case"/":switch(w()){case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":case"selector":case"name":case"value":if(v("*")){var A=g("*/");A&&T(A+1)}else w()=="before-value"&&N("value"),a+=i;break;default:v("*")?(C("comment"),j("comment"),T()):a+=i;break}break;case"*":switch(w()){case"comment":v("/")?(y.text=a,T(),F(),x()):a+=i;break;case"before-selector":a+=i,C("selector"),j("selector");break;case"before-value":N("value"),a+=i;break;default:a+=i}break;case"@":switch(w()){case"comment":case"double-string":case"single-string":a+=i;break;case"before-value":N("value"),a+=i;break;default:for(var L=!1,O,I,M=0,G=_.length;!L&&M<G;++M)I=_[M],O=I.name||I,b(O)&&(L=!0,C(O),j(I.state||"at-group"),T(O.length),I.prefix&&(y.prefix=I.prefix),I.type&&(y.type=I.type));L||(a+=i);break}break;case"(":switch(w()){case"value":j("value-paren");break;case"before-value":N("value");break}a+=i;break;case")":switch(w()){case"value-paren":x();break;case"before-value":N("value");break}a+=i;break;default:switch(w()){case"before-selector":C("selector"),j("selector");break;case"before-name":C("property"),N("name");break;case"before-value":N("value");break;case"before-at-value":N("at-value");break}a+=i;break}return f}}(mg)),mg.exports}var bg={exports:{}},Lb;function CA(){return Lb||(Lb=1,function(e,r){Sm()("parse");var t=D8();e.exports=s;var n,a,i,o;function s(x,j){j||(j={}),n=!!j.comments,i=!!j.position,a=0,o=Array.isArray(x)?x.slice():t(x);for(var N,T=[],F;F=u();)N=b(F),N&&T.push(N);return{type:"stylesheet",stylesheet:{rules:T}}}function c(x,j){j||(j={});for(var N,T=["type","name","value"],F={},C=0;C<T.length;++C)N=T[C],x[N]&&(F[N]=j[N]||x[N]);for(T=Object.keys(j),C=0;C<T.length;++C)N=T[C],F[N]||(F[N]=j[N]);return i&&(F.position={start:x.start,end:x.end}),F}function u(){var x=o.shift();return x}function d(x){a=a+1;var j={};switch(x.type){case"font-face":case"viewport":j.declarations=v();break;case"page":j.prefix=x.prefix,j.declarations=v();break;default:j.prefix=x.prefix,j.rules=E()}return c(x,j)}function p(x){return c(x)}function y(x){return c(x)}function f(x){return c(x,{text:x.text})}function _(x){return c(x)}function S(x){return c(x)}function w(x){function j(N){return N.trim()}return c(x,{type:"rule",selectors:x.text.split(",").map(j),declarations:v()})}function b(x){switch(x.type){case"property":return S(x);case"selector":return w(x);case"at-group-end":a=a-1;return;case"media":case"keyframes":return d(x);case"comment":if(n)return f(x);break;case"charset":return y(x);case"import":return p(x);case"namespace":return _(x);case"font-face":case"supports":case"viewport":case"document":case"page":return d(x)}}function g(x){for(var j,N=[],T;(T=u())&&x&&x(T);)j=b(T),j&&N.push(j);return T&&T.type!=="end"&&o.unshift(T),N}function v(){return g(function(x){return x.type==="property"||x.type==="comment"})}function E(){return g(function(){return a})}}(bg)),bg.exports}var wg={exports:{}},Nb;function kA(){return Nb||(Nb=1,function(e,r){Sm()("stringify");var t,n,a,i,o,s;e.exports=c;function c(E,x){x||(x={}),a=x.indentation||"",n=!!x.compress,t=!!x.comments,i=1,n?o=s="":(o=`
|
|
107
|
-
`,s=" ");var j=_(E.stylesheet.rules,g).join(`
|
|
108
|
-
`).trim();return j}function u(E){if(E){i+=E;return}return n?"":Array(i).join(a||"")}function d(E){return"@"+E.type+" "+E.value+";"+o}function p(E){var x="",j=E.prefix||"";E.name&&(x=" "+E.name);var N=E.type!=="page";return"@"+j+E.type+x+s+S(E,N)+o}function y(E){return t?"/*"+(E.text||"")+"*/"+o:""}function f(E){var x;return E.selectors?x=E.selectors.join(","+o):(x="@"+E.type,x+=E.name?" "+E.name:""),u()+x+s+S(E)+o}function _(E,x){return E.reduce(function(j,N){var T=N.type==="comment"?y(N):x(N);return T&&j.push(T),j},[])}function S(E,x){var j=E.declarations,N=b;return E.rules&&(j=E.rules,N=f),j=w(j,N),j&&(j=o+j+(x?"":o)),"{"+j+u()+"}"}function w(E,x){if(!E)return"";u(1);var j=_(E,x);return u(-1),j.length?j.join(o):""}function b(E){if(E.type==="property")return v(E)}function g(E){switch(E.type){case"rule":return f(E);case"media":case"keyframes":return p(E);case"comment":return y(E);case"import":case"charset":case"namespace":return d(E);case"font-face":case"supports":case"viewport":case"document":case"page":return p(E)}}function v(E){var x=E.name?E.name+":"+s:"";return u()+x+E.value+";"}}(wg)),wg.exports}var _g,Tb;function LA(){return Tb||(Tb=1,_g={lex:D8(),parse:CA(),stringify:kA()}),_g}var Rb;function Cp(){return Rb||(Rb=1,function(e){var r=Vd&&Vd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=async function(_){const S=await fetch(_);return f(await S.text())},e.urlToString=p,e.getColors=y,e.svgToURL=f,e.getSvgSize=async function(_){const S=await p(_),w=new DOMParser().parseFromString(S,"image/svg+xml").documentElement.getAttribute("viewBox"),[b,g,v,E]=(w==null?void 0:w.split(" "))||[];return{width:parseFloat(v),height:parseFloat(E)}},e.fixSize=function(_){var S=new DOMParser().parseFromString(_,"image/svg+xml");const w=S.documentElement.getAttribute("viewBox"),[b,g,v,E]=(w==null?void 0:w.split(" "))||[],x=S.documentElement.getAttribute("width");x||S.documentElement.setAttribute("width",v+"px");const j=S.documentElement.getAttribute("height");if((!j||j.indexOf("%")>=0)&&S.documentElement.setAttribute("height",E+"px"),x&&x.indexOf("%")>=0&&j&&j.indexOf("%")===-1){const N=parseFloat(j)/parseFloat(E);S.documentElement.setAttribute("width",N*parseFloat(v)+"px")}if(j&&j.indexOf("%")>=0&&x&&x.indexOf("%")===-1){const N=parseFloat(x)/parseFloat(v);S.documentElement.setAttribute("height",N*parseFloat(E)+"px")}return x==="100%"&&j==="100%"&&(S.documentElement.setAttribute("width",v+"px"),S.documentElement.setAttribute("height",E+"px")),new XMLSerializer().serializeToString(S)},e.replaceColors=function(_,S){var w=new DOMParser().parseFromString(_,"image/svg+xml");const b=d(w),g=Array.from(S.keys()),v=s(w);return b.forEach(E=>{const{fill:x,stroke:j}=c(E,v);[{prop:"fill",color:x},{prop:"stroke",color:j}].forEach(({prop:N,color:T})=>{const F=g.find(C=>(0,e.sameColors)(C,T));if(F){const C=S.get(F);if((0,a.isGradient)(C)){const{rotation:A,stops:L}=(0,a.parseColor)(C),O=L.map(M=>({offset:100*M.offset+"%","stop-color":M.color})),I="color"+Math.round(1e8*Math.random());(function(M,G,W,Y){var te=M.namespaceURI,V=document.createElementNS(te,"linearGradient");const H=t.default.Util.degToRad(W+90),q=(Math.cos(H)+1)/2,D=(Math.sin(H)+1)/2,$=(Math.cos(H+Math.PI)+1)/2,ne=(Math.sin(H+Math.PI)+1)/2;V.setAttribute("x1",100*q+"%"),V.setAttribute("y1",100*D+"%"),V.setAttribute("x2",100*$+"%"),V.setAttribute("y2",100*ne+"%"),V.setAttribute("gradientUnits","userSpaceOnUse"),V.setAttribute("id",G);for(var Z=0;Z<Y.length;Z++){var Q=Y[Z],oe=document.createElementNS(te,"stop");for(var se in Q)Q.hasOwnProperty(se)&&oe.setAttribute(se,Q[se]);V.appendChild(oe)}(M.querySelector("defs")||M.insertBefore(document.createElementNS(te,"defs"),M.firstChild)).appendChild(V)})(w.children[0],I,A,O),E.style[N]=null,E.setAttribute(N,`url('#${I}')`)}else E.style[N]=S.get(F)}})}),f(new XMLSerializer().serializeToString(w))};const t=r(Hs()),n=r(fi()),a=fm(),i=r(LA());function o(_){for(;_.parentNode;){if(_.nodeName==="defs")return!0;_=_.parentNode}return!1}function s(_){const S={};return _.querySelectorAll("style").forEach(w=>{const b=i.default.parse(w.textContent).stylesheet.rules;for(let g of b)g.selectors&&g.selectors.forEach(v=>{const E=S[v]||{};g.declarations.forEach(x=>{E[x.name]=x.value}),S[v]=E})}),S}function c(_,S){var w;const b={fill:"",stroke:""},g=((w=_.getAttribute("class"))===null||w===void 0?void 0:w.split(" "))||[],v=_.getAttribute("id");let E={};if(v&&S[`#${v}`]?E=S[`#${v}`]:g.forEach(x=>{S[`.${x}`]&&(E=Object.assign(Object.assign({},E),S[`.${x}`]))}),S[_.nodeName]&&(E=Object.assign(Object.assign({},E),S[_.nodeName])),_.getAttribute("fill")&&_.getAttribute("fill")!=="none"?b.fill=_.getAttribute("fill"):E.fill&&E.fill!=="none"&&(b.fill=E.fill),_.getAttribute("stroke")&&_.getAttribute("stroke")!=="none"?b.stroke=_.getAttribute("stroke"):E.stroke&&E.stroke!=="none"&&(b.stroke=E.stroke),!b.fill&&_.style.fill&&_.style.fill!=="none"&&(b.fill=_.style.fill),!b.stroke&&_.style.stroke&&_.style.stroke!=="none"&&(b.stroke=_.style.stroke),!b.stroke&&!b.fill){const x=_.ownerSVGElement,j=x&&x!==_&&c(x,S);(j==null?void 0:j.fill)==="currentColor"||(j==null?void 0:j.stroke)==="currentColor"||(b.fill="black")}return b}const u=["path","rect","circle","line","polygon","polyline","ellipse","text"];function d(_){for(var S=[],w=_.getElementsByTagName("*"),b=0,g=w.length;b<g;b++){const v=w[b];o(v)||(v.getAttribute("fill")!==null&&S.push(v),(v.getAttribute("stroke")!==null||v.style&&v.style.fill||u.indexOf(v.nodeName)>=0)&&S.push(v))}return S}async function p(_){return await(await fetch(_,{mode:"cors"})).text()}function y(_){var S=new DOMParser().parseFromString(_,"image/svg+xml");const w=s(S),b=d(S),g=[];return b.forEach(v=>{const{fill:E,stroke:x}=c(v,w);[E,x].forEach(j=>{j&&(j==="currentColor"&&(j="black"),t.default.Util.colorToRGBA(j)&&g.indexOf(j)===-1&&g.push(j))})}),g}function f(_){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(_)))}e.sameColors=(_,S)=>{if(!_||!S)return!1;if(S==="currentColor"&&_==="black")return!0;const w=t.default.Util.colorToRGBA(_),b=t.default.Util.colorToRGBA(S);return w&&b?w.r===b.r&&w.g===b.g&&w.b===b.b&&w.a===b.a:void 0},e.useSvgColors=_=>{const[S,w]=n.default.useState([]);return n.default.useEffect(()=>{let b=!1;return(async()=>{w([]);const g=y(await p(_));b||w(g)})(),()=>{b=!0}},[_]),S}}(Vd)),Vd}var Sg={},Mb;function B8(){return Mb||(Mb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trySetCanvasSize=void 0,e.trySetCanvasSize=(r,t,n)=>{let a=t,i=n,o=1;for(;a>0&&i>0;){r.width=a,r.height=i;const s=r.getContext("2d");if(!s)return;if(s.fillStyle="rgba(0,0,0,0.1)",s.fillRect(0,0,1,1),s.getImageData(0,0,1,1).data[3]!==0)return void s.clearRect(0,0,r.width,r.height);if(o*=.9,a=Math.floor(t*o),i=Math.floor(n*o),a=Math.max(a,1),i=Math.max(i,1),a<=1&&i<=1)return r.width=1,void(r.height=1)}}}(Sg)),Sg}var Ib;function xm(){return Ib||(Ib=1,function(e){var r,t=Fl&&Fl.__createBinding||(Object.create?function(O,I,M,G){G===void 0&&(G=M);var W=Object.getOwnPropertyDescriptor(I,M);W&&!("get"in W?!I.__esModule:W.writable||W.configurable)||(W={enumerable:!0,get:function(){return I[M]}}),Object.defineProperty(O,G,W)}:function(O,I,M,G){G===void 0&&(G=M),O[G]=I[M]}),n=Fl&&Fl.__setModuleDefault||(Object.create?function(O,I){Object.defineProperty(O,"default",{enumerable:!0,value:I})}:function(O,I){O.default=I}),a=Fl&&Fl.__importStar||(r=function(O){return r=Object.getOwnPropertyNames||function(I){var M=[];for(var G in I)Object.prototype.hasOwnProperty.call(I,G)&&(M[M.length]=G);return M},r(O)},function(O){if(O&&O.__esModule)return O;var I={};if(O!=null)for(var M=r(O),G=0;G<M.length;G++)M[G]!=="default"&&t(I,O,M[G]);return n(I,O),I}),i=Fl&&Fl.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=e.useCornerRadiusAndCrop=e.setOuterImageCropTransformerStyle=e.setInnerImageCropTransformerStyle=e.useSizeFixer=void 0;const o=i(fi()),s=Us,c=qs,u=Fu,d=i(t0()),p=i(Hs()),y=Mh,f=jf(),_=a(Cp()),S=gc(),w=B8(),b=Op(),g=If(),v=rf();function E(){return document.createElement("canvas")}function x(O,I){return{x:(O.x+I.x)/2,y:(O.y+I.y)/2}}e.useSizeFixer=O=>{const[I,M]=o.default.useState(O);return o.default.useEffect(()=>{(async()=>{const G=await async function(W){if(!(W.indexOf("data:image/svg+xml")>=0||W.indexOf(".svg")>=0))return W;const Y=await _.urlToString(W),te=_.fixSize(Y);return _.svgToURL(te)}(O);G!==I&&M(G)})()},[O]),I};const j={boundBoxFunc:(O,I)=>I.width<5||I.height<5?O:I,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2};e.setInnerImageCropTransformerStyle=O=>{Object.assign(j,O)};const N={boundBoxFunc:(O,I)=>I.width<5||I.height<5?O:I,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2};e.setOuterImageCropTransformerStyle=O=>{Object.assign(N,O)};const T=(O,I,M)=>Math.max(I,Math.min(M,O));e.useCornerRadiusAndCrop=(O,I,M,G,W=0,Y=!1,te=!0)=>{const V=Math.floor(T(O.a.width*G,1,1e4)),H=Math.floor(T(O.a.height*G,1,1e4)),q=Math.min(W*G,V/2,H/2),D=Math.max(O.a.width/M.width,O.a.height/M.height)*G,$=O.page._exportingOrRendering&&S.flags.imageDownScalingEnabled&&D<1&&!Y,ne=M.x===0&&M.y===0&&M.width===(I==null?void 0:I.width)&&M.height===(I==null?void 0:I.height),Z=o.default.useMemo(()=>{if(I&&I.width&&I.height)return ne&&q===0&&!$?void 0:E()},[I,q,$,ne]);return o.default.useLayoutEffect(()=>{if(!Z||!I)return;(0,w.trySetCanvasSize)(Z,V,H);const Q=Z.getContext("2d");if(!Q)return;q&&(Q.beginPath(),Q.moveTo(q,0),Q.lineTo(V-q,0),Q.arc(V-q,q,q,3*Math.PI/2,0,!1),Q.lineTo(V,H-q),Q.arc(V-q,H-q,q,0,Math.PI/2,!1),Q.lineTo(q,H),Q.arc(q,H-q,q,Math.PI/2,Math.PI,!1),Q.lineTo(0,q),Q.arc(q,q,q,Math.PI,3*Math.PI/2,!1),Q.clip());const oe=$?function(ue,ve){var Pe,ke;const Ne=E();Ne.width=ue.width,Ne.height=ue.height;const xe=Math.max(1,Math.floor(Ne.width*ve)),ye=Math.max(1,Math.floor(Ne.height*ve));(Pe=Ne.getContext("2d"))===null||Pe===void 0||Pe.drawImage(ue,0,0,Ne.width,Ne.height);const Ie=function(me,_e,Ae,Le,ge,Te,Fe){for(var Ke=new ImageData(_e,Ae),it=new Int32Array(me.data.buffer),rt=me.width,at=new Int32Array(Ke.data.buffer),bt=Ke.width,yt=_e/Te,ht=Ae/Fe,zt=Math.round(1/yt),Ot=Math.round(1/ht),Ut=zt*Ot,$t=0;$t<Ke.height;$t++)for(var Oe=0;Oe<bt;Oe++){for(var Me=0+Math.round(Oe/yt)+(0+Math.round($t/ht))*rt,mt=0,Mt=0,Lt=0,At=0,fr=0;fr<Ot;fr++)for(var Qt=0;Qt<zt;Qt++){var ze=it[Me+Qt+fr*rt];mt+=ze<<24>>>24,Mt+=ze<<16>>>24,Lt+=ze<<8>>>24,At+=ze>>>24}mt=Math.round(mt/Ut),Mt=Math.round(Mt/Ut),Lt=Math.round(Lt/Ut),At=Math.round(At/Ut),at[Oe+$t*bt]=At<<24|Lt<<16|Mt<<8|mt}return Ke}(Ne.getContext("2d").getImageData(0,0,Ne.width,Ne.height),xe,ye,0,0,Ne.width,Ne.height);return Ne.width=xe,Ne.height=ye,(ke=Ne.getContext("2d"))===null||ke===void 0||ke.putImageData(Ie,0,0),Ne}(I,D):I,se=$?{x:Math.floor(M.x*D),y:Math.floor(M.y*D),width:Math.floor(M.width*D),height:Math.floor(M.height*D)}:M;Q.drawImage(oe,se.x,se.y,se.width,se.height,0,0,Z.width,Z.height)},[Z,O.a.width,O.a.height,M.x,M.y,M.width,M.height,W,G,Y,O.page._exportingOrRendering,$]),o.default.useEffect(()=>()=>{Z&&Z.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(Z)},[Z]),Z||I};const F=E(),C=(0,s.observer)(({element:O})=>{const I=Math.min(30,O.a.width/4,O.a.height/4),M=o.default.useRef(null);return o.default.useEffect(()=>{const G=M.current;if(!G)return;const W=new p.default.Animation(Y=>{G.rotate(((Y==null?void 0:Y.timeDiff)||0)/2)},G.getLayer());return W.start(),()=>{W.stop()}}),o.default.createElement(u.Group,{x:O.x,y:O.y,rotation:O.rotation,listening:!1,opacity:O.a.opacity,hideInExport:!O.showInExport},o.default.createElement(u.Rect,{width:O.a.width,height:O.a.height,fill:"rgba(124, 173, 212, 0.8)"}),o.default.createElement(u.Arc,{ref:M,x:O.a.width/2,y:O.a.height/2,fill:"white",outerRadius:Math.abs(I),innerRadius:Math.max(1,I-5),angle:270}))}),A=(0,s.observer)(({element:O})=>{const I=Math.max(10,Math.min(30,O.a.width/25));return o.default.createElement(u.Group,{x:O.x,y:O.y,rotation:O.rotation,listening:!1,opacity:O.a.opacity,hideInExport:!O.showInExport},o.default.createElement(u.Rect,{width:O.a.width,height:O.a.height,fill:"rgba(223, 102, 102, 0.8)"}),o.default.createElement(u.Text,{text:"Can not load the image...",fontSize:I,width:O.a.width,height:O.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let L=d.default;e.setImageLoaderHook=O=>{L=O},e.useImageLoader=(O,I="",M="")=>{const G=o.default.useRef(),W=()=>{var Y;(Y=G.current)===null||Y===void 0||Y.call(G),G.current=void 0};o.default.useEffect(()=>W,[]),o.default.useLayoutEffect(()=>{const Y=I.slice(0,200),te=`image with id ${M} url: ${Y}`;O!=="loading"||G.current||(G.current=(0,f.incrementLoader)(te)),O!=="loading"&&W(),O==="failed"&&(0,f.triggerLoadError)(te)},[O])},e.ImageElement=(0,s.observer)(({element:O,store:I})=>{var M;const[G,W]=o.default.useState(!1),Y=o.default.useRef(null),te=o.default.useRef(null),V=I.selectedShapes.indexOf(O)>=0&&O.selectable,[H,q]=(ze=>{const[qe,vt]=o.default.useReducer(Ye=>Ye+1,0),pt=o.default.useRef("loading"),Je=o.default.useRef(ze.src),_t=o.default.useRef(ze.src);return _t.current!==ze.src&&(_t.current=ze.src,pt.current="loading"),o.default.useEffect(()=>{if(ze.type!=="svg"||!ze.src)return;let Ye=!1;return(async()=>{pt.current="loading",vt();const Pt=await _.urlToString(ze.src),Dt=_.fixSize(Pt),Wt=_.replaceColors(Dt,ze.colorsReplace);Ye||(Je.current=Wt,pt.current="loaded",vt())})(),()=>{Ye=!0}},[ze.src,JSON.stringify(ze.colorsReplace)]),ze.type!=="svg"?[ze.src,"loaded"]:[Je.current,pt.current]})(O),[D,$]=L(H,"anonymous"),ne=O.type!=="svg"||q==="loaded"?$:"loading";(0,e.useImageLoader)(ne,O.src,O.id);const Z=O.page._exportingOrRendering?1:Math.max(1,I.scale),Q=I._elementsPixelRatio*Z,oe=(({image:ze,status:qe,type:vt})=>{const pt=o.default.useRef();return o.default.useEffect(()=>{pt.current=ze||pt.current},[ze]),qe!=="failed"||qe!=="failed"&&vt==="svg"?pt.current:void 0})({image:D,status:$,type:O.type}),se=((ze,qe,vt)=>{const pt=o.default.useMemo(()=>{var Je,_t;const{flipX:Ye,flipY:Pt}=ze,Dt=ze.type==="svg"||ze.src.indexOf("data:image/svg+xml")>=0||ze.src.indexOf(".svg")>=0,Wt=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Zt=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||Wt)&&Dt||ze.maskSrc;if(!Ye&&!Pt&&!Zt)return qe;if(!qe||!qe.width||!qe.height)return null;const rr=E();let _r=1;ze.type==="svg"&&(_r=Math.max(ze.a.width/qe.width*vt,ze.a.height/qe.height*vt)),(0,w.trySetCanvasSize)(rr,Math.max(qe.width*_r,1),Math.max(qe.height*_r,1));let Hn=Ye?-rr.width:0,ti=Pt?-rr.height:0;return(Je=rr.getContext("2d"))===null||Je===void 0||Je.scale(Ye?-1:1,Pt?-1:1),(_t=rr.getContext("2d"))===null||_t===void 0||_t.drawImage(qe,Hn,ti,rr.width,rr.height),rr},[ze.maskSrc,ze.flipX,ze.flipY,qe,ze.a.width,ze.a.height,vt]);return o.default.useEffect(()=>()=>{pt&&pt.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(pt)},[pt]),pt})(O,D||oe,Q),ue=((ze,qe)=>{const[vt,pt]=L(ze.maskSrc,"anonymous"),Je=ze.maskSrc?pt:"loaded";return(0,e.useImageLoader)(Je,ze.maskSrc||"",ze.id),o.default.useMemo(()=>{if(!vt||!qe||!qe.width||!qe.height)return qe;const _t=E();_t.width=Math.max(qe.width,1),_t.height=Math.max(qe.height,1);const Ye=_t.getContext("2d");if(!Ye)return qe;Ye.drawImage(qe,0,0),Ye.globalCompositeOperation="source-in";const Pt=function(Dt,Wt){const Zt=Wt.width/Wt.height;let rr,_r;return Zt>=Dt.width/Dt.height?(rr=Dt.width,_r=Dt.width/Zt):(rr=Dt.height*Zt,_r=Dt.height),{x:(Dt.width-rr)/2,y:(Dt.height-_r)/2,width:rr,height:_r}}(vt,ze);return Ye.drawImage(vt,Pt.x,Pt.y,Pt.width,Pt.height,0,0,qe.width,qe.height),_t},[qe,vt,ze.a.width,ze.a.height])})(O,se)||F;let{cropX:ve,cropY:Pe,cropWidth:ke,cropHeight:Ne}=O.a;$!=="loaded"&&(ve=Pe=0,ke=Ne=1);const xe=ue.width*ke,ye=ue.height*Ne,Ie=O.a.width/O.a.height;let me,_e;const Ae=xe/ye,Le=O.stretchEnabled;Le?(me=xe,_e=ye):Ie>=Ae?(me=xe,_e=xe/Ie):(me=ye*Ie,_e=ye);const ge={x:ue.width*ve,y:ue.height*Pe,width:me,height:_e},Te=(M=O.cornerRadius)!==null&&M!==void 0?M:0,Fe=O.page._exportingOrRendering?1:Math.min(2,I.scale),Ke=I._elementsPixelRatio*Fe;let it=((ze,qe,vt,pt)=>{const Je=(0,e.useSizeFixer)(ze.clipSrc||""),[_t,Ye]=L(Je,"anonymous"),Pt=ze.clipSrc?Ye:"loaded";(0,e.useImageLoader)(Pt,ze.clipSrc,ze.id);const Dt=o.default.useMemo(()=>{if(qe&&_t)return E()},[qe,_t]);return o.default.useLayoutEffect(()=>{var Wt;if(!_t||!qe||!qe.width||!qe.height||!_t||!_t.width||!_t.height||!Dt)return;const Zt=E(),rr=Math.max(ze.a.width/_t.width*vt,ze.a.height/_t.height*vt);Zt.width=Math.max(_t.width*rr,1),Zt.height=Math.max(_t.height*rr,1),(Wt=Zt.getContext("2d"))===null||Wt===void 0||Wt.drawImage(_t,0,0,Zt.width,Zt.height),Dt.width=Math.max(qe.width,1),Dt.height=Math.max(qe.height,1);const _r=Dt.getContext("2d");_r&&(_r.save(),_r.drawImage(Zt,0,0,qe.width,qe.height),p.default.Util.releaseCanvas(Zt),_r.globalCompositeOperation="source-in",_r.drawImage(qe,0,0,Dt.width,Dt.height),_r.restore())},[Dt,qe,_t,ze.a.width,ze.a.height,vt,...pt]),ze.clipSrc&&_t?Dt:qe})(O,(0,e.useCornerRadiusAndCrop)(O,ue,ge,Ke,Te,G||O._cropModeEnabled||O.type==="svg",!0),Ke,[ge,Te,Ke]);const rt=Math.max(O.a.width/me,O.a.height/_e);o.default.useEffect(()=>{var ze;if(!O._cropModeEnabled)return;const qe=(ze=Y.current)===null||ze===void 0?void 0:ze.getStage();function vt(Je){O._cropModeEnabled&&Je.target!==te.current&&O.toggleCropMode(!1)}function pt(Je){O._cropModeEnabled&&Je.target.parentNode!==qe.content&&O.toggleCropMode(!1)}return document.body.addEventListener("click",pt),qe==null||qe.on("click",vt),qe==null||qe.on("tap",vt),()=>{document.body.removeEventListener("click",pt),document.body.removeEventListener("touchstart",pt),qe==null||qe.off("click",vt),qe==null||qe.off("click",vt)}},[O._cropModeEnabled]),o.default.useLayoutEffect(()=>{if(!G&&!O._cropModeEnabled)return(0,b.applyFilter)(Y.current,O),(0,c.autorun)(()=>{(0,b.applyFilter)(Y.current,O)},{delay:100})},[it,O.page._exportingOrRendering,G,ke,Ne,O._cropModeEnabled]),o.default.useLayoutEffect(()=>{var ze;G||O._cropModeEnabled?(ze=Y.current)===null||ze===void 0||ze.clearCache():(0,b.applyFilter)(Y.current,O)},[G,O.a.width,O.a.height,O._cropModeEnabled]),o.default.useEffect(()=>{(0,b.applyFilter)(Y.current,O)},[O.shadowEnabled,O.shadowBlur,O.cornerRadius,O.shadowColor,O.shadowOffsetX,O.shadowOffsetY,O.shadowOpacity]);const at=o.default.useRef(null),bt=o.default.useRef(null),yt=o.default.useRef(null);o.default.useLayoutEffect(()=>{O._cropModeEnabled&&(bt.current.nodes([at.current]),yt.current.nodes([te.current]))},[O._cropModeEnabled]);var ht=o.default.useRef(null),zt=o.default.useRef(0),Ot=o.default.useRef(!1);const Ut=ze=>{var qe;((qe=ze.evt.touches)===null||qe===void 0?void 0:qe.length)>2&&ze.target.stopDrag(),Math.round(ze.target.x())>0&&(ze.target.x(0),ze.target.scaleX(1)),Math.round(ze.target.y())>0&&(ze.target.y(0),ze.target.scaleY(1));const vt=ze.target.width()*ze.target.scaleX(),pt=ze.target.height()*ze.target.scaleY(),Je=Math.min(1,me/vt),_t=Math.min(1,_e/pt),Ye=1-Je,Pt=Math.min(Ye,Math.max(0,Math.round(-ze.target.x())/vt)),Dt=1-_t,Wt=Math.min(Dt,Math.max(0,Math.round(-ze.target.y())/pt));ze.target.setAttrs({x:-Pt*ue.width,y:-Wt*ue.height,scaleX:1,scaleY:1}),O.set({cropX:Pt,cropY:Wt,cropWidth:Je,cropHeight:_t})},$t=()=>{O.type!=="svg"&&O.contentEditable&&(O.stretchEnabled||setTimeout(()=>{O.toggleCropMode(!0)}))},Oe=O.type==="svg"&&oe,Me=$==="loading"&&!Oe,mt=$==="failed",Mt=!Me&&!mt,Lt=o.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),At=Mt?O.a.opacity:0;(0,g.useFadeIn)(Y,At);const fr=O.selectable||I.role==="admin",Qt=(0,v.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,Me&&o.default.createElement(C,{element:O}),mt&&o.default.createElement(A,{element:O}),o.default.createElement(u.Image,{ref:Y,name:"element",id:O.id,image:it,x:O.a.x,y:O.a.y,width:O.a.width||1,height:O.a.height||1,rotation:O.a.rotation,opacity:At,shadowEnabled:O.shadowEnabled,shadowBlur:O.shadowBlur,shadowOffsetX:O.shadowOffsetX,shadowOffsetY:O.shadowOffsetY,shadowColor:O.shadowColor,shadowOpacity:O.shadowOpacity,customCrop:ge,listening:fr,draggable:Qt?O.draggable&&V:O.draggable,preventDefault:!Qt||V,hideInExport:!O.showInExport,onDragMove:ze=>{O.set({x:ze.target.x(),y:ze.target.y()})},onDragEnd:ze=>{O.set({x:ze.target.x(),y:ze.target.y()})},onDblClick:$t,onDblTap:$t,onTransformStart:()=>{W(!0),Lt.current={cropX:O.cropX,cropY:O.cropY,cropWidth:O.cropWidth,cropHeight:O.cropHeight}},onTransform:ze=>{var qe;const vt=ze.currentTarget,pt=Math.abs(vt.scaleX()-1)<1e-7?1:vt.scaleX(),Je=Math.abs(vt.scaleY()-1)<1e-7?1:vt.scaleY();vt.scaleX(1),vt.scaleY(1);const _t=(qe=ze.target.getStage())===null||qe===void 0?void 0:qe.findOne("Transformer"),Ye=1-me/ue.width,Pt=Math.min(Ye,Math.max(0,O.cropX)),Dt=1-_e/ue.height,Wt=Math.min(Dt,Math.max(0,O.cropY)),Zt=_t.getActiveAnchor(),rr=!(Zt.indexOf("middle")>=0||Zt.indexOf("center")>=0),_r=!rr&&pt<1&&Lt.current.cropHeight>_e/ue.height;let Hn=rr?O.cropWidth:O.cropWidth*pt;_r&&(Hn=O.cropWidth);const ti=!rr&&Je<1&&Lt.current.cropWidth>me/ue.width;let Vn=rr?O.cropHeight:O.cropHeight*Je;ti&&(Vn=O.cropHeight),Le&&(Hn=O.cropWidth,Vn=O.cropHeight),O.set({cropX:Pt,cropY:Wt,x:vt.x(),y:vt.y(),width:vt.width()*pt,height:vt.height()*Je,rotation:ze.target.rotation(),cropWidth:Math.min(Hn,1-Pt),cropHeight:Math.min(Vn,1-Wt)})},onTransformEnd:ze=>{const qe=ze.currentTarget;O.set({width:qe.width(),height:qe.height(),x:qe.x(),y:qe.y(),rotation:ze.target.rotation(),cropWidth:me/ue.width,cropHeight:_e/ue.height}),W(!1)}}),o.default.createElement(u.Rect,{x:O.x,y:O.y,width:Math.max(O.a.width-O.borderSize,0),height:Math.max(O.a.height-O.borderSize,0),opacity:At,offsetX:-O.borderSize/2,offsetY:-O.borderSize/2,stroke:O.borderColor,strokeWidth:O.borderSize,listening:!1,visible:!!O.borderSize,rotation:O.rotation,cornerRadius:Math.max(0,Te-O.borderSize),hideInExport:!O.showInExport}),O._cropModeEnabled&&o.default.createElement(y.Portal,{selector:".page-abs-container",enabled:!0},o.default.createElement(u.Rect,{x:-window.innerWidth/I.scale,y:-window.innerWidth/I.scale,width:window.innerWidth/I.scale*3,height:window.innerWidth/I.scale*3,fill:"rgba(0,0,0,0.3)"}),o.default.createElement(u.Image,{listening:!1,image:it,x:O.x,y:O.y,width:O.a.width,height:O.a.height,rotation:O.rotation,shadowEnabled:O.shadowEnabled,shadowBlur:O.shadowBlur}),o.default.createElement(u.Group,{x:O.x,y:O.y,rotation:O.rotation,scaleX:rt,scaleY:rt},o.default.createElement(u.Image,{image:ue,ref:te,opacity:.4,draggable:!0,x:-O.cropX*ue.width,y:-O.cropY*ue.height,onDragMove:Ut,onTransform:Ut,onTouchMove:ze=>{ze.evt.preventDefault();const qe=ze.target.getStage().getPointersPositions();var vt=qe[0],pt=qe[1];const Je=ze.target;if(vt&&!pt&&!Je.isDragging()&&Ot.current&&(Je.startDrag(),Ot.current=!1),vt&&pt){p.default.hitOnDragEnabled=!0,Je.isDragging()&&(Ot.current=!0,Je.stopDrag());const ti=ze.target.getAbsoluteTransform().copy();ti.invert();var _t={x:vt.x,y:vt.y},Ye={x:pt.x,y:pt.y};if(!ht.current)return void(ht.current=x(_t,Ye));var Pt=x(_t,Ye),Dt=function(ki,bi){return Math.sqrt(Math.pow(bi.x-ki.x,2)+Math.pow(bi.y-ki.y,2))}(_t,Ye);zt.current||(zt.current=Dt);const Vn=Je.position();var Wt={x:Pt.x-Vn.x,y:Pt.y-Vn.y},Zt=Dt/zt.current;Je.scaleX(Zt),Je.scaleY(Zt);const Ci=ti.point(Pt),En=ti.point(ht.current);var rr=Ci.x-En.x,_r=Ci.y-En.y,Hn={x:Math.min(0,Pt.x-Wt.x*Zt+rr),y:Math.min(0,Pt.y-Wt.y*Zt+_r)};Je.position(Hn),zt.current=Dt,ht.current=Pt,Ut(ze)}},onTouchEnd:ze=>{zt.current=0,ht.current=null,p.default.hitOnDragEnabled=!1}}),o.default.createElement(u.Transformer,Object.assign({ref:yt},N)),o.default.createElement(u.Rect,{width:me,height:_e,ref:at,listening:!1,onTransform:ze=>{if(O.cropX<Math.abs(ze.target.x()/ue.width)&&ze.target.x()<0&&O.cropX>0){const Dt=(O.cropWidth+O.cropX)*ue.width;ze.target.scaleX(1),ze.target.width(Dt)}if(O.cropY<Math.abs(ze.target.y()/ue.height)&&ze.target.y()<0&&O.cropY>0){const Dt=(O.cropHeight+O.cropY)*ue.height;ze.target.scaleY(1),ze.target.height(Dt)}ze.target.x()<-O.cropX*ue.width-1e-9&&(ze.target.x(-O.cropX*ue.width),ze.target.scaleX(1)),ze.target.y()<-O.cropY*ue.height-1e-9&&(ze.target.y(-O.cropY*ue.height),ze.target.scaleY(1));const qe=Math.min(1,Math.max(0,O.cropX+ze.target.x()/ue.width)),vt=Math.min(1,Math.max(0,ze.target.y()/ue.height+O.cropY)),pt=ze.target.width()*ze.target.scaleX(),Je=ze.target.height()*ze.target.scaleY(),_t=Math.min(1-qe,pt/ue.width),Ye=Math.min(1-vt,Je/ue.height),Pt=ze.target.getAbsolutePosition(ze.target.getParent().getParent());ze.target.scale({x:1,y:1}),ze.target.position({x:0,y:0}),O.set({x:Pt.x,y:Pt.y,cropX:qe,cropY:vt,cropWidth:_t,cropHeight:Ye,width:Math.min(pt*rt,ue.width*(1-qe)*rt),height:Math.min(Je*rt,ue.height*(1-vt)*rt)})}}),o.default.createElement(u.Transformer,Object.assign({ref:bt},j,{visible:O.resizable})))))})}(Fl)),Fl}var Dl={},m1={exports:{}};/*!
|
|
109
|
-
* Quill Editor v1.3.7
|
|
110
|
-
* https://quilljs.com/
|
|
111
|
-
* Copyright (c) 2014, Jason Chen
|
|
112
|
-
* Copyright (c) 2013, salesforce.com
|
|
113
|
-
*/var NA=m1.exports,jb;function TA(){return jb||(jb=1,function(e,r){(function(n,a){e.exports=a()})(typeof self<"u"?self:NA,function(){return function(t){var n={};function a(i){if(n[i])return n[i].exports;var o=n[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=n,a.d=function(i,o,s){a.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},a.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(o,"a",o),o},a.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},a.p="",a(a.s=109)}([function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(17),o=a(18),s=a(19),c=a(45),u=a(46),d=a(47),p=a(48),y=a(49),f=a(12),_=a(32),S=a(33),w=a(31),b=a(1),g={Scope:b.Scope,create:b.create,find:b.find,query:b.query,register:b.register,Container:i.default,Format:o.default,Leaf:s.default,Embed:p.default,Scroll:c.default,Block:d.default,Inline:u.default,Text:y.default,Attributor:{Attribute:f.default,Class:_.default,Style:S.default,Store:w.default}};n.default=g},function(t,n,a){var i=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,g){b.__proto__=g}||function(b,g){for(var v in g)g.hasOwnProperty(v)&&(b[v]=g[v])};return function(b,g){w(b,g);function v(){this.constructor=b}b.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=function(w){i(b,w);function b(g){var v=this;return g="[Parchment] "+g,v=w.call(this,g)||this,v.message=g,v.name=v.constructor.name,v}return b}(Error);n.ParchmentError=o;var s={},c={},u={},d={};n.DATA_KEY="__blot";var p;(function(w){w[w.TYPE=3]="TYPE",w[w.LEVEL=12]="LEVEL",w[w.ATTRIBUTE=13]="ATTRIBUTE",w[w.BLOT=14]="BLOT",w[w.INLINE=7]="INLINE",w[w.BLOCK=11]="BLOCK",w[w.BLOCK_BLOT=10]="BLOCK_BLOT",w[w.INLINE_BLOT=6]="INLINE_BLOT",w[w.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",w[w.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",w[w.ANY=15]="ANY"})(p=n.Scope||(n.Scope={}));function y(w,b){var g=_(w);if(g==null)throw new o("Unable to create "+w+" blot");var v=g,E=w instanceof Node||w.nodeType===Node.TEXT_NODE?w:v.create(b);return new v(E,b)}n.create=y;function f(w,b){return b===void 0&&(b=!1),w==null?null:w[n.DATA_KEY]!=null?w[n.DATA_KEY].blot:b?f(w.parentNode,b):null}n.find=f;function _(w,b){b===void 0&&(b=p.ANY);var g;if(typeof w=="string")g=d[w]||s[w];else if(w instanceof Text||w.nodeType===Node.TEXT_NODE)g=d.text;else if(typeof w=="number")w&p.LEVEL&p.BLOCK?g=d.block:w&p.LEVEL&p.INLINE&&(g=d.inline);else if(w instanceof HTMLElement){var v=(w.getAttribute("class")||"").split(/\s+/);for(var E in v)if(g=c[v[E]],g)break;g=g||u[w.tagName]}return g==null?null:b&p.LEVEL&g.scope&&b&p.TYPE&g.scope?g:null}n.query=_;function S(){for(var w=[],b=0;b<arguments.length;b++)w[b]=arguments[b];if(w.length>1)return w.map(function(E){return S(E)});var g=w[0];if(typeof g.blotName!="string"&&typeof g.attrName!="string")throw new o("Invalid definition");if(g.blotName==="abstract")throw new o("Cannot register abstract class");if(d[g.blotName||g.attrName]=g,typeof g.keyName=="string")s[g.keyName]=g;else if(g.className!=null&&(c[g.className]=g),g.tagName!=null){Array.isArray(g.tagName)?g.tagName=g.tagName.map(function(E){return E.toUpperCase()}):g.tagName=g.tagName.toUpperCase();var v=Array.isArray(g.tagName)?g.tagName:[g.tagName];v.forEach(function(E){(u[E]==null||g.className==null)&&(u[E]=g)})}return g}n.register=S},function(t,n,a){var i=a(51),o=a(11),s=a(3),c=a(20),u="\0",d=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};d.prototype.insert=function(p,y){var f={};return p.length===0?this:(f.insert=p,y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(f.attributes=y),this.push(f))},d.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},d.prototype.retain=function(p,y){if(p<=0)return this;var f={retain:p};return y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(f.attributes=y),this.push(f)},d.prototype.push=function(p){var y=this.ops.length,f=this.ops[y-1];if(p=s(!0,{},p),typeof f=="object"){if(typeof p.delete=="number"&&typeof f.delete=="number")return this.ops[y-1]={delete:f.delete+p.delete},this;if(typeof f.delete=="number"&&p.insert!=null&&(y-=1,f=this.ops[y-1],typeof f!="object"))return this.ops.unshift(p),this;if(o(p.attributes,f.attributes)){if(typeof p.insert=="string"&&typeof f.insert=="string")return this.ops[y-1]={insert:f.insert+p.insert},typeof p.attributes=="object"&&(this.ops[y-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof f.retain=="number")return this.ops[y-1]={retain:f.retain+p.retain},typeof p.attributes=="object"&&(this.ops[y-1].attributes=p.attributes),this}}return y===this.ops.length?this.ops.push(p):this.ops.splice(y,0,p),this},d.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},d.prototype.filter=function(p){return this.ops.filter(p)},d.prototype.forEach=function(p){this.ops.forEach(p)},d.prototype.map=function(p){return this.ops.map(p)},d.prototype.partition=function(p){var y=[],f=[];return this.forEach(function(_){var S=p(_)?y:f;S.push(_)}),[y,f]},d.prototype.reduce=function(p,y){return this.ops.reduce(p,y)},d.prototype.changeLength=function(){return this.reduce(function(p,y){return y.insert?p+c.length(y):y.delete?p-y.delete:p},0)},d.prototype.length=function(){return this.reduce(function(p,y){return p+c.length(y)},0)},d.prototype.slice=function(p,y){p=p||0,typeof y!="number"&&(y=1/0);for(var f=[],_=c.iterator(this.ops),S=0;S<y&&_.hasNext();){var w;S<p?w=_.next(p-S):(w=_.next(y-S),f.push(w)),S+=c.length(w)}return new d(f)},d.prototype.compose=function(p){var y=c.iterator(this.ops),f=c.iterator(p.ops),_=[],S=f.peek();if(S!=null&&typeof S.retain=="number"&&S.attributes==null){for(var w=S.retain;y.peekType()==="insert"&&y.peekLength()<=w;)w-=y.peekLength(),_.push(y.next());S.retain-w>0&&f.next(S.retain-w)}for(var b=new d(_);y.hasNext()||f.hasNext();)if(f.peekType()==="insert")b.push(f.next());else if(y.peekType()==="delete")b.push(y.next());else{var g=Math.min(y.peekLength(),f.peekLength()),v=y.next(g),E=f.next(g);if(typeof E.retain=="number"){var x={};typeof v.retain=="number"?x.retain=g:x.insert=v.insert;var j=c.attributes.compose(v.attributes,E.attributes,typeof v.retain=="number");if(j&&(x.attributes=j),b.push(x),!f.hasNext()&&o(b.ops[b.ops.length-1],x)){var N=new d(y.rest());return b.concat(N).chop()}}else typeof E.delete=="number"&&typeof v.retain=="number"&&b.push(E)}return b.chop()},d.prototype.concat=function(p){var y=new d(this.ops.slice());return p.ops.length>0&&(y.push(p.ops[0]),y.ops=y.ops.concat(p.ops.slice(1))),y},d.prototype.diff=function(p,y){if(this.ops===p.ops)return new d;var f=[this,p].map(function(g){return g.map(function(v){if(v.insert!=null)return typeof v.insert=="string"?v.insert:u;var E=g===p?"on":"with";throw new Error("diff() called "+E+" non-document")}).join("")}),_=new d,S=i(f[0],f[1],y),w=c.iterator(this.ops),b=c.iterator(p.ops);return S.forEach(function(g){for(var v=g[1].length;v>0;){var E=0;switch(g[0]){case i.INSERT:E=Math.min(b.peekLength(),v),_.push(b.next(E));break;case i.DELETE:E=Math.min(v,w.peekLength()),w.next(E),_.delete(E);break;case i.EQUAL:E=Math.min(w.peekLength(),b.peekLength(),v);var x=w.next(E),j=b.next(E);o(x.insert,j.insert)?_.retain(E,c.attributes.diff(x.attributes,j.attributes)):_.push(j).delete(E);break}v-=E}}),_.chop()},d.prototype.eachLine=function(p,y){y=y||`
|
|
114
|
-
`;for(var f=c.iterator(this.ops),_=new d,S=0;f.hasNext();){if(f.peekType()!=="insert")return;var w=f.peek(),b=c.length(w)-f.peekLength(),g=typeof w.insert=="string"?w.insert.indexOf(y,b)-b:-1;if(g<0)_.push(f.next());else if(g>0)_.push(f.next(g));else{if(p(_,f.next(1).attributes||{},S)===!1)return;S+=1,_=new d}}_.length()>0&&p(_,{},S)},d.prototype.transform=function(p,y){if(y=!!y,typeof p=="number")return this.transformPosition(p,y);for(var f=c.iterator(this.ops),_=c.iterator(p.ops),S=new d;f.hasNext()||_.hasNext();)if(f.peekType()==="insert"&&(y||_.peekType()!=="insert"))S.retain(c.length(f.next()));else if(_.peekType()==="insert")S.push(_.next());else{var w=Math.min(f.peekLength(),_.peekLength()),b=f.next(w),g=_.next(w);if(b.delete)continue;g.delete?S.push(g):S.retain(w,c.attributes.transform(b.attributes,g.attributes,y))}return S.chop()},d.prototype.transformPosition=function(p,y){y=!!y;for(var f=c.iterator(this.ops),_=0;f.hasNext()&&_<=p;){var S=f.peekLength(),w=f.peekType();if(f.next(),w==="delete"){p-=Math.min(S,p-_);continue}else w==="insert"&&(_<p||!y)&&(p+=S);_+=S}return p},t.exports=d},function(t,n){var a=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=function(f){return typeof Array.isArray=="function"?Array.isArray(f):i.call(f)==="[object Array]"},u=function(f){if(!f||i.call(f)!=="[object Object]")return!1;var _=a.call(f,"constructor"),S=f.constructor&&f.constructor.prototype&&a.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!_&&!S)return!1;var w;for(w in f);return typeof w>"u"||a.call(f,w)},d=function(f,_){o&&_.name==="__proto__"?o(f,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):f[_.name]=_.newValue},p=function(f,_){if(_==="__proto__")if(a.call(f,_)){if(s)return s(f,_).value}else return;return f[_]};t.exports=function y(){var f,_,S,w,b,g,v=arguments[0],E=1,x=arguments.length,j=!1;for(typeof v=="boolean"&&(j=v,v=arguments[1]||{},E=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});E<x;++E)if(f=arguments[E],f!=null)for(_ in f)S=p(v,_),w=p(f,_),v!==w&&(j&&w&&(u(w)||(b=c(w)))?(b?(b=!1,g=S&&c(S)?S:[]):g=S&&u(S)?S:{},d(v,{name:_,newValue:y(j,g,w)})):typeof w<"u"&&d(v,{name:_,newValue:w}));return v}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var i=function(){function A(L,O){for(var I=0;I<O.length;I++){var M=O[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,O,I){return O&&A(L.prototype,O),I&&A(L,I),L}}(),o=function A(L,O,I){L===null&&(L=Function.prototype);var M=Object.getOwnPropertyDescriptor(L,O);if(M===void 0){var G=Object.getPrototypeOf(L);return G===null?void 0:A(G,O,I)}else{if("value"in M)return M.value;var W=M.get;return W===void 0?void 0:W.call(I)}},s=a(3),c=v(s),u=a(2),d=v(u),p=a(0),y=v(p),f=a(16),_=v(f),S=a(6),w=v(S),b=a(7),g=v(b);function v(A){return A&&A.__esModule?A:{default:A}}function E(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}function x(A,L){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:A}function j(A,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);A.prototype=Object.create(L&&L.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(A,L):A.__proto__=L)}var N=1,T=function(A){j(L,A);function L(){return E(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return i(L,[{key:"attach",value:function(){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"attach",this).call(this),this.attributes=new y.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(I,M){var G=y.default.query(I,y.default.Scope.BLOCK_ATTRIBUTE);G!=null&&this.attributes.attribute(G,M)}},{key:"formatAt",value:function(I,M,G,W){this.format(G,W)}},{key:"insertAt",value:function(I,M,G){if(typeof M=="string"&&M.endsWith(`
|
|
115
|
-
`)){var W=y.default.create(F.blotName);this.parent.insertBefore(W,I===0?this:this.next),W.insertAt(0,M.slice(0,-1))}else o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,I,M,G)}}]),L}(y.default.Embed);T.scope=y.default.Scope.BLOCK_BLOT;var F=function(A){j(L,A);function L(O){E(this,L);var I=x(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,O));return I.cache={},I}return i(L,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(y.default.Leaf).reduce(function(I,M){return M.length()===0?I:I.insert(M.value(),C(M))},new d.default).insert(`
|
|
116
|
-
`,C(this))),this.cache.delta}},{key:"deleteAt",value:function(I,M){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"deleteAt",this).call(this,I,M),this.cache={}}},{key:"formatAt",value:function(I,M,G,W){M<=0||(y.default.query(G,y.default.Scope.BLOCK)?I+M===this.length()&&this.format(G,W):o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"formatAt",this).call(this,I,Math.min(M,this.length()-I-1),G,W),this.cache={})}},{key:"insertAt",value:function(I,M,G){if(G!=null)return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,I,M,G);if(M.length!==0){var W=M.split(`
|
|
117
|
-
`),Y=W.shift();Y.length>0&&(I<this.length()-1||this.children.tail==null?o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,Math.min(I,this.length()-1),Y):this.children.tail.insertAt(this.children.tail.length(),Y),this.cache={});var te=this;W.reduce(function(V,H){return te=te.split(V,!0),te.insertAt(0,H),H.length},I+Y.length)}}},{key:"insertBefore",value:function(I,M){var G=this.children.head;o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertBefore",this).call(this,I,M),G instanceof _.default&&G.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"length",this).call(this)+N),this.cache.length}},{key:"moveChildren",value:function(I,M){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"moveChildren",this).call(this,I,M),this.cache={}}},{key:"optimize",value:function(I){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,I),this.cache={}}},{key:"path",value:function(I){return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"path",this).call(this,I,!0)}},{key:"removeChild",value:function(I){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"removeChild",this).call(this,I),this.cache={}}},{key:"split",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M&&(I===0||I>=this.length()-N)){var G=this.clone();return I===0?(this.parent.insertBefore(G,this),this):(this.parent.insertBefore(G,this.next),G)}else{var W=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"split",this).call(this,I,M);return this.cache={},W}}}]),L}(y.default.Block);F.blotName="block",F.tagName="P",F.defaultChild="break",F.allowedChildren=[w.default,y.default.Embed,g.default];function C(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(L=(0,c.default)(L,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?L:C(A.parent,L)}n.bubbleFormats=C,n.BlockEmbed=T,n.default=F},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o=function(){function te(V,H){var q=[],D=!0,$=!1,ne=void 0;try{for(var Z=V[Symbol.iterator](),Q;!(D=(Q=Z.next()).done)&&(q.push(Q.value),!(H&&q.length===H));D=!0);}catch(oe){$=!0,ne=oe}finally{try{!D&&Z.return&&Z.return()}finally{if($)throw ne}}return q}return function(V,H){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return te(V,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function te(V,H){for(var q=0;q<H.length;q++){var D=H[q];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(V,D.key,D)}}return function(V,H,q){return H&&te(V.prototype,H),q&&te(V,q),V}}();a(50);var c=a(2),u=C(c),d=a(14),p=C(d),y=a(8),f=C(y),_=a(9),S=C(_),w=a(0),b=C(w),g=a(15),v=C(g),E=a(3),x=C(E),j=a(10),N=C(j),T=a(34),F=C(T);function C(te){return te&&te.__esModule?te:{default:te}}function A(te,V,H){return V in te?Object.defineProperty(te,V,{value:H,enumerable:!0,configurable:!0,writable:!0}):te[V]=H,te}function L(te,V){if(!(te instanceof V))throw new TypeError("Cannot call a class as a function")}var O=(0,N.default)("quill"),I=function(){s(te,null,[{key:"debug",value:function(H){H===!0&&(H="log"),N.default.level(H)}},{key:"find",value:function(H){return H.__quill||b.default.find(H)}},{key:"import",value:function(H){return this.imports[H]==null&&O.error("Cannot import "+H+". Are you sure it was registered?"),this.imports[H]}},{key:"register",value:function(H,q){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof H!="string"){var ne=H.attrName||H.blotName;typeof ne=="string"?this.register("formats/"+ne,H,q):Object.keys(H).forEach(function(Z){D.register(Z,H[Z],q)})}else this.imports[H]!=null&&!$&&O.warn("Overwriting "+H+" with",q),this.imports[H]=q,(H.startsWith("blots/")||H.startsWith("formats/"))&&q.blotName!=="abstract"?b.default.register(q):H.startsWith("modules")&&typeof q.register=="function"&&q.register()}}]);function te(V){var H=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L(this,te),this.options=M(V,q),this.container=this.options.container,this.container==null)return O.error("Invalid Quill container",V);this.options.debug&&te.debug(this.options.debug);var D=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new f.default,this.scroll=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new v.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(f.default.events.EDITOR_CHANGE,function(ne){ne===f.default.events.TEXT_CHANGE&&H.root.classList.toggle("ql-blank",H.editor.isBlank())}),this.emitter.on(f.default.events.SCROLL_UPDATE,function(ne,Z){var Q=H.selection.lastRange,oe=Q&&Q.length===0?Q.index:void 0;G.call(H,function(){return H.editor.update(null,Z,oe)},ne)});var $=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+D+"<p><br></p></div>");this.setContents($),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return s(te,[{key:"addContainer",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof H=="string"){var D=H;H=document.createElement("div"),H.classList.add(D)}return this.container.insertBefore(H,q),H}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(H,q,D){var $=this,ne=W(H,q,D),Z=o(ne,4);return H=Z[0],q=Z[1],D=Z[3],G.call(this,function(){return $.editor.deleteText(H,q)},D,H,-1*q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(H),this.container.classList.toggle("ql-disabled",!H)}},{key:"focus",value:function(){var H=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=H,this.scrollIntoView()}},{key:"format",value:function(H,q){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;return G.call(this,function(){var ne=D.getSelection(!0),Z=new u.default;if(ne==null)return Z;if(b.default.query(H,b.default.Scope.BLOCK))Z=D.editor.formatLine(ne.index,ne.length,A({},H,q));else{if(ne.length===0)return D.selection.format(H,q),Z;Z=D.editor.formatText(ne.index,ne.length,A({},H,q))}return D.setSelection(ne,f.default.sources.SILENT),Z},$)}},{key:"formatLine",value:function(H,q,D,$,ne){var Z=this,Q=void 0,oe=W(H,q,D,$,ne),se=o(oe,4);return H=se[0],q=se[1],Q=se[2],ne=se[3],G.call(this,function(){return Z.editor.formatLine(H,q,Q)},ne,H,0)}},{key:"formatText",value:function(H,q,D,$,ne){var Z=this,Q=void 0,oe=W(H,q,D,$,ne),se=o(oe,4);return H=se[0],q=se[1],Q=se[2],ne=se[3],G.call(this,function(){return Z.editor.formatText(H,q,Q)},ne,H,0)}},{key:"getBounds",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=void 0;typeof H=="number"?D=this.selection.getBounds(H,q):D=this.selection.getBounds(H.index,H.length);var $=this.container.getBoundingClientRect();return{bottom:D.bottom-$.top,height:D.height,left:D.left-$.left,right:D.right-$.left,top:D.top-$.top,width:D.width}}},{key:"getContents",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-H,D=W(H,q),$=o(D,2);return H=$[0],q=$[1],this.editor.getContents(H,q)}},{key:"getFormat",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof H=="number"?this.editor.getFormat(H,q):this.editor.getFormat(H.index,H.length)}},{key:"getIndex",value:function(H){return H.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(H){return this.scroll.leaf(H)}},{key:"getLine",value:function(H){return this.scroll.line(H)}},{key:"getLines",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof H!="number"?this.scroll.lines(H.index,H.length):this.scroll.lines(H,q)}},{key:"getModule",value:function(H){return this.theme.modules[H]}},{key:"getSelection",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return H&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-H,D=W(H,q),$=o(D,2);return H=$[0],q=$[1],this.editor.getText(H,q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(H,q,D){var $=this,ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:te.sources.API;return G.call(this,function(){return $.editor.insertEmbed(H,q,D)},ne,H)}},{key:"insertText",value:function(H,q,D,$,ne){var Z=this,Q=void 0,oe=W(H,0,D,$,ne),se=o(oe,4);return H=se[0],Q=se[2],ne=se[3],G.call(this,function(){return Z.editor.insertText(H,q,Q)},ne,H,q.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(H,q,D){this.clipboard.dangerouslyPasteHTML(H,q,D)}},{key:"removeFormat",value:function(H,q,D){var $=this,ne=W(H,q,D),Z=o(ne,4);return H=Z[0],q=Z[1],D=Z[3],G.call(this,function(){return $.editor.removeFormat(H,q)},D,H)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(H){var q=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return G.call(this,function(){H=new u.default(H);var $=q.getLength(),ne=q.editor.deleteText(0,$),Z=q.editor.applyDelta(H),Q=Z.ops[Z.ops.length-1];Q!=null&&typeof Q.insert=="string"&&Q.insert[Q.insert.length-1]===`
|
|
118
|
-
`&&(q.editor.deleteText(q.getLength()-1,1),Z.delete(1));var oe=ne.compose(Z);return oe},D)}},{key:"setSelection",value:function(H,q,D){if(H==null)this.selection.setRange(null,q||te.sources.API);else{var $=W(H,q,D),ne=o($,4);H=ne[0],q=ne[1],D=ne[3],this.selection.setRange(new g.Range(H,q),D),D!==f.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API,D=new u.default().insert(H);return this.setContents(D,q)}},{key:"update",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,q=this.scroll.update(H);return this.selection.update(H),q}},{key:"updateContents",value:function(H){var q=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return G.call(this,function(){return H=new u.default(H),q.editor.applyDelta(H,D)},D,!0)}}]),te}();I.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},I.events=f.default.events,I.sources=f.default.sources,I.version="1.3.7",I.imports={delta:u.default,parchment:b.default,"core/module":S.default,"core/theme":F.default};function M(te,V){if(V=(0,x.default)(!0,{container:te,modules:{clipboard:!0,keyboard:!0,history:!0}},V),!V.theme||V.theme===I.DEFAULTS.theme)V.theme=F.default;else if(V.theme=I.import("themes/"+V.theme),V.theme==null)throw new Error("Invalid theme "+V.theme+". Did you register it?");var H=(0,x.default)(!0,{},V.theme.DEFAULTS);[H,V].forEach(function($){$.modules=$.modules||{},Object.keys($.modules).forEach(function(ne){$.modules[ne]===!0&&($.modules[ne]={})})});var q=Object.keys(H.modules).concat(Object.keys(V.modules)),D=q.reduce(function($,ne){var Z=I.import("modules/"+ne);return Z==null?O.error("Cannot load "+ne+" module. Are you sure you registered it?"):$[ne]=Z.DEFAULTS||{},$},{});return V.modules!=null&&V.modules.toolbar&&V.modules.toolbar.constructor!==Object&&(V.modules.toolbar={container:V.modules.toolbar}),V=(0,x.default)(!0,{},I.DEFAULTS,{modules:D},H,V),["bounds","container","scrollingContainer"].forEach(function($){typeof V[$]=="string"&&(V[$]=document.querySelector(V[$]))}),V.modules=Object.keys(V.modules).reduce(function($,ne){return V.modules[ne]&&($[ne]=V.modules[ne]),$},{}),V}function G(te,V,H,q){if(this.options.strict&&!this.isEnabled()&&V===f.default.sources.USER)return new u.default;var D=H==null?null:this.getSelection(),$=this.editor.delta,ne=te();if(D!=null&&(H===!0&&(H=D.index),q==null?D=Y(D,ne,V):q!==0&&(D=Y(D,H,q,V)),this.setSelection(D,f.default.sources.SILENT)),ne.length()>0){var Z,Q=[f.default.events.TEXT_CHANGE,ne,$,V];if((Z=this.emitter).emit.apply(Z,[f.default.events.EDITOR_CHANGE].concat(Q)),V!==f.default.sources.SILENT){var oe;(oe=this.emitter).emit.apply(oe,Q)}}return ne}function W(te,V,H,q,D){var $={};return typeof te.index=="number"&&typeof te.length=="number"?typeof V!="number"?(D=q,q=H,H=V,V=te.length,te=te.index):(V=te.length,te=te.index):typeof V!="number"&&(D=q,q=H,H=V,V=0),(typeof H>"u"?"undefined":i(H))==="object"?($=H,D=q):typeof H=="string"&&(q!=null?$[H]=q:D=H),D=D||f.default.sources.API,[te,V,$,D]}function Y(te,V,H,q){if(te==null)return null;var D=void 0,$=void 0;if(V instanceof u.default){var ne=[te.index,te.index+te.length].map(function(se){return V.transformPosition(se,q!==f.default.sources.USER)}),Z=o(ne,2);D=Z[0],$=Z[1]}else{var Q=[te.index,te.index+te.length].map(function(se){return se<V||se===V&&q===f.default.sources.USER?se:H>=0?se+H:Math.max(V,se+H)}),oe=o(Q,2);D=oe[0],$=oe[1]}return new g.Range(D,$-D)}n.expandConfig=M,n.overload=W,n.default=I},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function w(b,g){for(var v=0;v<g.length;v++){var E=g[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,g,v){return g&&w(b.prototype,g),v&&w(b,v),b}}(),o=function w(b,g,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,g);if(E===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:w(x,g,v)}else{if("value"in E)return E.value;var j=E.get;return j===void 0?void 0:j.call(v)}},s=a(7),c=p(s),u=a(0),d=p(u);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function f(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return y(this,b),f(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,[{key:"formatAt",value:function(v,E,x,j){if(b.compare(this.statics.blotName,x)<0&&d.default.query(x,d.default.Scope.BLOT)){var N=this.isolate(v,E);j&&N.wrap(x,j)}else o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,v,E,x,j)}},{key:"optimize",value:function(v){if(o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,v),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var E=this.parent.isolate(this.offset(),this.length());this.moveChildren(E),E.wrap(this)}}}],[{key:"compare",value:function(v,E){var x=b.order.indexOf(v),j=b.order.indexOf(E);return x>=0||j>=0?x-j:v===E?0:v<E?-1:1}}]),b}(d.default.Inline);S.allowedChildren=[S,d.default.Embed,c.default],S.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}function c(y,f){if(!(y instanceof f))throw new TypeError("Cannot call a class as a function")}function u(y,f){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:y}function d(y,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);y.prototype=Object.create(f&&f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(y,f):y.__proto__=f)}var p=function(y){d(f,y);function f(){return c(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default.Text);n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function g(v,E){for(var x=0;x<E.length;x++){var j=E[x];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(v,j.key,j)}}return function(v,E,x){return E&&g(v.prototype,E),x&&g(v,x),v}}(),o=function g(v,E,x){v===null&&(v=Function.prototype);var j=Object.getOwnPropertyDescriptor(v,E);if(j===void 0){var N=Object.getPrototypeOf(v);return N===null?void 0:g(N,E,x)}else{if("value"in j)return j.value;var T=j.get;return T===void 0?void 0:T.call(x)}},s=a(54),c=p(s),u=a(10),d=p(u);function p(g){return g&&g.__esModule?g:{default:g}}function y(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function f(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function _(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var S=(0,d.default)("quill:events"),w=["selectionchange","mousedown","mouseup","click"];w.forEach(function(g){document.addEventListener(g,function(){for(var v=arguments.length,E=Array(v),x=0;x<v;x++)E[x]=arguments[x];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(j){if(j.__quill&&j.__quill.emitter){var N;(N=j.__quill.emitter).handleDOM.apply(N,E)}})})});var b=function(g){_(v,g);function v(){y(this,v);var E=f(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return E.listeners={},E.on("error",S.error),E}return i(v,[{key:"emit",value:function(){S.log.apply(S,arguments),o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(x){for(var j=arguments.length,N=Array(j>1?j-1:0),T=1;T<j;T++)N[T-1]=arguments[T];(this.listeners[x.type]||[]).forEach(function(F){var C=F.node,A=F.handler;(x.target===C||C.contains(x.target))&&A.apply(void 0,[x].concat(N))})}},{key:"listenDOM",value:function(x,j,N){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push({node:j,handler:N})}}]),v}(c.default);b.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},n.default=b},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});function i(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function s(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,s),this.quill=c,this.options=u};o.DEFAULTS={},n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function s(u){if(i.indexOf(u)<=i.indexOf(o)){for(var d,p=arguments.length,y=Array(p>1?p-1:0),f=1;f<p;f++)y[f-1]=arguments[f];(d=console)[u].apply(d,y)}}function c(u){return i.reduce(function(d,p){return d[p]=s.bind(console,p,u),d},{})}s.level=c.level=function(u){o=u},n.default=c},function(t,n,a){var i=Array.prototype.slice,o=a(52),s=a(53),c=t.exports=function(y,f,_){return _||(_={}),y===f?!0:y instanceof Date&&f instanceof Date?y.getTime()===f.getTime():!y||!f||typeof y!="object"&&typeof f!="object"?_.strict?y===f:y==f:p(y,f,_)};function u(y){return y==null}function d(y){return!(!y||typeof y!="object"||typeof y.length!="number"||typeof y.copy!="function"||typeof y.slice!="function"||y.length>0&&typeof y[0]!="number")}function p(y,f,_){var S,w;if(u(y)||u(f)||y.prototype!==f.prototype)return!1;if(s(y))return s(f)?(y=i.call(y),f=i.call(f),c(y,f,_)):!1;if(d(y)){if(!d(f)||y.length!==f.length)return!1;for(S=0;S<y.length;S++)if(y[S]!==f[S])return!1;return!0}try{var b=o(y),g=o(f)}catch{return!1}if(b.length!=g.length)return!1;for(b.sort(),g.sort(),S=b.length-1;S>=0;S--)if(b[S]!=g[S])return!1;for(S=b.length-1;S>=0;S--)if(w=b[S],!c(y[w],f[w],_))return!1;return typeof y==typeof f}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(1),o=function(){function s(c,u,d){d===void 0&&(d={}),this.attrName=c,this.keyName=u;var p=i.Scope.TYPE&i.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&i.Scope.LEVEL|p:this.scope=i.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return s.keys=function(c){return[].map.call(c.attributes,function(u){return u.name})},s.prototype.add=function(c,u){return this.canAdd(c,u)?(c.setAttribute(this.keyName,u),!0):!1},s.prototype.canAdd=function(c,u){var d=i.query(c,i.Scope.BLOT&(this.scope|i.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},s.prototype.remove=function(c){c.removeAttribute(this.keyName)},s.prototype.value=function(c){var u=c.getAttribute(this.keyName);return this.canAdd(c,u)&&u?u:""},s}();n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var i=function(){function T(F,C){var A=[],L=!0,O=!1,I=void 0;try{for(var M=F[Symbol.iterator](),G;!(L=(G=M.next()).done)&&(A.push(G.value),!(C&&A.length===C));L=!0);}catch(W){O=!0,I=W}finally{try{!L&&M.return&&M.return()}finally{if(O)throw I}}return A}return function(F,C){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return T(F,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(F,C){for(var A=0;A<C.length;A++){var L=C[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(F,L.key,L)}}return function(F,C,A){return C&&T(F.prototype,C),A&&T(F,A),F}}(),s=function T(F,C,A){F===null&&(F=Function.prototype);var L=Object.getOwnPropertyDescriptor(F,C);if(L===void 0){var O=Object.getPrototypeOf(F);return O===null?void 0:T(O,C,A)}else{if("value"in L)return L.value;var I=L.get;return I===void 0?void 0:I.call(A)}},c=a(2),u=g(c),d=a(0),p=g(d),y=a(4),f=g(y),_=a(6),S=g(_),w=a(7),b=g(w);function g(T){return T&&T.__esModule?T:{default:T}}function v(T,F){if(!(T instanceof F))throw new TypeError("Cannot call a class as a function")}function E(T,F){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:T}function x(T,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);T.prototype=Object.create(F&&F.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(T,F):T.__proto__=F)}var j=function(T){x(F,T);function F(){return v(this,F),E(this,(F.__proto__||Object.getPrototypeOf(F)).apply(this,arguments))}return F}(S.default);j.blotName="code",j.tagName="CODE";var N=function(T){x(F,T);function F(){return v(this,F),E(this,(F.__proto__||Object.getPrototypeOf(F)).apply(this,arguments))}return o(F,[{key:"delta",value:function(){var A=this,L=this.domNode.textContent;return L.endsWith(`
|
|
119
|
-
`)&&(L=L.slice(0,-1)),L.split(`
|
|
120
|
-
`).reduce(function(O,I){return O.insert(I).insert(`
|
|
121
|
-
`,A.formats())},new u.default)}},{key:"format",value:function(A,L){if(!(A===this.statics.blotName&&L)){var O=this.descendant(b.default,this.length()-1),I=i(O,1),M=I[0];M!=null&&M.deleteAt(M.length()-1,1),s(F.prototype.__proto__||Object.getPrototypeOf(F.prototype),"format",this).call(this,A,L)}}},{key:"formatAt",value:function(A,L,O,I){if(L!==0&&!(p.default.query(O,p.default.Scope.BLOCK)==null||O===this.statics.blotName&&I===this.statics.formats(this.domNode))){var M=this.newlineIndex(A);if(!(M<0||M>=A+L)){var G=this.newlineIndex(A,!0)+1,W=M-G+1,Y=this.isolate(G,W),te=Y.next;Y.format(O,I),te instanceof F&&te.formatAt(0,A-G+L-W,O,I)}}}},{key:"insertAt",value:function(A,L,O){if(O==null){var I=this.descendant(b.default,A),M=i(I,2),G=M[0],W=M[1];G.insertAt(W,L)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?A:A+1}},{key:"newlineIndex",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(L)return this.domNode.textContent.slice(0,A).lastIndexOf(`
|
|
123
|
-
`);var O=this.domNode.textContent.slice(A).indexOf(`
|
|
124
|
-
`);return O>-1?A+O:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(p.default.create("text",`
|
|
126
|
-
`)),s(F.prototype.__proto__||Object.getPrototypeOf(F.prototype),"optimize",this).call(this,A);var L=this.next;L!=null&&L.prev===this&&L.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===L.statics.formats(L.domNode)&&(L.optimize(A),L.moveChildren(this),L.remove())}},{key:"replace",value:function(A){s(F.prototype.__proto__||Object.getPrototypeOf(F.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(L){var O=p.default.find(L);O==null?L.parentNode.removeChild(L):O instanceof p.default.Embed?O.remove():O.unwrap()})}}],[{key:"create",value:function(A){var L=s(F.__proto__||Object.getPrototypeOf(F),"create",this).call(this,A);return L.setAttribute("spellcheck",!1),L}},{key:"formats",value:function(){return!0}}]),F}(f.default);N.blotName="code-block",N.tagName="PRE",N.TAB=" ",n.Code=j,n.default=N},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o=function(){function te(V,H){var q=[],D=!0,$=!1,ne=void 0;try{for(var Z=V[Symbol.iterator](),Q;!(D=(Q=Z.next()).done)&&(q.push(Q.value),!(H&&q.length===H));D=!0);}catch(oe){$=!0,ne=oe}finally{try{!D&&Z.return&&Z.return()}finally{if($)throw ne}}return q}return function(V,H){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return te(V,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function te(V,H){for(var q=0;q<H.length;q++){var D=H[q];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(V,D.key,D)}}return function(V,H,q){return H&&te(V.prototype,H),q&&te(V,q),V}}(),c=a(2),u=L(c),d=a(20),p=L(d),y=a(0),f=L(y),_=a(13),S=L(_),w=a(24),b=L(w),g=a(4),v=L(g),E=a(16),x=L(E),j=a(21),N=L(j),T=a(11),F=L(T),C=a(3),A=L(C);function L(te){return te&&te.__esModule?te:{default:te}}function O(te,V,H){return V in te?Object.defineProperty(te,V,{value:H,enumerable:!0,configurable:!0,writable:!0}):te[V]=H,te}function I(te,V){if(!(te instanceof V))throw new TypeError("Cannot call a class as a function")}var M=/^[ -~]*$/,G=function(){function te(V){I(this,te),this.scroll=V,this.delta=this.getDelta()}return s(te,[{key:"applyDelta",value:function(H){var q=this,D=!1;this.scroll.update();var $=this.scroll.length();return this.scroll.batchStart(),H=Y(H),H.reduce(function(ne,Z){var Q=Z.retain||Z.delete||Z.insert.length||1,oe=Z.attributes||{};if(Z.insert!=null){if(typeof Z.insert=="string"){var se=Z.insert;se.endsWith(`
|
|
127
|
-
`)&&D&&(D=!1,se=se.slice(0,-1)),ne>=$&&!se.endsWith(`
|
|
128
|
-
`)&&(D=!0),q.scroll.insertAt(ne,se);var ue=q.scroll.line(ne),ve=o(ue,2),Pe=ve[0],ke=ve[1],Ne=(0,A.default)({},(0,g.bubbleFormats)(Pe));if(Pe instanceof v.default){var xe=Pe.descendant(f.default.Leaf,ke),ye=o(xe,1),Ie=ye[0];Ne=(0,A.default)(Ne,(0,g.bubbleFormats)(Ie))}oe=p.default.attributes.diff(Ne,oe)||{}}else if(i(Z.insert)==="object"){var me=Object.keys(Z.insert)[0];if(me==null)return ne;q.scroll.insertAt(ne,me,Z.insert[me])}$+=Q}return Object.keys(oe).forEach(function(_e){q.scroll.formatAt(ne,Q,_e,oe[_e])}),ne+Q},0),H.reduce(function(ne,Z){return typeof Z.delete=="number"?(q.scroll.deleteAt(ne,Z.delete),ne):ne+(Z.retain||Z.insert.length||1)},0),this.scroll.batchEnd(),this.update(H)}},{key:"deleteText",value:function(H,q){return this.scroll.deleteAt(H,q),this.update(new u.default().retain(H).delete(q))}},{key:"formatLine",value:function(H,q){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys($).forEach(function(ne){if(!(D.scroll.whitelist!=null&&!D.scroll.whitelist[ne])){var Z=D.scroll.lines(H,Math.max(q,1)),Q=q;Z.forEach(function(oe){var se=oe.length();if(!(oe instanceof S.default))oe.format(ne,$[ne]);else{var ue=H-oe.offset(D.scroll),ve=oe.newlineIndex(ue+Q)-ue+1;oe.formatAt(ue,ve,ne,$[ne])}Q-=se})}}),this.scroll.optimize(),this.update(new u.default().retain(H).retain(q,(0,N.default)($)))}},{key:"formatText",value:function(H,q){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys($).forEach(function(ne){D.scroll.formatAt(H,q,ne,$[ne])}),this.update(new u.default().retain(H).retain(q,(0,N.default)($)))}},{key:"getContents",value:function(H,q){return this.delta.slice(H,H+q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(H,q){return H.concat(q.delta())},new u.default)}},{key:"getFormat",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=[],$=[];q===0?this.scroll.path(H).forEach(function(Z){var Q=o(Z,1),oe=Q[0];oe instanceof v.default?D.push(oe):oe instanceof f.default.Leaf&&$.push(oe)}):(D=this.scroll.lines(H,q),$=this.scroll.descendants(f.default.Leaf,H,q));var ne=[D,$].map(function(Z){if(Z.length===0)return{};for(var Q=(0,g.bubbleFormats)(Z.shift());Object.keys(Q).length>0;){var oe=Z.shift();if(oe==null)return Q;Q=W((0,g.bubbleFormats)(oe),Q)}return Q});return A.default.apply(A.default,ne)}},{key:"getText",value:function(H,q){return this.getContents(H,q).filter(function(D){return typeof D.insert=="string"}).map(function(D){return D.insert}).join("")}},{key:"insertEmbed",value:function(H,q,D){return this.scroll.insertAt(H,q,D),this.update(new u.default().retain(H).insert(O({},q,D)))}},{key:"insertText",value:function(H,q){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return q=q.replace(/\r\n/g,`
|
|
129
|
-
`).replace(/\r/g,`
|
|
130
|
-
`),this.scroll.insertAt(H,q),Object.keys($).forEach(function(ne){D.scroll.formatAt(H,q.length,ne,$[ne])}),this.update(new u.default().retain(H).insert(q,(0,N.default)($)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var H=this.scroll.children.head;return H.statics.blotName!==v.default.blotName||H.children.length>1?!1:H.children.head instanceof x.default}},{key:"removeFormat",value:function(H,q){var D=this.getText(H,q),$=this.scroll.line(H+q),ne=o($,2),Z=ne[0],Q=ne[1],oe=0,se=new u.default;Z!=null&&(Z instanceof S.default?oe=Z.newlineIndex(Q)-Q+1:oe=Z.length()-Q,se=Z.delta().slice(Q,Q+oe-1).insert(`
|
|
131
|
-
`));var ue=this.getContents(H,q+oe),ve=ue.diff(new u.default().insert(D).concat(se)),Pe=new u.default().retain(H).concat(ve);return this.applyDelta(Pe)}},{key:"update",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,$=this.delta;if(q.length===1&&q[0].type==="characterData"&&q[0].target.data.match(M)&&f.default.find(q[0].target)){var ne=f.default.find(q[0].target),Z=(0,g.bubbleFormats)(ne),Q=ne.offset(this.scroll),oe=q[0].oldValue.replace(b.default.CONTENTS,""),se=new u.default().insert(oe),ue=new u.default().insert(ne.value()),ve=new u.default().retain(Q).concat(se.diff(ue,D));H=ve.reduce(function(Pe,ke){return ke.insert?Pe.insert(ke.insert,Z):Pe.push(ke)},new u.default),this.delta=$.compose(H)}else this.delta=this.getDelta(),(!H||!(0,F.default)($.compose(H),this.delta))&&(H=$.diff(this.delta,D));return H}}]),te}();function W(te,V){return Object.keys(V).reduce(function(H,q){return te[q]==null||(V[q]===te[q]?H[q]=V[q]:Array.isArray(V[q])?V[q].indexOf(te[q])<0&&(H[q]=V[q].concat([te[q]])):H[q]=[V[q],te[q]]),H},{})}function Y(te){return te.reduce(function(V,H){if(H.insert===1){var q=(0,N.default)(H.attributes);return delete q.image,V.insert({image:H.attributes.image},q)}if(H.attributes!=null&&(H.attributes.list===!0||H.attributes.bullet===!0)&&(H=(0,N.default)(H),H.attributes.list?H.attributes.list="ordered":(H.attributes.list="bullet",delete H.attributes.bullet)),typeof H.insert=="string"){var D=H.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return V.insert(D,H.attributes)}return V.push(H)},new u.default)}n.default=G},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var i=function(){function T(F,C){var A=[],L=!0,O=!1,I=void 0;try{for(var M=F[Symbol.iterator](),G;!(L=(G=M.next()).done)&&(A.push(G.value),!(C&&A.length===C));L=!0);}catch(W){O=!0,I=W}finally{try{!L&&M.return&&M.return()}finally{if(O)throw I}}return A}return function(F,C){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return T(F,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(F,C){for(var A=0;A<C.length;A++){var L=C[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(F,L.key,L)}}return function(F,C,A){return C&&T(F.prototype,C),A&&T(F,A),F}}(),s=a(0),c=b(s),u=a(21),d=b(u),p=a(11),y=b(p),f=a(8),_=b(f),S=a(10),w=b(S);function b(T){return T&&T.__esModule?T:{default:T}}function g(T){if(Array.isArray(T)){for(var F=0,C=Array(T.length);F<T.length;F++)C[F]=T[F];return C}else return Array.from(T)}function v(T,F){if(!(T instanceof F))throw new TypeError("Cannot call a class as a function")}var E=(0,w.default)("quill:selection"),x=function T(F){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;v(this,T),this.index=F,this.length=C},j=function(){function T(F,C){var A=this;v(this,T),this.emitter=C,this.scroll=F,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new x(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,_.default.sources.USER),1)}),this.emitter.on(_.default.events.EDITOR_CHANGE,function(L,O){L===_.default.events.TEXT_CHANGE&&O.length()>0&&A.update(_.default.sources.SILENT)}),this.emitter.on(_.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var L=A.getNativeRange();L!=null&&L.start.node!==A.cursor.textNode&&A.emitter.once(_.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(L.start.node,L.start.offset,L.end.node,L.end.offset)}catch{}})}}),this.emitter.on(_.default.events.SCROLL_OPTIMIZE,function(L,O){if(O.range){var I=O.range,M=I.startNode,G=I.startOffset,W=I.endNode,Y=I.endOffset;A.setNativeRange(M,G,W,Y)}}),this.update(_.default.sources.SILENT)}return o(T,[{key:"handleComposition",value:function(){var C=this;this.root.addEventListener("compositionstart",function(){C.composing=!0}),this.root.addEventListener("compositionend",function(){if(C.composing=!1,C.cursor.parent){var A=C.cursor.restore();if(!A)return;setTimeout(function(){C.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var C=this;this.emitter.listenDOM("mousedown",document.body,function(){C.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){C.mouseDown=!1,C.update(_.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(C,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[C])){this.scroll.update();var L=this.getNativeRange();if(!(L==null||!L.native.collapsed||c.default.query(C,c.default.Scope.BLOCK))){if(L.start.node!==this.cursor.textNode){var O=c.default.find(L.start.node,!1);if(O==null)return;if(O instanceof c.default.Leaf){var I=O.split(L.start.offset);O.parent.insertBefore(this.cursor,I)}else O.insertBefore(this.cursor,L.start.node);this.cursor.attach()}this.cursor.format(C,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(C){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=this.scroll.length();C=Math.min(C,L-1),A=Math.min(C+A,L-1)-C;var O=void 0,I=this.scroll.leaf(C),M=i(I,2),G=M[0],W=M[1];if(G==null)return null;var Y=G.position(W,!0),te=i(Y,2);O=te[0],W=te[1];var V=document.createRange();if(A>0){V.setStart(O,W);var H=this.scroll.leaf(C+A),q=i(H,2);if(G=q[0],W=q[1],G==null)return null;var D=G.position(W,!0),$=i(D,2);return O=$[0],W=$[1],V.setEnd(O,W),V.getBoundingClientRect()}else{var ne="left",Z=void 0;return O instanceof Text?(W<O.data.length?(V.setStart(O,W),V.setEnd(O,W+1)):(V.setStart(O,W-1),V.setEnd(O,W),ne="right"),Z=V.getBoundingClientRect()):(Z=G.domNode.getBoundingClientRect(),W>0&&(ne="right")),{bottom:Z.top+Z.height,height:Z.height,left:Z[ne],right:Z[ne],top:Z.top,width:0}}}},{key:"getNativeRange",value:function(){var C=document.getSelection();if(C==null||C.rangeCount<=0)return null;var A=C.getRangeAt(0);if(A==null)return null;var L=this.normalizeNative(A);return E.info("getNativeRange",L),L}},{key:"getRange",value:function(){var C=this.getNativeRange();if(C==null)return[null,null];var A=this.normalizedToRange(C);return[A,C]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(C){var A=this,L=[[C.start.node,C.start.offset]];C.native.collapsed||L.push([C.end.node,C.end.offset]);var O=L.map(function(G){var W=i(G,2),Y=W[0],te=W[1],V=c.default.find(Y,!0),H=V.offset(A.scroll);return te===0?H:V instanceof c.default.Container?H+V.length():H+V.index(Y,te)}),I=Math.min(Math.max.apply(Math,g(O)),this.scroll.length()-1),M=Math.min.apply(Math,[I].concat(g(O)));return new x(M,I-M)}},{key:"normalizeNative",value:function(C){if(!N(this.root,C.startContainer)||!C.collapsed&&!N(this.root,C.endContainer))return null;var A={start:{node:C.startContainer,offset:C.startOffset},end:{node:C.endContainer,offset:C.endOffset},native:C};return[A.start,A.end].forEach(function(L){for(var O=L.node,I=L.offset;!(O instanceof Text)&&O.childNodes.length>0;)if(O.childNodes.length>I)O=O.childNodes[I],I=0;else if(O.childNodes.length===I)O=O.lastChild,I=O instanceof Text?O.data.length:O.childNodes.length+1;else break;L.node=O,L.offset=I}),A}},{key:"rangeToNative",value:function(C){var A=this,L=C.collapsed?[C.index]:[C.index,C.index+C.length],O=[],I=this.scroll.length();return L.forEach(function(M,G){M=Math.min(I-1,M);var W=void 0,Y=A.scroll.leaf(M),te=i(Y,2),V=te[0],H=te[1],q=V.position(H,G!==0),D=i(q,2);W=D[0],H=D[1],O.push(W,H)}),O.length<2&&(O=O.concat(O)),O}},{key:"scrollIntoView",value:function(C){var A=this.lastRange;if(A!=null){var L=this.getBounds(A.index,A.length);if(L!=null){var O=this.scroll.length()-1,I=this.scroll.line(Math.min(A.index,O)),M=i(I,1),G=M[0],W=G;if(A.length>0){var Y=this.scroll.line(Math.min(A.index+A.length,O)),te=i(Y,1);W=te[0]}if(!(G==null||W==null)){var V=C.getBoundingClientRect();L.top<V.top?C.scrollTop-=V.top-L.top:L.bottom>V.bottom&&(C.scrollTop+=L.bottom-V.bottom)}}}}},{key:"setNativeRange",value:function(C,A){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C,O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(E.info("setNativeRange",C,A,L,O),!(C!=null&&(this.root.parentNode==null||C.parentNode==null||L.parentNode==null))){var M=document.getSelection();if(M!=null)if(C!=null){this.hasFocus()||this.root.focus();var G=(this.getNativeRange()||{}).native;if(G==null||I||C!==G.startContainer||A!==G.startOffset||L!==G.endContainer||O!==G.endOffset){C.tagName=="BR"&&(A=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode),L.tagName=="BR"&&(O=[].indexOf.call(L.parentNode.childNodes,L),L=L.parentNode);var W=document.createRange();W.setStart(C,A),W.setEnd(L,O),M.removeAllRanges(),M.addRange(W)}}else M.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(C){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof A=="string"&&(L=A,A=!1),E.info("setRange",C),C!=null){var O=this.rangeToNative(C);this.setNativeRange.apply(this,g(O).concat([A]))}else this.setNativeRange(null);this.update(L)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_.default.sources.USER,A=this.lastRange,L=this.getRange(),O=i(L,2),I=O[0],M=O[1];if(this.lastRange=I,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,y.default)(A,this.lastRange)){var G;!this.composing&&M!=null&&M.native.collapsed&&M.start.node!==this.cursor.textNode&&this.cursor.restore();var W=[_.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(A),C];if((G=this.emitter).emit.apply(G,[_.default.events.EDITOR_CHANGE].concat(W)),C!==_.default.sources.SILENT){var Y;(Y=this.emitter).emit.apply(Y,W)}}}}]),T}();function N(T,F){try{F.parentNode}catch{return!1}return F instanceof Text&&(F=F.parentNode),T.contains(F)}n.Range=x,n.default=j},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(S,w){for(var b=0;b<w.length;b++){var g=w[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(S,g.key,g)}}return function(S,w,b){return w&&_(S.prototype,w),b&&_(S,b),S}}(),o=function _(S,w,b){S===null&&(S=Function.prototype);var g=Object.getOwnPropertyDescriptor(S,w);if(g===void 0){var v=Object.getPrototypeOf(S);return v===null?void 0:_(v,w,b)}else{if("value"in g)return g.value;var E=g.get;return E===void 0?void 0:E.call(b)}},s=a(0),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(){return d(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,[{key:"insertInto",value:function(b,g){b.children.length===0?o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertInto",this).call(this,b,g):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),S}(c.default.Embed);f.blotName="break",f.tagName="BR",n.default=f},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,f){y.__proto__=f}||function(y,f){for(var _ in f)f.hasOwnProperty(_)&&(y[_]=f[_])};return function(y,f){p(y,f);function _(){this.constructor=y}y.prototype=f===null?Object.create(f):(_.prototype=f.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(44),s=a(30),c=a(1),u=function(p){i(y,p);function y(f){var _=p.call(this,f)||this;return _.build(),_}return y.prototype.appendChild=function(f){this.insertBefore(f)},y.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(f){f.attach()})},y.prototype.build=function(){var f=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(_){try{var S=d(_);f.insertBefore(S,f.children.head||void 0)}catch(w){if(w instanceof c.ParchmentError)return;throw w}})},y.prototype.deleteAt=function(f,_){if(f===0&&_===this.length())return this.remove();this.children.forEachAt(f,_,function(S,w,b){S.deleteAt(w,b)})},y.prototype.descendant=function(f,_){var S=this.children.find(_),w=S[0],b=S[1];return f.blotName==null&&f(w)||f.blotName!=null&&w instanceof f?[w,b]:w instanceof y?w.descendant(f,b):[null,-1]},y.prototype.descendants=function(f,_,S){_===void 0&&(_=0),S===void 0&&(S=Number.MAX_VALUE);var w=[],b=S;return this.children.forEachAt(_,S,function(g,v,E){(f.blotName==null&&f(g)||f.blotName!=null&&g instanceof f)&&w.push(g),g instanceof y&&(w=w.concat(g.descendants(f,v,b))),b-=E}),w},y.prototype.detach=function(){this.children.forEach(function(f){f.detach()}),p.prototype.detach.call(this)},y.prototype.formatAt=function(f,_,S,w){this.children.forEachAt(f,_,function(b,g,v){b.formatAt(g,v,S,w)})},y.prototype.insertAt=function(f,_,S){var w=this.children.find(f),b=w[0],g=w[1];if(b)b.insertAt(g,_,S);else{var v=S==null?c.create("text",_):c.create(_,S);this.appendChild(v)}},y.prototype.insertBefore=function(f,_){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(S){return f instanceof S}))throw new c.ParchmentError("Cannot insert "+f.statics.blotName+" into "+this.statics.blotName);f.insertInto(this,_)},y.prototype.length=function(){return this.children.reduce(function(f,_){return f+_.length()},0)},y.prototype.moveChildren=function(f,_){this.children.forEach(function(S){f.insertBefore(S,_)})},y.prototype.optimize=function(f){if(p.prototype.optimize.call(this,f),this.children.length===0)if(this.statics.defaultChild!=null){var _=c.create(this.statics.defaultChild);this.appendChild(_),_.optimize(f)}else this.remove()},y.prototype.path=function(f,_){_===void 0&&(_=!1);var S=this.children.find(f,_),w=S[0],b=S[1],g=[[this,f]];return w instanceof y?g.concat(w.path(b,_)):(w!=null&&g.push([w,b]),g)},y.prototype.removeChild=function(f){this.children.remove(f)},y.prototype.replace=function(f){f instanceof y&&f.moveChildren(this),p.prototype.replace.call(this,f)},y.prototype.split=function(f,_){if(_===void 0&&(_=!1),!_){if(f===0)return this;if(f===this.length())return this.next}var S=this.clone();return this.parent.insertBefore(S,this.next),this.children.forEachAt(f,this.length(),function(w,b,g){w=w.split(b,_),S.appendChild(w)}),S},y.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},y.prototype.update=function(f,_){var S=this,w=[],b=[];f.forEach(function(g){g.target===S.domNode&&g.type==="childList"&&(w.push.apply(w,g.addedNodes),b.push.apply(b,g.removedNodes))}),b.forEach(function(g){if(!(g.parentNode!=null&&g.tagName!=="IFRAME"&&document.body.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var v=c.find(g);v!=null&&(v.domNode.parentNode==null||v.domNode.parentNode===S.domNode)&&v.detach()}}),w.filter(function(g){return g.parentNode==S.domNode}).sort(function(g,v){return g===v?0:g.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(g){var v=null;g.nextSibling!=null&&(v=c.find(g.nextSibling));var E=d(g);(E.next!=v||E.next==null)&&(E.parent!=null&&E.parent.removeChild(S),S.insertBefore(E,v||void 0))})},y}(s.default);function d(p){var y=c.find(p);if(y==null)try{y=c.create(p)}catch{y=c.create(c.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(_){y.domNode.appendChild(_)}),p.parentNode&&p.parentNode.replaceChild(y.domNode,p),y.attach()}return y}n.default=u},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,f){y.__proto__=f}||function(y,f){for(var _ in f)f.hasOwnProperty(_)&&(y[_]=f[_])};return function(y,f){p(y,f);function _(){this.constructor=y}y.prototype=f===null?Object.create(f):(_.prototype=f.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12),s=a(31),c=a(17),u=a(1),d=function(p){i(y,p);function y(f){var _=p.call(this,f)||this;return _.attributes=new s.default(_.domNode),_}return y.formats=function(f){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return f.tagName.toLowerCase()},y.prototype.format=function(f,_){var S=u.query(f);S instanceof o.default?this.attributes.attribute(S,_):_&&S!=null&&(f!==this.statics.blotName||this.formats()[f]!==_)&&this.replaceWith(f,_)},y.prototype.formats=function(){var f=this.attributes.values(),_=this.statics.formats(this.domNode);return _!=null&&(f[this.statics.blotName]=_),f},y.prototype.replaceWith=function(f,_){var S=p.prototype.replaceWith.call(this,f,_);return this.attributes.copy(S),S},y.prototype.update=function(f,_){var S=this;p.prototype.update.call(this,f,_),f.some(function(w){return w.target===S.domNode&&w.type==="attributes"})&&this.attributes.build()},y.prototype.wrap=function(f,_){var S=p.prototype.wrap.call(this,f,_);return S instanceof y&&S.statics.scope===this.statics.scope&&this.attributes.move(S),S},y}(c.default);n.default=d},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var y in p)p.hasOwnProperty(y)&&(d[y]=p[y])};return function(d,p){u(d,p);function y(){this.constructor=d}d.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(30),s=a(1),c=function(u){i(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.value=function(p){return!0},d.prototype.index=function(p,y){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(y,1):-1},d.prototype.position=function(p,y){var f=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(f+=1),[this.parent.domNode,f]},d.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},d.scope=s.Scope.INLINE_BLOT,d}(o.default);n.default=c},function(t,n,a){var i=a(11),o=a(3),s={attributes:{compose:function(u,d,p){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var y=o(!0,{},d);p||(y=Object.keys(y).reduce(function(_,S){return y[S]!=null&&(_[S]=y[S]),_},{}));for(var f in u)u[f]!==void 0&&d[f]===void 0&&(y[f]=u[f]);return Object.keys(y).length>0?y:void 0},diff:function(u,d){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var p=Object.keys(u).concat(Object.keys(d)).reduce(function(y,f){return i(u[f],d[f])||(y[f]=d[f]===void 0?null:d[f]),y},{});return Object.keys(p).length>0?p:void 0},transform:function(u,d,p){if(typeof u!="object")return d;if(typeof d=="object"){if(!p)return d;var y=Object.keys(d).reduce(function(f,_){return u[_]===void 0&&(f[_]=d[_]),f},{});return Object.keys(y).length>0?y:void 0}}},iterator:function(u){return new c(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function c(u){this.ops=u,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(u){u||(u=1/0);var d=this.ops[this.index];if(d){var p=this.offset,y=s.length(d);if(u>=y-p?(u=y-p,this.index+=1,this.offset=0):this.offset+=u,typeof d.delete=="number")return{delete:u};var f={};return d.attributes&&(f.attributes=d.attributes),typeof d.retain=="number"?f.retain=u:typeof d.insert=="string"?f.insert=d.insert.substr(p,u):f.insert=d.insert,f}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?s.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,d=this.index,p=this.next(),y=this.ops.slice(this.index);return this.offset=u,this.index=d,[p].concat(y)}else return[]},t.exports=s},function(t,n){var a=function(){function i(S,w){return w!=null&&S instanceof w}var o;try{o=Map}catch{o=function(){}}var s;try{s=Set}catch{s=function(){}}var c;try{c=Promise}catch{c=function(){}}function u(S,w,b,g,v){typeof w=="object"&&(b=w.depth,g=w.prototype,v=w.includeNonEnumerable,w=w.circular);var E=[],x=[],j=typeof Buffer<"u";typeof w>"u"&&(w=!0),typeof b>"u"&&(b=1/0);function N(T,F){if(T===null)return null;if(F===0)return T;var C,A;if(typeof T!="object")return T;if(i(T,o))C=new o;else if(i(T,s))C=new s;else if(i(T,c))C=new c(function(V,H){T.then(function(q){V(N(q,F-1))},function(q){H(N(q,F-1))})});else if(u.__isArray(T))C=[];else if(u.__isRegExp(T))C=new RegExp(T.source,_(T)),T.lastIndex&&(C.lastIndex=T.lastIndex);else if(u.__isDate(T))C=new Date(T.getTime());else{if(j&&Buffer.isBuffer(T))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(T.length):C=new Buffer(T.length),T.copy(C),C;i(T,Error)?C=Object.create(T):typeof g>"u"?(A=Object.getPrototypeOf(T),C=Object.create(A)):(C=Object.create(g),A=g)}if(w){var L=E.indexOf(T);if(L!=-1)return x[L];E.push(T),x.push(C)}i(T,o)&&T.forEach(function(V,H){var q=N(H,F-1),D=N(V,F-1);C.set(q,D)}),i(T,s)&&T.forEach(function(V){var H=N(V,F-1);C.add(H)});for(var O in T){var I;A&&(I=Object.getOwnPropertyDescriptor(A,O)),!(I&&I.set==null)&&(C[O]=N(T[O],F-1))}if(Object.getOwnPropertySymbols)for(var M=Object.getOwnPropertySymbols(T),O=0;O<M.length;O++){var G=M[O],W=Object.getOwnPropertyDescriptor(T,G);W&&!W.enumerable&&!v||(C[G]=N(T[G],F-1),W.enumerable||Object.defineProperty(C,G,{enumerable:!1}))}if(v)for(var Y=Object.getOwnPropertyNames(T),O=0;O<Y.length;O++){var te=Y[O],W=Object.getOwnPropertyDescriptor(T,te);W&&W.enumerable||(C[te]=N(T[te],F-1),Object.defineProperty(C,te,{enumerable:!1}))}return C}return N(S,b)}u.clonePrototype=function(w){if(w===null)return null;var b=function(){};return b.prototype=w,new b};function d(S){return Object.prototype.toString.call(S)}u.__objToStr=d;function p(S){return typeof S=="object"&&d(S)==="[object Date]"}u.__isDate=p;function y(S){return typeof S=="object"&&d(S)==="[object Array]"}u.__isArray=y;function f(S){return typeof S=="object"&&d(S)==="[object RegExp]"}u.__isRegExp=f;function _(S){var w="";return S.global&&(w+="g"),S.ignoreCase&&(w+="i"),S.multiline&&(w+="m"),w}return u.__getRegExpFlags=_,u}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function C(A,L){var O=[],I=!0,M=!1,G=void 0;try{for(var W=A[Symbol.iterator](),Y;!(I=(Y=W.next()).done)&&(O.push(Y.value),!(L&&O.length===L));I=!0);}catch(te){M=!0,G=te}finally{try{!I&&W.return&&W.return()}finally{if(M)throw G}}return O}return function(A,L){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return C(A,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function C(A,L){for(var O=0;O<L.length;O++){var I=L[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(A,I.key,I)}}return function(A,L,O){return L&&C(A.prototype,L),O&&C(A,O),A}}(),s=function C(A,L,O){A===null&&(A=Function.prototype);var I=Object.getOwnPropertyDescriptor(A,L);if(I===void 0){var M=Object.getPrototypeOf(A);return M===null?void 0:C(M,L,O)}else{if("value"in I)return I.value;var G=I.get;return G===void 0?void 0:G.call(O)}},c=a(0),u=E(c),d=a(8),p=E(d),y=a(4),f=E(y),_=a(16),S=E(_),w=a(13),b=E(w),g=a(25),v=E(g);function E(C){return C&&C.__esModule?C:{default:C}}function x(C,A){if(!(C instanceof A))throw new TypeError("Cannot call a class as a function")}function j(C,A){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:C}function N(C,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);C.prototype=Object.create(A&&A.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(C,A):C.__proto__=A)}function T(C){return C instanceof f.default||C instanceof y.BlockEmbed}var F=function(C){N(A,C);function A(L,O){x(this,A);var I=j(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L));return I.emitter=O.emitter,Array.isArray(O.whitelist)&&(I.whitelist=O.whitelist.reduce(function(M,G){return M[G]=!0,M},{})),I.domNode.addEventListener("DOMNodeInserted",function(){}),I.optimize(),I.enable(),I}return o(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(O,I){var M=this.line(O),G=i(M,2),W=G[0],Y=G[1],te=this.line(O+I),V=i(te,1),H=V[0];if(s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,O,I),H!=null&&W!==H&&Y>0){if(W instanceof y.BlockEmbed||H instanceof y.BlockEmbed){this.optimize();return}if(W instanceof b.default){var q=W.newlineIndex(W.length(),!0);if(q>-1&&(W=W.split(q+1),W===H)){this.optimize();return}}else if(H instanceof b.default){var D=H.newlineIndex(0);D>-1&&H.split(D+1)}var $=H.children.head instanceof S.default?null:H.children.head;W.moveChildren(H,$),W.remove()}this.optimize()}},{key:"enable",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",O)}},{key:"formatAt",value:function(O,I,M,G){this.whitelist!=null&&!this.whitelist[M]||(s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,O,I,M,G),this.optimize())}},{key:"insertAt",value:function(O,I,M){if(!(M!=null&&this.whitelist!=null&&!this.whitelist[I])){if(O>=this.length())if(M==null||u.default.query(I,u.default.Scope.BLOCK)==null){var G=u.default.create(this.statics.defaultChild);this.appendChild(G),M==null&&I.endsWith(`
|
|
134
|
-
`)&&(I=I.slice(0,-1)),G.insertAt(0,I,M)}else{var W=u.default.create(I,M);this.appendChild(W)}else s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,O,I,M);this.optimize()}}},{key:"insertBefore",value:function(O,I){if(O.statics.scope===u.default.Scope.INLINE_BLOT){var M=u.default.create(this.statics.defaultChild);M.appendChild(O),O=M}s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,O,I)}},{key:"leaf",value:function(O){return this.path(O).pop()||[null,-1]}},{key:"line",value:function(O){return O===this.length()?this.line(O-1):this.descendant(T,O)}},{key:"lines",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,M=function G(W,Y,te){var V=[],H=te;return W.children.forEachAt(Y,te,function(q,D,$){T(q)?V.push(q):q instanceof u.default.Container&&(V=V.concat(G(q,D,H))),H-=$}),V};return M(this,O,I)}},{key:"optimize",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,O,I),O.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,O,I))}},{key:"path",value:function(O){return s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,O).slice(1)}},{key:"update",value:function(O){if(this.batch!==!0){var I=p.default.sources.USER;typeof O=="string"&&(I=O),Array.isArray(O)||(O=this.observer.takeRecords()),O.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,I,O),s(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,O.concat([])),O.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,I,O)}}}]),A}(u.default.Scroll);F.blotName="scroll",F.className="ql-editor",F.tagName="DIV",F.defaultChild="block",F.allowedChildren=[f.default,y.BlockEmbed,v.default],n.default=F},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},o=function(){function Z(Q,oe){var se=[],ue=!0,ve=!1,Pe=void 0;try{for(var ke=Q[Symbol.iterator](),Ne;!(ue=(Ne=ke.next()).done)&&(se.push(Ne.value),!(oe&&se.length===oe));ue=!0);}catch(xe){ve=!0,Pe=xe}finally{try{!ue&&ke.return&&ke.return()}finally{if(ve)throw Pe}}return se}return function(Q,oe){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return Z(Q,oe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function Z(Q,oe){for(var se=0;se<oe.length;se++){var ue=oe[se];ue.enumerable=ue.enumerable||!1,ue.configurable=!0,"value"in ue&&(ue.writable=!0),Object.defineProperty(Q,ue.key,ue)}}return function(Q,oe,se){return oe&&Z(Q.prototype,oe),se&&Z(Q,se),Q}}(),c=a(21),u=C(c),d=a(11),p=C(d),y=a(3),f=C(y),_=a(2),S=C(_),w=a(20),b=C(w),g=a(0),v=C(g),E=a(5),x=C(E),j=a(10),N=C(j),T=a(9),F=C(T);function C(Z){return Z&&Z.__esModule?Z:{default:Z}}function A(Z,Q,oe){return Q in Z?Object.defineProperty(Z,Q,{value:oe,enumerable:!0,configurable:!0,writable:!0}):Z[Q]=oe,Z}function L(Z,Q){if(!(Z instanceof Q))throw new TypeError("Cannot call a class as a function")}function O(Z,Q){if(!Z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q&&(typeof Q=="object"||typeof Q=="function")?Q:Z}function I(Z,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Q);Z.prototype=Object.create(Q&&Q.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(Z,Q):Z.__proto__=Q)}var M=(0,N.default)("quill:keyboard"),G=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",W=function(Z){I(Q,Z),s(Q,null,[{key:"match",value:function(se,ue){return ue=ne(ue),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ve){return!!ue[ve]!==se[ve]&&ue[ve]!==null})?!1:ue.key===(se.which||se.keyCode)}}]);function Q(oe,se){L(this,Q);var ue=O(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this,oe,se));return ue.bindings={},Object.keys(ue.options.bindings).forEach(function(ve){ve==="list autofill"&&oe.scroll.whitelist!=null&&!oe.scroll.whitelist.list||ue.options.bindings[ve]&&ue.addBinding(ue.options.bindings[ve])}),ue.addBinding({key:Q.keys.ENTER,shiftKey:null},q),ue.addBinding({key:Q.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ue.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0},te),ue.addBinding({key:Q.keys.DELETE},{collapsed:!0},V)):(ue.addBinding({key:Q.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},te),ue.addBinding({key:Q.keys.DELETE},{collapsed:!0,suffix:/^.?$/},V)),ue.addBinding({key:Q.keys.BACKSPACE},{collapsed:!1},H),ue.addBinding({key:Q.keys.DELETE},{collapsed:!1},H),ue.addBinding({key:Q.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},te),ue.listen(),ue}return s(Q,[{key:"addBinding",value:function(se){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Pe=ne(se);if(Pe==null||Pe.key==null)return M.warn("Attempted to add invalid keyboard binding",Pe);typeof ue=="function"&&(ue={handler:ue}),typeof ve=="function"&&(ve={handler:ve}),Pe=(0,f.default)(Pe,ue,ve),this.bindings[Pe.key]=this.bindings[Pe.key]||[],this.bindings[Pe.key].push(Pe)}},{key:"listen",value:function(){var se=this;this.quill.root.addEventListener("keydown",function(ue){if(!ue.defaultPrevented){var ve=ue.which||ue.keyCode,Pe=(se.bindings[ve]||[]).filter(function(yt){return Q.match(ue,yt)});if(Pe.length!==0){var ke=se.quill.getSelection();if(!(ke==null||!se.quill.hasFocus())){var Ne=se.quill.getLine(ke.index),xe=o(Ne,2),ye=xe[0],Ie=xe[1],me=se.quill.getLeaf(ke.index),_e=o(me,2),Ae=_e[0],Le=_e[1],ge=ke.length===0?[Ae,Le]:se.quill.getLeaf(ke.index+ke.length),Te=o(ge,2),Fe=Te[0],Ke=Te[1],it=Ae instanceof v.default.Text?Ae.value().slice(0,Le):"",rt=Fe instanceof v.default.Text?Fe.value().slice(Ke):"",at={collapsed:ke.length===0,empty:ke.length===0&&ye.length()<=1,format:se.quill.getFormat(ke),offset:Ie,prefix:it,suffix:rt},bt=Pe.some(function(yt){if(yt.collapsed!=null&&yt.collapsed!==at.collapsed||yt.empty!=null&&yt.empty!==at.empty||yt.offset!=null&&yt.offset!==at.offset)return!1;if(Array.isArray(yt.format)){if(yt.format.every(function(ht){return at.format[ht]==null}))return!1}else if(i(yt.format)==="object"&&!Object.keys(yt.format).every(function(ht){return yt.format[ht]===!0?at.format[ht]!=null:yt.format[ht]===!1?at.format[ht]==null:(0,p.default)(yt.format[ht],at.format[ht])}))return!1;return yt.prefix!=null&&!yt.prefix.test(at.prefix)||yt.suffix!=null&&!yt.suffix.test(at.suffix)?!1:yt.handler.call(se,ke,at)!==!0});bt&&ue.preventDefault()}}}})}}]),Q}(F.default);W.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},W.DEFAULTS={bindings:{bold:$("bold"),italic:$("italic"),underline:$("underline"),indent:{key:W.keys.TAB,format:["blockquote","indent","list"],handler:function(Q,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:W.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Q,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:W.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Q,oe){oe.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):oe.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":D(!0),"outdent code-block":D(!1),"remove tab":{key:W.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Q){this.quill.deleteText(Q.index-1,1,x.default.sources.USER)}},tab:{key:W.keys.TAB,handler:function(Q){this.quill.history.cutoff();var oe=new S.default().retain(Q.index).delete(Q.length).insert(" ");this.quill.updateContents(oe,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index+1,x.default.sources.SILENT)}},"list empty enter":{key:W.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Q,oe){this.quill.format("list",!1,x.default.sources.USER),oe.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:W.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Q){var oe=this.quill.getLine(Q.index),se=o(oe,2),ue=se[0],ve=se[1],Pe=(0,f.default)({},ue.formats(),{list:"checked"}),ke=new S.default().retain(Q.index).insert(`
|
|
135
|
-
`,Pe).retain(ue.length()-ve-1).retain(1,{list:"unchecked"});this.quill.updateContents(ke,x.default.sources.USER),this.quill.setSelection(Q.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:W.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Q,oe){var se=this.quill.getLine(Q.index),ue=o(se,2),ve=ue[0],Pe=ue[1],ke=new S.default().retain(Q.index).insert(`
|
|
136
|
-
`,oe.format).retain(ve.length()-Pe-1).retain(1,{header:null});this.quill.updateContents(ke,x.default.sources.USER),this.quill.setSelection(Q.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Q,oe){var se=oe.prefix.length,ue=this.quill.getLine(Q.index),ve=o(ue,2),Pe=ve[0],ke=ve[1];if(ke>se)return!0;var Ne=void 0;switch(oe.prefix.trim()){case"[]":case"[ ]":Ne="unchecked";break;case"[x]":Ne="checked";break;case"-":case"*":Ne="bullet";break;default:Ne="ordered"}this.quill.insertText(Q.index," ",x.default.sources.USER),this.quill.history.cutoff();var xe=new S.default().retain(Q.index-ke).delete(se+1).retain(Pe.length()-2-ke).retain(1,{list:Ne});this.quill.updateContents(xe,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Q.index-se,x.default.sources.SILENT)}},"code exit":{key:W.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Q){var oe=this.quill.getLine(Q.index),se=o(oe,2),ue=se[0],ve=se[1],Pe=new S.default().retain(Q.index+ue.length()-ve-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Pe,x.default.sources.USER)}},"embed left":Y(W.keys.LEFT,!1),"embed left shift":Y(W.keys.LEFT,!0),"embed right":Y(W.keys.RIGHT,!1),"embed right shift":Y(W.keys.RIGHT,!0)}};function Y(Z,Q){var oe,se=Z===W.keys.LEFT?"prefix":"suffix";return oe={key:Z,shiftKey:Q,altKey:null},A(oe,se,/^$/),A(oe,"handler",function(ve){var Pe=ve.index;Z===W.keys.RIGHT&&(Pe+=ve.length+1);var ke=this.quill.getLeaf(Pe),Ne=o(ke,1),xe=Ne[0];return xe instanceof v.default.Embed?(Z===W.keys.LEFT?Q?this.quill.setSelection(ve.index-1,ve.length+1,x.default.sources.USER):this.quill.setSelection(ve.index-1,x.default.sources.USER):Q?this.quill.setSelection(ve.index,ve.length+1,x.default.sources.USER):this.quill.setSelection(ve.index+ve.length+1,x.default.sources.USER),!1):!0}),oe}function te(Z,Q){if(!(Z.index===0||this.quill.getLength()<=1)){var oe=this.quill.getLine(Z.index),se=o(oe,1),ue=se[0],ve={};if(Q.offset===0){var Pe=this.quill.getLine(Z.index-1),ke=o(Pe,1),Ne=ke[0];if(Ne!=null&&Ne.length()>1){var xe=ue.formats(),ye=this.quill.getFormat(Z.index-1,1);ve=b.default.attributes.diff(xe,ye)||{}}}var Ie=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Q.prefix)?2:1;this.quill.deleteText(Z.index-Ie,Ie,x.default.sources.USER),Object.keys(ve).length>0&&this.quill.formatLine(Z.index-Ie,Ie,ve,x.default.sources.USER),this.quill.focus()}}function V(Z,Q){var oe=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Q.suffix)?2:1;if(!(Z.index>=this.quill.getLength()-oe)){var se={},ue=0,ve=this.quill.getLine(Z.index),Pe=o(ve,1),ke=Pe[0];if(Q.offset>=ke.length()-1){var Ne=this.quill.getLine(Z.index+1),xe=o(Ne,1),ye=xe[0];if(ye){var Ie=ke.formats(),me=this.quill.getFormat(Z.index,1);se=b.default.attributes.diff(Ie,me)||{},ue=ye.length()}}this.quill.deleteText(Z.index,oe,x.default.sources.USER),Object.keys(se).length>0&&this.quill.formatLine(Z.index+ue-1,oe,se,x.default.sources.USER)}}function H(Z){var Q=this.quill.getLines(Z),oe={};if(Q.length>1){var se=Q[0].formats(),ue=Q[Q.length-1].formats();oe=b.default.attributes.diff(ue,se)||{}}this.quill.deleteText(Z,x.default.sources.USER),Object.keys(oe).length>0&&this.quill.formatLine(Z.index,1,oe,x.default.sources.USER),this.quill.setSelection(Z.index,x.default.sources.SILENT),this.quill.focus()}function q(Z,Q){var oe=this;Z.length>0&&this.quill.scroll.deleteAt(Z.index,Z.length);var se=Object.keys(Q.format).reduce(function(ue,ve){return v.default.query(ve,v.default.Scope.BLOCK)&&!Array.isArray(Q.format[ve])&&(ue[ve]=Q.format[ve]),ue},{});this.quill.insertText(Z.index,`
|
|
137
|
-
`,se,x.default.sources.USER),this.quill.setSelection(Z.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(Q.format).forEach(function(ue){se[ue]==null&&(Array.isArray(Q.format[ue])||ue!=="link"&&oe.quill.format(ue,Q.format[ue],x.default.sources.USER))})}function D(Z){return{key:W.keys.TAB,shiftKey:!Z,format:{"code-block":!0},handler:function(oe){var se=v.default.query("code-block"),ue=oe.index,ve=oe.length,Pe=this.quill.scroll.descendant(se,ue),ke=o(Pe,2),Ne=ke[0],xe=ke[1];if(Ne!=null){var ye=this.quill.getIndex(Ne),Ie=Ne.newlineIndex(xe,!0)+1,me=Ne.newlineIndex(ye+xe+ve),_e=Ne.domNode.textContent.slice(Ie,me).split(`
|
|
138
|
-
`);xe=0,_e.forEach(function(Ae,Le){Z?(Ne.insertAt(Ie+xe,se.TAB),xe+=se.TAB.length,Le===0?ue+=se.TAB.length:ve+=se.TAB.length):Ae.startsWith(se.TAB)&&(Ne.deleteAt(Ie+xe,se.TAB.length),xe-=se.TAB.length,Le===0?ue-=se.TAB.length:ve-=se.TAB.length),xe+=Ae.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(ue,ve,x.default.sources.SILENT)}}}}function $(Z){return{key:Z[0].toUpperCase(),shortKey:!0,handler:function(oe,se){this.quill.format(Z,!se.format[Z],x.default.sources.USER)}}}function ne(Z){if(typeof Z=="string"||typeof Z=="number")return ne({key:Z});if((typeof Z>"u"?"undefined":i(Z))==="object"&&(Z=(0,u.default)(Z,!1)),typeof Z.key=="string")if(W.keys[Z.key.toUpperCase()]!=null)Z.key=W.keys[Z.key.toUpperCase()];else if(Z.key.length===1)Z.key=Z.key.toUpperCase().charCodeAt(0);else return null;return Z.shortKey&&(Z[G]=Z.shortKey,delete Z.shortKey),Z}n.default=W,n.SHORTKEY=G},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function b(g,v){var E=[],x=!0,j=!1,N=void 0;try{for(var T=g[Symbol.iterator](),F;!(x=(F=T.next()).done)&&(E.push(F.value),!(v&&E.length===v));x=!0);}catch(C){j=!0,N=C}finally{try{!x&&T.return&&T.return()}finally{if(j)throw N}}return E}return function(g,v){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return b(g,v);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function b(g,v,E){g===null&&(g=Function.prototype);var x=Object.getOwnPropertyDescriptor(g,v);if(x===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,v,E)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(E)}},s=function(){function b(g,v){for(var E=0;E<v.length;E++){var x=v[E];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,v,E){return v&&b(g.prototype,v),E&&b(g,E),g}}(),c=a(0),u=y(c),d=a(7),p=y(d);function y(b){return b&&b.__esModule?b:{default:b}}function f(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function _(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function S(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var w=function(b){S(g,b),s(g,null,[{key:"value",value:function(){}}]);function g(v,E){f(this,g);var x=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return x.selection=E,x.textNode=document.createTextNode(g.CONTENTS),x.domNode.appendChild(x.textNode),x._length=0,x}return s(g,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(E,x){if(this._length!==0)return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,E,x);for(var j=this,N=0;j!=null&&j.statics.scope!==u.default.Scope.BLOCK_BLOT;)N+=j.offset(j.parent),j=j.parent;j!=null&&(this._length=g.CONTENTS.length,j.optimize(),j.formatAt(N,g.CONTENTS.length,E,x),this._length=0)}},{key:"index",value:function(E,x){return E===this.textNode?0:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,E,x)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var E=this.textNode,x=this.selection.getNativeRange(),j=void 0,N=void 0,T=void 0;if(x!=null&&x.start.node===E&&x.end.node===E){var F=[E,x.start.offset,x.end.offset];j=F[0],N=F[1],T=F[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==g.CONTENTS){var C=this.textNode.data.split(g.CONTENTS).join("");this.next instanceof p.default?(j=this.next.domNode,this.next.insertAt(0,C),this.textNode.data=g.CONTENTS):(this.textNode.data=C,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(g.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),N!=null){var A=[N,T].map(function(O){return Math.max(0,Math.min(j.data.length,O-1))}),L=i(A,2);return N=L[0],T=L[1],{startNode:j,startOffset:N,endNode:j,endOffset:T}}}}},{key:"update",value:function(E,x){var j=this;if(E.some(function(T){return T.type==="characterData"&&T.target===j.textNode})){var N=this.restore();N&&(x.range=N)}}},{key:"value",value:function(){return""}}]),g}(u.default.Embed);w.blotName="cursor",w.className="ql-cursor",w.tagName="span",w.CONTENTS="\uFEFF",n.default=w},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=u(i),s=a(4),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(){return d(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return S}(o.default.Container);f.allowedChildren=[c.default,s.BlockEmbed,f],n.default=f},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var i=function(){function w(b,g){for(var v=0;v<g.length;v++){var E=g[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,g,v){return g&&w(b.prototype,g),v&&w(b,v),b}}(),o=function w(b,g,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,g);if(E===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:w(x,g,v)}else{if("value"in E)return E.value;var j=E.get;return j===void 0?void 0:j.call(v)}},s=a(0),c=u(s);function u(w){return w&&w.__esModule?w:{default:w}}function d(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function p(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function y(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var f=function(w){y(b,w);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,[{key:"value",value:function(v){var E=o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,v);return E.startsWith("rgb(")?(E=E.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+E.split(",").map(function(x){return("00"+parseInt(x).toString(16)).slice(-2)}).join("")):E}}]),b}(c.default.Attributor.Style),_=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),S=new f("color","color",{scope:c.default.Scope.INLINE});n.ColorAttributor=f,n.ColorClass=_,n.ColorStyle=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var i=function(){function S(w,b){for(var g=0;g<b.length;g++){var v=b[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}return function(w,b,g){return b&&S(w.prototype,b),g&&S(w,g),w}}(),o=function S(w,b,g){w===null&&(w=Function.prototype);var v=Object.getOwnPropertyDescriptor(w,b);if(v===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:S(E,b,g)}else{if("value"in v)return v.value;var x=v.get;return x===void 0?void 0:x.call(g)}},s=a(6),c=u(s);function u(S){return S&&S.__esModule?S:{default:S}}function d(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function p(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function y(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var f=function(S){y(w,S);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return i(w,[{key:"format",value:function(g,v){if(g!==this.statics.blotName||!v)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,g,v);v=this.constructor.sanitize(v),this.domNode.setAttribute("href",v)}}],[{key:"create",value:function(g){var v=o(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,g);return g=this.sanitize(g),v.setAttribute("href",g),v.setAttribute("rel","noopener noreferrer"),v.setAttribute("target","_blank"),v}},{key:"formats",value:function(g){return g.getAttribute("href")}},{key:"sanitize",value:function(g){return _(g,this.PROTOCOL_WHITELIST)?g:this.SANITIZED_URL}}]),w}(c.default);f.blotName="link",f.tagName="A",f.SANITIZED_URL="about:blank",f.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function _(S,w){var b=document.createElement("a");b.href=S;var g=b.href.slice(0,b.href.indexOf(":"));return w.indexOf(g)>-1}n.default=f,n.sanitize=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},o=function(){function w(b,g){for(var v=0;v<g.length;v++){var E=g[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,g,v){return g&&w(b.prototype,g),v&&w(b,v),b}}(),s=a(23),c=p(s),u=a(107),d=p(u);function p(w){return w&&w.__esModule?w:{default:w}}function y(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}var f=0;function _(w,b){w.setAttribute(b,w.getAttribute(b)!=="true")}var S=function(){function w(b){var g=this;y(this,w),this.select=b,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){g.togglePicker()}),this.label.addEventListener("keydown",function(v){switch(v.keyCode){case c.default.keys.ENTER:g.togglePicker();break;case c.default.keys.ESCAPE:g.escape(),v.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(w,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),_(this.label,"aria-expanded"),_(this.options,"aria-hidden")}},{key:"buildItem",value:function(g){var v=this,E=document.createElement("span");return E.tabIndex="0",E.setAttribute("role","button"),E.classList.add("ql-picker-item"),g.hasAttribute("value")&&E.setAttribute("data-value",g.getAttribute("value")),g.textContent&&E.setAttribute("data-label",g.textContent),E.addEventListener("click",function(){v.selectItem(E,!0)}),E.addEventListener("keydown",function(x){switch(x.keyCode){case c.default.keys.ENTER:v.selectItem(E,!0),x.preventDefault();break;case c.default.keys.ESCAPE:v.escape(),x.preventDefault();break}}),E}},{key:"buildLabel",value:function(){var g=document.createElement("span");return g.classList.add("ql-picker-label"),g.innerHTML=d.default,g.tabIndex="0",g.setAttribute("role","button"),g.setAttribute("aria-expanded","false"),this.container.appendChild(g),g}},{key:"buildOptions",value:function(){var g=this,v=document.createElement("span");v.classList.add("ql-picker-options"),v.setAttribute("aria-hidden","true"),v.tabIndex="-1",v.id="ql-picker-options-"+f,f+=1,this.label.setAttribute("aria-controls",v.id),this.options=v,[].slice.call(this.select.options).forEach(function(E){var x=g.buildItem(E);v.appendChild(x),E.selected===!0&&g.selectItem(x)}),this.container.appendChild(v)}},{key:"buildPicker",value:function(){var g=this;[].slice.call(this.select.attributes).forEach(function(v){g.container.setAttribute(v.name,v.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var g=this;this.close(),setTimeout(function(){return g.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=this.container.querySelector(".ql-selected");if(g!==E&&(E!=null&&E.classList.remove("ql-selected"),g!=null&&(g.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(g.parentNode.children,g),g.hasAttribute("data-value")?this.label.setAttribute("data-value",g.getAttribute("data-value")):this.label.removeAttribute("data-value"),g.hasAttribute("data-label")?this.label.setAttribute("data-label",g.getAttribute("data-label")):this.label.removeAttribute("data-label"),v))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":i(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var g=void 0;if(this.select.selectedIndex>-1){var v=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];g=this.select.options[this.select.selectedIndex],this.selectItem(v)}else this.selectItem(null);var E=g!=null&&g!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",E)}}]),w}();n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(0),o=M(i),s=a(5),c=M(s),u=a(4),d=M(u),p=a(16),y=M(p),f=a(25),_=M(f),S=a(24),w=M(S),b=a(35),g=M(b),v=a(6),E=M(v),x=a(22),j=M(x),N=a(7),T=M(N),F=a(55),C=M(F),A=a(42),L=M(A),O=a(23),I=M(O);function M(G){return G&&G.__esModule?G:{default:G}}c.default.register({"blots/block":d.default,"blots/block/embed":u.BlockEmbed,"blots/break":y.default,"blots/container":_.default,"blots/cursor":w.default,"blots/embed":g.default,"blots/inline":E.default,"blots/scroll":j.default,"blots/text":T.default,"modules/clipboard":C.default,"modules/history":L.default,"modules/keyboard":I.default}),o.default.register(d.default,y.default,w.default,E.default,j.default,T.default),n.default=c.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(1),o=function(){function s(c){this.domNode=c,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(s.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),s.create=function(c){if(this.tagName==null)throw new i.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?u=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?u=document.createElement(c):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},s.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},s.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return i.create(c)},s.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},s.prototype.deleteAt=function(c,u){var d=this.isolate(c,u);d.remove()},s.prototype.formatAt=function(c,u,d,p){var y=this.isolate(c,u);if(i.query(d,i.Scope.BLOT)!=null&&p)y.wrap(d,p);else if(i.query(d,i.Scope.ATTRIBUTE)!=null){var f=i.create(this.statics.scope);y.wrap(f),f.format(d,p)}},s.prototype.insertAt=function(c,u,d){var p=d==null?i.create("text",u):i.create(u,d),y=this.split(c);this.parent.insertBefore(p,y)},s.prototype.insertInto=function(c,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var d=null;c.children.insertBefore(this,u),u!=null&&(d=u.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=d)&&c.domNode.insertBefore(this.domNode,d),this.parent=c,this.attach()},s.prototype.isolate=function(c,u){var d=this.split(c);return d.split(u),d},s.prototype.length=function(){return 1},s.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},s.prototype.optimize=function(c){this.domNode[i.DATA_KEY]!=null&&delete this.domNode[i.DATA_KEY].mutations},s.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},s.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},s.prototype.replaceWith=function(c,u){var d=typeof c=="string"?i.create(c,u):c;return d.replace(this),d},s.prototype.split=function(c,u){return c===0?this:this.next},s.prototype.update=function(c,u){},s.prototype.wrap=function(c,u){var d=typeof c=="string"?i.create(c,u):c;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},s.blotName="abstract",s}();n.default=o},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(12),o=a(32),s=a(33),c=a(1),u=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,y){y?p.add(this.domNode,y)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var y=i.default.keys(this.domNode),f=o.default.keys(this.domNode),_=s.default.keys(this.domNode);y.concat(f).concat(_).forEach(function(S){var w=c.query(S,c.Scope.ATTRIBUTE);w instanceof i.default&&(p.attributes[w.attrName]=w)})},d.prototype.copy=function(p){var y=this;Object.keys(this.attributes).forEach(function(f){var _=y.attributes[f].value(y.domNode);p.format(f,_)})},d.prototype.move=function(p){var y=this;this.copy(p),Object.keys(this.attributes).forEach(function(f){y.attributes[f].remove(y.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(y,f){return y[f]=p.attributes[f].value(p.domNode),y},{})},d}();n.default=u},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var y in p)p.hasOwnProperty(y)&&(d[y]=p[y])};return function(d,p){u(d,p);function y(){this.constructor=d}d.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12);function s(u,d){var p=u.getAttribute("class")||"";return p.split(/\s+/).filter(function(y){return y.indexOf(d+"-")===0})}var c=function(u){i(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(y){return y.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,y){return this.canAdd(p,y)?(this.remove(p),p.classList.add(this.keyName+"-"+y),!0):!1},d.prototype.remove=function(p){var y=s(p,this.keyName);y.forEach(function(f){p.classList.remove(f)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var y=s(p,this.keyName)[0]||"",f=y.slice(this.keyName.length+1);return this.canAdd(p,f)?f:""},d}(o.default);n.default=c},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var y in p)p.hasOwnProperty(y)&&(d[y]=p[y])};return function(d,p){u(d,p);function y(){this.constructor=d}d.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(12);function s(u){var d=u.split("-"),p=d.slice(1).map(function(y){return y[0].toUpperCase()+y.slice(1)}).join("");return d[0]+p}var c=function(u){i(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(y){var f=y.split(":");return f[0].trim()})},d.prototype.add=function(p,y){return this.canAdd(p,y)?(p.style[s(this.keyName)]=y,!0):!1},d.prototype.remove=function(p){p.style[s(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var y=p.style[s(this.keyName)];return this.canAdd(p,y)?y:""},d}(o.default);n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function c(u,d){for(var p=0;p<d.length;p++){var y=d[p];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}return function(u,d,p){return d&&c(u.prototype,d),p&&c(u,p),u}}();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var s=function(){function c(u,d){o(this,c),this.quill=u,this.options=d,this.modules={}}return i(c,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),c}();s.DEFAULTS={modules:{}},s.themes={default:s},n.default=s},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function b(g,v){for(var E=0;E<v.length;E++){var x=v[E];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,v,E){return v&&b(g.prototype,v),E&&b(g,E),g}}(),o=function b(g,v,E){g===null&&(g=Function.prototype);var x=Object.getOwnPropertyDescriptor(g,v);if(x===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,v,E)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(E)}},s=a(0),c=p(s),u=a(7),d=p(u);function p(b){return b&&b.__esModule?b:{default:b}}function y(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function f(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function _(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var S="\uFEFF",w=function(b){_(g,b);function g(v){y(this,g);var E=f(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,v));return E.contentNode=document.createElement("span"),E.contentNode.setAttribute("contenteditable",!1),[].slice.call(E.domNode.childNodes).forEach(function(x){E.contentNode.appendChild(x)}),E.leftGuard=document.createTextNode(S),E.rightGuard=document.createTextNode(S),E.domNode.appendChild(E.leftGuard),E.domNode.appendChild(E.contentNode),E.domNode.appendChild(E.rightGuard),E}return i(g,[{key:"index",value:function(E,x){return E===this.leftGuard?0:E===this.rightGuard?1:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,E,x)}},{key:"restore",value:function(E){var x=void 0,j=void 0,N=E.data.split(S).join("");if(E===this.leftGuard)if(this.prev instanceof d.default){var T=this.prev.length();this.prev.insertAt(T,N),x={startNode:this.prev.domNode,startOffset:T+N.length}}else j=document.createTextNode(N),this.parent.insertBefore(c.default.create(j),this),x={startNode:j,startOffset:N.length};else E===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,N),x={startNode:this.next.domNode,startOffset:N.length}):(j=document.createTextNode(N),this.parent.insertBefore(c.default.create(j),this.next),x={startNode:j,startOffset:N.length}));return E.data=S,x}},{key:"update",value:function(E,x){var j=this;E.forEach(function(N){if(N.type==="characterData"&&(N.target===j.leftGuard||N.target===j.rightGuard)){var T=j.restore(N.target);T&&(x.range=T)}})}}]),g}(c.default.Embed);n.default=w},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var i=a(0),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new o.default.Attributor.Attribute("align","align",c),d=new o.default.Attributor.Class("align","ql-align",c),p=new o.default.Attributor.Style("align","text-align",c);n.AlignAttribute=u,n.AlignClass=d,n.AlignStyle=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var i=a(0),o=c(i),s=a(26);function c(p){return p&&p.__esModule?p:{default:p}}var u=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new s.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});n.BackgroundClass=u,n.BackgroundStyle=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var i=a(0),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},u=new o.default.Attributor.Attribute("direction","dir",c),d=new o.default.Attributor.Class("direction","ql-direction",c),p=new o.default.Attributor.Style("direction","direction",c);n.DirectionAttribute=u,n.DirectionClass=d,n.DirectionStyle=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var i=function(){function b(g,v){for(var E=0;E<v.length;E++){var x=v[E];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,v,E){return v&&b(g.prototype,v),E&&b(g,E),g}}(),o=function b(g,v,E){g===null&&(g=Function.prototype);var x=Object.getOwnPropertyDescriptor(g,v);if(x===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,v,E)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(E)}},s=a(0),c=u(s);function u(b){return b&&b.__esModule?b:{default:b}}function d(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function p(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function y(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var f={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},_=new c.default.Attributor.Class("font","ql-font",f),S=function(b){y(g,b);function g(){return d(this,g),p(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"value",value:function(E){return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,E).replace(/["']/g,"")}}]),g}(c.default.Attributor.Style),w=new S("font","font-family",f);n.FontStyle=w,n.FontClass=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var i=a(0),o=s(i);function s(d){return d&&d.__esModule?d:{default:d}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=c,n.SizeStyle=u},function(t,n,a){t.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var i=function(){function v(E,x){for(var j=0;j<x.length;j++){var N=x[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(E,N.key,N)}}return function(E,x,j){return x&&v(E.prototype,x),j&&v(E,j),E}}(),o=a(0),s=y(o),c=a(5),u=y(c),d=a(9),p=y(d);function y(v){return v&&v.__esModule?v:{default:v}}function f(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function _(v,E){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:v}function S(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(v,E):v.__proto__=E)}var w=function(v){S(E,v);function E(x,j){f(this,E);var N=_(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,x,j));return N.lastRecorded=0,N.ignoreChange=!1,N.clear(),N.quill.on(u.default.events.EDITOR_CHANGE,function(T,F,C,A){T!==u.default.events.TEXT_CHANGE||N.ignoreChange||(!N.options.userOnly||A===u.default.sources.USER?N.record(F,C):N.transform(F))}),N.quill.keyboard.addBinding({key:"Z",shortKey:!0},N.undo.bind(N)),N.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},N.redo.bind(N)),/Win/i.test(navigator.platform)&&N.quill.keyboard.addBinding({key:"Y",shortKey:!0},N.redo.bind(N)),N}return i(E,[{key:"change",value:function(j,N){if(this.stack[j].length!==0){var T=this.stack[j].pop();this.stack[N].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[j],u.default.sources.USER),this.ignoreChange=!1;var F=g(T[j]);this.quill.setSelection(F)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(j,N){if(j.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(N),F=Date.now();if(this.lastRecorded+this.options.delay>F&&this.stack.undo.length>0){var C=this.stack.undo.pop();T=T.compose(C.undo),j=C.redo.compose(j)}else this.lastRecorded=F;this.stack.undo.push({redo:j,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(j){this.stack.undo.forEach(function(N){N.undo=j.transform(N.undo,!0),N.redo=j.transform(N.redo,!0)}),this.stack.redo.forEach(function(N){N.undo=j.transform(N.undo,!0),N.redo=j.transform(N.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),E}(p.default);w.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(v){var E=v.ops[v.ops.length-1];return E==null?!1:E.insert!=null?typeof E.insert=="string"&&E.insert.endsWith(`
|
|
139
|
-
`):E.attributes!=null?Object.keys(E.attributes).some(function(x){return s.default.query(x,s.default.Scope.BLOCK)!=null}):!1}function g(v){var E=v.reduce(function(j,N){return j+=N.delete||0,j},0),x=v.length()-E;return b(v)&&(x-=1),x}n.default=w,n.getLastChangeIndex=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var i=function(){function q(D,$){for(var ne=0;ne<$.length;ne++){var Z=$[ne];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(D,Z.key,Z)}}return function(D,$,ne){return $&&q(D.prototype,$),ne&&q(D,ne),D}}(),o=function q(D,$,ne){D===null&&(D=Function.prototype);var Z=Object.getOwnPropertyDescriptor(D,$);if(Z===void 0){var Q=Object.getPrototypeOf(D);return Q===null?void 0:q(Q,$,ne)}else{if("value"in Z)return Z.value;var oe=Z.get;return oe===void 0?void 0:oe.call(ne)}},s=a(3),c=F(s),u=a(2),d=F(u),p=a(8),y=F(p),f=a(23),_=F(f),S=a(34),w=F(S),b=a(59),g=F(b),v=a(60),E=F(v),x=a(28),j=F(x),N=a(61),T=F(N);function F(q){return q&&q.__esModule?q:{default:q}}function C(q,D){if(!(q instanceof D))throw new TypeError("Cannot call a class as a function")}function A(q,D){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:q}function L(q,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);q.prototype=Object.create(D&&D.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(q,D):q.__proto__=D)}var O=[!1,"center","right","justify"],I=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],M=[!1,"serif","monospace"],G=["1","2","3",!1],W=["small",!1,"large","huge"],Y=function(q){L(D,q);function D($,ne){C(this,D);var Z=A(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,$,ne)),Q=function oe(se){if(!document.body.contains($.root))return document.body.removeEventListener("click",oe);Z.tooltip!=null&&!Z.tooltip.root.contains(se.target)&&document.activeElement!==Z.tooltip.textbox&&!Z.quill.hasFocus()&&Z.tooltip.hide(),Z.pickers!=null&&Z.pickers.forEach(function(ue){ue.container.contains(se.target)||ue.close()})};return $.emitter.listenDOM("click",document.body,Q),Z}return i(D,[{key:"addModule",value:function(ne){var Z=o(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"addModule",this).call(this,ne);return ne==="toolbar"&&this.extendToolbar(Z),Z}},{key:"buildButtons",value:function(ne,Z){ne.forEach(function(Q){var oe=Q.getAttribute("class")||"";oe.split(/\s+/).forEach(function(se){if(se.startsWith("ql-")&&(se=se.slice(3),Z[se]!=null))if(se==="direction")Q.innerHTML=Z[se][""]+Z[se].rtl;else if(typeof Z[se]=="string")Q.innerHTML=Z[se];else{var ue=Q.value||"";ue!=null&&Z[se][ue]&&(Q.innerHTML=Z[se][ue])}})})}},{key:"buildPickers",value:function(ne,Z){var Q=this;this.pickers=ne.map(function(se){if(se.classList.contains("ql-align"))return se.querySelector("option")==null&&H(se,O),new E.default(se,Z.align);if(se.classList.contains("ql-background")||se.classList.contains("ql-color")){var ue=se.classList.contains("ql-background")?"background":"color";return se.querySelector("option")==null&&H(se,I,ue==="background"?"#ffffff":"#000000"),new g.default(se,Z[ue])}else return se.querySelector("option")==null&&(se.classList.contains("ql-font")?H(se,M):se.classList.contains("ql-header")?H(se,G):se.classList.contains("ql-size")&&H(se,W)),new j.default(se)});var oe=function(){Q.pickers.forEach(function(ue){ue.update()})};this.quill.on(y.default.events.EDITOR_CHANGE,oe)}}]),D}(w.default);Y.DEFAULTS=(0,c.default)(!0,{},w.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var D=this,$=this.container.querySelector("input.ql-image[type=file]");$==null&&($=document.createElement("input"),$.setAttribute("type","file"),$.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),$.classList.add("ql-image"),$.addEventListener("change",function(){if($.files!=null&&$.files[0]!=null){var ne=new FileReader;ne.onload=function(Z){var Q=D.quill.getSelection(!0);D.quill.updateContents(new d.default().retain(Q.index).delete(Q.length).insert({image:Z.target.result}),y.default.sources.USER),D.quill.setSelection(Q.index+1,y.default.sources.SILENT),$.value=""},ne.readAsDataURL($.files[0])}}),this.container.appendChild($)),$.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var te=function(q){L(D,q);function D($,ne){C(this,D);var Z=A(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,$,ne));return Z.textbox=Z.root.querySelector('input[type="text"]'),Z.listen(),Z}return i(D,[{key:"listen",value:function(){var ne=this;this.textbox.addEventListener("keydown",function(Z){_.default.match(Z,"enter")?(ne.save(),Z.preventDefault()):_.default.match(Z,"escape")&&(ne.cancel(),Z.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Z!=null?this.textbox.value=Z:ne!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+ne)||""),this.root.setAttribute("data-mode",ne)}},{key:"restoreFocus",value:function(){var ne=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=ne}},{key:"save",value:function(){var ne=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Z=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",ne,y.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",ne,y.default.sources.USER)),this.quill.root.scrollTop=Z;break}case"video":ne=V(ne);case"formula":{if(!ne)break;var Q=this.quill.getSelection(!0);if(Q!=null){var oe=Q.index+Q.length;this.quill.insertEmbed(oe,this.root.getAttribute("data-mode"),ne,y.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(oe+1," ",y.default.sources.USER),this.quill.setSelection(oe+2,y.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),D}(T.default);function V(q){var D=q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return D?(D[1]||"https")+"://www.youtube.com/embed/"+D[2]+"?showinfo=0":(D=q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(D[1]||"https")+"://player.vimeo.com/video/"+D[2]+"/":q}function H(q,D){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D.forEach(function(ne){var Z=document.createElement("option");ne===$?Z.setAttribute("selected","selected"):Z.setAttribute("value",ne),q.appendChild(Z)})}n.BaseTooltip=te,n.default=Y},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];this.insertBefore(s[0],null),s.length>1&&this.append.apply(this,s.slice(1))},o.prototype.contains=function(s){for(var c,u=this.iterator();c=u();)if(c===s)return!0;return!1},o.prototype.insertBefore=function(s,c){s&&(s.next=c,c!=null?(s.prev=c.prev,c.prev!=null&&(c.prev.next=s),c.prev=s,c===this.head&&(this.head=s)):this.tail!=null?(this.tail.next=s,s.prev=this.tail,this.tail=s):(s.prev=null,this.head=this.tail=s),this.length+=1)},o.prototype.offset=function(s){for(var c=0,u=this.head;u!=null;){if(u===s)return c;c+=u.length(),u=u.next}return-1},o.prototype.remove=function(s){this.contains(s)&&(s.prev!=null&&(s.prev.next=s.next),s.next!=null&&(s.next.prev=s.prev),s===this.head&&(this.head=s.next),s===this.tail&&(this.tail=s.prev),this.length-=1)},o.prototype.iterator=function(s){return s===void 0&&(s=this.head),function(){var c=s;return s!=null&&(s=s.next),c}},o.prototype.find=function(s,c){c===void 0&&(c=!1);for(var u,d=this.iterator();u=d();){var p=u.length();if(s<p||c&&s===p&&(u.next==null||u.next.length()!==0))return[u,s];s-=p}return[null,0]},o.prototype.forEach=function(s){for(var c,u=this.iterator();c=u();)s(c)},o.prototype.forEachAt=function(s,c,u){if(!(c<=0))for(var d=this.find(s),p=d[0],y=d[1],f,_=s-y,S=this.iterator(p);(f=S())&&_<s+c;){var w=f.length();s>_?u(f,s-_,Math.min(c,_+w-s)):u(f,0,Math.min(w,s+c-_)),_+=w}},o.prototype.map=function(s){return this.reduce(function(c,u){return c.push(s(u)),c},[])},o.prototype.reduce=function(s,c){for(var u,d=this.iterator();u=d();)c=s(c,u);return c},o}();n.default=i},function(t,n,a){var i=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,f){y.__proto__=f}||function(y,f){for(var _ in f)f.hasOwnProperty(_)&&(y[_]=f[_])};return function(y,f){p(y,f);function _(){this.constructor=y}y.prototype=f===null?Object.create(f):(_.prototype=f.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(17),s=a(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,d=function(p){i(y,p);function y(f){var _=p.call(this,f)||this;return _.scroll=_,_.observer=new MutationObserver(function(S){_.update(S)}),_.observer.observe(_.domNode,c),_.attach(),_}return y.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},y.prototype.deleteAt=function(f,_){this.update(),f===0&&_===this.length()?this.children.forEach(function(S){S.remove()}):p.prototype.deleteAt.call(this,f,_)},y.prototype.formatAt=function(f,_,S,w){this.update(),p.prototype.formatAt.call(this,f,_,S,w)},y.prototype.insertAt=function(f,_,S){this.update(),p.prototype.insertAt.call(this,f,_,S)},y.prototype.optimize=function(f,_){var S=this;f===void 0&&(f=[]),_===void 0&&(_={}),p.prototype.optimize.call(this,_);for(var w=[].slice.call(this.observer.takeRecords());w.length>0;)f.push(w.pop());for(var b=function(x,j){j===void 0&&(j=!0),!(x==null||x===S)&&x.domNode.parentNode!=null&&(x.domNode[s.DATA_KEY].mutations==null&&(x.domNode[s.DATA_KEY].mutations=[]),j&&b(x.parent))},g=function(x){x.domNode[s.DATA_KEY]==null||x.domNode[s.DATA_KEY].mutations==null||(x instanceof o.default&&x.children.forEach(g),x.optimize(_))},v=f,E=0;v.length>0;E+=1){if(E>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(v.forEach(function(x){var j=s.find(x.target,!0);j!=null&&(j.domNode===x.target&&(x.type==="childList"?(b(s.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(N){var T=s.find(N,!1);b(T,!1),T instanceof o.default&&T.children.forEach(function(F){b(F,!1)})})):x.type==="attributes"&&b(j.prev)),b(j))}),this.children.forEach(g),v=[].slice.call(this.observer.takeRecords()),w=v.slice();w.length>0;)f.push(w.pop())}},y.prototype.update=function(f,_){var S=this;_===void 0&&(_={}),f=f||this.observer.takeRecords(),f.map(function(w){var b=s.find(w.target,!0);return b==null?null:b.domNode[s.DATA_KEY].mutations==null?(b.domNode[s.DATA_KEY].mutations=[w],b):(b.domNode[s.DATA_KEY].mutations.push(w),null)}).forEach(function(w){w==null||w===S||w.domNode[s.DATA_KEY]==null||w.update(w.domNode[s.DATA_KEY].mutations||[],_)}),this.domNode[s.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,_),this.optimize(f,_)},y.blotName="scroll",y.defaultChild="block",y.scope=s.Scope.BLOCK_BLOT,y.tagName="DIV",y}(o.default);n.default=d},function(t,n,a){var i=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,y){p.__proto__=y}||function(p,y){for(var f in y)y.hasOwnProperty(f)&&(p[f]=y[f])};return function(p,y){d(p,y);function f(){this.constructor=p}p.prototype=y===null?Object.create(y):(f.prototype=y.prototype,new f)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(18),s=a(1);function c(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var y in d)if(d[y]!==p[y])return!1;return!0}var u=function(d){i(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(y){if(y.tagName!==p.tagName)return d.formats.call(this,y)},p.prototype.format=function(y,f){var _=this;y===this.statics.blotName&&!f?(this.children.forEach(function(S){S instanceof o.default||(S=S.wrap(p.blotName,!0)),_.attributes.copy(S)}),this.unwrap()):d.prototype.format.call(this,y,f)},p.prototype.formatAt=function(y,f,_,S){if(this.formats()[_]!=null||s.query(_,s.Scope.ATTRIBUTE)){var w=this.isolate(y,f);w.format(_,S)}else d.prototype.formatAt.call(this,y,f,_,S)},p.prototype.optimize=function(y){d.prototype.optimize.call(this,y);var f=this.formats();if(Object.keys(f).length===0)return this.unwrap();var _=this.next;_ instanceof p&&_.prev===this&&c(f,_.formats())&&(_.moveChildren(this),_.remove())},p.blotName="inline",p.scope=s.Scope.INLINE_BLOT,p.tagName="SPAN",p}(o.default);n.default=u},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var y in p)p.hasOwnProperty(y)&&(d[y]=p[y])};return function(d,p){u(d,p);function y(){this.constructor=d}d.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(18),s=a(1),c=function(u){i(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.formats=function(p){var y=s.query(d.blotName).tagName;if(p.tagName!==y)return u.formats.call(this,p)},d.prototype.format=function(p,y){s.query(p,s.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!y?this.replaceWith(d.blotName):u.prototype.format.call(this,p,y))},d.prototype.formatAt=function(p,y,f,_){s.query(f,s.Scope.BLOCK)!=null?this.format(f,_):u.prototype.formatAt.call(this,p,y,f,_)},d.prototype.insertAt=function(p,y,f){if(f==null||s.query(y,s.Scope.INLINE)!=null)u.prototype.insertAt.call(this,p,y,f);else{var _=this.split(p),S=s.create(y,f);_.parent.insertBefore(S,_)}},d.prototype.update=function(p,y){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,p,y)},d.blotName="block",d.scope=s.Scope.BLOCK_BLOT,d.tagName="P",d}(o.default);n.default=c},function(t,n,a){var i=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var p in d)d.hasOwnProperty(p)&&(u[p]=d[p])};return function(u,d){c(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(19),s=function(c){i(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(d){},u.prototype.format=function(d,p){c.prototype.formatAt.call(this,0,this.length(),d,p)},u.prototype.formatAt=function(d,p,y,f){d===0&&p===this.length()?this.format(y,f):c.prototype.formatAt.call(this,d,p,y,f)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(o.default);n.default=s},function(t,n,a){var i=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var y in p)p.hasOwnProperty(y)&&(d[y]=p[y])};return function(d,p){u(d,p);function y(){this.constructor=d}d.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=a(19),s=a(1),c=function(u){i(d,u);function d(p){var y=u.call(this,p)||this;return y.text=y.statics.value(y.domNode),y}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var y=p.data;return y.normalize&&(y=y.normalize()),y},d.prototype.deleteAt=function(p,y){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+y)},d.prototype.index=function(p,y){return this.domNode===p?y:-1},d.prototype.insertAt=function(p,y,f){f==null?(this.text=this.text.slice(0,p)+y+this.text.slice(p),this.domNode.data=this.text):u.prototype.insertAt.call(this,p,y,f)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){u.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,y){return[this.domNode,p]},d.prototype.split=function(p,y){if(y===void 0&&(y=!1),!y){if(p===0)return this;if(p===this.length())return this.next}var f=s.create(this.domNode.splitText(p));return this.parent.insertBefore(f,this.next),this.text=this.statics.value(this.domNode),f},d.prototype.update=function(p,y){var f=this;p.some(function(_){return _.type==="characterData"&&_.target===f.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=s.Scope.INLINE_BLOT,d}(o.default);n.default=c},function(t,n,a){var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(s,c){return arguments.length>1&&!this.contains(s)==!c?c:o.call(this,s)}}String.prototype.startsWith||(String.prototype.startsWith=function(s,c){return c=c||0,this.substr(c,s.length)===s}),String.prototype.endsWith||(String.prototype.endsWith=function(s,c){var u=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>u.length)&&(c=u.length),c-=s.length;var d=u.indexOf(s,c);return d!==-1&&d===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),d=u.length>>>0,p=arguments[1],y,f=0;f<d;f++)if(y=u[f],c.call(p,y,f,u))return y}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,n){var a=-1,i=1,o=0;function s(E,x,j){if(E==x)return E?[[o,E]]:[];(j<0||E.length<j)&&(j=null);var N=p(E,x),T=E.substring(0,N);E=E.substring(N),x=x.substring(N),N=y(E,x);var F=E.substring(E.length-N);E=E.substring(0,E.length-N),x=x.substring(0,x.length-N);var C=c(E,x);return T&&C.unshift([o,T]),F&&C.push([o,F]),_(C),j!=null&&(C=b(C,j)),C=g(C),C}function c(E,x){var j;if(!E)return[[i,x]];if(!x)return[[a,E]];var N=E.length>x.length?E:x,T=E.length>x.length?x:E,F=N.indexOf(T);if(F!=-1)return j=[[i,N.substring(0,F)],[o,T],[i,N.substring(F+T.length)]],E.length>x.length&&(j[0][0]=j[2][0]=a),j;if(T.length==1)return[[a,E],[i,x]];var C=f(E,x);if(C){var A=C[0],L=C[1],O=C[2],I=C[3],M=C[4],G=s(A,O),W=s(L,I);return G.concat([[o,M]],W)}return u(E,x)}function u(E,x){for(var j=E.length,N=x.length,T=Math.ceil((j+N)/2),F=T,C=2*T,A=new Array(C),L=new Array(C),O=0;O<C;O++)A[O]=-1,L[O]=-1;A[F+1]=0,L[F+1]=0;for(var I=j-N,M=I%2!=0,G=0,W=0,Y=0,te=0,V=0;V<T;V++){for(var H=-V+G;H<=V-W;H+=2){var q=F+H,D;H==-V||H!=V&&A[q-1]<A[q+1]?D=A[q+1]:D=A[q-1]+1;for(var $=D-H;D<j&&$<N&&E.charAt(D)==x.charAt($);)D++,$++;if(A[q]=D,D>j)W+=2;else if($>N)G+=2;else if(M){var ne=F+I-H;if(ne>=0&&ne<C&&L[ne]!=-1){var Z=j-L[ne];if(D>=Z)return d(E,x,D,$)}}}for(var Q=-V+Y;Q<=V-te;Q+=2){var ne=F+Q,Z;Q==-V||Q!=V&&L[ne-1]<L[ne+1]?Z=L[ne+1]:Z=L[ne-1]+1;for(var oe=Z-Q;Z<j&&oe<N&&E.charAt(j-Z-1)==x.charAt(N-oe-1);)Z++,oe++;if(L[ne]=Z,Z>j)te+=2;else if(oe>N)Y+=2;else if(!M){var q=F+I-Q;if(q>=0&&q<C&&A[q]!=-1){var D=A[q],$=F+D-q;if(Z=j-Z,D>=Z)return d(E,x,D,$)}}}}return[[a,E],[i,x]]}function d(E,x,j,N){var T=E.substring(0,j),F=x.substring(0,N),C=E.substring(j),A=x.substring(N),L=s(T,F),O=s(C,A);return L.concat(O)}function p(E,x){if(!E||!x||E.charAt(0)!=x.charAt(0))return 0;for(var j=0,N=Math.min(E.length,x.length),T=N,F=0;j<T;)E.substring(F,T)==x.substring(F,T)?(j=T,F=j):N=T,T=Math.floor((N-j)/2+j);return T}function y(E,x){if(!E||!x||E.charAt(E.length-1)!=x.charAt(x.length-1))return 0;for(var j=0,N=Math.min(E.length,x.length),T=N,F=0;j<T;)E.substring(E.length-T,E.length-F)==x.substring(x.length-T,x.length-F)?(j=T,F=j):N=T,T=Math.floor((N-j)/2+j);return T}function f(E,x){var j=E.length>x.length?E:x,N=E.length>x.length?x:E;if(j.length<4||N.length*2<j.length)return null;function T(W,Y,te){for(var V=W.substring(te,te+Math.floor(W.length/4)),H=-1,q="",D,$,ne,Z;(H=Y.indexOf(V,H+1))!=-1;){var Q=p(W.substring(te),Y.substring(H)),oe=y(W.substring(0,te),Y.substring(0,H));q.length<oe+Q&&(q=Y.substring(H-oe,H)+Y.substring(H,H+Q),D=W.substring(0,te-oe),$=W.substring(te+Q),ne=Y.substring(0,H-oe),Z=Y.substring(H+Q))}return q.length*2>=W.length?[D,$,ne,Z,q]:null}var F=T(j,N,Math.ceil(j.length/4)),C=T(j,N,Math.ceil(j.length/2)),A;if(!F&&!C)return null;C?F?A=F[4].length>C[4].length?F:C:A=C:A=F;var L,O,I,M;E.length>x.length?(L=A[0],O=A[1],I=A[2],M=A[3]):(I=A[0],M=A[1],L=A[2],O=A[3]);var G=A[4];return[L,O,I,M,G]}function _(E){E.push([o,""]);for(var x=0,j=0,N=0,T="",F="",C;x<E.length;)switch(E[x][0]){case i:N++,F+=E[x][1],x++;break;case a:j++,T+=E[x][1],x++;break;case o:j+N>1?(j!==0&&N!==0&&(C=p(F,T),C!==0&&(x-j-N>0&&E[x-j-N-1][0]==o?E[x-j-N-1][1]+=F.substring(0,C):(E.splice(0,0,[o,F.substring(0,C)]),x++),F=F.substring(C),T=T.substring(C)),C=y(F,T),C!==0&&(E[x][1]=F.substring(F.length-C)+E[x][1],F=F.substring(0,F.length-C),T=T.substring(0,T.length-C))),j===0?E.splice(x-N,j+N,[i,F]):N===0?E.splice(x-j,j+N,[a,T]):E.splice(x-j-N,j+N,[a,T],[i,F]),x=x-j-N+(j?1:0)+(N?1:0)+1):x!==0&&E[x-1][0]==o?(E[x-1][1]+=E[x][1],E.splice(x,1)):x++,N=0,j=0,T="",F="";break}E[E.length-1][1]===""&&E.pop();var A=!1;for(x=1;x<E.length-1;)E[x-1][0]==o&&E[x+1][0]==o&&(E[x][1].substring(E[x][1].length-E[x-1][1].length)==E[x-1][1]?(E[x][1]=E[x-1][1]+E[x][1].substring(0,E[x][1].length-E[x-1][1].length),E[x+1][1]=E[x-1][1]+E[x+1][1],E.splice(x-1,1),A=!0):E[x][1].substring(0,E[x+1][1].length)==E[x+1][1]&&(E[x-1][1]+=E[x+1][1],E[x][1]=E[x][1].substring(E[x+1][1].length)+E[x+1][1],E.splice(x+1,1),A=!0)),x++;A&&_(E)}var S=s;S.INSERT=i,S.DELETE=a,S.EQUAL=o,t.exports=S;function w(E,x){if(x===0)return[o,E];for(var j=0,N=0;N<E.length;N++){var T=E[N];if(T[0]===a||T[0]===o){var F=j+T[1].length;if(x===F)return[N+1,E];if(x<F){E=E.slice();var C=x-j,A=[T[0],T[1].slice(0,C)],L=[T[0],T[1].slice(C)];return E.splice(N,1,A,L),[N+1,E]}else j=F}}throw new Error("cursor_pos is out of bounds!")}function b(E,x){var j=w(E,x),N=j[1],T=j[0],F=N[T],C=N[T+1];if(F==null)return E;if(F[0]!==o)return E;if(C!=null&&F[1]+C[1]===C[1]+F[1])return N.splice(T,2,C,F),v(N,T,2);if(C!=null&&C[1].indexOf(F[1])===0){N.splice(T,2,[C[0],F[1]],[0,F[1]]);var A=C[1].slice(F[1].length);return A.length>0&&N.splice(T+2,0,[C[0],A]),v(N,T,3)}else return E}function g(E){for(var x=!1,j=function(C){return C.charCodeAt(0)>=56320&&C.charCodeAt(0)<=57343},N=function(C){return C.charCodeAt(C.length-1)>=55296&&C.charCodeAt(C.length-1)<=56319},T=2;T<E.length;T+=1)E[T-2][0]===o&&N(E[T-2][1])&&E[T-1][0]===a&&j(E[T-1][1])&&E[T][0]===i&&j(E[T][1])&&(x=!0,E[T-1][1]=E[T-2][1].slice(-1)+E[T-1][1],E[T][1]=E[T-2][1].slice(-1)+E[T][1],E[T-2][1]=E[T-2][1].slice(0,-1));if(!x)return E;for(var F=[],T=0;T<E.length;T+=1)E[T][1].length>0&&F.push(E[T]);return F}function v(E,x,j){for(var N=x+j-1;N>=0&&N>=x-1;N--)if(N+1<E.length){var T=E[N],F=E[N+1];T[0]===F[1]&&E.splice(N,2,[T[0],T[1]+F[1]])}return E}},function(t,n){n=t.exports=typeof Object.keys=="function"?Object.keys:a,n.shim=a;function a(i){var o=[];for(var s in i)o.push(s);return o}},function(t,n){var a=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=t.exports=a?i:o,n.supported=i;function i(s){return Object.prototype.toString.call(s)=="[object Arguments]"}n.unsupported=o;function o(s){return s&&typeof s=="object"&&typeof s.length=="number"&&Object.prototype.hasOwnProperty.call(s,"callee")&&!Object.prototype.propertyIsEnumerable.call(s,"callee")||!1}},function(t,n){var a=Object.prototype.hasOwnProperty,i="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(i=!1));function s(u,d,p){this.fn=u,this.context=d,this.once=p||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],p,y;if(this._eventsCount===0)return d;for(y in p=this._events)a.call(p,y)&&d.push(i?y.slice(1):y);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},c.prototype.listeners=function(d,p){var y=i?i+d:d,f=this._events[y];if(p)return!!f;if(!f)return[];if(f.fn)return[f.fn];for(var _=0,S=f.length,w=new Array(S);_<S;_++)w[_]=f[_].fn;return w},c.prototype.emit=function(d,p,y,f,_,S){var w=i?i+d:d;if(!this._events[w])return!1;var b=this._events[w],g=arguments.length,v,E;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),g){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,p),!0;case 3:return b.fn.call(b.context,p,y),!0;case 4:return b.fn.call(b.context,p,y,f),!0;case 5:return b.fn.call(b.context,p,y,f,_),!0;case 6:return b.fn.call(b.context,p,y,f,_,S),!0}for(E=1,v=new Array(g-1);E<g;E++)v[E-1]=arguments[E];b.fn.apply(b.context,v)}else{var x=b.length,j;for(E=0;E<x;E++)switch(b[E].once&&this.removeListener(d,b[E].fn,void 0,!0),g){case 1:b[E].fn.call(b[E].context);break;case 2:b[E].fn.call(b[E].context,p);break;case 3:b[E].fn.call(b[E].context,p,y);break;case 4:b[E].fn.call(b[E].context,p,y,f);break;default:if(!v)for(j=1,v=new Array(g-1);j<g;j++)v[j-1]=arguments[j];b[E].fn.apply(b[E].context,v)}}return!0},c.prototype.on=function(d,p,y){var f=new s(p,y||this),_=i?i+d:d;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],f]:this._events[_].push(f):(this._events[_]=f,this._eventsCount++),this},c.prototype.once=function(d,p,y){var f=new s(p,y||this,!0),_=i?i+d:d;return this._events[_]?this._events[_].fn?this._events[_]=[this._events[_],f]:this._events[_].push(f):(this._events[_]=f,this._eventsCount++),this},c.prototype.removeListener=function(d,p,y,f){var _=i?i+d:d;if(!this._events[_])return this;if(!p)return--this._eventsCount===0?this._events=new o:delete this._events[_],this;var S=this._events[_];if(S.fn)S.fn===p&&(!f||S.once)&&(!y||S.context===y)&&(--this._eventsCount===0?this._events=new o:delete this._events[_]);else{for(var w=0,b=[],g=S.length;w<g;w++)(S[w].fn!==p||f&&!S[w].once||y&&S[w].context!==y)&&b.push(S[w]);b.length?this._events[_]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new o:delete this._events[_]}return this},c.prototype.removeAllListeners=function(d){var p;return d?(p=i?i+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new o:delete this._events[p])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=i,c.EventEmitter=c,typeof t<"u"&&(t.exports=c)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},o=function(){function me(_e,Ae){var Le=[],ge=!0,Te=!1,Fe=void 0;try{for(var Ke=_e[Symbol.iterator](),it;!(ge=(it=Ke.next()).done)&&(Le.push(it.value),!(Ae&&Le.length===Ae));ge=!0);}catch(rt){Te=!0,Fe=rt}finally{try{!ge&&Ke.return&&Ke.return()}finally{if(Te)throw Fe}}return Le}return function(_e,Ae){if(Array.isArray(_e))return _e;if(Symbol.iterator in Object(_e))return me(_e,Ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function me(_e,Ae){for(var Le=0;Le<Ae.length;Le++){var ge=Ae[Le];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(_e,ge.key,ge)}}return function(_e,Ae,Le){return Ae&&me(_e.prototype,Ae),Le&&me(_e,Le),_e}}(),c=a(3),u=L(c),d=a(2),p=L(d),y=a(0),f=L(y),_=a(5),S=L(_),w=a(10),b=L(w),g=a(9),v=L(g),E=a(36),x=a(37),j=a(13),N=L(j),T=a(26),F=a(38),C=a(39),A=a(40);function L(me){return me&&me.__esModule?me:{default:me}}function O(me,_e,Ae){return _e in me?Object.defineProperty(me,_e,{value:Ae,enumerable:!0,configurable:!0,writable:!0}):me[_e]=Ae,me}function I(me,_e){if(!(me instanceof _e))throw new TypeError("Cannot call a class as a function")}function M(me,_e){if(!me)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e&&(typeof _e=="object"||typeof _e=="function")?_e:me}function G(me,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _e);me.prototype=Object.create(_e&&_e.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}),_e&&(Object.setPrototypeOf?Object.setPrototypeOf(me,_e):me.__proto__=_e)}var W=(0,b.default)("quill:clipboard"),Y="__ql-matcher",te=[[Node.TEXT_NODE,Ie],[Node.TEXT_NODE,Ne],["br",ve],[Node.ELEMENT_NODE,Ne],[Node.ELEMENT_NODE,ue],[Node.ELEMENT_NODE,xe],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,ye],["li",ke],["b",oe.bind(oe,"bold")],["i",oe.bind(oe,"italic")],["style",Pe]],V=[E.AlignAttribute,F.DirectionAttribute].reduce(function(me,_e){return me[_e.keyName]=_e,me},{}),H=[E.AlignStyle,x.BackgroundStyle,T.ColorStyle,F.DirectionStyle,C.FontStyle,A.SizeStyle].reduce(function(me,_e){return me[_e.keyName]=_e,me},{}),q=function(me){G(_e,me);function _e(Ae,Le){I(this,_e);var ge=M(this,(_e.__proto__||Object.getPrototypeOf(_e)).call(this,Ae,Le));return ge.quill.root.addEventListener("paste",ge.onPaste.bind(ge)),ge.container=ge.quill.addContainer("ql-clipboard"),ge.container.setAttribute("contenteditable",!0),ge.container.setAttribute("tabindex",-1),ge.matchers=[],te.concat(ge.options.matchers).forEach(function(Te){var Fe=o(Te,2),Ke=Fe[0],it=Fe[1];!Le.matchVisual&&it===xe||ge.addMatcher(Ke,it)}),ge}return s(_e,[{key:"addMatcher",value:function(Le,ge){this.matchers.push([Le,ge])}},{key:"convert",value:function(Le){if(typeof Le=="string")return this.container.innerHTML=Le.replace(/\>\r?\n +\</g,"><"),this.convert();var ge=this.quill.getFormat(this.quill.selection.savedRange.index);if(ge[N.default.blotName]){var Te=this.container.innerText;return this.container.innerHTML="",new p.default().insert(Te,O({},N.default.blotName,ge[N.default.blotName]))}var Fe=this.prepareMatching(),Ke=o(Fe,2),it=Ke[0],rt=Ke[1],at=Q(this.container,it,rt);return ne(at,`
|
|
140
|
-
`)&&at.ops[at.ops.length-1].attributes==null&&(at=at.compose(new p.default().retain(at.length()-1).delete(1))),W.log("convert",this.container.innerHTML,at),this.container.innerHTML="",at}},{key:"dangerouslyPasteHTML",value:function(Le,ge){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S.default.sources.API;if(typeof Le=="string")this.quill.setContents(this.convert(Le),ge),this.quill.setSelection(0,S.default.sources.SILENT);else{var Fe=this.convert(ge);this.quill.updateContents(new p.default().retain(Le).concat(Fe),Te),this.quill.setSelection(Le+Fe.length(),S.default.sources.SILENT)}}},{key:"onPaste",value:function(Le){var ge=this;if(!(Le.defaultPrevented||!this.quill.isEnabled())){var Te=this.quill.getSelection(),Fe=new p.default().retain(Te.index),Ke=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(S.default.sources.SILENT),setTimeout(function(){Fe=Fe.concat(ge.convert()).delete(Te.length),ge.quill.updateContents(Fe,S.default.sources.USER),ge.quill.setSelection(Fe.length()-Te.length,S.default.sources.SILENT),ge.quill.scrollingContainer.scrollTop=Ke,ge.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Le=this,ge=[],Te=[];return this.matchers.forEach(function(Fe){var Ke=o(Fe,2),it=Ke[0],rt=Ke[1];switch(it){case Node.TEXT_NODE:Te.push(rt);break;case Node.ELEMENT_NODE:ge.push(rt);break;default:[].forEach.call(Le.container.querySelectorAll(it),function(at){at[Y]=at[Y]||[],at[Y].push(rt)});break}}),[ge,Te]}}]),_e}(v.default);q.DEFAULTS={matchers:[],matchVisual:!0};function D(me,_e,Ae){return(typeof _e>"u"?"undefined":i(_e))==="object"?Object.keys(_e).reduce(function(Le,ge){return D(Le,ge,_e[ge])},me):me.reduce(function(Le,ge){return ge.attributes&&ge.attributes[_e]?Le.push(ge):Le.insert(ge.insert,(0,u.default)({},O({},_e,Ae),ge.attributes))},new p.default)}function $(me){if(me.nodeType!==Node.ELEMENT_NODE)return{};var _e="__ql-computed-style";return me[_e]||(me[_e]=window.getComputedStyle(me))}function ne(me,_e){for(var Ae="",Le=me.ops.length-1;Le>=0&&Ae.length<_e.length;--Le){var ge=me.ops[Le];if(typeof ge.insert!="string")break;Ae=ge.insert+Ae}return Ae.slice(-1*_e.length)===_e}function Z(me){if(me.childNodes.length===0)return!1;var _e=$(me);return["block","list-item"].indexOf(_e.display)>-1}function Q(me,_e,Ae){return me.nodeType===me.TEXT_NODE?Ae.reduce(function(Le,ge){return ge(me,Le)},new p.default):me.nodeType===me.ELEMENT_NODE?[].reduce.call(me.childNodes||[],function(Le,ge){var Te=Q(ge,_e,Ae);return ge.nodeType===me.ELEMENT_NODE&&(Te=_e.reduce(function(Fe,Ke){return Ke(ge,Fe)},Te),Te=(ge[Y]||[]).reduce(function(Fe,Ke){return Ke(ge,Fe)},Te)),Le.concat(Te)},new p.default):new p.default}function oe(me,_e,Ae){return D(Ae,me,!0)}function se(me,_e){var Ae=f.default.Attributor.Attribute.keys(me),Le=f.default.Attributor.Class.keys(me),ge=f.default.Attributor.Style.keys(me),Te={};return Ae.concat(Le).concat(ge).forEach(function(Fe){var Ke=f.default.query(Fe,f.default.Scope.ATTRIBUTE);Ke!=null&&(Te[Ke.attrName]=Ke.value(me),Te[Ke.attrName])||(Ke=V[Fe],Ke!=null&&(Ke.attrName===Fe||Ke.keyName===Fe)&&(Te[Ke.attrName]=Ke.value(me)||void 0),Ke=H[Fe],Ke!=null&&(Ke.attrName===Fe||Ke.keyName===Fe)&&(Ke=H[Fe],Te[Ke.attrName]=Ke.value(me)||void 0))}),Object.keys(Te).length>0&&(_e=D(_e,Te)),_e}function ue(me,_e){var Ae=f.default.query(me);if(Ae==null)return _e;if(Ae.prototype instanceof f.default.Embed){var Le={},ge=Ae.value(me);ge!=null&&(Le[Ae.blotName]=ge,_e=new p.default().insert(Le,Ae.formats(me)))}else typeof Ae.formats=="function"&&(_e=D(_e,Ae.blotName,Ae.formats(me)));return _e}function ve(me,_e){return ne(_e,`
|
|
141
|
-
`)||_e.insert(`
|
|
142
|
-
`),_e}function Pe(){return new p.default}function ke(me,_e){var Ae=f.default.query(me);if(Ae==null||Ae.blotName!=="list-item"||!ne(_e,`
|
|
143
|
-
`))return _e;for(var Le=-1,ge=me.parentNode;!ge.classList.contains("ql-clipboard");)(f.default.query(ge)||{}).blotName==="list"&&(Le+=1),ge=ge.parentNode;return Le<=0?_e:_e.compose(new p.default().retain(_e.length()-1).retain(1,{indent:Le}))}function Ne(me,_e){return ne(_e,`
|
|
144
|
-
`)||(Z(me)||_e.length()>0&&me.nextSibling&&Z(me.nextSibling))&&_e.insert(`
|
|
145
|
-
`),_e}function xe(me,_e){if(Z(me)&&me.nextElementSibling!=null&&!ne(_e,`
|
|
146
|
-
|
|
147
|
-
`)){var Ae=me.offsetHeight+parseFloat($(me).marginTop)+parseFloat($(me).marginBottom);me.nextElementSibling.offsetTop>me.offsetTop+Ae*1.5&&_e.insert(`
|
|
148
|
-
`)}return _e}function ye(me,_e){var Ae={},Le=me.style||{};return Le.fontStyle&&$(me).fontStyle==="italic"&&(Ae.italic=!0),Le.fontWeight&&($(me).fontWeight.startsWith("bold")||parseInt($(me).fontWeight)>=700)&&(Ae.bold=!0),Object.keys(Ae).length>0&&(_e=D(_e,Ae)),parseFloat(Le.textIndent||0)>0&&(_e=new p.default().insert(" ").concat(_e)),_e}function Ie(me,_e){var Ae=me.data;if(me.parentNode.tagName==="O:P")return _e.insert(Ae.trim());if(Ae.trim().length===0&&me.parentNode.classList.contains("ql-clipboard"))return _e;if(!$(me.parentNode).whiteSpace.startsWith("pre")){var Le=function(Te,Fe){return Fe=Fe.replace(/[^\u00a0]/g,""),Fe.length<1&&Te?" ":Fe};Ae=Ae.replace(/\r\n/g," ").replace(/\n/g," "),Ae=Ae.replace(/\s\s+/g,Le.bind(Le,!0)),(me.previousSibling==null&&Z(me.parentNode)||me.previousSibling!=null&&Z(me.previousSibling))&&(Ae=Ae.replace(/^\s+/,Le.bind(Le,!1))),(me.nextSibling==null&&Z(me.parentNode)||me.nextSibling!=null&&Z(me.nextSibling))&&(Ae=Ae.replace(/\s+$/,Le.bind(Le,!1)))}return _e.insert(Ae)}n.default=q,n.matchAttributor=se,n.matchBlot=ue,n.matchNewline=Ne,n.matchSpacing=xe,n.matchText=Ie},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(S,w){for(var b=0;b<w.length;b++){var g=w[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(S,g.key,g)}}return function(S,w,b){return w&&_(S.prototype,w),b&&_(S,b),S}}(),o=function _(S,w,b){S===null&&(S=Function.prototype);var g=Object.getOwnPropertyDescriptor(S,w);if(g===void 0){var v=Object.getPrototypeOf(S);return v===null?void 0:_(v,w,b)}else{if("value"in g)return g.value;var E=g.get;return E===void 0?void 0:E.call(b)}},s=a(6),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(){return d(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,[{key:"optimize",value:function(b){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),S}(c.default);f.blotName="bold",f.tagName=["STRONG","B"],n.default=f},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var i=function(){function A(L,O){var I=[],M=!0,G=!1,W=void 0;try{for(var Y=L[Symbol.iterator](),te;!(M=(te=Y.next()).done)&&(I.push(te.value),!(O&&I.length===O));M=!0);}catch(V){G=!0,W=V}finally{try{!M&&Y.return&&Y.return()}finally{if(G)throw W}}return I}return function(L,O){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return A(L,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function A(L,O){for(var I=0;I<O.length;I++){var M=O[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,M.key,M)}}return function(L,O,I){return O&&A(L.prototype,O),I&&A(L,I),L}}(),s=a(2),c=b(s),u=a(0),d=b(u),p=a(5),y=b(p),f=a(10),_=b(f),S=a(9),w=b(S);function b(A){return A&&A.__esModule?A:{default:A}}function g(A,L,O){return L in A?Object.defineProperty(A,L,{value:O,enumerable:!0,configurable:!0,writable:!0}):A[L]=O,A}function v(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}function E(A,L){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:A}function x(A,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);A.prototype=Object.create(L&&L.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(A,L):A.__proto__=L)}var j=(0,_.default)("quill:toolbar"),N=function(A){x(L,A);function L(O,I){v(this,L);var M=E(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,O,I));if(Array.isArray(M.options.container)){var G=document.createElement("div");F(G,M.options.container),O.container.parentNode.insertBefore(G,O.container),M.container=G}else typeof M.options.container=="string"?M.container=document.querySelector(M.options.container):M.container=M.options.container;if(!(M.container instanceof HTMLElement)){var W;return W=j.error("Container required for toolbar",M.options),E(M,W)}return M.container.classList.add("ql-toolbar"),M.controls=[],M.handlers={},Object.keys(M.options.handlers).forEach(function(Y){M.addHandler(Y,M.options.handlers[Y])}),[].forEach.call(M.container.querySelectorAll("button, select"),function(Y){M.attach(Y)}),M.quill.on(y.default.events.EDITOR_CHANGE,function(Y,te){Y===y.default.events.SELECTION_CHANGE&&M.update(te)}),M.quill.on(y.default.events.SCROLL_OPTIMIZE,function(){var Y=M.quill.selection.getRange(),te=i(Y,1),V=te[0];M.update(V)}),M}return o(L,[{key:"addHandler",value:function(I,M){this.handlers[I]=M}},{key:"attach",value:function(I){var M=this,G=[].find.call(I.classList,function(Y){return Y.indexOf("ql-")===0});if(G){if(G=G.slice(3),I.tagName==="BUTTON"&&I.setAttribute("type","button"),this.handlers[G]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[G]==null){j.warn("ignoring attaching to disabled format",G,I);return}if(d.default.query(G)==null){j.warn("ignoring attaching to nonexistent format",G,I);return}}var W=I.tagName==="SELECT"?"change":"click";I.addEventListener(W,function(Y){var te=void 0;if(I.tagName==="SELECT"){if(I.selectedIndex<0)return;var V=I.options[I.selectedIndex];V.hasAttribute("selected")?te=!1:te=V.value||!1}else I.classList.contains("ql-active")?te=!1:te=I.value||!I.hasAttribute("value"),Y.preventDefault();M.quill.focus();var H=M.quill.selection.getRange(),q=i(H,1),D=q[0];if(M.handlers[G]!=null)M.handlers[G].call(M,te);else if(d.default.query(G).prototype instanceof d.default.Embed){if(te=prompt("Enter "+G),!te)return;M.quill.updateContents(new c.default().retain(D.index).delete(D.length).insert(g({},G,te)),y.default.sources.USER)}else M.quill.format(G,te,y.default.sources.USER);M.update(D)}),this.controls.push([G,I])}}},{key:"update",value:function(I){var M=I==null?{}:this.quill.getFormat(I);this.controls.forEach(function(G){var W=i(G,2),Y=W[0],te=W[1];if(te.tagName==="SELECT"){var V=void 0;if(I==null)V=null;else if(M[Y]==null)V=te.querySelector("option[selected]");else if(!Array.isArray(M[Y])){var H=M[Y];typeof H=="string"&&(H=H.replace(/\"/g,'\\"')),V=te.querySelector('option[value="'+H+'"]')}V==null?(te.value="",te.selectedIndex=-1):V.selected=!0}else if(I==null)te.classList.remove("ql-active");else if(te.hasAttribute("value")){var q=M[Y]===te.getAttribute("value")||M[Y]!=null&&M[Y].toString()===te.getAttribute("value")||M[Y]==null&&!te.getAttribute("value");te.classList.toggle("ql-active",q)}else te.classList.toggle("ql-active",M[Y]!=null)})}}]),L}(w.default);N.DEFAULTS={};function T(A,L,O){var I=document.createElement("button");I.setAttribute("type","button"),I.classList.add("ql-"+L),O!=null&&(I.value=O),A.appendChild(I)}function F(A,L){Array.isArray(L[0])||(L=[L]),L.forEach(function(O){var I=document.createElement("span");I.classList.add("ql-formats"),O.forEach(function(M){if(typeof M=="string")T(I,M);else{var G=Object.keys(M)[0],W=M[G];Array.isArray(W)?C(I,G,W):T(I,G,W)}}),A.appendChild(I)})}function C(A,L,O){var I=document.createElement("select");I.classList.add("ql-"+L),O.forEach(function(M){var G=document.createElement("option");M!==!1?G.setAttribute("value",M):G.setAttribute("selected","selected"),I.appendChild(G)}),A.appendChild(I)}N.DEFAULTS={container:null,handlers:{clean:function(){var L=this,O=this.quill.getSelection();if(O!=null)if(O.length==0){var I=this.quill.getFormat();Object.keys(I).forEach(function(M){d.default.query(M,d.default.Scope.INLINE)!=null&&L.quill.format(M,!1)})}else this.quill.removeFormat(O,y.default.sources.USER)},direction:function(L){var O=this.quill.getFormat().align;L==="rtl"&&O==null?this.quill.format("align","right",y.default.sources.USER):!L&&O==="right"&&this.quill.format("align",!1,y.default.sources.USER),this.quill.format("direction",L,y.default.sources.USER)},indent:function(L){var O=this.quill.getSelection(),I=this.quill.getFormat(O),M=parseInt(I.indent||0);if(L==="+1"||L==="-1"){var G=L==="+1"?1:-1;I.direction==="rtl"&&(G*=-1),this.quill.format("indent",M+G,y.default.sources.USER)}},link:function(L){L===!0&&(L=prompt("Enter link URL:")),this.quill.format("link",L,y.default.sources.USER)},list:function(L){var O=this.quill.getSelection(),I=this.quill.getFormat(O);L==="check"?I.list==="checked"||I.list==="unchecked"?this.quill.format("list",!1,y.default.sources.USER):this.quill.format("list","unchecked",y.default.sources.USER):this.quill.format("list",L,y.default.sources.USER)}}},n.default=N,n.addControls=F},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(S,w){for(var b=0;b<w.length;b++){var g=w[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(S,g.key,g)}}return function(S,w,b){return w&&_(S.prototype,w),b&&_(S,b),S}}(),o=function _(S,w,b){S===null&&(S=Function.prototype);var g=Object.getOwnPropertyDescriptor(S,w);if(g===void 0){var v=Object.getPrototypeOf(S);return v===null?void 0:_(v,w,b)}else{if("value"in g)return g.value;var E=g.get;return E===void 0?void 0:E.call(b)}},s=a(28),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(w,b){d(this,S);var g=p(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,w));return g.label.innerHTML=b,g.container.classList.add("ql-color-picker"),[].slice.call(g.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(v){v.classList.add("ql-primary")}),g}return i(S,[{key:"buildItem",value:function(b){var g=o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"buildItem",this).call(this,b);return g.style.backgroundColor=b.getAttribute("value")||"",g}},{key:"selectItem",value:function(b,g){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"selectItem",this).call(this,b,g);var v=this.label.querySelector(".ql-color-label"),E=b&&b.getAttribute("data-value")||"";v&&(v.tagName==="line"?v.style.stroke=E:v.style.fill=E)}}]),S}(c.default);n.default=f},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(S,w){for(var b=0;b<w.length;b++){var g=w[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(S,g.key,g)}}return function(S,w,b){return w&&_(S.prototype,w),b&&_(S,b),S}}(),o=function _(S,w,b){S===null&&(S=Function.prototype);var g=Object.getOwnPropertyDescriptor(S,w);if(g===void 0){var v=Object.getPrototypeOf(S);return v===null?void 0:_(v,w,b)}else{if("value"in g)return g.value;var E=g.get;return E===void 0?void 0:E.call(b)}},s=a(28),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(w,b){d(this,S);var g=p(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,w));return g.container.classList.add("ql-icon-picker"),[].forEach.call(g.container.querySelectorAll(".ql-picker-item"),function(v){v.innerHTML=b[v.getAttribute("data-value")||""]}),g.defaultItem=g.container.querySelector(".ql-selected"),g.selectItem(g.defaultItem),g}return i(S,[{key:"selectItem",value:function(b,g){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"selectItem",this).call(this,b,g),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),S}(c.default);n.default=f},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function c(u,d){for(var p=0;p<d.length;p++){var y=d[p];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(u,y.key,y)}}return function(u,d,p){return d&&c(u.prototype,d),p&&c(u,p),u}}();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var s=function(){function c(u,d){var p=this;o(this,c),this.quill=u,this.boundsContainer=d||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return i(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,y=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=y+"px",this.root.classList.remove("ql-flip");var f=this.boundsContainer.getBoundingClientRect(),_=this.root.getBoundingClientRect(),S=0;if(_.right>f.right&&(S=f.right-_.right,this.root.style.left=p+S+"px"),_.left<f.left&&(S=f.left-_.left,this.root.style.left=p+S+"px"),_.bottom>f.bottom){var w=_.bottom-_.top,b=d.bottom-d.top+w;this.root.style.top=y-b+"px",this.root.classList.add("ql-flip")}return S}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c}();n.default=s},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function C(A,L){var O=[],I=!0,M=!1,G=void 0;try{for(var W=A[Symbol.iterator](),Y;!(I=(Y=W.next()).done)&&(O.push(Y.value),!(L&&O.length===L));I=!0);}catch(te){M=!0,G=te}finally{try{!I&&W.return&&W.return()}finally{if(M)throw G}}return O}return function(A,L){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return C(A,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function C(A,L,O){A===null&&(A=Function.prototype);var I=Object.getOwnPropertyDescriptor(A,L);if(I===void 0){var M=Object.getPrototypeOf(A);return M===null?void 0:C(M,L,O)}else{if("value"in I)return I.value;var G=I.get;return G===void 0?void 0:G.call(O)}},s=function(){function C(A,L){for(var O=0;O<L.length;O++){var I=L[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(A,I.key,I)}}return function(A,L,O){return L&&C(A.prototype,L),O&&C(A,O),A}}(),c=a(3),u=v(c),d=a(8),p=v(d),y=a(43),f=v(y),_=a(27),S=v(_),w=a(15),b=a(41),g=v(b);function v(C){return C&&C.__esModule?C:{default:C}}function E(C,A){if(!(C instanceof A))throw new TypeError("Cannot call a class as a function")}function x(C,A){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:C}function j(C,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);C.prototype=Object.create(A&&A.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(C,A):C.__proto__=A)}var N=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(C){j(A,C);function A(L,O){E(this,A),O.modules.toolbar!=null&&O.modules.toolbar.container==null&&(O.modules.toolbar.container=N);var I=x(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,O));return I.quill.container.classList.add("ql-snow"),I}return s(A,[{key:"extendToolbar",value:function(O){O.container.classList.add("ql-snow"),this.buildButtons([].slice.call(O.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(O.container.querySelectorAll("select")),g.default),this.tooltip=new F(this.quill,this.options.bounds),O.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(I,M){O.handlers.link.call(O,!M.format.link)})}}]),A}(f.default);T.DEFAULTS=(0,u.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var L=this.quill.getSelection();if(L==null||L.length==0)return;var O=this.quill.getText(L);/^\S+@\S+\.\S+$/.test(O)&&O.indexOf("mailto:")!==0&&(O="mailto:"+O);var I=this.quill.theme.tooltip;I.edit("link",O)}else this.quill.format("link",!1)}}}}});var F=function(C){j(A,C);function A(L,O){E(this,A);var I=x(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,O));return I.preview=I.root.querySelector("a.ql-preview"),I}return s(A,[{key:"listen",value:function(){var O=this;o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(I){O.root.classList.contains("ql-editing")?O.save():O.edit("link",O.preview.textContent),I.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(I){if(O.linkRange!=null){var M=O.linkRange;O.restoreFocus(),O.quill.formatText(M,"link",!1,p.default.sources.USER),delete O.linkRange}I.preventDefault(),O.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(I,M,G){if(I!=null){if(I.length===0&&G===p.default.sources.USER){var W=O.quill.scroll.descendant(S.default,I.index),Y=i(W,2),te=Y[0],V=Y[1];if(te!=null){O.linkRange=new w.Range(I.index-V,te.length());var H=S.default.formats(te.domNode);O.preview.textContent=H,O.preview.setAttribute("href",H),O.show(),O.position(O.quill.getBounds(O.linkRange));return}}else delete O.linkRange;O.hide()}})}},{key:"show",value:function(){o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A}(y.BaseTooltip);F.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=T},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(29),o=ge(i),s=a(36),c=a(38),u=a(64),d=a(65),p=ge(d),y=a(66),f=ge(y),_=a(67),S=ge(_),w=a(37),b=a(26),g=a(39),v=a(40),E=a(56),x=ge(E),j=a(68),N=ge(j),T=a(27),F=ge(T),C=a(69),A=ge(C),L=a(70),O=ge(L),I=a(71),M=ge(I),G=a(72),W=ge(G),Y=a(73),te=ge(Y),V=a(13),H=ge(V),q=a(74),D=ge(q),$=a(75),ne=ge($),Z=a(57),Q=ge(Z),oe=a(41),se=ge(oe),ue=a(28),ve=ge(ue),Pe=a(59),ke=ge(Pe),Ne=a(60),xe=ge(Ne),ye=a(61),Ie=ge(ye),me=a(108),_e=ge(me),Ae=a(62),Le=ge(Ae);function ge(Te){return Te&&Te.__esModule?Te:{default:Te}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":w.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":g.FontClass,"attributors/class/size":v.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":w.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":g.FontStyle,"attributors/style/size":v.SizeStyle},!0),o.default.register({"formats/align":s.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":u.IndentClass,"formats/background":w.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":g.FontClass,"formats/size":v.SizeClass,"formats/blockquote":p.default,"formats/code-block":H.default,"formats/header":f.default,"formats/list":S.default,"formats/bold":x.default,"formats/code":V.Code,"formats/italic":N.default,"formats/link":F.default,"formats/script":A.default,"formats/strike":O.default,"formats/underline":M.default,"formats/image":W.default,"formats/video":te.default,"formats/list/item":_.ListItem,"modules/formula":D.default,"modules/syntax":ne.default,"modules/toolbar":Q.default,"themes/bubble":_e.default,"themes/snow":Le.default,"ui/icons":se.default,"ui/picker":ve.default,"ui/icon-picker":xe.default,"ui/color-picker":ke.default,"ui/tooltip":Ie.default},!0),n.default=o.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var i=function(){function S(w,b){for(var g=0;g<b.length;g++){var v=b[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(w,v.key,v)}}return function(w,b,g){return b&&S(w.prototype,b),g&&S(w,g),w}}(),o=function S(w,b,g){w===null&&(w=Function.prototype);var v=Object.getOwnPropertyDescriptor(w,b);if(v===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:S(E,b,g)}else{if("value"in v)return v.value;var x=v.get;return x===void 0?void 0:x.call(g)}},s=a(0),c=u(s);function u(S){return S&&S.__esModule?S:{default:S}}function d(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function p(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function y(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var f=function(S){y(w,S);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return i(w,[{key:"add",value:function(g,v){if(v==="+1"||v==="-1"){var E=this.value(g)||0;v=v==="+1"?E+1:E-1}return v===0?(this.remove(g),!0):o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"add",this).call(this,g,v)}},{key:"canAdd",value:function(g,v){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"canAdd",this).call(this,g,v)||o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"canAdd",this).call(this,g,parseInt(v))}},{key:"value",value:function(g){return parseInt(o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,g))||void 0}}]),w}(c.default.Attributor.Class),_=new f("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(4),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}function c(y,f){if(!(y instanceof f))throw new TypeError("Cannot call a class as a function")}function u(y,f){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:y}function d(y,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);y.prototype=Object.create(f&&f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(y,f):y.__proto__=f)}var p=function(y){d(f,y);function f(){return c(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function f(_,S){for(var w=0;w<S.length;w++){var b=S[w];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(_,b.key,b)}}return function(_,S,w){return S&&f(_.prototype,S),w&&f(_,w),_}}(),o=a(4),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function u(f,_){if(!(f instanceof _))throw new TypeError("Cannot call a class as a function")}function d(f,_){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:f}function p(f,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);f.prototype=Object.create(_&&_.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(f,_):f.__proto__=_)}var y=function(f){p(_,f);function _(){return u(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return i(_,null,[{key:"formats",value:function(w){return this.tagName.indexOf(w.tagName)+1}}]),_}(s.default);y.blotName="header",y.tagName=["H1","H2","H3","H4","H5","H6"],n.default=y},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var i=function(){function E(x,j){for(var N=0;N<j.length;N++){var T=j[N];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(x,T.key,T)}}return function(x,j,N){return j&&E(x.prototype,j),N&&E(x,N),x}}(),o=function E(x,j,N){x===null&&(x=Function.prototype);var T=Object.getOwnPropertyDescriptor(x,j);if(T===void 0){var F=Object.getPrototypeOf(x);return F===null?void 0:E(F,j,N)}else{if("value"in T)return T.value;var C=T.get;return C===void 0?void 0:C.call(N)}},s=a(0),c=f(s),u=a(4),d=f(u),p=a(25),y=f(p);function f(E){return E&&E.__esModule?E:{default:E}}function _(E,x,j){return x in E?Object.defineProperty(E,x,{value:j,enumerable:!0,configurable:!0,writable:!0}):E[x]=j,E}function S(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}function w(E,x){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:E}function b(E,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);E.prototype=Object.create(x&&x.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(E,x):E.__proto__=x)}var g=function(E){b(x,E);function x(){return S(this,x),w(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,[{key:"format",value:function(N,T){N===v.blotName&&!T?this.replaceWith(c.default.create(this.statics.scope)):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,N,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(N,T){return this.parent.isolate(this.offset(this.parent),this.length()),N===this.parent.statics.blotName?(this.parent.replaceWith(N,T),this):(this.parent.unwrap(),o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,N,T))}}],[{key:"formats",value:function(N){return N.tagName===this.tagName?void 0:o(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,N)}}]),x}(d.default);g.blotName="list-item",g.tagName="LI";var v=function(E){b(x,E),i(x,null,[{key:"create",value:function(N){var T=N==="ordered"?"OL":"UL",F=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,T);return(N==="checked"||N==="unchecked")&&F.setAttribute("data-checked",N==="checked"),F}},{key:"formats",value:function(N){if(N.tagName==="OL")return"ordered";if(N.tagName==="UL")return N.hasAttribute("data-checked")?N.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(j){S(this,x);var N=w(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,j)),T=function(C){if(C.target.parentNode===j){var A=N.statics.formats(j),L=c.default.find(C.target);A==="checked"?L.format("list","unchecked"):A==="unchecked"&&L.format("list","checked")}};return j.addEventListener("touchstart",T),j.addEventListener("mousedown",T),N}return i(x,[{key:"format",value:function(N,T){this.children.length>0&&this.children.tail.format(N,T)}},{key:"formats",value:function(){return _({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(N,T){if(N instanceof g)o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,N,T);else{var F=T==null?this.length():T.offset(this),C=this.split(F);C.parent.insertBefore(N,C)}}},{key:"optimize",value:function(N){o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,N);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(N){if(N.statics.blotName!==this.statics.blotName){var T=c.default.create(this.statics.defaultChild);N.moveChildren(T),this.appendChild(T)}o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,N)}}]),x}(y.default);v.blotName="list",v.scope=c.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[g],n.ListItem=g,n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(56),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}function c(y,f){if(!(y instanceof f))throw new TypeError("Cannot call a class as a function")}function u(y,f){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:y}function d(y,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);y.prototype=Object.create(f&&f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(y,f):y.__proto__=f)}var p=function(y){d(f,y);function f(){return c(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function _(S,w){for(var b=0;b<w.length;b++){var g=w[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(S,g.key,g)}}return function(S,w,b){return w&&_(S.prototype,w),b&&_(S,b),S}}(),o=function _(S,w,b){S===null&&(S=Function.prototype);var g=Object.getOwnPropertyDescriptor(S,w);if(g===void 0){var v=Object.getPrototypeOf(S);return v===null?void 0:_(v,w,b)}else{if("value"in g)return g.value;var E=g.get;return E===void 0?void 0:E.call(b)}},s=a(6),c=u(s);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function p(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function y(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var f=function(_){y(S,_);function S(){return d(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),S}(c.default);f.blotName="script",f.tagName=["SUB","SUP"],n.default=f},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(6),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}function c(y,f){if(!(y instanceof f))throw new TypeError("Cannot call a class as a function")}function u(y,f){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:y}function d(y,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);y.prototype=Object.create(f&&f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(y,f):y.__proto__=f)}var p=function(y){d(f,y);function f(){return c(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);p.blotName="strike",p.tagName="S",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=a(6),o=s(i);function s(y){return y&&y.__esModule?y:{default:y}}function c(y,f){if(!(y instanceof f))throw new TypeError("Cannot call a class as a function")}function u(y,f){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:y}function d(y,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);y.prototype=Object.create(f&&f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(y,f):y.__proto__=f)}var p=function(y){d(f,y);function f(){return c(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);p.blotName="underline",p.tagName="U",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function w(b,g){for(var v=0;v<g.length;v++){var E=g[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,g,v){return g&&w(b.prototype,g),v&&w(b,v),b}}(),o=function w(b,g,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,g);if(E===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:w(x,g,v)}else{if("value"in E)return E.value;var j=E.get;return j===void 0?void 0:j.call(v)}},s=a(0),c=d(s),u=a(27);function d(w){return w&&w.__esModule?w:{default:w}}function p(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function y(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function f(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var _=["alt","height","width"],S=function(w){f(b,w);function b(){return p(this,b),y(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,[{key:"format",value:function(v,E){_.indexOf(v)>-1?E?this.domNode.setAttribute(v,E):this.domNode.removeAttribute(v):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,v,E)}}],[{key:"create",value:function(v){var E=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,v);return typeof v=="string"&&E.setAttribute("src",this.sanitize(v)),E}},{key:"formats",value:function(v){return _.reduce(function(E,x){return v.hasAttribute(x)&&(E[x]=v.getAttribute(x)),E},{})}},{key:"match",value:function(v){return/\.(jpe?g|gif|png)$/.test(v)||/^data:image\/.+;base64/.test(v)}},{key:"sanitize",value:function(v){return(0,u.sanitize)(v,["http","https","data"])?v:"//:0"}},{key:"value",value:function(v){return v.getAttribute("src")}}]),b}(c.default.Embed);S.blotName="image",S.tagName="IMG",n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function w(b,g){for(var v=0;v<g.length;v++){var E=g[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,g,v){return g&&w(b.prototype,g),v&&w(b,v),b}}(),o=function w(b,g,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,g);if(E===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:w(x,g,v)}else{if("value"in E)return E.value;var j=E.get;return j===void 0?void 0:j.call(v)}},s=a(4),c=a(27),u=d(c);function d(w){return w&&w.__esModule?w:{default:w}}function p(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function y(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function f(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var _=["height","width"],S=function(w){f(b,w);function b(){return p(this,b),y(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,[{key:"format",value:function(v,E){_.indexOf(v)>-1?E?this.domNode.setAttribute(v,E):this.domNode.removeAttribute(v):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,v,E)}}],[{key:"create",value:function(v){var E=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,v);return E.setAttribute("frameborder","0"),E.setAttribute("allowfullscreen",!0),E.setAttribute("src",this.sanitize(v)),E}},{key:"formats",value:function(v){return _.reduce(function(E,x){return v.hasAttribute(x)&&(E[x]=v.getAttribute(x)),E},{})}},{key:"sanitize",value:function(v){return u.default.sanitize(v)}},{key:"value",value:function(v){return v.getAttribute("src")}}]),b}(s.BlockEmbed);S.blotName="video",S.className="ql-video",S.tagName="IFRAME",n.default=S},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var i=function(){function v(E,x){for(var j=0;j<x.length;j++){var N=x[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(E,N.key,N)}}return function(E,x,j){return x&&v(E.prototype,x),j&&v(E,j),E}}(),o=function v(E,x,j){E===null&&(E=Function.prototype);var N=Object.getOwnPropertyDescriptor(E,x);if(N===void 0){var T=Object.getPrototypeOf(E);return T===null?void 0:v(T,x,j)}else{if("value"in N)return N.value;var F=N.get;return F===void 0?void 0:F.call(j)}},s=a(35),c=f(s),u=a(5),d=f(u),p=a(9),y=f(p);function f(v){return v&&v.__esModule?v:{default:v}}function _(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function S(v,E){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:v}function w(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(v,E):v.__proto__=E)}var b=function(v){w(E,v);function E(){return _(this,E),S(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return i(E,null,[{key:"create",value:function(j){var N=o(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,j);return typeof j=="string"&&(window.katex.render(j,N,{throwOnError:!1,errorColor:"#f00"}),N.setAttribute("data-value",j)),N}},{key:"value",value:function(j){return j.getAttribute("data-value")}}]),E}(c.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var g=function(v){w(E,v),i(E,null,[{key:"register",value:function(){d.default.register(b,!0)}}]);function E(){_(this,E);var x=S(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return E}(y.default);n.FormulaBlot=b,n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var i=function(){function j(N,T){for(var F=0;F<T.length;F++){var C=T[F];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(N,C.key,C)}}return function(N,T,F){return T&&j(N.prototype,T),F&&j(N,F),N}}(),o=function j(N,T,F){N===null&&(N=Function.prototype);var C=Object.getOwnPropertyDescriptor(N,T);if(C===void 0){var A=Object.getPrototypeOf(N);return A===null?void 0:j(A,T,F)}else{if("value"in C)return C.value;var L=C.get;return L===void 0?void 0:L.call(F)}},s=a(0),c=S(s),u=a(5),d=S(u),p=a(9),y=S(p),f=a(13),_=S(f);function S(j){return j&&j.__esModule?j:{default:j}}function w(j,N){if(!(j instanceof N))throw new TypeError("Cannot call a class as a function")}function b(j,N){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:j}function g(j,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);j.prototype=Object.create(N&&N.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(j,N):j.__proto__=N)}var v=function(j){g(N,j);function N(){return w(this,N),b(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return i(N,[{key:"replaceWith",value:function(F){this.domNode.textContent=this.domNode.textContent,this.attach(),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replaceWith",this).call(this,F)}},{key:"highlight",value:function(F){var C=this.domNode.textContent;this.cachedText!==C&&((C.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=F(C),this.domNode.normalize(),this.attach()),this.cachedText=C)}}]),N}(_.default);v.className="ql-syntax";var E=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),x=function(j){g(N,j),i(N,null,[{key:"register",value:function(){d.default.register(E,!0),d.default.register(v,!0)}}]);function N(T,F){w(this,N);var C=b(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,T,F));if(typeof C.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return C.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){C.highlight(),A=null},C.options.interval)}),C.highlight(),C}return i(N,[{key:"highlight",value:function(){var F=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var C=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(A){A.highlight(F.options.highlight)}),this.quill.update(d.default.sources.SILENT),C!=null&&this.quill.setSelection(C,d.default.sources.SILENT)}}}]),N}(y.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(j){var N=window.hljs.highlightAuto(j);return N.value}}(),interval:1e3},n.CodeBlock=v,n.CodeToken=E,n.default=x},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var i=function N(T,F,C){T===null&&(T=Function.prototype);var A=Object.getOwnPropertyDescriptor(T,F);if(A===void 0){var L=Object.getPrototypeOf(T);return L===null?void 0:N(L,F,C)}else{if("value"in A)return A.value;var O=A.get;return O===void 0?void 0:O.call(C)}},o=function(){function N(T,F){for(var C=0;C<F.length;C++){var A=F[C];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(T,A.key,A)}}return function(T,F,C){return F&&N(T.prototype,F),C&&N(T,C),T}}(),s=a(3),c=w(s),u=a(8),d=w(u),p=a(43),y=w(p),f=a(15),_=a(41),S=w(_);function w(N){return N&&N.__esModule?N:{default:N}}function b(N,T){if(!(N instanceof T))throw new TypeError("Cannot call a class as a function")}function g(N,T){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:N}function v(N,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);N.prototype=Object.create(T&&T.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(N,T):N.__proto__=T)}var E=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(N){v(T,N);function T(F,C){b(this,T),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=E);var A=g(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,F,C));return A.quill.container.classList.add("ql-bubble"),A}return o(T,[{key:"extendToolbar",value:function(C){this.tooltip=new j(this.quill,this.options.bounds),this.tooltip.root.appendChild(C.container),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),S.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),S.default)}}]),T}(y.default);x.DEFAULTS=(0,c.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var j=function(N){v(T,N);function T(F,C){b(this,T);var A=g(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,F,C));return A.quill.on(d.default.events.EDITOR_CHANGE,function(L,O,I,M){if(L===d.default.events.SELECTION_CHANGE)if(O!=null&&O.length>0&&M===d.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var G=A.quill.getLines(O.index,O.length);if(G.length===1)A.position(A.quill.getBounds(O));else{var W=G[G.length-1],Y=A.quill.getIndex(W),te=Math.min(W.length()-1,O.index+O.length-Y),V=A.quill.getBounds(new f.Range(Y,te));A.position(V)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return o(T,[{key:"listen",value:function(){var C=this;i(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){C.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!C.root.classList.contains("ql-hidden")){var A=C.quill.getSelection();A!=null&&C.position(C.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(C){var A=i(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,C),L=this.root.querySelector(".ql-tooltip-arrow");if(L.style.marginLeft="",A===0)return A;L.style.marginLeft=-1*A-L.offsetWidth/2+"px"}}]),T}(p.BaseTooltip);j.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=j,n.default=x},function(t,n,a){t.exports=a(63)}]).default})}(m1)),m1.exports}var ic={},y1={exports:{}},wf={},np={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var RA=np.exports,Fb;function MA(){return Fb||(Fb=1,function(e,r){(function(t){var n=r&&!r.nodeType&&r,a=e&&!e.nodeType&&e,i=typeof bh=="object"&&bh;(i.global===i||i.window===i||i.self===i)&&(t=i);var o,s=2147483647,c=36,u=1,d=26,p=38,y=700,f=72,_=128,S="-",w=/^xn--/,b=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-u,x=Math.floor,j=String.fromCharCode,N;function T(V){throw new RangeError(v[V])}function F(V,H){for(var q=V.length,D=[];q--;)D[q]=H(V[q]);return D}function C(V,H){var q=V.split("@"),D="";q.length>1&&(D=q[0]+"@",V=q[1]),V=V.replace(g,".");var $=V.split("."),ne=F($,H).join(".");return D+ne}function A(V){for(var H=[],q=0,D=V.length,$,ne;q<D;)$=V.charCodeAt(q++),$>=55296&&$<=56319&&q<D?(ne=V.charCodeAt(q++),(ne&64512)==56320?H.push((($&1023)<<10)+(ne&1023)+65536):(H.push($),q--)):H.push($);return H}function L(V){return F(V,function(H){var q="";return H>65535&&(H-=65536,q+=j(H>>>10&1023|55296),H=56320|H&1023),q+=j(H),q}).join("")}function O(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:c}function I(V,H){return V+22+75*(V<26)-((H!=0)<<5)}function M(V,H,q){var D=0;for(V=q?x(V/y):V>>1,V+=x(V/H);V>E*d>>1;D+=c)V=x(V/E);return x(D+(E+1)*V/(V+p))}function G(V){var H=[],q=V.length,D,$=0,ne=_,Z=f,Q,oe,se,ue,ve,Pe,ke,Ne,xe;for(Q=V.lastIndexOf(S),Q<0&&(Q=0),oe=0;oe<Q;++oe)V.charCodeAt(oe)>=128&&T("not-basic"),H.push(V.charCodeAt(oe));for(se=Q>0?Q+1:0;se<q;){for(ue=$,ve=1,Pe=c;se>=q&&T("invalid-input"),ke=O(V.charCodeAt(se++)),(ke>=c||ke>x((s-$)/ve))&&T("overflow"),$+=ke*ve,Ne=Pe<=Z?u:Pe>=Z+d?d:Pe-Z,!(ke<Ne);Pe+=c)xe=c-Ne,ve>x(s/xe)&&T("overflow"),ve*=xe;D=H.length+1,Z=M($-ue,D,ue==0),x($/D)>s-ne&&T("overflow"),ne+=x($/D),$%=D,H.splice($++,0,ne)}return L(H)}function W(V){var H,q,D,$,ne,Z,Q,oe,se,ue,ve,Pe=[],ke,Ne,xe,ye;for(V=A(V),ke=V.length,H=_,q=0,ne=f,Z=0;Z<ke;++Z)ve=V[Z],ve<128&&Pe.push(j(ve));for(D=$=Pe.length,$&&Pe.push(S);D<ke;){for(Q=s,Z=0;Z<ke;++Z)ve=V[Z],ve>=H&&ve<Q&&(Q=ve);for(Ne=D+1,Q-H>x((s-q)/Ne)&&T("overflow"),q+=(Q-H)*Ne,H=Q,Z=0;Z<ke;++Z)if(ve=V[Z],ve<H&&++q>s&&T("overflow"),ve==H){for(oe=q,se=c;ue=se<=ne?u:se>=ne+d?d:se-ne,!(oe<ue);se+=c)ye=oe-ue,xe=c-ue,Pe.push(j(I(ue+ye%xe,0))),oe=x(ye/xe);Pe.push(j(I(oe,0))),ne=M(q,Ne,D==$),q=0,++D}++q,++H}return Pe.join("")}function Y(V){return C(V,function(H){return w.test(H)?G(H.slice(4).toLowerCase()):H})}function te(V){return C(V,function(H){return b.test(H)?"xn--"+W(H):H})}if(o={version:"1.4.1",ucs2:{decode:A,encode:L},decode:G,encode:W,toASCII:te,toUnicode:Y},n&&a)if(e.exports==n)a.exports=o;else for(N in o)o.hasOwnProperty(N)&&(n[N]=o[N]);else t.punycode=o})(RA)}(np,np.exports)),np.exports}var xg,Db;function Fh(){return Db||(Db=1,xg=TypeError),xg}const IA={},jA=Object.freeze(Object.defineProperty({__proto__:null,default:IA},Symbol.toStringTag,{value:"Module"})),FA=Zc(jA);var Eg,Bb;function a0(){if(Bb)return Eg;Bb=1;var e=typeof Map=="function"&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=e&&r&&typeof r.get=="function"?r.get:null,n=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=a&&i&&typeof i.get=="function"?i.get:null,s=a&&Set.prototype.forEach,c=typeof WeakMap=="function"&&WeakMap.prototype,u=c?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,p=d?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,f=y?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,S=Object.prototype.toString,w=Function.prototype.toString,b=String.prototype.match,g=String.prototype.slice,v=String.prototype.replace,E=String.prototype.toUpperCase,x=String.prototype.toLowerCase,j=RegExp.prototype.test,N=Array.prototype.concat,T=Array.prototype.join,F=Array.prototype.slice,C=Math.floor,A=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,G=Object.prototype.propertyIsEnumerable,W=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Oe){return Oe.__proto__}:null);function Y(Oe,Me){if(Oe===1/0||Oe===-1/0||Oe!==Oe||Oe&&Oe>-1e3&&Oe<1e3||j.call(/e/,Me))return Me;var mt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Oe=="number"){var Mt=Oe<0?-C(-Oe):C(Oe);if(Mt!==Oe){var Lt=String(Mt),At=g.call(Me,Lt.length+1);return v.call(Lt,mt,"$&_")+"."+v.call(v.call(At,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(Me,mt,"$&_")}var te=FA,V=te.custom,H=Ne(V)?V:null,q={__proto__:null,double:'"',single:"'"},D={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Eg=function Oe(Me,mt,Mt,Lt){var At=mt||{};if(Ie(At,"quoteStyle")&&!Ie(q,At.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ie(At,"maxStringLength")&&(typeof At.maxStringLength=="number"?At.maxStringLength<0&&At.maxStringLength!==1/0:At.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var fr=Ie(At,"customInspect")?At.customInspect:!0;if(typeof fr!="boolean"&&fr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ie(At,"indent")&&At.indent!==null&&At.indent!==" "&&!(parseInt(At.indent,10)===At.indent&&At.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ie(At,"numericSeparator")&&typeof At.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Qt=At.numericSeparator;if(typeof Me>"u")return"undefined";if(Me===null)return"null";if(typeof Me=="boolean")return Me?"true":"false";if(typeof Me=="string")return rt(Me,At);if(typeof Me=="number"){if(Me===0)return 1/0/Me>0?"0":"-0";var ze=String(Me);return Qt?Y(Me,ze):ze}if(typeof Me=="bigint"){var qe=String(Me)+"n";return Qt?Y(Me,qe):qe}var vt=typeof At.depth>"u"?5:At.depth;if(typeof Mt>"u"&&(Mt=0),Mt>=vt&&vt>0&&typeof Me=="object")return Q(Me)?"[Array]":"[Object]";var pt=Ot(At,Mt);if(typeof Lt>"u")Lt=[];else if(Ae(Lt,Me)>=0)return"[Circular]";function Je(ua,ao,ws){if(ao&&(Lt=F.call(Lt),Lt.push(ao)),ws){var Go={depth:At.depth};return Ie(At,"quoteStyle")&&(Go.quoteStyle=At.quoteStyle),Oe(ua,Go,Mt+1,Lt)}return Oe(ua,At,Mt+1,Lt)}if(typeof Me=="function"&&!se(Me)){var _t=_e(Me),Ye=$t(Me,Je);return"[Function"+(_t?": "+_t:" (anonymous)")+"]"+(Ye.length>0?" { "+T.call(Ye,", ")+" }":"")}if(Ne(Me)){var Pt=I?v.call(String(Me),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(Me);return typeof Me=="object"&&!I?bt(Pt):Pt}if(it(Me)){for(var Dt="<"+x.call(String(Me.nodeName)),Wt=Me.attributes||[],Zt=0;Zt<Wt.length;Zt++)Dt+=" "+Wt[Zt].name+"="+$(ne(Wt[Zt].value),"double",At);return Dt+=">",Me.childNodes&&Me.childNodes.length&&(Dt+="..."),Dt+="</"+x.call(String(Me.nodeName))+">",Dt}if(Q(Me)){if(Me.length===0)return"[]";var rr=$t(Me,Je);return pt&&!zt(rr)?"["+Ut(rr,pt)+"]":"[ "+T.call(rr,", ")+" ]"}if(ue(Me)){var _r=$t(Me,Je);return!("cause"in Error.prototype)&&"cause"in Me&&!G.call(Me,"cause")?"{ ["+String(Me)+"] "+T.call(N.call("[cause]: "+Je(Me.cause),_r),", ")+" }":_r.length===0?"["+String(Me)+"]":"{ ["+String(Me)+"] "+T.call(_r,", ")+" }"}if(typeof Me=="object"&&fr){if(H&&typeof Me[H]=="function"&&te)return te(Me,{depth:vt-Mt});if(fr!=="symbol"&&typeof Me.inspect=="function")return Me.inspect()}if(Le(Me)){var Hn=[];return n&&n.call(Me,function(ua,ao){Hn.push(Je(ao,Me,!0)+" => "+Je(ua,Me))}),ht("Map",t.call(Me),Hn,pt)}if(Fe(Me)){var ti=[];return s&&s.call(Me,function(ua){ti.push(Je(ua,Me))}),ht("Set",o.call(Me),ti,pt)}if(ge(Me))return yt("WeakMap");if(Ke(Me))return yt("WeakSet");if(Te(Me))return yt("WeakRef");if(Pe(Me))return bt(Je(Number(Me)));if(xe(Me))return bt(Je(A.call(Me)));if(ke(Me))return bt(_.call(Me));if(ve(Me))return bt(Je(String(Me)));if(typeof window<"u"&&Me===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Me===globalThis||typeof bh<"u"&&Me===bh)return"{ [object globalThis] }";if(!oe(Me)&&!se(Me)){var Vn=$t(Me,Je),Ci=W?W(Me)===Object.prototype:Me instanceof Object||Me.constructor===Object,En=Me instanceof Object?"":"null prototype",ki=!Ci&&M&&Object(Me)===Me&&M in Me?g.call(me(Me),8,-1):En?"Object":"",bi=Ci||typeof Me.constructor!="function"?"":Me.constructor.name?Me.constructor.name+" ":"",_a=bi+(ki||En?"["+T.call(N.call([],ki||[],En||[]),": ")+"] ":"");return Vn.length===0?_a+"{}":pt?_a+"{"+Ut(Vn,pt)+"}":_a+"{ "+T.call(Vn,", ")+" }"}return String(Me)};function $(Oe,Me,mt){var Mt=mt.quoteStyle||Me,Lt=q[Mt];return Lt+Oe+Lt}function ne(Oe){return v.call(String(Oe),/"/g,""")}function Z(Oe){return!M||!(typeof Oe=="object"&&(M in Oe||typeof Oe[M]<"u"))}function Q(Oe){return me(Oe)==="[object Array]"&&Z(Oe)}function oe(Oe){return me(Oe)==="[object Date]"&&Z(Oe)}function se(Oe){return me(Oe)==="[object RegExp]"&&Z(Oe)}function ue(Oe){return me(Oe)==="[object Error]"&&Z(Oe)}function ve(Oe){return me(Oe)==="[object String]"&&Z(Oe)}function Pe(Oe){return me(Oe)==="[object Number]"&&Z(Oe)}function ke(Oe){return me(Oe)==="[object Boolean]"&&Z(Oe)}function Ne(Oe){if(I)return Oe&&typeof Oe=="object"&&Oe instanceof Symbol;if(typeof Oe=="symbol")return!0;if(!Oe||typeof Oe!="object"||!O)return!1;try{return O.call(Oe),!0}catch{}return!1}function xe(Oe){if(!Oe||typeof Oe!="object"||!A)return!1;try{return A.call(Oe),!0}catch{}return!1}var ye=Object.prototype.hasOwnProperty||function(Oe){return Oe in this};function Ie(Oe,Me){return ye.call(Oe,Me)}function me(Oe){return S.call(Oe)}function _e(Oe){if(Oe.name)return Oe.name;var Me=b.call(w.call(Oe),/^function\s*([\w$]+)/);return Me?Me[1]:null}function Ae(Oe,Me){if(Oe.indexOf)return Oe.indexOf(Me);for(var mt=0,Mt=Oe.length;mt<Mt;mt++)if(Oe[mt]===Me)return mt;return-1}function Le(Oe){if(!t||!Oe||typeof Oe!="object")return!1;try{t.call(Oe);try{o.call(Oe)}catch{return!0}return Oe instanceof Map}catch{}return!1}function ge(Oe){if(!u||!Oe||typeof Oe!="object")return!1;try{u.call(Oe,u);try{p.call(Oe,p)}catch{return!0}return Oe instanceof WeakMap}catch{}return!1}function Te(Oe){if(!f||!Oe||typeof Oe!="object")return!1;try{return f.call(Oe),!0}catch{}return!1}function Fe(Oe){if(!o||!Oe||typeof Oe!="object")return!1;try{o.call(Oe);try{t.call(Oe)}catch{return!0}return Oe instanceof Set}catch{}return!1}function Ke(Oe){if(!p||!Oe||typeof Oe!="object")return!1;try{p.call(Oe,p);try{u.call(Oe,u)}catch{return!0}return Oe instanceof WeakSet}catch{}return!1}function it(Oe){return!Oe||typeof Oe!="object"?!1:typeof HTMLElement<"u"&&Oe instanceof HTMLElement?!0:typeof Oe.nodeName=="string"&&typeof Oe.getAttribute=="function"}function rt(Oe,Me){if(Oe.length>Me.maxStringLength){var mt=Oe.length-Me.maxStringLength,Mt="... "+mt+" more character"+(mt>1?"s":"");return rt(g.call(Oe,0,Me.maxStringLength),Me)+Mt}var Lt=D[Me.quoteStyle||"single"];Lt.lastIndex=0;var At=v.call(v.call(Oe,Lt,"\\$1"),/[\x00-\x1f]/g,at);return $(At,"single",Me)}function at(Oe){var Me=Oe.charCodeAt(0),mt={8:"b",9:"t",10:"n",12:"f",13:"r"}[Me];return mt?"\\"+mt:"\\x"+(Me<16?"0":"")+E.call(Me.toString(16))}function bt(Oe){return"Object("+Oe+")"}function yt(Oe){return Oe+" { ? }"}function ht(Oe,Me,mt,Mt){var Lt=Mt?Ut(mt,Mt):T.call(mt,", ");return Oe+" ("+Me+") {"+Lt+"}"}function zt(Oe){for(var Me=0;Me<Oe.length;Me++)if(Ae(Oe[Me],`
|
|
149
|
-
`)>=0)return!1;return!0}function Ot(Oe,Me){var mt;if(Oe.indent===" ")mt=" ";else if(typeof Oe.indent=="number"&&Oe.indent>0)mt=T.call(Array(Oe.indent+1)," ");else return null;return{base:mt,prev:T.call(Array(Me+1),mt)}}function Ut(Oe,Me){if(Oe.length===0)return"";var mt=`
|
|
150
|
-
`+Me.prev+Me.base;return mt+T.call(Oe,","+mt)+`
|
|
151
|
-
`+Me.prev}function $t(Oe,Me){var mt=Q(Oe),Mt=[];if(mt){Mt.length=Oe.length;for(var Lt=0;Lt<Oe.length;Lt++)Mt[Lt]=Ie(Oe,Lt)?Me(Oe[Lt],Oe):""}var At=typeof L=="function"?L(Oe):[],fr;if(I){fr={};for(var Qt=0;Qt<At.length;Qt++)fr["$"+At[Qt]]=At[Qt]}for(var ze in Oe)Ie(Oe,ze)&&(mt&&String(Number(ze))===ze&&ze<Oe.length||I&&fr["$"+ze]instanceof Symbol||(j.call(/[^\w$]/,ze)?Mt.push(Me(ze,Oe)+": "+Me(Oe[ze],Oe)):Mt.push(ze+": "+Me(Oe[ze],Oe))));if(typeof L=="function")for(var qe=0;qe<At.length;qe++)G.call(Oe,At[qe])&&Mt.push("["+Me(At[qe])+"]: "+Me(Oe[At[qe]],Oe));return Mt}return Eg}var Pg,qb;function DA(){if(qb)return Pg;qb=1;var e=a0(),r=Fh(),t=function(s,c,u){for(var d=s,p;(p=d.next)!=null;d=p)if(p.key===c)return d.next=p.next,u||(p.next=s.next,s.next=p),p},n=function(s,c){if(s){var u=t(s,c);return u&&u.value}},a=function(s,c,u){var d=t(s,c);d?d.value=u:s.next={key:c,next:s.next,value:u}},i=function(s,c){return s?!!t(s,c):!1},o=function(s,c){if(s)return t(s,c,!0)};return Pg=function(){var c,u={assert:function(d){if(!u.has(d))throw new r("Side channel does not contain "+e(d))},delete:function(d){var p=c&&c.next,y=o(c,d);return y&&p&&p===y&&(c=void 0),!!y},get:function(d){return n(c,d)},has:function(d){return i(c,d)},set:function(d,p){c||(c={next:void 0}),a(c,d,p)}};return u},Pg}var Og,zb;function q8(){return zb||(zb=1,Og=Object),Og}var Ag,Ub;function BA(){return Ub||(Ub=1,Ag=Error),Ag}var Cg,Hb;function qA(){return Hb||(Hb=1,Cg=EvalError),Cg}var kg,Vb;function zA(){return Vb||(Vb=1,kg=RangeError),kg}var Lg,Gb;function UA(){return Gb||(Gb=1,Lg=ReferenceError),Lg}var Ng,Wb;function HA(){return Wb||(Wb=1,Ng=SyntaxError),Ng}var Tg,$b;function VA(){return $b||($b=1,Tg=URIError),Tg}var Rg,Yb;function GA(){return Yb||(Yb=1,Rg=Math.abs),Rg}var Mg,Xb;function WA(){return Xb||(Xb=1,Mg=Math.floor),Mg}var Ig,Kb;function $A(){return Kb||(Kb=1,Ig=Math.max),Ig}var jg,Zb;function YA(){return Zb||(Zb=1,jg=Math.min),jg}var Fg,Qb;function XA(){return Qb||(Qb=1,Fg=Math.pow),Fg}var Dg,Jb;function KA(){return Jb||(Jb=1,Dg=Math.round),Dg}var Bg,e3;function ZA(){return e3||(e3=1,Bg=Number.isNaN||function(r){return r!==r}),Bg}var qg,t3;function QA(){if(t3)return qg;t3=1;var e=ZA();return qg=function(t){return e(t)||t===0?t:t<0?-1:1},qg}var zg,r3;function JA(){return r3||(r3=1,zg=Object.getOwnPropertyDescriptor),zg}var Ug,n3;function z8(){if(n3)return Ug;n3=1;var e=JA();if(e)try{e([],"length")}catch{e=null}return Ug=e,Ug}var Hg,i3;function eC(){if(i3)return Hg;i3=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Hg=e,Hg}var Vg,a3;function tC(){return a3||(a3=1,Vg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var i in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,t);if(s.value!==a||s.enumerable!==!0)return!1}return!0}),Vg}var Gg,o3;function rC(){if(o3)return Gg;o3=1;var e=typeof Symbol<"u"&&Symbol,r=tC();return Gg=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()},Gg}var Wg,s3;function U8(){return s3||(s3=1,Wg=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Wg}var $g,l3;function H8(){if(l3)return $g;l3=1;var e=q8();return $g=e.getPrototypeOf||null,$g}var Yg,u3;function nC(){if(u3)return Yg;u3=1;var e="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,t=Math.max,n="[object Function]",a=function(c,u){for(var d=[],p=0;p<c.length;p+=1)d[p]=c[p];for(var y=0;y<u.length;y+=1)d[y+c.length]=u[y];return d},i=function(c,u){for(var d=[],p=u,y=0;p<c.length;p+=1,y+=1)d[y]=c[p];return d},o=function(s,c){for(var u="",d=0;d<s.length;d+=1)u+=s[d],d+1<s.length&&(u+=c);return u};return Yg=function(c){var u=this;if(typeof u!="function"||r.apply(u)!==n)throw new TypeError(e+u);for(var d=i(arguments,1),p,y=function(){if(this instanceof p){var b=u.apply(this,a(d,arguments));return Object(b)===b?b:this}return u.apply(c,a(d,arguments))},f=t(0,u.length-d.length),_=[],S=0;S<f;S++)_[S]="$"+S;if(p=Function("binder","return function ("+o(_,",")+"){ return binder.apply(this,arguments); }")(y),u.prototype){var w=function(){};w.prototype=u.prototype,p.prototype=new w,w.prototype=null}return p},Yg}var Xg,c3;function o0(){if(c3)return Xg;c3=1;var e=nC();return Xg=Function.prototype.bind||e,Xg}var Kg,f3;function Em(){return f3||(f3=1,Kg=Function.prototype.call),Kg}var Zg,h3;function V8(){return h3||(h3=1,Zg=Function.prototype.apply),Zg}var Qg,d3;function iC(){return d3||(d3=1,Qg=typeof Reflect<"u"&&Reflect&&Reflect.apply),Qg}var Jg,p3;function aC(){if(p3)return Jg;p3=1;var e=o0(),r=V8(),t=Em(),n=iC();return Jg=n||e.call(t,r),Jg}var ev,g3;function G8(){if(g3)return ev;g3=1;var e=o0(),r=Fh(),t=Em(),n=aC();return ev=function(i){if(i.length<1||typeof i[0]!="function")throw new r("a function is required");return n(e,t,i)},ev}var tv,v3;function oC(){if(v3)return tv;v3=1;var e=G8(),r=z8(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&r&&r(Object.prototype,"__proto__"),a=Object,i=a.getPrototypeOf;return tv=n&&typeof n.get=="function"?e([n.get]):typeof i=="function"?function(s){return i(s==null?s:a(s))}:!1,tv}var rv,m3;function sC(){if(m3)return rv;m3=1;var e=U8(),r=H8(),t=oC();return rv=e?function(a){return e(a)}:r?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return r(a)}:t?function(a){return t(a)}:null,rv}var nv,y3;function lC(){if(y3)return nv;y3=1;var e=Function.prototype.call,r=Object.prototype.hasOwnProperty,t=o0();return nv=t.call(e,r),nv}var iv,b3;function Pm(){if(b3)return iv;b3=1;var e,r=q8(),t=BA(),n=qA(),a=zA(),i=UA(),o=HA(),s=Fh(),c=VA(),u=GA(),d=WA(),p=$A(),y=YA(),f=XA(),_=KA(),S=QA(),w=Function,b=function(se){try{return w('"use strict"; return ('+se+").constructor;")()}catch{}},g=z8(),v=eC(),E=function(){throw new s},x=g?function(){try{return arguments.callee,E}catch{try{return g(arguments,"callee").get}catch{return E}}}():E,j=rC()(),N=sC(),T=H8(),F=U8(),C=V8(),A=Em(),L={},O=typeof Uint8Array>"u"||!N?e:N(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":j&&N?N([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&N?N(N([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!j||!N?e:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":g,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":a,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!j||!N?e:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&N?N(""[Symbol.iterator]()):e,"%Symbol%":j?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":O,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":C,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":T,"%Math.abs%":u,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":f,"%Math.round%":_,"%Math.sign%":S,"%Reflect.getPrototypeOf%":F};if(N)try{null.error}catch(se){var M=N(N(se));I["%Error.prototype%"]=M}var G=function se(ue){var ve;if(ue==="%AsyncFunction%")ve=b("async function () {}");else if(ue==="%GeneratorFunction%")ve=b("function* () {}");else if(ue==="%AsyncGeneratorFunction%")ve=b("async function* () {}");else if(ue==="%AsyncGenerator%"){var Pe=se("%AsyncGeneratorFunction%");Pe&&(ve=Pe.prototype)}else if(ue==="%AsyncIteratorPrototype%"){var ke=se("%AsyncGenerator%");ke&&N&&(ve=N(ke.prototype))}return I[ue]=ve,ve},W={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Y=o0(),te=lC(),V=Y.call(A,Array.prototype.concat),H=Y.call(C,Array.prototype.splice),q=Y.call(A,String.prototype.replace),D=Y.call(A,String.prototype.slice),$=Y.call(A,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,Q=function(ue){var ve=D(ue,0,1),Pe=D(ue,-1);if(ve==="%"&&Pe!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(Pe==="%"&&ve!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var ke=[];return q(ue,ne,function(Ne,xe,ye,Ie){ke[ke.length]=ye?q(Ie,Z,"$1"):xe||Ne}),ke},oe=function(ue,ve){var Pe=ue,ke;if(te(W,Pe)&&(ke=W[Pe],Pe="%"+ke[0]+"%"),te(I,Pe)){var Ne=I[Pe];if(Ne===L&&(Ne=G(Pe)),typeof Ne>"u"&&!ve)throw new s("intrinsic "+ue+" exists, but is not available. Please file an issue!");return{alias:ke,name:Pe,value:Ne}}throw new o("intrinsic "+ue+" does not exist!")};return iv=function(ue,ve){if(typeof ue!="string"||ue.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ve!="boolean")throw new s('"allowMissing" argument must be a boolean');if($(/^%?[^%]*%?$/,ue)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Pe=Q(ue),ke=Pe.length>0?Pe[0]:"",Ne=oe("%"+ke+"%",ve),xe=Ne.name,ye=Ne.value,Ie=!1,me=Ne.alias;me&&(ke=me[0],H(Pe,V([0,1],me)));for(var _e=1,Ae=!0;_e<Pe.length;_e+=1){var Le=Pe[_e],ge=D(Le,0,1),Te=D(Le,-1);if((ge==='"'||ge==="'"||ge==="`"||Te==='"'||Te==="'"||Te==="`")&&ge!==Te)throw new o("property names with quotes must have matching quotes");if((Le==="constructor"||!Ae)&&(Ie=!0),ke+="."+Le,xe="%"+ke+"%",te(I,xe))ye=I[xe];else if(ye!=null){if(!(Le in ye)){if(!ve)throw new s("base intrinsic for "+ue+" exists, but the property is not available.");return}if(g&&_e+1>=Pe.length){var Fe=g(ye,Le);Ae=!!Fe,Ae&&"get"in Fe&&!("originalValue"in Fe.get)?ye=Fe.get:ye=ye[Le]}else Ae=te(ye,Le),ye=ye[Le];Ae&&!Ie&&(I[xe]=ye)}}return ye},iv}var av,w3;function W8(){if(w3)return av;w3=1;var e=Pm(),r=G8(),t=r([e("%String.prototype.indexOf%")]);return av=function(a,i){var o=e(a,!!i);return typeof o=="function"&&t(a,".prototype.")>-1?r([o]):o},av}var ov,_3;function $8(){if(_3)return ov;_3=1;var e=Pm(),r=W8(),t=a0(),n=Fh(),a=e("%Map%",!0),i=r("Map.prototype.get",!0),o=r("Map.prototype.set",!0),s=r("Map.prototype.has",!0),c=r("Map.prototype.delete",!0),u=r("Map.prototype.size",!0);return ov=!!a&&function(){var p,y={assert:function(f){if(!y.has(f))throw new n("Side channel does not contain "+t(f))},delete:function(f){if(p){var _=c(p,f);return u(p)===0&&(p=void 0),_}return!1},get:function(f){if(p)return i(p,f)},has:function(f){return p?s(p,f):!1},set:function(f,_){p||(p=new a),o(p,f,_)}};return y},ov}var sv,S3;function uC(){if(S3)return sv;S3=1;var e=Pm(),r=W8(),t=a0(),n=$8(),a=Fh(),i=e("%WeakMap%",!0),o=r("WeakMap.prototype.get",!0),s=r("WeakMap.prototype.set",!0),c=r("WeakMap.prototype.has",!0),u=r("WeakMap.prototype.delete",!0);return sv=i?function(){var p,y,f={assert:function(_){if(!f.has(_))throw new a("Side channel does not contain "+t(_))},delete:function(_){if(i&&_&&(typeof _=="object"||typeof _=="function")){if(p)return u(p,_)}else if(n&&y)return y.delete(_);return!1},get:function(_){return i&&_&&(typeof _=="object"||typeof _=="function")&&p?o(p,_):y&&y.get(_)},has:function(_){return i&&_&&(typeof _=="object"||typeof _=="function")&&p?c(p,_):!!y&&y.has(_)},set:function(_,S){i&&_&&(typeof _=="object"||typeof _=="function")?(p||(p=new i),s(p,_,S)):n&&(y||(y=n()),y.set(_,S))}};return f}:n,sv}var lv,x3;function cC(){if(x3)return lv;x3=1;var e=Fh(),r=a0(),t=DA(),n=$8(),a=uC(),i=a||n||t;return lv=function(){var s,c={assert:function(u){if(!c.has(u))throw new e("Side channel does not contain "+r(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,d){s||(s=i()),s.set(u,d)}};return c},lv}var uv,E3;function Om(){if(E3)return uv;E3=1;var e=String.prototype.replace,r=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return uv={default:t.RFC3986,formatters:{RFC1738:function(n){return e.call(n,r,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},uv}var cv,P3;function Y8(){if(P3)return cv;P3=1;var e=Om(),r=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var w=[],b=0;b<256;++b)w.push("%"+((b<16?"0":"")+b.toString(16)).toUpperCase());return w}(),a=function(b){for(;b.length>1;){var g=b.pop(),v=g.obj[g.prop];if(t(v)){for(var E=[],x=0;x<v.length;++x)typeof v[x]<"u"&&E.push(v[x]);g.obj[g.prop]=E}}},i=function(b,g){for(var v=g&&g.plainObjects?{__proto__:null}:{},E=0;E<b.length;++E)typeof b[E]<"u"&&(v[E]=b[E]);return v},o=function w(b,g,v){if(!g)return b;if(typeof g!="object"&&typeof g!="function"){if(t(b))b.push(g);else if(b&&typeof b=="object")(v&&(v.plainObjects||v.allowPrototypes)||!r.call(Object.prototype,g))&&(b[g]=!0);else return[b,g];return b}if(!b||typeof b!="object")return[b].concat(g);var E=b;return t(b)&&!t(g)&&(E=i(b,v)),t(b)&&t(g)?(g.forEach(function(x,j){if(r.call(b,j)){var N=b[j];N&&typeof N=="object"&&x&&typeof x=="object"?b[j]=w(N,x,v):b.push(x)}else b[j]=x}),b):Object.keys(g).reduce(function(x,j){var N=g[j];return r.call(x,j)?x[j]=w(x[j],N,v):x[j]=N,x},E)},s=function(b,g){return Object.keys(g).reduce(function(v,E){return v[E]=g[E],v},b)},c=function(w,b,g){var v=w.replace(/\+/g," ");if(g==="iso-8859-1")return v.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(v)}catch{return v}},u=1024,d=function(b,g,v,E,x){if(b.length===0)return b;var j=b;if(typeof b=="symbol"?j=Symbol.prototype.toString.call(b):typeof b!="string"&&(j=String(b)),v==="iso-8859-1")return escape(j).replace(/%u[0-9a-f]{4}/gi,function(O){return"%26%23"+parseInt(O.slice(2),16)+"%3B"});for(var N="",T=0;T<j.length;T+=u){for(var F=j.length>=u?j.slice(T,T+u):j,C=[],A=0;A<F.length;++A){var L=F.charCodeAt(A);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||x===e.RFC1738&&(L===40||L===41)){C[C.length]=F.charAt(A);continue}if(L<128){C[C.length]=n[L];continue}if(L<2048){C[C.length]=n[192|L>>6]+n[128|L&63];continue}if(L<55296||L>=57344){C[C.length]=n[224|L>>12]+n[128|L>>6&63]+n[128|L&63];continue}A+=1,L=65536+((L&1023)<<10|F.charCodeAt(A)&1023),C[C.length]=n[240|L>>18]+n[128|L>>12&63]+n[128|L>>6&63]+n[128|L&63]}N+=C.join("")}return N},p=function(b){for(var g=[{obj:{o:b},prop:"o"}],v=[],E=0;E<g.length;++E)for(var x=g[E],j=x.obj[x.prop],N=Object.keys(j),T=0;T<N.length;++T){var F=N[T],C=j[F];typeof C=="object"&&C!==null&&v.indexOf(C)===-1&&(g.push({obj:j,prop:F}),v.push(C))}return a(g),b},y=function(b){return Object.prototype.toString.call(b)==="[object RegExp]"},f=function(b){return!b||typeof b!="object"?!1:!!(b.constructor&&b.constructor.isBuffer&&b.constructor.isBuffer(b))},_=function(b,g){return[].concat(b,g)},S=function(b,g){if(t(b)){for(var v=[],E=0;E<b.length;E+=1)v.push(g(b[E]));return v}return g(b)};return cv={arrayToObject:i,assign:s,combine:_,compact:p,decode:c,encode:d,isBuffer:f,isRegExp:y,maybeMap:S,merge:o},cv}var fv,O3;function fC(){if(O3)return fv;O3=1;var e=cC(),r=Y8(),t=Om(),n=Object.prototype.hasOwnProperty,a={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,b){return w+"["+b+"]"},repeat:function(w){return w}},i=Array.isArray,o=Array.prototype.push,s=function(S,w){o.apply(S,i(w)?w:[w])},c=Date.prototype.toISOString,u=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:t.formatters[u],indices:!1,serializeDate:function(w){return c.call(w)},skipNulls:!1,strictNullHandling:!1},p=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},y={},f=function S(w,b,g,v,E,x,j,N,T,F,C,A,L,O,I,M,G,W){for(var Y=w,te=W,V=0,H=!1;(te=te.get(y))!==void 0&&!H;){var q=te.get(w);if(V+=1,typeof q<"u"){if(q===V)throw new RangeError("Cyclic object value");H=!0}typeof te.get(y)>"u"&&(V=0)}if(typeof F=="function"?Y=F(b,Y):Y instanceof Date?Y=L(Y):g==="comma"&&i(Y)&&(Y=r.maybeMap(Y,function(xe){return xe instanceof Date?L(xe):xe})),Y===null){if(x)return T&&!M?T(b,d.encoder,G,"key",O):b;Y=""}if(p(Y)||r.isBuffer(Y)){if(T){var D=M?b:T(b,d.encoder,G,"key",O);return[I(D)+"="+I(T(Y,d.encoder,G,"value",O))]}return[I(b)+"="+I(String(Y))]}var $=[];if(typeof Y>"u")return $;var ne;if(g==="comma"&&i(Y))M&&T&&(Y=r.maybeMap(Y,T)),ne=[{value:Y.length>0?Y.join(",")||null:void 0}];else if(i(F))ne=F;else{var Z=Object.keys(Y);ne=C?Z.sort(C):Z}var Q=N?String(b).replace(/\./g,"%2E"):String(b),oe=v&&i(Y)&&Y.length===1?Q+"[]":Q;if(E&&i(Y)&&Y.length===0)return oe+"[]";for(var se=0;se<ne.length;++se){var ue=ne[se],ve=typeof ue=="object"&&ue&&typeof ue.value<"u"?ue.value:Y[ue];if(!(j&&ve===null)){var Pe=A&&N?String(ue).replace(/\./g,"%2E"):String(ue),ke=i(Y)?typeof g=="function"?g(oe,Pe):oe:oe+(A?"."+Pe:"["+Pe+"]");W.set(w,V);var Ne=e();Ne.set(y,W),s($,S(ve,ke,g,v,E,x,j,N,g==="comma"&&M&&i(Y)?null:T,F,C,A,L,O,I,M,G,Ne))}}return $},_=function(w){if(!w)return d;if(typeof w.allowEmptyArrays<"u"&&typeof w.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof w.encodeDotInKeys<"u"&&typeof w.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(w.encoder!==null&&typeof w.encoder<"u"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var b=w.charset||d.charset;if(typeof w.charset<"u"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var g=t.default;if(typeof w.format<"u"){if(!n.call(t.formatters,w.format))throw new TypeError("Unknown format option provided.");g=w.format}var v=t.formatters[g],E=d.filter;(typeof w.filter=="function"||i(w.filter))&&(E=w.filter);var x;if(w.arrayFormat in a?x=w.arrayFormat:"indices"in w?x=w.indices?"indices":"repeat":x=d.arrayFormat,"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var j=typeof w.allowDots>"u"?w.encodeDotInKeys===!0?!0:d.allowDots:!!w.allowDots;return{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:d.addQueryPrefix,allowDots:j,allowEmptyArrays:typeof w.allowEmptyArrays=="boolean"?!!w.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:x,charset:b,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!w.commaRoundTrip,delimiter:typeof w.delimiter>"u"?d.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:d.encode,encodeDotInKeys:typeof w.encodeDotInKeys=="boolean"?w.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof w.encoder=="function"?w.encoder:d.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:d.encodeValuesOnly,filter:E,format:g,formatter:v,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:d.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:d.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:d.strictNullHandling}};return fv=function(S,w){var b=S,g=_(w),v,E;typeof g.filter=="function"?(E=g.filter,b=E("",b)):i(g.filter)&&(E=g.filter,v=E);var x=[];if(typeof b!="object"||b===null)return"";var j=a[g.arrayFormat],N=j==="comma"&&g.commaRoundTrip;v||(v=Object.keys(b)),g.sort&&v.sort(g.sort);for(var T=e(),F=0;F<v.length;++F){var C=v[F],A=b[C];g.skipNulls&&A===null||s(x,f(A,C,j,N,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,T))}var L=x.join(g.delimiter),O=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?O+="utf8=%26%2310003%3B&":O+="utf8=%E2%9C%93&"),L.length>0?O+L:""},fv}var hv,A3;function hC(){if(A3)return hv;A3=1;var e=Y8(),r=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(y){return y.replace(/&#(\d+);/g,function(f,_){return String.fromCharCode(parseInt(_,10))})},i=function(y,f,_){if(y&&typeof y=="string"&&f.comma&&y.indexOf(",")>-1)return y.split(",");if(f.throwOnLimitExceeded&&_>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return y},o="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",c=function(f,_){var S={__proto__:null},w=_.ignoreQueryPrefix?f.replace(/^\?/,""):f;w=w.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=_.parameterLimit===1/0?void 0:_.parameterLimit,g=w.split(_.delimiter,_.throwOnLimitExceeded?b+1:b);if(_.throwOnLimitExceeded&&g.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var v=-1,E,x=_.charset;if(_.charsetSentinel)for(E=0;E<g.length;++E)g[E].indexOf("utf8=")===0&&(g[E]===s?x="utf-8":g[E]===o&&(x="iso-8859-1"),v=E,E=g.length);for(E=0;E<g.length;++E)if(E!==v){var j=g[E],N=j.indexOf("]="),T=N===-1?j.indexOf("="):N+1,F,C;T===-1?(F=_.decoder(j,n.decoder,x,"key"),C=_.strictNullHandling?null:""):(F=_.decoder(j.slice(0,T),n.decoder,x,"key"),C=e.maybeMap(i(j.slice(T+1),_,t(S[F])?S[F].length:0),function(L){return _.decoder(L,n.decoder,x,"value")})),C&&_.interpretNumericEntities&&x==="iso-8859-1"&&(C=a(String(C))),j.indexOf("[]=")>-1&&(C=t(C)?[C]:C);var A=r.call(S,F);A&&_.duplicates==="combine"?S[F]=e.combine(S[F],C):(!A||_.duplicates==="last")&&(S[F]=C)}return S},u=function(y,f,_,S){var w=0;if(y.length>0&&y[y.length-1]==="[]"){var b=y.slice(0,-1).join("");w=Array.isArray(f)&&f[b]?f[b].length:0}for(var g=S?f:i(f,_,w),v=y.length-1;v>=0;--v){var E,x=y[v];if(x==="[]"&&_.parseArrays)E=_.allowEmptyArrays&&(g===""||_.strictNullHandling&&g===null)?[]:e.combine([],g);else{E=_.plainObjects?{__proto__:null}:{};var j=x.charAt(0)==="["&&x.charAt(x.length-1)==="]"?x.slice(1,-1):x,N=_.decodeDotInKeys?j.replace(/%2E/g,"."):j,T=parseInt(N,10);!_.parseArrays&&N===""?E={0:g}:!isNaN(T)&&x!==N&&String(T)===N&&T>=0&&_.parseArrays&&T<=_.arrayLimit?(E=[],E[T]=g):N!=="__proto__"&&(E[N]=g)}g=E}return g},d=function(f,_,S,w){if(f){var b=S.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,g=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,E=S.depth>0&&g.exec(b),x=E?b.slice(0,E.index):b,j=[];if(x){if(!S.plainObjects&&r.call(Object.prototype,x)&&!S.allowPrototypes)return;j.push(x)}for(var N=0;S.depth>0&&(E=v.exec(b))!==null&&N<S.depth;){if(N+=1,!S.plainObjects&&r.call(Object.prototype,E[1].slice(1,-1))&&!S.allowPrototypes)return;j.push(E[1])}if(E){if(S.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+S.depth+" and strictDepth is true");j.push("["+b.slice(E.index)+"]")}return u(j,_,S,w)}},p=function(f){if(!f)return n;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var _=typeof f.charset>"u"?n.charset:f.charset,S=typeof f.duplicates>"u"?n.duplicates:f.duplicates;if(S!=="combine"&&S!=="first"&&S!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var w=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:n.allowDots:!!f.allowDots;return{allowDots:w,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:n.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:n.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:n.arrayLimit,charset:_,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:n.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:n.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:n.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:n.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:n.depth,duplicates:S,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:n.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:n.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:n.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return hv=function(y,f){var _=p(f);if(y===""||y===null||typeof y>"u")return _.plainObjects?{__proto__:null}:{};for(var S=typeof y=="string"?c(y,_):y,w=_.plainObjects?{__proto__:null}:{},b=Object.keys(S),g=0;g<b.length;++g){var v=b[g],E=d(v,S[v],_,typeof y=="string");w=e.merge(w,E,_)}return _.allowSparse===!0?w:e.compact(w)},hv}var dv,C3;function dC(){if(C3)return dv;C3=1;var e=fC(),r=hC(),t=Om();return dv={formats:t,parse:r,stringify:e},dv}var k3;function X8(){if(k3)return wf;k3=1;var e=MA();function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
|
|
152
|
-
`," "],o=["{","}","|","\\","^","`"].concat(i),s=["'"].concat(o),c=["%","/","?",";","#"].concat(s),u=["/","?","#"],d=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=dC();function b(x,j,N){if(x&&typeof x=="object"&&x instanceof r)return x;var T=new r;return T.parse(x,j,N),T}r.prototype.parse=function(x,j,N){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var T=x.indexOf("?"),F=T!==-1&&T<x.indexOf("#")?"?":"#",C=x.split(F),A=/\\/g;C[0]=C[0].replace(A,"/"),x=C.join(F);var L=x;if(L=L.trim(),!N&&x.split("#").length===1){var O=a.exec(L);if(O)return this.path=L,this.href=L,this.pathname=O[1],O[2]?(this.search=O[2],j?this.query=w.parse(this.search.substr(1)):this.query=this.search.substr(1)):j&&(this.search="",this.query={}),this}var I=t.exec(L);if(I){I=I[0];var M=I.toLowerCase();this.protocol=M,L=L.substr(I.length)}if(N||I||L.match(/^\/\/[^@/]+@[^@/]+/)){var G=L.substr(0,2)==="//";G&&!(I&&_[I])&&(L=L.substr(2),this.slashes=!0)}if(!_[I]&&(G||I&&!S[I])){for(var W=-1,Y=0;Y<u.length;Y++){var te=L.indexOf(u[Y]);te!==-1&&(W===-1||te<W)&&(W=te)}var V,H;W===-1?H=L.lastIndexOf("@"):H=L.lastIndexOf("@",W),H!==-1&&(V=L.slice(0,H),L=L.slice(H+1),this.auth=decodeURIComponent(V)),W=-1;for(var Y=0;Y<c.length;Y++){var te=L.indexOf(c[Y]);te!==-1&&(W===-1||te<W)&&(W=te)}W===-1&&(W=L.length),this.host=L.slice(0,W),L=L.slice(W),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var D=this.hostname.split(/\./),Y=0,$=D.length;Y<$;Y++){var ne=D[Y];if(ne&&!ne.match(p)){for(var Z="",Q=0,oe=ne.length;Q<oe;Q++)ne.charCodeAt(Q)>127?Z+="x":Z+=ne[Q];if(!Z.match(p)){var se=D.slice(0,Y),ue=D.slice(Y+1),ve=ne.match(y);ve&&(se.push(ve[1]),ue.unshift(ve[2])),ue.length&&(L="/"+ue.join(".")+L),this.hostname=se.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=e.toASCII(this.hostname));var Pe=this.port?":"+this.port:"",ke=this.hostname||"";this.host=ke+Pe,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),L[0]!=="/"&&(L="/"+L))}if(!f[M])for(var Y=0,$=s.length;Y<$;Y++){var Ne=s[Y];if(L.indexOf(Ne)!==-1){var xe=encodeURIComponent(Ne);xe===Ne&&(xe=escape(Ne)),L=L.split(Ne).join(xe)}}var ye=L.indexOf("#");ye!==-1&&(this.hash=L.substr(ye),L=L.slice(0,ye));var Ie=L.indexOf("?");if(Ie!==-1?(this.search=L.substr(Ie),this.query=L.substr(Ie+1),j&&(this.query=w.parse(this.query)),L=L.slice(0,Ie)):j&&(this.search="",this.query={}),L&&(this.pathname=L),S[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Pe=this.pathname||"",me=this.search||"";this.path=Pe+me}return this.href=this.format(),this};function g(x){return typeof x=="string"&&(x=b(x)),x instanceof r?x.format():r.prototype.format.call(x)}r.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var j=this.protocol||"",N=this.pathname||"",T=this.hash||"",F=!1,C="";this.host?F=x+this.host:this.hostname&&(F=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(C=w.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var A=this.search||C&&"?"+C||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||S[j])&&F!==!1?(F="//"+(F||""),N&&N.charAt(0)!=="/"&&(N="/"+N)):F||(F=""),T&&T.charAt(0)!=="#"&&(T="#"+T),A&&A.charAt(0)!=="?"&&(A="?"+A),N=N.replace(/[?#]/g,function(L){return encodeURIComponent(L)}),A=A.replace("#","%23"),j+F+N+A+T};function v(x,j){return b(x,!1,!0).resolve(j)}r.prototype.resolve=function(x){return this.resolveObject(b(x,!1,!0)).format()};function E(x,j){return x?b(x,!1,!0).resolveObject(j):j}return r.prototype.resolveObject=function(x){if(typeof x=="string"){var j=new r;j.parse(x,!1,!0),x=j}for(var N=new r,T=Object.keys(this),F=0;F<T.length;F++){var C=T[F];N[C]=this[C]}if(N.hash=x.hash,x.href==="")return N.href=N.format(),N;if(x.slashes&&!x.protocol){for(var A=Object.keys(x),L=0;L<A.length;L++){var O=A[L];O!=="protocol"&&(N[O]=x[O])}return S[N.protocol]&&N.hostname&&!N.pathname&&(N.pathname="/",N.path=N.pathname),N.href=N.format(),N}if(x.protocol&&x.protocol!==N.protocol){if(!S[x.protocol]){for(var I=Object.keys(x),M=0;M<I.length;M++){var G=I[M];N[G]=x[G]}return N.href=N.format(),N}if(N.protocol=x.protocol,!x.host&&!_[x.protocol]){for(var $=(x.pathname||"").split("/");$.length&&!(x.host=$.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),$[0]!==""&&$.unshift(""),$.length<2&&$.unshift(""),N.pathname=$.join("/")}else N.pathname=x.pathname;if(N.search=x.search,N.query=x.query,N.host=x.host||"",N.auth=x.auth,N.hostname=x.hostname||x.host,N.port=x.port,N.pathname||N.search){var W=N.pathname||"",Y=N.search||"";N.path=W+Y}return N.slashes=N.slashes||x.slashes,N.href=N.format(),N}var te=N.pathname&&N.pathname.charAt(0)==="/",V=x.host||x.pathname&&x.pathname.charAt(0)==="/",H=V||te||N.host&&x.pathname,q=H,D=N.pathname&&N.pathname.split("/")||[],$=x.pathname&&x.pathname.split("/")||[],ne=N.protocol&&!S[N.protocol];if(ne&&(N.hostname="",N.port=null,N.host&&(D[0]===""?D[0]=N.host:D.unshift(N.host)),N.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&($[0]===""?$[0]=x.host:$.unshift(x.host)),x.host=null),H=H&&($[0]===""||D[0]==="")),V)N.host=x.host||x.host===""?x.host:N.host,N.hostname=x.hostname||x.hostname===""?x.hostname:N.hostname,N.search=x.search,N.query=x.query,D=$;else if($.length)D||(D=[]),D.pop(),D=D.concat($),N.search=x.search,N.query=x.query;else if(x.search!=null){if(ne){N.host=D.shift(),N.hostname=N.host;var Z=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;Z&&(N.auth=Z.shift(),N.hostname=Z.shift(),N.host=N.hostname)}return N.search=x.search,N.query=x.query,(N.pathname!==null||N.search!==null)&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.href=N.format(),N}if(!D.length)return N.pathname=null,N.search?N.path="/"+N.search:N.path=null,N.href=N.format(),N;for(var Q=D.slice(-1)[0],oe=(N.host||x.host||D.length>1)&&(Q==="."||Q==="..")||Q==="",se=0,ue=D.length;ue>=0;ue--)Q=D[ue],Q==="."?D.splice(ue,1):Q===".."?(D.splice(ue,1),se++):se&&(D.splice(ue,1),se--);if(!H&&!q)for(;se--;se)D.unshift("..");H&&D[0]!==""&&(!D[0]||D[0].charAt(0)!=="/")&&D.unshift(""),oe&&D.join("/").substr(-1)!=="/"&&D.push("");var ve=D[0]===""||D[0]&&D[0].charAt(0)==="/";if(ne){N.hostname=ve?"":D.length?D.shift():"",N.host=N.hostname;var Z=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;Z&&(N.auth=Z.shift(),N.hostname=Z.shift(),N.host=N.hostname)}return H=H||N.host&&D.length,H&&!ve&&D.unshift(""),D.length>0?N.pathname=D.join("/"):(N.pathname=null,N.path=null),(N.pathname!==null||N.search!==null)&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.auth=x.auth||N.auth,N.slashes=N.slashes||x.slashes,N.href=N.format(),N},r.prototype.parseHost=function(){var x=this.host,j=n.exec(x);j&&(j=j[0],j!==":"&&(this.port=j.substr(1)),x=x.substr(0,x.length-j.length)),x&&(this.hostname=x)},wf.parse=b,wf.resolve=v,wf.resolveObject=E,wf.format=g,wf.Url=r,wf}var b1={exports:{}},pC=b1.exports,L3;function gC(){return L3||(L3=1,function(e){(function(r,t){e.exports?e.exports=t():r.xmlserializer=t()})(pC,function(){var r=function(f){return f.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},t=function(f){return f.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n=function(f){return f.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},a=function(f){var _=f.value;return" "+f.name+'="'+t(_)+'"'},i=function(f){var _=f.tagName;return f.namespaceURI==="http://www.w3.org/1999/xhtml"&&(_=_.toLowerCase()),_},o=function(f,_){var S=Array.prototype.map.call(f.attributes||f.attrs,function(w){return w.name}).indexOf("xmlns")>=0;return!S&&(_||f.namespaceURI!==f.parentNode.namespaceURI)?' xmlns="'+f.namespaceURI+'"':""},s=function(f){return Array.prototype.map.call(f.childNodes,function(_){return y(_)}).join("")},c=function(f,_){var S="<"+i(f);return S+=o(f,_),Array.prototype.forEach.call(f.attributes||f.attrs,function(w){S+=a(w)}),f.childNodes.length>0?(S+=">",S+=s(f),S+="</"+i(f)+">"):S+="/>",S},u=function(f){var _=f.nodeValue||f.value||"";return n(_)},d=function(f){return"<!--"+f.data.replace(/-/g,"-")+"-->"},p=function(f){return"<![CDATA["+f.nodeValue+"]]>"},y=function(f,_){var S=_&&_.rootNode;if(f.nodeName==="#document"||f.nodeName==="#document-fragment")return s(f);if(f.tagName)return c(f,S);if(f.nodeName==="#text")return u(f);if(f.nodeName==="#comment")return d(f);if(f.nodeName==="#cdata-section")return p(f)};return{serializeToString:function(f){return r(y(f,{rootNode:!0}))}}})}(b1)),b1.exports}var pv={},N3;function vC(){if(N3)return pv;N3=1;var e=function(i){var o=new XMLSerializer;return Array.prototype.map.call(i.childNodes,function(s){return o.serializeToString(s)}).join("")},r=function(i){if(i.documentElement.tagName==="parsererror"&&i.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return i.documentElement;if((i.documentElement.tagName==="xml"||i.documentElement.tagName==="html")&&i.documentElement.childNodes&&i.documentElement.childNodes.length>0&&i.documentElement.childNodes[0].nodeName==="parsererror")return i.documentElement.childNodes[0];if(i.documentElement.tagName==="html"&&i.documentElement.childNodes&&i.documentElement.childNodes.length>0&&i.documentElement.childNodes[0].nodeName==="body"&&i.documentElement.childNodes[0].childNodes&&i.documentElement.childNodes[0].childNodes.length&&i.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return i.documentElement.childNodes[0].childNodes[0]},t=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
153
|
-
?</div>`),new RegExp(`^(.+)
|
|
154
|
-
`)],n=function(i){var o=e(i),s,c;for(s=0;s<t.length;s++)if(c=t[s].exec(o),c)return c[1]},a=function(i){var o;if(i===null)throw new Error("Parse error");var s=r(i);if(s!==void 0)throw o=n(s)||"Parse error",new Error(o)};return pv.failOnParseError=function(i){return a(i),i},pv}var gv={},vv={},T3;function s0(){return T3||(T3=1,function(e){var r=X8();e.getDocumentBaseUrl=function(s){return s.baseURI!=="about:blank"?s.baseURI:null},e.clone=function(s){var c={},u;for(u in s)s.hasOwnProperty(u)&&(c[u]=s[u]);return c},e.cloneArray=function(s){return Array.prototype.slice.apply(s,[0])},e.joinUrl=function(s,c){return s?r.resolve(s,c):c},e.isDataUri=function(s){return/^data:/.test(s)},e.collectAndReportErrors=function(s){var c=[];return Promise.all(s.map(function(u){return u.catch(function(d){c.push(d)})})).then(function(){return c})};var t=null,n=function(s,c){return c===!1||c==="none"||c==="repeated"?((t===null||c!=="repeated")&&(t=Date.now()),s+"?_="+t):s};e.ajax=function(s,c){return new Promise(function(u,d){var p=new window.XMLHttpRequest,y=e.joinUrl(c.baseUrl,s),f,_=function(){d({msg:"Unable to load url",url:y})};f=n(y,c.cache),p.addEventListener("load",function(){p.status===200||p.status===0?u(p.response):_()},!1),p.addEventListener("error",_,!1);try{p.open("GET",f,!0),p.overrideMimeType(c.mimeType),p.send(null)}catch{_()}})},e.binaryAjax=function(s,c){var u=e.clone(c);return u.mimeType="text/plain; charset=x-user-defined",e.ajax(s,u).then(function(d){for(var p="",y=0;y<d.length;y++)p+=String.fromCharCode(d.charCodeAt(y)&255);return p})};var a=function(s){var c=function(u,d){return u.substring(0,d.length)===d};return c(s,"<?xml")||c(s,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(s,c){return e.binaryAjax(s,c).then(function(u){var d=btoa(u),p=a(u);return"data:"+p+";base64,"+d})};var i=[],o=function(s){return i.indexOf(s)<0&&i.push(s),i.indexOf(s)};e.memoize=function(s,c,u){if(typeof u!="object")throw new Error("cacheBucket is not an object");return function(){var d=Array.prototype.slice.call(arguments),p=c(d),y=o(s),f;return u[y]&&u[y][p]?u[y][p]:(f=s.apply(null,d),u[y]=u[y]||{},u[y][p]=f,f)}}}(vv)),vv}var mv={},R3;function mC(){if(R3)return mv;R3=1;var e=s0(),r=function(i,o){var s=null;i.hasAttribute("src")?s=i.getAttribute("src"):i.hasAttributeNS("http://www.w3.org/1999/xlink","href")?s=i.getAttributeNS("http://www.w3.org/1999/xlink","href"):i.hasAttribute("href")&&(s=i.getAttribute("href"));var c=e.getDocumentBaseUrl(i.ownerDocument),u=e.clone(o);return!u.baseUrl&&c&&(u.baseUrl=c),e.getDataURIForImageURL(s,u).then(function(d){return d},function(d){throw{resourceType:"image",url:d.url,msg:"Unable to load image "+d.url}})},t=function(i){return i.filter(function(o){var s=null;return o.hasAttribute("src")?s=o.getAttribute("src"):o.hasAttributeNS("http://www.w3.org/1999/xlink","href")?s=o.getAttributeNS("http://www.w3.org/1999/xlink","href"):o.hasAttribute("href")&&(s=o.getAttribute("href")),s!==null&&!e.isDataUri(s)})},n=function(i){return Array.prototype.filter.call(i,function(o){return o.type==="image"})},a=function(i){return Array.prototype.slice.call(i)};return mv.inline=function(i,o){var s=a(i.getElementsByTagName("img")),c=a(i.getElementsByTagName("image")),u=n(i.getElementsByTagName("input"));s=s.concat(c),s=s.concat(u);var d=t(s);return e.collectAndReportErrors(d.map(function(p){return r(p,o).then(function(y){p.attributes.src?p.attributes.src.value=y:p.attributes["xlink:href"]?p.attributes["xlink:href"].value=y:p.attributes.href&&(p.attributes.href.value=y)})}))},mv}var yv={},M3;function yC(){if(M3)return yv;M3=1;var e=s0(),r=function(i,o){var s=i.attributes.src.value,c=e.getDocumentBaseUrl(i.ownerDocument),u=e.clone(o);return!u.baseUrl&&c&&(u.baseUrl=c),e.ajax(s,u).catch(function(d){throw{resourceType:"script",url:d.url,msg:"Unable to load script "+d.url}})},t=function(i){return i.replace(/<\//g,"<\\/")},n=function(i,o){i.attributes.removeNamedItem("src"),i.textContent=t(o)},a=function(i){var o=i.getElementsByTagName("script");return Array.prototype.filter.call(o,function(s){return!!s.attributes.src})};return yv.inline=function(i,o){var s=a(i);return e.collectAndReportErrors(s.map(function(c){return r(c,o).then(function(u){n(c,u)})}))},yv}var bv={},wv={},I3;function Am(){return I3||(I3=1,function(e){e.unquoteString=function(r){var t=/^"(.*)"$/,n=/^'(.*)'$/;return t.test(r)?r.replace(t,"$1"):n.test(r)?r.replace(n,"$1"):r},e.rulesForCssText=function(r){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style"),a;return n.textContent=r,t.body.appendChild(n),a=n.sheet.cssRules,Array.prototype.slice.call(a)},e.cssRulesToText=function(r){return r.reduce(function(t,n){return t+n.cssText},"")},e.exchangeRule=function(r,t,n){var a=r.indexOf(t);r[a]=e.rulesForCssText(n)[0]},e.changeFontFaceRuleSrc=function(r,t,n){var a="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(a+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(a+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(a+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),a+="src: "+n+"}",e.exchangeRule(r,t,a)}}(wv)),wv}var _v={},j3;function bC(){return j3||(j3=1,function(e){var r=Am(),t=function(i){var o=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return i.replace(o,"$1")};e.extractCssUrl=function(i){var o=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,s;if(!o.test(i))throw new Error("Invalid url");return s=o.exec(i)[1],r.unquoteString(t(s))};var n=function(i){var o=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,s="(url\\("+o+"\\)|[^,\\s]+)",c="(?:\\s*"+s+")+",u="^\\s*("+c+")(?:\\s*,\\s*("+c+"))*\\s*$",d=new RegExp(c,"g"),p,y=[],f=function(_){var S=new RegExp(s,"g"),w=[],b;for(b=S.exec(_);b;)w.push(b[1]),b=S.exec(_);return w};if(i.match(new RegExp(u))){for(p=d.exec(i);p;)y.push(f(p[0])),p=d.exec(i);return y}return[]},a=function(i){var o,s;for(o=0;o<i.length;o++)try{return s=e.extractCssUrl(i[o]),{url:s,idx:o}}catch{}};e.parse=function(i){var o=n(i);return o.map(function(s){var c=a(s);return c?{preUrl:s.slice(0,c.idx),url:c.url,postUrl:s.slice(c.idx+1)}:{preUrl:s}})},e.serialize=function(i){var o=i.map(function(s){var c=[].concat(s.preUrl);return s.url&&c.push('url("'+s.url+'")'),s.postUrl&&(c=c.concat(s.postUrl)),c.join(" ")});return o.join(", ")}}(_v)),_v}function u1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Sv={exports:{}},F3;function wC(){return F3||(F3=1,function(e,r){(function(t){e.exports=t()})(function(){return function t(n,a,i){function o(u,d){if(!a[u]){if(!n[u]){var p=typeof u1=="function"&&u1;if(!d&&p)return p(u,!0);if(s)return s(u,!0);var y=new Error("Cannot find module '"+u+"'");throw y.code="MODULE_NOT_FOUND",y}var f=a[u]={exports:{}};n[u][0].call(f.exports,function(_){var S=n[u][1][_];return o(S||_)},f,f.exports,t,n,a,i)}return a[u].exports}for(var s=typeof u1=="function"&&u1,c=0;c<i.length;c++)o(i[c]);return o}({1:[function(t,n,a){function i(c,u){function d(){this.constructor=c}d.prototype=u.prototype,c.prototype=new d}function o(c,u,d,p){this.message=c,this.expected=u,this.found=d,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o)}i(o,Error),o.buildMessage=function(c,u){var d={literal:function(b){return'"'+y(b.text)+'"'},class:function(b){var g="",v;for(v=0;v<b.parts.length;v++)g+=b.parts[v]instanceof Array?f(b.parts[v][0])+"-"+f(b.parts[v][1]):f(b.parts[v]);return"["+(b.inverted?"^":"")+g+"]"},any:function(b){return"any character"},end:function(b){return"end of input"},other:function(b){return b.description}};function p(b){return b.charCodeAt(0).toString(16).toUpperCase()}function y(b){return b.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+p(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+p(g)})}function f(b){return b.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+p(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+p(g)})}function _(b){return d[b.type](b)}function S(b){var g=new Array(b.length),v,E;for(v=0;v<b.length;v++)g[v]=_(b[v]);if(g.sort(),g.length>0){for(v=1,E=1;v<g.length;v++)g[v-1]!==g[v]&&(g[E]=g[v],E++);g.length=E}switch(g.length){case 1:return g[0];case 2:return g[0]+" or "+g[1];default:return g.slice(0,-1).join(", ")+", or "+g[g.length-1]}}function w(b){return b?'"'+y(b)+'"':"end of input"}return"Expected "+S(c)+" but "+w(u)+" found."};function s(c,u){u=u!==void 0?u:{};var d={},p={start:Pe},y=Pe,f="",_=function(){return[]},S=",",w=ne(",",!1),b=function(ge,Te){return[ge].concat(Te)},g=function(ge){return[ge]},v=function(ge,Te){return{url:ge,format:Te}},E=function(ge){return{url:ge}},x="url(",j=ne("url(",!1),N=")",T=ne(")",!1),F=function(ge){return ge},C="format(",A=ne("format(",!1),L="local(",O=ne("local(",!1),I=function(ge){return{local:ge}},M=/^[^)]/,G=Z([")"],!0,!1),W=function(ge){return Le.extractValue(ge.join(""))},Y=/^[ \t\r\n\f]/,te=Z([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),V=0,H=[{line:1,column:1}],q=0,D=[],$;if("startRule"in u){if(!(u.startRule in p))throw new Error(`Can't start parsing from rule "`+u.startRule+'".');y=p[u.startRule]}function ne(ge,Te){return{type:"literal",text:ge,ignoreCase:Te}}function Z(ge,Te,Fe){return{type:"class",parts:ge,inverted:Te,ignoreCase:Fe}}function Q(){return{type:"end"}}function oe(ge){var Te=H[ge],Fe;if(Te)return Te;for(Fe=ge-1;!H[Fe];)Fe--;for(Te=H[Fe],Te={line:Te.line,column:Te.column};Fe<ge;)c.charCodeAt(Fe)===10?(Te.line++,Te.column=1):Te.column++,Fe++;return H[ge]=Te,Te}function se(ge,Te){var Fe=oe(ge),Ke=oe(Te);return{start:{offset:ge,line:Fe.line,column:Fe.column},end:{offset:Te,line:Ke.line,column:Ke.column}}}function ue(ge){V<q||(V>q&&(q=V,D=[]),D.push(ge))}function ve(ge,Te,Fe){return new o(o.buildMessage(ge,Te),ge,Te,Fe)}function Pe(){var ge,Te;return ge=ke(),ge===d&&(ge=V,Te=f,Te!==d&&(Te=_()),ge=Te),ge}function ke(){var ge,Te,Fe,Ke,it,rt;if(ge=V,Te=Ne(),Te!==d){for(Fe=[],Ke=Ae();Ke!==d;)Fe.push(Ke),Ke=Ae();if(Fe!==d)if(c.charCodeAt(V)===44?(Ke=S,V++):(Ke=d,ue(w)),Ke!==d){for(it=[],rt=Ae();rt!==d;)it.push(rt),rt=Ae();it!==d?(rt=ke(),rt!==d?(Te=b(Te,rt),ge=Te):(V=ge,ge=d)):(V=ge,ge=d)}else V=ge,ge=d;else V=ge,ge=d}else V=ge,ge=d;return ge===d&&(ge=V,Te=Ne(),Te!==d&&(Te=g(Te)),ge=Te),ge}function Ne(){var ge;return ge=xe(),ge===d&&(ge=me()),ge}function xe(){var ge,Te,Fe,Ke;if(ge=V,Te=ye(),Te!==d){if(Fe=[],Ke=Ae(),Ke!==d)for(;Ke!==d;)Fe.push(Ke),Ke=Ae();else Fe=d;Fe!==d?(Ke=Ie(),Ke!==d?(Te=v(Te,Ke),ge=Te):(V=ge,ge=d)):(V=ge,ge=d)}else V=ge,ge=d;return ge===d&&(ge=V,Te=ye(),Te!==d&&(Te=E(Te)),ge=Te),ge}function ye(){var ge,Te,Fe,Ke;return ge=V,c.substr(V,4)===x?(Te=x,V+=4):(Te=d,ue(j)),Te!==d?(Fe=_e(),Fe!==d?(c.charCodeAt(V)===41?(Ke=N,V++):(Ke=d,ue(T)),Ke!==d?(Te=F(Fe),ge=Te):(V=ge,ge=d)):(V=ge,ge=d)):(V=ge,ge=d),ge}function Ie(){var ge,Te,Fe,Ke;return ge=V,c.substr(V,7)===C?(Te=C,V+=7):(Te=d,ue(A)),Te!==d?(Fe=_e(),Fe!==d?(c.charCodeAt(V)===41?(Ke=N,V++):(Ke=d,ue(T)),Ke!==d?(Te=F(Fe),ge=Te):(V=ge,ge=d)):(V=ge,ge=d)):(V=ge,ge=d),ge}function me(){var ge,Te,Fe,Ke;return ge=V,c.substr(V,6)===L?(Te=L,V+=6):(Te=d,ue(O)),Te!==d?(Fe=_e(),Fe!==d?(c.charCodeAt(V)===41?(Ke=N,V++):(Ke=d,ue(T)),Ke!==d?(Te=I(Fe),ge=Te):(V=ge,ge=d)):(V=ge,ge=d)):(V=ge,ge=d),ge}function _e(){var ge,Te,Fe;if(ge=V,Te=[],M.test(c.charAt(V))?(Fe=c.charAt(V),V++):(Fe=d,ue(G)),Fe!==d)for(;Fe!==d;)Te.push(Fe),M.test(c.charAt(V))?(Fe=c.charAt(V),V++):(Fe=d,ue(G));else Te=d;return Te!==d&&(Te=W(Te)),ge=Te,ge}function Ae(){var ge;return Y.test(c.charAt(V))?(ge=c.charAt(V),V++):(ge=d,ue(te)),ge}var Le=t("../util");if($=y(),$!==d&&V===c.length)return $;throw $!==d&&V<c.length&&ue(Q()),ve(D,q<c.length?c.charAt(q):null,q<c.length?se(q,q+1):se(q,q))}n.exports={SyntaxError:o,parse:s}},{"../util":3}],2:[function(t,n,a){var i=t("./grammar");a.SyntaxError=function(o,s){this.message=o,this.offset=s},a.parse=function(o){try{return i.parse(o)}catch(s){throw new a.SyntaxError(s.message,s.offset)}},a.serialize=function(o){return o.map(function(s){var c;return s.url?(c='url("'+s.url+'")',s.format&&(c+=' format("'+s.format+'")')):c='local("'+s.local+'")',c}).join(", ")}},{"./grammar":1}],3:[function(t,n,a){var i=function(s){var c=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return s.replace(c,"$1")},o=function(s){var c=/^"(.*)"$/,u=/^'(.*)'$/;return c.test(s)?s.replace(c,"$1"):u.test(s)?s.replace(u,"$1"):s};a.extractValue=function(s){return o(i(s))}},{}]},{},[2])(2)})}(Sv)),Sv.exports}var D3;function _C(){return D3||(D3=1,function(e){var r=s0(),t=Am(),n=bC(),a=wC(),i=function(g,v,E){g.style.setProperty(v,E,g.style.getPropertyPriority(v))},o=function(g){return g.filter(function(v){return v.type===window.CSSRule.STYLE_RULE&&(v.style.getPropertyValue("background-image")||v.style.getPropertyValue("background"))})},s=function(g){var v=[];return g.forEach(function(E){E.style.getPropertyValue("background-image")?v.push({property:"background-image",value:E.style.getPropertyValue("background-image"),rule:E}):E.style.getPropertyValue("background")&&v.push({property:"background",value:E.style.getPropertyValue("background"),rule:E})}),v},c=function(g){return g.filter(function(v){return v.type===window.CSSRule.FONT_FACE_RULE&&v.style.getPropertyValue("src")})},u=function(g){return g.filter(function(v){return v.type===window.CSSRule.IMPORT_RULE&&v.href})},d=function(g){var v=[];return g.forEach(function(E,x){E.url&&!r.isDataUri(E.url)&&v.push(x)}),v},p=function(g){var v=[];return g.forEach(function(E,x){E.url&&!r.isDataUri(E.url)&&v.push(x)}),v};e.adjustPathsOfCssResources=function(g,v){var E=o(v),x=s(E),j=!1;return x.forEach(function(N){var T=n.parse(N.value),F=d(T),C;F.length>0&&(F.forEach(function(A){var L=T[A].url,O=r.joinUrl(g,L);T[A].url=O}),C=n.serialize(T),i(N.rule,N.property,C),j=!0)}),c(v).forEach(function(N){var T=N.style.getPropertyValue("src"),F,C;try{F=a.parse(T)}catch{return}C=p(F),C.length>0&&(C.forEach(function(A){var L=F[A].url,O=r.joinUrl(g,L);F[A].url=O}),t.changeFontFaceRuleSrc(v,N,a.serialize(F)),j=!0)}),u(v).forEach(function(N){var T=N.href,F=r.joinUrl(g,T);t.exchangeRule(v,N,"@import url("+F+");"),j=!0}),j};var y=function(g,v,E){var x=g.indexOf(v);g.splice(x,1),E.forEach(function(j,N){g.splice(x+N,0,j)})},f=function(g,v,E,x){var j=v.href,N;return j=t.unquoteString(j),N=r.joinUrl(x.baseUrl,j),E.indexOf(N)>=0?(y(g,v,[]),Promise.resolve([])):(E.push(N),r.ajax(j,x).then(function(T){var F=t.rulesForCssText(T);return e.loadCSSImportsForRules(F,E,x).then(function(C){return e.adjustPathsOfCssResources(j,F),y(g,v,F),C.errors})},function(T){throw{resourceType:"stylesheet",url:T.url,msg:"Unable to load stylesheet "+T.url}}))};e.loadCSSImportsForRules=function(g,v,E){var x=u(g),j=[],N=!1;return Promise.all(x.map(function(T){return f(g,T,v,E).then(function(F){j=j.concat(F),N=!0},function(F){j.push(F)})})).then(function(){return{hasChanges:N,errors:j}})};var _=function(g,v){var E=n.parse(g),x=d(E),j=!1;return r.collectAndReportErrors(x.map(function(N){var T=E[N].url;return r.getDataURIForImageURL(T,v).then(function(F){E[N].url=F,j=!0},function(F){throw{resourceType:"backgroundImage",url:F.url,msg:"Unable to load background-image "+F.url}})})).then(function(N){return{backgroundValue:n.serialize(E),hasChanges:j,errors:N}})},S=function(g,v){var E=o(g),x=s(E),j=[],N=!1;return Promise.all(x.map(function(T){return _(T.value,v).then(function(F){F.hasChanges&&(i(T.rule,T.property,F.backgroundValue),N=!0),j=j.concat(F.errors)})})).then(function(){return{hasChanges:N,errors:j}})},w=function(g,v){var E=!1,x,j;try{x=a.parse(g)}catch{x=[]}return j=p(x),r.collectAndReportErrors(j.map(function(N){var T=x[N],F=T.format||"woff";return r.binaryAjax(T.url,v).then(function(C){var A=btoa(C);T.url="data:font/"+F+";base64,"+A,E=!0},function(C){throw{resourceType:"fontFace",url:C.url,msg:"Unable to load font-face "+C.url}})})).then(function(N){return{srcDeclarationValue:a.serialize(x),hasChanges:E,errors:N}})},b=function(g,v){var E=c(g),x=[],j=!1;return Promise.all(E.map(function(N){var T=N.style.getPropertyValue("src");return w(T,v).then(function(F){F.hasChanges&&(t.changeFontFaceRuleSrc(g,N,F.srcDeclarationValue),j=!0),x=x.concat(F.errors)})})).then(function(){return{hasChanges:j,errors:x}})};e.loadAndInlineCSSResourcesForRules=function(g,v){var E=!1,x=[];return Promise.all([S,b].map(function(j){return j(g,v).then(function(N){E=E||N.hasChanges,x=x.concat(N.errors)})})).then(function(){return{hasChanges:E,errors:x}})}}(bv)),bv}var B3;function SC(){return B3||(B3=1,function(e){var r=s0(),t=mC(),n=yC(),a=_C(),i=Am(),o=function(w){return r.joinUrl(w,".")},s=function(w){var b=w.map(function(g,v){return v===w.length-1&&(g={baseUrl:o(g.baseUrl)}),JSON.stringify(g)});return b},c=function(w,b){return b.cache!==!1&&b.cache!=="none"&&b.cacheBucket?r.memoize(w,s,b.cacheBucket):w},u=function(w,b,g){var v=i.rulesForCssText(w);return a.loadCSSImportsForRules(v,b,g).then(function(E){return a.loadAndInlineCSSResourcesForRules(v,g).then(function(x){var j=E.errors.concat(x.errors),N=E.hasChanges||x.hasChanges;return N&&(w=i.cssRulesToText(v)),{hasChanges:N,content:w,errors:j}})})},d=function(w,b,g){var v=w.textContent,E=c(u,b);return E(v,g,b).then(function(x){return x.hasChanges&&(w.childNodes[0].nodeValue=x.content),r.cloneArray(x.errors)})},p=function(w){var b=w.getElementsByTagName("style");return Array.prototype.filter.call(b,function(g){return!g.attributes.type||g.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(w,b){var g=p(w),v=[],E=[],x;return x=r.clone(b),x.baseUrl=x.baseUrl||r.getDocumentBaseUrl(w),Promise.all(g.map(function(j){return d(j,x,E).then(function(N){v=v.concat(N)})})).then(function(){return v})};var y=function(w,b){var g=w.parentNode,v;b=b.trim(),b&&(v=w.ownerDocument.createElement("style"),v.type="text/css",v.appendChild(w.ownerDocument.createTextNode(b)),g.insertBefore(v,w)),g.removeChild(w)},f=function(w,b){return r.ajax(w,b).then(function(g){var v=i.rulesForCssText(g);return{content:g,cssRules:v}}).then(function(g){var v=a.adjustPathsOfCssResources(w,g.cssRules);return{content:g.content,cssRules:g.cssRules,hasChanges:v}}).then(function(g){return a.loadCSSImportsForRules(g.cssRules,[],b).then(function(v){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||v.hasChanges,errors:v.errors}})}).then(function(g){return a.loadAndInlineCSSResourcesForRules(g.cssRules,b).then(function(v){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||v.hasChanges,errors:g.errors.concat(v.errors)}})}).then(function(g){var v=g.content;return g.hasChanges&&(v=i.cssRulesToText(g.cssRules)),{content:v,errors:g.errors}})},_=function(w,b){var g=w.attributes.href.value,v=r.getDocumentBaseUrl(w.ownerDocument),E=r.clone(b);!E.baseUrl&&v&&(E.baseUrl=v);var x=c(f,b);return x(g,E).then(function(j){return{content:j.content,errors:r.cloneArray(j.errors)}})},S=function(w){var b=w.getElementsByTagName("link");return Array.prototype.filter.call(b,function(g){return g.attributes.rel&&g.attributes.rel.value==="stylesheet"&&(!g.attributes.type||g.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(w,b){var g=S(w),v=[];return Promise.all(g.map(function(E){return _(E,b).then(function(x){y(E,x.content+`
|
|
156
|
-
`),v=v.concat(x.errors)},function(x){v.push({resourceType:"stylesheet",url:x.url,msg:"Unable to load stylesheet "+x.url})})})).then(function(){return v})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(w,b){var g=[],v=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return b.inlineScripts!==!1&&v.push(e.loadAndInlineScript),Promise.all(v.map(function(E){return E(w,b).then(function(x){g=g.concat(x)})})).then(function(){return g})}}(gv)),gv}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
157
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
158
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */var xC=y1.exports,q3;function EC(){return q3||(q3=1,function(e){(function(r,t){r===void 0&&window!==void 0&&(r=window),e.exports?e.exports=t(X8(),gC(),vC(),SC()):r.rasterizeHTML=t(r.url,r.xmlserializer,r.sanedomparsererror,r.inlineresources)})(xC,function(r,t,n,a){var i=function(_){var S={},w=[];S.joinUrl=function(v,E){return v?_.resolve(v,E):E},S.getConstantUniqueIdFor=function(v){return w.indexOf(v)<0&&w.push(v),w.indexOf(v)},S.clone=function(v){var E={},x;for(x in v)v.hasOwnProperty(x)&&(E[x]=v[x]);return E};var b=function(v){return typeof v=="object"&&v!==null},g=function(v){return b(v)&&Object.prototype.toString.apply(v).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return S.parseOptionalParameters=function(v){var E={canvas:null,options:{}};return v[0]==null||g(v[0])?(E.canvas=v[0]||null,E.options=S.clone(v[1])):E.options=S.clone(v[0]),E},S}(r),o=function(_){var S={},w=function(b,g,v){var E=b[g];return b[g]=function(){var x=Array.prototype.slice.call(arguments);return v.apply(this,[x,E])},E};return S.baseUrlRespectingXhr=function(b,g){var v=function(){var E=new b;return w(E,"open",function(x,j){var N=x.shift(),T=x.shift(),F=_.joinUrl(g,T);return j.apply(this,[N,F].concat(x))}),E};return v},S.finishNotifyingXhr=function(b){var g=0,v=0,E=!1,x,j=new Promise(function(T){x=function(){var F=g-v;F<=0&&E&&T({totalCount:g})}}),N=function(){var T=new b;return w(T,"send",function(F,C){return g+=1,C.apply(this,arguments)}),T.addEventListener("load",function(){v+=1,x()}),T};return N.waitForRequestsToFinish=function(){return E=!0,x(),j},N},S}(i),s=function(){var _={},S=function(N){return Array.prototype.slice.call(N)};_.addClassName=function(N,T){N.className+=" "+T},_.addClassNameRecursively=function(N,T){_.addClassName(N,T),N.parentNode!==N.ownerDocument&&_.addClassNameRecursively(N.parentNode,T)};var w=function(N,T){var F=N.parentStyleSheet,C=S(F.cssRules).indexOf(N);F.insertRule(T,C+1),F.deleteRule(C)},b=function(N,T){var F=N.cssText.replace(/^[^\{]+/,""),C=T+" "+F;w(N,C)},g=function(N){return S(N).reduce(function(T,F){return T+F.cssText},"")},v=function(N){N.textContent=g(N.sheet.cssRules)},E=function(N){var T=document.implementation.createHTMLDocument(""),F=document.createElement("style");F.textContent=N.textContent,T.body.appendChild(F),N.sheet=F.sheet},x=function(N){return"((?:^|[^.#:\\w])|(?=\\W))("+N.join("|")+")(?=\\W|$)"},j=function(N,T,F){var C=x(T);S(N.querySelectorAll("style")).forEach(function(A){typeof A.sheet>"u"&&E(A);var L=S(A.sheet.cssRules).filter(function(O){return O.selectorText&&new RegExp(C,"i").test(O.selectorText)});L.length&&(L.forEach(function(O){var I=O.selectorText.replace(new RegExp(C,"gi"),function(M,G,W){return G+F(W)});I!==O.selectorText&&b(O,I)}),v(A))})};return _.rewriteCssSelectorWith=function(N,T,F){j(N,[T],function(){return F})},_.lowercaseCssTypeSelectors=function(N,T){j(N,T,function(F){return F.toLowerCase()})},_.findHtmlOnlyNodeNames=function(N){var T=N.ownerDocument.createTreeWalker(N,NodeFilter.SHOW_ELEMENT),F={},C={},A;do A=T.currentNode.tagName.toLowerCase(),T.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?F[A]=!0:C[A]=!0;while(T.nextNode());return Object.keys(F).filter(function(L){return!C[L]})},_}(),c=function(_){var S={},w=function(g){return Array.prototype.slice.call(g)},b={active:!0,hover:!0,focus:!1,target:!1};return S.fakeUserAction=function(g,v,E){var x=g.querySelector(v),j=":"+E,N="rasterizehtml"+E;x&&(b[E]?_.addClassNameRecursively(x,N):_.addClassName(x,N),_.rewriteCssSelectorWith(g,j,"."+N))},S.persistInputValues=function(g){var v=g.querySelectorAll("input"),E=g.querySelectorAll("textarea"),x=function(j){return j.type==="checkbox"||j.type==="radio"};w(v).filter(x).forEach(function(j){j.checked?j.setAttribute("checked",""):j.removeAttribute("checked")}),w(v).filter(function(j){return!x(j)}).forEach(function(j){j.setAttribute("value",j.value)}),w(E).forEach(function(j){j.textContent=j.value})},S.rewriteTagNameSelectorsToLowerCase=function(g){_.lowercaseCssTypeSelectors(g,_.findHtmlOnlyNodeNames(g))},S}(s),u=function(_,S,w,b){var g={},v=function(W,Y,te,V){var H=W.createElement(Y);return H.style.visibility="hidden",H.style.width=te+"px",H.style.height=V+"px",H.style.position="absolute",H.style.top=-1e4-V+"px",H.style.left=-1e4-te+"px",W.getElementsByTagName("body")[0].appendChild(H),H},E=function(W){return W>0?new Promise(function(Y){setTimeout(Y,W)}):Promise.resolve()};g.executeJavascript=function(W,Y){return new Promise(function(te){var V=v(b.document,"iframe",Y.width,Y.height),H=W.outerHTML,q=[],D=Y.executeJsTimeout||0,$=function(){b.document.getElementsByTagName("body")[0].removeChild(V)},ne=function(){var se=V.contentDocument;te({document:se,errors:q,cleanUp:$})},Z=V.contentWindow.XMLHttpRequest,Q=S.finishNotifyingXhr(Z),oe=S.baseUrlRespectingXhr(Q,Y.baseUrl);V.onload=function(){E(D).then(Q.waitForRequestsToFinish).then(ne)},V.contentDocument.open(),V.contentWindow.XMLHttpRequest=oe,V.contentWindow.onerror=function(se){q.push({resourceType:"scriptExecution",msg:se})},V.contentDocument.write("<!DOCTYPE html>"),V.contentDocument.write(H),V.contentDocument.close()})};var x=function(W,Y,te){var V=W.createElement("iframe");return V.style.width=Y+"px",V.style.height=te+"px",V.style.visibility="hidden",V.style.position="absolute",V.style.top=-1e4-te+"px",V.style.left=-1e4-Y+"px",V.style.borderWidth=0,V.sandbox="allow-same-origin",V.scrolling="no",V},j=function(W,Y,te){var V=Math.floor(W/te),H=Math.floor(Y/te);return x(b.document,V,H)},N=function(W,Y,te,V){return{width:Math.max(W.width*V,Y),height:Math.max(W.height*V,te)}},T=function(W,Y){var te=W.querySelector(Y);if(te)return te;if(W.ownerDocument.querySelector(Y)===W)return W;throw{message:"Clipping selector not found"}},F=function(W,Y,te,V,H){var q=Math.max(W.scrollWidth,W.clientWidth),D=Math.max(W.scrollHeight,W.clientHeight),$,ne,Z,Q,oe,se,ue,ve;return Y?(se=T(W,Y),ue=se.getBoundingClientRect(),$=ue.top,ne=ue.left,Z=ue.width,Q=ue.height):($=0,ne=0,Z=q,Q=D),ve=N({width:Z,height:Q},te,V,H),oe=b.getComputedStyle(W.ownerDocument.documentElement).fontSize,{left:ne,top:$,width:ve.width,height:ve.height,viewportWidth:q,viewportHeight:D,rootFontSize:oe}},C=function(W,Y){var te=W.tagName;return Y.querySelector(te)},A=function(W){var Y=W.tagName.toLowerCase();return Y==="html"||Y==="body"?W.outerHTML:'<body style="margin: 0;">'+W.outerHTML+"</body>"};g.calculateDocumentContentSize=function(W,Y){return new Promise(function(te,V){var H=Y.zoom||1,q;q=j(Y.width,Y.height,H),b.document.getElementsByTagName("body")[0].appendChild(q),q.onload=function(){var D=q.contentDocument,$;try{$=F(C(W,D),Y.clip,Y.width,Y.height,H),te($)}catch(ne){V(ne)}finally{b.document.getElementsByTagName("body")[0].removeChild(q)}},q.contentDocument.open(),q.contentDocument.write("<!DOCTYPE html>"),q.contentDocument.write(A(W)),q.contentDocument.close()})},g.parseHtmlFragment=function(W){var Y=b.document.implementation.createHTMLDocument("");Y.documentElement.innerHTML=W;var te=Y.querySelector("body").firstChild;if(!te)throw"Invalid source";return te};var L=function(W,Y){var te=/<html((?:\s+[^>]*)?)>/im.exec(Y),V=b.document.implementation.createHTMLDocument(""),H,q,D,$;if(te)for(H="<div"+te[1]+"></div>",V.documentElement.innerHTML=H,D=V.querySelector("div"),q=0;q<D.attributes.length;q++)$=D.attributes[q],W.documentElement.setAttribute($.name,$.value)};g.parseHTML=function(W){var Y=b.document.implementation.createHTMLDocument("");return Y.documentElement.innerHTML=W,L(Y,W),Y};var O=function(W){try{return w.failOnParseError(W)}catch(Y){throw{message:"Invalid source",originalError:Y}}};g.validateXHTML=function(W){var Y=new DOMParser,te=Y.parseFromString(W,"application/xml");O(te)};var I=null,M=function(W,Y){return Y==="none"||Y==="repeated"?((I===null||Y!=="repeated")&&(I=Date.now()),W+"?_="+I):W},G=function(W,Y){return new Promise(function(te,V){var H=new window.XMLHttpRequest,q=_.joinUrl(Y.baseUrl,W),D=M(q,Y.cache),$=function(ne){V({message:"Unable to load page",originalError:ne})};H.addEventListener("load",function(){H.status===200||H.status===0?te(H.responseXML):$(H.statusText)},!1),H.addEventListener("error",function(ne){$(ne)},!1);try{H.open("GET",D,!0),H.responseType="document",H.send(null)}catch(ne){$(ne)}})};return g.loadDocument=function(W,Y){return G(W,Y).then(function(te){return O(te)})},g}(i,o,n,window),d=function(_){var S={},w=function(C,A){return A?URL.createObjectURL(new Blob([C],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(C)},b=function(C){C instanceof Blob&&URL.revokeObjectURL(C)},g='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',v=function(C){return new Promise(function(A,L){var O=document.createElement("canvas"),I=new Image;I.onload=function(){var M=O.getContext("2d");try{M.drawImage(I,0,0),O.toDataURL("image/png"),A(!0)}catch{A(!1)}},I.onerror=L,I.src=C})},E=function(){var C=w(g,!0);return v(C).then(function(A){return b(C),A?!1:v(w(g,!1)).then(function(L){return L})},function(){return!1})},x=function(){if(_.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},j=function(){return new Promise(function(C,A){x()&&_.URL?E().then(function(L){C(!L)},function(){A()}):C(!1)})},N,T=function(){return N===void 0&&(N=j()),N},F=function(C){return T().then(function(A){return w(C,A)})};return S.renderSvg=function(C){return new Promise(function(A,L){var O,I,M=function(){I.onload=null,I.onerror=null},G=function(){O&&b(O)};I=new Image,I.onload=function(){M(),G(),A(I)},I.onerror=function(){G(),L()},F(C).then(function(W){O=W,I.src=O},L)})},S}(window),p=function(_,S,w,b){var g={},v=function(C,A){var L=A||1,O={width:C.width,height:C.height,"font-size":C.rootFontSize};return L!==1&&(O.style="transform:scale("+L+"); transform-origin: 0 0;"),O},E=function(C){var A,L,O,I;A=Math.round(C.viewportWidth),L=Math.round(C.viewportHeight),O=-C.left,I=-C.top;var M={x:O,y:I,width:A,height:L};return M},x=function(C){var A=C.style||"";C.style=A+"float: left;"},j=function(C){C.externalResourcesRequired=!0},N=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},T=function(C){var A=Object.keys(C);return A.length?" "+A.map(function(L){return L+'="'+C[L]+'"'}).join(" "):""},F=function(C,A,L){var O=b.serializeToString(C);S.validateXHTML(O);var I=E(A);return x(I),j(I),'<svg xmlns="http://www.w3.org/2000/svg"'+T(v(A,L))+">"+N()+"<foreignObject"+T(I)+">"+O+"</foreignObject></svg>"};return g.getSvgForDocument=function(C,A,L){return w.rewriteTagNameSelectorsToLowerCase(C),F(C,A,L)},g.drawDocumentAsSvg=function(C,A){return["hover","active","focus","target"].forEach(function(L){A[L]&&w.fakeUserAction(C,A[L],L)}),S.calculateDocumentContentSize(C,A).then(function(L){return g.getSvgForDocument(C,L,A.zoom)})},g}(i,u,c,t),y=function(_,S,w,b,g,v){var E={},x=function(C){return{message:"Error rendering page",originalError:C}},j=function(C){return g.renderSvg(C).then(function(A){return{image:A,svg:C}},function(A){throw x(A)})},N=function(C,A){try{A.getContext("2d").drawImage(C,0,0)}catch(L){throw x(L)}},T=function(C,A,L){return b.drawDocumentAsSvg(C,L).then(j).then(function(O){return A&&N(O.image,A),O})},F=function(C,A){return S.executeJavascript(C,A).then(function(L){var O=L.document;return w.persistInputValues(O),{document:O,errors:L.errors,cleanUp:L.cleanUp}})};return E.rasterize=function(C,A,L){var O;return O=_.clone(L),O.inlineScripts=L.executeJs===!0,v.inlineReferences(C,O).then(function(I){return L.executeJs?F(C,L).then(function(M){return{element:M.document.documentElement,errors:I.concat(M.errors),cleanUp:M.cleanUp}}):{element:C,errors:I,cleanUp:function(){}}}).then(function(I){return T(I.element,A,L).then(function(M){return I.cleanUp(),{image:M.image,svg:M.svg,errors:I.errors}})})},E}(i,u,c,p,d,a),f=function(_,S,w){var b={},g=function(N,T){var F=300,C=200,A=N?N.width:F,L=N?N.height:C,O=T.width!==void 0?T.width:A,I=T.height!==void 0?T.height:L;return{width:O,height:I}},v=function(N){var T=g(N.canvas,N.options),F;return F=_.clone(N.options),F.width=T.width,F.height=T.height,F};b.drawDocument=function(){var N=arguments[0],T=Array.prototype.slice.call(arguments,1),F=_.parseOptionalParameters(T),C=N.documentElement?N.documentElement:N;return w.rasterize(C,F.canvas,v(F))};var E=function(N,T,F){var C=S.parseHTML(N);return b.drawDocument(C,T,F)};b.drawHTML=function(){var N=arguments[0],T=Array.prototype.slice.call(arguments,1),F=_.parseOptionalParameters(T);return E(N,F.canvas,F.options)};var x=function(N,T,F){var C=document.implementation.createHTMLDocument("");C.replaceChild(N.documentElement,C.documentElement);var A=F?_.clone(F):{};return F.baseUrl||(A.baseUrl=T),{document:C,options:A}},j=function(N,T,F){return S.loadDocument(N,F).then(function(C){var A=x(C,N,F);return b.drawDocument(A.document,T,A.options)})};return b.drawURL=function(){var N=arguments[0],T=Array.prototype.slice.call(arguments,1),F=_.parseOptionalParameters(T);return j(N,F.canvas,F.options)},b}(i,u,y);return f})}(y1)),y1.exports}var z3;function K8(){return z3||(z3=1,function(e){var r,t=ic&&ic.__createBinding||(Object.create?function(w,b,g,v){v===void 0&&(v=g);var E=Object.getOwnPropertyDescriptor(b,g);E&&!("get"in E?!b.__esModule:E.writable||E.configurable)||(E={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,E)}:function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]}),n=ic&&ic.__setModuleDefault||(Object.create?function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}:function(w,b){w.default=b}),a=ic&&ic.__importStar||(r=function(w){return r=Object.getOwnPropertyNames||function(b){var g=[];for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(g[g.length]=v);return g},r(w)},function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g=r(w),v=0;v<g.length;v++)g[v]!=="default"&&t(b,w,g[v]);return n(b,w),b});Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=function({html:w}){const b=document.createElement("div");b.innerHTML=w,b.style.display="inline-block",b.style.position="fixed",b.style.top="0px",b.style.left="0px",b.style.zIndex="1000",b.style.whiteSpace="nowrap",b.style.visibility="hidden";const g=d();g.appendChild(b);const v=b.textContent,E=b.childNodes[0],x=v.split(/\s+/);let j=!1;for(let N=0;N<x.length;N++){const T=x[N];if(E.textContent=T,j=E.scrollWidth>b.clientWidth,j)break}return g.removeChild(b),j},e.detectSize=function(w){const b=document.createElement("div");b.innerHTML=w,b.style.display="inline-block",b.style.position="fixed",b.style.top="0px",b.style.left="0px",b.style.zIndex="1000";const g=d();g.appendChild(b);const v=b.getBoundingClientRect();return g.removeChild(b),{width:v.width,height:v.height}},e.htmlToCanvas=async function({html:w,width:b,height:g,fontFamily:v,padding:E,font:x,pixelRatio:j}){if(v!=="Arial"&&!x){const C=(0,o.getGoogleFontsVariants)();w+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${v}:${C}" rel="stylesheet">`}if(x){const C=x.styles||(x.url?[{src:`url("${x.url}")`}]:S(v));w+="<style>",C.forEach(A=>{w+=`
|
|
159
|
-
@font-face {
|
|
160
|
-
font-family: '${v}';
|
|
161
|
-
src: ${A.src};
|
|
162
|
-
font-style: ${A.fontStyle||"normal"};
|
|
163
|
-
font-weight: ${A.fontWeight||"normal"};
|
|
164
|
-
}
|
|
165
|
-
`}),w+="</style>"}w+=c;const N=document.createElement("canvas"),T=await i.drawHTML(`<div style="padding: ${E}px;" dir="auto">${w}</div>`,N,{width:b+2*E,height:g+2*E,cacheBucket:f});(0,s.trySetCanvasSize)(N,(b+2*E)*j,(g+2*E)*j);const F=N.getContext("2d");return F==null||F.drawImage(T.image,0,0,N.width,N.height),N};const i=a(EC()),o=Ih(),s=B8();e.resetStyleContent=`
|
|
166
|
-
p {
|
|
167
|
-
margin: 0;
|
|
168
|
-
padding: 0;
|
|
169
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
170
|
-
/* a text may have several spaces, we need to preserve them */
|
|
171
|
-
white-space: pre-wrap;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Reset default list styles and setup counters */
|
|
175
|
-
ul, ol {
|
|
176
|
-
list-style: none; /* Remove default markers */
|
|
177
|
-
padding-inline-start: 0; /* Reset padding */
|
|
178
|
-
margin: 0;
|
|
179
|
-
display: block; /* Use block instead of inline-block for better text wrapping */
|
|
180
|
-
width: 100%;
|
|
181
|
-
text-decoration: inherit;
|
|
182
|
-
counter-reset: ol-counter; /* Initialize counter for ol */
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
li {
|
|
186
|
-
position: relative; /* Needed for absolute positioning of ::before */
|
|
187
|
-
padding-inline-start: 2.1em; /* Space for the marker (start side) */
|
|
188
|
-
margin: 0; /* Reset default li margins */
|
|
189
|
-
word-wrap: break-word; /* Required for Firefox text wrapping */
|
|
190
|
-
white-space: pre-wrap; /* Preserve spaces and allow wrapping */
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
li::before {
|
|
194
|
-
content: ''; /* Base content */
|
|
195
|
-
position: absolute;
|
|
196
|
-
/* Use logical properties for positioning */
|
|
197
|
-
inset-inline-start: 0; /* Position marker at the start edge (left in LTR, right in RTL) */
|
|
198
|
-
top: 0; /* Adjust vertical alignment */
|
|
199
|
-
/* Prevent letter-spacing from affecting the marker */
|
|
200
|
-
letter-spacing: normal;
|
|
201
|
-
/* Define width to ensure consistent spacing and alignment */
|
|
202
|
-
display: inline-block;
|
|
203
|
-
width: 2em; /* Width for the marker container */
|
|
204
|
-
/* Align multi-digit numbers to the end (right in LTR, left in RTL) */
|
|
205
|
-
text-align: end;
|
|
206
|
-
/* Space between marker and text (using logical property) */
|
|
207
|
-
margin-inline-end: 0.8em; /* Pushes text away from marker (2.5em total = 1.7em width + 0.8em margin)*/
|
|
208
|
-
/* Prevent marker style from inheriting list item styles */
|
|
209
|
-
font-weight: normal;
|
|
210
|
-
font-style: normal;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* Style for bullet points */
|
|
214
|
-
ul > li::before {
|
|
215
|
-
content: '•'; /* Literal bullet character */
|
|
216
|
-
/* Center the bullet within its allocated width */
|
|
217
|
-
text-align: center; /* Override text-align: end for bullets */
|
|
218
|
-
font-size: 1.2em;
|
|
219
|
-
top: 0em; /* Re-adjust vertical alignment for bullet */
|
|
220
|
-
/* Bullets don't need number alignment, width can be tighter */
|
|
221
|
-
width: 2em;
|
|
222
|
-
/* Adjust margin to maintain overall padding */
|
|
223
|
-
margin-inline-end: 1.5em; /* 2.5em total padding = 1em width + 1.5em margin */
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/* Style for numbers using counter */
|
|
227
|
-
ol > li {
|
|
228
|
-
counter-increment: ol-counter; /* Increment counter for each li in ol */
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
ol > li::before {
|
|
232
|
-
content: counter(ol-counter) "."; /* Display counter value + dot */
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.ql-indent-1 {
|
|
236
|
-
margin-inline-start: 0.5em;
|
|
237
|
-
}
|
|
238
|
-
.ql-indent-2 {
|
|
239
|
-
margin-inline-start: 1em;
|
|
240
|
-
}
|
|
241
|
-
.ql-indent-3 {
|
|
242
|
-
margin-inline-start: 1.5em;
|
|
243
|
-
}
|
|
244
|
-
`;const c=`
|
|
245
|
-
<style>
|
|
246
|
-
html, body {
|
|
247
|
-
padding: 0;
|
|
248
|
-
margin: 0;
|
|
249
|
-
}
|
|
250
|
-
${e.resetStyleContent}
|
|
251
|
-
</style>
|
|
252
|
-
`;let u;const d=()=>(u||(u=document.createElement("div"),u.id="polotno-hidden-do-not-touch",u.style.overflow="hidden",u.style.position="relative",document.body.appendChild(u),u.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),u),p=new Map,y=navigator.userAgent.includes("Firefox");e.prerenderFont=async w=>{if(p.has(w))return p.get(w);const b=(async()=>{const g=`<div style="font-family: ${w}; font-size: 100px;">${w}<strong>${w}</strong></div>`,v=document.createElement("div");v.innerHTML=g,v.style.visibility="hidden",v.style.position="absolute";const E=d();E.appendChild(v);const x=y?180:50;await new Promise(j=>setTimeout(j,x)),E.removeChild(v)})();return p.set(w,b),b};const f={},_={},S=w=>{if(_[w])return _[w];const b=function(v){const E=[];for(const x of document.styleSheets)try{for(const j of x.cssRules)j instanceof CSSFontFaceRule&&j.style.fontFamily.replace(/['"]/g,"")===v&&E.push(j)}catch(j){console.warn(`Could not access stylesheet: ${x.href}`,j)}return E}(w),g=b.filter(v=>v.style.fontFamily.replace(/['"]/g,"")===w).map(v=>({src:v.style.src,fontStyle:v.style.fontStyle||"normal",fontWeight:v.style.fontWeight||"normal"}));return _[w]=g,g}}(ic)),ic}var nh={},xv={},U3;function Z8(){return U3||(U3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=d,e.setup=function(w,b,g,v){i.p=b,p=w,y=g,f=v},e.styled=function(w,b){let g=this||{};return function(){let v=arguments;function E(x,j){let N=Object.assign({},x),T=N.className||E.className;g.p=Object.assign({theme:y&&y()},N),g.o=/ *go\d+/.test(T),N.className=d.apply(g,v)+(T?" "+T:""),b&&(N.ref=j);let F=w;return w[0]&&(F=N.as||w,delete N.as),f&&F[0]&&f(N),p(F,N)}return b?b(E):E}};let r={data:""},t=w=>typeof window=="object"?((w?w.querySelector("#_goober"):window._goober)||Object.assign((w||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:w||r,n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,i=(w,b)=>{let g="",v="",E="";for(let x in w){let j=w[x];x[0]=="@"?x[1]=="i"?g=x+" "+j+";":v+=x[1]=="f"?i(j,x):x+"{"+i(j,x[1]=="k"?"":b)+"}":typeof j=="object"?v+=i(j,b?b.replace(/([^,])+/g,N=>x.replace(/(^:.*)|([^,])+/g,T=>/&/.test(T)?T.replace(/&/g,N):N?N+" "+T:T)):x):j!=null&&(x=x.replace(/[A-Z]/g,"-$&").toLowerCase(),E+=i.p?i.p(x,j):x+":"+j+";")}return g+(b&&E?b+"{"+E+"}":E)+v},o={},s=w=>{if(typeof w=="object"){let b="";for(let g in w)b+=g+s(w[g]);return b}return w},c=(w,b,g,v,E)=>{let x=s(w),j=o[x]||(o[x]=(N=>{let T=0,F=11;for(;T<N.length;)F=101*F+N.charCodeAt(T++)>>>0;return"go"+F})(x));if(!o[j]){let N=x!==w?w:(T=>{let F,C=[{}];for(;F=n.exec(T.replace(a,""));)F[4]?C.shift():F[3]?C.unshift(C[0][F[3]]=C[0][F[3]]||{}):C[0][F[1]]=F[2];return C[0]})(w);o[j]=i(E?{["@keyframes "+j]:N}:N,g?"":"."+j)}return((N,T,F)=>{T.data.indexOf(N)==-1&&(T.data=F?N+T.data:T.data+N)})(o[j],b,v),j},u=(w,b,g)=>w.reduce((v,E,x)=>{let j=b[x];if(j&&j.call){let N=j(g),T=N&&N.props&&N.props.className||/^go/.test(N)&&N;j=T?"."+T:N&&typeof N=="object"?N.props?"":i(N,""):N===!1?"":N}return v+E+(j??"")},"");function d(w){let b=this||{},g=w.call?w(b.p):w;return c(g.unshift?g.raw?u(g,[].slice.call(arguments,1),b.p):g.reduce((v,E)=>Object.assign(v,E&&E.call?E(b.p):E),{}):g,t(b.target),b.g,b.o,b.k)}e.extractCss=w=>{let b=t(w),g=b.data;return b.data="",g};let p,y,f,_=d.bind({g:1}),S=d.bind({k:1});e.glob=_,e.keyframes=S}(xv)),xv}var H3;function PC(){if(H3)return nh;H3=1;var e=nh&&nh.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nh,"__esModule",{value:!0});const r=e(fi()),t=Z8();return(0,t.setup)(r.default.createElement),nh.default=t.styled,nh}var V3;function OC(){return V3||(V3=1,function(e){var r,t=Dl&&Dl.__createBinding||(Object.create?function(M,G,W,Y){Y===void 0&&(Y=W);var te=Object.getOwnPropertyDescriptor(G,W);te&&!("get"in te?!G.__esModule:te.writable||te.configurable)||(te={enumerable:!0,get:function(){return G[W]}}),Object.defineProperty(M,Y,te)}:function(M,G,W,Y){Y===void 0&&(Y=W),M[Y]=G[W]}),n=Dl&&Dl.__setModuleDefault||(Object.create?function(M,G){Object.defineProperty(M,"default",{enumerable:!0,value:G})}:function(M,G){M.default=G}),a=Dl&&Dl.__importStar||(r=function(M){return r=Object.getOwnPropertyNames||function(G){var W=[];for(var Y in G)Object.prototype.hasOwnProperty.call(G,Y)&&(W[W.length]=Y);return W},r(M)},function(M){if(M&&M.__esModule)return M;var G={};if(M!=null)for(var W=r(M),Y=0;Y<W.length;Y++)W[Y]!=="default"&&t(G,M,W[Y]);return n(G,M),G}),i=Dl&&Dl.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.setQuillFormats=e.quillRef=void 0;const o=i(fi()),s=Us,c=Fu,u=i(TA()),d=a(qs),p=gc(),y=Op(),f=F8(),_=Pp(),S=K8(),w=If(),b=Mh,g=i(PC()),v=jf(),E=D6(),x=a(Ih()),j=rf(),N=j8(),T=qs;e.quillRef=d.observable({enabled:!1,currentFormat:{},editor:d.observable.object({instance:null},{},{deep:!1})});const F=(0,g.default)("div",o.default.forwardRef)`
|
|
253
|
-
.ql-editor {
|
|
254
|
-
outline: none;
|
|
255
|
-
}
|
|
256
|
-
.ql-clipboard {
|
|
257
|
-
pointer-events: none;
|
|
258
|
-
}
|
|
259
|
-
${S.resetStyleContent}
|
|
260
|
-
strong {
|
|
261
|
-
font-weight: 700;
|
|
262
|
-
}
|
|
263
|
-
.ql-direction-rtl {
|
|
264
|
-
direction: rtl;
|
|
265
|
-
}
|
|
266
|
-
`;let C=["bold","color","font","italic","size","strike","underline","indent","list","direction"];e.setQuillFormats=M=>{C=M},e.createQuill=M=>new u.default(M,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:C}),e.setQuillContent=(M,G)=>{var W=M.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+G+"<p><br></p></div>");M.setContents(W),M.history.clear()};const A=({html:M,onBlur:G,onChange:W,element:Y})=>{const te=o.default.useRef(null);o.default.useEffect(()=>{if(!te.current)return;const H=(0,e.createQuill)(te.current);return d.runInAction(()=>{e.quillRef.editor.instance=H}),window.__polotnoQuill=H,H.on("text-change",()=>{H.getSelection()&&d.runInAction(()=>{e.quillRef.currentFormat=H.getFormat()}),setTimeout(()=>{var q;const D=(q=te.current)===null||q===void 0?void 0:q.childNodes[0];W(D.innerHTML)},10)}),H.setSelection(0,0,"api"),H.on("selection-change",(q,D,$)=>{q&&d.runInAction(()=>{e.quillRef.currentFormat=H.getFormat()})}),te.current.childNodes[0].addEventListener("blur",q=>{var D;if(!((D=q.relatedTarget)===null||D===void 0)&&D.classList.contains("ql-clipboard"))return;(function(ne){return!!ne&&!!ne.closest(".sketch-picker")})(q.relatedTarget)||G()}),()=>{d.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),o.default.useEffect(()=>(0,T.reaction)(()=>Y.text,()=>{var H;const q=e.quillRef.editor.instance;if(!q)return;const D=q.getSelection();((H=te.current)===null||H===void 0?void 0:H.childNodes[0].innerHTML)===Y.text||((0,e.setQuillContent)(q,M),D&&(q.setSelection(D.index,D.length),d.runInAction(()=>{e.quillRef.currentFormat=q.getFormat()})))},{fireImmediately:!0}),[]);const V={color:Y.fill};return Y.fill.indexOf("gradient")>=0&&(V.backgroundColor=Y.fill,V.backgroundImage=Y.fill,V.backgroundSize="100% 100%",V.backgroundRepeat="repeat",V.webkitBackgroundClip="text",V.MozBackgroundClip="text",V.WebkitTextFillColor="transparent",V.MozTextFillColor="transparent"),o.default.createElement(F,{ref:te,style:Object.assign(Object.assign({},V),{fontSize:Y.fontSize,fontWeight:Y.fontWeight,width:Y.a.width,fontFamily:'"'+Y.fontFamily+'"',lineHeight:Y.lineHeight,letterSpacing:Y.letterSpacing*Y.fontSize+"px",textAlign:Y.align,opacity:Math.max(Y.a.opacity,.2)}),dir:(0,f.getDir)((0,E.removeTags)(Y.text))})},L=(M,G=100,W=!1,Y="")=>{const[te,V]=o.default.useState(M),H=o.default.useRef(null);return o.default.useEffect(()=>M===W?(H.current&&(clearTimeout(H.current),H.current=null),void V(W)):(H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{V(M),H.current=null},G),()=>{H.current&&clearTimeout(H.current)}),[M,G]),[te,V]};function O(M,{fontFamily:G="",color:W="black"}={}){let Y=`color: ${W||M.fill}`;return M.fill.indexOf("gradient")>=0&&(Y=`
|
|
267
|
-
background-color: ${W};
|
|
268
|
-
background-image: ${M.fill};
|
|
269
|
-
background-size: 100% 100%;
|
|
270
|
-
background-repeat: repeat;
|
|
271
|
-
-webkit-background-clip: text;
|
|
272
|
-
-moz-background-clip: text;
|
|
273
|
-
-webkit-text-fill-color: transparent;
|
|
274
|
-
-moz-text-fill-color: transparent;
|
|
275
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(M.width||100)}px`,Y,`font-size: ${M.fontSize}px`,`font-family: '${G}'`,`text-align: ${M.align}`,M.textDecoration?`text-decoration: ${M.textDecoration}; text-decoration-color: ${W||M.fill}; text-decoration-layer: over`:"",M.lineHeight?`line-height: ${M.lineHeight}`:"",M.letterSpacing?`letter-spacing: ${M.letterSpacing*M.fontSize}px`:"",M.fontStyle?`font-style: ${M.fontStyle}`:"",M.fontWeight?`font-weight: ${M.fontWeight}`:"",M.strokeWidth?`-webkit-text-stroke: ${M.strokeWidth}px ${M.stroke}`:"",M.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,f.getDir)((0,E.removeTags)(M.text))}">${(0,E.sanitizeHtml)(M.text).replace(/\n/g,"</br>")}</div>`}const I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,s.observer)(({element:M,store:G})=>{const W=o.default.useRef(null),[Y,te]=o.default.useState(),[V,H]=o.default.useState(!1),[q,D]=o.default.useState(!0),$=o.default.useRef(M.height),ne=G.selectedShapes.indexOf(M)>=0&&M.selectable,Z=M.fontSize/3,{textVerticalResizeEnabled:Q}=p.flags,oe=(0,f.usePrevious)(M.fontFamily),[se]=(0,f.useFontLoader)(G,M.fontFamily),ue=M._editModeEnabled;(0,w.useFadeIn)(W);const ve=se?M.fontFamily:oe!==M.fontFamily?oe:"Arial",Pe=(0,_.useColor)(M).fill,ke=O(M,{fontFamily:ve,color:Pe}),{width:Ne,height:xe}=function(it,rt,at){return o.default.useMemo(()=>(0,S.detectSize)(it),[it,rt.width,at])}(ke,M,se);o.default.useEffect(()=>{if(!se)return;if(!M.height)return void M.set({height:xe});const{textOverflow:it}=p.flags;if(it!=="change-font-size"||V)it==="resize"&&(Q&&M.height<xe&&G.history.ignore(()=>{M.set({height:xe})}),Q||M.height===xe||G.history.ignore(()=>{M.set({height:xe})}));else{const rt=(at=>{let bt=at.fontSize;for(let yt=1;yt<50;yt++){const ht=O(Object.assign(Object.assign({},at.toJSON()),{fontSize:bt}),{fontFamily:at.fontFamily}),{height:zt}=(0,S.detectSize)(ht),Ot=at.height&&zt>at.height,Ut=(0,S.isContentWrapping)({html:ht});if(!Ot&&!Ut)break;bt-=.5}return bt})(M);rt!==M.fontSize?G.history.ignore(()=>{M.set({fontSize:rt})}):M.height!==xe&&(Q&&M.height<xe?G.history.ignore(()=>{M.set({height:xe})}):Q||G.history.ignore(()=>{M.set({height:xe})}))}});const ye=o.default.useRef(0),Ie=o.default.useMemo(()=>{const it={lastArgs:null,lastResult:null};return async function(rt){return it.lastArgs&&it.lastResult&&(at=it.lastArgs,bt=rt,JSON.stringify(at)===JSON.stringify(bt))||(it.lastResult=await(0,S.htmlToCanvas)(rt),it.lastArgs=Object.assign({},rt)),it.lastResult;var at,bt}},[]),me=o.default.useRef(null);o.default.useEffect(()=>{V||ue||(async()=>{ye.current++;const it=ye.current,rt=(0,v.incrementLoader)(`text ${M.id}`);me.current=rt,D(!0);let at=null;const bt=I?5:1;for(let yt=0;yt<bt;yt++){const ht=yt>0?Ie:S.htmlToCanvas;try{if(at=await ht({skipCache:yt>0,html:ke,width:M.width||1,height:M.height||xe||1,fontFamily:ve,padding:Z,pixelRatio:G._elementsPixelRatio,font:G.fonts.find(zt=>zt.fontFamily===ve)||x.globalFonts.find(zt=>zt.fontFamily===ve)}),it!==ye.current)return void rt();if(!function(zt){const Ot=zt.getContext("2d").getImageData(0,0,zt.width,zt.height).data;for(let Ut=0;Ut<Ot.length;Ut+=4)if(Ot[Ut+3]!==0)return!0;return!1}(at)&&I){await new Promise(zt=>setTimeout(zt,50*(yt+1)));continue}}catch{(0,v.triggerLoadError)(`Error rendering rich text with id ${M.id}`);break}}if(!at)return me.current=null,void rt();te(at),D(!1)})()},[ke,V,xe,ue,ve,M.height,G._elementsPixelRatio,se]);const[_e,Ae]=L(q),[Le]=L(V,100,!0),ge=Le||_e;o.default.useEffect(()=>{if(!ge)return d.autorun(()=>{const it=W.current;(0,y.applyFilter)(it,M)})},[Y,ge,M.shadowColor,M.shadowOffsetX,M.shadowOffsetY,M.shadowOpacity]),o.default.useEffect(()=>{Y&&!q&&me.current&&(me.current(),me.current=null)},[Y,q]),o.default.useEffect(()=>()=>{me.current&&me.current()},[]);let Te=0;M.verticalAlign==="middle"&&(Te=(M.height-xe)/2),M.verticalAlign==="bottom"&&(Te=M.height-xe);const Fe=(0,f.getLineHeight)({fontLoaded:se,fontFamily:M.fontFamily,fontSize:M.fontSize,lineHeight:M.lineHeight}),Ke=(0,j.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,o.default.createElement(c.Rect,{x:M.a.x,y:M.a.y,offsetX:M.backgroundPadding*(M.fontSize*Fe*.5),offsetY:M.backgroundPadding*(M.fontSize*Fe*.5),rotation:M.a.rotation,hideInExport:!M.showInExport,listening:!1,visible:M.backgroundEnabled,opacity:M.backgroundOpacity*M.a.opacity,fill:M.backgroundColor,width:M.a.width+M.backgroundPadding*(M.fontSize*Fe),height:M.a.height+M.backgroundPadding*(M.fontSize*Fe),cornerRadius:M.backgroundCornerRadius*(M.fontSize*Fe*.5)}),o.default.createElement(c.Rect,{ref:W,name:"element",x:M.a.x,y:M.a.y,listening:M.selectable,rotation:M.a.rotation,width:M.a.width,height:M.a.height,visible:!ge,draggable:Ke?M.draggable&&ne:M.draggable,preventDefault:!Ke||ne,opacity:ue?0:M.a.opacity,hideInExport:!M.showInExport,onDragMove:it=>{M.set({x:it.target.x(),y:it.target.y()})},onDragEnd:it=>{M.set({x:it.target.x(),y:it.target.y()})},id:M.id,onDblClick:()=>{M.contentEditable&&M.toggleEditMode(!0)},onDblTap:()=>{M.contentEditable&&M.toggleEditMode(!0)},onTransformStart:it=>{H(!0),$.current=M.height},onTransform:it=>{var rt;const at=it.target,bt=((rt=at.getStage())===null||rt===void 0?void 0:rt.findOne("Transformer")).getActiveAnchor(),yt=bt==="middle-left"||bt==="middle-right",ht=bt==="top-center"||bt==="bottom-center",zt=at.scaleX();if(yt){const Ot=at.scaleX(),Ut=Math.max(at.width()*Ot,M.fontSize);if(at.width(Ut),at.scaleX(1),p.flags.textVerticalResizeEnabled){const $t=Math.max(xe,$.current);M.set({height:$t})}M.set({width:Ut,x:at.x(),y:at.y()})}else if(ht){let Ot=p.flags.textOverflow==="resize"?xe:M.lineHeight*M.fontSize;const Ut=Math.max(Ot,it.target.height()*it.target.scaleY());at.scaleY(1),M.set({x:at.x(),y:at.y(),height:Ut,rotation:at.rotation()})}else at.scaleX(1),at.scaleY(1),M.set({fontSize:M.fontSize*zt,letterSpacing:M.letterSpacing,width:at.width()*zt,x:at.x(),y:at.y(),rotation:at.rotation(),height:at.height()*zt})},onTransformEnd:it=>{H(!1),D(!0);const rt=it.target.scaleX();it.target.scaleX(1),it.target.scaleY(1),M.set({fontSize:M.fontSize*rt,width:it.target.width()*rt,x:it.target.x(),y:it.target.y(),rotation:it.target.rotation(),shadowBlur:M.shadowBlur*rt,shadowOffsetX:M.shadowOffsetX*rt,shadowOffsetY:M.shadowOffsetY*rt,strokeWidth:M.strokeWidth*rt})}}),o.default.createElement(c.Image,{ref:W,image:Y,x:M.a.x,y:M.a.y,offsetX:Z,offsetY:Z-Te,listening:!1,rotation:M.a.rotation,width:M.a.width+2*Z,height:M.a.height+2*Z,visible:!ge,opacity:ue?0:M.a.opacity,shadowEnabled:M.shadowEnabled,shadowBlur:M.shadowBlur,shadowOffsetX:M.shadowOffsetX,shadowOffsetY:M.shadowOffsetY,shadowColor:M.shadowColor,shadowOpacity:M.shadowOpacity,hideInExport:!M.showInExport}),ge&&o.default.createElement(c.Group,{x:M.a.x,y:M.a.y,rotation:M.a.rotation,offsetY:-Te},o.default.createElement(b.Html,{divProps:{style:{pointerEvents:"none"}}},o.default.createElement(F,{dangerouslySetInnerHTML:{__html:ke},style:{pointerEvents:"none",opacity:M.a.opacity}}))),ue&&o.default.createElement(c.Group,{x:M.a.x,y:M.a.y,rotation:M.a.rotation,offsetY:-Te},o.default.createElement(b.Html,null,o.default.createElement(A,{html:ke,element:M,onChange:it=>{const rt=(0,N.getLimitedFontSize)({oldText:(0,E.removeTags)(M.text),newText:(0,E.removeTags)(it),element:M});M.set({text:it,fontSize:rt})},onBlur:it=>{M.toggleEditMode(!1),Ae(!0),(0,E.removeTags)(M.text)===""&&M.removable&&!M.placeholder&&G.deleteElements([M.id])}}))))})}(Dl)),Dl}var Gd={},Wd={},Ev={},G3;function Dh(){return G3||(G3=1,function(e){function r(o){return o/180*Math.PI}function t(o,s,c,u,d){const p=Math.sqrt(c*c+u*u);return d+=Math.atan2(u,c),{x:o+p*Math.cos(d),y:s+p*Math.sin(d)}}function n(o){const{x:s,y:c,width:u,height:d}=o,p=r(o.rotation),y=t(s,c,0,0,p),f=t(s,c,u,0,p),_=t(s,c,u,d,p),S=t(s,c,0,d,p),w=Math.min(y.x,f.x,_.x,S.x),b=Math.min(y.y,f.y,_.y,S.y),g=Math.max(y.x,f.x,_.x,S.x),v=Math.max(y.y,f.y,_.y,S.y);return{x:w,y:b,width:g-w,height:v-b,minX:w,minY:b,maxX:g,maxY:v}}function a(o){const s=r(o.rotation||0);return{x:o.x+o.width/2*Math.cos(s)+o.height/2*Math.sin(-s),y:o.y+o.height/2*Math.cos(s)+o.width/2*Math.sin(s)}}function i(o,s,c){const u=r(s),d=c.x+(o.x-c.x)*Math.cos(u)-(o.y-c.y)*Math.sin(u),p=c.y+(o.x-c.x)*Math.sin(u)+(o.y-c.y)*Math.cos(u);return Object.assign(Object.assign({},o),{rotation:o.rotation+s,x:d,y:p})}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=r,e.getClientRect=n,e.getTotalClientRect=function(o){const s=o.map(y=>n(y)),c=Math.min(...s.map(y=>y.minX)),u=Math.min(...s.map(y=>y.minY)),d=Math.max(...s.map(y=>y.maxX)),p=Math.max(...s.map(y=>y.maxY));return{x:c,y:u,width:d-c,height:p-u,minX:c,minY:u,maxX:d,maxY:p}},e.getCenter=a,e.rotateAroundPoint=i,e.rotateAroundCenter=function(o,s){return i(o,s,a(o))}}(Ev)),Ev}var W3;function Q8(){return W3||(W3=1,function(e){var r=Wd&&Wd.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.setSnapFilterFunc=void 0,e.useSnap=function(u,d){const p=t.default.useRef(null),y=g=>g.hasName("element")||g.hasName("page-background")||!p.current&&g.hasName("elements-area");function f(g){var v;const E=(v=u.current)===null||v===void 0?void 0:v.getStage(),x=[],j=[];return E.find(y).forEach(N=>{if(!(g.indexOf(N)>=0)){var T=N.getClientRect({skipShadow:!0,skipStroke:!0});x.push({offset:T.x,node:N,snap:"start"},{offset:T.x+T.width,node:N,snap:"end"},{offset:T.x+T.width/2,node:N,snap:"center"}),j.push({offset:T.y,node:N,snap:"start"},{offset:T.y+T.height,node:N,snap:"end"},{offset:T.y+T.height/2,node:N,snap:"center"})}}),{vertical:x,horizontal:j}}function _(g){var v;const E=(v=u.current)===null||v===void 0?void 0:v.getLayer(),x=E==null?void 0:E.children.find(j=>j.name()==="line-guides");g.forEach(j=>{if(j.orientation==="H"){var N=new n.default.Line({x:-E.getStage().x(),y:-E.getStage().y(),points:[-6e3,j.lineGuide,6e3,j.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});x==null||x.add(N),E.batchDraw()}else j.orientation==="V"&&(N=new n.default.Line({x:-E.getStage().x(),y:-E.getStage().y(),points:[j.lineGuide,-6e3,j.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),x==null||x.add(N))})}const S=g=>{const v=g.target.getLayer().children.find(A=>A.name()==="line-guides");v==null||v.destroyChildren();var E=f(g.target.nodes()),x=function(A){const L=A.__getNodeRect(),O=(0,a.getClientRect)(Object.assign(Object.assign({},L),{rotation:n.default.Util.radToDeg(L.rotation)})),I=A.getAbsolutePosition();return{vertical:[{guide:O.x,offset:I.x-O.x,snap:"start",nodes:A.nodes()},{guide:O.x+O.width/2,offset:I.x-O.x-O.width/2,snap:"center",nodes:A.nodes()},{guide:O.x+O.width,offset:I.x-O.x-O.width,snap:"end",nodes:A.nodes()}],horizontal:[{guide:O.y,offset:I.y-O.y,snap:"start",nodes:A.nodes()},{guide:O.y+O.height/2,offset:I.y-O.y-O.height/2,snap:"center",nodes:A.nodes()},{guide:O.y+O.height,offset:I.y-O.y-O.height,snap:"end",nodes:A.nodes()}]}}(g.target),j=o(E,x);if(!j.length)return;_(j);const N=g.target.getAbsolutePosition(),T=(g.target.nodes().map(A=>A.getAbsolutePosition()),Object.assign({},N));j.forEach(A=>{switch(A.snap){case"start":case"center":case"end":switch(A.orientation){case"V":T.x=A.lineGuide+A.offset;break;case"H":T.y=A.lineGuide+A.offset}}});const F=T.x-N.x,C=T.y-N.y;g.evt.ctrlKey||g.evt.metaKey||g.target.nodes().forEach(A=>{const L=A.getAbsolutePosition();A.setAbsolutePosition({x:L.x+F,y:L.y+C})})},w=(g,v,E)=>{var x;const j=u.current,N=j.getLayer().children.find(G=>G.name()==="line-guides");if(N==null||N.destroyChildren(),j.getActiveAnchor()==="rotater")return v;const T=j.getActiveAnchor(),F=c[T],C=(x=j.findOne(`.${F}`))===null||x===void 0?void 0:x.getAbsolutePosition();if(!C)return v;const A={x:g.x-C.x,y:g.y-C.y},L=function(G,W){const Y=s(G,W)/s(W,W);return{x:Y*W.x,y:Y*W.y}}({x:v.x-g.x,y:v.y-g.y},A),O={x:g.x+L.x,y:g.y+L.y};var I=o(f(j.nodes()),{vertical:[{guide:O.x,offset:0,snap:"start",nodes:j.nodes()}],horizontal:[{guide:O.y,offset:0,snap:"start",nodes:j.nodes()}]});if(!I.length||(_(I),E.ctrlKey||E.metaKey))return v;const M=[];if(I.forEach(G=>{const W=function(Y,te,V){if(V.orientation==="V"){const H=V.lineGuide;if(Math.abs(te.x-Y.x)<1e-4)return null;const q=(te.y-Y.y)/(te.x-Y.x);return{x:H,y:q*H+(Y.y-q*Y.x)}}{const H=V.lineGuide;if(Math.abs(te.y-Y.y)<1e-4)return null;const q=(te.y-Y.y)/(te.x-Y.x);return{x:(H-Y.y)/q+Y.x,y:H}}}(O,C,{orientation:G.orientation,lineGuide:G.lineGuide});W&&M.push(W)}),M.length>0){let G=M[0],W=Math.sqrt(Math.pow(O.x-G.x,2)+Math.pow(O.y-G.y,2));if(M.forEach(Y=>{const te=Math.sqrt(Math.pow(O.x-Y.x,2)+Math.pow(O.y-Y.y,2));te<W&&(W=te,G=Y)}),W<10)return G}return O},b=g=>{if(!g.target)return;const v=g.target.getLayer(),E=v.children.find(x=>x.name()==="line-guides");E==null||E.destroyChildren(),v.batchDraw()};t.default.useEffect(()=>{u.current&&(u.current.anchorDragBoundFunc(w),u.current.on("dragstart",g=>{setTimeout(()=>{if(n.default.DD._dragElements.size===0)return;const v=[...n.default.DD._dragElements.entries()],E=v.find(([x,j])=>j.node instanceof n.default.Transformer);E&&(v.splice(v.indexOf(E),1),v.unshift(E),n.default.DD._dragElements.clear(),v.forEach(([x,j])=>{n.default.DD._dragElements.set(x,j)}))})}),u.current.on("dragmove",S),u.current.on("dragend",b),u.current.on("transformend",b),u.current.on("transform",g=>{var v,E;g.evt.ctrlKey||g.evt.metaKey?(v=u.current)===null||v===void 0||v.rotationSnapTolerance(0):(E=u.current)===null||E===void 0||E.rotationSnapTolerance(5)}))},[])},e.useAnchorSnap=function(u,d,p){const y=S=>S.hasName("element")||S.hasName("line-anchor")||S.hasName("page-background")||S.hasName("elements-area"),f=S=>{const w=S.target.getLayer().children.find(N=>N.name()==="line-guides");w==null||w.destroyChildren();var b,g=o(function(N){var T;const F=(T=u.current)===null||T===void 0?void 0:T.getStage();var C=[],A=[];return F.find(y).forEach(L=>{if(!(N.indexOf(L)>=0)){var O=L.getClientRect({skipShadow:!0,skipStroke:!0});L.hasName("line-anchor")&&(O={x:L.absolutePosition().x,y:L.absolutePosition().y,width:0,height:0}),C.push({offset:O.x,node:L,snap:"start"},{offset:O.x+O.width,node:L,snap:"end"},{offset:O.x+O.width/2,node:L,snap:"center"}),A.push({offset:O.y,node:L,snap:"start"},{offset:O.y+O.height,node:L,snap:"end"},{offset:O.y+O.height/2,node:L,snap:"center"})}}),{vertical:C,horizontal:A}}([S.target,...d.map(N=>N.current)]),{vertical:[{guide:(b=S.target).absolutePosition().x,offset:0,snap:"center",nodes:[b]}],horizontal:[{guide:b.absolutePosition().y,offset:0,snap:"center",nodes:[b]}]});if(!g.length)return;(function(N){var T;const F=(T=u.current)===null||T===void 0?void 0:T.getLayer(),C=F==null?void 0:F.children.find(A=>A.name()==="line-guides");N.forEach(A=>{if(A.orientation==="H"){var L=new n.default.Line({points:[-6e3,A.lineGuide,6e3,A.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});C==null||C.add(L),F.batchDraw()}else A.orientation==="V"&&(L=new n.default.Line({points:[A.lineGuide,-6e3,A.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),C==null||C.add(L))})})(g);const v=S.target.getAbsolutePosition(),E=Object.assign({},v);g.forEach(N=>{switch(N.snap){case"start":case"center":case"end":switch(N.orientation){case"V":E.x=N.lineGuide+N.offset;break;case"H":E.y=N.lineGuide+N.offset}}});const x=E.x-v.x,j=E.y-v.y;if(!S.evt.ctrlKey&&!S.evt.metaKey){const N=S.target.getAbsolutePosition();S.target.absolutePosition({x:N.x+x,y:N.y+j})}},_=S=>{if(!S.target)return;const w=S.target.getLayer(),b=w.children.find(g=>g.name()==="line-guides");b==null||b.destroyChildren(),w.batchDraw()};t.default.useEffect(()=>{u.current&&(u.current.on("dragmove",f),u.current.on("dragend",_))},p)};const t=r(fi()),n=r(Hs()),a=Dh();let i=({targetKonvaNodes:u,guideKonvaNode:d,distance:p,snapDirection:y})=>p<5;function o(u,d){var p=[],y=[];u.vertical.forEach(g=>{d.vertical.forEach(v=>{var E=Math.abs(g.offset-v.guide);i({targetKonvaNodes:v.nodes,guideKonvaNode:g.node,distance:E,snapDirection:g.snap})&&p.push({lineGuide:g.offset,diff:E,snap:v.snap,offset:v.offset})})}),u.horizontal.forEach(g=>{d.horizontal.forEach(v=>{var E=Math.abs(g.offset-v.guide);i({targetKonvaNodes:v.nodes,guideKonvaNode:g.node,distance:E,snapDirection:g.snap})&&y.push({lineGuide:g.offset,diff:E,snap:v.snap,offset:v.offset})})});var f=[];const _=p.sort((g,v)=>g.diff-v.diff),S=y.sort((g,v)=>g.diff-v.diff);var w=_[0],b=S[0];return w&&_.filter(g=>Math.abs(g.diff-w.diff)<.1).forEach(g=>{f.push(Object.assign({orientation:"V"},g))}),b&&S.filter(g=>Math.abs(g.diff-b.diff)<.1).forEach(g=>{f.push(Object.assign({orientation:"H"},g))}),f}function s(u,d){return u.x*d.x+u.y*d.y}e.setSnapFilterFunc=u=>{i=u};const c={"top-left":"bottom-right","top-center":"bottom-center","top-right":"bottom-left","middle-right":"middle-left","bottom-right":"top-left","bottom-center":"top-center","bottom-left":"top-right","middle-left":"middle-right"}}(Wd)),Wd}var $3;function AC(){return $3||($3=1,function(e){var r=Gd&&Gd.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=u,e.getLinePositionFromMiddlePoints=d;const t=r(fi()),n=Us,a=Fu,i=Pp(),o=Mh,s=Q8(),c=rf();function u(f){const{x:_,y:S,width:w,height:b,rotation:g}=f.a,v=g*Math.PI/180,E={x:_+b/2*Math.cos(v+Math.PI/2),y:S+b/2*Math.sin(v+Math.PI/2)};return{middleLeft:E,middleRight:{x:E.x+w*Math.cos(v),y:E.y+w*Math.sin(v)}}}function d(f,_,S){const w=Math.sqrt(Math.pow(_.x-f.x,2)+Math.pow(_.y-f.y,2)),b=Math.atan2(_.y-f.y,_.x-f.x),g=180*b/Math.PI;return{x:f.x+Math.cos(b-Math.PI/2)*S/2,y:f.y+Math.sin(b-Math.PI/2)*S/2,width:w,height:S,rotation:g}}const p=(f,_)=>({offsetX:5/f,offsetY:5/f,width:10/f,height:10/f,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:S=>{S.target.getStage().container().style.cursor="crosshair"},onMouseLeave:S=>{S.target.getStage().container().style.cursor=""},onDragStart:S=>{_.history.startTransaction()},onDragEnd:S=>{_.history.endTransaction()}}),y=(0,n.observer)(({element:f,type:_})=>{const S=(0,i.useColor)(f,f.a.color,"fill"),w=(0,i.useColor)(f,f.a.color,"stroke"),b=Object.assign(Object.assign(Object.assign({strokeWidth:f.height,lineCap:"round",lineJoin:"round"},w),S),{opacity:f.a.opacity,hideInExport:!f.showInExport});return t.default.createElement(t.default.Fragment,null,_==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*f.height,2*-f.height,0,0,3*f.height,2*f.height]},b)),_==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*f.height,2*-f.height,0,0,3*f.height,2*f.height],closed:!0},b)),_==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-f.height,0,2*f.height],closed:!0},b)),_==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-f.height,4*f.height,2*-f.height,4*f.height,2*f.height,0,2*f.height],closed:!0},b)),_==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*f.height,y:0,radius:2*f.height},b)))});e.LineElement=(0,n.observer)(({element:f,store:_})=>{const S=t.default.useRef(null),w=t.default.useRef(null),b=t.default.useRef(null),g=f.selectable||_.role==="admin",v=(0,c.isTouchDevice)(),E=_.selectedElements.indexOf(f)>=0&&_.selectedElements.length===1,x=_.selectedShapes.indexOf(f)>=0&&f.selectable,{middleLeft:j,middleRight:N}=u(f);(0,s.useAnchorSnap)(w,[S],[E]),(0,s.useAnchorSnap)(b,[S],[E]);const T=(0,i.useColor)(f,f.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:S,name:"element",id:f.id,x:f.a.x,y:f.a.y,points:[0,0,f.a.width,0],offsetY:-f.a.height/2,strokeWidth:f.a.height,hitStrokeWidth:Math.max(f.a.height,20),dash:f.dash.map(F=>F*f.a.height)},T,{rotation:f.a.rotation,opacity:f.animated("opacity"),shadowEnabled:f.shadowEnabled,shadowBlur:f.shadowBlur,shadowOffsetX:f.shadowOffsetX,shadowOffsetY:f.shadowOffsetY,shadowColor:f.shadowColor,shadowOpacity:f.shadowOpacity,listening:g,draggable:v?f.draggable&&x:f.draggable,preventDefault:!v||x,hideInExport:!f.showInExport,onDragMove:F=>{f.set({x:F.target.x(),y:F.target.y()})},onDragEnd:F=>{f.set({x:F.target.x(),y:F.target.y()})},onTransform:F=>{const C=F.target.scaleX();F.target.scaleX(1),F.target.scaleY(1),f.set({height:f.height*C,width:f.width*C,x:F.target.x(),y:F.target.y(),rotation:F.target.rotation()})}})),t.default.createElement(a.Group,{x:j.x,y:j.y,rotation:f.rotation,hideInExport:!f.showInExport},t.default.createElement(y,{element:f,type:f.startHead})),t.default.createElement(a.Group,{x:N.x,y:N.y,rotation:f.rotation+180},t.default.createElement(y,{element:f,type:f.endHead})),E&&f.resizable&&t.default.createElement(o.Portal,{selector:".page-abs-container",enabled:!0},t.default.createElement(a.Group,{visible:E},t.default.createElement(a.Rect,Object.assign({x:j.x,y:j.y,ref:w,name:"line-anchor"},p(_.scale,_),{onDragMove:F=>{const C=d(F.target.position(),N,f.height);f.set({x:C.x,y:C.y,width:C.width,rotation:C.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:N.x,y:N.y,ref:b,name:"line-anchor"},p(_.scale,_),{onDragMove:F=>{const C=d(j,F.target.position(),f.height);f.set({x:C.x,y:C.y,width:C.width,rotation:C.rotation})}})))))})}(Gd)),Gd}var Bl={},Y3;function J8(){return Y3||(Y3=1,function(e){var r,t=Bl&&Bl.__createBinding||(Object.create?function(C,A,L,O){O===void 0&&(O=L);var I=Object.getOwnPropertyDescriptor(A,L);I&&!("get"in I?!A.__esModule:I.writable||I.configurable)||(I={enumerable:!0,get:function(){return A[L]}}),Object.defineProperty(C,O,I)}:function(C,A,L,O){O===void 0&&(O=L),C[O]=A[L]}),n=Bl&&Bl.__setModuleDefault||(Object.create?function(C,A){Object.defineProperty(C,"default",{enumerable:!0,value:A})}:function(C,A){C.default=A}),a=Bl&&Bl.__importStar||(r=function(C){return r=Object.getOwnPropertyNames||function(A){var L=[];for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(L[L.length]=O);return L},r(C)},function(C){if(C&&C.__esModule)return C;var A={};if(C!=null)for(var L=r(C),O=0;O<L.length;O++)L[O]!=="default"&&t(A,C,L[O]);return n(A,C),A}),i=Bl&&Bl.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useLoader=e.setVideoLoaderHook=e.useCornerRadiusAndCrop=void 0;const o=i(fi()),s=Us,c=qs,u=Fu,d=i(t0()),p=i(Hs()),y=Mh,f=jf(),_=a(Cp()),S=gc(),w=Op(),b=If(),g=rf();function v(){return document.createElement("canvas")}const E=new window.Image;E.src=_.svgToURL(`
|
|
276
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
277
|
-
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
278
|
-
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
279
|
-
</svg>
|
|
280
|
-
`);const x=new window.Image;x.src=_.svgToURL(`
|
|
281
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
282
|
-
<path opacity="0.6" d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" fill="white"/>
|
|
283
|
-
<path opacity="0.6" d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" fill="white"/>
|
|
284
|
-
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
285
|
-
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
286
|
-
</svg>
|
|
287
|
-
`),e.useCornerRadiusAndCrop=(C,A,L,O,I=0,M=!1)=>{const G=Math.floor(Math.max(C.width*O,1)),W=Math.floor(Math.max(C.height*O,1)),Y=Math.min(I*O,G/2,W/2),te=Math.max(C.width/L.width,C.height/L.height)*O,V=C.page._exportingOrRendering&&S.flags.imageDownScalingEnabled&&te<1&&!M,H=L.x===0&&L.y===0&&L.width===(A==null?void 0:A.width)&&L.height===(A==null?void 0:A.height),q=o.default.useMemo(()=>{if(A&&A.width&&A.height)return H&&Y===0&&!V?void 0:v()},[A,Y,V,H]),D=()=>{if(!q||!A)return;q.width=G,q.height=W;const $=q.getContext("2d");if(!$)return;Y&&($.beginPath(),$.moveTo(Y,0),$.lineTo(G-Y,0),$.arc(G-Y,Y,Y,3*Math.PI/2,0,!1),$.lineTo(G,W-Y),$.arc(G-Y,W-Y,Y,0,Math.PI/2,!1),$.lineTo(Y,W),$.arc(Y,W-Y,Y,Math.PI/2,Math.PI,!1),$.lineTo(0,Y),$.arc(Y,Y,Y,Math.PI,3*Math.PI/2,!1),$.clip());const ne=V?function(Q,oe){var se,ue;const ve=v();ve.width=Q.width,ve.height=Q.height,(se=ve.getContext("2d"))===null||se===void 0||se.drawImage(Q,0,0,ve.width,ve.height);const Pe=function(ke,Ne,xe,ye,Ie,me,_e){for(var Ae=new ImageData(Ne,xe),Le=new Int32Array(ke.data.buffer),ge=ke.width,Te=new Int32Array(Ae.data.buffer),Fe=Ae.width,Ke=Ne/me,it=xe/_e,rt=Math.round(1/Ke),at=Math.round(1/it),bt=rt*at,yt=0;yt<Ae.height;yt++)for(var ht=0;ht<Fe;ht++){for(var zt=0+Math.round(ht/Ke)+(0+Math.round(yt/it))*ge,Ot=0,Ut=0,$t=0,Oe=0,Me=0;Me<at;Me++)for(var mt=0;mt<rt;mt++){var Mt=Le[zt+mt+Me*ge];Ot+=Mt<<24>>>24,Ut+=Mt<<16>>>24,$t+=Mt<<8>>>24,Oe+=Mt>>>24}Ot=Math.round(Ot/bt),Ut=Math.round(Ut/bt),$t=Math.round($t/bt),Oe=Math.round(Oe/bt),Te[ht+yt*Fe]=Oe<<24|$t<<16|Ut<<8|Ot}return Ae}(ve.getContext("2d").getImageData(0,0,ve.width,ve.height),Math.floor(ve.width*oe),Math.floor(ve.height*oe),0,0,ve.width,ve.height);return ve.width=Math.floor(ve.width*oe),ve.height=Math.floor(ve.height*oe),(ue=ve.getContext("2d"))===null||ue===void 0||ue.putImageData(Pe,0,0),ve}(A,te):A,Z=V?{x:Math.floor(L.x*te),y:Math.floor(L.y*te),width:Math.floor(L.width*te),height:Math.floor(L.height*te)}:L;$.drawImage(ne,Z.x,Z.y,Z.width,Z.height,0,0,q.width,q.height)};return o.default.useLayoutEffect(()=>{D()},[q,C.width,C.height,L.x,L.y,L.width,L.height,I,O,M,C.page._exportingOrRendering,V]),o.default.useEffect(()=>()=>{q&&q.nodeName==="CANVAS"&&p.default.Util.releaseCanvas(q)},[q]),[q||A,D]};const j=v(),N=(0,s.observer)(({element:C})=>{const A=Math.min(30,C.width/4,C.height/4),L=o.default.useRef(null);return o.default.useEffect(()=>{const O=L.current;if(!O)return;const I=new p.default.Animation(M=>{O.rotate(((M==null?void 0:M.timeDiff)||0)/2)},O.getLayer());return I.start(),()=>{I.stop()}}),o.default.createElement(u.Group,{x:C.a.x,y:C.a.y,rotation:C.a.rotation,listening:!1,opacity:C.a.opacity,hideInExport:!C.showInExport},o.default.createElement(u.Rect,{width:C.width,height:C.height,fill:"rgba(124, 173, 212, 0.8)"}),o.default.createElement(u.Arc,{ref:L,x:C.width/2,y:C.height/2,fill:"white",outerRadius:Math.abs(A),innerRadius:Math.max(1,A-5),angle:270}))}),T=(0,s.observer)(({element:C})=>{const A=Math.max(10,Math.min(30,C.width/25));return o.default.createElement(u.Group,{x:C.a.x,y:C.a.y,rotation:C.a.rotation,listening:!1,opacity:C.a.opacity,hideInExport:!C.showInExport},o.default.createElement(u.Rect,{width:C.width,height:C.height,fill:"rgba(223, 102, 102, 0.8)"}),o.default.createElement(u.Text,{text:"Can not load the video...",fontSize:A,width:C.width,height:C.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let F=function(C,A,L){const O=o.default.useRef("loading"),I=o.default.useRef(null),[M,G]=o.default.useState(0),W=o.default.useRef(),Y=o.default.useRef(),te=o.default.useRef();return W.current===C&&Y.current===A&&te.current===L||(O.current="loading",I.current=void 0,W.current=C,Y.current=A,te.current=L),o.default.useLayoutEffect(function(){if(C){var V=document.createElement("video");return V.addEventListener("canplay",H),V.addEventListener("error",q),A&&(V.crossOrigin=A),L&&(V.referrerpolicy=L),V.src=C,V.load(),function(){V.removeEventListener("canplay",H),V.removeEventListener("error",q)}}function H(){O.current="loaded",I.current=V,I.current.currentTime=0,G(Math.random()),I.current.removeEventListener("canplay",H)}function q(D){const $=V.readyState===4,ne=V.buffered&&V.buffered.length>0&&V.buffered.end(V.buffered.length-1)/V.duration*100>=100;$&&ne||(O.current="failed",I.current=void 0,G(Math.random()))}},[C,A,L]),[I.current,O.current]};e.setVideoLoaderHook=C=>{F=C},e.useLoader=(C,A,L)=>{const O=o.default.useRef(),I=()=>{var M;(M=O.current)===null||M===void 0||M.call(O),O.current=void 0};o.default.useEffect(()=>I,[]),o.default.useLayoutEffect(()=>{const M=A.slice(0,200),G=`video with id ${L} url: ${M}`;C!=="loading"||O.current||(O.current=(0,f.incrementLoader)(G)),C!=="loading"&&I(),C==="failed"&&(0,f.triggerLoadError)(G)},[C])},e.VideoElement=(0,s.observer)(({element:C,store:A})=>{var L;const[O,I]=o.default.useState(!1),M=o.default.useRef(null),G=o.default.useRef(null),W=A.selectedShapes.indexOf(C)>=0&&C.selectable,[Y,te]=o.default.useState(!1),[V,H]=F(C.src,"anonymous"),q=A.activePage===C.page;(0,e.useLoader)(H,C.src,C.id),V&&(V.width=V.videoWidth,V.height=V.videoHeight,V.playsInline=!0);const D=V||j;o.default.useEffect(()=>{V&&A.history.ignore(()=>{C.set({duration:1e3*V.duration})})},[V]),o.default.useEffect(()=>{var Oe;if(!V)return;const Me=A.animatedElementsIds,mt=(!Me.length||Me.includes(C.id))&&A.isPlaying,Mt=q&&(mt||Y);if(!Mt)return void V.pause();Mt&&(V.currentTime=C.startTime*V.duration,V.play());const Lt=new p.default.Animation(()=>{ge()},(Oe=M.current)===null||Oe===void 0?void 0:Oe.getLayer());Lt.start();const At=()=>{te(!1),V.currentTime=C.startTime*V.duration},fr=()=>{V.currentTime>=C.endTime*V.duration&&(V.pause(),V.currentTime=C.startTime*V.duration,te(!1))};return V.addEventListener("ended",At),V.addEventListener("timeupdate",fr),()=>{V.pause(),Lt.stop(),V.removeEventListener("ended",At),V.removeEventListener("timeupdate",fr)}},[V,Y,A.isPlaying,q]),o.default.useEffect(()=>{V&&(V.volume=C.volume)},[V,C.volume]);const $=o.default.useRef();o.default.useEffect(()=>{const Oe=(0,c.autorun)(()=>{var Me,mt;if(V){const Mt=A.animatedElementsIds;if(Mt.length&&!Mt.includes(C.id))return;const Lt=C.startTime*V.duration*1e3,At=V.duration*(C.endTime-C.startTime)*1e3,fr=((A.currentTime||C.page.startTime)-C.page.startTime)%At+Lt;if(Math.abs(1e3*V.currentTime-fr)>500||!A.isPlaying){const Qt=fr/1e3;Qt!==V.currentTime&&(V.currentTime=Qt),V.readyState!==4&&!A.isPlaying&&!$.current&&($.current=(0,f.incrementLoader)(`video ${C.id}`))}ge(),(mt=(Me=M.current)===null||Me===void 0?void 0:Me.getLayer())===null||mt===void 0||mt.batchDraw()}});return()=>{Oe(),$.current&&($.current(),$.current=null)}},[A,V]),o.default.useEffect(()=>{if(!V)return;const Oe=()=>{var mt,Mt;V.readyState!==4&&C.page._exportingOrRendering||$.current&&(ge(),(Mt=(mt=M.current)===null||mt===void 0?void 0:mt.getLayer())===null||Mt===void 0||Mt.batchDraw(),$.current(),$.current=null)};let Me;return C.page._exportingOrRendering&&(Me=setInterval(Oe,50)),V.addEventListener("timeupdate",Oe),V.addEventListener("canplay",Oe),()=>{clearInterval(Me),V.removeEventListener("timeupdate",Oe),V.removeEventListener("canplay",Oe)}},[C.page._exportingOrRendering,V,C.id,f.incrementLoader]);let{cropX:ne,cropY:Z,cropWidth:Q,cropHeight:oe}=C;H!=="loaded"&&(ne=Z=0,Q=oe=1);const se=D.width*Q,ue=D.height*oe,ve=C.width/C.height;let Pe,ke;const Ne=se/ue,xe=C.type==="svg";xe?(Pe=se,ke=ue):ve>=Ne?(Pe=se,ke=se/ve):(Pe=ue*ve,ke=ue);const ye={x:D.width*ne,y:D.height*Z,width:Pe,height:ke},Ie=(L=C.cornerRadius)!==null&&L!==void 0?L:0,[me,_e]=(0,e.useCornerRadiusAndCrop)(C,D,ye,A._elementsPixelRatio,Ie,O||C._cropModeEnabled||C.type==="svg");let[Ae,Le]=((Oe,Me,mt,Mt)=>{const Lt=(vt=>{const[pt,Je]=o.default.useState(vt);return o.default.useEffect(()=>{(async()=>{const _t=await async function(Ye){if(!(Ye.indexOf("data:image/svg+xml")>=0||Ye.indexOf(".svg")>=0))return Ye;const Pt=await _.urlToString(Ye),Dt=_.fixSize(Pt);return _.svgToURL(Dt)}(vt);_t!==pt&&Je(_t)})()},[vt]),pt})(Oe.clipSrc||""),[At,fr]=(0,d.default)(Lt,"anonymous"),Qt=Oe.clipSrc?fr:"loaded";(0,e.useLoader)(Qt,Oe.clipSrc,Oe.id);const ze=o.default.useMemo(()=>{if(Me&&At)return v()},[Me,At]);function qe(){var vt;if(!At||!Me||!Me.width||!Me.height||!At||!At.width||!At.height||!ze)return;const pt=v(),Je=Math.max(Oe.width/At.width*mt,Oe.height/At.height*mt);pt.width=At.width*Je,pt.height=At.height*Je,(vt=pt.getContext("2d"))===null||vt===void 0||vt.drawImage(At,0,0,pt.width,pt.height),ze.width=Math.max(Me.width,1),ze.height=Math.max(Me.height,1);const _t=ze.getContext("2d");_t&&(_t.save(),_t.drawImage(pt,0,0,Me.width,Me.height),p.default.Util.releaseCanvas(pt),_t.globalCompositeOperation="source-in",_t.drawImage(Me,0,0,ze.width,ze.height),_t.restore())}return o.default.useLayoutEffect(()=>{qe()},[ze,Me,At,Oe.width,Oe.height,mt,...Mt]),[Oe.clipSrc&&At?ze:Me,qe]})(C,me,A._elementsPixelRatio,[ye,Ie,A._elementsPixelRatio]);function ge(){_e(),Le()}const Te=Math.max(C.width/Pe,C.height/ke);o.default.useEffect(()=>{var Oe;if(!C._cropModeEnabled)return;const Me=(Oe=M.current)===null||Oe===void 0?void 0:Oe.getStage();function mt(Lt){C._cropModeEnabled&&Lt.target!==G.current&&C.toggleCropMode(!1)}function Mt(Lt){C._cropModeEnabled&&Lt.target.parentNode!==Me.content&&C.toggleCropMode(!1)}return document.body.addEventListener("click",Mt),Me==null||Me.on("click",mt),Me==null||Me.on("tap",mt),()=>{document.body.removeEventListener("click",Mt),document.body.removeEventListener("touchstart",Mt),Me==null||Me.off("click",mt),Me==null||Me.off("click",mt)}},[C._cropModeEnabled]),o.default.useLayoutEffect(()=>{if(!O&&!C._cropModeEnabled)return(0,w.applyFilter)(M.current,C),(0,c.autorun)(()=>{(0,w.applyFilter)(M.current,C)},{delay:100})},[D,O,Q,oe,C._cropModeEnabled]),o.default.useLayoutEffect(()=>{var Oe;O||C._cropModeEnabled?(Oe=M.current)===null||Oe===void 0||Oe.clearCache():(0,w.applyFilter)(M.current,C)},[O,C.width,C.height,C._cropModeEnabled]),o.default.useEffect(()=>{(0,w.applyFilter)(M.current,C)},[C.shadowEnabled,C.shadowBlur,C.cornerRadius,C.shadowColor,C.shadowOffsetX,C.shadowOffsetY,C.shadowOpacity]);const Fe=o.default.useRef(null),Ke=o.default.useRef(null),it=o.default.useRef(null);o.default.useLayoutEffect(()=>{C._cropModeEnabled&&(Ke.current.nodes([Fe.current]),it.current.nodes([G.current]))},[C._cropModeEnabled]);const rt=Oe=>{Math.round(Oe.target.x())>0&&(Oe.target.x(0),Oe.target.scaleX(1)),Math.round(Oe.target.y())>0&&(Oe.target.y(0),Oe.target.scaleY(1));const Me=Oe.target.width()*Oe.target.scaleX(),mt=Oe.target.height()*Oe.target.scaleY(),Mt=Math.min(1,Pe/Me),Lt=Math.min(1,ke/mt),At=1-Mt,fr=Math.min(At,Math.max(0,Math.round(-Oe.target.x())/Me)),Qt=1-Lt,ze=Math.min(Qt,Math.max(0,Math.round(-Oe.target.y())/mt));Oe.target.setAttrs({x:-fr*D.width,y:-ze*D.height,scaleX:1,scaleY:1}),C.set({cropX:fr,cropY:ze,cropWidth:Mt,cropHeight:Lt})},at=()=>{C.type!=="svg"&&C.contentEditable&&setTimeout(()=>{C.toggleCropMode(!0)})},bt=H==="loading",yt=H==="failed",ht=!bt&&!yt,zt=o.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Ot=ht?C.a.opacity:0;(0,b.useFadeIn)(M,Ot);const Ut=C.selectable||A.role==="admin",$t=(0,g.isTouchDevice)();return o.default.createElement(o.default.Fragment,null,bt&&o.default.createElement(N,{element:C}),yt&&o.default.createElement(T,{element:C}),o.default.createElement(u.Image,{ref:M,name:"element",id:C.id,image:Ae,x:C.a.x,y:C.a.y,width:C.a.width||1,height:C.a.height||1,rotation:C.a.rotation,opacity:Ot,shadowEnabled:C.shadowEnabled,shadowBlur:C.shadowBlur,shadowOffsetX:C.shadowOffsetX,shadowOffsetY:C.shadowOffsetY,shadowColor:C.shadowColor,shadowOpacity:C.shadowOpacity,customCrop:ye,listening:Ut,draggable:$t?C.draggable&&W:C.draggable,preventDefault:!$t||W,hideInExport:!C.showInExport,onDragMove:Oe=>{C.set({x:Oe.target.x(),y:Oe.target.y()})},onDragEnd:Oe=>{C.set({x:Oe.target.x(),y:Oe.target.y()})},onDblClick:at,onDblTap:at,onTransformStart:()=>{I(!0),zt.current={cropX:C.cropX,cropY:C.cropY,cropWidth:C.cropWidth,cropHeight:C.cropHeight}},onTransform:Oe=>{var Me;const mt=Oe.currentTarget,Mt=Math.abs(mt.scaleX()-1)<1e-7?1:mt.scaleX(),Lt=Math.abs(mt.scaleY()-1)<1e-7?1:mt.scaleY();mt.scaleX(1),mt.scaleY(1);const At=(Me=Oe.target.getStage())===null||Me===void 0?void 0:Me.findOne("Transformer"),fr=1-Pe/D.width,Qt=Math.min(fr,Math.max(0,C.cropX)),ze=1-ke/D.height,qe=Math.min(ze,Math.max(0,C.cropY)),vt=At.getActiveAnchor(),pt=!(vt.indexOf("middle")>=0||vt.indexOf("center")>=0),Je=!pt&&Mt<1&&zt.current.cropHeight>ke/D.height;let _t=pt?C.cropWidth:C.cropWidth*Mt;Je&&(_t=C.cropWidth);const Ye=!pt&&Lt<1&&zt.current.cropWidth>Pe/D.width;let Pt=pt?C.cropHeight:C.cropHeight*Lt;Ye&&(Pt=C.cropHeight),xe&&(_t=C.cropWidth,Pt=C.cropHeight),C.set({cropX:Qt,cropY:qe,x:mt.x(),y:mt.y(),width:mt.width()*Mt,height:mt.height()*Lt,rotation:Oe.target.rotation(),cropWidth:Math.min(_t,1-Qt),cropHeight:Math.min(Pt,1-qe)})},onTransformEnd:Oe=>{const Me=Oe.currentTarget;C.set({width:Me.width(),height:Me.height(),x:Me.x(),y:Me.y(),rotation:Oe.target.rotation(),cropWidth:Pe/D.width,cropHeight:ke/D.height}),I(!1)}}),o.default.createElement(u.Rect,{x:C.a.x,y:C.a.y,width:Math.max(C.a.width-C.borderSize,0),height:Math.max(C.a.height-C.borderSize,0),opacity:Ot,offsetX:-C.borderSize/2,offsetY:-C.borderSize/2,stroke:C.borderColor,strokeWidth:C.borderSize,listening:!1,visible:!!C.borderSize,rotation:C.rotation,cornerRadius:Math.max(0,Ie-C.borderSize),hideInExport:!C.showInExport}),!A.isPlaying&&o.default.createElement(u.Image,{image:Y?x:E,x:C.a.x,y:C.a.y,offsetX:-C.a.width/2+15/A.scale,offsetY:-C.a.height/2+15/A.scale,rotation:C.a.rotation,width:30/A.scale,height:30/A.scale,hideInExport:!0,onClick:()=>te(!Y),onTap:()=>te(!Y)}),C._cropModeEnabled&&o.default.createElement(y.Portal,{selector:".page-abs-container",enabled:!0},o.default.createElement(u.Rect,{x:-window.innerWidth/A.scale,y:-window.innerWidth/A.scale,width:window.innerWidth/A.scale*3,height:window.innerWidth/A.scale*3,fill:"rgba(0,0,0,0.3)"}),o.default.createElement(u.Image,{listening:!1,image:Ae,x:C.a.x,y:C.a.y,width:C.a.width,height:C.a.height,rotation:C.a.rotation,shadowEnabled:C.shadowEnabled,shadowBlur:C.shadowBlur}),o.default.createElement(u.Group,{x:C.a.x,y:C.a.y,rotation:C.a.rotation,scaleX:Te,scaleY:Te},o.default.createElement(u.Image,{image:D,ref:G,opacity:.4,draggable:!0,x:-C.cropX*D.width,y:-C.cropY*D.height,onDragMove:rt,onTransform:rt}),o.default.createElement(u.Transformer,{ref:it,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Oe,Me)=>Me.width<5||Me.height<5?Oe:Me,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),o.default.createElement(u.Rect,{width:Pe,height:ke,ref:Fe,listening:!1,onTransform:Oe=>{Oe.target.x()<-C.cropX*D.width-1e-9&&(Oe.target.x(-C.cropX*D.width),Oe.target.scaleX(1)),Oe.target.y()<-C.cropY*D.height-1e-9&&(Oe.target.y(-C.cropY*D.height),Oe.target.scaleY(1));const Me=Math.min(1,Math.max(0,C.cropX+Oe.target.x()/D.width)),mt=Math.min(1,Math.max(0,Oe.target.y()/D.height+C.cropY)),Mt=Oe.target.width()*Oe.target.scaleX(),Lt=Oe.target.height()*Oe.target.scaleY(),At=Math.min(1-Me,Mt/D.width),fr=Math.min(1-mt,Lt/D.height),Qt=Oe.target.getAbsolutePosition(Oe.target.getParent().getParent());Oe.target.scale({x:1,y:1}),Oe.target.position({x:0,y:0}),C.set({x:Qt.x,y:Qt.y,cropX:Me,cropY:mt,cropWidth:At,cropHeight:fr,width:Math.min(Mt*Te,D.width*(1-Me)*Te),height:Math.min(Lt*Te,D.height*(1-mt)*Te)})}}),o.default.createElement(u.Transformer,{ref:Ke,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Oe,Me)=>Me.width<5||Me.height<5?Oe:Me,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2,visible:C.resizable}))))})}(Bl)),Bl}var $d={},Pv={},X3;function Cm(){return X3||(X3=1,function(e){function r({width:u,height:d}){const p=u/2,y=d/2,f=u/2,_=d/2,S=f/2,w=_/2;let b="",g=Math.PI/5;for(let v=0;v<10;v++){const E=v%2==0?_:w,x=p+(v%2==0?f:S)*Math.sin(v*g),j=y-E*Math.cos(v*g);v===0?b=`M ${x} ${j}`:b+=` L ${x} ${j}`}return b+" Z"}function t({width:u,height:d}){const p=u/2,y=d/2;return`M ${p} 0 L ${u} ${y} L ${p} ${d} L 0 ${y} Z`}function n({width:u,height:d}){const p=u/2,y=d/2,f=u/2,_=d/2;let S="",w=2*Math.PI/5;for(let b=0;b<5;b++){const g=_,v=p+f*Math.sin(b*w),E=y-g*Math.cos(b*w);b===0?S=`M ${v} ${E}`:S+=` L ${v} ${E}`}return S+" Z"}function a({width:u,height:d}){const p=u/2,y=d/2,f=u/2,_=d/2;let S="",w=2*Math.PI/6;for(let b=0;b<6;b++){const g=_,v=p+f*Math.sin(b*w),E=y-g*Math.cos(b*w);b===0?S=`M ${v} ${E}`:S+=` L ${v} ${E}`}return S+" Z"}function i({path:u,aspectRatio:d,width:p,height:y}){return{path:u,scaleX:p/d.width,scaleY:y/d.height}}function o({width:u,height:d}){const p=.1*Math.min(u,d),y=.2*u,f=.2*d,_=.5*u;let S=`M ${p},0`;return S+=" H "+(u-p),S+=` A ${p},${p} 0 0 1 ${u},${p}`,S+=" V "+(d-p-f),S+=` A ${p},${p} 0 0 1 ${u-p},${d-f}`,S+=` H ${_+y/2}`,S+=` L ${_},${d}`,S+=` L ${_-y/2},${d-f}`,S+=` H ${p}`,S+=` A ${p},${p} 0 0 1 0,${d-p-f}`,S+=` V ${p}`,S+=` A ${p},${p} 0 0 1 ${p},0`,S+=" Z",S}function s({width:u,height:d}){const p=.3*u,y=.3*d,f=u/2,_=d/2,S=f-p/2,w=f+p/2,b=_-y/2,g=_+y/2;let v=`M ${S},0 `;return v+=`H ${w} `,v+=`V ${b} `,v+=`H ${u} `,v+=`V ${g} `,v+=`H ${w} `,v+=`V ${d} `,v+=`H ${S} `,v+=`V ${g} `,v+="H 0 ",v+=`V ${b} `,v+=`H ${S} `,v+="V 0 ",v+="Z",v}function c(u){return e.TYPES[u]||e.rectData}Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0,e.starPath=r,e.diamondPath=t,e.pentagonPath=n,e.hexagonPath=a,e.speechBubblePath=o,e.crossPath=s,e.subTypeToPathDataFunc=c,e.figureToSvg=function(u){const{subType:d}=u,p=c(d);return p?function(y,f){const{width:_,height:S,fill:w,stroke:b,strokeWidth:g,dash:v}=y,E=(v||[]).map(F=>F*g);let x=f(y),j=1,N=1;typeof x!="string"&&(j=x.scaleX,N=x.scaleY,x=x.path);const T=`clip-${y.id||Math.random()}`;return`
|
|
288
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${_}" height="${S}">
|
|
289
|
-
<defs>
|
|
290
|
-
<clipPath id="${T}">
|
|
291
|
-
<path d="${x}" />
|
|
292
|
-
</clipPath>
|
|
293
|
-
</defs>
|
|
294
|
-
|
|
295
|
-
<!-- Path for the fill -->
|
|
296
|
-
<path d="${x}" fill="${w}" transform="scale(${j}, ${N})"/>
|
|
297
|
-
|
|
298
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
299
|
-
<path d="${x}" fill="none" stroke="${b}" stroke-width="${2*g}" clip-path="url(#${T})" transform="scale(${j}, ${N})" stroke-dasharray="${E.join(" ")}"/>
|
|
300
|
-
</svg>
|
|
301
|
-
`}(u,p):(console.error(`Polotno error: Can not convert ${u.subType} figure to svg.`),(0,e.rectData)(u))},e.rectData=({width:u,height:d,cornerRadius:p})=>{if(p>0){const y=Math.min(p,u/2,d/2);return`M 0 ${y} A ${y} ${y} 0 0 1 ${y} 0 L ${u-y} 0 A ${y} ${y} 0 0 1 ${u} ${y} L ${u} ${d-y} A ${y} ${y} 0 0 1 ${u-y} ${d} L ${y} ${d} A ${y} ${y} 0 0 1 0 ${d-y} Z`}return`M 0 0 L ${u} 0 L ${u} ${d} L 0 ${d} Z`},e.triangleData=({width:u,height:d})=>`M ${u/2} 0 L ${u} ${d} L 0 ${d} Z`,e.rightTriangleData=({width:u,height:d})=>`M 0 0 L ${u} 0 L 0 ${d} Z`,e.circleData=({width:u,height:d})=>`M ${u/2} ${d/2} m -${u/2}, 0 a ${u/2},${d/2} 0 1,0 ${u},0 a ${u/2},${d/2} 0 1,0 -${u},0`,e.TYPES={rect:e.rectData,circle:e.circleData,star:r,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:t,pentagon:n,hexagon:a,speechBubble:o,cross:s,arc:({width:u,height:d})=>i({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:u,height:d}),cloud:({width:u,height:d})=>i({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:u,height:d}),rightArrow:({width:u,height:d})=>{const p=.6*u;return`M 0 ${d/4} L ${p} ${d/4} L ${p} 0 L ${u} ${d/2} L ${p} ${d} L ${p} ${.75*d} L 0 ${.75*d} Z`},leftArrow:({width:u,height:d})=>{const p=.4*u;return`M ${u} ${d/4} L ${p} ${d/4} L ${p} 0 L 0 ${d/2} L ${p} ${d} L ${p} ${.75*d} L ${u} ${.75*d} Z`},downArrow:({width:u,height:d})=>{const p=.6*d;return`M ${u/4} 0 L ${u/4} ${p} L 0 ${p} L ${u/2} ${d} L ${u} ${p} L ${.75*u} ${p} L ${.75*u} 0 Z`},upArrow:({width:u,height:d})=>{const p=.4*d;return`M ${u/4} ${d} L ${u/4} ${p} L 0 ${p} L ${u/2} 0 L ${u} ${p} L ${.75*u} ${p} L ${.75*u} ${d} Z`},asterisk1:({width:u,height:d})=>i({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:u,height:d}),asterisk2:({width:u,height:d})=>i({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:u,height:d}),bookmark:({width:u,height:d})=>i({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:u,height:d}),butterfly:({width:u,height:d})=>i({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:u,height:d}),cylinder:({width:u,height:d})=>i({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:u,height:d}),diamond2:({width:u,height:d})=>i({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:u,height:d}),door:({width:u,height:d})=>i({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:u,height:d}),drop1:({width:u,height:d})=>i({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:u,height:d}),drop2:({width:u,height:d})=>i({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:u,height:d}),explosion:({width:u,height:d})=>i({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:u,height:d}),flag:({width:u,height:d})=>i({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:u,height:d}),flower:({width:u,height:d})=>i({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:u,height:d}),frame:({width:u,height:d})=>i({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:u,height:d}),heart1:({width:u,height:d})=>i({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:u,height:d}),home:({width:u,height:d})=>i({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:u,height:d}),home2:({width:u,height:d})=>i({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:u,height:d}),hourglass:({width:u,height:d})=>i({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:u,height:d}),house:({width:u,height:d})=>i({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:u,height:d}),keyhole:({width:u,height:d})=>i({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:u,height:d}),kiss:({width:u,height:d})=>i({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:u,height:d}),leaf:({width:u,height:d})=>i({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:u,height:d}),lightning1:({width:u,height:d})=>i({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:u,height:d}),lightning2:({width:u,height:d})=>i({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:u,height:d}),magnet:({width:u,height:d})=>i({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:u,height:d}),mithosis:({width:u,height:d})=>i({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:u,height:d}),orangeRicky:({width:u,height:d})=>i({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:u,height:d}),party:({width:u,height:d})=>i({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:u,height:d}),pillow:({width:u,height:d})=>i({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:u,height:d}),polygon:({width:u,height:d})=>i({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:u,height:d}),rainbow:({width:u,height:d})=>i({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:u,height:d}),rhodeIsland:({width:u,height:d})=>i({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:u,height:d}),shell:({width:u,height:d})=>i({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:u,height:d}),shield1:({width:u,height:d})=>i({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:u,height:d}),shield2:({width:u,height:d})=>i({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:u,height:d}),skewedRectangle:({width:u,height:d})=>i({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:u,height:d}),softFlower:({width:u,height:d})=>i({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:u,height:d}),softStar:({width:u,height:d})=>i({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:u,height:d}),stairs1:({width:u,height:d})=>i({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:u,height:d}),stairs2:({width:u,height:d})=>i({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:u,height:d}),teewee:({width:u,height:d})=>i({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:u,height:d}),blob1:({width:u,height:d})=>i({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:u,height:d}),blob10:({width:u,height:d})=>i({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:u,height:d}),blob11:({width:u,height:d})=>i({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:u,height:d}),blob12:({width:u,height:d})=>i({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:u,height:d}),blob13:({width:u,height:d})=>i({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:u,height:d}),blob14:({width:u,height:d})=>i({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:u,height:d}),blob15:({width:u,height:d})=>i({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:u,height:d}),blob16:({width:u,height:d})=>i({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:u,height:d}),blob17:({width:u,height:d})=>i({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:u,height:d}),blob18:({width:u,height:d})=>i({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:u,height:d}),blob19:({width:u,height:d})=>i({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:u,height:d}),blob2:({width:u,height:d})=>i({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:u,height:d}),blob20:({width:u,height:d})=>i({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:u,height:d}),blob21:({width:u,height:d})=>i({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:u,height:d}),blob22:({width:u,height:d})=>i({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:u,height:d}),blob23:({width:u,height:d})=>i({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:u,height:d}),blob24:({width:u,height:d})=>i({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:u,height:d}),blob25:({width:u,height:d})=>i({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:u,height:d}),blob26:({width:u,height:d})=>i({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:u,height:d}),blob27:({width:u,height:d})=>i({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:u,height:d}),blob28:({width:u,height:d})=>i({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:u,height:d}),blob29:({width:u,height:d})=>i({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:u,height:d}),blob3:({width:u,height:d})=>i({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:u,height:d}),blob30:({width:u,height:d})=>i({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:u,height:d}),blob31:({width:u,height:d})=>i({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:u,height:d}),blob32:({width:u,height:d})=>i({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:u,height:d}),blob4:({width:u,height:d})=>i({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:u,height:d}),blob5:({width:u,height:d})=>i({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:u,height:d}),blob6:({width:u,height:d})=>i({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:u,height:d}),blob7:({width:u,height:d})=>i({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:u,height:d}),blob8:({width:u,height:d})=>i({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:u,height:d}),blob9:({width:u,height:d})=>i({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:u,height:d})}}(Pv)),Pv}var K3;function CC(){return K3||(K3=1,function(e){var r=$d&&$d.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=r(fi()),n=Us,a=Fu,i=Cm(),o=rf(),s=Pp(),c={};e.FigureElement=(0,n.observer)(({element:u,store:d})=>{const p=u.selectable||d.role==="admin",y=(0,o.isTouchDevice)(),f=d.selectedShapes.indexOf(u)>=0&&u.selectable,_=Math.min(u.strokeWidth,u.width/2,u.height/2),S=Math.max(0,Math.min(u.width/2,u.height/2,u.cornerRadius)),w=(0,s.useColor)(u,u.a.fill,"fill"),b=Object.assign(Object.assign({width:u.a.width,height:u.a.height},w),{cornerRadius:S,opacity:u.animated("opacity"),shadowEnabled:u.shadowEnabled,shadowBlur:u.shadowBlur,shadowOffsetX:u.shadowOffsetX,shadowOffsetY:u.shadowOffsetY,shadowColor:u.shadowColor,shadowOpacity:u.shadowOpacity,preventDefault:!y||f,hideInExport:!u.showInExport}),g=(0,s.useColor)(u,u.stroke,"stroke"),v=Object.assign(Object.assign({visible:_>0,x:_/2,y:_/2,width:u.a.width-_,height:u.a.height-_},g),{strokeWidth:_,cornerRadius:Math.max(0,S-_),dash:u.dash.map(N=>N*_),opacity:u.animated("opacity"),hideInExport:!u.showInExport,listening:!1}),E=(x=u.subType,c[x]||(c[x]=(j=(0,i.subTypeToPathDataFunc)(x),(0,n.observer)(({element:N,fillProps:T,strokeProps:F})=>{let C=j({width:N.a.width,height:N.a.height,cornerRadius:N.cornerRadius}),A=1,L=1;typeof C!="string"&&(A=C.scaleX,L=C.scaleY,C=C.path);const O=t.default.useRef(null);return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Rect,{width:N.width,height:N.height,fill:"transparent"}),t.default.createElement(a.Path,Object.assign({},T,{ref:O,data:C,scaleX:A,scaleY:L})),t.default.createElement(a.Group,{clipFunc:I=>{const M=O.current;if(M){var G=M.dataArray;I.beginPath();for(var W=0;W<G.length;W++){var Y=G[W].command,te=G[W].points;switch(Y){case"L":I.lineTo(te[0],te[1]);break;case"M":I.moveTo(te[0],te[1]);break;case"C":I.bezierCurveTo(te[0],te[1],te[2],te[3],te[4],te[5]);break;case"Q":I.quadraticCurveTo(te[0],te[1],te[2],te[3]);break;case"A":var V=te[0],H=te[1],q=te[2],D=te[3],$=te[4],ne=te[5],Z=te[6],Q=te[7],oe=q>D?q:D,se=q>D?1:q/D,ue=q>D?D/q:1;I.translate(V,H),I.rotate(Z),I.scale(se,ue),I.arc(0,0,oe,$,$+ne,1-Q),I.scale(1/se,1/ue),I.rotate(-Z),I.translate(-V,-H);break;case"z":I.closePath()}}}},scaleX:A,scaleY:L},t.default.createElement(a.Path,Object.assign({},F,{x:0,y:0,data:C,strokeWidth:2*F.strokeWidth,dash:F.dash.map(I=>I)}))))}))),c[x]||a.Group);var x,j;return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Group,{id:u.id,x:u.a.x,y:u.a.y,rotation:u.a.rotation,opacity:u.a.opacity,listening:p,draggable:y?u.draggable&&f:u.draggable,name:"element",onDragMove:N=>{u.set({x:N.target.x(),y:N.target.y()})},onDragEnd:N=>{u.set({x:N.target.x(),y:N.target.y()})},onTransform:N=>{const T=N.target.scale();N.target.scaleX(1),N.target.scaleY(1),u.set({width:u.width*T.x,height:u.height*T.y,x:N.target.x(),y:N.target.y(),rotation:N.target.rotation()})}},t.default.createElement(E,{element:u,fillProps:b,strokeProps:v})))})}($d)),$d}var Yd={},ac={},Ov={},oc={},Z3;function e_(){if(Z3)return oc;Z3=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.loop=oc.conditional=oc.parse=void 0;var e=function n(a,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(i))i.forEach(function(u){return n(a,u,o,s)});else if(typeof i=="function")i(a,o,s,n);else{var c=Object.keys(i)[0];Array.isArray(i[c])?(s[c]={},n(a,i[c],o,s[c])):s[c]=i[c](a,o,s,n)}return o};oc.parse=e;var r=function(a,i){return function(o,s,c,u){i(o,s,c)&&u(o,a,s,c)}};oc.conditional=r;var t=function(a,i){return function(o,s,c,u){for(var d=[],p=o.pos;i(o,s,c);){var y={};if(u(o,a,s,y),o.pos===p)break;p=o.pos,d.push(y)}return d}};return oc.loop=t,oc}var $i={},Q3;function t_(){if(Q3)return $i;Q3=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.readBits=$i.readArray=$i.readUnsigned=$i.readString=$i.peekBytes=$i.readBytes=$i.peekByte=$i.readByte=$i.buildStream=void 0;var e=function(p){return{data:p,pos:0}};$i.buildStream=e;var r=function(){return function(p){return p.data[p.pos++]}};$i.readByte=r;var t=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(y){return y.data[y.pos+p]}};$i.peekByte=t;var n=function(p){return function(y){return y.data.subarray(y.pos,y.pos+=p)}};$i.readBytes=n;var a=function(p){return function(y){return y.data.subarray(y.pos,y.pos+p)}};$i.peekBytes=a;var i=function(p){return function(y){return Array.from(n(p)(y)).map(function(f){return String.fromCharCode(f)}).join("")}};$i.readString=i;var o=function(p){return function(y){var f=n(2)(y);return p?(f[1]<<8)+f[0]:(f[0]<<8)+f[1]}};$i.readUnsigned=o;var s=function(p,y){return function(f,_,S){for(var w=typeof y=="function"?y(f,_,S):y,b=n(p),g=new Array(w),v=0;v<w;v++)g[v]=b(f);return g}};$i.readArray=s;var c=function(p,y,f){for(var _=0,S=0;S<f;S++)_+=p[y+S]&&Math.pow(2,f-S-1);return _},u=function(p){return function(y){for(var f=r()(y),_=new Array(8),S=0;S<8;S++)_[7-S]=!!(f&1<<S);return Object.keys(p).reduce(function(w,b){var g=p[b];return g.length?w[b]=c(_,g.index,g.length):w[b]=_[g.index],w},{})}};return $i.readBits=u,$i}var J3;function kC(){return J3||(J3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=e_(),t=t_(),n={blocks:function(y){for(var f=0,_=[],S=y.data.length,w=0,b=(0,t.readByte)()(y);b!==f&&b;b=(0,t.readByte)()(y)){if(y.pos+b>=S){var g=S-y.pos;_.push((0,t.readBytes)(g)(y)),w+=g;break}_.push((0,t.readBytes)(b)(y)),w+=b}for(var v=new Uint8Array(w),E=0,x=0;x<_.length;x++)v.set(_[x],E),E+=_[x].length;return v}},a=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},function(p){var y=(0,t.peekBytes)(2)(p);return y[0]===33&&y[1]===249}),i=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,function(p,y,f){return Math.pow(2,f.descriptor.lct.size+1)})},function(p,y,f){return f.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},n]}]},function(p){return(0,t.peekByte)()(p)===44}),o=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(y,f,_){return(0,t.readBytes)(_.text.blockSize)(y)}},n]},function(p){var y=(0,t.peekBytes)(2)(p);return y[0]===33&&y[1]===1}),s=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(y,f,_){return(0,t.readString)(_.blockSize)(y)}},n]},function(p){var y=(0,t.peekBytes)(2)(p);return y[0]===33&&y[1]===255}),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},n]},function(p){var y=(0,t.peekBytes)(2)(p);return y[0]===33&&y[1]===254}),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,function(p,y){return Math.pow(2,y.lsd.gct.size+1)})},function(p,y){return y.lsd.gct.exists}),{frames:(0,r.loop)([a,s,c,i,o],function(p){var y=(0,t.peekByte)()(p);return y===33||y===44})}],d=u;e.default=d}(Ov)),Ov}var Xd={},e4;function LC(){if(e4)return Xd;e4=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.deinterlace=void 0;var e=function(t,n){for(var a=new Array(t.length),i=t.length/n,o=function(f,_){var S=t.slice(_*n,(_+1)*n);a.splice.apply(a,[f*n,n].concat(S))},s=[0,4,2,1],c=[8,8,4,2],u=0,d=0;d<4;d++)for(var p=s[d];p<i;p+=c[d])o(p,u),u++;return a};return Xd.deinterlace=e,Xd}var Kd={},t4;function NC(){if(t4)return Kd;t4=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.lzw=void 0;var e=function(t,n,a){var i=4096,o=-1,s=a,c,u,d,p,y,f,_,N,S,w,j,b,T,F,A,C,g=new Array(a),v=new Array(i),E=new Array(i),x=new Array(i+1);for(b=t,u=1<<b,y=u+1,c=u+2,_=o,p=b+1,d=(1<<p)-1,S=0;S<u;S++)v[S]=0,E[S]=S;var j,N,T,F,C,A;for(j=N=T=F=C=A=0,w=0;w<s;){if(F===0){if(N<p){j+=n[A]<<N,N+=8,A++;continue}if(S=j&d,j>>=p,N-=p,S>c||S==y)break;if(S==u){p=b+1,d=(1<<p)-1,c=u+2,_=o;continue}if(_==o){x[F++]=E[S],_=S,T=S;continue}for(f=S,S==c&&(x[F++]=T,S=_);S>u;)x[F++]=E[S],S=v[S];T=E[S]&255,x[F++]=T,c<i&&(v[c]=_,E[c]=T,c++,(c&d)===0&&c<i&&(p++,d+=c)),_=f}F--,g[C++]=x[F],w++}for(w=C;w<s;w++)g[w]=0;return g};return Kd.lzw=e,Kd}var r4;function TC(){if(r4)return ac;r4=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.decompressFrames=ac.decompressFrame=ac.parseGIF=void 0;var e=i(kC()),r=e_(),t=t_(),n=LC(),a=NC();function i(d){return d&&d.__esModule?d:{default:d}}var o=function(p){var y=new Uint8Array(p);return(0,r.parse)((0,t.buildStream)(y),e.default)};ac.parseGIF=o;var s=function(p){for(var y=p.pixels.length,f=new Uint8ClampedArray(y*4),_=0;_<y;_++){var S=_*4,w=p.pixels[_],b=p.colorTable[w]||[0,0,0];f[S]=b[0],f[S+1]=b[1],f[S+2]=b[2],f[S+3]=w!==p.transparentIndex?255:0}return f},c=function(p,y,f){if(!p.image){console.warn("gif frame does not have associated image.");return}var _=p.image,S=_.descriptor.width*_.descriptor.height,w=(0,a.lzw)(_.data.minCodeSize,_.data.blocks,S);_.descriptor.lct.interlaced&&(w=(0,n.deinterlace)(w,_.descriptor.width));var b={pixels:w,dims:{top:p.image.descriptor.top,left:p.image.descriptor.left,width:p.image.descriptor.width,height:p.image.descriptor.height}};return _.descriptor.lct&&_.descriptor.lct.exists?b.colorTable=_.lct:b.colorTable=y,p.gce&&(b.delay=(p.gce.delay||10)*10,b.disposalType=p.gce.extras.disposal,p.gce.extras.transparentColorGiven&&(b.transparentIndex=p.gce.transparentColorIndex)),f&&(b.patch=s(b)),b};ac.decompressFrame=c;var u=function(p,y){return p.frames.filter(function(f){return f.image}).map(function(f){return c(f,p.gct,y)})};return ac.decompressFrames=u,ac}var n4;function RC(){return n4||(n4=1,function(e){var r=Yd&&Yd.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const t=r(fi()),n=Us,a=qs,i=Fu,o=r(Hs()),s=TC(),c=J8(),u=xm(),d=Op(),p=If(),y=rf();function f(w,b,g){const v=b.getContext("2d"),E=g.getContext("2d");if(!v||!E)return;w.disposalType===2&&v.clearRect(0,0,b.width,b.height),g.width=w.width,g.height=w.height;const x=E.createImageData(w.width,w.height);x.data.set(w.patch),E.putImageData(x,0,0),v.drawImage(g,w.left,w.top)}const _=(0,n.observer)(({element:w})=>{const b=Math.min(30,w.width/4,w.height/4),g=t.default.useRef(null);return t.default.useEffect(()=>{const v=g.current;if(!v)return;const E=new o.default.Animation(x=>{v.rotate(((x==null?void 0:x.timeDiff)||0)/2)},v.getLayer());return E.start(),()=>{E.stop()}},[]),t.default.createElement(i.Group,{x:w.a.x,y:w.a.y,rotation:w.a.rotation,listening:!1,opacity:w.a.opacity,hideInExport:!w.showInExport},t.default.createElement(i.Rect,{width:w.width,height:w.height,fill:"rgba(124, 173, 212, 0.8)"}),t.default.createElement(i.Arc,{ref:g,x:w.width/2,y:w.height/2,fill:"white",outerRadius:Math.abs(b),innerRadius:Math.max(1,b-5),angle:270}))}),S=(0,n.observer)(({element:w})=>{const b=Math.max(10,Math.min(30,w.width/22));return t.default.createElement(i.Group,{x:w.a.x,y:w.a.y,rotation:w.a.rotation,listening:!1,opacity:w.a.opacity,hideInExport:!w.showInExport},t.default.createElement(i.Rect,{width:w.width,height:w.height,fill:"rgba(223, 102, 102, 0.8)"}),t.default.createElement(i.Text,{text:"Cannot load the GIF...",fontSize:b,width:w.width,height:w.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});e.GifElement=(0,n.observer)(({element:w,store:b})=>{var g;const[v,E]=t.default.useState(!1),x=b.selectedShapes.indexOf(w)>=0&&w.selectable,j=t.default.useRef(null),N=t.default.useRef(),[T,F,C,A]=function(ne){const[Z,Q]=t.default.useState([]),[oe,se]=t.default.useState(0),[ue,ve]=t.default.useState("loading"),[Pe,ke]=t.default.useState({width:0,height:0});return t.default.useEffect(()=>{(async()=>{try{const Ne=await fetch(ne),xe=await Ne.arrayBuffer(),ye=(0,s.parseGIF)(xe),Ie=(0,s.decompressFrames)(ye,!0),me=ye.lsd.width,_e=ye.lsd.height;ke({width:me,height:_e});const Ae=Ie.map(ge=>({patch:new Uint8ClampedArray(ge.patch),delay:ge.delay,width:ge.dims.width,height:ge.dims.height,left:ge.dims.left,top:ge.dims.top,disposalType:ge.disposalType})),Le=Ae.reduce((ge,Te)=>ge+Te.delay,0);Q(Ae),se(Le),ve("loaded")}catch(Ne){console.error("Failed to load GIF:",Ne),ve("failed")}})()},[ne]),[Z,oe,Pe,ue]}(w.src);(0,u.useImageLoader)(A,w.src,w.id),t.default.useEffect(()=>(N.current=document.createElement("canvas"),()=>{N.current&&o.default.Util.releaseCanvas(N.current)}),[]),t.default.useEffect(()=>{if(A==="loaded"&&N.current&&(N.current.width=C.width,N.current.height=C.height,T.length>0)){const ne=N.current.getContext("2d");if(ne){ne.clearRect(0,0,C.width,C.height);const Z=document.createElement("canvas");f(T[0],N.current,Z)}}},[C,A,T]),t.default.useEffect(()=>{if(!T.length||!N.current)return;const ne=N.current;ne.width=C.width,ne.height=C.height;const Z=document.createElement("canvas"),Q=ne.getContext("2d");Q&&Q.clearRect(0,0,ne.width,ne.height);let oe=-1;f(T[0],ne,Z),te(),oe=0;const se=ue=>{const ve=(Pe=>{const ke=Pe%F;let Ne=0;for(let xe=0;xe<T.length;xe++)if(Ne+=T[xe].delay,Ne>ke)return xe;return 0})(ue);ve!==oe&&(f(T[ve],ne,Z),te(),j.current.getLayer().draw(),oe=ve)};if(b.isPlaying||w.page._exportingOrRendering)return(0,a.autorun)(()=>{se(b.currentTime-w.page.startTime)});{const ue=window.setInterval(()=>{se(b.currentTime||performance.now())},16);return()=>{clearInterval(ue)}}},[b.isPlaying,T,F,w.page._exportingOrRendering]),t.default.useEffect(()=>{F&&b.history.ignore(()=>{w.set({duration:F})})},[F]);let{cropX:L,cropY:O,cropWidth:I,cropHeight:M}=w;A!=="loaded"&&(L=O=0,I=M=1);const G={x:C.width*L,y:C.height*O,width:C.width*I,height:C.height*M},W=(g=w.cornerRadius)!==null&&g!==void 0?g:0,[Y,te]=(0,c.useCornerRadiusAndCrop)(w,N.current,G,b._elementsPixelRatio,W,v||w._cropModeEnabled);t.default.useLayoutEffect(()=>{if(!v&&!w._cropModeEnabled&&j.current)return(0,d.applyFilter)(j.current,w),(0,a.autorun)(()=>{(0,d.applyFilter)(j.current,w)},{delay:100})},[N.current,v,I,M,w._cropModeEnabled,C.width,C.height]);const V=A==="loading",H=A==="failed",q=V||H?0:w.a.opacity;(0,p.useFadeIn)(j,q);const D=w.selectable||b.role==="admin",$=(0,y.isTouchDevice)();return t.default.createElement(t.default.Fragment,null,V&&t.default.createElement(_,{element:w}),H&&t.default.createElement(S,{element:w}),t.default.createElement(i.Image,{ref:j,name:"element",id:w.id,image:Y,x:w.a.x,y:w.a.y,width:w.a.width||1,height:w.a.height||1,rotation:w.a.rotation,opacity:q,shadowEnabled:w.shadowEnabled,shadowBlur:w.shadowBlur,shadowOffsetX:w.shadowOffsetX,shadowOffsetY:w.shadowOffsetY,shadowColor:w.shadowColor,shadowOpacity:w.shadowOpacity,customCrop:G,listening:D,draggable:$?w.draggable&&x:w.draggable,preventDefault:!$||x,hideInExport:!w.showInExport,onDragMove:ne=>{w.set({x:ne.target.x(),y:ne.target.y()})},onDragEnd:ne=>{w.set({x:ne.target.x(),y:ne.target.y()})},onTransformStart:()=>E(!0),onTransform:ne=>{const Z=ne.currentTarget,Q=Math.abs(Z.scaleX()-1)<1e-7?1:Z.scaleX(),oe=Math.abs(Z.scaleY()-1)<1e-7?1:Z.scaleY();Z.scaleX(1),Z.scaleY(1),w.set({x:Z.x(),y:Z.y(),width:Z.width()*Q,height:Z.height()*oe,rotation:Z.rotation()})},onTransformEnd:()=>E(!1)}),t.default.createElement(i.Rect,{x:w.a.x,y:w.a.y,width:Math.max(w.a.width-w.borderSize,0),height:Math.max(w.a.height-w.borderSize,0),opacity:q,offsetX:-w.borderSize/2,offsetY:-w.borderSize/2,stroke:w.borderColor,strokeWidth:w.borderSize,listening:!1,visible:!!w.borderSize,rotation:w.rotation,cornerRadius:Math.max(0,W-w.borderSize),hideInExport:!w.showInExport}))})}(Yd)),Yd}var Zd={},i4;function MC(){return i4||(i4=1,function(e){var r=Zd&&Zd.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const t=r(fi()),n=Us,a=Fu,i={stroke:"rgb(0, 161, 255)",strokeWidth:2};e.setHighlighterStyle=o=>{Object.assign(i,o)},e.Highlighter=(0,n.observer)(({element:o})=>t.default.createElement(a.Rect,Object.assign({name:"highlighter",x:o.a.x,y:o.a.y,rotation:o.a.rotation,width:o.a.width,height:o.a.height,listening:!1,strokeScaleEnabled:!1},i)))}(Zd)),Zd}var Qd={};let IC="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",r_=e=>crypto.getRandomValues(new Uint8Array(e)),n_=(e,r,t)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*n*r/e.length);return(i=r)=>{let o="";for(;;){let s=t(a),c=a;for(;c--;)if(o+=e[s[c]&n]||"",o.length===i)return o}}},jC=(e,r=21)=>n_(e,r,r_),FC=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((r,t)=>(t&=63,t<36?r+=t.toString(36):t<62?r+=(t-26).toString(36).toUpperCase():t>62?r+="-":r+="_",r),"");const DC=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:jC,customRandom:n_,nanoid:FC,random:r_,urlAlphabet:IC},Symbol.toStringTag,{value:"Module"})),l0=Zc(DC);var Av={},Ms={},Cv={},kv={},a4;function i_(){return a4||(a4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0,e.deepEqual=function(r,t){if(r===t)return!0;if(typeof r=="object"&&r!=null&&typeof t=="object"&&t!=null){if(Object.keys(r).length!=Object.keys(t).length)return!1;for(var n in r)if(!t.hasOwnProperty(n)||!(0,e.deepEqual)(r[n],t[n]))return!1;return!0}return!1}}(kv)),kv}var o4;function BC(){return o4||(o4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const r=hl,t=i_();Object.assign(r.types),e.UndoManager=r.types.model("UndoManager",{history:r.types.array(r.types.frozen()),undoIdx:-1,targetPath:""}).views(n=>({get canUndo(){return n.undoIdx>0},get canRedo(){return n.undoIdx<n.history.length-1}})).actions(n=>{let a,i,o=!1,s=null,c=0,u=0;const d=()=>u>0;function p(){const f=(0,r.getSnapshot)(a);return{pages:f.pages,width:f.width,height:f.height,custom:f.custom,audios:f.audios}}function y(f){const _=a.pages.map(g=>g.id),S=f.pages.map(g=>g.id),w=!(0,t.deepEqual)(_,S),b=!(0,t.deepEqual)(a.custom,f.custom);w?(0,r.applySnapshot)(a.pages,f.pages):a.pages.forEach((g,v)=>{(0,r.applySnapshot)(g,f.pages[v])}),b&&a.set({custom:f.custom}),a.setSize(f.width,f.height)}return{startTransaction(){u++},endTransaction(f){u--,f||this.requestAddState(p())},async ignore(f,_=!1,S=!1){S&&await new Promise(E=>setTimeout(E,10)),c&&n.addUndoState();let w=d();n.startTransaction();let b=u;try{await f()}catch(E){setTimeout(()=>{throw E})}const g=b!==u,v=!g;n.endTransaction(v),_||w||n.replaceState(),g||(clearTimeout(c),c=0)},async transaction(f){await n.ignore(f,!0),this.addUndoState()},requestAddState(f){s=f,c||d()||(o?o=!1:c=setTimeout(()=>{c=0,clearTimeout(c),d()||this.addUndoState()},100))},addUndoState(){if(o)return void(o=!1);const f=n.history[n.undoIdx];!(0,t.deepEqual)(s,f)&&(clearTimeout(c),c=0,n.history.splice(n.undoIdx+1),n.history.push(s),n.undoIdx=n.history.length-1)},afterCreate(){if(a=(0,r.resolvePath)(n,".."),!a)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");i=(0,r.onSnapshot)(a,()=>{this.requestAddState(p())}),n.history.length===0&&this.requestAddState(p())},clear(){clearTimeout(c),c=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(p())},beforeDestroy(){i()},undo(){c&&this.addUndoState(),n.canUndo?(n.undoIdx--,o=!0,y(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){c&&this.addUndoState(),n.canRedo?(n.undoIdx++,o=!0,y(n.history[n.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){n.history[n.undoIdx]=p()}}}),e.default=e.UndoManager}(Cv)),Cv}var Lv={},s4;function qC(){return s4||(s4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=async function(r,t){const n=await(await fetch(r)).blob(),a=document.createElement("a"),i=URL.createObjectURL(n);a.href=i,a.download=t,document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(i)},0)}}(Lv)),Lv}var Nv={},l4;function zC(){return l4||(l4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=function(){var n;return!((n=window.jspdf)===null||n===void 0)&&n.jsPDF?Promise.resolve(window.jspdf.jsPDF):t||(t=new Promise(a=>{var i=document.createElement("script");i.onload=function(){a(window.jspdf.jsPDF)},i.src=r,document.head.appendChild(i)}),t)};const r="https://cdnjs.cloudflare.com/ajax/libs/jspdf/3.0.1/jspdf.umd.min.js";let t=null}(Nv)),Nv}var Tv={},u4;function UC(){return u4||(u4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getGIF=t,e.createGIF=async function({width:n,height:a}){return new(await t())({workers:4,width:n,height:a,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
302
|
-
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
|
|
303
|
-
`],{type:"application/javascript"}))})};const r="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function t(){return window.GIF?Promise.resolve(window.GIF):new Promise(n=>{var a=document.createElement("script");a.onload=function(){n(window.GIF)},a.src=r,document.head.appendChild(a)})}}(Tv)),Tv}var sc={},Rv={},c4;function HC(){return c4||(c4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setAPI=e.iconscoutDownload=e.iconscoutList=e.svgapiDownload=e.svgapiList=e.unsplashDownload=e.unsplashList=e.textTemplateList=e.templateList=e.removeBackground=e.polotnoShapesList=e.getGoogleFontImage=e.getGoogleFontsListAPI=e.URLS=e.getAPI=e.API=e.URL=void 0;const r=km();e.URL="https://api.polotno.com",e.API=`${e.URL}/api`,e.getAPI=()=>e.URL+"/api";const t={},n=(i,o)=>{t[i]||(t[i]=!0,console.error(o))},a=`API for iconscout is provided as a demonstration.
|
|
304
|
-
For production usage you have to use your own API endpoint.
|
|
305
|
-
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
306
|
-
https://polotno.com/docs/server-api`;e.URLS={unsplashList:({query:i,page:o=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${i}&per_page=20&page=${o}&KEY=${(0,r.getKey)()}`,unsplashDownload:i=>`${(0,e.getAPI)()}/download-unsplash?id=${i}&KEY=${(0,r.getKey)()}`,svgapiList:({query:i,page:o=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${i}&page=${o}&per_page=20&KEY=${(0,r.getKey)()}`,svgapiDownload:i=>`${(0,e.getAPI)()}/download-svgapi?path=${i}&KEY=${(0,r.getKey)()}`,iconscoutList:({query:i,page:o=1})=>(n("iconscout",a),`${(0,e.getAPI)()}/get-iconscout?query=${i}&page=${o}&KEY=${(0,r.getKey)()}`),iconscoutDownload:i=>(n("iconscout",a),`${(0,e.getAPI)()}/download-iconscout?uuid=${i}&KEY=${(0,r.getKey)()}`),nounProjectList:({query:i,page:o=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${i}&page=${o}&KEY=${(0,r.getKey)()}`,nounProjectDownload:i=>`${(0,e.getAPI)()}/download-nounproject?id=${i}&KEY=${(0,r.getKey)()}`,templateList:({query:i,page:o=1,sizeQuery:s})=>`${(0,e.getAPI)()}/get-templates?${s}&query=${i}&per_page=30&page=${o}&KEY=${(0,r.getKey)()}`,googleFontsList:()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,r.getKey)()}`,googleFontImage:i=>{return`${e.URL}/google-fonts-previews/black/${o=i,o.replace(new RegExp(" ","g"),"-")}.png`;var o},textTemplateList:()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,r.getKey)()}`,removeBackground:()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,r.getKey)()}`,aiText:()=>`${(0,e.getAPI)()}/ai/text?KEY=${(0,r.getKey)()}`},e.getGoogleFontsListAPI=()=>e.URLS.googleFontsList(),e.getGoogleFontImage=i=>e.URLS.googleFontImage(i),e.polotnoShapesList=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,r.getKey)()}`,e.removeBackground=()=>e.URLS.removeBackground(),e.templateList=i=>e.URLS.templateList(i),e.textTemplateList=()=>e.URLS.textTemplateList(),e.unsplashList=i=>e.URLS.unsplashList(i),e.unsplashDownload=i=>e.URLS.unsplashDownload(i),e.svgapiList=i=>e.URLS.svgapiList(i),e.svgapiDownload=i=>e.URLS.svgapiDownload(i),e.iconscoutList=i=>e.URLS.iconscoutList(i),e.iconscoutDownload=i=>e.URLS.iconscoutDownload(i),e.setAPI=(i,o)=>{e.URLS[i]=o}}(Rv)),Rv}var f4;function km(){return f4||(f4=1,function(e){var r,t=sc&&sc.__createBinding||(Object.create?function(T,F,C,A){A===void 0&&(A=C);var L=Object.getOwnPropertyDescriptor(F,C);L&&!("get"in L?!F.__esModule:L.writable||L.configurable)||(L={enumerable:!0,get:function(){return F[C]}}),Object.defineProperty(T,A,L)}:function(T,F,C,A){A===void 0&&(A=C),T[A]=F[C]}),n=sc&&sc.__setModuleDefault||(Object.create?function(T,F){Object.defineProperty(T,"default",{enumerable:!0,value:F})}:function(T,F){T.default=F}),a=sc&&sc.__importStar||(r=function(T){return r=Object.getOwnPropertyNames||function(F){var C=[];for(var A in F)Object.prototype.hasOwnProperty.call(F,A)&&(C[C.length]=A);return C},r(T)},function(T){if(T&&T.__esModule)return T;var F={};if(T!=null)for(var C=r(T),A=0;A<C.length;A++)C[A]!=="default"&&t(F,T,C[A]);return n(F,T),F});Object.defineProperty(e,"__esModule",{value:!0}),e.__=e.getKey=e.isCreditVisible=e.___=void 0,e.isKeyPaid=N,e.validateKey=async function(T,F){p=T,await N(T)&&!F||d()};const i=a(qs),o=HC(),s=gc(),c=i.observable({value:!1}),u=i.observable({value:"v1"});e.___=()=>u.value,e.isCreditVisible=()=>c.value;const d=i.action(()=>{c.value=!0});let p="";e.getKey=()=>p||"";const y=5,f=3e3,_="Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet",S="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",w="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",b="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let g=window.location.origin;const v=navigator.userAgent.indexOf("Headless")>-1,E=navigator.userAgent.indexOf("Electron")>-1;g==="file://"&&v&&(g="headless"),g==="file://"&&E&&(g="electron");const x=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${g}" here: https://polotno.com/cabinet`;let j=fetch;async function N(T){for(let F=0;F<y;F++)try{const C=await j((0,o.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:T,site:location.host,skdVersion:"2.23.7"})});if(u.value=C.headers.get("x-api-version"),!T)return console.warn(_),!1;if(C.status!==200){await new Promise(L=>setTimeout(L,f));continue}const A=await C.json();return A.is_valid||console.warn(S),A.is_paid||console.log(b,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),A.is_domain_valid||console.log(x,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,s.useRemoveBackground)(A.remove_background_enabled),A.is_paid||!1}catch{await new Promise(A=>setTimeout(A,f))}return console.error(w),!0}e.__=T=>{j=T}}(sc)),sc}var Mv={},h4;function Lm(){return h4||(h4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0,e.pxToUnit=({px:r,unit:t="px",dpi:n})=>{switch(t){case"pt":default:return r;case"mm":return r/(n/25.4);case"cm":return r/(n/2.54);case"in":return r/n}},e.pxToUnitRounded=({px:r,precious:t=2,dpi:n=72,unit:a="px"})=>parseFloat((0,e.pxToUnit)({px:r,dpi:n,unit:a}).toFixed(t)),e.unitToPx=({unitVal:r,dpi:t,unit:n})=>r/(0,e.pxToUnit)({px:1,unit:n,dpi:t}),e.pxToUnitString=r=>{const t=parseFloat((0,e.pxToUnit)(r).toFixed(1));switch(r.unit){case"pt":return`${Math.round(t)}pt`;case"mm":return`${t}mm`;case"cm":return`${t}cm`;case"in":return`${t}in`;default:return`${Math.round(t)}px`}}}(Mv)),Mv}var Iv={},d4;function VC(){return d4||(d4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=async function(r){for(let t=0;t<30;t++){const n=await r();if(n)return n;await new Promise(a=>setTimeout(a,50))}}}(Iv)),Iv}var ql={},jv={},p4;function F1(){return p4||(p4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=function(n){return new Promise(a=>{const i=document.createElement("img");i.onload=async()=>{i.width===0||i.height===0?a(await(0,r.getSvgSize)(n)):a({width:i.width,height:i.height})},i.crossOrigin="anonymous",i.src=n})},e.loadImage=t,e.cropImage=async function(n,a){const i=await t(n),o=document.createElement("canvas");o.width=2*i.width,o.height=2*i.height,o.getContext("2d").drawImage(i,0,0,o.width,o.height);const s=document.createElement("canvas");s.width=a.width,s.height=a.height;const c=s.getContext("2d");let{cropX:u,cropY:d}=a;const p=o.width*a.cropWidth,y=o.height*a.cropHeight,f=a.width/a.height;let _,S;const w=p/y;return a.type==="svg"?(_=p,S=y):f>=w?(_=p,S=p/f):(_=y*f,S=y),c.drawImage(o,u*o.width,d*o.height,_,S,0,0,s.width,s.height),s.toDataURL("image/png")},e.getCrop=function(n,a){const{width:i,height:o}=n,s=i/o;let c,u;s>=a.width/a.height?(c=a.width,u=a.width/s):(c=a.height*s,u=a.height);const d=(a.width-c)/2,p=(a.height-u)/2;return{cropX:d/a.width,cropY:p/a.height,cropWidth:c/a.width,cropHeight:u/a.height}};const r=Cp();function t(n){return new Promise((a,i)=>{const o=document.createElement("img");o.onload=()=>{a(o)},o.onerror=s=>{i(s)},o.crossOrigin="anonymous",o.src=n})}}(jv)),jv}var Fv={},g4;function a_(){return g4||(g4=1,function(e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Effects=void 0,e.shapeFilterToCSS=function(t,n){let a={filter:"",html:void 0};switch(t){case r.warm:return a.filter="sepia(0.5) saturate(1.5) brightness(1.1) contrast(1.1)",a;case r.cold:return a.filter="url(#blue-boost)",a.html=`
|
|
307
|
-
<svg style="display: none">
|
|
308
|
-
<filter id="blue-boost">
|
|
309
|
-
<feColorMatrix
|
|
310
|
-
type="matrix"
|
|
311
|
-
values="
|
|
312
|
-
0.85 0 0 0 0
|
|
313
|
-
0 0.9 0 0 0
|
|
314
|
-
0 0 1.15 0 0
|
|
315
|
-
0 0 0 1 0"
|
|
316
|
-
/>
|
|
317
|
-
</filter>
|
|
318
|
-
</svg>`,a;case"natural":return a.filter="saturate(1.3) brightness(1.1) contrast(1.2)",a;case r.temperature:{const i=Math.max(-100,Math.min(100,n))/100,o=1+.15*i,s=1,c=1-.15*i;return a.filter="url(#temperature-filter)",a.html=`
|
|
319
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
320
|
-
<filter id="temperature-filter" color-interpolation-filters="sRGB">
|
|
321
|
-
<feColorMatrix type="matrix" values="
|
|
322
|
-
${o} 0 0 0 0
|
|
323
|
-
0 ${s} 0 0 0
|
|
324
|
-
0 0 ${c} 0 0
|
|
325
|
-
0 0 0 1 0" />
|
|
326
|
-
</filter>
|
|
327
|
-
</svg>
|
|
328
|
-
`,a}case r.contrast:{const i=Math.max(-100,Math.min(100,n)),o=259*(i+255)/(255*(259-i)),s=.5*(1-o);return a.filter="url(#contrast-filter)",a.html=`
|
|
329
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
330
|
-
<filter id="contrast-filter" color-interpolation-filters="sRGB">
|
|
331
|
-
<feComponentTransfer>
|
|
332
|
-
<feFuncR type="linear" slope="${o}" intercept="${s}" />
|
|
333
|
-
<feFuncG type="linear" slope="${o}" intercept="${s}" />
|
|
334
|
-
<feFuncB type="linear" slope="${o}" intercept="${s}" />
|
|
335
|
-
</feComponentTransfer>
|
|
336
|
-
</filter>
|
|
337
|
-
</svg>
|
|
338
|
-
`,a}case r.shadows:{const i=Math.max(-100,Math.min(100,n))/100,o=Math.min(Math.max(1-.6*i,.4),2.5);return a.filter="url(#shadows-filter)",a.html=`
|
|
339
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
340
|
-
<filter id="shadows-filter" color-interpolation-filters="sRGB">
|
|
341
|
-
<feComponentTransfer>
|
|
342
|
-
<feFuncR type="gamma" amplitude="1" exponent="${o}" offset="0" />
|
|
343
|
-
<feFuncG type="gamma" amplitude="1" exponent="${o}" offset="0" />
|
|
344
|
-
<feFuncB type="gamma" amplitude="1" exponent="${o}" offset="0" />
|
|
345
|
-
</feComponentTransfer>
|
|
346
|
-
</filter>
|
|
347
|
-
</svg>
|
|
348
|
-
`,a}case r.white:case r.black:return null;case r.vibrance:{const i=Math.max(-100,Math.min(100,n))/100,o=.299,s=.587,c=.114;let u;u=i>=0?1+1.5*i:1+i;const d=1-u,p=d*o+u,y=d*s,f=d*c,_=d*o,S=d*s+u,w=d*c,b=d*o,g=d*s,v=d*c+u;return a.filter="url(#vibrance-filter)",a.html=`
|
|
349
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
350
|
-
<filter id="vibrance-filter" color-interpolation-filters="sRGB">
|
|
351
|
-
<feColorMatrix type="matrix" values="
|
|
352
|
-
${p} ${y} ${f} 0 0
|
|
353
|
-
${_} ${S} ${w} 0 0
|
|
354
|
-
${b} ${g} ${v} 0 0
|
|
355
|
-
0 0 0 1 0" />
|
|
356
|
-
</filter>
|
|
357
|
-
</svg>
|
|
358
|
-
`,a}case r.saturation:{const c=1+Math.max(-100,Math.min(100,n))/100,u=1-c,d=u*.2126+c,p=u*.7152,y=u*.0722,f=u*.2126,_=u*.7152+c,S=u*.0722,w=u*.2126,b=u*.7152,g=u*.0722+c;return a.filter="url(#saturation-filter)",a.html=`
|
|
359
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
360
|
-
<filter id="saturation-filter" color-interpolation-filters="sRGB">
|
|
361
|
-
<feColorMatrix type="matrix" values="
|
|
362
|
-
${d} ${p} ${y} 0 0
|
|
363
|
-
${f} ${_} ${S} 0 0
|
|
364
|
-
${w} ${b} ${g} 0 0
|
|
365
|
-
0 0 0 1 0" />
|
|
366
|
-
</filter>
|
|
367
|
-
</svg>
|
|
368
|
-
`,a}default:return null}},function(t){t.sepia="sepia",t.grayscale="grayscale",t.natural="natural",t.warm="warm",t.cold="cold",t.temperature="temperature",t.contrast="contrast",t.shadows="shadows",t.white="white",t.black="black",t.vibrance="vibrance",t.saturation="saturation"}(r||(e.Effects=r={}))}(Fv)),Fv}var Dv={},v4;function GC(){return v4||(v4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getVideoSize=async function(r){return new Promise((t,n)=>{const a=document.createElement("video");a.crossOrigin="anonymous",a.src=r,a.addEventListener("loadedmetadata",()=>{const{videoWidth:i,videoHeight:o}=a;t({width:i,height:o})}),a.addEventListener("error",i=>{const o=r.slice(0,100);n(new Error(`Failed to load video: ${o}`))})})},e.getVideoDuration=async function(r){return new Promise(t=>{const n=document.createElement("video");n.crossOrigin="anonymous",n.src=r,n.addEventListener("loadedmetadata",()=>{const{duration:a}=n;t(a)})})},e.getVideoPreview=async function(r,t=5){return new Promise((n,a)=>{var i=document.createElement("video"),o=document.createElement("canvas");o.width=480,o.height=360;var s=o.getContext("2d");i.crossOrigin="anonymous",i.src=r,i.addEventListener("error",c=>{a(c)}),i.addEventListener("loadeddata",function(){const c=i.videoWidth/i.videoHeight;o.width=480,o.height=480/c,i.currentTime=t}),i.addEventListener("seeked",function(){s.drawImage(i,0,0,o.width,o.height);try{var c=o.toDataURL();n(c)}catch(u){a(u)}})})},e.getVideoObjectPreview=async function(r,t,n){return new Promise((a,i)=>{const o=t.getContext("2d"),s=()=>{try{o.drawImage(r,0,0,t.width,t.height);const c=t.toDataURL();a(c),r.removeEventListener("seeked",s)}catch(c){i(c),r.removeEventListener("seeked",s)}};r.addEventListener("seeked",s),r.currentTime=n})}}(Dv)),Dv}var m4;function WC(){return m4||(m4=1,function(e){var r,t=ql&&ql.__createBinding||(Object.create?function(x,j,N,T){T===void 0&&(T=N);var F=Object.getOwnPropertyDescriptor(j,N);F&&!("get"in F?!j.__esModule:F.writable||F.configurable)||(F={enumerable:!0,get:function(){return j[N]}}),Object.defineProperty(x,T,F)}:function(x,j,N,T){T===void 0&&(T=N),x[T]=j[N]}),n=ql&&ql.__setModuleDefault||(Object.create?function(x,j){Object.defineProperty(x,"default",{enumerable:!0,value:j})}:function(x,j){x.default=j}),a=ql&&ql.__importStar||(r=function(x){return r=Object.getOwnPropertyNames||function(j){var N=[];for(var T in j)Object.prototype.hasOwnProperty.call(j,T)&&(N[N.length]=T);return N},r(x)},function(x){if(x&&x.__esModule)return x;var j={};if(x!=null)for(var N=r(x),T=0;T<N.length;T++)N[T]!=="default"&&t(j,x,N[T]);return n(j,x),j}),i=ql&&ql.__rest||function(x,j){var N={};for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&j.indexOf(T)<0&&(N[T]=x[T]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function"){var F=0;for(T=Object.getOwnPropertySymbols(x);F<T.length;F++)j.indexOf(T[F])<0&&Object.prototype.propertyIsEnumerable.call(x,T[F])&&(N[T[F]]=x[T[F]])}return N};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=function(x){var j=new DOMParser().parseFromString(x,"image/svg+xml");return j.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(j)},e.jsonToDOM=v,e.jsonToHTML=async function({json:x,elementHook:j}){const N=await v({json:x,elementHook:j});return E({dom:N})};const o=F1(),s=a(Cp()),c=F1(),u=Cm(),d=K8(),p=a_(),y=GC(),f=Ih(),_=(x,j,...N)=>({type:x,props:j,children:N||[]}),S=async({element:x,page:j,store:N})=>{let{src:T}=x;if(x.type==="svg"&&Object.keys(x.colorsReplace).length){const ne=await s.urlToString(T);T=s.replaceColors(ne,new Map(Object.entries(x.colorsReplace)))}let F="";x.flipX&&(F+="scaleX(-1)"),x.flipY&&(F+="scaleY(-1)"),F||(F="none");const C={};if(x.clipSrc){const ne=await s.urlToBase64(x.clipSrc);C["clip-path"]=`url(${ne})`}const A=await(0,c.loadImage)(T),L=A.width*x.cropWidth,O=A.height*x.cropHeight,I=x.width/x.height;let M,G;const W=L/O;x.type==="svg"?(M=L,G=O):I>=W?(M=L,G=L/I):(M=O*I,G=O);const Y=M/A.width,te=G/A.height,V=M/G>x.width/x.height?x.height/G:x.width/M,H=M*V/Y,q=G*V/te,D=x.cropX*V*A.width,$=x.cropY*V*A.height;return _("div",{style:Object.assign(Object.assign({},C),{width:"100%",height:"100%","border-radius":x.cornerRadius+"px",border:x.borderSize?`${x.borderSize}px solid ${x.borderColor}`:"none",backgroundRepeat:"no-repeat",background:`url(${T})`,transform:F,"background-size":`${Math.round(H)}px ${Math.round(q)}px`,"background-position-x":-Math.round(D)+"px","background-position-y":-Math.round($)+"px"})})},w=({element:x,type:j})=>{const N={"stroke-width":x.height,stroke:x.color,"line-cap":"round","stroke-linejoin":"round",opacity:x.opacity};return j==="arrow"||j==="triangle"?_("polyline",Object.assign({points:`${3*x.height},${2*-x.height} 0,0 ${3*x.height},${2*x.height}`},N)):j==="bar"?_("polyline",Object.assign({points:`0,${2*-x.height} 0,${2*x.height}`},N)):j==="circle"?_("circle",Object.assign({r:x.height},N)):j==="square"?_("polyline",Object.assign({points:`${-x.height},${-x.height} ${-x.height},${x.height} ${x.height},${x.height} ${x.height},${-x.height}`},N)):null},b={image:S,svg:S,text:async({element:x,page:j,store:N})=>{let T={top:0,left:0};x.fill.indexOf("gradient")>=0&&(T=Object.assign(Object.assign({},T),{"background-color":x.fill,"background-image":x.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const F=x.backgroundPadding*(x.fontSize*x.lineHeight),C=_("div",{style:{position:"absolute",top:-F/2+"px",left:-F/2+"px",display:x.backgroundEnabled?"block":"none",width:x.width+F+"px",height:x.height+F+"px","background-color":x.backgroundColor,"border-radius":x.backgroundCornerRadius*(x.fontSize*x.lineHeight*.5)+"px"}});x.verticalAlign==="middle"?(T.top="50%",T.transform="translateY(-50%)"):x.verticalAlign==="bottom"&&(T.bottom=0);const A=/<[a-z][\s\S]*>/i.test(x.text),L=Object.assign(Object.assign({},T),{position:"absolute",width:x.width+"px",color:x.fill,"white-space":"pre-wrap","font-size":x.fontSize+"px","text-align":x.align,"font-family":x.fontFamily,"text-decoration":x.textDecoration||"none","line-height":x.lineHeight,"letter-spacing":x.letterSpacing+"em","font-style":x.fontStyle,"font-weight":x.fontWeight,"-webkit-text-stroke":`${x.strokeWidth}px ${x.stroke}`,"text-stroke":`${x.strokeWidth}px ${x.stroke}`}),O="el-"+x.id,I=A?{id:O}:{},M=`<style>#${O} {${d.resetStyleContent}}</style>`,G=_("div",Object.assign(Object.assign({style:L},I),{innerHTML:A?`${M}${x.text}`:x.text.split(`
|
|
369
|
-
`).join("<br />")}));return _("div",{style:{position:"relative",width:"100%",height:"100%"}},C,G)},line:async({element:x,page:j,store:N})=>_("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},_("rect",{x:0,y:0,width:x.width,height:x.height,fill:x.color}),_("g",{transform:`translate(0 ${x.height/2})`},w({element:x,type:x.startHead})),_("g",{transform:`translate(${x.width} ${x.height/2}) rotate(180)`},w({element:x,type:x.endHead}))),figure:async({element:x,page:j,store:N,elementHook:T})=>{const F=(0,u.figureToSvg)(x),C=_("div",{innerHTML:F});return T&&T({dom:C,element:x})||C},group:async({element:x,page:j,store:N,elementHook:T})=>{const F=await Promise.all(x.children.map(A=>g({element:A,page:j,store:N,elementHook:T}))),C=_("div",{style:{"transform-origin":"top left",opacity:x.opacity}},...F);return T&&T({dom:C,element:x})||C},video:async({element:x,page:j,store:N,elementHook:T})=>{const{cropX:F,cropY:C,cropWidth:A,cropHeight:L}=x,O=await(0,y.getVideoSize)(x.src),I=O.width*A,M=O.height*L,G=x.width/x.height;let W,Y;G>=I/M?(W=I,Y=I/G):(W=M*G,Y=M);const te=W/A,V=Y/L,H=F*O.width,q=C*O.height,D=Math.max(x.width/O.width,x.height/O.height),$={position:"absolute",width:`${Math.round(te*D)}px`,height:`${Math.round(V*D)}px`,left:-Math.round(H*D)+"px",top:-Math.round(q*D)+"px","object-fit":"fill"},ne=`video-${x.id}`,Z=_("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden","border-radius":x.cornerRadius+"px",border:x.borderSize?`${x.borderSize}px solid ${x.borderColor}`:"none"}},_("video",{id:ne,src:x.src,style:$,controls:!0,playsInline:!0,muted:!0,volume:x.volume}));return T&&T({dom:Z,element:x})||Z},gif:S};async function g({element:x,page:j,store:N,elementHook:T}){let F=await b[x.type];if(F||(F=()=>_("div",{}),console.error(`HTML export does not support ${x.type} type...`)),!x.visible)return null;const C=await F({element:x,page:j,store:N}),A=[],L=[];if(x.blurEnabled&&A.push(`blur(${x.blurRadius/2}px)`),x.brightnessEnabled&&A.push(`brightness(${100*x.brightness+100}%)`),x.sepiaEnabled&&A.push("sepia()"),x.grayscaleEnabled&&A.push("grayscale()"),x.filters)for(const[I,M]of Object.entries(x.filters)){const G=(0,p.shapeFilterToCSS)(p.Effects[I],M.intensity);G&&(A.push(G.filter),G.html&&L.push(G.html))}x.shadowEnabled&&A.push(`drop-shadow(${x.shadowOffsetX}px ${x.shadowOffsetY}px ${x.shadowBlur}px ${x.shadowColor})`);const O=_("div",{id:x.id,style:{position:"absolute",left:x.x+"px",top:x.y+"px",width:x.width+"px",height:x.height+"px",transform:`rotate(${x.rotation}deg)`,"transform-origin":"top left",opacity:x.opacity,display:x.visible&&x.showInExport?"block":"none",filter:A.join(" ")||"none"}},C,...L);return T&&T({dom:O,element:x})||O}async function v({json:x,elementHook:j}){const N=await Promise.all(x.pages.map(C=>async function({page:A,store:L,elementHook:O}){const I=await Promise.all(A.children.map(Y=>g({element:Y,page:A,store:L,elementHook:O}))),M=A.width==="auto"?L.width:A.width,G=A.height==="auto"?L.height:A.height;let W={};if(A.background.indexOf("url")>=0||A.background.indexOf("http")>=0||A.background.indexOf(".jpg")>=0||A.background.indexOf(".png")>=0||A.background.indexOf(".jpeg")>=0){const{width:Y,height:te}=await(0,c.loadImage)(A.background),V=await S({element:Object.assign({x:0,y:0,width:Y,height:te,src:A.background,cornerRadius:0},(0,o.getCrop)({width:Y,height:te},{width:Y,height:te})),page:A,store:L});I.unshift(V)}else W=Object.assign(Object.assign({},W),{"background-color":A.background});return _("div",{className:"page",id:A.id,style:Object.assign(Object.assign({},W),{width:M+"px",height:G+"px",overflow:"hidden",position:"relative"})},...I)}({page:C,store:x,elementHook:j}))),T=[];x.pages.forEach(C=>{C.children.forEach(A=>{A.type==="text"&&T.indexOf(A.fontFamily)===-1&&T.push(A.fontFamily)})});const F=T.map(C=>x.fonts.find(A=>A.fontFamily===C)?_("style",{},""):_("link",{href:(0,f.getGoogleFontsUrl)(C),rel:"stylesheet"}));return _("div",{className:"design"},...F,...N)}const E=({dom:x})=>{if(typeof x=="string")return x;if(!x)return"";const j=x.props,{innerHTML:N}=j,T=i(j,["innerHTML"]);return`<${x.type} ${Object.keys(T).map(F=>((C,A)=>typeof A=="object"?`${C}="${Object.keys(A).map(L=>`${L}:${A[L]};`).join(" ")}"`:`${C}="${A}"`)(F,x.props[F])).join(" ")}>${N||x.children.map(F=>E({dom:F})).join("")}</${x.type}>`}}(ql)),ql}var zl={},y4;function $C(){return y4||(y4=1,function(e){var r,t=zl&&zl.__createBinding||(Object.create?function(v,E,x,j){j===void 0&&(j=x);var N=Object.getOwnPropertyDescriptor(E,x);N&&!("get"in N?!E.__esModule:N.writable||N.configurable)||(N={enumerable:!0,get:function(){return E[x]}}),Object.defineProperty(v,j,N)}:function(v,E,x,j){j===void 0&&(j=x),v[j]=E[x]}),n=zl&&zl.__setModuleDefault||(Object.create?function(v,E){Object.defineProperty(v,"default",{enumerable:!0,value:E})}:function(v,E){v.default=E}),a=zl&&zl.__importStar||(r=function(v){return r=Object.getOwnPropertyNames||function(E){var x=[];for(var j in E)Object.prototype.hasOwnProperty.call(E,j)&&(x[x.length]=j);return x},r(v)},function(v){if(v&&v.__esModule)return v;var E={};if(v!=null)for(var x=r(v),j=0;j<x.length;j++)x[j]!=="default"&&t(E,v,x[j]);return n(E,v),E}),i=zl&&zl.__rest||function(v,E){var x={};for(var j in v)Object.prototype.hasOwnProperty.call(v,j)&&E.indexOf(j)<0&&(x[j]=v[j]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var N=0;for(j=Object.getOwnPropertySymbols(v);N<j.length;N++)E.indexOf(j[N])<0&&Object.prototype.propertyIsEnumerable.call(v,j[N])&&(x[j[N]]=v[j[N]])}return x};Object.defineProperty(e,"__esModule",{value:!0}),e.forEveryChild=void 0,e.fixRatio=function(v){var E=new DOMParser().parseFromString(v,"image/svg+xml");return E.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(E)},e.jsonToDOM=b,e.jsonToSVG=async function({json:v,elementHook:E}){const x=await b({json:v,elementHook:E});return g({dom:x})};const o=F1(),s=a(Cp()),c=F1(),u=Cm(),d=a_();e.forEveryChild=(v,E)=>{if(v.children)for(const x of v.children){if(E(x)===!0)break;(0,e.forEveryChild)(x,E)}};const p=(v,E,...x)=>({type:v,props:E,children:x||[]}),y=async({element:v,page:E,store:x})=>{let{src:j}=v;if(v.type==="svg"){const $=await s.urlToString(j);j=s.replaceColors($,new Map(Object.entries(v.colorsReplace)))}else j=await(async $=>{try{const ne=await fetch($);if(typeof Buffer<"u"){const Z=await ne.arrayBuffer(),Q=Buffer.from(Z).toString("base64");return`data:${ne.headers.get("content-type")||"image/png"};base64,${Q}`}{const Z=await ne.blob();return new Promise((Q,oe)=>{const se=new FileReader;se.onloadend=()=>Q(se.result),se.onerror=oe,se.readAsDataURL(Z)})}}catch(ne){return console.error("Error converting URL to data URL:",ne),$}})(j);let N="";v.flipX&&(N+="scaleX(-1)"),v.flipY&&(N+="scaleY(-1)"),v.clipSrc&&await s.urlToBase64(v.clipSrc);const T=await(0,c.loadImage)(j),F=T.width*v.cropWidth,C=T.height*v.cropHeight,A=v.width/v.height;let L,O;const I=F/C;v.type==="svg"?(L=F,O=C):A>=I?(L=F,O=F/A):(L=C*A,O=C);const M=L/T.width,G=O/T.height,W=L/O>v.width/v.height?v.height/O:v.width/L,Y=L*W/M,te=O*W/G,V=v.cropX*T.width*W,H=v.cropY*T.height*W,q=`clip-${v.id}`,D=j.replace(/&/g,"&");return p("g",{style:{transform:N}},p("defs",{},p("clipPath",{id:q},p("rect",{x:0,y:0,width:v.width,height:v.height}))),p("image",{href:D,x:-V,y:-H,width:Y,height:te,preserveAspectRatio:"none","clip-path":`url(#${q})`}))},f=({element:v,type:E})=>{const x={"stroke-width":v.height,stroke:v.color,"line-cap":"round","stroke-linejoin":"round",opacity:v.opacity};return E==="arrow"||E==="triangle"?p("polyline",Object.assign({points:`${3*v.height},${2*-v.height} 0,0 ${3*v.height},${2*v.height}`},x)):E==="bar"?p("polyline",Object.assign({points:`0,${2*-v.height} 0,${2*v.height}`},x)):E==="circle"?p("circle",Object.assign({r:v.height},x)):E==="square"?p("polyline",Object.assign({points:`${-v.height},${-v.height} ${-v.height},${v.height} ${v.height},${v.height} ${v.height},${-v.height}`},x)):null},_={image:y,svg:y,text:async({element:v,page:E,store:x})=>{const j=(A,L,O,I,M)=>{const G=document.createElement("canvas").getContext("2d");return G.font=`${M} ${I} ${L}px ${O}`,G.measureText(A).width},N=((A,L,O,I,M,G)=>{const W=[];return A.split(`
|
|
370
|
-
`).forEach(Y=>{const te=Y.split(" ");let V="";for(let H=0;H<te.length;H++){const q=V+te[H]+" ";j(q,O,I,M,G)>L+.5&&H>0?(W.push(V.trim()),V=te[H]+" "):V=q}W.push(V.trim())}),W})(v.text,v.width,v.fontSize,v.fontFamily,v.fontWeight,v.fontStyle),T=v.fontSize*v.lineHeight,F=v.align==="center"?"middle":v.align==="right"?"end":"start",C=N.map((A,L)=>p("tspan",{x:v.align==="center"?v.width/2:v.align==="right"?v.width:0,dy:L===0?0:T,innerHTML:A}));return p("g",{},p("text",{fill:v.fill,y:v.fontSize,"font-size":v.fontSize+"px","text-anchor":F,"font-family":v.fontFamily,"font-style":v.fontStyle,"font-weight":v.fontWeight,"text-decoration":v.textDecoration,"line-height":v.lineHeight,"letter-spacing":v.letterSpacing+"em","stroke-width":v.strokeWidth,stroke:v.stroke},...C))},line:async({element:v,page:E,store:x})=>p("g",{},p("line",{x1:0,y1:v.height/2,x2:v.width,y2:v.height/2,stroke:v.color,"stroke-width":v.height}),p("g",{transform:`translate(0 ${v.height/2})`},f({element:v,type:v.startHead})),p("g",{transform:`translate(${v.width} ${v.height/2}) rotate(180)`},f({element:v,type:v.endHead}))),figure:async({element:v,page:E,store:x,elementHook:j})=>{const N=function(F){let C=F.replace(/<svg[^>]*>/,"");return C=C.replace(/<\/svg>/,""),C}((0,u.figureToSvg)(v)),T=p("g",{innerHTML:N});return j&&j({dom:T,element:v})||T},group:async({element:v,page:E,store:x,elementHook:j})=>{const N=await Promise.all(v.children.map(F=>S({element:F,page:E,store:x,elementHook:j}))),T=p("g",{opacity:v.opacity,style:{"transform-origin":"top left"}},...N);return j&&j({dom:T,element:v})||T},gif:y};async function S({element:v,page:E,store:x,elementHook:j}){let N=await _[v.type];N||(N=()=>p("g",{}),console.error(`SVG export does not support ${v.type} type...`));const T=await N({element:v,page:E,store:x}),F=[],C=[];if(v.blurEnabled&&F.push(`blur(${v.blurRadius/2}px)`),v.brightnessEnabled&&F.push(`brightness(${100*v.brightness+100}%)`),v.sepiaEnabled&&F.push("sepia()"),v.grayscaleEnabled&&F.push("grayscale()"),v.shadowEnabled&&F.push(`drop-shadow(${v.shadowOffsetX}px ${v.shadowOffsetY}px ${v.shadowBlur}px ${v.shadowColor})`),v.filters)for(const[L,O]of Object.entries(v.filters)){const I=(0,d.shapeFilterToCSS)(d.Effects[L],O.intensity);if(I&&(F.push(I.filter),I.html)){const M=I.html.replace(/<svg([^>]*)>/,"<g$1>").replace(/<\/svg>/,"</g>");C.push(M)}}const A=p("g",{className:"element",id:v.id,transform:v.type!=="group"?`translate(${v.x}, ${v.y}) rotate(${v.rotation})`:void 0,display:v.visible?void 0:"none",style:{"transform-origin":"top left",filter:F.join(" ")}},T,...C);return j&&j({dom:A,element:v})||A}async function w(v){try{const E=await fetch(v),x=await E.blob();return new Promise((j,N)=>{const T=new FileReader;T.onloadend=()=>j(T.result),T.onerror=N,T.readAsDataURL(x)})}catch(E){return console.error("Error embedding font:",E),v}}async function b({json:v,elementHook:E}){const x=await Promise.all(v.pages.map(T=>async function({page:F,store:C,elementHook:A}){const L=await Promise.all(F.children.map(M=>S({element:M,page:F,store:C,elementHook:A}))),O=F.background.indexOf("url")>=0||F.background.indexOf("http")>=0||F.background.indexOf(".jpg")>=0||F.background.indexOf(".png")>=0||F.background.indexOf(".jpeg")>=0;let I;if(O){const M=await(0,c.loadImage)(F.background);I=await(0,c.cropImage)(F.background,Object.assign({width:C.width,height:C.height,x:0,y:0},(0,o.getCrop)({width:C.width,height:C.height},{width:M.width,height:M.height})))}return p("g",{className:"page",style:{}},O?p("image",{"xlink:href":I,x:0,y:0,width:C.width,height:C.height,preserveAspectRatio:"none"}):p("rect",{x:0,y:0,width:C.width,height:C.height,fill:O?void 0:F.background}),...L)}({page:T,store:v,elementHook:E}))),j=[];(0,e.forEveryChild)({children:v.pages},T=>{T.type==="text"&&j.indexOf(T.fontFamily)===-1&&j.push(T.fontFamily)});const N=await async function(T,F){return await Promise.all(T.map(async C=>{var A,L;const O=F.find(I=>I.fontFamily===C);if(O){const I=await w(O.url);return p("style",{},`@font-face { font-family: ${C}; src: url(${I}); }`)}{const I=`https://fonts.googleapis.com/css?family=${C}:bi,normal,i,b`;try{const M=await fetch(I),G=await M.text(),W=(L=(A=G.match(/url\((.*?)\)/g))===null||A===void 0?void 0:A.map(te=>te.replace(/url\((.*?)\)/,"$1")))===null||L===void 0?void 0:L.filter(te=>te.startsWith("https"));if(!(W!=null&&W.length))throw new Error("No font URLs found");const Y=await Promise.all(W.map(async te=>{const V=await w(te),H=G.match(/font-style:\s*(.*?);/),q=G.match(/font-weight:\s*(.*?);/),D=H?H[1]:"normal",$=q?q[1]:"normal";return`@font-face {
|
|
371
|
-
font-family: ${C};
|
|
372
|
-
font-style: ${D};
|
|
373
|
-
font-weight: ${$};
|
|
374
|
-
src: url(${V});
|
|
375
|
-
}`}));return p("style",{},Y.join(`
|
|
376
|
-
`))}catch(M){return console.error("Error embedding Google Font:",M),p("defs",{},p("style",{type:"text/css",innerHTML:`@import url('${I}');`.replace(/&/g,"&")}))}}}))}(j,v.fonts);return p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${v.width} ${v.height}`,width:v.width,height:v.height},...N,...x)}const g=({dom:v,nestLevel:E=0})=>{if(typeof v=="string")return v;if(!v)return"";const x=v.props,{innerHTML:j}=x,N=i(x,["innerHTML"]),T=" ".repeat(E);return`${T}<${v.type} ${Object.keys(N).map(F=>((C,A)=>typeof A=="object"?`${C}="${Object.keys(A).map(L=>`${L}:${A[L]};`).join(" ")}"`:A==null||A===""?"":`${C}="${A}"`)(F,N[F])).join(" ")}>${j||`
|
|
377
|
-
`+v.children.map(F=>g({dom:F,nestLevel:E+1})).join("")}${T}</${v.type}>
|
|
378
|
-
`}}(zl)),zl}var Bv={},b4;function o_(){return b4||(b4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const r=hl,t=l0,n=Nh(),a=Nm(),i=Nh(),o=Dh();e.Page=r.types.model("Page",{id:r.types.identifier,children:r.types.array(r.types.late(()=>n.ElementTypes)),width:r.types.optional(r.types.union(r.types.number,r.types.literal("auto")),"auto"),height:r.types.optional(r.types.union(r.types.number,r.types.literal("auto")),"auto"),background:"white",bleed:0,custom:r.types.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(s=>{const c=Object.assign({},s),u={};for(var d in c)d[0]!=="_"&&(u[d]=s[d]);return u}).views(s=>({get store(){return(0,r.getParentOfType)(s,a.Store)}})).views(s=>({get startTime(){let c=0;for(const u of s.store.pages){if(u.id===s.id)return c;c+=u.duration}return c},get _exportingOrRendering(){return s._exporting||s._rendering}})).views(s=>({get computedWidth(){return s.width==="auto"?s.store.width:s.width},get computedHeight(){return s.height==="auto"?s.store.height:s.height}})).actions(s=>({toJSON:()=>JSON.parse(JSON.stringify((0,r.getSnapshot)(s))),_forEachElementUp(c,u){const d=c.map(p=>({id:p,index:s.children.findIndex(y=>y.id===p)}));d.sort((p,y)=>y.index-p.index);for(const{index:p}of d){if(p==-1)continue;const y=p<s.children.length-1&&s.children[p+1],f=c.indexOf(y==null?void 0:y.id)>=0;p===s.children.length-1||f||u(p)}},_forEachElementDown(c,u){const d=c.map(p=>({id:p,index:s.children.findIndex(y=>y.id===p)}));d.sort((p,y)=>p.index-y.index);for(const{index:p}of d){if(p==-1)continue;const y=p>0&&s.children[p-1],f=c.indexOf(y==null?void 0:y.id)>=0;p===0||f||u(p)}return!1}})).actions(s=>({clone(c={}){const u=s.toJSON();u.children.forEach(f=>{f.id=(0,t.nanoid)(10),(0,i.forEveryChild)(f,_=>{_.id=(0,t.nanoid)(10)})});const d=Object.assign(Object.assign(Object.assign({},u),{id:(0,t.nanoid)(10)}),c),p=s.store.addPage(d),y=s.store.pages.indexOf(s);return p.setZIndex(y+1),p.select(),p},setZIndex(c){s.store.setPageZIndex(s.id,c)},set(c){Object.assign(s,c)},select(){s.store.selectPage(s.id)},addElement(c,{skipSelect:u=!1}={}){const d=i.TYPES_MAP[c.type];if(!d)return void console.error("Can not find model with type "+c.type);"children"in c&&Array.isArray(c.children)&&(0,i.forEveryChild)(c,y=>{y.id=y.id||(0,t.nanoid)(10)});const p=d.create(Object.assign({id:(0,t.nanoid)(10)},c));return s.children.push(p),p.selectable&&!u&&s.store.selectElements([p.id]),p},canMoveElementsUp(c){let u=!1;return s._forEachElementUp(c,()=>{u=u||!0}),u},moveElementsUp(c){s._forEachElementUp(c,u=>{const d=s.children[u];(0,r.detach)(d),s.children.splice(u+1,0,d)})},canMoveElementsTop(c){return this.canMoveElementsUp(c)},moveElementsTop(c){const u=[],d=[];s.children.forEach(p=>{c.indexOf(p.id)>=0?u.push(p):d.push(p)}),s.children.replace(d.concat(u))},canMoveElementsDown(c){let u=!1;return s._forEachElementDown(c,()=>{u=u||!0}),u},moveElementsDown(c){s._forEachElementDown(c,u=>{const d=s.children[u];(0,r.detach)(d),s.children.splice(u-1,0,d)})},canMoveElementsBottom(c){return this.canMoveElementsDown(c)},moveElementsBottom(c){const u=[],d=[];s.children.forEach(p=>{c.indexOf(p.id)>=0?u.push(p):d.push(p)}),s.children.replace(u.concat(d))},setElementZIndex(c,u){const d=s.children.find(p=>p.id===c);d&&((0,r.detach)(d),s.children.remove(d),s.children.splice(u,0,d))},setSize({width:c,height:u,useMagic:d,softChange:p}){if(d){const y=[],f=O=>O.type==="image"&&O.x<1&&O.y<1&&O.width>=s.computedWidth-2&&O.height>=s.computedHeight-2;(0,i.forEveryChild)(s,O=>{O.type!=="group"&&(f(O)||y.push(O))});const _=y.length?(0,o.getTotalClientRect)(y):{x:0,y:0,width:s.computedWidth,height:s.computedHeight},S=1/4,w=Math.max(0,Math.min(_.x,s.computedWidth-_.x-_.width)),b=s.computedWidth*S,g=Math.max(0,w-b),v=Math.max(0,Math.min(_.y,s.computedHeight-_.y-_.height)),E=s.computedHeight*S,x=Math.max(0,v-E),j=s.computedWidth-2*g,N=s.computedHeight-2*x,T=c/j,F=u/N,C=Math.min(T,F),A=(c-j*C)/2-g*C,L=(u-N*C)/2-x*C;(0,i.forEveryChild)(s,O=>{O.type!=="group"&&(f(O)?O.set({x:O.x*C,y:O.y*C,width:O.width*T,height:O.height*F,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(O.set({x:A+O.x*C,y:L+O.y*C,width:O.width*C,height:O.height*C}),O.type==="text"?O.set({fontSize:O.fontSize*C}):O.type==="figure"&&O.set({strokeWidth:O.strokeWidth*C})))})}p||(s.width=c),p||(s.height=u)}})).actions(s=>({moveElementUp(c){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),s.moveElementsUp([c])},moveElementDown(c){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),s.moveElementsDown([c])},moveElementTop(c){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),s.moveElementsTop([c])},moveElementBottom(c){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),s.moveElementsBottom([c])},play(){s.store.play({startTime:s.startTime,endTime:s.startTime+s.duration})}}))}(Bv)),Bv}var qv={},w4;function YC(){return w4||(w4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;const r=hl;e.Audio=r.types.model("Audio",{id:r.types.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(t=>({toJSON:()=>Object.assign({},(0,r.getSnapshot)(t))})).actions(t=>({set(n){Object.assign(t,n)}}))}(qv)),qv}var _4;function Nm(){return _4||(_4=1,function(e){var r,t=Ms&&Ms.__createBinding||(Object.create?function(A,L,O,I){I===void 0&&(I=O);var M=Object.getOwnPropertyDescriptor(L,O);M&&!("get"in M?!L.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return L[O]}}),Object.defineProperty(A,I,M)}:function(A,L,O,I){I===void 0&&(I=O),A[I]=L[O]}),n=Ms&&Ms.__setModuleDefault||(Object.create?function(A,L){Object.defineProperty(A,"default",{enumerable:!0,value:L})}:function(A,L){A.default=L}),a=Ms&&Ms.__importStar||(r=function(A){return r=Object.getOwnPropertyNames||function(L){var O=[];for(var I in L)Object.prototype.hasOwnProperty.call(L,I)&&(O[O.length]=I);return O},r(A)},function(A){if(A&&A.__esModule)return A;var L={};if(A!=null)for(var O=r(A),I=0;I<O.length;I++)O[I]!=="default"&&t(L,A,O[I]);return n(L,A),L}),i=Ms&&Ms.__rest||function(A,L){var O={};for(var I in A)Object.prototype.hasOwnProperty.call(A,I)&&L.indexOf(I)<0&&(O[I]=A[I]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function"){var M=0;for(I=Object.getOwnPropertySymbols(A);M<I.length;M++)L.indexOf(I[M])<0&&Object.prototype.propertyIsEnumerable.call(A,I[M])&&(O[I[M]]=A[I[M]])}return O},o=Ms&&Ms.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=C;const s=hl,c=BC(),u=l0,d=o(Hs()),p=qC(),y=zC(),f=UC(),_=km(),S=a(Ih()),w=gc(),b=jf(),g=Lm(),v=i_(),E=VC(),x=WC(),j=$C(),N=o_(),T=Nh(),F=YC();function C({key:A,showCredit:L}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:L,_key:A})}(0,s.setLivelinessChecking)("ignore"),e.Font=s.types.model("Font",{fontFamily:s.types.string,url:s.types.optional(s.types.string,""),styles:s.types.frozen()}).preProcessSnapshot(A=>Object.assign(Object.assign({},A),{fontFamily:A.fontFamily||A.name})),e.Store=s.types.model("Store",{role:"",pages:s.types.array(N.Page),fonts:s.types.array(e.Font),audios:s.types.array(F.Audio),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,schemaVersion:1,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:s.types.frozen(),selectedElementsIds:s.types.array(s.types.string),animatedElementsIds:s.types.array(s.types.string),history:s.types.optional(c.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(A=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),A.bleedVisible},get selectedElements(){return A.selectedElementsIds.map(L=>{for(const O of A.pages)for(const I of O.children)if(I.id===L)return I}).filter(L=>!!L)},get children(){return A.pages},get selectedShapes(){const L=[];return(0,T.forEveryChild)({children:A.selectedElements},O=>{O.type!=="group"&&L.push(O)}),L},get activePage(){return A.pages.slice().find(L=>L.id===A._activePageId)||(A.pages.length?A.pages[0]:null)},get duration(){let L=0;return A.pages.forEach(O=>{L+=O.duration}),L},get _hasCroppedImages(){return A.find(L=>L.type==="image"&&L._cropModeEnabled)},find(L){let O;return(0,T.forEveryChild)({children:A.pages},I=>{if(!O&&L(I))return O=I,!0}),O},getElementById:L=>A.find(O=>O.id===L)})).actions(A=>{let L=0,O=null,I=!1;return{afterCreate(){A.history.canUndo},setCurrentTime(M){A.currentTime=M},_togglePlaying(M=!A.isPlaying){A.isPlaying=M},play({animatedElementsIds:M=[],startTime:G=0,currentTime:W=0,endTime:Y=A.duration,repeat:te=!1}={}){W&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),G=W),A.animatedElementsIds=(0,s.cast)(M),A.currentTime=G,A.isPlaying=!0,L=Date.now(),O=Y,I=te,requestAnimationFrame(A.seek)},checkActivePage(){let M=0;for(const G of A.pages){if(A.currentTime>=G.startTime&&A.currentTime<G.startTime+G.duration){A.selectPage(G.id);break}M+=G.duration}},seek(){if(!A.isPlaying)return;const M=Date.now(),G=M-L;L=M,A.currentTime+=G,A.checkActivePage();const W=O||A.duration;A.isPlaying&&A.currentTime<W?requestAnimationFrame(A.seek):A.isPlaying&&I?(A.currentTime=0,requestAnimationFrame(A.seek)):A.stop()},stop(){A.isPlaying=!1,A.currentTime=0,A.animatedElementsIds=(0,s.cast)([]),A.checkActivePage()}}}).actions(A=>({__(){A._validated||((0,_.validateKey)(A._key,A._forceShowCredit),A._validated=!0)},set(L){Object.assign(A,L)},setUnit({unit:L,dpi:O}){A.unit=L||A.unit,A.dpi=O||A.dpi},setRole(L){A.role=L},addPage(L){const O=N.Page.create(Object.assign({id:(0,u.nanoid)(10)},L));return A.pages.push(O),A._activePageId=O.id,O},selectPage(L){A._activePageId=L},selectElements(L){const O=L.map(I=>A.getElementById(I)).sort((I,M)=>I.page.children.indexOf(I)-I.page.children.indexOf(M)).filter(I=>!!I).map(I=>I.id);A.selectedElementsIds=(0,s.cast)(O)},toggleBleed(L){A.bleedVisible=L??!A.bleedVisible},toggleRulers(L){A.rulesVisible=L??!A.rulesVisible},openSidePanel(L){A.openedSidePanel!==L&&(A.previousOpenedSidePanel=A.openedSidePanel,A.openedSidePanel=L)},setScale(L){A.scale=L},_setScaleToFit(L){A.scaleToFit=L},setElementsPixelRatio(L){A._elementsPixelRatio=L},setSize(L,O,I){A.pages.forEach(M=>{M.setSize({width:L,height:O,useMagic:I,softChange:!0})}),A.width=L,A.height=O},setPageZIndex(L,O){const I=A.pages.find(M=>M.id===L);I&&((0,s.detach)(I),A.pages.remove(I),A.pages.splice(O,0,I))},deletePages(L){const O=A.pages.indexOf(A.activePage);L.forEach(G=>{const W=A.pages.find(Y=>Y.id===G);(0,s.destroy)(W)});const I=Math.min(A.pages.length-1,O),M=A.pages[I];M&&(A._activePageId=M.id),A.selectedElementsIds=(0,s.cast)(A.selectedElementsIds.filter(G=>A.getElementById(G)))},groupElements(L,O={}){const I=L.map(W=>A.getElementById(W)),M=I[0].page;if(I.forEach(W=>{W&&(0,s.detach)(W)}),!I.length)return;const G=Object.assign({id:(0,u.nanoid)(10),children:I,type:"group"},O);return M.children.push(G),A.selectedElementsIds=(0,s.cast)([G.id]),M.children.find(W=>W.id===G.id)},ungroupElements(L){const O=L.map(M=>A.getElementById(M)),I=[];O.forEach(M=>{if(M&&M.type==="group"){const G=M.page,W=G.children.indexOf(M);M.children.forEach(Y=>{I.push(Y.id)}),M.children.forEach(Y=>{(0,s.detach)(Y),G.children.push(Y)}),G.children.splice(W,1)}}),A.selectedElementsIds=(0,s.cast)(I)},deleteElements(L){const O=[];A.find(I=>(L.includes(I.id)&&O.push(I),!1)),O.forEach(I=>{(0,s.destroy)(I)}),A.selectedElementsIds=(0,s.cast)(A.selectedElementsIds.filter(I=>A.getElementById(I)))},on(L,O){if(L==="change"){let I=A.toJSON();return(0,s.onSnapshot)(A,M=>{const G=A.toJSON();!(0,v.deepEqual)(I,G)&&(I=G,O(G))})}},async _toCanvas({pixelRatio:L,ignoreBackground:O,pageId:I,mimeType:M,includeBleed:G,_skipTimeout:W,quickMode:Y=!1}={}){var te;const V=L||1;I=I||((te=A.pages[0])===null||te===void 0?void 0:te.id);const H=A.pages.find(me=>me.id===I);if(!H)throw new Error(`No page for export with id ${I}`);const q=A._elementsPixelRatio;V>A._elementsPixelRatio&&A.setElementsPixelRatio(V),Y?H==null||H.set({_forceMount:!0}):H==null||H.set({_exporting:!0});const D=await(0,E.waitTillAvailable)(()=>d.default.stages.find(me=>me.getAttr("pageId")===I));if(!D)throw H==null||H.set({_forceMount:!1,_exporting:!1}),A.setElementsPixelRatio(q),new Error(`Export is failed. Can not find stage for page ${I}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);await A.waitLoading({_skipTimeout:W});const $=D.findOne(".page-container");if(!$)throw A.setElementsPixelRatio(q),H==null||H.set({_forceMount:!1,_exporting:!1}),new Error("Export is failed. Canvas was unmounted.");const ne=D.position();D.position({x:0,y:0}),D.find("Transformer").forEach(me=>{me.setAttr("oldVisible",me.visible()),me.visible(!1)}),$.find(".page-background").forEach(me=>me.shadowEnabled(!1)),$.find(".page-background").forEach(me=>me.strokeEnabled(!1)),$.find(".highlighter").forEach(me=>me.visible(!1));const Z=$.findOne(".page-background-group"),Q=Z.clip();Z.clip({x:null,y:null,width:null,height:null});const oe=$.findOne(".elements-container"),se=oe.clip();oe.clip({x:null,y:null,width:null,height:null});const ue=$.find(me=>me.getAttr("hideInExport"));ue.forEach(me=>{me.setAttr("oldVisible",me.visible()),me.hide()});const ve=$.find(me=>!me.visible()&&me.getAttr("editModeEnabled"));ve.forEach(me=>{me.setAttr("oldVisible",me.visible()),me.show()}),O&&$.find(".page-background").forEach(me=>me.hide());const Pe=G?H.bleed:0;let ke=Pe;!A.bleedVisible&&G||(A.bleedVisible||G?A.bleedVisible&&G?ke=0:A.bleedVisible&&!G&&(ke=-H.bleed):ke=0);const Ne=document.createElement("canvas");Ne.width=Math.round((H.computedWidth+2*Pe)*V),Ne.height=Math.round((H.computedHeight+2*Pe)*V);const xe=Ne.getContext("2d");M==="image/jpeg"&&(xe.fillStyle="white",xe.fillRect(0,0,Ne.width,Ne.height));const ye=$.scale();$.scale({x:1,y:1});const Ie=$.toCanvas({x:$.x()-ke,y:$.y()-ke,width:H.computedWidth+2*Pe,height:H.computedHeight+2*Pe,pixelRatio:V});return $.scale(ye),xe.drawImage(Ie,0,0,Ne.width,Ne.height),d.default.Util.releaseCanvas(Ie),O&&$.find(".page-background").forEach(me=>me.show()),ue.forEach(me=>{me.visible(me.getAttr("oldVisible"))}),ve.forEach(me=>{me.visible(me.getAttr("oldVisible"))}),$.find(".page-background").forEach(me=>me.shadowEnabled(!0)),$.find(".page-background").forEach(me=>me.strokeEnabled(!0)),D.find("Transformer").forEach(me=>{me.visible(me.getAttr("oldVisible"))}),$.find(".highlighter").forEach(me=>me.visible(!0)),Z.clip(Q),oe.clip(se),D.position(ne),H==null||H.set({_exporting:!1,_forceMount:!1}),await new Promise(me=>setTimeout(me)),A.setElementsPixelRatio(q),Ne},async toDataURL(L={}){var{mimeType:O,quality:I}=L,M=i(L,["mimeType","quality"]);const G=await A._toCanvas(Object.assign({mimeType:O},M)),W=G.toDataURL(O,I);return d.default.Util.releaseCanvas(G),W},async toBlob(L={}){var{mimeType:O,quality:I}=L,M=i(L,["mimeType","quality"]);const G=await A._toCanvas(Object.assign({mimeType:O},M)),W=await new Promise(Y=>{G.toBlob(Y,O,I)});return d.default.Util.releaseCanvas(G),W},async saveAsImage(L={}){var{fileName:O}=L,I=i(L,["fileName"]);const M=I.mimeType||"image/png",G=M.split("/")[1];(0,p.downloadFile)(await A.toDataURL(I),O||"polotno."+G,M)},async _toPDF(L){const O=L.dpi||A.dpi,I=L.parallel||1,M=L.unit||(A.unit==="px"?"mm":A.unit),G=L.pixelRatio||1,W=L.pageIds||A.pages.map(ue=>ue.id),Y=A.pages.filter(ue=>W.includes(ue.id)),te=await(0,y.getJsPDF)(),V=ue=>(0,g.pxToUnit)({px:ue,unit:M,dpi:O}),H=L.cropMarkSize||0,q=V(H),D=Y[0]||{},$=L.includeBleed?D.bleed:0,ne=V(D.computedWidth+2*$+2*q),Z=V(D.computedHeight+2*$+2*q);var Q=new te({unit:M,orientation:ne>Z?"landscape":"portrait",format:[ne,Z],compress:!0,putOnlyUsedFonts:!0});Q.deletePage(1);const oe=((ue,ve)=>{for(var Pe=[],ke=0;ke<ue.length;ke+=ve)Pe.push(ue.slice(ke,ke+ve));return Pe})(Y,I);let se=0;for(const ue of oe){const ve=ue.map(async Pe=>{const ke=L.includeBleed?Pe.bleed:0,Ne=Pe.computedWidth+2*ke+2*H,xe=Pe.computedHeight+2*ke+2*H,ye=V(Ne),Ie=V(xe);let me=0,_e=G;for(;me<10;){me+=1,me===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const Ae=await A.toDataURL(Object.assign(Object.assign({},L),{pageId:Pe.id,pixelRatio:_e}));if(Ae.length>20)return L.onProgress&&L.onProgress(++se/W.length*.9),{url:Ae,width:ye,height:Ie,widthPx:Ne,heightPx:xe};_e*=.8}});(await Promise.all(ve)).forEach(({url:Pe,width:ke,height:Ne,widthPx:xe,heightPx:ye})=>{Q.addPage([ke,Ne],ke>Ne?"landscape":"portrait");const Ie=Q.getCurrentPageInfo();var me;switch(M){case"pt":me=1;break;case"mm":me=72/25.4;break;case"cm":me=72/2.54;break;case"in":me=72;break;case"px":me=.75;break;case"pc":case"em":me=12;break;case"ex":me=6;break;default:throw"Invalid unit: "+M}if(Ie.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:ke*me,topRightY:Ne*me},Ie.pageContext.artBox={bottomLeftX:V(H+$)*me,bottomLeftY:V(H+$)*me,topRightX:V(xe-H-$)*me,topRightY:V(ye-H-$)*me},Ie.pageContext.bleedBox={bottomLeftX:V(H+$)*me,bottomLeftY:V(H+$)*me,topRightX:V(xe-H-$)*me,topRightY:V(ye-H-$)*me},q){Q.setLineWidth(V(1));const _e=q+V($);Q.line(_e,0,_e,q),Q.line(0,_e,q,_e),Q.line(ke-_e,0,ke-_e,q),Q.line(ke,_e,ke-q,_e),Q.line(0,Ne-_e,q,Ne-_e),Q.line(_e,Ne,_e,Ne-q),Q.line(ke,Ne-_e,ke-q,Ne-_e),Q.line(ke-_e,Ne,ke-_e,Ne-q)}Q.addImage(Pe,q,q,ke-2*q,Ne-2*q,void 0,"FAST")})}return Q},toPDFDataURL:async L=>(await A._toPDF(Object.assign({mimeType:"image/jpeg"},L))).output("datauristring"),async toGIFDataURL(L={}){const O=L.pixelRatio||1,I=await(0,f.createGIF)({width:A.width*O,height:A.height*O}),M=1e3/(L.fps||10),G=A.duration/M;for(let W=0;W<G-1;W++){const Y=W*M||1;A.setCurrentTime(Y);let te=0,V="";for(const q of A.pages)if(te+=q.duration,q.set({_rendering:te>Y}),te>Y){V=q.id;break}const H=await A._toCanvas({pixelRatio:O,pageId:V,_skipTimeout:!0});I.addFrame(H.getContext("2d"),{delay:M,copy:!0})}for(const W of A.pages)W.set({_rendering:!1});return A.stop(),I.render(),new Promise(W=>{I.on("finished",function(Y){(function(te,V){var H=new FileReader;H.onload=function(q){V(q.target.result)},H.readAsDataURL(te)})(Y,W)})})},async saveAsGIF(L={}){var{fileName:O}=L,I=i(L,["fileName"]);const M=await A.toGIFDataURL(I);(0,p.downloadFile)(M,O||"polotno.gif")},async toHTML({elementHook:L}={elementHook:void 0}){const O=A.toJSON();return(0,x.jsonToHTML)({json:O,elementHook:L})},async saveAsHTML({fileName:L}={}){const O=await A.toHTML(),I="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(O)));(0,p.downloadFile)(I,L||"polotno.html")},async toSVG({elementHook:L,pageId:O}={elementHook:void 0,pageId:void 0}){var I;const M=A.toJSON();O=O||((I=M.pages[0])===null||I===void 0?void 0:I.id);const G=M.pages.find(W=>W.id===O);return(0,j.jsonToSVG)({json:Object.assign(Object.assign({},M),{pages:G?[G]:[]}),elementHook:L})},async saveAsSVG({fileName:L,elementHook:O,pageId:I}={}){const M=await A.toSVG({elementHook:O,pageId:I}),G="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(M)));(0,p.downloadFile)(G,L||"polotno.svg")},async saveAsPDF(L={}){var{fileName:O}=L,I=i(L,["fileName"]);(await A._toPDF(Object.assign({mimeType:"image/jpeg"},I))).save(O||"polotno.pdf")},async waitLoading({_skipTimeout:L=!1}={}){L||await new Promise(O=>setTimeout(O,50)),await(0,b.whenLoaded)()},toJSON:()=>({width:A.width,height:A.height,fonts:(0,s.getSnapshot)(A.fonts),pages:(0,s.getSnapshot)(A.pages),audios:(0,s.getSnapshot)(A.audios),unit:A.unit,dpi:A.dpi,custom:A.custom,schemaVersion:A.schemaVersion}),loadJSON(L,O=!1){var I;const M=Object.assign({},L);M.schemaVersion===void 0&&w.flags.htmlRenderEnabled&&(0,T.forEveryChild)({children:M.pages},te=>{if(te.type==="text"){const H=te.letterSpacing*16;te.letterSpacing=H/te.fontSize}});const G=A.pages.indexOf(A.activePage);let W=(I=M.pages[G]||M.pages[0])===null||I===void 0?void 0:I.id;M._activePageId=W;const Y=Object.assign({},(0,s.getSnapshot)(A));Object.assign(Y,M),Y.history=O?A.history.toJSON():{history:[],undoIdx:-1},(0,s.applySnapshot)(A,Y)},clear({keepHistory:L=!1}={}){const O=A.pages.map(I=>I.id);A.deletePages(O),A.custom=null,L||A.history.clear()},addFont(L){A.removeFont(L.fontFamily),A.fonts.push(L),A.loadFont(L.fontFamily)},removeFont(L){A.fonts.filter(O=>O.fontFamily===L).forEach(O=>(0,s.destroy)(O))},addAudio(L){const O=F.Audio.create(Object.assign({id:(0,u.nanoid)(10)},L));A.audios.push(O)},removeAudio(L){const O=A.audios.find(I=>I.id===L);O&&A.audios.remove(O)},async loadFont(L){const O=A.fonts.find(M=>M.fontFamily===L)||S.globalFonts.find(M=>M.fontFamily===L);let I=[{fontStyle:"normal",fontWeight:"normal"}];return O?(O.styles&&(I=O.styles.map(M=>({fontStyle:M.fontStyle||"normal",fontWeight:M.fontWeight||"normal"}))),S.injectCustomFont(O)):S.injectGoogleFont(L),Promise.all(I.map(M=>S.loadFont(L,M.fontStyle,M.fontWeight)))},validate:L=>e.Store.validate(L,[{path:"",type:e.Store}]).map(O=>({path:"store"+O.context.map(I=>I.path).join("."),message:O.message}))})),e.default=C}(Ms)),Ms}var S4;function s_(){return S4||(S4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const r=hl,t=l0,n=Nm(),a=o_(),i=Nh();e.Node=r.types.model("Node",{id:r.types.identifier,type:"none",name:"",opacity:1,custom:r.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(o=>{for(var s in o)o[s]===null&&(o[s]=void 0);return o}).postProcessSnapshot(o=>{const s=Object.assign({},o),c={};for(var u in s)u[0]!=="_"&&(c[u]=o[u]);return c}).views(o=>({get locked(){return!(o.draggable||o.contentEditable||o.styleEditable||o.resizable)},get page(){return(0,r.getParentOfType)(o,a.Page)},get store(){return(0,r.getParentOfType)(o,n.Store)},get top(){let s=o;for(;;){if(!(0,r.hasParentOfType)(s,i.GroupElement))return s;s=(0,r.getParentOfType)(s,i.GroupElement)}},get parent(){return(0,r.hasParentOfType)(o,i.GroupElement)?(0,r.getParentOfType)(o,i.GroupElement):(0,r.hasParentOfType)(o,a.Page)?(0,r.getParentOfType)(o,a.Page):(0,r.hasParentOfType)(o,n.Store)?(0,r.getParentOfType)(o,n.Store):null},get zIndex(){return o.parent.children.indexOf(o)}})).actions(o=>({toJSON:()=>Object.assign({},(0,r.getSnapshot)(o))})).actions(o=>({clone(s={},{skipSelect:c=!1}={}){const u=JSON.parse(JSON.stringify(o.toJSON()));return s.id=s.id||(0,t.nanoid)(10),(0,i.forEveryChild)(u,d=>{d.id=(0,t.nanoid)(10)}),Object.assign(u,s),o.page.addElement(u,{skipSelect:c})},set(s){Object.assign(o,s)},moveUp(){o.page.moveElementsUp([o.id])},moveTop(){o.page.moveElementsTop([o.id])},moveDown(){o.page.moveElementsDown([o.id])},moveBottom(){o.page.moveElementsBottom([o.id])},setZIndex(s){o.parent.setElementZIndex(o.id,s)},beforeDestroy(){}}))}(Av)),Av}var zv={},Uv={},x4;function XC(){return x4||(x4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const r=Dh(),t={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},n={right:{cropX:-1},left:{cropX:1},up:{cropY:1},down:{cropY:-1}};e.animations={fade:({dTime:a,element:i,animation:o})=>{const s=a/o.duration;return o.type==="enter"?{opacity:s*i.opacity}:{opacity:(1-s)*i.opacity}},rotate:({dTime:a,element:i,animation:o})=>{const s=a/o.duration*360;return(0,r.rotateAroundCenter)({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation},s)},blink:({dTime:a,element:i,animation:o})=>{const s=o.duration,c=a%s/(s/2),u=c<=1?c:2-c;return{opacity:i.opacity*u}},bounce:({dTime:a,element:i,animation:o})=>{var s;const c=o.duration,u=c/2,d=(s=o.data.strength)!==null&&s!==void 0?s:1,p={},y={x:i.x+i.width/3*d,y:i.y+i.height/3*d,width:i.width/3*d,height:i.height/3*d,fontSize:i.fontSize/3*d},f={x:i.x,y:i.y,width:i.width,height:i.height,fontSize:i.fontSize},_=a%c/u,S=_<=1?_:2-_;for(let w in y){const b=y[w],g=f[w]-b;p[w]=b+S*g}return p},move:({dTime:a,element:i,animation:o})=>{var s;const c=t[o.data.direction]||t.right,u=(s=o.data.strength)!==null&&s!==void 0?s:1,d={};for(var p in c.from){let y=c.from[p],f=c.to[p];o.type==="exit"&&(y=c.to[p],f=-c.from[p]),y*=u,f*=u;const _=i[p]+y,S=i[p]+f-_;d[p]=_+a/o.duration*S}return d},zoom:({dTime:a,element:i,animation:o})=>{var s;const c={},u=1+(((o.data.direction||"in")==="in"?.75:1.25)-1)*((s=o.data.strength)!==null&&s!==void 0?s:1),d=i.rotation*Math.PI/180,p=Math.cos(d),y=Math.sin(d),f=i.width*(1-u),_=i.height*(1-u),S=(f*p-_*y)/2,w=(f*y+_*p)/2,b={x:i.x+S,y:i.y+w,width:i.width*u,height:i.height*u,fontSize:i.fontSize*u},g={x:i.x,y:i.y,width:i.width,height:i.height,fontSize:i.fontSize};for(var v in b){let E=b[v],x=g[v];if(o.type==="exit"){const N=E;E=x,x=N}const j=x-E;c[v]=E+a/o.duration*j}return c},cameraZoom:({dTime:a,element:i,animation:o})=>{var s,c,u;const d={},p=o.data.direction||"right",y=n[p]||n.right,f=(s=o.data.movementStrength)!==null&&s!==void 0?s:.1,_=(c=o.data.shakeStrength)!==null&&c!==void 0?c:.015;u=o.data.zoomStrength;const S=a/o.duration,w=_*(1-S),b=Math.sin(12*S)*w*.7+Math.sin(8*S)*w*.3;o.type==="exit"&&Math.max(i.cropWidth||1,i.cropHeight||1),o.type;const g=1-Math.pow(1-S,2),v=i.cropX||0,E=i.cropY||0,x=i.cropWidth||1,j=i.cropHeight||1,N=x,T=j;let F,C,A=0,L=0;if(y.cropX){const O=y.cropX>0?1-(v+x):v;A=Math.min(O,Math.abs(f))*y.cropX}if(y.cropY){const O=y.cropY>0?1-(E+j):E;L=Math.min(O,Math.abs(f))*y.cropY}return o.type==="enter"?(F=y.cropX?v+A*(1-g):v,C=y.cropY?E+L*(1-g):E):(F=y.cropX?v+A*g:v,C=y.cropY?E+L*g:E),d.cropX=Math.max(0,Math.min(1-N,F+b*N)),d.cropY=Math.max(0,Math.min(1-T,C+b*T)),d.cropWidth=N,d.cropHeight=T,d}},e.animate=({element:a,dTime:i,animation:o})=>{const s=e.animations[o.name];return s?s({element:a,dTime:i,animation:o}):(console.error("Can not find animation type: "+o.name),{})},e.registerAnimation=(a,i)=>{e.animations[a]&&console.warn(`Animation "${a}" already exists and will be overridden`),e.animations[a]=i}}(Uv)),Uv}var E4;function Bh(){return E4||(E4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.INDEPENDENT_FILTERS=e.ShapeFilter=e.getDiff=e.Animation=void 0;const r=hl,t=XC(),n=qs,a=s_();e.Animation=r.types.model("Animation",{delay:0,duration:500,enabled:!0,type:r.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:r.types.frozen({})}),e.getDiff=(i,o)=>{const s={};for(const c in o)if(typeof i[c]=="number"&&typeof o[c]=="number"){const u=o[c]-i[c];u!==0&&(s[c]=u)}return s},e.ShapeFilter=r.types.model("ShapeFilter",{intensity:1}),e.INDEPENDENT_FILTERS=["temperature","contrast","highlights","shadows","white","black","saturation","vibrance"],e.Shape=a.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:r.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,filters:r.types.map(e.ShapeFilter),shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(i=>{const o=Object.assign(Object.assign({},i),{x:i.x||0,y:i.y||0,filters:Array.isArray(i.filters)?{}:i.filters});return"width"in i&&(o.width=o.width||1),"height"in i&&(o.height=o.height||1),i.locked&&(o.draggable=!1,o.contentEditable=!1,o.styleEditable=!1,o.resizable=!1,o.removable=!1),o}).views(i=>{const o=(0,n.observable)({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation,opacity:i.opacity,color:i.color,fontSize:i.fontSize}),s=(0,n.action)(u=>{Object.assign(o,u)}),c=(0,n.action)(u=>{for(const d in u)typeof o[d]=="number"&&(o[d]=o[d]+u[d])});return{get a(){const{currentTime:u}=i.store;if(s({x:i.x,y:i.y,width:i.width,height:i.height,rotation:i.rotation,opacity:i.opacity,color:i.color,fontSize:i.fontSize,cropX:i.cropX,cropY:i.cropY,cropWidth:i.cropWidth,cropHeight:i.cropHeight}),u===0)return o;const d=u-i.page.startTime;if(d>i.page.duration||d<0)return o;const p=i.store.animatedElementsIds;if(p.length&&!p.includes(i.id))return o;const y=i.animations.find(b=>b.type==="enter"),f=(y==null?void 0:y.enabled)&&d<y.delay;f&&s({opacity:0});const _=(y==null?void 0:y.enabled)&&d>=y.delay&&d<=y.delay+y.duration;if(_){const b=d-y.delay,g=(0,t.animate)({element:i,animation:y,dTime:b}),v=(0,e.getDiff)(i,g);c(v)}const S=i.animations.find(b=>b.type==="exit");if(!f&&!_&&(S!=null&&S.enabled)&&d>=i.page.duration-S.duration-S.delay&&d<=i.page.duration-S.delay){const b=d-(i.page.duration-S.duration-S.delay),g=(0,t.animate)({element:i,animation:S,dTime:b}),v=(0,e.getDiff)(i,g);c(v)}S!=null&&S.enabled&&d>=i.page.duration-S.delay&&s({opacity:0});const w=i.animations.find(b=>b.type==="loop");if(w!=null&&w.enabled){const b=d,g=(0,t.animate)({element:i,animation:w,dTime:b}),v=(0,e.getDiff)(i,g);c(v)}return o},animated:u=>i.a[u]}}).actions(i=>({setAnimation(o,s){const c=i.animations.find(u=>u.type===o);c?Object.assign(c,s):i.animations.push(Object.assign({type:o},s))},setFilter(o,s){e.INDEPENDENT_FILTERS.includes(o)||i.filters.forEach((c,u)=>{e.INDEPENDENT_FILTERS.includes(u.toString())||i.filters.delete(u.toString())}),s==null?i.filters.delete(o):i.filters.set(o,{intensity:s})}}))}(zv)),zv}var Hv={},P4;function KC(){return P4||(P4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const r=hl,t=Bh();e.TextElement=t.Shape.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:r.types.optional(r.types.union(r.types.number,r.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(n=>Object.assign({},n)).actions(n=>({toggleEditMode(a){n._editModeEnabled=a??!n._editModeEnabled,n._editModeEnabled?n.store.history.startTransaction():n.store.history.endTransaction()}}))}(Hv)),Hv}var Vv={},O4;function Tm(){return O4||(O4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const r=Bh();e.ImageElement=r.Shape.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,stretchEnabled:!1,_cropModeEnabled:!1}).actions(t=>({toggleCropMode(n){t._cropModeEnabled=n??!t._cropModeEnabled,t._cropModeEnabled?t.store.history.startTransaction():t.store.history.endTransaction()},beforeDestroy(){t._cropModeEnabled&&t.store.history.endTransaction()}}))}(Vv)),Vv}var Gv={},A4;function ZC(){return A4||(A4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const r=Tm();e.VideoElement=r.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(Gv)),Gv}var Wv={},C4;function QC(){return C4||(C4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const r=hl,t=Bh();e.LineElement=t.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:r.types.array(r.types.number),startHead:"",endHead:""}).actions(n=>({}))}(Wv)),Wv}var $v={},k4;function JC(){return k4||(k4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const r=hl,t=Bh();e.SVGElement=t.Shape.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,stretchEnabled:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:r.types.map(r.types.string)}).preProcessSnapshot(n=>Object.assign(Object.assign({},n),{src:n.src||n.svgSource,colorsReplace:Array.isArray(n.colorsReplace)?{}:n.colorsReplace})).actions(n=>({replaceColor(a,i){n.colorsReplace.set(a,i)}}))}($v)),$v}var Yv={},L4;function ek(){return L4||(L4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const r=hl,t=Bh();e.FigureElement=t.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:r.types.array(r.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(Yv)),Yv}var Xv={},N4;function tk(){return N4||(N4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const r=Tm();e.GifElement=r.ImageElement.named("Gif").props({type:"gif",duration:0,keepRatio:!0})}(Xv)),Xv}var T4;function Nh(){return T4||(T4=1,function(e){var r=Qd&&Qd.__rest||function(S,w){var b={};for(var g in S)Object.prototype.hasOwnProperty.call(S,g)&&w.indexOf(g)<0&&(b[g]=S[g]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(g=Object.getOwnPropertySymbols(S);v<g.length;v++)w.indexOf(g[v])<0&&Object.prototype.propertyIsEnumerable.call(S,g[v])&&(b[g[v]]=S[g[v]])}return b};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=function(S,w){const b=S.type;if(!b)throw new Error('You must pass "type" attribute to custom model.');let g=i.Shape.named(b).props(S);w&&(g=w(g)),e.TYPES_MAP[b]=g,_.push(g)};const t=hl,n=l0,a=s_(),i=Bh(),o=KC(),s=Tm(),c=ZC(),u=QC(),d=JC(),p=ek(),y=tk();e.forEveryChild=(S,w)=>{if(S.children)for(const b of S.children){if(w(b)===!0)break;(0,e.forEveryChild)(b,w)}};const f=[...new Array(20)].map((S,w)=>t.types.late(()=>_[w]));e.ElementTypes=t.types.union({dispatcher:S=>{const w=e.TYPES_MAP[S.type];if(!w)throw new Error(`Unknown element type: "${S.type}"`);return w}},d.SVGElement,o.TextElement,s.ImageElement,u.LineElement,c.VideoElement,p.FigureElement,y.GifElement,t.types.late(()=>e.GroupElement),...f),e.GroupElement=a.Node.named("Group").props({type:"group",children:t.types.array(e.ElementTypes)}).views(S=>({get draggable(){let w=!0;return(0,e.forEveryChild)(S,b=>{b.draggable||(w=!1)}),w},get resizable(){let w=!0;return(0,e.forEveryChild)(S,b=>{b.resizable||(w=!1)}),w},get contentEditable(){let w=!0;return(0,e.forEveryChild)(S,b=>{b.contentEditable||(w=!1)}),w},get styleEditable(){let w=!0;return(0,e.forEveryChild)(S,b=>{b.styleEditable||(w=!1)}),w},get locked(){let w=!0;return(0,e.forEveryChild)(S,b=>{b.locked||(w=!1)}),w}})).actions(S=>({set(w){var{draggable:b,contentEditable:g,styleEditable:v,resizable:E}=w,x=r(w,["draggable","contentEditable","styleEditable","resizable"]);b!==void 0&&(0,e.forEveryChild)(S,j=>{j.set({draggable:b})}),g!==void 0&&(0,e.forEveryChild)(S,j=>{j.set({contentEditable:g})}),v!==void 0&&(0,e.forEveryChild)(S,j=>{j.set({styleEditable:v})}),E!==void 0&&(0,e.forEveryChild)(S,j=>{j.set({resizable:E})}),Object.assign(S,x)},addElement(w,{skipSelect:b=!1}={}){const g=e.TYPES_MAP[w.type];if(!g)return void console.error("Can not find model with type "+w.type);w.children&&w.children.forEach(E=>{E.id=E.id||(0,n.nanoid)(10)});const v=g.create(Object.assign({id:(0,n.nanoid)(10)},w));return S.children.push(v),v.selectable&&!b&&S.store.selectElements([v.id]),v},setElementZIndex(w,b){const g=S.children.find(v=>v.id===w);g&&((0,t.detach)(g),S.children.remove(g),S.children.splice(b,0,g))}}));const _=[];e.TYPES_MAP={svg:d.SVGElement,text:o.TextElement,image:s.ImageElement,group:e.GroupElement,line:u.LineElement,video:c.VideoElement,figure:p.FigureElement,gif:y.GifElement}}(Qd)),Qd}var R4;function rk(){return R4||(R4=1,function(e){var r=Dd&&Dd.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=function(E,x){b[E]=x};const t=r(fi()),n=Us,a=r(Hs()),i=F8(),o=xm(),s=OC(),c=AC(),u=J8(),d=CC(),p=RC(),y=Fu,f=MC(),_=Nh(),S=gc(),w=(0,n.observer)(E=>{const{element:x,store:j}=E,{children:N}=x,T=x.selectable||j.role==="admin";return t.default.createElement(y.Group,{opacity:x.opacity,listening:T,hideInExport:!x.showInExport},N.map(F=>t.default.createElement(v,Object.assign({},E,{key:F.id,store:j,element:F}))))}),b={text:i.TextElement,image:o.ImageElement,svg:o.ImageElement,line:c.LineElement,video:u.VideoElement,figure:d.FigureElement,group:w,gif:p.GifElement},g=(E,x)=>{const j=[];(0,_.forEveryChild)(E,I=>{I.type!=="group"&&j.push(I.a)});const N=[];j.forEach(I=>{const M=[{x:0,y:0},{x:0+I.width,y:0},{x:0+I.width,y:0+I.height},{x:0,y:0+I.height}],G=new a.default.Transform;G.translate(I.x,I.y),G.rotate(a.default.Util.degToRad(I.rotation)),M.forEach(W=>{const Y=G.point(W);N.push(Y)})});const T=new a.default.Transform;T.rotate(-a.default.Util.degToRad(x));let F=1/0,C=1/0,A=-1/0,L=-1/0;N.forEach(I=>{const M=T.point(I);F=Math.min(F,M.x),C=Math.min(C,M.y),A=Math.max(A,M.x),L=Math.max(L,M.y)}),T.invert();const O=T.point({x:F,y:C});return{x:O.x,y:O.y,width:A-F,height:L-C,rotation:x}},v=(0,n.observer)(E=>{const{element:x,store:j}=E,[N,T]=t.default.useState(!1),F=j.selectedElements.indexOf(x)>=0&&x.selectable,C=x.parent.type==="group",A=(I=>{const[M,G]=t.default.useState(null);return t.default.useEffect(()=>{const W=I.page.id,Y=a.default.stages.find(te=>te.getAttr("pageId")===W);G(Y)},[I.id]),M})(x),L=A==null?void 0:A.findOne("Transformer");t.default.useEffect(()=>{A&&(A.on("mouseover",I=>{const M=I.target.findAncestor(".element",!0),G=j.getElementById(M==null?void 0:M.id()),W=G==null?void 0:G.top,Y=W==null?void 0:W.id;T(Y===x.id)}),A.on("mouseleave",I=>{T(!1)}))},[A]);let O=b[E.element.type];return E.element.type==="text"&&S.flags.htmlRenderEnabled&&(O=s.HTMLElement),E.element.visible?O?t.default.createElement(t.default.Fragment,null,t.default.createElement(O,Object.assign({},E)),(N||F)&&!C&&t.default.createElement(f.Highlighter,{element:x.type==="group"?{a:g(x,(L==null?void 0:L.rotation())||0)}:x})):(console.error("Can not find component for "+E.element.type),null):null});e.default=v}(Dd)),Dd}var Kv={},M4;function nk(){return M4||(M4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=function(r,t,n="scale"){const a=t.width/t.height;let i,o;a>=r.width/r.height?(i=r.width,o=r.width/a):(i=r.height*a,o=r.height);let s=0,c=0;return n==="left-top"?(s=0,c=0):n==="left-middle"?(s=0,c=(r.height-o)/2):n==="left-bottom"?(s=0,c=r.height-o):n==="center-top"?(s=(r.width-i)/2,c=0):n==="center-middle"?(s=(r.width-i)/2,c=(r.height-o)/2):n==="center-bottom"?(s=(r.width-i)/2,c=r.height-o):n==="right-top"?(s=r.width-i,c=0):n==="right-middle"?(s=r.width-i,c=(r.height-o)/2):n==="right-bottom"?(s=r.width-i,c=r.height-o):n==="scale"?(s=0,c=0,i=r.width,o=r.height):console.error(new Error("Unknown clip position property - "+n)),{cropX:s,cropY:c,cropWidth:i,cropHeight:o}}}(Kv)),Kv}var I4;function ik(){return I4||(I4=1,function(e){var r=yf&&yf.__rest||function(D,$){var ne={};for(var Z in D)Object.prototype.hasOwnProperty.call(D,Z)&&$.indexOf(Z)<0&&(ne[Z]=D[Z]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function"){var Q=0;for(Z=Object.getOwnPropertySymbols(D);Q<Z.length;Q++)$.indexOf(Z[Q])<0&&Object.prototype.propertyIsEnumerable.call(D,Z[Q])&&(ne[Z[Q]]=D[Z[Q]])}return ne},t=yf&&yf.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.useContextMenu=e.setTransformerStyle=void 0,e.registerTransformerAttrs=function(D,$){C[D]=C[D]||$,Object.assign(C[D],$)};const n=t(fi()),a=Us,i=qs,o=Fu,s=t(t0()),c=t(Hs()),u=t(rk()),d=Q8(),p=xm(),y=nk(),f=km(),_=Dh(),S=Lm(),w=gc(),b=rf(),g=Pp(),v=fm(),E=Mh,x=c.default.DD._drag;window.removeEventListener("mousemove",x),c.default.DD._drag=function(D){(0,i.runInAction)(()=>{x.call(this,D)})},window.addEventListener("mousemove",c.default.DD._drag);const j=new c.default.Group,N=20;j.add(new c.default.Rect({width:N,height:N,fill:"white"})),j.add(new c.default.Path({scaleX:N/24,scaleY:N/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));const T=j.toCanvas({pixelRatio:2,width:N,height:N}),F={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:D=>{D.hasName("rotater")&&D.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:T,fillPatternScaleX:20/N/2,fillPatternScaleY:20/N/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}};e.setTransformerStyle=D=>{Object.assign(F,D)};const C={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},gif:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},A=D=>n.default.createElement(o.Rect,Object.assign({},D,{preventDefault:!1})),L=D=>{var{url:$}=D,ne=r(D,["url"]);const[Z,Q]=(0,s.default)($,"anonymous"),oe=Z?(0,y.getCrop)(Z,{width:ne.width,height:ne.height},"center-middle"):{};return(0,p.useImageLoader)(Q,$,"page background"),n.default.createElement(o.Image,Object.assign({image:Z},ne,oe))},O=D=>{const $=(0,g.useColor)({fill:D.fill,a:{width:D.width,height:D.height}});return n.default.createElement(o.Rect,Object.assign({},D,$))},I=D=>{const{background:$,scale:ne,borderColor:Z}=D,Q=r(D,["background","scale","borderColor"]),oe=n.default.useMemo(()=>!!c.default.Util.colorToRGBA($)||(0,v.isGradient)($),[$]),se=n.default.useMemo(()=>{const ue=document.createElement("canvas"),ve=30;ue.width=60,ue.height=60;const Pe=ue.getContext("2d");return Pe&&(Pe.fillStyle="black",Pe.fillRect(ve,0,ve,ve),Pe.fillRect(0,ve,ve,ve)),ue},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Rect,Object.assign({fillPatternImage:se},Q,{opacity:.1,hideInExport:!0})),oe?n.default.createElement(O,Object.assign({fill:$},Q)):n.default.createElement(L,Object.assign({url:$},Q)))},M=(0,a.observer)(({selection:D})=>D.visible?n.default.createElement(o.Rect,{name:"selection",x:Math.min(D.x1,D.x2),y:Math.min(D.y1,D.y2),width:Math.abs(D.x1-D.x2),height:Math.abs(D.y1-D.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),G=(0,a.observer)(({x:D,y:$,width:ne,height:Z,rotation:Q,anchor:oe,store:se})=>{const ue=(0,_.getClientRect)({x:D,y:$,width:ne,height:Z,rotation:c.default.Util.radToDeg(Q)});if(oe===void 0)return null;const ve=(Z/2+70)*Math.cos(Q-Math.PI/2),Pe=(Z/2+70)*Math.sin(Q-Math.PI/2),ke=(0,S.pxToUnitRounded)({unit:se.unit,dpi:se.dpi,px:ne/se.scale,precious:se.unit==="px"?0:1})+" x "+(0,S.pxToUnitRounded)({unit:se.unit,dpi:se.dpi,px:Z/se.scale,precious:se.unit==="px"?0:1})+(se.unit==="px"?"":" "+se.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Label,{x:(ue.minX+ue.maxX)/2+ve,y:(ue.minY+ue.maxY)/2+Pe,offsetX:14,offsetY:14,visible:oe==="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(c.default.Util.radToDeg(Q)).toString()+"°"})),n.default.createElement(o.Label,{x:(ue.minX+ue.maxX)/2,y:ue.maxY+20,visible:oe!=="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:ke})))}),W=(0,a.observer)(({elements:D,store:$})=>{const ne=D.filter(Q=>Q.alwaysOnTop),Z=D.filter(Q=>!Q.alwaysOnTop).concat(ne);return n.default.createElement(n.default.Fragment,null,Z.map(Q=>n.default.createElement(u.default,{key:Q.id,store:$,element:Q,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});e.useContextMenu=({store:D})=>{const[$,ne]=n.default.useState(!1),[Z,Q]=n.default.useState({x:0,y:0});return{open:n.default.useCallback(se=>{ne(!0),Q(se)},[]),close:n.default.useCallback(()=>{ne(!1)},[]),props:{isOpen:$,offset:Z,setIsOpen:ne}}};let Y=null;e.registerNextDomDrop=D=>{Y=D};const te=atob("UG9sb3RubyBmcmVlIGxpY2Vuc2UgbGltaXRhdGlvbiBleGNlZWRlZCAtIFBsZWFzZSB1cGdyYWRlIHlvdXIgYWNjb3VudC4="),V=atob("cmVk"),H=atob("djAuOS4y"),q=D=>n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Label,{fill:V,height:200},n.default.createElement(o.Tag,{fill:V}),n.default.createElement(o.Text,Object.assign({},D,{fill:"white",text:te,height:void 0,padding:10,fontSize:20}))));e.default=(0,a.observer)(({store:D,page:$,width:ne,height:Z,pageControlsEnabled:Q,backColor:oe,pageBorderColor:se,activePageBorderColor:ue,components:ve,bleedColor:Pe,altCloneEnabled:ke,viewportSize:Ne})=>{const xe=D.bleedVisible?$.bleed:0,ye=$.computedWidth+2*xe,Ie=$.computedHeight+2*xe,me=(ne-ye*D.scale)/2,_e=(Z-Ie*D.scale)/2,Ae=n.default.useRef(null),Le=n.default.useRef(null),ge=n.default.useRef(null),Te=Q==null||Q,[Fe,Ke]=n.default.useState(null),[it,rt]=n.default.useState({}),at=(0,e.useContextMenu)({store:D}),bt=D.selectedElements.find(qe=>qe._cropModeEnabled),yt=D.selectedShapes.filter(qe=>!qe.resizable).length>0,ht=D.selectedShapes.filter(qe=>!qe.draggable).length>0,zt=D.selectedElements.filter(qe=>!qe.visible).length>0;n.default.useLayoutEffect(()=>{var qe,vt,pt;if(!Ae.current)return;const Je=Ae.current.getStage(),_t=D.selectedShapes.map(Pt=>Pt._cropModeEnabled?null:Je.findOne("#"+Pt.id)).filter(Pt=>Pt),Ye=D.selectedElements.length===1&&((qe=D.selectedElements[0])===null||qe===void 0?void 0:qe.type)||"many";C[Ye]?(Ae.current.setAttrs(Object.assign(Object.assign({},F),C[Ye])),Ye!=="svg"&&Ye!=="image"&&Ye!=="gif"||D.selectedElements[0].keepRatio||Ae.current.setAttrs({enabledAnchors:F.enabledAnchors}),Ye==="text"&&w.flags.textVerticalResizeEnabled&&Ae.current.setAttrs({enabledAnchors:(vt=C.text.enabledAnchors)===null||vt===void 0?void 0:vt.concat(["bottom-center"])})):Ae.current.setAttrs(F),yt&&Ae.current.enabledAnchors([]),ht&&Ae.current.rotateEnabled(!1),_t.find(Pt=>Pt==null?void 0:Pt.isDragging())&&_t.forEach(Pt=>{Pt.isDragging()||Pt==null||Pt.startDrag()}),Ae.current.nodes(_t),(pt=Ae.current.getLayer())===null||pt===void 0||pt.batchDraw()},[D.selectedShapes,bt,yt,zt,ht]);const Ot=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),Ut=n.default.useRef(!1),$t=(0,b.isTouchDevice)(),Oe=(0,i.action)(qe=>{var vt,pt,Je,_t;if($t)return;Ut.current=!1;const Ye=qe.target.findAncestor(".elements-container"),Pt=qe.target.findAncestor("Transformer"),Dt=qe.target.findAncestor(".page-abs-container");if(Ye||Pt||Dt)return;const Wt=(vt=qe.target.getStage())===null||vt===void 0?void 0:vt.getPointerPosition();Wt.x-=(pt=qe.target.getStage())===null||pt===void 0?void 0:pt.x(),Wt.y-=(Je=qe.target.getStage())===null||Je===void 0?void 0:Je.y(),Wt&&(Ot.visible=!0,Ot.x1=Wt.x,Ot.y1=Wt.y,Ot.x2=Wt.x,Ot.y2=Wt.y,((_t=qe.target.getStage())===null||_t===void 0?void 0:_t.getPointersPositions().length)>=2&&(Ot.visible=!1))});(({stageRef:qe,containerRef:vt,viewportSize:pt})=>{n.default.useEffect(()=>{var Je;const _t=(Je=vt.current)===null||Je===void 0?void 0:Je.closest(".polotno-workspace-inner");function Ye(){var Pt;if(!qe.current)return;const Dt=(Pt=vt.current)===null||Pt===void 0?void 0:Pt.getBoundingClientRect(),Wt=_t==null?void 0:_t.getBoundingClientRect(),Zt=Math.max(0,Wt.left-Dt.left-100),rr=Math.max(0,Wt.top-Dt.top-100);qe.current.position({x:-Zt,y:-rr}),qe.current.container().style.transform=`translate(${Zt}px, ${rr}px)`}return Ye(),_t.addEventListener("scroll",Ye),()=>{_t.removeEventListener("scroll",Ye)}},[pt.width,pt.height])})({stageRef:Le,containerRef:ge,viewportSize:Ne}),n.default.useEffect(()=>{const qe=(0,i.action)(pt=>{var Je,_t,Ye,Pt;if(!Ot.visible)return;(Je=Le.current)===null||Je===void 0||Je.setPointersPositions(pt);let Dt=(_t=Le.current)===null||_t===void 0?void 0:_t.getPointerPosition();Dt?(Dt.x-=(Ye=Le.current)===null||Ye===void 0?void 0:Ye.x(),Dt.y-=(Pt=Le.current)===null||Pt===void 0?void 0:Pt.y()):Dt={x:Ot.x2,y:Ot.y2},Ot.x2=Dt.x,Ot.y2=Dt.y}),vt=(0,i.action)(()=>{if(!Ot.visible||!Le.current)return;const pt=Le.current.findOne(".selection"),Je=pt?pt.getClientRect():{width:0,height:0,x:0,y:0};if(Je.width&&Je.height){const _t=[];Le.current.find(".element").forEach(Pt=>{const Dt=Pt.getClientRect(),Wt=D.getElementById(Pt.id()),Zt=Wt==null?void 0:Wt.draggable,rr=Wt==null?void 0:Wt.selectable;c.default.Util.haveIntersection(Je,Dt)&&Zt&&rr&&_t.push(Wt.top.id)});const Ye=[...new Set(_t)];D.selectElements(Ye)}Ot.visible=!1,Ut.current=!0});return window.addEventListener("mousemove",qe),window.addEventListener("touchmove",qe),window.addEventListener("mouseup",vt),window.addEventListener("touchend",vt),()=>{window.removeEventListener("mousemove",qe),window.removeEventListener("touchmove",qe),window.removeEventListener("mouseup",vt),window.removeEventListener("touchend",vt)}},[]);const Me=n.default.useRef(!1);n.default.useEffect(()=>{var qe;let vt;const pt=(qe=ge.current)===null||qe===void 0?void 0:qe.closest(".polotno-workspace-inner"),Je=()=>{Me.current=!0,clearTimeout(vt),vt=setTimeout(()=>{Me.current=!1},300)};return pt.addEventListener("scroll",Je),()=>{clearTimeout(vt),pt.removeEventListener("scroll",Je)}},[]);const mt=qe=>{if(D.activePage!==$&&$.select(),Me.current||Ut.current)return;const vt=qe.evt.ctrlKey||qe.evt.metaKey||qe.evt.shiftKey,pt=qe.target.findAncestor(".elements-container"),Je=qe.target.findAncestor(".page-abs-container"),_t=qe.target.findAncestor("Transformer");if(!(vt||pt||_t||Je))return void D.selectElements([]);const Ye=qe.target.findAncestor(".element",!0),Pt=D.getElementById(Ye==null?void 0:Ye.id()),Dt=Pt==null?void 0:Pt.top,Wt=Dt==null?void 0:Dt.id,Zt=D.selectedElementsIds.indexOf(Wt)>=0;Wt&&vt&&!Zt?D.selectElements(D.selectedElementsIds.concat([Wt])):Wt&&vt&&Zt?D.selectElements(D.selectedElementsIds.filter(rr=>rr!==Wt)):!Wt||vt||Zt||D.selectElements([Wt])};(0,d.useSnap)(Ae,D);const Mt=D.activePage===$,Lt=ve==null?void 0:ve.PageControls,At=ve==null?void 0:ve.Tooltip,fr=ve==null?void 0:ve.ContextMenu,Qt=1/D.scale,ze=0/D.scale;return n.default.createElement("div",{ref:ge,onDragOver:qe=>qe.preventDefault(),onDrop:qe=>{if(qe.preventDefault(),!Le.current)return;Le.current.setPointersPositions(qe);const vt=Le.current.findOne(".elements-container").getRelativePointerPosition(),pt=Le.current.getPointerPosition(),Je=Le.current.getAllIntersections(pt).map(Pt=>Pt.findAncestor(".element",!0)).filter(Boolean),_t=[...new Set(Je.reverse())].map(Pt=>D.getElementById(Pt.id())),Ye=_t[0];Y&&(Y(vt,Ye,{elements:_t,page:$}),Y=null)},style:{position:"relative",width:ne+"px",height:Z+"px",overflow:"hidden"},className:"polotno-page-container"+(Mt?" active-page":"")},n.default.createElement(o.Stage,{ref:Le,width:Math.min(ne,Ne.width+200),height:Math.min(Ne.height+200,Z),onClick:mt,onTap:mt,onContextMenu:qe=>{qe.evt.preventDefault();const vt=qe.target.findAncestor(".element",!0),pt=D.getElementById(vt==null?void 0:vt.id()),Je=pt==null?void 0:pt.top,_t=Je==null?void 0:Je.id;_t?D.selectedElementsIds.indexOf(_t)>=0||D.selectElements([_t]):D.selectElements([]),at.open({x:qe.evt.clientX,y:qe.evt.clientY})},onMouseDown:Oe,onMouseMove:qe=>{if(!qe.evt.altKey&&Fe)return void Ke(null);if(!qe.evt.altKey)return;const vt=qe.target.findAncestor(".element",!0),pt=vt==null?void 0:vt.id();if(!D.selectedElements[0]||D.selectedElementsIds.includes(pt))return;const Je=(0,_.getTotalClientRect)(D.selectedShapes),_t=pt?D.getElementById(pt):{x:0,y:0,width:$.computedWidth,height:$.computedHeight,rotation:0},Ye=(0,_.getClientRect)(_t),Pt=[];Je.minX>Ye.maxX&&Pt.push({distance:Je.minX-Ye.maxX,box1:Je,box2:Ye,points:[{x:Je.minX,y:Je.minY+Je.height/2},{x:Ye.maxX,y:Je.minY+Je.height/2},{x:Ye.maxX,y:Ye.minY+Ye.height/2}]}),Je.maxX<Ye.minX&&Pt.push({distance:Ye.minX-Je.maxX,box1:Je,box2:Ye,points:[{x:Je.maxX,y:Je.minY+Je.height/2},{x:Ye.minX,y:Je.minY+Je.height/2},{x:Ye.minX,y:Ye.minY+Ye.height/2}]}),Je.minY>Ye.maxY&&Pt.push({box1:Je,box2:Ye,distance:Je.minY-Ye.maxY,points:[{x:Je.minX+Je.width/2,y:Je.minY},{x:Je.minX+Je.width/2,y:Ye.maxY},{x:Ye.minX+Ye.width/2,y:Ye.maxY}]}),Je.maxY<Ye.minY&&Pt.push({box1:Je,box2:Ye,distance:Ye.minY-Je.maxY,points:[{x:Je.minX+Je.width/2,y:Je.maxY},{x:Je.minX+Je.width/2,y:Ye.minY},{x:Ye.minX+Ye.width/2,y:Ye.minY}]}),Je.minX>=Ye.minX&&Je.maxX<=Ye.maxX&&Je.minY>=Ye.minY&&Je.maxY<=Ye.maxY&&(Pt.push({distance:Je.minX-Ye.minX,box1:Je,box2:Ye,points:[{x:Je.minX,y:Je.minY+Je.height/2},{x:Ye.minX,y:Je.minY+Je.height/2},{x:Ye.minX,y:Ye.minY+Ye.height/2}]}),Pt.push({distance:Ye.maxX-Je.maxX,box1:Je,box2:Ye,points:[{x:Je.maxX,y:Je.minY+Je.height/2},{x:Ye.maxX,y:Je.minY+Je.height/2},{x:Ye.maxX,y:Ye.minY+Ye.height/2}]}),Pt.push({box1:Je,box2:Ye,distance:Je.minY-Ye.minY,points:[{x:Je.minX+Je.width/2,y:Je.minY},{x:Je.minX+Je.width/2,y:Ye.minY},{x:Ye.minX+Ye.width/2,y:Ye.minY}]}),Pt.push({box1:Je,box2:Ye,distance:Ye.maxY-Je.maxY,points:[{x:Je.minX+Je.width/2,y:Je.maxY},{x:Je.minX+Je.width/2,y:Ye.maxY},{x:Ye.minX+Ye.width/2,y:Ye.maxY}]})),JSON.stringify(Fe)!==JSON.stringify(Pt)&&Ke(Pt)},onDragStart:qe=>{var vt;const pt=qe.target.findAncestor(".element",!0);if(pt){const Je=D.getElementById(pt==null?void 0:pt.id()),_t=Je==null?void 0:Je.top,Ye=_t==null?void 0:_t.id;!(D.selectedElementsIds.indexOf(Ye)>=0)&&Ye&&(D.selectElements([Ye]),qe.target.stopDrag(),qe.target.startDrag(qe),(vt=Ae.current)===null||vt===void 0||vt.startDrag(qe))}Fe&&Ke(null)},pageId:$.id,style:{position:"absolute",overflow:"hidden",top:0,left:0}},n.default.createElement(o.Layer,null,n.default.createElement(A,{width:ne,height:Z,fill:oe}),n.default.createElement(o.Group,{x:me,y:_e,scaleX:D.scale,scaleY:D.scale,name:"page-container"},n.default.createElement(o.Group,{name:"page-container-2"},n.default.createElement(o.Group,{name:"page-background-group",x:xe,y:xe},n.default.createElement(I,{x:-$.bleed,y:-$.bleed,width:$.computedWidth+2*$.bleed,height:$.computedHeight+2*$.bleed,background:$.background,name:"page-background",preventDefault:!1,scale:D.scale})),n.default.createElement(o.Group,{x:xe,y:xe,name:"elements-container",listening:!D.isPlaying},n.default.createElement(o.Rect,{name:"elements-area",width:$.computedWidth,height:$.computedHeight,listening:!1}),n.default.createElement(W,{elements:$.children,store:D})),n.default.createElement(o.Rect,{stroke:Pe,name:"bleed",strokeWidth:$.bleed,x:$.bleed/2,y:$.bleed/2,width:$.computedWidth+$.bleed,height:$.computedHeight+$.bleed,listening:!1,visible:$.bleed>0&&D.bleedVisible,hideInExport:!0}),(0,f.___)()===H&&n.default.createElement(q,{name:"hit-detection",x:-Qt/2-ze,y:-Qt/2-ze,width:ye+Qt+2*ze,height:Ie+Qt+2*ze}))),n.default.createElement(o.Line,{name:"workspace-background",points:[0,0,ne,0,ne,Z,0,Z,0,0,me,_e,me,Z-_e,ne-me,Z-_e,ne-me,_e,me,_e],listening:!1,closed:!0,fill:oe}),n.default.createElement(o.Group,{x:me,y:_e,scaleX:D.scale,scaleY:D.scale},n.default.createElement(o.Rect,{name:"page-highlight",hideInExport:!0,x:-Qt/2-ze,y:-Qt/2-ze,width:ye+Qt+2*ze,height:Ie+Qt+2*ze,stroke:Mt&&D.pages.length>1?ue:se,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(o.Group,{x:me+xe*D.scale,y:_e+xe*D.scale,scaleX:D.scale,scaleY:D.scale,name:"page-abs-container"},n.default.createElement(o.Transformer,{ref:Ae,onDragStart:qe=>{var vt;!((vt=qe.evt)===null||vt===void 0)&&vt.altKey&&ke&&D.selectedElements.forEach(pt=>{const Je=pt.clone({},{skipSelect:!0}),_t=$.children.indexOf(pt);$.setElementZIndex(Je.id,_t)}),D.history.startTransaction()},onDragEnd:()=>{D.history.endTransaction()},onTransformStart:()=>{D.history.startTransaction(),Ke(null)},boundBoxFunc:(qe,vt)=>{const pt=Math.abs(vt.width)<1||Math.abs(vt.height)<1,Je=Math.abs(qe.width)<1||Math.abs(qe.height)<1;return pt&&!Je?qe:vt},onTransform:qe=>{var vt,pt;const Je=Ae.current.nodes(),_t=Je[Je.length-1];if(qe.target!==_t)return;const Ye=(vt=Ae.current)===null||vt===void 0?void 0:vt.__getNodeRect(),Pt=(pt=Ae.current)===null||pt===void 0?void 0:pt.getActiveAnchor();rt({anchor:Pt,x:Ye.x,y:Ye.y,rotation:Ye.rotation,width:Ye.width,height:Ye.height})},onTransformEnd:qe=>{rt({}),D.history.endTransaction()},visible:!D.isPlaying}),Fe&&Fe.map(({points:qe,distance:vt,box1:pt,box2:Je},_t)=>n.default.createElement(o.Group,{name:"distances-container",hideInExport:!0,key:_t,listening:!1},n.default.createElement(o.Rect,Object.assign({},pt,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Rect,Object.assign({},Je,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Line,{points:[qe[0].x,qe[0].y,qe[1].x,qe[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Line,{points:[qe[1].x,qe[1].y,qe[2].x,qe[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Label,{x:(qe[0].x+qe[1].x)/2,y:(qe[0].y+qe[1].y)/2,offsetY:-10,scaleX:1/D.scale,scaleY:1/D.scale},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,S.pxToUnitString)({unit:D.unit,dpi:D.dpi,px:vt})})))),$._rendering&&n.default.createElement(o.Group,null,n.default.createElement(o.Rect,{width:ye,height:Ie,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(o.Text,{text:"Rendering...",fontSize:60,width:ye,height:Ie,align:"center",verticalAlign:"middle"})),At&&n.default.createElement(At,{components:ve,store:D,page:$,stageRef:Le}),fr&&n.default.createElement(E.Html,null,n.default.createElement(fr,Object.assign({components:ve,store:D},at.props)))),n.default.createElement(G,Object.assign({},it,{store:D})),n.default.createElement(M,{selection:Ot}),(0,f.isCreditVisible)()&&n.default.createElement(o.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:ne-170,y:Z-18,onMouseEnter:qe=>{qe.target.getStage().container().style.cursor="pointer"},onMouseLeave:qe=>{qe.target.getStage().container().style.cursor=""},onTouchStart:qe=>{qe.cancelBubble=!0},onMouseDown:qe=>{qe.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),n.default.createElement(o.Group,{name:"line-guides"}))),Te&&Lt&&n.default.createElement(Lt,{store:D,page:$,xPadding:me,yPadding:_e}))})}(yf)),yf}var Jd={},j4;function ak(){return j4||(j4=1,function(e){var r=Jd&&Jd.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=function(){return t.default.createElement("div",null,t.default.createElement("h1",null,"Top rules"))};const t=r(fi()),n=Dh(),a=Lm(),i=Us,o=Z8(),s=(0,o.styled)("div",t.default.forwardRef)`
|
|
379
|
-
position: absolute;
|
|
380
|
-
top: 0;
|
|
381
|
-
left: 0;
|
|
382
|
-
pointer-events: none;
|
|
383
|
-
`,c=(0,o.styled)("div",t.default.forwardRef)`
|
|
384
|
-
height: 14px;
|
|
385
|
-
position: sticky;
|
|
386
|
-
font-size: 8px;
|
|
387
|
-
line-height: 14px;
|
|
388
|
-
top: 0;
|
|
389
|
-
left: 0;
|
|
390
|
-
color: grey;
|
|
391
|
-
border-bottom: 1px solid grey;
|
|
392
|
-
background-color: #e8e8e8;
|
|
393
|
-
overflow: hidden;
|
|
394
|
-
`,u=(0,o.styled)("div",t.default.forwardRef)`
|
|
395
|
-
left: 0;
|
|
396
|
-
width: 14px;
|
|
397
|
-
position: sticky;
|
|
398
|
-
font-size: 8px;
|
|
399
|
-
line-height: 14px;
|
|
400
|
-
color: grey;
|
|
401
|
-
border-right: 1px solid grey;
|
|
402
|
-
background-color: #e8e8e8;
|
|
403
|
-
overflow: hidden;
|
|
404
|
-
`,d=(0,o.styled)("div",t.default.forwardRef)`
|
|
405
|
-
position: absolute;
|
|
406
|
-
border-left: 1px solid grey;
|
|
407
|
-
padding-left: 2px;
|
|
408
|
-
`,p=(0,o.styled)("div",t.default.forwardRef)`
|
|
409
|
-
position: absolute;
|
|
410
|
-
left: 14px;
|
|
411
|
-
border-left: 1px solid grey;
|
|
412
|
-
padding-left: 2px;
|
|
413
|
-
transform: rotate(90deg);
|
|
414
|
-
transform-origin: left top;
|
|
415
|
-
overflow: hidden;
|
|
416
|
-
`,y=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4];e.TopRules=(0,i.observer)(({store:f,width:_,height:S})=>{const w=t.default.useRef(null);if(!f.activePage)return null;const b=f.activePage,g=(f.bleedVisible&&b.bleed,b.computedWidth*f.scale),v=b.computedHeight*f.scale,E=(_-g)/2,x=(j=A=>(0,a.unitToPx)({unitVal:A,dpi:f.dpi,unit:f.unit})*f.scale,y.find(A=>j(A)>30)||1e4);var j;const N=(0,a.unitToPx)({unitVal:x,dpi:f.dpi,unit:f.unit})*f.scale,T=Math.round(g/N)+1,F=Math.round(v/N)+1,C=(0,n.getTotalClientRect)(f.selectedShapes);return t.default.createElement(s,{ref:w,className:"polotno-rulers"},t.default.createElement(c,{style:{width:_+"px"},className:"polotno-x-ruler"},[...Array(T)].map((A,L)=>t.default.createElement(d,{key:L,style:{left:E+L*N+"px",width:N+"px"}},f.unit==="px"||x>=1?Math.round(x*L):(x*L).toFixed(1))),!!f.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:E+C.x*f.scale+"px",height:"14px",width:C.width*f.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),f.pages.map((A,L)=>{var O;const I=A.computedHeight*f.scale,M=(S-I)/2;return t.default.createElement(u,{key:A.id,style:{height:S+"px"},className:"polotno-y-ruler"},[...Array(F)].map((G,W)=>t.default.createElement(p,{key:W,style:{top:M+W*N-14+"px",width:N+"px"}},f.unit==="px"||x>=1?Math.round(x*W):(x*W).toFixed(1))),((O=f.selectedShapes[0])===null||O===void 0?void 0:O.page)===A&&t.default.createElement("div",{style:{position:"absolute",top:M+C.y*f.scale-14+"px",width:"14px",height:C.height*f.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(Jd)),Jd}var ep={},F4;function ok(){return F4||(F4=1,function(e){var r=ep&&ep.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.AudioElement=void 0;const t=r(fi()),n=Us,a=qs;e.AudioElement=(0,n.observer)(({audio:i,store:o})=>{const[s,c]=function(u){const[d,p]=t.default.useState(null),[y,f]=t.default.useState("loading");return t.default.useEffect(()=>{const _=new Audio(u),S=()=>{f("loaded"),p(_)},w=()=>{f("failed"),p(null)};return _.addEventListener("canplay",S),_.addEventListener("error",w),()=>{_.removeEventListener("canplay",S),_.removeEventListener("error",w)}},[u]),[d,y]}(i.src);return t.default.useEffect(()=>{s&&o.history.ignore(()=>{i.set({duration:1e3*s.duration})})},[s,i,o.history]),t.default.useEffect(()=>{if(!s)return;const u=()=>{s.currentTime=i.startTime*i.duration/1e3},d=()=>{const y=i.endTime*i.duration/1e3;s.currentTime>=y&&(s.pause(),s.currentTime=i.startTime*i.duration/1e3)};s.addEventListener("ended",u),s.addEventListener("timeupdate",d);const p=(0,a.autorun)(()=>{const y=o.animatedElementsIds;if(y.length&&!y.includes(i.id))return;const f=o.currentTime-i.delay,_=i.duration*(i.endTime-i.startTime),S=f>=0&&f<_;if(!o.isPlaying||o.animatedElementsIds.length!==0||!S)return void s.pause();s.volume=i.volume,s.paused&&s.play();const w=f%_/1e3+i.startTime*i.duration/1e3,b=s.currentTime;Math.abs(b-w)>.5&&w!==b&&(s.currentTime=w)});return()=>{s.pause(),s.removeEventListener("ended",u),s.removeEventListener("timeupdate",d),p()}},[o.isPlaying,i.startTime,i.endTime,i.volume,s]),null})}(ep)),ep}var Zv={},Qv={},D4;function sk(){return D4||(D4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isClipboardEmpty=e.paste=e.cut=e.copy=void 0;const r=Nh(),t=Dh();let n={data:[],pageId:""};const a="polotno_clipboard",i=(s,c)=>{n={data:JSON.parse(JSON.stringify(s)),pageId:c};try{localStorage.setItem(a,JSON.stringify(s)),localStorage.setItem(a+"_page",c)}catch{}},o=()=>{try{const s=localStorage.getItem(a),c=localStorage.getItem(a+"_page");if(s)return{data:JSON.parse(s),pageId:c}}catch{}return n};e.copy=s=>{var c;s.selectedElements.length!==0&&i(s.selectedElements.map(u=>u.toJSON()),(c=s.activePage)===null||c===void 0?void 0:c.id)},e.cut=s=>{var c;i(s.selectedElements.map(d=>d.toJSON()),(c=s.activePage)===null||c===void 0?void 0:c.id);let u=s.selectedElements.filter(d=>d.removable).map(d=>d.id);s.deleteElements(u)},e.paste=s=>{s.history.transaction(()=>{var c,u;let d=0,p=0;const{data:y,pageId:f}=o();if(f===((c=s.activePage)===null||c===void 0?void 0:c.id))d=s.width/20,p=s.height/20;else{const S=[];(0,r.forEveryChild)({children:y},b=>{b.type!=="group"&&S.push(b)});const w=(0,t.getTotalClientRect)(S);w.maxX>s.width&&(d=-w.minX),w.maxY>s.height&&(p=-w.minY)}const _=[];(0,r.forEveryChild)({children:y},S=>{delete S.id,S.type!=="group"&&(S.x+=d,S.y+=p)}),y.forEach(S=>{var w;const b=(w=s.activePage)===null||w===void 0?void 0:w.addElement(S);b&&_.push(b.id)}),i(y,(u=s.activePage)===null||u===void 0?void 0:u.id),s.selectElements(_)})},e.isClipboardEmpty=()=>o().data.length===0}(Qv)),Qv}var B4;function lk(){return B4||(B4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=function(t,n){var a,i,o,s;if(((a=document.activeElement)===null||a===void 0?void 0:a.tagName)==="INPUT"||((i=document.activeElement)===null||i===void 0?void 0:i.tagName)==="TEXTAREA"||((o=document.activeElement)===null||o===void 0?void 0:o.contentEditable)==="true")return;const c=n.selectedElements.filter(p=>p.removable).map(p=>p.id);t.keyCode!==46&&t.keyCode!==8||n.deleteElements(c);const u=t.ctrlKey||t.metaKey,d=t.shiftKey;if(!u||d||t.key.toLowerCase()!=="z"&&t.key.toLowerCase()!=="y"||(t.preventDefault(),n.history.undo()),u&&d&&(t.key.toLowerCase()==="z"||t.key.toLowerCase()==="y")&&(t.preventDefault(),n.history.redo()),u&&t.code==="KeyA"){t.preventDefault();const p=(s=n.activePage)===null||s===void 0?void 0:s.children.filter(f=>f.selectable),y=(p==null?void 0:p.map(f=>f.id))||[];n.selectElements(y)}u&&t.code==="KeyC"&&(t.preventDefault(),(0,r.copy)(n)),u&&t.code==="KeyX"&&(t.preventDefault(),(0,r.cut)(n)),u&&t.code==="KeyV"&&(t.preventDefault(),(0,r.paste)(n)),t.code==="ArrowDown"&&(t.preventDefault(),n.selectedShapes.forEach(p=>{p.draggable&&p.set({y:p.y+1})})),t.code==="ArrowUp"&&(t.preventDefault(),n.selectedShapes.forEach(p=>{p.draggable&&p.set({y:p.y-1})})),t.code==="ArrowLeft"&&(t.preventDefault(),n.selectedShapes.forEach(p=>{p.draggable&&p.set({x:p.x-1})})),t.code==="ArrowRight"&&(t.preventDefault(),n.selectedShapes.forEach(p=>{p.draggable&&p.set({x:p.x+1})}))};const r=sk()}(Zv)),Zv}var Jv={},q4;function uk(){return q4||(q4=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const r=qs,t=(0,r.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",filters:"Filters",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",strength:"Strength",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear",angle:"Angle"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Add file",uploadTip:"Upload your assets",background:"Background",resize:"Resize",layers:"Layers",animate:"Animate",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",clipImage:"Mask image",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"},contextMenu:{duplicate:"Duplicate",remove:"Remove",lock:"Lock",unlock:"Unlock",copy:"Copy",paste:"Paste",copyStyle:"Copy style",moveUp:"Move up",moveDown:"Move down",moveBack:"Move back",moveForward:"Move forward"}}),n=s=>s&&typeof s=="object";function a(s,c){Object.keys(c).forEach(u=>{const d=s[u],p=c[u];n(p)&&n(d)?a(d,p):s[u]=p})}function i(s,c,u=""){Object.keys(c).forEach(d=>{const p=c[d],y=u?`${u}.${d}`:d;n(p)?n(s[d])?i(s[d],p,y):console.warn(`Missing nested translation object at '${y}'`):s[d]===void 0&&console.warn(`Missing translation '${y}'`)})}e.setTranslations=(0,r.action)((s,{validate:c=!1}={})=>{c&&i(s,t),a(t,s)}),e.getTranslations=()=>(0,r.toJS)(t);const o={};e.t=s=>{const c=function(p,y){var f,_=y.split("."),S=p;for(f=0;f<_.length;++f){if(S[_[f]]==null)return;S=S[_[f]]}return S}(t,s);if(c!==void 0)return c;o[s]||(o[s]=!0,console.warn(`Missing translation '${s}'`));const u=s.split("."),d=u[u.length-1]||" ";return d.charAt(0).toUpperCase()+d.slice(1)}}(Jv)),Jv}var z4;function ck(){return z4||(z4=1,function(e){var r=Kh&&Kh.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=r(fi()),n=Us,a=r(ik()),i=ak(),o=ok(),s=lk(),c=uk(),u=({store:p})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,c.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{p.addPage()}},(0,c.t)("workspace.addPage"))),d=({width:p,height:y,xPadding:f,yPadding:_,backgroundColor:S})=>t.default.createElement("div",{style:{width:p+"px",height:y+"px",backgroundColor:S,paddingLeft:f+"px",paddingRight:f+"px",paddingTop:_+"px",paddingBottom:_+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:p,pageControlsEnabled:y,backgroundColor:f,pageBorderColor:_,activePageBorderColor:S,bleedColor:w,components:b,onKeyDown:g,paddingX:v,paddingY:E,altCloneEnabled:x=!0,visiblePagesOffset:j,renderOnlyActivePage:N})=>{var T;const F=v??20,C=E??55,[A,L]=t.default.useState({width:100,height:100}),O=t.default.useRef(A),I=t.default.useRef(null),M=t.default.useRef(null),G=p.bleedVisible?Math.max(0,...p.pages.map(Ne=>Ne.bleed)):0,W=Math.max(...p.pages.map(Ne=>Ne.computedWidth)),Y=Math.max(...p.pages.map(Ne=>Ne.computedHeight)),te=((T=p.activePage)===null||T===void 0?void 0:T.computedHeight)||0,V=W+2*G,H=(N?te:Y)+2*G,q=async({skipTimeout:Ne}={skipTimeout:!1})=>{if(Ne||await new Promise(ge=>setTimeout(ge,50)),I.current===null)return;const xe=I.current.getBoundingClientRect();xe.width!==0&&xe.height!==0||(console.warn(`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
417
|
-
Width or height of parent elements is equal 0.
|
|
418
|
-
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
419
|
-
For simpler debugging here is the log of the parent element:`),console.log(I.current));const ye=M.current.clientWidth||xe.width,Ie={width:ye,height:xe.height};(O.current.width!==Ie.width||O.current.height!==Ie.height)&&(L(Ie),O.current=Ie);const me=(ye-2*F)/V,_e=p.pages.length>1?3.1:2,Ae=(xe.height-C*_e)/H,Le=p.pages.length?Math.max(Math.min(me,Ae),.01):1;p.scaleToFit!==Le&&(p.setScale(Le),p._setScaleToFit(Le))};t.default.useLayoutEffect(()=>{q({skipTimeout:!0})},[]),t.default.useEffect(()=>{q()},[V,H]),t.default.useEffect(()=>{p.__()},[]),t.default.useEffect(()=>{const Ne=I.current;if(window.ResizeObserver){const xe=new ResizeObserver(()=>{q({skipTimeout:!0})});return xe.observe(Ne),()=>xe.unobserve(Ne)}{const xe=setInterval(()=>{q({skipTimeout:!0})},100);return()=>clearInterval(xe)}},[V,H]);const D=Math.max(F,(A.width-V*p.scale)/2),$=N?1:p.pages.length,ne=H*p.scale*$,Z=Math.max(C,(A.height-ne)/$/2);t.default.useEffect(()=>{const Ne=xe=>{(g||s.handleHotkey)(xe,p)};return window.addEventListener("keydown",Ne),()=>window.removeEventListener("keydown",Ne)},[]),t.default.useEffect(()=>{var Ne;const xe=ye=>{if(ye.ctrlKey||ye.metaKey){ye.preventDefault();const Ae=Math.max(5,p.scaleToFit),Le=Math.min(.1,p.scaleToFit),ge=.03,Te=(Ie=ye.deltaY<0?p.scale*(1+ge):p.scale/(1+ge),me=Le,_e=Ae,Math.max(me,Math.min(_e,Ie)));p.setScale(Te)}else var Ie,me,_e};return(Ne=M.current)===null||Ne===void 0||Ne.addEventListener("wheel",xe),()=>{var ye;return(ye=M.current)===null||ye===void 0?void 0:ye.removeEventListener("wheel",xe)}},[]);const Q=t.default.useRef(!1);((Ne,xe,ye,Ie,me,_e)=>{const Ae=t.default.useRef({width:xe,height:ye}),Le=t.default.useRef({top:0,left:0}),ge=t.default.useRef(!1),Te=t.default.useRef(me.pages.length);ge.current=Te.current!==me.pages.length,Te.current=me.pages.length,t.default.useEffect(()=>{const Fe=Ne.current,Ke=it=>{Le.current={top:Fe.scrollTop,left:Fe.scrollLeft}};return Fe.addEventListener("scroll",Ke),()=>{Fe.removeEventListener("scroll",Ke)}},[]),t.default.useLayoutEffect(()=>{if(!Ne.current||ge.current)return;const Fe=Ne.current,Ke=(Le.current.left+Fe.offsetWidth/2)/Ae.current.width,it=(Le.current.top+Fe.offsetHeight/2)/Ae.current.height;_e.current=!0,Fe.scrollLeft=Ke*xe-Fe.offsetWidth/2,Fe.scrollTop=it*ye-Fe.offsetHeight/2,Ae.current={width:xe,height:ye}},[Ie,xe,ye])})(M,V*p.scale+2*D,H*p.scale+2*Z,p.scale,p,Q);const{handleScroll:oe}=((Ne,xe,ye,Ie,me,_e)=>{const Ae=t.default.useRef(!1),Le=t.default.useRef(null),ge=t.default.useRef(!1);t.default.useEffect(()=>{const Fe=Ne.current,Ke=()=>{me.current};return Fe.addEventListener("scroll",Ke),()=>{Fe.removeEventListener("scroll",Ke)}},[]);const Te=ye.pages.indexOf(ye.activePage);return t.default.useLayoutEffect(()=>{if(_e||!ye.activePage||!Ne.current||Ae.current)return;const Fe=Ne.current,Ke=ye.pages.indexOf(ye.activePage)*xe;let it=()=>{};return(Math.abs(Ke-Fe.scrollTop)>.5*xe||ge.current)&&(ge.current=!0,it=(({element:rt,scrollTop:at=0,duration:bt=300,onFinish:yt=()=>{}})=>{const ht=rt.scrollTop,zt=at-ht;let Ot=0,Ut=!1;if(bt===0)return rt.scrollTop=at,()=>{};const $t=()=>{if(Ut)return;Ot+=20;const Me=Oe(Ot,ht,zt,bt);rt.scrollTop=Me,Ot<bt?setTimeout($t,20):yt()},Oe=(Me,mt,Mt,Lt)=>(Me/=Lt/2)<1?Mt/2*Me*Me+mt:-Mt/2*(--Me*(Me-2)-1)+mt;return $t(),()=>{Ut=!0}})({element:Fe,scrollTop:Ke,onFinish:()=>{ge.current=!1},duration:ye.isPlaying?0:300})),it},[ye.activePage,Te,ye.isPlaying,_e]),{handleScroll:Fe=>{if(_e||ge.current)return;Ae.current=!0,clearTimeout(Le.current),Le.current=setTimeout(()=>{Ae.current=!1},300);const Ke=Fe.currentTarget.childNodes[0].offsetHeight,it=Fe.currentTarget.scrollTop,rt=Math.floor((it+Ie.height/3)/Ke),at=ye.pages[rt];at&&ye.activePage!==at&&at.select()}}})(M,H*p.scale+2*Z,p,A,Q,N),se=A.width>=V*p.scale+2*D,ue=f||"rgba(232, 232, 232, 0.9)",ve=p.pages.indexOf(p.activePage),Pe=(b==null?void 0:b.NoPages)||u,ke=j??Math.min(3,Math.max(1,Math.ceil(A.height/2/(H*p.scale))));return t.default.createElement("div",{ref:I,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:ue,overflow:"hidden"},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:M,onScroll:oe,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:se?"hidden":"auto"},className:"polotno-workspace-inner"},p.pages.map((Ne,xe)=>{const ye=Ne===p.activePage;if(N&&!ye&&!Ne._exportingOrRendering&&!Ne._forceMount)return null;if(!(Math.abs(xe-ve)<=ke||Ne._exportingOrRendering||Ne._forceMount))return t.default.createElement(d,{key:Ne.id,width:V*p.scale+2*D,height:H*p.scale+2*Z,backgroundColor:ue,xPadding:D,yPadding:Z});const Ie=t.default.createElement(a.default,{key:Ne.id,page:Ne,xPadding:D,yPadding:Z,width:V*p.scale+2*D,height:H*p.scale+2*Z,store:p,pageControlsEnabled:y,backColor:ue,pageBorderColor:_||"lightgrey",activePageBorderColor:S||"rgb(0, 161, 255)",altCloneEnabled:x,bleedColor:w||"rgba(255, 0, 0, 0.1)",components:b,viewportSize:A});return(Ne._exportingOrRendering||Ne._forceMount)&&!ye&&N?t.default.createElement("div",{style:{display:"none"},key:Ne.id},Ie):Ie}),p.rulesVisible&&t.default.createElement(i.TopRules,{store:p,xPadding:D,yPadding:Z,width:V*p.scale+2*D,height:H*p.scale+2*Z}),p.pages.length===0&&t.default.createElement(Pe,{store:p}),p.audios.map(Ne=>t.default.createElement(o.AudioElement,{key:Ne.id,audio:Ne,store:p}))))}),e.default=e.WorkspaceCanvas}(Kh)),Kh}var fk=ck(),hk=Nm(),dk=If(),ip=gc(),e2=jf(),pk=Ih();const gk="modulepreload",vk=function(e,r){return new URL(e,r).href},U4={},P2=function(r,t,n){let a=Promise.resolve();if(t&&t.length>0){let o=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const s=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=o(t.map(d=>{if(d=vk(d,n),d in U4)return;U4[d]=!0;const p=d.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(!!n)for(let S=s.length-1;S>=0;S--){const w=s[S];if(w.href===d&&(!p||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${y}`))return;const _=document.createElement("link");if(_.rel=p?"stylesheet":gk,p||(_.as="script"),_.crossOrigin="",_.href=d,u&&_.setAttribute("nonce",u),document.head.appendChild(_),p)return new Promise((S,w)=>{_.addEventListener("load",S),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return a.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return r().catch(i)})};function Sn(e){"@babel/helpers - typeof";return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Sn(e)}var Po=Uint8Array,Ds=Uint16Array,Rm=Int32Array,u0=new Po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),c0=new Po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),O2=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l_=function(e,r){for(var t=new Ds(31),n=0;n<31;++n)t[n]=r+=1<<e[n-1];for(var a=new Rm(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)a[i]=i-t[n]<<5|n;return{b:t,r:a}},u_=l_(u0,2),c_=u_.b,A2=u_.r;c_[28]=258,A2[258]=28;var f_=l_(c0,0),mk=f_.b,H4=f_.r,C2=new Ds(32768);for(var Jn=0;Jn<32768;++Jn){var qc=(Jn&43690)>>1|(Jn&21845)<<1;qc=(qc&52428)>>2|(qc&13107)<<2,qc=(qc&61680)>>4|(qc&3855)<<4,C2[Jn]=((qc&65280)>>8|(qc&255)<<8)>>1}var Ru=function(e,r,t){for(var n=e.length,a=0,i=new Ds(r);a<n;++a)e[a]&&++i[e[a]-1];var o=new Ds(r);for(a=1;a<r;++a)o[a]=o[a-1]+i[a-1]<<1;var s;if(t){s=new Ds(1<<r);var c=15-r;for(a=0;a<n;++a)if(e[a])for(var u=a<<4|e[a],d=r-e[a],p=o[e[a]-1]++<<d,y=p|(1<<d)-1;p<=y;++p)s[C2[p]>>c]=u}else for(s=new Ds(n),a=0;a<n;++a)e[a]&&(s[a]=C2[o[e[a]-1]++]>>15-e[a]);return s},Xc=new Po(288);for(var Jn=0;Jn<144;++Jn)Xc[Jn]=8;for(var Jn=144;Jn<256;++Jn)Xc[Jn]=9;for(var Jn=256;Jn<280;++Jn)Xc[Jn]=7;for(var Jn=280;Jn<288;++Jn)Xc[Jn]=8;var vp=new Po(32);for(var Jn=0;Jn<32;++Jn)vp[Jn]=5;var yk=Ru(Xc,9,0),bk=Ru(Xc,9,1),wk=Ru(vp,5,0),_k=Ru(vp,5,1),t2=function(e){for(var r=e[0],t=1;t<e.length;++t)e[t]>r&&(r=e[t]);return r},Ul=function(e,r,t){var n=r/8|0;return(e[n]|e[n+1]<<8)>>(r&7)&t},r2=function(e,r){var t=r/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(r&7)},Mm=function(e){return(e+7)/8|0},h_=function(e,r,t){return(t==null||t>e.length)&&(t=e.length),new Po(e.subarray(r,t))},Sk=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Gl=function(e,r,t){var n=new Error(r||Sk[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Gl),!t)throw n;return n},xk=function(e,r,t,n){var a=e.length,i=0;if(!a||r.f&&!r.l)return t||new Po(0);var o=!t,s=o||r.i!=2,c=r.i;o&&(t=new Po(a*3));var u=function(ve){var Pe=t.length;if(ve>Pe){var ke=new Po(Math.max(Pe*2,ve));ke.set(t),t=ke}},d=r.f||0,p=r.p||0,y=r.b||0,f=r.l,_=r.d,S=r.m,w=r.n,b=a*8;do{if(!f){d=Ul(e,p,1);var g=Ul(e,p+1,3);if(p+=3,g)if(g==1)f=bk,_=_k,S=9,w=5;else if(g==2){var j=Ul(e,p,31)+257,N=Ul(e,p+10,15)+4,T=j+Ul(e,p+5,31)+1;p+=14;for(var F=new Po(T),C=new Po(19),A=0;A<N;++A)C[O2[A]]=Ul(e,p+A*3,7);p+=N*3;for(var L=t2(C),O=(1<<L)-1,I=Ru(C,L,1),A=0;A<T;){var M=I[Ul(e,p,O)];p+=M&15;var v=M>>4;if(v<16)F[A++]=v;else{var G=0,W=0;for(v==16?(W=3+Ul(e,p,3),p+=2,G=F[A-1]):v==17?(W=3+Ul(e,p,7),p+=3):v==18&&(W=11+Ul(e,p,127),p+=7);W--;)F[A++]=G}}var Y=F.subarray(0,j),te=F.subarray(j);S=t2(Y),w=t2(te),f=Ru(Y,S,1),_=Ru(te,w,1)}else Gl(1);else{var v=Mm(p)+4,E=e[v-4]|e[v-3]<<8,x=v+E;if(x>a){c&&Gl(0);break}s&&u(y+E),t.set(e.subarray(v,x),y),r.b=y+=E,r.p=p=x*8,r.f=d;continue}if(p>b){c&&Gl(0);break}}s&&u(y+131072);for(var V=(1<<S)-1,H=(1<<w)-1,q=p;;q=p){var G=f[r2(e,p)&V],D=G>>4;if(p+=G&15,p>b){c&&Gl(0);break}if(G||Gl(2),D<256)t[y++]=D;else if(D==256){q=p,f=null;break}else{var $=D-254;if(D>264){var A=D-257,ne=u0[A];$=Ul(e,p,(1<<ne)-1)+c_[A],p+=ne}var Z=_[r2(e,p)&H],Q=Z>>4;Z||Gl(3),p+=Z&15;var te=mk[Q];if(Q>3){var ne=c0[Q];te+=r2(e,p)&(1<<ne)-1,p+=ne}if(p>b){c&&Gl(0);break}s&&u(y+131072);var oe=y+$;if(y<te){var se=i-te,ue=Math.min(te,oe);for(se+y<0&&Gl(3);y<ue;++y)t[y]=n[se+y]}for(;y<oe;++y)t[y]=t[y-te]}}r.l=f,r.p=q,r.b=y,r.f=d,f&&(d=1,r.m=S,r.d=_,r.n=w)}while(!d);return y!=t.length&&o?h_(t,0,y):t.subarray(0,y)},lc=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8},tp=function(e,r,t){t<<=r&7;var n=r/8|0;e[n]|=t,e[n+1]|=t>>8,e[n+2]|=t>>16},n2=function(e,r){for(var t=[],n=0;n<e.length;++n)e[n]&&t.push({s:n,f:e[n]});var a=t.length,i=t.slice();if(!a)return{t:p_,l:0};if(a==1){var o=new Po(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(x,j){return x.f-j.f}),t.push({s:-1,f:25001});var s=t[0],c=t[1],u=0,d=1,p=2;for(t[0]={s:-1,f:s.f+c.f,l:s,r:c};d!=a-1;)s=t[t[u].f<t[p].f?u++:p++],c=t[u!=d&&t[u].f<t[p].f?u++:p++],t[d++]={s:-1,f:s.f+c.f,l:s,r:c};for(var y=i[0].s,n=1;n<a;++n)i[n].s>y&&(y=i[n].s);var f=new Ds(y+1),_=k2(t[d-1],f,0);if(_>r){var n=0,S=0,w=_-r,b=1<<w;for(i.sort(function(j,N){return f[N.s]-f[j.s]||j.f-N.f});n<a;++n){var g=i[n].s;if(f[g]>r)S+=b-(1<<_-f[g]),f[g]=r;else break}for(S>>=w;S>0;){var v=i[n].s;f[v]<r?S-=1<<r-f[v]++-1:++n}for(;n>=0&&S;--n){var E=i[n].s;f[E]==r&&(--f[E],++S)}_=r}return{t:new Po(f),l:_}},k2=function(e,r,t){return e.s==-1?Math.max(k2(e.l,r,t+1),k2(e.r,r,t+1)):r[e.s]=t},V4=function(e){for(var r=e.length;r&&!e[--r];);for(var t=new Ds(++r),n=0,a=e[0],i=1,o=function(c){t[n++]=c},s=1;s<=r;++s)if(e[s]==a&&s!=r)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=e[s]}return{c:t.subarray(0,n),n:r}},rp=function(e,r){for(var t=0,n=0;n<r.length;++n)t+=e[n]*r[n];return t},d_=function(e,r,t){var n=t.length,a=Mm(r+2);e[a]=n&255,e[a+1]=n>>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var i=0;i<n;++i)e[a+i+4]=t[i];return(a+4+n)*8},G4=function(e,r,t,n,a,i,o,s,c,u,d){lc(r,d++,t),++a[256];for(var p=n2(a,15),y=p.t,f=p.l,_=n2(i,15),S=_.t,w=_.l,b=V4(y),g=b.c,v=b.n,E=V4(S),x=E.c,j=E.n,N=new Ds(19),T=0;T<g.length;++T)++N[g[T]&31];for(var T=0;T<x.length;++T)++N[x[T]&31];for(var F=n2(N,7),C=F.t,A=F.l,L=19;L>4&&!C[O2[L-1]];--L);var O=u+5<<3,I=rp(a,Xc)+rp(i,vp)+o,M=rp(a,y)+rp(i,S)+o+14+3*L+rp(N,C)+2*N[16]+3*N[17]+7*N[18];if(c>=0&&O<=I&&O<=M)return d_(r,d,e.subarray(c,c+u));var G,W,Y,te;if(lc(r,d,1+(M<I)),d+=2,M<I){G=Ru(y,f,0),W=y,Y=Ru(S,w,0),te=S;var V=Ru(C,A,0);lc(r,d,v-257),lc(r,d+5,j-1),lc(r,d+10,L-4),d+=14;for(var T=0;T<L;++T)lc(r,d+3*T,C[O2[T]]);d+=3*L;for(var H=[g,x],q=0;q<2;++q)for(var D=H[q],T=0;T<D.length;++T){var $=D[T]&31;lc(r,d,V[$]),d+=C[$],$>15&&(lc(r,d,D[T]>>5&127),d+=D[T]>>12)}}else G=yk,W=Xc,Y=wk,te=vp;for(var T=0;T<s;++T){var ne=n[T];if(ne>255){var $=ne>>18&31;tp(r,d,G[$+257]),d+=W[$+257],$>7&&(lc(r,d,ne>>23&31),d+=u0[$]);var Z=ne&31;tp(r,d,Y[Z]),d+=te[Z],Z>3&&(tp(r,d,ne>>5&8191),d+=c0[Z])}else tp(r,d,G[ne]),d+=W[ne]}return tp(r,d,G[256]),d+W[256]},Ek=new Rm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),p_=new Po(0),Pk=function(e,r,t,n,a,i){var o=i.z||e.length,s=new Po(n+o+5*(1+Math.ceil(o/7e3))+a),c=s.subarray(n,s.length-a),u=i.l,d=(i.r||0)&7;if(r){d&&(c[0]=i.r>>3);for(var p=Ek[r-1],y=p>>13,f=p&8191,_=(1<<t)-1,S=i.p||new Ds(32768),w=i.h||new Ds(_+1),b=Math.ceil(t/3),g=2*b,v=function(Ne){return(e[Ne]^e[Ne+1]<<b^e[Ne+2]<<g)&_},E=new Rm(25e3),x=new Ds(288),j=new Ds(32),N=0,T=0,F=i.i||0,C=0,A=i.w||0,L=0;F+2<o;++F){var O=v(F),I=F&32767,M=w[O];if(S[I]=M,w[O]=I,A<=F){var G=o-F;if((N>7e3||C>24576)&&(G>423||!u)){d=G4(e,c,0,E,x,j,T,C,L,F-L,d),C=N=T=0,L=F;for(var W=0;W<286;++W)x[W]=0;for(var W=0;W<30;++W)j[W]=0}var Y=2,te=0,V=f,H=I-M&32767;if(G>2&&O==v(F-H))for(var q=Math.min(y,G)-1,D=Math.min(32767,F),$=Math.min(258,G);H<=D&&--V&&I!=M;){if(e[F+Y]==e[F+Y-H]){for(var ne=0;ne<$&&e[F+ne]==e[F+ne-H];++ne);if(ne>Y){if(Y=ne,te=H,ne>q)break;for(var Z=Math.min(H,ne-2),Q=0,W=0;W<Z;++W){var oe=F-H+W&32767,se=S[oe],ue=oe-se&32767;ue>Q&&(Q=ue,M=oe)}}}I=M,M=S[I],H+=I-M&32767}if(te){E[C++]=268435456|A2[Y]<<18|H4[te];var ve=A2[Y]&31,Pe=H4[te]&31;T+=u0[ve]+c0[Pe],++x[257+ve],++j[Pe],A=F+Y,++N}else E[C++]=e[F],++x[e[F]]}}for(F=Math.max(F,A);F<o;++F)E[C++]=e[F],++x[e[F]];d=G4(e,c,u,E,x,j,T,C,L,F-L,d),u||(i.r=d&7|c[d/8|0]<<3,d-=7,i.h=w,i.p=S,i.i=F,i.w=A)}else{for(var F=i.w||0;F<o+u;F+=65535){var ke=F+65535;ke>=o&&(c[d/8|0]=u,ke=o),d=d_(c,d+1,e.subarray(F,ke))}i.i=o}return h_(s,0,n+Mm(d)+a)},g_=function(){var e=1,r=0;return{p:function(t){for(var n=e,a=r,i=t.length|0,o=0;o!=i;){for(var s=Math.min(o+2655,i);o<s;++o)a+=n+=t[o];n=(n&65535)+15*(n>>16),a=(a&65535)+15*(a>>16)}e=n,r=a},d:function(){return e%=65521,r%=65521,(e&255)<<24|(e&65280)<<8|(r&255)<<8|r>>8}}},Ok=function(e,r,t,n,a){if(!a&&(a={l:1},r.dictionary)){var i=r.dictionary.subarray(-32768),o=new Po(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return Pk(e,r.level==null?6:r.level,r.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+r.mem,t,n,a)},v_=function(e,r,t){for(;t;++r)e[r]=t,t>>>=8},Ak=function(e,r){var t=r.level,n=t==0?0:t<6?1:t==9?3:2;if(e[0]=120,e[1]=n<<6|(r.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,r.dictionary){var a=g_();a.p(r.dictionary),v_(e,2,a.d())}},Ck=function(e,r){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Gl(6,"invalid zlib data"),(e[1]>>5&1)==1&&Gl(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function L2(e,r){r||(r={});var t=g_();t.p(e);var n=Ok(e,r,r.dictionary?6:2,4);return Ak(n,r),v_(n,n.length-4,t.d()),n}function kk(e,r){return xk(e.subarray(Ck(e),-4),{i:2},r,r)}var Lk=typeof TextDecoder<"u"&&new TextDecoder,Nk=0;try{Lk.decode(p_,{stream:!0}),Nk=1}catch{}var pr=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function i2(){pr.console&&typeof pr.console.log=="function"&&pr.console.log.apply(pr.console,arguments)}var Un={log:i2,warn:function(e){pr.console&&(typeof pr.console.warn=="function"?pr.console.warn.apply(pr.console,arguments):i2.call(null,arguments))},error:function(e){pr.console&&(typeof pr.console.error=="function"?pr.console.error.apply(pr.console,arguments):i2(e))}};function a2(e,r,t){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){_f(n.response,r,t)},n.onerror=function(){Un.error("could not download file")},n.send()}function W4(e){var r=new XMLHttpRequest;r.open("HEAD",e,!1);try{r.send()}catch{}return r.status>=200&&r.status<=299}function c1(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}var up,N2,_f=pr.saveAs||((typeof window>"u"?"undefined":Sn(window))!=="object"||window!==pr?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,r,t){var n=pr.URL||pr.webkitURL,a=document.createElement("a");r=r||e.name||"download",a.download=r,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin!==location.origin?W4(a.href)?a2(e,r,t):c1(a,a.target="_blank"):c1(a)):(a.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(a.href)},4e4),setTimeout(function(){c1(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,t){if(r=r||e.name||"download",typeof e=="string")if(W4(e))a2(e,r,t);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){c1(n)})}else navigator.msSaveOrOpenBlob(function(a,i){return i===void 0?i={autoBom:!1}:Sn(i)!=="object"&&(Un.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}(e,t),r)}:function(e,r,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return a2(e,r,t);var a=e.type==="application/octet-stream",i=/constructor/i.test(pr.HTMLElement)||pr.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||a&&i)&&(typeof FileReader>"u"?"undefined":Sn(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var d=s.result;d=o?d:d.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=d:location=d,n=null},s.readAsDataURL(e)}else{var c=pr.URL||pr.webkitURL,u=c.createObjectURL(e);n?n.location=u:location.href=u,n=null,setTimeout(function(){c.revokeObjectURL(u)},4e4)}});/**
|
|
420
|
-
* A class to parse color values
|
|
421
|
-
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
422
|
-
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
423
|
-
* @license Use it if you like it
|
|
424
|
-
*/function m_(e){var r;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],n=0;n<t.length;n++){var a=t[n].re,i=t[n].process,o=a.exec(e);o&&(r=i(o),this.r=r[0],this.g=r[1],this.b=r[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),c=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),"#"+s+c+u}}/**
|
|
425
|
-
* @license
|
|
426
|
-
* Joseph Myers does not specify a particular license for his work.
|
|
427
|
-
*
|
|
428
|
-
* Author: Joseph Myers
|
|
429
|
-
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
430
|
-
*
|
|
431
|
-
* Modified by: Owen Leong
|
|
432
|
-
*/function o2(e,r){var t=e[0],n=e[1],a=e[2],i=e[3];t=_o(t,n,a,i,r[0],7,-680876936),i=_o(i,t,n,a,r[1],12,-389564586),a=_o(a,i,t,n,r[2],17,606105819),n=_o(n,a,i,t,r[3],22,-1044525330),t=_o(t,n,a,i,r[4],7,-176418897),i=_o(i,t,n,a,r[5],12,1200080426),a=_o(a,i,t,n,r[6],17,-1473231341),n=_o(n,a,i,t,r[7],22,-45705983),t=_o(t,n,a,i,r[8],7,1770035416),i=_o(i,t,n,a,r[9],12,-1958414417),a=_o(a,i,t,n,r[10],17,-42063),n=_o(n,a,i,t,r[11],22,-1990404162),t=_o(t,n,a,i,r[12],7,1804603682),i=_o(i,t,n,a,r[13],12,-40341101),a=_o(a,i,t,n,r[14],17,-1502002290),t=So(t,n=_o(n,a,i,t,r[15],22,1236535329),a,i,r[1],5,-165796510),i=So(i,t,n,a,r[6],9,-1069501632),a=So(a,i,t,n,r[11],14,643717713),n=So(n,a,i,t,r[0],20,-373897302),t=So(t,n,a,i,r[5],5,-701558691),i=So(i,t,n,a,r[10],9,38016083),a=So(a,i,t,n,r[15],14,-660478335),n=So(n,a,i,t,r[4],20,-405537848),t=So(t,n,a,i,r[9],5,568446438),i=So(i,t,n,a,r[14],9,-1019803690),a=So(a,i,t,n,r[3],14,-187363961),n=So(n,a,i,t,r[8],20,1163531501),t=So(t,n,a,i,r[13],5,-1444681467),i=So(i,t,n,a,r[2],9,-51403784),a=So(a,i,t,n,r[7],14,1735328473),t=xo(t,n=So(n,a,i,t,r[12],20,-1926607734),a,i,r[5],4,-378558),i=xo(i,t,n,a,r[8],11,-2022574463),a=xo(a,i,t,n,r[11],16,1839030562),n=xo(n,a,i,t,r[14],23,-35309556),t=xo(t,n,a,i,r[1],4,-1530992060),i=xo(i,t,n,a,r[4],11,1272893353),a=xo(a,i,t,n,r[7],16,-155497632),n=xo(n,a,i,t,r[10],23,-1094730640),t=xo(t,n,a,i,r[13],4,681279174),i=xo(i,t,n,a,r[0],11,-358537222),a=xo(a,i,t,n,r[3],16,-722521979),n=xo(n,a,i,t,r[6],23,76029189),t=xo(t,n,a,i,r[9],4,-640364487),i=xo(i,t,n,a,r[12],11,-421815835),a=xo(a,i,t,n,r[15],16,530742520),t=Eo(t,n=xo(n,a,i,t,r[2],23,-995338651),a,i,r[0],6,-198630844),i=Eo(i,t,n,a,r[7],10,1126891415),a=Eo(a,i,t,n,r[14],15,-1416354905),n=Eo(n,a,i,t,r[5],21,-57434055),t=Eo(t,n,a,i,r[12],6,1700485571),i=Eo(i,t,n,a,r[3],10,-1894986606),a=Eo(a,i,t,n,r[10],15,-1051523),n=Eo(n,a,i,t,r[1],21,-2054922799),t=Eo(t,n,a,i,r[8],6,1873313359),i=Eo(i,t,n,a,r[15],10,-30611744),a=Eo(a,i,t,n,r[6],15,-1560198380),n=Eo(n,a,i,t,r[13],21,1309151649),t=Eo(t,n,a,i,r[4],6,-145523070),i=Eo(i,t,n,a,r[11],10,-1120210379),a=Eo(a,i,t,n,r[2],15,718787259),n=Eo(n,a,i,t,r[9],21,-343485551),e[0]=Vc(t,e[0]),e[1]=Vc(n,e[1]),e[2]=Vc(a,e[2]),e[3]=Vc(i,e[3])}function f0(e,r,t,n,a,i){return r=Vc(Vc(r,e),Vc(n,i)),Vc(r<<a|r>>>32-a,t)}function _o(e,r,t,n,a,i,o){return f0(r&t|~r&n,e,r,a,i,o)}function So(e,r,t,n,a,i,o){return f0(r&n|t&~n,e,r,a,i,o)}function xo(e,r,t,n,a,i,o){return f0(r^t^n,e,r,a,i,o)}function Eo(e,r,t,n,a,i,o){return f0(t^(r|~n),e,r,a,i,o)}function y_(e){var r,t=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=e.length;r+=64)o2(n,Tk(e.substring(r-64,r)));e=e.substring(r-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<e.length;r++)a[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(a[r>>2]|=128<<(r%4<<3),r>55)for(o2(n,a),r=0;r<16;r++)a[r]=0;return a[14]=8*t,o2(n,a),n}function Tk(e){var r,t=[];for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}up=pr.atob.bind(pr),N2=pr.btoa.bind(pr);var $4="0123456789abcdef".split("");function Rk(e){for(var r="",t=0;t<4;t++)r+=$4[e>>8*t+4&15]+$4[e>>8*t&15];return r}function Mk(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function T2(e){return y_(e).map(Mk).join("")}var Ik=function(e){for(var r=0;r<e.length;r++)e[r]=Rk(e[r]);return e.join("")}(y_("hello"))!="5d41402abc4b2a76b9719d911017c592";function Vc(e,r){if(Ik){var t=(65535&e)+(65535&r);return(e>>16)+(r>>16)+(t>>16)<<16|65535&t}return e+r&4294967295}/**
|
|
433
|
-
* @license
|
|
434
|
-
* FPDF is released under a permissive license: there is no usage restriction.
|
|
435
|
-
* You may embed it freely in your application (commercial or not), with or
|
|
436
|
-
* without modifications.
|
|
437
|
-
*
|
|
438
|
-
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
439
|
-
*/function R2(e,r){var t,n,a,i;if(e!==t){for(var o=(a=e,i=1+(256/e.length>>0),new Array(i+1).join(a)),s=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var d=s[c];u=(u+d+o.charCodeAt(c))%256,s[c]=s[u],s[u]=d}t=e,n=s}else s=n;var p=r.length,y=0,f=0,_="";for(c=0;c<p;c++)f=(f+(d=s[y=(y+1)%256]))%256,s[y]=s[f],s[f]=d,o=s[(s[y]+s[f])%256],_+=String.fromCharCode(r.charCodeAt(c)^o);return _}/**
|
|
440
|
-
* @license
|
|
441
|
-
* Licensed under the MIT License.
|
|
442
|
-
* http://opensource.org/licenses/mit-license
|
|
443
|
-
* Author: Owen Leong (@owenl131)
|
|
444
|
-
* Date: 15 Oct 2020
|
|
445
|
-
* References:
|
|
446
|
-
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
447
|
-
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
448
|
-
* http://www.fpdf.org/en/script/script37.php
|
|
449
|
-
*/var Y4={print:4,modify:8,copy:16,"annot-forms":32};function lh(e,r,t,n){this.v=1,this.r=2;var a=192;e.forEach(function(s){if(Y4.perm!==void 0)throw new Error("Invalid permission: "+s);a+=Y4[s]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(r+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^a)),this.encryptionKey=T2(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=R2(this.encryptionKey,this.padding)}function uh(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var r="",t=e.length,n=0;n<t;n++){var a=e.charCodeAt(n);a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?r+="#"+("0"+a.toString(16)).slice(-2):r+=e[n]}return r}function X4(e){if(Sn(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(t,n,a){if(a=a||!1,typeof t!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[n,!!a],i},this.unsubscribe=function(t){for(var n in r)if(r[n][t])return delete r[n][t],Object.keys(r[n]).length===0&&delete r[n],!0;return!1},this.publish=function(t){if(r.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var i in r[t]){var o=r[t][i];try{o[0].apply(e,n)}catch(s){pr.console&&Un.error("jsPDF PubSub Error",s.message,s)}o[1]&&a.push(i)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function D1(e){if(!(this instanceof D1))return new D1(e);var r="opacity,stroke-opacity".split(",");for(var t in e)e.hasOwnProperty(t)&&r.indexOf(t)>=0&&(this[t]=e[t]);this.id="",this.objectNumber=-1}function b_(e,r){this.gState=e,this.matrix=r,this.id="",this.objectNumber=-1}function Sf(e,r,t,n,a){if(!(this instanceof Sf))return new Sf(e,r,t,n,a);this.type=e==="axial"?2:3,this.coords=r,this.colors=t,b_.call(this,n,a)}function dh(e,r,t,n,a){if(!(this instanceof dh))return new dh(e,r,t,n,a);this.boundingBox=e,this.xStep=r,this.yStep=t,this.stream="",this.cloneIndex=0,b_.call(this,n,a)}function hr(e){var r,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],i=arguments[3],o=[],s=1,c=16,u="S",d=null;Sn(e=e||{})==="object"&&(t=e.orientation,n=e.unit||n,a=e.format||a,i=e.compress||e.compressPdf||i,(d=e.encryption||null)!==null&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),s=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(r=e.precision),e.floatPrecision!==void 0&&(c=e.floatPrecision),u=e.defaultPathOperation||"S"),o=e.filters||(i===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var p=e.putOnlyUsedFonts||!1,y={},f={internal:{},__private__:{}};f.__private__.PubSub=X4;var _="1.3",S=f.__private__.getPdfVersion=function(){return _};f.__private__.setPdfVersion=function(X){_=X};var w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return w};var b=f.__private__.getPageFormat=function(X){return w[X]};a=a||"a4";var g={COMPAT:"compat",ADVANCED:"advanced"},v=g.COMPAT;function E(){this.saveGraphicsState(),ye(new Ye(ht,0,0,-ht,0,Ko()*ht).toString()+" cm"),this.setFontSize(this.getFontSize()/ht),u="n",v=g.ADVANCED}function x(){this.restoreGraphicsState(),u="S",v=g.COMPAT}var j=f.__private__.combineFontStyleAndFontWeight=function(X,fe){if(X=="bold"&&fe=="normal"||X=="bold"&&fe==400||X=="normal"&&fe=="italic"||X=="bold"&&fe=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return fe&&(X=fe==400||fe==="normal"?X==="italic"?"italic":"normal":fe!=700&&fe!=="bold"||X!=="normal"?(fe==700?"bold":fe)+""+X:"bold"),X};f.advancedAPI=function(X){var fe=v===g.COMPAT;return fe&&E.call(this),typeof X!="function"||(X(this),fe&&x.call(this)),this},f.compatAPI=function(X){var fe=v===g.ADVANCED;return fe&&x.call(this),typeof X!="function"||(X(this),fe&&E.call(this)),this},f.isAdvancedAPI=function(){return v===g.ADVANCED};var N,T=function(X){if(v!==g.ADVANCED)throw new Error(X+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},F=f.roundToPrecision=f.__private__.roundToPrecision=function(X,fe){var Ce=r||fe;if(isNaN(X)||isNaN(Ce))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return X.toFixed(Ce).replace(/0+$/,"")};N=f.hpf=f.__private__.hpf=typeof c=="number"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return F(X,c)}:c==="smart"?function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return F(X,X>-1&&X<1?16:5)}:function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.hpf");return F(X,16)};var C=f.f2=f.__private__.f2=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f2");return F(X,2)},A=f.__private__.f3=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.f3");return F(X,3)},L=f.scale=f.__private__.scale=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.scale");return v===g.COMPAT?X*ht:v===g.ADVANCED?X:void 0},O=function(X){return v===g.COMPAT?Ko()-X:v===g.ADVANCED?X:void 0},I=function(X){return L(O(X))};f.__private__.setPrecision=f.setPrecision=function(X){typeof parseInt(X,10)=="number"&&(r=parseInt(X,10))};var M,G="00000000000000000000000000000000",W=f.__private__.getFileId=function(){return G},Y=f.__private__.setFileId=function(X){return G=X!==void 0&&/^[a-fA-F0-9]{32}$/.test(X)?X.toUpperCase():G.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),d!==null&&(fn=new lh(d.userPermissions,d.userPassword,d.ownerPassword,G)),G};f.setFileId=function(X){return Y(X),this},f.getFileId=function(){return W()};var te=f.__private__.convertDateToPDFDate=function(X){var fe=X.getTimezoneOffset(),Ce=fe<0?"+":"-",De=Math.floor(Math.abs(fe/60)),et=Math.abs(fe%60),ft=[Ce,$(De),"'",$(et),"'"].join("");return["D:",X.getFullYear(),$(X.getMonth()+1),$(X.getDate()),$(X.getHours()),$(X.getMinutes()),$(X.getSeconds()),ft].join("")},V=f.__private__.convertPDFDateToDate=function(X){var fe=parseInt(X.substr(2,4),10),Ce=parseInt(X.substr(6,2),10)-1,De=parseInt(X.substr(8,2),10),et=parseInt(X.substr(10,2),10),ft=parseInt(X.substr(12,2),10),St=parseInt(X.substr(14,2),10);return new Date(fe,Ce,De,et,ft,St,0)},H=f.__private__.setCreationDate=function(X){var fe;if(X===void 0&&(X=new Date),X instanceof Date)fe=te(X);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(X))throw new Error("Invalid argument passed to jsPDF.setCreationDate");fe=X}return M=fe},q=f.__private__.getCreationDate=function(X){var fe=M;return X==="jsDate"&&(fe=V(M)),fe};f.setCreationDate=function(X){return H(X),this},f.getCreationDate=function(X){return q(X)};var D,$=f.__private__.padd2=function(X){return("0"+parseInt(X)).slice(-2)},ne=f.__private__.padd2Hex=function(X){return("00"+(X=X.toString())).substr(X.length)},Z=0,Q=[],oe=[],se=0,ue=[],ve=[],Pe=!1,ke=oe,Ne=function(){Z=0,se=0,oe=[],Q=[],ue=[],ti=rr(),Vn=rr()};f.__private__.setCustomOutputDestination=function(X){Pe=!0,ke=X};var xe=function(X){Pe||(ke=X)};f.__private__.resetCustomOutputDestination=function(){Pe=!1,ke=oe};var ye=f.__private__.out=function(X){return X=X.toString(),se+=X.length+1,ke.push(X),ke},Ie=f.__private__.write=function(X){return ye(arguments.length===1?X.toString():Array.prototype.join.call(arguments," "))},me=f.__private__.getArrayBuffer=function(X){for(var fe=X.length,Ce=new ArrayBuffer(fe),De=new Uint8Array(Ce);fe--;)De[fe]=X.charCodeAt(fe);return Ce},_e=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return _e};var Ae=e.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(X){return Ae=v===g.ADVANCED?X/ht:X,this};var Le,ge=f.__private__.getFontSize=f.getFontSize=function(){return v===g.COMPAT?Ae:Ae*ht},Te=e.R2L||!1;f.__private__.setR2L=f.setR2L=function(X){return Te=X,this},f.__private__.getR2L=f.getR2L=function(){return Te};var Fe,Ke=f.__private__.setZoomMode=function(X){var fe=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(X))Le=X;else if(isNaN(X)){if(fe.indexOf(X)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+X+'" is not recognized.');Le=X}else Le=parseInt(X,10)};f.__private__.getZoomMode=function(){return Le};var it,rt=f.__private__.setPageMode=function(X){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(X)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+X+'" is not recognized.');Fe=X};f.__private__.getPageMode=function(){return Fe};var at=f.__private__.setLayoutMode=function(X){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(X)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+X+'" is not recognized.');it=X};f.__private__.getLayoutMode=function(){return it},f.__private__.setDisplayMode=f.setDisplayMode=function(X,fe,Ce){return Ke(X),at(fe),rt(Ce),this};var bt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(X){if(Object.keys(bt).indexOf(X)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return bt[X]},f.__private__.getDocumentProperties=function(){return bt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(X){for(var fe in bt)bt.hasOwnProperty(fe)&&X[fe]&&(bt[fe]=X[fe]);return this},f.__private__.setDocumentProperty=function(X,fe){if(Object.keys(bt).indexOf(X)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return bt[X]=fe};var yt,ht,zt,Ot,Ut,$t={},Oe={},Me=[],mt={},Mt={},Lt={},At={},fr=null,Qt=0,ze=[],qe=new X4(f),vt=e.hotfixes||[],pt={},Je={},_t=[],Ye=function X(fe,Ce,De,et,ft,St){if(!(this instanceof X))return new X(fe,Ce,De,et,ft,St);isNaN(fe)&&(fe=1),isNaN(Ce)&&(Ce=0),isNaN(De)&&(De=0),isNaN(et)&&(et=1),isNaN(ft)&&(ft=0),isNaN(St)&&(St=0),this._matrix=[fe,Ce,De,et,ft,St]};Object.defineProperty(Ye.prototype,"sx",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Ye.prototype,"shy",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Ye.prototype,"shx",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Ye.prototype,"sy",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Ye.prototype,"tx",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Ye.prototype,"ty",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Ye.prototype,"a",{get:function(){return this._matrix[0]},set:function(X){this._matrix[0]=X}}),Object.defineProperty(Ye.prototype,"b",{get:function(){return this._matrix[1]},set:function(X){this._matrix[1]=X}}),Object.defineProperty(Ye.prototype,"c",{get:function(){return this._matrix[2]},set:function(X){this._matrix[2]=X}}),Object.defineProperty(Ye.prototype,"d",{get:function(){return this._matrix[3]},set:function(X){this._matrix[3]=X}}),Object.defineProperty(Ye.prototype,"e",{get:function(){return this._matrix[4]},set:function(X){this._matrix[4]=X}}),Object.defineProperty(Ye.prototype,"f",{get:function(){return this._matrix[5]},set:function(X){this._matrix[5]=X}}),Object.defineProperty(Ye.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ye.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ye.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ye.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ye.prototype.join=function(X){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(N).join(X)},Ye.prototype.multiply=function(X){var fe=X.sx*this.sx+X.shy*this.shx,Ce=X.sx*this.shy+X.shy*this.sy,De=X.shx*this.sx+X.sy*this.shx,et=X.shx*this.shy+X.sy*this.sy,ft=X.tx*this.sx+X.ty*this.shx+this.tx,St=X.tx*this.shy+X.ty*this.sy+this.ty;return new Ye(fe,Ce,De,et,ft,St)},Ye.prototype.decompose=function(){var X=this.sx,fe=this.shy,Ce=this.shx,De=this.sy,et=this.tx,ft=this.ty,St=Math.sqrt(X*X+fe*fe),Ft=(X/=St)*Ce+(fe/=St)*De;Ce-=X*Ft,De-=fe*Ft;var nr=Math.sqrt(Ce*Ce+De*De);return Ft/=nr,X*(De/=nr)<fe*(Ce/=nr)&&(X=-X,fe=-fe,Ft=-Ft,St=-St),{scale:new Ye(St,0,0,nr,0,0),translate:new Ye(1,0,0,1,et,ft),rotate:new Ye(X,fe,-fe,X,0,0),skew:new Ye(1,0,Ft,1,0,0)}},Ye.prototype.toString=function(X){return this.join(" ")},Ye.prototype.inversed=function(){var X=this.sx,fe=this.shy,Ce=this.shx,De=this.sy,et=this.tx,ft=this.ty,St=1/(X*De-fe*Ce),Ft=De*St,nr=-fe*St,gr=-Ce*St,dr=X*St;return new Ye(Ft,nr,gr,dr,-Ft*et-gr*ft,-nr*et-dr*ft)},Ye.prototype.applyToPoint=function(X){var fe=X.x*this.sx+X.y*this.shx+this.tx,Ce=X.x*this.shy+X.y*this.sy+this.ty;return new Gn(fe,Ce)},Ye.prototype.applyToRectangle=function(X){var fe=this.applyToPoint(X),Ce=this.applyToPoint(new Gn(X.x+X.w,X.y+X.h));return new pi(fe.x,fe.y,Ce.x-fe.x,Ce.y-fe.y)},Ye.prototype.clone=function(){var X=this.sx,fe=this.shy,Ce=this.shx,De=this.sy,et=this.tx,ft=this.ty;return new Ye(X,fe,Ce,De,et,ft)},f.Matrix=Ye;var Pt=f.matrixMult=function(X,fe){return fe.multiply(X)},Dt=new Ye(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Dt;var Wt=function(X,fe){if(!Mt[X]){var Ce=(fe instanceof Sf?"Sh":"P")+(Object.keys(mt).length+1).toString(10);fe.id=Ce,Mt[X]=Ce,mt[Ce]=fe,qe.publish("addPattern",fe)}};f.ShadingPattern=Sf,f.TilingPattern=dh,f.addShadingPattern=function(X,fe){return T("addShadingPattern()"),Wt(X,fe),this},f.beginTilingPattern=function(X){T("beginTilingPattern()"),Qs(X.boundingBox[0],X.boundingBox[1],X.boundingBox[2]-X.boundingBox[0],X.boundingBox[3]-X.boundingBox[1],X.matrix)},f.endTilingPattern=function(X,fe){T("endTilingPattern()"),fe.stream=ve[D].join(`
|
|
450
|
-
`),Wt(X,fe),qe.publish("endTilingPattern",fe),_t.pop().restore()};var Zt=f.__private__.newObject=function(){var X=rr();return _r(X,!0),X},rr=f.__private__.newObjectDeferred=function(){return Z++,Q[Z]=function(){return se},Z},_r=function(X,fe){return fe=typeof fe=="boolean"&&fe,Q[X]=se,fe&&ye(X+" 0 obj"),X},Hn=f.__private__.newAdditionalObject=function(){var X={objId:rr(),content:""};return ue.push(X),X},ti=rr(),Vn=rr(),Ci=f.__private__.decodeColorString=function(X){var fe=X.split(" ");if(fe.length!==2||fe[1]!=="g"&&fe[1]!=="G")fe.length===5&&(fe[4]==="k"||fe[4]==="K")&&(fe=[(1-fe[0])*(1-fe[3]),(1-fe[1])*(1-fe[3]),(1-fe[2])*(1-fe[3]),"r"]);else{var Ce=parseFloat(fe[0]);fe=[Ce,Ce,Ce,"r"]}for(var De="#",et=0;et<3;et++)De+=("0"+Math.floor(255*parseFloat(fe[et])).toString(16)).slice(-2);return De},En=f.__private__.encodeColorString=function(X){var fe;typeof X=="string"&&(X={ch1:X});var Ce=X.ch1,De=X.ch2,et=X.ch3,ft=X.ch4,St=X.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Ce=="string"&&Ce.charAt(0)!=="#"){var Ft=new m_(Ce);if(Ft.ok)Ce=Ft.toHex();else if(!/^\d*\.?\d*$/.test(Ce))throw new Error('Invalid color "'+Ce+'" passed to jsPDF.encodeColorString.')}if(typeof Ce=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Ce)&&(Ce="#"+Ce[1]+Ce[1]+Ce[2]+Ce[2]+Ce[3]+Ce[3]),typeof Ce=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Ce)){var nr=parseInt(Ce.substr(1),16);Ce=nr>>16&255,De=nr>>8&255,et=255&nr}if(De===void 0||ft===void 0&&Ce===De&&De===et)if(typeof Ce=="string")fe=Ce+" "+St[0];else switch(X.precision){case 2:fe=C(Ce/255)+" "+St[0];break;case 3:default:fe=A(Ce/255)+" "+St[0]}else if(ft===void 0||Sn(ft)==="object"){if(ft&&!isNaN(ft.a)&&ft.a===0)return fe=["1.","1.","1.",St[1]].join(" ");if(typeof Ce=="string")fe=[Ce,De,et,St[1]].join(" ");else switch(X.precision){case 2:fe=[C(Ce/255),C(De/255),C(et/255),St[1]].join(" ");break;default:case 3:fe=[A(Ce/255),A(De/255),A(et/255),St[1]].join(" ")}}else if(typeof Ce=="string")fe=[Ce,De,et,ft,St[2]].join(" ");else switch(X.precision){case 2:fe=[C(Ce),C(De),C(et),C(ft),St[2]].join(" ");break;case 3:default:fe=[A(Ce),A(De),A(et),A(ft),St[2]].join(" ")}return fe},ki=f.__private__.getFilters=function(){return o},bi=f.__private__.putStream=function(X){var fe=(X=X||{}).data||"",Ce=X.filters||ki(),De=X.alreadyAppliedFilters||[],et=X.addLength1||!1,ft=fe.length,St=X.objectId,Ft=function(Kn){return Kn};if(d!==null&&St===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");d!==null&&(Ft=fn.encryptor(St,0));var nr={};Ce===!0&&(Ce=["FlateEncode"]);var gr=X.additionalKeyValues||[],dr=(nr=hr.API.processDataByFilters!==void 0?hr.API.processDataByFilters(fe,Ce):{data:fe,reverseChain:[]}).reverseChain+(Array.isArray(De)?De.join(" "):De.toString());if(nr.data.length!==0&&(gr.push({key:"Length",value:nr.data.length}),et===!0&&gr.push({key:"Length1",value:ft})),dr.length!=0)if(dr.split("/").length-1==1)gr.push({key:"Filter",value:dr});else{gr.push({key:"Filter",value:"["+dr+"]"});for(var Sr=0;Sr<gr.length;Sr+=1)if(gr[Sr].key==="DecodeParms"){for(var Pn=[],yn=0;yn<nr.reverseChain.split("/").length-1;yn+=1)Pn.push("null");Pn.push(gr[Sr].value),gr[Sr].value="["+Pn.join(" ")+"]"}}ye("<<");for(var Rn=0;Rn<gr.length;Rn++)ye("/"+gr[Rn].key+" "+gr[Rn].value);ye(">>"),nr.data.length!==0&&(ye("stream"),ye(Ft(nr.data)),ye("endstream"))},_a=f.__private__.putPage=function(X){var fe=X.number,Ce=X.data,De=X.objId,et=X.contentsObjId;_r(De,!0),ye("<</Type /Page"),ye("/Parent "+X.rootDictionaryObjId+" 0 R"),ye("/Resources "+X.resourceDictionaryObjId+" 0 R"),ye("/MediaBox ["+parseFloat(N(X.mediaBox.bottomLeftX))+" "+parseFloat(N(X.mediaBox.bottomLeftY))+" "+N(X.mediaBox.topRightX)+" "+N(X.mediaBox.topRightY)+"]"),X.cropBox!==null&&ye("/CropBox ["+N(X.cropBox.bottomLeftX)+" "+N(X.cropBox.bottomLeftY)+" "+N(X.cropBox.topRightX)+" "+N(X.cropBox.topRightY)+"]"),X.bleedBox!==null&&ye("/BleedBox ["+N(X.bleedBox.bottomLeftX)+" "+N(X.bleedBox.bottomLeftY)+" "+N(X.bleedBox.topRightX)+" "+N(X.bleedBox.topRightY)+"]"),X.trimBox!==null&&ye("/TrimBox ["+N(X.trimBox.bottomLeftX)+" "+N(X.trimBox.bottomLeftY)+" "+N(X.trimBox.topRightX)+" "+N(X.trimBox.topRightY)+"]"),X.artBox!==null&&ye("/ArtBox ["+N(X.artBox.bottomLeftX)+" "+N(X.artBox.bottomLeftY)+" "+N(X.artBox.topRightX)+" "+N(X.artBox.topRightY)+"]"),typeof X.userUnit=="number"&&X.userUnit!==1&&ye("/UserUnit "+X.userUnit),qe.publish("putPage",{objId:De,pageContext:ze[fe],pageNumber:fe,page:Ce}),ye("/Contents "+et+" 0 R"),ye(">>"),ye("endobj");var ft=Ce.join(`
|
|
451
|
-
`);return v===g.ADVANCED&&(ft+=`
|
|
452
|
-
Q`),_r(et,!0),bi({data:ft,filters:ki(),objectId:et}),ye("endobj"),De},ua=f.__private__.putPages=function(){var X,fe,Ce=[];for(X=1;X<=Qt;X++)ze[X].objId=rr(),ze[X].contentsObjId=rr();for(X=1;X<=Qt;X++)Ce.push(_a({number:X,data:ve[X],objId:ze[X].objId,contentsObjId:ze[X].contentsObjId,mediaBox:ze[X].mediaBox,cropBox:ze[X].cropBox,bleedBox:ze[X].bleedBox,trimBox:ze[X].trimBox,artBox:ze[X].artBox,userUnit:ze[X].userUnit,rootDictionaryObjId:ti,resourceDictionaryObjId:Vn}));_r(ti,!0),ye("<</Type /Pages");var De="/Kids [";for(fe=0;fe<Qt;fe++)De+=Ce[fe]+" 0 R ";ye(De+"]"),ye("/Count "+Qt),ye(">>"),ye("endobj"),qe.publish("postPutPages")},ao=function(X){qe.publish("putFont",{font:X,out:ye,newObject:Zt,putStream:bi}),X.isAlreadyPutted!==!0&&(X.objectNumber=Zt(),ye("<<"),ye("/Type /Font"),ye("/BaseFont /"+uh(X.postScriptName)),ye("/Subtype /Type1"),typeof X.encoding=="string"&&ye("/Encoding /"+X.encoding),ye("/FirstChar 32"),ye("/LastChar 255"),ye(">>"),ye("endobj"))},ws=function(){for(var X in $t)$t.hasOwnProperty(X)&&(p===!1||p===!0&&y.hasOwnProperty(X))&&ao($t[X])},Go=function(X){X.objectNumber=Zt();var fe=[];fe.push({key:"Type",value:"/XObject"}),fe.push({key:"Subtype",value:"/Form"}),fe.push({key:"BBox",value:"["+[N(X.x),N(X.y),N(X.x+X.width),N(X.y+X.height)].join(" ")+"]"}),fe.push({key:"Matrix",value:"["+X.matrix.toString()+"]"});var Ce=X.pages[1].join(`
|
|
453
|
-
`);bi({data:Ce,additionalKeyValues:fe,objectId:X.objectNumber}),ye("endobj")},tu=function(){for(var X in pt)pt.hasOwnProperty(X)&&Go(pt[X])},mc=function(X,fe){var Ce,De=[],et=1/(fe-1);for(Ce=0;Ce<1;Ce+=et)De.push(Ce);if(De.push(1),X[0].offset!=0){var ft={offset:0,color:X[0].color};X.unshift(ft)}if(X[X.length-1].offset!=1){var St={offset:1,color:X[X.length-1].color};X.push(St)}for(var Ft="",nr=0,gr=0;gr<De.length;gr++){for(Ce=De[gr];Ce>X[nr+1].offset;)nr++;var dr=X[nr].offset,Sr=(Ce-dr)/(X[nr+1].offset-dr),Pn=X[nr].color,yn=X[nr+1].color;Ft+=ne(Math.round((1-Sr)*Pn[0]+Sr*yn[0]).toString(16))+ne(Math.round((1-Sr)*Pn[1]+Sr*yn[1]).toString(16))+ne(Math.round((1-Sr)*Pn[2]+Sr*yn[2]).toString(16))}return Ft.trim()},Nn=function(X,fe){fe||(fe=21);var Ce=Zt(),De=mc(X.colors,fe),et=[];et.push({key:"FunctionType",value:"0"}),et.push({key:"Domain",value:"[0.0 1.0]"}),et.push({key:"Size",value:"["+fe+"]"}),et.push({key:"BitsPerSample",value:"8"}),et.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),et.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),bi({data:De,additionalKeyValues:et,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Ce}),ye("endobj"),X.objectNumber=Zt(),ye("<< /ShadingType "+X.type),ye("/ColorSpace /DeviceRGB");var ft="/Coords ["+N(parseFloat(X.coords[0]))+" "+N(parseFloat(X.coords[1]))+" ";X.type===2?ft+=N(parseFloat(X.coords[2]))+" "+N(parseFloat(X.coords[3])):ft+=N(parseFloat(X.coords[2]))+" "+N(parseFloat(X.coords[3]))+" "+N(parseFloat(X.coords[4]))+" "+N(parseFloat(X.coords[5])),ye(ft+="]"),X.matrix&&ye("/Matrix ["+X.matrix.toString()+"]"),ye("/Function "+Ce+" 0 R"),ye("/Extend [true true]"),ye(">>"),ye("endobj")},Bu=function(X,fe){var Ce=rr(),De=Zt();fe.push({resourcesOid:Ce,objectOid:De}),X.objectNumber=De;var et=[];et.push({key:"Type",value:"/Pattern"}),et.push({key:"PatternType",value:"1"}),et.push({key:"PaintType",value:"1"}),et.push({key:"TilingType",value:"1"}),et.push({key:"BBox",value:"["+X.boundingBox.map(N).join(" ")+"]"}),et.push({key:"XStep",value:N(X.xStep)}),et.push({key:"YStep",value:N(X.yStep)}),et.push({key:"Resources",value:Ce+" 0 R"}),X.matrix&&et.push({key:"Matrix",value:"["+X.matrix.toString()+"]"}),bi({data:X.stream,additionalKeyValues:et,objectId:X.objectNumber}),ye("endobj")},oo=function(X){var fe;for(fe in mt)mt.hasOwnProperty(fe)&&(mt[fe]instanceof Sf?Nn(mt[fe]):mt[fe]instanceof dh&&Bu(mt[fe],X))},dl=function(X){for(var fe in X.objectNumber=Zt(),ye("<<"),X)switch(fe){case"opacity":ye("/ca "+C(X[fe]));break;case"stroke-opacity":ye("/CA "+C(X[fe]))}ye(">>"),ye("endobj")},Vs=function(){var X;for(X in Lt)Lt.hasOwnProperty(X)&&dl(Lt[X])},qu=function(){for(var X in ye("/XObject <<"),pt)pt.hasOwnProperty(X)&&pt[X].objectNumber>=0&&ye("/"+X+" "+pt[X].objectNumber+" 0 R");qe.publish("putXobjectDict"),ye(">>")},ru=function(){fn.oid=Zt(),ye("<<"),ye("/Filter /Standard"),ye("/V "+fn.v),ye("/R "+fn.r),ye("/U <"+fn.toHexString(fn.U)+">"),ye("/O <"+fn.toHexString(fn.O)+">"),ye("/P "+fn.P),ye(">>"),ye("endobj")},so=function(){for(var X in ye("/Font <<"),$t)$t.hasOwnProperty(X)&&(p===!1||p===!0&&y.hasOwnProperty(X))&&ye("/"+X+" "+$t[X].objectNumber+" 0 R");ye(">>")},hi=function(){if(Object.keys(mt).length>0){for(var X in ye("/Shading <<"),mt)mt.hasOwnProperty(X)&&mt[X]instanceof Sf&&mt[X].objectNumber>=0&&ye("/"+X+" "+mt[X].objectNumber+" 0 R");qe.publish("putShadingPatternDict"),ye(">>")}},$r=function(X){if(Object.keys(mt).length>0){for(var fe in ye("/Pattern <<"),mt)mt.hasOwnProperty(fe)&&mt[fe]instanceof f.TilingPattern&&mt[fe].objectNumber>=0&&mt[fe].objectNumber<X&&ye("/"+fe+" "+mt[fe].objectNumber+" 0 R");qe.publish("putTilingPatternDict"),ye(">>")}},Ar=function(){if(Object.keys(Lt).length>0){var X;for(X in ye("/ExtGState <<"),Lt)Lt.hasOwnProperty(X)&&Lt[X].objectNumber>=0&&ye("/"+X+" "+Lt[X].objectNumber+" 0 R");qe.publish("putGStateDict"),ye(">>")}},nn=function(X){_r(X.resourcesOid,!0),ye("<<"),ye("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),so(),hi(),$r(X.objectOid),Ar(),qu(),ye(">>"),ye("endobj")},di=function(){var X=[];ws(),Vs(),tu(),oo(X),qe.publish("putResources"),X.forEach(nn),nn({resourcesOid:Vn,objectOid:Number.MAX_SAFE_INTEGER}),qe.publish("postPutResources")},Li=function(){qe.publish("putAdditionalObjects");for(var X=0;X<ue.length;X++){var fe=ue[X];_r(fe.objId,!0),ye(fe.content),ye("endobj")}qe.publish("postPutAdditionalObjects")},Ma=function(X){Oe[X.fontName]=Oe[X.fontName]||{},Oe[X.fontName][X.fontStyle]=X.id},Ia=function(X,fe,Ce,De,et){var ft={id:"F"+(Object.keys($t).length+1).toString(10),postScriptName:X,fontName:fe,fontStyle:Ce,encoding:De,isStandardFont:et||!1,metadata:{}};return qe.publish("addFont",{font:ft,instance:this}),$t[ft.id]=ft,Ma(ft),ft.id},ri=function(X){for(var fe=0,Ce=_e.length;fe<Ce;fe++){var De=Ia.call(this,X[fe][0],X[fe][1],X[fe][2],_e[fe][3],!0);p===!1&&(y[De]=!0);var et=X[fe][0].split("-");Ma({id:De,fontName:et[0],fontStyle:et[1]||""})}qe.publish("addFonts",{fonts:$t,dictionary:Oe})},Ni=function(X){return X.foo=function(){try{return X.apply(this,arguments)}catch(De){var fe=De.stack||"";~fe.indexOf(" at ")&&(fe=fe.split(" at ")[1]);var Ce="Error in function "+fe.split(`
|
|
454
|
-
`)[0].split("<")[0]+": "+De.message;if(!pr.console)throw new Error(Ce);pr.console.error(Ce,De),pr.alert&&alert(Ce)}},X.foo.bar=X,X.foo},pl=function(X,fe){var Ce,De,et,ft,St,Ft,nr,gr,dr;if(et=(fe=fe||{}).sourceEncoding||"Unicode",St=fe.outputEncoding,(fe.autoencode||St)&&$t[yt].metadata&&$t[yt].metadata[et]&&$t[yt].metadata[et].encoding&&(ft=$t[yt].metadata[et].encoding,!St&&$t[yt].encoding&&(St=$t[yt].encoding),!St&&ft.codePages&&(St=ft.codePages[0]),typeof St=="string"&&(St=ft[St]),St)){for(nr=!1,Ft=[],Ce=0,De=X.length;Ce<De;Ce++)(gr=St[X.charCodeAt(Ce)])?Ft.push(String.fromCharCode(gr)):Ft.push(X[Ce]),Ft[Ce].charCodeAt(0)>>8&&(nr=!0);X=Ft.join("")}for(Ce=X.length;nr===void 0&&Ce!==0;)X.charCodeAt(Ce-1)>>8&&(nr=!0),Ce--;if(!nr)return X;for(Ft=fe.noBOM?[]:[254,255],Ce=0,De=X.length;Ce<De;Ce++){if((dr=(gr=X.charCodeAt(Ce))>>8)>>8)throw new Error("Character at position "+Ce+" of string '"+X+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ft.push(dr),Ft.push(gr-(dr<<8))}return String.fromCharCode.apply(void 0,Ft)},ca=f.__private__.pdfEscape=f.pdfEscape=function(X,fe){return pl(X,fe).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Wo=f.__private__.beginPage=function(X){ve[++Qt]=[],ze[Qt]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(X[0]),topRightY:Number(X[1])}},Gs(Qt),xe(ve[D])},nu=function(X,fe){var Ce,De,et;switch(t=fe||t,typeof X=="string"&&(Ce=b(X.toLowerCase()),Array.isArray(Ce)&&(De=Ce[0],et=Ce[1])),Array.isArray(X)&&(De=X[0]*ht,et=X[1]*ht),isNaN(De)&&(De=a[0],et=a[1]),(De>14400||et>14400)&&(Un.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),De=Math.min(14400,De),et=Math.min(14400,et)),a=[De,et],t.substr(0,1)){case"l":et>De&&(a=[et,De]);break;case"p":De>et&&(a=[et,De])}Wo(a),Ps(Da),ye(vn),lu!==0&&ye(lu+" J"),Os!==0&&ye(Os+" j"),qe.publish("addPage",{pageNumber:Qt})},fa=function(X){X>0&&X<=Qt&&(ve.splice(X,1),ze.splice(X,1),Qt--,D>Qt&&(D=Qt),this.setPage(D))},Gs=function(X){X>0&&X<=Qt&&(D=X)},af=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return ve.length-1},iu=function(X,fe,Ce){var De,et=void 0;return Ce=Ce||{},X=X!==void 0?X:$t[yt].fontName,fe=fe!==void 0?fe:$t[yt].fontStyle,De=X.toLowerCase(),Oe[De]!==void 0&&Oe[De][fe]!==void 0?et=Oe[De][fe]:Oe[X]!==void 0&&Oe[X][fe]!==void 0?et=Oe[X][fe]:Ce.disableWarning===!1&&Un.warn("Unable to look up font label for font '"+X+"', '"+fe+"'. Refer to getFontList() for available fonts."),et||Ce.noFallback||(et=Oe.times[fe])==null&&(et=Oe.times.normal),et},Tr=f.__private__.putInfo=function(){var X=Zt(),fe=function(De){return De};for(var Ce in d!==null&&(fe=fn.encryptor(X,0)),ye("<<"),ye("/Producer ("+ca(fe("jsPDF "+hr.version))+")"),bt)bt.hasOwnProperty(Ce)&&bt[Ce]&&ye("/"+Ce.substr(0,1).toUpperCase()+Ce.substr(1)+" ("+ca(fe(bt[Ce]))+")");ye("/CreationDate ("+ca(fe(M))+")"),ye(">>"),ye("endobj")},_s=f.__private__.putCatalog=function(X){var fe=(X=X||{}).rootDictionaryObjId||ti;switch(Zt(),ye("<<"),ye("/Type /Catalog"),ye("/Pages "+fe+" 0 R"),Le||(Le="fullwidth"),Le){case"fullwidth":ye("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ye("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ye("/OpenAction [3 0 R /Fit]");break;case"original":ye("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Ce=""+Le;Ce.substr(Ce.length-1)==="%"&&(Le=parseInt(Le)/100),typeof Le=="number"&&ye("/OpenAction [3 0 R /XYZ null null "+C(Le)+"]")}switch(it||(it="continuous"),it){case"continuous":ye("/PageLayout /OneColumn");break;case"single":ye("/PageLayout /SinglePage");break;case"two":case"twoleft":ye("/PageLayout /TwoColumnLeft");break;case"tworight":ye("/PageLayout /TwoColumnRight")}Fe&&ye("/PageMode /"+Fe),qe.publish("putCatalog"),ye(">>"),ye("endobj")},Ws=f.__private__.putTrailer=function(){ye("trailer"),ye("<<"),ye("/Size "+(Z+1)),ye("/Root "+Z+" 0 R"),ye("/Info "+(Z-1)+" 0 R"),d!==null&&ye("/Encrypt "+fn.oid+" 0 R"),ye("/ID [ <"+G+"> <"+G+"> ]"),ye(">>")},$s=f.__private__.putHeader=function(){ye("%PDF-"+_),ye("%ºß¬à")},yc=f.__private__.putXRef=function(){var X="0000000000";ye("xref"),ye("0 "+(Z+1)),ye("0000000000 65535 f ");for(var fe=1;fe<=Z;fe++)typeof Q[fe]=="function"?ye((X+Q[fe]()).slice(-10)+" 00000 n "):Q[fe]!==void 0?ye((X+Q[fe]).slice(-10)+" 00000 n "):ye("0000000000 00000 n ")},$o=f.__private__.buildDocument=function(){Ne(),xe(oe),qe.publish("buildDocument"),$s(),ua(),Li(),di(),d!==null&&ru(),Tr(),_s();var X=se;return yc(),Ws(),ye("startxref"),ye(""+X),ye("%%EOF"),xe(ve[D]),oe.join(`
|
|
455
|
-
`)},Ss=f.__private__.getBlob=function(X){return new Blob([me(X)],{type:"application/pdf"})},xs=f.output=f.__private__.output=Ni(function(X,fe){switch(typeof(fe=fe||{})=="string"?fe={filename:fe}:fe.filename=fe.filename||"generated.pdf",X){case void 0:return $o();case"save":f.save(fe.filename);break;case"arraybuffer":return me($o());case"blob":return Ss($o());case"bloburi":case"bloburl":if(pr.URL!==void 0&&typeof pr.URL.createObjectURL=="function")return pr.URL&&pr.URL.createObjectURL(Ss($o()))||void 0;Un.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Ce="",De=$o();try{Ce=N2(De)}catch{Ce=N2(unescape(encodeURIComponent(De)))}return"data:application/pdf;filename="+fe.filename+";base64,"+Ce;case"pdfobjectnewwindow":if(Object.prototype.toString.call(pr)==="[object Window]"){var et="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ft=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';fe.pdfObjectUrl&&(et=fe.pdfObjectUrl,ft="");var St='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+et+'"'+ft+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(fe)+");<\/script></body></html>",Ft=pr.open();return Ft!==null&&Ft.document.write(St),Ft}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(pr)==="[object Window]"){var nr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(fe.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+fe.filename+'" width="500px" height="400px" /></body></html>',gr=pr.open();if(gr!==null){gr.document.write(nr);var dr=this;gr.document.documentElement.querySelector("#pdfViewer").onload=function(){gr.document.title=fe.filename,gr.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(dr.output("bloburl"))}}return gr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(pr)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Sr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",fe)+'"></iframe></body></html>',Pn=pr.open();if(Pn!==null&&(Pn.document.write(Sr),Pn.document.title=fe.filename),Pn||typeof safari>"u")return Pn;break;case"datauri":case"dataurl":return pr.document.location.href=this.output("datauristring",fe);default:return null}}),Es=function(X){return Array.isArray(vt)===!0&&vt.indexOf(X)>-1};switch(n){case"pt":ht=1;break;case"mm":ht=72/25.4;break;case"cm":ht=72/2.54;break;case"in":ht=72;break;case"px":ht=Es("px_scaling")==1?.75:96/72;break;case"pc":case"em":ht=12;break;case"ex":ht=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);ht=n}var fn=null;H(),Y();var Yo=function(X){return d!==null?fn.encryptor(X,0):function(fe){return fe}},ja=f.__private__.getPageInfo=f.getPageInfo=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ze[X].objId,pageNumber:X,pageContext:ze[X]}},It=f.__private__.getPageInfoByObjId=function(X){if(isNaN(X)||X%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var fe in ze)if(ze[fe].objId===X)break;return ja(fe)},Ys=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:ze[D].objId,pageNumber:D,pageContext:ze[D]}};f.addPage=function(){return nu.apply(this,arguments),this},f.setPage=function(){return Gs.apply(this,arguments),xe.call(this,ve[D]),this},f.insertPage=function(X){return this.addPage(),this.movePage(D,X),this},f.movePage=function(X,fe){var Ce,De;if(X>fe){Ce=ve[X],De=ze[X];for(var et=X;et>fe;et--)ve[et]=ve[et-1],ze[et]=ze[et-1];ve[fe]=Ce,ze[fe]=De,this.setPage(fe)}else if(X<fe){Ce=ve[X],De=ze[X];for(var ft=X;ft<fe;ft++)ve[ft]=ve[ft+1],ze[ft]=ze[ft+1];ve[fe]=Ce,ze[fe]=De,this.setPage(fe)}return this},f.deletePage=function(){return fa.apply(this,arguments),this},f.__private__.text=f.text=function(X,fe,Ce,De,et){var ft,St,Ft,nr,gr,dr,Sr,Pn,yn,Rn=(De=De||{}).scope||this;if(typeof X=="number"&&typeof fe=="number"&&(typeof Ce=="string"||Array.isArray(Ce))){var Kn=Ce;Ce=fe,fe=X,X=Kn}if(arguments[3]instanceof Ye?(T("The transform parameter of text() with a Matrix value"),yn=et):(Ft=arguments[4],nr=arguments[5],Sn(Sr=arguments[3])==="object"&&Sr!==null||(typeof Ft=="string"&&(nr=Ft,Ft=null),typeof Sr=="string"&&(nr=Sr,Sr=null),typeof Sr=="number"&&(Ft=Sr,Sr=null),De={flags:Sr,angle:Ft,align:nr})),isNaN(fe)||isNaN(Ce)||X==null)throw new Error("Invalid arguments passed to jsPDF.text");if(X.length===0)return Rn;var ai="",za=!1,xa=typeof De.lineHeightFactor=="number"?De.lineHeightFactor:Ti,Ea=Rn.internal.scaleFactor;function Zo(Jr){return Jr=Jr.split(" ").join(Array(De.TabLen||9).join(" ")),ca(Jr,Sr)}function Qo(Jr){for(var Gr,Mn=Jr.concat(),Zn=[],Io=Mn.length;Io--;)typeof(Gr=Mn.shift())=="string"?Zn.push(Gr):Array.isArray(Jr)&&(Gr.length===1||Gr[1]===void 0&&Gr[2]===void 0)?Zn.push(Gr[0]):Zn.push([Gr[0],Gr[1],Gr[2]]);return Zn}function ji(Jr,Gr){var Mn;if(typeof Jr=="string")Mn=Gr(Jr)[0];else if(Array.isArray(Jr)){for(var Zn,Io,_l=Jr.concat(),nl=[],cu=_l.length;cu--;)typeof(Zn=_l.shift())=="string"?nl.push(Gr(Zn)[0]):Array.isArray(Zn)&&typeof Zn[0]=="string"&&(Io=Gr(Zn[0],Zn[1],Zn[2]),nl.push([Io[0],Io[1],Io[2]]));Mn=nl}return Mn}var Ua=!1,Js=!0;if(typeof X=="string")Ua=!0;else if(Array.isArray(X)){var bl=X.concat();St=[];for(var ea,Qr=bl.length;Qr--;)(typeof(ea=bl.shift())!="string"||Array.isArray(ea)&&typeof ea[0]!="string")&&(Js=!1);Ua=Js}if(Ua===!1)throw new Error('Type of text must be string or Array. "'+X+'" is not recognized.');typeof X=="string"&&(X=X.match(/[\r?\n]/)?X.split(/\r\n|\r|\n/g):[X]);var el=Ae/Rn.internal.scaleFactor,wl=el*(xa-1);switch(De.baseline){case"bottom":Ce-=wl;break;case"top":Ce+=el-wl;break;case"hanging":Ce+=el-2*wl;break;case"middle":Ce+=el/2-wl}if((dr=De.maxWidth||0)>0&&(typeof X=="string"?X=Rn.splitTextToSize(X,dr):Object.prototype.toString.call(X)==="[object Array]"&&(X=X.reduce(function(Jr,Gr){return Jr.concat(Rn.splitTextToSize(Gr,dr))},[]))),ft={text:X,x:fe,y:Ce,options:De,mutex:{pdfEscape:ca,activeFontKey:yt,fonts:$t,activeFontSize:Ae}},qe.publish("preProcessText",ft),X=ft.text,Ft=(De=ft.options).angle,!(yn instanceof Ye)&&Ft&&typeof Ft=="number"){Ft*=Math.PI/180,De.rotationDirection===0&&(Ft=-Ft),v===g.ADVANCED&&(Ft=-Ft);var Pa=Math.cos(Ft),Ha=Math.sin(Ft);yn=new Ye(Pa,Ha,-Ha,Pa,0,0)}else Ft&&Ft instanceof Ye&&(yn=Ft);v!==g.ADVANCED||yn||(yn=Dt),(gr=De.charSpace||Ji)!==void 0&&(ai+=N(L(gr))+` Tc
|
|
456
|
-
`,this.setCharSpace(this.getCharSpace()||0)),(Pn=De.horizontalScale)!==void 0&&(ai+=N(100*Pn)+` Tz
|
|
457
|
-
`),De.lang;var wi=-1,tl=De.renderingMode!==void 0?De.renderingMode:De.stroke,co=Rn.internal.getCurrentPageInfo().pageContext;switch(tl){case 0:case!1:case"fill":wi=0;break;case 1:case!0:case"stroke":wi=1;break;case 2:case"fillThenStroke":wi=2;break;case 3:case"invisible":wi=3;break;case 4:case"fillAndAddForClipping":wi=4;break;case 5:case"strokeAndAddPathForClipping":wi=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":wi=6;break;case 7:case"addToPathForClipping":wi=7}var Hu=co.usedRenderingMode!==void 0?co.usedRenderingMode:-1;wi!==-1?ai+=wi+` Tr
|
|
458
|
-
`:Hu!==-1&&(ai+=`0 Tr
|
|
459
|
-
`),wi!==-1&&(co.usedRenderingMode=wi),nr=De.align||"left";var gi,Fi=Ae*xa,As=Rn.internal.pageSize.getWidth(),Co=$t[yt];gr=De.charSpace||Ji,dr=De.maxWidth||0,Sr=Object.assign({autoencode:!0,noBOM:!0},De.flags);var vi=[],Jo=function(Jr){return Rn.getStringUnitWidth(Jr,{font:Co,charSpace:gr,fontSize:Ae,doKerning:!1})*Ae/Ea};if(Object.prototype.toString.call(X)==="[object Array]"){var oi;St=Qo(X),nr!=="left"&&(gi=St.map(Jo));var Di,es=0;if(nr==="right"){fe-=gi[0],X=[],Qr=St.length;for(var Vr=0;Vr<Qr;Vr++)Vr===0?(Di=Ri(fe),oi=Mi(Ce)):(Di=L(es-gi[Vr]),oi=-Fi),X.push([St[Vr],Di,oi]),es=gi[Vr]}else if(nr==="center"){fe-=gi[0]/2,X=[],Qr=St.length;for(var fo=0;fo<Qr;fo++)fo===0?(Di=Ri(fe),oi=Mi(Ce)):(Di=L((es-gi[fo])/2),oi=-Fi),X.push([St[fo],Di,oi]),es=gi[fo]}else if(nr==="left"){X=[],Qr=St.length;for(var rl=0;rl<Qr;rl++)X.push(St[rl])}else if(nr==="justify"&&Co.encoding==="Identity-H"){X=[],Qr=St.length,dr=dr!==0?dr:As;for(var ko=0,Rr=0;Rr<Qr;Rr++)if(oi=Rr===0?Mi(Ce):-Fi,Di=Rr===0?Ri(fe):ko,Rr<Qr-1){var Lo=L((dr-gi[Rr])/(St[Rr].split(" ").length-1)),Wn=St[Rr].split(" ");X.push([Wn[0]+" ",Di,oi]),ko=0;for(var kr=1;kr<Wn.length;kr++){var bn=(Jo(Wn[kr-1]+" "+Wn[kr])-Jo(Wn[kr]))*Ea+Lo;kr==Wn.length-1?X.push([Wn[kr],bn,0]):X.push([Wn[kr]+" ",bn,0]),ko-=bn}}else X.push([St[Rr],Di,oi]);X.push(["",ko,0])}else{if(nr!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(X=[],Qr=St.length,dr=dr!==0?dr:As,Rr=0;Rr<Qr;Rr++)oi=Rr===0?Mi(Ce):-Fi,Di=Rr===0?Ri(fe):0,Rr<Qr-1?vi.push(N(L((dr-gi[Rr])/(St[Rr].split(" ").length-1)))):vi.push(0),X.push([St[Rr],Di,oi])}}var $n=typeof De.R2L=="boolean"?De.R2L:Te;$n===!0&&(X=ji(X,function(Jr,Gr,Mn){return[Jr.split("").reverse().join(""),Gr,Mn]})),ft={text:X,x:fe,y:Ce,options:De,mutex:{pdfEscape:ca,activeFontKey:yt,fonts:$t,activeFontSize:Ae}},qe.publish("postProcessText",ft),X=ft.text,za=ft.mutex.isHex||!1;var ts=$t[yt].encoding;ts!=="WinAnsiEncoding"&&ts!=="StandardEncoding"||(X=ji(X,function(Jr,Gr,Mn){return[Zo(Jr),Gr,Mn]})),St=Qo(X),X=[];for(var No,To,Va,On=0,ho=1,Ro=Array.isArray(St[0])?ho:On,Mo="",Bi=function(Jr,Gr,Mn){var Zn="";return Mn instanceof Ye?(Mn=typeof De.angle=="number"?Pt(Mn,new Ye(1,0,0,1,Jr,Gr)):Pt(new Ye(1,0,0,1,Jr,Gr),Mn),v===g.ADVANCED&&(Mn=Pt(new Ye(1,0,0,-1,0,0),Mn)),Zn=Mn.join(" ")+` Tm
|
|
460
|
-
`):Zn=N(Jr)+" "+N(Gr)+` Td
|
|
461
|
-
`,Zn},an=0;an<St.length;an++){switch(Mo="",Ro){case ho:Va=(za?"<":"(")+St[an][0]+(za?">":")"),No=parseFloat(St[an][1]),To=parseFloat(St[an][2]);break;case On:Va=(za?"<":"(")+St[an]+(za?">":")"),No=Ri(fe),To=Mi(Ce)}vi!==void 0&&vi[an]!==void 0&&(Mo=vi[an]+` Tw
|
|
462
|
-
`),an===0?X.push(Mo+Bi(No,To,yn)+Va):Ro===On?X.push(Mo+Va):Ro===ho&&X.push(Mo+Bi(No,To,yn)+Va)}X=Ro===On?X.join(` Tj
|
|
463
|
-
T* `):X.join(` Tj
|
|
464
|
-
`),X+=` Tj
|
|
465
|
-
`;var _i=`BT
|
|
466
|
-
/`;return _i+=yt+" "+Ae+` Tf
|
|
467
|
-
`,_i+=N(Ae*xa)+` TL
|
|
468
|
-
`,_i+=mn+`
|
|
469
|
-
`,_i+=ai,_i+=X,ye(_i+="ET"),y[yt]=!0,Rn};var lo=f.__private__.clip=f.clip=function(X){return ye(X==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return lo("evenodd")},f.__private__.discardPath=f.discardPath=function(){return ye("n"),this};var Oo=f.__private__.isValidStyle=function(X){var fe=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(X)!==-1&&(fe=!0),fe};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(X){return Oo(X)&&(u=X),this};var zu=f.__private__.getStyle=f.getStyle=function(X){var fe=u;switch(X){case"D":case"S":fe="S";break;case"F":fe="f";break;case"FD":case"DF":fe="B";break;case"f":case"f*":case"B":case"B*":fe=X}return fe},Xs=f.close=function(){return ye("h"),this};f.stroke=function(){return ye("S"),this},f.fill=function(X){return Tn("f",X),this},f.fillEvenOdd=function(X){return Tn("f*",X),this},f.fillStroke=function(X){return Tn("B",X),this},f.fillStrokeEvenOdd=function(X){return Tn("B*",X),this};var Tn=function(X,fe){Sn(fe)==="object"?ou(fe,X):ye(X)},Ks=function(X){X===null||v===g.ADVANCED&&X===void 0||(X=zu(X),ye(X))};function au(X,fe,Ce,De,et){var ft=new dh(fe||this.boundingBox,Ce||this.xStep,De||this.yStep,this.gState,et||this.matrix);ft.stream=this.stream;var St=X+"$$"+this.cloneIndex+++"$$";return Wt(St,ft),ft}var ou=function(X,fe){var Ce=Mt[X.key],De=mt[Ce];if(De instanceof Sf)ye("q"),ye(of(fe)),De.gState&&f.setGState(De.gState),ye(X.matrix.toString()+" cm"),ye("/"+Ce+" sh"),ye("Q");else if(De instanceof dh){var et=new Ye(1,0,0,-1,0,Ko());X.matrix&&(et=et.multiply(X.matrix||Dt),Ce=au.call(De,X.key,X.boundingBox,X.xStep,X.yStep,et).id),ye("q"),ye("/Pattern cs"),ye("/"+Ce+" scn"),De.gState&&f.setGState(De.gState),ye(fe),ye("Q")}},of=function(X){switch(X){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},uo=f.moveTo=function(X,fe){return ye(N(L(X))+" "+N(I(fe))+" m"),this},ni=f.lineTo=function(X,fe){return ye(N(L(X))+" "+N(I(fe))+" l"),this},Fa=f.curveTo=function(X,fe,Ce,De,et,ft){return ye([N(L(X)),N(I(fe)),N(L(Ce)),N(I(De)),N(L(et)),N(I(ft)),"c"].join(" ")),this};f.__private__.line=f.line=function(X,fe,Ce,De,et){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||isNaN(De)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.line");return v===g.COMPAT?this.lines([[Ce-X,De-fe]],X,fe,[1,1],et||"S"):this.lines([[Ce-X,De-fe]],X,fe,[1,1]).stroke()},f.__private__.lines=f.lines=function(X,fe,Ce,De,et,ft){var St,Ft,nr,gr,dr,Sr,Pn,yn,Rn,Kn,ai,za;if(typeof X=="number"&&(za=Ce,Ce=fe,fe=X,X=za),De=De||[1,1],ft=ft||!1,isNaN(fe)||isNaN(Ce)||!Array.isArray(X)||!Array.isArray(De)||!Oo(et)||typeof ft!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(uo(fe,Ce),St=De[0],Ft=De[1],gr=X.length,Kn=fe,ai=Ce,nr=0;nr<gr;nr++)(dr=X[nr]).length===2?(Kn=dr[0]*St+Kn,ai=dr[1]*Ft+ai,ni(Kn,ai)):(Sr=dr[0]*St+Kn,Pn=dr[1]*Ft+ai,yn=dr[2]*St+Kn,Rn=dr[3]*Ft+ai,Kn=dr[4]*St+Kn,ai=dr[5]*Ft+ai,Fa(Sr,Pn,yn,Rn,Kn,ai));return ft&&Xs(),Ks(et),this},f.path=function(X){for(var fe=0;fe<X.length;fe++){var Ce=X[fe],De=Ce.c;switch(Ce.op){case"m":uo(De[0],De[1]);break;case"l":ni(De[0],De[1]);break;case"c":Fa.apply(this,De);break;case"h":Xs()}}return this},f.__private__.rect=f.rect=function(X,fe,Ce,De,et){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||isNaN(De)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.rect");return v===g.COMPAT&&(De=-De),ye([N(L(X)),N(I(fe)),N(L(Ce)),N(L(De)),"re"].join(" ")),Ks(et),this},f.__private__.triangle=f.triangle=function(X,fe,Ce,De,et,ft,St){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||isNaN(De)||isNaN(et)||isNaN(ft)||!Oo(St))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Ce-X,De-fe],[et-Ce,ft-De],[X-et,fe-ft]],X,fe,[1,1],St,!0),this},f.__private__.roundedRect=f.roundedRect=function(X,fe,Ce,De,et,ft,St){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||isNaN(De)||isNaN(et)||isNaN(ft)||!Oo(St))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ft=4/3*(Math.SQRT2-1);return et=Math.min(et,.5*Ce),ft=Math.min(ft,.5*De),this.lines([[Ce-2*et,0],[et*Ft,0,et,ft-ft*Ft,et,ft],[0,De-2*ft],[0,ft*Ft,-et*Ft,ft,-et,ft],[2*et-Ce,0],[-et*Ft,0,-et,-ft*Ft,-et,-ft],[0,2*ft-De],[0,-ft*Ft,et*Ft,-ft,et,-ft]],X+et,fe,[1,1],St,!0),this},f.__private__.ellipse=f.ellipse=function(X,fe,Ce,De,et){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||isNaN(De)||!Oo(et))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ft=4/3*(Math.SQRT2-1)*Ce,St=4/3*(Math.SQRT2-1)*De;return uo(X+Ce,fe),Fa(X+Ce,fe-St,X+ft,fe-De,X,fe-De),Fa(X-ft,fe-De,X-Ce,fe-St,X-Ce,fe),Fa(X-Ce,fe+St,X-ft,fe+De,X,fe+De),Fa(X+ft,fe+De,X+Ce,fe+St,X+Ce,fe),Ks(et),this},f.__private__.circle=f.circle=function(X,fe,Ce,De){if(isNaN(X)||isNaN(fe)||isNaN(Ce)||!Oo(De))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(X,fe,Ce,Ce,De)},f.setFont=function(X,fe,Ce){return Ce&&(fe=j(fe,Ce)),yt=iu(X,fe,{disableWarning:!1}),this};var su=f.__private__.getFont=f.getFont=function(){return $t[iu.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var X,fe,Ce={};for(X in Oe)if(Oe.hasOwnProperty(X))for(fe in Ce[X]=[],Oe[X])Oe[X].hasOwnProperty(fe)&&Ce[X].push(fe);return Ce},f.addFont=function(X,fe,Ce,De,et){var ft=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ft.indexOf(arguments[3])!==-1?et=arguments[3]:arguments[3]&&ft.indexOf(arguments[3])==-1&&(Ce=j(Ce,De)),et=et||"Identity-H",Ia.call(this,X,fe,Ce,et)};var Ti,Da=e.lineWidth||.200025,Ao=f.__private__.getLineWidth=f.getLineWidth=function(){return Da},Ps=f.__private__.setLineWidth=f.setLineWidth=function(X){return Da=X,ye(N(L(X))+" w"),this};f.__private__.setLineDash=hr.API.setLineDash=hr.API.setLineDashPattern=function(X,fe){if(X=X||[],fe=fe||0,isNaN(fe)||!Array.isArray(X))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return X=X.map(function(Ce){return N(L(Ce))}).join(" "),fe=N(L(fe)),ye("["+X+"] "+fe+" d"),this};var gl=f.__private__.getLineHeight=f.getLineHeight=function(){return Ae*Ti};f.__private__.getLineHeight=f.getLineHeight=function(){return Ae*Ti};var Uu=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(X){return typeof(X=X||1.15)=="number"&&(Ti=X),this},ii=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return Ti};Uu(e.lineHeight);var Ri=f.__private__.getHorizontalCoordinate=function(X){return L(X)},Mi=f.__private__.getVerticalCoordinate=function(X){return v===g.ADVANCED?X:ze[D].mediaBox.topRightY-ze[D].mediaBox.bottomLeftY-L(X)},vl=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(X){return N(Ri(X))},Sa=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(X){return N(Mi(X))},vn=e.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return Ci(vn)},f.__private__.setStrokeColor=f.setDrawColor=function(X,fe,Ce,De){return vn=En({ch1:X,ch2:fe,ch3:Ce,ch4:De,pdfColorType:"draw",precision:2}),ye(vn),this};var Ii=e.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return Ci(Ii)},f.__private__.setFillColor=f.setFillColor=function(X,fe,Ce,De){return Ii=En({ch1:X,ch2:fe,ch3:Ce,ch4:De,pdfColorType:"fill",precision:2}),ye(Ii),this};var mn=e.textColor||"0 g",Qi=f.__private__.getTextColor=f.getTextColor=function(){return Ci(mn)};f.__private__.setTextColor=f.setTextColor=function(X,fe,Ce,De){return mn=En({ch1:X,ch2:fe,ch3:Ce,ch4:De,pdfColorType:"text",precision:3}),this};var Ji=e.charSpace,Ba=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Ji||0)};f.__private__.setCharSpace=f.setCharSpace=function(X){if(isNaN(X))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ji=X,this};var lu=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(X){var fe=f.CapJoinStyles[X];if(fe===void 0)throw new Error("Line cap style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return lu=fe,ye(fe+" J"),this};var Os=0;f.__private__.setLineJoin=f.setLineJoin=function(X){var fe=f.CapJoinStyles[X];if(fe===void 0)throw new Error("Line join style of '"+X+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Os=fe,ye(fe+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(X){if(X=X||0,isNaN(X))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ye(N(L(X))+" M"),this},f.GState=D1,f.setGState=function(X){(X=typeof X=="string"?Lt[At[X]]:Zs(null,X)).equals(fr)||(ye("/"+X.id+" gs"),fr=X)};var Zs=function(X,fe){if(!X||!At[X]){var Ce=!1;for(var De in Lt)if(Lt.hasOwnProperty(De)&&Lt[De].equals(fe)){Ce=!0;break}if(Ce)fe=Lt[De];else{var et="GS"+(Object.keys(Lt).length+1).toString(10);Lt[et]=fe,fe.id=et}return X&&(At[X]=fe.id),qe.publish("addGState",fe),fe}};f.addGState=function(X,fe){return Zs(X,fe),this},f.saveGraphicsState=function(){return ye("q"),Me.push({key:yt,size:Ae,color:mn}),this},f.restoreGraphicsState=function(){ye("Q");var X=Me.pop();return yt=X.key,Ae=X.size,mn=X.color,fr=null,this},f.setCurrentTransformationMatrix=function(X){return ye(X.toString()+" cm"),this},f.comment=function(X){return ye("#"+X),this};var Gn=function(X,fe){var Ce=X||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Ce},set:function(ft){isNaN(ft)||(Ce=parseFloat(ft))}});var De=fe||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return De},set:function(ft){isNaN(ft)||(De=parseFloat(ft))}});var et="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return et},set:function(ft){et=ft.toString()}}),this},pi=function(X,fe,Ce,De){Gn.call(this,X,fe),this.type="rect";var et=Ce||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return et},set:function(St){isNaN(St)||(et=parseFloat(St))}});var ft=De||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ft},set:function(St){isNaN(St)||(ft=parseFloat(St))}}),this},Zr=function(){this.page=Qt,this.currentPage=D,this.pages=ve.slice(0),this.pagesContext=ze.slice(0),this.x=zt,this.y=Ot,this.matrix=Ut,this.width=Xo(D),this.height=Ko(D),this.outputDestination=ke,this.id="",this.objectNumber=-1};Zr.prototype.restore=function(){Qt=this.page,D=this.currentPage,ze=this.pagesContext,ve=this.pages,zt=this.x,Ot=this.y,Ut=this.matrix,yl(D,this.width),uu(D,this.height),ke=this.outputDestination};var Qs=function(X,fe,Ce,De,et){_t.push(new Zr),Qt=D=0,ve=[],zt=X,Ot=fe,Ut=et,Wo([Ce,De])},qa=function(X){if(Je[X])_t.pop().restore();else{var fe=new Zr,Ce="Xo"+(Object.keys(pt).length+1).toString(10);fe.id=Ce,Je[X]=Ce,pt[Ce]=fe,qe.publish("addFormObject",fe),_t.pop().restore()}};for(var ml in f.beginFormObject=function(X,fe,Ce,De,et){return Qs(X,fe,Ce,De,et),this},f.endFormObject=function(X){return qa(X),this},f.doFormObject=function(X,fe){var Ce=pt[Je[X]];return ye("q"),ye(fe.toString()+" cm"),ye("/"+Ce.id+" Do"),ye("Q"),this},f.getFormObject=function(X){var fe=pt[Je[X]];return{x:fe.x,y:fe.y,width:fe.width,height:fe.height,matrix:fe.matrix}},f.save=function(X,fe){return X=X||"generated.pdf",(fe=fe||{}).returnPromise=fe.returnPromise||!1,fe.returnPromise===!1?(_f(Ss($o()),X),typeof _f.unload=="function"&&pr.setTimeout&&setTimeout(_f.unload,911),this):new Promise(function(Ce,De){try{var et=_f(Ss($o()),X);typeof _f.unload=="function"&&pr.setTimeout&&setTimeout(_f.unload,911),Ce(et)}catch(ft){De(ft.message)}})},hr.API)hr.API.hasOwnProperty(ml)&&(ml==="events"&&hr.API.events.length?function(X,fe){var Ce,De,et;for(et=fe.length-1;et!==-1;et--)Ce=fe[et][0],De=fe[et][1],X.subscribe.apply(X,[Ce].concat(typeof De=="function"?[De]:De))}(qe,hr.API.events):f[ml]=hr.API[ml]);var Xo=f.getPageWidth=function(X){return(ze[X=X||D].mediaBox.topRightX-ze[X].mediaBox.bottomLeftX)/ht},yl=f.setPageWidth=function(X,fe){ze[X].mediaBox.topRightX=fe*ht+ze[X].mediaBox.bottomLeftX},Ko=f.getPageHeight=function(X){return(ze[X=X||D].mediaBox.topRightY-ze[X].mediaBox.bottomLeftY)/ht},uu=f.setPageHeight=function(X,fe){ze[X].mediaBox.topRightY=fe*ht+ze[X].mediaBox.bottomLeftY};return f.internal={pdfEscape:ca,getStyle:zu,getFont:su,getFontSize:ge,getCharSpace:Ba,getTextColor:Qi,getLineHeight:gl,getLineHeightFactor:ii,getLineWidth:Ao,write:Ie,getHorizontalCoordinate:Ri,getVerticalCoordinate:Mi,getCoordinateString:vl,getVerticalCoordinateString:Sa,collections:{},newObject:Zt,newAdditionalObject:Hn,newObjectDeferred:rr,newObjectDeferredBegin:_r,getFilters:ki,putStream:bi,events:qe,scaleFactor:ht,pageSize:{getWidth:function(){return Xo(D)},setWidth:function(X){yl(D,X)},getHeight:function(){return Ko(D)},setHeight:function(X){uu(D,X)}},encryptionOptions:d,encryption:fn,getEncryptor:Yo,output:xs,getNumberOfPages:af,pages:ve,out:ye,f2:C,f3:A,getPageInfo:ja,getPageInfoByObjId:It,getCurrentPageInfo:Ys,getPDFVersion:S,Point:Gn,Rectangle:pi,Matrix:Ye,hasHotfix:Es},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Xo(D)},set:function(X){yl(D,X)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return Ko(D)},set:function(X){uu(D,X)},enumerable:!0,configurable:!0}),ri.call(f,_e),yt="F1",nu(a,t),qe.publish("initialized"),f}lh.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},lh.prototype.toHexString=function(e){return e.split("").map(function(r){return("0"+(255&r.charCodeAt(0)).toString(16)).slice(-2)}).join("")},lh.prototype.hexToBytes=function(e){for(var r=[],t=0;t<e.length;t+=2)r.push(String.fromCharCode(parseInt(e.substr(t,2),16)));return r.join("")},lh.prototype.processOwnerPassword=function(e,r){return R2(T2(r).substr(0,5),e)},lh.prototype.encryptor=function(e,r){var t=T2(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&r,r>>8&255)).substr(0,10);return function(n){return R2(t,n)}},D1.prototype.equals=function(e){var r,t="id,objectNumber,equals";if(!e||Sn(e)!==Sn(this))return!1;var n=0;for(r in this)if(!(t.indexOf(r)>=0)){if(this.hasOwnProperty(r)&&!e.hasOwnProperty(r)||this[r]!==e[r])return!1;n++}for(r in e)e.hasOwnProperty(r)&&t.indexOf(r)<0&&n--;return n===0},hr.API={events:[]},hr.version="3.0.1";var Oi=hr.API,Im=1,Df=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ih=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Er=function(e){return e.toFixed(2)},zc=function(e){return e.toFixed(5)};Oi.__acroform__={};var bs=function(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e},K4=function(e){return e*Im},Au=function(e){var r=new __,t=er.internal.getHeight(e)||0,n=er.internal.getWidth(e)||0;return r.BBox=[0,0,Number(Er(n)),Number(Er(t))],r},jk=Oi.__acroform__.setBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|=1<<r},Fk=Oi.__acroform__.clearBit=function(e,r){if(e=e||0,r=r||0,isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&=~(1<<r)},Dk=Oi.__acroform__.getBit=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return(e&1<<r)==0?0:1},Yi=Oi.__acroform__.getBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Dk(e,r-1)},Xi=Oi.__acroform__.setBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return jk(e,r-1)},Ki=Oi.__acroform__.clearBitForPdf=function(e,r){if(isNaN(e)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Fk(e,r-1)},Bk=Oi.__acroform__.calculateCoordinates=function(e,r){var t=r.internal.getHorizontalCoordinate,n=r.internal.getVerticalCoordinate,a=e[0],i=e[1],o=e[2],s=e[3],c={};return c.lowerLeft_X=t(a)||0,c.lowerLeft_Y=n(i+s)||0,c.upperRight_X=t(a+o)||0,c.upperRight_Y=n(i)||0,[Number(Er(c.lowerLeft_X)),Number(Er(c.lowerLeft_Y)),Number(Er(c.upperRight_X)),Number(Er(c.upperRight_Y))]},qk=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var r=[],t=e._V||e.DV,n=M2(e,t),a=e.scope.internal.getFont(e.fontName,e.fontStyle).id;r.push("/Tx BMC"),r.push("q"),r.push("BT"),r.push(e.scope.__private__.encodeColorString(e.color)),r.push("/"+a+" "+Er(n.fontSize)+" Tf"),r.push("1 0 0 1 0 0 Tm"),r.push(n.text),r.push("ET"),r.push("Q"),r.push("EMC");var i=Au(e);return i.scope=e.scope,i.stream=r.join(`
|
|
470
|
-
`),i}},M2=function(e,r){var t=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},a=(r=(r=r.substr(0,1)=="("?r.substr(1):r).substr(r.length-1)==")"?r.substr(0,r.length-1):r).split(" ");a=e.multiline?a.map(function(A){return A.split(`
|
|
471
|
-
`)}):a.map(function(A){return[A]});var i=t,o=er.internal.getHeight(e)||0;o=o<0?-o:o;var s=er.internal.getWidth(e)||0;s=s<0?-s:s;var c=function(A,L,O){if(A+1<a.length){var I=L+" "+a[A+1][0];return f1(I,e,O).width<=s-4}return!1};i++;e:for(;i>0;){r="",i--;var u,d,p=f1("3",e,i).height,y=e.multiline?o-i:(o-p)/2,f=y+=2,_=0,S=0,w=0;if(i<=0){r=`(...) Tj
|
|
472
|
-
`,r+="% Width of Text: "+f1(r,e,i=12).width+", FieldWidth:"+s+`
|
|
473
|
-
`;break}for(var b="",g=0,v=0;v<a.length;v++)if(a.hasOwnProperty(v)){var E=!1;if(a[v].length!==1&&w!==a[v].length-1){if((p+2)*(g+2)+2>o)continue e;b+=a[v][w],E=!0,S=v,v--}else{b=(b+=a[v][w]+" ").substr(b.length-1)==" "?b.substr(0,b.length-1):b;var x=parseInt(v),j=c(x,b,i),N=v>=a.length-1;if(j&&!N){b+=" ",w=0;continue}if(j||N){if(N)S=x;else if(e.multiline&&(p+2)*(g+2)+2>o)continue e}else{if(!e.multiline||(p+2)*(g+2)+2>o)continue e;S=x}}for(var T="",F=_;F<=S;F++){var C=a[F];if(e.multiline){if(F===S){T+=C[w]+" ",w=(w+1)%C.length;continue}if(F===_){T+=C[C.length-1]+" ";continue}}T+=C[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,d=f1(T,e,i).width,e.textAlign){case"right":u=s-d-2;break;case"center":u=(s-d)/2;break;case"left":default:u=2}r+=Er(u)+" "+Er(f)+` Td
|
|
474
|
-
`,r+="("+Df(T)+`) Tj
|
|
475
|
-
`,r+=-Er(u)+` 0 Td
|
|
476
|
-
`,f=-(i+2),d=0,_=E?S:S+1,g++,b=""}break}return n.text=r,n.fontSize=i,n},f1=function(e,r,t){var n=r.scope.internal.getFont(r.fontName,r.fontStyle),a=r.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:r.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:a}},zk={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Uk=function(e,r){var t={type:"reference",object:e};r.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&r.internal.getPageInfo(e.page).pageContext.annotations.push(t)},Hk=function(e,r){for(var t in e)if(e.hasOwnProperty(t)){var n=t,a=e[t];r.internal.newObjectDeferredBegin(a.objId,!0),Sn(a)==="object"&&typeof a.putStream=="function"&&a.putStream(),delete e[n]}},Vk=function(e,r){if(r.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(Jl.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(zk)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Im=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new S_,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in n)if(n.hasOwnProperty(a)){var i=n[a];i.objId=void 0,i.hasAnnotation&&Uk(i,t)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(t){(function(n,a){var i=!n;for(var o in n||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var s=n[o],c=[],u=s.Rect;if(s.Rect&&(s.Rect=Bk(s.Rect,a)),a.internal.newObjectDeferredBegin(s.objId,!0),s.DA=er.createDefaultAppearanceStream(s),Sn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(c=s.getKeyValueListForStream()),s.Rect=u,s.hasAppearanceStream&&!s.appearanceStreamContent){var d=qk(s);c.push({key:"AP",value:"<</N "+d+">>"}),a.internal.acroformPlugin.xForms.push(d)}if(s.appearanceStreamContent){var p="";for(var y in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(y)){var f=s.appearanceStreamContent[y];if(p+="/"+y+" ",p+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var o in f)if(f.hasOwnProperty(o)){var _=f[o];typeof _=="function"&&(_=_.call(a,s)),p+="/"+o+" "+_+" ",a.internal.acroformPlugin.xForms.indexOf(_)>=0||a.internal.acroformPlugin.xForms.push(_)}}else typeof(_=f)=="function"&&(_=_.call(a,s)),p+="/"+o+" "+_,a.internal.acroformPlugin.xForms.indexOf(_)>=0||a.internal.acroformPlugin.xForms.push(_);p+=">>"}c.push({key:"AP",value:`<<
|
|
477
|
-
`+p+">>"})}a.internal.putStream({additionalKeyValues:c,objectId:s.objId}),a.internal.out("endobj")}i&&Hk(a.internal.acroformPlugin.xForms,a)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},w_=Oi.__acroform__.arrayToPdfArray=function(e,r,t){var n=function(o){return o};if(Array.isArray(e)){for(var a="[",i=0;i<e.length;i++)switch(i!==0&&(a+=" "),Sn(e[i])){case"boolean":case"number":case"object":a+=e[i].toString();break;case"string":e[i].substr(0,1)!=="/"?(r!==void 0&&t&&(n=t.internal.getEncryptor(r)),a+="("+Df(n(e[i].toString()))+")"):a+=e[i].toString()}return a+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},s2=function(e,r,t){var n=function(a){return a};return r!==void 0&&t&&(n=t.internal.getEncryptor(r)),(e=e||"").toString(),e="("+Df(n(e))+")"},Lu=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Lu.prototype.toString=function(){return this.objId+" 0 R"},Lu.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Lu.prototype.getKeyValueListForStream=function(){var e=[],r=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var t in r)if(Object.getOwnPropertyDescriptor(this,r[t]).configurable===!1){var n=r[t],a=this[n];a&&(Array.isArray(a)?e.push({key:n,value:w_(a,this.objId,this.scope)}):a instanceof Lu?(a.scope=this.scope,e.push({key:n,value:a.objId+" 0 R"})):typeof a!="function"&&e.push({key:n,value:a}))}return e};var __=function(){Lu.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,r=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};bs(__,Lu);var S_=function(){Lu.call(this);var e,r=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return r.length>0?r:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return r}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Df(t(e))+")"}},set:function(t){e=t}})};bs(S_,Lu);var Jl=function e(){Lu.call(this);var r=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return r},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute F supplied.');r=b}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Yi(r,3)},set:function(b){b?this.F=Xi(r,3):this.F=Ki(r,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(b){if(isNaN(b))throw new Error('Invalid value "'+b+'" for attribute Ff supplied.');t=b}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(b){n=b!==void 0?b:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(b){n[0]=b}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(b){n[1]=b}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(b){n[2]=b}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(b){n[3]=b}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(b){switch(b){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=b;break;default:throw new Error('Invalid value "'+b+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof B1)return;i="FieldObject"+e.FieldNum++}var b=function(g){return g};return this.scope&&(b=this.scope.internal.getEncryptor(this.objId)),"("+Df(b(i))+")"},set:function(b){i=b.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(b){i=b}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(b){o=b}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(b){s=b}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(b){c=b}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return u===void 0?50/Im:u},set:function(b){u=b}});var d="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return d},set:function(b){d=b}});var p="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!p||this instanceof B1||this instanceof Of))return s2(p,this.objId,this.scope)},set:function(b){b=b.toString(),p=b}});var y=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(y)return this instanceof Na?y:s2(y,this.objId,this.scope)},set:function(b){b=b.toString(),y=this instanceof Na?b:b.substr(0,1)==="("?ih(b.substr(1,b.length-2)):ih(b)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Na?ih(y.substr(1,y.length-1)):y},set:function(b){b=b.toString(),y=this instanceof Na?"/"+b:b}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(b){this.V=b}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Na?f:s2(f,this.objId,this.scope)},set:function(b){b=b.toString(),f=this instanceof Na?b:b.substr(0,1)==="("?ih(b.substr(1,b.length-2)):ih(b)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Na?ih(f.substr(1,f.length-1)):f},set:function(b){b=b.toString(),f=this instanceof Na?"/"+b:b}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var _,S=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return S},set:function(b){b=!!b,S=b}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(_)return _},set:function(b){_=b}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,1)},set:function(b){b?this.Ff=Xi(this.Ff,1):this.Ff=Ki(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,2)},set:function(b){b?this.Ff=Xi(this.Ff,2):this.Ff=Ki(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,3)},set:function(b){b?this.Ff=Xi(this.Ff,3):this.Ff=Ki(this.Ff,3)}});var w=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(w!==null)return w},set:function(b){if([0,1,2].indexOf(b)===-1)throw new Error('Invalid value "'+b+'" for attribute Q supplied.');w=b}}),Object.defineProperty(this,"textAlign",{get:function(){var b;switch(w){case 0:default:b="left";break;case 1:b="center";break;case 2:b="right"}return b},configurable:!0,enumerable:!0,set:function(b){switch(b){case"right":case 2:w=2;break;case"center":case 1:w=1;break;case"left":case 0:default:w=0}}})};bs(Jl,Lu);var gh=function(){Jl.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var r=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return w_(r,this.objId,this.scope)},set:function(t){var n,a;a=[],typeof(n=t)=="string"&&(a=function(i,o,s){s||(s=1);for(var c,u=[];c=o.exec(i);)u.push(c[s]);return u}(n,/\((.*?)\)/g)),r=a}}),this.getOptions=function(){return r},this.setOptions=function(t){r=t,this.sort&&r.sort()},this.addOption=function(t){t=(t=t||"").toString(),r.push(t),this.sort&&r.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();r.indexOf(t)!==-1&&(r.splice(r.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,18)},set:function(t){t?this.Ff=Xi(this.Ff,18):this.Ff=Ki(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Xi(this.Ff,19):this.Ff=Ki(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,20)},set:function(t){t?(this.Ff=Xi(this.Ff,20),r.sort()):this.Ff=Ki(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,22)},set:function(t){t?this.Ff=Xi(this.Ff,22):this.Ff=Ki(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,23)},set:function(t){t?this.Ff=Xi(this.Ff,23):this.Ff=Ki(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,27)},set:function(t){t?this.Ff=Xi(this.Ff,27):this.Ff=Ki(this.Ff,27)}}),this.hasAppearanceStream=!1};bs(gh,Jl);var vh=function(){gh.call(this),this.fontName="helvetica",this.combo=!1};bs(vh,gh);var mh=function(){vh.call(this),this.combo=!0};bs(mh,vh);var w1=function(){mh.call(this),this.edit=!0};bs(w1,mh);var Na=function(){Jl.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,15)},set:function(t){t?this.Ff=Xi(this.Ff,15):this.Ff=Ki(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,16)},set:function(t){t?this.Ff=Xi(this.Ff,16):this.Ff=Ki(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,17)},set:function(t){t?this.Ff=Xi(this.Ff,17):this.Ff=Ki(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,26)},set:function(t){t?this.Ff=Xi(this.Ff,26):this.Ff=Ki(this.Ff,26)}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(i){return i};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(r).length!==0){var n,a=[];for(n in a.push("<<"),r)a.push("/"+n+" ("+Df(t(r[n]))+")");return a.push(">>"),a.join(`
|
|
478
|
-
`)}},set:function(t){Sn(t)==="object"&&(r=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(t){typeof t=="string"&&(r.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};bs(Na,Jl);var _1=function(){Na.call(this),this.pushButton=!0};bs(_1,Na);var yh=function(){Na.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r!==void 0?r:[]}})};bs(yh,Na);var B1=function(){var e,r;Jl.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){e=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(a){r=a}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(s){return s};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var i,o=[];for(i in o.push("<<"),n)o.push("/"+i+" ("+Df(a(n[i]))+")");return o.push(">>"),o.join(`
|
|
479
|
-
`)},set:function(a){Sn(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(a){t=a}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(a){t="/"+a}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=er.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};bs(B1,Jl),yh.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var r in this.Kids)if(this.Kids.hasOwnProperty(r)){var t=this.Kids[r];t.appearanceStreamContent=e.createAppearanceStream(t.optionName),t.caption=e.getCA()}},yh.prototype.createOption=function(e){var r=new B1;return r.Parent=this,r.optionName=e,this.Kids.push(r),Gk.call(this.scope,r),r};var S1=function(){Na.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=er.CheckBox.createAppearanceStream()};bs(S1,Na);var Of=function(){Jl.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,13)},set:function(r){r?this.Ff=Xi(this.Ff,13):this.Ff=Ki(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,21)},set:function(r){r?this.Ff=Xi(this.Ff,21):this.Ff=Ki(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,23)},set:function(r){r?this.Ff=Xi(this.Ff,23):this.Ff=Ki(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,24)},set:function(r){r?this.Ff=Xi(this.Ff,24):this.Ff=Ki(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,25)},set:function(r){r?this.Ff=Xi(this.Ff,25):this.Ff=Ki(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,26)},set:function(r){r?this.Ff=Xi(this.Ff,26):this.Ff=Ki(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){Number.isInteger(r)&&(e=r)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};bs(Of,Jl);var x1=function(){Of.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Yi(this.Ff,14)},set:function(e){e?this.Ff=Xi(this.Ff,14):this.Ff=Ki(this.Ff,14)}}),this.password=!0};bs(x1,Of);var er={CheckBox:{createAppearanceStream:function(){return{N:{On:er.CheckBox.YesNormal},D:{On:er.CheckBox.YesPushDown,Off:er.CheckBox.OffPushDown}}},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),i=M2(e,e.caption);return t.push("0.749023 g"),t.push("0 0 "+Er(er.internal.getWidth(e))+" "+Er(er.internal.getHeight(e))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+Er(i.fontSize)+" Tf "+a),t.push("BT"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC"),r.stream=t.join(`
|
|
480
|
-
`),r},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),a=[],i=er.internal.getHeight(e),o=er.internal.getWidth(e),s=M2(e,e.caption);return a.push("1 g"),a.push("0 0 "+Er(o)+" "+Er(i)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+Er(o-1)+" "+Er(i-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+t+" "+Er(s.fontSize)+" Tf "+n),a.push(s.text),a.push("ET"),a.push("Q"),r.stream=a.join(`
|
|
481
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Er(er.internal.getWidth(e))+" "+Er(er.internal.getHeight(e))+" re"),t.push("f"),r.stream=t.join(`
|
|
482
|
-
`),r}},RadioButton:{Circle:{createAppearanceStream:function(e){var r={D:{Off:er.RadioButton.Circle.OffPushDown},N:{}};return r.N[e]=er.RadioButton.Circle.YesNormal,r.D[e]=er.RadioButton.Circle.YesPushDown,r},getCA:function(){return"l"},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=er.internal.getWidth(e)<=er.internal.getHeight(e)?er.internal.getWidth(e)/4:er.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=er.internal.Bezier_C,i=Number((n*a).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+zc(er.internal.getWidth(e)/2)+" "+zc(er.internal.getHeight(e)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),t.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),t.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),t.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
483
|
-
`),r},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=er.internal.getWidth(e)<=er.internal.getHeight(e)?er.internal.getWidth(e)/4:er.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),i=Number((a*er.internal.Bezier_C).toFixed(5)),o=Number((n*er.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+zc(er.internal.getWidth(e)/2)+" "+zc(er.internal.getHeight(e)/2)+" cm"),t.push(a+" 0 m"),t.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),t.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),t.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),t.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+zc(er.internal.getWidth(e)/2)+" "+zc(er.internal.getHeight(e)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),t.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),t.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),t.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
484
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=er.internal.getWidth(e)<=er.internal.getHeight(e)?er.internal.getWidth(e)/4:er.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),i=Number((a*er.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+zc(er.internal.getWidth(e)/2)+" "+zc(er.internal.getHeight(e)/2)+" cm"),t.push(a+" 0 m"),t.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),t.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),t.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),t.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),t.push("f"),t.push("Q"),r.stream=t.join(`
|
|
485
|
-
`),r}},Cross:{createAppearanceStream:function(e){var r={D:{Off:er.RadioButton.Cross.OffPushDown},N:{}};return r.N[e]=er.RadioButton.Cross.YesNormal,r.D[e]=er.RadioButton.Cross.YesPushDown,r},getCA:function(){return"8"},YesNormal:function(e){var r=Au(e);r.scope=e.scope;var t=[],n=er.internal.calculateCross(e);return t.push("q"),t.push("1 1 "+Er(er.internal.getWidth(e)-2)+" "+Er(er.internal.getHeight(e)-2)+" re"),t.push("W"),t.push("n"),t.push(Er(n.x1.x)+" "+Er(n.x1.y)+" m"),t.push(Er(n.x2.x)+" "+Er(n.x2.y)+" l"),t.push(Er(n.x4.x)+" "+Er(n.x4.y)+" m"),t.push(Er(n.x3.x)+" "+Er(n.x3.y)+" l"),t.push("s"),t.push("Q"),r.stream=t.join(`
|
|
486
|
-
`),r},YesPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=er.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+Er(er.internal.getWidth(e))+" "+Er(er.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Er(er.internal.getWidth(e)-2)+" "+Er(er.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Er(t.x1.x)+" "+Er(t.x1.y)+" m"),n.push(Er(t.x2.x)+" "+Er(t.x2.y)+" l"),n.push(Er(t.x4.x)+" "+Er(t.x4.y)+" m"),n.push(Er(t.x3.x)+" "+Er(t.x3.y)+" l"),n.push("s"),n.push("Q"),r.stream=n.join(`
|
|
487
|
-
`),r},OffPushDown:function(e){var r=Au(e);r.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Er(er.internal.getWidth(e))+" "+Er(er.internal.getHeight(e))+" re"),t.push("f"),r.stream=t.join(`
|
|
488
|
-
`),r}}},createDefaultAppearanceStream:function(e){var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,t=e.scope.__private__.encodeColorString(e.color);return"/"+r+" "+e.fontSize+" Tf "+t}};er.internal={Bezier_C:.551915024494,calculateCross:function(e){var r=er.internal.getWidth(e),t=er.internal.getHeight(e),n=Math.min(r,t);return{x1:{x:(r-n)/2,y:(t-n)/2+n},x2:{x:(r-n)/2+n,y:(t-n)/2},x3:{x:(r-n)/2,y:(t-n)/2},x4:{x:(r-n)/2+n,y:(t-n)/2+n}}}},er.internal.getWidth=function(e){var r=0;return Sn(e)==="object"&&(r=K4(e.Rect[2])),r},er.internal.getHeight=function(e){var r=0;return Sn(e)==="object"&&(r=K4(e.Rect[3])),r};var Gk=Oi.addField=function(e){if(Vk(this,e),!(e instanceof Jl))throw new Error("Invalid argument passed to jsPDF.addField.");var r;return(r=e).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=!1,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Oi.AcroFormChoiceField=gh,Oi.AcroFormListBox=vh,Oi.AcroFormComboBox=mh,Oi.AcroFormEditBox=w1,Oi.AcroFormButton=Na,Oi.AcroFormPushButton=_1,Oi.AcroFormRadioButton=yh,Oi.AcroFormCheckBox=S1,Oi.AcroFormTextField=Of,Oi.AcroFormPasswordField=x1,Oi.AcroFormAppearance=er,Oi.AcroForm={ChoiceField:gh,ListBox:vh,ComboBox:mh,EditBox:w1,Button:Na,PushButton:_1,RadioButton:yh,CheckBox:S1,TextField:Of,PasswordField:x1,Appearance:er},hr.AcroForm={ChoiceField:gh,ListBox:vh,ComboBox:mh,EditBox:w1,Button:Na,PushButton:_1,RadioButton:yh,CheckBox:S1,TextField:Of,PasswordField:x1,Appearance:er};hr.AcroForm;function x_(e){return e.reduce(function(r,t,n){return r[t]=n,r},{})}(function(e){e.__addimage__={};var r="UNKNOWN",t={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=e.__addimage__.getImageFileTypeByImageData=function(A,L){var O,I,M,G,W,Y=r;if((L=L||r)==="RGBA"||A.data!==void 0&&A.data instanceof Uint8ClampedArray&&"height"in A&&"width"in A)return"RGBA";if(j(A))for(W in t)for(M=t[W],O=0;O<M.length;O+=1){for(G=!0,I=0;I<M[O].length;I+=1)if(M[O][I]!==void 0&&M[O][I]!==A[I]){G=!1;break}if(G===!0){Y=W;break}}else for(W in t)for(M=t[W],O=0;O<M.length;O+=1){for(G=!0,I=0;I<M[O].length;I+=1)if(M[O][I]!==void 0&&M[O][I]!==A.charCodeAt(I)){G=!1;break}if(G===!0){Y=W;break}}return Y===r&&L!==r&&(Y=L),Y},a=function A(L){for(var O=this.internal.write,I=this.internal.putStream,M=(0,this.internal.getFilters)();M.indexOf("FlateEncode")!==-1;)M.splice(M.indexOf("FlateEncode"),1);L.objectId=this.internal.newObject();var G=[];if(G.push({key:"Type",value:"/XObject"}),G.push({key:"Subtype",value:"/Image"}),G.push({key:"Width",value:L.width}),G.push({key:"Height",value:L.height}),L.colorSpace===w.INDEXED?G.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(L.palette.length/3-1)+" "+("sMask"in L&&L.sMask!==void 0?L.objectId+2:L.objectId+1)+" 0 R]"}):(G.push({key:"ColorSpace",value:"/"+L.colorSpace}),L.colorSpace===w.DEVICE_CMYK&&G.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),G.push({key:"BitsPerComponent",value:L.bitsPerComponent}),"decodeParameters"in L&&L.decodeParameters!==void 0&&G.push({key:"DecodeParms",value:"<<"+L.decodeParameters+">>"}),"transparency"in L&&Array.isArray(L.transparency)){for(var W="",Y=0,te=L.transparency.length;Y<te;Y++)W+=L.transparency[Y]+" "+L.transparency[Y]+" ";G.push({key:"Mask",value:"["+W+"]"})}L.sMask!==void 0&&G.push({key:"SMask",value:L.objectId+1+" 0 R"});var V=L.filter!==void 0?["/"+L.filter]:void 0;if(I({data:L.data,additionalKeyValues:G,alreadyAppliedFilters:V,objectId:L.objectId}),O("endobj"),"sMask"in L&&L.sMask!==void 0){var H="/Predictor "+L.predictor+" /Colors 1 /BitsPerComponent "+L.bitsPerComponent+" /Columns "+L.width,q={width:L.width,height:L.height,colorSpace:"DeviceGray",bitsPerComponent:L.bitsPerComponent,decodeParameters:H,data:L.sMask};"filter"in L&&(q.filter=L.filter),A.call(this,q)}if(L.colorSpace===w.INDEXED){var D=this.internal.newObject();I({data:T(new Uint8Array(L.palette)),objectId:D}),O("endobj")}},i=function(){var A=this.internal.collections.addImage_images;for(var L in A)a.call(this,A[L])},o=function(){var A,L=this.internal.collections.addImage_images,O=this.internal.write;for(var I in L)O("/I"+(A=L[I]).index,A.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",o))},c=function(){var A=this.internal.collections.addImage_images;return s.call(this),A},u=function(){return Object.keys(this.internal.collections.addImage_images).length},d=function(A){return typeof e["process"+A.toUpperCase()]=="function"},p=function(A){return Sn(A)==="object"&&A.nodeType===1},y=function(A,L){if(A.nodeName==="IMG"&&A.hasAttribute("src")){var O=""+A.getAttribute("src");if(O.indexOf("data:image/")===0)return up(unescape(O).split("base64,").pop());var I=e.loadFile(O,!0);if(I!==void 0)return I}if(A.nodeName==="CANVAS"){if(A.width===0||A.height===0)throw new Error("Given canvas must have data. Canvas width: "+A.width+", height: "+A.height);var M;switch(L){case"PNG":M="image/png";break;case"WEBP":M="image/webp";break;case"JPEG":case"JPG":default:M="image/jpeg"}return up(A.toDataURL(M,1).split("base64,").pop())}},f=function(A){var L=this.internal.collections.addImage_images;if(L){for(var O in L)if(A===L[O].alias)return L[O]}},_=function(A,L,O){return A||L||(A=-96,L=-96),A<0&&(A=-1*O.width*72/A/this.internal.scaleFactor),L<0&&(L=-1*O.height*72/L/this.internal.scaleFactor),A===0&&(A=L*O.width/O.height),L===0&&(L=A*O.height/O.width),[A,L]},S=function(A,L,O,I,M,G){var W=_.call(this,O,I,M),Y=this.internal.getCoordinateString,te=this.internal.getVerticalCoordinateString,V=c.call(this);if(O=W[0],I=W[1],V[M.index]=M,G){G*=Math.PI/180;var H=Math.cos(G),q=Math.sin(G),D=function(ne){return ne.toFixed(4)},$=[D(H),D(q),D(-1*q),D(H),0,0,"cm"]}this.internal.write("q"),G?(this.internal.write([1,"0","0",1,Y(A),te(L+I),"cm"].join(" ")),this.internal.write($.join(" ")),this.internal.write([Y(O),"0","0",Y(I),"0","0","cm"].join(" "))):this.internal.write([Y(O),"0","0",Y(I),Y(A),te(L+I),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+M.index+" Do"),this.internal.write("Q")},w=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var b=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},g=e.__addimage__.sHashCode=function(A){var L,O,I=0;if(typeof A=="string")for(O=A.length,L=0;L<O;L++)I=(I<<5)-I+A.charCodeAt(L),I|=0;else if(j(A))for(O=A.byteLength/2,L=0;L<O;L++)I=(I<<5)-I+A[L],I|=0;return I},v=e.__addimage__.validateStringAsBase64=function(A){(A=A||"").toString().trim();var L=!0;return A.length===0&&(L=!1),A.length%4!=0&&(L=!1),/^[A-Za-z0-9+/]+$/.test(A.substr(0,A.length-2))===!1&&(L=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(A.substr(-2))===!1&&(L=!1),L},E=e.__addimage__.extractImageFromDataUrl=function(A){if(A==null||!(A=A.trim()).startsWith("data:"))return null;var L=A.indexOf(",");return L<0?null:A.substring(0,L).trim().endsWith("base64")?A.substring(L+1):null},x=e.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};e.__addimage__.isArrayBuffer=function(A){return x()&&A instanceof ArrayBuffer};var j=e.__addimage__.isArrayBufferView=function(A){return x()&&typeof Uint32Array<"u"&&(A instanceof Int8Array||A instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&A instanceof Uint8ClampedArray||A instanceof Int16Array||A instanceof Uint16Array||A instanceof Int32Array||A instanceof Uint32Array||A instanceof Float32Array||A instanceof Float64Array)},N=e.__addimage__.binaryStringToUint8Array=function(A){for(var L=A.length,O=new Uint8Array(L),I=0;I<L;I++)O[I]=A.charCodeAt(I);return O},T=e.__addimage__.arrayBufferToBinaryString=function(A){for(var L="",O=j(A)?A:new Uint8Array(A),I=0;I<O.length;I+=8192)L+=String.fromCharCode.apply(null,O.subarray(I,I+8192));return L};e.addImage=function(){var A,L,O,I,M,G,W,Y,te;if(typeof arguments[1]=="number"?(L=r,O=arguments[1],I=arguments[2],M=arguments[3],G=arguments[4],W=arguments[5],Y=arguments[6],te=arguments[7]):(L=arguments[1],O=arguments[2],I=arguments[3],M=arguments[4],G=arguments[5],W=arguments[6],Y=arguments[7],te=arguments[8]),Sn(A=arguments[0])==="object"&&!p(A)&&"imageData"in A){var V=A;A=V.imageData,L=V.format||L||r,O=V.x||O||0,I=V.y||I||0,M=V.w||V.width||M,G=V.h||V.height||G,W=V.alias||W,Y=V.compression||Y,te=V.rotation||V.angle||te}var H=this.internal.getFilters();if(Y===void 0&&H.indexOf("FlateEncode")!==-1&&(Y="SLOW"),isNaN(O)||isNaN(I))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var q=F.call(this,A,L,W,Y);return S.call(this,O,I,M,G,q,te),this};var F=function(A,L,O,I){var M,G,W;if(typeof A=="string"&&n(A)===r){A=unescape(A);var Y=C(A,!1);(Y!==""||(Y=e.loadFile(A,!0))!==void 0)&&(A=Y)}if(p(A)&&(A=y(A,L)),L=n(A,L),!d(L))throw new Error("addImage does not support files of type '"+L+"', please ensure that a plugin for '"+L+"' support is added.");if(((W=O)==null||W.length===0)&&(O=function(te){return typeof te=="string"||j(te)?g(te):j(te.data)?g(te.data):null}(A)),(M=f.call(this,O))||(x()&&(A instanceof Uint8Array||L==="RGBA"||(G=A,A=N(A))),M=this["process"+L.toUpperCase()](A,u.call(this),O,function(te){return te&&typeof te=="string"&&(te=te.toUpperCase()),te in e.image_compression?te:b.NONE}(I),G)),!M)throw new Error("An unknown error occurred whilst processing the image.");return M},C=e.__addimage__.convertBase64ToBinaryString=function(A,L){L=typeof L!="boolean"||L;var O,I="";if(typeof A=="string"){var M;O=(M=E(A))!==null&&M!==void 0?M:A;try{I=up(O)}catch(G){if(L)throw v(O)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+G.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return I};e.getImageProperties=function(A){var L,O,I="";if(p(A)&&(A=y(A)),typeof A=="string"&&n(A)===r&&((I=C(A,!1))===""&&(I=e.loadFile(A)||""),A=I),O=n(A),!d(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(!x()||A instanceof Uint8Array||(A=N(A)),!(L=this["process"+O.toUpperCase()](A)))throw new Error("An unknown error occurred whilst processing the image");return L.fileType=O,L}})(hr.API),function(e){var r=function(t){if(t!==void 0&&t!="")return!0};hr.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(t){for(var n,a,i,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(t.objId),u=t.pageContext.annotations,d=!1,p=0;p<u.length&&!d;p++)switch((n=u[p]).type){case"link":(r(n.options.url)||r(n.options.pageNumber))&&(d=!0);break;case"reference":case"text":case"freetext":d=!0}if(d!=0){this.internal.write("/Annots [");for(var y=0;y<u.length;y++){n=u[y];var f=this.internal.pdfEscape,_=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var S=this.internal.newAdditionalObject(),w=this.internal.newAdditionalObject(),b=this.internal.getEncryptor(S.objId),g=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(a="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y)+"] ")+"/Contents ("+f(b(n.contents))+")",i+=" /Popup "+w.objId+" 0 R",i+=" /P "+c.objId+" 0 R",i+=" /T ("+f(b(g))+") >>",S.content=i;var v=S.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+o(n.bounds.x+30)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+s(n.bounds.y)+"] ")+" /Parent "+v,n.open&&(i+=" /Open true"),i+=" >>",w.content=i,this.internal.write(S.objId,"0 R",w.objId,"0 R");break;case"freetext":a="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y+n.bounds.h)+"] ";var E=n.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+f(_(n.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+E+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var x=this.annotations._nameMap[n.options.name];n.options.pageNumber=x.page,n.options.top=x.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+f(_(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var j=s(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+j+" "+n.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),e.createAnnotation=function(t){var n=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":n.pageContext.annotations.push(t)}},e.link=function(t,n,a,i,o){var s=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:c(t),y:u(n),w:c(t+a),h:u(n+i)},options:o,type:"link"})},e.textWithLink=function(t,n,a,i){var o,s,c=this.getTextWidth(t),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){s=i.maxWidth;var d=this.splitTextToSize(t,s).length;o=Math.ceil(u*d)}else s=c,o=u;return this.text(t,n,a,i),a+=.2*u,i.align==="center"&&(n-=c/2),i.align==="right"&&(n-=c),this.link(n,a-u,s,o,i),c},e.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}}(hr.API),function(e){var r={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var i=e.__arabicParser__.isInArabicSubstitutionA=function(S){return r[S.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(S){return typeof S=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(S)},s=e.__arabicParser__.isArabicEndLetter=function(S){return o(S)&&i(S)&&r[S.charCodeAt(0)].length<=2},c=e.__arabicParser__.isArabicAlfLetter=function(S){return o(S)&&a.indexOf(S.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(S){return o(S)&&i(S)&&r[S.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(S){return o(S)&&i(S)&&r[S.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(S){return o(S)&&i(S)&&r[S.charCodeAt(0)].length>=3};var d=e.__arabicParser__.arabicLetterHasMedialForm=function(S){return o(S)&&i(S)&&r[S.charCodeAt(0)].length==4},p=e.__arabicParser__.resolveLigatures=function(S){var w=0,b=t,g="",v=0;for(w=0;w<S.length;w+=1)b[S.charCodeAt(w)]!==void 0?(v++,typeof(b=b[S.charCodeAt(w)])=="number"&&(g+=String.fromCharCode(b),b=t,v=0),w===S.length-1&&(b=t,g+=S.charAt(w-(v-1)),w-=v-1,v=0)):(b=t,g+=S.charAt(w-v),w-=v,v=0);return g};e.__arabicParser__.isArabicDiacritic=function(S){return S!==void 0&&n[S.charCodeAt(0)]!==void 0};var y=e.__arabicParser__.getCorrectForm=function(S,w,b){return o(S)?i(S)===!1?-1:!u(S)||!o(w)&&!o(b)||!o(b)&&s(w)||s(S)&&!o(w)||s(S)&&c(w)||s(S)&&s(w)?0:d(S)&&o(w)&&!s(w)&&o(b)&&u(b)?3:s(S)||!o(b)?1:2:-1},f=function(S){var w=0,b=0,g=0,v="",E="",x="",j=(S=S||"").split("\\s+"),N=[];for(w=0;w<j.length;w+=1){for(N.push(""),b=0;b<j[w].length;b+=1)v=j[w][b],E=j[w][b-1],x=j[w][b+1],o(v)?(g=y(v,E,x),N[w]+=g!==-1?String.fromCharCode(r[v.charCodeAt(0)][g]):v):N[w]+=v;N[w]=p(N[w])}return N.join(" ")},_=e.__arabicParser__.processArabic=e.processArabic=function(){var S,w=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,b=[];if(Array.isArray(w)){var g=0;for(b=[],g=0;g<w.length;g+=1)Array.isArray(w[g])?b.push([f(w[g][0]),w[g][1],w[g][2]]):b.push([f(w[g])]);S=b}else S=f(w);return typeof arguments[0]=="string"?S:(arguments[0].text=S,arguments[0])};e.events.push(["preProcessText",_])}(hr.API),hr.API.autoPrint=function(e){var r;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+r+" 0 R")})}return this},function(e){var r=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(s){t=s}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(s){a=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(s){i=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};r.prototype.getContext=function(t,n){var a;if((t=t||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}])}(hr.API),function(e){var r={left:0,top:0,bottom:0,right:0},t=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},r),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(S){c=S}});var u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(S){u=S}});var d=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return d},set:function(S){d=S}});var p=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return p},set:function(S){p=S}});var y=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return y},set:function(S){y=S}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(S){f=S}});var _=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return _},set:function(S){_=S}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(c){return n.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},e.getTextDimensions=function(c,u){n.call(this);var d=(u=u||{}).fontSize||this.getFontSize(),p=u.font||this.getFont(),y=u.scaleFactor||this.internal.scaleFactor,f=0,_=0,S=0,w=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var b=u.maxWidth;b>0?typeof c=="string"?c=this.splitTextToSize(c,b):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(v,E){return v.concat(w.splitTextToSize(E,b))},[])):c=Array.isArray(c)?c:[c];for(var g=0;g<c.length;g++)f<(S=this.getStringUnitWidth(c[g],{font:p})*d)&&(f=S);return f!==0&&(_=c.length),{w:f/=y,h:Math.max((_*d*this.getLineHeightFactor()-d*(this.getLineHeightFactor()-1))/y,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var c=this.internal.__cell__.margins||r;return this.internal.__cell__.lastCell=new i(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var c;c=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var u=this.internal.__cell__.lastCell,d=this.internal.__cell__.padding,p=this.internal.__cell__.margins||r,y=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===c.lineNumber?(c.x=(u.x||0)+(u.width||0),c.y=u.y||0):u.y+u.height+c.height+p.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=p.top,f&&y&&(this.printHeaderRow(c.lineNumber,!0),c.y+=y[0].height)):c.y=u.y+u.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-d,c.y+d,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+d,{align:"center",baseline:"top",maxWidth:c.width-d-d}):this.text(c.text,c.x+d,c.y+d,{align:"left",baseline:"top",maxWidth:c.width-d-d})),this.internal.__cell__.lastCell=c,this};e.table=function(c,u,d,p,y){if(n.call(this),!d)throw new Error("No data for PDF table.");var f,_,S,w,b=[],g=[],v=[],E={},x={},j=[],N=[],T=(y=y||{}).autoSize||!1,F=y.printHeaders!==!1,C=y.css&&y.css["font-size"]!==void 0?16*y.css["font-size"]:y.fontSize||12,A=y.margins||Object.assign({width:this.getPageWidth()},r),L=typeof y.padding=="number"?y.padding:3,O=y.headerBackgroundColor||"#c8c8c8",I=y.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=F,this.internal.__cell__.margins=A,this.internal.__cell__.table_font_size=C,this.internal.__cell__.padding=L,this.internal.__cell__.headerBackgroundColor=O,this.internal.__cell__.headerTextColor=I,this.setFontSize(C),p==null)g=b=Object.keys(d[0]),v=b.map(function(){return"left"});else if(Array.isArray(p)&&Sn(p[0])==="object")for(b=p.map(function(V){return V.name}),g=p.map(function(V){return V.prompt||V.name||""}),v=p.map(function(V){return V.align||"left"}),f=0;f<p.length;f+=1)x[p[f].name]=p[f].width*(19.049976/25.4);else Array.isArray(p)&&typeof p[0]=="string"&&(g=b=p,v=b.map(function(){return"left"}));if(T||Array.isArray(p)&&typeof p[0]=="string")for(f=0;f<b.length;f+=1){for(E[w=b[f]]=d.map(function(V){return V[w]}),this.setFont(void 0,"bold"),j.push(this.getTextDimensions(g[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),_=E[w],this.setFont(void 0,"normal"),S=0;S<_.length;S+=1)j.push(this.getTextDimensions(_[S],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);x[w]=Math.max.apply(null,j)+L+L,j=[]}if(F){var M={};for(f=0;f<b.length;f+=1)M[b[f]]={},M[b[f]].text=g[f],M[b[f]].align=v[f];var G=s.call(this,M,x);N=b.map(function(V){return new i(c,u,x[V],G,M[V].text,void 0,M[V].align)}),this.setTableHeaderRow(N),this.printHeaderRow(1,!1)}var W=p.reduce(function(V,H){return V[H.name]=H.align,V},{});for(f=0;f<d.length;f+=1){"rowStart"in y&&y.rowStart instanceof Function&&y.rowStart({row:f,data:d[f]},this);var Y=s.call(this,d[f],x);for(S=0;S<b.length;S+=1){var te=d[f][b[S]];"cellStart"in y&&y.cellStart instanceof Function&&y.cellStart({row:f,col:S,data:te},this),o.call(this,new i(c,u,x[b[S]],Y,te,f+2,W[b[S]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=u,this};var s=function(c,u){var d=this.internal.__cell__.padding,p=this.internal.__cell__.table_font_size,y=this.internal.scaleFactor;return Object.keys(c).map(function(f){var _=c[f];return this.splitTextToSize(_.hasOwnProperty("text")?_.text:_,u[f]-d-d)},this).map(function(f){return this.getLineHeightFactor()*f.length*p/y+d+d},this).reduce(function(f,_){return Math.max(f,_)},0)};e.setTableHeaderRow=function(c){n.call(this),this.internal.__cell__.tableHeaderRow=c},e.printHeaderRow=function(c,u){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var d;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var p=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(p[0],p[1],p[2],p[3],void 0,-1)}this.setFont(void 0,"bold");for(var y=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){d=this.internal.__cell__.tableHeaderRow[f].clone(),u&&(d.y=this.internal.__cell__.margins.top||0,y.push(d)),d.lineNumber=c;var _=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,d),this.setTextColor(_)}y.length>0&&this.setTableHeaderRow(y),this.setFont(void 0,"normal"),t=!1}}(hr.API);var E_={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},P_=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],I2=x_(P_),O_=[100,200,300,400,500,600,700,800,900],Wk=x_(O_);function j2(e){var r=e.family.replace(/"|'/g,"").toLowerCase(),t=function(i){return E_[i=i||"normal"]?i:"normal"}(e.style),n=function(i){if(!i)return 400;if(typeof i=="number")return i>=100&&i<=900&&i%100==0?i:400;if(/^\d00$/.test(i))return parseInt(i);switch(i){case"bold":return 700;case"normal":default:return 400}}(e.weight),a=function(i){return typeof I2[i=i||"normal"]=="number"?i:"normal"}(e.stretch);return{family:r,style:t,weight:n,stretch:a,src:e.src||[],ref:e.ref||{name:r,style:[a,t,n].join(" ")}}}function Z4(e,r,t,n){var a;for(a=t;a>=0&&a<r.length;a+=n)if(e[r[a]])return e[r[a]];for(a=t;a>=0&&a<r.length;a-=n)if(e[r[a]])return e[r[a]]}var $k={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Q4={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function J4(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Yk(e,r,t){for(var n=(t=t||{}).defaultFontFamily||"times",a=Object.assign({},$k,t.genericFontFamilies||{}),i=null,o=null,s=0;s<r.length;++s)if(a[(i=j2(r[s])).family]&&(i.family=a[i.family]),e.hasOwnProperty(i.family)){o=e[i.family];break}if(!(o=o||e[n]))throw new Error("Could not find a font-family for the rule '"+J4(i)+"' and default family '"+n+"'.");if(o=function(c,u){if(u[c])return u[c];var d=I2[c],p=d<=I2.normal?-1:1,y=Z4(u,P_,d,p);if(!y)throw new Error("Could not find a matching font-stretch value for "+c);return y}(i.stretch,o),o=function(c,u){if(u[c])return u[c];for(var d=E_[c],p=0;p<d.length;++p)if(u[d[p]])return u[d[p]];throw new Error("Could not find a matching font-style for "+c)}(i.style,o),!(o=function(c,u){if(u[c])return u[c];if(c===400&&u[500])return u[500];if(c===500&&u[400])return u[400];var d=Wk[c],p=Z4(u,O_,d,c<400?-1:1);if(!p)throw new Error("Could not find a matching font-weight for value "+c);return p}(i.weight,o)))throw new Error("Failed to resolve a font for the rule '"+J4(i)+"'.");return o}function ew(e){return e.trimLeft()}function Xk(e,r){for(var t=0;t<e.length;){if(e.charAt(t)===r)return[e.substring(0,t),e.substring(t+1)];t+=1}return null}function Kk(e){var r=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return r===null?null:[r[0],e.substring(r[0].length)]}var h1,tw,rw,l2=["times"];(function(e){var r,t,n,a,i,o,s,c,u,d=function(q){return q=q||{},this.isStrokeTransparent=q.isStrokeTransparent||!1,this.strokeOpacity=q.strokeOpacity||1,this.strokeStyle=q.strokeStyle||"#000000",this.fillStyle=q.fillStyle||"#000000",this.isFillTransparent=q.isFillTransparent||!1,this.fillOpacity=q.fillOpacity||1,this.font=q.font||"10px sans-serif",this.textBaseline=q.textBaseline||"alphabetic",this.textAlign=q.textAlign||"left",this.lineWidth=q.lineWidth||1,this.lineJoin=q.lineJoin||"miter",this.lineCap=q.lineCap||"butt",this.path=q.path||[],this.transform=q.transform!==void 0?q.transform.clone():new c,this.globalCompositeOperation=q.globalCompositeOperation||"normal",this.globalAlpha=q.globalAlpha||1,this.clip_path=q.clip_path||[],this.currentPoint=q.currentPoint||new o,this.miterLimit=q.miterLimit||10,this.lastPoint=q.lastPoint||new o,this.lineDashOffset=q.lineDashOffset||0,this.lineDash=q.lineDash||[],this.margin=q.margin||[0,0,0,0],this.prevPageLastElemOffset=q.prevPageLastElemOffset||0,this.ignoreClearRect=typeof q.ignoreClearRect!="boolean"||q.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new p(this),r=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,c=this.internal.Matrix,u=new d}]);var p=function(q){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var D=q;Object.defineProperty(this,"pdf",{get:function(){return D}});var $=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return $},set:function(xe){$=!!xe}});var ne=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return ne},set:function(xe){ne=!!xe}});var Z=0;Object.defineProperty(this,"posX",{get:function(){return Z},set:function(xe){isNaN(xe)||(Z=xe)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(xe){isNaN(xe)||(Q=xe)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(xe){var ye;typeof xe=="number"?ye=[xe,xe,xe,xe]:((ye=new Array(4))[0]=xe[0],ye[1]=xe.length>=2?xe[1]:ye[0],ye[2]=xe.length>=3?xe[2]:ye[0],ye[3]=xe.length>=4?xe[3]:ye[1]),u.margin=ye}});var oe=!1;Object.defineProperty(this,"autoPaging",{get:function(){return oe},set:function(xe){oe=xe}});var se=0;Object.defineProperty(this,"lastBreak",{get:function(){return se},set:function(xe){se=xe}});var ue=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ue},set:function(xe){ue=xe}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(xe){xe instanceof d&&(u=xe)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(xe){u.path=xe}});var ve=[];Object.defineProperty(this,"ctxStack",{get:function(){return ve},set:function(xe){ve=xe}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(xe){var ye;ye=y(xe),this.ctx.fillStyle=ye.style,this.ctx.isFillTransparent=ye.a===0,this.ctx.fillOpacity=ye.a,this.pdf.setFillColor(ye.r,ye.g,ye.b,{a:ye.a}),this.pdf.setTextColor(ye.r,ye.g,ye.b,{a:ye.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(xe){var ye=y(xe);this.ctx.strokeStyle=ye.style,this.ctx.isStrokeTransparent=ye.a===0,this.ctx.strokeOpacity=ye.a,ye.a===0?this.pdf.setDrawColor(255,255,255):(ye.a,this.pdf.setDrawColor(ye.r,ye.g,ye.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(xe){["butt","round","square"].indexOf(xe)!==-1&&(this.ctx.lineCap=xe,this.pdf.setLineCap(xe))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(xe){isNaN(xe)||(this.ctx.lineWidth=xe,this.pdf.setLineWidth(xe))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(xe){["bevel","round","miter"].indexOf(xe)!==-1&&(this.ctx.lineJoin=xe,this.pdf.setLineJoin(xe))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(xe){isNaN(xe)||(this.ctx.miterLimit=xe,this.pdf.setMiterLimit(xe))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(xe){this.ctx.textBaseline=xe}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(xe){["right","end","center","left","start"].indexOf(xe)!==-1&&(this.ctx.textAlign=xe)}});var Pe=null;function ke(xe,ye){if(Pe===null){var Ie=function(me){var _e=[];return Object.keys(me).forEach(function(Ae){me[Ae].forEach(function(Le){var ge=null;switch(Le){case"bold":ge={family:Ae,weight:"bold"};break;case"italic":ge={family:Ae,style:"italic"};break;case"bolditalic":ge={family:Ae,weight:"bold",style:"italic"};break;case"":case"normal":ge={family:Ae}}ge!==null&&(ge.ref={name:Ae,style:Le},_e.push(ge))})}),_e}(xe.getFontList());Pe=function(me){for(var _e={},Ae=0;Ae<me.length;++Ae){var Le=j2(me[Ae]),ge=Le.family,Te=Le.stretch,Fe=Le.style,Ke=Le.weight;_e[ge]=_e[ge]||{},_e[ge][Te]=_e[ge][Te]||{},_e[ge][Te][Fe]=_e[ge][Te][Fe]||{},_e[ge][Te][Fe][Ke]=Le}return _e}(Ie.concat(ye))}return Pe}var Ne=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ne},set:function(xe){Pe=null,Ne=xe}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(xe){var ye;if(this.ctx.font=xe,(ye=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(xe))!==null){var Ie=ye[1];ye[2];var me=ye[3],_e=ye[4];ye[5];var Ae=ye[6],Le=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(_e)[2];_e=Math.floor(Le==="px"?parseFloat(_e)*this.pdf.internal.scaleFactor:Le==="em"?parseFloat(_e)*this.pdf.getFontSize():parseFloat(_e)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(_e);var ge=function(bt){var yt,ht,zt=[],Ot=bt.trim();if(Ot==="")return l2;if(Ot in Q4)return[Q4[Ot]];for(;Ot!=="";){switch(ht=null,yt=(Ot=ew(Ot)).charAt(0)){case'"':case"'":ht=Xk(Ot.substring(1),yt);break;default:ht=Kk(Ot)}if(ht===null||(zt.push(ht[0]),(Ot=ew(ht[1]))!==""&&Ot.charAt(0)!==","))return l2;Ot=Ot.replace(/^,/,"")}return zt}(Ae);if(this.fontFaces){var Te=Yk(ke(this.pdf,this.fontFaces),ge.map(function(bt){return{family:bt,stretch:"normal",weight:me,style:Ie}}));this.pdf.setFont(Te.ref.name,Te.ref.style)}else{var Fe="";(me==="bold"||parseInt(me,10)>=700||Ie==="bold")&&(Fe="bold"),Ie==="italic"&&(Fe+="italic"),Fe.length===0&&(Fe="normal");for(var Ke="",it={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},rt=0;rt<ge.length;rt++){if(this.pdf.internal.getFont(ge[rt],Fe,{noFallback:!0,disableWarning:!0})!==void 0){Ke=ge[rt];break}if(Fe==="bolditalic"&&this.pdf.internal.getFont(ge[rt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Ke=ge[rt],Fe="bold";else if(this.pdf.internal.getFont(ge[rt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Ke=ge[rt],Fe="normal";break}}if(Ke===""){for(var at=0;at<ge.length;at++)if(it[ge[at]]){Ke=it[ge[at]];break}}Ke=Ke===""?"Times":Ke,this.pdf.setFont(Ke,Fe)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(xe){this.ctx.globalCompositeOperation=xe}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(xe){this.ctx.globalAlpha=xe}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(xe){this.ctx.lineDashOffset=xe,H.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(xe){this.ctx.lineDash=xe,H.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(xe){this.ctx.ignoreClearRect=!!xe}})};p.prototype.setLineDash=function(q){this.lineDash=q},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){E.call(this,"fill",!1)},p.prototype.stroke=function(){E.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(q,D){if(isNaN(q)||isNaN(D))throw Un.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var $=this.ctx.transform.applyToPoint(new o(q,D));this.path.push({type:"mt",x:$.x,y:$.y}),this.ctx.lastPoint=new o(q,D)},p.prototype.closePath=function(){var q=new o(0,0),D=0;for(D=this.path.length-1;D!==-1;D--)if(this.path[D].type==="begin"&&Sn(this.path[D+1])==="object"&&typeof this.path[D+1].x=="number"){q=new o(this.path[D+1].x,this.path[D+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(q.x,q.y)},p.prototype.lineTo=function(q,D){if(isNaN(q)||isNaN(D))throw Un.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var $=this.ctx.transform.applyToPoint(new o(q,D));this.path.push({type:"lt",x:$.x,y:$.y}),this.ctx.lastPoint=new o($.x,$.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),E.call(this,null,!0)},p.prototype.quadraticCurveTo=function(q,D,$,ne){if(isNaN($)||isNaN(ne)||isNaN(q)||isNaN(D))throw Un.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Z=this.ctx.transform.applyToPoint(new o($,ne)),Q=this.ctx.transform.applyToPoint(new o(q,D));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:Z.x,y:Z.y}),this.ctx.lastPoint=new o(Z.x,Z.y)},p.prototype.bezierCurveTo=function(q,D,$,ne,Z,Q){if(isNaN(Z)||isNaN(Q)||isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne))throw Un.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var oe=this.ctx.transform.applyToPoint(new o(Z,Q)),se=this.ctx.transform.applyToPoint(new o(q,D)),ue=this.ctx.transform.applyToPoint(new o($,ne));this.path.push({type:"bct",x1:se.x,y1:se.y,x2:ue.x,y2:ue.y,x:oe.x,y:oe.y}),this.ctx.lastPoint=new o(oe.x,oe.y)},p.prototype.arc=function(q,D,$,ne,Z,Q){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne)||isNaN(Z))throw Un.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var oe=this.ctx.transform.applyToPoint(new o(q,D));q=oe.x,D=oe.y;var se=this.ctx.transform.applyToPoint(new o(0,$)),ue=this.ctx.transform.applyToPoint(new o(0,0));$=Math.sqrt(Math.pow(se.x-ue.x,2)+Math.pow(se.y-ue.y,2))}Math.abs(Z-ne)>=2*Math.PI&&(ne=0,Z=2*Math.PI),this.path.push({type:"arc",x:q,y:D,radius:$,startAngle:ne,endAngle:Z,counterclockwise:Q})},p.prototype.arcTo=function(q,D,$,ne,Z){throw new Error("arcTo not implemented.")},p.prototype.rect=function(q,D,$,ne){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne))throw Un.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(q,D),this.lineTo(q+$,D),this.lineTo(q+$,D+ne),this.lineTo(q,D+ne),this.lineTo(q,D),this.lineTo(q+$,D),this.lineTo(q,D)},p.prototype.fillRect=function(q,D,$,ne){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne))throw Un.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var Z={};this.lineCap!=="butt"&&(Z.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Z.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(q,D,$,ne),this.fill(),Z.hasOwnProperty("lineCap")&&(this.lineCap=Z.lineCap),Z.hasOwnProperty("lineJoin")&&(this.lineJoin=Z.lineJoin)}},p.prototype.strokeRect=function(q,D,$,ne){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne))throw Un.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");_.call(this)||(this.beginPath(),this.rect(q,D,$,ne),this.stroke())},p.prototype.clearRect=function(q,D,$,ne){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne))throw Un.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(q,D,$,ne))},p.prototype.save=function(q){q=typeof q!="boolean"||q;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,$=0;$<this.pdf.internal.getNumberOfPages();$++)this.pdf.setPage($+1),this.pdf.internal.out("q");if(this.pdf.setPage(D),q){this.ctx.fontSize=this.pdf.internal.getFontSize();var ne=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=ne}},p.prototype.restore=function(q){q=typeof q!="boolean"||q;for(var D=this.pdf.internal.getCurrentPageInfo().pageNumber,$=0;$<this.pdf.internal.getNumberOfPages();$++)this.pdf.setPage($+1),this.pdf.internal.out("Q");this.pdf.setPage(D),q&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var y=function(q){var D,$,ne,Z;if(q.isCanvasGradient===!0&&(q=q.getColor()),!q)return{r:0,g:0,b:0,a:0,style:q};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(q))D=0,$=0,ne=0,Z=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(q);if(Q!==null)D=parseInt(Q[1]),$=parseInt(Q[2]),ne=parseInt(Q[3]),Z=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(q))!==null)D=parseInt(Q[1]),$=parseInt(Q[2]),ne=parseInt(Q[3]),Z=parseFloat(Q[4]);else{if(Z=1,typeof q=="string"&&q.charAt(0)!=="#"){var oe=new m_(q);q=oe.ok?oe.toHex():"#000000"}q.length===4?(D=q.substring(1,2),D+=D,$=q.substring(2,3),$+=$,ne=q.substring(3,4),ne+=ne):(D=q.substring(1,3),$=q.substring(3,5),ne=q.substring(5,7)),D=parseInt(D,16),$=parseInt($,16),ne=parseInt(ne,16)}}return{r:D,g:$,b:ne,a:Z,style:q}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},_=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};p.prototype.fillText=function(q,D,$,ne){if(isNaN(D)||isNaN($)||typeof q!="string")throw Un.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(ne=isNaN(ne)?void 0:ne,!f.call(this)){var Z=Y(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;L.call(this,{text:q,x:D,y:$,scale:Q,angle:Z,align:this.textAlign,maxWidth:ne})}},p.prototype.strokeText=function(q,D,$,ne){if(isNaN(D)||isNaN($)||typeof q!="string")throw Un.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!_.call(this)){ne=isNaN(ne)?void 0:ne;var Z=Y(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;L.call(this,{text:q,x:D,y:$,scale:Q,renderingMode:"stroke",angle:Z,align:this.textAlign,maxWidth:ne})}},p.prototype.measureText=function(q){if(typeof q!="string")throw Un.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var D=this.pdf,$=this.pdf.internal.scaleFactor,ne=D.internal.getFontSize(),Z=D.getStringUnitWidth(q)*ne/D.internal.scaleFactor,Q=function(oe){var se=(oe=oe||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return se}}),this};return new Q({width:Z*=Math.round(96*$/72*1e4)/1e4})},p.prototype.scale=function(q,D){if(isNaN(q)||isNaN(D))throw Un.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var $=new c(q,0,0,D,0,0);this.ctx.transform=this.ctx.transform.multiply($)},p.prototype.rotate=function(q){if(isNaN(q))throw Un.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var D=new c(Math.cos(q),Math.sin(q),-Math.sin(q),Math.cos(q),0,0);this.ctx.transform=this.ctx.transform.multiply(D)},p.prototype.translate=function(q,D){if(isNaN(q)||isNaN(D))throw Un.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var $=new c(1,0,0,1,q,D);this.ctx.transform=this.ctx.transform.multiply($)},p.prototype.transform=function(q,D,$,ne,Z,Q){if(isNaN(q)||isNaN(D)||isNaN($)||isNaN(ne)||isNaN(Z)||isNaN(Q))throw Un.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var oe=new c(q,D,$,ne,Z,Q);this.ctx.transform=this.ctx.transform.multiply(oe)},p.prototype.setTransform=function(q,D,$,ne,Z,Q){q=isNaN(q)?1:q,D=isNaN(D)?0:D,$=isNaN($)?0:$,ne=isNaN(ne)?1:ne,Z=isNaN(Z)?0:Z,Q=isNaN(Q)?0:Q,this.ctx.transform=new c(q,D,$,ne,Z,Q)};var S=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(q,D,$,ne,Z,Q,oe,se,ue){var ve=this.pdf.getImageProperties(q),Pe=1,ke=1,Ne=1,xe=1;ne!==void 0&&se!==void 0&&(Ne=se/ne,xe=ue/Z,Pe=ve.width/ne*se/ne,ke=ve.height/Z*ue/Z),Q===void 0&&(Q=D,oe=$,D=0,$=0),ne!==void 0&&se===void 0&&(se=ne,ue=Z),ne===void 0&&se===void 0&&(se=ve.width,ue=ve.height);for(var ye,Ie=this.ctx.transform.decompose(),me=Y(Ie.rotate.shx),_e=new c,Ae=(_e=(_e=(_e=_e.multiply(Ie.translate)).multiply(Ie.skew)).multiply(Ie.scale)).applyToRectangle(new s(Q-D*Ne,oe-$*xe,ne*Pe,Z*ke)),Le=w.call(this,Ae),ge=[],Te=0;Te<Le.length;Te+=1)ge.indexOf(Le[Te])===-1&&ge.push(Le[Te]);if(v(ge),this.autoPaging)for(var Fe=ge[0],Ke=ge[ge.length-1],it=Fe;it<Ke+1;it++){this.pdf.setPage(it);var rt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],at=it===1?this.posY+this.margin[0]:this.margin[0],bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],yt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ht=it===1?0:bt+(it-2)*yt;if(this.ctx.clip_path.length!==0){var zt=this.path;ye=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g(ye,this.posX+this.margin[3],-ht+at+this.ctx.prevPageLastElemOffset),x.call(this,"fill",!0),this.path=zt}var Ot=JSON.parse(JSON.stringify(Ae));Ot=g([Ot],this.posX+this.margin[3],-ht+at+this.ctx.prevPageLastElemOffset)[0];var Ut=(it>Fe||it<Ke)&&S.call(this);Ut&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],rt,yt,null).clip().discardPath()),this.pdf.addImage(q,"JPEG",Ot.x,Ot.y,Ot.w,Ot.h,null,null,me),Ut&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(q,"JPEG",Ae.x,Ae.y,Ae.w,Ae.h,null,null,me)};var w=function(q,D,$){var ne=[];D=D||this.pdf.internal.pageSize.width,$=$||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Z=this.posY+this.ctx.prevPageLastElemOffset;switch(q.type){default:case"mt":case"lt":ne.push(Math.floor((q.y+Z)/$)+1);break;case"arc":ne.push(Math.floor((q.y+Z-q.radius)/$)+1),ne.push(Math.floor((q.y+Z+q.radius)/$)+1);break;case"qct":var Q=te(this.ctx.lastPoint.x,this.ctx.lastPoint.y,q.x1,q.y1,q.x,q.y);ne.push(Math.floor((Q.y+Z)/$)+1),ne.push(Math.floor((Q.y+Q.h+Z)/$)+1);break;case"bct":var oe=V(this.ctx.lastPoint.x,this.ctx.lastPoint.y,q.x1,q.y1,q.x2,q.y2,q.x,q.y);ne.push(Math.floor((oe.y+Z)/$)+1),ne.push(Math.floor((oe.y+oe.h+Z)/$)+1);break;case"rect":ne.push(Math.floor((q.y+Z)/$)+1),ne.push(Math.floor((q.y+q.h+Z)/$)+1)}for(var se=0;se<ne.length;se+=1)for(;this.pdf.internal.getNumberOfPages()<ne[se];)b.call(this);return ne},b=function(){var q=this.fillStyle,D=this.strokeStyle,$=this.font,ne=this.lineCap,Z=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=q,this.strokeStyle=D,this.font=$,this.lineCap=ne,this.lineWidth=Z,this.lineJoin=Q},g=function(q,D,$){for(var ne=0;ne<q.length;ne++)switch(q[ne].type){case"bct":q[ne].x2+=D,q[ne].y2+=$;case"qct":q[ne].x1+=D,q[ne].y1+=$;case"mt":case"lt":case"arc":default:q[ne].x+=D,q[ne].y+=$}return q},v=function(q){return q.sort(function(D,$){return D-$})},E=function(q,D){for(var $,ne,Z=this.fillStyle,Q=this.strokeStyle,oe=this.lineCap,se=this.lineWidth,ue=Math.abs(se*this.ctx.transform.scaleX),ve=this.lineJoin,Pe=JSON.parse(JSON.stringify(this.path)),ke=JSON.parse(JSON.stringify(this.path)),Ne=[],xe=0;xe<ke.length;xe++)if(ke[xe].x!==void 0)for(var ye=w.call(this,ke[xe]),Ie=0;Ie<ye.length;Ie+=1)Ne.indexOf(ye[Ie])===-1&&Ne.push(ye[Ie]);for(var me=0;me<Ne.length;me++)for(;this.pdf.internal.getNumberOfPages()<Ne[me];)b.call(this);if(v(Ne),this.autoPaging)for(var _e=Ne[0],Ae=Ne[Ne.length-1],Le=_e;Le<Ae+1;Le++){this.pdf.setPage(Le),this.fillStyle=Z,this.strokeStyle=Q,this.lineCap=oe,this.lineWidth=ue,this.lineJoin=ve;var ge=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Te=Le===1?this.posY+this.margin[0]:this.margin[0],Fe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ke=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],it=Le===1?0:Fe+(Le-2)*Ke;if(this.ctx.clip_path.length!==0){var rt=this.path;$=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g($,this.posX+this.margin[3],-it+Te+this.ctx.prevPageLastElemOffset),x.call(this,q,!0),this.path=rt}if(ne=JSON.parse(JSON.stringify(Pe)),this.path=g(ne,this.posX+this.margin[3],-it+Te+this.ctx.prevPageLastElemOffset),D===!1||Le===0){var at=(Le>_e||Le<Ae)&&S.call(this);at&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ge,Ke,null).clip().discardPath()),x.call(this,q,D),at&&this.pdf.restoreGraphicsState()}this.lineWidth=se}else this.lineWidth=ue,x.call(this,q,D),this.lineWidth=se;this.path=Pe},x=function(q,D){if((q!=="stroke"||D||!_.call(this))&&(q==="stroke"||D||!f.call(this))){for(var $,ne,Z=[],Q=this.path,oe=0;oe<Q.length;oe++){var se=Q[oe];switch(se.type){case"begin":Z.push({begin:!0});break;case"close":Z.push({close:!0});break;case"mt":Z.push({start:se,deltas:[],abs:[]});break;case"lt":var ue=Z.length;if(Q[oe-1]&&!isNaN(Q[oe-1].x)&&($=[se.x-Q[oe-1].x,se.y-Q[oe-1].y],ue>0)){for(;ue>=0;ue--)if(Z[ue-1].close!==!0&&Z[ue-1].begin!==!0){Z[ue-1].deltas.push($),Z[ue-1].abs.push(se);break}}break;case"bct":$=[se.x1-Q[oe-1].x,se.y1-Q[oe-1].y,se.x2-Q[oe-1].x,se.y2-Q[oe-1].y,se.x-Q[oe-1].x,se.y-Q[oe-1].y],Z[Z.length-1].deltas.push($);break;case"qct":var ve=Q[oe-1].x+2/3*(se.x1-Q[oe-1].x),Pe=Q[oe-1].y+2/3*(se.y1-Q[oe-1].y),ke=se.x+2/3*(se.x1-se.x),Ne=se.y+2/3*(se.y1-se.y),xe=se.x,ye=se.y;$=[ve-Q[oe-1].x,Pe-Q[oe-1].y,ke-Q[oe-1].x,Ne-Q[oe-1].y,xe-Q[oe-1].x,ye-Q[oe-1].y],Z[Z.length-1].deltas.push($);break;case"arc":Z.push({deltas:[],abs:[],arc:!0}),Array.isArray(Z[Z.length-1].abs)&&Z[Z.length-1].abs.push(se)}}ne=D?null:q==="stroke"?"stroke":"fill";for(var Ie=!1,me=0;me<Z.length;me++)if(Z[me].arc)for(var _e=Z[me].abs,Ae=0;Ae<_e.length;Ae++){var Le=_e[Ae];Le.type==="arc"?T.call(this,Le.x,Le.y,Le.radius,Le.startAngle,Le.endAngle,Le.counterclockwise,void 0,D,!Ie):O.call(this,Le.x,Le.y),Ie=!0}else if(Z[me].close===!0)this.pdf.internal.out("h"),Ie=!1;else if(Z[me].begin!==!0){var ge=Z[me].start.x,Te=Z[me].start.y;I.call(this,Z[me].deltas,ge,Te),Ie=!0}ne&&F.call(this,ne),D&&C.call(this)}},j=function(q){var D=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,$=D*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return q-$;case"top":return q+D-$;case"hanging":return q+D-2*$;case"middle":return q+D/2-$;case"ideographic":return q;case"alphabetic":default:return q}},N=function(q){return q+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.prototype.createLinearGradient=function(){var q=function(){};return q.colorStops=[],q.addColorStop=function(D,$){this.colorStops.push([D,$])},q.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},q.isCanvasGradient=!0,q},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(q,D,$,ne,Z,Q,oe,se,ue){for(var ve=G.call(this,$,ne,Z,Q),Pe=0;Pe<ve.length;Pe++){var ke=ve[Pe];Pe===0&&(ue?A.call(this,ke.x1+q,ke.y1+D):O.call(this,ke.x1+q,ke.y1+D)),M.call(this,q,D,ke.x2,ke.y2,ke.x3,ke.y3,ke.x4,ke.y4)}se?C.call(this):F.call(this,oe)},F=function(q){switch(q){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},C=function(){this.pdf.clip(),this.pdf.discardPath()},A=function(q,D){this.pdf.internal.out(t(q)+" "+n(D)+" m")},L=function(q){var D;switch(q.align){case"right":case"end":D="right";break;case"center":D="center";break;case"left":case"start":default:D="left"}var $=this.pdf.getTextDimensions(q.text),ne=j.call(this,q.y),Z=N.call(this,ne)-$.h,Q=this.ctx.transform.applyToPoint(new o(q.x,ne)),oe=this.ctx.transform.decompose(),se=new c;se=(se=(se=se.multiply(oe.translate)).multiply(oe.skew)).multiply(oe.scale);for(var ue,ve,Pe,ke=this.ctx.transform.applyToRectangle(new s(q.x,ne,$.w,$.h)),Ne=se.applyToRectangle(new s(q.x,Z,$.w,$.h)),xe=w.call(this,Ne),ye=[],Ie=0;Ie<xe.length;Ie+=1)ye.indexOf(xe[Ie])===-1&&ye.push(xe[Ie]);if(v(ye),this.autoPaging)for(var me=ye[0],_e=ye[ye.length-1],Ae=me;Ae<_e+1;Ae++){this.pdf.setPage(Ae);var Le=Ae===1?this.posY+this.margin[0]:this.margin[0],ge=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Te=this.pdf.internal.pageSize.height-this.margin[2],Fe=Te-this.margin[0],Ke=this.pdf.internal.pageSize.width-this.margin[1],it=Ke-this.margin[3],rt=Ae===1?0:ge+(Ae-2)*Fe;if(this.ctx.clip_path.length!==0){var at=this.path;ue=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=g(ue,this.posX+this.margin[3],-1*rt+Le),x.call(this,"fill",!0),this.path=at}var bt=g([JSON.parse(JSON.stringify(Ne))],this.posX+this.margin[3],-rt+Le+this.ctx.prevPageLastElemOffset)[0];q.scale>=.01&&(ve=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ve*q.scale),Pe=this.lineWidth,this.lineWidth=Pe*q.scale);var yt=this.autoPaging!=="text";if(yt||bt.y+bt.h<=Te){if(yt||bt.y>=Le&&bt.x<=Ke){var ht=yt?q.text:this.pdf.splitTextToSize(q.text,q.maxWidth||Ke-bt.x)[0],zt=g([JSON.parse(JSON.stringify(ke))],this.posX+this.margin[3],-rt+Le+this.ctx.prevPageLastElemOffset)[0],Ot=yt&&(Ae>me||Ae<_e)&&S.call(this);Ot&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],it,Fe,null).clip().discardPath()),this.pdf.text(ht,zt.x,zt.y,{angle:q.angle,align:D,renderingMode:q.renderingMode}),Ot&&this.pdf.restoreGraphicsState()}}else bt.y<Te&&(this.ctx.prevPageLastElemOffset+=Te-bt.y);q.scale>=.01&&(this.pdf.setFontSize(ve),this.lineWidth=Pe)}else q.scale>=.01&&(ve=this.pdf.internal.getFontSize(),this.pdf.setFontSize(ve*q.scale),Pe=this.lineWidth,this.lineWidth=Pe*q.scale),this.pdf.text(q.text,Q.x+this.posX,Q.y+this.posY,{angle:q.angle,align:D,renderingMode:q.renderingMode,maxWidth:q.maxWidth}),q.scale>=.01&&(this.pdf.setFontSize(ve),this.lineWidth=Pe)},O=function(q,D,$,ne){$=$||0,ne=ne||0,this.pdf.internal.out(t(q+$)+" "+n(D+ne)+" l")},I=function(q,D,$){return this.pdf.lines(q,D,$,null,null)},M=function(q,D,$,ne,Z,Q,oe,se){this.pdf.internal.out([r(a($+q)),r(i(ne+D)),r(a(Z+q)),r(i(Q+D)),r(a(oe+q)),r(i(se+D)),"c"].join(" "))},G=function(q,D,$,ne){for(var Z=2*Math.PI,Q=Math.PI/2;D>$;)D-=Z;var oe=Math.abs($-D);oe<Z&&ne&&(oe=Z-oe);for(var se=[],ue=ne?-1:1,ve=D;oe>1e-5;){var Pe=ve+ue*Math.min(oe,Q);se.push(W.call(this,q,ve,Pe)),oe-=Math.abs(Pe-ve),ve=Pe}return se},W=function(q,D,$){var ne=($-D)/2,Z=q*Math.cos(ne),Q=q*Math.sin(ne),oe=Z,se=-Q,ue=oe*oe+se*se,ve=ue+oe*Z+se*Q,Pe=4/3*(Math.sqrt(2*ue*ve)-ve)/(oe*Q-se*Z),ke=oe-Pe*se,Ne=se+Pe*oe,xe=ke,ye=-Ne,Ie=ne+D,me=Math.cos(Ie),_e=Math.sin(Ie);return{x1:q*Math.cos(D),y1:q*Math.sin(D),x2:ke*me-Ne*_e,y2:ke*_e+Ne*me,x3:xe*me-ye*_e,y3:xe*_e+ye*me,x4:q*Math.cos($),y4:q*Math.sin($)}},Y=function(q){return 180*q/Math.PI},te=function(q,D,$,ne,Z,Q){var oe=q+.5*($-q),se=D+.5*(ne-D),ue=Z+.5*($-Z),ve=Q+.5*(ne-Q),Pe=Math.min(q,Z,oe,ue),ke=Math.max(q,Z,oe,ue),Ne=Math.min(D,Q,se,ve),xe=Math.max(D,Q,se,ve);return new s(Pe,Ne,ke-Pe,xe-Ne)},V=function(q,D,$,ne,Z,Q,oe,se){var ue,ve,Pe,ke,Ne,xe,ye,Ie,me,_e,Ae,Le,ge,Te,Fe=$-q,Ke=ne-D,it=Z-$,rt=Q-ne,at=oe-Z,bt=se-Q;for(ve=0;ve<41;ve++)me=(ye=(Pe=q+(ue=ve/40)*Fe)+ue*((Ne=$+ue*it)-Pe))+ue*(Ne+ue*(Z+ue*at-Ne)-ye),_e=(Ie=(ke=D+ue*Ke)+ue*((xe=ne+ue*rt)-ke))+ue*(xe+ue*(Q+ue*bt-xe)-Ie),ve==0?(Ae=me,Le=_e,ge=me,Te=_e):(Ae=Math.min(Ae,me),Le=Math.min(Le,_e),ge=Math.max(ge,me),Te=Math.max(Te,_e));return new s(Math.round(Ae),Math.round(Le),Math.round(ge-Ae),Math.round(Te-Le))},H=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var q,D,$=(q=this.ctx.lineDash,D=this.ctx.lineDashOffset,JSON.stringify({lineDash:q,lineDashOffset:D}));this.prevLineDash!==$&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=$)}}})(hr.API),function(e){var r=function(i){var o,s,c,u,d,p,y,f,_,S;for(s=[],c=0,u=(i+=o="\0\0\0\0".slice(i.length%4||4)).length;u>c;c+=4)(d=(i.charCodeAt(c)<<24)+(i.charCodeAt(c+1)<<16)+(i.charCodeAt(c+2)<<8)+i.charCodeAt(c+3))!==0?(p=(d=((d=((d=((d=(d-(S=d%85))/85)-(_=d%85))/85)-(f=d%85))/85)-(y=d%85))/85)%85,s.push(p+33,y+33,f+33,_+33,S+33)):s.push(122);return function(w,b){for(var g=b;g>0;g--)w.pop()}(s,o.length),String.fromCharCode.apply(String,s)+"~>"},t=function(i){var o,s,c,u,d,p=String,y="length",f=255,_="charCodeAt",S="slice",w="replace";for(i[S](-2),i=i[S](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),c=[],u=0,d=(i+=o="uuuuu"[S](i[y]%5||5))[y];d>u;u+=5)s=52200625*(i[_](u)-33)+614125*(i[_](u+1)-33)+7225*(i[_](u+2)-33)+85*(i[_](u+3)-33)+(i[_](u+4)-33),c.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(b,g){for(var v=g;v>0;v--)b.pop()}(c,o[y]),p.fromCharCode.apply(p,c)},n=function(i){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((i=i.replace(/\s/g,"")).indexOf(">")!==-1&&(i=i.substr(0,i.indexOf(">"))),i.length%2&&(i+="0"),o.test(i)===!1)return"";for(var s="",c=0;c<i.length;c+=2)s+=String.fromCharCode("0x"+(i[c]+i[c+1]));return s},a=function(i){for(var o=new Uint8Array(i.length),s=i.length;s--;)o[s]=i.charCodeAt(s);return i=(o=L2(o)).reduce(function(c,u){return c+String.fromCharCode(u)},"")};e.processDataByFilters=function(i,o){var s=0,c=i||"",u=[];for(typeof(o=o||[])=="string"&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case"ASCII85Decode":case"/ASCII85Decode":c=t(c),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":c=r(c),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":c=n(c),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":c=c.split("").map(function(d){return("0"+d.charCodeAt().toString(16)).slice(-2)}).join("")+">",u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":c=a(c),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[s]+'" is not implemented')}return{data:c,reverseChain:u.reverse().join(" ")}}}(hr.API),function(e){e.loadFile=function(r,t,n){return function(a,i,o){i=i!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=function(c,u,d){var p=new XMLHttpRequest,y=0,f=function(_){var S=_.length,w=[],b=String.fromCharCode;for(y=0;y<S;y+=1)w.push(b(255&_.charCodeAt(y)));return w.join("")};if(p.open("GET",c,!u),p.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(p.onload=function(){p.status===200?d(f(this.responseText)):d(void 0)}),p.send(null),u&&p.status===200)return f(p.responseText)}(a,i,o)}catch{}return s}(r,t,n)},e.loadImageFile=e.loadFile}(hr.API),function(e){function r(){return(pr.html2canvas?Promise.resolve(pr.html2canvas):P2(()=>import("./html2canvas.esm-CBrSDip1.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(pr.DOMPurify?Promise.resolve(pr.DOMPurify):P2(()=>import("./purify.es-Ci5xwkH_.js"),[],import.meta.url)).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var s=Sn(o);return s==="undefined"?"undefined":s==="string"||o instanceof String?"string":s==="number"||o instanceof Number?"number":s==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":s==="object"?"object":"unknown"},a=function(o,s){var c=document.createElement(o);for(var u in s.className&&(c.className=s.className),s.innerHTML&&s.dompurify&&(c.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)c.style[u]=s.style[u];return c},i=function o(s){var c=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),u=o.convert(Promise.resolve(),c);return u=(u=u.setProgress(1,o,1,[o])).set(s)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(o,s){return o.__proto__=s||i.prototype,o},i.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},i.prototype.from=function(o,s){return this.then(function(){switch(s=s||function(c){switch(n(c)){case"string":return"string";case"element":return c.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o)){case"string":return this.then(t).then(function(c){return this.set({src:a("div",{innerHTML:o,dompurify:c})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},i.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},i.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function c(u,d){for(var p=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),y=u.firstChild;y;y=y.nextSibling)d!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||p.appendChild(c(y,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(p.width=u.width,p.height=u.height,p.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(p.value=u.value),p.addEventListener("load",function(){p.scrollTop=u.scrollTop,p.scrollLeft=u.scrollLeft},!0)),p}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},i.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(r).then(function(s){var c=Object.assign({},this.opt.html2canvas);return delete c.onrendered,s(this.prop.container,c)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},i.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(r).then(function(s){var c=this.opt.jsPDF,u=this.opt.fontFaces,d=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,p=Object.assign({async:!0,allowTaint:!0,scale:d,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete p.onrendered,c.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,c.context2d.posX=this.opt.x,c.context2d.posY=this.opt.y,c.context2d.margin=this.opt.margin,c.context2d.fontFaces=u,u)for(var y=0;y<u.length;++y){var f=u[y],_=f.src.find(function(S){return S.format==="truetype"});_&&c.addFont(_.url,f.ref.name,f.ref.style)}return p.windowHeight=p.windowHeight||0,p.windowHeight=p.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):p.windowHeight,c.context2d.save(!0),s(this.prop.container,p)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},i.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},i.prototype.output=function(o,s,c){return(c=c||"pdf").toLowerCase()==="img"||c.toLowerCase()==="image"?this.outputImg(o,s):this.outputPdf(o,s)},i.prototype.outputPdf=function(o,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,s)})},i.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},i.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},i.prototype.set=function(o){if(n(o)!=="object")return this;var s=Object.keys(o||{}).map(function(c){if(c in i.template.prop)return function(){this.prop[c]=o[c]};switch(c){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[c]=o[c]}}},this);return this.then(function(){return this.thenList(s)})},i.prototype.get=function(o,s){return this.then(function(){var c=o in i.template.prop?this.prop[o]:this.opt[o];return s?s(c):c})},i.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},i.prototype.setPageSize=function(o){function s(c,u){return Math.floor(c*u/72*96)}return this.then(function(){(o=o||hr.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:s(o.inner.width,o.k),height:s(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},i.prototype.setProgress=function(o,s,c,u){return o!=null&&(this.progress.val=o),s!=null&&(this.progress.state=s),c!=null&&(this.progress.n=c),u!=null&&(this.progress.stack=u),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(o,s,c,u){return this.setProgress(o?this.progress.val+o:null,s||null,c?this.progress.n+c:null,u?this.progress.stack.concat(u):null)},i.prototype.then=function(o,s){var c=this;return this.thenCore(o,s,function(u,d){return c.updateProgress(null,null,1,[u]),Promise.prototype.then.call(this,function(p){return c.updateProgress(null,u),p}).then(u,d).then(function(p){return c.updateProgress(1),p})})},i.prototype.thenCore=function(o,s,c){c=c||Promise.prototype.then,o&&(o=o.bind(this)),s&&(s=s.bind(this));var u=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:i.convert(Object.assign({},this),Promise.prototype),d=c.call(u,o,s);return i.convert(d,this.__proto__)},i.prototype.thenExternal=function(o,s){return Promise.prototype.then.call(this,o,s)},i.prototype.thenList=function(o){var s=this;return o.forEach(function(c){s=s.thenCore(c)}),s},i.prototype.catch=function(o){o&&(o=o.bind(this));var s=Promise.prototype.catch.call(this,o);return i.convert(s,this)},i.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},i.prototype.error=function(o){return this.then(function(){throw new Error(o)})},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,hr.getPageSize=function(o,s,c){if(Sn(o)==="object"){var u=o;o=u.orientation,s=u.unit||s,c=u.format||c}s=s||"mm",c=c||"a4",o=(""+(o||"P")).toLowerCase();var d,p=(""+c).toLowerCase(),y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(s){case"pt":d=1;break;case"mm":d=72/25.4;break;case"cm":d=72/2.54;break;case"in":d=72;break;case"px":d=.75;break;case"pc":case"em":d=12;break;case"ex":d=6;break;default:throw"Invalid unit: "+s}var f,_=0,S=0;if(y.hasOwnProperty(p))_=y[p][1]/d,S=y[p][0]/d;else try{_=c[1],S=c[0]}catch{throw new Error("Invalid format: "+c)}if(o==="p"||o==="portrait")o="p",S>_&&(f=S,S=_,_=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",_>S&&(f=S,S=_,_=f)}return{width:S,height:_,unit:s,k:d,orientation:o}},e.html=function(o,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(j2):null;var c=new i(s);return s.worker?c:c.from(o).doCallback()}}(hr.API),hr.API.addJS=function(e){return rw=e,this.internal.events.subscribe("postPutResources",function(){h1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(h1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),tw=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+rw+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){h1!==void 0&&tw!==void 0&&this.internal.out("/Names <</JavaScript "+h1+" 0 R>>")}),this},function(e){var r;e.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=t.outline.render().split(/\r\n/),i=0;i<a.length;i++){var o=a[i],s=n.exec(o);if(s!=null){var c=s[1];t.internal.newObjectDeferredBegin(c,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,d=[];for(i=0;i<u;i++){var p=t.internal.newObject();d.push(p);var y=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+y.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<d.length;i++)t.internal.write("(page_"+(i+1)+")"+d[i]+" 0 R");t.internal.write(" ] >>","endobj"),r=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+r+" 0 R"))}]),e.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,a,i){var o={title:a,options:i,children:[]};return n==null&&(n=this.root),n.children.push(o),o},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(n){n.id=t.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},t.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},t.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<n.children.length;i++){var o=n.children[i];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),i>0&&this.line("/Prev "+this.makeRef(n.children[i-1])),i<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[i+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var c=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var u=0;u<n.children.length;u++)this.renderItems(n.children[u])},t.outline.line=function(n){this.ctx.val+=n+`\r
|
|
489
|
-
`},t.outline.makeRef=function(n){return n.id+" 0 R"},t.outline.makeString=function(n){return"("+t.internal.pdfEscape(n)+")"},t.outline.objStart=function(n){this.ctx.val+=`\r
|
|
490
|
-
`+n.id+` 0 obj\r
|
|
491
|
-
<<\r
|
|
492
|
-
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
493
|
-
endobj\r
|
|
494
|
-
`},t.outline.count_r=function(n,a){for(var i=0;i<a.children.length;i++)n.count++,this.count_r(n,a.children[i]);return n.count}}])}(hr.API),function(e){var r=[192,193,194,195,196,197,198,199];e.processJPEG=function(t,n,a,i,o,s){var c,u=this.decode.DCT_DECODE,d=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(c=function(p){for(var y,f=256*p.charCodeAt(4)+p.charCodeAt(5),_=p.length,S={width:0,height:0,numcomponents:1},w=4;w<_;w+=2){if(w+=f,r.indexOf(p.charCodeAt(w+1))!==-1){y=256*p.charCodeAt(w+5)+p.charCodeAt(w+6),S={width:256*p.charCodeAt(w+7)+p.charCodeAt(w+8),height:y,numcomponents:p.charCodeAt(w+9)};break}f=256*p.charCodeAt(w+2)+p.charCodeAt(w+3)}return S}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}d={data:t,width:c.width,height:c.height,colorSpace:s,bitsPerComponent:8,filter:u,index:n,alias:a}}return d}}(hr.API);var ah,d1,nw,iw,aw,Zk=function(){var e,r,t;function n(i){var o,s,c,u,d,p,y,f,_,S,w,b,g,v;for(this.data=i,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},p=null;;){switch(o=this.readUInt32(),_=(function(){var E,x;for(x=[],E=0;E<4;++E)x.push(String.fromCharCode(this.data[this.pos++]));return x}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(o);break;case"fcTL":p&&this.animation.frames.push(p),this.pos+=4,p={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},d=this.readUInt16(),u=this.readUInt16()||100,p.delay=1e3*d/u,p.disposeOp=this.data[this.pos++],p.blendOp=this.data[this.pos++],p.data=[];break;case"IDAT":case"fdAT":for(_==="fdAT"&&(this.pos+=4,o-=4),i=(p!=null?p.data:void 0)||this.imgData,b=0;0<=o?b<o:b>o;0<=o?++b:--b)i.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(c=this.palette.length/3,this.transparency.indexed=this.read(o),this.transparency.indexed.length>c)throw new Error("More transparent colors than palette size");if((S=c-this.transparency.indexed.length)>0)for(g=0;0<=S?g<S:g>S;0<=S?++g:--g)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(o)[0];break;case 2:this.transparency.rgb=this.read(o)}break;case"tEXt":y=(w=this.read(o)).indexOf(0),f=String.fromCharCode.apply(String,w.slice(0,y)),this.text[f]=String.fromCharCode.apply(String,w.slice(y+1));break;case"IEND":return p&&this.animation.frames.push(p),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(v=this.colorType)===4||v===6,s=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*s,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=o}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(i){var o,s;for(s=[],o=0;0<=i?o<i:o>i;0<=i?++o:--o)s.push(this.data[this.pos++]);return s},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(i){var o=this.pixelBitlength/8,s=new Uint8Array(this.width*this.height*o),c=0,u=this;if(i==null&&(i=this.imgData),i.length===0)return new Uint8Array(0);function d(p,y,f,_){var S,w,b,g,v,E,x,j,N,T,F,C,A,L,O,I,M,G,W,Y,te,V=Math.ceil((u.width-p)/f),H=Math.ceil((u.height-y)/_),q=u.width==V&&u.height==H;for(L=o*V,C=q?s:new Uint8Array(L*H),E=i.length,A=0,w=0;A<H&&c<E;){switch(i[c++]){case 0:for(g=M=0;M<L;g=M+=1)C[w++]=i[c++];break;case 1:for(g=G=0;G<L;g=G+=1)S=i[c++],v=g<o?0:C[w-o],C[w++]=(S+v)%256;break;case 2:for(g=W=0;W<L;g=W+=1)S=i[c++],b=(g-g%o)/o,O=A&&C[(A-1)*L+b*o+g%o],C[w++]=(O+S)%256;break;case 3:for(g=Y=0;Y<L;g=Y+=1)S=i[c++],b=(g-g%o)/o,v=g<o?0:C[w-o],O=A&&C[(A-1)*L+b*o+g%o],C[w++]=(S+Math.floor((v+O)/2))%256;break;case 4:for(g=te=0;te<L;g=te+=1)S=i[c++],b=(g-g%o)/o,v=g<o?0:C[w-o],A===0?O=I=0:(O=C[(A-1)*L+b*o+g%o],I=b&&C[(A-1)*L+(b-1)*o+g%o]),x=v+O-I,j=Math.abs(x-v),T=Math.abs(x-O),F=Math.abs(x-I),N=j<=T&&j<=F?v:T<=F?O:I,C[w++]=(S+N)%256;break;default:throw new Error("Invalid filter algorithm: "+i[c-1])}if(!q){var D=((y+A*_)*u.width+p)*o,$=A*L;for(g=0;g<V;g+=1){for(var ne=0;ne<o;ne+=1)s[D++]=C[$++];D+=(f-1)*o}}A++}}return i=kk(i),u.interlaceMethod==1?(d(0,0,8,8),d(4,0,8,8),d(0,4,4,8),d(2,0,4,4),d(0,2,2,4),d(1,0,2,2),d(0,1,1,2)):d(0,0,1,1),s},n.prototype.decodePalette=function(){var i,o,s,c,u,d,p,y,f;for(s=this.palette,d=this.transparency.indexed||[],u=new Uint8Array((d.length||0)+s.length),c=0,i=0,o=p=0,y=s.length;p<y;o=p+=3)u[c++]=s[o],u[c++]=s[o+1],u[c++]=s[o+2],u[c++]=(f=d[i++])!=null?f:255;return u},n.prototype.copyToImageData=function(i,o){var s,c,u,d,p,y,f,_,S,w,b;if(c=this.colors,S=null,s=this.hasAlphaChannel,this.palette.length&&(S=(b=this._decodedPalette)!=null?b:this._decodedPalette=this.decodePalette(),c=4,s=!0),_=(u=i.data||i).length,p=S||o,d=y=0,c===1)for(;d<_;)f=S?4*o[d/4]:y,w=p[f++],u[d++]=w,u[d++]=w,u[d++]=w,u[d++]=s?p[f++]:255,y=f;else for(;d<_;)f=S?4*o[d/4]:y,u[d++]=p[f++],u[d++]=p[f++],u[d++]=p[f++],u[d++]=s?p[f++]:255,y=f},n.prototype.decode=function(){var i;return i=new Uint8Array(this.width*this.height*4),this.copyToImageData(i,this.decodePixels()),i};var a=function(){if(Object.prototype.toString.call(pr)==="[object Window]"){try{r=pr.document.createElement("canvas"),t=r.getContext("2d")}catch{return!1}return!0}return!1};return a(),e=function(i){var o;if(a()===!0)return t.width=i.width,t.height=i.height,t.clearRect(0,0,i.width,i.height),t.putImageData(i,0,0),(o=new Image).src=r.toDataURL(),o;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(i){var o,s,c,u,d,p,y,f;if(this.animation){for(f=[],s=d=0,p=(y=this.animation.frames).length;d<p;s=++d)o=y[s],c=i.createImageData(o.width,o.height),u=this.decodePixels(new Uint8Array(o.data)),this.copyToImageData(c,u),o.imageData=c,f.push(o.image=e(c));return f}},n.prototype.renderFrame=function(i,o){var s,c,u;return s=(c=this.animation.frames)[o],u=c[o-1],o===0&&i.clearRect(0,0,this.width,this.height),(u!=null?u.disposeOp:void 0)===1?i.clearRect(u.xOffset,u.yOffset,u.width,u.height):(u!=null?u.disposeOp:void 0)===2&&i.putImageData(u.imageData,u.xOffset,u.yOffset),s.blendOp===0&&i.clearRect(s.xOffset,s.yOffset,s.width,s.height),i.drawImage(s.image,s.xOffset,s.yOffset)},n.prototype.animate=function(i){var o,s,c,u,d,p,y=this;return s=0,p=this.animation,u=p.numFrames,c=p.frames,d=p.numPlays,(o=function(){var f,_;if(f=s++%u,_=c[f],y.renderFrame(i,f),u>1&&s/u<d)return y.animation._timeout=setTimeout(o,_.delay)})()},n.prototype.stopAnimation=function(){var i;return clearTimeout((i=this.animation)!=null?i._timeout:void 0)},n.prototype.render=function(i){var o,s;return i._png&&i._png.stopAnimation(),i._png=this,i.width=this.width,i.height=this.height,o=i.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(s=o.createImageData(this.width,this.height),this.copyToImageData(s,this.decodePixels()),o.putImageData(s,0,0))},n}();/**
|
|
495
|
-
* @license
|
|
496
|
-
*
|
|
497
|
-
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
|
498
|
-
*
|
|
499
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
500
|
-
* a copy of this software and associated documentation files (the
|
|
501
|
-
* "Software"), to deal in the Software without restriction, including
|
|
502
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
503
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
504
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
505
|
-
* the following conditions:
|
|
506
|
-
*
|
|
507
|
-
* The above copyright notice and this permission notice shall be
|
|
508
|
-
* included in all copies or substantial portions of the Software.
|
|
509
|
-
*
|
|
510
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
511
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
512
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
513
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
514
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
515
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
516
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
517
|
-
* ====================================================================
|
|
518
|
-
*//**
|
|
519
|
-
* @license
|
|
520
|
-
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
|
521
|
-
*
|
|
522
|
-
* https://github.com/deanm/omggif
|
|
523
|
-
*
|
|
524
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
525
|
-
* of this software and associated documentation files (the "Software"), to
|
|
526
|
-
* deal in the Software without restriction, including without limitation the
|
|
527
|
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
528
|
-
* sell copies of the Software, and to permit persons to whom the Software is
|
|
529
|
-
* furnished to do so, subject to the following conditions:
|
|
530
|
-
*
|
|
531
|
-
* The above copyright notice and this permission notice shall be included in
|
|
532
|
-
* all copies or substantial portions of the Software.
|
|
533
|
-
*
|
|
534
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
535
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
536
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
537
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
538
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
539
|
-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
540
|
-
* IN THE SOFTWARE.
|
|
541
|
-
*
|
|
542
|
-
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
|
543
|
-
* including animation and compression. It does not rely on any specific
|
|
544
|
-
* underlying system, so should run in the browser, Node, or Plask.
|
|
545
|
-
*/function Qk(e){var r=0;if(e[r++]!==71||e[r++]!==73||e[r++]!==70||e[r++]!==56||(e[r++]+1&253)!=56||e[r++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=e[r++]|e[r++]<<8,n=e[r++]|e[r++]<<8,a=e[r++],i=a>>7,o=1<<(7&a)+1;e[r++],e[r++];var s=null,c=null;i&&(s=r,c=o,r+=3*o);var u=!0,d=[],p=0,y=null,f=0,_=null;for(this.width=t,this.height=n;u&&r<e.length;)switch(e[r++]){case 33:switch(e[r++]){case 255:if(e[r]!==11||e[r+1]==78&&e[r+2]==69&&e[r+3]==84&&e[r+4]==83&&e[r+5]==67&&e[r+6]==65&&e[r+7]==80&&e[r+8]==69&&e[r+9]==50&&e[r+10]==46&&e[r+11]==48&&e[r+12]==3&&e[r+13]==1&&e[r+16]==0)r+=14,_=e[r++]|e[r++]<<8,r++;else for(r+=12;;){if(!((A=e[r++])>=0))throw Error("Invalid block size");if(A===0)break;r+=A}break;case 249:if(e[r++]!==4||e[r+4]!==0)throw new Error("Invalid graphics extension block.");var S=e[r++];p=e[r++]|e[r++]<<8,y=e[r++],(1&S)==0&&(y=null),f=S>>2&7,r++;break;case 254:for(;;){if(!((A=e[r++])>=0))throw Error("Invalid block size");if(A===0)break;r+=A}break;default:throw new Error("Unknown graphic control label: 0x"+e[r-1].toString(16))}break;case 44:var w=e[r++]|e[r++]<<8,b=e[r++]|e[r++]<<8,g=e[r++]|e[r++]<<8,v=e[r++]|e[r++]<<8,E=e[r++],x=E>>6&1,j=1<<(7&E)+1,N=s,T=c,F=!1;E>>7&&(F=!0,N=r,T=j,r+=3*j);var C=r;for(r++;;){var A;if(!((A=e[r++])>=0))throw Error("Invalid block size");if(A===0)break;r+=A}d.push({x:w,y:b,width:g,height:v,has_local_palette:F,palette_offset:N,palette_size:T,data_offset:C,data_length:r-C,transparent_index:y,interlaced:!!x,delay:p,disposal:f});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+e[r-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return _},this.frameInfo=function(L){if(L<0||L>=d.length)throw new Error("Frame index out of range.");return d[L]},this.decodeAndBlitFrameBGRA=function(L,O){var I=this.frameInfo(L),M=I.width*I.height,G=new Uint8Array(M);ow(e,I.data_offset,G,M);var W=I.palette_offset,Y=I.transparent_index;Y===null&&(Y=256);var te=I.width,V=t-te,H=te,q=4*(I.y*t+I.x),D=4*((I.y+I.height)*t+I.x),$=q,ne=4*V;I.interlaced===!0&&(ne+=4*t*7);for(var Z=8,Q=0,oe=G.length;Q<oe;++Q){var se=G[Q];if(H===0&&(H=te,($+=ne)>=D&&(ne=4*V+4*t*(Z-1),$=q+(te+V)*(Z<<1),Z>>=1)),se===Y)$+=4;else{var ue=e[W+3*se],ve=e[W+3*se+1],Pe=e[W+3*se+2];O[$++]=Pe,O[$++]=ve,O[$++]=ue,O[$++]=255}--H}},this.decodeAndBlitFrameRGBA=function(L,O){var I=this.frameInfo(L),M=I.width*I.height,G=new Uint8Array(M);ow(e,I.data_offset,G,M);var W=I.palette_offset,Y=I.transparent_index;Y===null&&(Y=256);var te=I.width,V=t-te,H=te,q=4*(I.y*t+I.x),D=4*((I.y+I.height)*t+I.x),$=q,ne=4*V;I.interlaced===!0&&(ne+=4*t*7);for(var Z=8,Q=0,oe=G.length;Q<oe;++Q){var se=G[Q];if(H===0&&(H=te,($+=ne)>=D&&(ne=4*V+4*t*(Z-1),$=q+(te+V)*(Z<<1),Z>>=1)),se===Y)$+=4;else{var ue=e[W+3*se],ve=e[W+3*se+1],Pe=e[W+3*se+2];O[$++]=ue,O[$++]=ve,O[$++]=Pe,O[$++]=255}--H}}}function ow(e,r,t,n){for(var a=e[r++],i=1<<a,o=i+1,s=o+1,c=a+1,u=(1<<c)-1,d=0,p=0,y=0,f=e[r++],_=new Int32Array(4096),S=null;;){for(;d<16&&f!==0;)p|=e[r++]<<d,d+=8,f===1?f=e[r++]:--f;if(d<c)break;var w=p&u;if(p>>=c,d-=c,w!==i){if(w===o)break;for(var b=w<s?w:S,g=0,v=b;v>i;)v=_[v]>>8,++g;var E=v;if(y+g+(b!==w?1:0)>n)return void Un.log("Warning, gif stream longer than expected.");t[y++]=E;var x=y+=g;for(b!==w&&(t[y++]=E),v=b;g--;)v=_[v],t[--x]=255&v,v>>=8;S!==null&&s<4096&&(_[s++]=S<<8|E,s>=u+1&&c<12&&(++c,u=u<<1|1)),S=w}else s=o+1,u=(1<<(c=a+1))-1,S=null}return y!==n&&Un.log("Warning, gif stream shorter than expected."),t}/**
|
|
546
|
-
* @license
|
|
547
|
-
Copyright (c) 2008, Adobe Systems Incorporated
|
|
548
|
-
All rights reserved.
|
|
549
|
-
|
|
550
|
-
Redistribution and use in source and binary forms, with or without
|
|
551
|
-
modification, are permitted provided that the following conditions are
|
|
552
|
-
met:
|
|
553
|
-
|
|
554
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
555
|
-
this list of conditions and the following disclaimer.
|
|
556
|
-
|
|
557
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
558
|
-
notice, this list of conditions and the following disclaimer in the
|
|
559
|
-
documentation and/or other materials provided with the distribution.
|
|
560
|
-
|
|
561
|
-
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
562
|
-
contributors may be used to endorse or promote products derived from
|
|
563
|
-
this software without specific prior written permission.
|
|
564
|
-
|
|
565
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
566
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
567
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
568
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
569
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
570
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
571
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
572
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
573
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
574
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
575
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
576
|
-
*/function u2(e){var r,t,n,a,i,o=Math.floor,s=new Array(64),c=new Array(64),u=new Array(64),d=new Array(64),p=new Array(65535),y=new Array(65535),f=new Array(64),_=new Array(64),S=[],w=0,b=7,g=new Array(64),v=new Array(64),E=new Array(64),x=new Array(256),j=new Array(2048),N=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],A=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],I=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function G(q,D){for(var $=0,ne=0,Z=new Array,Q=1;Q<=16;Q++){for(var oe=1;oe<=q[Q];oe++)Z[D[ne]]=[],Z[D[ne]][0]=$,Z[D[ne]][1]=Q,ne++,$++;$*=2}return Z}function W(q){for(var D=q[0],$=q[1]-1;$>=0;)D&1<<$&&(w|=1<<b),$--,--b<0&&(w==255?(Y(255),Y(0)):Y(w),b=7,w=0)}function Y(q){S.push(q)}function te(q){Y(q>>8&255),Y(255&q)}function V(q,D,$,ne,Z){for(var Q,oe=Z[0],se=Z[240],ue=function(_e,Ae){var Le,ge,Te,Fe,Ke,it,rt,at,bt,yt,ht=0;for(bt=0;bt<8;++bt){Le=_e[ht],ge=_e[ht+1],Te=_e[ht+2],Fe=_e[ht+3],Ke=_e[ht+4],it=_e[ht+5],rt=_e[ht+6];var zt=Le+(at=_e[ht+7]),Ot=Le-at,Ut=ge+rt,$t=ge-rt,Oe=Te+it,Me=Te-it,mt=Fe+Ke,Mt=Fe-Ke,Lt=zt+mt,At=zt-mt,fr=Ut+Oe,Qt=Ut-Oe;_e[ht]=Lt+fr,_e[ht+4]=Lt-fr;var ze=.707106781*(Qt+At);_e[ht+2]=At+ze,_e[ht+6]=At-ze;var qe=.382683433*((Lt=Mt+Me)-(Qt=$t+Ot)),vt=.5411961*Lt+qe,pt=1.306562965*Qt+qe,Je=.707106781*(fr=Me+$t),_t=Ot+Je,Ye=Ot-Je;_e[ht+5]=Ye+vt,_e[ht+3]=Ye-vt,_e[ht+1]=_t+pt,_e[ht+7]=_t-pt,ht+=8}for(ht=0,bt=0;bt<8;++bt){Le=_e[ht],ge=_e[ht+8],Te=_e[ht+16],Fe=_e[ht+24],Ke=_e[ht+32],it=_e[ht+40],rt=_e[ht+48];var Pt=Le+(at=_e[ht+56]),Dt=Le-at,Wt=ge+rt,Zt=ge-rt,rr=Te+it,_r=Te-it,Hn=Fe+Ke,ti=Fe-Ke,Vn=Pt+Hn,Ci=Pt-Hn,En=Wt+rr,ki=Wt-rr;_e[ht]=Vn+En,_e[ht+32]=Vn-En;var bi=.707106781*(ki+Ci);_e[ht+16]=Ci+bi,_e[ht+48]=Ci-bi;var _a=.382683433*((Vn=ti+_r)-(ki=Zt+Dt)),ua=.5411961*Vn+_a,ao=1.306562965*ki+_a,ws=.707106781*(En=_r+Zt),Go=Dt+ws,tu=Dt-ws;_e[ht+40]=tu+ua,_e[ht+24]=tu-ua,_e[ht+8]=Go+ao,_e[ht+56]=Go-ao,ht++}for(bt=0;bt<64;++bt)yt=_e[bt]*Ae[bt],f[bt]=yt>0?yt+.5|0:yt-.5|0;return f}(q,D),ve=0;ve<64;++ve)_[N[ve]]=ue[ve];var Pe=_[0]-$;$=_[0],Pe==0?W(ne[0]):(W(ne[y[Q=32767+Pe]]),W(p[Q]));for(var ke=63;ke>0&&_[ke]==0;)ke--;if(ke==0)return W(oe),$;for(var Ne,xe=1;xe<=ke;){for(var ye=xe;_[xe]==0&&xe<=ke;)++xe;var Ie=xe-ye;if(Ie>=16){Ne=Ie>>4;for(var me=1;me<=Ne;++me)W(se);Ie&=15}Q=32767+_[xe],W(Z[(Ie<<4)+y[Q]]),W(p[Q]),xe++}return ke!=63&&W(oe),$}function H(q){q=Math.min(Math.max(q,1),100),i!=q&&(function(D){for(var $=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ne=0;ne<64;ne++){var Z=o(($[ne]*D+50)/100);Z=Math.min(Math.max(Z,1),255),s[N[ne]]=Z}for(var Q=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],oe=0;oe<64;oe++){var se=o((Q[oe]*D+50)/100);se=Math.min(Math.max(se,1),255),c[N[oe]]=se}for(var ue=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ve=0,Pe=0;Pe<8;Pe++)for(var ke=0;ke<8;ke++)u[ve]=1/(s[N[ve]]*ue[Pe]*ue[ke]*8),d[ve]=1/(c[N[ve]]*ue[Pe]*ue[ke]*8),ve++}(q<50?Math.floor(5e3/q):Math.floor(200-2*q)),i=q)}this.encode=function(q,D){D&&H(D),S=new Array,w=0,b=7,te(65496),te(65504),te(16),Y(74),Y(70),Y(73),Y(70),Y(0),Y(1),Y(1),Y(0),te(1),te(1),Y(0),Y(0),function(){te(65499),te(132),Y(0);for(var ge=0;ge<64;ge++)Y(s[ge]);Y(1);for(var Te=0;Te<64;Te++)Y(c[Te])}(),function(ge,Te){te(65472),te(17),Y(8),te(Te),te(ge),Y(3),Y(1),Y(17),Y(0),Y(2),Y(17),Y(1),Y(3),Y(17),Y(1)}(q.width,q.height),function(){te(65476),te(418),Y(0);for(var ge=0;ge<16;ge++)Y(T[ge+1]);for(var Te=0;Te<=11;Te++)Y(F[Te]);Y(16);for(var Fe=0;Fe<16;Fe++)Y(C[Fe+1]);for(var Ke=0;Ke<=161;Ke++)Y(A[Ke]);Y(1);for(var it=0;it<16;it++)Y(L[it+1]);for(var rt=0;rt<=11;rt++)Y(O[rt]);Y(17);for(var at=0;at<16;at++)Y(I[at+1]);for(var bt=0;bt<=161;bt++)Y(M[bt])}(),te(65498),te(12),Y(3),Y(1),Y(0),Y(2),Y(17),Y(3),Y(17),Y(0),Y(63),Y(0);var $=0,ne=0,Z=0;w=0,b=7,this.encode.displayName="_encode_";for(var Q,oe,se,ue,ve,Pe,ke,Ne,xe,ye=q.data,Ie=q.width,me=q.height,_e=4*Ie,Ae=0;Ae<me;){for(Q=0;Q<_e;){for(ve=_e*Ae+Q,ke=-1,Ne=0,xe=0;xe<64;xe++)Pe=ve+(Ne=xe>>3)*_e+(ke=4*(7&xe)),Ae+Ne>=me&&(Pe-=_e*(Ae+1+Ne-me)),Q+ke>=_e&&(Pe-=Q+ke-_e+4),oe=ye[Pe++],se=ye[Pe++],ue=ye[Pe++],g[xe]=(j[oe]+j[se+256>>0]+j[ue+512>>0]>>16)-128,v[xe]=(j[oe+768>>0]+j[se+1024>>0]+j[ue+1280>>0]>>16)-128,E[xe]=(j[oe+1280>>0]+j[se+1536>>0]+j[ue+1792>>0]>>16)-128;$=V(g,u,$,r,n),ne=V(v,d,ne,t,a),Z=V(E,d,Z,t,a),Q+=32}Ae+=8}if(b>=0){var Le=[];Le[1]=b+1,Le[0]=(1<<b+1)-1,W(Le)}return te(65497),new Uint8Array(S)},e=e||50,function(){for(var q=String.fromCharCode,D=0;D<256;D++)x[D]=q(D)}(),r=G(T,F),t=G(L,O),n=G(C,A),a=G(I,M),function(){for(var q=1,D=2,$=1;$<=15;$++){for(var ne=q;ne<D;ne++)y[32767+ne]=$,p[32767+ne]=[],p[32767+ne][1]=$,p[32767+ne][0]=ne;for(var Z=-(D-1);Z<=-q;Z++)y[32767+Z]=$,p[32767+Z]=[],p[32767+Z][1]=$,p[32767+Z][0]=D-1+Z;q<<=1,D<<=1}}(),function(){for(var q=0;q<256;q++)j[q]=19595*q,j[q+256>>0]=38470*q,j[q+512>>0]=7471*q+32768,j[q+768>>0]=-11059*q,j[q+1024>>0]=-21709*q,j[q+1280>>0]=32768*q+8421375,j[q+1536>>0]=-27439*q,j[q+1792>>0]=-5329*q}(),H(e)}/**
|
|
577
|
-
* @license
|
|
578
|
-
* Copyright (c) 2017 Aras Abbasi
|
|
579
|
-
*
|
|
580
|
-
* Licensed under the MIT License.
|
|
581
|
-
* http://opensource.org/licenses/mit-license
|
|
582
|
-
*/function Hl(e,r){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!r,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function sw(e){function r(T){if(!T)throw Error("assert :P")}function t(T,F,C){for(var A=0;4>A;A++)if(T[F+A]!=C.charCodeAt(A))return!0;return!1}function n(T,F,C,A,L){for(var O=0;O<L;O++)T[F+O]=C[A+O]}function a(T,F,C,A){for(var L=0;L<A;L++)T[F+L]=C}function i(T){return new Int32Array(T)}function o(T,F){for(var C=[],A=0;A<T;A++)C.push(new F);return C}function s(T,F){var C=[];return function A(L,O,I){for(var M=I[O],G=0;G<M&&(L.push(I.length>O+1?[]:new F),!(I.length<O+1));G++)A(L[G],O+1,I)}(C,0,T),C}var c=function(){var T=this;function F(R,U){for(var ee=1<<U-1>>>0;Rⅇ)ee>>>=1;return ee?(R&ee-1)+ee:R}function C(R,U,ee,ae,ce){r(!(ae%ee));do R[U+(ae-=ee)]=ce;while(0<ae)}function A(R,U,ee,ae,ce){if(r(2328>=ce),512>=ce)var he=i(512);else if((he=i(ce))==null)return 0;return function(pe,be,we,Ee,Be,Qe){var $e,We,wt=be,lt=1<<we,je=i(16),He=i(16);for(r(Be!=0),r(Ee!=null),r(pe!=null),r(0<we),We=0;We<Be;++We){if(15<Ee[We])return 0;++je[Ee[We]]}if(je[0]==Be)return 0;for(He[1]=0,$e=1;15>$e;++$e){if(je[$e]>1<<$e)return 0;He[$e+1]=He[$e]+je[$e]}for(We=0;We<Be;++We)$e=Ee[We],0<Ee[We]&&(Qe[He[$e]++]=We);if(He[15]==1)return(Ee=new L).g=0,Ee.value=Qe[0],C(pe,wt,1,lt,Ee),lt;var Ve,ct=-1,gt=lt-1,Bt=0,jt=1,ir=1,Rt=1<<we;for(We=0,$e=1,Be=2;$e<=we;++$e,Be<<=1){if(jt+=ir<<=1,0>(ir-=je[$e]))return 0;for(;0<je[$e];--je[$e])(Ee=new L).g=$e,Ee.value=Qe[We++],C(pe,wt+Bt,Be,Rt,Ee),Bt=F(Bt,$e)}for($e=we+1,Be=2;15>=$e;++$e,Be<<=1){if(jt+=ir<<=1,0>(ir-=je[$e]))return 0;for(;0<je[$e];--je[$e]){if(Ee=new L,(Bt>)!=ct){for(wt+=Rt,Ve=1<<(ct=$e)-we;15>ct&&!(0>=(Ve-=je[ct]));)++ct,Ve<<=1;lt+=Rt=1<<(Ve=ct-we),pe[be+(ct=Bt>)].g=Ve+we,pe[be+ct].value=wt-be-ct}Ee.g=$e-we,Ee.value=Qe[We++],C(pe,wt+(Bt>>we),Be,Rt,Ee),Bt=F(Bt,$e)}}return jt!=2*He[15]-1?0:lt}(R,U,ee,ae,ce,he)}function L(){this.value=this.g=0}function O(){this.value=this.g=0}function I(){this.G=o(5,L),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Qr,O)}function M(R,U,ee,ae){r(R!=null),r(U!=null),r(2147483648>ae),R.Ca=254,R.I=0,R.b=-8,R.Ka=0,R.oa=U,R.pa=ee,R.Jd=U,R.Yc=ee+ae,R.Zc=4<=ae?ee+ae-4+1:ee,Q(R)}function G(R,U){for(var ee=0;0<U--;)ee|=se(R,128)<<U;return ee}function W(R,U){var ee=G(R,U);return oe(R)?-ee:ee}function Y(R,U,ee,ae){var ce,he=0;for(r(R!=null),r(U!=null),r(4294967288>ae),R.Sb=ae,R.Ra=0,R.u=0,R.h=0,4<ae&&(ae=4),ce=0;ce<ae;++ce)he+=U[ee+ce]<<8*ce;R.Ra=he,R.bb=ae,R.oa=U,R.pa=ee}function te(R){for(;8<=R.u&&R.bb<R.Sb;)R.Ra>>>=8,R.Ra+=R.oa[R.pa+R.bb]<<Pa-8>>>0,++R.bb,R.u-=8;$(R)&&(R.h=1,R.u=0)}function V(R,U){if(r(0<=U),!R.h&&U<=wl){var ee=D(R)&el[U];return R.u+=U,te(R),ee}return R.h=1,R.u=0}function H(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function D(R){return R.Ra>>>(R.u&Pa-1)>>>0}function $(R){return r(R.bb<=R.Sb),R.h||R.bb==R.Sb&&R.u>Pa}function ne(R,U){R.u=U,R.h=$(R)}function Z(R){R.u>=Ha&&(r(R.u>=Ha),te(R))}function Q(R){r(R!=null&&R.oa!=null),R.pa<R.Zc?(R.I=(R.oa[R.pa++]|R.I<<8)>>>0,R.b+=8):(r(R!=null&&R.oa!=null),R.pa<R.Yc?(R.b+=8,R.I=R.oa[R.pa++]|R.I<<8):R.Ka?R.b=0:(R.I<<=8,R.b+=8,R.Ka=1))}function oe(R){return G(R,1)}function se(R,U){var ee=R.Ca;0>R.b&&Q(R);var ae=R.b,ce=ee*U>>>8,he=(R.I>>>ae>ce)+0;for(he?(ee-=ce,R.I-=ce+1<<ae>>>0):ee=ce+1,ae=ee,ce=0;256<=ae;)ce+=8,ae>>=8;return ae=7^ce+wi[ae],R.b-=ae,R.Ca=(ee<<ae)-1,he}function ue(R,U,ee){R[U+0]=ee>>24&255,R[U+1]=ee>>16&255,R[U+2]=ee>>8&255,R[U+3]=ee>>0&255}function ve(R,U){return R[U+0]<<0|R[U+1]<<8}function Pe(R,U){return ve(R,U)|R[U+2]<<16}function ke(R,U){return ve(R,U)|ve(R,U+2)<<16}function Ne(R,U){var ee=1<<U;return r(R!=null),r(0<U),R.X=i(ee),R.X==null?0:(R.Mb=32-U,R.Xa=U,1)}function xe(R,U){r(R!=null),r(U!=null),r(R.Xa==U.Xa),n(U.X,0,R.X,0,1<<U.Xa)}function ye(){this.X=[],this.Xa=this.Mb=0}function Ie(R,U,ee,ae){r(ee!=null),r(ae!=null);var ce=ee[0],he=ae[0];return ce==0&&(ce=(R*he+U/2)/U),he==0&&(he=(U*ce+R/2)/R),0>=ce||0>=he?0:(ee[0]=ce,ae[0]=he,1)}function me(R,U){return R+(1<<U)-1>>>U}function _e(R,U){return((4278255360&R)+(4278255360&U)>>>0&4278255360)+((16711935&R)+(16711935&U)>>>0&16711935)>>>0}function Ae(R,U){T[U]=function(ee,ae,ce,he,pe,be,we){var Ee;for(Ee=0;Ee<pe;++Ee){var Be=T[R](be[we+Ee-1],ce,he+Ee);be[we+Ee]=_e(ee[ae+Ee],Be)}}}function Le(){this.ud=this.hd=this.jd=0}function ge(R,U){return((4278124286&(R^U))>>>1)+(R&U)>>>0}function Te(R){return 0<=R&&256>R?R:0>R?0:255<R?255:void 0}function Fe(R,U){return Te(R+(R-U+.5>>1))}function Ke(R,U,ee){return Math.abs(U-ee)-Math.abs(R-ee)}function it(R,U,ee,ae,ce,he,pe){for(ae=he[pe-1],ee=0;ee<ce;++ee)he[pe+ee]=ae=_e(R[U+ee],ae)}function rt(R,U,ee,ae,ce){var he;for(he=0;he<ee;++he){var pe=R[U+he],be=pe>>8&255,we=16711935&(we=(we=16711935&pe)+((be<<16)+be));ae[ce+he]=(4278255360&pe)+we>>>0}}function at(R,U){U.jd=R>>0&255,U.hd=R>>8&255,U.ud=R>>16&255}function bt(R,U,ee,ae,ce,he){var pe;for(pe=0;pe<ae;++pe){var be=U[ee+pe],we=be>>>8,Ee=be,Be=255&(Be=(Be=be>>>16)+((R.jd<<24>>24)*(we<<24>>24)>>>5));Ee=255&(Ee=(Ee=Ee+((R.hd<<24>>24)*(we<<24>>24)>>>5))+((R.ud<<24>>24)*(Be<<24>>24)>>>5)),ce[he+pe]=(4278255360&be)+(Be<<16)+Ee}}function yt(R,U,ee,ae,ce){T[U]=function(he,pe,be,we,Ee,Be,Qe,$e,We){for(we=Qe;we<$e;++we)for(Qe=0;Qe<We;++Qe)Ee[Be++]=ce(be[ae(he[pe++])])},T[R]=function(he,pe,be,we,Ee,Be,Qe){var $e=8>>he.b,We=he.Ea,wt=he.K[0],lt=he.w;if(8>$e)for(he=(1<<he.b)-1,lt=(1<<$e)-1;pe<be;++pe){var je,He=0;for(je=0;je<We;++je)je&he||(He=ae(we[Ee++])),Be[Qe++]=ce(wt[He<]),He>>=$e}else T["VP8LMapColor"+ee](we,Ee,wt,lt,Be,Qe,pe,be,We)}}function ht(R,U,ee,ae,ce){for(ee=U+ee;U<ee;){var he=R[U++];ae[ce++]=he>>16&255,ae[ce++]=he>>8&255,ae[ce++]=he>>0&255}}function zt(R,U,ee,ae,ce){for(ee=U+ee;U<ee;){var he=R[U++];ae[ce++]=he>>16&255,ae[ce++]=he>>8&255,ae[ce++]=he>>0&255,ae[ce++]=he>>24&255}}function Ot(R,U,ee,ae,ce){for(ee=U+ee;U<ee;){var he=(pe=R[U++])>>16&240|pe>>12&15,pe=pe>>0&240|pe>>28&15;ae[ce++]=he,ae[ce++]=pe}}function Ut(R,U,ee,ae,ce){for(ee=U+ee;U<ee;){var he=(pe=R[U++])>>16&248|pe>>13&7,pe=pe>>5&224|pe>>3&31;ae[ce++]=he,ae[ce++]=pe}}function $t(R,U,ee,ae,ce){for(ee=U+ee;U<ee;){var he=R[U++];ae[ce++]=he>>0&255,ae[ce++]=he>>8&255,ae[ce++]=he>>16&255}}function Oe(R,U,ee,ae,ce,he){if(he==0)for(ee=U+ee;U<ee;)ue(ae,((he=R[U++])[0]>>24|he[1]>>8&65280|he[2]<<8&16711680|he[3]<<24)>>>0),ce+=32;else n(ae,ce,R,U,ee)}function Me(R,U){T[U][0]=T[R+"0"],T[U][1]=T[R+"1"],T[U][2]=T[R+"2"],T[U][3]=T[R+"3"],T[U][4]=T[R+"4"],T[U][5]=T[R+"5"],T[U][6]=T[R+"6"],T[U][7]=T[R+"7"],T[U][8]=T[R+"8"],T[U][9]=T[R+"9"],T[U][10]=T[R+"10"],T[U][11]=T[R+"11"],T[U][12]=T[R+"12"],T[U][13]=T[R+"13"],T[U][14]=T[R+"0"],T[U][15]=T[R+"0"]}function mt(R){return R==Pl||R==Cs||R==hu||R==du}function Mt(){this.eb=[],this.size=this.A=this.fb=0}function Lt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function At(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Mt,this.f.kb=new Lt,this.sd=null}function fr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Qt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ze(R){return alert("todo:WebPSamplerProcessPlane"),R.T}function qe(R,U){var ee=R.T,ae=U.ba.f.RGBA,ce=ae.eb,he=ae.fb+R.ka*ae.A,pe=ha[U.ba.S],be=R.y,we=R.O,Ee=R.f,Be=R.N,Qe=R.ea,$e=R.W,We=U.cc,wt=U.dc,lt=U.Mc,je=U.Nc,He=R.ka,Ve=R.ka+R.T,ct=R.U,gt=ct+1>>1;for(He==0?pe(be,we,null,null,Ee,Be,Qe,$e,Ee,Be,Qe,$e,ce,he,null,null,ct):(pe(U.ec,U.fc,be,we,We,wt,lt,je,Ee,Be,Qe,$e,ce,he-ae.A,ce,he,ct),++ee);He+2<Ve;He+=2)We=Ee,wt=Be,lt=Qe,je=$e,Be+=R.Rc,$e+=R.Rc,he+=2*ae.A,pe(be,(we+=2*R.fa)-R.fa,be,we,We,wt,lt,je,Ee,Be,Qe,$e,ce,he-ae.A,ce,he,ct);return we+=R.fa,R.j+Ve<R.o?(n(U.ec,U.fc,be,we,ct),n(U.cc,U.dc,Ee,Be,gt),n(U.Mc,U.Nc,Qe,$e,gt),ee--):1&Ve||pe(be,we,null,null,Ee,Be,Qe,$e,Ee,Be,Qe,$e,ce,he+ae.A,null,null,ct),ee}function vt(R,U,ee){var ae=R.F,ce=[R.J];if(ae!=null){var he=R.U,pe=U.ba.S,be=pe==fu||pe==hu;U=U.ba.f.RGBA;var we=[0],Ee=R.ka;we[0]=R.T,R.Kb&&(Ee==0?--we[0]:(--Ee,ce[0]-=R.width),R.j+R.ka+R.T==R.o&&(we[0]=R.o-R.j-Ee));var Be=U.eb;Ee=U.fb+Ee*U.A,R=Gr(ae,ce[0],R.width,he,we,Be,Ee+(be?0:3),U.A),r(ee==we),R&&mt(pe)&&_i(Be,Ee,be,he,we,U.A)}return 0}function pt(R){var U=R.ma,ee=U.ba.S,ae=11>ee,ce=ee==Fo||ee==El||ee==fu||ee==on||ee==12||mt(ee);if(U.memory=null,U.Ib=null,U.Jb=null,U.Nd=null,!Js(U.Oa,R,ce?11:12))return 0;if(ce&&mt(ee)&&St(),R.da)alert("todo:use_scaling");else{if(ae){if(U.Ib=ze,R.Kb){if(ee=R.U+1>>1,U.memory=i(R.U+2*ee),U.memory==null)return 0;U.ec=U.memory,U.fc=0,U.cc=U.ec,U.dc=U.fc+R.U,U.Mc=U.cc,U.Nc=U.dc+ee,U.Ib=qe,St()}}else alert("todo:EmitYUV");ce&&(U.Jb=vt,ae&&et())}if(ae&&!Si){for(R=0;256>R;++R)ra[R]=89858*(R-128)+go>>rs,na[R]=-22014*(R-128)+go,Al[R]=-45773*(R-128),al[R]=113618*(R-128)+go>>rs;for(R=Yr;R<en;++R)U=76283*(R-16)+go>>rs,mu[R-Yr]=xa(U,255),cf[R-Yr]=xa(U+8>>4,15);Si=1}return 1}function Je(R){var U=R.ma,ee=R.U,ae=R.T;return r(!(1&R.ka)),0>=ee||0>=ae?0:(ee=U.Ib(R,U),U.Jb!=null&&U.Jb(R,U,ee),U.Dc+=ee,1)}function _t(R){R.ma.memory=null}function Ye(R,U,ee,ae){return V(R,8)!=47?0:(U[0]=V(R,14)+1,ee[0]=V(R,14)+1,ae[0]=V(R,1),V(R,3)!=0?0:!R.h)}function Pt(R,U){if(4>R)return R+1;var ee=R-2>>1;return(2+(1&R)<<ee)+V(U,ee)+1}function Dt(R,U){return 120<U?U-120:1<=(ee=((ee=qf[U-1])>>4)*R+(8-(15&ee)))?ee:1;var ee}function Wt(R,U,ee){var ae=D(ee),ce=R[U+=255&ae].g-8;return 0<ce&&(ne(ee,ee.u+8),ae=D(ee),U+=R[U].value,U+=ae&(1<<ce)-1),ne(ee,ee.u+R[U].g),R[U].value}function Zt(R,U,ee){return ee.g+=R.g,ee.value+=R.value<<U>>>0,r(8>=ee.g),R.g}function rr(R,U,ee){var ae=R.xc;return r((U=ae==0?0:R.vc[R.md*(ee>>ae)+(U>>ae)])<R.Wb),R.Ya[U]}function _r(R,U,ee,ae){var ce=R.ab,he=R.c*U,pe=R.C;U=pe+U;var be=ee,we=ae;for(ae=R.Ta,ee=R.Ua;0<ce--;){var Ee=R.gc[ce],Be=pe,Qe=U,$e=be,We=we,wt=(we=ae,be=ee,Ee.Ea);switch(r(Be<Qe),r(Qe<=Ee.nc),Ee.hc){case 2:Hu($e,We,(Qe-Be)*wt,we,be);break;case 0:var lt=Be,je=Qe,He=we,Ve=be,ct=(Rt=Ee).Ea;lt==0&&(tl($e,We,null,null,1,He,Ve),it($e,We+1,0,0,ct-1,He,Ve+1),We+=ct,Ve+=ct,++lt);for(var gt=1<<Rt.b,Bt=gt-1,jt=me(ct,Rt.b),ir=Rt.K,Rt=Rt.w+(lt>>Rt.b)*jt;lt<je;){var Mr=ir,Fr=Rt,Lr=1;for(co($e,We,He,Ve-ct,1,He,Ve);Lr<ct;){var yr=(Lr&~Bt)+gt;yr>ct&&(yr=ct),(0,vi[Mr[Fr++]>>8&15])($e,We+ +Lr,He,Ve+Lr-ct,yr-Lr,He,Ve+Lr),Lr=yr}We+=ct,Ve+=ct,++lt&Bt||(Rt+=jt)}Qe!=Ee.nc&&n(we,be-wt,we,be+(Qe-Be-1)*wt,wt);break;case 1:for(wt=$e,je=We,ct=($e=Ee.Ea)-(Ve=$e&~(He=(We=1<<Ee.b)-1)),lt=me($e,Ee.b),gt=Ee.K,Ee=Ee.w+(Be>>Ee.b)*lt;Be<Qe;){for(Bt=gt,jt=Ee,ir=new Le,Rt=je+Ve,Mr=je+$e;je<Rt;)at(Bt[jt++],ir),Jo(ir,wt,je,We,we,be),je+=We,be+=We;je<Mr&&(at(Bt[jt++],ir),Jo(ir,wt,je,ct,we,be),je+=ct,be+=ct),++Be&He||(Ee+=lt)}break;case 3:if($e==we&&We==be&&0<Ee.b){for(je=we,$e=wt=be+(Qe-Be)*wt-(Ve=(Qe-Be)*me(Ee.Ea,Ee.b)),We=we,He=be,lt=[],Ve=(ct=Ve)-1;0<=Ve;--Ve)lt[Ve]=We[He+Ve];for(Ve=ct-1;0<=Ve;--Ve)je[$e+Ve]=lt[Ve];gi(Ee,Be,Qe,we,wt,we,be)}else gi(Ee,Be,Qe,$e,We,we,be)}be=ae,we=ee}we!=ee&&n(ae,ee,be,we,he)}function Hn(R,U){var ee=R.V,ae=R.Ba+R.c*R.C,ce=U-R.C;if(r(U<=R.l.o),r(16>=ce),0<ce){var he=R.l,pe=R.Ta,be=R.Ua,we=he.width;if(_r(R,ce,ee,ae),ce=be=[be],r((ee=R.C)<(ae=U)),r(he.v<he.va),ae>he.o&&(ae=he.o),ee<he.j){var Ee=he.j-ee;ee=he.j,ce[0]+=Ee*we}if(ee>=ae?ee=0:(ce[0]+=4*he.v,he.ka=ee-he.j,he.U=he.va-he.v,he.T=ae-ee,ee=1),ee){if(be=be[0],11>(ee=R.ca).S){var Be=ee.f.RGBA,Qe=(ae=ee.S,ce=he.U,he=he.T,Ee=Be.eb,Be.A),$e=he;for(Be=Be.fb+R.Ma*Be.A;0<$e--;){var We=pe,wt=be,lt=ce,je=Ee,He=Be;switch(ae){case xl:oi(We,wt,lt,je,He);break;case Fo:Di(We,wt,lt,je,He);break;case Pl:Di(We,wt,lt,je,He),_i(je,He,0,lt,1,0);break;case sf:fo(We,wt,lt,je,He);break;case El:Oe(We,wt,lt,je,He,1);break;case Cs:Oe(We,wt,lt,je,He,1),_i(je,He,0,lt,1,0);break;case fu:Oe(We,wt,lt,je,He,0);break;case hu:Oe(We,wt,lt,je,He,0),_i(je,He,1,lt,1,0);break;case on:es(We,wt,lt,je,He);break;case du:es(We,wt,lt,je,He),Jr(je,He,lt,1,0);break;case Vu:Vr(We,wt,lt,je,He);break;default:r(0)}be+=we,Be+=Qe}R.Ma+=he}else alert("todo:EmitRescaledRowsYUVA");r(R.Ma<=ee.height)}}R.C=U,r(R.C<=R.i)}function ti(R){var U;if(0<R.ua)return 0;for(U=0;U<R.Wb;++U){var ee=R.Ya[U].G,ae=R.Ya[U].H;if(0<ee[1][ae[1]+0].g||0<ee[2][ae[2]+0].g||0<ee[3][ae[3]+0].g)return 0}return 1}function Vn(R,U,ee,ae,ce,he){if(R.Z!=0){var pe=R.qd,be=R.rd;for(r(Ui[R.Z]!=null);U<ee;++U)Ui[R.Z](pe,be,ae,ce,ae,ce,he),pe=ae,be=ce,ce+=he;R.qd=pe,R.rd=be}}function Ci(R,U){var ee=R.l.ma,ae=ee.Z==0||ee.Z==1?R.l.j:R.C;if(ae=R.C<ae?ae:R.C,r(U<=R.l.o),U>ae){var ce=R.l.width,he=ee.ca,pe=ee.tb+ce*ae,be=R.V,we=R.Ba+R.c*ae,Ee=R.gc;r(R.ab==1),r(Ee[0].hc==3),As(Ee[0],ae,U,be,we,he,pe),Vn(ee,ae,U,he,pe,ce)}R.C=R.Ma=U}function En(R,U,ee,ae,ce,he,pe){var be=R.$/ae,we=R.$%ae,Ee=R.m,Be=R.s,Qe=ee+R.$,$e=Qe;ce=ee+ae*ce;var We=ee+ae*he,wt=280+Be.ua,lt=R.Pb?be:16777216,je=0<Be.ua?Be.Wa:null,He=Be.wc,Ve=Qe<We?rr(Be,we,be):null;r(R.C<he),r(We<=ce);var ct=!1;e:for(;;){for(;ct||Qe<We;){var gt=0;if(be>=lt){var Bt=Qe-ee;r((lt=R).Pb),lt.wd=lt.m,lt.xd=Bt,0<lt.s.ua&&xe(lt.s.Wa,lt.s.vb),lt=be+Gu}if(we&He||(Ve=rr(Be,we,be)),r(Ve!=null),Ve.Qb&&(U[Qe]=Ve.qb,ct=!0),!ct)if(Z(Ee),Ve.jc){gt=Ee,Bt=U;var jt=Qe,ir=Ve.pd[D(gt)&Qr-1];r(Ve.jc),256>ir.g?(ne(gt,gt.u+ir.g),Bt[jt]=ir.value,gt=0):(ne(gt,gt.u+ir.g-256),r(256<=ir.value),gt=ir.value),gt==0&&(ct=!0)}else gt=Wt(Ve.G[0],Ve.H[0],Ee);if(Ee.h)break;if(ct||256>gt){if(!ct)if(Ve.nd)U[Qe]=(Ve.qb|gt<<8)>>>0;else{if(Z(Ee),ct=Wt(Ve.G[1],Ve.H[1],Ee),Z(Ee),Bt=Wt(Ve.G[2],Ve.H[2],Ee),jt=Wt(Ve.G[3],Ve.H[3],Ee),Ee.h)break;U[Qe]=(jt<<24|ct<<16|gt<<8|Bt)>>>0}if(ct=!1,++Qe,++we>=ae&&(we=0,++be,pe!=null&&be<=he&&!(be%16)&&pe(R,be),je!=null))for(;$e<Qe;)gt=U[$e++],je.X[(506832829*gt&4294967295)>>>je.Mb]=gt}else if(280>gt){if(gt=Pt(gt-256,Ee),Bt=Wt(Ve.G[4],Ve.H[4],Ee),Z(Ee),Bt=Dt(ae,Bt=Pt(Bt,Ee)),Ee.h)break;if(Qe-ee<Bt||ce-Qe<gt)break e;for(jt=0;jt<gt;++jt)U[Qe+jt]=U[Qe+jt-Bt];for(Qe+=gt,we+=gt;we>=ae;)we-=ae,++be,pe!=null&&be<=he&&!(be%16)&&pe(R,be);if(r(Qe<=ce),we&He&&(Ve=rr(Be,we,be)),je!=null)for(;$e<Qe;)gt=U[$e++],je.X[(506832829*gt&4294967295)>>>je.Mb]=gt}else{if(!(gt<wt))break e;for(ct=gt-280,r(je!=null);$e<Qe;)gt=U[$e++],je.X[(506832829*gt&4294967295)>>>je.Mb]=gt;gt=Qe,r(!(ct>>>(Bt=je).Xa)),U[gt]=Bt.X[ct],ct=!0}ct||r(Ee.h==$(Ee))}if(R.Pb&&Ee.h&&Qe<ce)r(R.m.h),R.a=5,R.m=R.wd,R.$=R.xd,0<R.s.ua&&xe(R.s.vb,R.s.Wa);else{if(Ee.h)break e;pe!=null&&pe(R,be>he?he:be),R.a=0,R.$=Qe-ee}return 1}return R.a=3,0}function ki(R){r(R!=null),R.vc=null,R.yc=null,R.Ya=null;var U=R.Wa;U!=null&&(U.X=null),R.vb=null,r(R!=null)}function bi(){var R=new qa;return R==null?null:(R.a=0,R.xb=gu,Me("Predictor","VP8LPredictors"),Me("Predictor","VP8LPredictors_C"),Me("PredictorAdd","VP8LPredictorsAdd"),Me("PredictorAdd","VP8LPredictorsAdd_C"),Hu=rt,Jo=bt,oi=ht,Di=zt,es=Ot,Vr=Ut,fo=$t,T.VP8LMapColor32b=Fi,T.VP8LMapColor8b=Co,R)}function _a(R,U,ee,ae,ce){var he=1,pe=[R],be=[U],we=ae.m,Ee=ae.s,Be=null,Qe=0;e:for(;;){if(ee)for(;he&&V(we,1);){var $e=pe,We=be,wt=ae,lt=1,je=wt.m,He=wt.gc[wt.ab],Ve=V(je,2);if(wt.Oc&1<<Ve)he=0;else{switch(wt.Oc|=1<<Ve,He.hc=Ve,He.Ea=$e[0],He.nc=We[0],He.K=[null],++wt.ab,r(4>=wt.ab),Ve){case 0:case 1:He.b=V(je,3)+2,lt=_a(me(He.Ea,He.b),me(He.nc,He.b),0,wt,He.K),He.K=He.K[0];break;case 3:var ct,gt=V(je,8)+1,Bt=16<gt?0:4<gt?1:2<gt?2:3;if($e[0]=me(He.Ea,Bt),He.b=Bt,ct=lt=_a(gt,1,0,wt,He.K)){var jt,ir=gt,Rt=He,Mr=1<<(8>>Rt.b),Fr=i(Mr);if(Fr==null)ct=0;else{var Lr=Rt.K[0],yr=Rt.w;for(Fr[0]=Rt.K[0][0],jt=1;jt<1*ir;++jt)Fr[jt]=_e(Lr[yr+jt],Fr[jt-1]);for(;jt<4*Mr;++jt)Fr[jt]=0;Rt.K[0]=null,Rt.K[0]=Fr,ct=1}}lt=ct;break;case 2:break;default:r(0)}he=lt}}if(pe=pe[0],be=be[0],he&&V(we,1)&&!(he=1<=(Qe=V(we,4))&&11>=Qe)){ae.a=3;break e}var Wr;if(Wr=he)t:{var Xr,Xt,Dr,An=ae,In=pe,li=be,xr=Qe,Hi=ee,wn=An.m,jn=An.s,ui=[null],xi=1,da=0,$a=lf[xr];r:for(;;){if(Hi&&V(wn,1)){var pn=V(wn,3)+2,Fn=me(In,pn),ia=me(li,pn),Do=Fn*ia;if(!_a(Fn,ia,0,An,ui))break r;for(ui=ui[0],jn.xc=pn,Xr=0;Xr<Do;++Xr){var vo=ui[Xr]>>8&65535;ui[Xr]=vo,vo>=xi&&(xi=vo+1)}}if(wn.h)break r;for(Xt=0;5>Xt;++Xt){var Ir=il[Xt];!Xt&&0<xr&&(Ir+=1<<xr),da<Ir&&(da=Ir)}var mo=o(xi*$a,L),yu=xi,Xu=o(yu,I);if(Xu==null)var Ya=null;else r(65536>=yu),Ya=Xu;var Oa=i(da);if(Ya==null||Oa==null||mo==null){An.a=1;break r}var kl=mo;for(Xr=Dr=0;Xr<xi;++Xr){var pa=Ya[Xr],Bo=pa.G,hn=pa.H,vr=0,Kr=1,_n=0;for(Xt=0;5>Xt;++Xt){Ir=il[Xt],Bo[Xt]=kl,hn[Xt]=Dr,!Xt&&0<xr&&(Ir+=1<<xr);i:{var Cn,Qn=Ir,qo=An,sn=Oa,bu=kl,Ns=Dr,ln=0,Xa=qo.m,Ll=V(Xa,1);if(a(sn,0,0,Qn),Ll){var aa=V(Xa,1)+1,wu=V(Xa,1),_u=V(Xa,wu==0?1:8);sn[_u]=1,aa==2&&(sn[_u=V(Xa,8)]=1);var Ei=1}else{var tn=i(19),Dn=V(Xa,4)+4;if(19<Dn){qo.a=3;var Bn=0;break i}for(Cn=0;Cn<Dn;++Cn)tn[qh[Cn]]=V(Xa,3);var Ka=void 0,yo=void 0,Za=qo,xc=tn,qn=Qn,Su=sn,ol=0,Qa=Za.m,gn=8,ci=o(128,L);n:for(;A(ci,0,7,xc,19);){if(V(Qa,1)){var oa=2+2*V(Qa,3);if((Ka=2+V(Qa,oa))>qn)break n}else Ka=qn;for(yo=0;yo<qn&&Ka--;){Z(Qa);var Vi=ci[0+(127&D(Qa))];ne(Qa,Qa.u+Vi.g);var Ts=Vi.value;if(16>Ts)Su[yo++]=Ts,Ts!=0&&(gn=Ts);else{var Ec=Ts==16,Ku=Ts-16,Wf=bc[Ku],os=V(Qa,pu[Ku])+Wf;if(yo+os>qn)break n;for(var ff=Ec?gn:0;0<os--;)Su[yo++]=ff}}ol=1;break n}ol||(Za.a=3),Ei=ol}(Ei=Ei&&!Xa.h)&&(ln=A(bu,Ns,8,sn,Qn)),Ei&&ln!=0?Bn=ln:(qo.a=3,Bn=0)}if(Bn==0)break r;if(Kr&&Bf[Xt]==1&&(Kr=kl[Dr].g==0),vr+=kl[Dr].g,Dr+=Bn,3>=Xt){var Nl,xu=Oa[0];for(Nl=1;Nl<Ir;++Nl)Oa[Nl]>xu&&(xu=Oa[Nl]);_n+=xu}}if(pa.nd=Kr,pa.Qb=0,Kr&&(pa.qb=(Bo[3][hn[3]+0].value<<24|Bo[1][hn[1]+0].value<<16|Bo[2][hn[2]+0].value)>>>0,vr==0&&256>Bo[0][hn[0]+0].value&&(pa.Qb=1,pa.qb+=Bo[0][hn[0]+0].value<<8)),pa.jc=!pa.Qb&&6>_n,pa.jc){var zo,Aa=pa;for(zo=0;zo<Qr;++zo){var ss=zo,Ja=Aa.pd[ss],ls=Aa.G[0][Aa.H[0]+ss];256<=ls.value?(Ja.g=ls.g+256,Ja.value=ls.value):(Ja.g=0,Ja.value=0,ss>>=Zt(ls,8,Ja),ss>>=Zt(Aa.G[1][Aa.H[1]+ss],16,Ja),ss>>=Zt(Aa.G[2][Aa.H[2]+ss],0,Ja),Zt(Aa.G[3][Aa.H[3]+ss],24,Ja))}}}jn.vc=ui,jn.Wb=xi,jn.Ya=Ya,jn.yc=mo,Wr=1;break t}Wr=0}if(!(he=Wr)){ae.a=3;break e}if(0<Qe){if(Ee.ua=1<<Qe,!Ne(Ee.Wa,Qe)){ae.a=1,he=0;break e}}else Ee.ua=0;var Pc=ae,Oc=pe,hf=be,Zu=Pc.s,us=Zu.xc;if(Pc.c=Oc,Pc.i=hf,Zu.md=me(Oc,us),Zu.wc=us==0?-1:(1<<us)-1,ee){ae.xb=po;break e}if((Be=i(pe*be))==null){ae.a=1,he=0;break e}he=(he=En(ae,Be,0,pe,be,be,null))&&!we.h;break e}return he?(ce!=null?ce[0]=Be:(r(Be==null),r(ee)),ae.$=0,ee||ki(Ee)):ki(Ee),he}function ua(R,U){var ee=R.c*R.i,ae=ee+U+16*U;return r(R.c<=U),R.V=i(ae),R.V==null?(R.Ta=null,R.Ua=0,R.a=1,0):(R.Ta=R.V,R.Ua=R.Ba+ee+U,1)}function ao(R,U){var ee=R.C,ae=U-ee,ce=R.V,he=R.Ba+R.c*ee;for(r(U<=R.l.o);0<ae;){var pe=16<ae?16:ae,be=R.l.ma,we=R.l.width,Ee=we*pe,Be=be.ca,Qe=be.tb+we*ee,$e=R.Ta,We=R.Ua;_r(R,pe,ce,he),Mn($e,We,Be,Qe,Ee),Vn(be,ee,ee+pe,Be,Qe,we),ae-=pe,ce+=pe*R.c,ee+=pe}r(ee==U),R.C=R.Ma=U}function ws(){this.ub=this.yd=this.td=this.Rb=0}function Go(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function tu(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function mc(){this.Yb=function(){var R=[];return function U(ee,ae,ce){for(var he=ce[ae],pe=0;pe<he&&(ee.push(ce.length>ae+1?[]:0),!(ce.length<ae+1));pe++)U(ee[pe],ae+1,ce)}(R,0,[3,11]),R}()}function Nn(){this.jb=i(3),this.Wc=s([4,8],mc),this.Xc=s([4,17],mc)}function Bu(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function oo(){this.ld=this.La=this.dd=this.tc=0}function dl(){this.Na=this.la=0}function Vs(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qu(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ru(){this.uc=this.M=this.Nb=0,this.wa=Array(new oo),this.Y=0,this.ya=Array(new qu),this.aa=0,this.l=new $r}function so(){this.y=i(16),this.f=i(8),this.ea=i(8)}function hi(){this.cb=this.a=0,this.sc="",this.m=new H,this.Od=new ws,this.Kc=new Go,this.ed=new Bu,this.Qa=new tu,this.Ic=this.$c=this.Aa=0,this.D=new ru,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,H),this.ia=0,this.pb=o(4,Vs),this.Pa=new Nn,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new so),this.Hd=0,this.rb=Array(new dl),this.sb=0,this.wa=Array(new oo),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new qu),this.L=this.aa=0,this.gd=s([4,2],oo),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function $r(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ar(){var R=new hi;return R!=null&&(R.a=0,R.sc="OK",R.cb=0,R.Xb=0,Ol||(Ol=Ma)),R}function nn(R,U,ee){return R.a==0&&(R.a=U,R.sc=ee,R.cb=0),0}function di(R,U,ee){return 3<=ee&&R[U+0]==157&&R[U+1]==1&&R[U+2]==42}function Li(R,U){if(R==null)return 0;if(R.a=0,R.sc="OK",U==null)return nn(R,2,"null VP8Io passed to VP8GetHeaders()");var ee=U.data,ae=U.w,ce=U.ha;if(4>ce)return nn(R,7,"Truncated header.");var he=ee[ae+0]|ee[ae+1]<<8|ee[ae+2]<<16,pe=R.Od;if(pe.Rb=!(1&he),pe.td=he>>1&7,pe.yd=he>>4&1,pe.ub=he>>5,3<pe.td)return nn(R,3,"Incorrect keyframe parameters.");if(!pe.yd)return nn(R,4,"Frame not displayable.");ae+=3,ce-=3;var be=R.Kc;if(pe.Rb){if(7>ce)return nn(R,7,"cannot parse picture header");if(!di(ee,ae,ce))return nn(R,3,"Bad code word");be.c=16383&(ee[ae+4]<<8|ee[ae+3]),be.Td=ee[ae+4]>>6,be.i=16383&(ee[ae+6]<<8|ee[ae+5]),be.Ud=ee[ae+6]>>6,ae+=7,ce-=7,R.za=be.c+15>>4,R.Ub=be.i+15>>4,U.width=be.c,U.height=be.i,U.Da=0,U.j=0,U.v=0,U.va=U.width,U.o=U.height,U.da=0,U.ib=U.width,U.hb=U.height,U.U=U.width,U.T=U.height,a((he=R.Pa).jb,0,255,he.jb.length),r((he=R.Qa)!=null),he.Cb=0,he.Bb=0,he.Fb=1,a(he.Zb,0,0,he.Zb.length),a(he.Lb,0,0,he.Lb)}if(pe.ub>ce)return nn(R,7,"bad partition length");M(he=R.m,ee,ae,pe.ub),ae+=pe.ub,ce-=pe.ub,pe.Rb&&(be.Ld=oe(he),be.Kd=oe(he)),be=R.Qa;var we,Ee=R.Pa;if(r(he!=null),r(be!=null),be.Cb=oe(he),be.Cb){if(be.Bb=oe(he),oe(he)){for(be.Fb=oe(he),we=0;4>we;++we)be.Zb[we]=oe(he)?W(he,7):0;for(we=0;4>we;++we)be.Lb[we]=oe(he)?W(he,6):0}if(be.Bb)for(we=0;3>we;++we)Ee.jb[we]=oe(he)?G(he,8):255}else be.Bb=0;if(he.Ka)return nn(R,3,"cannot parse segment header");if((be=R.ed).zd=oe(he),be.Tb=G(he,6),be.wb=G(he,3),be.Pc=oe(he),be.Pc&&oe(he)){for(Ee=0;4>Ee;++Ee)oe(he)&&(be.vd[Ee]=W(he,6));for(Ee=0;4>Ee;++Ee)oe(he)&&(be.od[Ee]=W(he,6))}if(R.L=be.Tb==0?0:be.zd?1:2,he.Ka)return nn(R,3,"cannot parse filter header");var Be=ce;if(ce=we=ae,ae=we+Be,be=Be,R.Xb=(1<<G(R.m,2))-1,Be<3*(Ee=R.Xb))ee=7;else{for(we+=3*Ee,be-=3*Ee,Be=0;Be<Ee;++Be){var Qe=ee[ce+0]|ee[ce+1]<<8|ee[ce+2]<<16;Qe>be&&(Qe=be),M(R.Jc[+Be],ee,we,Qe),we+=Qe,be-=Qe,ce+=3}M(R.Jc[+Ee],ee,we,be),ee=we<ae?0:5}if(ee!=0)return nn(R,ee,"cannot parse partitions");for(ee=G(we=R.m,7),ce=oe(we)?W(we,4):0,ae=oe(we)?W(we,4):0,be=oe(we)?W(we,4):0,Ee=oe(we)?W(we,4):0,we=oe(we)?W(we,4):0,Be=R.Qa,Qe=0;4>Qe;++Qe){if(Be.Cb){var $e=Be.Zb[Qe];Be.Fb||($e+=ee)}else{if(0<Qe){R.pb[Qe]=R.pb[0];continue}$e=ee}var We=R.pb[Qe];We.Sc[0]=ks[xa($e+ce,127)],We.Sc[1]=Wu[xa($e+0,127)],We.Eb[0]=2*ks[xa($e+ae,127)],We.Eb[1]=101581*Wu[xa($e+be,127)]>>16,8>We.Eb[1]&&(We.Eb[1]=8),We.Qc[0]=ks[xa($e+Ee,117)],We.Qc[1]=Wu[xa($e+we,127)],We.lc=$e+we}if(!pe.Rb)return nn(R,4,"Not a key frame.");for(oe(he),pe=R.Pa,ee=0;4>ee;++ee){for(ce=0;8>ce;++ce)for(ae=0;3>ae;++ae)for(be=0;11>be;++be)Ee=se(he,Uf[ee][ce][ae][be])?G(he,8):$u[ee][ce][ae][be],pe.Wc[ee][ce].Yb[ae][be]=Ee;for(ce=0;17>ce;++ce)pe.Xc[ee][ce]=pe.Wc[ee][_c[ce]]}return R.kc=oe(he),R.kc&&(R.Bd=G(he,8)),R.cb=1}function Ma(R,U,ee,ae,ce,he,pe){var be=U[ce].Yb[ee];for(ee=0;16>ce;++ce){if(!se(R,be[ee+0]))return ce;for(;!se(R,be[ee+1]);)if(be=U[++ce].Yb[0],ee=0,ce==16)return 16;var we=U[ce+1].Yb;if(se(R,be[ee+2])){var Ee=R,Be=0;if(se(Ee,($e=be)[(Qe=ee)+3]))if(se(Ee,$e[Qe+6])){for(be=0,Qe=2*(Be=se(Ee,$e[Qe+8]))+($e=se(Ee,$e[Qe+9+Be])),Be=0,$e=uf[Qe];$e[be];++be)Be+=Be+se(Ee,$e[be]);Be+=3+(8<<Qe)}else se(Ee,$e[Qe+7])?(Be=7+2*se(Ee,165),Be+=se(Ee,145)):Be=5+se(Ee,159);else Be=se(Ee,$e[Qe+4])?3+se(Ee,$e[Qe+5]):2;be=we[2]}else Be=1,be=we[1];we=pe+Wa[ce],0>(Ee=R).b&&Q(Ee);var Qe,$e=Ee.b,We=(Qe=Ee.Ca>>1)-(Ee.I>>$e)>>31;--Ee.b,Ee.Ca+=We,Ee.Ca|=1,Ee.I-=(Qe+1&We)<<$e,he[we]=((Be^We)-We)*ae[(0<ce)+0]}return 16}function Ia(R){var U=R.rb[R.sb-1];U.la=0,U.Na=0,a(R.zc,0,0,R.zc.length),R.ja=0}function ri(R,U){if(R==null)return 0;if(U==null)return nn(R,2,"NULL VP8Io parameter in VP8Decode().");if(!R.cb&&!Li(R,U))return 0;if(r(R.cb),U.ac==null||U.ac(U)){U.ob&&(R.L=0);var ee=is[R.L];if(R.L==2?(R.yb=0,R.zb=0):(R.yb=U.v-ee>>4,R.zb=U.j-ee>>4,0>R.yb&&(R.yb=0),0>R.zb&&(R.zb=0)),R.Va=U.o+15+ee>>4,R.Hb=U.va+15+ee>>4,R.Hb>R.za&&(R.Hb=R.za),R.Va>R.Ub&&(R.Va=R.Ub),0<R.L){var ae=R.ed;for(ee=0;4>ee;++ee){var ce;if(R.Qa.Cb){var he=R.Qa.Lb[ee];R.Qa.Fb||(he+=ae.Tb)}else he=ae.Tb;for(ce=0;1>=ce;++ce){var pe=R.gd[ee][ce],be=he;if(ae.Pc&&(be+=ae.vd[0],ce&&(be+=ae.od[0])),0<(be=0>be?0:63<be?63:be)){var we=be;0<ae.wb&&(we=4<ae.wb?we>>2:we>>1)>9-ae.wb&&(we=9-ae.wb),1>we&&(we=1),pe.dd=we,pe.tc=2*be+we,pe.ld=40<=be?2:15<=be?1:0}else pe.tc=0;pe.La=ce}}}ee=0}else nn(R,6,"Frame setup failed"),ee=R.a;if(ee=ee==0){if(ee){R.$c=0,0<R.Aa||(R.Ic=as);e:{ee=R.Ic,ae=4*(we=R.za);var Ee=32*we,Be=we+1,Qe=0<R.L?we*(0<R.Aa?2:1):0,$e=(R.Aa==2?2:1)*we;if((pe=ae+832+(ce=3*(16*ee+is[R.L])/2*Ee)+(he=R.Fa!=null&&0<R.Fa.length?R.Kc.c*R.Kc.i:0))!=pe)ee=0;else{if(pe>R.Vb){if(R.Vb=0,R.Ec=i(pe),R.Fc=0,R.Ec==null){ee=nn(R,1,"no memory during frame initialization.");break e}R.Vb=pe}pe=R.Ec,be=R.Fc,R.Ac=pe,R.Bc=be,be+=ae,R.Gd=o(Ee,so),R.Hd=0,R.rb=o(Be+1,dl),R.sb=1,R.wa=Qe?o(Qe,oo):null,R.Y=0,R.D.Nb=0,R.D.wa=R.wa,R.D.Y=R.Y,0<R.Aa&&(R.D.Y+=we),r(!0),R.oc=pe,R.pc=be,be+=832,R.ya=o($e,qu),R.aa=0,R.D.ya=R.ya,R.D.aa=R.aa,R.Aa==2&&(R.D.aa+=we),R.R=16*we,R.B=8*we,we=(Ee=is[R.L])*R.R,Ee=Ee/2*R.B,R.sa=pe,R.ta=be+we,R.qa=R.sa,R.ra=R.ta+16*ee*R.R+Ee,R.Ha=R.qa,R.Ia=R.ra+8*ee*R.B+Ee,R.$c=0,be+=ce,R.mb=he?pe:null,R.nb=he?be:null,r(be+he<=R.Fc+R.Vb),Ia(R),a(R.Ac,R.Bc,0,ae),ee=1}}if(ee){if(U.ka=0,U.y=R.sa,U.O=R.ta,U.f=R.qa,U.N=R.ra,U.ea=R.Ha,U.Vd=R.Ia,U.fa=R.R,U.Rc=R.B,U.F=null,U.J=0,!cu){for(ee=-255;255>=ee;++ee)Zn[255+ee]=0>ee?-ee:ee;for(ee=-1020;1020>=ee;++ee)Io[1020+ee]=-128>ee?-128:127<ee?127:ee;for(ee=-112;112>=ee;++ee)_l[112+ee]=-16>ee?-16:15<ee?15:ee;for(ee=-255;510>=ee;++ee)nl[255+ee]=0>ee?0:255<ee?255:ee;cu=1}rl=Tr,ko=fa,Lo=Gs,Wn=af,kr=iu,Rr=nu,bn=Ii,$n=mn,ts=Ba,No=lu,To=Qi,Va=Ji,On=Os,ho=Zs,Ro=ii,Mo=Ri,Bi=Mi,an=vl,zi[0]=Oo,zi[1]=Ws,zi[2]=Ys,zi[3]=lo,zi[4]=zu,zi[5]=Tn,zi[6]=Xs,zi[7]=Ks,zi[8]=ou,zi[9]=au,qi[0]=Es,qi[1]=yc,qi[2]=$o,qi[3]=Ss,qi[4]=fn,qi[5]=Yo,qi[6]=ja,ta[0]=Fa,ta[1]=$s,ta[2]=of,ta[3]=uo,ta[4]=Ti,ta[5]=su,ta[6]=Da,ee=1}else ee=0}ee&&(ee=function(We,wt){for(We.M=0;We.M<We.Va;++We.M){var lt,je=We.Jc[We.M&We.Xb],He=We.m,Ve=We;for(lt=0;lt<Ve.za;++lt){var ct=He,gt=Ve,Bt=gt.Ac,jt=gt.Bc+4*lt,ir=gt.zc,Rt=gt.ya[gt.aa+lt];if(gt.Qa.Bb?Rt.$b=se(ct,gt.Pa.jb[0])?2+se(ct,gt.Pa.jb[2]):se(ct,gt.Pa.jb[1]):Rt.$b=0,gt.kc&&(Rt.Ad=se(ct,gt.Bd)),Rt.Za=!se(ct,145)+0,Rt.Za){var Mr=Rt.Ob,Fr=0;for(gt=0;4>gt;++gt){var Lr,yr=ir[0+gt];for(Lr=0;4>Lr;++Lr){yr=zf[Bt[jt+Lr]][yr];for(var Wr=wc[se(ct,yr[0])];0<Wr;)Wr=wc[2*Wr+se(ct,yr[Wr])];yr=-Wr,Bt[jt+Lr]=yr}n(Mr,Fr,Bt,jt,4),Fr+=4,ir[0+gt]=yr}}else yr=se(ct,156)?se(ct,128)?1:3:se(ct,163)?2:0,Rt.Ob[0]=yr,a(Bt,jt,yr,4),a(ir,0,yr,4);Rt.Dd=se(ct,142)?se(ct,114)?se(ct,183)?1:3:2:0}if(Ve.m.Ka)return nn(We,7,"Premature end-of-partition0 encountered.");for(;We.ja<We.za;++We.ja){if(Ve=je,ct=(He=We).rb[He.sb-1],Bt=He.rb[He.sb+He.ja],lt=He.ya[He.aa+He.ja],jt=He.kc?lt.Ad:0)ct.la=Bt.la=0,lt.Za||(ct.Na=Bt.Na=0),lt.Hc=0,lt.Gc=0,lt.ia=0;else{var Xr,Xt;if(ct=Bt,Bt=Ve,jt=He.Pa.Xc,ir=He.ya[He.aa+He.ja],Rt=He.pb[ir.$b],gt=ir.ad,Mr=0,Fr=He.rb[He.sb-1],yr=Lr=0,a(gt,Mr,0,384),ir.Za)var Dr=0,An=jt[3];else{Wr=i(16);var In=ct.Na+Fr.Na;if(In=Ol(Bt,jt[1],In,Rt.Eb,0,Wr,0),ct.Na=Fr.Na=(0<In)+0,1<In)rl(Wr,0,gt,Mr);else{var li=Wr[0]+3>>3;for(Wr=0;256>Wr;Wr+=16)gt[Mr+Wr]=li}Dr=1,An=jt[0]}var xr=15&ct.la,Hi=15&Fr.la;for(Wr=0;4>Wr;++Wr){var wn=1&Hi;for(li=Xt=0;4>li;++li)xr=xr>>1|(wn=(In=Ol(Bt,An,In=wn+(1&xr),Rt.Sc,Dr,gt,Mr))>Dr)<<7,Xt=Xt<<2|(3<In?3:1<In?2:gt[Mr+0]!=0),Mr+=16;xr>>=4,Hi=Hi>>1|wn<<7,Lr=(Lr<<8|Xt)>>>0}for(An=xr,Dr=Hi>>4,Xr=0;4>Xr;Xr+=2){for(Xt=0,xr=ct.la>>4+Xr,Hi=Fr.la>>4+Xr,Wr=0;2>Wr;++Wr){for(wn=1&Hi,li=0;2>li;++li)In=wn+(1&xr),xr=xr>>1|(wn=0<(In=Ol(Bt,jt[2],In,Rt.Qc,0,gt,Mr)))<<3,Xt=Xt<<2|(3<In?3:1<In?2:gt[Mr+0]!=0),Mr+=16;xr>>=2,Hi=Hi>>1|wn<<5}yr|=Xt<<4*Xr,An|=xr<<4<<Xr,Dr|=(240&Hi)<<Xr}ct.la=An,Fr.la=Dr,ir.Hc=Lr,ir.Gc=yr,ir.ia=43690&yr?0:Rt.ia,jt=!(Lr|yr)}if(0<He.L&&(He.wa[He.Y+He.ja]=He.gd[lt.$b][lt.Za],He.wa[He.Y+He.ja].La|=!jt),Ve.Ka)return nn(We,7,"Premature end-of-file encountered.")}if(Ia(We),He=wt,Ve=1,lt=(je=We).D,ct=0<je.L&&je.M>=je.zb&&je.M<=je.Va,je.Aa==0)e:{if(lt.M=je.M,lt.uc=ct,ji(je,lt),Ve=1,lt=(Xt=je.D).Nb,ct=(yr=is[je.L])*je.R,Bt=yr/2*je.B,Wr=16*lt*je.R,li=8*lt*je.B,jt=je.sa,ir=je.ta-ct+Wr,Rt=je.qa,gt=je.ra-Bt+li,Mr=je.Ha,Fr=je.Ia-Bt+li,Hi=(xr=Xt.M)==0,Lr=xr>=je.Va-1,je.Aa==2&&ji(je,Xt),Xt.uc)for(wn=(In=je).D.M,r(In.D.uc),Xt=In.yb;Xt<In.Hb;++Xt){Dr=Xt,An=wn;var jn=(ui=(Ir=In).D).Nb;Xr=Ir.R;var ui=ui.wa[ui.Y+Dr],xi=Ir.sa,da=Ir.ta+16*jn*Xr+16*Dr,$a=ui.dd,pn=ui.tc;if(pn!=0)if(r(3<=pn),Ir.L==1)0<Dr&&Mo(xi,da,Xr,pn+4),ui.La&&an(xi,da,Xr,pn),0<An&&Ro(xi,da,Xr,pn+4),ui.La&&Bi(xi,da,Xr,pn);else{var Fn=Ir.B,ia=Ir.qa,Do=Ir.ra+8*jn*Fn+8*Dr,vo=Ir.Ha,Ir=Ir.Ia+8*jn*Fn+8*Dr;jn=ui.ld,0<Dr&&($n(xi,da,Xr,pn+4,$a,jn),No(ia,Do,vo,Ir,Fn,pn+4,$a,jn)),ui.La&&(Va(xi,da,Xr,pn,$a,jn),ho(ia,Do,vo,Ir,Fn,pn,$a,jn)),0<An&&(bn(xi,da,Xr,pn+4,$a,jn),ts(ia,Do,vo,Ir,Fn,pn+4,$a,jn)),ui.La&&(To(xi,da,Xr,pn,$a,jn),On(ia,Do,vo,Ir,Fn,pn,$a,jn))}}if(je.ia&&alert("todo:DitherRow"),He.put!=null){if(Xt=16*xr,xr=16*(xr+1),Hi?(He.y=je.sa,He.O=je.ta+Wr,He.f=je.qa,He.N=je.ra+li,He.ea=je.Ha,He.W=je.Ia+li):(Xt-=yr,He.y=jt,He.O=ir,He.f=Rt,He.N=gt,He.ea=Mr,He.W=Fr),Lr||(xr-=yr),xr>He.o&&(xr=He.o),He.F=null,He.J=null,je.Fa!=null&&0<je.Fa.length&&Xt<xr&&(He.J=uu(je,He,Xt,xr-Xt),He.F=je.mb,He.F==null&&He.F.length==0)){Ve=nn(je,3,"Could not decode alpha data.");break e}Xt<He.j&&(yr=He.j-Xt,Xt=He.j,r(!(1&yr)),He.O+=je.R*yr,He.N+=je.B*(yr>>1),He.W+=je.B*(yr>>1),He.F!=null&&(He.J+=He.width*yr)),Xt<xr&&(He.O+=He.v,He.N+=He.v>>1,He.W+=He.v>>1,He.F!=null&&(He.J+=He.v),He.ka=Xt-He.j,He.U=He.va-He.v,He.T=xr-Xt,Ve=He.put(He))}lt+1!=je.Ic||Lr||(n(je.sa,je.ta-ct,jt,ir+16*je.R,ct),n(je.qa,je.ra-Bt,Rt,gt+8*je.B,Bt),n(je.Ha,je.Ia-Bt,Mr,Fr+8*je.B,Bt))}if(!Ve)return nn(We,6,"Output aborted.")}return 1}(R,U)),U.bc!=null&&U.bc(U),ee&=1}return ee?(R.cb=0,ee):0}function Ni(R,U,ee,ae,ce){ce=R[U+ee+32*ae]+(ce>>3),R[U+ee+32*ae]=-256&ce?0>ce?0:255:ce}function pl(R,U,ee,ae,ce,he){Ni(R,U,0,ee,ae+ce),Ni(R,U,1,ee,ae+he),Ni(R,U,2,ee,ae-he),Ni(R,U,3,ee,ae-ce)}function ca(R){return(20091*R>>16)+R}function Wo(R,U,ee,ae){var ce,he=0,pe=i(16);for(ce=0;4>ce;++ce){var be=R[U+0]+R[U+8],we=R[U+0]-R[U+8],Ee=(35468*R[U+4]>>16)-ca(R[U+12]),Be=ca(R[U+4])+(35468*R[U+12]>>16);pe[he+0]=be+Be,pe[he+1]=we+Ee,pe[he+2]=we-Ee,pe[he+3]=be-Be,he+=4,U++}for(ce=he=0;4>ce;++ce)be=(R=pe[he+0]+4)+pe[he+8],we=R-pe[he+8],Ee=(35468*pe[he+4]>>16)-ca(pe[he+12]),Ni(ee,ae,0,0,be+(Be=ca(pe[he+4])+(35468*pe[he+12]>>16))),Ni(ee,ae,1,0,we+Ee),Ni(ee,ae,2,0,we-Ee),Ni(ee,ae,3,0,be-Be),he++,ae+=32}function nu(R,U,ee,ae){var ce=R[U+0]+4,he=35468*R[U+4]>>16,pe=ca(R[U+4]),be=35468*R[U+1]>>16;pl(ee,ae,0,ce+pe,R=ca(R[U+1]),be),pl(ee,ae,1,ce+he,R,be),pl(ee,ae,2,ce-he,R,be),pl(ee,ae,3,ce-pe,R,be)}function fa(R,U,ee,ae,ce){Wo(R,U,ee,ae),ce&&Wo(R,U+16,ee,ae+4)}function Gs(R,U,ee,ae){ko(R,U+0,ee,ae,1),ko(R,U+32,ee,ae+128,1)}function af(R,U,ee,ae){var ce;for(R=R[U+0]+4,ce=0;4>ce;++ce)for(U=0;4>U;++U)Ni(ee,ae,U,ce,R)}function iu(R,U,ee,ae){R[U+0]&&Wn(R,U+0,ee,ae),R[U+16]&&Wn(R,U+16,ee,ae+4),R[U+32]&&Wn(R,U+32,ee,ae+128),R[U+48]&&Wn(R,U+48,ee,ae+128+4)}function Tr(R,U,ee,ae){var ce,he=i(16);for(ce=0;4>ce;++ce){var pe=R[U+0+ce]+R[U+12+ce],be=R[U+4+ce]+R[U+8+ce],we=R[U+4+ce]-R[U+8+ce],Ee=R[U+0+ce]-R[U+12+ce];he[0+ce]=pe+be,he[8+ce]=pe-be,he[4+ce]=Ee+we,he[12+ce]=Ee-we}for(ce=0;4>ce;++ce)pe=(R=he[0+4*ce]+3)+he[3+4*ce],be=he[1+4*ce]+he[2+4*ce],we=he[1+4*ce]-he[2+4*ce],Ee=R-he[3+4*ce],ee[ae+0]=pe+be>>3,ee[ae+16]=Ee+we>>3,ee[ae+32]=pe-be>>3,ee[ae+48]=Ee-we>>3,ae+=64}function _s(R,U,ee){var ae,ce=U-32,he=mi,pe=255-R[ce-1];for(ae=0;ae<ee;++ae){var be,we=he,Ee=pe+R[U-1];for(be=0;be<ee;++be)R[U+be]=we[Ee+R[ce+be]];U+=32}}function Ws(R,U){_s(R,U,4)}function $s(R,U){_s(R,U,8)}function yc(R,U){_s(R,U,16)}function $o(R,U){var ee;for(ee=0;16>ee;++ee)n(R,U+32*ee,R,U-32,16)}function Ss(R,U){var ee;for(ee=16;0<ee;--ee)a(R,U,R[U-1],16),U+=32}function xs(R,U,ee){var ae;for(ae=0;16>ae;++ae)a(U,ee+32*ae,R,16)}function Es(R,U){var ee,ae=16;for(ee=0;16>ee;++ee)ae+=R[U-1+32*ee]+R[U+ee-32];xs(ae>>5,R,U)}function fn(R,U){var ee,ae=8;for(ee=0;16>ee;++ee)ae+=R[U-1+32*ee];xs(ae>>4,R,U)}function Yo(R,U){var ee,ae=8;for(ee=0;16>ee;++ee)ae+=R[U+ee-32];xs(ae>>4,R,U)}function ja(R,U){xs(128,R,U)}function It(R,U,ee){return R+2*U+ee+2>>2}function Ys(R,U){var ee,ae=U-32;for(ae=new Uint8Array([It(R[ae-1],R[ae+0],R[ae+1]),It(R[ae+0],R[ae+1],R[ae+2]),It(R[ae+1],R[ae+2],R[ae+3]),It(R[ae+2],R[ae+3],R[ae+4])]),ee=0;4>ee;++ee)n(R,U+32*ee,ae,0,ae.length)}function lo(R,U){var ee=R[U-1],ae=R[U-1+32],ce=R[U-1+64],he=R[U-1+96];ue(R,U+0,16843009*It(R[U-1-32],ee,ae)),ue(R,U+32,16843009*It(ee,ae,ce)),ue(R,U+64,16843009*It(ae,ce,he)),ue(R,U+96,16843009*It(ce,he,he))}function Oo(R,U){var ee,ae=4;for(ee=0;4>ee;++ee)ae+=R[U+ee-32]+R[U-1+32*ee];for(ae>>=3,ee=0;4>ee;++ee)a(R,U+32*ee,ae,4)}function zu(R,U){var ee=R[U-1+0],ae=R[U-1+32],ce=R[U-1+64],he=R[U-1-32],pe=R[U+0-32],be=R[U+1-32],we=R[U+2-32],Ee=R[U+3-32];R[U+0+96]=It(ae,ce,R[U-1+96]),R[U+1+96]=R[U+0+64]=It(ee,ae,ce),R[U+2+96]=R[U+1+64]=R[U+0+32]=It(he,ee,ae),R[U+3+96]=R[U+2+64]=R[U+1+32]=R[U+0+0]=It(pe,he,ee),R[U+3+64]=R[U+2+32]=R[U+1+0]=It(be,pe,he),R[U+3+32]=R[U+2+0]=It(we,be,pe),R[U+3+0]=It(Ee,we,be)}function Xs(R,U){var ee=R[U+1-32],ae=R[U+2-32],ce=R[U+3-32],he=R[U+4-32],pe=R[U+5-32],be=R[U+6-32],we=R[U+7-32];R[U+0+0]=It(R[U+0-32],ee,ae),R[U+1+0]=R[U+0+32]=It(ee,ae,ce),R[U+2+0]=R[U+1+32]=R[U+0+64]=It(ae,ce,he),R[U+3+0]=R[U+2+32]=R[U+1+64]=R[U+0+96]=It(ce,he,pe),R[U+3+32]=R[U+2+64]=R[U+1+96]=It(he,pe,be),R[U+3+64]=R[U+2+96]=It(pe,be,we),R[U+3+96]=It(be,we,we)}function Tn(R,U){var ee=R[U-1+0],ae=R[U-1+32],ce=R[U-1+64],he=R[U-1-32],pe=R[U+0-32],be=R[U+1-32],we=R[U+2-32],Ee=R[U+3-32];R[U+0+0]=R[U+1+64]=he+pe+1>>1,R[U+1+0]=R[U+2+64]=pe+be+1>>1,R[U+2+0]=R[U+3+64]=be+we+1>>1,R[U+3+0]=we+Ee+1>>1,R[U+0+96]=It(ce,ae,ee),R[U+0+64]=It(ae,ee,he),R[U+0+32]=R[U+1+96]=It(ee,he,pe),R[U+1+32]=R[U+2+96]=It(he,pe,be),R[U+2+32]=R[U+3+96]=It(pe,be,we),R[U+3+32]=It(be,we,Ee)}function Ks(R,U){var ee=R[U+0-32],ae=R[U+1-32],ce=R[U+2-32],he=R[U+3-32],pe=R[U+4-32],be=R[U+5-32],we=R[U+6-32],Ee=R[U+7-32];R[U+0+0]=ee+ae+1>>1,R[U+1+0]=R[U+0+64]=ae+ce+1>>1,R[U+2+0]=R[U+1+64]=ce+he+1>>1,R[U+3+0]=R[U+2+64]=he+pe+1>>1,R[U+0+32]=It(ee,ae,ce),R[U+1+32]=R[U+0+96]=It(ae,ce,he),R[U+2+32]=R[U+1+96]=It(ce,he,pe),R[U+3+32]=R[U+2+96]=It(he,pe,be),R[U+3+64]=It(pe,be,we),R[U+3+96]=It(be,we,Ee)}function au(R,U){var ee=R[U-1+0],ae=R[U-1+32],ce=R[U-1+64],he=R[U-1+96];R[U+0+0]=ee+ae+1>>1,R[U+2+0]=R[U+0+32]=ae+ce+1>>1,R[U+2+32]=R[U+0+64]=ce+he+1>>1,R[U+1+0]=It(ee,ae,ce),R[U+3+0]=R[U+1+32]=It(ae,ce,he),R[U+3+32]=R[U+1+64]=It(ce,he,he),R[U+3+64]=R[U+2+64]=R[U+0+96]=R[U+1+96]=R[U+2+96]=R[U+3+96]=he}function ou(R,U){var ee=R[U-1+0],ae=R[U-1+32],ce=R[U-1+64],he=R[U-1+96],pe=R[U-1-32],be=R[U+0-32],we=R[U+1-32],Ee=R[U+2-32];R[U+0+0]=R[U+2+32]=ee+pe+1>>1,R[U+0+32]=R[U+2+64]=ae+ee+1>>1,R[U+0+64]=R[U+2+96]=ce+ae+1>>1,R[U+0+96]=he+ce+1>>1,R[U+3+0]=It(be,we,Ee),R[U+2+0]=It(pe,be,we),R[U+1+0]=R[U+3+32]=It(ee,pe,be),R[U+1+32]=R[U+3+64]=It(ae,ee,pe),R[U+1+64]=R[U+3+96]=It(ce,ae,ee),R[U+1+96]=It(he,ce,ae)}function of(R,U){var ee;for(ee=0;8>ee;++ee)n(R,U+32*ee,R,U-32,8)}function uo(R,U){var ee;for(ee=0;8>ee;++ee)a(R,U,R[U-1],8),U+=32}function ni(R,U,ee){var ae;for(ae=0;8>ae;++ae)a(U,ee+32*ae,R,8)}function Fa(R,U){var ee,ae=8;for(ee=0;8>ee;++ee)ae+=R[U+ee-32]+R[U-1+32*ee];ni(ae>>4,R,U)}function su(R,U){var ee,ae=4;for(ee=0;8>ee;++ee)ae+=R[U+ee-32];ni(ae>>3,R,U)}function Ti(R,U){var ee,ae=4;for(ee=0;8>ee;++ee)ae+=R[U-1+32*ee];ni(ae>>3,R,U)}function Da(R,U){ni(128,R,U)}function Ao(R,U,ee){var ae=R[U-ee],ce=R[U+0],he=3*(ce-ae)+jo[1020+R[U-2*ee]-R[U+ee]],pe=Sl[112+(he+4>>3)];R[U-ee]=mi[255+ae+Sl[112+(he+3>>3)]],R[U+0]=mi[255+ce-pe]}function Ps(R,U,ee,ae){var ce=R[U+0],he=R[U+ee];return Ga[255+R[U-2*ee]-R[U-ee]]>ae||Ga[255+he-ce]>ae}function gl(R,U,ee,ae){return 4*Ga[255+R[U-ee]-R[U+0]]+Ga[255+R[U-2*ee]-R[U+ee]]<=ae}function Uu(R,U,ee,ae,ce){var he=R[U-3*ee],pe=R[U-2*ee],be=R[U-ee],we=R[U+0],Ee=R[U+ee],Be=R[U+2*ee],Qe=R[U+3*ee];return 4*Ga[255+be-we]+Ga[255+pe-Ee]>ae?0:Ga[255+R[U-4*ee]-he]<=ce&&Ga[255+he-pe]<=ce&&Ga[255+pe-be]<=ce&&Ga[255+Qe-Be]<=ce&&Ga[255+Be-Ee]<=ce&&Ga[255+Ee-we]<=ce}function ii(R,U,ee,ae){var ce=2*ae+1;for(ae=0;16>ae;++ae)gl(R,U+ae,ee,ce)&&Ao(R,U+ae,ee)}function Ri(R,U,ee,ae){var ce=2*ae+1;for(ae=0;16>ae;++ae)gl(R,U+ae*ee,1,ce)&&Ao(R,U+ae*ee,1)}function Mi(R,U,ee,ae){var ce;for(ce=3;0<ce;--ce)ii(R,U+=4*ee,ee,ae)}function vl(R,U,ee,ae){var ce;for(ce=3;0<ce;--ce)Ri(R,U+=4,ee,ae)}function Sa(R,U,ee,ae,ce,he,pe,be){for(he=2*he+1;0<ce--;){if(Uu(R,U,ee,he,pe))if(Ps(R,U,ee,be))Ao(R,U,ee);else{var we=R,Ee=U,Be=ee,Qe=we[Ee-2*Be],$e=we[Ee-Be],We=we[Ee+0],wt=we[Ee+Be],lt=we[Ee+2*Be],je=27*(Ve=jo[1020+3*(We-$e)+jo[1020+Qe-wt]])+63>>7,He=18*Ve+63>>7,Ve=9*Ve+63>>7;we[Ee-3*Be]=mi[255+we[Ee-3*Be]+Ve],we[Ee-2*Be]=mi[255+Qe+He],we[Ee-Be]=mi[255+$e+je],we[Ee+0]=mi[255+We-je],we[Ee+Be]=mi[255+wt-He],we[Ee+2*Be]=mi[255+lt-Ve]}U+=ae}}function vn(R,U,ee,ae,ce,he,pe,be){for(he=2*he+1;0<ce--;){if(Uu(R,U,ee,he,pe))if(Ps(R,U,ee,be))Ao(R,U,ee);else{var we=R,Ee=U,Be=ee,Qe=we[Ee-Be],$e=we[Ee+0],We=we[Ee+Be],wt=Sl[112+((lt=3*($e-Qe))+4>>3)],lt=Sl[112+(lt+3>>3)],je=wt+1>>1;we[Ee-2*Be]=mi[255+we[Ee-2*Be]+je],we[Ee-Be]=mi[255+Qe+lt],we[Ee+0]=mi[255+$e-wt],we[Ee+Be]=mi[255+We-je]}U+=ae}}function Ii(R,U,ee,ae,ce,he){Sa(R,U,ee,1,16,ae,ce,he)}function mn(R,U,ee,ae,ce,he){Sa(R,U,1,ee,16,ae,ce,he)}function Qi(R,U,ee,ae,ce,he){var pe;for(pe=3;0<pe;--pe)vn(R,U+=4*ee,ee,1,16,ae,ce,he)}function Ji(R,U,ee,ae,ce,he){var pe;for(pe=3;0<pe;--pe)vn(R,U+=4,1,ee,16,ae,ce,he)}function Ba(R,U,ee,ae,ce,he,pe,be){Sa(R,U,ce,1,8,he,pe,be),Sa(ee,ae,ce,1,8,he,pe,be)}function lu(R,U,ee,ae,ce,he,pe,be){Sa(R,U,1,ce,8,he,pe,be),Sa(ee,ae,1,ce,8,he,pe,be)}function Os(R,U,ee,ae,ce,he,pe,be){vn(R,U+4*ce,ce,1,8,he,pe,be),vn(ee,ae+4*ce,ce,1,8,he,pe,be)}function Zs(R,U,ee,ae,ce,he,pe,be){vn(R,U+4,1,ce,8,he,pe,be),vn(ee,ae+4,1,ce,8,he,pe,be)}function Gn(){this.ba=new At,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Qt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function pi(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Zr(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Qs(){this.ua=0,this.Wa=new ye,this.vb=new ye,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new I,this.yc=new L}function qa(){this.xb=this.a=0,this.l=new $r,this.ca=new At,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Qs,this.ab=0,this.gc=o(4,Zr),this.Oc=0}function ml(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new $r,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Xo(R,U,ee,ae,ce,he,pe){for(R=R==null?0:R[U+0],U=0;U<pe;++U)ce[he+U]=R+ee[ae+U]&255,R=ce[he+U]}function yl(R,U,ee,ae,ce,he,pe){var be;if(R==null)Xo(null,null,ee,ae,ce,he,pe);else for(be=0;be<pe;++be)ce[he+be]=R[U+be]+ee[ae+be]&255}function Ko(R,U,ee,ae,ce,he,pe){if(R==null)Xo(null,null,ee,ae,ce,he,pe);else{var be,we=R[U+0],Ee=we,Be=we;for(be=0;be<pe;++be)Ee=Be+(we=R[U+be])-Ee,Be=ee[ae+be]+(-256&Ee?0>Ee?0:255:Ee)&255,Ee=we,ce[he+be]=Be}}function uu(R,U,ee,ae){var ce=U.width,he=U.o;if(r(R!=null&&U!=null),0>ee||0>=ae||ee+ae>he)return null;if(!R.Cc){if(R.ga==null){var pe;if(R.ga=new ml,(pe=R.ga==null)||(pe=U.width*U.o,r(R.Gb.length==0),R.Gb=i(pe),R.Uc=0,R.Gb==null?pe=0:(R.mb=R.Gb,R.nb=R.Uc,R.rc=null,pe=1),pe=!pe),!pe){pe=R.ga;var be=R.Fa,we=R.P,Ee=R.qc,Be=R.mb,Qe=R.nb,$e=we+1,We=Ee-1,wt=pe.l;if(r(be!=null&&Be!=null&&U!=null),Ui[0]=null,Ui[1]=Xo,Ui[2]=yl,Ui[3]=Ko,pe.ca=Be,pe.tb=Qe,pe.c=U.width,pe.i=U.height,r(0<pe.c&&0<pe.i),1>=Ee)U=0;else if(pe.$a=be[we+0]>>0&3,pe.Z=be[we+0]>>2&3,pe.Lc=be[we+0]>>4&3,we=be[we+0]>>6&3,0>pe.$a||1<pe.$a||4<=pe.Z||1<pe.Lc||we)U=0;else if(wt.put=Je,wt.ac=pt,wt.bc=_t,wt.ma=pe,wt.width=U.width,wt.height=U.height,wt.Da=U.Da,wt.v=U.v,wt.va=U.va,wt.j=U.j,wt.o=U.o,pe.$a)e:{r(pe.$a==1),U=bi();t:for(;;){if(U==null){U=0;break e}if(r(pe!=null),pe.mc=U,U.c=pe.c,U.i=pe.i,U.l=pe.l,U.l.ma=pe,U.l.width=pe.c,U.l.height=pe.i,U.a=0,Y(U.m,be,$e,We),!_a(pe.c,pe.i,1,U,null)||(U.ab==1&&U.gc[0].hc==3&&ti(U.s)?(pe.ic=1,be=U.c*U.i,U.Ta=null,U.Ua=0,U.V=i(be),U.Ba=0,U.V==null?(U.a=1,U=0):U=1):(pe.ic=0,U=ua(U,pe.c)),!U))break t;U=1;break e}pe.mc=null,U=0}else U=We>=pe.c*pe.i;pe=!U}if(pe)return null;R.ga.Lc!=1?R.Ga=0:ae=he-ee}r(R.ga!=null),r(ee+ae<=he);e:{if(U=(be=R.ga).c,he=be.l.o,be.$a==0){if($e=R.rc,We=R.Vc,wt=R.Fa,we=R.P+1+ee*U,Ee=R.mb,Be=R.nb+ee*U,r(we<=R.P+R.qc),be.Z!=0)for(r(Ui[be.Z]!=null),pe=0;pe<ae;++pe)Ui[be.Z]($e,We,wt,we,Ee,Be,U),$e=Ee,We=Be,Be+=U,we+=U;else for(pe=0;pe<ae;++pe)n(Ee,Be,wt,we,U),$e=Ee,We=Be,Be+=U,we+=U;R.rc=$e,R.Vc=We}else{if(r(be.mc!=null),U=ee+ae,r((pe=be.mc)!=null),r(U<=pe.i),pe.C>=U)U=1;else if(be.ic||et(),be.ic){be=pe.V,$e=pe.Ba,We=pe.c;var lt=pe.i,je=(wt=1,we=pe.$/We,Ee=pe.$%We,Be=pe.m,Qe=pe.s,pe.$),He=We*lt,Ve=We*U,ct=Qe.wc,gt=je<Ve?rr(Qe,Ee,we):null;r(je<=He),r(U<=lt),r(ti(Qe));t:for(;;){for(;!Be.h&&je<Ve;){if(Ee&ct||(gt=rr(Qe,Ee,we)),r(gt!=null),Z(Be),256>(lt=Wt(gt.G[0],gt.H[0],Be)))be[$e+je]=lt,++je,++Ee>=We&&(Ee=0,++we<=U&&!(we%16)&&Ci(pe,we));else{if(!(280>lt)){wt=0;break t}lt=Pt(lt-256,Be);var Bt,jt=Wt(gt.G[4],gt.H[4],Be);if(Z(Be),!(je>=(jt=Dt(We,jt=Pt(jt,Be)))&&He-je>=lt)){wt=0;break t}for(Bt=0;Bt<lt;++Bt)be[$e+je+Bt]=be[$e+je+Bt-jt];for(je+=lt,Ee+=lt;Ee>=We;)Ee-=We,++we<=U&&!(we%16)&&Ci(pe,we);je<Ve&&Ee&ct&&(gt=rr(Qe,Ee,we))}r(Be.h==$(Be))}Ci(pe,we>U?U:we);break t}!wt||Be.h&&je<He?(wt=0,pe.a=Be.h?5:3):pe.$=je,U=wt}else U=En(pe,pe.V,pe.Ba,pe.c,pe.i,U,ao);if(!U){ae=0;break e}}ee+ae>=he&&(R.Cc=1),ae=1}if(!ae)return null;if(R.Cc&&((ae=R.ga)!=null&&(ae.mc=null),R.ga=null,0<R.Ga))return alert("todo:WebPDequantizeLevels"),null}return R.nb+ee*ce}function X(R,U,ee,ae,ce,he){for(;0<ce--;){var pe,be=R,we=U+(ee?1:0),Ee=R,Be=U+(ee?0:3);for(pe=0;pe<ae;++pe){var Qe=Ee[Be+4*pe];Qe!=255&&(Qe*=32897,be[we+4*pe+0]=be[we+4*pe+0]*Qe>>23,be[we+4*pe+1]=be[we+4*pe+1]*Qe>>23,be[we+4*pe+2]=be[we+4*pe+2]*Qe>>23)}U+=he}}function fe(R,U,ee,ae,ce){for(;0<ae--;){var he;for(he=0;he<ee;++he){var pe=R[U+2*he+0],be=15&(Ee=R[U+2*he+1]),we=4369*be,Ee=(240&Ee|Ee>>4)*we>>16;R[U+2*he+0]=(240&pe|pe>>4)*we>>16&240|(15&pe|pe<<4)*we>>16>>4&15,R[U+2*he+1]=240&Ee|be}U+=ce}}function Ce(R,U,ee,ae,ce,he,pe,be){var we,Ee,Be=255;for(Ee=0;Ee<ce;++Ee){for(we=0;we<ae;++we){var Qe=R[U+we];he[pe+4*we]=Qe,Be&=Qe}U+=ee,pe+=be}return Be!=255}function De(R,U,ee,ae,ce){var he;for(he=0;he<ce;++he)ee[ae+he]=R[U+he]>>8}function et(){_i=X,Jr=fe,Gr=Ce,Mn=De}function ft(R,U,ee){T[R]=function(ae,ce,he,pe,be,we,Ee,Be,Qe,$e,We,wt,lt,je,He,Ve,ct){var gt,Bt=ct-1>>1,jt=be[we+0]|Ee[Be+0]<<16,ir=Qe[$e+0]|We[wt+0]<<16;r(ae!=null);var Rt=3*jt+ir+131074>>2;for(U(ae[ce+0],255&Rt,Rt>>16,lt,je),he!=null&&(Rt=3*ir+jt+131074>>2,U(he[pe+0],255&Rt,Rt>>16,He,Ve)),gt=1;gt<=Bt;++gt){var Mr=be[we+gt]|Ee[Be+gt]<<16,Fr=Qe[$e+gt]|We[wt+gt]<<16,Lr=jt+Mr+ir+Fr+524296,yr=Lr+2*(Mr+ir)>>3;Rt=yr+jt>>1,jt=(Lr=Lr+2*(jt+Fr)>>3)+Mr>>1,U(ae[ce+2*gt-1],255&Rt,Rt>>16,lt,je+(2*gt-1)*ee),U(ae[ce+2*gt-0],255&jt,jt>>16,lt,je+(2*gt-0)*ee),he!=null&&(Rt=Lr+ir>>1,jt=yr+Fr>>1,U(he[pe+2*gt-1],255&Rt,Rt>>16,He,Ve+(2*gt-1)*ee),U(he[pe+2*gt+0],255&jt,jt>>16,He,Ve+(2*gt+0)*ee)),jt=Mr,ir=Fr}1&ct||(Rt=3*jt+ir+131074>>2,U(ae[ce+ct-1],255&Rt,Rt>>16,lt,je+(ct-1)*ee),he!=null&&(Rt=3*ir+jt+131074>>2,U(he[pe+ct-1],255&Rt,Rt>>16,He,Ve+(ct-1)*ee)))}}function St(){ha[xl]=Hf,ha[Fo]=Ls,ha[sf]=Vf,ha[El]=vu,ha[fu]=si,ha[on]=yi,ha[Vu]=Sc,ha[Pl]=Ls,ha[Cs]=vu,ha[hu]=si,ha[du]=yi}function Ft(R){return R&-16384?0>R?0:255:R>>ns}function nr(R,U){return Ft((19077*R>>8)+(26149*U>>8)-14234)}function gr(R,U,ee){return Ft((19077*R>>8)-(6419*U>>8)-(13320*ee>>8)+8708)}function dr(R,U){return Ft((19077*R>>8)+(33050*U>>8)-17685)}function Sr(R,U,ee,ae,ce){ae[ce+0]=nr(R,ee),ae[ce+1]=gr(R,U,ee),ae[ce+2]=dr(R,U)}function Pn(R,U,ee,ae,ce){ae[ce+0]=dr(R,U),ae[ce+1]=gr(R,U,ee),ae[ce+2]=nr(R,ee)}function yn(R,U,ee,ae,ce){var he=gr(R,U,ee);U=he<<3&224|dr(R,U)>>3,ae[ce+0]=248&nr(R,ee)|he>>5,ae[ce+1]=U}function Rn(R,U,ee,ae,ce){var he=240&dr(R,U)|15;ae[ce+0]=240&nr(R,ee)|gr(R,U,ee)>>4,ae[ce+1]=he}function Kn(R,U,ee,ae,ce){ae[ce+0]=255,Sr(R,U,ee,ae,ce+1)}function ai(R,U,ee,ae,ce){Pn(R,U,ee,ae,ce),ae[ce+3]=255}function za(R,U,ee,ae,ce){Sr(R,U,ee,ae,ce),ae[ce+3]=255}function xa(R,U){return 0>R?0:R>U?U:R}function Ea(R,U,ee){T[R]=function(ae,ce,he,pe,be,we,Ee,Be,Qe){for(var $e=Be+(-2&Qe)*ee;Be!=$e;)U(ae[ce+0],he[pe+0],be[we+0],Ee,Be),U(ae[ce+1],he[pe+0],be[we+0],Ee,Be+ee),ce+=2,++pe,++we,Be+=2*ee;1&Qe&&U(ae[ce+0],he[pe+0],be[we+0],Ee,Be)}}function Zo(R,U,ee){return ee==0?R==0?U==0?6:5:U==0?4:0:ee}function Qo(R,U,ee,ae,ce){switch(R>>>30){case 3:ko(U,ee,ae,ce,0);break;case 2:Rr(U,ee,ae,ce);break;case 1:Wn(U,ee,ae,ce)}}function ji(R,U){var ee,ae,ce=U.M,he=U.Nb,pe=R.oc,be=R.pc+40,we=R.oc,Ee=R.pc+584,Be=R.oc,Qe=R.pc+600;for(ee=0;16>ee;++ee)pe[be+32*ee-1]=129;for(ee=0;8>ee;++ee)we[Ee+32*ee-1]=129,Be[Qe+32*ee-1]=129;for(0<ce?pe[be-1-32]=we[Ee-1-32]=Be[Qe-1-32]=129:(a(pe,be-32-1,127,21),a(we,Ee-32-1,127,9),a(Be,Qe-32-1,127,9)),ae=0;ae<R.za;++ae){var $e=U.ya[U.aa+ae];if(0<ae){for(ee=-1;16>ee;++ee)n(pe,be+32*ee-4,pe,be+32*ee+12,4);for(ee=-1;8>ee;++ee)n(we,Ee+32*ee-4,we,Ee+32*ee+4,4),n(Be,Qe+32*ee-4,Be,Qe+32*ee+4,4)}var We=R.Gd,wt=R.Hd+ae,lt=$e.ad,je=$e.Hc;if(0<ce&&(n(pe,be-32,We[wt].y,0,16),n(we,Ee-32,We[wt].f,0,8),n(Be,Qe-32,We[wt].ea,0,8)),$e.Za){var He=pe,Ve=be-32+16;for(0<ce&&(ae>=R.za-1?a(He,Ve,We[wt].y[15],4):n(He,Ve,We[wt+1].y,0,4)),ee=0;4>ee;ee++)He[Ve+128+ee]=He[Ve+256+ee]=He[Ve+384+ee]=He[Ve+0+ee];for(ee=0;16>ee;++ee,je<<=2)He=pe,Ve=be+Yu[ee],zi[$e.Ob[ee]](He,Ve),Qo(je,lt,16*+ee,He,Ve)}else if(He=Zo(ae,ce,$e.Ob[0]),qi[He](pe,be),je!=0)for(ee=0;16>ee;++ee,je<<=2)Qo(je,lt,16*+ee,pe,be+Yu[ee]);for(ee=$e.Gc,He=Zo(ae,ce,$e.Dd),ta[He](we,Ee),ta[He](Be,Qe),je=lt,He=we,Ve=Ee,255&($e=ee>>0)&&(170&$e?Lo(je,256,He,Ve):kr(je,256,He,Ve)),$e=Be,je=Qe,255&(ee>>=8)&&(170&ee?Lo(lt,320,$e,je):kr(lt,320,$e,je)),ce<R.Ub-1&&(n(We[wt].y,0,pe,be+480,16),n(We[wt].f,0,we,Ee+224,8),n(We[wt].ea,0,Be,Qe+224,8)),ee=8*he*R.B,We=R.sa,wt=R.ta+16*ae+16*he*R.R,lt=R.qa,$e=R.ra+8*ae+ee,je=R.Ha,He=R.Ia+8*ae+ee,ee=0;16>ee;++ee)n(We,wt+ee*R.R,pe,be+32*ee,16);for(ee=0;8>ee;++ee)n(lt,$e+ee*R.B,we,Ee+32*ee,8),n(je,He+ee*R.B,Be,Qe+32*ee,8)}}function Ua(R,U,ee,ae,ce,he,pe,be,we){var Ee=[0],Be=[0],Qe=0,$e=we!=null?we.kd:0,We=we??new pi;if(R==null||12>ee)return 7;We.data=R,We.w=U,We.ha=ee,U=[U],ee=[ee],We.gb=[We.gb];e:{var wt=U,lt=ee,je=We.gb;if(r(R!=null),r(lt!=null),r(je!=null),je[0]=0,12<=lt[0]&&!t(R,wt[0],"RIFF")){if(t(R,wt[0]+8,"WEBP")){je=3;break e}var He=ke(R,wt[0]+4);if(12>He||4294967286<He){je=3;break e}if($e&&He>lt[0]-8){je=7;break e}je[0]=He,wt[0]+=12,lt[0]-=12}je=0}if(je!=0)return je;for(He=0<We.gb[0],ee=ee[0];;){e:{var Ve=R;lt=U,je=ee;var ct=Ee,gt=Be,Bt=wt=[0];if((Rt=Qe=[Qe])[0]=0,8>je[0])je=7;else{if(!t(Ve,lt[0],"VP8X")){if(ke(Ve,lt[0]+4)!=10){je=3;break e}if(18>je[0]){je=7;break e}var jt=ke(Ve,lt[0]+8),ir=1+Pe(Ve,lt[0]+12);if(2147483648<=ir*(Ve=1+Pe(Ve,lt[0]+15))){je=3;break e}Bt!=null&&(Bt[0]=jt),ct!=null&&(ct[0]=ir),gt!=null&&(gt[0]=Ve),lt[0]+=18,je[0]-=18,Rt[0]=1}je=0}}if(Qe=Qe[0],wt=wt[0],je!=0)return je;if(lt=!!(2&wt),!He&&Qe)return 3;if(he!=null&&(he[0]=!!(16&wt)),pe!=null&&(pe[0]=lt),be!=null&&(be[0]=0),pe=Ee[0],wt=Be[0],Qe&<&&we==null){je=0;break}if(4>ee){je=7;break}if(He&&Qe||!He&&!Qe&&!t(R,U[0],"ALPH")){ee=[ee],We.na=[We.na],We.P=[We.P],We.Sa=[We.Sa];e:{jt=R,je=U,He=ee;var Rt=We.gb;ct=We.na,gt=We.P,Bt=We.Sa,ir=22,r(jt!=null),r(He!=null),Ve=je[0];var Mr=He[0];for(r(ct!=null),r(Bt!=null),ct[0]=null,gt[0]=null,Bt[0]=0;;){if(je[0]=Ve,He[0]=Mr,8>Mr){je=7;break e}var Fr=ke(jt,Ve+4);if(4294967286<Fr){je=3;break e}var Lr=8+Fr+1&-2;if(ir+=Lr,0<Rt&&ir>Rt){je=3;break e}if(!t(jt,Ve,"VP8 ")||!t(jt,Ve,"VP8L")){je=0;break e}if(Mr[0]<Lr){je=7;break e}t(jt,Ve,"ALPH")||(ct[0]=jt,gt[0]=Ve+8,Bt[0]=Fr),Ve+=Lr,Mr-=Lr}}if(ee=ee[0],We.na=We.na[0],We.P=We.P[0],We.Sa=We.Sa[0],je!=0)break}ee=[ee],We.Ja=[We.Ja],We.xa=[We.xa];e:if(Rt=R,je=U,He=ee,ct=We.gb[0],gt=We.Ja,Bt=We.xa,jt=je[0],Ve=!t(Rt,jt,"VP8 "),ir=!t(Rt,jt,"VP8L"),r(Rt!=null),r(He!=null),r(gt!=null),r(Bt!=null),8>He[0])je=7;else{if(Ve||ir){if(Rt=ke(Rt,jt+4),12<=ct&&Rt>ct-12){je=3;break e}if($e&&Rt>He[0]-8){je=7;break e}gt[0]=Rt,je[0]+=8,He[0]-=8,Bt[0]=ir}else Bt[0]=5<=He[0]&&Rt[jt+0]==47&&!(Rt[jt+4]>>5),gt[0]=He[0];je=0}if(ee=ee[0],We.Ja=We.Ja[0],We.xa=We.xa[0],U=U[0],je!=0)break;if(4294967286<We.Ja)return 3;if(be==null||lt||(be[0]=We.xa?2:1),pe=[pe],wt=[wt],We.xa){if(5>ee){je=7;break}be=pe,$e=wt,lt=he,R==null||5>ee?R=0:5<=ee&&R[U+0]==47&&!(R[U+4]>>5)?(He=[0],Rt=[0],ct=[0],Y(gt=new q,R,U,ee),Ye(gt,He,Rt,ct)?(be!=null&&(be[0]=He[0]),$e!=null&&($e[0]=Rt[0]),lt!=null&&(lt[0]=ct[0]),R=1):R=0):R=0}else{if(10>ee){je=7;break}be=wt,R==null||10>ee||!di(R,U+3,ee-3)?R=0:($e=R[U+0]|R[U+1]<<8|R[U+2]<<16,lt=16383&(R[U+7]<<8|R[U+6]),R=16383&(R[U+9]<<8|R[U+8]),1&$e||3<($e>>1&7)||!($e>>4&1)||$e>>5>=We.Ja||!lt||!R?R=0:(pe&&(pe[0]=lt),be&&(be[0]=R),R=1))}if(!R||(pe=pe[0],wt=wt[0],Qe&&(Ee[0]!=pe||Be[0]!=wt)))return 3;we!=null&&(we[0]=We,we.offset=U-we.w,r(4294967286>U-we.w),r(we.offset==we.ha-ee));break}return je==0||je==7&&Qe&&we==null?(he!=null&&(he[0]|=We.na!=null&&0<We.na.length),ae!=null&&(ae[0]=pe),ce!=null&&(ce[0]=wt),0):je}function Js(R,U,ee){var ae=U.width,ce=U.height,he=0,pe=0,be=ae,we=ce;if(U.Da=R!=null&&0<R.Da,U.Da&&(be=R.cd,we=R.bd,he=R.v,pe=R.j,11>ee||(he&=-2,pe&=-2),0>he||0>pe||0>=be||0>=we||he+be>ae||pe+we>ce))return 0;if(U.v=he,U.j=pe,U.va=he+be,U.o=pe+we,U.U=be,U.T=we,U.da=R!=null&&0<R.da,U.da){if(!Ie(be,we,ee=[R.ib],he=[R.hb]))return 0;U.ib=ee[0],U.hb=he[0]}return U.ob=R!=null&&R.ob,U.Kb=R==null||!R.Sd,U.da&&(U.ob=U.ib<3*ae/4&&U.hb<3*ce/4,U.Kb=0),1}function bl(R){if(R==null)return 2;if(11>R.S){var U=R.f.RGBA;U.fb+=(R.height-1)*U.A,U.A=-U.A}else U=R.f.kb,R=R.height,U.O+=(R-1)*U.fa,U.fa=-U.fa,U.N+=(R-1>>1)*U.Ab,U.Ab=-U.Ab,U.W+=(R-1>>1)*U.Db,U.Db=-U.Db,U.F!=null&&(U.J+=(R-1)*U.lb,U.lb=-U.lb);return 0}function ea(R,U,ee,ae){if(ae==null||0>=R||0>=U)return 2;if(ee!=null){if(ee.Da){var ce=ee.cd,he=ee.bd,pe=-2&ee.v,be=-2&ee.j;if(0>pe||0>be||0>=ce||0>=he||pe+ce>R||be+he>U)return 2;R=ce,U=he}if(ee.da){if(!Ie(R,U,ce=[ee.ib],he=[ee.hb]))return 2;R=ce[0],U=he[0]}}ae.width=R,ae.height=U;e:{var we=ae.width,Ee=ae.height;if(R=ae.S,0>=we||0>=Ee||!(R>=xl&&13>R))R=2;else{if(0>=ae.Rd&&ae.sd==null){pe=he=ce=U=0;var Be=(be=we*Cl[R])*Ee;if(11>R||(he=(Ee+1)/2*(U=(we+1)/2),R==12&&(pe=(ce=we)*Ee)),(Ee=i(Be+2*he+pe))==null){R=1;break e}ae.sd=Ee,11>R?((we=ae.f.RGBA).eb=Ee,we.fb=0,we.A=be,we.size=Be):((we=ae.f.kb).y=Ee,we.O=0,we.fa=be,we.Fd=Be,we.f=Ee,we.N=0+Be,we.Ab=U,we.Cd=he,we.ea=Ee,we.W=0+Be+he,we.Db=U,we.Ed=he,R==12&&(we.F=Ee,we.J=0+Be+2*he),we.Tc=pe,we.lb=ce)}if(U=1,ce=ae.S,he=ae.width,pe=ae.height,ce>=xl&&13>ce)if(11>ce)R=ae.f.RGBA,U&=(be=Math.abs(R.A))*(pe-1)+he<=R.size,U&=be>=he*Cl[ce],U&=R.eb!=null;else{R=ae.f.kb,be=(he+1)/2,Be=(pe+1)/2,we=Math.abs(R.fa),Ee=Math.abs(R.Ab);var Qe=Math.abs(R.Db),$e=Math.abs(R.lb),We=$e*(pe-1)+he;U&=we*(pe-1)+he<=R.Fd,U&=Ee*(Be-1)+be<=R.Cd,U=(U&=Qe*(Be-1)+be<=R.Ed)&we>=he&Ee>=be&Qe>=be,U&=R.y!=null,U&=R.f!=null,U&=R.ea!=null,ce==12&&(U&=$e>=he,U&=We<=R.Tc,U&=R.F!=null)}else U=0;R=U?0:2}}return R!=0||ee!=null&&ee.fd&&(R=bl(ae)),R}var Qr=64,el=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],wl=24,Pa=32,Ha=8,wi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ae("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(R){return R},T.Predictor2=function(R,U,ee){return U[ee+0]},T.Predictor3=function(R,U,ee){return U[ee+1]},T.Predictor4=function(R,U,ee){return U[ee-1]},T.Predictor5=function(R,U,ee){return ge(ge(R,U[ee+1]),U[ee+0])},T.Predictor6=function(R,U,ee){return ge(R,U[ee-1])},T.Predictor7=function(R,U,ee){return ge(R,U[ee+0])},T.Predictor8=function(R,U,ee){return ge(U[ee-1],U[ee+0])},T.Predictor9=function(R,U,ee){return ge(U[ee+0],U[ee+1])},T.Predictor10=function(R,U,ee){return ge(ge(R,U[ee-1]),ge(U[ee+0],U[ee+1]))},T.Predictor11=function(R,U,ee){var ae=U[ee+0];return 0>=Ke(ae>>24&255,R>>24&255,(U=U[ee-1])>>24&255)+Ke(ae>>16&255,R>>16&255,U>>16&255)+Ke(ae>>8&255,R>>8&255,U>>8&255)+Ke(255&ae,255&R,255&U)?ae:R},T.Predictor12=function(R,U,ee){var ae=U[ee+0];return(Te((R>>24&255)+(ae>>24&255)-((U=U[ee-1])>>24&255))<<24|Te((R>>16&255)+(ae>>16&255)-(U>>16&255))<<16|Te((R>>8&255)+(ae>>8&255)-(U>>8&255))<<8|Te((255&R)+(255&ae)-(255&U)))>>>0},T.Predictor13=function(R,U,ee){var ae=U[ee-1];return(Fe((R=ge(R,U[ee+0]))>>24&255,ae>>24&255)<<24|Fe(R>>16&255,ae>>16&255)<<16|Fe(R>>8&255,ae>>8&255)<<8|Fe(R>>0&255,ae>>0&255))>>>0};var tl=T.PredictorAdd0;T.PredictorAdd1=it,Ae("Predictor2","PredictorAdd2"),Ae("Predictor3","PredictorAdd3"),Ae("Predictor4","PredictorAdd4"),Ae("Predictor5","PredictorAdd5"),Ae("Predictor6","PredictorAdd6"),Ae("Predictor7","PredictorAdd7"),Ae("Predictor8","PredictorAdd8"),Ae("Predictor9","PredictorAdd9"),Ae("Predictor10","PredictorAdd10"),Ae("Predictor11","PredictorAdd11"),Ae("Predictor12","PredictorAdd12"),Ae("Predictor13","PredictorAdd13");var co=T.PredictorAdd2;yt("ColorIndexInverseTransform","MapARGB","32b",function(R){return R>>8&255},function(R){return R}),yt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(R){return R},function(R){return R>>8&255});var Hu,gi=T.ColorIndexInverseTransform,Fi=T.MapARGB,As=T.VP8LColorIndexInverseTransformAlpha,Co=T.MapAlpha,vi=T.VP8LPredictorsAdd=[];vi.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Jo,oi,Di,es,Vr,fo,rl,ko,Rr,Lo,Wn,kr,bn,$n,ts,No,To,Va,On,ho,Ro,Mo,Bi,an,_i,Jr,Gr,Mn,Zn=i(511),Io=i(2041),_l=i(225),nl=i(767),cu=0,jo=Io,Sl=_l,mi=nl,Ga=Zn,xl=0,Fo=1,sf=2,El=3,fu=4,on=5,Vu=6,Pl=7,Cs=8,hu=9,du=10,pu=[2,3,7],bc=[3,3,11],il=[280,256,256,256,40],Bf=[0,1,1,1,0],qh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],qf=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],lf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Gu=8,ks=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Wu=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Ol=null,uf=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Wa=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],wc=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],$u=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],zf=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Uf=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],_c=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],qi=[],zi=[],ta=[],po=1,gu=2,Ui=[],ha=[];ft("UpsampleRgbLinePair",Sr,3),ft("UpsampleBgrLinePair",Pn,3),ft("UpsampleRgbaLinePair",za,4),ft("UpsampleBgraLinePair",ai,4),ft("UpsampleArgbLinePair",Kn,4),ft("UpsampleRgba4444LinePair",Rn,2),ft("UpsampleRgb565LinePair",yn,2);var Hf=T.UpsampleRgbLinePair,Vf=T.UpsampleBgrLinePair,Ls=T.UpsampleRgbaLinePair,vu=T.UpsampleBgraLinePair,si=T.UpsampleArgbLinePair,yi=T.UpsampleRgba4444LinePair,Sc=T.UpsampleRgb565LinePair,rs=16,go=1<<rs-1,Yr=-227,en=482,ns=6,Si=0,ra=i(256),al=i(256),Al=i(256),na=i(256),mu=i(en-Yr),cf=i(en-Yr);Ea("YuvToRgbRow",Sr,3),Ea("YuvToBgrRow",Pn,3),Ea("YuvToRgbaRow",za,4),Ea("YuvToBgraRow",ai,4),Ea("YuvToArgbRow",Kn,4),Ea("YuvToRgba4444Row",Rn,2),Ea("YuvToRgb565Row",yn,2);var Yu=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],is=[0,2,8],Gf=[8,7,6,4,4,2,2,2,1,1,1,1],as=1;this.WebPDecodeRGBA=function(R,U,ee,ae,ce){var he=Fo,pe=new Gn,be=new At;pe.ba=be,be.S=he,be.width=[be.width],be.height=[be.height];var we=be.width,Ee=be.height,Be=new fr;if(Be==null||R==null)var Qe=2;else r(Be!=null),Qe=Ua(R,U,ee,Be.width,Be.height,Be.Pd,Be.Qd,Be.format,null);if(Qe!=0?we=0:(we!=null&&(we[0]=Be.width[0]),Ee!=null&&(Ee[0]=Be.height[0]),we=1),we){be.width=be.width[0],be.height=be.height[0],ae!=null&&(ae[0]=be.width),ce!=null&&(ce[0]=be.height);e:{if(ae=new $r,(ce=new pi).data=R,ce.w=U,ce.ha=ee,ce.kd=1,U=[0],r(ce!=null),((R=Ua(ce.data,ce.w,ce.ha,null,null,null,U,null,ce))==0||R==7)&&U[0]&&(R=4),(U=R)==0){if(r(pe!=null),ae.data=ce.data,ae.w=ce.w+ce.offset,ae.ha=ce.ha-ce.offset,ae.put=Je,ae.ac=pt,ae.bc=_t,ae.ma=pe,ce.xa){if((R=bi())==null){pe=1;break e}if(function($e,We){var wt=[0],lt=[0],je=[0];t:for(;;){if($e==null)return 0;if(We==null)return $e.a=2,0;if($e.l=We,$e.a=0,Y($e.m,We.data,We.w,We.ha),!Ye($e.m,wt,lt,je)){$e.a=3;break t}if($e.xb=gu,We.width=wt[0],We.height=lt[0],!_a(wt[0],lt[0],1,$e,null))break t;return 1}return r($e.a!=0),0}(R,ae)){if(ae=(U=ea(ae.width,ae.height,pe.Oa,pe.ba))==0){t:{ae=R;r:for(;;){if(ae==null){ae=0;break t}if(r(ae.s.yc!=null),r(ae.s.Ya!=null),r(0<ae.s.Wb),r((ee=ae.l)!=null),r((ce=ee.ma)!=null),ae.xb!=0){if(ae.ca=ce.ba,ae.tb=ce.tb,r(ae.ca!=null),!Js(ce.Oa,ee,El)){ae.a=2;break r}if(!ua(ae,ee.width)||ee.da)break r;if((ee.da||mt(ae.ca.S))&&et(),11>ae.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),ae.ca.f.kb.F!=null&&et()),ae.Pb&&0<ae.s.ua&&ae.s.vb.X==null&&!Ne(ae.s.vb,ae.s.Wa.Xa)){ae.a=1;break r}ae.xb=0}if(!En(ae,ae.V,ae.Ba,ae.c,ae.i,ee.o,Hn))break r;ce.Dc=ae.Ma,ae=1;break t}r(ae.a!=0),ae=0}ae=!ae}ae&&(U=R.a)}else U=R.a}else{if((R=new Ar)==null){pe=1;break e}if(R.Fa=ce.na,R.P=ce.P,R.qc=ce.Sa,Li(R,ae)){if((U=ea(ae.width,ae.height,pe.Oa,pe.ba))==0){if(R.Aa=0,ee=pe.Oa,r((ce=R)!=null),ee!=null){if(0<(we=0>(we=ee.Md)?0:100<we?255:255*we/100)){for(Ee=Be=0;4>Ee;++Ee)12>(Qe=ce.pb[Ee]).lc&&(Qe.ia=we*Gf[0>Qe.lc?0:Qe.lc]>>3),Be|=Qe.ia;Be&&(alert("todo:VP8InitRandom"),ce.ia=1)}ce.Ga=ee.Id,100<ce.Ga?ce.Ga=100:0>ce.Ga&&(ce.Ga=0)}ri(R,ae)||(U=R.a)}}else U=R.a}U==0&&pe.Oa!=null&&pe.Oa.fd&&(U=bl(pe.ba))}pe=U}he=pe!=0?null:11>he?be.f.RGBA.eb:be.f.kb.y}else he=null;return he};var Cl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(T,F){for(var C="",A=0;A<4;A++)C+=String.fromCharCode(T[F++]);return C}function d(T,F){return(T[F+0]<<0|T[F+1]<<8|T[F+2]<<16)>>>0}function p(T,F){return(T[F+0]<<0|T[F+1]<<8|T[F+2]<<16|T[F+3]<<24)>>>0}new c;var y=[0],f=[0],_=[],S=new c,w=e,b=function(T,F){var C={},A=0,L=!1,O=0,I=0;if(C.frames=[],!function(D,$,ne,Z){for(var Q=0;Q<Z;Q++)if(D[$+Q]!=ne.charCodeAt(Q))return!0;return!1}(T,F,"RIFF",4)){for(p(T,F+=4),F+=8;F<T.length;){var M=u(T,F),G=p(T,F+=4);F+=4;var W=G+(1&G);switch(M){case"VP8 ":case"VP8L":C.frames[A]===void 0&&(C.frames[A]={}),(V=C.frames[A]).src_off=L?I:F-8,V.src_size=O+G+8,A++,L&&(L=!1,O=0,I=0);break;case"VP8X":(V=C.header={}).feature_flags=T[F];var Y=F+4;V.canvas_width=1+d(T,Y),Y+=3,V.canvas_height=1+d(T,Y),Y+=3;break;case"ALPH":L=!0,O=W+8,I=F-8;break;case"ANIM":(V=C.header).bgcolor=p(T,F),Y=F+4,V.loop_count=(H=T)[(q=Y)+0]<<0|H[q+1]<<8,Y+=2;break;case"ANMF":var te,V;(V=C.frames[A]={}).offset_x=2*d(T,F),F+=3,V.offset_y=2*d(T,F),F+=3,V.width=1+d(T,F),F+=3,V.height=1+d(T,F),F+=3,V.duration=d(T,F),F+=3,te=T[F++],V.dispose=1&te,V.blend=te>>1&1}M!="ANMF"&&(F+=W)}var H,q;return C}}(w,0);b.response=w,b.rgbaoutput=!0,b.dataurl=!1;var g=b.header?b.header:null,v=b.frames?b.frames:null;if(g){g.loop_counter=g.loop_count,y=[g.canvas_height],f=[g.canvas_width];for(var E=0;E<v.length&&v[E].blend!=0;E++);}var x=v[0],j=S.WebPDecodeRGBA(w,x.src_off,x.src_size,f,y);x.rgba=j,x.imgwidth=f[0],x.imgheight=y[0];for(var N=0;N<f[0]*y[0]*4;N++)_[N]=j[N];return this.width=f,this.height=y,this.data=_,this}(function(e){var r=function(){return typeof L2=="function"},t=function(y,f,_,S){var w=4,b=o;switch(S){case e.image_compression.FAST:w=1,b=i;break;case e.image_compression.MEDIUM:w=6,b=s;break;case e.image_compression.SLOW:w=9,b=c}y=n(y,f,_,b);var g=L2(y,{level:w});return e.__addimage__.arrayBufferToBinaryString(g)},n=function(y,f,_,S){for(var w,b,g,v=y.length/f,E=new Uint8Array(y.length+v),x=d(),j=0;j<v;j+=1){if(g=j*f,w=y.subarray(g,g+f),S)E.set(S(w,_,b),g+j);else{for(var N,T=x.length,F=[];N<T;N+=1)F[N]=x[N](w,_,b);var C=p(F.concat());E.set(F[C],g+j)}b=w}return E},a=function(y){var f=Array.apply([],y);return f.unshift(0),f},i=function(y,f){var _,S=[],w=y.length;S[0]=1;for(var b=0;b<w;b+=1)_=y[b-f]||0,S[b+1]=y[b]-_+256&255;return S},o=function(y,f,_){var S,w=[],b=y.length;w[0]=2;for(var g=0;g<b;g+=1)S=_&&_[g]||0,w[g+1]=y[g]-S+256&255;return w},s=function(y,f,_){var S,w,b=[],g=y.length;b[0]=3;for(var v=0;v<g;v+=1)S=y[v-f]||0,w=_&&_[v]||0,b[v+1]=y[v]+256-(S+w>>>1)&255;return b},c=function(y,f,_){var S,w,b,g,v=[],E=y.length;v[0]=4;for(var x=0;x<E;x+=1)S=y[x-f]||0,w=_&&_[x]||0,b=_&&_[x-f]||0,g=u(S,w,b),v[x+1]=y[x]-g+256&255;return v},u=function(y,f,_){if(y===f&&f===_)return y;var S=Math.abs(f-_),w=Math.abs(y-_),b=Math.abs(y+f-_-_);return S<=w&&S<=b?y:w<=b?f:_},d=function(){return[a,i,o,s,c]},p=function(y){var f=y.map(function(_){return _.reduce(function(S,w){return S+Math.abs(w)},0)});return f.indexOf(Math.min.apply(null,f))};e.processPNG=function(y,f,_,S){var w,b,g,v,E,x,j,N,T,F,C,A,L,O,I,M=this.decode.FLATE_DECODE,G="";if(this.__addimage__.isArrayBuffer(y)&&(y=new Uint8Array(y)),this.__addimage__.isArrayBufferView(y)){if(y=(g=new Zk(y)).imgData,b=g.bits,w=g.colorSpace,E=g.colors,[4,6].indexOf(g.colorType)!==-1){if(g.bits===8){T=(N=g.pixelBitlength==32?new Uint32Array(g.decodePixels().buffer):g.pixelBitlength==16?new Uint16Array(g.decodePixels().buffer):new Uint8Array(g.decodePixels().buffer)).length,C=new Uint8Array(T*g.colors),F=new Uint8Array(T);var W,Y=g.pixelBitlength-g.bits;for(O=0,I=0;O<T;O++){for(L=N[O],W=0;W<Y;)C[I++]=L>>>W&255,W+=g.bits;F[O]=L>>>W&255}}if(g.bits===16){T=(N=new Uint32Array(g.decodePixels().buffer)).length,C=new Uint8Array(T*(32/g.pixelBitlength)*g.colors),F=new Uint8Array(T*(32/g.pixelBitlength)),A=g.colors>1,O=0,I=0;for(var te=0;O<T;)L=N[O++],C[I++]=L>>>0&255,A&&(C[I++]=L>>>16&255,L=N[O++],C[I++]=L>>>0&255),F[te++]=L>>>16&255;b=8}S!==e.image_compression.NONE&&r()?(y=t(C,g.width*g.colors,g.colors,S),j=t(F,g.width,1,S)):(y=C,j=F,M=void 0)}if(g.colorType===3&&(w=this.color_spaces.INDEXED,x=g.palette,g.transparency.indexed)){var V=g.transparency.indexed,H=0;for(O=0,T=V.length;O<T;++O)H+=V[O];if((H/=255)===T-1&&V.indexOf(0)!==-1)v=[V.indexOf(0)];else if(H!==T){for(N=g.decodePixels(),F=new Uint8Array(N.length),O=0,T=N.length;O<T;O++)F[O]=V[N[O]];j=t(F,g.width,1)}}var q=function(D){var $;switch(D){case e.image_compression.FAST:$=11;break;case e.image_compression.MEDIUM:$=13;break;case e.image_compression.SLOW:$=14;break;default:$=12}return $}(S);return M===this.decode.FLATE_DECODE&&(G="/Predictor "+q+" "),G+="/Colors "+E+" /BitsPerComponent "+b+" /Columns "+g.width,(this.__addimage__.isArrayBuffer(y)||this.__addimage__.isArrayBufferView(y))&&(y=this.__addimage__.arrayBufferToBinaryString(y)),(j&&this.__addimage__.isArrayBuffer(j)||this.__addimage__.isArrayBufferView(j))&&(j=this.__addimage__.arrayBufferToBinaryString(j)),{alias:_,data:y,index:f,filter:M,decodeParameters:G,transparency:v,palette:x,sMask:j,predictor:q,width:g.width,height:g.height,bitsPerComponent:b,colorSpace:w}}}})(hr.API),function(e){e.processGIF89A=function(r,t,n,a){var i=new Qk(r),o=i.width,s=i.height,c=[];i.decodeAndBlitFrameRGBA(0,c);var u={data:c,width:o,height:s},d=new u2(100).encode(u,100);return e.processJPEG.call(this,d,t,n,a)},e.processGIF87A=e.processGIF89A}(hr.API),Hl.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var r=0;r<e;r++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[r]={red:a,green:n,blue:t,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Hl.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,r=this.width*this.height*4;this.data=new Uint8Array(r),this[e]()}catch(t){Un.log("bit decode error:"+t)}},Hl.prototype.bit1=function(){var e,r=Math.ceil(this.width/8),t=r%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<r;a++)for(var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*a*4,s=0;s<8&&8*a+s<this.width;s++){var c=this.palette[i>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}t!==0&&(this.pos+=4-t)}},Hl.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),r=e%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<e;a++){var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*a*4,s=i>>4,c=15&i,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*a+1>=this.width)break;u=this.palette[c],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}r!==0&&(this.pos+=4-r)}},Hl.prototype.bit8=function(){for(var e=this.width%4,r=this.height-1;r>=0;r--){for(var t=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),i=t*this.width*4+4*n;if(a<this.palette.length){var o=this.palette[a];this.data[i]=o.red,this.data[i+1]=o.green,this.data[i+2]=o.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}e!==0&&(this.pos+=4-e)}},Hl.prototype.bit15=function(){for(var e=this.width%3,r=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(i&r)/r*255|0,s=(i>>5&r)/r*255|0,c=(i>>10&r)/r*255|0,u=i>>15?255:0,d=n*this.width*4+4*a;this.data[d]=c,this.data[d+1]=s,this.data[d+2]=o,this.data[d+3]=u}this.pos+=e}},Hl.prototype.bit16=function(){for(var e=this.width%3,r=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&r)/r*255|0,c=(o>>5&t)/t*255|0,u=(o>>11)/r*255|0,d=a*this.width*4+4*i;this.data[d]=u,this.data[d+1]=c,this.data[d+2]=s,this.data[d+3]=255}this.pos+=e}},Hl.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+4*t;this.data[o]=i,this.data[o+1]=a,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},Hl.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var r=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+4*t;this.data[s]=i,this.data[s+1]=a,this.data[s+2]=n,this.data[s+3]=o}},Hl.prototype.getData=function(){return this.data},function(e){e.processBMP=function(r,t,n,a){var i=new Hl(r,!1),o=i.width,s=i.height,c={data:i.getData(),width:o,height:s},u=new u2(100).encode(c,100);return e.processJPEG.call(this,u,t,n,a)}}(hr.API),sw.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(r,t,n,a){var i=new sw(r),o=i.width,s=i.height,c={data:i.getData(),width:o,height:s},u=new u2(100).encode(c,100);return e.processJPEG.call(this,u,t,n,a)}}(hr.API),hr.API.processRGBA=function(e,r,t){for(var n=e.data,a=n.length,i=new Uint8Array(a/4*3),o=new Uint8Array(a/4),s=0,c=0,u=0;u<a;u+=4){var d=n[u],p=n[u+1],y=n[u+2],f=n[u+3];i[s++]=d,i[s++]=p,i[s++]=y,o[c++]=f}var _=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:_,index:r,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},hr.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ah=hr.API,d1=ah.getCharWidthsArray=function(e,r){var t,n,a=(r=r||{}).font||this.internal.getFont(),i=r.fontSize||this.internal.getFontSize(),o=r.charSpace||this.internal.getCharSpace(),s=r.widths?r.widths:a.metadata.Unicode.widths,c=s.fof?s.fof:1,u=r.kerning?r.kerning:a.metadata.Unicode.kerning,d=u.fof?u.fof:1,p=r.doKerning!==!1,y=0,f=e.length,_=0,S=s[0]||c,w=[];for(t=0;t<f;t++)n=e.charCodeAt(t),typeof a.metadata.widthOfString=="function"?w.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+o*(1e3/i)||0)/1e3):(y=p&&Sn(u[n])==="object"&&!isNaN(parseInt(u[n][_],10))?u[n][_]/d:0,w.push((s[n]||S)/c+y)),_=n;return w},nw=ah.getStringUnitWidth=function(e,r){var t=(r=r||{}).fontSize||this.internal.getFontSize(),n=r.font||this.internal.getFont(),a=r.charSpace||this.internal.getCharSpace();return ah.processArabic&&(e=ah.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,t,a)/t:d1.apply(this,arguments).reduce(function(i,o){return i+o},0)},iw=function(e,r,t,n){for(var a=[],i=0,o=e.length,s=0;i!==o&&s+r[i]<t;)s+=r[i],i++;a.push(e.slice(0,i));var c=i;for(s=0;i!==o;)s+r[i]>n&&(a.push(e.slice(c,i)),s=0,c=i),s+=r[i],i++;return c!==i&&a.push(e.slice(c,i)),a},aw=function(e,r,t){t||(t={});var n,a,i,o,s,c,u,d=[],p=[d],y=t.textIndent||0,f=0,_=0,S=e.split(" "),w=d1.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?S[0].length+2:t.lineIndent||0){var b=Array(c).join(" "),g=[];S.map(function(E){(E=E.split(/\s*\n/)).length>1?g=g.concat(E.map(function(x,j){return(j&&x.length?`
|
|
583
|
-
`:"")+x})):g.push(E[0])}),S=g,c=nw.apply(this,[b,t])}for(i=0,o=S.length;i<o;i++){var v=0;if(n=S[i],c&&n[0]==`
|
|
584
|
-
`&&(n=n.substr(1),v=1),y+f+(_=(a=d1.apply(this,[n,t])).reduce(function(E,x){return E+x},0))>r||v){if(_>r){for(s=iw.apply(this,[n,a,r-(y+f),r]),d.push(s.shift()),d=[s.pop()];s.length;)p.push([s.shift()]);_=a.slice(n.length-(d[0]?d[0].length:0)).reduce(function(E,x){return E+x},0)}else d=[n];p.push(d),y=_+c,f=w}else d.push(n),y+=f+_,f=w}return u=c?function(E,x){return(x?b:"")+E.join(" ")}:function(E){return E.join(" ")},p.map(u)},ah.splitTextToSize=function(e,r,t){var n,a=(t=t||{}).fontSize||this.internal.getFontSize(),i=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var p=this.internal.getFont(d.fontName,d.fontStyle);return p.metadata.Unicode?{widths:p.metadata.Unicode.widths||{0:1},kerning:p.metadata.Unicode.kerning||{}}:{font:p.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*r/a;i.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=t.lineIndent;var s,c,u=[];for(s=0,c=n.length;s<c;s++)u=u.concat(aw.apply(this,[n[s],o,i]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var r="klmnopqrstuvwxyz",t={},n={},a=0;a<r.length;a++)t[r[a]]="0123456789abcdef"[a],n["0123456789abcdef"[a]]=r[a];var i=function(p){return"0x"+parseInt(p,10).toString(16)},o=e.__fontmetrics__.compress=function(p){var y,f,_,S,w=["{"];for(var b in p){if(y=p[b],isNaN(parseInt(b,10))?f="'"+b+"'":(b=parseInt(b,10),f=(f=i(b).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof y=="number")y<0?(_=i(y).slice(3),S="-"):(_=i(y).slice(2),S=""),_=S+_.slice(0,-1)+n[_.slice(-1)];else{if(Sn(y)!=="object")throw new Error("Don't know what to do with value type "+Sn(y)+".");_=o(y)}w.push(f+_)}return w.push("}"),w.join("")},s=e.__fontmetrics__.uncompress=function(p){if(typeof p!="string")throw new Error("Invalid argument passed to uncompress.");for(var y,f,_,S,w={},b=1,g=w,v=[],E="",x="",j=p.length-1,N=1;N<j;N+=1)(S=p[N])=="'"?y?(_=y.join(""),y=void 0):y=[]:y?y.push(S):S=="{"?(v.push([g,_]),g={},_=void 0):S=="}"?((f=v.pop())[0][f[1]]=g,_=void 0,g=f[0]):S=="-"?b=-1:_===void 0?t.hasOwnProperty(S)?(E+=t[S],_=parseInt(E,16)*b,b=1,E=""):E+=S:t.hasOwnProperty(S)?(x+=t[S],g[_]=parseInt(x,16)*b,b=1,_=void 0,x=""):x+=S;return w},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},d={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(p){var y=p.font,f=d.Unicode[y.postScriptName];f&&(y.metadata.Unicode={},y.metadata.Unicode.widths=f.widths,y.metadata.Unicode.kerning=f.kerning);var _=u.Unicode[y.postScriptName];_&&(y.metadata.Unicode.encoding=_,y.encoding=_.codePages[0])}])}(hr.API),function(e){var r=function(t){for(var n=t.length,a=new Uint8Array(n),i=0;i<n;i++)a[i]=t.charCodeAt(i);return a};e.API.events.push(["addFont",function(t){var n=void 0,a=t.font,i=t.instance;if(!a.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=i.existsFileInVFS(a.postScriptName)===!1?i.loadFile(a.postScriptName):i.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?r(s):r(up(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(a,n)}}])}(hr),function(e){function r(){return(pr.canvg?Promise.resolve(pr.canvg):P2(()=>import("./index.es-f4ckIryE.js"),[],import.meta.url)).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}hr.API.addSvgAsImage=function(t,n,a,i,o,s,c,u){if(isNaN(n)||isNaN(a))throw Un.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Un.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var d=document.createElement("canvas");d.width=i,d.height=o;var p=d.getContext("2d");p.fillStyle="#fff",p.fillRect(0,0,d.width,d.height);var y={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return r().then(function(_){return _.fromString(p,t,y)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(_){return _.render(y)}).then(function(){f.addImage(d.toDataURL("image/jpeg",1),n,a,i,o,c,u)})}}(),hr.API.putTotalPages=function(e){var r,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(e,"g"),t=this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(r,t);return this},hr.API.viewerPreferences=function(e,r){var t;e=e||{},r=r||!1;var n,a,i,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),c=[],u=0,d=0,p=0;function y(_,S){var w,b=!1;for(w=0;w<_.length;w+=1)_[w]===S&&(b=!0);return b}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,e==="reset"||r===!0){var f=s.length;for(p=0;p<f;p+=1)t[s[p]].value=t[s[p]].defaultValue,t[s[p]].explicitSet=!1}if(Sn(e)==="object"){for(a in e)if(i=e[a],y(s,a)&&i!==void 0){if(t[a].type==="boolean"&&typeof i=="boolean")t[a].value=i;else if(t[a].type==="name"&&y(t[a].valueSet,i))t[a].value=i;else if(t[a].type==="integer"&&Number.isInteger(i))t[a].value=i;else if(t[a].type==="array"){for(u=0;u<i.length;u+=1)if(n=!0,i[u].length===1&&typeof i[u][0]=="number")c.push(String(i[u]-1));else if(i[u].length>1){for(d=0;d<i[u].length;d+=1)typeof i[u][d]!="number"&&(n=!1);n===!0&&c.push([i[u][0]-1,i[u][1]-1].join(" "))}t[a].value="["+c.join(" ")+"]"}else t[a].value=t[a].defaultValue;t[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var _,S=[];for(_ in t)t[_].explicitSet===!0&&(t[_].type==="name"?S.push("/"+_+" /"+t[_].value):S.push("/"+_+" "+t[_].value));S.length!==0&&this.internal.write(`/ViewerPreferences
|
|
585
|
-
<<
|
|
586
|
-
`+S.join(`
|
|
587
|
-
`)+`
|
|
588
|
-
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(e){var r=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',a=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),i=unescape(encodeURIComponent(n)),o=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),s=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),c=unescape(encodeURIComponent("</x:xmpmeta>")),u=i.length+o.length+s.length+a.length+c.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+u+" >>"),this.internal.write("stream"),this.internal.write(a+i+o+s+c),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(n,a){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:a||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",r)),this}}(hr.API),function(e){var r=e.API,t=r.pdfEscape16=function(i,o){for(var s,c=o.metadata.Unicode.widths,u=["","0","00","000","0000"],d=[""],p=0,y=i.length;p<y;++p){if(s=o.metadata.characterToGlyph(i.charCodeAt(p)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=i.charCodeAt(p),c.indexOf(s)==-1&&(c.push(s),c.push([parseInt(o.metadata.widthOfGlyph(s),10)])),s=="0")return d.join("");s=s.toString(16),d.push(u[4-s.length],s)}return d.join("")},n=function(i){var o,s,c,u,d,p,y;for(d=`/CIDInit /ProcSet findresource begin
|
|
589
|
-
12 dict begin
|
|
590
|
-
begincmap
|
|
591
|
-
/CIDSystemInfo <<
|
|
592
|
-
/Registry (Adobe)
|
|
593
|
-
/Ordering (UCS)
|
|
594
|
-
/Supplement 0
|
|
595
|
-
>> def
|
|
596
|
-
/CMapName /Adobe-Identity-UCS def
|
|
597
|
-
/CMapType 2 def
|
|
598
|
-
1 begincodespacerange
|
|
599
|
-
<0000><ffff>
|
|
600
|
-
endcodespacerange`,c=[],p=0,y=(s=Object.keys(i).sort(function(f,_){return f-_})).length;p<y;p++)o=s[p],c.length>=100&&(d+=`
|
|
601
|
-
`+c.length+` beginbfchar
|
|
602
|
-
`+c.join(`
|
|
603
|
-
`)+`
|
|
604
|
-
endbfchar`,c=[]),i[o]!==void 0&&i[o]!==null&&typeof i[o].toString=="function"&&(u=("0000"+i[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),c.push("<"+o+"><"+u+">"));return c.length&&(d+=`
|
|
605
|
-
`+c.length+` beginbfchar
|
|
606
|
-
`+c.join(`
|
|
607
|
-
`)+`
|
|
608
|
-
endbfchar
|
|
609
|
-
`),d+=`endcmap
|
|
610
|
-
CMapName currentdict /CMap defineresource pop
|
|
611
|
-
end
|
|
612
|
-
end`};r.events.push(["putFont",function(i){(function(o){var s=o.font,c=o.out,u=o.newObject,d=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="Identity-H"){for(var p=s.metadata.Unicode.widths,y=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),f="",_=0;_<y.length;_++)f+=String.fromCharCode(y[_]);var S=u();d({data:f,addLength1:!0,objectId:S}),c("endobj");var w=u();d({data:n(s.metadata.toUnicode),addLength1:!0,objectId:w}),c("endobj");var b=u();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+uh(s.fontName)),c("/FontFile2 "+S+" 0 R"),c("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),c("/Flags "+s.metadata.flags),c("/StemV "+s.metadata.stemV),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c(">>"),c("endobj");var g=u();c("<<"),c("/Type /Font"),c("/BaseFont /"+uh(s.fontName)),c("/FontDescriptor "+b+" 0 R"),c("/W "+e.API.PDFObject.convert(p)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+s.encoding+")"),c(">>"),c(">>"),c("endobj"),s.objectNumber=u(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+w+" 0 R"),c("/BaseFont /"+uh(s.fontName)),c("/Encoding /"+s.encoding),c("/DescendantFonts ["+g+" 0 R]"),c(">>"),c("endobj"),s.isAlreadyPutted=!0}})(i)}]),r.events.push(["putFont",function(i){(function(o){var s=o.font,c=o.out,u=o.newObject,d=o.putStream;if(s.metadata instanceof e.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var p=s.metadata.rawData,y="",f=0;f<p.length;f++)y+=String.fromCharCode(p[f]);var _=u();d({data:y,addLength1:!0,objectId:_}),c("endobj");var S=u();d({data:n(s.metadata.toUnicode),addLength1:!0,objectId:S}),c("endobj");var w=u();c("<<"),c("/Descent "+s.metadata.decender),c("/CapHeight "+s.metadata.capHeight),c("/StemV "+s.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+_+" 0 R"),c("/Flags 96"),c("/FontBBox "+e.API.PDFObject.convert(s.metadata.bbox)),c("/FontName /"+uh(s.fontName)),c("/ItalicAngle "+s.metadata.italicAngle),c("/Ascent "+s.metadata.ascender),c(">>"),c("endobj"),s.objectNumber=u();for(var b=0;b<s.metadata.hmtx.widths.length;b++)s.metadata.hmtx.widths[b]=parseInt(s.metadata.hmtx.widths[b]*(1e3/s.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+S+" 0 R/BaseFont/"+uh(s.fontName)+"/FontDescriptor "+w+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),c("endobj"),s.isAlreadyPutted=!0}})(i)}]);var a=function(i){var o,s=i.text||"",c=i.x,u=i.y,d=i.options||{},p=i.mutex||{},y=p.pdfEscape,f=p.activeFontKey,_=p.fonts,S=f,w="",b=0,g="",v=_[S].encoding;if(_[S].encoding!=="Identity-H")return{text:s,x:c,y:u,options:d,mutex:p};for(g=s,S=f,Array.isArray(s)&&(g=s[0]),b=0;b<g.length;b+=1)_[S].metadata.hasOwnProperty("cmap")&&(o=_[S].metadata.cmap.unicode.codeMap[g[b].charCodeAt(0)]),o||g[b].charCodeAt(0)<256&&_[S].metadata.hasOwnProperty("Unicode")?w+=g[b]:w+="";var E="";return parseInt(S.slice(1))<14||v==="WinAnsiEncoding"?E=y(w,S).split("").map(function(x){return x.charCodeAt(0).toString(16)}).join(""):v==="Identity-H"&&(E=t(w,_[S])),p.isHex=!0,{text:E,x:c,y:u,options:d,mutex:p}};r.events.push(["postProcessText",function(i){var o=i.text||"",s=[],c={text:o,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(o)){var u=0;for(u=0;u<o.length;u+=1)Array.isArray(o[u])&&o[u].length===3?s.push([a(Object.assign({},c,{text:o[u][0]})).text,o[u][1],o[u][2]]):s.push(a(Object.assign({},c,{text:o[u]})).text);i.text=s}else i.text=a(Object.assign({},c,{text:o})).text}])}(hr),function(e){var r=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(t){return r.call(this),this.internal.vFS[t]!==void 0},e.addFileToVFS=function(t,n){return r.call(this),this.internal.vFS[t]=n,this},e.getFileFromVFS=function(t){return r.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(hr.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var a,i,o,s,c,u,d,p=r,y=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},S={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},w=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],b=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,v=0;this.__bidiEngine__={};var E=function(A){var L=A.charCodeAt(),O=L>>8,I=S[O];return I!==void 0?p[256*I+(255&L)]:O===252||O===253?"AL":b.test(O)?"L":O===8?"R":"N"},x=function(A){for(var L,O=0;O<A.length;O++){if((L=E(A.charAt(O)))==="L")return!1;if(L==="R")return!0}return!1},j=function(A,L,O,I){var M,G,W,Y,te=L[I];switch(te){case"L":case"R":g=!1;break;case"N":case"AN":break;case"EN":g&&(te="AN");break;case"AL":g=!0,te="R";break;case"WS":te="N";break;case"CS":I<1||I+1>=L.length||(M=O[I-1])!=="EN"&&M!=="AN"||(G=L[I+1])!=="EN"&&G!=="AN"?te="N":g&&(G="AN"),te=G===M?G:"N";break;case"ES":te=(M=I>0?O[I-1]:"B")==="EN"&&I+1<L.length&&L[I+1]==="EN"?"EN":"N";break;case"ET":if(I>0&&O[I-1]==="EN"){te="EN";break}if(g){te="N";break}for(W=I+1,Y=L.length;W<Y&&L[W]==="ET";)W++;te=W<Y&&L[W]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(Y=L.length,W=I+1;W<Y&&L[W]==="NSM";)W++;if(W<Y){var V=A[I],H=V>=1425&&V<=2303||V===64286;if(M=L[W],H&&(M==="R"||M==="AL")){te="R";break}}}te=I<1||(M=L[I-1])==="B"?"N":O[I-1];break;case"B":g=!1,a=!0,te=v;break;case"S":i=!0,te="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"BN":te="N"}return te},N=function(A,L,O){var I=A.split("");return O&&T(I,O,{hiLevel:v}),I.reverse(),L&&L.reverse(),I.join("")},T=function(A,L,O){var I,M,G,W,Y,te=-1,V=A.length,H=0,q=[],D=v?f:y,$=[];for(g=!1,a=!1,i=!1,M=0;M<V;M++)$[M]=E(A[M]);for(G=0;G<V;G++){if(Y=H,q[G]=j(A,$,q,G),I=240&(H=D[Y][_[q[G]]]),H&=15,L[G]=W=D[H][5],I>0)if(I===16){for(M=te;M<G;M++)L[M]=1;te=-1}else te=-1;if(D[H][6])te===-1&&(te=G);else if(te>-1){for(M=te;M<G;M++)L[M]=W;te=-1}$[G]==="B"&&(L[G]=0),O.hiLevel|=W}i&&function(ne,Z,Q){for(var oe=0;oe<Q;oe++)if(ne[oe]==="S"){Z[oe]=v;for(var se=oe-1;se>=0&&ne[se]==="WS";se--)Z[se]=v}}($,L,V)},F=function(A,L,O,I,M){if(!(M.hiLevel<A)){if(A===1&&v===1&&!a)return L.reverse(),void(O&&O.reverse());for(var G,W,Y,te,V=L.length,H=0;H<V;){if(I[H]>=A){for(Y=H+1;Y<V&&I[Y]>=A;)Y++;for(te=H,W=Y-1;te<W;te++,W--)G=L[te],L[te]=L[W],L[W]=G,O&&(G=O[te],O[te]=O[W],O[W]=G);H=Y}H++}}},C=function(A,L,O){var I=A.split(""),M={hiLevel:v};return O||(O=[]),T(I,O,M),function(G,W,Y){if(Y.hiLevel!==0&&d)for(var te,V=0;V<G.length;V++)W[V]===1&&(te=w.indexOf(G[V]))>=0&&(G[V]=w[te+1])}(I,O,M),F(2,I,L,O,M),F(1,I,L,O,M),I.join("")};return this.__bidiEngine__.doBidiReorder=function(A,L,O){if(function(M,G){if(G)for(var W=0;W<M.length;W++)G[W]=W;s===void 0&&(s=x(M)),u===void 0&&(u=x(M))}(A,L),o||!c||u)if(o&&c&&s^u)v=s?1:0,A=N(A,L,O);else if(!o&&c&&u)v=s?1:0,A=C(A,L,O),A=N(A,L);else if(!o||s||c||u){if(o&&!c&&s^u)A=N(A,L),s?(v=0,A=C(A,L,O)):(v=1,A=C(A,L,O),A=N(A,L));else if(o&&s&&!c&&u)v=1,A=C(A,L,O),A=N(A,L);else if(!o&&!c&&s^u){var I=d;s?(v=1,A=C(A,L,O),v=0,d=!1,A=C(A,L,O),d=I):(v=0,A=C(A,L,O),A=N(A,L),v=1,d=!1,A=C(A,L,O),d=I,A=N(A,L))}}else v=0,A=C(A,L,O);else v=s?1:0,A=C(A,L,O);return A},this.__bidiEngine__.setOptions=function(A){A&&(o=A.isInputVisual,c=A.isOutputVisual,s=A.isInputRtl,u=A.isOutputRtl,d=A.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var r=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(n){var a=n.text;n.x,n.y;var i=n.options||{};n.mutex,i.lang;var o=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,t.setOptions(i),Object.prototype.toString.call(a)==="[object Array]"){var s=0;for(o=[],s=0;s<a.length;s+=1)Object.prototype.toString.call(a[s])==="[object Array]"?o.push([t.doBidiReorder(a[s][0]),a[s][1],a[s][2]]):o.push([t.doBidiReorder(a[s])]);n.text=o}else n.text=t.doBidiReorder(a);t.setOptions({isInputVisual:!0})}])}(hr),hr.API.TTFFont=function(){function e(r){var t;if(this.rawData=r,t=this.contents=new Kc(r),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new dL(this),this.registerTTF()}return e.open=function(r){return new e(r)},e.prototype.parse=function(){return this.directory=new Jk(this.contents),this.head=new tL(this),this.name=new oL(this),this.cmap=new A_(this),this.toUnicode={},this.hhea=new rL(this),this.maxp=new sL(this),this.hmtx=new lL(this),this.post=new iL(this),this.os2=new nL(this),this.loca=new hL(this),this.glyf=new uL(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var r,t,n,a,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,s,c,u;for(u=[],o=0,s=(c=this.bbox).length;o<s;o++)r=c[o],u.push(Math.round(r*this.scaleFactor));return u}).call(this),this.stemV=0,this.post.exists?(n=255&(a=this.post.italic_angle),(32768&(t=a>>16))!=0&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(r){var t;return((t=this.cmap.unicode)!=null?t.codeMap[r]:void 0)||0},e.prototype.widthOfGlyph=function(r){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(r).advance*t},e.prototype.widthOfString=function(r,t,n){var a,i,o,s;for(o=0,i=0,s=(r=""+r).length;0<=s?i<s:i>s;i=0<=s?++i:--i)a=r.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/t)||0;return o*(t/1e3)},e.prototype.lineHeight=function(r,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*r},e}();var eu,Kc=function(){function e(r){this.data=r??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(r){return this.data[this.pos++]=r},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(r){return this.writeByte(r>>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt32=function(){var r;return(r=this.readUInt32())>=2147483648?r-4294967296:r},e.prototype.writeInt32=function(r){return r<0&&(r+=4294967296),this.writeUInt32(r)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(r){return this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt16=function(){var r;return(r=this.readUInt16())>=32768?r-65536:r},e.prototype.writeInt16=function(r){return r<0&&(r+=65536),this.writeUInt16(r)},e.prototype.readString=function(r){var t,n;for(n=[],t=0;0<=r?t<r:t>r;t=0<=r?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(r){var t,n,a;for(a=[],t=0,n=r.length;0<=n?t<n:t>n;t=0<=n?++t:--t)a.push(this.writeByte(r.charCodeAt(t)));return a},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(r){return this.writeInt16(r)},e.prototype.readLongLong=function(){var r,t,n,a,i,o,s,c;return r=this.readByte(),t=this.readByte(),n=this.readByte(),a=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),c=this.readByte(),128&r?-1*(72057594037927940*(255^r)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^i)+65536*(255^o)+256*(255^s)+(255^c)+1):72057594037927940*r+281474976710656*t+1099511627776*n+4294967296*a+16777216*i+65536*o+256*s+c},e.prototype.writeLongLong=function(r){var t,n;return t=Math.floor(r/4294967296),n=4294967295&r,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(r){return this.writeInt32(r)},e.prototype.read=function(r){var t,n;for(t=[],n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(r){var t,n,a,i;for(i=[],n=0,a=r.length;n<a;n++)t=r[n],i.push(this.writeByte(t));return i},e}(),Jk=function(){var e;function r(t){var n,a,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},a=0,i=this.tableCount;0<=i?a<i:a>i;a=0<=i?++a:--a)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return r.prototype.encode=function(t){var n,a,i,o,s,c,u,d,p,y,f,_,S;for(S in f=Object.keys(t).length,c=Math.log(2),p=16*Math.floor(Math.log(f)/c),o=Math.floor(p/c),d=16*f-p,(a=new Kc).writeInt(this.scalarType),a.writeShort(f),a.writeShort(p),a.writeShort(o),a.writeShort(d),i=16*f,u=a.pos+i,s=null,_=[],t)for(y=t[S],a.writeString(S),a.writeInt(e(y)),a.writeInt(u),a.writeInt(y.length),_=_.concat(y),S==="head"&&(s=u),u+=y.length;u%4;)_.push(0),u++;return a.write(_),n=2981146554-e(a.data),a.pos=s+8,a.writeUInt32(n),a.data},e=function(t){var n,a,i,o;for(t=C_.call(t);t.length%4;)t.push(0);for(i=new Kc(t),a=0,n=0,o=t.length;n<o;n=n+=4)a+=i.readUInt32();return 4294967295&a},r}(),eL={}.hasOwnProperty,Du=function(e,r){for(var t in r)eL.call(r,t)&&(e[t]=r[t]);function n(){this.constructor=e}return n.prototype=r.prototype,e.prototype=new n,e.__super__=r.prototype,e};eu=function(){function e(r){var t;this.file=r,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var tL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="head",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},r.prototype.encode=function(t){var n;return(n=new Kc).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},r}(),lw=function(){function e(r,t){var n,a,i,o,s,c,u,d,p,y,f,_,S,w,b,g,v;switch(this.platformID=r.readUInt16(),this.encodingID=r.readShort(),this.offset=t+r.readInt(),p=r.pos,r.pos=this.offset,this.format=r.readUInt16(),this.length=r.readUInt16(),this.language=r.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(c=0;c<256;++c)this.codeMap[c]=r.readByte();break;case 4:for(f=r.readUInt16(),y=f/2,r.pos+=6,i=function(){var E,x;for(x=[],c=E=0;0<=y?E<y:E>y;c=0<=y?++E:--E)x.push(r.readUInt16());return x}(),r.pos+=2,S=function(){var E,x;for(x=[],c=E=0;0<=y?E<y:E>y;c=0<=y?++E:--E)x.push(r.readUInt16());return x}(),u=function(){var E,x;for(x=[],c=E=0;0<=y?E<y:E>y;c=0<=y?++E:--E)x.push(r.readUInt16());return x}(),d=function(){var E,x;for(x=[],c=E=0;0<=y?E<y:E>y;c=0<=y?++E:--E)x.push(r.readUInt16());return x}(),a=(this.length-r.pos+this.offset)/2,s=function(){var E,x;for(x=[],c=E=0;0<=a?E<a:E>a;c=0<=a?++E:--E)x.push(r.readUInt16());return x}(),c=b=0,v=i.length;b<v;c=++b)for(w=i[c],n=g=_=S[c];_<=w?g<=w:g>=w;n=_<=w?++g:--g)d[c]===0?o=n+u[c]:(o=s[d[c]/2+(n-_)-(y-c)]||0)!==0&&(o+=u[c]),this.codeMap[n]=65535&o}r.pos=p}return e.encode=function(r,t){var n,a,i,o,s,c,u,d,p,y,f,_,S,w,b,g,v,E,x,j,N,T,F,C,A,L,O,I,M,G,W,Y,te,V,H,q,D,$,ne,Z,Q,oe,se,ue,ve,Pe;switch(I=new Kc,o=Object.keys(r).sort(function(ke,Ne){return ke-Ne}),t){case"macroman":for(S=0,w=function(){var ke=[];for(_=0;_<256;++_)ke.push(0);return ke}(),g={0:0},i={},M=0,te=o.length;M<te;M++)g[se=r[a=o[M]]]==null&&(g[se]=++S),i[a]={old:r[a],new:g[r[a]]},w[a]=g[r[a]];return I.writeUInt16(1),I.writeUInt16(0),I.writeUInt32(12),I.writeUInt16(0),I.writeUInt16(262),I.writeUInt16(0),I.write(w),{charMap:i,subtable:I.data,maxGlyphID:S+1};case"unicode":for(L=[],p=[],v=0,g={},n={},b=u=null,G=0,V=o.length;G<V;G++)g[x=r[a=o[G]]]==null&&(g[x]=++v),n[a]={old:x,new:g[x]},s=g[x]-a,b!=null&&s===u||(b&&p.push(b),L.push(a),u=s),b=a;for(b&&p.push(b),p.push(65535),L.push(65535),C=2*(F=L.length),T=2*Math.pow(Math.log(F)/Math.LN2,2),y=Math.log(T/2)/Math.LN2,N=2*F-T,c=[],j=[],f=[],_=W=0,H=L.length;W<H;_=++W){if(A=L[_],d=p[_],A===65535){c.push(0),j.push(0);break}if(A-(O=n[A].new)>=32768)for(c.push(0),j.push(2*(f.length+F-_)),a=Y=A;A<=d?Y<=d:Y>=d;a=A<=d?++Y:--Y)f.push(n[a].new);else c.push(O-A),j.push(0)}for(I.writeUInt16(3),I.writeUInt16(1),I.writeUInt32(12),I.writeUInt16(4),I.writeUInt16(16+8*F+2*f.length),I.writeUInt16(0),I.writeUInt16(C),I.writeUInt16(T),I.writeUInt16(y),I.writeUInt16(N),Q=0,q=p.length;Q<q;Q++)a=p[Q],I.writeUInt16(a);for(I.writeUInt16(0),oe=0,D=L.length;oe<D;oe++)a=L[oe],I.writeUInt16(a);for(ue=0,$=c.length;ue<$;ue++)s=c[ue],I.writeUInt16(s);for(ve=0,ne=j.length;ve<ne;ve++)E=j[ve],I.writeUInt16(E);for(Pe=0,Z=f.length;Pe<Z;Pe++)S=f[Pe],I.writeUInt16(S);return{charMap:n,subtable:I.data,maxGlyphID:v+1}}},e}(),A_=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="cmap",r.prototype.parse=function(t){var n,a,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,a=0;0<=i?a<i:a>i;a=0<=i?++a:--a)n=new lw(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},r.encode=function(t,n){var a,i;return n==null&&(n="macroman"),a=lw.encode(t,n),(i=new Kc).writeUInt16(0),i.writeUInt16(1),a.table=i.data.concat(a.subtable),a},r}(),rL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="hhea",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},r}(),nL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="OS/2",r.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,a;for(a=[],n=0;n<10;++n)a.push(t.readByte());return a}(),this.charRange=function(){var n,a;for(a=[],n=0;n<4;++n)a.push(t.readInt());return a}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,a;for(a=[],n=0;n<2;n=++n)a.push(t.readInt());return a}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},r}(),iL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="post",r.prototype.parse=function(t){var n,a,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:var o;for(a=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=a?o<a:o>a;o=0<=a?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)n=t.readByte(),i.push(this.names.push(t.readString(n)));return i;case 151552:return a=t.readUInt16(),this.offsets=t.read(a);case 196608:break;case 262144:return this.map=(function(){var s,c,u;for(u=[],o=s=0,c=this.file.maxp.numGlyphs;0<=c?s<c:s>c;o=0<=c?++s:--s)u.push(t.readUInt32());return u}).call(this)}},r}(),aL=function(e,r){this.raw=e,this.length=e.length,this.platformID=r.platformID,this.encodingID=r.encodingID,this.languageID=r.languageID},oL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="name",r.prototype.parse=function(t){var n,a,i,o,s,c,u,d,p,y,f;for(t.pos=this.offset,t.readShort(),n=t.readShort(),c=t.readShort(),a=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)a.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+c+t.readShort()});for(u={},o=p=0,y=a.length;p<y;o=++p)i=a[o],t.pos=i.offset,d=t.readString(i.length),s=new aL(d,i),u[f=i.nameID]==null&&(u[f]=[]),u[i.nameID].push(s);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},r}(),sL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="maxp",r.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},r}(),lL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="hmtx",r.prototype.parse=function(t){var n,a,i,o,s,c,u;for(t.pos=this.offset,this.metrics=[],n=0,c=this.file.hhea.numberOfMetrics;0<=c?n<c:n>c;n=0<=c?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,p;for(p=[],n=d=0;0<=i?d<i:d>i;n=0<=i?++d:--d)p.push(t.readInt16());return p}(),this.widths=(function(){var d,p,y,f;for(f=[],d=0,p=(y=this.metrics).length;d<p;d++)o=y[d],f.push(o.advance);return f}).call(this),a=this.widths[this.widths.length-1],u=[],n=s=0;0<=i?s<i:s>i;n=0<=i?++s:--s)u.push(this.widths.push(a));return u},r.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},r}(),C_=[].slice,uL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(t){var n,a,i,o,s,c,u,d,p,y;return t in this.cache?this.cache[t]:(o=this.file.loca,n=this.file.contents,a=o.indexOf(t),(i=o.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+a,s=(c=new Kc(n.read(i))).readShort(),d=c.readShort(),y=c.readShort(),u=c.readShort(),p=c.readShort(),this.cache[t]=s===-1?new fL(c,d,y,u,p):new cL(c,s,d,y,u,p),this.cache[t]))},r.prototype.encode=function(t,n,a){var i,o,s,c,u;for(s=[],o=[],c=0,u=n.length;c<u;c++)i=t[n[c]],o.push(s.length),i&&(s=s.concat(i.encode(a)));return o.push(s.length),{table:s,offsets:o}},r}(),cL=function(){function e(r,t,n,a,i,o){this.raw=r,this.numberOfContours=t,this.xMin=n,this.yMin=a,this.xMax=i,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),fL=function(){function e(r,t,n,a,i){var o,s;for(this.raw=r,this.xMin=t,this.yMin=n,this.xMax=a,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return e.prototype.encode=function(){var r,t,n;for(t=new Kc(C_.call(this.raw.data)),r=0,n=this.glyphIDs.length;r<n;++r)t.pos=this.glyphOffsets[r];return t.data},e}(),hL=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Du(r,eu),r.prototype.tag="loca",r.prototype.parse=function(t){var n,a;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,o;for(o=[],a=0,i=this.length;a<i;a+=2)o.push(2*t.readUInt16());return o}).call(this):(function(){var i,o;for(o=[],a=0,i=this.length;a<i;a+=4)o.push(t.readUInt32());return o}).call(this)},r.prototype.indexOf=function(t){return this.offsets[t]},r.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},r.prototype.encode=function(t,n){for(var a=new Uint32Array(this.offsets.length),i=0,o=0,s=0;s<a.length;++s)if(a[s]=i,o<n.length&&n[o]==s){++o,a[s]=i;var c=this.offsets[s],u=this.offsets[s+1]-c;u>0&&(i+=u)}for(var d=new Array(4*a.length),p=0;p<a.length;++p)d[4*p+3]=255&a[p],d[4*p+2]=(65280&a[p])>>8,d[4*p+1]=(16711680&a[p])>>16,d[4*p]=(4278190080&a[p])>>24;return d},r}(),dL=function(){function e(r){this.font=r,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var r,t,n,a,i;for(t in a=this.font.cmap.tables[0].codeMap,r={},i=this.subset)n=i[t],r[t]=a[n];return r},e.prototype.glyphsFor=function(r){var t,n,a,i,o,s,c;for(a={},o=0,s=r.length;o<s;o++)a[i=r[o]]=this.font.glyf.glyphFor(i);for(i in t=[],a)(n=a[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in c=this.glyphsFor(t))n=c[i],a[i]=n;return a},e.prototype.encode=function(r,t){var n,a,i,o,s,c,u,d,p,y,f,_,S,w,b;for(a in n=A_.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(r),f={0:0},b=n.charMap)f[(c=b[a]).old]=c.new;for(_ in y=n.maxGlyphID,o)_ in f||(f[_]=y++);return d=function(g){var v,E;for(v in E={},g)E[g[v]]=v;return E}(f),p=Object.keys(d).sort(function(g,v){return g-v}),S=function(){var g,v,E;for(E=[],g=0,v=p.length;g<v;g++)s=p[g],E.push(d[s]);return E}(),i=this.font.glyf.encode(o,S,f),u=this.font.loca.encode(i.offsets,S),w={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(w["OS/2"]=this.font.os2.raw()),this.font.directory.encode(w)},e}();hr.API.PDFObject=function(){var e;function r(){}return e=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},r.convert=function(t){var n,a,i,o;if(Array.isArray(t))return"["+function(){var s,c,u;for(u=[],s=0,c=t.length;s<c;s++)n=t[s],u.push(r.convert(n));return u}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+e(t.getUTCFullYear(),4)+e(t.getUTCMonth(),2)+e(t.getUTCDate(),2)+e(t.getUTCHours(),2)+e(t.getUTCMinutes(),2)+e(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(a in i=["<<"],t)o=t[a],i.push("/"+a+" "+r.convert(o));return i.push(">>"),i.join(`
|
|
613
|
-
`)}return""+t},r}();window.jspdf={jsPDF:hr};dk.toggleFadeInAnimation(!1);ip.setTextOverflow("change-font-size");const pL=new URLSearchParams(location.search).get("key"),k_=hk.createStore({key:pL});window.store=k_;window.config={addGlobalFont:pk.addGlobalFont,unstable_useHtmlTextRender:ip.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:ip.setTextVerticalResizeEnabled,unstable_setTextOverflow:ip.setTextOverflow,onLoadError:e2.onLoadError,setAssetLoadTimeout:e2.setAssetLoadTimeout,setFontLoadTimeout:e2.setFontLoadTimeout,unstable_setTextSplitAllowed:ip.setTextSplitAllowed};const gL=cw.createRoot(document.getElementById("root"));gL.render(Ur.createElement(fk.WorkspaceCanvas,{visiblePagesOffset:0,renderOnlyActivePage:!0,store:k_,components:{PageControls:()=>null,Tooltip:()=>null}}));export{Sn as _,bh as c,mp as g};
|