Files
open-kimi-ppt-skill/editor/neo-ppt/assets/common-utils-legacy-BUVwbO7W.js
T

1 line
33 KiB
JavaScript

System.register([],function(t,e){var r,n,i,o,a,s,u,c,h,l,y,p,f,_,m,O,d,v,T,x,b,E,N,A,g,C,M,R,w,S,I,j,L,U,H,V,D,P,Y,X,z,F,Q,$,Z,k,q,B,W,K,G,J,tt,et,rt,nt,it,ot,at,st,ut,ct,ht,lt,yt,pt,ft,_t,mt,Ot,dt,vt,Tt,xt,bt,Et,Nt,At,gt,Ct,Mt,Rt,wt,St,It,jt,Lt,Ut,Ht,Vt,Dt,Pt,Yt,Xt,zt,Ft,Qt,$t,Zt,kt,qt,Bt,Wt,Kt,Gt,Jt,te,ee,re,ne,ie,oe,ae,se,ue,ce,he,le,ye,pe,fe,_e,me,Oe,de,ve,Te;function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}function be(t){var e=function(t,e){if("object"!=xe(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xe(e)?e:e+""}function Ee(t,e,r){return(e=be(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ne(t){return null==t?void 0===t?y:l:p&&p in Object(t)?function(t){var e=s.call(t,c),r=t[c];try{t[c]=void 0;var n=!0}catch(o){}var i=u.call(t);return n&&(e?t[c]=r:delete t[c]),i}(t):function(t){return h.call(t)}(t)}function Ae(t){return null!=t&&"object"==typeof t}function ge(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&m.test(t.charAt(e)););return e}(t)+1).replace(O,""):t}function Ce(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Me(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||Ae(t)&&Ne(t)==f}(t))return d;if(Ce(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ce(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ge(t);var r=T.test(t);return r||x.test(t)?b(t.slice(2),r?2:8):v.test(t)?d:+t}function Re(t){if(!Ce(t))return!1;var e=Ne(t);return e==N||e==A||e==E||e==g}function we(t){if(null!=t){try{return R.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Se(t){return!(!Ce(t)||(e=t,M&&M in e))&&(Re(t)?H:S).test(we(t));var e}function Ie(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Se(r)?r:void 0}function je(t,e){var r=typeof t;return!!(e=null==e?D:e)&&("number"==r||"symbol"!=r&&P.test(t))&&t>-1&&t%1==0&&t<e}function Le(t,e){return t===e||t!=t&&e!=e}function Ue(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Y}function He(t){return Ae(t)&&Ne(t)==z}function Ve(){return!1}function De(t){return Ae(t)&&Ue(t.length)&&!!K[Ne(t)]}function Pe(t,e){var r=_(t),n=!r&&Z(t),i=!r&&!n&&W(t),o=!r&&!n&&!i&&nt(t),a=r||n||i||o,s=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],u=s.length;for(var c in t)!e&&!it.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||je(c,u))||s.push(c);return s}function Ye(t){if(r=(e=t)&&e.constructor,e!==("function"==typeof r&&r.prototype||X))return ot(t);var e,r,n=[];for(var i in Object(t))at.call(t,i)&&"constructor"!=i&&n.push(i);return n}function Xe(t){return null!=(e=t)&&Ue(e.length)&&!Re(e)?Pe(t):Ye(t);var e}function ze(){this.__data__=st?st(null):{},this.size=0}function Fe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Qe(t){var e=this.__data__;if(st){var r=e[t];return r===ut?void 0:r}return ct.call(e,t)?e[t]:void 0}function $e(t){var e=this.__data__;return st?void 0!==e[t]:ht.call(e,t)}function Ze(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=st&&void 0===e?lt:e,this}function ke(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qe(){this.__data__=[],this.size=0}function Be(t,e){for(var r=t.length;r--;)if(Le(t[r][0],e))return r;return-1}function We(t){var e=this.__data__,r=Be(e,t);return!(r<0||(r==e.length-1?e.pop():yt.call(e,r,1),--this.size,0))}function Ke(t){var e=this.__data__,r=Be(e,t);return r<0?void 0:e[r][1]}function Ge(t){return Be(this.__data__,t)>-1}function Je(t,e){var r=this.__data__,n=Be(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function tr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function er(){this.size=0,this.__data__={hash:new ke,map:new(pt||tr),string:new ke}}function rr(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function nr(t){var e=rr(this,t).delete(t);return this.size-=e?1:0,e}function ir(t){return rr(this,t).get(t)}function or(t){return rr(this,t).has(t)}function ar(t,e){var r=rr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function sr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ur(){this.__data__=new tr,this.size=0}function cr(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function hr(t){return this.__data__.get(t)}function lr(t){return this.__data__.has(t)}function yr(t,e){var r=this.__data__;if(r instanceof tr){var n=r.__data__;if(!pt||n.length<ft-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new sr(n)}return r.set(t,e),this.size=r.size,this}function pr(t){var e=this.__data__=new tr(t);this.size=e.size}function fr(){return[]}function _r(t){return function(t,e,r){var n=e(t);return _(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Xe,Ot)}function mr(t){return this.__data__.set(t,Lt),this}function Or(t){return this.__data__.has(t)}function dr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new sr;++e<r;)this.add(t[e])}function vr(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Tr(t,e,r,n,i,o){var a=r&Ut,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(t),h=o.get(e);if(c&&h)return c==e&&h==t;var l=-1,y=!0,p=r&Ht?new dr:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var f=t[l],_=e[l];if(n)var m=a?n(_,f,l,e,t,o):n(f,_,l,t,e,o);if(void 0!==m){if(m)continue;y=!1;break}if(p){if(!vr(e,function(t,e){if(a=e,!p.has(a)&&(f===t||i(f,t,r,n,o)))return p.push(e);var a})){y=!1;break}}else if(f!==_&&!i(f,_,r,n,o)){y=!1;break}}return o.delete(t),o.delete(e),y}function xr(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function br(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function Er(t,e,r,n,i,o){var a=_(t),s=_(e),u=a?re:It(t),c=s?re:It(e),h=(u=u==ee?ne:u)==ne,l=(c=c==ee?ne:c)==ne,y=u==c;if(y&&W(t)){if(!W(e))return!1;a=!0,h=!1}if(y&&!h)return o||(o=new pr),a||nt(t)?Tr(t,e,r,n,i,o):function(t,e,r,n,i,o,a){switch(r){case Bt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case qt:return!(t.byteLength!=e.byteLength||!o(new jt(t),new jt(e)));case Pt:case Yt:case Ft:return Le(+t,+e);case Xt:return t.name==e.name&&t.message==e.message;case Qt:case Zt:return t==e+"";case zt:var s=xr;case $t:var u=n&Vt;if(s||(s=br),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;n|=Dt,a.set(t,e);var h=Tr(s(t),s(e),n,i,o,a);return a.delete(t),h;case kt:if(Kt)return Kt.call(t)==Kt.call(e)}return!1}(t,e,u,r,n,i,o);if(!(r&te)){var p=h&&ie.call(t,"__wrapped__"),f=l&&ie.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,O=f?e.value():e;return o||(o=new pr),i(m,O,r,n,o)}}return!!y&&(o||(o=new pr),function(t,e,r,n,i,o){var a=r&Gt,s=_r(t),u=s.length;if(u!=_r(e).length&&!a)return!1;for(var c=u;c--;){var h=s[c];if(!(a?h in e:Jt.call(e,h)))return!1}var l=o.get(t),y=o.get(e);if(l&&y)return l==e&&y==t;var p=!0;o.set(t,e),o.set(e,t);for(var f=a;++c<u;){var _=t[h=s[c]],m=e[h];if(n)var O=a?n(m,_,h,e,t,o):n(_,m,h,t,e,o);if(!(void 0===O?_===m||i(_,m,r,n,o):O)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var d=t.constructor,v=e.constructor;d==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof d&&d instanceof d&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,r,n,i,o))}function Nr(t,e,r,n,i){return t===e||(null==t||null==e||!Ae(t)&&!Ae(e)?t!=t&&e!=e:Er(t,e,r,n,Nr,i))}function Ar(t,e,r){var n,i,o,a,s,u,c=0,h=!1,l=!1,y=!0;if("function"!=typeof t)throw new TypeError(ae);function p(e){var r=n,o=i;return n=i=void 0,c=e,a=t.apply(o,r)}function f(t){var r=t-u;return void 0===u||r>=e||r<0||l&&t-c>=o}function _(){var t=oe();if(f(t))return m(t);s=setTimeout(_,function(t){var r=e-(t-u);return l?ue(r,o-(t-c)):r}(t))}function m(t){return s=void 0,y&&n?p(t):(n=i=void 0,a)}function O(){var t=oe(),r=f(t);if(n=arguments,i=this,u=t,r){if(void 0===s)return function(t){return c=t,s=setTimeout(_,e),h?p(t):a}(u);if(l)return clearTimeout(s),s=setTimeout(_,e),p(u)}return void 0===s&&(s=setTimeout(_,e)),a}return e=Me(e)||0,Ce(r)&&(h=!!r.leading,o=(l="maxWait"in r)?se(Me(r.maxWait)||0,e):o,y="trailing"in r?!!r.trailing:y),O.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=u=i=s=void 0},O.flush=function(){return void 0===s?a:m(oe())},O}function gr(t){let e="";Array.isArray(t)||(t=[t]);for(let r=0;r<t.length;r++){const n=t[r];if(n.type===ve.CLOSE_PATH)e+="z";else if(n.type===ve.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===ve.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===ve.MOVE_TO)e+=(n.relative?"m":"M")+n.x+he+n.y;else if(n.type===ve.LINE_TO)e+=(n.relative?"l":"L")+n.x+he+n.y;else if(n.type===ve.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+he+n.y1+he+n.x2+he+n.y2+he+n.x+he+n.y;else if(n.type===ve.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+he+n.y2+he+n.x+he+n.y;else if(n.type===ve.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+he+n.y1+he+n.x+he+n.y;else if(n.type===ve.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+he+n.y;else{if(n.type!==ve.ARC)throw new Error(`Unexpected command type "${n?.type}" at index ${r}.`);e+=(n.relative?"a":"A")+n.rX+he+n.rY+he+n.xRot+he+ +n.lArcFlag+he+ +n.sweepFlag+he+n.x+he+n.y}}return e}function Cr([t,e],r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Mr(...t){for(let e=0;e<t.length;e++)if("number"!=typeof t[e])throw new Error(`assertNumbers arguments[${e}] is not a number. ${typeof t[e]} == typeof ${t[e]}`);return!0}function Rr(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;let{rX:n,rY:i}=t;const{x:o,y:a}=t;if(Math.abs(n)<1e-10||Math.abs(i)<1e-10)return t.rX=0,t.rY=0,t.cX=(e+o)/2,t.cY=(r+a)/2,t.phi1=0,void(t.phi2=0);n=Math.abs(t.rX),i=Math.abs(t.rY);const s=t.xRot/180*le,[u,c]=Cr([(e-o)/2,(r-a)/2],-s),h=Math.pow(u,2)/Math.pow(n,2)+Math.pow(c,2)/Math.pow(i,2);1<h&&(n*=Math.sqrt(h),i*=Math.sqrt(h)),t.rX=n,t.rY=i;const l=Math.pow(n,2)*Math.pow(c,2)+Math.pow(i,2)*Math.pow(u,2),y=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-l)/l)),p=n*c/i*y,f=-i*u/n*y,_=Cr([p,f],s);t.cX=_[0]+(e+o)/2,t.cY=_[1]+(r+a)/2,t.phi1=Math.atan2((c-f)/i,(u-p)/n),t.phi2=Math.atan2((-c-f)/i,(-u-p)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*le),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*le),t.phi1*=180/le,t.phi2*=180/le}function wr(t,e,r){Mr(t,e,r);const n=t*t+e*e-r*r;if(0>n)return[];if(0===n)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];const i=Math.sqrt(n);return[[(t*r+e*i)/(t*t+e*e),(e*r-t*i)/(t*t+e*e)],[(t*r-e*i)/(t*t+e*e),(e*r+t*i)/(t*t+e*e)]]}function Sr(t,e,r){return(1-r)*t+r*e}function Ir(t,e,r,n){return t+Math.cos(n/180*le)*e+Math.sin(n/180*le)*r}function jr(t,e,r,n){const i=1e-6,o=e-t,a=r-e,s=3*o+3*(n-r)-6*a,u=6*(a-o),c=3*o;return Math.abs(s)<i?Math.abs(u)<i?[]:[-c/u]:function(t,e,r=1e-6){const n=t*t/4-e;if(n<-r)return[];if(n<=r)return[-t/2];const i=Math.sqrt(n);return[-t/2-i,-t/2+i]}(u/s,c/s,i)}function Lr(t,e,r,n,i){const o=1-i;return t*(o*o*o)+e*(3*o*o*i)+r*(3*o*i*i)+n*(i*i*i)}function Ur(t,e,r){const n=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],a=r[1]-t[1],s=n*a-i*o;if(!(Math.abs(s)<1e-10))return!1;const u=n*o+i*a,c=o*o+a*a;return 0<=u&&u<=c&&n*n+i*i<=c}function Hr(t){if(t.length<=2)return t;const e=[],r=t.map(pe.INFO((t,e,r)=>{const n="relative"in t&&t.relative;return["x"in t?t.x+(n?e:0):e,"y"in t?t.y+(n?r:0):r]}));let n=r[0];e.push(t[0]);for(let i=1;i<t.length;i++){const o=t[i],a=t[i+1];if(i<t.length-1&&a&&o.type&ve.LINE_COMMANDS&&a.type&ve.LINE_COMMANDS){const t=r[i+1];if(Ur(n,r[i],t)){"relative"in a&&a.relative&&("x"in a&&(a.x=t[0]-n[0]),"y"in a&&(a.y=t[1]-n[1]));continue}}e.push(o),n=r[i]}return e}function Vr(t,e=!0){if(t.length<2)return t;const r=pe.INFO((t,e,r)=>({...t,x:t.x??e,y:t.y??r,relative:t.relative??!1})),n=[];let i=[];for(const o of t){const t=r(o);t.type===ve.MOVE_TO&&i.length>0&&(e?n.push(...Dr(i)):n.unshift(...Dr(i)),i=[]),i.push(t)}return i.length>0&&(e?n.push(...Dr(i)):n.unshift(...Dr(i))),n}function Dr(t){const e=t[t.length-1]?.type===ve.CLOSE_PATH,r=e?t.length-2:t.length-1,n=[{type:ve.MOVE_TO,relative:!1,x:t[r].x,y:t[r].y}];for(let i=r;i>0;i--){const e=t[i],r=t[i-1];if(e.relative)throw new Error("Relative command are not supported convert first with `toAbs()`");switch(e.type){case ve.HORIZ_LINE_TO:n.push({type:ve.HORIZ_LINE_TO,relative:!1,x:r.x});break;case ve.VERT_LINE_TO:n.push({type:ve.VERT_LINE_TO,relative:!1,y:r.y});break;case ve.LINE_TO:case ve.MOVE_TO:n.push({type:ve.LINE_TO,relative:!1,x:r.x,y:r.y});break;case ve.CURVE_TO:n.push({type:ve.CURVE_TO,relative:!1,x:r.x,y:r.y,x1:e.x2,y1:e.y2,x2:e.x1,y2:e.y1});break;case ve.SMOOTH_CURVE_TO:throw new Error("Unsupported command: S (smooth cubic bezier)");case ve.SMOOTH_QUAD_TO:throw new Error("Unsupported command: T (smooth quadratic bezier)");case ve.ARC:throw new Error("Unsupported command: A (arc)");case ve.QUAD_TO:throw new Error("Unsupported command: Q (quadratic bezier)")}}return e&&n.push({type:ve.CLOSE_PATH}),n}function Pr(t=1e13){function e(e){return Math.round(e*t)/t}return Mr(t),function(t){return"x1"in t&&void 0!==t.x1&&(t.x1=e(t.x1)),"y1"in t&&void 0!==t.y1&&(t.y1=e(t.y1)),"x2"in t&&void 0!==t.x2&&(t.x2=e(t.x2)),"y2"in t&&void 0!==t.y2&&(t.y2=e(t.y2)),"x"in t&&void 0!==t.x&&(t.x=e(t.x)),"y"in t&&void 0!==t.y&&(t.y=e(t.y)),"rX"in t&&void 0!==t.rX&&(t.rX=e(t.rX)),"rY"in t&&void 0!==t.rY&&(t.rY=e(t.rY)),t}}function Yr(){return $r((t,e,r)=>(t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t))}function Xr(){return $r((t,e,r)=>(t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t))}function zr(t=!0,e=!0,r=!0,n=!0){return $r((i,o,a,s,u)=>{if(isNaN(s)&&!(i.type&ve.MOVE_TO))throw new Error("path must start with moveto");if(e&&i.type&ve.HORIZ_LINE_TO&&(i.type=ve.LINE_TO,i.y=i.relative?0:a),r&&i.type&ve.VERT_LINE_TO&&(i.type=ve.LINE_TO,i.x=i.relative?0:o),t&&i.type&ve.CLOSE_PATH&&(i.type=ve.LINE_TO,i.x=i.relative?s-o:s,i.y=i.relative?u-a:u),i.type&ve.ARC&&(0===i.rX||0===i.rY)&&(i.type=ve.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),n&&i.type&ve.QUAD_TO&&Ur([o,a],i.relative?[o+i.x1,a+i.y1]:[i.x1,i.y1],i.relative?[o+i.x,a+i.y]:[i.x,i.y])&&(i.type=ve.LINE_TO,delete i.x1,delete i.y1),n&&i.type&ve.CURVE_TO){const t=[o,a],e=i.relative?[o+i.x1,a+i.y1]:[i.x1,i.y1],r=i.relative?[o+i.x2,a+i.y2]:[i.x2,i.y2],n=i.relative?[o+i.x,a+i.y]:[i.x,i.y];Ur(t,e,n)&&Ur(t,r,n)&&(i.type=ve.LINE_TO,delete i.x1,delete i.y1,delete i.x2,delete i.y2)}return i})}function Fr(){let t=NaN,e=NaN,r=NaN,n=NaN;return $r((i,o,a)=>(i.type&ve.SMOOTH_CURVE_TO&&(i.type=ve.CURVE_TO,t=isNaN(t)?o:t,e=isNaN(e)?a:e,i.x1=i.relative?o-t:2*o-t,i.y1=i.relative?a-e:2*a-e),i.type&ve.CURVE_TO?(t=i.relative?o+i.x2:i.x2,e=i.relative?a+i.y2:i.y2):(t=NaN,e=NaN),i.type&ve.SMOOTH_QUAD_TO&&(i.type=ve.QUAD_TO,r=isNaN(r)?o:r,n=isNaN(n)?a:n,i.x1=i.relative?o-r:2*o-r,i.y1=i.relative?a-n:2*a-n),i.type&ve.QUAD_TO?(r=i.relative?o+i.x1:i.x1,n=i.relative?a+i.y1:i.y1):(r=NaN,n=NaN),i))}function Qr(){let t=NaN,e=NaN;return $r((r,n,i)=>{if(r.type&ve.SMOOTH_QUAD_TO&&(r.type=ve.QUAD_TO,t=isNaN(t)?n:t,e=isNaN(e)?i:e,r.x1=r.relative?n-t:2*n-t,r.y1=r.relative?i-e:2*i-e),r.type&ve.QUAD_TO){t=r.relative?n+r.x1:r.x1,e=r.relative?i+r.y1:r.y1;const o=r.x1,a=r.y1;r.type=ve.CURVE_TO,r.x1=((r.relative?0:n)+2*o)/3,r.y1=((r.relative?0:i)+2*a)/3,r.x2=(r.x+2*o)/3,r.y2=(r.y+2*a)/3}else t=NaN,e=NaN;return r})}function $r(t){let e=0,r=0,n=NaN,i=NaN;return function(o){if(isNaN(n)&&!(o.type&ve.MOVE_TO))throw new Error("path must start with moveto");const a=t(o,e,r,n,i);return o.type&ve.CLOSE_PATH&&(e=n,r=i),"x"in o&&void 0!==o.x&&(e=o.relative?e+o.x:o.x),"y"in o&&void 0!==o.y&&(r=o.relative?r+o.y:o.y),o.type&ve.MOVE_TO&&(n=e,i=r),a}}function Zr(t=0){Mr(t);let e=NaN,r=NaN,n=NaN,i=NaN;return $r((o,a,s,u,c)=>{const h=Math.abs;let l=!1,y=0,p=0;if(o.type&ve.SMOOTH_CURVE_TO&&(y=isNaN(e)?0:a-e,p=isNaN(r)?0:s-r),o.type&(ve.CURVE_TO|ve.SMOOTH_CURVE_TO)?(e=o.relative?a+o.x2:o.x2,r=o.relative?s+o.y2:o.y2):(e=NaN,r=NaN),o.type&ve.SMOOTH_QUAD_TO?(n=isNaN(n)?a:2*a-n,i=isNaN(i)?s:2*s-i):o.type&ve.QUAD_TO?(n=o.relative?a+o.x1:o.x1,i=o.relative?s+o.y1:o.y2):(n=NaN,i=NaN),o.type&ve.LINE_COMMANDS||o.type&ve.ARC&&(0===o.rX||0===o.rY||!o.lArcFlag)||o.type&ve.CURVE_TO||o.type&ve.SMOOTH_CURVE_TO||o.type&ve.QUAD_TO||o.type&ve.SMOOTH_QUAD_TO){const e=void 0===o.x?0:o.relative?o.x:o.x-a,r=void 0===o.y?0:o.relative?o.y:o.y-s;y=isNaN(n)?void 0===o.x1?y:o.relative?o.x:o.x1-a:n-a,p=isNaN(i)?void 0===o.y1?p:o.relative?o.y:o.y1-s:i-s;const u=void 0===o.x2?0:o.relative?o.x:o.x2-a,c=void 0===o.y2?0:o.relative?o.y:o.y2-s;h(e)<=t&&h(r)<=t&&h(y)<=t&&h(p)<=t&&h(u)<=t&&h(c)<=t&&(l=!0)}return o.type&ve.CLOSE_PATH&&h(a-u)<=t&&h(s-c)<=t&&(l=!0),l?[]:o})}function kr(t,e,r,n,i,o){return Mr(t,e,r,n,i,o),$r((a,s,u,c)=>{const h=a.x1,l=a.x2,y=a.relative&&!isNaN(c),p=void 0!==a.x?a.x:y?0:s,f=void 0!==a.y?a.y:y?0:u;function _(t){return t*t}a.type&ve.HORIZ_LINE_TO&&0!==e&&(a.type=ve.LINE_TO,a.y=a.relative?0:u),a.type&ve.VERT_LINE_TO&&0!==r&&(a.type=ve.LINE_TO,a.x=a.relative?0:s),void 0!==a.x&&(a.x=a.x*t+f*r+(y?0:i)),void 0!==a.y&&(a.y=p*e+a.y*n+(y?0:o)),void 0!==a.x1&&(a.x1=a.x1*t+a.y1*r+(y?0:i)),void 0!==a.y1&&(a.y1=h*e+a.y1*n+(y?0:o)),void 0!==a.x2&&(a.x2=a.x2*t+a.y2*r+(y?0:i)),void 0!==a.y2&&(a.y2=l*e+a.y2*n+(y?0:o));const m=t*n-e*r;if(void 0!==a.xRot&&(1!==t||0!==e||0!==r||1!==n))if(0===m)delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag,a.type=ve.LINE_TO;else{const i=a.xRot*Math.PI/180,o=Math.sin(i),s=Math.cos(i),u=1/_(a.rX),c=1/_(a.rY),h=_(s)*u+_(o)*c,l=2*o*s*(u-c),y=_(o)*u+_(s)*c,p=h*n*n-l*e*n+y*e*e,f=l*(t*n+e*r)-2*(h*r*n+y*t*e),O=h*r*r-l*t*r+y*t*t,d=(Math.atan2(f,p-O)+Math.PI)%Math.PI/2,v=Math.sin(d),T=Math.cos(d);a.rX=Math.abs(m)/Math.sqrt(p*_(T)+f*v*T+O*_(v)),a.rY=Math.abs(m)/Math.sqrt(p*_(v)-f*v*T+O*_(T)),a.xRot=180*d/Math.PI}return void 0!==a.sweepFlag&&0>m&&(a.sweepFlag=+!a.sweepFlag),a})}function qr(t,e=0,r=0){Mr(t,e,r);const n=Math.sin(t),i=Math.cos(t);return kr(i,n,-n,i,e-e*i+r*n,r-e*n-r*i)}function Br(t,e=0){return Mr(t,e),kr(1,0,0,1,t,e)}function Wr(t,e=t){return Mr(t,e),kr(t,0,0,e,0,0)}function Kr(t){return Mr(t),kr(1,0,Math.tan(t),1,0,0)}function Gr(t){return Mr(t),kr(1,Math.tan(t),0,1,0,0)}function Jr(t=0){return Mr(t),kr(-1,0,0,1,t,0)}function tn(t=0){return Mr(t),kr(1,0,0,-1,0,t)}function en(){return $r((t,e,r)=>ve.ARC===t.type?function(t,e,r){t.cX||Rr(t,e,r);const n=t.xRot/180*le;if(Math.abs(t.rX)<1e-10||Math.abs(t.rY)<1e-10)return[{relative:t.relative,type:ve.CURVE_TO,x1:e+(t.x-e)/3,y1:r+(t.y-r)/3,x2:e+2*(t.x-e)/3,y2:r+2*(t.y-r)/3,x:t.x,y:t.y}];const i=Math.min(t.phi1,t.phi2),o=Math.max(t.phi1,t.phi2)-i,a=Math.ceil(o/90),s=new Array(a);let u=e,c=r;const h=(e,r)=>{const[i,o]=Cr([e*t.rX,r*t.rY],n);return[t.cX+i,t.cY+o]};for(let l=0;l<a;l++){const e=Sr(t.phi1,t.phi2,l/a),r=Sr(t.phi1,t.phi2,(l+1)/a),n=r-e,i=4/3*Math.tan(n*ye/4),o=Math.cos(e*ye)-i*Math.sin(e*ye),y=Math.sin(e*ye)+i*Math.cos(e*ye),p=Math.cos(r*ye),f=Math.sin(r*ye),_=p+i*f,m=f-i*p,O=h(o,y),d=h(_,m),v=h(p,f),T={relative:t.relative,type:ve.CURVE_TO,x:v[0],y:v[1],x1:O[0],y1:O[1],x2:d[0],y2:d[1]};t.relative&&(T.x1-=u,T.y1-=c,T.x2-=u,T.y2-=c,T.x-=u,T.y-=c),u=v[0],c=v[1],s[l]=T}return s}(t,t.relative?0:e,t.relative?0:r):t)}function rn(){return $r((t,e,r)=>(t.relative&&(e=0,r=0),ve.ARC===t.type&&Rr(t,e,r),t))}function nn(){return t=>({...t})}function on(){const t=t=>({...t}),e=Yr(),r=Qr(),n=Fr(),i=$r((o,a,s)=>{const u=n(r(e(t(o))));function c(t){t>i.maxX&&(i.maxX=t),t<i.minX&&(i.minX=t)}function h(t){t>i.maxY&&(i.maxY=t),t<i.minY&&(i.minY=t)}if(u.type&ve.DRAWING_COMMANDS&&(c(a),h(s)),u.type&ve.HORIZ_LINE_TO&&c(u.x),u.type&ve.VERT_LINE_TO&&h(u.y),u.type&ve.LINE_TO&&(c(u.x),h(u.y)),u.type&ve.CURVE_TO){c(u.x),h(u.y);const t=jr(a,u.x1,u.x2,u.x);for(const r of t)0<r&&1>r&&c(Lr(a,u.x1,u.x2,u.x,r));const e=jr(s,u.y1,u.y2,u.y);for(const r of e)0<r&&1>r&&h(Lr(s,u.y1,u.y2,u.y,r))}if(u.type&ve.ARC){c(u.x),h(u.y),Rr(u,a,s);const t=u.xRot/180*Math.PI,e=Math.cos(t)*u.rX,r=Math.sin(t)*u.rX,n=-Math.sin(t)*u.rY,i=Math.cos(t)*u.rY,[o,l]=u.phi1<u.phi2?[u.phi1,u.phi2]:-180>u.phi2?[u.phi2+360,u.phi1+360]:[u.phi2,u.phi1],y=([t,e])=>{const r=180*Math.atan2(e,t)/Math.PI;return r<o?r+360:r},p=wr(n,-e,0).map(y);for(const a of p)a>o&&a<l&&c(Ir(u.cX,e,n,a));const f=wr(i,-r,0).map(y);for(const a of f)a>o&&a<l&&h(Ir(u.cY,r,i,a))}return o});return i.minX=1/0,i.maxX=-1/0,i.minY=1/0,i.maxY=-1/0,i}return t({a:function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=Me(r))==r?r:0),void 0!==e&&(e=(e=Me(e))==e?e:0),function(t,e,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==e&&(t=t>=e?t:e)),t}(Me(t),e,r)},i:Ar,n:function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(ce);return Ce(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ar(t,e,{leading:n,maxWait:e,trailing:i})},o:Ee,r:function(t,e){return Nr(t,e)}}),{setters:[],execute:function(){var e,xe;r="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")(),o=i.Symbol,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=o?o.toStringTag:void 0,h=Object.prototype.toString,l="[object Null]",y="[object Undefined]",p=o?o.toStringTag:void 0,f="[object Symbol]",_=Array.isArray,m=/\s/,O=/^\s+/,d=NaN,v=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,x=/^0o[0-7]+$/i,b=parseInt,E="[object AsyncFunction]",N="[object Function]",A="[object GeneratorFunction]",g="[object Proxy]",C=i["__core-js_shared__"],e=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""),M=e?"Symbol(src)_1."+e:"",R=Function.prototype.toString,w=/[\\^$.*+?()[\]{}|]/g,S=/^\[object .+?Constructor\]$/,I=Function.prototype,j=Object.prototype,L=I.toString,U=j.hasOwnProperty,H=RegExp("^"+L.call(U).replace(w,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=Ie(i,"WeakMap"),D=9007199254740991,P=/^(?:0|[1-9]\d*)$/,Y=9007199254740991,X=Object.prototype,z="[object Arguments]",F=Object.prototype,Q=F.hasOwnProperty,$=F.propertyIsEnumerable,Z=He(function(){return arguments}())?He:function(t){return Ae(t)&&Q.call(t,"callee")&&!$.call(t,"callee")},k="object"==typeof exports&&exports&&!exports.nodeType&&exports,q=k&&"object"==typeof module&&module&&!module.nodeType&&module,B=q&&q.exports===k?i.Buffer:void 0,W=(B?B.isBuffer:void 0)||Ve,(K={})["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Arguments]"]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object Boolean]"]=K["[object DataView]"]=K["[object Date]"]=K["[object Error]"]=K["[object Function]"]=K["[object Map]"]=K["[object Number]"]=K["[object Object]"]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object WeakMap]"]=!1,G="object"==typeof exports&&exports&&!exports.nodeType&&exports,J=G&&"object"==typeof module&&module&&!module.nodeType&&module,tt=J&&J.exports===G&&r.process,et=function(){try{var t=J&&J.require&&J.require("util").types;return t||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=et&&et.isTypedArray,nt=rt?(xe=rt,function(t){return xe(t)}):De,it=Object.prototype.hasOwnProperty,ot=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),at=Object.prototype.hasOwnProperty,st=Ie(Object,"create"),ut="__lodash_hash_undefined__",ct=Object.prototype.hasOwnProperty,ht=Object.prototype.hasOwnProperty,lt="__lodash_hash_undefined__",ke.prototype.clear=ze,ke.prototype.delete=Fe,ke.prototype.get=Qe,ke.prototype.has=$e,ke.prototype.set=Ze,yt=Array.prototype.splice,tr.prototype.clear=qe,tr.prototype.delete=We,tr.prototype.get=Ke,tr.prototype.has=Ge,tr.prototype.set=Je,pt=Ie(i,"Map"),sr.prototype.clear=er,sr.prototype.delete=nr,sr.prototype.get=ir,sr.prototype.has=or,sr.prototype.set=ar,ft=200,pr.prototype.clear=ur,pr.prototype.delete=cr,pr.prototype.get=hr,pr.prototype.has=lr,pr.prototype.set=yr,_t=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,Ot=mt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}(mt(t),function(e){return _t.call(t,e)}))}:fr,dt=Ie(i,"DataView"),vt=Ie(i,"Promise"),Tt=Ie(i,"Set"),xt="[object Map]",bt="[object Promise]",Et="[object Set]",Nt="[object WeakMap]",At="[object DataView]",gt=we(dt),Ct=we(pt),Mt=we(vt),Rt=we(Tt),wt=we(V),St=Ne,(dt&&St(new dt(new ArrayBuffer(1)))!=At||pt&&St(new pt)!=xt||vt&&St(vt.resolve())!=bt||Tt&&St(new Tt)!=Et||V&&St(new V)!=Nt)&&(St=function(t){var e=Ne(t),r="[object Object]"==e?t.constructor:void 0,n=r?we(r):"";if(n)switch(n){case gt:return At;case Ct:return xt;case Mt:return bt;case Rt:return Et;case wt:return Nt}return e}),It=St,jt=i.Uint8Array,Lt="__lodash_hash_undefined__",dr.prototype.add=dr.prototype.push=mr,dr.prototype.has=Or,Ut=1,Ht=2,Vt=1,Dt=2,Pt="[object Boolean]",Yt="[object Date]",Xt="[object Error]",zt="[object Map]",Ft="[object Number]",Qt="[object RegExp]",$t="[object Set]",Zt="[object String]",kt="[object Symbol]",qt="[object ArrayBuffer]",Bt="[object DataView]",Wt=o?o.prototype:void 0,Kt=Wt?Wt.valueOf:void 0,Gt=1,Jt=Object.prototype.hasOwnProperty,te=1,ee="[object Arguments]",re="[object Array]",ne="[object Object]",ie=Object.prototype.hasOwnProperty,oe=function(){return i.Date.now()},ae="Expected a function",se=Math.max,ue=Math.min,ce="Expected a function",he=" ",le=Math.PI,ye=Math.PI/180,pe={ROUND:Pr,TO_ABS:Yr,TO_REL:Xr,NORMALIZE_HVZ:zr,NORMALIZE_ST:Fr,QT_TO_C:Qr,INFO:$r,SANITIZE:Zr,MATRIX:kr,ROTATE:qr,TRANSLATE:Br,SCALE:Wr,SKEW_X:Kr,SKEW_Y:Gr,X_AXIS_SYMMETRY:Jr,Y_AXIS_SYMMETRY:tn,A_TO_C:en,ANNOTATE_ARCS:rn,CLONE:nn,CALCULATE_BOUNDS:on,REVERSE_PATH:Vr,REMOVE_COLLINEAR:Hr},fe=class{round(t){return this.transform(pe.ROUND(t))}toAbs(){return this.transform(pe.TO_ABS())}toRel(){return this.transform(pe.TO_REL())}normalizeHVZ(t,e,r){return this.transform(pe.NORMALIZE_HVZ(t,e,r))}normalizeST(){return this.transform(pe.NORMALIZE_ST())}qtToC(){return this.transform(pe.QT_TO_C())}aToC(){return this.transform(pe.A_TO_C())}sanitize(t){return this.transform(pe.SANITIZE(t))}translate(t,e){return this.transform(pe.TRANSLATE(t,e))}scale(t,e){return this.transform(pe.SCALE(t,e))}rotate(t,e,r){return this.transform(pe.ROTATE(t,e,r))}matrix(t,e,r,n,i,o){return this.transform(pe.MATRIX(t,e,r,n,i,o))}skewX(t){return this.transform(pe.SKEW_X(t))}skewY(t){return this.transform(pe.SKEW_Y(t))}xSymmetry(t){return this.transform(pe.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(pe.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(pe.ANNOTATE_ARCS())}},_e=t=>" "===t||"\t"===t||"\r"===t||"\n"===t,me=t=>"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0),Oe=class extends fe{constructor(...t){super(...t),Ee(this,"curNumber",""),Ee(this,"curCommandType",-1),Ee(this,"curCommandRelative",!1),Ee(this,"canParseCommandOrComma",!0),Ee(this,"curNumberHasExp",!1),Ee(this,"curNumberHasExpDigits",!1),Ee(this,"curNumberHasDecimal",!1),Ee(this,"curArgs",[])}finish(t=[]){if(this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const r=t=>{e.push(t),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let n=0;n<t.length;n++){const i=t[n],o=!(this.curCommandType!==ve.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),a=me(i)&&("0"===this.curNumber&&"0"===i||o);if(!me(i)||a)if("e"!==i&&"E"!==i)if("-"!==i&&"+"!==i||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==i||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){const t=Number(this.curNumber);if(isNaN(t))throw new SyntaxError(`Invalid number ending at ${n}`);if(this.curCommandType===ve.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>t)throw new SyntaxError(`Expected positive number, got "${t}" at index "${n}"`)}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${n}"`);this.curArgs.push(t),this.curArgs.length===Te[this.curCommandType]&&(ve.HORIZ_LINE_TO===this.curCommandType?r({type:ve.HORIZ_LINE_TO,relative:this.curCommandRelative,x:t}):ve.VERT_LINE_TO===this.curCommandType?r({type:ve.VERT_LINE_TO,relative:this.curCommandRelative,y:t}):this.curCommandType===ve.MOVE_TO||this.curCommandType===ve.LINE_TO||this.curCommandType===ve.SMOOTH_QUAD_TO?(r({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),ve.MOVE_TO===this.curCommandType&&(this.curCommandType=ve.LINE_TO)):this.curCommandType===ve.CURVE_TO?r({type:ve.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===ve.SMOOTH_CURVE_TO?r({type:ve.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===ve.QUAD_TO?r({type:ve.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===ve.ARC&&r({type:ve.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!_e(i))if(","===i&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==i&&"-"!==i&&"."!==i)if(a)this.curNumber=i,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(`Unterminated command at index ${n}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${i}" at index ${n}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,"z"!==i&&"Z"!==i)if("h"===i||"H"===i)this.curCommandType=ve.HORIZ_LINE_TO,this.curCommandRelative="h"===i;else if("v"===i||"V"===i)this.curCommandType=ve.VERT_LINE_TO,this.curCommandRelative="v"===i;else if("m"===i||"M"===i)this.curCommandType=ve.MOVE_TO,this.curCommandRelative="m"===i;else if("l"===i||"L"===i)this.curCommandType=ve.LINE_TO,this.curCommandRelative="l"===i;else if("c"===i||"C"===i)this.curCommandType=ve.CURVE_TO,this.curCommandRelative="c"===i;else if("s"===i||"S"===i)this.curCommandType=ve.SMOOTH_CURVE_TO,this.curCommandRelative="s"===i;else if("q"===i||"Q"===i)this.curCommandType=ve.QUAD_TO,this.curCommandRelative="q"===i;else if("t"===i||"T"===i)this.curCommandType=ve.SMOOTH_QUAD_TO,this.curCommandRelative="t"===i;else{if("a"!==i&&"A"!==i)throw new SyntaxError(`Unexpected character "${i}" at index ${n}.`);this.curCommandType=ve.ARC,this.curCommandRelative="a"===i}else e.push({type:ve.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=i,this.curNumberHasDecimal="."===i}else this.curNumber+=i,this.curNumberHasDecimal=!0;else this.curNumber+=i;else this.curNumber+=i,this.curNumberHasExp=!0;else this.curNumber+=i,this.curNumberHasExpDigits=this.curNumberHasExp}return e}transform(t){return Object.create(this,{parse:{value(e,r=[]){const n=Object.getPrototypeOf(this).parse.call(this,e);for(const i of n){const e=t(i);Array.isArray(e)?r.push(...e):r.push(e)}return r}}})}},t("t",ve=class t extends fe{constructor(e){super(),Ee(this,"commands",void 0),this.commands="string"==typeof e?t.parse(e):e}encode(){return t.encode(this.commands)}getBounds(){const t=pe.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const r of this.commands){const n=t(r);Array.isArray(n)?e.push(...n):e.push(n)}return this.commands=e,this}reverse(t=!0){return this.commands=pe.REVERSE_PATH(this.commands,t),this}removeCollinear(){return this.commands=pe.REMOVE_COLLINEAR(this.commands),this}static encode(t){return gr(t)}static parse(t){const e=new Oe,r=[];return e.parse(t,r),e.finish(r),r}}),de=ve,Ee(ve,"CLOSE_PATH",1),Ee(ve,"MOVE_TO",2),Ee(ve,"HORIZ_LINE_TO",4),Ee(ve,"VERT_LINE_TO",8),Ee(ve,"LINE_TO",16),Ee(ve,"CURVE_TO",32),Ee(ve,"SMOOTH_CURVE_TO",64),Ee(ve,"QUAD_TO",128),Ee(ve,"SMOOTH_QUAD_TO",256),Ee(ve,"ARC",512),Ee(ve,"LINE_COMMANDS",de.LINE_TO|de.HORIZ_LINE_TO|de.VERT_LINE_TO),Ee(ve,"DRAWING_COMMANDS",de.HORIZ_LINE_TO|de.VERT_LINE_TO|de.LINE_TO|de.CURVE_TO|de.SMOOTH_CURVE_TO|de.QUAD_TO|de.SMOOTH_QUAD_TO|de.ARC),Te={[ve.MOVE_TO]:2,[ve.LINE_TO]:2,[ve.HORIZ_LINE_TO]:1,[ve.VERT_LINE_TO]:1,[ve.CLOSE_PATH]:0,[ve.QUAD_TO]:4,[ve.SMOOTH_QUAD_TO]:2,[ve.CURVE_TO]:6,[ve.SMOOTH_CURVE_TO]:4,[ve.ARC]:7}}}});