@digital-blueprint/esign-app
Version:
[GitHub Repository](https://github.com/digital-blueprint/esign-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/esign-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/esign-app/) | [Esign Bundle](https://gitlab.tugraz.
72 lines (70 loc) • 152 kB
JavaScript
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* @dbp-toolkit/common: LGPL-2.1-or-later
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* @dbp-toolkit/notification: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* path-to-regexp: MIT
* universal-router: MIT
* generateUrls: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
* @tugraz/web-components: LGPL-2.1-or-later
* @digital-blueprint/annotpdf: MIT
* lit-html: BSD-3-Clause
* pdfjs-dist: Apache-2.0
* @popperjs/core: MIT
* tippy.js: MIT
* @dbp-toolkit/tooltip: LGPL-2.1-or-later
* @dbp-toolkit/file-handling: LGPL-2.1-or-later
* @dbp-toolkit/tabulator-table: LGPL-2.1-or-later
* webdav: MIT
* tabulator-tables: MIT
* jose: MIT
* file-saver: MIT
* jquery: MIT
* select2: MIT
* @dbp-toolkit/resource-select: LGPL-2.1-or-later
* xlsx: Apache-2.0
* @babel/runtime: MIT
* fflate: MIT
* jspdf: MIT
* jspdf-autotable: MIT
* i18next: MIT
* @lit/reactive-element: BSD-3-Clause
* lit-element: BSD-3-Clause
* @open-wc/dedupe-mixin: MIT
* @open-wc/scoped-elements: MIT
* dialog-polyfill: BSD
* keycloak-js: Apache-2.0
* fabric: MIT
* jszip: (MIT OR GPL-3.0-or-later)
* path2d: MIT
* html2canvas: MIT
* dompurify: (MPL-2.0 OR Apache-2.0)
* core-js: MIT
* raf: MIT
* performance-now: MIT
* rgbcolor: MIT OR SEE LICENSE IN FEEL-FREE.md
* svg-pathdata: MIT
* stackblur-canvas: MIT
* canvg: MIT
*/
import{c as t,g as e}from"./notification.DeyWnWpq.es.js";import{_ as r}from"./tabulator-table.ChqKjPBF.es.js";import"./modal.DTvHO8c1.es.js";import"./activity.VnYC76Eo.es.js";var i=function(t){return t&&t.Math===Math&&t},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||i("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a={},s=function(t){try{return!!t()}catch(t){return!0}},o=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!s((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=h,l=Function.prototype.call,c=u?l.bind(l):function(){return l.apply(l,arguments)},f={},g={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d=p&&!g.call({1:2},1);f.f=d?function(t){var e=p(this,t);return!!e&&e.enumerable}:g;var y,v,m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=h,b=Function.prototype,w=b.call,S=x&&b.bind.bind(w,w),T=x?S:function(t){return function(){return w.apply(t,arguments)}},O=T,A=O({}.toString),C=O("".slice),P=function(t){return C(A(t),8,-1)},E=s,N=P,M=Object,R=T("".split),_=E((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"===N(t)?R(t,""):M(t)}:M,V=function(t){return null==t},I=V,k=TypeError,L=function(t){if(I(t))throw new k("Can't call method on "+t);return t},D=_,j=L,z=function(t){return D(j(t))},B="object"==typeof document&&document.all,F=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},U=F,H=function(t){return"object"==typeof t?null!==t:U(t)},X=n,Y=F,q=function(t,e){return arguments.length<2?(r=X[t],Y(r)?r:void 0):X[t]&&X[t][e];var r},W=T({}.isPrototypeOf),$="undefined"!=typeof navigator&&String(navigator.userAgent)||"",G=n,Q=$,Z=G.process,K=G.Deno,J=Z&&Z.versions||K&&K.version,tt=J&&J.v8;tt&&(v=(y=tt.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!v&&Q&&(!(y=Q.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Q.match(/Chrome\/(\d+)/))&&(v=+y[1]);var et=v,rt=et,it=s,nt=n.String,at=!!Object.getOwnPropertySymbols&&!it((function(){var t=Symbol("symbol detection");return!nt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),st=at&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=q,ht=F,ut=W,lt=Object,ct=st?function(t){return"symbol"==typeof t}:function(t){var e=ot("Symbol");return ht(e)&&ut(e.prototype,lt(t))},ft=String,gt=function(t){try{return ft(t)}catch(t){return"Object"}},pt=F,dt=gt,yt=TypeError,vt=function(t){if(pt(t))return t;throw new yt(dt(t)+" is not a function")},mt=vt,xt=V,bt=function(t,e){var r=t[e];return xt(r)?void 0:mt(r)},wt=c,St=F,Tt=H,Ot=TypeError,At={exports:{}},Ct=n,Pt=Object.defineProperty,Et=function(t,e){try{Pt(Ct,t,{value:e,configurable:!0,writable:!0})}catch(r){Ct[t]=e}return e},Nt=n,Mt=Et,Rt="__core-js_shared__",_t=At.exports=Nt[Rt]||Mt(Rt,{});(_t.versions||(_t.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Vt=At.exports,It=Vt,kt=function(t,e){return It[t]||(It[t]=e||{})},Lt=L,Dt=Object,jt=function(t){return Dt(Lt(t))},zt=jt,Bt=T({}.hasOwnProperty),Ft=Object.hasOwn||function(t,e){return Bt(zt(t),e)},Ut=T,Ht=0,Xt=Math.random(),Yt=Ut(1..toString),qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Yt(++Ht+Xt,36)},Wt=kt,$t=Ft,Gt=qt,Qt=at,Zt=st,Kt=n.Symbol,Jt=Wt("wks"),te=Zt?Kt.for||Kt:Kt&&Kt.withoutSetter||Gt,ee=function(t){return $t(Jt,t)||(Jt[t]=Qt&&$t(Kt,t)?Kt[t]:te("Symbol."+t)),Jt[t]},re=c,ie=H,ne=ct,ae=bt,se=function(t,e){var r,i;if("string"===e&&St(r=t.toString)&&!Tt(i=wt(r,t)))return i;if(St(r=t.valueOf)&&!Tt(i=wt(r,t)))return i;if("string"!==e&&St(r=t.toString)&&!Tt(i=wt(r,t)))return i;throw new Ot("Can't convert object to primitive value")},oe=TypeError,he=ee("toPrimitive"),ue=function(t,e){if(!ie(t)||ne(t))return t;var r,i=ae(t,he);if(i){if(void 0===e&&(e="default"),r=re(i,t,e),!ie(r)||ne(r))return r;throw new oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),se(t,e)},le=ct,ce=function(t){var e=ue(t,"string");return le(e)?e:e+""},fe=H,ge=n.document,pe=fe(ge)&&fe(ge.createElement),de=function(t){return pe?ge.createElement(t):{}},ye=de,ve=!o&&!s((function(){return 7!==Object.defineProperty(ye("div"),"a",{get:function(){return 7}}).a})),me=o,xe=c,be=f,we=m,Se=z,Te=ce,Oe=Ft,Ae=ve,Ce=Object.getOwnPropertyDescriptor;a.f=me?Ce:function(t,e){if(t=Se(t),e=Te(e),Ae)try{return Ce(t,e)}catch(t){}if(Oe(t,e))return we(!xe(be.f,t,e),t[e])};var Pe={},Ee=o&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ne=H,Me=String,Re=TypeError,_e=function(t){if(Ne(t))return t;throw new Re(Me(t)+" is not an object")},Ve=o,Ie=ve,ke=Ee,Le=_e,De=ce,je=TypeError,ze=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,Fe="enumerable",Ue="configurable",He="writable";Pe.f=Ve?ke?function(t,e,r){if(Le(t),e=De(e),Le(r),"function"==typeof t&&"prototype"===e&&"value"in r&&He in r&&!r[He]){var i=Be(t,e);i&&i[He]&&(t[e]=r.value,r={configurable:Ue in r?r[Ue]:i[Ue],enumerable:Fe in r?r[Fe]:i[Fe],writable:!1})}return ze(t,e,r)}:ze:function(t,e,r){if(Le(t),e=De(e),Le(r),Ie)try{return ze(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new je("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Xe=Pe,Ye=m,qe=o?function(t,e,r){return Xe.f(t,e,Ye(1,r))}:function(t,e,r){return t[e]=r,t},We={exports:{}},$e=o,Ge=Ft,Qe=Function.prototype,Ze=$e&&Object.getOwnPropertyDescriptor,Ke=Ge(Qe,"name"),Je={PROPER:Ke&&"something"===function(){}.name,CONFIGURABLE:Ke&&(!$e||$e&&Ze(Qe,"name").configurable)},tr=F,er=Vt,rr=T(Function.toString);tr(er.inspectSource)||(er.inspectSource=function(t){return rr(t)});var ir,nr,ar,sr=er.inspectSource,or=F,hr=n.WeakMap,ur=or(hr)&&/native code/.test(String(hr)),lr=qt,cr=kt("keys"),fr=function(t){return cr[t]||(cr[t]=lr(t))},gr={},pr=ur,dr=n,yr=H,vr=qe,mr=Ft,xr=Vt,br=fr,wr=gr,Sr="Object already initialized",Tr=dr.TypeError,Or=dr.WeakMap;if(pr||xr.state){var Ar=xr.state||(xr.state=new Or);Ar.get=Ar.get,Ar.has=Ar.has,Ar.set=Ar.set,ir=function(t,e){if(Ar.has(t))throw new Tr(Sr);return e.facade=t,Ar.set(t,e),e},nr=function(t){return Ar.get(t)||{}},ar=function(t){return Ar.has(t)}}else{var Cr=br("state");wr[Cr]=!0,ir=function(t,e){if(mr(t,Cr))throw new Tr(Sr);return e.facade=t,vr(t,Cr,e),e},nr=function(t){return mr(t,Cr)?t[Cr]:{}},ar=function(t){return mr(t,Cr)}}var Pr={set:ir,get:nr,has:ar,enforce:function(t){return ar(t)?nr(t):ir(t,{})},getterFor:function(t){return function(e){var r;if(!yr(e)||(r=nr(e)).type!==t)throw new Tr("Incompatible receiver, "+t+" required");return r}}},Er=T,Nr=s,Mr=F,Rr=Ft,_r=o,Vr=Je.CONFIGURABLE,Ir=sr,kr=Pr.enforce,Lr=Pr.get,Dr=String,jr=Object.defineProperty,zr=Er("".slice),Br=Er("".replace),Fr=Er([].join),Ur=_r&&!Nr((function(){return 8!==jr((function(){}),"length",{value:8}).length})),Hr=String(String).split("String"),Xr=We.exports=function(t,e,r){"Symbol("===zr(Dr(e),0,7)&&(e="["+Br(Dr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Rr(t,"name")||Vr&&t.name!==e)&&(_r?jr(t,"name",{value:e,configurable:!0}):t.name=e),Ur&&r&&Rr(r,"arity")&&t.length!==r.arity&&jr(t,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?_r&&jr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=kr(t);return Rr(i,"source")||(i.source=Fr(Hr,"string"==typeof e?e:"")),t};Function.prototype.toString=Xr((function(){return Mr(this)&&Lr(this).source||Ir(this)}),"toString");var Yr,qr=We.exports,Wr=F,$r=Pe,Gr=qr,Qr=Et,Zr=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Wr(r)&&Gr(r,a,i),i.global)n?t[e]=r:Qr(e,r);else{try{i.unsafe?t[e]&&(n=!0):delete t[e]}catch(t){}n?t[e]=r:$r.f(t,e,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},Kr={},Jr=Math.ceil,ti=Math.floor,ei=Math.trunc||function(t){var e=+t;return(e>0?ti:Jr)(e)},ri=ei,ii=function(t){var e=+t;return e!=e||0===e?0:ri(e)},ni=ii,ai=Math.max,si=Math.min,oi=ii,hi=Math.min,ui=function(t){var e=oi(t);return e>0?hi(e,9007199254740991):0},li=ui,ci=function(t){return li(t.length)},fi=z,gi=function(t,e){var r=ni(t);return r<0?ai(r+e,0):si(r,e)},pi=ci,di={indexOf:(Yr=!1,function(t,e,r){var i=fi(t),n=pi(i);if(0===n)return!Yr&&-1;var a,s=gi(r,n);if(Yr&&e!=e){for(;n>s;)if((a=i[s++])!=a)return!0}else for(;n>s;s++)if((Yr||s in i)&&i[s]===e)return Yr||s||0;return!Yr&&-1})},yi=Ft,vi=z,mi=di.indexOf,xi=gr,bi=T([].push),wi=function(t,e){var r,i=vi(t),n=0,a=[];for(r in i)!yi(xi,r)&&yi(i,r)&&bi(a,r);for(;e.length>n;)yi(i,r=e[n++])&&(~mi(a,r)||bi(a,r));return a},Si=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ti=wi,Oi=Si.concat("length","prototype");Kr.f=Object.getOwnPropertyNames||function(t){return Ti(t,Oi)};var Ai={};Ai.f=Object.getOwnPropertySymbols;var Ci=q,Pi=Kr,Ei=Ai,Ni=_e,Mi=T([].concat),Ri=Ci("Reflect","ownKeys")||function(t){var e=Pi.f(Ni(t)),r=Ei.f;return r?Mi(e,r(t)):e},_i=Ft,Vi=Ri,Ii=a,ki=Pe,Li=s,Di=F,ji=/#|\.prototype\./,zi=function(t,e){var r=Fi[Bi(t)];return r===Hi||r!==Ui&&(Di(e)?Li(e):!!e)},Bi=zi.normalize=function(t){return String(t).replace(ji,".").toLowerCase()},Fi=zi.data={},Ui=zi.NATIVE="N",Hi=zi.POLYFILL="P",Xi=zi,Yi=n,qi=a.f,Wi=qe,$i=Zr,Gi=Et,Qi=function(t,e,r){for(var i=Vi(e),n=ki.f,a=Ii.f,s=0;s<i.length;s++){var o=i[s];_i(t,o)||r&&_i(r,o)||n(t,o,a(e,o))}},Zi=Xi,Ki=function(t,e){var r,i,n,a,s,o=t.target,h=t.global,u=t.stat;if(r=h?Yi:u?Yi[o]||Gi(o,{}):Yi[o]&&Yi[o].prototype)for(i in e){if(a=e[i],n=t.dontCallGetSet?(s=qi(r,i))&&s.value:r[i],!Zi(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof a==typeof n)continue;Qi(a,n)}(t.sham||n&&n.sham)&&Wi(a,"sham",!0),$i(r,i,a,t)}},Ji="process"===P(n.process),tn=T,en=vt,rn=H,nn=function(t){return rn(t)||null===t},an=String,sn=TypeError,on=function(t,e,r){try{return tn(en(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},hn=H,un=L,ln=function(t){if(nn(t))return t;throw new sn("Can't set "+an(t)+" as a prototype")},cn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=on(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return un(r),ln(i),hn(r)?(e?t(r,i):r.__proto__=i,r):r}}():void 0),fn=Pe.f,gn=Ft,pn=ee("toStringTag"),dn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!gn(t,pn)&&fn(t,pn,{configurable:!0,value:e})},yn=qr,vn=Pe,mn=q,xn=function(t,e,r){return r.get&&yn(r.get,e,{getter:!0}),r.set&&yn(r.set,e,{setter:!0}),vn.f(t,e,r)},bn=o,wn=ee("species"),Sn=W,Tn=TypeError,On={};On[ee("toStringTag")]="z";var An="[object z]"===String(On),Cn=F,Pn=P,En=ee("toStringTag"),Nn=Object,Mn="Arguments"===Pn(function(){return arguments}()),Rn=An?Pn:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Nn(t),En))?r:Mn?Pn(e):"Object"===(i=Pn(e))&&Cn(e.callee)?"Arguments":i},_n=T,Vn=s,In=F,kn=Rn,Ln=sr,Dn=function(){},jn=q("Reflect","construct"),zn=/^\s*(?:class|function)\b/,Bn=_n(zn.exec),Fn=!zn.test(Dn),Un=function(t){if(!In(t))return!1;try{return jn(Dn,[],t),!0}catch(t){return!1}},Hn=function(t){if(!In(t))return!1;switch(kn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Fn||!!Bn(zn,Ln(t))}catch(t){return!0}};Hn.sham=!0;var Xn,Yn,qn,Wn,$n=!jn||Vn((function(){var t;return Un(Un.call)||!Un(Object)||!Un((function(){t=!0}))||t}))?Hn:Un,Gn=$n,Qn=gt,Zn=TypeError,Kn=_e,Jn=function(t){if(Gn(t))return t;throw new Zn(Qn(t)+" is not a constructor")},ta=V,ea=ee("species"),ra=function(t,e){var r,i=Kn(t).constructor;return void 0===i||ta(r=Kn(i)[ea])?e:Jn(r)},ia=h,na=Function.prototype,aa=na.apply,sa=na.call,oa="object"==typeof Reflect&&Reflect.apply||(ia?sa.bind(aa):function(){return sa.apply(aa,arguments)}),ha=P,ua=T,la=function(t){if("Function"===ha(t))return ua(t)},ca=vt,fa=h,ga=la(la.bind),pa=function(t,e){return ca(t),void 0===e?t:fa?ga(t,e):function(){return t.apply(e,arguments)}},da=q("document","documentElement"),ya=T([].slice),va=TypeError,ma=/(?:ipad|iphone|ipod).*applewebkit/i.test($),xa=n,ba=oa,wa=pa,Sa=F,Ta=Ft,Oa=s,Aa=da,Ca=ya,Pa=de,Ea=function(t,e){if(t<e)throw new va("Not enough arguments");return t},Na=ma,Ma=Ji,Ra=xa.setImmediate,_a=xa.clearImmediate,Va=xa.process,Ia=xa.Dispatch,ka=xa.Function,La=xa.MessageChannel,Da=xa.String,ja=0,za={},Ba="onreadystatechange";Oa((function(){Xn=xa.location}));var Fa=function(t){if(Ta(za,t)){var e=za[t];delete za[t],e()}},Ua=function(t){return function(){Fa(t)}},Ha=function(t){Fa(t.data)},Xa=function(t){xa.postMessage(Da(t),Xn.protocol+"//"+Xn.host)};Ra&&_a||(Ra=function(t){Ea(arguments.length,1);var e=Sa(t)?t:ka(t),r=Ca(arguments,1);return za[++ja]=function(){ba(e,void 0,r)},Yn(ja),ja},_a=function(t){delete za[t]},Ma?Yn=function(t){Va.nextTick(Ua(t))}:Ia&&Ia.now?Yn=function(t){Ia.now(Ua(t))}:La&&!Na?(Wn=(qn=new La).port2,qn.port1.onmessage=Ha,Yn=wa(Wn.postMessage,Wn)):xa.addEventListener&&Sa(xa.postMessage)&&!xa.importScripts&&Xn&&"file:"!==Xn.protocol&&!Oa(Xa)?(Yn=Xa,xa.addEventListener("message",Ha,!1)):Yn=Ba in Pa("script")?function(t){Aa.appendChild(Pa("script"))[Ba]=function(){Aa.removeChild(this),Fa(t)}}:function(t){setTimeout(Ua(t),0)});var Ya={set:Ra},qa=n,Wa=o,$a=Object.getOwnPropertyDescriptor,Ga=function(){this.head=null,this.tail=null};Ga.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Qa,Za,Ka,Ja,ts,es=Ga,rs=/ipad|iphone|ipod/i.test($)&&"undefined"!=typeof Pebble,is=/web0s(?!.*chrome)/i.test($),ns=n,as=function(t){if(!Wa)return qa[t];var e=$a(qa,t);return e&&e.value},ss=pa,os=Ya.set,hs=es,us=ma,ls=rs,cs=is,fs=Ji,gs=ns.MutationObserver||ns.WebKitMutationObserver,ps=ns.document,ds=ns.process,ys=ns.Promise,vs=as("queueMicrotask");if(!vs){var ms=new hs,xs=function(){var t,e;for(fs&&(t=ds.domain)&&t.exit();e=ms.get();)try{e()}catch(t){throw ms.head&&Qa(),t}t&&t.enter()};us||fs||cs||!gs||!ps?!ls&&ys&&ys.resolve?((Ja=ys.resolve(void 0)).constructor=ys,ts=ss(Ja.then,Ja),Qa=function(){ts(xs)}):fs?Qa=function(){ds.nextTick(xs)}:(os=ss(os,ns),Qa=function(){os(xs)}):(Za=!0,Ka=ps.createTextNode(""),new gs(xs).observe(Ka,{characterData:!0}),Qa=function(){Ka.data=Za=!Za}),vs=function(t){ms.head||Qa(),ms.add(t)}}var bs=vs,ws=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ss=n.Promise,Ts="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Os=!Ts&&!Ji&&"object"==typeof window&&"object"==typeof document,As=n,Cs=Ss,Ps=F,Es=Xi,Ns=sr,Ms=ee,Rs=Os,_s=Ts,Vs=et;Cs&&Cs.prototype;var Is=Ms("species"),ks=!1,Ls=Ps(As.PromiseRejectionEvent),Ds=Es("Promise",(function(){var t=Ns(Cs),e=t!==String(Cs);if(!e&&66===Vs)return!0;if(!Vs||Vs<51||!/native code/.test(t)){var r=new Cs((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Is]=i,!(ks=r.then((function(){}))instanceof i))return!0}return!e&&(Rs||_s)&&!Ls})),js={CONSTRUCTOR:Ds,REJECTION_EVENT:Ls,SUBCLASSING:ks},zs={},Bs=vt,Fs=TypeError,Us=function(t){var e,r;this.promise=new t((function(t,i){if(void 0!==e||void 0!==r)throw new Fs("Bad Promise constructor");e=t,r=i})),this.resolve=Bs(e),this.reject=Bs(r)};zs.f=function(t){return new Us(t)};var Hs,Xs,Ys,qs=Ki,Ws=Ji,$s=n,Gs=c,Qs=Zr,Zs=cn,Ks=dn,Js=function(t){var e=mn(t);bn&&e&&!e[wn]&&xn(e,wn,{configurable:!0,get:function(){return this}})},to=vt,eo=F,ro=H,io=function(t,e){if(Sn(e,t))return t;throw new Tn("Incorrect invocation")},no=ra,ao=Ya.set,so=bs,oo=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},ho=ws,uo=es,lo=Pr,co=Ss,fo=zs,go="Promise",po=js.CONSTRUCTOR,yo=js.REJECTION_EVENT,vo=js.SUBCLASSING,mo=lo.getterFor(go),xo=lo.set,bo=co&&co.prototype,wo=co,So=bo,To=$s.TypeError,Oo=$s.document,Ao=$s.process,Co=fo.f,Po=Co,Eo=!!(Oo&&Oo.createEvent&&$s.dispatchEvent),No="unhandledrejection",Mo=function(t){var e;return!(!ro(t)||!eo(e=t.then))&&e},Ro=function(t,e){var r,i,n,a=e.value,s=1===e.state,o=s?t.ok:t.fail,h=t.resolve,u=t.reject,l=t.domain;try{o?(s||(2===e.rejection&&Lo(e),e.rejection=1),!0===o?r=a:(l&&l.enter(),r=o(a),l&&(l.exit(),n=!0)),r===t.promise?u(new To("Promise-chain cycle")):(i=Mo(r))?Gs(i,r,h,u):h(r)):u(a)}catch(t){l&&!n&&l.exit(),u(t)}},_o=function(t,e){t.notified||(t.notified=!0,so((function(){for(var r,i=t.reactions;r=i.get();)Ro(r,t);t.notified=!1,e&&!t.rejection&&Io(t)})))},Vo=function(t,e,r){var i,n;Eo?((i=Oo.createEvent("Event")).promise=e,i.reason=r,i.initEvent(t,!1,!0),$s.dispatchEvent(i)):i={promise:e,reason:r},!yo&&(n=$s["on"+t])?n(i):t===No&&oo("Unhandled promise rejection",r)},Io=function(t){Gs(ao,$s,(function(){var e,r=t.facade,i=t.value;if(ko(t)&&(e=ho((function(){Ws?Ao.emit("unhandledRejection",i,r):Vo(No,r,i)})),t.rejection=Ws||ko(t)?2:1,e.error))throw e.value}))},ko=function(t){return 1!==t.rejection&&!t.parent},Lo=function(t){Gs(ao,$s,(function(){var e=t.facade;Ws?Ao.emit("rejectionHandled",e):Vo("rejectionhandled",e,t.value)}))},Do=function(t,e,r){return function(i){t(e,i,r)}},jo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,_o(t,!0))},zo=function t(e,r,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===r)throw new To("Promise can't be resolved itself");var n=Mo(r);n?so((function(){var i={done:!1};try{Gs(n,r,Do(t,i,e),Do(jo,i,e))}catch(t){jo(i,t,e)}})):(e.value=r,e.state=1,_o(e,!1))}catch(t){jo({done:!1},t,e)}}};if(po&&(So=(wo=function(t){io(this,So),to(t),Gs(Hs,this);var e=mo(this);try{t(Do(zo,e),Do(jo,e))}catch(t){jo(e,t)}}).prototype,(Hs=function(t){xo(this,{type:go,done:!1,notified:!1,parent:!1,reactions:new uo,rejection:!1,state:0,value:void 0})}).prototype=Qs(So,"then",(function(t,e){var r=mo(this),i=Co(no(this,wo));return r.parent=!0,i.ok=!eo(t)||t,i.fail=eo(e)&&e,i.domain=Ws?Ao.domain:void 0,0===r.state?r.reactions.add(i):so((function(){Ro(i,r)})),i.promise})),Xs=function(){var t=new Hs,e=mo(t);this.promise=t,this.resolve=Do(zo,e),this.reject=Do(jo,e)},fo.f=Co=function(t){return t===wo||undefined===t?new Xs(t):Po(t)},eo(co)&&bo!==Object.prototype)){Ys=bo.then,vo||Qs(bo,"then",(function(t,e){var r=this;return new wo((function(t,e){Gs(Ys,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete bo.constructor}catch(t){}Zs&&Zs(bo,So)}qs({global:!0,constructor:!0,wrap:!0,forced:po},{Promise:wo}),Ks(wo,go,!1),Js(go);var Bo={},Fo=Bo,Uo=ee("iterator"),Ho=Array.prototype,Xo=Rn,Yo=bt,qo=V,Wo=Bo,$o=ee("iterator"),Go=function(t){if(!qo(t))return Yo(t,$o)||Yo(t,"@@iterator")||Wo[Xo(t)]},Qo=c,Zo=vt,Ko=_e,Jo=gt,th=Go,eh=TypeError,rh=c,ih=_e,nh=bt,ah=pa,sh=c,oh=_e,hh=gt,uh=function(t){return void 0!==t&&(Fo.Array===t||Ho[Uo]===t)},lh=ci,ch=W,fh=function(t,e){var r=arguments.length<2?th(t):e;if(Zo(r))return Ko(Qo(r,t));throw new eh(Jo(t)+" is not iterable")},gh=Go,ph=function(t,e,r){var i,n;ih(t);try{if(!(i=nh(t,"return"))){if("throw"===e)throw r;return r}i=rh(i,t)}catch(t){n=!0,i=t}if("throw"===e)throw r;if(n)throw i;return ih(i),r},dh=TypeError,yh=function(t,e){this.stopped=t,this.result=e},vh=yh.prototype,mh=function(t,e,r){var i,n,a,s,o,h,u,l=r&&r.that,c=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),d=ah(e,l),y=function(t){return i&&ph(i,"normal",t),new yh(!0,t)},v=function(t){return c?(oh(t),p?d(t[0],t[1],y):d(t[0],t[1])):p?d(t,y):d(t)};if(f)i=t.iterator;else if(g)i=t;else{if(!(n=gh(t)))throw new dh(hh(t)+" is not iterable");if(uh(n)){for(a=0,s=lh(t);s>a;a++)if((o=v(t[a]))&&ch(vh,o))return o;return new yh(!1)}i=fh(t,n)}for(h=f?t.next:i.next;!(u=sh(h,i)).done;){try{o=v(u.value)}catch(t){ph(i,"throw",t)}if("object"==typeof o&&o&&ch(vh,o))return o}return new yh(!1)},xh=ee("iterator"),bh=!1;try{var wh=0,Sh={next:function(){return{done:!!wh++}},return:function(){bh=!0}};Sh[xh]=function(){return this},Array.from(Sh,(function(){throw 2}))}catch(t){}var Th=Ss,Oh=function(t,e){try{if(!e&&!bh)return!1}catch(t){return!1}var r=!1;try{var i={};i[xh]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r},Ah=js.CONSTRUCTOR||!Oh((function(t){Th.all(t).then(void 0,(function(){}))})),Ch=c,Ph=vt,Eh=zs,Nh=ws,Mh=mh;Ki({target:"Promise",stat:!0,forced:Ah},{all:function(t){var e=this,r=Eh.f(e),i=r.resolve,n=r.reject,a=Nh((function(){var r=Ph(e.resolve),a=[],s=0,o=1;Mh(t,(function(t){var h=s++,u=!1;o++,Ch(r,e,t).then((function(t){u||(u=!0,a[h]=t,--o||i(a))}),n)})),--o||i(a)}));return a.error&&n(a.value),r.promise}});var Rh=Ki,_h=js.CONSTRUCTOR,Vh=Ss,Ih=q,kh=F,Lh=Zr,Dh=Vh&&Vh.prototype;if(Rh({target:"Promise",proto:!0,forced:_h,real:!0},{catch:function(t){return this.then(void 0,t)}}),kh(Vh)){var jh=Ih("Promise").prototype.catch;Dh.catch!==jh&&Lh(Dh,"catch",jh,{unsafe:!0})}var zh=c,Bh=vt,Fh=zs,Uh=ws,Hh=mh;Ki({target:"Promise",stat:!0,forced:Ah},{race:function(t){var e=this,r=Fh.f(e),i=r.reject,n=Uh((function(){var n=Bh(e.resolve);Hh(t,(function(t){zh(n,e,t).then(r.resolve,i)}))}));return n.error&&i(n.value),r.promise}});var Xh=zs;Ki({target:"Promise",stat:!0,forced:js.CONSTRUCTOR},{reject:function(t){var e=Xh.f(this);return(0,e.reject)(t),e.promise}});var Yh=_e,qh=H,Wh=zs,$h=Ki,Gh=js.CONSTRUCTOR,Qh=function(t,e){if(Yh(t),qh(e)&&e.constructor===t)return e;var r=Wh.f(t);return(0,r.resolve)(e),r.promise};function Zh(t,e,r,i,n,a,s){try{var o=t[a](s),h=o.value}catch(t){return void r(t)}o.done?e(h):Promise.resolve(h).then(i,n)}function Kh(t){return function(){var e=this,r=arguments;return new Promise((function(i,n){var a=t.apply(e,r);function s(t){Zh(a,i,n,s,o,"next",t)}function o(t){Zh(a,i,n,s,o,"throw",t)}s(void 0)}))}}q("Promise"),$h({target:"Promise",stat:!0,forced:Gh},{resolve:function(t){return Qh(this,t)}});var Jh=Rn,tu=String,eu=function(t){if("Symbol"===Jh(t))throw new TypeError("Cannot convert a Symbol value to a string");return tu(t)},ru=_e,iu=function(){var t=ru(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},nu=s,au=n.RegExp,su=nu((function(){var t=au("a","y");return t.lastIndex=2,null!==t.exec("abcd")}));su||nu((function(){return!au("a","y").sticky}));var ou={BROKEN_CARET:su||nu((function(){var t=au("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),UNSUPPORTED_Y:su},hu={},uu=wi,lu=Si,cu=Object.keys||function(t){return uu(t,lu)},fu=o,gu=Ee,pu=Pe,du=_e,yu=z,vu=cu;hu.f=fu&&!gu?Object.defineProperties:function(t,e){du(t);for(var r,i=yu(e),n=vu(e),a=n.length,s=0;a>s;)pu.f(t,r=n[s++],i[r]);return t};var mu,xu=_e,bu=hu,wu=Si,Su=gr,Tu=da,Ou=de,Au="prototype",Cu="script",Pu=fr("IE_PROTO"),Eu=function(){},Nu=function(t){return"<"+Cu+">"+t+"</"+Cu+">"},Mu=function(t){t.write(Nu("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ru=function(){try{mu=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Ru="undefined"!=typeof document?document.domain&&mu?Mu(mu):(e=Ou("iframe"),r="java"+Cu+":",e.style.display="none",Tu.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Nu("document.F=Object")),t.close(),t.F):Mu(mu);for(var i=wu.length;i--;)delete Ru[Au][wu[i]];return Ru()};Su[Pu]=!0;var _u,Vu,Iu=Object.create||function(t,e){var r;return null!==t?(Eu[Au]=xu(t),r=new Eu,Eu[Au]=null,r[Pu]=t):r=Ru(),void 0===e?r:bu.f(r,e)},ku=s,Lu=n.RegExp,Du=ku((function(){var t=Lu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),ju=s,zu=n.RegExp,Bu=ju((function(){var t=zu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Fu=c,Uu=T,Hu=eu,Xu=iu,Yu=ou,qu=Iu,Wu=Pr.get,$u=Du,Gu=Bu,Qu=kt("native-string-replace",String.prototype.replace),Zu=RegExp.prototype.exec,Ku=Zu,Ju=Uu("".charAt),tl=Uu("".indexOf),el=Uu("".replace),rl=Uu("".slice),il=(Vu=/b*/g,Fu(Zu,_u=/a/,"a"),Fu(Zu,Vu,"a"),0!==_u.lastIndex||0!==Vu.lastIndex),nl=Yu.BROKEN_CARET,al=void 0!==/()??/.exec("")[1];(il||al||nl||$u||Gu)&&(Ku=function(t){var e,r,i,n,a,s,o,h=this,u=Wu(h),l=Hu(t),c=u.raw;if(c)return c.lastIndex=h.lastIndex,e=Fu(Ku,c,l),h.lastIndex=c.lastIndex,e;var f=u.groups,g=nl&&h.sticky,p=Fu(Xu,h),d=h.source,y=0,v=l;if(g&&(p=el(p,"y",""),-1===tl(p,"g")&&(p+="g"),v=rl(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Ju(l,h.lastIndex-1))&&(d="(?: "+d+")",v=" "+v,y++),r=new RegExp("^(?:"+d+")",p)),al&&(r=new RegExp("^"+d+"$(?!\\s)",p)),il&&(i=h.lastIndex),n=Fu(Zu,g?r:h,v),g?n?(n.input=rl(n.input,y),n[0]=rl(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:il&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),al&&n&&n.length>1&&Fu(Qu,n[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(n[a]=void 0)})),n&&f)for(n.groups=s=qu(null),a=0;a<f.length;a++)s[(o=f[a])[0]]=n[o[1]];return n});var sl=Ku;Ki({target:"RegExp",proto:!0,forced:/./.exec!==sl},{exec:sl});var ol,hl=c,ul=Zr,ll=sl,cl=s,fl=ee,gl=qe,pl=fl("species"),dl=RegExp.prototype,yl=function(t,e,r,i){var n=fl(t),a=!cl((function(){var e={};return e[n]=function(){return 7},7!==""[t](e)})),s=a&&!cl((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[pl]=function(){return r},r.flags="",r[n]=/./[n]),r.exec=function(){return e=!0,null},r[n](""),!e}));if(!a||!s||r){var o=/./[n],h=e(n,""[t],(function(t,e,r,i,n){var s=e.exec;return s===ll||s===dl.exec?a&&!n?{done:!0,value:hl(o,e,r,i)}:{done:!0,value:hl(t,r,e,i)}:{done:!1}}));ul(String.prototype,t,h[0]),ul(dl,n,h[1])}i&&gl(dl[n],"sham",!0)},vl=T,ml=ii,xl=eu,bl=L,wl=vl("".charAt),Sl=vl("".charCodeAt),Tl=vl("".slice),Ol={charAt:(ol=!0,function(t,e){var r,i,n=xl(bl(t)),a=ml(e),s=n.length;return a<0||a>=s?ol?"":void 0:(r=Sl(n,a))<55296||r>56319||a+1===s||(i=Sl(n,a+1))<56320||i>57343?ol?wl(n,a):r:ol?Tl(n,a,a+2):i-56320+(r-55296<<10)+65536})}.charAt,Al=function(t,e,r){return e+(r?Ol(t,e).length:1)},Cl=c,Pl=_e,El=F,Nl=P,Ml=sl,Rl=TypeError,_l=function(t,e){var r=t.exec;if(El(r)){var i=Cl(r,t,e);return null!==i&&Pl(i),i}if("RegExp"===Nl(t))return Cl(Ml,t,e);throw new Rl("RegExp#exec called on incompatible receiver")},Vl=c,Il=_e,kl=V,Ll=ui,Dl=eu,jl=L,zl=bt,Bl=Al,Fl=_l;yl("match",(function(t,e,r){return[function(e){var r=jl(this),i=kl(e)?void 0:zl(e,t);return i?Vl(i,e,r):new RegExp(e)[t](Dl(r))},function(t){var i=Il(this),n=Dl(t),a=r(e,i,n);if(a.done)return a.value;if(!i.global)return Fl(i,n);var s=i.unicode;i.lastIndex=0;for(var o,h=[],u=0;null!==(o=Fl(i,n));){var l=Dl(o[0]);h[u]=l,""===l&&(i.lastIndex=Bl(n,Ll(i.lastIndex),s)),u++}return 0===u?null:h}]}));var Ul=T,Hl=jt,Xl=Math.floor,Yl=Ul("".charAt),ql=Ul("".replace),Wl=Ul("".slice),$l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Gl=/\$([$&'`]|\d{1,2})/g,Ql=oa,Zl=c,Kl=T,Jl=yl,tc=s,ec=_e,rc=F,ic=V,nc=ii,ac=ui,sc=eu,oc=L,hc=Al,uc=bt,lc=function(t,e,r,i,n,a){var s=r+t.length,o=i.length,h=Gl;return void 0!==n&&(n=Hl(n),h=$l),ql(a,h,(function(a,h){var u;switch(Yl(h,0)){case"$":return"$";case"&":return t;case"`":return Wl(e,0,r);case"'":return Wl(e,s);case"<":u=n[Wl(h,1,-1)];break;default:var l=+h;if(0===l)return a;if(l>o){var c=Xl(l/10);return 0===c?a:c<=o?void 0===i[c-1]?Yl(h,1):i[c-1]+Yl(h,1):a}u=i[l-1]}return void 0===u?"":u}))},cc=_l,fc=ee("replace"),gc=Math.max,pc=Math.min,dc=Kl([].concat),yc=Kl([].push),vc=Kl("".indexOf),mc=Kl("".slice),xc="$0"==="a".replace(/./,"$0"),bc=!!/./[fc]&&""===/./[fc]("a","$0");Jl("replace",(function(t,e,r){var i=bc?"$":"$0";return[function(t,r){var i=oc(this),n=ic(t)?void 0:uc(t,fc);return n?Zl(n,t,i,r):Zl(e,sc(i),t,r)},function(t,n){var a=ec(this),s=sc(t);if("string"==typeof n&&-1===vc(n,i)&&-1===vc(n,"$<")){var o=r(e,a,s,n);if(o.done)return o.value}var h=rc(n);h||(n=sc(n));var u,l=a.global;l&&(u=a.unicode,a.lastIndex=0);for(var c,f=[];null!==(c=cc(a,s))&&(yc(f,c),l);){""===sc(c[0])&&(a.lastIndex=hc(s,ac(a.lastIndex),u))}for(var g,p="",d=0,y=0;y<f.length;y++){for(var v,m=sc((c=f[y])[0]),x=gc(pc(nc(c.index),s.length),0),b=[],w=1;w<c.length;w++)yc(b,void 0===(g=c[w])?g:String(g));var S=c.groups;if(h){var T=dc([m],b,x,s);void 0!==S&&yc(T,S),v=sc(Ql(n,void 0,T))}else v=lc(m,s,x,b,S,n);x>=d&&(p+=mc(s,d,x)+v,d=x+m.length)}return p+mc(s,d)}]}),!!tc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!xc||bc);var wc,Sc=H,Tc=P,Oc=ee("match"),Ac=function(t){var e;return Sc(t)&&(void 0!==(e=t[Oc])?!!e:"RegExp"===Tc(t))},Cc=TypeError,Pc=function(t){if(Ac(t))throw new Cc("The method doesn't accept regular expressions");return t},Ec=ee("match"),Nc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Ec]=!1,"/./"[t](e)}catch(t){}}return!1},Mc=Ki,Rc=la,_c=a.f,Vc=ui,Ic=eu,kc=Pc,Lc=L,Dc=Nc,jc=Rc("".slice),zc=Math.min,Bc=Dc("startsWith");Mc({target:"String",proto:!0,forced:!!(Bc||(wc=_c(String.prototype,"startsWith"),!wc||wc.writable))&&!Bc},{startsWith:function(t){var e=Ic(Lc(this));kc(t);var r=Vc(zc(arguments.length>1?arguments[1]:void 0,e.length)),i=Ic(t);return jc(e,r,r+i.length)===i}});var Fc=ee,Uc=Iu,Hc=Pe.f,Xc=Fc("unscopables"),Yc=Array.prototype;void 0===Yc[Xc]&&Hc(Yc,Xc,{configurable:!0,value:Uc(null)});var qc,Wc,$c,Gc=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qc=Ft,Zc=F,Kc=jt,Jc=Gc,tf=fr("IE_PROTO"),ef=Object,rf=ef.prototype,nf=Jc?ef.getPrototypeOf:function(t){var e=Kc(t);if(Qc(e,tf))return e[tf];var r=e.constructor;return Zc(r)&&e instanceof r?r.prototype:e instanceof ef?rf:null},af=s,sf=F,of=H,hf=nf,uf=Zr,lf=ee("iterator"),cf=!1;[].keys&&("next"in($c=[].keys())?(Wc=hf(hf($c)))!==Object.prototype&&(qc=Wc):cf=!0);var ff=!of(qc)||af((function(){var t={};return qc[lf].call(t)!==t}));ff&&(qc={}),sf(qc[lf])||uf(qc,lf,(function(){return this}));var gf={IteratorPrototype:qc,BUGGY_SAFARI_ITERATORS:cf},pf=gf.IteratorPrototype,df=Iu,yf=m,vf=dn,mf=Bo,xf=function(){return this},bf=Ki,wf=c,Sf=F,Tf=function(t,e,r,i){var n=e+" Iterator";return t.prototype=df(pf,{next:yf(+!i,r)}),vf(t,n,!1),mf[n]=xf,t},Of=nf,Af=cn,Cf=dn,Pf=qe,Ef=Zr,Nf=Bo,Mf=Je.PROPER,Rf=Je.CONFIGURABLE,_f=gf.IteratorPrototype,Vf=gf.BUGGY_SAFARI_ITERATORS,If=ee("iterator"),kf="keys",Lf="values",Df="entries",jf=function(){return this},zf=z,Bf=function(t){Yc[Xc][t]=!0},Ff=Bo,Uf=Pr,Hf=Pe.f,Xf=function(t,e,r,i,n,a,s){Tf(r,e,i);var o,h,u,l=function(t){if(t===n&&d)return d;if(!Vf&&t&&t in g)return g[t];switch(t){case kf:case Lf:case Df:return function(){return new r(this,t)}}return function(){return new r(this)}},c=e+" Iterator",f=!1,g=t.prototype,p=g[If]||g["@@iterator"]||n&&g[n],d=!Vf&&p||l(n),y="Array"===e&&g.entries||p;if(y&&(o=Of(y.call(new t)))!==Object.prototype&&o.next&&(Of(o)!==_f&&(Af?Af(o,_f):Sf(o[If])||Ef(o,If,jf)),Cf(o,c,!0)),Mf&&n===Lf&&p&&p.name!==Lf&&(Rf?Pf(g,"name",Lf):(f=!0,d=function(){return wf(p,this)})),n)if(h={values:l(Lf),keys:a?d:l(kf),entries:l(Df)},s)for(u in h)(Vf||f||!(u in g))&&Ef(g,u,h[u]);else bf({target:e,proto:!0,forced:Vf||f},h);return g[If]!==d&&Ef(g,If,d,{name:n}),Nf[e]=d,h},Yf=function(t,e){return{value:t,done:e}},qf=o,Wf="Array Iterator",$f=Uf.set,Gf=Uf.getterFor(Wf),Qf=Xf(Array,"Array",(function(t,e){$f(this,{type:Wf,target:zf(t),index:0,kind:e})}),(function(){var t=Gf(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,Yf(void 0,!0);switch(t.kind){case"keys":return Yf(r,!1);case"values":return Yf(e[r],!1)}return Yf([r,e[r]],!1)}),"values"),Zf=Ff.Arguments=Ff.Array;if(Bf("keys"),Bf("values"),Bf("entries"),qf&&"values"!==Zf.name)try{Hf(Zf,"name",{value:"values"})}catch(t){}var Kf=de("span").classList,Jf=Kf&&Kf.constructor&&Kf.constructor.prototype,tg=Jf===Object.prototype?void 0:Jf,eg=n,rg={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ig=tg,ng=Qf,ag=qe,sg=dn,og=ee("iterator"),hg=ng.values,ug=function(t,e){if(t){if(t[og]!==hg)try{ag(t,og,hg)}catch(e){t[og]=hg}if(sg(t,e,!0),rg[e])for(var r in ng)if(t[r]!==ng[r])try{ag(t,r,ng[r])}catch(e){t[r]=ng[r]}}};for(var lg in rg)ug(eg[lg]&&eg[lg].prototype,lg);function cg(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function fg(t,e,r){return(e=cg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}ug(ig,"DOMTokenList");var gg,pg=vt,dg=jt,yg=_,vg=ci,mg=TypeError,xg="Reduce of empty array with no initial value",bg={left:(gg=!1,function(t,e,r,i){var n=dg(t),a=yg(n),s=vg(n);if(pg(e),0===s&&r<2)throw new mg(xg);var o=gg?s-1:0,h=gg?-1:1;if(r<2)for(;;){if(o in a){i=a[o],o+=h;break}if(o+=h,gg?o<0:s<=o)throw new mg(xg)}for(;gg?o>=0:s>o;o+=h)o in a&&(i=e(i,a[o],o,n));return i})},wg=s,Sg=function(t,e){var r=[][t];return!!r&&wg((function(){r.call(null,e||function(){return 1},1)}))},Tg=bg.left;Ki({target:"Array",proto:!0,forced:!Ji&&et>79&&et<83||!Sg("reduce")},{reduce:function(t){var e=arguments.length;return Tg(this,t,e,e>1?arguments[1]:void 0)}});var Og=Ki,Ag=la,Cg=a.f,Pg=ui,Eg=eu,Ng=Pc,Mg=L,Rg=Nc,_g=Ag("".slice),Vg=Math.min,Ig=Rg("endsWith"),kg=!Ig&&!!function(){var t=Cg(String.prototype,"endsWith");return t&&!t.writable}();Og({target:"String",proto:!0,forced:!kg&&!Ig},{endsWith:function(t){var e=Eg(Mg(this));Ng(t);var r=arguments.length>1?arguments[1]:void 0,i=e.length,n=void 0===r?i:Vg(Pg(r),i),a=Eg(t);return _g(e,n-a.length,n)===a}});var Lg=c,Dg=T,jg=yl,zg=_e,Bg=V,Fg=L,Ug=ra,Hg=Al,Xg=ui,Yg=eu,qg=bt,Wg=_l,$g=s,Gg=ou.UNSUPPORTED_Y,Qg=Math.min,Zg=Dg([].push),Kg=Dg("".slice),Jg=!$g((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),tp="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;jg("split",(function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:Lg(e,this,t,r)}:e;return[function(e,r){var n=Fg(this),a=Bg(e)?void 0:qg(e,t);return a?Lg(a,e,n,r):Lg(i,Yg(n),e,r)},function(t,n){var a=zg(this),s=Yg(t);if(!tp){var o=r(i,a,s,n,i!==e);if(o.done)return o.value}var h=Ug(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Gg?"g":"y"),c=new h(Gg?"^(?:"+a.source+")":a,l),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===s.length)return null===Wg(c,s)?[s]:[];for(var g=0,p=0,d=[];p<s.length;){c.lastIndex=Gg?0:p;var y,v=Wg(c,Gg?Kg(s,p):s);if(null===v||(y=Qg(Xg(c.lastIndex+(Gg?p:0)),s.length))===g)p=Hg(s,p,u);else{if(Zg(d,Kg(s,g,p)),d.length===f)return d;for(var m=1;m<=v.length-1;m++)if(Zg(d,v[m]),d.length===f)return d;p=g=y}}return Zg(d,Kg(s,g)),d}]}),tp||!Jg,Gg);var ep={exports:{}},rp={exports:{}},ip=rp.exports;(function(){var t,e,r,i,n,a;"undefined"!=typeof performance&&null!==performance&&performance.now?rp.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(rp.exports=function(){return(t()-n)/1e6},e=process.hrtime,i=(t=function(){var t;return 1e9*(t=e())[0]+t[1]})(),a=1e9*process.uptime(),n=i-a):Date.now?(rp.exports=function(){return Date.now()-r},r=Date.now()):(rp.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(ip);for(var np=rp.exports,ap="undefined"==typeof window?t:window,sp=["moz","webkit"],op="AnimationFrame",hp=ap["request"+op],up=ap["cancel"+op]||ap["cancelRequest"+op],lp=0;!hp&&lp<sp.length;lp++)hp=ap[sp[lp]+"Request"+op],up=ap[sp[lp]+"Cancel"+op]||ap[sp[lp]+"CancelRequest"+op];if(!hp||!up){var cp=0,fp=0,gp=[],pp=1e3/60;hp=function(t){if(0===gp.length){var e=np(),r=Math.max(0,pp-(e-cp));cp=r+e,setTimeout((function(){var t=gp.slice(0);gp.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(cp)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return gp.push({handle:++fp,callback:t,cancelled:!1}),fp},up=function(t){for(var e=0;e<gp.length;e++)gp[e].handle===t&&(gp[e].cancelled=!0)}}ep.exports=function(t){return hp.call(ap,t)},ep.exports.cancel=function(){up.apply(ap,arguments)},ep.exports.polyfill=function(t){t||(t=ap),t.requestAnimationFrame=hp,t.cancelAnimationFrame=up};var dp,yp=e(ep.exports),vp="\t\n\v\f\r \u2028\u2029\ufeff",mp=L,xp=eu,bp=vp,wp=T("".replace),Sp=RegExp("^["+bp+"]+"),Tp=RegExp("(^|[^"+bp+"])["+bp+"]+$"),Op={trim:(dp=3,function(t){var e=xp(mp(t));return 1&dp&&(e=wp(e,Sp,"")),2&dp&&(e=wp(e,Tp,"$1")),e})},Ap=Je.PROPER,Cp=s,Pp=vp,Ep=Op.trim;Ki({target:"String",proto:!0,forced:function(t){return Cp((function(){return!!Pp[t]()||"
"!=="
"[t]()||Ap&&Pp[t].name!==t}))}("trim")},{trim:function(){return Ep(this)}});var Np=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var 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",rebeccapurple:"663399",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"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var n=r[i].re,a=r[i].process,s=n.exec(t);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),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.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,i=0;i<r.length;i++)for(var n=r[i].example,a=0;a<n.length;a++)t[t.length]=n[a];for(var s in e)t[t.length]=s;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),l.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(l),h.appendChild(c),o.appendChild(h)}catch(t){}return o}},Mp=e(Np),Rp=Ki,_p=di.indexOf,Vp=Sg,Ip=la([].indexOf),kp=!!Ip&&1/Ip([1],1,-0)<0;Rp({target:"Array",proto:!0,forced:kp||!Vp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return kp?Ip(this,t,e)||0:_p(this,t,e)}});var Lp=Ki,Dp=Pc,jp=L,zp=eu,Bp=Nc,Fp=T("".indexOf);Lp({target:"String",proto:!0,forced:!Bp("includes")},{includes:function(t){return!!~Fp(zp(jp(this)),zp(Dp(t)),arguments.length>1?arguments[1]:void 0)}});var Up=P,Hp=Ki,Xp=Array.isArray||function(t){return"Array"===Up(t)},Yp=T([].reverse),qp=[1,2];Hp({target:"Array",proto:!0,forced:String(qp)===String(qp.reverse())},{reverse:function(){return Xp(this)&&(this.length=this.length),Yp(this)}});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var Wp=function(t,e){return(Wp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function $p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Wp(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Gp(t,e){var r=t[0],i=t[1];return[r*Math.cos(e)-i*Math.sin(e),r*Math.sin(e)+i*Math.cos(e)]}function Qp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Zp=Math.PI;function Kp(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var i=t.rX,n=t.rY,a=t.x,s=t.y;i=Math.abs(t.rX),n=Math.abs(t.rY);var o=Gp([(e-a)/2,(r-s)/2],-t.xRot/180*Zp),h=o[0],u=o[1],l=Math.pow(h,2)/Math.pow(i,2)+Math.pow(u,2)/Math.pow(n,2);1<l&&(i*=Math.sqrt(l),n*=Math.sqrt(l)),t.rX=i,t.rY=n;var c=Math.pow(i,2)*Math.pow(u,2)+Math.pow(n,2)*Math.pow(h,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(n,2)-c)/c)),g=i*u/n*f,p=-n*h/i*f,d=Gp([g,p],t.xRot/180*Zp);t.cX=d[0]+(e+a)/2,t.cY=d[1]+(r+s)/2,t.phi1=Math.atan2((u-p)/n,(h-g)/i),t.phi2=Math.atan2((-u-p)/n,(-h-g)/i),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*Zp),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*Zp),t.phi1*=180/Zp,t.phi2*=180/Zp}function Jp(t,e,r){Qp(t,e,r);var i=t*t+e*e-r*r;if(0>i)return[];if(0===i)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(i);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var td,ed=Math.PI/180;function rd(t,e,r){return(1-r)*t+r*e}function id(t,e,r,i){return t+Math.cos(i/180*Zp)*e+Math.sin(i/180*Zp)*r}function nd(t,e,r,i){var n=1e-6,a=e-t,s=r-e,o=3*a+3*(i-r)-6*s,h=6*(s-a),u=3*a;return Math.abs(o)<n?[-u/h]:function(t,e,r){var i=t*t/4-e;if(i<-1e-6)return[];if(i<=r)return[-t/2];var n=Math.sqrt(i);return[-t/2-n,-t/2+n]}(h/o,u/o,n)}function ad(t,e,r,i,n){var a=1-n;return t*(a*a*a)+e*(3*a*a*n)+r*(3*a*n*n)+i*(n*n*n)}!function(t){function e(){return n((function(t,e,r){return 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 r(){var t=NaN,e=NaN,r=NaN,i=NaN;return n((function(n,a,s){return n.type&cd.SMOOTH_CURVE_TO&&(n.type=cd.CURVE_TO,t=isNaN(t)?a:t,e=isNaN(e)?s:e,n.x1=n.relative?a-t:2*a-t,n.y1=n.relative?s-e:2*s-e),n.type&cd.CURVE_TO?(t=n.relative?a+n.x2:n.x2,e=n.relative?s+n.y2:n.y2):(t=NaN,e=NaN),n.type&cd.SMOOTH_QUAD_TO&&(n.type=cd.QUAD_TO,r=isNaN(r)?a:r,i=isNaN(i)?s:i,n.x1=n.relative?a-r:2*a-r,n.y1=n.relative?s-i:2*s-i),n.type&cd.QUAD_TO?(r=n.relative?a+n.x1:n.x1,i=n.relative?s+n.y1:n.y1):(r=NaN,i=NaN),n}))}function i(){var t=NaN,e=NaN;return n((function(r,i,n){if(r.type&cd.SMOOTH_QUAD_TO&&(r.type=cd.QUAD_TO,t=isNaN(t)?i:t,e=isNaN(e)?n:e,r.x1=r.relative?i-t:2*i-t,r.y1=r.relative?n-e:2*n-e),r.type&cd.QUAD_TO){t=r.relative?i+r.x1:r.x1,e=r.relative?n+r.y1:r.y1;var a=r.x1,s=r.y1;r.type=cd.CURVE_TO,r.x1=((r.relative?0:i)+2*a)/3,r.y1=((r.relative?0:n)+2*s)/3,r.x2=(r.x+2*a)/3,r.y2=(r.y+2*s)/3}else t=NaN,e=NaN;return r}))}function n(t){var e=0,r=0,i=NaN,n=NaN;return function(a){if(isNaN(i)&&!(a.type&cd.MOVE_TO))throw new Error("path must start with moveto");var s=t(a,e,r,i,n);return a.type&cd.CLOSE_PATH&&(e=i,r=n),void 0!==a.x&&(e=a.relative?e+a.x:a.x),void 0!==a.y&&(r=a.relative?r+a.y:a.y),a.type&cd.MOVE_TO&&(i=e,n=r),s}}function a(t,e,r,i,a,s){return Qp(t,e,r,i,a,s),n((function(n,o,h,u){var l=n.x1,c=n.x2,f=n.relative&&!isNaN(u),g=void 0!==n.x?n.x:f?0:o,p=void 0!==n.y?n.y:f?0:h;function d(t){return t*t}n.type&cd.HORIZ_LINE_TO&&0!==e&&(n.type=cd.LINE_TO,n.y=n.relative?0:h),n.type&cd.VERT_LINE_TO&&0!==r&&(n.type=cd.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+p*r+(f?0:a)),void 0!==n.y&&(n.y=g*e+n.y*i+(f?0:s)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*r+(f?0:a)),void 0!==n.y1&&(n.y1=l*e+n.y1*i+(f?0:s)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*r+(f?0:a)),void 0!==n.y2&&(n.y2=c*e+n.y2*i+(f?0:s));var y=t*i-e*r;if(void 0!==n.xRot&&(1!==t||0!==e||0!==r||1!==i))if(0===y)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=cd.LINE_TO;else{var v=n.xRot*Math.PI/180,m=Math.sin(v),x=Math.cos(v),b=1/d(n.rX),w=1/d(n.rY),S=d(x)*b+d(m)*w,T=2*m*x*(b-w),O=d(m)*b+d(x)*w,A=S*i*i-T*e*i+O*e*e,C=T*(t*i+e*r)-2*(S*r*i+O*t*e),P=S*r*r-T*t*r+O*t*t,E=(Math.atan2(C,A-P)+Math.PI)%Math.PI/2,N=Math.sin(E),M=Math.cos(E);n.rX=Math.abs(y)/Math.sqrt(A*d(M)+C*N*M+P*d(N)),n.rY=Math.abs(y)/Math.sqrt(A*d(N)-C*N*M