hise-flow-graphs 1.1.20 → 1.1.21

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.
Files changed (52) hide show
  1. package/dist/@types/CertificateTypes.d.ts +64 -0
  2. package/dist/@types/GeneralTypes.d.ts +35 -0
  3. package/dist/components/Certificates/CertificateGraph/LayerBackButton.d.ts +2 -0
  4. package/dist/components/Certificates/CertificateGraph/NodeAttributes.d.ts +9 -0
  5. package/dist/components/Certificates/CertificateGraph/helpers.d.ts +31 -0
  6. package/dist/components/Certificates/CertificateGraph/index.d.ts +16 -0
  7. package/dist/components/Certificates/EditCertificate/EditNode.d.ts +3 -0
  8. package/dist/components/Certificates/EditCertificate/EditNodeModal.d.ts +18 -0
  9. package/dist/components/Certificates/EditCertificate/MaskMetadataModal/EMRMaskingTables.d.ts +10 -0
  10. package/dist/components/Certificates/EditCertificate/MaskMetadataModal/MaskMetadataTable.d.ts +20 -0
  11. package/dist/components/Certificates/EditCertificate/MaskMetadataModal/helpers.d.ts +7 -0
  12. package/dist/components/Certificates/EditCertificate/MaskMetadataModal/index.d.ts +21 -0
  13. package/dist/components/Certificates/EditCertificate/helpers.d.ts +6 -0
  14. package/dist/components/Certificates/EditCertificate/index.d.ts +8 -0
  15. package/dist/components/Certificates/FileLayerNode/CopyFileLayer.d.ts +24 -0
  16. package/dist/components/Certificates/FileLayerNode/index.d.ts +3 -0
  17. package/dist/components/Certificates/ReadCertificate/MetadataModal/MetadataTable.d.ts +10 -0
  18. package/dist/components/Certificates/ReadCertificate/MetadataModal/helpers.d.ts +8 -0
  19. package/dist/components/Certificates/ReadCertificate/MetadataModal/index.d.ts +10 -0
  20. package/dist/components/Certificates/ReadCertificate/ReadNode.d.ts +3 -0
  21. package/dist/components/Certificates/ReadCertificate/index.d.ts +5 -0
  22. package/dist/components/Certificates/ReviewCertificate/RestrictNode/index.d.ts +10 -0
  23. package/dist/components/Certificates/ReviewCertificate/ReviewNode.d.ts +3 -0
  24. package/dist/components/Certificates/ReviewCertificate/ReviewNodes/index.d.ts +22 -0
  25. package/dist/components/Certificates/ReviewCertificate/helpers.d.ts +14 -0
  26. package/dist/components/Certificates/ReviewCertificate/index.d.ts +7 -0
  27. package/dist/components/Certificates/WalkingGraph/ActionsMenu.d.ts +4 -0
  28. package/dist/components/Certificates/WalkingGraph/LayerItemsModal.d.ts +5 -0
  29. package/dist/components/Certificates/WalkingGraph/WalkingNode.d.ts +3 -0
  30. package/dist/components/Certificates/WalkingGraph/helpers.d.ts +11 -0
  31. package/dist/components/Certificates/WalkingGraph/index.d.ts +5 -0
  32. package/dist/components/Certificates/WorkspaceCertificate/ReplicaIDENode/helpers.d.ts +2 -0
  33. package/dist/components/Certificates/WorkspaceCertificate/ReplicaIDENode/index.d.ts +3 -0
  34. package/dist/components/Certificates/WorkspaceCertificate/ReplicaPipelineNode/index.d.ts +15 -0
  35. package/dist/components/Certificates/WorkspaceCertificate/RestrictedNode/index.d.ts +7 -0
  36. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceFileNode/helpers.d.ts +1 -0
  37. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceFileNode/index.d.ts +3 -0
  38. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceIDENode/IDEModal.d.ts +7 -0
  39. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceIDENode/helpers.d.ts +3 -0
  40. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceIDENode/index.d.ts +3 -0
  41. package/dist/components/Certificates/WorkspaceCertificate/WorkspaceNode/index.d.ts +8 -0
  42. package/dist/components/Certificates/WorkspaceCertificate/WorkspacePipelineNode/PipelineModal.d.ts +7 -0
  43. package/dist/components/Certificates/WorkspaceCertificate/WorkspacePipelineNode/helpers.d.ts +3 -0
  44. package/dist/components/Certificates/WorkspaceCertificate/WorkspacePipelineNode/index.d.ts +3 -0
  45. package/dist/components/Certificates/WorkspaceCertificate/helpers.d.ts +10 -0
  46. package/dist/components/Certificates/WorkspaceCertificate/index.d.ts +8 -0
  47. package/dist/index.d.ts +16 -0
  48. package/dist/index.es.js +9779 -9840
  49. package/dist/index.umd.js +40 -40
  50. package/dist/state/GraphContext.d.ts +21 -0
  51. package/dist/utils/getCertificateBody.d.ts +3 -0
  52. package/package.json +2 -2
package/dist/index.umd.js CHANGED
@@ -1,69 +1,69 @@
1
- (function(ft,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],H):(ft=typeof globalThis<"u"?globalThis:ft||self,H(ft["hise-flow-graphs"]={},ft.jsxRuntime,ft.React,ft.ReactDOM))})(this,(function(ft,H,se,Tx){"use strict";const pv=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},nt=pv(se),vv=pv(Tx);var ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ns(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rs(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 os,gv;function Cx(){if(gv)return os;gv=1;function e(){this.__data__=[],this.size=0}return os=e,os}var is,yv;function gr(){if(yv)return is;yv=1;function e(t,n){return t===n||t!==t&&n!==n}return is=e,is}var as,mv;function si(){if(mv)return as;mv=1;var e=gr();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return as=t,as}var ss,bv;function Ax(){if(bv)return ss;bv=1;var e=si(),t=Array.prototype,n=t.splice;function r(o){var s=this.__data__,l=e(s,o);if(l<0)return!1;var c=s.length-1;return l==c?s.pop():n.call(s,l,1),--this.size,!0}return ss=r,ss}var ls,_v;function Px(){if(_v)return ls;_v=1;var e=si();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return ls=t,ls}var us,wv;function Ix(){if(wv)return us;wv=1;var e=si();function t(n){return e(this.__data__,n)>-1}return us=t,us}var cs,Ov;function Mx(){if(Ov)return cs;Ov=1;var e=si();function t(n,r){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,r])):o[s][1]=r,this}return cs=t,cs}var fs,Ev;function li(){if(Ev)return fs;Ev=1;var e=Cx(),t=Ax(),n=Px(),r=Ix(),o=Mx();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,fs=s,fs}var ds,Sv;function qx(){if(Sv)return ds;Sv=1;var e=li();function t(){this.__data__=new e,this.size=0}return ds=t,ds}var hs,xv;function Lx(){if(xv)return hs;xv=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return hs=e,hs}var ps,kv;function Rx(){if(kv)return ps;kv=1;function e(t){return this.__data__.get(t)}return ps=e,ps}var vs,Nv;function Dx(){if(Nv)return vs;Nv=1;function e(t){return this.__data__.has(t)}return vs=e,vs}var gs,Tv;function Cv(){if(Tv)return gs;Tv=1;var e=typeof ai=="object"&&ai&&ai.Object===Object&&ai;return gs=e,gs}var ys,Av;function rn(){if(Av)return ys;Av=1;var e=Cv(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return ys=n,ys}var ms,Pv;function yr(){if(Pv)return ms;Pv=1;var e=rn(),t=e.Symbol;return ms=t,ms}var bs,Iv;function jx(){if(Iv)return bs;Iv=1;var e=yr(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(l){var c=n.call(l,o),f=l[o];try{l[o]=void 0;var d=!0}catch{}var a=r.call(l);return d&&(c?l[o]=f:delete l[o]),a}return bs=s,bs}var _s,Mv;function Fx(){if(Mv)return _s;Mv=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return _s=n,_s}var ws,qv;function Yn(){if(qv)return ws;qv=1;var e=yr(),t=jx(),n=Fx(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?o:r:s&&s in Object(c)?t(c):n(c)}return ws=l,ws}var Os,Lv;function Wt(){if(Lv)return Os;Lv=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Os=e,Os}var Es,Rv;function no(){if(Rv)return Es;Rv=1;var e=Yn(),t=Wt(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==o||f==n||f==s}return Es=l,Es}var Ss,Dv;function Bx(){if(Dv)return Ss;Dv=1;var e=rn(),t=e["__core-js_shared__"];return Ss=t,Ss}var xs,jv;function zx(){if(jv)return xs;jv=1;var e=Bx(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return xs=n,xs}var ks,Fv;function Bv(){if(Fv)return ks;Fv=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return ks=n,ks}var Ns,zv;function Hx(){if(zv)return Ns;zv=1;var e=no(),t=zx(),n=Wt(),r=Bv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,a=RegExp("^"+f.call(d).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(h){if(!n(h)||t(h))return!1;var p=e(h)?a:s;return p.test(r(h))}return Ns=u,Ns}var Ts,Hv;function $x(){if(Hv)return Ts;Hv=1;function e(t,n){return t?.[n]}return Ts=e,Ts}var Cs,$v;function Zn(){if($v)return Cs;$v=1;var e=Hx(),t=$x();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return Cs=n,Cs}var As,Vv;function Ps(){if(Vv)return As;Vv=1;var e=Zn(),t=rn(),n=e(t,"Map");return As=n,As}var Is,Uv;function ui(){if(Uv)return Is;Uv=1;var e=Zn(),t=e(Object,"create");return Is=t,Is}var Ms,Gv;function Vx(){if(Gv)return Ms;Gv=1;var e=ui();function t(){this.__data__=e?e(null):{},this.size=0}return Ms=t,Ms}var qs,Kv;function Ux(){if(Kv)return qs;Kv=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return qs=e,qs}var Ls,Wv;function Gx(){if(Wv)return Ls;Wv=1;var e=ui(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(s){var l=this.__data__;if(e){var c=l[s];return c===t?void 0:c}return r.call(l,s)?l[s]:void 0}return Ls=o,Ls}var Rs,Yv;function Kx(){if(Yv)return Rs;Yv=1;var e=ui(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return Rs=r,Rs}var Ds,Zv;function Wx(){if(Zv)return Ds;Zv=1;var e=ui(),t="__lodash_hash_undefined__";function n(r,o){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&o===void 0?t:o,this}return Ds=n,Ds}var js,Xv;function Yx(){if(Xv)return js;Xv=1;var e=Vx(),t=Ux(),n=Gx(),r=Kx(),o=Wx();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,js=s,js}var Fs,Qv;function Zx(){if(Qv)return Fs;Qv=1;var e=Yx(),t=li(),n=Ps();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Fs=r,Fs}var Bs,Jv;function Xx(){if(Jv)return Bs;Jv=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Bs=e,Bs}var zs,eg;function ci(){if(eg)return zs;eg=1;var e=Xx();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return zs=t,zs}var Hs,tg;function Qx(){if(tg)return Hs;tg=1;var e=ci();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Hs=t,Hs}var $s,ng;function Jx(){if(ng)return $s;ng=1;var e=ci();function t(n){return e(this,n).get(n)}return $s=t,$s}var Vs,rg;function ek(){if(rg)return Vs;rg=1;var e=ci();function t(n){return e(this,n).has(n)}return Vs=t,Vs}var Us,og;function tk(){if(og)return Us;og=1;var e=ci();function t(n,r){var o=e(this,n),s=o.size;return o.set(n,r),this.size+=o.size==s?0:1,this}return Us=t,Us}var Gs,ig;function Ks(){if(ig)return Gs;ig=1;var e=Zx(),t=Qx(),n=Jx(),r=ek(),o=tk();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,Gs=s,Gs}var Ws,ag;function nk(){if(ag)return Ws;ag=1;var e=li(),t=Ps(),n=Ks(),r=200;function o(s,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([s,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(s,l),this.size=c.size,this}return Ws=o,Ws}var Ys,sg;function fi(){if(sg)return Ys;sg=1;var e=li(),t=qx(),n=Lx(),r=Rx(),o=Dx(),s=nk();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=o,l.prototype.set=s,Ys=l,Ys}var Zs,lg;function Xs(){if(lg)return Zs;lg=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o&&n(t[r],r,t)!==!1;);return t}return Zs=e,Zs}var Qs,ug;function cg(){if(ug)return Qs;ug=1;var e=Zn(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Qs=t,Qs}var Js,fg;function di(){if(fg)return Js;fg=1;var e=cg();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Js=t,Js}var el,dg;function hi(){if(dg)return el;dg=1;var e=di(),t=gr(),n=Object.prototype,r=n.hasOwnProperty;function o(s,l,c){var f=s[l];(!(r.call(s,l)&&t(f,c))||c===void 0&&!(l in s))&&e(s,l,c)}return el=o,el}var tl,hg;function ro(){if(hg)return tl;hg=1;var e=hi(),t=di();function n(r,o,s,l){var c=!s;s||(s={});for(var f=-1,d=o.length;++f<d;){var a=o[f],u=l?l(s[a],r[a],a,s,r):void 0;u===void 0&&(u=r[a]),c?t(s,a,u):e(s,a,u)}return s}return tl=n,tl}var nl,pg;function rk(){if(pg)return nl;pg=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return nl=e,nl}var rl,vg;function dn(){if(vg)return rl;vg=1;function e(t){return t!=null&&typeof t=="object"}return rl=e,rl}var ol,gg;function ok(){if(gg)return ol;gg=1;var e=Yn(),t=dn(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return ol=r,ol}var il,yg;function oo(){if(yg)return il;yg=1;var e=ok(),t=dn(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!o.call(l,"callee")};return il=s,il}var al,mg;function yt(){if(mg)return al;mg=1;var e=Array.isArray;return al=e,al}var io={exports:{}},sl,bg;function ik(){if(bg)return sl;bg=1;function e(){return!1}return sl=e,sl}io.exports;var _g;function mr(){return _g||(_g=1,(function(e,t){var n=rn(),r=ik(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,l=s&&s.exports===o,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||r;e.exports=d})(io,io.exports)),io.exports}var ll,wg;function pi(){if(wg)return ll;wg=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var s=typeof r;return o=o??e,!!o&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return ll=n,ll}var ul,Og;function cl(){if(Og)return ul;Og=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ul=t,ul}var fl,Eg;function ak(){if(Eg)return fl;Eg=1;var e=Yn(),t=cl(),n=dn(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",a="[object Number]",u="[object Object]",h="[object RegExp]",p="[object Set]",O="[object String]",m="[object WeakMap]",_="[object ArrayBuffer]",g="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",y="[object Int8Array]",x="[object Int16Array]",C="[object Int32Array]",N="[object Uint8Array]",I="[object Uint8ClampedArray]",j="[object Uint16Array]",M="[object Uint32Array]",A={};A[w]=A[E]=A[y]=A[x]=A[C]=A[N]=A[I]=A[j]=A[M]=!0,A[r]=A[o]=A[_]=A[s]=A[g]=A[l]=A[c]=A[f]=A[d]=A[a]=A[u]=A[h]=A[p]=A[O]=A[m]=!1;function q(L){return n(L)&&t(L.length)&&!!A[e(L)]}return fl=q,fl}var dl,Sg;function vi(){if(Sg)return dl;Sg=1;function e(t){return function(n){return t(n)}}return dl=e,dl}var ao={exports:{}};ao.exports;var xg;function hl(){return xg||(xg=1,(function(e,t){var n=Cv(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,l=s&&n.process,c=(function(){try{var f=o&&o.require&&o.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(ao,ao.exports)),ao.exports}var pl,kg;function so(){if(kg)return pl;kg=1;var e=ak(),t=vi(),n=hl(),r=n&&n.isTypedArray,o=r?t(r):e;return pl=o,pl}var vl,Ng;function Tg(){if(Ng)return vl;Ng=1;var e=rk(),t=oo(),n=yt(),r=mr(),o=pi(),s=so(),l=Object.prototype,c=l.hasOwnProperty;function f(d,a){var u=n(d),h=!u&&t(d),p=!u&&!h&&r(d),O=!u&&!h&&!p&&s(d),m=u||h||p||O,_=m?e(d.length,String):[],g=_.length;for(var w in d)(a||c.call(d,w))&&!(m&&(w=="length"||p&&(w=="offset"||w=="parent")||O&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,g)))&&_.push(w);return _}return vl=f,vl}var gl,Cg;function gi(){if(Cg)return gl;Cg=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return gl=t,gl}var yl,Ag;function Pg(){if(Ag)return yl;Ag=1;function e(t,n){return function(r){return t(n(r))}}return yl=e,yl}var ml,Ig;function sk(){if(Ig)return ml;Ig=1;var e=Pg(),t=e(Object.keys,Object);return ml=t,ml}var bl,Mg;function _l(){if(Mg)return bl;Mg=1;var e=gi(),t=sk(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&l.push(c);return l}return bl=o,bl}var wl,qg;function En(){if(qg)return wl;qg=1;var e=no(),t=cl();function n(r){return r!=null&&t(r.length)&&!e(r)}return wl=n,wl}var Ol,Lg;function Rn(){if(Lg)return Ol;Lg=1;var e=Tg(),t=_l(),n=En();function r(o){return n(o)?e(o):t(o)}return Ol=r,Ol}var El,Rg;function lk(){if(Rg)return El;Rg=1;var e=ro(),t=Rn();function n(r,o){return r&&e(o,t(o),r)}return El=n,El}var Sl,Dg;function uk(){if(Dg)return Sl;Dg=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Sl=e,Sl}var xl,jg;function ck(){if(jg)return xl;jg=1;var e=Wt(),t=gi(),n=uk(),r=Object.prototype,o=r.hasOwnProperty;function s(l){if(!e(l))return n(l);var c=t(l),f=[];for(var d in l)d=="constructor"&&(c||!o.call(l,d))||f.push(d);return f}return xl=s,xl}var kl,Fg;function Xn(){if(Fg)return kl;Fg=1;var e=Tg(),t=ck(),n=En();function r(o){return n(o)?e(o,!0):t(o)}return kl=r,kl}var Nl,Bg;function fk(){if(Bg)return Nl;Bg=1;var e=ro(),t=Xn();function n(r,o){return r&&e(o,t(o),r)}return Nl=n,Nl}var lo={exports:{}};lo.exports;var zg;function Hg(){return zg||(zg=1,(function(e,t){var n=rn(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,l=s?n.Buffer:void 0,c=l?l.allocUnsafe:void 0;function f(d,a){if(a)return d.slice();var u=d.length,h=c?c(u):new d.constructor(u);return d.copy(h),h}e.exports=f})(lo,lo.exports)),lo.exports}var Tl,$g;function Vg(){if($g)return Tl;$g=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return Tl=e,Tl}var Cl,Ug;function Gg(){if(Ug)return Cl;Ug=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=0,l=[];++r<o;){var c=t[r];n(c,r,t)&&(l[s++]=c)}return l}return Cl=e,Cl}var Al,Kg;function Wg(){if(Kg)return Al;Kg=1;function e(){return[]}return Al=e,Al}var Pl,Yg;function Il(){if(Yg)return Pl;Yg=1;var e=Gg(),t=Wg(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(l){return l==null?[]:(l=Object(l),e(o(l),function(c){return r.call(l,c)}))}:t;return Pl=s,Pl}var Ml,Zg;function dk(){if(Zg)return Ml;Zg=1;var e=ro(),t=Il();function n(r,o){return e(r,t(r),o)}return Ml=n,Ml}var ql,Xg;function Ll(){if(Xg)return ql;Xg=1;function e(t,n){for(var r=-1,o=n.length,s=t.length;++r<o;)t[s+r]=n[r];return t}return ql=e,ql}var Rl,Qg;function yi(){if(Qg)return Rl;Qg=1;var e=Pg(),t=e(Object.getPrototypeOf,Object);return Rl=t,Rl}var Dl,Jg;function ey(){if(Jg)return Dl;Jg=1;var e=Ll(),t=yi(),n=Il(),r=Wg(),o=Object.getOwnPropertySymbols,s=o?function(l){for(var c=[];l;)e(c,n(l)),l=t(l);return c}:r;return Dl=s,Dl}var jl,ty;function hk(){if(ty)return jl;ty=1;var e=ro(),t=ey();function n(r,o){return e(r,t(r),o)}return jl=n,jl}var Fl,ny;function ry(){if(ny)return Fl;ny=1;var e=Ll(),t=yt();function n(r,o,s){var l=o(r);return t(r)?l:e(l,s(r))}return Fl=n,Fl}var Bl,oy;function iy(){if(oy)return Bl;oy=1;var e=ry(),t=Il(),n=Rn();function r(o){return e(o,n,t)}return Bl=r,Bl}var zl,ay;function pk(){if(ay)return zl;ay=1;var e=ry(),t=ey(),n=Xn();function r(o){return e(o,n,t)}return zl=r,zl}var Hl,sy;function vk(){if(sy)return Hl;sy=1;var e=Zn(),t=rn(),n=e(t,"DataView");return Hl=n,Hl}var $l,ly;function gk(){if(ly)return $l;ly=1;var e=Zn(),t=rn(),n=e(t,"Promise");return $l=n,$l}var Vl,uy;function cy(){if(uy)return Vl;uy=1;var e=Zn(),t=rn(),n=e(t,"Set");return Vl=n,Vl}var Ul,fy;function yk(){if(fy)return Ul;fy=1;var e=Zn(),t=rn(),n=e(t,"WeakMap");return Ul=n,Ul}var Gl,dy;function br(){if(dy)return Gl;dy=1;var e=vk(),t=Ps(),n=gk(),r=cy(),o=yk(),s=Yn(),l=Bv(),c="[object Map]",f="[object Object]",d="[object Promise]",a="[object Set]",u="[object WeakMap]",h="[object DataView]",p=l(e),O=l(t),m=l(n),_=l(r),g=l(o),w=s;return(e&&w(new e(new ArrayBuffer(1)))!=h||t&&w(new t)!=c||n&&w(n.resolve())!=d||r&&w(new r)!=a||o&&w(new o)!=u)&&(w=function(E){var y=s(E),x=y==f?E.constructor:void 0,C=x?l(x):"";if(C)switch(C){case p:return h;case O:return c;case m:return d;case _:return a;case g:return u}return y}),Gl=w,Gl}var Kl,hy;function mk(){if(hy)return Kl;hy=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var o=r.length,s=new r.constructor(o);return o&&typeof r[0]=="string"&&t.call(r,"index")&&(s.index=r.index,s.input=r.input),s}return Kl=n,Kl}var Wl,py;function vy(){if(py)return Wl;py=1;var e=rn(),t=e.Uint8Array;return Wl=t,Wl}var Yl,gy;function Zl(){if(gy)return Yl;gy=1;var e=vy();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Yl=t,Yl}var Xl,yy;function bk(){if(yy)return Xl;yy=1;var e=Zl();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Xl=t,Xl}var Ql,my;function _k(){if(my)return Ql;my=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Ql=t,Ql}var Jl,by;function wk(){if(by)return Jl;by=1;var e=yr(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return Jl=r,Jl}var eu,_y;function wy(){if(_y)return eu;_y=1;var e=Zl();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return eu=t,eu}var tu,Oy;function Ok(){if(Oy)return tu;Oy=1;var e=Zl(),t=bk(),n=_k(),r=wk(),o=wy(),s="[object Boolean]",l="[object Date]",c="[object Map]",f="[object Number]",d="[object RegExp]",a="[object Set]",u="[object String]",h="[object Symbol]",p="[object ArrayBuffer]",O="[object DataView]",m="[object Float32Array]",_="[object Float64Array]",g="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",y="[object Uint8Array]",x="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]";function I(j,M,A){var q=j.constructor;switch(M){case p:return e(j);case s:case l:return new q(+j);case O:return t(j,A);case m:case _:case g:case w:case E:case y:case x:case C:case N:return o(j,A);case c:return new q;case f:case u:return new q(j);case d:return n(j);case a:return new q;case h:return r(j)}}return tu=I,tu}var nu,Ey;function Sy(){if(Ey)return nu;Ey=1;var e=Wt(),t=Object.create,n=(function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var s=new r;return r.prototype=void 0,s}})();return nu=n,nu}var ru,xy;function ky(){if(xy)return ru;xy=1;var e=Sy(),t=yi(),n=gi();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return ru=r,ru}var ou,Ny;function Ek(){if(Ny)return ou;Ny=1;var e=br(),t=dn(),n="[object Map]";function r(o){return t(o)&&e(o)==n}return ou=r,ou}var iu,Ty;function Sk(){if(Ty)return iu;Ty=1;var e=Ek(),t=vi(),n=hl(),r=n&&n.isMap,o=r?t(r):e;return iu=o,iu}var au,Cy;function xk(){if(Cy)return au;Cy=1;var e=br(),t=dn(),n="[object Set]";function r(o){return t(o)&&e(o)==n}return au=r,au}var su,Ay;function kk(){if(Ay)return su;Ay=1;var e=xk(),t=vi(),n=hl(),r=n&&n.isSet,o=r?t(r):e;return su=o,su}var lu,Py;function Iy(){if(Py)return lu;Py=1;var e=fi(),t=Xs(),n=hi(),r=lk(),o=fk(),s=Hg(),l=Vg(),c=dk(),f=hk(),d=iy(),a=pk(),u=br(),h=mk(),p=Ok(),O=ky(),m=yt(),_=mr(),g=Sk(),w=Wt(),E=kk(),y=Rn(),x=Xn(),C=1,N=2,I=4,j="[object Arguments]",M="[object Array]",A="[object Boolean]",q="[object Date]",L="[object Error]",k="[object Function]",F="[object GeneratorFunction]",V="[object Map]",ne="[object Number]",ue="[object Object]",K="[object RegExp]",W="[object Set]",B="[object String]",Q="[object Symbol]",re="[object WeakMap]",Z="[object ArrayBuffer]",X="[object DataView]",$="[object Float32Array]",ee="[object Float64Array]",le="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",Ee="[object Uint8Array]",Ie="[object Uint8ClampedArray]",Pe="[object Uint16Array]",Ae="[object Uint32Array]",xe={};xe[j]=xe[M]=xe[Z]=xe[X]=xe[A]=xe[q]=xe[$]=xe[ee]=xe[le]=xe[de]=xe[pe]=xe[V]=xe[ne]=xe[ue]=xe[K]=xe[W]=xe[B]=xe[Q]=xe[Ee]=xe[Ie]=xe[Pe]=xe[Ae]=!0,xe[L]=xe[k]=xe[re]=!1;function Ge(Oe,ge,me,ke,Ne,we){var qe,je=ge&C,ze=ge&N,lt=ge&I;if(me&&(qe=Ne?me(Oe,ke,Ne,we):me(Oe)),qe!==void 0)return qe;if(!w(Oe))return Oe;var pt=m(Oe);if(pt){if(qe=h(Oe),!je)return l(Oe,qe)}else{var Ze=u(Oe),It=Ze==k||Ze==F;if(_(Oe))return s(Oe,je);if(Ze==ue||Ze==j||It&&!Ne){if(qe=ze||It?{}:O(Oe),!je)return ze?f(Oe,o(qe,Oe)):c(Oe,r(qe,Oe))}else{if(!xe[Ze])return Ne?Oe:{};qe=p(Oe,Ze,je)}}we||(we=new e);var We=we.get(Oe);if(We)return We;we.set(Oe,qe),E(Oe)?Oe.forEach(function(kt){qe.add(Ge(kt,ge,me,kt,Oe,we))}):g(Oe)&&Oe.forEach(function(kt,Nt){qe.set(Nt,Ge(kt,ge,me,Nt,Oe,we))});var it=lt?ze?a:d:ze?x:y,Et=pt?void 0:it(Oe);return t(Et||Oe,function(kt,Nt){Et&&(Nt=kt,kt=Oe[Nt]),n(qe,Nt,Ge(kt,ge,me,Nt,Oe,we))}),qe}return lu=Ge,lu}var uu,My;function Nk(){if(My)return uu;My=1;var e=Iy(),t=4;function n(r){return e(r,t)}return uu=n,uu}var cu,qy;function fu(){if(qy)return cu;qy=1;function e(t){return function(){return t}}return cu=e,cu}var du,Ly;function Tk(){if(Ly)return du;Ly=1;function e(t){return function(n,r,o){for(var s=-1,l=Object(n),c=o(n),f=c.length;f--;){var d=c[t?f:++s];if(r(l[d],d,l)===!1)break}return n}}return du=e,du}var hu,Ry;function pu(){if(Ry)return hu;Ry=1;var e=Tk(),t=e();return hu=t,hu}var vu,Dy;function gu(){if(Dy)return vu;Dy=1;var e=pu(),t=Rn();function n(r,o){return r&&e(r,o,t)}return vu=n,vu}var yu,jy;function Ck(){if(jy)return yu;jy=1;var e=En();function t(n,r){return function(o,s){if(o==null)return o;if(!e(o))return n(o,s);for(var l=o.length,c=r?l:-1,f=Object(o);(r?c--:++c<l)&&s(f[c],c,f)!==!1;);return o}}return yu=t,yu}var mu,Fy;function mi(){if(Fy)return mu;Fy=1;var e=gu(),t=Ck(),n=t(e);return mu=n,mu}var bu,By;function Qn(){if(By)return bu;By=1;function e(t){return t}return bu=e,bu}var _u,zy;function Hy(){if(zy)return _u;zy=1;var e=Qn();function t(n){return typeof n=="function"?n:e}return _u=t,_u}var wu,$y;function Vy(){if($y)return wu;$y=1;var e=Xs(),t=mi(),n=Hy(),r=yt();function o(s,l){var c=r(s)?e:t;return c(s,n(l))}return wu=o,wu}var Ou,Uy;function Gy(){return Uy||(Uy=1,Ou=Vy()),Ou}var Eu,Ky;function Ak(){if(Ky)return Eu;Ky=1;var e=mi();function t(n,r){var o=[];return e(n,function(s,l,c){r(s,l,c)&&o.push(s)}),o}return Eu=t,Eu}var Su,Wy;function Pk(){if(Wy)return Su;Wy=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Su=t,Su}var xu,Yy;function Ik(){if(Yy)return xu;Yy=1;function e(t){return this.__data__.has(t)}return xu=e,xu}var ku,Zy;function Xy(){if(Zy)return ku;Zy=1;var e=Ks(),t=Pk(),n=Ik();function r(o){var s=-1,l=o==null?0:o.length;for(this.__data__=new e;++s<l;)this.add(o[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,ku=r,ku}var Nu,Qy;function Mk(){if(Qy)return Nu;Qy=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return Nu=e,Nu}var Tu,Jy;function em(){if(Jy)return Tu;Jy=1;function e(t,n){return t.has(n)}return Tu=e,Tu}var Cu,tm;function nm(){if(tm)return Cu;tm=1;var e=Xy(),t=Mk(),n=em(),r=1,o=2;function s(l,c,f,d,a,u){var h=f&r,p=l.length,O=c.length;if(p!=O&&!(h&&O>p))return!1;var m=u.get(l),_=u.get(c);if(m&&_)return m==c&&_==l;var g=-1,w=!0,E=f&o?new e:void 0;for(u.set(l,c),u.set(c,l);++g<p;){var y=l[g],x=c[g];if(d)var C=h?d(x,y,g,c,l,u):d(y,x,g,l,c,u);if(C!==void 0){if(C)continue;w=!1;break}if(E){if(!t(c,function(N,I){if(!n(E,I)&&(y===N||a(y,N,f,d,u)))return E.push(I)})){w=!1;break}}else if(!(y===x||a(y,x,f,d,u))){w=!1;break}}return u.delete(l),u.delete(c),w}return Cu=s,Cu}var Au,rm;function qk(){if(rm)return Au;rm=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,s){r[++n]=[s,o]}),r}return Au=e,Au}var Pu,om;function Iu(){if(om)return Pu;om=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Pu=e,Pu}var Mu,im;function Lk(){if(im)return Mu;im=1;var e=yr(),t=vy(),n=gr(),r=nm(),o=qk(),s=Iu(),l=1,c=2,f="[object Boolean]",d="[object Date]",a="[object Error]",u="[object Map]",h="[object Number]",p="[object RegExp]",O="[object Set]",m="[object String]",_="[object Symbol]",g="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,y=E?E.valueOf:void 0;function x(C,N,I,j,M,A,q){switch(I){case w:if(C.byteLength!=N.byteLength||C.byteOffset!=N.byteOffset)return!1;C=C.buffer,N=N.buffer;case g:return!(C.byteLength!=N.byteLength||!A(new t(C),new t(N)));case f:case d:case h:return n(+C,+N);case a:return C.name==N.name&&C.message==N.message;case p:case m:return C==N+"";case u:var L=o;case O:var k=j&l;if(L||(L=s),C.size!=N.size&&!k)return!1;var F=q.get(C);if(F)return F==N;j|=c,q.set(C,N);var V=r(L(C),L(N),j,M,A,q);return q.delete(C),V;case _:if(y)return y.call(C)==y.call(N)}return!1}return Mu=x,Mu}var qu,am;function Rk(){if(am)return qu;am=1;var e=iy(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(s,l,c,f,d,a){var u=c&t,h=e(s),p=h.length,O=e(l),m=O.length;if(p!=m&&!u)return!1;for(var _=p;_--;){var g=h[_];if(!(u?g in l:r.call(l,g)))return!1}var w=a.get(s),E=a.get(l);if(w&&E)return w==l&&E==s;var y=!0;a.set(s,l),a.set(l,s);for(var x=u;++_<p;){g=h[_];var C=s[g],N=l[g];if(f)var I=u?f(N,C,g,l,s,a):f(C,N,g,s,l,a);if(!(I===void 0?C===N||d(C,N,c,f,a):I)){y=!1;break}x||(x=g=="constructor")}if(y&&!x){var j=s.constructor,M=l.constructor;j!=M&&"constructor"in s&&"constructor"in l&&!(typeof j=="function"&&j instanceof j&&typeof M=="function"&&M instanceof M)&&(y=!1)}return a.delete(s),a.delete(l),y}return qu=o,qu}var Lu,sm;function Dk(){if(sm)return Lu;sm=1;var e=fi(),t=nm(),n=Lk(),r=Rk(),o=br(),s=yt(),l=mr(),c=so(),f=1,d="[object Arguments]",a="[object Array]",u="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function O(m,_,g,w,E,y){var x=s(m),C=s(_),N=x?a:o(m),I=C?a:o(_);N=N==d?u:N,I=I==d?u:I;var j=N==u,M=I==u,A=N==I;if(A&&l(m)){if(!l(_))return!1;x=!0,j=!1}if(A&&!j)return y||(y=new e),x||c(m)?t(m,_,g,w,E,y):n(m,_,N,g,w,E,y);if(!(g&f)){var q=j&&p.call(m,"__wrapped__"),L=M&&p.call(_,"__wrapped__");if(q||L){var k=q?m.value():m,F=L?_.value():_;return y||(y=new e),E(k,F,g,w,y)}}return A?(y||(y=new e),r(m,_,g,w,E,y)):!1}return Lu=O,Lu}var Ru,lm;function Du(){if(lm)return Ru;lm=1;var e=Dk(),t=dn();function n(r,o,s,l,c){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,s,l,n,c)}return Ru=n,Ru}var ju,um;function jk(){if(um)return ju;um=1;var e=fi(),t=Du(),n=1,r=2;function o(s,l,c,f){var d=c.length,a=d,u=!f;if(s==null)return!a;for(s=Object(s);d--;){var h=c[d];if(u&&h[2]?h[1]!==s[h[0]]:!(h[0]in s))return!1}for(;++d<a;){h=c[d];var p=h[0],O=s[p],m=h[1];if(u&&h[2]){if(O===void 0&&!(p in s))return!1}else{var _=new e;if(f)var g=f(O,m,p,s,l,_);if(!(g===void 0?t(m,O,n|r,f,_):g))return!1}}return!0}return ju=o,ju}var Fu,cm;function fm(){if(cm)return Fu;cm=1;var e=Wt();function t(n){return n===n&&!e(n)}return Fu=t,Fu}var Bu,dm;function Fk(){if(dm)return Bu;dm=1;var e=fm(),t=Rn();function n(r){for(var o=t(r),s=o.length;s--;){var l=o[s],c=r[l];o[s]=[l,c,e(c)]}return o}return Bu=n,Bu}var zu,hm;function pm(){if(hm)return zu;hm=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return zu=e,zu}var Hu,vm;function Bk(){if(vm)return Hu;vm=1;var e=jk(),t=Fk(),n=pm();function r(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(l){return l===o||e(l,o,s)}}return Hu=r,Hu}var $u,gm;function _r(){if(gm)return $u;gm=1;var e=Yn(),t=dn(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return $u=r,$u}var Vu,ym;function Uu(){if(ym)return Vu;ym=1;var e=yt(),t=_r(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return Vu=o,Vu}var Gu,mm;function zk(){if(mm)return Gu;mm=1;var e=Ks(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var s=function(){var l=arguments,c=o?o.apply(this,l):l[0],f=s.cache;if(f.has(c))return f.get(c);var d=r.apply(this,l);return s.cache=f.set(c,d)||f,d};return s.cache=new(n.Cache||e),s}return n.Cache=e,Gu=n,Gu}var Ku,bm;function Hk(){if(bm)return Ku;bm=1;var e=zk(),t=500;function n(r){var o=e(r,function(l){return s.size===t&&s.clear(),l}),s=o.cache;return o}return Ku=n,Ku}var Wu,_m;function $k(){if(_m)return Wu;_m=1;var e=Hk(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(t,function(l,c,f,d){s.push(f?d.replace(n,"$1"):c||l)}),s});return Wu=r,Wu}var Yu,wm;function bi(){if(wm)return Yu;wm=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=Array(o);++r<o;)s[r]=n(t[r],r,t);return s}return Yu=e,Yu}var Zu,Om;function Vk(){if(Om)return Zu;Om=1;var e=yr(),t=bi(),n=yt(),r=_r(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return s?s.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return Zu=l,Zu}var Xu,Em;function Sm(){if(Em)return Xu;Em=1;var e=Vk();function t(n){return n==null?"":e(n)}return Xu=t,Xu}var Qu,xm;function _i(){if(xm)return Qu;xm=1;var e=yt(),t=Uu(),n=$k(),r=Sm();function o(s,l){return e(s)?s:t(s,l)?[s]:n(r(s))}return Qu=o,Qu}var Ju,km;function uo(){if(km)return Ju;km=1;var e=_r();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Ju=t,Ju}var ec,Nm;function wi(){if(Nm)return ec;Nm=1;var e=_i(),t=uo();function n(r,o){o=e(o,r);for(var s=0,l=o.length;r!=null&&s<l;)r=r[t(o[s++])];return s&&s==l?r:void 0}return ec=n,ec}var tc,Tm;function Uk(){if(Tm)return tc;Tm=1;var e=wi();function t(n,r,o){var s=n==null?void 0:e(n,r);return s===void 0?o:s}return tc=t,tc}var nc,Cm;function Gk(){if(Cm)return nc;Cm=1;function e(t,n){return t!=null&&n in Object(t)}return nc=e,nc}var rc,Am;function Pm(){if(Am)return rc;Am=1;var e=_i(),t=oo(),n=yt(),r=pi(),o=cl(),s=uo();function l(c,f,d){f=e(f,c);for(var a=-1,u=f.length,h=!1;++a<u;){var p=s(f[a]);if(!(h=c!=null&&d(c,p)))break;c=c[p]}return h||++a!=u?h:(u=c==null?0:c.length,!!u&&o(u)&&r(p,u)&&(n(c)||t(c)))}return rc=l,rc}var oc,Im;function Mm(){if(Im)return oc;Im=1;var e=Gk(),t=Pm();function n(r,o){return r!=null&&t(r,o,e)}return oc=n,oc}var ic,qm;function Kk(){if(qm)return ic;qm=1;var e=Du(),t=Uk(),n=Mm(),r=Uu(),o=fm(),s=pm(),l=uo(),c=1,f=2;function d(a,u){return r(a)&&o(u)?s(l(a),u):function(h){var p=t(h,a);return p===void 0&&p===u?n(h,a):e(u,p,c|f)}}return ic=d,ic}var ac,Lm;function Rm(){if(Lm)return ac;Lm=1;function e(t){return function(n){return n?.[t]}}return ac=e,ac}var sc,Dm;function Wk(){if(Dm)return sc;Dm=1;var e=wi();function t(n){return function(r){return e(r,n)}}return sc=t,sc}var lc,jm;function Yk(){if(jm)return lc;jm=1;var e=Rm(),t=Wk(),n=Uu(),r=uo();function o(s){return n(s)?e(r(s)):t(s)}return lc=o,lc}var uc,Fm;function Sn(){if(Fm)return uc;Fm=1;var e=Bk(),t=Kk(),n=Qn(),r=yt(),o=Yk();function s(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):o(l)}return uc=s,uc}var cc,Bm;function zm(){if(Bm)return cc;Bm=1;var e=Gg(),t=Ak(),n=Sn(),r=yt();function o(s,l){var c=r(s)?e:t;return c(s,n(l,3))}return cc=o,cc}var fc,Hm;function Zk(){if(Hm)return fc;Hm=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return fc=n,fc}var dc,$m;function Vm(){if($m)return dc;$m=1;var e=Zk(),t=Pm();function n(r,o){return r!=null&&t(r,o,e)}return dc=n,dc}var hc,Um;function Xk(){if(Um)return hc;Um=1;var e=_l(),t=br(),n=oo(),r=yt(),o=En(),s=mr(),l=gi(),c=so(),f="[object Map]",d="[object Set]",a=Object.prototype,u=a.hasOwnProperty;function h(p){if(p==null)return!0;if(o(p)&&(r(p)||typeof p=="string"||typeof p.splice=="function"||s(p)||c(p)||n(p)))return!p.length;var O=t(p);if(O==f||O==d)return!p.size;if(l(p))return!e(p).length;for(var m in p)if(u.call(p,m))return!1;return!0}return hc=h,hc}var pc,Gm;function Km(){if(Gm)return pc;Gm=1;function e(t){return t===void 0}return pc=e,pc}var vc,Wm;function Ym(){if(Wm)return vc;Wm=1;var e=mi(),t=En();function n(r,o){var s=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,d){l[++s]=o(c,f,d)}),l}return vc=n,vc}var gc,Zm;function Xm(){if(Zm)return gc;Zm=1;var e=bi(),t=Sn(),n=Ym(),r=yt();function o(s,l){var c=r(s)?e:n;return c(s,t(l,3))}return gc=o,gc}var yc,Qm;function Qk(){if(Qm)return yc;Qm=1;function e(t,n,r,o){var s=-1,l=t==null?0:t.length;for(o&&l&&(r=t[++s]);++s<l;)r=n(r,t[s],s,t);return r}return yc=e,yc}var mc,Jm;function Jk(){if(Jm)return mc;Jm=1;function e(t,n,r,o,s){return s(t,function(l,c,f){r=o?(o=!1,l):n(r,l,c,f)}),r}return mc=e,mc}var bc,eb;function tb(){if(eb)return bc;eb=1;var e=Qk(),t=mi(),n=Sn(),r=Jk(),o=yt();function s(l,c,f){var d=o(l)?e:r,a=arguments.length<3;return d(l,n(c,4),f,a,t)}return bc=s,bc}var _c,nb;function eN(){if(nb)return _c;nb=1;var e=Yn(),t=yt(),n=dn(),r="[object String]";function o(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return _c=o,_c}var wc,rb;function tN(){if(rb)return wc;rb=1;var e=Rm(),t=e("length");return wc=t,wc}var Oc,ob;function nN(){if(ob)return Oc;ob=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+o+s+"]");function f(d){return c.test(d)}return Oc=f,Oc}var Ec,ib;function rN(){if(ib)return Ec;ib=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",a="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",O=d+"?",m="["+s+"]?",_="(?:"+p+"(?:"+[a,u,h].join("|")+")"+m+O+")*",g=m+O+_,w="(?:"+[a+c+"?",c,u,h,l].join("|")+")",E=RegExp(f+"(?="+f+")|"+w+g,"g");function y(x){for(var C=E.lastIndex=0;E.test(x);)++C;return C}return Ec=y,Ec}var Sc,ab;function oN(){if(ab)return Sc;ab=1;var e=tN(),t=nN(),n=rN();function r(o){return t(o)?n(o):e(o)}return Sc=r,Sc}var xc,sb;function iN(){if(sb)return xc;sb=1;var e=_l(),t=br(),n=En(),r=eN(),o=oN(),s="[object Map]",l="[object Set]";function c(f){if(f==null)return 0;if(n(f))return r(f)?o(f):f.length;var d=t(f);return d==s||d==l?f.size:e(f).length}return xc=c,xc}var kc,lb;function aN(){if(lb)return kc;lb=1;var e=Xs(),t=Sy(),n=gu(),r=Sn(),o=yi(),s=yt(),l=mr(),c=no(),f=Wt(),d=so();function a(u,h,p){var O=s(u),m=O||l(u)||d(u);if(h=r(h,4),p==null){var _=u&&u.constructor;m?p=O?new _:[]:f(u)?p=c(_)?t(o(u)):{}:p={}}return(m?e:n)(u,function(g,w,E){return h(p,g,w,E)}),p}return kc=a,kc}var Nc,ub;function sN(){if(ub)return Nc;ub=1;var e=yr(),t=oo(),n=yt(),r=e?e.isConcatSpreadable:void 0;function o(s){return n(s)||t(s)||!!(r&&s&&s[r])}return Nc=o,Nc}var Tc,cb;function Cc(){if(cb)return Tc;cb=1;var e=Ll(),t=sN();function n(r,o,s,l,c){var f=-1,d=r.length;for(s||(s=t),c||(c=[]);++f<d;){var a=r[f];o>0&&s(a)?o>1?n(a,o-1,s,l,c):e(c,a):l||(c[c.length]=a)}return c}return Tc=n,Tc}var Ac,fb;function lN(){if(fb)return Ac;fb=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Ac=e,Ac}var Pc,db;function hb(){if(db)return Pc;db=1;var e=lN(),t=Math.max;function n(r,o,s){return o=t(o===void 0?r.length-1:o,0),function(){for(var l=arguments,c=-1,f=t(l.length-o,0),d=Array(f);++c<f;)d[c]=l[o+c];c=-1;for(var a=Array(o+1);++c<o;)a[c]=l[c];return a[o]=s(d),e(r,this,a)}}return Pc=n,Pc}var Ic,pb;function uN(){if(pb)return Ic;pb=1;var e=fu(),t=cg(),n=Qn(),r=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return Ic=r,Ic}var Mc,vb;function cN(){if(vb)return Mc;vb=1;var e=800,t=16,n=Date.now;function r(o){var s=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return Mc=r,Mc}var qc,gb;function yb(){if(gb)return qc;gb=1;var e=uN(),t=cN(),n=t(e);return qc=n,qc}var Lc,mb;function Oi(){if(mb)return Lc;mb=1;var e=Qn(),t=hb(),n=yb();function r(o,s){return n(t(o,s,e),o+"")}return Lc=r,Lc}var Rc,bb;function _b(){if(bb)return Rc;bb=1;function e(t,n,r,o){for(var s=t.length,l=r+(o?1:-1);o?l--:++l<s;)if(n(t[l],l,t))return l;return-1}return Rc=e,Rc}var Dc,wb;function fN(){if(wb)return Dc;wb=1;function e(t){return t!==t}return Dc=e,Dc}var jc,Ob;function dN(){if(Ob)return jc;Ob=1;function e(t,n,r){for(var o=r-1,s=t.length;++o<s;)if(t[o]===n)return o;return-1}return jc=e,jc}var Fc,Eb;function hN(){if(Eb)return Fc;Eb=1;var e=_b(),t=fN(),n=dN();function r(o,s,l){return s===s?n(o,s,l):e(o,t,l)}return Fc=r,Fc}var Bc,Sb;function pN(){if(Sb)return Bc;Sb=1;var e=hN();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return Bc=t,Bc}var zc,xb;function vN(){if(xb)return zc;xb=1;function e(t,n,r){for(var o=-1,s=t==null?0:t.length;++o<s;)if(r(n,t[o]))return!0;return!1}return zc=e,zc}var Hc,kb;function gN(){if(kb)return Hc;kb=1;function e(){}return Hc=e,Hc}var $c,Nb;function yN(){if(Nb)return $c;Nb=1;var e=cy(),t=gN(),n=Iu(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return $c=o,$c}var Vc,Tb;function mN(){if(Tb)return Vc;Tb=1;var e=Xy(),t=pN(),n=vN(),r=em(),o=yN(),s=Iu(),l=200;function c(f,d,a){var u=-1,h=t,p=f.length,O=!0,m=[],_=m;if(a)O=!1,h=n;else if(p>=l){var g=d?null:o(f);if(g)return s(g);O=!1,h=r,_=new e}else _=d?[]:m;e:for(;++u<p;){var w=f[u],E=d?d(w):w;if(w=a||w!==0?w:0,O&&E===E){for(var y=_.length;y--;)if(_[y]===E)continue e;d&&_.push(E),m.push(w)}else h(_,E,a)||(_!==m&&_.push(E),m.push(w))}return m}return Vc=c,Vc}var Uc,Cb;function Ab(){if(Cb)return Uc;Cb=1;var e=En(),t=dn();function n(r){return t(r)&&e(r)}return Uc=n,Uc}var Gc,Pb;function bN(){if(Pb)return Gc;Pb=1;var e=Cc(),t=Oi(),n=mN(),r=Ab(),o=t(function(s){return n(e(s,1,r,!0))});return Gc=o,Gc}var Kc,Ib;function _N(){if(Ib)return Kc;Ib=1;var e=bi();function t(n,r){return e(r,function(o){return n[o]})}return Kc=t,Kc}var Wc,Mb;function qb(){if(Mb)return Wc;Mb=1;var e=_N(),t=Rn();function n(r){return r==null?[]:e(r,t(r))}return Wc=n,Wc}var Yc,Lb;function Yt(){if(Lb)return Yc;Lb=1;var e;if(typeof rs=="function")try{e={clone:Nk(),constant:fu(),each:Gy(),filter:zm(),has:Vm(),isArray:yt(),isEmpty:Xk(),isFunction:no(),isUndefined:Km(),keys:Rn(),map:Xm(),reduce:tb(),size:iN(),transform:aN(),union:bN(),values:qb()}}catch{}return e||(e=window._),Yc=e,Yc}var Zc,Rb;function Xc(){if(Rb)return Zc;Rb=1;var e=Yt();Zc=o;var t="\0",n="\0",r="";function o(a){this._isDirected=e.has(a,"directed")?a.directed:!0,this._isMultigraph=e.has(a,"multigraph")?a.multigraph:!1,this._isCompound=e.has(a,"compound")?a.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(a){return this._label=a,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(a){return e.isFunction(a)||(a=e.constant(a)),this._defaultNodeLabelFn=a,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var a=this;return e.filter(this.nodes(),function(u){return e.isEmpty(a._in[u])})},o.prototype.sinks=function(){var a=this;return e.filter(this.nodes(),function(u){return e.isEmpty(a._out[u])})},o.prototype.setNodes=function(a,u){var h=arguments,p=this;return e.each(a,function(O){h.length>1?p.setNode(O,u):p.setNode(O)}),this},o.prototype.setNode=function(a,u){return e.has(this._nodes,a)?(arguments.length>1&&(this._nodes[a]=u),this):(this._nodes[a]=arguments.length>1?u:this._defaultNodeLabelFn(a),this._isCompound&&(this._parent[a]=n,this._children[a]={},this._children[n][a]=!0),this._in[a]={},this._preds[a]={},this._out[a]={},this._sucs[a]={},++this._nodeCount,this)},o.prototype.node=function(a){return this._nodes[a]},o.prototype.hasNode=function(a){return e.has(this._nodes,a)},o.prototype.removeNode=function(a){var u=this;if(e.has(this._nodes,a)){var h=function(p){u.removeEdge(u._edgeObjs[p])};delete this._nodes[a],this._isCompound&&(this._removeFromParentsChildList(a),delete this._parent[a],e.each(this.children(a),function(p){u.setParent(p)}),delete this._children[a]),e.each(e.keys(this._in[a]),h),delete this._in[a],delete this._preds[a],e.each(e.keys(this._out[a]),h),delete this._out[a],delete this._sucs[a],--this._nodeCount}return this},o.prototype.setParent=function(a,u){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(u))u=n;else{u+="";for(var h=u;!e.isUndefined(h);h=this.parent(h))if(h===a)throw new Error("Setting "+u+" as parent of "+a+" would create a cycle");this.setNode(u)}return this.setNode(a),this._removeFromParentsChildList(a),this._parent[a]=u,this._children[u][a]=!0,this},o.prototype._removeFromParentsChildList=function(a){delete this._children[this._parent[a]][a]},o.prototype.parent=function(a){if(this._isCompound){var u=this._parent[a];if(u!==n)return u}},o.prototype.children=function(a){if(e.isUndefined(a)&&(a=n),this._isCompound){var u=this._children[a];if(u)return e.keys(u)}else{if(a===n)return this.nodes();if(this.hasNode(a))return[]}},o.prototype.predecessors=function(a){var u=this._preds[a];if(u)return e.keys(u)},o.prototype.successors=function(a){var u=this._sucs[a];if(u)return e.keys(u)},o.prototype.neighbors=function(a){var u=this.predecessors(a);if(u)return e.union(u,this.successors(a))},o.prototype.isLeaf=function(a){var u;return this.isDirected()?u=this.successors(a):u=this.neighbors(a),u.length===0},o.prototype.filterNodes=function(a){var u=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});u.setGraph(this.graph());var h=this;e.each(this._nodes,function(m,_){a(_)&&u.setNode(_,m)}),e.each(this._edgeObjs,function(m){u.hasNode(m.v)&&u.hasNode(m.w)&&u.setEdge(m,h.edge(m))});var p={};function O(m){var _=h.parent(m);return _===void 0||u.hasNode(_)?(p[m]=_,_):_ in p?p[_]:O(_)}return this._isCompound&&e.each(u.nodes(),function(m){u.setParent(m,O(m))}),u},o.prototype.setDefaultEdgeLabel=function(a){return e.isFunction(a)||(a=e.constant(a)),this._defaultEdgeLabelFn=a,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(a,u){var h=this,p=arguments;return e.reduce(a,function(O,m){return p.length>1?h.setEdge(O,m,u):h.setEdge(O,m),m}),this},o.prototype.setEdge=function(){var a,u,h,p,O=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(a=m.v,u=m.w,h=m.name,arguments.length===2&&(p=arguments[1],O=!0)):(a=m,u=arguments[1],h=arguments[3],arguments.length>2&&(p=arguments[2],O=!0)),a=""+a,u=""+u,e.isUndefined(h)||(h=""+h);var _=c(this._isDirected,a,u,h);if(e.has(this._edgeLabels,_))return O&&(this._edgeLabels[_]=p),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(a),this.setNode(u),this._edgeLabels[_]=O?p:this._defaultEdgeLabelFn(a,u,h);var g=f(this._isDirected,a,u,h);return a=g.v,u=g.w,Object.freeze(g),this._edgeObjs[_]=g,s(this._preds[u],a),s(this._sucs[a],u),this._in[u][_]=g,this._out[a][_]=g,this._edgeCount++,this},o.prototype.edge=function(a,u,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,a,u,h);return this._edgeLabels[p]},o.prototype.hasEdge=function(a,u,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,a,u,h);return e.has(this._edgeLabels,p)},o.prototype.removeEdge=function(a,u,h){var p=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,a,u,h),O=this._edgeObjs[p];return O&&(a=O.v,u=O.w,delete this._edgeLabels[p],delete this._edgeObjs[p],l(this._preds[u],a),l(this._sucs[a],u),delete this._in[u][p],delete this._out[a][p],this._edgeCount--),this},o.prototype.inEdges=function(a,u){var h=this._in[a];if(h){var p=e.values(h);return u?e.filter(p,function(O){return O.v===u}):p}},o.prototype.outEdges=function(a,u){var h=this._out[a];if(h){var p=e.values(h);return u?e.filter(p,function(O){return O.w===u}):p}},o.prototype.nodeEdges=function(a,u){var h=this.inEdges(a,u);if(h)return h.concat(this.outEdges(a,u))};function s(a,u){a[u]?a[u]++:a[u]=1}function l(a,u){--a[u]||delete a[u]}function c(a,u,h,p){var O=""+u,m=""+h;if(!a&&O>m){var _=O;O=m,m=_}return O+r+m+r+(e.isUndefined(p)?t:p)}function f(a,u,h,p){var O=""+u,m=""+h;if(!a&&O>m){var _=O;O=m,m=_}var g={v:O,w:m};return p&&(g.name=p),g}function d(a,u){return c(a,u.v,u.w,u.name)}return Zc}var Qc,Db;function wN(){return Db||(Db=1,Qc="2.1.8"),Qc}var Jc,jb;function ON(){return jb||(jb=1,Jc={Graph:Xc(),version:wN()}),Jc}var ef,Fb;function EN(){if(Fb)return ef;Fb=1;var e=Yt(),t=Xc();ef={write:n,read:s};function n(l){var c={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:r(l),edges:o(l)};return e.isUndefined(l.graph())||(c.value=e.clone(l.graph())),c}function r(l){return e.map(l.nodes(),function(c){var f=l.node(c),d=l.parent(c),a={v:c};return e.isUndefined(f)||(a.value=f),e.isUndefined(d)||(a.parent=d),a})}function o(l){return e.map(l.edges(),function(c){var f=l.edge(c),d={v:c.v,w:c.w};return e.isUndefined(c.name)||(d.name=c.name),e.isUndefined(f)||(d.value=f),d})}function s(l){var c=new t(l.options).setGraph(l.value);return e.each(l.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(l.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return ef}var tf,Bb;function SN(){if(Bb)return tf;Bb=1;var e=Yt();tf=t;function t(n){var r={},o=[],s;function l(c){e.has(r,c)||(r[c]=!0,s.push(c),e.each(n.successors(c),l),e.each(n.predecessors(c),l))}return e.each(n.nodes(),function(c){s=[],l(c),s.length&&o.push(s)}),o}return tf}var nf,zb;function Hb(){if(zb)return nf;zb=1;var e=Yt();nf=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var s=this._arr,l=s.length;return o[n]=l,s.push({key:n,priority:r}),this._decrease(l),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)},t.prototype._heapify=function(n){var r=this._arr,o=2*n,s=o+1,l=n;o<r.length&&(l=r[o].priority<r[l].priority?o:l,s<r.length&&(l=r[s].priority<r[l].priority?s:l),l!==n&&(this._swap(n,l),this._heapify(l)))},t.prototype._decrease=function(n){for(var r=this._arr,o=r[n].priority,s;n!==0&&(s=n>>1,!(r[s].priority<o));)this._swap(n,s),n=s},t.prototype._swap=function(n,r){var o=this._arr,s=this._keyIndices,l=o[n],c=o[r];o[n]=c,o[r]=l,s[c.key]=n,s[l.key]=r},nf}var rf,$b;function Vb(){if($b)return rf;$b=1;var e=Yt(),t=Hb();rf=r;var n=e.constant(1);function r(s,l,c,f){return o(s,String(l),c||n,f||function(d){return s.outEdges(d)})}function o(s,l,c,f){var d={},a=new t,u,h,p=function(O){var m=O.v!==u?O.v:O.w,_=d[m],g=c(O),w=h.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+O+" Weight: "+g);w<_.distance&&(_.distance=w,_.predecessor=u,a.decrease(m,w))};for(s.nodes().forEach(function(O){var m=O===l?0:Number.POSITIVE_INFINITY;d[O]={distance:m},a.add(O,m)});a.size()>0&&(u=a.removeMin(),h=d[u],h.distance!==Number.POSITIVE_INFINITY);)f(u).forEach(p);return d}return rf}var of,Ub;function xN(){if(Ub)return of;Ub=1;var e=Vb(),t=Yt();of=n;function n(r,o,s){return t.transform(r.nodes(),function(l,c){l[c]=e(r,c,o,s)},{})}return of}var af,Gb;function Kb(){if(Gb)return af;Gb=1;var e=Yt();af=t;function t(n){var r=0,o=[],s={},l=[];function c(f){var d=s[f]={onStack:!0,lowlink:r,index:r++};if(o.push(f),n.successors(f).forEach(function(h){e.has(s,h)?s[h].onStack&&(d.lowlink=Math.min(d.lowlink,s[h].index)):(c(h),d.lowlink=Math.min(d.lowlink,s[h].lowlink))}),d.lowlink===d.index){var a=[],u;do u=o.pop(),s[u].onStack=!1,a.push(u);while(f!==u);l.push(a)}}return n.nodes().forEach(function(f){e.has(s,f)||c(f)}),l}return af}var sf,Wb;function kN(){if(Wb)return sf;Wb=1;var e=Yt(),t=Kb();sf=n;function n(r){return e.filter(t(r),function(o){return o.length>1||o.length===1&&r.hasEdge(o[0],o[0])})}return sf}var lf,Yb;function NN(){if(Yb)return lf;Yb=1;var e=Yt();lf=n;var t=e.constant(1);function n(o,s,l){return r(o,s||t,l||function(c){return o.outEdges(c)})}function r(o,s,l){var c={},f=o.nodes();return f.forEach(function(d){c[d]={},c[d][d]={distance:0},f.forEach(function(a){d!==a&&(c[d][a]={distance:Number.POSITIVE_INFINITY})}),l(d).forEach(function(a){var u=a.v===d?a.w:a.v,h=s(a);c[d][u]={distance:h,predecessor:d}})}),f.forEach(function(d){var a=c[d];f.forEach(function(u){var h=c[u];f.forEach(function(p){var O=h[d],m=a[p],_=h[p],g=O.distance+m.distance;g<_.distance&&(_.distance=g,_.predecessor=m.predecessor)})})}),c}return lf}var uf,Zb;function Xb(){if(Zb)return uf;Zb=1;var e=Yt();uf=t,t.CycleException=n;function t(r){var o={},s={},l=[];function c(f){if(e.has(s,f))throw new n;e.has(o,f)||(s[f]=!0,o[f]=!0,e.each(r.predecessors(f),c),delete s[f],l.push(f))}if(e.each(r.sinks(),c),e.size(o)!==r.nodeCount())throw new n;return l}function n(){}return n.prototype=new Error,uf}var cf,Qb;function TN(){if(Qb)return cf;Qb=1;var e=Xb();cf=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return cf}var ff,Jb;function e0(){if(Jb)return ff;Jb=1;var e=Yt();ff=t;function t(r,o,s){e.isArray(o)||(o=[o]);var l=(r.isDirected()?r.successors:r.neighbors).bind(r),c=[],f={};return e.each(o,function(d){if(!r.hasNode(d))throw new Error("Graph does not have node: "+d);n(r,d,s==="post",f,l,c)}),c}function n(r,o,s,l,c,f){e.has(l,o)||(l[o]=!0,s||f.push(o),e.each(c(o),function(d){n(r,d,s,l,c,f)}),s&&f.push(o))}return ff}var df,t0;function CN(){if(t0)return df;t0=1;var e=e0();df=t;function t(n,r){return e(n,r,"post")}return df}var hf,n0;function AN(){if(n0)return hf;n0=1;var e=e0();hf=t;function t(n,r){return e(n,r,"pre")}return hf}var pf,r0;function PN(){if(r0)return pf;r0=1;var e=Yt(),t=Xc(),n=Hb();pf=r;function r(o,s){var l=new t,c={},f=new n,d;function a(h){var p=h.v===d?h.w:h.v,O=f.priority(p);if(O!==void 0){var m=s(h);m<O&&(c[p]=d,f.decrease(p,m))}}if(o.nodeCount()===0)return l;e.each(o.nodes(),function(h){f.add(h,Number.POSITIVE_INFINITY),l.setNode(h)}),f.decrease(o.nodes()[0],0);for(var u=!1;f.size()>0;){if(d=f.removeMin(),e.has(c,d))l.setEdge(d,c[d]);else{if(u)throw new Error("Input graph is not connected: "+o);u=!0}o.nodeEdges(d).forEach(a)}return l}return pf}var vf,o0;function IN(){return o0||(o0=1,vf={components:SN(),dijkstra:Vb(),dijkstraAll:xN(),findCycles:kN(),floydWarshall:NN(),isAcyclic:TN(),postorder:CN(),preorder:AN(),prim:PN(),tarjan:Kb(),topsort:Xb()}),vf}var gf,i0;function MN(){if(i0)return gf;i0=1;var e=ON();return gf={Graph:e.Graph,json:EN(),alg:IN(),version:e.version},gf}var yf,a0;function on(){if(a0)return yf;a0=1;var e;if(typeof rs=="function")try{e=MN()}catch{}return e||(e=window.graphlib),yf=e,yf}var mf,s0;function qN(){if(s0)return mf;s0=1;var e=Iy(),t=1,n=4;function r(o){return e(o,t|n)}return mf=r,mf}var bf,l0;function Ei(){if(l0)return bf;l0=1;var e=gr(),t=En(),n=pi(),r=Wt();function o(s,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],s):!1}return bf=o,bf}var _f,u0;function LN(){if(u0)return _f;u0=1;var e=Oi(),t=gr(),n=Ei(),r=Xn(),o=Object.prototype,s=o.hasOwnProperty,l=e(function(c,f){c=Object(c);var d=-1,a=f.length,u=a>2?f[2]:void 0;for(u&&n(f[0],f[1],u)&&(a=1);++d<a;)for(var h=f[d],p=r(h),O=-1,m=p.length;++O<m;){var _=p[O],g=c[_];(g===void 0||t(g,o[_])&&!s.call(c,_))&&(c[_]=h[_])}return c});return _f=l,_f}var wf,c0;function RN(){if(c0)return wf;c0=1;var e=Sn(),t=En(),n=Rn();function r(o){return function(s,l,c){var f=Object(s);if(!t(s)){var d=e(l,3);s=n(s),l=function(u){return d(f[u],u,f)}}var a=o(s,l,c);return a>-1?f[d?s[a]:a]:void 0}}return wf=r,wf}var Of,f0;function DN(){if(f0)return Of;f0=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Of=t,Of}var Ef,d0;function jN(){if(d0)return Ef;d0=1;var e=DN(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Ef=n,Ef}var Sf,h0;function FN(){if(h0)return Sf;h0=1;var e=jN(),t=Wt(),n=_r(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var a=typeof d.valueOf=="function"?d.valueOf():d;d=t(a)?a+"":a}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=s.test(d);return u||l.test(d)?c(d.slice(2),u?2:8):o.test(d)?r:+d}return Sf=f,Sf}var xf,p0;function v0(){if(p0)return xf;p0=1;var e=FN(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var s=o<0?-1:1;return s*n}return o===o?o:0}return xf=r,xf}var kf,g0;function BN(){if(g0)return kf;g0=1;var e=v0();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return kf=t,kf}var Nf,y0;function zN(){if(y0)return Nf;y0=1;var e=_b(),t=Sn(),n=BN(),r=Math.max;function o(s,l,c){var f=s==null?0:s.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=r(f+d,0)),e(s,t(l,3),d)}return Nf=o,Nf}var Tf,m0;function HN(){if(m0)return Tf;m0=1;var e=RN(),t=zN(),n=e(t);return Tf=n,Tf}var Cf,b0;function _0(){if(b0)return Cf;b0=1;var e=Cc();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Cf=t,Cf}var Af,w0;function $N(){if(w0)return Af;w0=1;var e=pu(),t=Hy(),n=Xn();function r(o,s){return o==null?o:e(o,t(s),n)}return Af=r,Af}var Pf,O0;function VN(){if(O0)return Pf;O0=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Pf=e,Pf}var If,E0;function UN(){if(E0)return If;E0=1;var e=di(),t=gu(),n=Sn();function r(o,s){var l={};return s=n(s,3),t(o,function(c,f,d){e(l,f,s(c,f,d))}),l}return If=r,If}var Mf,S0;function qf(){if(S0)return Mf;S0=1;var e=_r();function t(n,r,o){for(var s=-1,l=n.length;++s<l;){var c=n[s],f=r(c);if(f!=null&&(d===void 0?f===f&&!e(f):o(f,d)))var d=f,a=c}return a}return Mf=t,Mf}var Lf,x0;function GN(){if(x0)return Lf;x0=1;function e(t,n){return t>n}return Lf=e,Lf}var Rf,k0;function KN(){if(k0)return Rf;k0=1;var e=qf(),t=GN(),n=Qn();function r(o){return o&&o.length?e(o,n,t):void 0}return Rf=r,Rf}var Df,N0;function T0(){if(N0)return Df;N0=1;var e=di(),t=gr();function n(r,o,s){(s!==void 0&&!t(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return Df=n,Df}var jf,C0;function WN(){if(C0)return jf;C0=1;var e=Yn(),t=yi(),n=dn(),r="[object Object]",o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,f=l.call(Object);function d(a){if(!n(a)||e(a)!=r)return!1;var u=t(a);if(u===null)return!0;var h=c.call(u,"constructor")&&u.constructor;return typeof h=="function"&&h instanceof h&&l.call(h)==f}return jf=d,jf}var Ff,A0;function P0(){if(A0)return Ff;A0=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Ff=e,Ff}var Bf,I0;function YN(){if(I0)return Bf;I0=1;var e=ro(),t=Xn();function n(r){return e(r,t(r))}return Bf=n,Bf}var zf,M0;function ZN(){if(M0)return zf;M0=1;var e=T0(),t=Hg(),n=wy(),r=Vg(),o=ky(),s=oo(),l=yt(),c=Ab(),f=mr(),d=no(),a=Wt(),u=WN(),h=so(),p=P0(),O=YN();function m(_,g,w,E,y,x,C){var N=p(_,w),I=p(g,w),j=C.get(I);if(j){e(_,w,j);return}var M=x?x(N,I,w+"",_,g,C):void 0,A=M===void 0;if(A){var q=l(I),L=!q&&f(I),k=!q&&!L&&h(I);M=I,q||L||k?l(N)?M=N:c(N)?M=r(N):L?(A=!1,M=t(I,!0)):k?(A=!1,M=n(I,!0)):M=[]:u(I)||s(I)?(M=N,s(N)?M=O(N):(!a(N)||d(N))&&(M=o(I))):A=!1}A&&(C.set(I,M),y(M,I,E,x,C),C.delete(I)),e(_,w,M)}return zf=m,zf}var Hf,q0;function XN(){if(q0)return Hf;q0=1;var e=fi(),t=T0(),n=pu(),r=ZN(),o=Wt(),s=Xn(),l=P0();function c(f,d,a,u,h){f!==d&&n(d,function(p,O){if(h||(h=new e),o(p))r(f,d,O,a,c,u,h);else{var m=u?u(l(f,O),p,O+"",f,d,h):void 0;m===void 0&&(m=p),t(f,O,m)}},s)}return Hf=c,Hf}var $f,L0;function QN(){if(L0)return $f;L0=1;var e=Oi(),t=Ei();function n(r){return e(function(o,s){var l=-1,c=s.length,f=c>1?s[c-1]:void 0,d=c>2?s[2]:void 0;for(f=r.length>3&&typeof f=="function"?(c--,f):void 0,d&&t(s[0],s[1],d)&&(f=c<3?void 0:f,c=1),o=Object(o);++l<c;){var a=s[l];a&&r(o,a,l,f)}return o})}return $f=n,$f}var Vf,R0;function JN(){if(R0)return Vf;R0=1;var e=XN(),t=QN(),n=t(function(r,o,s){e(r,o,s)});return Vf=n,Vf}var Uf,D0;function j0(){if(D0)return Uf;D0=1;function e(t,n){return t<n}return Uf=e,Uf}var Gf,F0;function eT(){if(F0)return Gf;F0=1;var e=qf(),t=j0(),n=Qn();function r(o){return o&&o.length?e(o,n,t):void 0}return Gf=r,Gf}var Kf,B0;function tT(){if(B0)return Kf;B0=1;var e=qf(),t=Sn(),n=j0();function r(o,s){return o&&o.length?e(o,t(s,2),n):void 0}return Kf=r,Kf}var Wf,z0;function nT(){if(z0)return Wf;z0=1;var e=rn(),t=function(){return e.Date.now()};return Wf=t,Wf}var Yf,H0;function rT(){if(H0)return Yf;H0=1;var e=hi(),t=_i(),n=pi(),r=Wt(),o=uo();function s(l,c,f,d){if(!r(l))return l;c=t(c,l);for(var a=-1,u=c.length,h=u-1,p=l;p!=null&&++a<u;){var O=o(c[a]),m=f;if(O==="__proto__"||O==="constructor"||O==="prototype")return l;if(a!=h){var _=p[O];m=d?d(_,O,p):void 0,m===void 0&&(m=r(_)?_:n(c[a+1])?[]:{})}e(p,O,m),p=p[O]}return l}return Yf=s,Yf}var Zf,$0;function oT(){if($0)return Zf;$0=1;var e=wi(),t=rT(),n=_i();function r(o,s,l){for(var c=-1,f=s.length,d={};++c<f;){var a=s[c],u=e(o,a);l(u,a)&&t(d,n(a,o),u)}return d}return Zf=r,Zf}var Xf,V0;function iT(){if(V0)return Xf;V0=1;var e=oT(),t=Mm();function n(r,o){return e(r,o,function(s,l){return t(r,l)})}return Xf=n,Xf}var Qf,U0;function aT(){if(U0)return Qf;U0=1;var e=_0(),t=hb(),n=yb();function r(o){return n(t(o,void 0,e),o+"")}return Qf=r,Qf}var Jf,G0;function sT(){if(G0)return Jf;G0=1;var e=iT(),t=aT(),n=t(function(r,o){return r==null?{}:e(r,o)});return Jf=n,Jf}var ed,K0;function lT(){if(K0)return ed;K0=1;var e=Math.ceil,t=Math.max;function n(r,o,s,l){for(var c=-1,f=t(e((o-r)/(s||1)),0),d=Array(f);f--;)d[l?f:++c]=r,r+=s;return d}return ed=n,ed}var td,W0;function uT(){if(W0)return td;W0=1;var e=lT(),t=Ei(),n=v0();function r(o){return function(s,l,c){return c&&typeof c!="number"&&t(s,l,c)&&(l=c=void 0),s=n(s),l===void 0?(l=s,s=0):l=n(l),c=c===void 0?s<l?1:-1:n(c),e(s,l,c,o)}}return td=r,td}var nd,Y0;function cT(){if(Y0)return nd;Y0=1;var e=uT(),t=e();return nd=t,nd}var rd,Z0;function fT(){if(Z0)return rd;Z0=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return rd=e,rd}var od,X0;function dT(){if(X0)return od;X0=1;var e=_r();function t(n,r){if(n!==r){var o=n!==void 0,s=n===null,l=n===n,c=e(n),f=r!==void 0,d=r===null,a=r===r,u=e(r);if(!d&&!u&&!c&&n>r||c&&f&&a&&!d&&!u||s&&f&&a||!o&&a||!l)return 1;if(!s&&!c&&!u&&n<r||u&&o&&l&&!s&&!c||d&&o&&l||!f&&l||!a)return-1}return 0}return od=t,od}var id,Q0;function hT(){if(Q0)return id;Q0=1;var e=dT();function t(n,r,o){for(var s=-1,l=n.criteria,c=r.criteria,f=l.length,d=o.length;++s<f;){var a=e(l[s],c[s]);if(a){if(s>=d)return a;var u=o[s];return a*(u=="desc"?-1:1)}}return n.index-r.index}return id=t,id}var ad,J0;function pT(){if(J0)return ad;J0=1;var e=bi(),t=wi(),n=Sn(),r=Ym(),o=fT(),s=vi(),l=hT(),c=Qn(),f=yt();function d(a,u,h){u.length?u=e(u,function(m){return f(m)?function(_){return t(_,m.length===1?m[0]:m)}:m}):u=[c];var p=-1;u=e(u,s(n));var O=r(a,function(m,_,g){var w=e(u,function(E){return E(m)});return{criteria:w,index:++p,value:m}});return o(O,function(m,_){return l(m,_,h)})}return ad=d,ad}var sd,e1;function vT(){if(e1)return sd;e1=1;var e=Cc(),t=pT(),n=Oi(),r=Ei(),o=n(function(s,l){if(s==null)return[];var c=l.length;return c>1&&r(s,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return sd=o,sd}var ld,t1;function gT(){if(t1)return ld;t1=1;var e=Sm(),t=0;function n(r){var o=++t;return e(r)+o}return ld=n,ld}var ud,n1;function yT(){if(n1)return ud;n1=1;function e(t,n,r){for(var o=-1,s=t.length,l=n.length,c={};++o<s;){var f=o<l?n[o]:void 0;r(c,t[o],f)}return c}return ud=e,ud}var cd,r1;function mT(){if(r1)return cd;r1=1;var e=hi(),t=yT();function n(r,o){return t(r||[],o||[],e)}return cd=n,cd}var fd,o1;function dt(){if(o1)return fd;o1=1;var e;if(typeof rs=="function")try{e={cloneDeep:qN(),constant:fu(),defaults:LN(),each:Gy(),filter:zm(),find:HN(),flatten:_0(),forEach:Vy(),forIn:$N(),has:Vm(),isUndefined:Km(),last:VN(),map:Xm(),mapValues:UN(),max:KN(),merge:JN(),min:eT(),minBy:tT(),now:nT(),pick:sT(),range:cT(),reduce:tb(),sortBy:vT(),uniqueId:gT(),values:qb(),zipObject:mT()}}catch{}return e||(e=window._),fd=e,fd}var dd,i1;function bT(){if(i1)return dd;i1=1,dd=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,o=r._prev;if(o!==r)return t(o),o},e.prototype.enqueue=function(r){var o=this._sentinel;r._prev&&r._next&&t(r),r._next=o._next,o._next._prev=r,o._next=r,r._prev=o},e.prototype.toString=function(){for(var r=[],o=this._sentinel,s=o._prev;s!==o;)r.push(JSON.stringify(s,n)),s=s._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,o){if(r!=="_next"&&r!=="_prev")return o}return dd}var hd,a1;function _T(){if(a1)return hd;a1=1;var e=dt(),t=on().Graph,n=bT();hd=o;var r=e.constant(1);function o(d,a){if(d.nodeCount()<=1)return[];var u=c(d,a||r),h=s(u.graph,u.buckets,u.zeroIdx);return e.flatten(e.map(h,function(p){return d.outEdges(p.v,p.w)}),!0)}function s(d,a,u){for(var h=[],p=a[a.length-1],O=a[0],m;d.nodeCount();){for(;m=O.dequeue();)l(d,a,u,m);for(;m=p.dequeue();)l(d,a,u,m);if(d.nodeCount()){for(var _=a.length-2;_>0;--_)if(m=a[_].dequeue(),m){h=h.concat(l(d,a,u,m,!0));break}}}return h}function l(d,a,u,h,p){var O=p?[]:void 0;return e.forEach(d.inEdges(h.v),function(m){var _=d.edge(m),g=d.node(m.v);p&&O.push({v:m.v,w:m.w}),g.out-=_,f(a,u,g)}),e.forEach(d.outEdges(h.v),function(m){var _=d.edge(m),g=m.w,w=d.node(g);w.in-=_,f(a,u,w)}),d.removeNode(h.v),O}function c(d,a){var u=new t,h=0,p=0;e.forEach(d.nodes(),function(_){u.setNode(_,{v:_,in:0,out:0})}),e.forEach(d.edges(),function(_){var g=u.edge(_.v,_.w)||0,w=a(_),E=g+w;u.setEdge(_.v,_.w,E),p=Math.max(p,u.node(_.v).out+=w),h=Math.max(h,u.node(_.w).in+=w)});var O=e.range(p+h+3).map(function(){return new n}),m=h+1;return e.forEach(u.nodes(),function(_){f(O,m,u.node(_))}),{graph:u,buckets:O,zeroIdx:m}}function f(d,a,u){u.out?u.in?d[u.out-u.in+a].enqueue(u):d[d.length-1].enqueue(u):d[0].enqueue(u)}return hd}var pd,s1;function wT(){if(s1)return pd;s1=1;var e=dt(),t=_T();pd={run:n,undo:o};function n(s){var l=s.graph().acyclicer==="greedy"?t(s,c(s)):r(s);e.forEach(l,function(f){var d=s.edge(f);s.removeEdge(f),d.forwardName=f.name,d.reversed=!0,s.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function c(f){return function(d){return f.edge(d).weight}}}function r(s){var l=[],c={},f={};function d(a){e.has(f,a)||(f[a]=!0,c[a]=!0,e.forEach(s.outEdges(a),function(u){e.has(c,u.w)?l.push(u):d(u.w)}),delete c[a])}return e.forEach(s.nodes(),d),l}function o(s){e.forEach(s.edges(),function(l){var c=s.edge(l);if(c.reversed){s.removeEdge(l);var f=c.forwardName;delete c.reversed,delete c.forwardName,s.setEdge(l.w,l.v,c,f)}})}return pd}var vd,l1;function Rt(){if(l1)return vd;l1=1;var e=dt(),t=on().Graph;vd={addDummyNode:n,simplify:r,asNonCompoundGraph:o,successorWeights:s,predecessorWeights:l,intersectRect:c,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:a,addBorderNode:u,maxRank:h,partition:p,time:O,notime:m};function n(_,g,w,E){var y;do y=e.uniqueId(E);while(_.hasNode(y));return w.dummy=g,_.setNode(y,w),y}function r(_){var g=new t().setGraph(_.graph());return e.forEach(_.nodes(),function(w){g.setNode(w,_.node(w))}),e.forEach(_.edges(),function(w){var E=g.edge(w.v,w.w)||{weight:0,minlen:1},y=_.edge(w);g.setEdge(w.v,w.w,{weight:E.weight+y.weight,minlen:Math.max(E.minlen,y.minlen)})}),g}function o(_){var g=new t({multigraph:_.isMultigraph()}).setGraph(_.graph());return e.forEach(_.nodes(),function(w){_.children(w).length||g.setNode(w,_.node(w))}),e.forEach(_.edges(),function(w){g.setEdge(w,_.edge(w))}),g}function s(_){var g=e.map(_.nodes(),function(w){var E={};return e.forEach(_.outEdges(w),function(y){E[y.w]=(E[y.w]||0)+_.edge(y).weight}),E});return e.zipObject(_.nodes(),g)}function l(_){var g=e.map(_.nodes(),function(w){var E={};return e.forEach(_.inEdges(w),function(y){E[y.v]=(E[y.v]||0)+_.edge(y).weight}),E});return e.zipObject(_.nodes(),g)}function c(_,g){var w=_.x,E=_.y,y=g.x-w,x=g.y-E,C=_.width/2,N=_.height/2;if(!y&&!x)throw new Error("Not possible to find intersection inside of the rectangle");var I,j;return Math.abs(x)*C>Math.abs(y)*N?(x<0&&(N=-N),I=N*y/x,j=N):(y<0&&(C=-C),I=C,j=C*x/y),{x:w+I,y:E+j}}function f(_){var g=e.map(e.range(h(_)+1),function(){return[]});return e.forEach(_.nodes(),function(w){var E=_.node(w),y=E.rank;e.isUndefined(y)||(g[y][E.order]=w)}),g}function d(_){var g=e.min(e.map(_.nodes(),function(w){return _.node(w).rank}));e.forEach(_.nodes(),function(w){var E=_.node(w);e.has(E,"rank")&&(E.rank-=g)})}function a(_){var g=e.min(e.map(_.nodes(),function(x){return _.node(x).rank})),w=[];e.forEach(_.nodes(),function(x){var C=_.node(x).rank-g;w[C]||(w[C]=[]),w[C].push(x)});var E=0,y=_.graph().nodeRankFactor;e.forEach(w,function(x,C){e.isUndefined(x)&&C%y!==0?--E:E&&e.forEach(x,function(N){_.node(N).rank+=E})})}function u(_,g,w,E){var y={width:0,height:0};return arguments.length>=4&&(y.rank=w,y.order=E),n(_,"border",y,g)}function h(_){return e.max(e.map(_.nodes(),function(g){var w=_.node(g).rank;if(!e.isUndefined(w))return w}))}function p(_,g){var w={lhs:[],rhs:[]};return e.forEach(_,function(E){g(E)?w.lhs.push(E):w.rhs.push(E)}),w}function O(_,g){var w=e.now();try{return g()}finally{console.log(_+" time: "+(e.now()-w)+"ms")}}function m(_,g){return g()}return vd}var gd,u1;function OT(){if(u1)return gd;u1=1;var e=dt(),t=Rt();gd={run:n,undo:o};function n(s){s.graph().dummyChains=[],e.forEach(s.edges(),function(l){r(s,l)})}function r(s,l){var c=l.v,f=s.node(c).rank,d=l.w,a=s.node(d).rank,u=l.name,h=s.edge(l),p=h.labelRank;if(a!==f+1){s.removeEdge(l);var O,m,_;for(_=0,++f;f<a;++_,++f)h.points=[],m={width:0,height:0,edgeLabel:h,edgeObj:l,rank:f},O=t.addDummyNode(s,"edge",m,"_d"),f===p&&(m.width=h.width,m.height=h.height,m.dummy="edge-label",m.labelpos=h.labelpos),s.setEdge(c,O,{weight:h.weight},u),_===0&&s.graph().dummyChains.push(O),c=O;s.setEdge(c,d,{weight:h.weight},u)}}function o(s){e.forEach(s.graph().dummyChains,function(l){var c=s.node(l),f=c.edgeLabel,d;for(s.setEdge(c.edgeObj,f);c.dummy;)d=s.successors(l)[0],s.removeNode(l),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),l=d,c=s.node(l)})}return gd}var yd,c1;function Si(){if(c1)return yd;c1=1;var e=dt();yd={longestPath:t,slack:n};function t(r){var o={};function s(l){var c=r.node(l);if(e.has(o,l))return c.rank;o[l]=!0;var f=e.min(e.map(r.outEdges(l),function(d){return s(d.w)-r.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(r.sources(),s)}function n(r,o){return r.node(o.w).rank-r.node(o.v).rank-r.edge(o).minlen}return yd}var md,f1;function d1(){if(f1)return md;f1=1;var e=dt(),t=on().Graph,n=Si().slack;md=r;function r(c){var f=new t({directed:!1}),d=c.nodes()[0],a=c.nodeCount();f.setNode(d,{});for(var u,h;o(f,c)<a;)u=s(f,c),h=f.hasNode(u.v)?n(c,u):-n(c,u),l(f,c,h);return f}function o(c,f){function d(a){e.forEach(f.nodeEdges(a),function(u){var h=u.v,p=a===h?u.w:h;!c.hasNode(p)&&!n(f,u)&&(c.setNode(p,{}),c.setEdge(a,p,{}),d(p))})}return e.forEach(c.nodes(),d),c.nodeCount()}function s(c,f){return e.minBy(f.edges(),function(d){if(c.hasNode(d.v)!==c.hasNode(d.w))return n(f,d)})}function l(c,f,d){e.forEach(c.nodes(),function(a){f.node(a).rank+=d})}return md}var bd,h1;function ET(){if(h1)return bd;h1=1;var e=dt(),t=d1(),n=Si().slack,r=Si().longestPath,o=on().alg.preorder,s=on().alg.postorder,l=Rt().simplify;bd=c,c.initLowLimValues=u,c.initCutValues=f,c.calcCutValue=a,c.leaveEdge=p,c.enterEdge=O,c.exchangeEdges=m;function c(E){E=l(E),r(E);var y=t(E);u(y),f(y,E);for(var x,C;x=p(y);)C=O(y,E,x),m(y,E,x,C)}function f(E,y){var x=s(E,E.nodes());x=x.slice(0,x.length-1),e.forEach(x,function(C){d(E,y,C)})}function d(E,y,x){var C=E.node(x),N=C.parent;E.edge(x,N).cutvalue=a(E,y,x)}function a(E,y,x){var C=E.node(x),N=C.parent,I=!0,j=y.edge(x,N),M=0;return j||(I=!1,j=y.edge(N,x)),M=j.weight,e.forEach(y.nodeEdges(x),function(A){var q=A.v===x,L=q?A.w:A.v;if(L!==N){var k=q===I,F=y.edge(A).weight;if(M+=k?F:-F,g(E,x,L)){var V=E.edge(x,L).cutvalue;M+=k?-V:V}}}),M}function u(E,y){arguments.length<2&&(y=E.nodes()[0]),h(E,{},1,y)}function h(E,y,x,C,N){var I=x,j=E.node(C);return y[C]=!0,e.forEach(E.neighbors(C),function(M){e.has(y,M)||(x=h(E,y,x,M,C))}),j.low=I,j.lim=x++,N?j.parent=N:delete j.parent,x}function p(E){return e.find(E.edges(),function(y){return E.edge(y).cutvalue<0})}function O(E,y,x){var C=x.v,N=x.w;y.hasEdge(C,N)||(C=x.w,N=x.v);var I=E.node(C),j=E.node(N),M=I,A=!1;I.lim>j.lim&&(M=j,A=!0);var q=e.filter(y.edges(),function(L){return A===w(E,E.node(L.v),M)&&A!==w(E,E.node(L.w),M)});return e.minBy(q,function(L){return n(y,L)})}function m(E,y,x,C){var N=x.v,I=x.w;E.removeEdge(N,I),E.setEdge(C.v,C.w,{}),u(E),f(E,y),_(E,y)}function _(E,y){var x=e.find(E.nodes(),function(N){return!y.node(N).parent}),C=o(E,x);C=C.slice(1),e.forEach(C,function(N){var I=E.node(N).parent,j=y.edge(N,I),M=!1;j||(j=y.edge(I,N),M=!0),y.node(N).rank=y.node(I).rank+(M?j.minlen:-j.minlen)})}function g(E,y,x){return E.hasEdge(y,x)}function w(E,y,x){return x.low<=y.lim&&y.lim<=x.lim}return bd}var _d,p1;function ST(){if(p1)return _d;p1=1;var e=Si(),t=e.longestPath,n=d1(),r=ET();_d=o;function o(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":l(f);break;case"longest-path":s(f);break;default:c(f)}}var s=t;function l(f){t(f),n(f)}function c(f){r(f)}return _d}var wd,v1;function xT(){if(v1)return wd;v1=1;var e=dt();wd=t;function t(o){var s=r(o);e.forEach(o.graph().dummyChains,function(l){for(var c=o.node(l),f=c.edgeObj,d=n(o,s,f.v,f.w),a=d.path,u=d.lca,h=0,p=a[h],O=!0;l!==f.w;){if(c=o.node(l),O){for(;(p=a[h])!==u&&o.node(p).maxRank<c.rank;)h++;p===u&&(O=!1)}if(!O){for(;h<a.length-1&&o.node(p=a[h+1]).minRank<=c.rank;)h++;p=a[h]}o.setParent(l,p),l=o.successors(l)[0]}})}function n(o,s,l,c){var f=[],d=[],a=Math.min(s[l].low,s[c].low),u=Math.max(s[l].lim,s[c].lim),h,p;h=l;do h=o.parent(h),f.push(h);while(h&&(s[h].low>a||u>s[h].lim));for(p=h,h=c;(h=o.parent(h))!==p;)d.push(h);return{path:f.concat(d.reverse()),lca:p}}function r(o){var s={},l=0;function c(f){var d=l;e.forEach(o.children(f),c),s[f]={low:d,lim:l++}}return e.forEach(o.children(),c),s}return wd}var Od,g1;function kT(){if(g1)return Od;g1=1;var e=dt(),t=Rt();Od={run:n,cleanup:l};function n(c){var f=t.addDummyNode(c,"root",{},"_root"),d=o(c),a=e.max(e.values(d))-1,u=2*a+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(p){c.edge(p).minlen*=u});var h=s(c)+1;e.forEach(c.children(),function(p){r(c,f,u,h,a,d,p)}),c.graph().nodeRankFactor=u}function r(c,f,d,a,u,h,p){var O=c.children(p);if(!O.length){p!==f&&c.setEdge(f,p,{weight:0,minlen:d});return}var m=t.addBorderNode(c,"_bt"),_=t.addBorderNode(c,"_bb"),g=c.node(p);c.setParent(m,p),g.borderTop=m,c.setParent(_,p),g.borderBottom=_,e.forEach(O,function(w){r(c,f,d,a,u,h,w);var E=c.node(w),y=E.borderTop?E.borderTop:w,x=E.borderBottom?E.borderBottom:w,C=E.borderTop?a:2*a,N=y!==x?1:u-h[p]+1;c.setEdge(m,y,{weight:C,minlen:N,nestingEdge:!0}),c.setEdge(x,_,{weight:C,minlen:N,nestingEdge:!0})}),c.parent(p)||c.setEdge(f,m,{weight:0,minlen:u+h[p]})}function o(c){var f={};function d(a,u){var h=c.children(a);h&&h.length&&e.forEach(h,function(p){d(p,u+1)}),f[a]=u}return e.forEach(c.children(),function(a){d(a,1)}),f}function s(c){return e.reduce(c.edges(),function(f,d){return f+c.edge(d).weight},0)}function l(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(d){var a=c.edge(d);a.nestingEdge&&c.removeEdge(d)})}return Od}var Ed,y1;function NT(){if(y1)return Ed;y1=1;var e=dt(),t=Rt();Ed=n;function n(o){function s(l){var c=o.children(l),f=o.node(l);if(c.length&&e.forEach(c,s),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,a=f.maxRank+1;d<a;++d)r(o,"borderLeft","_bl",l,f,d),r(o,"borderRight","_br",l,f,d)}}e.forEach(o.children(),s)}function r(o,s,l,c,f,d){var a={width:0,height:0,rank:d,borderType:s},u=f[s][d-1],h=t.addDummyNode(o,"border",a,l);f[s][d]=h,o.setParent(h,c),u&&o.setEdge(u,h,{weight:1})}return Ed}var Sd,m1;function TT(){if(m1)return Sd;m1=1;var e=dt();Sd={adjust:t,undo:n};function t(d){var a=d.graph().rankdir.toLowerCase();(a==="lr"||a==="rl")&&r(d)}function n(d){var a=d.graph().rankdir.toLowerCase();(a==="bt"||a==="rl")&&s(d),(a==="lr"||a==="rl")&&(c(d),r(d))}function r(d){e.forEach(d.nodes(),function(a){o(d.node(a))}),e.forEach(d.edges(),function(a){o(d.edge(a))})}function o(d){var a=d.width;d.width=d.height,d.height=a}function s(d){e.forEach(d.nodes(),function(a){l(d.node(a))}),e.forEach(d.edges(),function(a){var u=d.edge(a);e.forEach(u.points,l),e.has(u,"y")&&l(u)})}function l(d){d.y=-d.y}function c(d){e.forEach(d.nodes(),function(a){f(d.node(a))}),e.forEach(d.edges(),function(a){var u=d.edge(a);e.forEach(u.points,f),e.has(u,"x")&&f(u)})}function f(d){var a=d.x;d.x=d.y,d.y=a}return Sd}var xd,b1;function CT(){if(b1)return xd;b1=1;var e=dt();xd=t;function t(n){var r={},o=e.filter(n.nodes(),function(d){return!n.children(d).length}),s=e.max(e.map(o,function(d){return n.node(d).rank})),l=e.map(e.range(s+1),function(){return[]});function c(d){if(!e.has(r,d)){r[d]=!0;var a=n.node(d);l[a.rank].push(d),e.forEach(n.successors(d),c)}}var f=e.sortBy(o,function(d){return n.node(d).rank});return e.forEach(f,c),l}return xd}var kd,_1;function AT(){if(_1)return kd;_1=1;var e=dt();kd=t;function t(r,o){for(var s=0,l=1;l<o.length;++l)s+=n(r,o[l-1],o[l]);return s}function n(r,o,s){for(var l=e.zipObject(s,e.map(s,function(h,p){return p})),c=e.flatten(e.map(o,function(h){return e.sortBy(e.map(r.outEdges(h),function(p){return{pos:l[p.w],weight:r.edge(p).weight}}),"pos")}),!0),f=1;f<s.length;)f<<=1;var d=2*f-1;f-=1;var a=e.map(new Array(d),function(){return 0}),u=0;return e.forEach(c.forEach(function(h){var p=h.pos+f;a[p]+=h.weight;for(var O=0;p>0;)p%2&&(O+=a[p+1]),p=p-1>>1,a[p]+=h.weight;u+=h.weight*O})),u}return kd}var Nd,w1;function PT(){if(w1)return Nd;w1=1;var e=dt();Nd=t;function t(n,r){return e.map(r,function(o){var s=n.inEdges(o);if(s.length){var l=e.reduce(s,function(c,f){var d=n.edge(f),a=n.node(f.v);return{sum:c.sum+d.weight*a.order,weight:c.weight+d.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}return Nd}var Td,O1;function IT(){if(O1)return Td;O1=1;var e=dt();Td=t;function t(o,s){var l={};e.forEach(o,function(f,d){var a=l[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(a.barycenter=f.barycenter,a.weight=f.weight)}),e.forEach(s.edges(),function(f){var d=l[f.v],a=l[f.w];!e.isUndefined(d)&&!e.isUndefined(a)&&(a.indegree++,d.out.push(l[f.w]))});var c=e.filter(l,function(f){return!f.indegree});return n(c)}function n(o){var s=[];function l(d){return function(a){a.merged||(e.isUndefined(a.barycenter)||e.isUndefined(d.barycenter)||a.barycenter>=d.barycenter)&&r(d,a)}}function c(d){return function(a){a.in.push(d),--a.indegree===0&&o.push(a)}}for(;o.length;){var f=o.pop();s.push(f),e.forEach(f.in.reverse(),l(f)),e.forEach(f.out,c(f))}return e.map(e.filter(s,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function r(o,s){var l=0,c=0;o.weight&&(l+=o.barycenter*o.weight,c+=o.weight),s.weight&&(l+=s.barycenter*s.weight,c+=s.weight),o.vs=s.vs.concat(o.vs),o.barycenter=l/c,o.weight=c,o.i=Math.min(s.i,o.i),s.merged=!0}return Td}var Cd,E1;function MT(){if(E1)return Cd;E1=1;var e=dt(),t=Rt();Cd=n;function n(s,l){var c=t.partition(s,function(m){return e.has(m,"barycenter")}),f=c.lhs,d=e.sortBy(c.rhs,function(m){return-m.i}),a=[],u=0,h=0,p=0;f.sort(o(!!l)),p=r(a,d,p),e.forEach(f,function(m){p+=m.vs.length,a.push(m.vs),u+=m.barycenter*m.weight,h+=m.weight,p=r(a,d,p)});var O={vs:e.flatten(a,!0)};return h&&(O.barycenter=u/h,O.weight=h),O}function r(s,l,c){for(var f;l.length&&(f=e.last(l)).i<=c;)l.pop(),s.push(f.vs),c++;return c}function o(s){return function(l,c){return l.barycenter<c.barycenter?-1:l.barycenter>c.barycenter?1:s?c.i-l.i:l.i-c.i}}return Cd}var Ad,S1;function qT(){if(S1)return Ad;S1=1;var e=dt(),t=PT(),n=IT(),r=MT();Ad=o;function o(c,f,d,a){var u=c.children(f),h=c.node(f),p=h?h.borderLeft:void 0,O=h?h.borderRight:void 0,m={};p&&(u=e.filter(u,function(x){return x!==p&&x!==O}));var _=t(c,u);e.forEach(_,function(x){if(c.children(x.v).length){var C=o(c,x.v,d,a);m[x.v]=C,e.has(C,"barycenter")&&l(x,C)}});var g=n(_,d);s(g,m);var w=r(g,a);if(p&&(w.vs=e.flatten([p,w.vs,O],!0),c.predecessors(p).length)){var E=c.node(c.predecessors(p)[0]),y=c.node(c.predecessors(O)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+y.order)/(w.weight+2),w.weight+=2}return w}function s(c,f){e.forEach(c,function(d){d.vs=e.flatten(d.vs.map(function(a){return f[a]?f[a].vs:a}),!0)})}function l(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return Ad}var Pd,x1;function LT(){if(x1)return Pd;x1=1;var e=dt(),t=on().Graph;Pd=n;function n(o,s,l){var c=r(o),f=new t({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(d){return o.node(d)});return e.forEach(o.nodes(),function(d){var a=o.node(d),u=o.parent(d);(a.rank===s||a.minRank<=s&&s<=a.maxRank)&&(f.setNode(d),f.setParent(d,u||c),e.forEach(o[l](d),function(h){var p=h.v===d?h.w:h.v,O=f.edge(p,d),m=e.isUndefined(O)?0:O.weight;f.setEdge(p,d,{weight:o.edge(h).weight+m})}),e.has(a,"minRank")&&f.setNode(d,{borderLeft:a.borderLeft[s],borderRight:a.borderRight[s]}))}),f}function r(o){for(var s;o.hasNode(s=e.uniqueId("_root")););return s}return Pd}var Id,k1;function RT(){if(k1)return Id;k1=1;var e=dt();Id=t;function t(n,r,o){var s={},l;e.forEach(o,function(c){for(var f=n.parent(c),d,a;f;){if(d=n.parent(f),d?(a=s[d],s[d]=f):(a=l,l=f),a&&a!==f){r.setEdge(a,f);return}f=d}})}return Id}var Md,N1;function DT(){if(N1)return Md;N1=1;var e=dt(),t=CT(),n=AT(),r=qT(),o=LT(),s=RT(),l=on().Graph,c=Rt();Md=f;function f(h){var p=c.maxRank(h),O=d(h,e.range(1,p+1),"inEdges"),m=d(h,e.range(p-1,-1,-1),"outEdges"),_=t(h);u(h,_);for(var g=Number.POSITIVE_INFINITY,w,E=0,y=0;y<4;++E,++y){a(E%2?O:m,E%4>=2),_=c.buildLayerMatrix(h);var x=n(h,_);x<g&&(y=0,w=e.cloneDeep(_),g=x)}u(h,w)}function d(h,p,O){return e.map(p,function(m){return o(h,m,O)})}function a(h,p){var O=new l;e.forEach(h,function(m){var _=m.graph().root,g=r(m,_,O,p);e.forEach(g.vs,function(w,E){m.node(w).order=E}),s(m,O,g.vs)})}function u(h,p){e.forEach(p,function(O){e.forEach(O,function(m,_){h.node(m).order=_})})}return Md}var qd,T1;function jT(){if(T1)return qd;T1=1;var e=dt(),t=on().Graph,n=Rt();qd={positionX:O,findType1Conflicts:r,findType2Conflicts:o,addConflict:l,hasConflict:c,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:u,balance:p};function r(g,w){var E={};function y(x,C){var N=0,I=0,j=x.length,M=e.last(C);return e.forEach(C,function(A,q){var L=s(g,A),k=L?g.node(L).order:j;(L||A===M)&&(e.forEach(C.slice(I,q+1),function(F){e.forEach(g.predecessors(F),function(V){var ne=g.node(V),ue=ne.order;(ue<N||k<ue)&&!(ne.dummy&&g.node(F).dummy)&&l(E,V,F)})}),I=q+1,N=k)}),C}return e.reduce(w,y),E}function o(g,w){var E={};function y(C,N,I,j,M){var A;e.forEach(e.range(N,I),function(q){A=C[q],g.node(A).dummy&&e.forEach(g.predecessors(A),function(L){var k=g.node(L);k.dummy&&(k.order<j||k.order>M)&&l(E,L,A)})})}function x(C,N){var I=-1,j,M=0;return e.forEach(N,function(A,q){if(g.node(A).dummy==="border"){var L=g.predecessors(A);L.length&&(j=g.node(L[0]).order,y(N,M,q,I,j),M=q,I=j)}y(N,M,N.length,j,C.length)}),N}return e.reduce(w,x),E}function s(g,w){if(g.node(w).dummy)return e.find(g.predecessors(w),function(E){return g.node(E).dummy})}function l(g,w,E){if(w>E){var y=w;w=E,E=y}var x=g[w];x||(g[w]=x={}),x[E]=!0}function c(g,w,E){if(w>E){var y=w;w=E,E=y}return e.has(g[w],E)}function f(g,w,E,y){var x={},C={},N={};return e.forEach(w,function(I){e.forEach(I,function(j,M){x[j]=j,C[j]=j,N[j]=M})}),e.forEach(w,function(I){var j=-1;e.forEach(I,function(M){var A=y(M);if(A.length){A=e.sortBy(A,function(V){return N[V]});for(var q=(A.length-1)/2,L=Math.floor(q),k=Math.ceil(q);L<=k;++L){var F=A[L];C[M]===M&&j<N[F]&&!c(E,M,F)&&(C[F]=M,C[M]=x[M]=x[F],j=N[F])}}})}),{root:x,align:C}}function d(g,w,E,y,x){var C={},N=a(g,w,E,x),I=x?"borderLeft":"borderRight";function j(q,L){for(var k=N.nodes(),F=k.pop(),V={};F;)V[F]?q(F):(V[F]=!0,k.push(F),k=k.concat(L(F))),F=k.pop()}function M(q){C[q]=N.inEdges(q).reduce(function(L,k){return Math.max(L,C[k.v]+N.edge(k))},0)}function A(q){var L=N.outEdges(q).reduce(function(F,V){return Math.min(F,C[V.w]-N.edge(V))},Number.POSITIVE_INFINITY),k=g.node(q);L!==Number.POSITIVE_INFINITY&&k.borderType!==I&&(C[q]=Math.max(C[q],L))}return j(M,N.predecessors.bind(N)),j(A,N.successors.bind(N)),e.forEach(y,function(q){C[q]=C[E[q]]}),C}function a(g,w,E,y){var x=new t,C=g.graph(),N=m(C.nodesep,C.edgesep,y);return e.forEach(w,function(I){var j;e.forEach(I,function(M){var A=E[M];if(x.setNode(A),j){var q=E[j],L=x.edge(q,A);x.setEdge(q,A,Math.max(N(g,M,j),L||0))}j=M})}),x}function u(g,w){return e.minBy(e.values(w),function(E){var y=Number.NEGATIVE_INFINITY,x=Number.POSITIVE_INFINITY;return e.forIn(E,function(C,N){var I=_(g,N)/2;y=Math.max(C+I,y),x=Math.min(C-I,x)}),y-x})}function h(g,w){var E=e.values(w),y=e.min(E),x=e.max(E);e.forEach(["u","d"],function(C){e.forEach(["l","r"],function(N){var I=C+N,j=g[I],M;if(j!==w){var A=e.values(j);M=N==="l"?y-e.min(A):x-e.max(A),M&&(g[I]=e.mapValues(j,function(q){return q+M}))}})})}function p(g,w){return e.mapValues(g.ul,function(E,y){if(w)return g[w.toLowerCase()][y];var x=e.sortBy(e.map(g,y));return(x[1]+x[2])/2})}function O(g){var w=n.buildLayerMatrix(g),E=e.merge(r(g,w),o(g,w)),y={},x;e.forEach(["u","d"],function(N){x=N==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(I){I==="r"&&(x=e.map(x,function(q){return e.values(q).reverse()}));var j=(N==="u"?g.predecessors:g.successors).bind(g),M=f(g,x,E,j),A=d(g,x,M.root,M.align,I==="r");I==="r"&&(A=e.mapValues(A,function(q){return-q})),y[N+I]=A})});var C=u(g,y);return h(y,C),p(y,g.graph().align)}function m(g,w,E){return function(y,x,C){var N=y.node(x),I=y.node(C),j=0,M;if(j+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":M=-N.width/2;break;case"r":M=N.width/2;break}if(M&&(j+=E?M:-M),M=0,j+=(N.dummy?w:g)/2,j+=(I.dummy?w:g)/2,j+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":M=I.width/2;break;case"r":M=-I.width/2;break}return M&&(j+=E?M:-M),M=0,j}}function _(g,w){return g.node(w).width}return qd}var Ld,C1;function FT(){if(C1)return Ld;C1=1;var e=dt(),t=Rt(),n=jT().positionX;Ld=r;function r(s){s=t.asNonCompoundGraph(s),o(s),e.forEach(n(s),function(l,c){s.node(c).x=l})}function o(s){var l=t.buildLayerMatrix(s),c=s.graph().ranksep,f=0;e.forEach(l,function(d){var a=e.max(e.map(d,function(u){return s.node(u).height}));e.forEach(d,function(u){s.node(u).y=f+a/2}),f+=a+c})}return Ld}var Rd,A1;function BT(){if(A1)return Rd;A1=1;var e=dt(),t=wT(),n=OT(),r=ST(),o=Rt().normalizeRanks,s=xT(),l=Rt().removeEmptyRanks,c=kT(),f=NT(),d=TT(),a=DT(),u=FT(),h=Rt(),p=on().Graph;Rd=O;function O(Z,X){var $=X&&X.debugTiming?h.time:h.notime;$("layout",function(){var ee=$(" buildLayoutGraph",function(){return j(Z)});$(" runLayout",function(){m(ee,$)}),$(" updateInputGraph",function(){_(Z,ee)})})}function m(Z,X){X(" makeSpaceForEdgeLabels",function(){M(Z)}),X(" removeSelfEdges",function(){K(Z)}),X(" acyclic",function(){t.run(Z)}),X(" nestingGraph.run",function(){c.run(Z)}),X(" rank",function(){r(h.asNonCompoundGraph(Z))}),X(" injectEdgeLabelProxies",function(){A(Z)}),X(" removeEmptyRanks",function(){l(Z)}),X(" nestingGraph.cleanup",function(){c.cleanup(Z)}),X(" normalizeRanks",function(){o(Z)}),X(" assignRankMinMax",function(){q(Z)}),X(" removeEdgeLabelProxies",function(){L(Z)}),X(" normalize.run",function(){n.run(Z)}),X(" parentDummyChains",function(){s(Z)}),X(" addBorderSegments",function(){f(Z)}),X(" order",function(){a(Z)}),X(" insertSelfEdges",function(){W(Z)}),X(" adjustCoordinateSystem",function(){d.adjust(Z)}),X(" position",function(){u(Z)}),X(" positionSelfEdges",function(){B(Z)}),X(" removeBorderNodes",function(){ue(Z)}),X(" normalize.undo",function(){n.undo(Z)}),X(" fixupEdgeLabelCoords",function(){V(Z)}),X(" undoCoordinateSystem",function(){d.undo(Z)}),X(" translateGraph",function(){k(Z)}),X(" assignNodeIntersects",function(){F(Z)}),X(" reversePoints",function(){ne(Z)}),X(" acyclic.undo",function(){t.undo(Z)})}function _(Z,X){e.forEach(Z.nodes(),function($){var ee=Z.node($),le=X.node($);ee&&(ee.x=le.x,ee.y=le.y,X.children($).length&&(ee.width=le.width,ee.height=le.height))}),e.forEach(Z.edges(),function($){var ee=Z.edge($),le=X.edge($);ee.points=le.points,e.has(le,"x")&&(ee.x=le.x,ee.y=le.y)}),Z.graph().width=X.graph().width,Z.graph().height=X.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],y=["width","height"],x={width:0,height:0},C=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},I=["labelpos"];function j(Z){var X=new p({multigraph:!0,compound:!0}),$=re(Z.graph());return X.setGraph(e.merge({},w,Q($,g),e.pick($,E))),e.forEach(Z.nodes(),function(ee){var le=re(Z.node(ee));X.setNode(ee,e.defaults(Q(le,y),x)),X.setParent(ee,Z.parent(ee))}),e.forEach(Z.edges(),function(ee){var le=re(Z.edge(ee));X.setEdge(ee,e.merge({},N,Q(le,C),e.pick(le,I)))}),X}function M(Z){var X=Z.graph();X.ranksep/=2,e.forEach(Z.edges(),function($){var ee=Z.edge($);ee.minlen*=2,ee.labelpos.toLowerCase()!=="c"&&(X.rankdir==="TB"||X.rankdir==="BT"?ee.width+=ee.labeloffset:ee.height+=ee.labeloffset)})}function A(Z){e.forEach(Z.edges(),function(X){var $=Z.edge(X);if($.width&&$.height){var ee=Z.node(X.v),le=Z.node(X.w),de={rank:(le.rank-ee.rank)/2+ee.rank,e:X};h.addDummyNode(Z,"edge-proxy",de,"_ep")}})}function q(Z){var X=0;e.forEach(Z.nodes(),function($){var ee=Z.node($);ee.borderTop&&(ee.minRank=Z.node(ee.borderTop).rank,ee.maxRank=Z.node(ee.borderBottom).rank,X=e.max(X,ee.maxRank))}),Z.graph().maxRank=X}function L(Z){e.forEach(Z.nodes(),function(X){var $=Z.node(X);$.dummy==="edge-proxy"&&(Z.edge($.e).labelRank=$.rank,Z.removeNode(X))})}function k(Z){var X=Number.POSITIVE_INFINITY,$=0,ee=Number.POSITIVE_INFINITY,le=0,de=Z.graph(),pe=de.marginx||0,Ee=de.marginy||0;function Ie(Pe){var Ae=Pe.x,xe=Pe.y,Ge=Pe.width,Oe=Pe.height;X=Math.min(X,Ae-Ge/2),$=Math.max($,Ae+Ge/2),ee=Math.min(ee,xe-Oe/2),le=Math.max(le,xe+Oe/2)}e.forEach(Z.nodes(),function(Pe){Ie(Z.node(Pe))}),e.forEach(Z.edges(),function(Pe){var Ae=Z.edge(Pe);e.has(Ae,"x")&&Ie(Ae)}),X-=pe,ee-=Ee,e.forEach(Z.nodes(),function(Pe){var Ae=Z.node(Pe);Ae.x-=X,Ae.y-=ee}),e.forEach(Z.edges(),function(Pe){var Ae=Z.edge(Pe);e.forEach(Ae.points,function(xe){xe.x-=X,xe.y-=ee}),e.has(Ae,"x")&&(Ae.x-=X),e.has(Ae,"y")&&(Ae.y-=ee)}),de.width=$-X+pe,de.height=le-ee+Ee}function F(Z){e.forEach(Z.edges(),function(X){var $=Z.edge(X),ee=Z.node(X.v),le=Z.node(X.w),de,pe;$.points?(de=$.points[0],pe=$.points[$.points.length-1]):($.points=[],de=le,pe=ee),$.points.unshift(h.intersectRect(ee,de)),$.points.push(h.intersectRect(le,pe))})}function V(Z){e.forEach(Z.edges(),function(X){var $=Z.edge(X);if(e.has($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function ne(Z){e.forEach(Z.edges(),function(X){var $=Z.edge(X);$.reversed&&$.points.reverse()})}function ue(Z){e.forEach(Z.nodes(),function(X){if(Z.children(X).length){var $=Z.node(X),ee=Z.node($.borderTop),le=Z.node($.borderBottom),de=Z.node(e.last($.borderLeft)),pe=Z.node(e.last($.borderRight));$.width=Math.abs(pe.x-de.x),$.height=Math.abs(le.y-ee.y),$.x=de.x+$.width/2,$.y=ee.y+$.height/2}}),e.forEach(Z.nodes(),function(X){Z.node(X).dummy==="border"&&Z.removeNode(X)})}function K(Z){e.forEach(Z.edges(),function(X){if(X.v===X.w){var $=Z.node(X.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:X,label:Z.edge(X)}),Z.removeEdge(X)}})}function W(Z){var X=h.buildLayerMatrix(Z);e.forEach(X,function($){var ee=0;e.forEach($,function(le,de){var pe=Z.node(le);pe.order=de+ee,e.forEach(pe.selfEdges,function(Ee){h.addDummyNode(Z,"selfedge",{width:Ee.label.width,height:Ee.label.height,rank:pe.rank,order:de+ ++ee,e:Ee.e,label:Ee.label},"_se")}),delete pe.selfEdges})})}function B(Z){e.forEach(Z.nodes(),function(X){var $=Z.node(X);if($.dummy==="selfedge"){var ee=Z.node($.e.v),le=ee.x+ee.width/2,de=ee.y,pe=$.x-le,Ee=ee.height/2;Z.setEdge($.e,$.label),Z.removeNode(X),$.label.points=[{x:le+2*pe/3,y:de-Ee},{x:le+5*pe/6,y:de-Ee},{x:le+pe,y:de},{x:le+5*pe/6,y:de+Ee},{x:le+2*pe/3,y:de+Ee}],$.label.x=$.x,$.label.y=$.y}})}function Q(Z,X){return e.mapValues(e.pick(Z,X),Number)}function re(Z){var X={};return e.forEach(Z,function($,ee){X[ee.toLowerCase()]=$}),X}return Rd}var Dd,P1;function zT(){if(P1)return Dd;P1=1;var e=dt(),t=Rt(),n=on().Graph;Dd={debugOrdering:r};function r(o){var s=t.buildLayerMatrix(o),l=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(c){l.setNode(c,{label:c}),l.setParent(c,"layer"+o.node(c).rank)}),e.forEach(o.edges(),function(c){l.setEdge(c.v,c.w,{},c.name)}),e.forEach(s,function(c,f){var d="layer"+f;l.setNode(d,{rank:"same"}),e.reduce(c,function(a,u){return l.setEdge(a,u,{style:"invis"}),u})}),l}return Dd}var jd,I1;function HT(){return I1||(I1=1,jd="0.8.5"),jd}var Fd,M1;function $T(){return M1||(M1=1,Fd={graphlib:on(),layout:BT(),debug:zT(),util:{time:Rt().time,notime:Rt().notime},version:HT()}),Fd}var VT=$T();const co=ns(VT);function wr(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function xn(e){return function t(n){return arguments.length===0||wr(n)?t:e.apply(this,arguments)}}function q1(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return wr(n)?t:xn(function(o){return e(n,o)});default:return wr(n)&&wr(r)?t:wr(n)?xn(function(o){return e(o,r)}):wr(r)?xn(function(o){return e(n,o)}):e(n,r)}}}const UT=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function GT(e){return Object.prototype.toString.call(e)==="[object String]"}function xi(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var L1=Object.prototype.toString,R1=(function(){return L1.call(arguments)==="[object Arguments]"?function(t){return L1.call(t)==="[object Arguments]"}:function(t){return xi("callee",t)}})(),KT=!{toString:null}.propertyIsEnumerable("toString"),D1=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],j1=(function(){return arguments.propertyIsEnumerable("length")})(),WT=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},F1=xn(typeof Object.keys=="function"&&!j1?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,o=[],s=j1&&R1(t);for(n in t)xi(n,t)&&(!s||n!=="length")&&(o[o.length]=n);if(KT)for(r=D1.length-1;r>=0;)n=D1[r],xi(n,t)&&!WT(o,n)&&(o[o.length]=n),r-=1;return o}),hn=xn(function(t){return t==null}),B1=xn(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function z1(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function H1(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function YT(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function ZT(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const Bd=typeof Object.is=="function"?Object.is:ZT;function $1(e,t,n,r){var o=z1(e),s=z1(t);function l(c,f){return zd(c,f,n.slice(),r.slice())}return!H1(function(c,f){return!H1(l,f,c)},s,o)}function zd(e,t,n,r){if(Bd(e,t))return!0;var o=B1(e);if(o!==B1(t)||e==null||t==null)return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&YT(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Bd(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Bd(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(o){case"Map":return e.size!==t.size?!1:$1(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:$1(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=F1(e);if(l.length!==F1(t).length)return!1;var c=n.concat([e]),f=r.concat([t]);for(s=l.length-1;s>=0;){var d=l[s];if(!(xi(d,t)&&zd(t[d],e[d],c,f)))return!1;s-=1}return!0}var XT=q1(function(t,n){return zd(t,n,[],[])});function QT(e){return Object.prototype.toString.call(e)==="[object Object]"}var JT=xn(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():UT(t)?[]:GT(t)?"":QT(t)?{}:R1(t)?(function(){return arguments})():void 0}),bt=xn(function(t){return t!=null&&XT(t,JT(t))}),V1=q1(function(t,n){for(var r={},o={},s=0,l=t.length;s<l;)o[t[s]]=1,s+=1;for(var c in n)o.hasOwnProperty(c)||(r[c]=n[c]);return r});function Tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Tt(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Hd={exports:{}},$d={},Vd={exports:{}},Ud={},U1;function e2(){if(U1)return Ud;U1=1;/**
1
+ (function(ht,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],$):(ht=typeof globalThis<"u"?globalThis:ht||self,$(ht["hise-flow-graphs"]={},ht.jsxRuntime,ht.React,ht.ReactDOM))})(this,(function(ht,$,se,SS){"use strict";const hv=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},nt=hv(se),pv=hv(SS);var ii=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ts(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ns(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 rs,vv;function kS(){if(vv)return rs;vv=1;function e(){this.__data__=[],this.size=0}return rs=e,rs}var os,gv;function vr(){if(gv)return os;gv=1;function e(t,n){return t===n||t!==t&&n!==n}return os=e,os}var is,yv;function ai(){if(yv)return is;yv=1;var e=vr();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return is=t,is}var as,mv;function NS(){if(mv)return as;mv=1;var e=ai(),t=Array.prototype,n=t.splice;function r(o){var s=this.__data__,l=e(s,o);if(l<0)return!1;var c=s.length-1;return l==c?s.pop():n.call(s,l,1),--this.size,!0}return as=r,as}var ss,bv;function TS(){if(bv)return ss;bv=1;var e=ai();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return ss=t,ss}var ls,_v;function CS(){if(_v)return ls;_v=1;var e=ai();function t(n){return e(this.__data__,n)>-1}return ls=t,ls}var us,wv;function AS(){if(wv)return us;wv=1;var e=ai();function t(n,r){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,r])):o[s][1]=r,this}return us=t,us}var cs,Ov;function si(){if(Ov)return cs;Ov=1;var e=kS(),t=NS(),n=TS(),r=CS(),o=AS();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,cs=s,cs}var fs,Ev;function PS(){if(Ev)return fs;Ev=1;var e=si();function t(){this.__data__=new e,this.size=0}return fs=t,fs}var ds,xv;function IS(){if(xv)return ds;xv=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ds=e,ds}var hs,Sv;function MS(){if(Sv)return hs;Sv=1;function e(t){return this.__data__.get(t)}return hs=e,hs}var ps,kv;function qS(){if(kv)return ps;kv=1;function e(t){return this.__data__.has(t)}return ps=e,ps}var vs,Nv;function Tv(){if(Nv)return vs;Nv=1;var e=typeof ii=="object"&&ii&&ii.Object===Object&&ii;return vs=e,vs}var gs,Cv;function rn(){if(Cv)return gs;Cv=1;var e=Tv(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return gs=n,gs}var ys,Av;function gr(){if(Av)return ys;Av=1;var e=rn(),t=e.Symbol;return ys=t,ys}var ms,Pv;function LS(){if(Pv)return ms;Pv=1;var e=gr(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(l){var c=n.call(l,o),f=l[o];try{l[o]=void 0;var h=!0}catch{}var a=r.call(l);return h&&(c?l[o]=f:delete l[o]),a}return ms=s,ms}var bs,Iv;function RS(){if(Iv)return bs;Iv=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return bs=n,bs}var _s,Mv;function Wn(){if(Mv)return _s;Mv=1;var e=gr(),t=LS(),n=RS(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?o:r:s&&s in Object(c)?t(c):n(c)}return _s=l,_s}var ws,qv;function Wt(){if(qv)return ws;qv=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ws=e,ws}var Os,Lv;function to(){if(Lv)return Os;Lv=1;var e=Wn(),t=Wt(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==o||f==n||f==s}return Os=l,Os}var Es,Rv;function DS(){if(Rv)return Es;Rv=1;var e=rn(),t=e["__core-js_shared__"];return Es=t,Es}var xs,Dv;function jS(){if(Dv)return xs;Dv=1;var e=DS(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return xs=n,xs}var Ss,jv;function Fv(){if(jv)return Ss;jv=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ss=n,Ss}var ks,Bv;function FS(){if(Bv)return ks;Bv=1;var e=to(),t=jS(),n=Wt(),r=Fv(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,h=c.hasOwnProperty,a=RegExp("^"+f.call(h).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(d){if(!n(d)||t(d))return!1;var p=e(d)?a:s;return p.test(r(d))}return ks=u,ks}var Ns,zv;function BS(){if(zv)return Ns;zv=1;function e(t,n){return t?.[n]}return Ns=e,Ns}var Ts,$v;function Yn(){if($v)return Ts;$v=1;var e=FS(),t=BS();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return Ts=n,Ts}var Cs,Hv;function As(){if(Hv)return Cs;Hv=1;var e=Yn(),t=rn(),n=e(t,"Map");return Cs=n,Cs}var Ps,Vv;function li(){if(Vv)return Ps;Vv=1;var e=Yn(),t=e(Object,"create");return Ps=t,Ps}var Is,Uv;function zS(){if(Uv)return Is;Uv=1;var e=li();function t(){this.__data__=e?e(null):{},this.size=0}return Is=t,Is}var Ms,Gv;function $S(){if(Gv)return Ms;Gv=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Ms=e,Ms}var qs,Kv;function HS(){if(Kv)return qs;Kv=1;var e=li(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(s){var l=this.__data__;if(e){var c=l[s];return c===t?void 0:c}return r.call(l,s)?l[s]:void 0}return qs=o,qs}var Ls,Wv;function VS(){if(Wv)return Ls;Wv=1;var e=li(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return Ls=r,Ls}var Rs,Yv;function US(){if(Yv)return Rs;Yv=1;var e=li(),t="__lodash_hash_undefined__";function n(r,o){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&o===void 0?t:o,this}return Rs=n,Rs}var Ds,Zv;function GS(){if(Zv)return Ds;Zv=1;var e=zS(),t=$S(),n=HS(),r=VS(),o=US();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,Ds=s,Ds}var js,Xv;function KS(){if(Xv)return js;Xv=1;var e=GS(),t=si(),n=As();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return js=r,js}var Fs,Qv;function WS(){if(Qv)return Fs;Qv=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Fs=e,Fs}var Bs,Jv;function ui(){if(Jv)return Bs;Jv=1;var e=WS();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return Bs=t,Bs}var zs,eg;function YS(){if(eg)return zs;eg=1;var e=ui();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return zs=t,zs}var $s,tg;function ZS(){if(tg)return $s;tg=1;var e=ui();function t(n){return e(this,n).get(n)}return $s=t,$s}var Hs,ng;function XS(){if(ng)return Hs;ng=1;var e=ui();function t(n){return e(this,n).has(n)}return Hs=t,Hs}var Vs,rg;function QS(){if(rg)return Vs;rg=1;var e=ui();function t(n,r){var o=e(this,n),s=o.size;return o.set(n,r),this.size+=o.size==s?0:1,this}return Vs=t,Vs}var Us,og;function Gs(){if(og)return Us;og=1;var e=KS(),t=YS(),n=ZS(),r=XS(),o=QS();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,Us=s,Us}var Ks,ig;function JS(){if(ig)return Ks;ig=1;var e=si(),t=As(),n=Gs(),r=200;function o(s,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([s,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(s,l),this.size=c.size,this}return Ks=o,Ks}var Ws,ag;function ci(){if(ag)return Ws;ag=1;var e=si(),t=PS(),n=IS(),r=MS(),o=qS(),s=JS();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=o,l.prototype.set=s,Ws=l,Ws}var Ys,sg;function Zs(){if(sg)return Ys;sg=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o&&n(t[r],r,t)!==!1;);return t}return Ys=e,Ys}var Xs,lg;function ug(){if(lg)return Xs;lg=1;var e=Yn(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Xs=t,Xs}var Qs,cg;function fi(){if(cg)return Qs;cg=1;var e=ug();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Qs=t,Qs}var Js,fg;function di(){if(fg)return Js;fg=1;var e=fi(),t=vr(),n=Object.prototype,r=n.hasOwnProperty;function o(s,l,c){var f=s[l];(!(r.call(s,l)&&t(f,c))||c===void 0&&!(l in s))&&e(s,l,c)}return Js=o,Js}var el,dg;function no(){if(dg)return el;dg=1;var e=di(),t=fi();function n(r,o,s,l){var c=!s;s||(s={});for(var f=-1,h=o.length;++f<h;){var a=o[f],u=l?l(s[a],r[a],a,s,r):void 0;u===void 0&&(u=r[a]),c?t(s,a,u):e(s,a,u)}return s}return el=n,el}var tl,hg;function ek(){if(hg)return tl;hg=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return tl=e,tl}var nl,pg;function fn(){if(pg)return nl;pg=1;function e(t){return t!=null&&typeof t=="object"}return nl=e,nl}var rl,vg;function tk(){if(vg)return rl;vg=1;var e=Wn(),t=fn(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return rl=r,rl}var ol,gg;function ro(){if(gg)return ol;gg=1;var e=tk(),t=fn(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!o.call(l,"callee")};return ol=s,ol}var il,yg;function yt(){if(yg)return il;yg=1;var e=Array.isArray;return il=e,il}var oo={exports:{}},al,mg;function nk(){if(mg)return al;mg=1;function e(){return!1}return al=e,al}oo.exports;var bg;function yr(){return bg||(bg=1,(function(e,t){var n=rn(),r=nk(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,l=s&&s.exports===o,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,h=f||r;e.exports=h})(oo,oo.exports)),oo.exports}var sl,_g;function hi(){if(_g)return sl;_g=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var s=typeof r;return o=o??e,!!o&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return sl=n,sl}var ll,wg;function ul(){if(wg)return ll;wg=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ll=t,ll}var cl,Og;function rk(){if(Og)return cl;Og=1;var e=Wn(),t=ul(),n=fn(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",h="[object Map]",a="[object Number]",u="[object Object]",d="[object RegExp]",p="[object Set]",O="[object String]",g="[object WeakMap]",_="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",m="[object Int8Array]",S="[object Int16Array]",C="[object Int32Array]",N="[object Uint8Array]",M="[object Uint8ClampedArray]",j="[object Uint16Array]",I="[object Uint32Array]",A={};A[w]=A[E]=A[m]=A[S]=A[C]=A[N]=A[M]=A[j]=A[I]=!0,A[r]=A[o]=A[_]=A[s]=A[y]=A[l]=A[c]=A[f]=A[h]=A[a]=A[u]=A[d]=A[p]=A[O]=A[g]=!1;function q(R){return n(R)&&t(R.length)&&!!A[e(R)]}return cl=q,cl}var fl,Eg;function pi(){if(Eg)return fl;Eg=1;function e(t){return function(n){return t(n)}}return fl=e,fl}var io={exports:{}};io.exports;var xg;function dl(){return xg||(xg=1,(function(e,t){var n=Tv(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,l=s&&n.process,c=(function(){try{var f=o&&o.require&&o.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(io,io.exports)),io.exports}var hl,Sg;function ao(){if(Sg)return hl;Sg=1;var e=rk(),t=pi(),n=dl(),r=n&&n.isTypedArray,o=r?t(r):e;return hl=o,hl}var pl,kg;function Ng(){if(kg)return pl;kg=1;var e=ek(),t=ro(),n=yt(),r=yr(),o=hi(),s=ao(),l=Object.prototype,c=l.hasOwnProperty;function f(h,a){var u=n(h),d=!u&&t(h),p=!u&&!d&&r(h),O=!u&&!d&&!p&&s(h),g=u||d||p||O,_=g?e(h.length,String):[],y=_.length;for(var w in h)(a||c.call(h,w))&&!(g&&(w=="length"||p&&(w=="offset"||w=="parent")||O&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,y)))&&_.push(w);return _}return pl=f,pl}var vl,Tg;function vi(){if(Tg)return vl;Tg=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return vl=t,vl}var gl,Cg;function Ag(){if(Cg)return gl;Cg=1;function e(t,n){return function(r){return t(n(r))}}return gl=e,gl}var yl,Pg;function ok(){if(Pg)return yl;Pg=1;var e=Ag(),t=e(Object.keys,Object);return yl=t,yl}var ml,Ig;function bl(){if(Ig)return ml;Ig=1;var e=vi(),t=ok(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&l.push(c);return l}return ml=o,ml}var _l,Mg;function On(){if(Mg)return _l;Mg=1;var e=to(),t=ul();function n(r){return r!=null&&t(r.length)&&!e(r)}return _l=n,_l}var wl,qg;function Ln(){if(qg)return wl;qg=1;var e=Ng(),t=bl(),n=On();function r(o){return n(o)?e(o):t(o)}return wl=r,wl}var Ol,Lg;function ik(){if(Lg)return Ol;Lg=1;var e=no(),t=Ln();function n(r,o){return r&&e(o,t(o),r)}return Ol=n,Ol}var El,Rg;function ak(){if(Rg)return El;Rg=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return El=e,El}var xl,Dg;function sk(){if(Dg)return xl;Dg=1;var e=Wt(),t=vi(),n=ak(),r=Object.prototype,o=r.hasOwnProperty;function s(l){if(!e(l))return n(l);var c=t(l),f=[];for(var h in l)h=="constructor"&&(c||!o.call(l,h))||f.push(h);return f}return xl=s,xl}var Sl,jg;function Zn(){if(jg)return Sl;jg=1;var e=Ng(),t=sk(),n=On();function r(o){return n(o)?e(o,!0):t(o)}return Sl=r,Sl}var kl,Fg;function lk(){if(Fg)return kl;Fg=1;var e=no(),t=Zn();function n(r,o){return r&&e(o,t(o),r)}return kl=n,kl}var so={exports:{}};so.exports;var Bg;function zg(){return Bg||(Bg=1,(function(e,t){var n=rn(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,l=s?n.Buffer:void 0,c=l?l.allocUnsafe:void 0;function f(h,a){if(a)return h.slice();var u=h.length,d=c?c(u):new h.constructor(u);return h.copy(d),d}e.exports=f})(so,so.exports)),so.exports}var Nl,$g;function Hg(){if($g)return Nl;$g=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return Nl=e,Nl}var Tl,Vg;function Ug(){if(Vg)return Tl;Vg=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=0,l=[];++r<o;){var c=t[r];n(c,r,t)&&(l[s++]=c)}return l}return Tl=e,Tl}var Cl,Gg;function Kg(){if(Gg)return Cl;Gg=1;function e(){return[]}return Cl=e,Cl}var Al,Wg;function Pl(){if(Wg)return Al;Wg=1;var e=Ug(),t=Kg(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(l){return l==null?[]:(l=Object(l),e(o(l),function(c){return r.call(l,c)}))}:t;return Al=s,Al}var Il,Yg;function uk(){if(Yg)return Il;Yg=1;var e=no(),t=Pl();function n(r,o){return e(r,t(r),o)}return Il=n,Il}var Ml,Zg;function ql(){if(Zg)return Ml;Zg=1;function e(t,n){for(var r=-1,o=n.length,s=t.length;++r<o;)t[s+r]=n[r];return t}return Ml=e,Ml}var Ll,Xg;function gi(){if(Xg)return Ll;Xg=1;var e=Ag(),t=e(Object.getPrototypeOf,Object);return Ll=t,Ll}var Rl,Qg;function Jg(){if(Qg)return Rl;Qg=1;var e=ql(),t=gi(),n=Pl(),r=Kg(),o=Object.getOwnPropertySymbols,s=o?function(l){for(var c=[];l;)e(c,n(l)),l=t(l);return c}:r;return Rl=s,Rl}var Dl,ey;function ck(){if(ey)return Dl;ey=1;var e=no(),t=Jg();function n(r,o){return e(r,t(r),o)}return Dl=n,Dl}var jl,ty;function ny(){if(ty)return jl;ty=1;var e=ql(),t=yt();function n(r,o,s){var l=o(r);return t(r)?l:e(l,s(r))}return jl=n,jl}var Fl,ry;function oy(){if(ry)return Fl;ry=1;var e=ny(),t=Pl(),n=Ln();function r(o){return e(o,n,t)}return Fl=r,Fl}var Bl,iy;function fk(){if(iy)return Bl;iy=1;var e=ny(),t=Jg(),n=Zn();function r(o){return e(o,n,t)}return Bl=r,Bl}var zl,ay;function dk(){if(ay)return zl;ay=1;var e=Yn(),t=rn(),n=e(t,"DataView");return zl=n,zl}var $l,sy;function hk(){if(sy)return $l;sy=1;var e=Yn(),t=rn(),n=e(t,"Promise");return $l=n,$l}var Hl,ly;function uy(){if(ly)return Hl;ly=1;var e=Yn(),t=rn(),n=e(t,"Set");return Hl=n,Hl}var Vl,cy;function pk(){if(cy)return Vl;cy=1;var e=Yn(),t=rn(),n=e(t,"WeakMap");return Vl=n,Vl}var Ul,fy;function mr(){if(fy)return Ul;fy=1;var e=dk(),t=As(),n=hk(),r=uy(),o=pk(),s=Wn(),l=Fv(),c="[object Map]",f="[object Object]",h="[object Promise]",a="[object Set]",u="[object WeakMap]",d="[object DataView]",p=l(e),O=l(t),g=l(n),_=l(r),y=l(o),w=s;return(e&&w(new e(new ArrayBuffer(1)))!=d||t&&w(new t)!=c||n&&w(n.resolve())!=h||r&&w(new r)!=a||o&&w(new o)!=u)&&(w=function(E){var m=s(E),S=m==f?E.constructor:void 0,C=S?l(S):"";if(C)switch(C){case p:return d;case O:return c;case g:return h;case _:return a;case y:return u}return m}),Ul=w,Ul}var Gl,dy;function vk(){if(dy)return Gl;dy=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var o=r.length,s=new r.constructor(o);return o&&typeof r[0]=="string"&&t.call(r,"index")&&(s.index=r.index,s.input=r.input),s}return Gl=n,Gl}var Kl,hy;function py(){if(hy)return Kl;hy=1;var e=rn(),t=e.Uint8Array;return Kl=t,Kl}var Wl,vy;function Yl(){if(vy)return Wl;vy=1;var e=py();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Wl=t,Wl}var Zl,gy;function gk(){if(gy)return Zl;gy=1;var e=Yl();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Zl=t,Zl}var Xl,yy;function yk(){if(yy)return Xl;yy=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Xl=t,Xl}var Ql,my;function mk(){if(my)return Ql;my=1;var e=gr(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return Ql=r,Ql}var Jl,by;function _y(){if(by)return Jl;by=1;var e=Yl();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return Jl=t,Jl}var eu,wy;function bk(){if(wy)return eu;wy=1;var e=Yl(),t=gk(),n=yk(),r=mk(),o=_y(),s="[object Boolean]",l="[object Date]",c="[object Map]",f="[object Number]",h="[object RegExp]",a="[object Set]",u="[object String]",d="[object Symbol]",p="[object ArrayBuffer]",O="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",y="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",m="[object Uint8Array]",S="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]";function M(j,I,A){var q=j.constructor;switch(I){case p:return e(j);case s:case l:return new q(+j);case O:return t(j,A);case g:case _:case y:case w:case E:case m:case S:case C:case N:return o(j,A);case c:return new q;case f:case u:return new q(j);case h:return n(j);case a:return new q;case d:return r(j)}}return eu=M,eu}var tu,Oy;function Ey(){if(Oy)return tu;Oy=1;var e=Wt(),t=Object.create,n=(function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var s=new r;return r.prototype=void 0,s}})();return tu=n,tu}var nu,xy;function Sy(){if(xy)return nu;xy=1;var e=Ey(),t=gi(),n=vi();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return nu=r,nu}var ru,ky;function _k(){if(ky)return ru;ky=1;var e=mr(),t=fn(),n="[object Map]";function r(o){return t(o)&&e(o)==n}return ru=r,ru}var ou,Ny;function wk(){if(Ny)return ou;Ny=1;var e=_k(),t=pi(),n=dl(),r=n&&n.isMap,o=r?t(r):e;return ou=o,ou}var iu,Ty;function Ok(){if(Ty)return iu;Ty=1;var e=mr(),t=fn(),n="[object Set]";function r(o){return t(o)&&e(o)==n}return iu=r,iu}var au,Cy;function Ek(){if(Cy)return au;Cy=1;var e=Ok(),t=pi(),n=dl(),r=n&&n.isSet,o=r?t(r):e;return au=o,au}var su,Ay;function Py(){if(Ay)return su;Ay=1;var e=ci(),t=Zs(),n=di(),r=ik(),o=lk(),s=zg(),l=Hg(),c=uk(),f=ck(),h=oy(),a=fk(),u=mr(),d=vk(),p=bk(),O=Sy(),g=yt(),_=yr(),y=wk(),w=Wt(),E=Ek(),m=Ln(),S=Zn(),C=1,N=2,M=4,j="[object Arguments]",I="[object Array]",A="[object Boolean]",q="[object Date]",R="[object Error]",k="[object Function]",F="[object GeneratorFunction]",U="[object Map]",ne="[object Number]",ue="[object Object]",K="[object RegExp]",W="[object Set]",z="[object String]",Q="[object Symbol]",re="[object WeakMap]",Z="[object ArrayBuffer]",X="[object DataView]",H="[object Float32Array]",ee="[object Float64Array]",le="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",Ee="[object Uint8Array]",Ie="[object Uint8ClampedArray]",Pe="[object Uint16Array]",Ae="[object Uint32Array]",Se={};Se[j]=Se[I]=Se[Z]=Se[X]=Se[A]=Se[q]=Se[H]=Se[ee]=Se[le]=Se[de]=Se[pe]=Se[U]=Se[ne]=Se[ue]=Se[K]=Se[W]=Se[z]=Se[Q]=Se[Ee]=Se[Ie]=Se[Pe]=Se[Ae]=!0,Se[R]=Se[k]=Se[re]=!1;function Ge(Oe,ge,me,ke,Ne,we){var qe,je=ge&C,ze=ge&N,lt=ge&M;if(me&&(qe=Ne?me(Oe,ke,Ne,we):me(Oe)),qe!==void 0)return qe;if(!w(Oe))return Oe;var pt=g(Oe);if(pt){if(qe=d(Oe),!je)return l(Oe,qe)}else{var Ze=u(Oe),It=Ze==k||Ze==F;if(_(Oe))return s(Oe,je);if(Ze==ue||Ze==j||It&&!Ne){if(qe=ze||It?{}:O(Oe),!je)return ze?f(Oe,o(qe,Oe)):c(Oe,r(qe,Oe))}else{if(!Se[Ze])return Ne?Oe:{};qe=p(Oe,Ze,je)}}we||(we=new e);var We=we.get(Oe);if(We)return We;we.set(Oe,qe),E(Oe)?Oe.forEach(function(kt){qe.add(Ge(kt,ge,me,kt,Oe,we))}):y(Oe)&&Oe.forEach(function(kt,Nt){qe.set(Nt,Ge(kt,ge,me,Nt,Oe,we))});var it=lt?ze?a:h:ze?S:m,Ot=pt?void 0:it(Oe);return t(Ot||Oe,function(kt,Nt){Ot&&(Nt=kt,kt=Oe[Nt]),n(qe,Nt,Ge(kt,ge,me,Nt,Oe,we))}),qe}return su=Ge,su}var lu,Iy;function xk(){if(Iy)return lu;Iy=1;var e=Py(),t=4;function n(r){return e(r,t)}return lu=n,lu}var uu,My;function cu(){if(My)return uu;My=1;function e(t){return function(){return t}}return uu=e,uu}var fu,qy;function Sk(){if(qy)return fu;qy=1;function e(t){return function(n,r,o){for(var s=-1,l=Object(n),c=o(n),f=c.length;f--;){var h=c[t?f:++s];if(r(l[h],h,l)===!1)break}return n}}return fu=e,fu}var du,Ly;function hu(){if(Ly)return du;Ly=1;var e=Sk(),t=e();return du=t,du}var pu,Ry;function vu(){if(Ry)return pu;Ry=1;var e=hu(),t=Ln();function n(r,o){return r&&e(r,o,t)}return pu=n,pu}var gu,Dy;function kk(){if(Dy)return gu;Dy=1;var e=On();function t(n,r){return function(o,s){if(o==null)return o;if(!e(o))return n(o,s);for(var l=o.length,c=r?l:-1,f=Object(o);(r?c--:++c<l)&&s(f[c],c,f)!==!1;);return o}}return gu=t,gu}var yu,jy;function yi(){if(jy)return yu;jy=1;var e=vu(),t=kk(),n=t(e);return yu=n,yu}var mu,Fy;function Xn(){if(Fy)return mu;Fy=1;function e(t){return t}return mu=e,mu}var bu,By;function zy(){if(By)return bu;By=1;var e=Xn();function t(n){return typeof n=="function"?n:e}return bu=t,bu}var _u,$y;function Hy(){if($y)return _u;$y=1;var e=Zs(),t=yi(),n=zy(),r=yt();function o(s,l){var c=r(s)?e:t;return c(s,n(l))}return _u=o,_u}var wu,Vy;function Uy(){return Vy||(Vy=1,wu=Hy()),wu}var Ou,Gy;function Nk(){if(Gy)return Ou;Gy=1;var e=yi();function t(n,r){var o=[];return e(n,function(s,l,c){r(s,l,c)&&o.push(s)}),o}return Ou=t,Ou}var Eu,Ky;function Tk(){if(Ky)return Eu;Ky=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Eu=t,Eu}var xu,Wy;function Ck(){if(Wy)return xu;Wy=1;function e(t){return this.__data__.has(t)}return xu=e,xu}var Su,Yy;function Zy(){if(Yy)return Su;Yy=1;var e=Gs(),t=Tk(),n=Ck();function r(o){var s=-1,l=o==null?0:o.length;for(this.__data__=new e;++s<l;)this.add(o[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Su=r,Su}var ku,Xy;function Ak(){if(Xy)return ku;Xy=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return ku=e,ku}var Nu,Qy;function Jy(){if(Qy)return Nu;Qy=1;function e(t,n){return t.has(n)}return Nu=e,Nu}var Tu,em;function tm(){if(em)return Tu;em=1;var e=Zy(),t=Ak(),n=Jy(),r=1,o=2;function s(l,c,f,h,a,u){var d=f&r,p=l.length,O=c.length;if(p!=O&&!(d&&O>p))return!1;var g=u.get(l),_=u.get(c);if(g&&_)return g==c&&_==l;var y=-1,w=!0,E=f&o?new e:void 0;for(u.set(l,c),u.set(c,l);++y<p;){var m=l[y],S=c[y];if(h)var C=d?h(S,m,y,c,l,u):h(m,S,y,l,c,u);if(C!==void 0){if(C)continue;w=!1;break}if(E){if(!t(c,function(N,M){if(!n(E,M)&&(m===N||a(m,N,f,h,u)))return E.push(M)})){w=!1;break}}else if(!(m===S||a(m,S,f,h,u))){w=!1;break}}return u.delete(l),u.delete(c),w}return Tu=s,Tu}var Cu,nm;function Pk(){if(nm)return Cu;nm=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,s){r[++n]=[s,o]}),r}return Cu=e,Cu}var Au,rm;function Pu(){if(rm)return Au;rm=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Au=e,Au}var Iu,om;function Ik(){if(om)return Iu;om=1;var e=gr(),t=py(),n=vr(),r=tm(),o=Pk(),s=Pu(),l=1,c=2,f="[object Boolean]",h="[object Date]",a="[object Error]",u="[object Map]",d="[object Number]",p="[object RegExp]",O="[object Set]",g="[object String]",_="[object Symbol]",y="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,m=E?E.valueOf:void 0;function S(C,N,M,j,I,A,q){switch(M){case w:if(C.byteLength!=N.byteLength||C.byteOffset!=N.byteOffset)return!1;C=C.buffer,N=N.buffer;case y:return!(C.byteLength!=N.byteLength||!A(new t(C),new t(N)));case f:case h:case d:return n(+C,+N);case a:return C.name==N.name&&C.message==N.message;case p:case g:return C==N+"";case u:var R=o;case O:var k=j&l;if(R||(R=s),C.size!=N.size&&!k)return!1;var F=q.get(C);if(F)return F==N;j|=c,q.set(C,N);var U=r(R(C),R(N),j,I,A,q);return q.delete(C),U;case _:if(m)return m.call(C)==m.call(N)}return!1}return Iu=S,Iu}var Mu,im;function Mk(){if(im)return Mu;im=1;var e=oy(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(s,l,c,f,h,a){var u=c&t,d=e(s),p=d.length,O=e(l),g=O.length;if(p!=g&&!u)return!1;for(var _=p;_--;){var y=d[_];if(!(u?y in l:r.call(l,y)))return!1}var w=a.get(s),E=a.get(l);if(w&&E)return w==l&&E==s;var m=!0;a.set(s,l),a.set(l,s);for(var S=u;++_<p;){y=d[_];var C=s[y],N=l[y];if(f)var M=u?f(N,C,y,l,s,a):f(C,N,y,s,l,a);if(!(M===void 0?C===N||h(C,N,c,f,a):M)){m=!1;break}S||(S=y=="constructor")}if(m&&!S){var j=s.constructor,I=l.constructor;j!=I&&"constructor"in s&&"constructor"in l&&!(typeof j=="function"&&j instanceof j&&typeof I=="function"&&I instanceof I)&&(m=!1)}return a.delete(s),a.delete(l),m}return Mu=o,Mu}var qu,am;function qk(){if(am)return qu;am=1;var e=ci(),t=tm(),n=Ik(),r=Mk(),o=mr(),s=yt(),l=yr(),c=ao(),f=1,h="[object Arguments]",a="[object Array]",u="[object Object]",d=Object.prototype,p=d.hasOwnProperty;function O(g,_,y,w,E,m){var S=s(g),C=s(_),N=S?a:o(g),M=C?a:o(_);N=N==h?u:N,M=M==h?u:M;var j=N==u,I=M==u,A=N==M;if(A&&l(g)){if(!l(_))return!1;S=!0,j=!1}if(A&&!j)return m||(m=new e),S||c(g)?t(g,_,y,w,E,m):n(g,_,N,y,w,E,m);if(!(y&f)){var q=j&&p.call(g,"__wrapped__"),R=I&&p.call(_,"__wrapped__");if(q||R){var k=q?g.value():g,F=R?_.value():_;return m||(m=new e),E(k,F,y,w,m)}}return A?(m||(m=new e),r(g,_,y,w,E,m)):!1}return qu=O,qu}var Lu,sm;function Ru(){if(sm)return Lu;sm=1;var e=qk(),t=fn();function n(r,o,s,l,c){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,s,l,n,c)}return Lu=n,Lu}var Du,lm;function Lk(){if(lm)return Du;lm=1;var e=ci(),t=Ru(),n=1,r=2;function o(s,l,c,f){var h=c.length,a=h,u=!f;if(s==null)return!a;for(s=Object(s);h--;){var d=c[h];if(u&&d[2]?d[1]!==s[d[0]]:!(d[0]in s))return!1}for(;++h<a;){d=c[h];var p=d[0],O=s[p],g=d[1];if(u&&d[2]){if(O===void 0&&!(p in s))return!1}else{var _=new e;if(f)var y=f(O,g,p,s,l,_);if(!(y===void 0?t(g,O,n|r,f,_):y))return!1}}return!0}return Du=o,Du}var ju,um;function cm(){if(um)return ju;um=1;var e=Wt();function t(n){return n===n&&!e(n)}return ju=t,ju}var Fu,fm;function Rk(){if(fm)return Fu;fm=1;var e=cm(),t=Ln();function n(r){for(var o=t(r),s=o.length;s--;){var l=o[s],c=r[l];o[s]=[l,c,e(c)]}return o}return Fu=n,Fu}var Bu,dm;function hm(){if(dm)return Bu;dm=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Bu=e,Bu}var zu,pm;function Dk(){if(pm)return zu;pm=1;var e=Lk(),t=Rk(),n=hm();function r(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(l){return l===o||e(l,o,s)}}return zu=r,zu}var $u,vm;function br(){if(vm)return $u;vm=1;var e=Wn(),t=fn(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return $u=r,$u}var Hu,gm;function Vu(){if(gm)return Hu;gm=1;var e=yt(),t=br(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return Hu=o,Hu}var Uu,ym;function jk(){if(ym)return Uu;ym=1;var e=Gs(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var s=function(){var l=arguments,c=o?o.apply(this,l):l[0],f=s.cache;if(f.has(c))return f.get(c);var h=r.apply(this,l);return s.cache=f.set(c,h)||f,h};return s.cache=new(n.Cache||e),s}return n.Cache=e,Uu=n,Uu}var Gu,mm;function Fk(){if(mm)return Gu;mm=1;var e=jk(),t=500;function n(r){var o=e(r,function(l){return s.size===t&&s.clear(),l}),s=o.cache;return o}return Gu=n,Gu}var Ku,bm;function Bk(){if(bm)return Ku;bm=1;var e=Fk(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(t,function(l,c,f,h){s.push(f?h.replace(n,"$1"):c||l)}),s});return Ku=r,Ku}var Wu,_m;function mi(){if(_m)return Wu;_m=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=Array(o);++r<o;)s[r]=n(t[r],r,t);return s}return Wu=e,Wu}var Yu,wm;function zk(){if(wm)return Yu;wm=1;var e=gr(),t=mi(),n=yt(),r=br(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return s?s.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return Yu=l,Yu}var Zu,Om;function Em(){if(Om)return Zu;Om=1;var e=zk();function t(n){return n==null?"":e(n)}return Zu=t,Zu}var Xu,xm;function bi(){if(xm)return Xu;xm=1;var e=yt(),t=Vu(),n=Bk(),r=Em();function o(s,l){return e(s)?s:t(s,l)?[s]:n(r(s))}return Xu=o,Xu}var Qu,Sm;function lo(){if(Sm)return Qu;Sm=1;var e=br();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Qu=t,Qu}var Ju,km;function _i(){if(km)return Ju;km=1;var e=bi(),t=lo();function n(r,o){o=e(o,r);for(var s=0,l=o.length;r!=null&&s<l;)r=r[t(o[s++])];return s&&s==l?r:void 0}return Ju=n,Ju}var ec,Nm;function $k(){if(Nm)return ec;Nm=1;var e=_i();function t(n,r,o){var s=n==null?void 0:e(n,r);return s===void 0?o:s}return ec=t,ec}var tc,Tm;function Hk(){if(Tm)return tc;Tm=1;function e(t,n){return t!=null&&n in Object(t)}return tc=e,tc}var nc,Cm;function Am(){if(Cm)return nc;Cm=1;var e=bi(),t=ro(),n=yt(),r=hi(),o=ul(),s=lo();function l(c,f,h){f=e(f,c);for(var a=-1,u=f.length,d=!1;++a<u;){var p=s(f[a]);if(!(d=c!=null&&h(c,p)))break;c=c[p]}return d||++a!=u?d:(u=c==null?0:c.length,!!u&&o(u)&&r(p,u)&&(n(c)||t(c)))}return nc=l,nc}var rc,Pm;function Im(){if(Pm)return rc;Pm=1;var e=Hk(),t=Am();function n(r,o){return r!=null&&t(r,o,e)}return rc=n,rc}var oc,Mm;function Vk(){if(Mm)return oc;Mm=1;var e=Ru(),t=$k(),n=Im(),r=Vu(),o=cm(),s=hm(),l=lo(),c=1,f=2;function h(a,u){return r(a)&&o(u)?s(l(a),u):function(d){var p=t(d,a);return p===void 0&&p===u?n(d,a):e(u,p,c|f)}}return oc=h,oc}var ic,qm;function Lm(){if(qm)return ic;qm=1;function e(t){return function(n){return n?.[t]}}return ic=e,ic}var ac,Rm;function Uk(){if(Rm)return ac;Rm=1;var e=_i();function t(n){return function(r){return e(r,n)}}return ac=t,ac}var sc,Dm;function Gk(){if(Dm)return sc;Dm=1;var e=Lm(),t=Uk(),n=Vu(),r=lo();function o(s){return n(s)?e(r(s)):t(s)}return sc=o,sc}var lc,jm;function En(){if(jm)return lc;jm=1;var e=Dk(),t=Vk(),n=Xn(),r=yt(),o=Gk();function s(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):o(l)}return lc=s,lc}var uc,Fm;function Bm(){if(Fm)return uc;Fm=1;var e=Ug(),t=Nk(),n=En(),r=yt();function o(s,l){var c=r(s)?e:t;return c(s,n(l,3))}return uc=o,uc}var cc,zm;function Kk(){if(zm)return cc;zm=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return cc=n,cc}var fc,$m;function Hm(){if($m)return fc;$m=1;var e=Kk(),t=Am();function n(r,o){return r!=null&&t(r,o,e)}return fc=n,fc}var dc,Vm;function Wk(){if(Vm)return dc;Vm=1;var e=bl(),t=mr(),n=ro(),r=yt(),o=On(),s=yr(),l=vi(),c=ao(),f="[object Map]",h="[object Set]",a=Object.prototype,u=a.hasOwnProperty;function d(p){if(p==null)return!0;if(o(p)&&(r(p)||typeof p=="string"||typeof p.splice=="function"||s(p)||c(p)||n(p)))return!p.length;var O=t(p);if(O==f||O==h)return!p.size;if(l(p))return!e(p).length;for(var g in p)if(u.call(p,g))return!1;return!0}return dc=d,dc}var hc,Um;function Gm(){if(Um)return hc;Um=1;function e(t){return t===void 0}return hc=e,hc}var pc,Km;function Wm(){if(Km)return pc;Km=1;var e=yi(),t=On();function n(r,o){var s=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,h){l[++s]=o(c,f,h)}),l}return pc=n,pc}var vc,Ym;function Zm(){if(Ym)return vc;Ym=1;var e=mi(),t=En(),n=Wm(),r=yt();function o(s,l){var c=r(s)?e:n;return c(s,t(l,3))}return vc=o,vc}var gc,Xm;function Yk(){if(Xm)return gc;Xm=1;function e(t,n,r,o){var s=-1,l=t==null?0:t.length;for(o&&l&&(r=t[++s]);++s<l;)r=n(r,t[s],s,t);return r}return gc=e,gc}var yc,Qm;function Zk(){if(Qm)return yc;Qm=1;function e(t,n,r,o,s){return s(t,function(l,c,f){r=o?(o=!1,l):n(r,l,c,f)}),r}return yc=e,yc}var mc,Jm;function eb(){if(Jm)return mc;Jm=1;var e=Yk(),t=yi(),n=En(),r=Zk(),o=yt();function s(l,c,f){var h=o(l)?e:r,a=arguments.length<3;return h(l,n(c,4),f,a,t)}return mc=s,mc}var bc,tb;function Xk(){if(tb)return bc;tb=1;var e=Wn(),t=yt(),n=fn(),r="[object String]";function o(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return bc=o,bc}var _c,nb;function Qk(){if(nb)return _c;nb=1;var e=Lm(),t=e("length");return _c=t,_c}var wc,rb;function Jk(){if(rb)return wc;rb=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+o+s+"]");function f(h){return c.test(h)}return wc=f,wc}var Oc,ob;function eN(){if(ob)return Oc;ob=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+f+")",a="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",O=h+"?",g="["+s+"]?",_="(?:"+p+"(?:"+[a,u,d].join("|")+")"+g+O+")*",y=g+O+_,w="(?:"+[a+c+"?",c,u,d,l].join("|")+")",E=RegExp(f+"(?="+f+")|"+w+y,"g");function m(S){for(var C=E.lastIndex=0;E.test(S);)++C;return C}return Oc=m,Oc}var Ec,ib;function tN(){if(ib)return Ec;ib=1;var e=Qk(),t=Jk(),n=eN();function r(o){return t(o)?n(o):e(o)}return Ec=r,Ec}var xc,ab;function nN(){if(ab)return xc;ab=1;var e=bl(),t=mr(),n=On(),r=Xk(),o=tN(),s="[object Map]",l="[object Set]";function c(f){if(f==null)return 0;if(n(f))return r(f)?o(f):f.length;var h=t(f);return h==s||h==l?f.size:e(f).length}return xc=c,xc}var Sc,sb;function rN(){if(sb)return Sc;sb=1;var e=Zs(),t=Ey(),n=vu(),r=En(),o=gi(),s=yt(),l=yr(),c=to(),f=Wt(),h=ao();function a(u,d,p){var O=s(u),g=O||l(u)||h(u);if(d=r(d,4),p==null){var _=u&&u.constructor;g?p=O?new _:[]:f(u)?p=c(_)?t(o(u)):{}:p={}}return(g?e:n)(u,function(y,w,E){return d(p,y,w,E)}),p}return Sc=a,Sc}var kc,lb;function oN(){if(lb)return kc;lb=1;var e=gr(),t=ro(),n=yt(),r=e?e.isConcatSpreadable:void 0;function o(s){return n(s)||t(s)||!!(r&&s&&s[r])}return kc=o,kc}var Nc,ub;function Tc(){if(ub)return Nc;ub=1;var e=ql(),t=oN();function n(r,o,s,l,c){var f=-1,h=r.length;for(s||(s=t),c||(c=[]);++f<h;){var a=r[f];o>0&&s(a)?o>1?n(a,o-1,s,l,c):e(c,a):l||(c[c.length]=a)}return c}return Nc=n,Nc}var Cc,cb;function iN(){if(cb)return Cc;cb=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Cc=e,Cc}var Ac,fb;function db(){if(fb)return Ac;fb=1;var e=iN(),t=Math.max;function n(r,o,s){return o=t(o===void 0?r.length-1:o,0),function(){for(var l=arguments,c=-1,f=t(l.length-o,0),h=Array(f);++c<f;)h[c]=l[o+c];c=-1;for(var a=Array(o+1);++c<o;)a[c]=l[c];return a[o]=s(h),e(r,this,a)}}return Ac=n,Ac}var Pc,hb;function aN(){if(hb)return Pc;hb=1;var e=cu(),t=ug(),n=Xn(),r=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return Pc=r,Pc}var Ic,pb;function sN(){if(pb)return Ic;pb=1;var e=800,t=16,n=Date.now;function r(o){var s=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return Ic=r,Ic}var Mc,vb;function gb(){if(vb)return Mc;vb=1;var e=aN(),t=sN(),n=t(e);return Mc=n,Mc}var qc,yb;function wi(){if(yb)return qc;yb=1;var e=Xn(),t=db(),n=gb();function r(o,s){return n(t(o,s,e),o+"")}return qc=r,qc}var Lc,mb;function bb(){if(mb)return Lc;mb=1;function e(t,n,r,o){for(var s=t.length,l=r+(o?1:-1);o?l--:++l<s;)if(n(t[l],l,t))return l;return-1}return Lc=e,Lc}var Rc,_b;function lN(){if(_b)return Rc;_b=1;function e(t){return t!==t}return Rc=e,Rc}var Dc,wb;function uN(){if(wb)return Dc;wb=1;function e(t,n,r){for(var o=r-1,s=t.length;++o<s;)if(t[o]===n)return o;return-1}return Dc=e,Dc}var jc,Ob;function cN(){if(Ob)return jc;Ob=1;var e=bb(),t=lN(),n=uN();function r(o,s,l){return s===s?n(o,s,l):e(o,t,l)}return jc=r,jc}var Fc,Eb;function fN(){if(Eb)return Fc;Eb=1;var e=cN();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return Fc=t,Fc}var Bc,xb;function dN(){if(xb)return Bc;xb=1;function e(t,n,r){for(var o=-1,s=t==null?0:t.length;++o<s;)if(r(n,t[o]))return!0;return!1}return Bc=e,Bc}var zc,Sb;function hN(){if(Sb)return zc;Sb=1;function e(){}return zc=e,zc}var $c,kb;function pN(){if(kb)return $c;kb=1;var e=uy(),t=hN(),n=Pu(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return $c=o,$c}var Hc,Nb;function vN(){if(Nb)return Hc;Nb=1;var e=Zy(),t=fN(),n=dN(),r=Jy(),o=pN(),s=Pu(),l=200;function c(f,h,a){var u=-1,d=t,p=f.length,O=!0,g=[],_=g;if(a)O=!1,d=n;else if(p>=l){var y=h?null:o(f);if(y)return s(y);O=!1,d=r,_=new e}else _=h?[]:g;e:for(;++u<p;){var w=f[u],E=h?h(w):w;if(w=a||w!==0?w:0,O&&E===E){for(var m=_.length;m--;)if(_[m]===E)continue e;h&&_.push(E),g.push(w)}else d(_,E,a)||(_!==g&&_.push(E),g.push(w))}return g}return Hc=c,Hc}var Vc,Tb;function Cb(){if(Tb)return Vc;Tb=1;var e=On(),t=fn();function n(r){return t(r)&&e(r)}return Vc=n,Vc}var Uc,Ab;function gN(){if(Ab)return Uc;Ab=1;var e=Tc(),t=wi(),n=vN(),r=Cb(),o=t(function(s){return n(e(s,1,r,!0))});return Uc=o,Uc}var Gc,Pb;function yN(){if(Pb)return Gc;Pb=1;var e=mi();function t(n,r){return e(r,function(o){return n[o]})}return Gc=t,Gc}var Kc,Ib;function Mb(){if(Ib)return Kc;Ib=1;var e=yN(),t=Ln();function n(r){return r==null?[]:e(r,t(r))}return Kc=n,Kc}var Wc,qb;function Yt(){if(qb)return Wc;qb=1;var e;if(typeof ns=="function")try{e={clone:xk(),constant:cu(),each:Uy(),filter:Bm(),has:Hm(),isArray:yt(),isEmpty:Wk(),isFunction:to(),isUndefined:Gm(),keys:Ln(),map:Zm(),reduce:eb(),size:nN(),transform:rN(),union:gN(),values:Mb()}}catch{}return e||(e=window._),Wc=e,Wc}var Yc,Lb;function Zc(){if(Lb)return Yc;Lb=1;var e=Yt();Yc=o;var t="\0",n="\0",r="";function o(a){this._isDirected=e.has(a,"directed")?a.directed:!0,this._isMultigraph=e.has(a,"multigraph")?a.multigraph:!1,this._isCompound=e.has(a,"compound")?a.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(a){return this._label=a,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(a){return e.isFunction(a)||(a=e.constant(a)),this._defaultNodeLabelFn=a,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var a=this;return e.filter(this.nodes(),function(u){return e.isEmpty(a._in[u])})},o.prototype.sinks=function(){var a=this;return e.filter(this.nodes(),function(u){return e.isEmpty(a._out[u])})},o.prototype.setNodes=function(a,u){var d=arguments,p=this;return e.each(a,function(O){d.length>1?p.setNode(O,u):p.setNode(O)}),this},o.prototype.setNode=function(a,u){return e.has(this._nodes,a)?(arguments.length>1&&(this._nodes[a]=u),this):(this._nodes[a]=arguments.length>1?u:this._defaultNodeLabelFn(a),this._isCompound&&(this._parent[a]=n,this._children[a]={},this._children[n][a]=!0),this._in[a]={},this._preds[a]={},this._out[a]={},this._sucs[a]={},++this._nodeCount,this)},o.prototype.node=function(a){return this._nodes[a]},o.prototype.hasNode=function(a){return e.has(this._nodes,a)},o.prototype.removeNode=function(a){var u=this;if(e.has(this._nodes,a)){var d=function(p){u.removeEdge(u._edgeObjs[p])};delete this._nodes[a],this._isCompound&&(this._removeFromParentsChildList(a),delete this._parent[a],e.each(this.children(a),function(p){u.setParent(p)}),delete this._children[a]),e.each(e.keys(this._in[a]),d),delete this._in[a],delete this._preds[a],e.each(e.keys(this._out[a]),d),delete this._out[a],delete this._sucs[a],--this._nodeCount}return this},o.prototype.setParent=function(a,u){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(u))u=n;else{u+="";for(var d=u;!e.isUndefined(d);d=this.parent(d))if(d===a)throw new Error("Setting "+u+" as parent of "+a+" would create a cycle");this.setNode(u)}return this.setNode(a),this._removeFromParentsChildList(a),this._parent[a]=u,this._children[u][a]=!0,this},o.prototype._removeFromParentsChildList=function(a){delete this._children[this._parent[a]][a]},o.prototype.parent=function(a){if(this._isCompound){var u=this._parent[a];if(u!==n)return u}},o.prototype.children=function(a){if(e.isUndefined(a)&&(a=n),this._isCompound){var u=this._children[a];if(u)return e.keys(u)}else{if(a===n)return this.nodes();if(this.hasNode(a))return[]}},o.prototype.predecessors=function(a){var u=this._preds[a];if(u)return e.keys(u)},o.prototype.successors=function(a){var u=this._sucs[a];if(u)return e.keys(u)},o.prototype.neighbors=function(a){var u=this.predecessors(a);if(u)return e.union(u,this.successors(a))},o.prototype.isLeaf=function(a){var u;return this.isDirected()?u=this.successors(a):u=this.neighbors(a),u.length===0},o.prototype.filterNodes=function(a){var u=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});u.setGraph(this.graph());var d=this;e.each(this._nodes,function(g,_){a(_)&&u.setNode(_,g)}),e.each(this._edgeObjs,function(g){u.hasNode(g.v)&&u.hasNode(g.w)&&u.setEdge(g,d.edge(g))});var p={};function O(g){var _=d.parent(g);return _===void 0||u.hasNode(_)?(p[g]=_,_):_ in p?p[_]:O(_)}return this._isCompound&&e.each(u.nodes(),function(g){u.setParent(g,O(g))}),u},o.prototype.setDefaultEdgeLabel=function(a){return e.isFunction(a)||(a=e.constant(a)),this._defaultEdgeLabelFn=a,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(a,u){var d=this,p=arguments;return e.reduce(a,function(O,g){return p.length>1?d.setEdge(O,g,u):d.setEdge(O,g),g}),this},o.prototype.setEdge=function(){var a,u,d,p,O=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(a=g.v,u=g.w,d=g.name,arguments.length===2&&(p=arguments[1],O=!0)):(a=g,u=arguments[1],d=arguments[3],arguments.length>2&&(p=arguments[2],O=!0)),a=""+a,u=""+u,e.isUndefined(d)||(d=""+d);var _=c(this._isDirected,a,u,d);if(e.has(this._edgeLabels,_))return O&&(this._edgeLabels[_]=p),this;if(!e.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(a),this.setNode(u),this._edgeLabels[_]=O?p:this._defaultEdgeLabelFn(a,u,d);var y=f(this._isDirected,a,u,d);return a=y.v,u=y.w,Object.freeze(y),this._edgeObjs[_]=y,s(this._preds[u],a),s(this._sucs[a],u),this._in[u][_]=y,this._out[a][_]=y,this._edgeCount++,this},o.prototype.edge=function(a,u,d){var p=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,a,u,d);return this._edgeLabels[p]},o.prototype.hasEdge=function(a,u,d){var p=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,a,u,d);return e.has(this._edgeLabels,p)},o.prototype.removeEdge=function(a,u,d){var p=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,a,u,d),O=this._edgeObjs[p];return O&&(a=O.v,u=O.w,delete this._edgeLabels[p],delete this._edgeObjs[p],l(this._preds[u],a),l(this._sucs[a],u),delete this._in[u][p],delete this._out[a][p],this._edgeCount--),this},o.prototype.inEdges=function(a,u){var d=this._in[a];if(d){var p=e.values(d);return u?e.filter(p,function(O){return O.v===u}):p}},o.prototype.outEdges=function(a,u){var d=this._out[a];if(d){var p=e.values(d);return u?e.filter(p,function(O){return O.w===u}):p}},o.prototype.nodeEdges=function(a,u){var d=this.inEdges(a,u);if(d)return d.concat(this.outEdges(a,u))};function s(a,u){a[u]?a[u]++:a[u]=1}function l(a,u){--a[u]||delete a[u]}function c(a,u,d,p){var O=""+u,g=""+d;if(!a&&O>g){var _=O;O=g,g=_}return O+r+g+r+(e.isUndefined(p)?t:p)}function f(a,u,d,p){var O=""+u,g=""+d;if(!a&&O>g){var _=O;O=g,g=_}var y={v:O,w:g};return p&&(y.name=p),y}function h(a,u){return c(a,u.v,u.w,u.name)}return Yc}var Xc,Rb;function mN(){return Rb||(Rb=1,Xc="2.1.8"),Xc}var Qc,Db;function bN(){return Db||(Db=1,Qc={Graph:Zc(),version:mN()}),Qc}var Jc,jb;function _N(){if(jb)return Jc;jb=1;var e=Yt(),t=Zc();Jc={write:n,read:s};function n(l){var c={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:r(l),edges:o(l)};return e.isUndefined(l.graph())||(c.value=e.clone(l.graph())),c}function r(l){return e.map(l.nodes(),function(c){var f=l.node(c),h=l.parent(c),a={v:c};return e.isUndefined(f)||(a.value=f),e.isUndefined(h)||(a.parent=h),a})}function o(l){return e.map(l.edges(),function(c){var f=l.edge(c),h={v:c.v,w:c.w};return e.isUndefined(c.name)||(h.name=c.name),e.isUndefined(f)||(h.value=f),h})}function s(l){var c=new t(l.options).setGraph(l.value);return e.each(l.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(l.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return Jc}var ef,Fb;function wN(){if(Fb)return ef;Fb=1;var e=Yt();ef=t;function t(n){var r={},o=[],s;function l(c){e.has(r,c)||(r[c]=!0,s.push(c),e.each(n.successors(c),l),e.each(n.predecessors(c),l))}return e.each(n.nodes(),function(c){s=[],l(c),s.length&&o.push(s)}),o}return ef}var tf,Bb;function zb(){if(Bb)return tf;Bb=1;var e=Yt();tf=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var s=this._arr,l=s.length;return o[n]=l,s.push({key:n,priority:r}),this._decrease(l),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)},t.prototype._heapify=function(n){var r=this._arr,o=2*n,s=o+1,l=n;o<r.length&&(l=r[o].priority<r[l].priority?o:l,s<r.length&&(l=r[s].priority<r[l].priority?s:l),l!==n&&(this._swap(n,l),this._heapify(l)))},t.prototype._decrease=function(n){for(var r=this._arr,o=r[n].priority,s;n!==0&&(s=n>>1,!(r[s].priority<o));)this._swap(n,s),n=s},t.prototype._swap=function(n,r){var o=this._arr,s=this._keyIndices,l=o[n],c=o[r];o[n]=c,o[r]=l,s[c.key]=n,s[l.key]=r},tf}var nf,$b;function Hb(){if($b)return nf;$b=1;var e=Yt(),t=zb();nf=r;var n=e.constant(1);function r(s,l,c,f){return o(s,String(l),c||n,f||function(h){return s.outEdges(h)})}function o(s,l,c,f){var h={},a=new t,u,d,p=function(O){var g=O.v!==u?O.v:O.w,_=h[g],y=c(O),w=d.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+O+" Weight: "+y);w<_.distance&&(_.distance=w,_.predecessor=u,a.decrease(g,w))};for(s.nodes().forEach(function(O){var g=O===l?0:Number.POSITIVE_INFINITY;h[O]={distance:g},a.add(O,g)});a.size()>0&&(u=a.removeMin(),d=h[u],d.distance!==Number.POSITIVE_INFINITY);)f(u).forEach(p);return h}return nf}var rf,Vb;function ON(){if(Vb)return rf;Vb=1;var e=Hb(),t=Yt();rf=n;function n(r,o,s){return t.transform(r.nodes(),function(l,c){l[c]=e(r,c,o,s)},{})}return rf}var of,Ub;function Gb(){if(Ub)return of;Ub=1;var e=Yt();of=t;function t(n){var r=0,o=[],s={},l=[];function c(f){var h=s[f]={onStack:!0,lowlink:r,index:r++};if(o.push(f),n.successors(f).forEach(function(d){e.has(s,d)?s[d].onStack&&(h.lowlink=Math.min(h.lowlink,s[d].index)):(c(d),h.lowlink=Math.min(h.lowlink,s[d].lowlink))}),h.lowlink===h.index){var a=[],u;do u=o.pop(),s[u].onStack=!1,a.push(u);while(f!==u);l.push(a)}}return n.nodes().forEach(function(f){e.has(s,f)||c(f)}),l}return of}var af,Kb;function EN(){if(Kb)return af;Kb=1;var e=Yt(),t=Gb();af=n;function n(r){return e.filter(t(r),function(o){return o.length>1||o.length===1&&r.hasEdge(o[0],o[0])})}return af}var sf,Wb;function xN(){if(Wb)return sf;Wb=1;var e=Yt();sf=n;var t=e.constant(1);function n(o,s,l){return r(o,s||t,l||function(c){return o.outEdges(c)})}function r(o,s,l){var c={},f=o.nodes();return f.forEach(function(h){c[h]={},c[h][h]={distance:0},f.forEach(function(a){h!==a&&(c[h][a]={distance:Number.POSITIVE_INFINITY})}),l(h).forEach(function(a){var u=a.v===h?a.w:a.v,d=s(a);c[h][u]={distance:d,predecessor:h}})}),f.forEach(function(h){var a=c[h];f.forEach(function(u){var d=c[u];f.forEach(function(p){var O=d[h],g=a[p],_=d[p],y=O.distance+g.distance;y<_.distance&&(_.distance=y,_.predecessor=g.predecessor)})})}),c}return sf}var lf,Yb;function Zb(){if(Yb)return lf;Yb=1;var e=Yt();lf=t,t.CycleException=n;function t(r){var o={},s={},l=[];function c(f){if(e.has(s,f))throw new n;e.has(o,f)||(s[f]=!0,o[f]=!0,e.each(r.predecessors(f),c),delete s[f],l.push(f))}if(e.each(r.sinks(),c),e.size(o)!==r.nodeCount())throw new n;return l}function n(){}return n.prototype=new Error,lf}var uf,Xb;function SN(){if(Xb)return uf;Xb=1;var e=Zb();uf=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return uf}var cf,Qb;function Jb(){if(Qb)return cf;Qb=1;var e=Yt();cf=t;function t(r,o,s){e.isArray(o)||(o=[o]);var l=(r.isDirected()?r.successors:r.neighbors).bind(r),c=[],f={};return e.each(o,function(h){if(!r.hasNode(h))throw new Error("Graph does not have node: "+h);n(r,h,s==="post",f,l,c)}),c}function n(r,o,s,l,c,f){e.has(l,o)||(l[o]=!0,s||f.push(o),e.each(c(o),function(h){n(r,h,s,l,c,f)}),s&&f.push(o))}return cf}var ff,e0;function kN(){if(e0)return ff;e0=1;var e=Jb();ff=t;function t(n,r){return e(n,r,"post")}return ff}var df,t0;function NN(){if(t0)return df;t0=1;var e=Jb();df=t;function t(n,r){return e(n,r,"pre")}return df}var hf,n0;function TN(){if(n0)return hf;n0=1;var e=Yt(),t=Zc(),n=zb();hf=r;function r(o,s){var l=new t,c={},f=new n,h;function a(d){var p=d.v===h?d.w:d.v,O=f.priority(p);if(O!==void 0){var g=s(d);g<O&&(c[p]=h,f.decrease(p,g))}}if(o.nodeCount()===0)return l;e.each(o.nodes(),function(d){f.add(d,Number.POSITIVE_INFINITY),l.setNode(d)}),f.decrease(o.nodes()[0],0);for(var u=!1;f.size()>0;){if(h=f.removeMin(),e.has(c,h))l.setEdge(h,c[h]);else{if(u)throw new Error("Input graph is not connected: "+o);u=!0}o.nodeEdges(h).forEach(a)}return l}return hf}var pf,r0;function CN(){return r0||(r0=1,pf={components:wN(),dijkstra:Hb(),dijkstraAll:ON(),findCycles:EN(),floydWarshall:xN(),isAcyclic:SN(),postorder:kN(),preorder:NN(),prim:TN(),tarjan:Gb(),topsort:Zb()}),pf}var vf,o0;function AN(){if(o0)return vf;o0=1;var e=bN();return vf={Graph:e.Graph,json:_N(),alg:CN(),version:e.version},vf}var gf,i0;function on(){if(i0)return gf;i0=1;var e;if(typeof ns=="function")try{e=AN()}catch{}return e||(e=window.graphlib),gf=e,gf}var yf,a0;function PN(){if(a0)return yf;a0=1;var e=Py(),t=1,n=4;function r(o){return e(o,t|n)}return yf=r,yf}var mf,s0;function Oi(){if(s0)return mf;s0=1;var e=vr(),t=On(),n=hi(),r=Wt();function o(s,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],s):!1}return mf=o,mf}var bf,l0;function IN(){if(l0)return bf;l0=1;var e=wi(),t=vr(),n=Oi(),r=Zn(),o=Object.prototype,s=o.hasOwnProperty,l=e(function(c,f){c=Object(c);var h=-1,a=f.length,u=a>2?f[2]:void 0;for(u&&n(f[0],f[1],u)&&(a=1);++h<a;)for(var d=f[h],p=r(d),O=-1,g=p.length;++O<g;){var _=p[O],y=c[_];(y===void 0||t(y,o[_])&&!s.call(c,_))&&(c[_]=d[_])}return c});return bf=l,bf}var _f,u0;function MN(){if(u0)return _f;u0=1;var e=En(),t=On(),n=Ln();function r(o){return function(s,l,c){var f=Object(s);if(!t(s)){var h=e(l,3);s=n(s),l=function(u){return h(f[u],u,f)}}var a=o(s,l,c);return a>-1?f[h?s[a]:a]:void 0}}return _f=r,_f}var wf,c0;function qN(){if(c0)return wf;c0=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return wf=t,wf}var Of,f0;function LN(){if(f0)return Of;f0=1;var e=qN(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Of=n,Of}var Ef,d0;function RN(){if(d0)return Ef;d0=1;var e=LN(),t=Wt(),n=br(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return r;if(t(h)){var a=typeof h.valueOf=="function"?h.valueOf():h;h=t(a)?a+"":a}if(typeof h!="string")return h===0?h:+h;h=e(h);var u=s.test(h);return u||l.test(h)?c(h.slice(2),u?2:8):o.test(h)?r:+h}return Ef=f,Ef}var xf,h0;function p0(){if(h0)return xf;h0=1;var e=RN(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var s=o<0?-1:1;return s*n}return o===o?o:0}return xf=r,xf}var Sf,v0;function DN(){if(v0)return Sf;v0=1;var e=p0();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return Sf=t,Sf}var kf,g0;function jN(){if(g0)return kf;g0=1;var e=bb(),t=En(),n=DN(),r=Math.max;function o(s,l,c){var f=s==null?0:s.length;if(!f)return-1;var h=c==null?0:n(c);return h<0&&(h=r(f+h,0)),e(s,t(l,3),h)}return kf=o,kf}var Nf,y0;function FN(){if(y0)return Nf;y0=1;var e=MN(),t=jN(),n=e(t);return Nf=n,Nf}var Tf,m0;function b0(){if(m0)return Tf;m0=1;var e=Tc();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Tf=t,Tf}var Cf,_0;function BN(){if(_0)return Cf;_0=1;var e=hu(),t=zy(),n=Zn();function r(o,s){return o==null?o:e(o,t(s),n)}return Cf=r,Cf}var Af,w0;function zN(){if(w0)return Af;w0=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Af=e,Af}var Pf,O0;function $N(){if(O0)return Pf;O0=1;var e=fi(),t=vu(),n=En();function r(o,s){var l={};return s=n(s,3),t(o,function(c,f,h){e(l,f,s(c,f,h))}),l}return Pf=r,Pf}var If,E0;function Mf(){if(E0)return If;E0=1;var e=br();function t(n,r,o){for(var s=-1,l=n.length;++s<l;){var c=n[s],f=r(c);if(f!=null&&(h===void 0?f===f&&!e(f):o(f,h)))var h=f,a=c}return a}return If=t,If}var qf,x0;function HN(){if(x0)return qf;x0=1;function e(t,n){return t>n}return qf=e,qf}var Lf,S0;function VN(){if(S0)return Lf;S0=1;var e=Mf(),t=HN(),n=Xn();function r(o){return o&&o.length?e(o,n,t):void 0}return Lf=r,Lf}var Rf,k0;function N0(){if(k0)return Rf;k0=1;var e=fi(),t=vr();function n(r,o,s){(s!==void 0&&!t(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return Rf=n,Rf}var Df,T0;function UN(){if(T0)return Df;T0=1;var e=Wn(),t=gi(),n=fn(),r="[object Object]",o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,f=l.call(Object);function h(a){if(!n(a)||e(a)!=r)return!1;var u=t(a);if(u===null)return!0;var d=c.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&l.call(d)==f}return Df=h,Df}var jf,C0;function A0(){if(C0)return jf;C0=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return jf=e,jf}var Ff,P0;function GN(){if(P0)return Ff;P0=1;var e=no(),t=Zn();function n(r){return e(r,t(r))}return Ff=n,Ff}var Bf,I0;function KN(){if(I0)return Bf;I0=1;var e=N0(),t=zg(),n=_y(),r=Hg(),o=Sy(),s=ro(),l=yt(),c=Cb(),f=yr(),h=to(),a=Wt(),u=UN(),d=ao(),p=A0(),O=GN();function g(_,y,w,E,m,S,C){var N=p(_,w),M=p(y,w),j=C.get(M);if(j){e(_,w,j);return}var I=S?S(N,M,w+"",_,y,C):void 0,A=I===void 0;if(A){var q=l(M),R=!q&&f(M),k=!q&&!R&&d(M);I=M,q||R||k?l(N)?I=N:c(N)?I=r(N):R?(A=!1,I=t(M,!0)):k?(A=!1,I=n(M,!0)):I=[]:u(M)||s(M)?(I=N,s(N)?I=O(N):(!a(N)||h(N))&&(I=o(M))):A=!1}A&&(C.set(M,I),m(I,M,E,S,C),C.delete(M)),e(_,w,I)}return Bf=g,Bf}var zf,M0;function WN(){if(M0)return zf;M0=1;var e=ci(),t=N0(),n=hu(),r=KN(),o=Wt(),s=Zn(),l=A0();function c(f,h,a,u,d){f!==h&&n(h,function(p,O){if(d||(d=new e),o(p))r(f,h,O,a,c,u,d);else{var g=u?u(l(f,O),p,O+"",f,h,d):void 0;g===void 0&&(g=p),t(f,O,g)}},s)}return zf=c,zf}var $f,q0;function YN(){if(q0)return $f;q0=1;var e=wi(),t=Oi();function n(r){return e(function(o,s){var l=-1,c=s.length,f=c>1?s[c-1]:void 0,h=c>2?s[2]:void 0;for(f=r.length>3&&typeof f=="function"?(c--,f):void 0,h&&t(s[0],s[1],h)&&(f=c<3?void 0:f,c=1),o=Object(o);++l<c;){var a=s[l];a&&r(o,a,l,f)}return o})}return $f=n,$f}var Hf,L0;function ZN(){if(L0)return Hf;L0=1;var e=WN(),t=YN(),n=t(function(r,o,s){e(r,o,s)});return Hf=n,Hf}var Vf,R0;function D0(){if(R0)return Vf;R0=1;function e(t,n){return t<n}return Vf=e,Vf}var Uf,j0;function XN(){if(j0)return Uf;j0=1;var e=Mf(),t=D0(),n=Xn();function r(o){return o&&o.length?e(o,n,t):void 0}return Uf=r,Uf}var Gf,F0;function QN(){if(F0)return Gf;F0=1;var e=Mf(),t=En(),n=D0();function r(o,s){return o&&o.length?e(o,t(s,2),n):void 0}return Gf=r,Gf}var Kf,B0;function JN(){if(B0)return Kf;B0=1;var e=rn(),t=function(){return e.Date.now()};return Kf=t,Kf}var Wf,z0;function e2(){if(z0)return Wf;z0=1;var e=di(),t=bi(),n=hi(),r=Wt(),o=lo();function s(l,c,f,h){if(!r(l))return l;c=t(c,l);for(var a=-1,u=c.length,d=u-1,p=l;p!=null&&++a<u;){var O=o(c[a]),g=f;if(O==="__proto__"||O==="constructor"||O==="prototype")return l;if(a!=d){var _=p[O];g=h?h(_,O,p):void 0,g===void 0&&(g=r(_)?_:n(c[a+1])?[]:{})}e(p,O,g),p=p[O]}return l}return Wf=s,Wf}var Yf,$0;function t2(){if($0)return Yf;$0=1;var e=_i(),t=e2(),n=bi();function r(o,s,l){for(var c=-1,f=s.length,h={};++c<f;){var a=s[c],u=e(o,a);l(u,a)&&t(h,n(a,o),u)}return h}return Yf=r,Yf}var Zf,H0;function n2(){if(H0)return Zf;H0=1;var e=t2(),t=Im();function n(r,o){return e(r,o,function(s,l){return t(r,l)})}return Zf=n,Zf}var Xf,V0;function r2(){if(V0)return Xf;V0=1;var e=b0(),t=db(),n=gb();function r(o){return n(t(o,void 0,e),o+"")}return Xf=r,Xf}var Qf,U0;function o2(){if(U0)return Qf;U0=1;var e=n2(),t=r2(),n=t(function(r,o){return r==null?{}:e(r,o)});return Qf=n,Qf}var Jf,G0;function i2(){if(G0)return Jf;G0=1;var e=Math.ceil,t=Math.max;function n(r,o,s,l){for(var c=-1,f=t(e((o-r)/(s||1)),0),h=Array(f);f--;)h[l?f:++c]=r,r+=s;return h}return Jf=n,Jf}var ed,K0;function a2(){if(K0)return ed;K0=1;var e=i2(),t=Oi(),n=p0();function r(o){return function(s,l,c){return c&&typeof c!="number"&&t(s,l,c)&&(l=c=void 0),s=n(s),l===void 0?(l=s,s=0):l=n(l),c=c===void 0?s<l?1:-1:n(c),e(s,l,c,o)}}return ed=r,ed}var td,W0;function s2(){if(W0)return td;W0=1;var e=a2(),t=e();return td=t,td}var nd,Y0;function l2(){if(Y0)return nd;Y0=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return nd=e,nd}var rd,Z0;function u2(){if(Z0)return rd;Z0=1;var e=br();function t(n,r){if(n!==r){var o=n!==void 0,s=n===null,l=n===n,c=e(n),f=r!==void 0,h=r===null,a=r===r,u=e(r);if(!h&&!u&&!c&&n>r||c&&f&&a&&!h&&!u||s&&f&&a||!o&&a||!l)return 1;if(!s&&!c&&!u&&n<r||u&&o&&l&&!s&&!c||h&&o&&l||!f&&l||!a)return-1}return 0}return rd=t,rd}var od,X0;function c2(){if(X0)return od;X0=1;var e=u2();function t(n,r,o){for(var s=-1,l=n.criteria,c=r.criteria,f=l.length,h=o.length;++s<f;){var a=e(l[s],c[s]);if(a){if(s>=h)return a;var u=o[s];return a*(u=="desc"?-1:1)}}return n.index-r.index}return od=t,od}var id,Q0;function f2(){if(Q0)return id;Q0=1;var e=mi(),t=_i(),n=En(),r=Wm(),o=l2(),s=pi(),l=c2(),c=Xn(),f=yt();function h(a,u,d){u.length?u=e(u,function(g){return f(g)?function(_){return t(_,g.length===1?g[0]:g)}:g}):u=[c];var p=-1;u=e(u,s(n));var O=r(a,function(g,_,y){var w=e(u,function(E){return E(g)});return{criteria:w,index:++p,value:g}});return o(O,function(g,_){return l(g,_,d)})}return id=h,id}var ad,J0;function d2(){if(J0)return ad;J0=1;var e=Tc(),t=f2(),n=wi(),r=Oi(),o=n(function(s,l){if(s==null)return[];var c=l.length;return c>1&&r(s,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return ad=o,ad}var sd,e1;function h2(){if(e1)return sd;e1=1;var e=Em(),t=0;function n(r){var o=++t;return e(r)+o}return sd=n,sd}var ld,t1;function p2(){if(t1)return ld;t1=1;function e(t,n,r){for(var o=-1,s=t.length,l=n.length,c={};++o<s;){var f=o<l?n[o]:void 0;r(c,t[o],f)}return c}return ld=e,ld}var ud,n1;function v2(){if(n1)return ud;n1=1;var e=di(),t=p2();function n(r,o){return t(r||[],o||[],e)}return ud=n,ud}var cd,r1;function ft(){if(r1)return cd;r1=1;var e;if(typeof ns=="function")try{e={cloneDeep:PN(),constant:cu(),defaults:IN(),each:Uy(),filter:Bm(),find:FN(),flatten:b0(),forEach:Hy(),forIn:BN(),has:Hm(),isUndefined:Gm(),last:zN(),map:Zm(),mapValues:$N(),max:VN(),merge:ZN(),min:XN(),minBy:QN(),now:JN(),pick:o2(),range:s2(),reduce:eb(),sortBy:d2(),uniqueId:h2(),values:Mb(),zipObject:v2()}}catch{}return e||(e=window._),cd=e,cd}var fd,o1;function g2(){if(o1)return fd;o1=1,fd=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,o=r._prev;if(o!==r)return t(o),o},e.prototype.enqueue=function(r){var o=this._sentinel;r._prev&&r._next&&t(r),r._next=o._next,o._next._prev=r,o._next=r,r._prev=o},e.prototype.toString=function(){for(var r=[],o=this._sentinel,s=o._prev;s!==o;)r.push(JSON.stringify(s,n)),s=s._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,o){if(r!=="_next"&&r!=="_prev")return o}return fd}var dd,i1;function y2(){if(i1)return dd;i1=1;var e=ft(),t=on().Graph,n=g2();dd=o;var r=e.constant(1);function o(h,a){if(h.nodeCount()<=1)return[];var u=c(h,a||r),d=s(u.graph,u.buckets,u.zeroIdx);return e.flatten(e.map(d,function(p){return h.outEdges(p.v,p.w)}),!0)}function s(h,a,u){for(var d=[],p=a[a.length-1],O=a[0],g;h.nodeCount();){for(;g=O.dequeue();)l(h,a,u,g);for(;g=p.dequeue();)l(h,a,u,g);if(h.nodeCount()){for(var _=a.length-2;_>0;--_)if(g=a[_].dequeue(),g){d=d.concat(l(h,a,u,g,!0));break}}}return d}function l(h,a,u,d,p){var O=p?[]:void 0;return e.forEach(h.inEdges(d.v),function(g){var _=h.edge(g),y=h.node(g.v);p&&O.push({v:g.v,w:g.w}),y.out-=_,f(a,u,y)}),e.forEach(h.outEdges(d.v),function(g){var _=h.edge(g),y=g.w,w=h.node(y);w.in-=_,f(a,u,w)}),h.removeNode(d.v),O}function c(h,a){var u=new t,d=0,p=0;e.forEach(h.nodes(),function(_){u.setNode(_,{v:_,in:0,out:0})}),e.forEach(h.edges(),function(_){var y=u.edge(_.v,_.w)||0,w=a(_),E=y+w;u.setEdge(_.v,_.w,E),p=Math.max(p,u.node(_.v).out+=w),d=Math.max(d,u.node(_.w).in+=w)});var O=e.range(p+d+3).map(function(){return new n}),g=d+1;return e.forEach(u.nodes(),function(_){f(O,g,u.node(_))}),{graph:u,buckets:O,zeroIdx:g}}function f(h,a,u){u.out?u.in?h[u.out-u.in+a].enqueue(u):h[h.length-1].enqueue(u):h[0].enqueue(u)}return dd}var hd,a1;function m2(){if(a1)return hd;a1=1;var e=ft(),t=y2();hd={run:n,undo:o};function n(s){var l=s.graph().acyclicer==="greedy"?t(s,c(s)):r(s);e.forEach(l,function(f){var h=s.edge(f);s.removeEdge(f),h.forwardName=f.name,h.reversed=!0,s.setEdge(f.w,f.v,h,e.uniqueId("rev"))});function c(f){return function(h){return f.edge(h).weight}}}function r(s){var l=[],c={},f={};function h(a){e.has(f,a)||(f[a]=!0,c[a]=!0,e.forEach(s.outEdges(a),function(u){e.has(c,u.w)?l.push(u):h(u.w)}),delete c[a])}return e.forEach(s.nodes(),h),l}function o(s){e.forEach(s.edges(),function(l){var c=s.edge(l);if(c.reversed){s.removeEdge(l);var f=c.forwardName;delete c.reversed,delete c.forwardName,s.setEdge(l.w,l.v,c,f)}})}return hd}var pd,s1;function Rt(){if(s1)return pd;s1=1;var e=ft(),t=on().Graph;pd={addDummyNode:n,simplify:r,asNonCompoundGraph:o,successorWeights:s,predecessorWeights:l,intersectRect:c,buildLayerMatrix:f,normalizeRanks:h,removeEmptyRanks:a,addBorderNode:u,maxRank:d,partition:p,time:O,notime:g};function n(_,y,w,E){var m;do m=e.uniqueId(E);while(_.hasNode(m));return w.dummy=y,_.setNode(m,w),m}function r(_){var y=new t().setGraph(_.graph());return e.forEach(_.nodes(),function(w){y.setNode(w,_.node(w))}),e.forEach(_.edges(),function(w){var E=y.edge(w.v,w.w)||{weight:0,minlen:1},m=_.edge(w);y.setEdge(w.v,w.w,{weight:E.weight+m.weight,minlen:Math.max(E.minlen,m.minlen)})}),y}function o(_){var y=new t({multigraph:_.isMultigraph()}).setGraph(_.graph());return e.forEach(_.nodes(),function(w){_.children(w).length||y.setNode(w,_.node(w))}),e.forEach(_.edges(),function(w){y.setEdge(w,_.edge(w))}),y}function s(_){var y=e.map(_.nodes(),function(w){var E={};return e.forEach(_.outEdges(w),function(m){E[m.w]=(E[m.w]||0)+_.edge(m).weight}),E});return e.zipObject(_.nodes(),y)}function l(_){var y=e.map(_.nodes(),function(w){var E={};return e.forEach(_.inEdges(w),function(m){E[m.v]=(E[m.v]||0)+_.edge(m).weight}),E});return e.zipObject(_.nodes(),y)}function c(_,y){var w=_.x,E=_.y,m=y.x-w,S=y.y-E,C=_.width/2,N=_.height/2;if(!m&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var M,j;return Math.abs(S)*C>Math.abs(m)*N?(S<0&&(N=-N),M=N*m/S,j=N):(m<0&&(C=-C),M=C,j=C*S/m),{x:w+M,y:E+j}}function f(_){var y=e.map(e.range(d(_)+1),function(){return[]});return e.forEach(_.nodes(),function(w){var E=_.node(w),m=E.rank;e.isUndefined(m)||(y[m][E.order]=w)}),y}function h(_){var y=e.min(e.map(_.nodes(),function(w){return _.node(w).rank}));e.forEach(_.nodes(),function(w){var E=_.node(w);e.has(E,"rank")&&(E.rank-=y)})}function a(_){var y=e.min(e.map(_.nodes(),function(S){return _.node(S).rank})),w=[];e.forEach(_.nodes(),function(S){var C=_.node(S).rank-y;w[C]||(w[C]=[]),w[C].push(S)});var E=0,m=_.graph().nodeRankFactor;e.forEach(w,function(S,C){e.isUndefined(S)&&C%m!==0?--E:E&&e.forEach(S,function(N){_.node(N).rank+=E})})}function u(_,y,w,E){var m={width:0,height:0};return arguments.length>=4&&(m.rank=w,m.order=E),n(_,"border",m,y)}function d(_){return e.max(e.map(_.nodes(),function(y){var w=_.node(y).rank;if(!e.isUndefined(w))return w}))}function p(_,y){var w={lhs:[],rhs:[]};return e.forEach(_,function(E){y(E)?w.lhs.push(E):w.rhs.push(E)}),w}function O(_,y){var w=e.now();try{return y()}finally{console.log(_+" time: "+(e.now()-w)+"ms")}}function g(_,y){return y()}return pd}var vd,l1;function b2(){if(l1)return vd;l1=1;var e=ft(),t=Rt();vd={run:n,undo:o};function n(s){s.graph().dummyChains=[],e.forEach(s.edges(),function(l){r(s,l)})}function r(s,l){var c=l.v,f=s.node(c).rank,h=l.w,a=s.node(h).rank,u=l.name,d=s.edge(l),p=d.labelRank;if(a!==f+1){s.removeEdge(l);var O,g,_;for(_=0,++f;f<a;++_,++f)d.points=[],g={width:0,height:0,edgeLabel:d,edgeObj:l,rank:f},O=t.addDummyNode(s,"edge",g,"_d"),f===p&&(g.width=d.width,g.height=d.height,g.dummy="edge-label",g.labelpos=d.labelpos),s.setEdge(c,O,{weight:d.weight},u),_===0&&s.graph().dummyChains.push(O),c=O;s.setEdge(c,h,{weight:d.weight},u)}}function o(s){e.forEach(s.graph().dummyChains,function(l){var c=s.node(l),f=c.edgeLabel,h;for(s.setEdge(c.edgeObj,f);c.dummy;)h=s.successors(l)[0],s.removeNode(l),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),l=h,c=s.node(l)})}return vd}var gd,u1;function Ei(){if(u1)return gd;u1=1;var e=ft();gd={longestPath:t,slack:n};function t(r){var o={};function s(l){var c=r.node(l);if(e.has(o,l))return c.rank;o[l]=!0;var f=e.min(e.map(r.outEdges(l),function(h){return s(h.w)-r.edge(h).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(r.sources(),s)}function n(r,o){return r.node(o.w).rank-r.node(o.v).rank-r.edge(o).minlen}return gd}var yd,c1;function f1(){if(c1)return yd;c1=1;var e=ft(),t=on().Graph,n=Ei().slack;yd=r;function r(c){var f=new t({directed:!1}),h=c.nodes()[0],a=c.nodeCount();f.setNode(h,{});for(var u,d;o(f,c)<a;)u=s(f,c),d=f.hasNode(u.v)?n(c,u):-n(c,u),l(f,c,d);return f}function o(c,f){function h(a){e.forEach(f.nodeEdges(a),function(u){var d=u.v,p=a===d?u.w:d;!c.hasNode(p)&&!n(f,u)&&(c.setNode(p,{}),c.setEdge(a,p,{}),h(p))})}return e.forEach(c.nodes(),h),c.nodeCount()}function s(c,f){return e.minBy(f.edges(),function(h){if(c.hasNode(h.v)!==c.hasNode(h.w))return n(f,h)})}function l(c,f,h){e.forEach(c.nodes(),function(a){f.node(a).rank+=h})}return yd}var md,d1;function _2(){if(d1)return md;d1=1;var e=ft(),t=f1(),n=Ei().slack,r=Ei().longestPath,o=on().alg.preorder,s=on().alg.postorder,l=Rt().simplify;md=c,c.initLowLimValues=u,c.initCutValues=f,c.calcCutValue=a,c.leaveEdge=p,c.enterEdge=O,c.exchangeEdges=g;function c(E){E=l(E),r(E);var m=t(E);u(m),f(m,E);for(var S,C;S=p(m);)C=O(m,E,S),g(m,E,S,C)}function f(E,m){var S=s(E,E.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(C){h(E,m,C)})}function h(E,m,S){var C=E.node(S),N=C.parent;E.edge(S,N).cutvalue=a(E,m,S)}function a(E,m,S){var C=E.node(S),N=C.parent,M=!0,j=m.edge(S,N),I=0;return j||(M=!1,j=m.edge(N,S)),I=j.weight,e.forEach(m.nodeEdges(S),function(A){var q=A.v===S,R=q?A.w:A.v;if(R!==N){var k=q===M,F=m.edge(A).weight;if(I+=k?F:-F,y(E,S,R)){var U=E.edge(S,R).cutvalue;I+=k?-U:U}}}),I}function u(E,m){arguments.length<2&&(m=E.nodes()[0]),d(E,{},1,m)}function d(E,m,S,C,N){var M=S,j=E.node(C);return m[C]=!0,e.forEach(E.neighbors(C),function(I){e.has(m,I)||(S=d(E,m,S,I,C))}),j.low=M,j.lim=S++,N?j.parent=N:delete j.parent,S}function p(E){return e.find(E.edges(),function(m){return E.edge(m).cutvalue<0})}function O(E,m,S){var C=S.v,N=S.w;m.hasEdge(C,N)||(C=S.w,N=S.v);var M=E.node(C),j=E.node(N),I=M,A=!1;M.lim>j.lim&&(I=j,A=!0);var q=e.filter(m.edges(),function(R){return A===w(E,E.node(R.v),I)&&A!==w(E,E.node(R.w),I)});return e.minBy(q,function(R){return n(m,R)})}function g(E,m,S,C){var N=S.v,M=S.w;E.removeEdge(N,M),E.setEdge(C.v,C.w,{}),u(E),f(E,m),_(E,m)}function _(E,m){var S=e.find(E.nodes(),function(N){return!m.node(N).parent}),C=o(E,S);C=C.slice(1),e.forEach(C,function(N){var M=E.node(N).parent,j=m.edge(N,M),I=!1;j||(j=m.edge(M,N),I=!0),m.node(N).rank=m.node(M).rank+(I?j.minlen:-j.minlen)})}function y(E,m,S){return E.hasEdge(m,S)}function w(E,m,S){return S.low<=m.lim&&m.lim<=S.lim}return md}var bd,h1;function w2(){if(h1)return bd;h1=1;var e=Ei(),t=e.longestPath,n=f1(),r=_2();bd=o;function o(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":l(f);break;case"longest-path":s(f);break;default:c(f)}}var s=t;function l(f){t(f),n(f)}function c(f){r(f)}return bd}var _d,p1;function O2(){if(p1)return _d;p1=1;var e=ft();_d=t;function t(o){var s=r(o);e.forEach(o.graph().dummyChains,function(l){for(var c=o.node(l),f=c.edgeObj,h=n(o,s,f.v,f.w),a=h.path,u=h.lca,d=0,p=a[d],O=!0;l!==f.w;){if(c=o.node(l),O){for(;(p=a[d])!==u&&o.node(p).maxRank<c.rank;)d++;p===u&&(O=!1)}if(!O){for(;d<a.length-1&&o.node(p=a[d+1]).minRank<=c.rank;)d++;p=a[d]}o.setParent(l,p),l=o.successors(l)[0]}})}function n(o,s,l,c){var f=[],h=[],a=Math.min(s[l].low,s[c].low),u=Math.max(s[l].lim,s[c].lim),d,p;d=l;do d=o.parent(d),f.push(d);while(d&&(s[d].low>a||u>s[d].lim));for(p=d,d=c;(d=o.parent(d))!==p;)h.push(d);return{path:f.concat(h.reverse()),lca:p}}function r(o){var s={},l=0;function c(f){var h=l;e.forEach(o.children(f),c),s[f]={low:h,lim:l++}}return e.forEach(o.children(),c),s}return _d}var wd,v1;function E2(){if(v1)return wd;v1=1;var e=ft(),t=Rt();wd={run:n,cleanup:l};function n(c){var f=t.addDummyNode(c,"root",{},"_root"),h=o(c),a=e.max(e.values(h))-1,u=2*a+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(p){c.edge(p).minlen*=u});var d=s(c)+1;e.forEach(c.children(),function(p){r(c,f,u,d,a,h,p)}),c.graph().nodeRankFactor=u}function r(c,f,h,a,u,d,p){var O=c.children(p);if(!O.length){p!==f&&c.setEdge(f,p,{weight:0,minlen:h});return}var g=t.addBorderNode(c,"_bt"),_=t.addBorderNode(c,"_bb"),y=c.node(p);c.setParent(g,p),y.borderTop=g,c.setParent(_,p),y.borderBottom=_,e.forEach(O,function(w){r(c,f,h,a,u,d,w);var E=c.node(w),m=E.borderTop?E.borderTop:w,S=E.borderBottom?E.borderBottom:w,C=E.borderTop?a:2*a,N=m!==S?1:u-d[p]+1;c.setEdge(g,m,{weight:C,minlen:N,nestingEdge:!0}),c.setEdge(S,_,{weight:C,minlen:N,nestingEdge:!0})}),c.parent(p)||c.setEdge(f,g,{weight:0,minlen:u+d[p]})}function o(c){var f={};function h(a,u){var d=c.children(a);d&&d.length&&e.forEach(d,function(p){h(p,u+1)}),f[a]=u}return e.forEach(c.children(),function(a){h(a,1)}),f}function s(c){return e.reduce(c.edges(),function(f,h){return f+c.edge(h).weight},0)}function l(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(h){var a=c.edge(h);a.nestingEdge&&c.removeEdge(h)})}return wd}var Od,g1;function x2(){if(g1)return Od;g1=1;var e=ft(),t=Rt();Od=n;function n(o){function s(l){var c=o.children(l),f=o.node(l);if(c.length&&e.forEach(c,s),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var h=f.minRank,a=f.maxRank+1;h<a;++h)r(o,"borderLeft","_bl",l,f,h),r(o,"borderRight","_br",l,f,h)}}e.forEach(o.children(),s)}function r(o,s,l,c,f,h){var a={width:0,height:0,rank:h,borderType:s},u=f[s][h-1],d=t.addDummyNode(o,"border",a,l);f[s][h]=d,o.setParent(d,c),u&&o.setEdge(u,d,{weight:1})}return Od}var Ed,y1;function S2(){if(y1)return Ed;y1=1;var e=ft();Ed={adjust:t,undo:n};function t(h){var a=h.graph().rankdir.toLowerCase();(a==="lr"||a==="rl")&&r(h)}function n(h){var a=h.graph().rankdir.toLowerCase();(a==="bt"||a==="rl")&&s(h),(a==="lr"||a==="rl")&&(c(h),r(h))}function r(h){e.forEach(h.nodes(),function(a){o(h.node(a))}),e.forEach(h.edges(),function(a){o(h.edge(a))})}function o(h){var a=h.width;h.width=h.height,h.height=a}function s(h){e.forEach(h.nodes(),function(a){l(h.node(a))}),e.forEach(h.edges(),function(a){var u=h.edge(a);e.forEach(u.points,l),e.has(u,"y")&&l(u)})}function l(h){h.y=-h.y}function c(h){e.forEach(h.nodes(),function(a){f(h.node(a))}),e.forEach(h.edges(),function(a){var u=h.edge(a);e.forEach(u.points,f),e.has(u,"x")&&f(u)})}function f(h){var a=h.x;h.x=h.y,h.y=a}return Ed}var xd,m1;function k2(){if(m1)return xd;m1=1;var e=ft();xd=t;function t(n){var r={},o=e.filter(n.nodes(),function(h){return!n.children(h).length}),s=e.max(e.map(o,function(h){return n.node(h).rank})),l=e.map(e.range(s+1),function(){return[]});function c(h){if(!e.has(r,h)){r[h]=!0;var a=n.node(h);l[a.rank].push(h),e.forEach(n.successors(h),c)}}var f=e.sortBy(o,function(h){return n.node(h).rank});return e.forEach(f,c),l}return xd}var Sd,b1;function N2(){if(b1)return Sd;b1=1;var e=ft();Sd=t;function t(r,o){for(var s=0,l=1;l<o.length;++l)s+=n(r,o[l-1],o[l]);return s}function n(r,o,s){for(var l=e.zipObject(s,e.map(s,function(d,p){return p})),c=e.flatten(e.map(o,function(d){return e.sortBy(e.map(r.outEdges(d),function(p){return{pos:l[p.w],weight:r.edge(p).weight}}),"pos")}),!0),f=1;f<s.length;)f<<=1;var h=2*f-1;f-=1;var a=e.map(new Array(h),function(){return 0}),u=0;return e.forEach(c.forEach(function(d){var p=d.pos+f;a[p]+=d.weight;for(var O=0;p>0;)p%2&&(O+=a[p+1]),p=p-1>>1,a[p]+=d.weight;u+=d.weight*O})),u}return Sd}var kd,_1;function T2(){if(_1)return kd;_1=1;var e=ft();kd=t;function t(n,r){return e.map(r,function(o){var s=n.inEdges(o);if(s.length){var l=e.reduce(s,function(c,f){var h=n.edge(f),a=n.node(f.v);return{sum:c.sum+h.weight*a.order,weight:c.weight+h.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}return kd}var Nd,w1;function C2(){if(w1)return Nd;w1=1;var e=ft();Nd=t;function t(o,s){var l={};e.forEach(o,function(f,h){var a=l[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:h};e.isUndefined(f.barycenter)||(a.barycenter=f.barycenter,a.weight=f.weight)}),e.forEach(s.edges(),function(f){var h=l[f.v],a=l[f.w];!e.isUndefined(h)&&!e.isUndefined(a)&&(a.indegree++,h.out.push(l[f.w]))});var c=e.filter(l,function(f){return!f.indegree});return n(c)}function n(o){var s=[];function l(h){return function(a){a.merged||(e.isUndefined(a.barycenter)||e.isUndefined(h.barycenter)||a.barycenter>=h.barycenter)&&r(h,a)}}function c(h){return function(a){a.in.push(h),--a.indegree===0&&o.push(a)}}for(;o.length;){var f=o.pop();s.push(f),e.forEach(f.in.reverse(),l(f)),e.forEach(f.out,c(f))}return e.map(e.filter(s,function(h){return!h.merged}),function(h){return e.pick(h,["vs","i","barycenter","weight"])})}function r(o,s){var l=0,c=0;o.weight&&(l+=o.barycenter*o.weight,c+=o.weight),s.weight&&(l+=s.barycenter*s.weight,c+=s.weight),o.vs=s.vs.concat(o.vs),o.barycenter=l/c,o.weight=c,o.i=Math.min(s.i,o.i),s.merged=!0}return Nd}var Td,O1;function A2(){if(O1)return Td;O1=1;var e=ft(),t=Rt();Td=n;function n(s,l){var c=t.partition(s,function(g){return e.has(g,"barycenter")}),f=c.lhs,h=e.sortBy(c.rhs,function(g){return-g.i}),a=[],u=0,d=0,p=0;f.sort(o(!!l)),p=r(a,h,p),e.forEach(f,function(g){p+=g.vs.length,a.push(g.vs),u+=g.barycenter*g.weight,d+=g.weight,p=r(a,h,p)});var O={vs:e.flatten(a,!0)};return d&&(O.barycenter=u/d,O.weight=d),O}function r(s,l,c){for(var f;l.length&&(f=e.last(l)).i<=c;)l.pop(),s.push(f.vs),c++;return c}function o(s){return function(l,c){return l.barycenter<c.barycenter?-1:l.barycenter>c.barycenter?1:s?c.i-l.i:l.i-c.i}}return Td}var Cd,E1;function P2(){if(E1)return Cd;E1=1;var e=ft(),t=T2(),n=C2(),r=A2();Cd=o;function o(c,f,h,a){var u=c.children(f),d=c.node(f),p=d?d.borderLeft:void 0,O=d?d.borderRight:void 0,g={};p&&(u=e.filter(u,function(S){return S!==p&&S!==O}));var _=t(c,u);e.forEach(_,function(S){if(c.children(S.v).length){var C=o(c,S.v,h,a);g[S.v]=C,e.has(C,"barycenter")&&l(S,C)}});var y=n(_,h);s(y,g);var w=r(y,a);if(p&&(w.vs=e.flatten([p,w.vs,O],!0),c.predecessors(p).length)){var E=c.node(c.predecessors(p)[0]),m=c.node(c.predecessors(O)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+m.order)/(w.weight+2),w.weight+=2}return w}function s(c,f){e.forEach(c,function(h){h.vs=e.flatten(h.vs.map(function(a){return f[a]?f[a].vs:a}),!0)})}function l(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return Cd}var Ad,x1;function I2(){if(x1)return Ad;x1=1;var e=ft(),t=on().Graph;Ad=n;function n(o,s,l){var c=r(o),f=new t({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(h){return o.node(h)});return e.forEach(o.nodes(),function(h){var a=o.node(h),u=o.parent(h);(a.rank===s||a.minRank<=s&&s<=a.maxRank)&&(f.setNode(h),f.setParent(h,u||c),e.forEach(o[l](h),function(d){var p=d.v===h?d.w:d.v,O=f.edge(p,h),g=e.isUndefined(O)?0:O.weight;f.setEdge(p,h,{weight:o.edge(d).weight+g})}),e.has(a,"minRank")&&f.setNode(h,{borderLeft:a.borderLeft[s],borderRight:a.borderRight[s]}))}),f}function r(o){for(var s;o.hasNode(s=e.uniqueId("_root")););return s}return Ad}var Pd,S1;function M2(){if(S1)return Pd;S1=1;var e=ft();Pd=t;function t(n,r,o){var s={},l;e.forEach(o,function(c){for(var f=n.parent(c),h,a;f;){if(h=n.parent(f),h?(a=s[h],s[h]=f):(a=l,l=f),a&&a!==f){r.setEdge(a,f);return}f=h}})}return Pd}var Id,k1;function q2(){if(k1)return Id;k1=1;var e=ft(),t=k2(),n=N2(),r=P2(),o=I2(),s=M2(),l=on().Graph,c=Rt();Id=f;function f(d){var p=c.maxRank(d),O=h(d,e.range(1,p+1),"inEdges"),g=h(d,e.range(p-1,-1,-1),"outEdges"),_=t(d);u(d,_);for(var y=Number.POSITIVE_INFINITY,w,E=0,m=0;m<4;++E,++m){a(E%2?O:g,E%4>=2),_=c.buildLayerMatrix(d);var S=n(d,_);S<y&&(m=0,w=e.cloneDeep(_),y=S)}u(d,w)}function h(d,p,O){return e.map(p,function(g){return o(d,g,O)})}function a(d,p){var O=new l;e.forEach(d,function(g){var _=g.graph().root,y=r(g,_,O,p);e.forEach(y.vs,function(w,E){g.node(w).order=E}),s(g,O,y.vs)})}function u(d,p){e.forEach(p,function(O){e.forEach(O,function(g,_){d.node(g).order=_})})}return Id}var Md,N1;function L2(){if(N1)return Md;N1=1;var e=ft(),t=on().Graph,n=Rt();Md={positionX:O,findType1Conflicts:r,findType2Conflicts:o,addConflict:l,hasConflict:c,verticalAlignment:f,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:u,balance:p};function r(y,w){var E={};function m(S,C){var N=0,M=0,j=S.length,I=e.last(C);return e.forEach(C,function(A,q){var R=s(y,A),k=R?y.node(R).order:j;(R||A===I)&&(e.forEach(C.slice(M,q+1),function(F){e.forEach(y.predecessors(F),function(U){var ne=y.node(U),ue=ne.order;(ue<N||k<ue)&&!(ne.dummy&&y.node(F).dummy)&&l(E,U,F)})}),M=q+1,N=k)}),C}return e.reduce(w,m),E}function o(y,w){var E={};function m(C,N,M,j,I){var A;e.forEach(e.range(N,M),function(q){A=C[q],y.node(A).dummy&&e.forEach(y.predecessors(A),function(R){var k=y.node(R);k.dummy&&(k.order<j||k.order>I)&&l(E,R,A)})})}function S(C,N){var M=-1,j,I=0;return e.forEach(N,function(A,q){if(y.node(A).dummy==="border"){var R=y.predecessors(A);R.length&&(j=y.node(R[0]).order,m(N,I,q,M,j),I=q,M=j)}m(N,I,N.length,j,C.length)}),N}return e.reduce(w,S),E}function s(y,w){if(y.node(w).dummy)return e.find(y.predecessors(w),function(E){return y.node(E).dummy})}function l(y,w,E){if(w>E){var m=w;w=E,E=m}var S=y[w];S||(y[w]=S={}),S[E]=!0}function c(y,w,E){if(w>E){var m=w;w=E,E=m}return e.has(y[w],E)}function f(y,w,E,m){var S={},C={},N={};return e.forEach(w,function(M){e.forEach(M,function(j,I){S[j]=j,C[j]=j,N[j]=I})}),e.forEach(w,function(M){var j=-1;e.forEach(M,function(I){var A=m(I);if(A.length){A=e.sortBy(A,function(U){return N[U]});for(var q=(A.length-1)/2,R=Math.floor(q),k=Math.ceil(q);R<=k;++R){var F=A[R];C[I]===I&&j<N[F]&&!c(E,I,F)&&(C[F]=I,C[I]=S[I]=S[F],j=N[F])}}})}),{root:S,align:C}}function h(y,w,E,m,S){var C={},N=a(y,w,E,S),M=S?"borderLeft":"borderRight";function j(q,R){for(var k=N.nodes(),F=k.pop(),U={};F;)U[F]?q(F):(U[F]=!0,k.push(F),k=k.concat(R(F))),F=k.pop()}function I(q){C[q]=N.inEdges(q).reduce(function(R,k){return Math.max(R,C[k.v]+N.edge(k))},0)}function A(q){var R=N.outEdges(q).reduce(function(F,U){return Math.min(F,C[U.w]-N.edge(U))},Number.POSITIVE_INFINITY),k=y.node(q);R!==Number.POSITIVE_INFINITY&&k.borderType!==M&&(C[q]=Math.max(C[q],R))}return j(I,N.predecessors.bind(N)),j(A,N.successors.bind(N)),e.forEach(m,function(q){C[q]=C[E[q]]}),C}function a(y,w,E,m){var S=new t,C=y.graph(),N=g(C.nodesep,C.edgesep,m);return e.forEach(w,function(M){var j;e.forEach(M,function(I){var A=E[I];if(S.setNode(A),j){var q=E[j],R=S.edge(q,A);S.setEdge(q,A,Math.max(N(y,I,j),R||0))}j=I})}),S}function u(y,w){return e.minBy(e.values(w),function(E){var m=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY;return e.forIn(E,function(C,N){var M=_(y,N)/2;m=Math.max(C+M,m),S=Math.min(C-M,S)}),m-S})}function d(y,w){var E=e.values(w),m=e.min(E),S=e.max(E);e.forEach(["u","d"],function(C){e.forEach(["l","r"],function(N){var M=C+N,j=y[M],I;if(j!==w){var A=e.values(j);I=N==="l"?m-e.min(A):S-e.max(A),I&&(y[M]=e.mapValues(j,function(q){return q+I}))}})})}function p(y,w){return e.mapValues(y.ul,function(E,m){if(w)return y[w.toLowerCase()][m];var S=e.sortBy(e.map(y,m));return(S[1]+S[2])/2})}function O(y){var w=n.buildLayerMatrix(y),E=e.merge(r(y,w),o(y,w)),m={},S;e.forEach(["u","d"],function(N){S=N==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(M){M==="r"&&(S=e.map(S,function(q){return e.values(q).reverse()}));var j=(N==="u"?y.predecessors:y.successors).bind(y),I=f(y,S,E,j),A=h(y,S,I.root,I.align,M==="r");M==="r"&&(A=e.mapValues(A,function(q){return-q})),m[N+M]=A})});var C=u(y,m);return d(m,C),p(m,y.graph().align)}function g(y,w,E){return function(m,S,C){var N=m.node(S),M=m.node(C),j=0,I;if(j+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":I=-N.width/2;break;case"r":I=N.width/2;break}if(I&&(j+=E?I:-I),I=0,j+=(N.dummy?w:y)/2,j+=(M.dummy?w:y)/2,j+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":I=M.width/2;break;case"r":I=-M.width/2;break}return I&&(j+=E?I:-I),I=0,j}}function _(y,w){return y.node(w).width}return Md}var qd,T1;function R2(){if(T1)return qd;T1=1;var e=ft(),t=Rt(),n=L2().positionX;qd=r;function r(s){s=t.asNonCompoundGraph(s),o(s),e.forEach(n(s),function(l,c){s.node(c).x=l})}function o(s){var l=t.buildLayerMatrix(s),c=s.graph().ranksep,f=0;e.forEach(l,function(h){var a=e.max(e.map(h,function(u){return s.node(u).height}));e.forEach(h,function(u){s.node(u).y=f+a/2}),f+=a+c})}return qd}var Ld,C1;function D2(){if(C1)return Ld;C1=1;var e=ft(),t=m2(),n=b2(),r=w2(),o=Rt().normalizeRanks,s=O2(),l=Rt().removeEmptyRanks,c=E2(),f=x2(),h=S2(),a=q2(),u=R2(),d=Rt(),p=on().Graph;Ld=O;function O(Z,X){var H=X&&X.debugTiming?d.time:d.notime;H("layout",function(){var ee=H(" buildLayoutGraph",function(){return j(Z)});H(" runLayout",function(){g(ee,H)}),H(" updateInputGraph",function(){_(Z,ee)})})}function g(Z,X){X(" makeSpaceForEdgeLabels",function(){I(Z)}),X(" removeSelfEdges",function(){K(Z)}),X(" acyclic",function(){t.run(Z)}),X(" nestingGraph.run",function(){c.run(Z)}),X(" rank",function(){r(d.asNonCompoundGraph(Z))}),X(" injectEdgeLabelProxies",function(){A(Z)}),X(" removeEmptyRanks",function(){l(Z)}),X(" nestingGraph.cleanup",function(){c.cleanup(Z)}),X(" normalizeRanks",function(){o(Z)}),X(" assignRankMinMax",function(){q(Z)}),X(" removeEdgeLabelProxies",function(){R(Z)}),X(" normalize.run",function(){n.run(Z)}),X(" parentDummyChains",function(){s(Z)}),X(" addBorderSegments",function(){f(Z)}),X(" order",function(){a(Z)}),X(" insertSelfEdges",function(){W(Z)}),X(" adjustCoordinateSystem",function(){h.adjust(Z)}),X(" position",function(){u(Z)}),X(" positionSelfEdges",function(){z(Z)}),X(" removeBorderNodes",function(){ue(Z)}),X(" normalize.undo",function(){n.undo(Z)}),X(" fixupEdgeLabelCoords",function(){U(Z)}),X(" undoCoordinateSystem",function(){h.undo(Z)}),X(" translateGraph",function(){k(Z)}),X(" assignNodeIntersects",function(){F(Z)}),X(" reversePoints",function(){ne(Z)}),X(" acyclic.undo",function(){t.undo(Z)})}function _(Z,X){e.forEach(Z.nodes(),function(H){var ee=Z.node(H),le=X.node(H);ee&&(ee.x=le.x,ee.y=le.y,X.children(H).length&&(ee.width=le.width,ee.height=le.height))}),e.forEach(Z.edges(),function(H){var ee=Z.edge(H),le=X.edge(H);ee.points=le.points,e.has(le,"x")&&(ee.x=le.x,ee.y=le.y)}),Z.graph().width=X.graph().width,Z.graph().height=X.graph().height}var y=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],m=["width","height"],S={width:0,height:0},C=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function j(Z){var X=new p({multigraph:!0,compound:!0}),H=re(Z.graph());return X.setGraph(e.merge({},w,Q(H,y),e.pick(H,E))),e.forEach(Z.nodes(),function(ee){var le=re(Z.node(ee));X.setNode(ee,e.defaults(Q(le,m),S)),X.setParent(ee,Z.parent(ee))}),e.forEach(Z.edges(),function(ee){var le=re(Z.edge(ee));X.setEdge(ee,e.merge({},N,Q(le,C),e.pick(le,M)))}),X}function I(Z){var X=Z.graph();X.ranksep/=2,e.forEach(Z.edges(),function(H){var ee=Z.edge(H);ee.minlen*=2,ee.labelpos.toLowerCase()!=="c"&&(X.rankdir==="TB"||X.rankdir==="BT"?ee.width+=ee.labeloffset:ee.height+=ee.labeloffset)})}function A(Z){e.forEach(Z.edges(),function(X){var H=Z.edge(X);if(H.width&&H.height){var ee=Z.node(X.v),le=Z.node(X.w),de={rank:(le.rank-ee.rank)/2+ee.rank,e:X};d.addDummyNode(Z,"edge-proxy",de,"_ep")}})}function q(Z){var X=0;e.forEach(Z.nodes(),function(H){var ee=Z.node(H);ee.borderTop&&(ee.minRank=Z.node(ee.borderTop).rank,ee.maxRank=Z.node(ee.borderBottom).rank,X=e.max(X,ee.maxRank))}),Z.graph().maxRank=X}function R(Z){e.forEach(Z.nodes(),function(X){var H=Z.node(X);H.dummy==="edge-proxy"&&(Z.edge(H.e).labelRank=H.rank,Z.removeNode(X))})}function k(Z){var X=Number.POSITIVE_INFINITY,H=0,ee=Number.POSITIVE_INFINITY,le=0,de=Z.graph(),pe=de.marginx||0,Ee=de.marginy||0;function Ie(Pe){var Ae=Pe.x,Se=Pe.y,Ge=Pe.width,Oe=Pe.height;X=Math.min(X,Ae-Ge/2),H=Math.max(H,Ae+Ge/2),ee=Math.min(ee,Se-Oe/2),le=Math.max(le,Se+Oe/2)}e.forEach(Z.nodes(),function(Pe){Ie(Z.node(Pe))}),e.forEach(Z.edges(),function(Pe){var Ae=Z.edge(Pe);e.has(Ae,"x")&&Ie(Ae)}),X-=pe,ee-=Ee,e.forEach(Z.nodes(),function(Pe){var Ae=Z.node(Pe);Ae.x-=X,Ae.y-=ee}),e.forEach(Z.edges(),function(Pe){var Ae=Z.edge(Pe);e.forEach(Ae.points,function(Se){Se.x-=X,Se.y-=ee}),e.has(Ae,"x")&&(Ae.x-=X),e.has(Ae,"y")&&(Ae.y-=ee)}),de.width=H-X+pe,de.height=le-ee+Ee}function F(Z){e.forEach(Z.edges(),function(X){var H=Z.edge(X),ee=Z.node(X.v),le=Z.node(X.w),de,pe;H.points?(de=H.points[0],pe=H.points[H.points.length-1]):(H.points=[],de=le,pe=ee),H.points.unshift(d.intersectRect(ee,de)),H.points.push(d.intersectRect(le,pe))})}function U(Z){e.forEach(Z.edges(),function(X){var H=Z.edge(X);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function ne(Z){e.forEach(Z.edges(),function(X){var H=Z.edge(X);H.reversed&&H.points.reverse()})}function ue(Z){e.forEach(Z.nodes(),function(X){if(Z.children(X).length){var H=Z.node(X),ee=Z.node(H.borderTop),le=Z.node(H.borderBottom),de=Z.node(e.last(H.borderLeft)),pe=Z.node(e.last(H.borderRight));H.width=Math.abs(pe.x-de.x),H.height=Math.abs(le.y-ee.y),H.x=de.x+H.width/2,H.y=ee.y+H.height/2}}),e.forEach(Z.nodes(),function(X){Z.node(X).dummy==="border"&&Z.removeNode(X)})}function K(Z){e.forEach(Z.edges(),function(X){if(X.v===X.w){var H=Z.node(X.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:X,label:Z.edge(X)}),Z.removeEdge(X)}})}function W(Z){var X=d.buildLayerMatrix(Z);e.forEach(X,function(H){var ee=0;e.forEach(H,function(le,de){var pe=Z.node(le);pe.order=de+ee,e.forEach(pe.selfEdges,function(Ee){d.addDummyNode(Z,"selfedge",{width:Ee.label.width,height:Ee.label.height,rank:pe.rank,order:de+ ++ee,e:Ee.e,label:Ee.label},"_se")}),delete pe.selfEdges})})}function z(Z){e.forEach(Z.nodes(),function(X){var H=Z.node(X);if(H.dummy==="selfedge"){var ee=Z.node(H.e.v),le=ee.x+ee.width/2,de=ee.y,pe=H.x-le,Ee=ee.height/2;Z.setEdge(H.e,H.label),Z.removeNode(X),H.label.points=[{x:le+2*pe/3,y:de-Ee},{x:le+5*pe/6,y:de-Ee},{x:le+pe,y:de},{x:le+5*pe/6,y:de+Ee},{x:le+2*pe/3,y:de+Ee}],H.label.x=H.x,H.label.y=H.y}})}function Q(Z,X){return e.mapValues(e.pick(Z,X),Number)}function re(Z){var X={};return e.forEach(Z,function(H,ee){X[ee.toLowerCase()]=H}),X}return Ld}var Rd,A1;function j2(){if(A1)return Rd;A1=1;var e=ft(),t=Rt(),n=on().Graph;Rd={debugOrdering:r};function r(o){var s=t.buildLayerMatrix(o),l=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(c){l.setNode(c,{label:c}),l.setParent(c,"layer"+o.node(c).rank)}),e.forEach(o.edges(),function(c){l.setEdge(c.v,c.w,{},c.name)}),e.forEach(s,function(c,f){var h="layer"+f;l.setNode(h,{rank:"same"}),e.reduce(c,function(a,u){return l.setEdge(a,u,{style:"invis"}),u})}),l}return Rd}var Dd,P1;function F2(){return P1||(P1=1,Dd="0.8.5"),Dd}var jd,I1;function B2(){return I1||(I1=1,jd={graphlib:on(),layout:D2(),debug:j2(),util:{time:Rt().time,notime:Rt().notime},version:F2()}),jd}var z2=B2();const uo=ts(z2);function _r(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function xn(e){return function t(n){return arguments.length===0||_r(n)?t:e.apply(this,arguments)}}function M1(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return _r(n)?t:xn(function(o){return e(n,o)});default:return _r(n)&&_r(r)?t:_r(n)?xn(function(o){return e(o,r)}):_r(r)?xn(function(o){return e(n,o)}):e(n,r)}}}const $2=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function H2(e){return Object.prototype.toString.call(e)==="[object String]"}function xi(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var q1=Object.prototype.toString,L1=(function(){return q1.call(arguments)==="[object Arguments]"?function(t){return q1.call(t)==="[object Arguments]"}:function(t){return xi("callee",t)}})(),V2=!{toString:null}.propertyIsEnumerable("toString"),R1=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],D1=(function(){return arguments.propertyIsEnumerable("length")})(),U2=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},j1=xn(typeof Object.keys=="function"&&!D1?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,o=[],s=D1&&L1(t);for(n in t)xi(n,t)&&(!s||n!=="length")&&(o[o.length]=n);if(V2)for(r=R1.length-1;r>=0;)n=R1[r],xi(n,t)&&!U2(o,n)&&(o[o.length]=n),r-=1;return o}),dn=xn(function(t){return t==null}),F1=xn(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function B1(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function z1(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function G2(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function K2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const Fd=typeof Object.is=="function"?Object.is:K2;function $1(e,t,n,r){var o=B1(e),s=B1(t);function l(c,f){return Bd(c,f,n.slice(),r.slice())}return!z1(function(c,f){return!z1(l,f,c)},s,o)}function Bd(e,t,n,r){if(Fd(e,t))return!0;var o=F1(e);if(o!==F1(t)||e==null||t==null)return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&G2(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&Fd(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Fd(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(o){case"Map":return e.size!==t.size?!1:$1(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:$1(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=j1(e);if(l.length!==j1(t).length)return!1;var c=n.concat([e]),f=r.concat([t]);for(s=l.length-1;s>=0;){var h=l[s];if(!(xi(h,t)&&Bd(t[h],e[h],c,f)))return!1;s-=1}return!0}var W2=M1(function(t,n){return Bd(t,n,[],[])});function Y2(e){return Object.prototype.toString.call(e)==="[object Object]"}var Z2=xn(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():$2(t)?[]:H2(t)?"":Y2(t)?{}:L1(t)?(function(){return arguments})():void 0}),bt=xn(function(t){return t!=null&&W2(t,Z2(t))}),H1=M1(function(t,n){for(var r={},o={},s=0,l=t.length;s<l;)o[t[s]]=1,s+=1;for(var c in n)o.hasOwnProperty(c)||(r[c]=n[c]);return r});function Tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Tt(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var zd={exports:{}},$d={},Hd={exports:{}},Vd={};/**
2
2
  * @license React
3
- * use-sync-external-store-shim.development.js
3
+ * use-sync-external-store-shim.production.min.js
4
4
  *
5
5
  * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */return(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=nt.default,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(E){{for(var y=arguments.length,x=new Array(y>1?y-1:0),C=1;C<y;C++)x[C-1]=arguments[C];r("error",E,x)}}function r(E,y,x){{var C=t.ReactDebugCurrentFrame,N=C.getStackAddendum();N!==""&&(y+="%s",x=x.concat([N]));var I=x.map(function(j){return String(j)});I.unshift("Warning: "+y),Function.prototype.apply.call(console[E],console,I)}}function o(E,y){return E===y&&(E!==0||1/E===1/y)||E!==E&&y!==y}var s=typeof Object.is=="function"?Object.is:o,l=e.useState,c=e.useEffect,f=e.useLayoutEffect,d=e.useDebugValue,a=!1,u=!1;function h(E,y,x){a||e.startTransition!==void 0&&(a=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=y();if(!u){var N=y();s(C,N)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var I=l({inst:{value:C,getSnapshot:y}}),j=I[0].inst,M=I[1];return f(function(){j.value=C,j.getSnapshot=y,p(j)&&M({inst:j})},[E,C,y]),c(function(){p(j)&&M({inst:j});var A=function(){p(j)&&M({inst:j})};return E(A)},[E]),d(C),C}function p(E){var y=E.getSnapshot,x=E.value;try{var C=y();return!s(x,C)}catch{return!0}}function O(E,y,x){return y()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=!m,g=_?O:h,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;Ud.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})(),Ud}var G1;function t2(){return G1||(G1=1,Vd.exports=e2()),Vd.exports}var K1;function n2(){if(K1)return $d;K1=1;/**
9
+ */var V1;function X2(){if(V1)return Vd;V1=1;var e=nt.default;function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(u,d){var p=d(),O=r({inst:{value:p,getSnapshot:d}}),g=O[0].inst,_=O[1];return s(function(){g.value=p,g.getSnapshot=d,f(g)&&_({inst:g})},[u,p,d]),o(function(){return f(g)&&_({inst:g}),u(function(){f(g)&&_({inst:g})})},[u]),l(p),p}function f(u){var d=u.getSnapshot;u=u.value;try{var p=d();return!n(u,p)}catch{return!0}}function h(u,d){return d()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return Vd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,Vd}var U1;function Q2(){return U1||(U1=1,Hd.exports=X2()),Hd.exports}/**
10
10
  * @license React
11
- * use-sync-external-store-shim/with-selector.development.js
11
+ * use-sync-external-store-shim/with-selector.production.min.js
12
12
  *
13
13
  * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */return(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=nt.default,t=t2();function n(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;function d(a,u,h,p,O){var m=s(null),_;m.current===null?(_={hasValue:!1,value:null},m.current=_):_=m.current;var g=c(function(){var x=!1,C,N,I=function(q){if(!x){x=!0,C=q;var L=p(q);if(O!==void 0&&_.hasValue){var k=_.value;if(O(k,L))return N=k,k}return N=L,L}var F=C,V=N;if(r(F,q))return V;var ne=p(q);return O!==void 0&&O(V,ne)?V:(C=q,N=ne,ne)},j=h===void 0?null:h,M=function(){return I(u())},A=j===null?void 0:function(){return I(j())};return[M,A]},[u,h,p,O]),w=g[0],E=g[1],y=o(a,w,E);return l(function(){_.hasValue=!0,_.value=y},[y]),f(y),y}$d.useSyncExternalStoreWithSelector=d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})(),$d}var W1;function r2(){return W1||(W1=1,Hd.exports=n2()),Hd.exports}var o2=r2();const i2=ns(o2),a2={},Y1=e=>{let t;const n=new Set,r=(f,d)=>{const a=typeof f=="function"?f(t):f;if(!Object.is(a,t)){const u=t;t=d??typeof a!="object"?a:Object.assign({},t,a),n.forEach(h=>h(t,u))}},o=()=>t,c={setState:r,getState:o,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(a2?"development":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,c),c},s2=e=>e?Y1(e):Y1,{useSyncExternalStoreWithSelector:l2}=i2;function Z1(e,t=e.getState,n){const r=l2(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return se.useDebugValue(r),r}const X1=(e,t)=>{const n=s2(e),r=(o,s=t)=>Z1(n,o,s);return Object.assign(r,n),r},u2=(e,t)=>e?X1(e,t):X1;function _t(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var c2={value:()=>{}};function ki(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ni(n)}function Ni(e){this._=e}function f2(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ni.prototype=ki.prototype={constructor:Ni,on:function(e,t){var n=this._,r=f2(e+"",n),o,s=-1,l=r.length;if(arguments.length<2){for(;++s<l;)if((o=(e=r[s]).type)&&(o=d2(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<l;)if(o=(e=r[s]).type)n[o]=Q1(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Q1(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ni(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,s;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,o=s.length;r<o;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,s=r.length;o<s;++o)r[o].value.apply(t,n)}};function d2(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Q1(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=c2,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Gd="http://www.w3.org/1999/xhtml";const J1={svg:"http://www.w3.org/2000/svg",xhtml:Gd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ti(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),J1.hasOwnProperty(t)?{space:J1[t],local:e}:e}function h2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gd&&t.documentElement.namespaceURI===Gd?t.createElement(e):t.createElementNS(n,e)}}function p2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function e_(e){var t=Ti(e);return(t.local?p2:h2)(t)}function v2(){}function Kd(e){return e==null?v2:function(){return this.querySelector(e)}}function g2(e){typeof e!="function"&&(e=Kd(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=new Array(l),f,d,a=0;a<l;++a)(f=s[a])&&(d=e.call(f,f.__data__,a,s))&&("__data__"in f&&(d.__data__=f.__data__),c[a]=d);return new Ht(r,this._parents)}function y2(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function m2(){return[]}function t_(e){return e==null?m2:function(){return this.querySelectorAll(e)}}function b2(e){return function(){return y2(e.apply(this,arguments))}}function _2(e){typeof e=="function"?e=b2(e):e=t_(e);for(var t=this._groups,n=t.length,r=[],o=[],s=0;s<n;++s)for(var l=t[s],c=l.length,f,d=0;d<c;++d)(f=l[d])&&(r.push(e.call(f,f.__data__,d,l)),o.push(f));return new Ht(r,o)}function n_(e){return function(){return this.matches(e)}}function r_(e){return function(t){return t.matches(e)}}var w2=Array.prototype.find;function O2(e){return function(){return w2.call(this.children,e)}}function E2(){return this.firstElementChild}function S2(e){return this.select(e==null?E2:O2(typeof e=="function"?e:r_(e)))}var x2=Array.prototype.filter;function k2(){return Array.from(this.children)}function N2(e){return function(){return x2.call(this.children,e)}}function T2(e){return this.selectAll(e==null?k2:N2(typeof e=="function"?e:r_(e)))}function C2(e){typeof e!="function"&&(e=n_(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=[],f,d=0;d<l;++d)(f=s[d])&&e.call(f,f.__data__,d,s)&&c.push(f);return new Ht(r,this._parents)}function o_(e){return new Array(e.length)}function A2(){return new Ht(this._enter||this._groups.map(o_),this._parents)}function Ci(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ci.prototype={constructor:Ci,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function P2(e){return function(){return e}}function I2(e,t,n,r,o,s){for(var l=0,c,f=t.length,d=s.length;l<d;++l)(c=t[l])?(c.__data__=s[l],r[l]=c):n[l]=new Ci(e,s[l]);for(;l<f;++l)(c=t[l])&&(o[l]=c)}function M2(e,t,n,r,o,s,l){var c,f,d=new Map,a=t.length,u=s.length,h=new Array(a),p;for(c=0;c<a;++c)(f=t[c])&&(h[c]=p=l.call(f,f.__data__,c,t)+"",d.has(p)?o[c]=f:d.set(p,f));for(c=0;c<u;++c)p=l.call(e,s[c],c,s)+"",(f=d.get(p))?(r[c]=f,f.__data__=s[c],d.delete(p)):n[c]=new Ci(e,s[c]);for(c=0;c<a;++c)(f=t[c])&&d.get(h[c])===f&&(o[c]=f)}function q2(e){return e.__data__}function L2(e,t){if(!arguments.length)return Array.from(this,q2);var n=t?M2:I2,r=this._parents,o=this._groups;typeof e!="function"&&(e=P2(e));for(var s=o.length,l=new Array(s),c=new Array(s),f=new Array(s),d=0;d<s;++d){var a=r[d],u=o[d],h=u.length,p=R2(e.call(a,a&&a.__data__,d,r)),O=p.length,m=c[d]=new Array(O),_=l[d]=new Array(O),g=f[d]=new Array(h);n(a,u,m,_,g,p,t);for(var w=0,E=0,y,x;w<O;++w)if(y=m[w]){for(w>=E&&(E=w+1);!(x=_[E])&&++E<O;);y._next=x||null}}return l=new Ht(l,r),l._enter=c,l._exit=f,l}function R2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function D2(){return new Ht(this._exit||this._groups.map(o_),this._parents)}function j2(e,t,n){var r=this.enter(),o=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?s.remove():n(s),r&&o?r.merge(o).order():o}function F2(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,s=r.length,l=Math.min(o,s),c=new Array(o),f=0;f<l;++f)for(var d=n[f],a=r[f],u=d.length,h=c[f]=new Array(u),p,O=0;O<u;++O)(p=d[O]||a[O])&&(h[O]=p);for(;f<o;++f)c[f]=n[f];return new Ht(c,this._parents)}function B2(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,s=r[o],l;--o>=0;)(l=r[o])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function z2(e){e||(e=H2);function t(u,h){return u&&h?e(u.__data__,h.__data__):!u-!h}for(var n=this._groups,r=n.length,o=new Array(r),s=0;s<r;++s){for(var l=n[s],c=l.length,f=o[s]=new Array(c),d,a=0;a<c;++a)(d=l[a])&&(f[a]=d);f.sort(t)}return new Ht(o,this._parents).order()}function H2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function V2(){return Array.from(this)}function U2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length;o<s;++o){var l=r[o];if(l)return l}return null}function G2(){let e=0;for(const t of this)++e;return e}function K2(){return!this.node()}function W2(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],s=0,l=o.length,c;s<l;++s)(c=o[s])&&e.call(c,c.__data__,s,o);return this}function Y2(e){return function(){this.removeAttribute(e)}}function Z2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function X2(e,t){return function(){this.setAttribute(e,t)}}function Q2(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function J2(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function eC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function tC(e,t){var n=Ti(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Z2:Y2:typeof t=="function"?n.local?eC:J2:n.local?Q2:X2)(n,t))}function i_(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function nC(e){return function(){this.style.removeProperty(e)}}function rC(e,t,n){return function(){this.style.setProperty(e,t,n)}}function oC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function iC(e,t,n){return arguments.length>1?this.each((t==null?nC:typeof t=="function"?oC:rC)(e,t,n??"")):Or(this.node(),e)}function Or(e,t){return e.style.getPropertyValue(t)||i_(e).getComputedStyle(e,null).getPropertyValue(t)}function aC(e){return function(){delete this[e]}}function sC(e,t){return function(){this[e]=t}}function lC(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function uC(e,t){return arguments.length>1?this.each((t==null?aC:typeof t=="function"?lC:sC)(e,t)):this.node()[e]}function a_(e){return e.trim().split(/^|\s+/)}function Wd(e){return e.classList||new s_(e)}function s_(e){this._node=e,this._names=a_(e.getAttribute("class")||"")}s_.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function l_(e,t){for(var n=Wd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function u_(e,t){for(var n=Wd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function cC(e){return function(){l_(this,e)}}function fC(e){return function(){u_(this,e)}}function dC(e,t){return function(){(t.apply(this,arguments)?l_:u_)(this,e)}}function hC(e,t){var n=a_(e+"");if(arguments.length<2){for(var r=Wd(this.node()),o=-1,s=n.length;++o<s;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?dC:t?cC:fC)(n,t))}function pC(){this.textContent=""}function vC(e){return function(){this.textContent=e}}function gC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function yC(e){return arguments.length?this.each(e==null?pC:(typeof e=="function"?gC:vC)(e)):this.node().textContent}function mC(){this.innerHTML=""}function bC(e){return function(){this.innerHTML=e}}function _C(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function wC(e){return arguments.length?this.each(e==null?mC:(typeof e=="function"?_C:bC)(e)):this.node().innerHTML}function OC(){this.nextSibling&&this.parentNode.appendChild(this)}function EC(){return this.each(OC)}function SC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xC(){return this.each(SC)}function kC(e){var t=typeof e=="function"?e:e_(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function NC(){return null}function TC(e,t){var n=typeof e=="function"?e:e_(e),r=t==null?NC:typeof t=="function"?t:Kd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function CC(){var e=this.parentNode;e&&e.removeChild(this)}function AC(){return this.each(CC)}function PC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function IC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function MC(e){return this.select(e?IC:PC)}function qC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function LC(e){return function(t){e.call(this,t,this.__data__)}}function RC(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function DC(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,s;n<o;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function jC(e,t,n){return function(){var r=this.__on,o,s=LC(t);if(r){for(var l=0,c=r.length;l<c;++l)if((o=r[l]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=t;return}}this.addEventListener(e.type,s,n),o={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(o):this.__on=[o]}}function FC(e,t,n){var r=RC(e+""),o,s=r.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,a;f<d;++f)for(o=0,a=c[f];o<s;++o)if((l=r[o]).type===a.type&&l.name===a.name)return a.value}return}for(c=t?jC:DC,o=0;o<s;++o)this.each(c(r[o],t,n));return this}function c_(e,t,n){var r=i_(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function BC(e,t){return function(){return c_(this,e,t)}}function zC(e,t){return function(){return c_(this,e,t.apply(this,arguments))}}function HC(e,t){return this.each((typeof t=="function"?zC:BC)(e,t))}function*$C(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length,l;o<s;++o)(l=r[o])&&(yield l)}var f_=[null];function Ht(e,t){this._groups=e,this._parents=t}function fo(){return new Ht([[document.documentElement]],f_)}function VC(){return this}Ht.prototype=fo.prototype={constructor:Ht,select:g2,selectAll:_2,selectChild:S2,selectChildren:T2,filter:C2,data:L2,enter:A2,exit:D2,join:j2,merge:F2,selection:VC,order:B2,sort:z2,call:$2,nodes:V2,node:U2,size:G2,empty:K2,each:W2,attr:tC,style:iC,property:uC,classed:hC,text:yC,html:wC,raise:EC,lower:xC,append:kC,insert:TC,remove:AC,clone:MC,datum:qC,on:FC,dispatch:HC,[Symbol.iterator]:$C};function Zt(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],f_)}function UC(e){let t;for(;t=e.sourceEvent;)e=t;return e}function an(e,t){if(e=UC(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const GC={passive:!1},ho={capture:!0,passive:!1};function Yd(e){e.stopImmediatePropagation()}function Er(e){e.preventDefault(),e.stopImmediatePropagation()}function d_(e){var t=e.document.documentElement,n=Zt(e).on("dragstart.drag",Er,ho);"onselectstart"in t?n.on("selectstart.drag",Er,ho):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function h_(e,t){var n=e.document.documentElement,r=Zt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Er,ho),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ai=e=>()=>e;function Zd(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:s,x:l,y:c,dx:f,dy:d,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:a}})}Zd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function KC(e){return!e.ctrlKey&&!e.button}function WC(){return this.parentNode}function YC(e,t){return t??{x:e.x,y:e.y}}function ZC(){return navigator.maxTouchPoints||"ontouchstart"in this}function XC(){var e=KC,t=WC,n=YC,r=ZC,o={},s=ki("start","drag","end"),l=0,c,f,d,a,u=0;function h(y){y.on("mousedown.drag",p).filter(r).on("touchstart.drag",_).on("touchmove.drag",g,GC).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(y,x){if(!(a||!e.call(this,y,x))){var C=E(this,t.call(this,y,x),y,x,"mouse");C&&(Zt(y.view).on("mousemove.drag",O,ho).on("mouseup.drag",m,ho),d_(y.view),Yd(y),d=!1,c=y.clientX,f=y.clientY,C("start",y))}}function O(y){if(Er(y),!d){var x=y.clientX-c,C=y.clientY-f;d=x*x+C*C>u}o.mouse("drag",y)}function m(y){Zt(y.view).on("mousemove.drag mouseup.drag",null),h_(y.view,d),Er(y),o.mouse("end",y)}function _(y,x){if(e.call(this,y,x)){var C=y.changedTouches,N=t.call(this,y,x),I=C.length,j,M;for(j=0;j<I;++j)(M=E(this,N,y,x,C[j].identifier,C[j]))&&(Yd(y),M("start",y,C[j]))}}function g(y){var x=y.changedTouches,C=x.length,N,I;for(N=0;N<C;++N)(I=o[x[N].identifier])&&(Er(y),I("drag",y,x[N]))}function w(y){var x=y.changedTouches,C=x.length,N,I;for(a&&clearTimeout(a),a=setTimeout(function(){a=null},500),N=0;N<C;++N)(I=o[x[N].identifier])&&(Yd(y),I("end",y,x[N]))}function E(y,x,C,N,I,j){var M=s.copy(),A=an(j||C,x),q,L,k;if((k=n.call(y,new Zd("beforestart",{sourceEvent:C,target:h,identifier:I,active:l,x:A[0],y:A[1],dx:0,dy:0,dispatch:M}),N))!=null)return q=k.x-A[0]||0,L=k.y-A[1]||0,function F(V,ne,ue){var K=A,W;switch(V){case"start":o[I]=F,W=l++;break;case"end":delete o[I],--l;case"drag":A=an(ue||ne,x),W=l;break}M.call(V,y,new Zd(V,{sourceEvent:ne,subject:k,target:h,identifier:I,active:W,x:A[0]+q,y:A[1]+L,dx:A[0]-K[0],dy:A[1]-K[1],dispatch:M}),N)}}return h.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Ai(!!y),h):e},h.container=function(y){return arguments.length?(t=typeof y=="function"?y:Ai(y),h):t},h.subject=function(y){return arguments.length?(n=typeof y=="function"?y:Ai(y),h):n},h.touchable=function(y){return arguments.length?(r=typeof y=="function"?y:Ai(!!y),h):r},h.on=function(){var y=s.on.apply(s,arguments);return y===s?h:y},h.clickDistance=function(y){return arguments.length?(u=(y=+y)*y,h):Math.sqrt(u)},h}function Xd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function p_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function po(){}var vo=.7,Pi=1/vo,Sr="\\s*([+-]?\\d+)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",QC=/^#([0-9a-f]{3,8})$/,JC=new RegExp(`^rgb\\(${Sr},${Sr},${Sr}\\)$`),eA=new RegExp(`^rgb\\(${pn},${pn},${pn}\\)$`),tA=new RegExp(`^rgba\\(${Sr},${Sr},${Sr},${go}\\)$`),nA=new RegExp(`^rgba\\(${pn},${pn},${pn},${go}\\)$`),rA=new RegExp(`^hsl\\(${go},${pn},${pn}\\)$`),oA=new RegExp(`^hsla\\(${go},${pn},${pn},${go}\\)$`),v_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xd(po,yo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:g_,formatHex:g_,formatHex8:iA,formatHsl:aA,formatRgb:y_,toString:y_});function g_(){return this.rgb().formatHex()}function iA(){return this.rgb().formatHex8()}function aA(){return O_(this).formatHsl()}function y_(){return this.rgb().formatRgb()}function yo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=QC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?m_(t):n===3?new Dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ii(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ii(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JC.exec(e))?new Dt(t[1],t[2],t[3],1):(t=eA.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tA.exec(e))?Ii(t[1],t[2],t[3],t[4]):(t=nA.exec(e))?Ii(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rA.exec(e))?w_(t[1],t[2]/100,t[3]/100,1):(t=oA.exec(e))?w_(t[1],t[2]/100,t[3]/100,t[4]):v_.hasOwnProperty(e)?m_(v_[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function m_(e){return new Dt(e>>16&255,e>>8&255,e&255,1)}function Ii(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dt(e,t,n,r)}function sA(e){return e instanceof po||(e=yo(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function Qd(e,t,n,r){return arguments.length===1?sA(e):new Dt(e,t,n,r??1)}function Dt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xd(Dt,Qd,p_(po,{brighter(e){return e=e==null?Pi:Math.pow(Pi,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vo:Math.pow(vo,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Jn(this.r),Jn(this.g),Jn(this.b),Mi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:b_,formatHex:b_,formatHex8:lA,formatRgb:__,toString:__}));function b_(){return`#${er(this.r)}${er(this.g)}${er(this.b)}`}function lA(){return`#${er(this.r)}${er(this.g)}${er(this.b)}${er((isNaN(this.opacity)?1:this.opacity)*255)}`}function __(){const e=Mi(this.opacity);return`${e===1?"rgb(":"rgba("}${Jn(this.r)}, ${Jn(this.g)}, ${Jn(this.b)}${e===1?")":`, ${e})`}`}function Mi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function er(e){return e=Jn(e),(e<16?"0":"")+e.toString(16)}function w_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new sn(e,t,n,r)}function O_(e){if(e instanceof sn)return new sn(e.h,e.s,e.l,e.opacity);if(e instanceof po||(e=yo(e)),!e)return new sn;if(e instanceof sn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),l=NaN,c=s-o,f=(s+o)/2;return c?(t===s?l=(n-r)/c+(n<r)*6:n===s?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?s+o:2-s-o,l*=60):c=f>0&&f<1?0:l,new sn(l,c,f,e.opacity)}function uA(e,t,n,r){return arguments.length===1?O_(e):new sn(e,t,n,r??1)}function sn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xd(sn,uA,p_(po,{brighter(e){return e=e==null?Pi:Math.pow(Pi,e),new sn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vo:Math.pow(vo,e),new sn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Dt(Jd(e>=240?e-240:e+120,o,r),Jd(e,o,r),Jd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new sn(E_(this.h),qi(this.s),qi(this.l),Mi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mi(this.opacity);return`${e===1?"hsl(":"hsla("}${E_(this.h)}, ${qi(this.s)*100}%, ${qi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function E_(e){return e=(e||0)%360,e<0?e+360:e}function qi(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const S_=e=>()=>e;function cA(e,t){return function(n){return e+n*t}}function fA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function dA(e){return(e=+e)==1?x_:function(t,n){return n-t?fA(t,n,e):S_(isNaN(t)?n:t)}}function x_(e,t){var n=t-e;return n?cA(e,n):S_(isNaN(e)?t:e)}const k_=(function e(t){var n=dA(t);function r(o,s){var l=n((o=Qd(o)).r,(s=Qd(s)).r),c=n(o.g,s.g),f=n(o.b,s.b),d=x_(o.opacity,s.opacity);return function(a){return o.r=l(a),o.g=c(a),o.b=f(a),o.opacity=d(a),o+""}}return r.gamma=e,r})(1);function Dn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var eh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,th=new RegExp(eh.source,"g");function hA(e){return function(){return e}}function pA(e){return function(t){return e(t)+""}}function vA(e,t){var n=eh.lastIndex=th.lastIndex=0,r,o,s,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=eh.exec(e))&&(o=th.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),c[l]?c[l]+=s:c[++l]=s),(r=r[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,f.push({i:l,x:Dn(r,o)})),n=th.lastIndex;return n<t.length&&(s=t.slice(n),c[l]?c[l]+=s:c[++l]=s),c.length<2?f[0]?pA(f[0].x):hA(t):(t=f.length,function(d){for(var a=0,u;a<t;++a)c[(u=f[a]).i]=u.x(d);return c.join("")})}var N_=180/Math.PI,nh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function T_(e,t,n,r,o,s){var l,c,f;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,f/=c),e*r<t*n&&(e=-e,t=-t,f=-f,l=-l),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*N_,skewX:Math.atan(f)*N_,scaleX:l,scaleY:c}}var Li;function gA(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?nh:T_(t.a,t.b,t.c,t.d,t.e,t.f)}function yA(e){return e==null||(Li||(Li=document.createElementNS("http://www.w3.org/2000/svg","g")),Li.setAttribute("transform",e),!(e=Li.transform.baseVal.consolidate()))?nh:(e=e.matrix,T_(e.a,e.b,e.c,e.d,e.e,e.f))}function C_(e,t,n,r){function o(d){return d.length?d.pop()+" ":""}function s(d,a,u,h,p,O){if(d!==u||a!==h){var m=p.push("translate(",null,t,null,n);O.push({i:m-4,x:Dn(d,u)},{i:m-2,x:Dn(a,h)})}else(u||h)&&p.push("translate("+u+t+h+n)}function l(d,a,u,h){d!==a?(d-a>180?a+=360:a-d>180&&(d+=360),h.push({i:u.push(o(u)+"rotate(",null,r)-2,x:Dn(d,a)})):a&&u.push(o(u)+"rotate("+a+r)}function c(d,a,u,h){d!==a?h.push({i:u.push(o(u)+"skewX(",null,r)-2,x:Dn(d,a)}):a&&u.push(o(u)+"skewX("+a+r)}function f(d,a,u,h,p,O){if(d!==u||a!==h){var m=p.push(o(p)+"scale(",null,",",null,")");O.push({i:m-4,x:Dn(d,u)},{i:m-2,x:Dn(a,h)})}else(u!==1||h!==1)&&p.push(o(p)+"scale("+u+","+h+")")}return function(d,a){var u=[],h=[];return d=e(d),a=e(a),s(d.translateX,d.translateY,a.translateX,a.translateY,u,h),l(d.rotate,a.rotate,u,h),c(d.skewX,a.skewX,u,h),f(d.scaleX,d.scaleY,a.scaleX,a.scaleY,u,h),d=a=null,function(p){for(var O=-1,m=h.length,_;++O<m;)u[(_=h[O]).i]=_.x(p);return u.join("")}}}var mA=C_(gA,"px, ","px)","deg)"),bA=C_(yA,", ",")",")"),_A=1e-12;function A_(e){return((e=Math.exp(e))+1/e)/2}function wA(e){return((e=Math.exp(e))-1/e)/2}function OA(e){return((e=Math.exp(2*e))-1)/(e+1)}const EA=(function e(t,n,r){function o(s,l){var c=s[0],f=s[1],d=s[2],a=l[0],u=l[1],h=l[2],p=a-c,O=u-f,m=p*p+O*O,_,g;if(m<_A)g=Math.log(h/d)/t,_=function(N){return[c+N*p,f+N*O,d*Math.exp(t*N*g)]};else{var w=Math.sqrt(m),E=(h*h-d*d+r*m)/(2*d*n*w),y=(h*h-d*d-r*m)/(2*h*n*w),x=Math.log(Math.sqrt(E*E+1)-E),C=Math.log(Math.sqrt(y*y+1)-y);g=(C-x)/t,_=function(N){var I=N*g,j=A_(x),M=d/(n*w)*(j*OA(t*I+x)-wA(x));return[c+M*p,f+M*O,d*j/A_(t*I+x)]}}return _.duration=g*1e3*t/Math.SQRT2,_}return o.rho=function(s){var l=Math.max(.001,+s),c=l*l,f=c*c;return e(l,c,f)},o})(Math.SQRT2,2,4);var xr=0,mo=0,bo=0,P_=1e3,Ri,_o,Di=0,tr=0,ji=0,wo=typeof performance=="object"&&performance.now?performance:Date,I_=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function rh(){return tr||(I_(SA),tr=wo.now()+ji)}function SA(){tr=0}function Fi(){this._call=this._time=this._next=null}Fi.prototype=M_.prototype={constructor:Fi,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?rh():+n)+(t==null?0:+t),!this._next&&_o!==this&&(_o?_o._next=this:Ri=this,_o=this),this._call=e,this._time=n,oh()},stop:function(){this._call&&(this._call=null,this._time=1/0,oh())}};function M_(e,t,n){var r=new Fi;return r.restart(e,t,n),r}function xA(){rh(),++xr;for(var e=Ri,t;e;)(t=tr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xr}function q_(){tr=(Di=wo.now())+ji,xr=mo=0;try{xA()}finally{xr=0,NA(),tr=0}}function kA(){var e=wo.now(),t=e-Di;t>P_&&(ji-=t,Di=e)}function NA(){for(var e,t=Ri,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ri=n);_o=e,oh(r)}function oh(e){if(!xr){mo&&(mo=clearTimeout(mo));var t=e-tr;t>24?(e<1/0&&(mo=setTimeout(q_,e-wo.now()-ji)),bo&&(bo=clearInterval(bo))):(bo||(Di=wo.now(),bo=setInterval(kA,P_)),xr=1,I_(q_))}}function L_(e,t,n){var r=new Fi;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var TA=ki("start","end","cancel","interrupt"),CA=[],R_=0,D_=1,ih=2,Bi=3,j_=4,ah=5,zi=6;function Hi(e,t,n,r,o,s){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;AA(e,n,{name:t,index:r,group:o,on:TA,tween:CA,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:R_})}function sh(e,t){var n=ln(e,t);if(n.state>R_)throw new Error("too late; already scheduled");return n}function vn(e,t){var n=ln(e,t);if(n.state>Bi)throw new Error("too late; already running");return n}function ln(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function AA(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=M_(s,0,n.time);function s(d){n.state=D_,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var a,u,h,p;if(n.state!==D_)return f();for(a in r)if(p=r[a],p.name===n.name){if(p.state===Bi)return L_(l);p.state===j_?(p.state=zi,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[a]):+a<t&&(p.state=zi,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[a])}if(L_(function(){n.state===Bi&&(n.state=j_,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=ih,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ih){for(n.state=Bi,o=new Array(h=n.tween.length),a=0,u=-1;a<h;++a)(p=n.tween[a].value.call(e,e.__data__,n.index,n.group))&&(o[++u]=p);o.length=u+1}}function c(d){for(var a=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=ah,1),u=-1,h=o.length;++u<h;)o[u].call(e,a);n.state===ah&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=zi,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function $i(e,t){var n=e.__transition,r,o,s=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){s=!1;continue}o=r.state>ih&&r.state<ah,r.state=zi,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}s&&delete e.__transition}}function PA(e){return this.each(function(){$i(this,e)})}function IA(e,t){var n,r;return function(){var o=vn(this,e),s=o.tween;if(s!==n){r=n=s;for(var l=0,c=r.length;l<c;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}o.tween=r}}function MA(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var s=vn(this,e),l=s.tween;if(l!==r){o=(r=l).slice();for(var c={name:t,value:n},f=0,d=o.length;f<d;++f)if(o[f].name===t){o[f]=c;break}f===d&&o.push(c)}s.tween=o}}function qA(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ln(this.node(),n).tween,o=0,s=r.length,l;o<s;++o)if((l=r[o]).name===e)return l.value;return null}return this.each((t==null?IA:MA)(n,e,t))}function lh(e,t,n){var r=e._id;return e.each(function(){var o=vn(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return ln(o,r).value[t]}}function F_(e,t){var n;return(typeof t=="number"?Dn:t instanceof yo?k_:(n=yo(t))?(t=n,k_):vA)(e,t)}function LA(e){return function(){this.removeAttribute(e)}}function RA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function DA(e,t,n){var r,o=n+"",s;return function(){var l=this.getAttribute(e);return l===o?null:l===r?s:s=t(r=l,n)}}function jA(e,t,n){var r,o=n+"",s;return function(){var l=this.getAttributeNS(e.space,e.local);return l===o?null:l===r?s:s=t(r=l,n)}}function FA(e,t,n){var r,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),f=c+"",l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c)))}}function BA(e,t,n){var r,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),f=c+"",l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c)))}}function zA(e,t){var n=Ti(e),r=n==="transform"?bA:F_;return this.attrTween(e,typeof t=="function"?(n.local?BA:FA)(n,r,lh(this,"attr."+e,t)):t==null?(n.local?RA:LA)(n):(n.local?jA:DA)(n,r,t))}function HA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function $A(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function VA(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&$A(e,s)),n}return o._value=t,o}function UA(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&HA(e,s)),n}return o._value=t,o}function GA(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ti(e);return this.tween(n,(r.local?VA:UA)(r,t))}function KA(e,t){return function(){sh(this,e).delay=+t.apply(this,arguments)}}function WA(e,t){return t=+t,function(){sh(this,e).delay=t}}function YA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?KA:WA)(t,e)):ln(this.node(),t).delay}function ZA(e,t){return function(){vn(this,e).duration=+t.apply(this,arguments)}}function XA(e,t){return t=+t,function(){vn(this,e).duration=t}}function QA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ZA:XA)(t,e)):ln(this.node(),t).duration}function JA(e,t){if(typeof t!="function")throw new Error;return function(){vn(this,e).ease=t}}function eP(e){var t=this._id;return arguments.length?this.each(JA(t,e)):ln(this.node(),t).ease}function tP(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;vn(this,e).ease=n}}function nP(e){if(typeof e!="function")throw new Error;return this.each(tP(this._id,e))}function rP(e){typeof e!="function"&&(e=n_(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=[],f,d=0;d<l;++d)(f=s[d])&&e.call(f,f.__data__,d,s)&&c.push(f);return new kn(r,this._parents,this._name,this._id)}function oP(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,s=Math.min(r,o),l=new Array(r),c=0;c<s;++c)for(var f=t[c],d=n[c],a=f.length,u=l[c]=new Array(a),h,p=0;p<a;++p)(h=f[p]||d[p])&&(u[p]=h);for(;c<r;++c)l[c]=t[c];return new kn(l,this._parents,this._name,this._id)}function iP(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function aP(e,t,n){var r,o,s=iP(t)?sh:vn;return function(){var l=s(this,e),c=l.on;c!==r&&(o=(r=c).copy()).on(t,n),l.on=o}}function sP(e,t){var n=this._id;return arguments.length<2?ln(this.node(),n).on.on(e):this.each(aP(n,e,t))}function lP(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function uP(){return this.on("end.remove",lP(this._id))}function cP(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Kd(e));for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l)for(var c=r[l],f=c.length,d=s[l]=new Array(f),a,u,h=0;h<f;++h)(a=c[h])&&(u=e.call(a,a.__data__,h,c))&&("__data__"in a&&(u.__data__=a.__data__),d[h]=u,Hi(d[h],t,n,h,d,ln(a,n)));return new kn(s,this._parents,t,n)}function fP(e){var t=this._name,n=this._id;typeof e!="function"&&(e=t_(e));for(var r=this._groups,o=r.length,s=[],l=[],c=0;c<o;++c)for(var f=r[c],d=f.length,a,u=0;u<d;++u)if(a=f[u]){for(var h=e.call(a,a.__data__,u,f),p,O=ln(a,n),m=0,_=h.length;m<_;++m)(p=h[m])&&Hi(p,t,n,m,h,O);s.push(h),l.push(a)}return new kn(s,l,t,n)}var dP=fo.prototype.constructor;function hP(){return new dP(this._groups,this._parents)}function pP(e,t){var n,r,o;return function(){var s=Or(this,e),l=(this.style.removeProperty(e),Or(this,e));return s===l?null:s===n&&l===r?o:o=t(n=s,r=l)}}function B_(e){return function(){this.style.removeProperty(e)}}function vP(e,t,n){var r,o=n+"",s;return function(){var l=Or(this,e);return l===o?null:l===r?s:s=t(r=l,n)}}function gP(e,t,n){var r,o,s;return function(){var l=Or(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Or(this,e))),l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c))}}function yP(e,t){var n,r,o,s="style."+t,l="end."+s,c;return function(){var f=vn(this,e),d=f.on,a=f.value[s]==null?c||(c=B_(t)):void 0;(d!==n||o!==a)&&(r=(n=d).copy()).on(l,o=a),f.on=r}}function mP(e,t,n){var r=(e+="")=="transform"?mA:F_;return t==null?this.styleTween(e,pP(e,r)).on("end.style."+e,B_(e)):typeof t=="function"?this.styleTween(e,gP(e,r,lh(this,"style."+e,t))).each(yP(this._id,e)):this.styleTween(e,vP(e,r,t),n).on("end.style."+e,null)}function bP(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function _P(e,t,n){var r,o;function s(){var l=t.apply(this,arguments);return l!==o&&(r=(o=l)&&bP(e,l,n)),r}return s._value=t,s}function wP(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,_P(e,t,n??""))}function OP(e){return function(){this.textContent=e}}function EP(e){return function(){var t=e(this);this.textContent=t??""}}function SP(e){return this.tween("text",typeof e=="function"?EP(lh(this,"text",e)):OP(e==null?"":e+""))}function xP(e){return function(t){this.textContent=e.call(this,t)}}function kP(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&xP(o)),t}return r._value=e,r}function NP(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,kP(e))}function TP(){for(var e=this._name,t=this._id,n=z_(),r=this._groups,o=r.length,s=0;s<o;++s)for(var l=r[s],c=l.length,f,d=0;d<c;++d)if(f=l[d]){var a=ln(f,t);Hi(f,e,n,d,l,{time:a.time+a.delay+a.duration,delay:0,duration:a.duration,ease:a.ease})}return new kn(r,this._parents,e,n)}function CP(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(s,l){var c={value:l},f={value:function(){--o===0&&s()}};n.each(function(){var d=vn(this,r),a=d.on;a!==e&&(t=(e=a).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),d.on=t}),o===0&&s()})}var AP=0;function kn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function z_(){return++AP}var Nn=fo.prototype;kn.prototype={constructor:kn,select:cP,selectAll:fP,selectChild:Nn.selectChild,selectChildren:Nn.selectChildren,filter:rP,merge:oP,selection:hP,transition:TP,call:Nn.call,nodes:Nn.nodes,node:Nn.node,size:Nn.size,empty:Nn.empty,each:Nn.each,on:sP,attr:zA,attrTween:GA,style:mP,styleTween:wP,text:SP,textTween:NP,remove:uP,tween:qA,delay:YA,duration:QA,ease:eP,easeVarying:nP,end:CP,[Symbol.iterator]:Nn[Symbol.iterator]};function PP(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var IP={time:null,delay:0,duration:250,ease:PP};function MP(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function qP(e){var t,n;e instanceof kn?(t=e._id,e=e._name):(t=z_(),(n=IP).time=rh(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,s=0;s<o;++s)for(var l=r[s],c=l.length,f,d=0;d<c;++d)(f=l[d])&&Hi(f,e,t,d,l,n||MP(f,t));return new kn(r,this._parents,e,t)}fo.prototype.interrupt=PA,fo.prototype.transition=qP;const Vi=e=>()=>e;function LP(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Tn(e,t,n){this.k=e,this.x=t,this.y=n}Tn.prototype={constructor:Tn,scale:function(e){return e===1?this:new Tn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Tn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cn=new Tn(1,0,0);Tn.prototype;function uh(e){e.stopImmediatePropagation()}function Oo(e){e.preventDefault(),e.stopImmediatePropagation()}function RP(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function DP(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function H_(){return this.__zoom||Cn}function jP(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FP(){return navigator.maxTouchPoints||"ontouchstart"in this}function BP(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function $_(){var e=RP,t=DP,n=BP,r=jP,o=FP,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=EA,d=ki("start","zoom","end"),a,u,h,p=500,O=150,m=0,_=10;function g(k){k.property("__zoom",H_).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",M).filter(o).on("touchstart.zoom",A).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,F,V,ne){var ue=k.selection?k.selection():k;ue.property("__zoom",H_),k!==ue?x(k,F,V,ne):ue.interrupt().each(function(){C(this,arguments).event(ne).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},g.scaleBy=function(k,F,V,ne){g.scaleTo(k,function(){var ue=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return ue*K},V,ne)},g.scaleTo=function(k,F,V,ne){g.transform(k,function(){var ue=t.apply(this,arguments),K=this.__zoom,W=V==null?y(ue):typeof V=="function"?V.apply(this,arguments):V,B=K.invert(W),Q=typeof F=="function"?F.apply(this,arguments):F;return n(E(w(K,Q),W,B),ue,l)},V,ne)},g.translateBy=function(k,F,V,ne){g.transform(k,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof V=="function"?V.apply(this,arguments):V),t.apply(this,arguments),l)},null,ne)},g.translateTo=function(k,F,V,ne,ue){g.transform(k,function(){var K=t.apply(this,arguments),W=this.__zoom,B=ne==null?y(K):typeof ne=="function"?ne.apply(this,arguments):ne;return n(Cn.translate(B[0],B[1]).scale(W.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof V=="function"?-V.apply(this,arguments):-V),K,l)},ne,ue)};function w(k,F){return F=Math.max(s[0],Math.min(s[1],F)),F===k.k?k:new Tn(F,k.x,k.y)}function E(k,F,V){var ne=F[0]-V[0]*k.k,ue=F[1]-V[1]*k.k;return ne===k.x&&ue===k.y?k:new Tn(k.k,ne,ue)}function y(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function x(k,F,V,ne){k.on("start.zoom",function(){C(this,arguments).event(ne).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(ne).end()}).tween("zoom",function(){var ue=this,K=arguments,W=C(ue,K).event(ne),B=t.apply(ue,K),Q=V==null?y(B):typeof V=="function"?V.apply(ue,K):V,re=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Z=ue.__zoom,X=typeof F=="function"?F.apply(ue,K):F,$=f(Z.invert(Q).concat(re/Z.k),X.invert(Q).concat(re/X.k));return function(ee){if(ee===1)ee=X;else{var le=$(ee),de=re/le[2];ee=new Tn(de,Q[0]-le[0]*de,Q[1]-le[1]*de)}W.zoom(null,ee)}})}function C(k,F,V){return!V&&k.__zooming||new N(k,F)}function N(k,F){this.that=k,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,F),this.taps=0}N.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,F){return this.mouse&&k!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var F=Zt(this.that).datum();d.call(k,this.that,new LP(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:d}),F)}};function I(k,...F){if(!e.apply(this,arguments))return;var V=C(this,F).event(k),ne=this.__zoom,ue=Math.max(s[0],Math.min(s[1],ne.k*Math.pow(2,r.apply(this,arguments)))),K=an(k);if(V.wheel)(V.mouse[0][0]!==K[0]||V.mouse[0][1]!==K[1])&&(V.mouse[1]=ne.invert(V.mouse[0]=K)),clearTimeout(V.wheel);else{if(ne.k===ue)return;V.mouse=[K,ne.invert(K)],$i(this),V.start()}Oo(k),V.wheel=setTimeout(W,O),V.zoom("mouse",n(E(w(ne,ue),V.mouse[0],V.mouse[1]),V.extent,l));function W(){V.wheel=null,V.end()}}function j(k,...F){if(h||!e.apply(this,arguments))return;var V=k.currentTarget,ne=C(this,F,!0).event(k),ue=Zt(k.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",re,!0),K=an(k,V),W=k.clientX,B=k.clientY;d_(k.view),uh(k),ne.mouse=[K,this.__zoom.invert(K)],$i(this),ne.start();function Q(Z){if(Oo(Z),!ne.moved){var X=Z.clientX-W,$=Z.clientY-B;ne.moved=X*X+$*$>m}ne.event(Z).zoom("mouse",n(E(ne.that.__zoom,ne.mouse[0]=an(Z,V),ne.mouse[1]),ne.extent,l))}function re(Z){ue.on("mousemove.zoom mouseup.zoom",null),h_(Z.view,ne.moved),Oo(Z),ne.event(Z).end()}}function M(k,...F){if(e.apply(this,arguments)){var V=this.__zoom,ne=an(k.changedTouches?k.changedTouches[0]:k,this),ue=V.invert(ne),K=V.k*(k.shiftKey?.5:2),W=n(E(w(V,K),ne,ue),t.apply(this,F),l);Oo(k),c>0?Zt(this).transition().duration(c).call(x,W,ne,k):Zt(this).call(g.transform,W,ne,k)}}function A(k,...F){if(e.apply(this,arguments)){var V=k.touches,ne=V.length,ue=C(this,F,k.changedTouches.length===ne).event(k),K,W,B,Q;for(uh(k),W=0;W<ne;++W)B=V[W],Q=an(B,this),Q=[Q,this.__zoom.invert(Q),B.identifier],ue.touch0?!ue.touch1&&ue.touch0[2]!==Q[2]&&(ue.touch1=Q,ue.taps=0):(ue.touch0=Q,K=!0,ue.taps=1+!!a);a&&(a=clearTimeout(a)),K&&(ue.taps<2&&(u=Q[0],a=setTimeout(function(){a=null},p)),$i(this),ue.start())}}function q(k,...F){if(this.__zooming){var V=C(this,F).event(k),ne=k.changedTouches,ue=ne.length,K,W,B,Q;for(Oo(k),K=0;K<ue;++K)W=ne[K],B=an(W,this),V.touch0&&V.touch0[2]===W.identifier?V.touch0[0]=B:V.touch1&&V.touch1[2]===W.identifier&&(V.touch1[0]=B);if(W=V.that.__zoom,V.touch1){var re=V.touch0[0],Z=V.touch0[1],X=V.touch1[0],$=V.touch1[1],ee=(ee=X[0]-re[0])*ee+(ee=X[1]-re[1])*ee,le=(le=$[0]-Z[0])*le+(le=$[1]-Z[1])*le;W=w(W,Math.sqrt(ee/le)),B=[(re[0]+X[0])/2,(re[1]+X[1])/2],Q=[(Z[0]+$[0])/2,(Z[1]+$[1])/2]}else if(V.touch0)B=V.touch0[0],Q=V.touch0[1];else return;V.zoom("touch",n(E(W,B,Q),V.extent,l))}}function L(k,...F){if(this.__zooming){var V=C(this,F).event(k),ne=k.changedTouches,ue=ne.length,K,W;for(uh(k),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),K=0;K<ue;++K)W=ne[K],V.touch0&&V.touch0[2]===W.identifier?delete V.touch0:V.touch1&&V.touch1[2]===W.identifier&&delete V.touch1;if(V.touch1&&!V.touch0&&(V.touch0=V.touch1,delete V.touch1),V.touch0)V.touch0[1]=this.__zoom.invert(V.touch0[0]);else if(V.end(),V.taps===2&&(W=an(W,this),Math.hypot(u[0]-W[0],u[1]-W[1])<_)){var B=Zt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:Vi(+k),g):r},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Vi(!!k),g):e},g.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Vi(!!k),g):o},g.extent=function(k){return arguments.length?(t=typeof k=="function"?k:Vi([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):t},g.scaleExtent=function(k){return arguments.length?(s[0]=+k[0],s[1]=+k[1],g):[s[0],s[1]]},g.translateExtent=function(k){return arguments.length?(l[0][0]=+k[0][0],l[1][0]=+k[1][0],l[0][1]=+k[0][1],l[1][1]=+k[1][1],g):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},g.constrain=function(k){return arguments.length?(n=k,g):n},g.duration=function(k){return arguments.length?(c=+k,g):c},g.interpolate=function(k){return arguments.length?(f=k,g):f},g.on=function(){var k=d.on.apply(d,arguments);return k===d?g:k},g.clickDistance=function(k){return arguments.length?(m=(k=+k)*k,g):Math.sqrt(m)},g.tapDistance=function(k){return arguments.length?(_=+k,g):_},g}const Ui=se.createContext(null),zP=Ui.Provider,un={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},V_=un.error001();function st(e,t){const n=se.useContext(Ui);if(n===null)throw new Error(V_);return Z1(n,e,t)}const wt=()=>{const e=se.useContext(Ui);if(e===null)throw new Error(V_);return se.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},HP=e=>e.userSelectionActive?"none":"all";function ch({position:e,children:t,className:n,style:r,...o}){const s=st(HP),l=`${e}`.split("-");return H.jsx("div",{className:Tt(["react-flow__panel",n,...l]),style:{...r,pointerEvents:s},...o,children:t})}function $P({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:H.jsx(ch,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:H.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const VP=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:s={},labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:f,className:d,...a})=>{const u=se.useRef(null),[h,p]=se.useState({x:0,y:0,width:0,height:0}),O=Tt(["react-flow__edge-textwrapper",d]);return se.useEffect(()=>{if(u.current){const m=u.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),typeof n>"u"||!n?null:H.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:O,visibility:h.width?"visible":"hidden",...a,children:[o&&H.jsx("rect",{width:h.width+2*l[0],x:-l[0],y:-l[1],height:h.height+2*l[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),H.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:u,style:r,children:n}),f]})};var UP=se.memo(VP);const fh=e=>({width:e.offsetWidth,height:e.offsetHeight}),kr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),dh=(e={x:0,y:0},t)=>({x:kr(e.x,t[0][0],t[1][0]),y:kr(e.y,t[0][1],t[1][1])}),U_=(e,t,n)=>e<t?kr(Math.abs(e-t),1,50)/50:e>n?-kr(Math.abs(e-n),1,50)/50:0,G_=(e,t)=>{const n=U_(e.x,35,t.width-35)*20,r=U_(e.y,35,t.height-35)*20;return[n,r]},K_=e=>e.getRootNode?.()||window?.document,W_=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Eo=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Y_=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Z_=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),GP=(e,t)=>Y_(W_(Eo(e),Eo(t))),hh=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},KP=e=>Xt(e.width)&&Xt(e.height)&&Xt(e.x)&&Xt(e.y),Xt=e=>!isNaN(e)&&isFinite(e),Ot=Symbol.for("internals"),X_=["Enter"," ","Escape"],Q_=(e,t)=>{console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},WP=e=>"nativeEvent"in e;function ph(e){const n=(WP(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const J_=e=>"clientX"in e,jn=(e,t)=>{const n=J_(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Gi=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,So=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d,style:a,markerEnd:u,markerStart:h,interactionWidth:p=20})=>H.jsxs(H.Fragment,{children:[H.jsx("path",{id:e,style:a,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:u,markerStart:h}),p&&H.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),o&&Xt(n)&&Xt(r)?H.jsx(UP,{x:n,y:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d}):null]});So.displayName="BaseEdge";function xo(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(s=>s.id===e);o&&n(r,{...o})}}function ew({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,s=n<e?n+o:n-o,l=Math.abs(r-t)/2,c=r<t?r+l:r-l;return[s,c,o,l]}function tw({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:s,targetControlX:l,targetControlY:c}){const f=e*.125+o*.375+l*.375+n*.125,d=t*.125+s*.375+c*.375+r*.125,a=Math.abs(f-e),u=Math.abs(d-t);return[f,d,a,u]}var nr;(function(e){e.Strict="strict",e.Loose="loose"})(nr||(nr={}));var rr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(rr||(rr={}));var ko;(function(e){e.Partial="partial",e.Full="full"})(ko||(ko={}));var gn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(gn||(gn={}));var Ki;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ki||(Ki={}));var Ce;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ce||(Ce={}));function nw({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Ce.Left||e===Ce.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function rw({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top}){const[l,c]=nw({pos:n,x1:e,y1:t,x2:r,y2:o}),[f,d]=nw({pos:s,x1:r,y1:o,x2:e,y2:t}),[a,u,h,p]=tw({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${c} ${f},${d} ${r},${o}`,a,u,h,p]}const vh=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Ce.Bottom,targetPosition:s=Ce.Top,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:a,labelBgBorderRadius:u,style:h,markerEnd:p,markerStart:O,interactionWidth:m})=>{const[_,g,w]=rw({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return H.jsx(So,{path:_,labelX:g,labelY:w,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:a,labelBgBorderRadius:u,style:h,markerEnd:p,markerStart:O,interactionWidth:m})});vh.displayName="SimpleBezierEdge";const ow={[Ce.Left]:{x:-1,y:0},[Ce.Right]:{x:1,y:0},[Ce.Top]:{x:0,y:-1},[Ce.Bottom]:{x:0,y:1}},YP=({source:e,sourcePosition:t=Ce.Bottom,target:n})=>t===Ce.Left||t===Ce.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},iw=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function ZP({source:e,sourcePosition:t=Ce.Bottom,target:n,targetPosition:r=Ce.Top,center:o,offset:s}){const l=ow[t],c=ow[r],f={x:e.x+l.x*s,y:e.y+l.y*s},d={x:n.x+c.x*s,y:n.y+c.y*s},a=YP({source:f,sourcePosition:t,target:d}),u=a.x!==0?"x":"y",h=a[u];let p=[],O,m;const _={x:0,y:0},g={x:0,y:0},[w,E,y,x]=ew({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[u]*c[u]===-1){O=o.x||w,m=o.y||E;const N=[{x:O,y:f.y},{x:O,y:d.y}],I=[{x:f.x,y:m},{x:d.x,y:m}];l[u]===h?p=u==="x"?N:I:p=u==="x"?I:N}else{const N=[{x:f.x,y:d.y}],I=[{x:d.x,y:f.y}];if(u==="x"?p=l.x===h?I:N:p=l.y===h?N:I,t===r){const L=Math.abs(e[u]-n[u]);if(L<=s){const k=Math.min(s-1,s-L);l[u]===h?_[u]=k:g[u]=k}}if(t!==r){const L=u==="x"?"y":"x",k=l[u]===c[L],F=f[L]>d[L],V=f[L]<d[L];(l[u]===1&&(!k&&F||k&&V)||l[u]!==1&&(!k&&V||k&&F))&&(p=u==="x"?N:I)}const j={x:f.x-_.x,y:f.y-_.y},M={x:d.x-g.x,y:d.y-g.y},A=Math.max(Math.abs(j.x-p[0].x),Math.abs(M.x-p[0].x)),q=Math.max(Math.abs(j.y-p[0].y),Math.abs(M.y-p[0].y));A>=q?(O=(j.x+M.x)/2,m=p[0].y):(O=p[0].x,m=(j.y+M.y)/2)}return[[e,{x:f.x-_.x,y:f.y-_.y},...p,{x:d.x-g.x,y:d.y-g.y},n],O,m,y,x]}function XP(e,t,n,r){const o=Math.min(iw(e,t)/2,iw(t,n)/2,r),{x:s,y:l}=t;if(e.x===s&&s===n.x||e.y===l&&l===n.y)return`L${s} ${l}`;if(e.y===l){const d=e.x<n.x?-1:1,a=e.y<n.y?1:-1;return`L ${s+o*d},${l}Q ${s},${l} ${s},${l+o*a}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${l+o*f}Q ${s},${l} ${s+o*c},${l}`}function gh({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top,borderRadius:l=5,centerX:c,centerY:f,offset:d=20}){const[a,u,h,p,O]=ZP({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:s,center:{x:c,y:f},offset:d});return[a.reduce((_,g,w)=>{let E="";return w>0&&w<a.length-1?E=XP(a[w-1],g,a[w+1],l):E=`${w===0?"M":"L"}${g.x} ${g.y}`,_+=E,_},""),u,h,p,O]}const Wi=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d,style:a,sourcePosition:u=Ce.Bottom,targetPosition:h=Ce.Top,markerEnd:p,markerStart:O,pathOptions:m,interactionWidth:_})=>{const[g,w,E]=gh({sourceX:e,sourceY:t,sourcePosition:u,targetX:n,targetY:r,targetPosition:h,borderRadius:m?.borderRadius,offset:m?.offset});return H.jsx(So,{path:g,labelX:w,labelY:E,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d,style:a,markerEnd:p,markerStart:O,interactionWidth:_})});Wi.displayName="SmoothStepEdge";const yh=se.memo(e=>H.jsx(Wi,{...e,pathOptions:se.useMemo(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));yh.displayName="StepEdge";function QP({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,s,l,c]=ew({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,s,l,c]}const mh=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d,style:a,markerEnd:u,markerStart:h,interactionWidth:p})=>{const[O,m,_]=QP({sourceX:e,sourceY:t,targetX:n,targetY:r});return H.jsx(So,{path:O,labelX:m,labelY:_,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:d,style:a,markerEnd:u,markerStart:h,interactionWidth:p})});mh.displayName="StraightEdge";function Yi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function aw({pos:e,x1:t,y1:n,x2:r,y2:o,c:s}){switch(e){case Ce.Left:return[t-Yi(t-r,s),n];case Ce.Right:return[t+Yi(r-t,s),n];case Ce.Top:return[t,n-Yi(n-o,s)];case Ce.Bottom:return[t,n+Yi(o-n,s)]}}function sw({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top,curvature:l=.25}){const[c,f]=aw({pos:n,x1:e,y1:t,x2:r,y2:o,c:l}),[d,a]=aw({pos:s,x1:r,y1:o,x2:e,y2:t,c:l}),[u,h,p,O]=tw({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:d,targetControlY:a});return[`M${e},${t} C${c},${f} ${d},${a} ${r},${o}`,u,h,p,O]}const Zi=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Ce.Bottom,targetPosition:s=Ce.Top,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:a,labelBgBorderRadius:u,style:h,markerEnd:p,markerStart:O,pathOptions:m,interactionWidth:_})=>{const[g,w,E]=sw({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s,curvature:m?.curvature});return H.jsx(So,{path:g,labelX:w,labelY:E,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:a,labelBgBorderRadius:u,style:h,markerEnd:p,markerStart:O,interactionWidth:_})});Zi.displayName="BezierEdge";const bh=se.createContext(null),JP=bh.Provider;bh.Consumer;const eI=()=>se.useContext(bh),tI=e=>"id"in e&&"source"in e&&"target"in e,nI=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,_h=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,rI=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),oI=(e,t)=>{if(!e.source||!e.target)return Q_("006",un.error006()),t;let n;return tI(e)?n={...e}:n={...e,id:nI(e)},rI(n,t)?t:t.concat(n)},lw=({x:e,y:t},[n,r,o],s,[l,c])=>{const f={x:(e-n)/o,y:(t-r)/o};return s?{x:l*Math.round(f.x/l),y:c*Math.round(f.y/c)}:f},iI=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),or=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},Xi=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:s,y:l}=or(o,t).positionAbsolute;return W_(r,Eo({x:s,y:l,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Y_(n)},uw=(e,t,[n,r,o]=[0,0,1],s=!1,l=!1,c=[0,0])=>{const f={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},d=[];return e.forEach(a=>{const{width:u,height:h,selectable:p=!0,hidden:O=!1}=a;if(l&&!p||O)return!1;const{positionAbsolute:m}=or(a,c),_={x:m.x,y:m.y,width:u||0,height:h||0},g=hh(f,_),w=typeof u>"u"||typeof h>"u"||u===null||h===null,E=s&&g>0,y=(u||0)*(h||0);(w||E||g>=y||a.dragging)&&d.push(a)}),d},cw=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},fw=(e,t,n,r,o,s=.1)=>{const l=t/(e.width*(1+s)),c=n/(e.height*(1+s)),f=Math.min(l,c),d=kr(f,r,o),a=e.x+e.width/2,u=e.y+e.height/2,h=t/2-a*d,p=n/2-u*d;return[h,p,d]},ir=(e,t=0)=>e.transition().duration(t);function dw(e,t,n,r){return(t[n]||[]).reduce((o,s)=>(`${e.id}-${s.id}-${n}`!==r&&o.push({id:s.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+s.x+s.width/2,y:(e.positionAbsolute?.y??0)+s.y+s.height/2}),o),[])}function aI(e,t,n,r,o,s){const{x:l,y:c}=jn(e),d=t.elementsFromPoint(l,c).find(O=>O.classList.contains("react-flow__handle"));if(d){const O=d.getAttribute("data-nodeid");if(O){const m=wh(void 0,d),_=d.getAttribute("data-handleid"),g=s({nodeId:O,id:_,type:m});if(g)return{handle:{id:_,type:m,nodeId:O,x:n.x,y:n.y},validHandleResult:g}}}let a=[],u=1/0;if(o.forEach(O=>{const m=Math.sqrt((O.x-n.x)**2+(O.y-n.y)**2);if(m<=r){const _=s(O);m<=u&&(m<u?a=[{handle:O,validHandleResult:_}]:m===u&&a.push({handle:O,validHandleResult:_}),u=m)}}),!a.length)return{handle:null,validHandleResult:hw()};if(a.length===1)return a[0];const h=a.some(({validHandleResult:O})=>O.isValid),p=a.some(({handle:O})=>O.type==="target");return a.find(({handle:O,validHandleResult:m})=>p?O.type==="target":h?m.isValid:!0)||a[0]}const sI={source:null,target:null,sourceHandle:null,targetHandle:null},hw=()=>({handleDomNode:null,isValid:!1,connection:sI,endHandle:null});function pw(e,t,n,r,o,s,l){const c=o==="target",f=l.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),d={...hw(),handleDomNode:f};if(f){const a=wh(void 0,f),u=f.getAttribute("data-nodeid"),h=f.getAttribute("data-handleid"),p=f.classList.contains("connectable"),O=f.classList.contains("connectableend"),m={source:c?u:n,sourceHandle:c?h:r,target:c?n:u,targetHandle:c?r:h};d.connection=m,p&&O&&(t===nr.Strict?c&&a==="source"||!c&&a==="target":u!==n||h!==r)&&(d.endHandle={nodeId:u,handleId:h,type:a},d.isValid=s(m))}return d}function lI({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,s)=>{if(s[Ot]){const{handleBounds:l}=s[Ot];let c=[],f=[];l&&(c=dw(s,l,"source",`${t}-${n}-${r}`),f=dw(s,l,"target",`${t}-${n}-${r}`)),o.push(...c,...f)}return o},[])}function wh(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Oh(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function uI(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function vw({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:s,setState:l,isValidConnection:c,edgeUpdaterType:f,onEdgeUpdateEnd:d}){const a=K_(e.target),{connectionMode:u,domNode:h,autoPanOnConnect:p,connectionRadius:O,onConnectStart:m,panBy:_,getNodes:g,cancelConnection:w}=s();let E=0,y;const{x,y:C}=jn(e),N=a?.elementFromPoint(x,C),I=wh(f,N),j=h?.getBoundingClientRect();if(!j||!I)return;let M,A=jn(e,j),q=!1,L=null,k=!1,F=null;const V=lI({nodes:g(),nodeId:n,handleId:t,handleType:I}),ne=()=>{if(!p)return;const[W,B]=G_(A,j);_({x:W,y:B}),E=requestAnimationFrame(ne)};l({connectionPosition:A,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:I,connectionStartHandle:{nodeId:n,handleId:t,type:I},connectionEndHandle:null}),m?.(e,{nodeId:n,handleId:t,handleType:I});function ue(W){const{transform:B}=s();A=jn(W,j);const{handle:Q,validHandleResult:re}=aI(W,a,lw(A,B,!1,[1,1]),O,V,Z=>pw(Z,u,n,t,o?"target":"source",c,a));if(y=Q,q||(ne(),q=!0),F=re.handleDomNode,L=re.connection,k=re.isValid,l({connectionPosition:y&&k?iI({x:y.x,y:y.y},B):A,connectionStatus:uI(!!y,k),connectionEndHandle:re.endHandle}),!y&&!k&&!F)return Oh(M);L.source!==L.target&&F&&(Oh(M),M=F,F.classList.add("connecting","react-flow__handle-connecting"),F.classList.toggle("valid",k),F.classList.toggle("react-flow__handle-valid",k))}function K(W){(y||F)&&L&&k&&r?.(L),s().onConnectEnd?.(W),f&&d?.(W),Oh(M),w(),cancelAnimationFrame(E),q=!1,k=!1,L=null,F=null,a.removeEventListener("mousemove",ue),a.removeEventListener("mouseup",K),a.removeEventListener("touchmove",ue),a.removeEventListener("touchend",K)}a.addEventListener("mousemove",ue),a.addEventListener("mouseup",K),a.addEventListener("touchmove",ue),a.addEventListener("touchend",K)}const gw=()=>!0,cI=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),fI=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:s,connectionClickStartHandle:l}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||s?.nodeId===e&&s?.handleId===t&&s?.type===n,clickConnecting:l?.nodeId===e&&l?.handleId===t&&l?.type===n}},yw=se.forwardRef(({type:e="source",position:t=Ce.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:f,className:d,onMouseDown:a,onTouchStart:u,...h},p)=>{const O=l||null,m=e==="target",_=wt(),g=eI(),{connectOnClick:w,noPanClassName:E}=st(cI,_t),{connecting:y,clickConnecting:x}=st(fI(g,O,e),_t);g||_.getState().onError?.("010",un.error010());const C=j=>{const{defaultEdgeOptions:M,onConnect:A,hasDefaultEdges:q}=_.getState(),L={...M,...j};if(q){const{edges:k,setEdges:F}=_.getState();F(oI(L,k))}A?.(L),c?.(L)},N=j=>{if(!g)return;const M=J_(j);o&&(M&&j.button===0||!M)&&vw({event:j,handleId:O,nodeId:g,onConnect:C,isTarget:m,getState:_.getState,setState:_.setState,isValidConnection:n||_.getState().isValidConnection||gw}),M?a?.(j):u?.(j)},I=j=>{const{onClickConnectStart:M,onClickConnectEnd:A,connectionClickStartHandle:q,connectionMode:L,isValidConnection:k}=_.getState();if(!g||!q&&!o)return;if(!q){M?.(j,{nodeId:g,handleId:O,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:g,type:e,handleId:O}});return}const F=K_(j.target),V=n||k||gw,{connection:ne,isValid:ue}=pw({nodeId:g,id:O,type:e},L,q.nodeId,q.handleId||null,q.type,V,F);ue&&C(ne),A?.(j),_.setState({connectionClickStartHandle:null})};return H.jsx("div",{"data-handleid":O,"data-nodeid":g,"data-handlepos":t,"data-id":`${g}-${O}-${e}`,className:Tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!m,target:m,connectable:r,connectablestart:o,connectableend:s,connecting:x,connectionindicator:r&&(o&&!y||s&&y)}]),onMouseDown:N,onTouchStart:N,onClick:w?I:void 0,ref:p,...h,children:f})});yw.displayName="Handle";var vt=se.memo(yw);const mw=({data:e,isConnectable:t,targetPosition:n=Ce.Top,sourcePosition:r=Ce.Bottom})=>H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:n,isConnectable:t}),e?.label,H.jsx(vt,{type:"source",position:r,isConnectable:t})]});mw.displayName="DefaultNode";var Eh=se.memo(mw);const bw=({data:e,isConnectable:t,sourcePosition:n=Ce.Bottom})=>H.jsxs(H.Fragment,{children:[e?.label,H.jsx(vt,{type:"source",position:n,isConnectable:t})]});bw.displayName="InputNode";var _w=se.memo(bw);const ww=({data:e,isConnectable:t,targetPosition:n=Ce.Top})=>H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:n,isConnectable:t}),e?.label]});ww.displayName="OutputNode";var Ow=se.memo(ww);const Sh=()=>null;Sh.displayName="GroupNode";const dI=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),Qi=e=>e.id;function hI(e,t){return _t(e.selectedNodes.map(Qi),t.selectedNodes.map(Qi))&&_t(e.selectedEdges.map(Qi),t.selectedEdges.map(Qi))}const Ew=se.memo(({onSelectionChange:e})=>{const t=wt(),{selectedNodes:n,selectedEdges:r}=st(dI,hI);return se.useEffect(()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange?.(o)},[n,r,e]),null});Ew.displayName="SelectionListener";const pI=e=>!!e.onSelectionChange;function vI({onSelectionChange:e}){const t=st(pI);return e||t?H.jsx(Ew,{onSelectionChange:e}):null}const gI=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Nr(e,t){se.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Xe(e,t,n){se.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const yI=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:s,onConnectEnd:l,onClickConnectStart:c,onClickConnectEnd:f,nodesDraggable:d,nodesConnectable:a,nodesFocusable:u,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:O,minZoom:m,maxZoom:_,nodeExtent:g,onNodesChange:w,onEdgesChange:E,elementsSelectable:y,connectionMode:x,snapGrid:C,snapToGrid:N,translateExtent:I,connectOnClick:j,defaultEdgeOptions:M,fitView:A,fitViewOptions:q,onNodesDelete:L,onEdgesDelete:k,onNodeDrag:F,onNodeDragStart:V,onNodeDragStop:ne,onSelectionDrag:ue,onSelectionDragStart:K,onSelectionDragStop:W,noPanClassName:B,nodeOrigin:Q,rfId:re,autoPanOnConnect:Z,autoPanOnNodeDrag:X,onError:$,connectionRadius:ee,isValidConnection:le})=>{const{setNodes:de,setEdges:pe,setDefaultNodesAndEdges:Ee,setMinZoom:Ie,setMaxZoom:Pe,setTranslateExtent:Ae,setNodeExtent:xe,reset:Ge}=st(gI,_t),Oe=wt();return se.useEffect(()=>{const ge=r?.map(me=>({...me,...M}));return Ee(n,ge),()=>{Ge()}},[]),Xe("defaultEdgeOptions",M,Oe.setState),Xe("connectionMode",x,Oe.setState),Xe("onConnect",o,Oe.setState),Xe("onConnectStart",s,Oe.setState),Xe("onConnectEnd",l,Oe.setState),Xe("onClickConnectStart",c,Oe.setState),Xe("onClickConnectEnd",f,Oe.setState),Xe("nodesDraggable",d,Oe.setState),Xe("nodesConnectable",a,Oe.setState),Xe("nodesFocusable",u,Oe.setState),Xe("edgesFocusable",h,Oe.setState),Xe("edgesUpdatable",p,Oe.setState),Xe("elementsSelectable",y,Oe.setState),Xe("elevateNodesOnSelect",O,Oe.setState),Xe("snapToGrid",N,Oe.setState),Xe("snapGrid",C,Oe.setState),Xe("onNodesChange",w,Oe.setState),Xe("onEdgesChange",E,Oe.setState),Xe("connectOnClick",j,Oe.setState),Xe("fitViewOnInit",A,Oe.setState),Xe("fitViewOnInitOptions",q,Oe.setState),Xe("onNodesDelete",L,Oe.setState),Xe("onEdgesDelete",k,Oe.setState),Xe("onNodeDrag",F,Oe.setState),Xe("onNodeDragStart",V,Oe.setState),Xe("onNodeDragStop",ne,Oe.setState),Xe("onSelectionDrag",ue,Oe.setState),Xe("onSelectionDragStart",K,Oe.setState),Xe("onSelectionDragStop",W,Oe.setState),Xe("noPanClassName",B,Oe.setState),Xe("nodeOrigin",Q,Oe.setState),Xe("rfId",re,Oe.setState),Xe("autoPanOnConnect",Z,Oe.setState),Xe("autoPanOnNodeDrag",X,Oe.setState),Xe("onError",$,Oe.setState),Xe("connectionRadius",ee,Oe.setState),Xe("isValidConnection",le,Oe.setState),Nr(e,de),Nr(t,pe),Nr(m,Ie),Nr(_,Pe),Nr(I,Ae),Nr(g,xe),null},Sw={display:"none"},mI={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},xw="react-flow__node-desc",kw="react-flow__edge-desc",bI="react-flow__aria-live",_I=e=>e.ariaLiveMessage;function wI({rfId:e}){const t=st(_I);return H.jsx("div",{id:`${bI}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:mI,children:t})}function OI({rfId:e,disableKeyboardA11y:t}){return H.jsxs(H.Fragment,{children:[H.jsxs("div",{id:`${xw}-${e}`,style:Sw,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),H.jsx("div",{id:`${kw}-${e}`,style:Sw,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&H.jsx(wI,{rfId:e})]})}const EI=typeof document<"u"?document:null;var No=(e=null,t={target:EI})=>{const[n,r]=se.useState(!1),o=se.useRef(!1),s=se.useRef(new Set([])),[l,c]=se.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(u=>typeof u=="string").map(u=>u.split("+")),a=d.reduce((u,h)=>u.concat(...h),[]);return[d,a]}return[[],[]]},[e]);return se.useEffect(()=>{if(e!==null){const f=u=>{if(o.current=u.ctrlKey||u.metaKey||u.shiftKey,!o.current&&ph(u))return!1;const h=Tw(u.code,c);s.current.add(u[h]),Nw(l,s.current,!1)&&(u.preventDefault(),r(!0))},d=u=>{if(!o.current&&ph(u))return!1;const h=Tw(u.code,c);Nw(l,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(u[h]),u.key==="Meta"&&s.current.clear(),o.current=!1},a=()=>{s.current.clear(),r(!1)};return t?.target?.addEventListener("keydown",f),t?.target?.addEventListener("keyup",d),window.addEventListener("blur",a),()=>{t?.target?.removeEventListener("keydown",f),t?.target?.removeEventListener("keyup",d),window.removeEventListener("blur",a)}}},[e,r]),n};function Nw(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Tw(e,t){return t.includes(e)?"code":"key"}function Cw(e,t,n,r){if(!e.parentNode)return n;const o=t.get(e.parentNode),s=or(o,r);return Cw(o,t,{x:(n.x??0)+s.x,y:(n.y??0)+s.y,z:(o[Ot]?.z??0)>(n.z??0)?o[Ot]?.z??0:n.z??0},r)}function Aw(e,t,n){e.forEach(r=>{if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n?.[r.id]){const{x:o,y:s,z:l}=Cw(r,e,{...r.position,z:r[Ot]?.z??0},t);r.positionAbsolute={x:o,y:s},r[Ot].z=l,n?.[r.id]&&(r[Ot].isParent=!0)}})}function xh(e,t,n,r){const o=new Map,s={},l=r?1e3:0;return e.forEach(c=>{const f=(Xt(c.zIndex)?c.zIndex:0)+(c.selected?l:0),d=t.get(c.id),a={width:d?.width,height:d?.height,...c,positionAbsolute:{x:c.position.x,y:c.position.y}};c.parentNode&&(a.parentNode=c.parentNode,s[c.parentNode]=!0),Object.defineProperty(a,Ot,{enumerable:!1,value:{handleBounds:d?.[Ot]?.handleBounds,z:f}}),o.set(c.id,a)}),Aw(o,n,s),o}function Pw(e,t={}){const{getNodes:n,width:r,height:o,minZoom:s,maxZoom:l,d3Zoom:c,d3Selection:f,fitViewOnInitDone:d,fitViewOnInit:a,nodeOrigin:u}=e(),h=t.initial&&!d&&a;if(c&&f&&(h||!t.initial)){const O=n().filter(_=>{const g=t.includeHiddenNodes?_.width&&_.height:!_.hidden;return t.nodes?.length?g&&t.nodes.some(w=>w.id===_.id):g}),m=O.every(_=>_.width&&_.height);if(O.length>0&&m){const _=Xi(O,u),[g,w,E]=fw(_,r,o,t.minZoom??s,t.maxZoom??l,t.padding??.1),y=Cn.translate(g,w).scale(E);return typeof t.duration=="number"&&t.duration>0?c.transform(ir(f,t.duration),y):c.transform(f,y),!0}}return!1}function SI(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Ot]:r[Ot],selected:n.selected})}),new Map(t)}function xI(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function Ji({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:s,onNodesChange:l,onEdgesChange:c,hasDefaultNodes:f,hasDefaultEdges:d}=n();e?.length&&(f&&r({nodeInternals:SI(e,o)}),l?.(e)),t?.length&&(d&&r({edges:xI(t,s)}),c?.(t))}const Tr=()=>{},kI={zoomIn:Tr,zoomOut:Tr,zoomTo:Tr,getZoom:()=>1,setViewport:Tr,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Tr,fitBounds:Tr,project:e=>e,viewportInitialized:!1},NI=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),TI=()=>{const e=wt(),{d3Zoom:t,d3Selection:n}=st(NI,_t);return se.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(ir(n,o?.duration),1.2),zoomOut:o=>t.scaleBy(ir(n,o?.duration),1/1.2),zoomTo:(o,s)=>t.scaleTo(ir(n,s?.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,s)=>{const[l,c,f]=e.getState().transform,d=Cn.translate(o.x??l,o.y??c).scale(o.zoom??f);t.transform(ir(n,s?.duration),d)},getViewport:()=>{const[o,s,l]=e.getState().transform;return{x:o,y:s,zoom:l}},fitView:o=>Pw(e.getState,o),setCenter:(o,s,l)=>{const{width:c,height:f,maxZoom:d}=e.getState(),a=typeof l?.zoom<"u"?l.zoom:d,u=c/2-o*a,h=f/2-s*a,p=Cn.translate(u,h).scale(a);t.transform(ir(n,l?.duration),p)},fitBounds:(o,s)=>{const{width:l,height:c,minZoom:f,maxZoom:d}=e.getState(),[a,u,h]=fw(o,l,c,f,d,s?.padding??.1),p=Cn.translate(a,u).scale(h);t.transform(ir(n,s?.duration),p)},project:o=>{const{transform:s,snapToGrid:l,snapGrid:c}=e.getState();return lw(o,s,l,c)},viewportInitialized:!0}:kI,[t,n])};function ea(){const e=TI(),t=wt(),n=se.useCallback(()=>t.getState().getNodes().map(m=>({...m})),[]),r=se.useCallback(m=>t.getState().nodeInternals.get(m),[]),o=se.useCallback(()=>{const{edges:m=[]}=t.getState();return m.map(_=>({..._}))},[]),s=se.useCallback(m=>{const{edges:_=[]}=t.getState();return _.find(g=>g.id===m)},[]),l=se.useCallback(m=>{const{getNodes:_,setNodes:g,hasDefaultNodes:w,onNodesChange:E}=t.getState(),y=_(),x=typeof m=="function"?m(y):m;if(w)g(x);else if(E){const C=x.length===0?y.map(N=>({type:"remove",id:N.id})):x.map(N=>({item:N,type:"reset"}));E(C)}},[]),c=se.useCallback(m=>{const{edges:_=[],setEdges:g,hasDefaultEdges:w,onEdgesChange:E}=t.getState(),y=typeof m=="function"?m(_):m;if(w)g(y);else if(E){const x=y.length===0?_.map(C=>({type:"remove",id:C.id})):y.map(C=>({item:C,type:"reset"}));E(x)}},[]),f=se.useCallback(m=>{const _=Array.isArray(m)?m:[m],{getNodes:g,setNodes:w,hasDefaultNodes:E,onNodesChange:y}=t.getState();if(E){const C=[...g(),..._];w(C)}else if(y){const x=_.map(C=>({item:C,type:"add"}));y(x)}},[]),d=se.useCallback(m=>{const _=Array.isArray(m)?m:[m],{edges:g=[],setEdges:w,hasDefaultEdges:E,onEdgesChange:y}=t.getState();if(E)w([...g,..._]);else if(y){const x=_.map(C=>({item:C,type:"add"}));y(x)}},[]),a=se.useCallback(()=>{const{getNodes:m,edges:_=[],transform:g}=t.getState(),[w,E,y]=g;return{nodes:m().map(x=>({...x})),edges:_.map(x=>({...x})),viewport:{x:w,y:E,zoom:y}}},[]),u=se.useCallback(({nodes:m,edges:_})=>{const{nodeInternals:g,getNodes:w,edges:E,hasDefaultNodes:y,hasDefaultEdges:x,onNodesDelete:C,onEdgesDelete:N,onNodesChange:I,onEdgesChange:j}=t.getState(),M=(m||[]).map(F=>F.id),A=(_||[]).map(F=>F.id),q=w().reduce((F,V)=>{const ne=!M.includes(V.id)&&V.parentNode&&F.find(K=>K.id===V.parentNode);return(typeof V.deletable=="boolean"?V.deletable:!0)&&(M.includes(V.id)||ne)&&F.push(V),F},[]),L=E.filter(F=>typeof F.deletable=="boolean"?F.deletable:!0),k=L.filter(F=>A.includes(F.id));if(q||k){const F=cw(q,L),V=[...k,...F],ne=V.reduce((ue,K)=>(ue.includes(K.id)||ue.push(K.id),ue),[]);if((x||y)&&(x&&t.setState({edges:E.filter(ue=>!ne.includes(ue.id))}),y&&(q.forEach(ue=>{g.delete(ue.id)}),t.setState({nodeInternals:new Map(g)}))),ne.length>0&&(N?.(V),j&&j(ne.map(ue=>({id:ue,type:"remove"})))),q.length>0&&(C?.(q),I)){const ue=q.map(K=>({id:K.id,type:"remove"}));I(ue)}}},[]),h=se.useCallback(m=>{const _=KP(m),g=_?null:t.getState().nodeInternals.get(m.id);return[_?m:Z_(g),g,_]},[]),p=se.useCallback((m,_=!0,g)=>{const[w,E,y]=h(m);return w?(g||t.getState().getNodes()).filter(x=>{if(!y&&(x.id===E.id||!x.positionAbsolute))return!1;const C=Z_(x),N=hh(C,w);return _&&N>0||N>=m.width*m.height}):[]},[]),O=se.useCallback((m,_,g=!0)=>{const[w]=h(m);if(!w)return!1;const E=hh(w,_);return g&&E>0||E>=m.width*m.height},[]);return se.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:s,setNodes:l,setEdges:c,addNodes:f,addEdges:d,toObject:a,deleteElements:u,getIntersectingNodes:p,isNodeIntersecting:O}),[e,n,r,o,s,l,c,f,d,a,u,p,O])}var CI=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=wt(),{deleteElements:r}=ea(),o=No(e),s=No(t);se.useEffect(()=>{if(o){const{edges:l,getNodes:c}=n.getState(),f=c().filter(a=>a.selected),d=l.filter(a=>a.selected);r({nodes:f,edges:d}),n.setState({nodesSelectionActive:!1})}},[o]),se.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])};function AI(e){const t=wt();se.useEffect(()=>{let n;const r=()=>{if(!e.current)return;const o=fh(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",un.error004()),t.setState({width:o.width||500,height:o.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const kh={position:"absolute",width:"100%",height:"100%",top:0,left:0},PI=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,ta=e=>({x:e.x,y:e.y,zoom:e.k}),Cr=(e,t)=>e.target.closest(`.${t}`),Iw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Mw=e=>{const t=e.ctrlKey&&Gi()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},II=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),MI=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:s=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:f=rr.Free,zoomOnDoubleClick:d=!0,elementsSelectable:a,panOnDrag:u=!0,defaultViewport:h,translateExtent:p,minZoom:O,maxZoom:m,zoomActivationKeyCode:_,preventScrolling:g=!0,children:w,noWheelClassName:E,noPanClassName:y})=>{const x=se.useRef(),C=wt(),N=se.useRef(!1),I=se.useRef(!1),j=se.useRef(null),M=se.useRef({x:0,y:0,zoom:0}),{d3Zoom:A,d3Selection:q,d3ZoomHandler:L,userSelectionActive:k}=st(II,_t),F=No(_),V=se.useRef(0),ne=se.useRef(!1),ue=se.useRef();return AI(j),se.useEffect(()=>{if(j.current){const K=j.current.getBoundingClientRect(),W=$_().scaleExtent([O,m]).translateExtent(p),B=Zt(j.current).call(W),Q=Cn.translate(h.x,h.y).scale(kr(h.zoom,O,m)),re=[[0,0],[K.width,K.height]],Z=W.constrain()(Q,re,p);W.transform(B,Z),W.wheelDelta(Mw),C.setState({d3Zoom:W,d3Selection:B,d3ZoomHandler:B.on("wheel.zoom"),transform:[Z.x,Z.y,Z.k],domNode:j.current.closest(".react-flow")})}},[]),se.useEffect(()=>{q&&A&&(l&&!F&&!k?q.on("wheel.zoom",K=>{if(Cr(K,E))return!1;K.preventDefault(),K.stopImmediatePropagation();const W=q.property("__zoom").k||1,B=Gi();if(K.ctrlKey&&s&&B){const de=an(K),pe=Mw(K),Ee=W*Math.pow(2,pe);A.scaleTo(q,Ee,de,K);return}const Q=K.deltaMode===1?20:1;let re=f===rr.Vertical?0:K.deltaX*Q,Z=f===rr.Horizontal?0:K.deltaY*Q;!B&&K.shiftKey&&f!==rr.Vertical&&(re=K.deltaY*Q,Z=0),A.translateBy(q,-(re/W)*c,-(Z/W)*c,{internal:!0});const X=ta(q.property("__zoom")),{onViewportChangeStart:$,onViewportChange:ee,onViewportChangeEnd:le}=C.getState();clearTimeout(ue.current),ne.current||(ne.current=!0,t?.(K,X),$?.(X)),ne.current&&(e?.(K,X),ee?.(X),ue.current=setTimeout(()=>{n?.(K,X),le?.(X),ne.current=!1},150))},{passive:!1}):typeof L<"u"&&q.on("wheel.zoom",function(K,W){if(!g||Cr(K,E))return null;K.preventDefault(),L.call(this,K,W)},{passive:!1}))},[k,l,f,q,A,L,F,s,g,E,t,e,n]),se.useEffect(()=>{A&&A.on("start",K=>{if(!K.sourceEvent||K.sourceEvent.internal)return null;V.current=K.sourceEvent?.button;const{onViewportChangeStart:W}=C.getState(),B=ta(K.transform);N.current=!0,M.current=B,K.sourceEvent?.type==="mousedown"&&C.setState({paneDragging:!0}),W?.(B),t?.(K.sourceEvent,B)})},[A,t]),se.useEffect(()=>{A&&(k&&!N.current?A.on("zoom",null):k||A.on("zoom",K=>{const{onViewportChange:W}=C.getState();if(C.setState({transform:[K.transform.x,K.transform.y,K.transform.k]}),I.current=!!(r&&Iw(u,V.current??0)),(e||W)&&!K.sourceEvent?.internal){const B=ta(K.transform);W?.(B),e?.(K.sourceEvent,B)}}))},[k,A,e,u,r]),se.useEffect(()=>{A&&A.on("end",K=>{if(!K.sourceEvent||K.sourceEvent.internal)return null;const{onViewportChangeEnd:W}=C.getState();if(N.current=!1,C.setState({paneDragging:!1}),r&&Iw(u,V.current??0)&&!I.current&&r(K.sourceEvent),I.current=!1,(n||W)&&PI(M.current,K.transform)){const B=ta(K.transform);M.current=B,clearTimeout(x.current),x.current=setTimeout(()=>{W?.(B),n?.(K.sourceEvent,B)},l?150:0)}})},[A,l,u,n,r]),se.useEffect(()=>{A&&A.filter(K=>{const W=F||o,B=s&&K.ctrlKey;if(K.button===1&&K.type==="mousedown"&&(Cr(K,"react-flow__node")||Cr(K,"react-flow__edge")))return!0;if(!u&&!W&&!l&&!d&&!s||k||!d&&K.type==="dblclick"||Cr(K,E)&&K.type==="wheel"||Cr(K,y)&&K.type!=="wheel"||!s&&K.ctrlKey&&K.type==="wheel"||!W&&!l&&!B&&K.type==="wheel"||!u&&(K.type==="mousedown"||K.type==="touchstart")||Array.isArray(u)&&!u.includes(K.button)&&(K.type==="mousedown"||K.type==="touchstart"))return!1;const Q=Array.isArray(u)&&u.includes(K.button)||!K.button||K.button<=1;return(!K.ctrlKey||K.type==="wheel")&&Q})},[k,A,o,s,l,d,u,a,F]),H.jsx("div",{className:"react-flow__renderer",ref:j,style:kh,children:w})},qI=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function LI(){const{userSelectionActive:e,userSelectionRect:t}=st(qI,_t);return e&&t?H.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function qw(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,o=t.position.y+t.height-n.height;if(r>0||o>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),o>0&&(n.style.height+=o),t.position.x<0){const s=Math.abs(t.position.x);n.position.x=n.position.x-s,n.style.width+=s,t.position.x=0}if(t.position.y<0){const s=Math.abs(t.position.y);n.position.y=n.position.y-s,n.style.height+=s,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function Lw(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,o)=>{const s=e.filter(c=>c.id===o.id);if(s.length===0)return r.push(o),r;const l={...o};for(const c of s)if(c)switch(c.type){case"select":{l.selected=c.selected;break}case"position":{typeof c.position<"u"&&(l.position=c.position),typeof c.positionAbsolute<"u"&&(l.positionAbsolute=c.positionAbsolute),typeof c.dragging<"u"&&(l.dragging=c.dragging),l.expandParent&&qw(r,l);break}case"dimensions":{typeof c.dimensions<"u"&&(l.width=c.dimensions.width,l.height=c.dimensions.height),typeof c.updateStyle<"u"&&(l.style={...l.style||{},...c.dimensions}),typeof c.resizing=="boolean"&&(l.resizing=c.resizing),l.expandParent&&qw(r,l);break}case"remove":return r}return r.push(l),r},n)}function Rw(e,t){return Lw(e,t)}function RI(e,t){return Lw(e,t)}const Fn=(e,t)=>({id:e,type:"select",selected:t});function Ar(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(Fn(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(Fn(r.id,!1))),n},[])}const Nh=(e,t)=>n=>{n.target===t.current&&e?.(n)},DI=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Dw=se.memo(({isSelecting:e,selectionMode:t=ko.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:s,onPaneContextMenu:l,onPaneScroll:c,onPaneMouseEnter:f,onPaneMouseMove:d,onPaneMouseLeave:a,children:u})=>{const h=se.useRef(null),p=wt(),O=se.useRef(0),m=se.useRef(0),_=se.useRef(),{userSelectionActive:g,elementsSelectable:w,dragging:E}=st(DI,_t),y=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),O.current=0,m.current=0},x=L=>{s?.(L),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},C=L=>{if(Array.isArray(n)&&n?.includes(2)){L.preventDefault();return}l?.(L)},N=c?L=>c(L):void 0,I=L=>{const{resetSelectedElements:k,domNode:F}=p.getState();if(_.current=F?.getBoundingClientRect(),!w||!e||L.button!==0||L.target!==h.current||!_.current)return;const{x:V,y:ne}=jn(L,_.current);k(),p.setState({userSelectionRect:{width:0,height:0,startX:V,startY:ne,x:V,y:ne}}),r?.(L)},j=L=>{const{userSelectionRect:k,nodeInternals:F,edges:V,transform:ne,onNodesChange:ue,onEdgesChange:K,nodeOrigin:W,getNodes:B}=p.getState();if(!e||!_.current||!k)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Q=jn(L,_.current),re=k.startX??0,Z=k.startY??0,X={...k,x:Q.x<re?Q.x:re,y:Q.y<Z?Q.y:Z,width:Math.abs(Q.x-re),height:Math.abs(Q.y-Z)},$=B(),ee=uw(F,X,ne,t===ko.Partial,!0,W),le=cw(ee,V).map(pe=>pe.id),de=ee.map(pe=>pe.id);if(O.current!==de.length){O.current=de.length;const pe=Ar($,de);pe.length&&ue?.(pe)}if(m.current!==le.length){m.current=le.length;const pe=Ar(V,le);pe.length&&K?.(pe)}p.setState({userSelectionRect:X})},M=L=>{if(L.button!==0)return;const{userSelectionRect:k}=p.getState();!g&&k&&L.target===h.current&&x?.(L),p.setState({nodesSelectionActive:O.current>0}),y(),o?.(L)},A=L=>{g&&(p.setState({nodesSelectionActive:O.current>0}),o?.(L)),y()},q=w&&(e||g);return H.jsxs("div",{className:Tt(["react-flow__pane",{dragging:E,selection:e}]),onClick:q?void 0:Nh(x,h),onContextMenu:Nh(C,h),onWheel:Nh(N,h),onMouseEnter:q?void 0:f,onMouseDown:q?I:void 0,onMouseMove:q?j:d,onMouseUp:q?M:void 0,onMouseLeave:q?A:a,ref:h,style:kh,children:[u,H.jsx(LI,{})]})});Dw.displayName="Pane";function jw(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:jw(n,t):!1}function Fw(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function jI(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||!jw(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>({id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(o.positionAbsolute?.x??0),y:n.y-(o.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode,width:o.width,height:o.height}))}function FI(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function Bw(e,t,n,r,o=[0,0],s){const l=FI(e,e.extent||r);let c=l;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const a=n.get(e.parentNode),{x:u,y:h}=or(a,o).positionAbsolute;c=a&&Xt(u)&&Xt(h)&&Xt(a.width)&&Xt(a.height)?[[u+e.width*o[0],h+e.height*o[1]],[u+a.width-e.width+e.width*o[0],h+a.height-e.height+e.height*o[1]]]:c}else s?.("005",un.error005()),c=l;else if(e.extent&&e.parentNode){const a=n.get(e.parentNode),{x:u,y:h}=or(a,o).positionAbsolute;c=[[e.extent[0][0]+u,e.extent[0][1]+h],[e.extent[1][0]+u,e.extent[1][1]+h]]}let f={x:0,y:0};if(e.parentNode){const a=n.get(e.parentNode);f=or(a,o).positionAbsolute}const d=c&&c!=="parent"?dh(t,c):t;return{position:{x:d.x-f.x,y:d.y-f.y},positionAbsolute:d}}function Th({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const zw=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const s=Array.from(o),l=t.getBoundingClientRect(),c={x:l.width*r[0],y:l.height*r[1]};return s.map(f=>{const d=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),position:f.getAttribute("data-handlepos"),x:(d.left-l.left-c.x)/n,y:(d.top-l.top-c.y)/n,...fh(f)}})};function To(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Ch({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:l,nodeInternals:c,onError:f}=t.getState(),d=c.get(e);if(!d){f?.("012",un.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(s({nodes:[d]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])}function BI(){const e=wt();return se.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:s}=e.getState(),l=n.touches?n.touches[0].clientX:n.clientX,c=n.touches?n.touches[0].clientY:n.clientY,f={x:(l-r[0])/r[2],y:(c-r[1])/r[2]};return{xSnapped:s?o[0]*Math.round(f.x/o[0]):f.x,ySnapped:s?o[1]*Math.round(f.y/o[1]):f.y,...f}},[])}function Ah(e){return(t,n,r)=>e?.(t,r)}function Hw({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:s,selectNodesOnDrag:l}){const c=wt(),[f,d]=se.useState(!1),a=se.useRef([]),u=se.useRef({x:null,y:null}),h=se.useRef(0),p=se.useRef(null),O=se.useRef({x:0,y:0}),m=se.useRef(null),_=se.useRef(!1),g=BI();return se.useEffect(()=>{if(e?.current){const w=Zt(e.current),E=({x,y:C})=>{const{nodeInternals:N,onNodeDrag:I,onSelectionDrag:j,updateNodePositions:M,nodeExtent:A,snapGrid:q,snapToGrid:L,nodeOrigin:k,onError:F}=c.getState();u.current={x,y:C};let V=!1,ne={x:0,y:0,x2:0,y2:0};if(a.current.length>1&&A){const K=Xi(a.current,k);ne=Eo(K)}if(a.current=a.current.map(K=>{const W={x:x-K.distance.x,y:C-K.distance.y};L&&(W.x=q[0]*Math.round(W.x/q[0]),W.y=q[1]*Math.round(W.y/q[1]));const B=[[A[0][0],A[0][1]],[A[1][0],A[1][1]]];a.current.length>1&&A&&!K.extent&&(B[0][0]=K.positionAbsolute.x-ne.x+A[0][0],B[1][0]=K.positionAbsolute.x+(K.width??0)-ne.x2+A[1][0],B[0][1]=K.positionAbsolute.y-ne.y+A[0][1],B[1][1]=K.positionAbsolute.y+(K.height??0)-ne.y2+A[1][1]);const Q=Bw(K,W,N,B,k,F);return V=V||K.position.x!==Q.position.x||K.position.y!==Q.position.y,K.position=Q.position,K.positionAbsolute=Q.positionAbsolute,K}),!V)return;M(a.current,!0,!0),d(!0);const ue=o?I:Ah(j);if(ue&&m.current){const[K,W]=Th({nodeId:o,dragItems:a.current,nodeInternals:N});ue(m.current,K,W)}},y=()=>{if(!p.current)return;const[x,C]=G_(O.current,p.current);if(x!==0||C!==0){const{transform:N,panBy:I}=c.getState();u.current.x=(u.current.x??0)-x/N[2],u.current.y=(u.current.y??0)-C/N[2],I({x,y:C})&&E(u.current)}h.current=requestAnimationFrame(y)};if(t)w.on(".drag",null);else{const x=XC().on("start",C=>{const{nodeInternals:N,multiSelectionActive:I,domNode:j,nodesDraggable:M,unselectNodesAndEdges:A,onNodeDragStart:q,onSelectionDragStart:L}=c.getState(),k=o?q:Ah(L);!l&&!I&&o&&(N.get(o)?.selected||A()),o&&s&&l&&Ch({id:o,store:c,nodeRef:e});const F=g(C);if(u.current=F,a.current=jI(N,M,F,o),k&&a.current){const[V,ne]=Th({nodeId:o,dragItems:a.current,nodeInternals:N});k(C.sourceEvent,V,ne)}p.current=j?.getBoundingClientRect()||null,O.current=jn(C.sourceEvent,p.current)}).on("drag",C=>{const N=g(C),{autoPanOnNodeDrag:I}=c.getState();!_.current&&I&&(_.current=!0,y()),(u.current.x!==N.xSnapped||u.current.y!==N.ySnapped)&&a.current&&(m.current=C.sourceEvent,O.current=jn(C.sourceEvent,p.current),E(N))}).on("end",C=>{if(d(!1),_.current=!1,cancelAnimationFrame(h.current),a.current){const{updateNodePositions:N,nodeInternals:I,onNodeDragStop:j,onSelectionDragStop:M}=c.getState(),A=o?j:Ah(M);if(N(a.current,!1,!1),A){const[q,L]=Th({nodeId:o,dragItems:a.current,nodeInternals:I});A(C.sourceEvent,q,L)}}}).filter(C=>{const N=C.target;return!C.button&&(!n||!Fw(N,`.${n}`,e))&&(!r||Fw(N,r,e))});return w.call(x),()=>{w.on(".drag",null)}}}},[e,t,n,r,s,c,o,l,g]),f}function $w(){const e=wt();return se.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:s,getNodes:l,snapToGrid:c,snapGrid:f,onError:d,nodesDraggable:a}=e.getState(),u=l().filter(w=>w.selected&&(w.draggable||a&&typeof w.draggable>"u")),h=c?f[0]:5,p=c?f[1]:5,O=n.isShiftPressed?4:1,m=n.x*h*O,_=n.y*p*O,g=u.map(w=>{if(w.positionAbsolute){const E={x:w.positionAbsolute.x+m,y:w.positionAbsolute.y+_};c&&(E.x=f[0]*Math.round(E.x/f[0]),E.y=f[1]*Math.round(E.y/f[1]));const{positionAbsolute:y,position:x}=Bw(w,E,r,o,void 0,d);w.position=x,w.positionAbsolute=y}return w});s(g,!0,!1)},[])}const Pr={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Co=e=>{const t=({id:n,type:r,data:o,xPos:s,yPos:l,xPosOrigin:c,yPosOrigin:f,selected:d,onClick:a,onMouseEnter:u,onMouseMove:h,onMouseLeave:p,onContextMenu:O,onDoubleClick:m,style:_,className:g,isDraggable:w,isSelectable:E,isConnectable:y,isFocusable:x,selectNodesOnDrag:C,sourcePosition:N,targetPosition:I,hidden:j,resizeObserver:M,dragHandle:A,zIndex:q,isParent:L,noDragClassName:k,noPanClassName:F,initialized:V,disableKeyboardA11y:ne,ariaLabel:ue,rfId:K})=>{const W=wt(),B=se.useRef(null),Q=se.useRef(N),re=se.useRef(I),Z=se.useRef(r),X=E||w||a||u||h||p,$=$w(),ee=To(n,W.getState,u),le=To(n,W.getState,h),de=To(n,W.getState,p),pe=To(n,W.getState,O),Ee=To(n,W.getState,m),Ie=xe=>{if(E&&(!C||!w)&&Ch({id:n,store:W,nodeRef:B}),a){const Ge=W.getState().nodeInternals.get(n);Ge&&a(xe,{...Ge})}},Pe=xe=>{if(!ph(xe))if(X_.includes(xe.key)&&E){const Ge=xe.key==="Escape";Ch({id:n,store:W,unselect:Ge,nodeRef:B})}else!ne&&w&&d&&Object.prototype.hasOwnProperty.call(Pr,xe.key)&&(W.setState({ariaLiveMessage:`Moved selected node ${xe.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~l}`}),$({x:Pr[xe.key].x,y:Pr[xe.key].y,isShiftPressed:xe.shiftKey}))};se.useEffect(()=>{if(B.current&&!j){const xe=B.current;return M?.observe(xe),()=>M?.unobserve(xe)}},[j]),se.useEffect(()=>{const xe=Z.current!==r,Ge=Q.current!==N,Oe=re.current!==I;B.current&&(xe||Ge||Oe)&&(xe&&(Z.current=r),Ge&&(Q.current=N),Oe&&(re.current=I),W.getState().updateNodeDimensions([{id:n,nodeElement:B.current,forceUpdate:!0}]))},[n,r,N,I]);const Ae=Hw({nodeRef:B,disabled:j||!w,noDragClassName:k,handleSelector:A,nodeId:n,isSelectable:E,selectNodesOnDrag:C});return j?null:H.jsx("div",{className:Tt(["react-flow__node",`react-flow__node-${r}`,{[F]:w},g,{selected:d,selectable:E,parent:L,dragging:Ae}]),ref:B,style:{zIndex:q,transform:`translate(${c}px,${f}px)`,pointerEvents:X?"all":"none",visibility:V?"visible":"hidden",..._},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ee,onMouseMove:le,onMouseLeave:de,onContextMenu:pe,onClick:Ie,onDoubleClick:Ee,onKeyDown:x?Pe:void 0,tabIndex:x?0:void 0,role:x?"button":void 0,"aria-describedby":ne?void 0:`${xw}-${K}`,"aria-label":ue,children:H.jsx(JP,{value:n,children:H.jsx(e,{id:n,data:o,type:r,xPos:s,yPos:l,selected:d,isConnectable:y,sourcePosition:N,targetPosition:I,dragging:Ae,dragHandle:A,zIndex:q})})})};return t.displayName="NodeWrapper",se.memo(t)};const zI=e=>{const t=e.getNodes().filter(n=>n.selected);return{...Xi(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function HI({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=wt(),{width:o,height:s,x:l,y:c,transformString:f,userSelectionActive:d}=st(zI,_t),a=$w(),u=se.useRef(null);if(se.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Hw({nodeRef:u}),d||!o||!s)return null;const h=e?O=>{const m=r.getState().getNodes().filter(_=>_.selected);e(O,m)}:void 0,p=O=>{Object.prototype.hasOwnProperty.call(Pr,O.key)&&a({x:Pr[O.key].x,y:Pr[O.key].y,isShiftPressed:O.shiftKey})};return H.jsx("div",{className:Tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:f},children:H.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:s,top:c,left:l}})})}var $I=se.memo(HI);const VI=e=>e.nodesSelectionActive,Vw=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,deleteKeyCode:c,onMove:f,onMoveStart:d,onMoveEnd:a,selectionKeyCode:u,selectionOnDrag:h,selectionMode:p,onSelectionStart:O,onSelectionEnd:m,multiSelectionKeyCode:_,panActivationKeyCode:g,zoomActivationKeyCode:w,elementsSelectable:E,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:I,zoomOnDoubleClick:j,panOnDrag:M,defaultViewport:A,translateExtent:q,minZoom:L,maxZoom:k,preventScrolling:F,onSelectionContextMenu:V,noWheelClassName:ne,noPanClassName:ue,disableKeyboardA11y:K})=>{const W=st(VI),B=No(u),re=No(g)||M,Z=B||h&&re!==!0;return CI({deleteKeyCode:c,multiSelectionKeyCode:_}),H.jsx(MI,{onMove:f,onMoveStart:d,onMoveEnd:a,onPaneContextMenu:s,elementsSelectable:E,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:I,zoomOnDoubleClick:j,panOnDrag:!B&&re,defaultViewport:A,translateExtent:q,minZoom:L,maxZoom:k,zoomActivationKeyCode:w,preventScrolling:F,noWheelClassName:ne,noPanClassName:ue,children:H.jsxs(Dw,{onSelectionStart:O,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,panOnDrag:re,isSelecting:!!Z,selectionMode:p,children:[e,W&&H.jsx($I,{onSelectionContextMenu:V,noPanClassName:ue,disableKeyboardA11y:K})]})})};Vw.displayName="FlowRenderer";var UI=se.memo(Vw);function GI(e){return st(se.useCallback(n=>e?uw(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function KI(e){const t={input:Co(e.input||_w),default:Co(e.default||Eh),output:Co(e.output||Ow),group:Co(e.group||Sh)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,s)=>(o[s]=Co(e[s]||Eh),o),n);return{...t,...r}}const WI=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},YI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Uw=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:s,onError:l}=st(YI,_t),c=GI(e.onlyRenderVisibleElements),f=se.useRef(),d=se.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const a=new ResizeObserver(u=>{const h=u.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));s(h)});return f.current=a,a},[]);return se.useEffect(()=>()=>{f?.current?.disconnect()},[]),H.jsx("div",{className:"react-flow__nodes",style:kh,children:c.map(a=>{let u=a.type||"default";e.nodeTypes[u]||(l?.("003",un.error003(u)),u="default");const h=e.nodeTypes[u]||e.nodeTypes.default,p=!!(a.draggable||t&&typeof a.draggable>"u"),O=!!(a.selectable||o&&typeof a.selectable>"u"),m=!!(a.connectable||n&&typeof a.connectable>"u"),_=!!(a.focusable||r&&typeof a.focusable>"u"),g=e.nodeExtent?dh(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,w=g?.x??0,E=g?.y??0,y=WI({x:w,y:E,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return H.jsx(h,{id:a.id,className:a.className,style:a.style,type:u,data:a.data,sourcePosition:a.sourcePosition||Ce.Bottom,targetPosition:a.targetPosition||Ce.Top,hidden:a.hidden,xPos:w,yPos:E,xPosOrigin:y.x,yPosOrigin:y.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:p,isSelectable:O,isConnectable:m,isFocusable:_,resizeObserver:d,dragHandle:a.dragHandle,zIndex:a[Ot]?.z??0,isParent:!!a[Ot]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel},a.id)})})};Uw.displayName="NodeRenderer";var ZI=se.memo(Uw);const XI=(e,t,n)=>n===Ce.Left?e-t:n===Ce.Right?e+t:e,QI=(e,t,n)=>n===Ce.Top?e-t:n===Ce.Bottom?e+t:e,Gw="react-flow__edgeupdater",Kw=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:s,onMouseOut:l,type:c})=>H.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:l,className:Tt([Gw,`${Gw}-${c}`]),cx:XI(t,r,e),cy:QI(n,r,e),r,stroke:"transparent",fill:"transparent"}),JI=()=>!0;var Ir=e=>{const t=({id:n,className:r,type:o,data:s,onClick:l,onEdgeDoubleClick:c,selected:f,animated:d,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:p,labelBgPadding:O,labelBgBorderRadius:m,style:_,source:g,target:w,sourceX:E,sourceY:y,targetX:x,targetY:C,sourcePosition:N,targetPosition:I,elementsSelectable:j,hidden:M,sourceHandleId:A,targetHandleId:q,onContextMenu:L,onMouseEnter:k,onMouseMove:F,onMouseLeave:V,edgeUpdaterRadius:ne,onEdgeUpdate:ue,onEdgeUpdateStart:K,onEdgeUpdateEnd:W,markerEnd:B,markerStart:Q,rfId:re,ariaLabel:Z,isFocusable:X,isUpdatable:$,pathOptions:ee,interactionWidth:le})=>{const de=se.useRef(null),[pe,Ee]=se.useState(!1),[Ie,Pe]=se.useState(!1),Ae=wt(),xe=se.useMemo(()=>`url(#${_h(Q,re)})`,[Q,re]),Ge=se.useMemo(()=>`url(#${_h(B,re)})`,[B,re]);if(M)return null;const Oe=We=>{const{edges:it,addSelectedEdges:Et}=Ae.getState();if(j&&(Ae.setState({nodesSelectionActive:!1}),Et([n])),l){const kt=it.find(Nt=>Nt.id===n);l(We,kt)}},ge=xo(n,Ae.getState,c),me=xo(n,Ae.getState,L),ke=xo(n,Ae.getState,k),Ne=xo(n,Ae.getState,F),we=xo(n,Ae.getState,V),qe=(We,it)=>{if(We.button!==0)return;const{edges:Et,isValidConnection:kt}=Ae.getState(),Nt=it?w:g,Ft=(it?q:A)||null,yn=it?"target":"source",Lo=kt||JI,Ro=it,mn=Et.find(In=>In.id===n);Pe(!0),K?.(We,mn,yn);const Do=In=>{Pe(!1),W?.(In,mn,yn)};vw({event:We,handleId:Ft,nodeId:Nt,onConnect:In=>ue?.(mn,In),isTarget:Ro,getState:Ae.getState,setState:Ae.setState,isValidConnection:Lo,edgeUpdaterType:yn,onEdgeUpdateEnd:Do})},je=We=>qe(We,!0),ze=We=>qe(We,!1),lt=()=>Ee(!0),pt=()=>Ee(!1),Ze=!j&&!l,It=We=>{if(X_.includes(We.key)&&j){const{unselectNodesAndEdges:it,addSelectedEdges:Et,edges:kt}=Ae.getState();We.key==="Escape"?(de.current?.blur(),it({edges:[kt.find(Ft=>Ft.id===n)]})):Et([n])}};return H.jsxs("g",{className:Tt(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:f,animated:d,inactive:Ze,updating:pe}]),onClick:Oe,onDoubleClick:ge,onContextMenu:me,onMouseEnter:ke,onMouseMove:Ne,onMouseLeave:we,onKeyDown:X?It:void 0,tabIndex:X?0:void 0,role:X?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":Z===null?void 0:Z||`Edge from ${g} to ${w}`,"aria-describedby":X?`${kw}-${re}`:void 0,ref:de,children:[!Ie&&H.jsx(e,{id:n,source:g,target:w,selected:f,animated:d,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:p,labelBgPadding:O,labelBgBorderRadius:m,data:s,style:_,sourceX:E,sourceY:y,targetX:x,targetY:C,sourcePosition:N,targetPosition:I,sourceHandleId:A,targetHandleId:q,markerStart:xe,markerEnd:Ge,pathOptions:ee,interactionWidth:le}),$&&H.jsxs(H.Fragment,{children:[($==="source"||$===!0)&&H.jsx(Kw,{position:N,centerX:E,centerY:y,radius:ne,onMouseDown:je,onMouseEnter:lt,onMouseOut:pt,type:"source"}),($==="target"||$===!0)&&H.jsx(Kw,{position:I,centerX:x,centerY:C,radius:ne,onMouseDown:ze,onMouseEnter:lt,onMouseOut:pt,type:"target"})]})]})};return t.displayName="EdgeWrapper",se.memo(t)};function eM(e){const t={default:Ir(e.default||Zi),straight:Ir(e.bezier||mh),step:Ir(e.step||yh),smoothstep:Ir(e.step||Wi),simplebezier:Ir(e.simplebezier||vh)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,s)=>(o[s]=Ir(e[s]||Zi),o),n);return{...t,...r}}function Ww(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,s=n?.width||t.width,l=n?.height||t.height;switch(e){case Ce.Top:return{x:r+s/2,y:o};case Ce.Right:return{x:r+s,y:o+l/2};case Ce.Bottom:return{x:r+s/2,y:o+l};case Ce.Left:return{x:r,y:o+l/2}}}function Yw(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const tM=(e,t,n,r,o,s)=>{const l=Ww(n,e,t),c=Ww(s,r,o);return{sourceX:l.x,sourceY:l.y,targetX:c.x,targetY:c.y}};function nM({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:s,width:l,height:c,transform:f}){const d={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+s)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);const a=Eo({x:(0-f[0])/f[2],y:(0-f[1])/f[2],width:l/f[2],height:c/f[2]}),u=Math.max(0,Math.min(a.x2,d.x2)-Math.max(a.x,d.x)),h=Math.max(0,Math.min(a.y2,d.y2)-Math.max(a.y,d.y));return Math.ceil(u*h)>0}function Zw(e){const t=e?.[Ot]?.handleBounds||null,n=t&&e?.width&&e?.height&&typeof e?.positionAbsolute?.x<"u"&&typeof e?.positionAbsolute?.y<"u";return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const rM=[{level:0,isMaxLevel:!0,edges:[]}];function oM(e,t,n=!1){let r=-1;const o=e.reduce((l,c)=>{const f=Xt(c.zIndex);let d=f?c.zIndex:0;if(n){const a=t.get(c.target),u=t.get(c.source),h=c.selected||a?.selected||u?.selected,p=Math.max(u?.[Ot]?.z||0,a?.[Ot]?.z||0,1e3);d=(f?c.zIndex:0)+(h?p:0)}return l[d]?l[d].push(c):l[d]=[c],r=d>r?d:r,l},{}),s=Object.entries(o).map(([l,c])=>{const f=+l;return{edges:c,level:f,isMaxLevel:f===r}});return s.length===0?rM:s}function iM(e,t,n){const r=st(se.useCallback(o=>e?o.edges.filter(s=>{const l=t.get(s.source),c=t.get(s.target);return l?.width&&l?.height&&c?.width&&c?.height&&nM({sourcePos:l.positionAbsolute||{x:0,y:0},targetPos:c.positionAbsolute||{x:0,y:0},sourceWidth:l.width,sourceHeight:l.height,targetWidth:c.width,targetHeight:c.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return oM(r,t,n)}const aM=({color:e="none",strokeWidth:t=1})=>H.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),sM=({color:e="none",strokeWidth:t=1})=>H.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),Xw={[Ki.Arrow]:aM,[Ki.ArrowClosed]:sM};function lM(e){const t=wt();return se.useMemo(()=>Object.prototype.hasOwnProperty.call(Xw,e)?Xw[e]:(t.getState().onError?.("009",un.error009(e)),null),[e])}const uM=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const f=lM(t);return f?H.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0",children:H.jsx(f,{color:n,strokeWidth:l})}):null},cM=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,s)=>([s.markerStart,s.markerEnd].forEach(l=>{if(l&&typeof l=="object"){const c=_h(l,t);r.includes(c)||(o.push({id:c,color:l.color||e,...l}),r.push(c))}}),o),[]).sort((o,s)=>o.id.localeCompare(s.id))},Qw=({defaultColor:e,rfId:t})=>{const n=st(se.useCallback(cM({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((s,l)=>s.id!==o[l].id)));return H.jsx("defs",{children:n.map(r=>H.jsx(uM,{id:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient},r.id))})};Qw.displayName="MarkerDefinitions";var fM=se.memo(Qw);const dM=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),Jw=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:s,onEdgeUpdate:l,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:d,onEdgeMouseLeave:a,onEdgeClick:u,edgeUpdaterRadius:h,onEdgeDoubleClick:p,onEdgeUpdateStart:O,onEdgeUpdateEnd:m,children:_})=>{const{edgesFocusable:g,edgesUpdatable:w,elementsSelectable:E,width:y,height:x,connectionMode:C,nodeInternals:N,onError:I}=st(dM,_t),j=iM(t,N,n);return y?H.jsxs(H.Fragment,{children:[j.map(({level:M,edges:A,isMaxLevel:q})=>H.jsxs("svg",{style:{zIndex:M},width:y,height:x,className:"react-flow__edges react-flow__container",children:[q&&H.jsx(fM,{defaultColor:e,rfId:r}),H.jsx("g",{children:A.map(L=>{const[k,F,V]=Zw(N.get(L.source)),[ne,ue,K]=Zw(N.get(L.target));if(!V||!K)return null;let W=L.type||"default";o[W]||(I?.("011",un.error011(W)),W="default");const B=o[W]||o.default,Q=C===nr.Strict?ue.target:(ue.target??[]).concat(ue.source??[]),re=Yw(F.source,L.sourceHandle),Z=Yw(Q,L.targetHandle),X=re?.position||Ce.Bottom,$=Z?.position||Ce.Top,ee=!!(L.focusable||g&&typeof L.focusable>"u"),le=typeof l<"u"&&(L.updatable||w&&typeof L.updatable>"u");if(!re||!Z)return I?.("008",un.error008(re,L)),null;const{sourceX:de,sourceY:pe,targetX:Ee,targetY:Ie}=tM(k,re,X,ne,Z,$);return H.jsx(B,{id:L.id,className:Tt([L.className,s]),type:W,data:L.data,selected:!!L.selected,animated:!!L.animated,hidden:!!L.hidden,label:L.label,labelStyle:L.labelStyle,labelShowBg:L.labelShowBg,labelBgStyle:L.labelBgStyle,labelBgPadding:L.labelBgPadding,labelBgBorderRadius:L.labelBgBorderRadius,style:L.style,source:L.source,target:L.target,sourceHandleId:L.sourceHandle,targetHandleId:L.targetHandle,markerEnd:L.markerEnd,markerStart:L.markerStart,sourceX:de,sourceY:pe,targetX:Ee,targetY:Ie,sourcePosition:X,targetPosition:$,elementsSelectable:E,onEdgeUpdate:l,onContextMenu:c,onMouseEnter:f,onMouseMove:d,onMouseLeave:a,onClick:u,edgeUpdaterRadius:h,onEdgeDoubleClick:p,onEdgeUpdateStart:O,onEdgeUpdateEnd:m,rfId:r,ariaLabel:L.ariaLabel,isFocusable:ee,isUpdatable:le,pathOptions:"pathOptions"in L?L.pathOptions:void 0,interactionWidth:L.interactionWidth},L.id)})})]},M)),_]}):null};Jw.displayName="EdgeRenderer";var hM=se.memo(Jw);const pM=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function vM({children:e}){const t=st(pM);return H.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function gM(e){const t=ea(),n=se.useRef(!1);se.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const yM={[Ce.Left]:Ce.Right,[Ce.Right]:Ce.Left,[Ce.Top]:Ce.Bottom,[Ce.Bottom]:Ce.Top},eO=({nodeId:e,handleType:t,style:n,type:r=gn.Bezier,CustomComponent:o,connectionStatus:s})=>{const{fromNode:l,handleId:c,toX:f,toY:d,connectionMode:a}=st(se.useCallback(C=>({fromNode:C.nodeInternals.get(e),handleId:C.connectionHandleId,toX:(C.connectionPosition.x-C.transform[0])/C.transform[2],toY:(C.connectionPosition.y-C.transform[1])/C.transform[2],connectionMode:C.connectionMode}),[e]),_t),u=l?.[Ot]?.handleBounds;let h=u?.[t];if(a===nr.Loose&&(h=h||u?.[t==="source"?"target":"source"]),!l||!h)return null;const p=c?h.find(C=>C.id===c):h[0],O=p?p.x+p.width/2:(l.width??0)/2,m=p?p.y+p.height/2:l.height??0,_=(l.positionAbsolute?.x??0)+O,g=(l.positionAbsolute?.y??0)+m,w=p?.position,E=w?yM[w]:null;if(!w||!E)return null;if(o)return H.jsx(o,{connectionLineType:r,connectionLineStyle:n,fromNode:l,fromHandle:p,fromX:_,fromY:g,toX:f,toY:d,fromPosition:w,toPosition:E,connectionStatus:s});let y="";const x={sourceX:_,sourceY:g,sourcePosition:w,targetX:f,targetY:d,targetPosition:E};return r===gn.Bezier?[y]=sw(x):r===gn.Step?[y]=gh({...x,borderRadius:0}):r===gn.SmoothStep?[y]=gh(x):r===gn.SimpleBezier?[y]=rw(x):y=`M${_},${g} ${f},${d}`,H.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:n})};eO.displayName="ConnectionLine";const mM=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function bM({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:s,nodesConnectable:l,width:c,height:f,connectionStatus:d}=st(mM,_t);return!(o&&s&&c&&l)?null:H.jsx("svg",{style:e,width:c,height:f,className:"react-flow__edges react-flow__connectionline react-flow__container",children:H.jsx("g",{className:Tt(["react-flow__connection",d]),children:H.jsx(eO,{nodeId:o,handleType:s,style:t,type:n,CustomComponent:r,connectionStatus:d})})})}function tO(e,t){const n=se.useRef(null),r=wt();return se.useMemo(()=>{{const s=Object.keys(e);_t(n.current,s)&&r.getState().onError?.("002",un.error002()),n.current=s}return t(e)},[e])}const nO=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:s,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:f,onEdgeDoubleClick:d,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:O,onSelectionStart:m,onSelectionEnd:_,connectionLineType:g,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:C,selectionMode:N,multiSelectionKeyCode:I,panActivationKeyCode:j,zoomActivationKeyCode:M,deleteKeyCode:A,onlyRenderVisibleElements:q,elementsSelectable:L,selectNodesOnDrag:k,defaultViewport:F,translateExtent:V,minZoom:ne,maxZoom:ue,preventScrolling:K,defaultMarkerColor:W,zoomOnScroll:B,zoomOnPinch:Q,panOnScroll:re,panOnScrollSpeed:Z,panOnScrollMode:X,zoomOnDoubleClick:$,panOnDrag:ee,onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:pe,onPaneMouseLeave:Ee,onPaneScroll:Ie,onPaneContextMenu:Pe,onEdgeUpdate:Ae,onEdgeContextMenu:xe,onEdgeMouseEnter:Ge,onEdgeMouseMove:Oe,onEdgeMouseLeave:ge,edgeUpdaterRadius:me,onEdgeUpdateStart:ke,onEdgeUpdateEnd:Ne,noDragClassName:we,noWheelClassName:qe,noPanClassName:je,elevateEdgesOnSelect:ze,disableKeyboardA11y:lt,nodeOrigin:pt,nodeExtent:Ze,rfId:It})=>{const We=tO(e,KI),it=tO(t,eM);return gM(s),H.jsx(UI,{onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:pe,onPaneMouseLeave:Ee,onPaneContextMenu:Pe,onPaneScroll:Ie,deleteKeyCode:A,selectionKeyCode:x,selectionOnDrag:C,selectionMode:N,onSelectionStart:m,onSelectionEnd:_,multiSelectionKeyCode:I,panActivationKeyCode:j,zoomActivationKeyCode:M,elementsSelectable:L,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:B,zoomOnPinch:Q,zoomOnDoubleClick:$,panOnScroll:re,panOnScrollSpeed:Z,panOnScrollMode:X,panOnDrag:ee,defaultViewport:F,translateExtent:V,minZoom:ne,maxZoom:ue,onSelectionContextMenu:O,preventScrolling:K,noDragClassName:we,noWheelClassName:qe,noPanClassName:je,disableKeyboardA11y:lt,children:H.jsxs(vM,{children:[H.jsx(hM,{edgeTypes:it,onEdgeClick:c,onEdgeDoubleClick:d,onEdgeUpdate:Ae,onlyRenderVisibleElements:q,onEdgeContextMenu:xe,onEdgeMouseEnter:Ge,onEdgeMouseMove:Oe,onEdgeMouseLeave:ge,onEdgeUpdateStart:ke,onEdgeUpdateEnd:Ne,edgeUpdaterRadius:me,defaultMarkerColor:W,noPanClassName:je,elevateEdgesOnSelect:!!ze,disableKeyboardA11y:lt,rfId:It,children:H.jsx(bM,{style:w,type:g,component:E,containerStyle:y})}),H.jsx("div",{className:"react-flow__edgelabel-renderer"}),H.jsx(ZI,{nodeTypes:We,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:k,onlyRenderVisibleElements:q,noPanClassName:je,noDragClassName:we,disableKeyboardA11y:lt,nodeOrigin:pt,nodeExtent:Ze,rfId:It})]})})};nO.displayName="GraphView";var _M=se.memo(nO);const Ph=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Bn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ph,nodeExtent:Ph,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:nr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Q_,isValidConnection:void 0},wM=()=>u2((e,t)=>({...Bn,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:s}=t();e({nodeInternals:xh(n,r,o,s)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",s=typeof r<"u",l=o?xh(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:l,edges:s?r:[],hasDefaultNodes:o,hasDefaultEdges:s})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:s,fitViewOnInitDone:l,fitViewOnInitOptions:c,domNode:f,nodeOrigin:d}=t(),a=f?.querySelector(".react-flow__viewport");if(!a)return;const u=window.getComputedStyle(a),{m22:h}=new window.DOMMatrixReadOnly(u.transform),p=n.reduce((m,_)=>{const g=o.get(_.id);if(g){const w=fh(_.nodeElement);!!(w.width&&w.height&&(g.width!==w.width||g.height!==w.height||_.forceUpdate))&&(o.set(g.id,{...g,[Ot]:{...g[Ot],handleBounds:{source:zw(".source",_.nodeElement,h,d),target:zw(".target",_.nodeElement,h,d)}},...w}),m.push({id:g.id,type:"dimensions",dimensions:w}))}return m},[]);Aw(o,d);const O=l||s&&!l&&Pw(t,{initial:!0,...c});e({nodeInternals:new Map(o),fitViewOnInitDone:O}),p?.length>0&&r?.(p)},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:s}=t(),l=n.map(c=>{const f={id:c.id,type:"position",dragging:o};return r&&(f.positionAbsolute=c.positionAbsolute,f.position=c.position),f});s(l)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:s,nodeOrigin:l,getNodes:c,elevateNodesOnSelect:f}=t();if(n?.length){if(s){const d=Rw(n,c()),a=xh(d,o,l,f);e({nodeInternals:a})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let l,c=null;r?l=n.map(f=>Fn(f,!0)):(l=Ar(s(),n),c=Ar(o,[])),Ji({changedNodes:l,changedEdges:c,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let l,c=null;r?l=n.map(f=>Fn(f,!0)):(l=Ar(o,n),c=Ar(s(),[])),Ji({changedNodes:c,changedEdges:l,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:s}=t(),l=n||s(),c=r||o,f=l.map(a=>(a.selected=!1,Fn(a.id,!1))),d=c.map(a=>Fn(a.id,!1));Ji({changedNodes:f,changedEdges:d,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),s=r().filter(c=>c.selected).map(c=>Fn(c.id,!1)),l=n.filter(c=>c.selected).map(c=>Fn(c.id,!1));Ji({changedNodes:s,changedEdges:l,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=dh(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:s,d3Zoom:l,d3Selection:c,translateExtent:f}=t();if(!l||!c||!n.x&&!n.y)return!1;const d=Cn.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),a=[[0,0],[o,s]],u=l?.constrain()(d,a,f);return l.transform(c,u),r[0]!==u.x||r[1]!==u.y||r[2]!==u.k},cancelConnection:()=>e({connectionNodeId:Bn.connectionNodeId,connectionHandleId:Bn.connectionHandleId,connectionHandleType:Bn.connectionHandleType,connectionStatus:Bn.connectionStatus,connectionStartHandle:Bn.connectionStartHandle,connectionEndHandle:Bn.connectionEndHandle}),reset:()=>e({...Bn})}),Object.is),rO=({children:e})=>{const t=se.useRef(null);return t.current||(t.current=wM()),H.jsx(zP,{value:t.current,children:e})};rO.displayName="ReactFlowProvider";const oO=({children:e})=>se.useContext(Ui)?H.jsx(H.Fragment,{children:e}):H.jsx(rO,{children:e});oO.displayName="ReactFlowWrapper";const OM={input:_w,default:Eh,output:Ow,group:Sh},EM={default:Zi,straight:mh,step:yh,smoothstep:Wi,simplebezier:vh},SM=[0,0],xM=[15,15],kM={x:0,y:0,zoom:1},NM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Ih=se.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:s=OM,edgeTypes:l=EM,onNodeClick:c,onEdgeClick:f,onInit:d,onMove:a,onMoveStart:u,onMoveEnd:h,onConnect:p,onConnectStart:O,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:g,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:C,onNodeDragStart:N,onNodeDrag:I,onNodeDragStop:j,onNodesDelete:M,onEdgesDelete:A,onSelectionChange:q,onSelectionDragStart:L,onSelectionDrag:k,onSelectionDragStop:F,onSelectionContextMenu:V,onSelectionStart:ne,onSelectionEnd:ue,connectionMode:K=nr.Strict,connectionLineType:W=gn.Bezier,connectionLineStyle:B,connectionLineComponent:Q,connectionLineContainerStyle:re,deleteKeyCode:Z="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:$=!1,selectionMode:ee=ko.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:de=Gi()?"Meta":"Control",zoomActivationKeyCode:pe=Gi()?"Meta":"Control",snapToGrid:Ee=!1,snapGrid:Ie=xM,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ae=!0,nodesDraggable:xe,nodesConnectable:Ge,nodesFocusable:Oe,nodeOrigin:ge=SM,edgesFocusable:me,edgesUpdatable:ke,elementsSelectable:Ne,defaultViewport:we=kM,minZoom:qe=.5,maxZoom:je=2,translateExtent:ze=Ph,preventScrolling:lt=!0,nodeExtent:pt,defaultMarkerColor:Ze="#b1b1b7",zoomOnScroll:It=!0,zoomOnPinch:We=!0,panOnScroll:it=!1,panOnScrollSpeed:Et=.5,panOnScrollMode:kt=rr.Free,zoomOnDoubleClick:Nt=!0,panOnDrag:Ft=!0,onPaneClick:yn,onPaneMouseEnter:Lo,onPaneMouseMove:Ro,onPaneMouseLeave:mn,onPaneScroll:Do,onPaneContextMenu:Mr,children:In,onEdgeUpdate:da,onEdgeContextMenu:ha,onEdgeDoubleClick:jo,onEdgeMouseEnter:pa,onEdgeMouseMove:Wh,onEdgeMouseLeave:Fo,onEdgeUpdateStart:Yh,onEdgeUpdateEnd:Bo,edgeUpdaterRadius:va=10,onNodesChange:qr,onEdgesChange:Zh,noDragClassName:Xh="nodrag",noWheelClassName:Lr="nowheel",noPanClassName:ga="nopan",fitView:Rr=!1,fitViewOptions:Qh,connectOnClick:Dr=!0,attributionPosition:Jh,proOptions:jr,defaultEdgeOptions:ep,elevateNodesOnSelect:Fr=!0,elevateEdgesOnSelect:tp=!1,disableKeyboardA11y:lr=!1,autoPanOnConnect:Br=!0,autoPanOnNodeDrag:$n=!0,connectionRadius:np=20,isValidConnection:ya,onError:ur,style:ma,id:Vn,...zo},rp)=>{const cr=Vn||"1";return H.jsx("div",{...zo,style:{...ma,...NM},ref:rp,className:Tt(["react-flow",o]),"data-testid":"rf__wrapper",id:Vn,children:H.jsxs(oO,{children:[H.jsx(_M,{onInit:d,onMove:a,onMoveStart:u,onMoveEnd:h,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:C,nodeTypes:s,edgeTypes:l,connectionLineType:W,connectionLineStyle:B,connectionLineComponent:Q,connectionLineContainerStyle:re,selectionKeyCode:X,selectionOnDrag:$,selectionMode:ee,deleteKeyCode:Z,multiSelectionKeyCode:de,panActivationKeyCode:le,zoomActivationKeyCode:pe,onlyRenderVisibleElements:Pe,selectNodesOnDrag:Ae,defaultViewport:we,translateExtent:ze,minZoom:qe,maxZoom:je,preventScrolling:lt,zoomOnScroll:It,zoomOnPinch:We,zoomOnDoubleClick:Nt,panOnScroll:it,panOnScrollSpeed:Et,panOnScrollMode:kt,panOnDrag:Ft,onPaneClick:yn,onPaneMouseEnter:Lo,onPaneMouseMove:Ro,onPaneMouseLeave:mn,onPaneScroll:Do,onPaneContextMenu:Mr,onSelectionContextMenu:V,onSelectionStart:ne,onSelectionEnd:ue,onEdgeUpdate:da,onEdgeContextMenu:ha,onEdgeDoubleClick:jo,onEdgeMouseEnter:pa,onEdgeMouseMove:Wh,onEdgeMouseLeave:Fo,onEdgeUpdateStart:Yh,onEdgeUpdateEnd:Bo,edgeUpdaterRadius:va,defaultMarkerColor:Ze,noDragClassName:Xh,noWheelClassName:Lr,noPanClassName:ga,elevateEdgesOnSelect:tp,rfId:cr,disableKeyboardA11y:lr,nodeOrigin:ge,nodeExtent:pt}),H.jsx(yI,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:O,onConnectEnd:m,onClickConnectStart:_,onClickConnectEnd:g,nodesDraggable:xe,nodesConnectable:Ge,nodesFocusable:Oe,edgesFocusable:me,edgesUpdatable:ke,elementsSelectable:Ne,elevateNodesOnSelect:Fr,minZoom:qe,maxZoom:je,nodeExtent:pt,onNodesChange:qr,onEdgesChange:Zh,snapToGrid:Ee,snapGrid:Ie,connectionMode:K,translateExtent:ze,connectOnClick:Dr,defaultEdgeOptions:ep,fitView:Rr,fitViewOptions:Qh,onNodesDelete:M,onEdgesDelete:A,onNodeDragStart:N,onNodeDrag:I,onNodeDragStop:j,onSelectionDrag:k,onSelectionDragStart:L,onSelectionDragStop:F,noPanClassName:ga,nodeOrigin:ge,rfId:cr,autoPanOnConnect:Br,autoPanOnNodeDrag:$n,onError:ur,connectionRadius:np,isValidConnection:ya}),H.jsx(vI,{onSelectionChange:q}),In,H.jsx($P,{proOptions:jr,position:Jh}),H.jsx(OI,{rfId:cr,disableKeyboardA11y:lr})]})})});Ih.displayName="ReactFlow";function iO(e){return t=>{const[n,r]=se.useState(t),o=se.useCallback(s=>r(l=>e(s,l)),[]);return[n,r,o]}}const TM=iO(Rw),CM=iO(RI),aO=({id:e,x:t,y:n,width:r,height:o,style:s,color:l,strokeColor:c,strokeWidth:f,className:d,borderRadius:a,shapeRendering:u,onClick:h,selected:p})=>{const{background:O,backgroundColor:m}=s||{},_=l||O||m;return H.jsx("rect",{className:Tt(["react-flow__minimap-node",{selected:p},d]),x:t,y:n,rx:a,ry:a,width:r,height:o,fill:_,stroke:c,strokeWidth:f,shapeRendering:u,onClick:h?g=>h(g,e):void 0})};aO.displayName="MiniMapNode";var AM=se.memo(aO);const PM=e=>e.nodeOrigin,IM=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),Mh=e=>e instanceof Function?e:()=>e;function MM({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:s=AM,onClick:l}){const c=st(IM,_t),f=st(PM),d=Mh(t),a=Mh(e),u=Mh(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return H.jsx(H.Fragment,{children:c.map(p=>{const{x:O,y:m}=or(p,f).positionAbsolute;return H.jsx(s,{x:O,y:m,width:p.width,height:p.height,style:p.style,selected:p.selected,className:u(p),color:d(p),borderRadius:r,strokeColor:a(p),strokeWidth:o,shapeRendering:h,onClick:l,id:p.id},p.id)})})}var qM=se.memo(MM);const LM=200,RM=150,DM=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?GP(Xi(t,e.nodeOrigin),n):n,rfId:e.rfId}},jM="react-flow__minimap-desc";function sO({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:l=2,nodeComponent:c,maskColor:f="rgb(240, 240, 240, 0.6)",maskStrokeColor:d="none",maskStrokeWidth:a=1,position:u="bottom-right",onClick:h,onNodeClick:p,pannable:O=!1,zoomable:m=!1,ariaLabel:_="React Flow mini map",inversePan:g=!1,zoomStep:w=10,offsetScale:E=5}){const y=wt(),x=se.useRef(null),{boundingRect:C,viewBB:N,rfId:I}=st(DM,_t),j=e?.width??LM,M=e?.height??RM,A=C.width/j,q=C.height/M,L=Math.max(A,q),k=L*j,F=L*M,V=E*L,ne=C.x-(k-C.width)/2-V,ue=C.y-(F-C.height)/2-V,K=k+V*2,W=F+V*2,B=`${jM}-${I}`,Q=se.useRef(0);Q.current=L,se.useEffect(()=>{if(x.current){const X=Zt(x.current),$=de=>{const{transform:pe,d3Selection:Ee,d3Zoom:Ie}=y.getState();if(de.sourceEvent.type!=="wheel"||!Ee||!Ie)return;const Pe=-de.sourceEvent.deltaY*(de.sourceEvent.deltaMode===1?.05:de.sourceEvent.deltaMode?1:.002)*w,Ae=pe[2]*Math.pow(2,Pe);Ie.scaleTo(Ee,Ae)},ee=de=>{const{transform:pe,d3Selection:Ee,d3Zoom:Ie,translateExtent:Pe,width:Ae,height:xe}=y.getState();if(de.sourceEvent.type!=="mousemove"||!Ee||!Ie)return;const Ge=Q.current*Math.max(1,pe[2])*(g?-1:1),Oe={x:pe[0]-de.sourceEvent.movementX*Ge,y:pe[1]-de.sourceEvent.movementY*Ge},ge=[[0,0],[Ae,xe]],me=Cn.translate(Oe.x,Oe.y).scale(pe[2]),ke=Ie.constrain()(me,ge,Pe);Ie.transform(Ee,ke)},le=$_().on("zoom",O?ee:null).on("zoom.wheel",m?$:null);return X.call(le),()=>{X.on("zoom",null)}}},[O,m,g,w]);const re=h?X=>{const $=an(X);h(X,{x:$[0],y:$[1]})}:void 0,Z=p?(X,$)=>{const ee=y.getState().nodeInternals.get($);p(X,ee)}:void 0;return H.jsx(ch,{position:u,style:e,className:Tt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:H.jsxs("svg",{width:j,height:M,viewBox:`${ne} ${ue} ${K} ${W}`,role:"img","aria-labelledby":B,ref:x,onClick:re,children:[_&&H.jsx("title",{id:B,children:_}),H.jsx(qM,{onClick:Z,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:l,nodeComponent:c}),H.jsx("path",{className:"react-flow__minimap-mask",d:`M${ne-V},${ue-V}h${K+V*2}v${W+V*2}h${-K-V*2}z
18
- M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fill:f,fillRule:"evenodd",stroke:d,strokeWidth:a,pointerEvents:"none"})]})})}sO.displayName="MiniMap";var lO=se.memo(sO);function FM(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:H.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function BM(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:H.jsx("path",{d:"M0 0h32v4.2H0z"})})}function zM(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:H.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function HM(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:H.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function $M(){return H.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:H.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}const Ao=({children:e,className:t,...n})=>H.jsx("button",{type:"button",className:Tt(["react-flow__controls-button",t]),...n,children:e});Ao.displayName="ControlButton";const VM=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),uO=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:l,onFitView:c,onInteractiveChange:f,className:d,children:a,position:u="bottom-left"})=>{const h=wt(),[p,O]=se.useState(!1),{isInteractive:m,minZoomReached:_,maxZoomReached:g}=st(VM,_t),{zoomIn:w,zoomOut:E,fitView:y}=ea();if(se.useEffect(()=>{O(!0)},[]),!p)return null;const x=()=>{w(),s?.()},C=()=>{E(),l?.()},N=()=>{y(o),c?.()},I=()=>{h.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),f?.(!m)};return H.jsxs(ch,{className:Tt(["react-flow__controls",d]),position:u,style:e,"data-testid":"rf__controls",children:[t&&H.jsxs(H.Fragment,{children:[H.jsx(Ao,{onClick:x,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:g,children:H.jsx(FM,{})}),H.jsx(Ao,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:_,children:H.jsx(BM,{})})]}),n&&H.jsx(Ao,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view",children:H.jsx(zM,{})}),r&&H.jsx(Ao,{className:"react-flow__controls-interactive",onClick:I,title:"toggle interactivity","aria-label":"toggle interactivity",children:m?H.jsx($M,{}):H.jsx(HM,{})}),a]})};uO.displayName="Controls";var cO=se.memo(uO),cn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(cn||(cn={}));function UM({color:e,dimensions:t,lineWidth:n}){return H.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function GM({color:e,radius:t}){return H.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const KM={[cn.Dots]:"#91919a",[cn.Lines]:"#eee",[cn.Cross]:"#e2e2e2"},WM={[cn.Dots]:1,[cn.Lines]:1,[cn.Cross]:6},YM=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function fO({id:e,variant:t=cn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:l,style:c,className:f}){const d=se.useRef(null),{transform:a,patternId:u}=st(YM,_t),h=l||KM[t],p=r||WM[t],O=t===cn.Dots,m=t===cn.Cross,_=Array.isArray(n)?n:[n,n],g=[_[0]*a[2]||1,_[1]*a[2]||1],w=p*a[2],E=m?[w,w]:g,y=O?[w/s,w/s]:[E[0]/s,E[1]/s];return H.jsxs("svg",{className:Tt(["react-flow__background",f]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background",children:[H.jsx("pattern",{id:u+e,x:a[0]%g[0],y:a[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${y[0]},-${y[1]})`,children:O?H.jsx(GM,{color:h,radius:w/s}):H.jsx(UM,{dimensions:E,color:h,lineWidth:o})}),H.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${u+e})`})]})}fO.displayName="Background";var dO=se.memo(fO);function hO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hO(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function zn(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hO(e))&&(r&&(r+=" "),r+=t);return r}const Po=e=>typeof e=="number"&&!isNaN(e),ar=e=>typeof e=="string",jt=e=>typeof e=="function",na=e=>ar(e)||jt(e)?e:null,qh=e=>se.isValidElement(e)||ar(e)||jt(e)||Po(e);function ZM(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function ra(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(l){let{children:c,position:f,preventExitTransition:d,done:a,nodeRef:u,isIn:h}=l;const p=r?`${t}--${f}`:t,O=r?`${n}--${f}`:n,m=se.useRef(0);return se.useLayoutEffect(()=>{const _=u.current,g=p.split(" "),w=E=>{E.target===u.current&&(_.dispatchEvent(new Event("d")),_.removeEventListener("animationend",w),_.removeEventListener("animationcancel",w),m.current===0&&E.type!=="animationcancel"&&_.classList.remove(...g))};_.classList.add(...g),_.addEventListener("animationend",w),_.addEventListener("animationcancel",w)},[]),se.useEffect(()=>{const _=u.current,g=()=>{_.removeEventListener("animationend",g),o?ZM(_,a,s):a()};h||(d?g():(m.current=1,_.className+=` ${O}`,_.addEventListener("animationend",g)))},[h]),nt.default.createElement(nt.default.Fragment,null,c)}}function pO(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Qt={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},oa=e=>{let{theme:t,type:n,...r}=e;return nt.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},Lh={info:function(e){return nt.default.createElement(oa,{...e},nt.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return nt.default.createElement(oa,{...e},nt.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return nt.default.createElement(oa,{...e},nt.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return nt.default.createElement(oa,{...e},nt.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return nt.default.createElement("div",{className:"Toastify__spinner"})}};function XM(e){const[,t]=se.useReducer(p=>p+1,0),[n,r]=se.useState([]),o=se.useRef(null),s=se.useRef(new Map).current,l=p=>n.indexOf(p)!==-1,c=se.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:p=>s.get(p)}).current;function f(p){let{containerId:O}=p;const{limit:m}=c.props;!m||O&&c.containerId!==O||(c.count-=c.queue.length,c.queue=[])}function d(p){r(O=>p==null?[]:O.filter(m=>m!==p))}function a(){const{toastContent:p,toastProps:O,staleId:m}=c.queue.shift();h(p,O,m)}function u(p,O){let{delay:m,staleId:_,...g}=O;if(!qh(p)||(function(q){return!o.current||c.props.enableMultiContainer&&q.containerId!==c.props.containerId||s.has(q.toastId)&&q.updateId==null})(g))return;const{toastId:w,updateId:E,data:y}=g,{props:x}=c,C=()=>d(w),N=E==null;N&&c.count++;const I={...x,style:x.toastStyle,key:c.toastKey++,...Object.fromEntries(Object.entries(g).filter(q=>{let[L,k]=q;return k!=null})),toastId:w,updateId:E,data:y,closeToast:C,isIn:!1,className:na(g.className||x.toastClassName),bodyClassName:na(g.bodyClassName||x.bodyClassName),progressClassName:na(g.progressClassName||x.progressClassName),autoClose:!g.isLoading&&(j=g.autoClose,M=x.autoClose,j===!1||Po(j)&&j>0?j:M),deleteToast(){const q=pO(s.get(w),"removed");s.delete(w),Qt.emit(4,q);const L=c.queue.length;if(c.count=w==null?c.count-c.displayedToast:c.count-1,c.count<0&&(c.count=0),L>0){const k=w==null?c.props.limit:1;if(L===1||k===1)c.displayedToast++,a();else{const F=k>L?L:k;c.displayedToast=F;for(let V=0;V<F;V++)a()}}else t()}};var j,M;I.iconOut=(function(q){let{theme:L,type:k,isLoading:F,icon:V}=q,ne=null;const ue={theme:L,type:k};return V===!1||(jt(V)?ne=V(ue):se.isValidElement(V)?ne=se.cloneElement(V,ue):ar(V)||Po(V)?ne=V:F?ne=Lh.spinner():(K=>K in Lh)(k)&&(ne=Lh[k](ue))),ne})(I),jt(g.onOpen)&&(I.onOpen=g.onOpen),jt(g.onClose)&&(I.onClose=g.onClose),I.closeButton=x.closeButton,g.closeButton===!1||qh(g.closeButton)?I.closeButton=g.closeButton:g.closeButton===!0&&(I.closeButton=!qh(x.closeButton)||x.closeButton);let A=p;se.isValidElement(p)&&!ar(p.type)?A=se.cloneElement(p,{closeToast:C,toastProps:I,data:y}):jt(p)&&(A=p({closeToast:C,toastProps:I,data:y})),x.limit&&x.limit>0&&c.count>x.limit&&N?c.queue.push({toastContent:A,toastProps:I,staleId:_}):Po(m)?setTimeout(()=>{h(A,I,_)},m):h(A,I,_)}function h(p,O,m){const{toastId:_}=O;m&&s.delete(m);const g={content:p,props:O};s.set(_,g),r(w=>[...w,_].filter(E=>E!==m)),Qt.emit(4,pO(g,g.props.updateId==null?"added":"updated"))}return se.useEffect(()=>(c.containerId=e.containerId,Qt.cancelEmit(3).on(0,u).on(1,p=>o.current&&d(p)).on(5,f).emit(2,c),()=>{s.clear(),Qt.emit(3,c)}),[]),se.useEffect(()=>{c.props=e,c.isToastActive=l,c.displayedToast=n.length}),{getToastToRender:function(p){const O=new Map,m=Array.from(s.values());return e.newestOnTop&&m.reverse(),m.forEach(_=>{const{position:g}=_.props;O.has(g)||O.set(g,[]),O.get(g).push(_)}),Array.from(O,_=>p(_[0],_[1]))},containerRef:o,isToastActive:l}}function vO(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function gO(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function QM(e){const[t,n]=se.useState(!1),[r,o]=se.useState(!1),s=se.useRef(null),l=se.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=se.useRef(e),{autoClose:f,pauseOnHover:d,closeToast:a,onClick:u,closeOnClick:h}=e;function p(y){if(e.draggable){y.nativeEvent.type==="touchstart"&&y.nativeEvent.preventDefault(),l.didMove=!1,document.addEventListener("mousemove",g),document.addEventListener("mouseup",w),document.addEventListener("touchmove",g),document.addEventListener("touchend",w);const x=s.current;l.canCloseOnClick=!0,l.canDrag=!0,l.boundingRect=x.getBoundingClientRect(),x.style.transition="",l.x=vO(y.nativeEvent),l.y=gO(y.nativeEvent),e.draggableDirection==="x"?(l.start=l.x,l.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(l.start=l.y,l.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function O(y){if(l.boundingRect){const{top:x,bottom:C,left:N,right:I}=l.boundingRect;y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&l.x>=N&&l.x<=I&&l.y>=x&&l.y<=C?_():m()}}function m(){n(!0)}function _(){n(!1)}function g(y){const x=s.current;l.canDrag&&x&&(l.didMove=!0,t&&_(),l.x=vO(y),l.y=gO(y),l.delta=e.draggableDirection==="x"?l.x-l.start:l.y-l.start,l.start!==l.x&&(l.canCloseOnClick=!1),x.style.transform=`translate${e.draggableDirection}(${l.delta}px)`,x.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function w(){document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",w);const y=s.current;if(l.canDrag&&l.didMove&&y){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return o(!0),void e.closeToast();y.style.transition="transform 0.2s, opacity 0.2s",y.style.transform=`translate${e.draggableDirection}(0)`,y.style.opacity="1"}}se.useEffect(()=>{c.current=e}),se.useEffect(()=>(s.current&&s.current.addEventListener("d",m,{once:!0}),jt(e.onOpen)&&e.onOpen(se.isValidElement(e.children)&&e.children.props),()=>{const y=c.current;jt(y.onClose)&&y.onClose(se.isValidElement(y.children)&&y.children.props)}),[]),se.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||_(),window.addEventListener("focus",m),window.addEventListener("blur",_)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",_))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:O,onTouchEnd:O};return f&&d&&(E.onMouseEnter=_,E.onMouseLeave=m),h&&(E.onClick=y=>{u&&u(y),l.canCloseOnClick&&a()}),{playToast:m,pauseToast:_,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:E}}function yO(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return nt.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},nt.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},nt.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function JM(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:l,style:c,controlledProgress:f,progress:d,rtl:a,isIn:u,theme:h}=e;const p=s||f&&d===0,O={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:p?0:1};f&&(O.transform=`scaleX(${d})`);const m=zn("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":a}),_=jt(l)?l({rtl:a,type:o,defaultClassName:m}):zn(m,l);return nt.default.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:_,style:O,[f&&d>=1?"onTransitionEnd":"onAnimationEnd"]:f&&d<1?null:()=>{u&&r()}})}const eq=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=QM(e),{closeButton:s,children:l,autoClose:c,onClick:f,type:d,hideProgressBar:a,closeToast:u,transition:h,position:p,className:O,style:m,bodyClassName:_,bodyStyle:g,progressClassName:w,progressStyle:E,updateId:y,role:x,progress:C,rtl:N,toastId:I,deleteToast:j,isIn:M,isLoading:A,iconOut:q,closeOnClick:L,theme:k}=e,F=zn("Toastify__toast",`Toastify__toast-theme--${k}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":L}),V=jt(O)?O({rtl:N,position:p,type:d,defaultClassName:F}):zn(F,O),ne=!!C||!c,ue={closeToast:u,type:d,theme:k};let K=null;return s===!1||(K=jt(s)?s(ue):se.isValidElement(s)?se.cloneElement(s,ue):yO(ue)),nt.default.createElement(h,{isIn:M,done:j,position:p,preventExitTransition:n,nodeRef:r},nt.default.createElement("div",{id:I,onClick:f,className:V,...o,style:m,ref:r},nt.default.createElement("div",{...M&&{role:x},className:jt(_)?_({type:d}):zn("Toastify__toast-body",_),style:g},q!=null&&nt.default.createElement("div",{className:zn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},q),nt.default.createElement("div",null,l)),K,nt.default.createElement(JM,{...y&&!ne?{key:`pb-${y}`}:{},rtl:N,theme:k,delay:c,isRunning:t,isIn:M,closeToast:u,hide:a,type:d,style:E,className:w,controlledProgress:ne,progress:C||0})))},ia=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},tq=ra(ia("bounce",!0));ra(ia("slide",!0)),ra(ia("zoom")),ra(ia("flip"));const Rh=se.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=XM(e),{className:s,style:l,rtl:c,containerId:f}=e;function d(a){const u=zn("Toastify__toast-container",`Toastify__toast-container--${a}`,{"Toastify__toast-container--rtl":c});return jt(s)?s({position:a,rtl:c,defaultClassName:u}):zn(u,na(s))}return se.useEffect(()=>{t&&(t.current=r.current)},[]),nt.default.createElement("div",{ref:r,className:"Toastify",id:f},n((a,u)=>{const h=u.length?{...l}:{...l,pointerEvents:"none"};return nt.default.createElement("div",{className:d(a),style:h,key:`container-${a}`},u.map((p,O)=>{let{content:m,props:_}=p;return nt.default.createElement(eq,{..._,isIn:o(_.toastId),style:{..._.style,"--nth":O+1,"--len":u.length},key:`toast-${_.key}`},m)}))}))});Rh.displayName="ToastContainer",Rh.defaultProps={position:"top-right",transition:tq,autoClose:5e3,closeButton:yO,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Dh,sr=new Map,Io=[],nq=1;function mO(){return""+nq++}function rq(e){return e&&(ar(e.toastId)||Po(e.toastId))?e.toastId:mO()}function Mo(e,t){return sr.size>0?Qt.emit(0,e,t):Io.push({content:e,options:t}),t.toastId}function aa(e,t){return{...t,type:t&&t.type||e,toastId:rq(t)}}function sa(e){return(t,n)=>Mo(t,aa(e,n))}function Ke(e,t){return Mo(e,aa("default",t))}Ke.loading=(e,t)=>Mo(e,aa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ke.promise=function(e,t,n){let r,{pending:o,error:s,success:l}=t;o&&(r=ar(o)?Ke.loading(o,n):Ke.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},f=(a,u,h)=>{if(u==null)return void Ke.dismiss(r);const p={type:a,...c,...n,data:h},O=ar(u)?{render:u}:u;return r?Ke.update(r,{...p,...O}):Ke(O.render,{...p,...O}),h},d=jt(e)?e():e;return d.then(a=>f("success",l,a)).catch(a=>f("error",s,a)),d},Ke.success=sa("success"),Ke.info=sa("info"),Ke.error=sa("error"),Ke.warning=sa("warning"),Ke.warn=Ke.warning,Ke.dark=(e,t)=>Mo(e,aa("default",{theme:"dark",...t})),Ke.dismiss=e=>{sr.size>0?Qt.emit(1,e):Io=Io.filter(t=>e!=null&&t.options.toastId!==e)},Ke.clearWaitingQueue=function(e){return e===void 0&&(e={}),Qt.emit(5,e)},Ke.isActive=e=>{let t=!1;return sr.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},Ke.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=(function(r,o){let{containerId:s}=o;const l=sr.get(s||Dh);return l&&l.getToast(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:mO()};s.toastId!==e&&(s.staleId=e);const l=s.render||o;delete s.render,Mo(l,s)}},0)},Ke.done=e=>{Ke.update(e,{progress:1})},Ke.onChange=e=>(Qt.on(4,e),()=>{Qt.off(4,e)}),Ke.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Ke.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Qt.on(2,e=>{Dh=e.containerId||e,sr.set(Dh,e),Io.forEach(t=>{Qt.emit(0,t.content,t.options)}),Io=[]}).on(3,e=>{sr.delete(e.containerId||e),sr.size===0&&Qt.off(0).off(1).off(5)});const bO=se.createContext({certificate:{},node:{},setNode:()=>{},type:"readNode",replica:{},nodesState:[],edgesState:[],nodeLayers:{previous:{nodes:[],edges:[]},current:{nodes:[],edges:[]}},setNodeLayers:()=>{}}),_O=e=>{const[t,n]=se.useState({}),[r,o]=se.useState({previous:{nodes:[],edges:[]},current:{nodes:[],edges:[]}}),s=TM([]),l=CM([]),c=se.useMemo(()=>({node:t,setNode:n,type:e.type,certificate:e.certificate,replica:e.replica,nodeLayers:r,setNodeLayers:o,nodesState:s,edgesState:l}),[t,n,e.type,e.certificate,e.replica,r,o,s,l]);return H.jsx(bO.Provider,{value:c,children:e.children})},ot=()=>se.useContext(bO);var jh={exports:{}};/*! For license information please see main.js.LICENSE.txt */var wO;function oq(){return wO||(wO=1,(function(e,t){(function(n,r){e.exports=r(nt.default,vv.default)})(self,((n,r)=>(()=>{var o={184:(f,d)=>{var a;(function(){var u={}.hasOwnProperty;function h(){for(var p=[],O=0;O<arguments.length;O++){var m=arguments[O];if(m){var _=typeof m;if(_==="string"||_==="number")p.push(m);else if(Array.isArray(m)){if(m.length){var g=h.apply(null,m);g&&p.push(g)}}else if(_==="object"){if(m.toString!==Object.prototype.toString&&!m.toString.toString().includes("[native code]")){p.push(m.toString());continue}for(var w in m)u.call(m,w)&&m[w]&&p.push(w)}}}return p.join(" ")}f.exports?(h.default=h,f.exports=h):(a=(function(){return h}).apply(d,[]))===void 0||(f.exports=a)})()},953:(f,d,a)=>{a.d(d,{Z:()=>m});var u=a(81),h=a.n(u),p=a(645),O=a.n(p)()(h());O.push([f.id,".button-component{font-weight:500;letter-spacing:.2px}.button-component.btn{border-radius:2px;white-space:nowrap}.button-component.btn-sm{font-weight:600}.button-component.btn-primary,.button-component.btn-primary:active,.button-component.btn-primary:not(:disabled):not(.disabled):active{background:#003057;border:1px solid #001424;transition:none}.button-component.btn-primary:hover{background:#004c8a}.button-component.btn-primary:disabled{background:#557e9e;border:1px solid #517490;color:#ccc}.button-component.btn-secondary,.button-component.btn-secondary:active,.button-component.btn-secondary:not(:disabled):not(.disabled):active{background:#fff;border:1px solid #ccc;transition:none;color:#000}.button-component.btn-secondary:hover{background:#eee;border:1px solid #ccc;color:#000}.button-component.btn-secondary:disabled{background:#eee;border:1px solid #ccc;color:#666}.button-component a,.button-component a:hover,.button-component a:focus{color:inherit;text-decoration:inherit}.button-component i{margin-right:.4rem}.button-component i.no-text{margin-right:0}.button-component>button{font-weight:500;letter-spacing:.2px}.button-component>button.btn{border-radius:2px;white-space:nowrap}.button-component>button.btn-sm{font-weight:600}.button-component>button.btn-primary,.button-component>button.btn-primary:active,.button-component>button.btn-primary:not(:disabled):not(.disabled):active{background:#003057;border:1px solid #001424;transition:none}.button-component>button.btn-primary:hover{background:#004c8a}.button-component>button.btn-primary:disabled{background:#557e9e;border:1px solid #517490;color:#ccc}.button-component>button.btn-secondary,.button-component>button.btn-secondary:active,.button-component>button.btn-secondary:not(:disabled):not(.disabled):active{background:#fff;border:1px solid #ccc;transition:none;color:#000}.button-component>button.btn-secondary:hover{background:#eee;border:1px solid #ccc;color:#000}.button-component>button.btn-secondary:disabled{background:#eee;border:1px solid #ccc;color:#666}.button-component>button a,.button-component>button a:hover,.button-component>button a:focus{color:inherit;text-decoration:inherit}.button-component>button i{margin-right:.4rem}.button-component>button i.no-text{margin-right:0}",""]);const m=O},525:(f,d,a)=>{a.d(d,{Z:()=>m});var u=a(81),h=a.n(u),p=a(645),O=a.n(p)()(h());O.push([f.id,".keyval__wrapper{display:flex;font-size:13px;margin-bottom:.5rem}.keyval__label{color:#71899c}.keyval__list{list-style:none;padding:0;margin:0;flex-grow:1}.keyval__item{display:block}",""]);const m=O},318:(f,d,a)=>{a.d(d,{Z:()=>m});var u=a(81),h=a.n(u),p=a(645),O=a.n(p)()(h());O.push([f.id,".message-stripe-component{margin:1rem;padding:.75rem}.message-stripe-component.alert{color:inherit;border:none;border-radius:0;box-shadow:0 1px 2px rgba(0,0,0,.25)}.message-stripe__remove-button{background:none;border:none}.message-stripe__remove-button svg{-webkit-appearance:none}",""]);const m=O},970:(f,d,a)=>{a.d(d,{Z:()=>m});var u=a(81),h=a.n(u),p=a(645),O=a.n(p)()(h());O.push([f.id,".hise-select__wrapper .hise-select__control{border:1px solid #aaa;border-radius:0}.hise-select__wrapper.invalid .hise-select__control{border:1px solid #dc3545}",""]);const m=O},645:f=>{f.exports=function(d){var a=[];return a.toString=function(){return this.map((function(u){var h="",p=u[5]!==void 0;return u[4]&&(h+="@supports (".concat(u[4],") {")),u[2]&&(h+="@media ".concat(u[2]," {")),p&&(h+="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {")),h+=d(u),p&&(h+="}"),u[2]&&(h+="}"),u[4]&&(h+="}"),h})).join("")},a.i=function(u,h,p,O,m){typeof u=="string"&&(u=[[null,u,void 0]]);var _={};if(p)for(var g=0;g<this.length;g++){var w=this[g][0];w!=null&&(_[w]=!0)}for(var E=0;E<u.length;E++){var y=[].concat(u[E]);p&&_[y[0]]||(m!==void 0&&(y[5]===void 0||(y[1]="@layer".concat(y[5].length>0?" ".concat(y[5]):""," {").concat(y[1],"}")),y[5]=m),h&&(y[2]&&(y[1]="@media ".concat(y[2]," {").concat(y[1],"}")),y[2]=h),O&&(y[4]?(y[1]="@supports (".concat(y[4],") {").concat(y[1],"}"),y[4]=O):y[4]="".concat(O)),a.push(y))}},a}},81:f=>{f.exports=function(d){return d[1]}},679:(f,d,a)=>{var u=a(864),h={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},p={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};function _(N){return u.isMemo(N)?O:m[N.$$typeof]||h}m[u.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},m[u.Memo]=O;var g=Object.defineProperty,w=Object.getOwnPropertyNames,E=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,x=Object.getPrototypeOf,C=Object.prototype;f.exports=function N(I,j,M){if(typeof j!="string"){if(C){var A=x(j);A&&A!==C&&N(I,A,M)}var q=w(j);E&&(q=q.concat(E(j)));for(var L=_(I),k=_(j),F=0;F<q.length;++F){var V=q[F];if(!(p[V]||M&&M[V]||k&&k[V]||L&&L[V])){var ne=y(j,V);try{g(I,V,ne)}catch{}}}}return I}},703:(f,d,a)=>{var u=a(414);function h(){}function p(){}p.resetWarningCache=h,f.exports=function(){function O(g,w,E,y,x,C){if(C!==u){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}function m(){return O}O.isRequired=O;var _={array:O,bigint:O,bool:O,func:O,number:O,object:O,string:O,symbol:O,any:O,arrayOf:m,element:O,elementType:O,instanceOf:m,node:O,objectOf:m,oneOf:m,oneOfType:m,shape:m,exact:m,checkPropTypes:p,resetWarningCache:h};return _.PropTypes=_,_}},697:(f,d,a)=>{f.exports=a(703)()},414:f=>{f.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:(f,d)=>{var a=typeof Symbol=="function"&&Symbol.for,u=a?Symbol.for("react.element"):60103,h=a?Symbol.for("react.portal"):60106,p=a?Symbol.for("react.fragment"):60107,O=a?Symbol.for("react.strict_mode"):60108,m=a?Symbol.for("react.profiler"):60114,_=a?Symbol.for("react.provider"):60109,g=a?Symbol.for("react.context"):60110,w=a?Symbol.for("react.async_mode"):60111,E=a?Symbol.for("react.concurrent_mode"):60111,y=a?Symbol.for("react.forward_ref"):60112,x=a?Symbol.for("react.suspense"):60113,C=a?Symbol.for("react.suspense_list"):60120,N=a?Symbol.for("react.memo"):60115,I=a?Symbol.for("react.lazy"):60116,j=a?Symbol.for("react.block"):60121,M=a?Symbol.for("react.fundamental"):60117,A=a?Symbol.for("react.responder"):60118,q=a?Symbol.for("react.scope"):60119;function L(F){if(typeof F=="object"&&F!==null){var V=F.$$typeof;switch(V){case u:switch(F=F.type){case w:case E:case p:case m:case O:case x:return F;default:switch(F=F&&F.$$typeof){case g:case y:case I:case N:case _:return F;default:return V}}case h:return V}}}function k(F){return L(F)===E}d.AsyncMode=w,d.ConcurrentMode=E,d.ContextConsumer=g,d.ContextProvider=_,d.Element=u,d.ForwardRef=y,d.Fragment=p,d.Lazy=I,d.Memo=N,d.Portal=h,d.Profiler=m,d.StrictMode=O,d.Suspense=x,d.isAsyncMode=function(F){return k(F)||L(F)===w},d.isConcurrentMode=k,d.isContextConsumer=function(F){return L(F)===g},d.isContextProvider=function(F){return L(F)===_},d.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===u},d.isForwardRef=function(F){return L(F)===y},d.isFragment=function(F){return L(F)===p},d.isLazy=function(F){return L(F)===I},d.isMemo=function(F){return L(F)===N},d.isPortal=function(F){return L(F)===h},d.isProfiler=function(F){return L(F)===m},d.isStrictMode=function(F){return L(F)===O},d.isSuspense=function(F){return L(F)===x},d.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===p||F===E||F===m||F===O||F===x||F===C||typeof F=="object"&&F!==null&&(F.$$typeof===I||F.$$typeof===N||F.$$typeof===_||F.$$typeof===g||F.$$typeof===y||F.$$typeof===M||F.$$typeof===A||F.$$typeof===q||F.$$typeof===j)},d.typeOf=L},864:(f,d,a)=>{f.exports=a(921)},379:f=>{var d=[];function a(p){for(var O=-1,m=0;m<d.length;m++)if(d[m].identifier===p){O=m;break}return O}function u(p,O){for(var m={},_=[],g=0;g<p.length;g++){var w=p[g],E=O.base?w[0]+O.base:w[0],y=m[E]||0,x="".concat(E," ").concat(y);m[E]=y+1;var C=a(x),N={css:w[1],media:w[2],sourceMap:w[3],supports:w[4],layer:w[5]};if(C!==-1)d[C].references++,d[C].updater(N);else{var I=h(N,O);O.byIndex=g,d.splice(g,0,{identifier:x,updater:I,references:1})}_.push(x)}return _}function h(p,O){var m=O.domAPI(O);return m.update(p),function(_){if(_){if(_.css===p.css&&_.media===p.media&&_.sourceMap===p.sourceMap&&_.supports===p.supports&&_.layer===p.layer)return;m.update(p=_)}else m.remove()}}f.exports=function(p,O){var m=u(p=p||[],O=O||{});return function(_){_=_||[];for(var g=0;g<m.length;g++){var w=a(m[g]);d[w].references--}for(var E=u(_,O),y=0;y<m.length;y++){var x=a(m[y]);d[x].references===0&&(d[x].updater(),d.splice(x,1))}m=E}}},569:f=>{var d={};f.exports=function(a,u){var h=(function(p){if(d[p]===void 0){var O=document.querySelector(p);if(window.HTMLIFrameElement&&O instanceof window.HTMLIFrameElement)try{O=O.contentDocument.head}catch{O=null}d[p]=O}return d[p]})(a);if(!h)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");h.appendChild(u)}},216:f=>{f.exports=function(d){var a=document.createElement("style");return d.setAttributes(a,d.attributes),d.insert(a,d.options),a}},565:(f,d,a)=>{f.exports=function(u){var h=a.nc;h&&u.setAttribute("nonce",h)}},795:f=>{f.exports=function(d){if(typeof document>"u")return{update:function(){},remove:function(){}};var a=d.insertStyleElement(d);return{update:function(u){(function(h,p,O){var m="";O.supports&&(m+="@supports (".concat(O.supports,") {")),O.media&&(m+="@media ".concat(O.media," {"));var _=O.layer!==void 0;_&&(m+="@layer".concat(O.layer.length>0?" ".concat(O.layer):""," {")),m+=O.css,_&&(m+="}"),O.media&&(m+="}"),O.supports&&(m+="}");var g=O.sourceMap;g&&typeof btoa<"u"&&(m+=`
19
- /*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(g))))," */")),p.styleTagTransform(m,h,p.options)})(a,d,u)},remove:function(){(function(u){if(u.parentNode===null)return!1;u.parentNode.removeChild(u)})(a)}}}},589:f=>{f.exports=function(d,a){if(a.styleSheet)a.styleSheet.cssText=d;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(d))}}},583:f=>{f.exports=n},732:f=>{f.exports=r}},s={};function l(f){var d=s[f];if(d!==void 0)return d.exports;var a=s[f]={id:f,exports:{}};return o[f](a,a.exports,l),a.exports}l.n=f=>{var d=f&&f.__esModule?()=>f.default:()=>f;return l.d(d,{a:d}),d},l.d=(f,d)=>{for(var a in d)l.o(d,a)&&!l.o(f,a)&&Object.defineProperty(f,a,{enumerable:!0,get:d[a]})},l.o=(f,d)=>Object.prototype.hasOwnProperty.call(f,d),l.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},l.nc=void 0;var c={};return(()=>{l.r(c),l.d(c,{Button:()=>ur,ConfirmationModal:()=>$L,HISETabs:()=>rR,KeyValPair:()=>oR,MessageStripe:()=>Gr,ResourceEditor:()=>Nx});var f,d,a=l(583),u=l.n(a);function h(i){var v=i.pathname,b=v===void 0?"/":v,S=i.search,D=S===void 0?"":S,z=i.hash,G=z===void 0?"":z;return D&&D!=="?"&&(b+=D.charAt(0)==="?"?D:"?"+D),G&&G!=="#"&&(b+=G.charAt(0)==="#"?G:"#"+G),b}function p(i){var v={};if(i){var b=i.indexOf("#");b>=0&&(v.hash=i.substr(b),i=i.substr(0,b));var S=i.indexOf("?");S>=0&&(v.search=i.substr(S),i=i.substr(0,S)),i&&(v.pathname=i)}return v}function O(i,v){throw new Error(v)}(d=f||(f={})).Pop="POP",d.Push="PUSH",d.Replace="REPLACE";const m=(0,a.createContext)(null),_=(0,a.createContext)(null),g=(0,a.createContext)({outlet:null,matches:[]});function w(){return(0,a.useContext)(_)!=null}function E(){return w()||O(),(0,a.useContext)(_).location}function y(i){let{matches:v}=(0,a.useContext)(g),{pathname:b}=E(),S=JSON.stringify(v.map((D=>D.pathnameBase)));return(0,a.useMemo)((()=>x(i,JSON.parse(S),b)),[i,S,b])}function x(i,v,b){let S,D=typeof i=="string"?p(i):i,z=i===""||D.pathname===""?"/":D.pathname;if(z==null)S=b;else{let R=v.length-1;if(z.startsWith("..")){let P=z.split("/");for(;P[0]==="..";)P.shift(),R-=1;D.pathname=P.join("/")}S=R>=0?v[R]:"/"}let G=(function(R,P){P===void 0&&(P="/");let{pathname:T,search:te="",hash:oe=""}=typeof R=="string"?p(R):R;return{pathname:T?T.startsWith("/")?T:(function(J,Y){let ie=Y.replace(/\/+$/,"").split("/");return J.split("/").forEach((ae=>{ae===".."?ie.length>1&&ie.pop():ae!=="."&&ie.push(ae)})),ie.length>1?ie.join("/"):"/"})(T,P):P,search:N(te),hash:I(oe)}})(D,S);return z&&z!=="/"&&z.endsWith("/")&&!G.pathname.endsWith("/")&&(G.pathname+="/"),G}const C=i=>i.join("/").replace(/\/\/+/g,"/"),N=i=>i&&i!=="?"?i.startsWith("?")?i:"?"+i:"",I=i=>i&&i!=="#"?i.startsWith("#")?i:"#"+i:"";function j(){return j=Object.assign||function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},j.apply(this,arguments)}const M=["onClick","reloadDocument","replace","state","target","to"],A=(0,a.forwardRef)((function(i,v){let{onClick:b,reloadDocument:S,replace:D=!1,state:z,target:G,to:R}=i,P=(function(oe,U){if(oe==null)return{};var J,Y,ie={},ae=Object.keys(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],U.indexOf(J)>=0||(ie[J]=oe[J]);return ie})(i,M),T=(function(oe){w()||O();let{basename:U,navigator:J}=(0,a.useContext)(m),{hash:Y,pathname:ie,search:ae}=y(oe),ce=ie;if(U!=="/"){let fe=(function(he){return he===""||he.pathname===""?"/":typeof he=="string"?p(he).pathname:he.pathname})(oe),ve=fe!=null&&fe.endsWith("/");ce=ie==="/"?U+(ve?"/":""):C([U,ie])}return J.createHref({pathname:ce,search:ae,hash:Y})})(R),te=(function(oe,U){let{target:J,replace:Y,state:ie}=U===void 0?{}:U,ae=(function(){w()||O();let{basename:ve,navigator:he}=(0,a.useContext)(m),{matches:ye}=(0,a.useContext)(g),{pathname:be}=E(),_e=JSON.stringify(ye.map((Te=>Te.pathnameBase))),Se=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{Se.current=!0})),(0,a.useCallback)((function(Te,De){if(De===void 0&&(De={}),!Se.current)return;if(typeof Te=="number")return void he.go(Te);let Le=x(Te,JSON.parse(_e),be);ve!=="/"&&(Le.pathname=C([ve,Le.pathname])),(De.replace?he.replace:he.push)(Le,De.state)}),[ve,he,_e,be])})(),ce=E(),fe=y(oe);return(0,a.useCallback)((ve=>{if(!(ve.button!==0||J&&J!=="_self"||(function(he){return!!(he.metaKey||he.altKey||he.ctrlKey||he.shiftKey)})(ve))){ve.preventDefault();let he=!!Y||h(ce)===h(fe);ae(oe,{replace:he,state:ie})}}),[ce,ae,fe,Y,ie,J,oe])})(R,{replace:D,state:z,target:G});return(0,a.createElement)("a",j({},P,{href:T,onClick:function(oe){b&&b(oe),oe.defaultPrevented||S||te(oe)},ref:v,target:G}))}));var q,L=l(697),k=l.n(L),F=l(184),V=l.n(F);function ne(i){return ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},ne(i)}function ue(i){document.body.style.paddingRight=i>0?"".concat(i,"px"):null}function K(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q;return v?i.split(" ").map((function(b){return v[b]||b})).join(" "):i}function W(i,v){var b={};return Object.keys(i).forEach((function(S){v.indexOf(S)===-1&&(b[S]=i[S])})),b}var B={};function Q(i){B[i]||(typeof console<"u"&&console.error(i),B[i]=!0)}var re=(typeof window>"u"?"undefined":ne(window))==="object"&&window.Element||function(){},Z=k().oneOfType([k().string,k().func,function(i,v,b){if(!(i[v]instanceof re))return new Error("Invalid prop `"+v+"` supplied to `"+b+"`. Expected prop to be an instance of Element. Validation failed.")},k().shape({current:k().any})]),X=k().oneOfType([k().func,k().string,k().shape({$$typeof:k().symbol,render:k().func}),k().arrayOf(k().oneOfType([k().func,k().string,k().shape({$$typeof:k().symbol,render:k().func})]))]),$=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],ee={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},le=!(typeof window>"u"||!window.document||!window.document.createElement);function de(i){if((function(b){return!(!b||ne(b)!=="object")&&"current"in b})(i))return i.current;if((function(b){if(!(function(D){var z=ne(D);return D!=null&&(z==="object"||z==="function")})(b))return!1;var S=(function(D){return D==null?D===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(D)})(b);return S==="[object Function]"||S==="[object AsyncFunction]"||S==="[object GeneratorFunction]"||S==="[object Proxy]"})(i))return i();if(typeof i=="string"&&le){var v=document.querySelectorAll(i);if(v.length||(v=document.querySelectorAll("#".concat(i))),!v.length)throw new Error("The target '".concat(i,"' could not be identified in the dom, tip: check spelling"));return v}return i}function pe(i){return i!==null&&(Array.isArray(i)||le&&typeof i.length=="number")}var Ee=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],Ie=["className","cssModule","variant","innerRef"];function Pe(){return Pe=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Pe.apply(this,arguments)}function Ae(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function xe(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var Ge={active:k().bool,"aria-label":k().string,onClick:k().func,variant:k().oneOf(["white"]),className:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().string,k().func])};function Oe(i){var v=i.className,b=(i.cssModule,i.variant),S=i.innerRef,D=(function(G,R){if(G==null)return{};var P,T,te=(function(U,J){if(U==null)return{};var Y,ie,ae={},ce=Object.keys(U);for(ie=0;ie<ce.length;ie++)Y=ce[ie],J.indexOf(Y)>=0||(ae[Y]=U[Y]);return ae})(G,R);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(G);for(T=0;T<oe.length;T++)P=oe[T],R.indexOf(P)>=0||Object.prototype.propertyIsEnumerable.call(G,P)&&(te[P]=G[P])}return te})(i,Ie),z=K(V()(v,"btn-close",b&&"btn-close-".concat(b)));return u().createElement("button",Pe({ref:S,type:"button",className:z},(function(G){for(var R=1;R<arguments.length;R++){var P=arguments[R]!=null?arguments[R]:{};R%2?Ae(Object(P),!0).forEach((function(T){xe(G,T,P[T])})):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(P)):Ae(Object(P)).forEach((function(T){Object.defineProperty(G,T,Object.getOwnPropertyDescriptor(P,T))}))}return G})({"aria-label":"close"},D)))}Oe.propTypes=Ge;const ge=Oe;var me=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function ke(){return ke=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},ke.apply(this,arguments)}var Ne={active:k().bool,"aria-label":k().string,block:k().bool,children:k().node,className:k().string,cssModule:k().object,close:k().bool,color:k().string,disabled:k().bool,innerRef:k().oneOfType([k().object,k().func,k().string]),onClick:k().func,outline:k().bool,size:k().string,tag:X};function we(i){var v=(0,a.useCallback)((function(fe){if(!i.disabled)return i.onClick?i.onClick(fe):void 0;fe.preventDefault()}),[i.onClick,i.disabled]),b=i.active,S=i["aria-label"],D=i.block,z=i.className,G=i.close,R=i.cssModule,P=i.color,T=P===void 0?"secondary":P,te=i.outline,oe=i.size,U=i.tag,J=U===void 0?"button":U,Y=i.innerRef,ie=(function(fe,ve){if(fe==null)return{};var he,ye,be=(function(Se,Me){if(Se==null)return{};var Te,De,Le={},Re=Object.keys(Se);for(De=0;De<Re.length;De++)Te=Re[De],Me.indexOf(Te)>=0||(Le[Te]=Se[Te]);return Le})(fe,ve);if(Object.getOwnPropertySymbols){var _e=Object.getOwnPropertySymbols(fe);for(ye=0;ye<_e.length;ye++)he=_e[ye],ve.indexOf(he)>=0||Object.prototype.propertyIsEnumerable.call(fe,he)&&(be[he]=fe[he])}return be})(i,me);if(G)return u().createElement(ge,ie);var ae="btn".concat(te?"-outline":"","-").concat(T),ce=K(V()(z,"btn",ae,!!oe&&"btn-".concat(oe),!!D&&"d-block w-100",{active:b,disabled:i.disabled}),R);return ie.href&&J==="button"&&(J="a"),u().createElement(J,ke({type:J==="button"&&ie.onClick?"button":void 0},ie,{className:ce,ref:Y,onClick:v,"aria-label":S}))}we.propTypes=Ne;const qe=we;var je=a.createContext(),ze=a.createContext();function lt(i){var v=i.children,b=a.useState(null),S=b[0],D=b[1],z=a.useRef(!1);a.useEffect((function(){return function(){z.current=!0}}),[]);var G=a.useCallback((function(R){z.current||D(R)}),[]);return a.createElement(je.Provider,{value:S},a.createElement(ze.Provider,{value:G},v))}var pt=u().createContext({}),Ze=u().createContext({});function It(i){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},It(i)}var We=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"];function it(){return it=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},it.apply(this,arguments)}function Et(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function kt(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function Nt(i,v){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},Nt(i,v)}function Ft(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function yn(i){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},yn(i)}var Lo={a11y:k().bool,disabled:k().bool,direction:k().oneOf(["up","down","start","end","left","right"]),group:k().bool,isOpen:k().bool,nav:k().bool,active:k().bool,size:k().string,tag:X,toggle:k().func,children:k().node,className:k().string,cssModule:k().object,dropup:k().bool,inNavbar:k().bool,setActiveFromChild:k().bool,menuRole:k().oneOf(["listbox","menu"])},Ro=[ee.space,ee.enter,ee.up,ee.down,ee.end,ee.home],mn=(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&Nt(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=yn(S);if(D){var T=yn(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(It(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ft(te)})(this,R)});function G(R){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=z.call(this,R)).addEvents=P.addEvents.bind(Ft(P)),P.handleDocumentClick=P.handleDocumentClick.bind(Ft(P)),P.handleKeyDown=P.handleKeyDown.bind(Ft(P)),P.removeEvents=P.removeEvents.bind(Ft(P)),P.toggle=P.toggle.bind(Ft(P)),P.handleMenuRef=P.handleMenuRef.bind(Ft(P)),P.handleToggleRef=P.handleToggleRef.bind(Ft(P)),P.containerRef=u().createRef(),P.menuRef=u().createRef(),P.toggleRef=u().createRef(),P}return v=G,b=[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(R){this.props.isOpen!==R.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(R){this.menuRef.current=R}},{key:"handleToggleRef",value:function(R){this.toggleRef.current=R}},{key:"handleDocumentClick",value:function(R){if(!R||R.which!==3&&(R.type!=="keyup"||R.which===ee.tab)){var P=this.getContainer(),T=this.getMenu(),te=this.getToggle().contains(R.target),oe=T&&T.contains(R.target)&&T!==R.target,U=!1;P&&(U=P.classList.contains("input-group")&&P.classList.contains("dropdown")&&R.target.tagName==="INPUT"),(!(te&&!U||oe)||R.type==="keyup"&&R.which!==ee.tab)&&this.toggle(R)}}},{key:"handleKeyDown",value:function(R){var P=this,T=R.target.getAttribute("role")==="menuitem"||R.target.getAttribute("role")==="option",te=this.getMenuCtrl()===R.target,oe=ee.tab===R.which;if(!(/input|textarea/i.test(R.target.tagName)||oe&&!this.props.a11y||oe&&!T&&!te||((Ro.indexOf(R.which)!==-1||R.which>=48&&R.which<=90)&&R.preventDefault(),this.props.disabled))){if(te)if([ee.space,ee.enter,ee.up,ee.down].indexOf(R.which)>-1)this.props.isOpen||this.toggle(R),setTimeout((function(){var ve;return(ve=P.getMenuItems()[0])===null||ve===void 0?void 0:ve.focus()}));else if(this.props.isOpen&&oe){var U;R.preventDefault(),(U=this.getMenuItems()[0])===null||U===void 0||U.focus()}else this.props.isOpen&&R.which===ee.esc&&this.toggle(R);if(this.props.isOpen&&T){if([ee.tab,ee.esc].indexOf(R.which)>-1)this.toggle(R),this.getMenuCtrl().focus();else if([ee.space,ee.enter].indexOf(R.which)>-1)R.target.click(),this.getMenuCtrl().focus();else if([ee.down,ee.up].indexOf(R.which)>-1||[ee.n,ee.p].indexOf(R.which)>-1&&R.ctrlKey){var J=this.getMenuItems(),Y=J.indexOf(R.target);ee.up===R.which||ee.p===R.which&&R.ctrlKey?Y=Y!==0?Y-1:J.length-1:(ee.down===R.which||ee.n===R.which&&R.ctrlKey)&&(Y=Y===J.length-1?0:Y+1),J[Y].focus()}else if(ee.end===R.which){var ie=this.getMenuItems();ie[ie.length-1].focus()}else if(ee.home===R.which)this.getMenuItems()[0].focus();else if(R.which>=48&&R.which<=90){for(var ae=this.getMenuItems(),ce=String.fromCharCode(R.which).toLowerCase(),fe=0;fe<ae.length;fe+=1)if((ae[fe].textContent&&ae[fe].textContent[0].toLowerCase())===ce){ae[fe].focus();break}}}}}},{key:"handleProps",value:function(){this.props.isOpen?this.addEvents():this.removeEvents()}},{key:"getContextValue",value:function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:this.props.direction==="down"&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled,onMenuRef:this.handleMenuRef,onToggleRef:this.handleToggleRef,menuRole:this.props.menuRole}}},{key:"getContainer",value:function(){return this.containerRef.current}},{key:"getMenu",value:function(){return this.menuRef.current}},{key:"getToggle",value:function(){return this.toggleRef.current}},{key:"getMenuCtrl",value:function(){return this._$menuCtrl||(this._$menuCtrl=this.getToggle()),this._$menuCtrl}},{key:"getItemType",value:function(){return this.props.menuRole==="listbox"?"option":"menuitem"}},{key:"getMenuItems",value:function(){var R=this.getMenu()||this.getContainer();return[].slice.call(R.querySelectorAll('[role="'.concat(this.getItemType(),'"]')))}},{key:"addEvents",value:function(){var R=this;["click","touchstart","keyup"].forEach((function(P){return document.addEventListener(P,R.handleDocumentClick,!0)}))}},{key:"removeEvents",value:function(){var R=this;["click","touchstart","keyup"].forEach((function(P){return document.removeEventListener(P,R.handleDocumentClick,!0)}))}},{key:"toggle",value:function(R){return this.props.disabled?R&&R.preventDefault():this.props.toggle(R)}},{key:"render",value:function(){var R,P=this,T=W(this.props,["toggle","disabled","inNavbar","a11y"]),te=T.className,oe=T.cssModule,U=T.direction,J=T.isOpen,Y=T.group,ie=T.size,ae=T.nav,ce=T.setActiveFromChild,fe=T.active,ve=T.tag,he=(T.menuRole,(function(Se,Me){if(Se==null)return{};var Te,De,Le=(function($e,Ve){if($e==null)return{};var Ue,at,Qe={},ut=Object.keys($e);for(at=0;at<ut.length;at++)Ue=ut[at],Ve.indexOf(Ue)>=0||(Qe[Ue]=$e[Ue]);return Qe})(Se,Me);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(Se);for(De=0;De<Re.length;De++)Te=Re[De],Me.indexOf(Te)>=0||Object.prototype.propertyIsEnumerable.call(Se,Te)&&(Le[Te]=Se[Te])}return Le})(T,We)),ye=ve||(ae?"li":"div"),be=!1;ce&&u().Children.map(this.props.children[1].props.children,(function(Se){Se&&Se.props.active&&(be=!0)}));var _e=K(V()(te,!(!ae||!fe)&&"active",!(!ce||!be)&&"active",(Et(R={"btn-group":Y},"btn-group-".concat(ie),!!ie),Et(R,"dropdown",!Y),Et(R,"dropup",U==="up"),Et(R,"dropstart",U==="start"||U==="left"),Et(R,"dropend",U==="end"||U==="right"),Et(R,"show",J),Et(R,"nav-item",ae),R)),oe);return this.context.insideInputGroup?u().createElement(pt.Provider,{value:this.getContextValue()},u().createElement(lt,null,u().Children.map(this.props.children,(function(Se){return u().cloneElement(Se,{onKeyDown:P.handleKeyDown})})))):u().createElement(pt.Provider,{value:this.getContextValue()},u().createElement(lt,null,u().createElement(ye,it({},he,Et({},typeof ye=="string"?"ref":"innerRef",this.containerRef),{onKeyDown:this.handleKeyDown,className:_e}))))}}],b&&kt(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);mn.propTypes=Lo,mn.defaultProps={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},mn.contextType=Ze;const Do=mn;function Mr(){return Mr=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Mr.apply(this,arguments)}var In={children:k().node};function da(i){return u().createElement(Do,Mr({group:!0},i))}da.propTypes=In;const ha=da;function jo(i){return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},jo(i)}function pa(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function Wh(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function Fo(){return Fo=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Fo.apply(this,arguments)}function Yh(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function Bo(i,v){return Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},Bo(i,v)}function va(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function qr(i){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},qr(i)}var Zh=["defaultOpen"];(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&Bo(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=qr(S);if(D){var T=qr(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(jo(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return va(te)})(this,R)});function G(R){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=z.call(this,R)).state={isOpen:R.defaultOpen||!1},P.toggle=P.toggle.bind(va(P)),P}return v=G,(b=[{key:"toggle",value:function(){this.setState((function(R){return{isOpen:!R.isOpen}}))}},{key:"render",value:function(){return u().createElement(ha,Fo({isOpen:this.state.isOpen,toggle:this.toggle},W(this.props,Zh)))}}])&&Yh(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(a.Component).propTypes=(function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?pa(Object(b),!0).forEach((function(S){Wh(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):pa(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i})({defaultOpen:k().bool},ha.propTypes);var Xh=l(379),Lr=l.n(Xh),ga=l(795),Rr=l.n(ga),Qh=l(569),Dr=l.n(Qh),Jh=l(565),jr=l.n(Jh),ep=l(216),Fr=l.n(ep),tp=l(589),lr=l.n(tp),Br=l(953),$n={};$n.styleTagTransform=lr(),$n.setAttributes=jr(),$n.insert=Dr().bind(null,"head"),$n.domAPI=Rr(),$n.insertStyleElement=Fr(),Lr()(Br.Z,$n),Br.Z&&Br.Z.locals&&Br.Z.locals;var np=["href","to","icon","pending","children","target","download","noText"],ya=function(i){var v=i.href,b=i.to,S=i.icon,D=i.pending,z=i.children,G=i.target,R=i.download,P=i.noText,T=(function(oe,U){if(oe==null)return{};var J,Y,ie=(function(ce,fe){if(ce==null)return{};var ve,he,ye={},be=Object.keys(ce);for(he=0;he<be.length;he++)ve=be[he],fe.indexOf(ve)>=0||(ye[ve]=ce[ve]);return ye})(oe,U);if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],U.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(oe,J)&&(ie[J]=oe[J])}return ie})(i,np);T.className="".concat(i.className," button-component");var te=u().createElement(u().Fragment,null,D&&u().createElement("i",{className:"fas fa-spinner fa-spin"}),S&&!D&&u().createElement("i",{className:"fas ".concat(S," ").concat(P?"no-text":"")}),z);return T.disabled=T.disabled||D,b&&!T.disabled?u().createElement(A,{to:b,target:G},u().createElement(qe,T,te)):v?u().createElement("a",{href:v,target:G,download:R,rel:"noopener noreferrer"},u().createElement(qe,T,te)):u().createElement(qe,T,te)};ya.defaultProps={active:!1,"aria-label":"",block:!1,color:"secondary",disabled:!1,outline:!1,icon:"",pending:!1,className:"",to:"",href:"",target:"_self",download:!1,children:null};const ur=ya;var ma=l(732),Vn=l.n(ma);function zo(i){return zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},zo(i)}function rp(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function cr(i,v){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},cr(i,v)}function ba(i){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},ba(i)}var _L={children:k().node.isRequired,node:k().any},eE=(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&cr(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=ba(S);if(D){var T=ba(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(zo(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U})(te)})(this,R)});function G(){return(function(R,P){if(!(R instanceof P))throw new TypeError("Cannot call a class as a function")})(this,G),z.apply(this,arguments)}return v=G,(b=[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return le?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Vn().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}])&&rp(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);eE.propTypes=_L;const wL=eE;function tE(i,v){if(i==null)return{};var b,S,D={},z=Object.keys(i);for(S=0;S<z.length;S++)b=z[S],v.indexOf(b)>=0||(D[b]=i[b]);return D}function _a(i,v){return _a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},_a(i,v)}function nE(i,v){i.prototype=Object.create(v.prototype),i.prototype.constructor=i,_a(i,v)}const rE=u().createContext(null);var Ho="unmounted",fr="exited",dr="entering",zr="entered",op="exiting",Mn=(function(i){function v(S,D){var z;z=i.call(this,S,D)||this;var G,R=D&&!D.isMounting?S.enter:S.appear;return z.appearStatus=null,S.in?R?(G=fr,z.appearStatus=dr):G=zr:G=S.unmountOnExit||S.mountOnEnter?Ho:fr,z.state={status:G},z.nextCallback=null,z}nE(v,i),v.getDerivedStateFromProps=function(S,D){return S.in&&D.status===Ho?{status:fr}:null};var b=v.prototype;return b.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},b.componentDidUpdate=function(S){var D=null;if(S!==this.props){var z=this.state.status;this.props.in?z!==dr&&z!==zr&&(D=dr):z!==dr&&z!==zr||(D=op)}this.updateStatus(!1,D)},b.componentWillUnmount=function(){this.cancelNextCallback()},b.getTimeouts=function(){var S,D,z,G=this.props.timeout;return S=D=z=G,G!=null&&typeof G!="number"&&(S=G.exit,D=G.enter,z=G.appear!==void 0?G.appear:D),{exit:S,enter:D,appear:z}},b.updateStatus=function(S,D){if(S===void 0&&(S=!1),D!==null)if(this.cancelNextCallback(),D===dr){if(this.props.unmountOnExit||this.props.mountOnEnter){var z=this.props.nodeRef?this.props.nodeRef.current:Vn().findDOMNode(this);z&&(function(G){G.scrollTop})(z)}this.performEnter(S)}else this.performExit();else this.props.unmountOnExit&&this.state.status===fr&&this.setState({status:Ho})},b.performEnter=function(S){var D=this,z=this.props.enter,G=this.context?this.context.isMounting:S,R=this.props.nodeRef?[G]:[Vn().findDOMNode(this),G],P=R[0],T=R[1],te=this.getTimeouts(),oe=G?te.appear:te.enter;S||z?(this.props.onEnter(P,T),this.safeSetState({status:dr},(function(){D.props.onEntering(P,T),D.onTransitionEnd(oe,(function(){D.safeSetState({status:zr},(function(){D.props.onEntered(P,T)}))}))}))):this.safeSetState({status:zr},(function(){D.props.onEntered(P)}))},b.performExit=function(){var S=this,D=this.props.exit,z=this.getTimeouts(),G=this.props.nodeRef?void 0:Vn().findDOMNode(this);D?(this.props.onExit(G),this.safeSetState({status:op},(function(){S.props.onExiting(G),S.onTransitionEnd(z.exit,(function(){S.safeSetState({status:fr},(function(){S.props.onExited(G)}))}))}))):this.safeSetState({status:fr},(function(){S.props.onExited(G)}))},b.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},b.safeSetState=function(S,D){D=this.setNextCallback(D),this.setState(S,D)},b.setNextCallback=function(S){var D=this,z=!0;return this.nextCallback=function(G){z&&(z=!1,D.nextCallback=null,S(G))},this.nextCallback.cancel=function(){z=!1},this.nextCallback},b.onTransitionEnd=function(S,D){this.setNextCallback(D);var z=this.props.nodeRef?this.props.nodeRef.current:Vn().findDOMNode(this),G=S==null&&!this.props.addEndListener;if(z&&!G){if(this.props.addEndListener){var R=this.props.nodeRef?[this.nextCallback]:[z,this.nextCallback],P=R[0],T=R[1];this.props.addEndListener(P,T)}S!=null&&setTimeout(this.nextCallback,S)}else setTimeout(this.nextCallback,0)},b.render=function(){var S=this.state.status;if(S===Ho)return null;var D=this.props,z=D.children,G=(D.in,D.mountOnEnter,D.unmountOnExit,D.appear,D.enter,D.exit,D.timeout,D.addEndListener,D.onEnter,D.onEntering,D.onEntered,D.onExit,D.onExiting,D.onExited,D.nodeRef,tE(D,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return u().createElement(rE.Provider,{value:null},typeof z=="function"?z(S,G):u().cloneElement(u().Children.only(z),G))},v})(u().Component);function Hr(){}Mn.contextType=rE,Mn.propTypes={},Mn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Hr,onEntering:Hr,onEntered:Hr,onExit:Hr,onExiting:Hr,onExited:Hr},Mn.UNMOUNTED=Ho,Mn.EXITED=fr,Mn.ENTERING=dr,Mn.ENTERED=zr,Mn.EXITING=op;const ip=Mn;var OL=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function wa(){return wa=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},wa.apply(this,arguments)}function oE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function $o(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?oE(Object(b),!0).forEach((function(S){EL(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):oE(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function EL(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var SL=$o($o({},ip.propTypes),{},{children:k().oneOfType([k().arrayOf(k().node),k().node]),tag:X,baseClass:k().string,baseClassActive:k().string,className:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().string,k().func])}),iE=$o($o({},ip.defaultProps),{},{timeout:150,appear:!0,enter:!0,exit:!0,in:!0});function ap(i){var v=(0,a.useRef)(null),b=i.tag,S=b===void 0?"div":b,D=i.baseClass,z=D===void 0?"fade":D,G=i.baseClassActive,R=G===void 0?"show":G,P=i.className,T=i.cssModule,te=i.children,oe=i.innerRef,U=oe===void 0?v:oe,J=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var Se,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)Se=De[Me],_e.indexOf(Se)>=0||(Te[Se]=be[Se]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(i,OL),Y=(function(ae,ce){for(var fe,ve=Array.isArray(ce)?ce:[ce],he=ve.length,ye={};he>0;)ye[fe=ve[he-=1]]=ae[fe];return ye})($o({defaultProps:iE},J),$),ie=W(J,$);return u().createElement(ip,wa({nodeRef:U},Y),(function(ae){var ce=ae==="entered",fe=K(V()(P,z,ce&&R),T);return u().createElement(S,wa({className:fe},ie,{ref:U}),te)}))}ap.propTypes=SL,ap.defaultProps=iE;const qn=ap;function sp(i){return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},sp(i)}function aE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function $r(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?aE(Object(b),!0).forEach((function(S){Vr(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):aE(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function Vo(){return Vo=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Vo.apply(this,arguments)}function Vr(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function xL(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function lp(i,v){return lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},lp(i,v)}function Jt(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Oa(i){return Oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Oa(i)}function Ea(){}var sE=k().shape(qn.propTypes),lE={autoFocus:k().bool,backdrop:k().oneOfType([k().bool,k().oneOf(["static"])]),backdropClassName:k().string,backdropTransition:sE,centered:k().bool,children:k().node,contentClassName:k().string,className:k().string,container:Z,cssModule:k().object,external:k().node,fade:k().bool,fullscreen:k().oneOfType([k().bool,k().oneOf(["sm","md","lg","xl"])]),innerRef:k().oneOfType([k().object,k().string,k().func]),isOpen:k().bool,keyboard:k().bool,labelledBy:k().string,modalClassName:k().string,modalTransition:sE,onClosed:k().func,onEnter:k().func,onExit:k().func,onOpened:k().func,returnFocusAfterClose:k().bool,role:k().string,scrollable:k().bool,size:k().string,toggle:k().func,trapFocus:k().bool,unmountOnClose:k().bool,wrapClassName:k().string,zIndex:k().oneOfType([k().number,k().string])},kL=Object.keys(lE),NL={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Ea,onClosed:Ea,modalTransition:{timeout:300},backdropTransition:{mountOnEnter:!0,timeout:150},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Uo=(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&lp(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=Oa(S);if(D){var T=Oa(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(sp(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(te)})(this,R)});function G(R){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=z.call(this,R))._element=null,P._originalBodyPadding=null,P.getFocusableChildren=P.getFocusableChildren.bind(Jt(P)),P.handleBackdropClick=P.handleBackdropClick.bind(Jt(P)),P.handleBackdropMouseDown=P.handleBackdropMouseDown.bind(Jt(P)),P.handleEscape=P.handleEscape.bind(Jt(P)),P.handleStaticBackdropAnimation=P.handleStaticBackdropAnimation.bind(Jt(P)),P.handleTab=P.handleTab.bind(Jt(P)),P.onOpened=P.onOpened.bind(Jt(P)),P.onClosed=P.onClosed.bind(Jt(P)),P.manageFocusAfterClose=P.manageFocusAfterClose.bind(Jt(P)),P.clearBackdropAnimationTimeout=P.clearBackdropAnimationTimeout.bind(Jt(P)),P.trapFocus=P.trapFocus.bind(Jt(P)),P.state={isOpen:!1,showStaticBackdropAnimation:!1},P}return v=G,b=[{key:"componentDidMount",value:function(){var R=this.props,P=R.isOpen,T=R.autoFocus,te=R.onEnter;P&&(this.init(),this.setState({isOpen:!0}),T&&this.setFocus()),te&&te(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(R,P){if(this.props.isOpen&&!R.isOpen)return this.init(),void this.setState({isOpen:!0});this.props.autoFocus&&this.state.isOpen&&!P.isOpen&&this.setFocus(),this._element&&R.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(R){if(R.target===this._mouseDownElement){R.stopPropagation();var P=this._dialog?this._dialog.parentNode:null;if(P&&R.target===P&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;P&&R.target===P&&this.props.toggle&&this.props.toggle(R)}}},{key:"handleTab",value:function(R){if(R.which===9&&!(this.modalIndex<G.openCount-1)){var P=this.getFocusableChildren(),T=P.length;if(T!==0){for(var te=this.getFocusedChild(),oe=0,U=0;U<T;U+=1)if(P[U]===te){oe=U;break}R.shiftKey&&oe===0?(R.preventDefault(),P[T-1].focus()):R.shiftKey||oe!==T-1||(R.preventDefault(),P[0].focus())}}}},{key:"handleBackdropMouseDown",value:function(R){this._mouseDownElement=R.target}},{key:"handleEscape",value:function(R){this.props.isOpen&&R.keyCode===ee.esc&&this.props.toggle&&(this.props.keyboard?(R.preventDefault(),R.stopPropagation(),this.props.toggle(R)):this.props.backdrop==="static"&&(R.preventDefault(),R.stopPropagation(),this.handleStaticBackdropAnimation()))}},{key:"handleStaticBackdropAnimation",value:function(){var R=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout((function(){R.setState({showStaticBackdropAnimation:!1})}),100)}},{key:"onOpened",value:function(R,P){this.props.onOpened(),(this.props.modalTransition.onEntered||Ea)(R,P)}},{key:"onClosed",value:function(R){var P=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||Ea)(R),P&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}},{key:"setFocus",value:function(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}},{key:"getFocusableChildren",value:function(){return this._element.querySelectorAll(Ee.join(", "))}},{key:"getFocusedChild",value:function(){var R,P=this.getFocusableChildren();try{R=document.activeElement}catch{R=P[0]}return R}},{key:"trapFocus",value:function(R){if(this.props.trapFocus&&this._element&&!(this._dialog&&this._dialog.parentNode===R.target||this.modalIndex<G.openCount-1)){for(var P=this.getFocusableChildren(),T=0;T<P.length;T+=1)if(P[T]===R.target)return;P.length>0&&(R.preventDefault(),R.stopPropagation(),P[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}var R,P,T,te,oe;this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=pe(R=de(this.props.container))?R[0]:R,this._mountContainer.appendChild(this._element)),this._originalBodyPadding=(P=window.getComputedStyle(document.body,null),parseInt(P&&P.getPropertyValue("padding-right")||0,10)),G.openCount<1&&(G.originalBodyOverflow=window.getComputedStyle(document.body).overflow),T=(function(){var U=document.createElement("div");U.style.position="absolute",U.style.top="-9999px",U.style.width="50px",U.style.height="50px",U.style.overflow="scroll",document.body.appendChild(U);var J=U.offsetWidth-U.clientWidth;return document.body.removeChild(U),J})(),te=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],oe=te?parseInt(te.style.paddingRight||0,10):0,document.body.clientWidth<window.innerWidth&&ue(oe+T),G.openCount===0&&(document.body.className=V()(document.body.className,K("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=G.openCount,G.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var R=this.props.returnFocusAfterClose;this._triggeringElement.focus&&R&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(G.openCount<=1){var R=K("modal-open",this.props.cssModule),P=new RegExp("(^| )".concat(R,"( |$)"));document.body.className=document.body.className.replace(P," ").trim(),document.body.style.overflow=G.originalBodyOverflow}this.manageFocusAfterClose(),G.openCount=Math.max(0,G.openCount-1),ue(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var R,P=this,T=W(this.props,kL),te="modal-dialog";return u().createElement("div",Vo({},T,{className:K(V()(te,this.props.className,(R={},Vr(R,"modal-".concat(this.props.size),this.props.size),Vr(R,"".concat(te,"-centered"),this.props.centered),Vr(R,"".concat(te,"-scrollable"),this.props.scrollable),Vr(R,"modal-fullscreen",this.props.fullscreen===!0),Vr(R,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),R)),this.props.cssModule),role:"document",ref:function(oe){P._dialog=oe}}),u().createElement("div",{className:K(V()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var R=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!R)){var P=!!this._element&&!this.state.isOpen&&!R;this._element.style.display=P?"none":"block";var T=this.props,te=T.wrapClassName,oe=T.modalClassName,U=T.backdropClassName,J=T.cssModule,Y=T.isOpen,ie=T.backdrop,ae=T.role,ce=T.labelledBy,fe=T.external,ve=T.innerRef,he={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":ce,"aria-modal":!0,role:ae,tabIndex:"-1"},ye=this.props.fade,be=$r($r($r({},qn.defaultProps),this.props.modalTransition),{},{baseClass:ye?this.props.modalTransition.baseClass:"",timeout:ye?this.props.modalTransition.timeout:0}),_e=$r($r($r({},qn.defaultProps),this.props.backdropTransition),{},{baseClass:ye?this.props.backdropTransition.baseClass:"",timeout:ye?this.props.backdropTransition.timeout:0}),Se=ie&&(ye?u().createElement(qn,Vo({},_e,{in:Y&&!!ie,cssModule:J,className:K(V()("modal-backdrop",U),J)})):u().createElement("div",{className:K(V()("modal-backdrop","show",U),J)}));return u().createElement(wL,{node:this._element},u().createElement("div",{className:K(te)},u().createElement(qn,Vo({},he,be,{in:Y,onEntered:this.onOpened,onExited:this.onClosed,cssModule:J,className:K(V()("modal",oe,this.state.showStaticBackdropAnimation&&"modal-static"),J),innerRef:ve}),fe,this.renderModalDialog()),Se))}return null}}],b&&xL(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);Uo.propTypes=lE,Uo.defaultProps=NL,Uo.openCount=0,Uo.originalBodyOverflow=null;const TL=Uo;var CL=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function up(){return up=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},up.apply(this,arguments)}var AL={children:k().node,className:k().string,close:k().object,closeAriaLabel:k().string,cssModule:k().object,tag:X,toggle:k().func,wrapTag:X};function uE(i){var v,b=i.className,S=i.cssModule,D=i.children,z=i.toggle,G=i.tag,R=G===void 0?"h5":G,P=i.wrapTag,T=P===void 0?"div":P,te=i.closeAriaLabel,oe=te===void 0?"Close":te,U=i.close,J=(function(ie,ae){if(ie==null)return{};var ce,fe,ve=(function(ye,be){if(ye==null)return{};var _e,Se,Me={},Te=Object.keys(ye);for(Se=0;Se<Te.length;Se++)_e=Te[Se],be.indexOf(_e)>=0||(Me[_e]=ye[_e]);return Me})(ie,ae);if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(ie);for(fe=0;fe<he.length;fe++)ce=he[fe],ae.indexOf(ce)>=0||Object.prototype.propertyIsEnumerable.call(ie,ce)&&(ve[ce]=ie[ce])}return ve})(i,CL),Y=K(V()(b,"modal-header"),S);return!U&&z&&(v=u().createElement("button",{type:"button",onClick:z,className:K("btn-close",S),"aria-label":oe})),u().createElement(T,up({},J,{className:Y}),u().createElement(R,{className:K("modal-title",S)},D),U||v)}uE.propTypes=AL;const PL=uE;var IL=["className","cssModule","tag"];function cp(){return cp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},cp.apply(this,arguments)}var ML={className:k().string,cssModule:k().object,tag:X};function cE(i){var v=i.className,b=i.cssModule,S=i.tag,D=S===void 0?"div":S,z=(function(R,P){if(R==null)return{};var T,te,oe=(function(J,Y){if(J==null)return{};var ie,ae,ce={},fe=Object.keys(J);for(ae=0;ae<fe.length;ae++)ie=fe[ae],Y.indexOf(ie)>=0||(ce[ie]=J[ie]);return ce})(R,P);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(R);for(te=0;te<U.length;te++)T=U[te],P.indexOf(T)>=0||Object.prototype.propertyIsEnumerable.call(R,T)&&(oe[T]=R[T])}return oe})(i,IL),G=K(V()(v,"modal-body"),b);return u().createElement(D,cp({},z,{className:G}))}cE.propTypes=ML;const qL=cE;var LL=["className","cssModule","tag"];function fp(){return fp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},fp.apply(this,arguments)}var RL={className:k().string,cssModule:k().object,tag:X};function fE(i){var v=i.className,b=i.cssModule,S=i.tag,D=S===void 0?"div":S,z=(function(R,P){if(R==null)return{};var T,te,oe=(function(J,Y){if(J==null)return{};var ie,ae,ce={},fe=Object.keys(J);for(ae=0;ae<fe.length;ae++)ie=fe[ae],Y.indexOf(ie)>=0||(ce[ie]=J[ie]);return ce})(R,P);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(R);for(te=0;te<U.length;te++)T=U[te],P.indexOf(T)>=0||Object.prototype.propertyIsEnumerable.call(R,T)&&(oe[T]=R[T])}return oe})(i,LL),G=K(V()(v,"modal-footer"),b);return u().createElement(D,fp({},z,{className:G}))}fE.propTypes=RL;const DL=fE;var jL=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function dp(){return dp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},dp.apply(this,arguments)}function dE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function Go(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?dE(Object(b),!0).forEach((function(S){FL(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):dE(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function FL(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var BL={children:k().node,className:k().string,closeClassName:k().string,closeAriaLabel:k().string,color:k().string,cssModule:k().object,fade:k().bool,innerRef:k().oneOfType([k().object,k().string,k().func]),isOpen:k().bool,tag:X,toggle:k().func,transition:k().shape(qn.propTypes)};function hE(i){var v=i.className,b=i.closeClassName,S=i.closeAriaLabel,D=S===void 0?"Close":S,z=i.cssModule,G=i.tag,R=G===void 0?"div":G,P=i.color,T=P===void 0?"success":P,te=i.isOpen,oe=te===void 0||te,U=i.toggle,J=i.children,Y=i.transition,ie=Y===void 0?Go(Go({},qn.defaultProps),{},{unmountOnExit:!0}):Y,ae=i.fade,ce=ae===void 0||ae,fe=i.innerRef,ve=(function(_e,Se){if(_e==null)return{};var Me,Te,De=(function(Re,$e){if(Re==null)return{};var Ve,Ue,at={},Qe=Object.keys(Re);for(Ue=0;Ue<Qe.length;Ue++)Ve=Qe[Ue],$e.indexOf(Ve)>=0||(at[Ve]=Re[Ve]);return at})(_e,Se);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(_e);for(Te=0;Te<Le.length;Te++)Me=Le[Te],Se.indexOf(Me)>=0||Object.prototype.propertyIsEnumerable.call(_e,Me)&&(De[Me]=_e[Me])}return De})(i,jL),he=K(V()(v,"alert","alert-".concat(T),{"alert-dismissible":U}),z),ye=K(V()("btn-close",b),z),be=Go(Go(Go({},qn.defaultProps),ie),{},{baseClass:ce?ie.baseClass:"",timeout:ce?ie.timeout:0});return u().createElement(qn,dp({},ve,be,{tag:R,className:he,in:oe,role:"alert",innerRef:fe}),U?u().createElement("button",{type:"button",className:ye,"aria-label":D,onClick:U}):null,J)}hE.propTypes=BL;const zL=hE;var Sa=l(318),Ur={};function pE(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,S=new Array(v);b<v;b++)S[b]=i[b];return S}Ur.styleTagTransform=lr(),Ur.setAttributes=jr(),Ur.insert=Dr().bind(null,"head"),Ur.domAPI=Rr(),Ur.insertStyleElement=Fr(),Lr()(Sa.Z,Ur),Sa.Z&&Sa.Z.locals&&Sa.Z.locals;var vE=function(i){var v=(function(D,z){return(function(G){if(Array.isArray(G))return G})(D)||(function(G,R){var P=G==null?null:typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(P!=null){var T,te,oe,U,J=[],Y=!0,ie=!1;try{if(oe=(P=P.call(G)).next,R!==0)for(;!(Y=(T=oe.call(P)).done)&&(J.push(T.value),J.length!==R);Y=!0);}catch(ae){ie=!0,te=ae}finally{try{if(!Y&&P.return!=null&&(U=P.return(),Object(U)!==U))return}finally{if(ie)throw te}}return J}})(D,z)||(function(G,R){if(G){if(typeof G=="string")return pE(G,R);var P=Object.prototype.toString.call(G).slice(8,-1);return P==="Object"&&G.constructor&&(P=G.constructor.name),P==="Map"||P==="Set"?Array.from(G):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?pE(G,R):void 0}})(D,z)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,a.useState)(!1),2),b=v[0],S=v[1];return b?null:u().createElement(zL,{id:i.id,className:"message-stripe-component ".concat(i.classes," m-0"),color:i.color,fade:!1},i.dismissible&&u().createElement("button",{type:"button",className:"fas fa-times message-stripe__remove-button",onClick:function(){S(!0),i.onDismiss&&i.onDismiss()}}),i.icon&&u().createElement("i",{className:"fas ".concat(i.icon)}),i.title&&u().createElement("span",{className:"message-stripe__message ml-2 h5"},i.title),u().createElement("span",{className:"message-stripe__message"},i.message))};vE.defaultProps={dismissible:!0,onDismiss:function(){},icon:"",classes:"",title:""};const Gr=vE;var gE=function(i,v,b){return b?"".concat(b,": (").concat(i,") ").concat(v):"(".concat(i,") ").concat(v)},yE=function(i,v){return i.status?gE(i.status,i.message,v):i.Status?gE(i.Status,i.Message,v):v?"".concat(v,": ").concat(i):i};function hp(i){return hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},hp(i)}var HL=function(i){var v=i.error;return v?v.constructor===Array?v.map((function(b){return u().createElement(Gr,{id:"error-stripe",classes:"mx-3 my-2",color:"danger",dismissible:!1,message:yE(b)})})):["object","string"].includes(hp(v))?u().createElement(Gr,{id:"error-stripe",classes:"mx-3 my-2",color:"danger",dismissible:!1,message:yE(v)}):void 0:null},mE=function(i){return u().createElement(TL,{id:i.id,size:i.size,className:i.className,isOpen:i.isOpen,scrollable:i.scrollable,backdrop:!i.noCancel||"static",toggle:i.onClose,onClosed:function(){i.onClosed&&i.onClosed()},onOpened:function(){i.onOpen&&i.onOpen()}},i.headerContent&&u().createElement(PL,{toggle:i.onClose},i.headerContent),u().createElement(HL,{error:i.error}),i.warning&&(Array.isArray(i.warning)?i.warning.map((function(v){return u().createElement(Gr,{id:"warning-stripe",classes:"mx-3 my-2",color:"warning",dismissible:!1,message:v})})):u().createElement(Gr,{id:"warning-stripe",classes:"mx-3 my-2",color:"warning",dismissible:!1,message:i.warning})),(i.content||i.disableSubmitMessage)&&u().createElement(qL,{className:i.bodyClassName},i.content,i.disableSubmit&&i.disableSubmitMessage&&u().createElement(Gr,{id:"cm-disable-submit-message",message:i.disableSubmitMessage,color:"danger",dismissible:!1})),u().createElement(DL,null,i.customFooter?i.customFooter:u().createElement(u().Fragment,null,!i.noCancel&&u().createElement(ur,{key:"cancel-button",onClick:i.onClose},i.cancelButtonText),!i.noSubmit&&u().createElement(ur,{key:"submit-button",color:i.submitButtonColor,pending:i.pending,onClick:i.onSubmit,disabled:i.disableSubmit},i.submitButtonText))))};mE.defaultProps={scrollable:!1,pending:!1,disableSubmit:!1,noSubmit:!1,noCancel:!1,content:null,customFooter:null,bodyClassName:"",cancelButtonText:"Cancel",submitButtonText:"Submit",submitButtonColor:"primary",error:null,warning:null,className:"",disableSubmitMessage:""};const $L=mE;var VL=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function pp(){return pp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},pp.apply(this,arguments)}var UL={card:k().bool,className:k().string,cssModule:k().object,fill:k().bool,horizontal:k().oneOf(["center","end"]),justified:k().bool,navbar:k().bool,pills:k().bool,tabs:k().bool,tag:X,vertical:k().oneOfType([k().bool,k().string])};function bE(i){var v=i.className,b=i.cssModule,S=i.tabs,D=i.pills,z=i.vertical,G=z!==void 0&&z,R=i.horizontal,P=i.justified,T=i.fill,te=i.navbar,oe=i.card,U=i.tag,J=U===void 0?"ul":U,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var Se,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)Se=De[Me],_e.indexOf(Se)>=0||(Te[Se]=be[Se]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(i,VL),ie=K(V()(v,te?"navbar-nav":"nav",!!R&&"justify-content-".concat(R),(function(ae){return ae!==!1&&(ae===!0||ae==="xs"?"flex-column":"flex-".concat(ae,"-column"))})(G),{"nav-tabs":S,"card-header-tabs":oe&&S,"nav-pills":D,"card-header-pills":oe&&D,"nav-justified":P,"nav-fill":T}),b);return u().createElement(J,pp({},Y,{className:ie}))}bE.propTypes=UL;const GL=bE;var KL=["className","cssModule","active","tag"];function vp(){return vp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},vp.apply(this,arguments)}var WL={active:k().bool,className:k().string,cssModule:k().object,tag:X};function _E(i){var v=i.className,b=i.cssModule,S=i.active,D=i.tag,z=D===void 0?"li":D,G=(function(P,T){if(P==null)return{};var te,oe,U=(function(Y,ie){if(Y==null)return{};var ae,ce,fe={},ve=Object.keys(Y);for(ce=0;ce<ve.length;ce++)ae=ve[ce],ie.indexOf(ae)>=0||(fe[ae]=Y[ae]);return fe})(P,T);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(P);for(oe=0;oe<J.length;oe++)te=J[oe],T.indexOf(te)>=0||Object.prototype.propertyIsEnumerable.call(P,te)&&(U[te]=P[te])}return U})(i,KL),R=K(V()(v,"nav-item",!!S&&"active"),b);return u().createElement(z,vp({},G,{className:R}))}_E.propTypes=WL;const YL=_E;function gp(i){return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},gp(i)}var ZL=["className","cssModule","active","tag","innerRef"];function yp(){return yp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},yp.apply(this,arguments)}function XL(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function mp(i,v){return mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},mp(i,v)}function wE(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function xa(i){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},xa(i)}var QL={active:k().bool,className:k().string,cssModule:k().object,disabled:k().bool,href:k().any,innerRef:k().oneOfType([k().object,k().func,k().string]),onClick:k().func,tag:X},OE=(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&mp(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=xa(S);if(D){var T=xa(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(gp(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wE(te)})(this,R)});function G(R){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=z.call(this,R)).onClick=P.onClick.bind(wE(P)),P}return v=G,(b=[{key:"onClick",value:function(R){this.props.disabled?R.preventDefault():(this.props.href==="#"&&R.preventDefault(),this.props.onClick&&this.props.onClick(R))}},{key:"render",value:function(){var R=this.props,P=R.className,T=R.cssModule,te=R.active,oe=R.tag,U=oe===void 0?"a":oe,J=R.innerRef,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var Se,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)Se=De[Me],_e.indexOf(Se)>=0||(Te[Se]=be[Se]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(R,ZL),ie=K(V()(P,"nav-link",{disabled:Y.disabled,active:te}),T);return u().createElement(U,yp({},Y,{ref:J,onClick:this.onClick,className:ie}))}}])&&XL(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);OE.propTypes=QL;const JL=OE;var EE=u().createContext({});function bp(i){return bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},bp(i)}function _p(){return _p=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},_p.apply(this,arguments)}function SE(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function wp(i,v){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},wp(i,v)}function ka(i){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},ka(i)}var xE={tag:X,activeTab:k().any,className:k().string,cssModule:k().object},kE=(function(i){(function(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),T&&wp(P,T)})(R,i);var v,b,S,D,z,G=(D=R,z=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var P,T=ka(D);if(z){var te=ka(this).constructor;P=Reflect.construct(T,arguments,te)}else P=T.apply(this,arguments);return(function(oe,U){if(U&&(bp(U)==="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J})(oe)})(this,P)});function R(P){var T;return(function(te,oe){if(!(te instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,R),(T=G.call(this,P)).state={activeTab:T.props.activeTab},T}return v=R,S=[{key:"getDerivedStateFromProps",value:function(P,T){return T.activeTab!==P.activeTab?{activeTab:P.activeTab}:null}}],(b=[{key:"render",value:function(){var P=this.props,T=P.className,te=P.cssModule,oe=P.tag,U=oe===void 0?"div":oe,J=W(this.props,Object.keys(xE)),Y=K(V()("tab-content",T),te);return u().createElement(EE.Provider,{value:{activeTabId:this.state.activeTab}},u().createElement(U,_p({},J,{className:Y})))}}])&&SE(v.prototype,b),S&&SE(v,S),Object.defineProperty(v,"prototype",{writable:!1}),R})(a.Component);const eR=kE;kE.propTypes=xE;var tR=["className","cssModule","tabId","tag"];function Op(){return Op=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Op.apply(this,arguments)}var nR={tag:X,className:k().string,cssModule:k().object,tabId:k().any};function NE(i){var v=i.className,b=i.cssModule,S=i.tabId,D=i.tag,z=D===void 0?"div":D,G=(function(P,T){if(P==null)return{};var te,oe,U=(function(Y,ie){if(Y==null)return{};var ae,ce,fe={},ve=Object.keys(Y);for(ce=0;ce<ve.length;ce++)ae=ve[ce],ie.indexOf(ae)>=0||(fe[ae]=Y[ae]);return fe})(P,T);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(P);for(oe=0;oe<J.length;oe++)te=J[oe],T.indexOf(te)>=0||Object.prototype.propertyIsEnumerable.call(P,te)&&(U[te]=P[te])}return U})(i,tR),R=function(P){return K(V()("tab-pane",v,{active:S===P}),b)};return u().createElement(EE.Consumer,null,(function(P){var T=P.activeTabId;return u().createElement(z,Op({},G,{className:R(T)}))}))}function TE(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,S=new Array(v);b<v;b++)S[b]=i[b];return S}NE.propTypes=nR;var CE=function(i){var v=(function(z,G){return(function(R){if(Array.isArray(R))return R})(z)||(function(R,P){var T=R==null?null:typeof Symbol<"u"&&R[Symbol.iterator]||R["@@iterator"];if(T!=null){var te,oe,U,J,Y=[],ie=!0,ae=!1;try{if(U=(T=T.call(R)).next,P!==0)for(;!(ie=(te=U.call(T)).done)&&(Y.push(te.value),Y.length!==P);ie=!0);}catch(ce){ae=!0,oe=ce}finally{try{if(!ie&&T.return!=null&&(J=T.return(),Object(J)!==J))return}finally{if(ae)throw oe}}return Y}})(z,G)||(function(R,P){if(R){if(typeof R=="string")return TE(R,P);var T=Object.prototype.toString.call(R).slice(8,-1);return T==="Object"&&R.constructor&&(T=R.constructor.name),T==="Map"||T==="Set"?Array.from(R):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?TE(R,P):void 0}})(z,G)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,a.useState)(),2),b=v[0],S=v[1];(0,a.useEffect)((function(){S(i.activeTab)}),[i.activeTab]);var D=i.tabs.filter((function(z){return!z.hideTab}));return u().createElement("div",null,u().createElement("div",{className:"container-md"},u().createElement(GL,{tabs:!0},D.map((function(z){return u().createElement(YL,{key:z.key},u().createElement(JL,{className:b===z.key?"active":"",onClick:function(){i.onChange(z.key),(function(G){b!==G&&S(G)})(z.key)}},z.label,i.enableTabClose&&u().createElement(ur,{noText:!0,color:"icon",style:{marginRight:"-0.75rem"},icon:"fas fa-times",onClick:function(G){i.onClose(z.key),G.stopPropagation()}})))})))),u().createElement(eR,{activeTab:b,className:"border-top"},D.map((function(z){return u().createElement(NE,{tabId:z.key,key:z.key},b===z.key?z.content:null)}))))};CE.defaultProps={onChange:function(){},enableTabClose:!1,onClose:function(){}};const rR=CE;var Na=l(525),Kr={};Kr.styleTagTransform=lr(),Kr.setAttributes=jr(),Kr.insert=Dr().bind(null,"head"),Kr.domAPI=Rr(),Kr.insertStyleElement=Fr(),Lr()(Na.Z,Kr),Na.Z&&Na.Z.locals&&Na.Z.locals;var AE=function(i){return u().createElement("section",{className:"keyval__wrapper"},u().createElement("span",{className:"keyval__label",style:{minWidth:i.labelWidth}},i.label),u().createElement("ul",{className:"keyval__list"},i.items.map((function(v){return u().createElement("li",{key:String(v),className:"keyval__item"},v)}))))};AE.defaultProps={labelWidth:100};const oR=AE,Ta=Array.isArray||function(i){return i!=null&&i.length>=0&&Object.prototype.toString.call(i)==="[object Array]"};function PE(i,v,b){return function(){if(arguments.length===0)return b();var S=arguments[arguments.length-1];if(!Ta(S)){for(var D=0;D<i.length;){if(typeof S[i[D]]=="function")return S[i[D]].apply(S,Array.prototype.slice.call(arguments,0,-1));D+=1}if((function(z){return z!=null&&typeof z["@@transducer/step"]=="function"})(S))return v.apply(null,Array.prototype.slice.call(arguments,0,-1))(S)}return b.apply(this,arguments)}}const IE=function(){return this.xf["@@transducer/init"]()};function ct(i){return i!=null&&typeof i=="object"&&i["@@functional/placeholder"]===!0}function Mt(i){return function v(b){return arguments.length===0||ct(b)?v:i.apply(this,arguments)}}function en(i){return function v(b,S){switch(arguments.length){case 0:return v;case 1:return ct(b)?v:Mt((function(D){return i(b,D)}));default:return ct(b)&&ct(S)?v:ct(b)?Mt((function(D){return i(D,S)})):ct(S)?Mt((function(D){return i(b,D)})):i(b,S)}}}function ME(i){for(var v,b=[];!(v=i.next()).done;)b.push(v.value);return b}function qE(i,v,b){for(var S=0,D=b.length;S<D;){if(i(v,b[S]))return!0;S+=1}return!1}function Wr(i,v){return Object.prototype.hasOwnProperty.call(v,i)}const Ep=typeof Object.is=="function"?Object.is:function(i,v){return i===v?i!==0||1/i==1/v:i!=i&&v!=v};var LE=Object.prototype.toString;const RE=(function(){return LE.call(arguments)==="[object Arguments]"?function(i){return LE.call(i)==="[object Arguments]"}:function(i){return Wr("callee",i)}})();var iR=!{toString:null}.propertyIsEnumerable("toString"),DE=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],jE=(function(){return arguments.propertyIsEnumerable("length")})(),aR=function(i,v){for(var b=0;b<i.length;){if(i[b]===v)return!0;b+=1}return!1};const FE=Mt(typeof Object.keys!="function"||jE?(function(i){if(Object(i)!==i)return[];var v,b,S=[],D=jE&&RE(i);for(v in i)!Wr(v,i)||D&&v==="length"||(S[S.length]=v);if(iR)for(b=DE.length-1;b>=0;)Wr(v=DE[b],i)&&!aR(S,v)&&(S[S.length]=v),b-=1;return S}):(function(i){return Object(i)!==i?[]:Object.keys(i)})),Sp=Mt((function(i){return i===null?"Null":i===void 0?"Undefined":Object.prototype.toString.call(i).slice(8,-1)}));function BE(i,v,b,S){var D=ME(i);function z(G,R){return xp(G,R,b.slice(),S.slice())}return!qE((function(G,R){return!qE(z,R,G)}),ME(v),D)}function xp(i,v,b,S){if(Ep(i,v))return!0;var D,z,G=Sp(i);if(G!==Sp(v))return!1;if(typeof i["fantasy-land/equals"]=="function"||typeof v["fantasy-land/equals"]=="function")return typeof i["fantasy-land/equals"]=="function"&&i["fantasy-land/equals"](v)&&typeof v["fantasy-land/equals"]=="function"&&v["fantasy-land/equals"](i);if(typeof i.equals=="function"||typeof v.equals=="function")return typeof i.equals=="function"&&i.equals(v)&&typeof v.equals=="function"&&v.equals(i);switch(G){case"Arguments":case"Array":case"Object":if(typeof i.constructor=="function"&&(D=i.constructor,((z=String(D).match(/^function (\w*)/))==null?"":z[1])==="Promise"))return i===v;break;case"Boolean":case"Number":case"String":if(typeof i!=typeof v||!Ep(i.valueOf(),v.valueOf()))return!1;break;case"Date":if(!Ep(i.valueOf(),v.valueOf()))return!1;break;case"Error":return i.name===v.name&&i.message===v.message;case"RegExp":if(i.source!==v.source||i.global!==v.global||i.ignoreCase!==v.ignoreCase||i.multiline!==v.multiline||i.sticky!==v.sticky||i.unicode!==v.unicode)return!1}for(var R=b.length-1;R>=0;){if(b[R]===i)return S[R]===v;R-=1}switch(G){case"Map":return i.size===v.size&&BE(i.entries(),v.entries(),b.concat([i]),S.concat([v]));case"Set":return i.size===v.size&&BE(i.values(),v.values(),b.concat([i]),S.concat([v]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var P=FE(i);if(P.length!==FE(v).length)return!1;var T=b.concat([i]),te=S.concat([v]);for(R=P.length-1;R>=0;){var oe=P[R];if(!Wr(oe,v)||!xp(v[oe],i[oe],T,te))return!1;R-=1}return!0}const zE=en((function(i,v){return xp(i,v,[],[])}));function HE(i,v){switch(i){case 0:return function(){return v.apply(this,arguments)};case 1:return function(b){return v.apply(this,arguments)};case 2:return function(b,S){return v.apply(this,arguments)};case 3:return function(b,S,D){return v.apply(this,arguments)};case 4:return function(b,S,D,z){return v.apply(this,arguments)};case 5:return function(b,S,D,z,G){return v.apply(this,arguments)};case 6:return function(b,S,D,z,G,R){return v.apply(this,arguments)};case 7:return function(b,S,D,z,G,R,P){return v.apply(this,arguments)};case 8:return function(b,S,D,z,G,R,P,T){return v.apply(this,arguments)};case 9:return function(b,S,D,z,G,R,P,T,te){return v.apply(this,arguments)};case 10:return function(b,S,D,z,G,R,P,T,te,oe){return v.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function $E(i,v,b){return function(){for(var S=[],D=0,z=i,G=0;G<v.length||D<arguments.length;){var R;G<v.length&&(!ct(v[G])||D>=arguments.length)?R=v[G]:(R=arguments[D],D+=1),S[G]=R,ct(R)||(z-=1),G+=1}return z<=0?b.apply(this,S):HE(z,$E(i,S,b))}}const sR=Number.isInteger||function(i){return i<<0===i};function kp(i){return Object.prototype.toString.call(i)==="[object String]"}const lR=en((function(i,v){var b=i<0?v.length+i:i;return kp(v)?v.charAt(b):v[b]})),uR=en((function(i,v){if(v!=null)return sR(i)?lR(i,v):v[i]}));function cR(i){return function v(b,S,D){switch(arguments.length){case 0:return v;case 1:return ct(b)?v:en((function(z,G){return i(b,z,G)}));case 2:return ct(b)&&ct(S)?v:ct(b)?en((function(z,G){return i(z,S,G)})):ct(S)?en((function(z,G){return i(b,z,G)})):Mt((function(z){return i(b,S,z)}));default:return ct(b)&&ct(S)&&ct(D)?v:ct(b)&&ct(S)?en((function(z,G){return i(z,G,D)})):ct(b)&&ct(D)?en((function(z,G){return i(z,S,G)})):ct(S)&&ct(D)?en((function(z,G){return i(b,z,G)})):ct(b)?Mt((function(z){return i(z,S,D)})):ct(S)?Mt((function(z){return i(b,z,D)})):ct(D)?Mt((function(z){return i(b,S,z)})):i(b,S,D)}}}const fR=Mt((function(i){return!!Ta(i)||!!i&&typeof i=="object"&&!kp(i)&&(i.length===0||i.length>0&&i.hasOwnProperty(0)&&i.hasOwnProperty(i.length-1))}));var VE=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function dR(i,v,b){return function(S,D,z){if(fR(z))return i(S,D,z);if(z==null)return D;if(typeof z["fantasy-land/reduce"]=="function")return v(S,D,z,"fantasy-land/reduce");if(z[VE]!=null)return b(S,D,z[VE]());if(typeof z.next=="function")return b(S,D,z);if(typeof z.reduce=="function")return v(S,D,z,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function hR(i,v,b){for(var S=0,D=b.length;S<D;){if((v=i["@@transducer/step"](v,b[S]))&&v["@@transducer/reduced"]){v=v["@@transducer/value"];break}S+=1}return i["@@transducer/result"](v)}const pR=en((function(i,v){return HE(i.length,(function(){return i.apply(v,arguments)}))}));function vR(i,v,b){for(var S=b.next();!S.done;){if((v=i["@@transducer/step"](v,S.value))&&v["@@transducer/reduced"]){v=v["@@transducer/value"];break}S=b.next()}return i["@@transducer/result"](v)}function gR(i,v,b,S){return i["@@transducer/result"](b[S](pR(i["@@transducer/step"],i),v))}const yR=dR(hR,gR,vR);var mR=(function(){function i(v){this.f=v}return i.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},i.prototype["@@transducer/result"]=function(v){return v},i.prototype["@@transducer/step"]=function(v,b){return this.f(v,b)},i})();function Ca(i,v,b){if(b||(b=new bR),D=typeof(S=i),S==null||D!="object"&&D!="function")return i;var S,D,z,G=function(R){var P=b.get(i);if(P)return P;for(var T in b.set(i,R),i)Object.prototype.hasOwnProperty.call(i,T)&&(R[T]=v?Ca(i[T],!0,b):i[T]);return R};switch(Sp(i)){case"Object":return G(Object.create(Object.getPrototypeOf(i)));case"Array":return G([]);case"Date":return new Date(i.valueOf());case"RegExp":return z=i,new RegExp(z.source,z.flags?z.flags:(z.global?"g":"")+(z.ignoreCase?"i":"")+(z.multiline?"m":"")+(z.sticky?"y":"")+(z.unicode?"u":"")+(z.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return i.slice();default:return i}}var bR=(function(){function i(){this.map={},this.length=0}return i.prototype.set=function(v,b){const S=this.hash(v);let D=this.map[S];D||(this.map[S]=D=[]),D.push([v,b]),this.length+=1},i.prototype.hash=function(v){let b=[];for(var S in v)b.push(Object.prototype.toString.call(v[S]));return b.join()},i.prototype.get=function(v){if(this.length<=180){for(const D in this.map){const z=this.map[D];for(let G=0;G<z.length;G+=1){const R=z[G];if(R[0]===v)return R[1]}}return}const b=this.hash(v),S=this.map[b];if(S)for(let D=0;D<S.length;D+=1){const z=S[D];if(z[0]===v)return z[1]}},i})();const _R=Mt((function(i){return i!=null&&typeof i.clone=="function"?i.clone():Ca(i,!0)}));function wR(i,v){return function(){var b=arguments.length;if(b===0)return v();var S=arguments[b-1];return Ta(S)||typeof S[i]!="function"?v.apply(this,arguments):S[i].apply(S,Array.prototype.slice.call(arguments,0,b-1))}}function UE(i){return i&&i["@@transducer/reduced"]?i:{"@@transducer/value":i,"@@transducer/reduced":!0}}var OR=(function(){function i(v,b,S,D){this.valueFn=v,this.valueAcc=b,this.keyFn=S,this.xf=D,this.inputs={}}return i.prototype["@@transducer/init"]=IE,i.prototype["@@transducer/result"]=function(v){var b;for(b in this.inputs)if(Wr(b,this.inputs)&&(v=this.xf["@@transducer/step"](v,this.inputs[b]))["@@transducer/reduced"]){v=v["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](v)},i.prototype["@@transducer/step"]=function(v,b){var S=this.keyFn(b);return this.inputs[S]=this.inputs[S]||[S,Ca(this.valueAcc,!1)],this.inputs[S][1]=this.valueFn(this.inputs[S][1],b),v},i})();function ER(i,v,b){return function(S){return new OR(i,v,b,S)}}const SR=$E(4,[],PE([],ER,(function(i,v,b,S){var D=new mR((function(z,G){var R=b(G),P=i(Wr(R,z)?z[R]:Ca(v,!1),G);return P&&P["@@transducer/reduced"]?UE(z):(z[R]=P,z)}));return yR(D,{},S)}))),xR=Mt((function(i){return i!=null&&typeof i["fantasy-land/empty"]=="function"?i["fantasy-land/empty"]():i!=null&&i.constructor!=null&&typeof i.constructor["fantasy-land/empty"]=="function"?i.constructor["fantasy-land/empty"]():i!=null&&typeof i.empty=="function"?i.empty():i!=null&&i.constructor!=null&&typeof i.constructor.empty=="function"?i.constructor.empty():Ta(i)?[]:kp(i)?"":(function(S){return Object.prototype.toString.call(S)==="[object Object]"})(i)?{}:RE(i)?(function(){return arguments})():(v=i,(b=Object.prototype.toString.call(v))==="[object Uint8ClampedArray]"||b==="[object Int8Array]"||b==="[object Uint8Array]"||b==="[object Int16Array]"||b==="[object Uint16Array]"||b==="[object Int32Array]"||b==="[object Uint32Array]"||b==="[object Float32Array]"||b==="[object Float64Array]"||b==="[object BigInt64Array]"||b==="[object BigUint64Array]"?i.constructor.from(""):void 0);var v,b}));var kR=(function(){function i(v,b){this.xf=b,this.f=v,this.found=!1}return i.prototype["@@transducer/init"]=IE,i.prototype["@@transducer/result"]=function(v){return this.found||(v=this.xf["@@transducer/step"](v,void 0)),this.xf["@@transducer/result"](v)},i.prototype["@@transducer/step"]=function(v,b){return this.f(b)&&(this.found=!0,v=UE(this.xf["@@transducer/step"](v,b))),v},i})();function NR(i){return function(v){return new kR(i,v)}}const Aa=en(PE(["find"],NR,(function(i,v){for(var b=0,S=v.length;b<S;){if(i(v[b]))return v[b];b+=1}}))),TR=en(wR("groupBy",SR((function(i,v){return i.push(v),i}),[]))),GE=Mt((function(i){return i!=null&&zE(i,xR(i))})),Np=Mt((function(i){return i==null})),Pa=cR((function(i,v,b){return zE(i,uR(v,b))}));var CR=["className","cssModule","color","innerRef","pill","tag"];function Tp(){return Tp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Tp.apply(this,arguments)}var AR={children:k().node,className:k().string,color:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().func,k().string]),pill:k().bool,tag:X};function KE(i){var v=i.className,b=i.cssModule,S=i.color,D=S===void 0?"secondary":S,z=i.innerRef,G=i.pill,R=G!==void 0&&G,P=i.tag,T=P===void 0?"span":P,te=(function(U,J){if(U==null)return{};var Y,ie,ae=(function(fe,ve){if(fe==null)return{};var he,ye,be={},_e=Object.keys(fe);for(ye=0;ye<_e.length;ye++)he=_e[ye],ve.indexOf(he)>=0||(be[he]=fe[he]);return be})(U,J);if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(U);for(ie=0;ie<ce.length;ie++)Y=ce[ie],J.indexOf(Y)>=0||Object.prototype.propertyIsEnumerable.call(U,Y)&&(ae[Y]=U[Y])}return ae})(i,CR),oe=K(V()(v,"badge","bg-"+D,!!R&&"rounded-pill"),b);return te.href&&T==="span"&&(T="a"),u().createElement(T,Tp({},te,{className:oe,ref:z}))}KE.propTypes=AR;const WE=KE;function Cp(i){return Cp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},Cp(i)}var PR=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Ap(){return Ap=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Ap.apply(this,arguments)}function IR(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,S.key,S)}}function Pp(i,v){return Pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,S){return b.__proto__=S,b},Pp(i,v)}function Ip(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ia(i){return Ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Ia(i)}var MR={children:k().node,type:k().string,size:k().oneOfType([k().number,k().string]),bsSize:k().string,valid:k().bool,invalid:k().bool,tag:X,innerRef:k().oneOfType([k().object,k().func,k().string]),plaintext:k().bool,addon:k().bool,className:k().string,cssModule:k().object},YE=(function(i){(function(R,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(P&&P.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),P&&Pp(R,P)})(G,i);var v,b,S,D,z=(S=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var R,P=Ia(S);if(D){var T=Ia(this).constructor;R=Reflect.construct(P,arguments,T)}else R=P.apply(this,arguments);return(function(te,oe){if(oe&&(Cp(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ip(te)})(this,R)});function G(R){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=z.call(this,R)).getRef=P.getRef.bind(Ip(P)),P.focus=P.focus.bind(Ip(P)),P}return v=G,b=[{key:"getRef",value:function(R){this.props.innerRef&&this.props.innerRef(R),this.ref=R}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var R=this.props,P=R.className,T=R.cssModule,te=R.type,oe=te===void 0?"text":te,U=R.bsSize,J=R.valid,Y=R.invalid,ie=R.tag,ae=R.addon,ce=R.plaintext,fe=R.innerRef,ve=(function(Te,De){if(Te==null)return{};var Le,Re,$e=(function(Ue,at){if(Ue==null)return{};var Qe,ut,tt={},ht=Object.keys(Ue);for(ut=0;ut<ht.length;ut++)Qe=ht[ut],at.indexOf(Qe)>=0||(tt[Qe]=Ue[Qe]);return tt})(Te,De);if(Object.getOwnPropertySymbols){var Ve=Object.getOwnPropertySymbols(Te);for(Re=0;Re<Ve.length;Re++)Le=Ve[Re],De.indexOf(Le)>=0||Object.prototype.propertyIsEnumerable.call(Te,Le)&&($e[Le]=Te[Le])}return $e})(R,PR),he=["switch","radio","checkbox"].indexOf(oe)>-1,ye=oe==="select",be=oe==="range",_e=ie||(ye||oe==="textarea"?oe:"input"),Se="form-control";ce?(Se="".concat(Se,"-plaintext"),_e=ie||"input"):be?Se="form-range":ye?Se="form-select":he&&(Se=ae?null:"form-check-input"),ve.size&&/\D/g.test(ve.size)&&(Q(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),U=ve.size,delete ve.size);var Me=K(V()(P,Y&&"is-invalid",J&&"is-valid",!!U&&(ye?"form-select-".concat(U):"form-control-".concat(U)),Se),T);return(_e==="input"||ie&&typeof ie=="function")&&(ve.type=oe==="switch"?"checkbox":oe),ve.children&&!ce&&oe!=="select"&&typeof _e=="string"&&_e!=="select"&&(Q('Input with a type of "'.concat(oe,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete ve.children),u().createElement(_e,Ap({},ve,{ref:fe,className:Me,"aria-invalid":Y}))}}],b&&IR(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);YE.propTypes=MR;const Yr=YE;var qR=["className","cssModule","valid","tooltip","tag"];function Mp(){return Mp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Mp.apply(this,arguments)}var LR={children:k().node,tag:X,className:k().string,cssModule:k().object,valid:k().bool,tooltip:k().bool};function ZE(i){var v=i.className,b=i.cssModule,S=i.valid,D=S===void 0?void 0:S,z=i.tooltip,G=i.tag,R=G===void 0?"div":G,P=(function(oe,U){if(oe==null)return{};var J,Y,ie=(function(ce,fe){if(ce==null)return{};var ve,he,ye={},be=Object.keys(ce);for(he=0;he<be.length;he++)ve=be[he],fe.indexOf(ve)>=0||(ye[ve]=ce[ve]);return ye})(oe,U);if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],U.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(oe,J)&&(ie[J]=oe[J])}return ie})(i,qR),T=z?"tooltip":"feedback",te=K(V()(v,D?"valid-".concat(T):"invalid-".concat(T)),b);return u().createElement(R,Mp({},P,{className:te}))}ZE.propTypes=LR;const Ko=ZE;function Be(){return Be=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Be.apply(this,arguments)}function hr(i){return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},hr(i)}function XE(i){var v=(function(b,S){if(hr(b)!=="object"||b===null)return b;var D=b[Symbol.toPrimitive];if(D!==void 0){var z=D.call(b,"string");if(hr(z)!=="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)})(i);return hr(v)==="symbol"?v:String(v)}function Wo(i,v,b){return(v=XE(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function QE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function Fe(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?QE(Object(b),!0).forEach((function(S){Wo(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):QE(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function JE(i,v){for(var b=0;b<v.length;b++){var S=v[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(i,XE(S.key),S)}}function Ma(i){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Ma(i)}function qp(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Lp(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,S=new Array(v);b<v;b++)S[b]=i[b];return S}function eS(i,v){if(i){if(typeof i=="string")return Lp(i,v);var b=Object.prototype.toString.call(i).slice(8,-1);return b==="Object"&&i.constructor&&(b=i.constructor.name),b==="Map"||b==="Set"?Array.from(i):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?Lp(i,v):void 0}}function Yo(i){return(function(v){if(Array.isArray(v))return Lp(v)})(i)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(i)||eS(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var RR=(function(){function i(b){var S=this;this._insertTag=function(D){var z;z=S.tags.length===0?S.insertionPoint?S.insertionPoint.nextSibling:S.prepend?S.container.firstChild:S.before:S.tags[S.tags.length-1].nextSibling,S.container.insertBefore(D,z),S.tags.push(D)},this.isSpeedy=b.speedy===void 0||b.speedy,this.tags=[],this.ctr=0,this.nonce=b.nonce,this.key=b.key,this.container=b.container,this.prepend=b.prepend,this.insertionPoint=b.insertionPoint,this.before=null}var v=i.prototype;return v.hydrate=function(b){b.forEach(this._insertTag)},v.insert=function(b){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((function(z){var G=document.createElement("style");return G.setAttribute("data-emotion",z.key),z.nonce!==void 0&&G.setAttribute("nonce",z.nonce),G.appendChild(document.createTextNode("")),G.setAttribute("data-s",""),G})(this));var S=this.tags[this.tags.length-1];if(this.isSpeedy){var D=(function(z){if(z.sheet)return z.sheet;for(var G=0;G<document.styleSheets.length;G++)if(document.styleSheets[G].ownerNode===z)return document.styleSheets[G]})(S);try{D.insertRule(b,D.cssRules.length)}catch{}}else S.appendChild(document.createTextNode(b));this.ctr++},v.flush=function(){this.tags.forEach((function(b){return b.parentNode&&b.parentNode.removeChild(b)})),this.tags=[],this.ctr=0},i})(),DR=Math.abs,qa=String.fromCharCode,jR=Object.assign;function tS(i){return i.trim()}function Je(i,v,b){return i.replace(v,b)}function Rp(i,v){return i.indexOf(v)}function Ct(i,v){return 0|i.charCodeAt(v)}function Zo(i,v,b){return i.slice(v,b)}function bn(i){return i.length}function Dp(i){return i.length}function La(i,v){return v.push(i),i}var Ra=1,Zr=1,nS=0,Bt=0,mt=0,Xr="";function Da(i,v,b,S,D,z,G){return{value:i,root:v,parent:b,type:S,props:D,children:z,line:Ra,column:Zr,length:G,return:""}}function Xo(i,v){return jR(Da("",null,null,"",null,null,0),i,{length:-i.length},v)}function FR(){return mt=Bt>0?Ct(Xr,--Bt):0,Zr--,mt===10&&(Zr=1,Ra--),mt}function $t(){return mt=Bt<nS?Ct(Xr,Bt++):0,Zr++,mt===10&&(Zr=1,Ra++),mt}function _n(){return Ct(Xr,Bt)}function ja(){return Bt}function Qo(i,v){return Zo(Xr,i,v)}function Jo(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rS(i){return Ra=Zr=1,nS=bn(Xr=i),Bt=0,[]}function oS(i){return Xr="",i}function Fa(i){return tS(Qo(Bt-1,jp(i===91?i+2:i===40?i+1:i)))}function BR(i){for(;(mt=_n())&&mt<33;)$t();return Jo(i)>2||Jo(mt)>3?"":" "}function zR(i,v){for(;--v&&$t()&&!(mt<48||mt>102||mt>57&&mt<65||mt>70&&mt<97););return Qo(i,ja()+(v<6&&_n()==32&&$t()==32))}function jp(i){for(;$t();)switch(mt){case i:return Bt;case 34:case 39:i!==34&&i!==39&&jp(mt);break;case 40:i===41&&jp(i);break;case 92:$t()}return Bt}function HR(i,v){for(;$t()&&i+mt!==57&&(i+mt!==84||_n()!==47););return"/*"+Qo(v,Bt-1)+"*"+qa(i===47?i:$t())}function $R(i){for(;!Jo(_n());)$t();return Qo(i,Bt)}var At="-ms-",iS="-moz-",et="-webkit-",aS="comm",Fp="rule",Bp="decl",sS="@keyframes";function Qr(i,v){for(var b="",S=Dp(i),D=0;D<S;D++)b+=v(i[D],D,i,v)||"";return b}function VR(i,v,b,S){switch(i.type){case"@layer":if(i.children.length)break;case"@import":case Bp:return i.return=i.return||i.value;case aS:return"";case sS:return i.return=i.value+"{"+Qr(i.children,S)+"}";case Fp:i.value=i.props.join(",")}return bn(b=Qr(i.children,S))?i.return=i.value+"{"+b+"}":""}function UR(i){return oS(Ba("",null,null,null,[""],i=rS(i),0,[0],i))}function Ba(i,v,b,S,D,z,G,R,P){for(var T=0,te=0,oe=G,U=0,J=0,Y=0,ie=1,ae=1,ce=1,fe=0,ve="",he=D,ye=z,be=S,_e=ve;ae;)switch(Y=fe,fe=$t()){case 40:if(Y!=108&&Ct(_e,oe-1)==58){Rp(_e+=Je(Fa(fe),"&","&\f"),"&\f")!=-1&&(ce=-1);break}case 34:case 39:case 91:_e+=Fa(fe);break;case 9:case 10:case 13:case 32:_e+=BR(Y);break;case 92:_e+=zR(ja()-1,7);continue;case 47:switch(_n()){case 42:case 47:La(GR(HR($t(),ja()),v,b),P);break;default:_e+="/"}break;case 123*ie:R[T++]=bn(_e)*ce;case 125*ie:case 59:case 0:switch(fe){case 0:case 125:ae=0;case 59+te:ce==-1&&(_e=Je(_e,/\f/g,"")),J>0&&bn(_e)-oe&&La(J>32?uS(_e+";",S,b,oe-1):uS(Je(_e," ","")+";",S,b,oe-2),P);break;case 59:_e+=";";default:if(La(be=lS(_e,v,b,T,te,D,R,ve,he=[],ye=[],oe),z),fe===123)if(te===0)Ba(_e,v,be,be,he,z,oe,R,ye);else switch(U===99&&Ct(_e,3)===110?100:U){case 100:case 108:case 109:case 115:Ba(i,be,be,S&&La(lS(i,be,be,0,0,D,R,ve,D,he=[],oe),ye),D,ye,oe,R,S?he:ye);break;default:Ba(_e,be,be,be,[""],ye,0,R,ye)}}T=te=J=0,ie=ce=1,ve=_e="",oe=G;break;case 58:oe=1+bn(_e),J=Y;default:if(ie<1){if(fe==123)--ie;else if(fe==125&&ie++==0&&FR()==125)continue}switch(_e+=qa(fe),fe*ie){case 38:ce=te>0?1:(_e+="\f",-1);break;case 44:R[T++]=(bn(_e)-1)*ce,ce=1;break;case 64:_n()===45&&(_e+=Fa($t())),U=_n(),te=oe=bn(ve=_e+=$R(ja())),fe++;break;case 45:Y===45&&bn(_e)==2&&(ie=0)}}return z}function lS(i,v,b,S,D,z,G,R,P,T,te){for(var oe=D-1,U=D===0?z:[""],J=Dp(U),Y=0,ie=0,ae=0;Y<S;++Y)for(var ce=0,fe=Zo(i,oe+1,oe=DR(ie=G[Y])),ve=i;ce<J;++ce)(ve=tS(ie>0?U[ce]+" "+fe:Je(fe,/&\f/g,U[ce])))&&(P[ae++]=ve);return Da(i,v,b,D===0?Fp:R,P,T,te)}function GR(i,v,b){return Da(i,v,b,aS,qa(mt),Zo(i,2,-2),0)}function uS(i,v,b,S){return Da(i,v,b,Bp,Zo(i,0,S),Zo(i,S+1,-1),S)}var KR=function(i,v,b){for(var S=0,D=0;S=D,D=_n(),S===38&&D===12&&(v[b]=1),!Jo(D);)$t();return Qo(i,Bt)},cS=new WeakMap,WR=function(i){if(i.type==="rule"&&i.parent&&!(i.length<1)){for(var v=i.value,b=i.parent,S=i.column===b.column&&i.line===b.line;b.type!=="rule";)if(!(b=b.parent))return;if((i.props.length!==1||v.charCodeAt(0)===58||cS.get(b))&&!S){cS.set(i,!0);for(var D=[],z=(function(te,oe){return oS((function(U,J){var Y=-1,ie=44;do switch(Jo(ie)){case 0:ie===38&&_n()===12&&(J[Y]=1),U[Y]+=KR(Bt-1,J,Y);break;case 2:U[Y]+=Fa(ie);break;case 4:if(ie===44){U[++Y]=_n()===58?"&\f":"",J[Y]=U[Y].length;break}default:U[Y]+=qa(ie)}while(ie=$t());return U})(rS(te),oe))})(v,D),G=b.props,R=0,P=0;R<z.length;R++)for(var T=0;T<G.length;T++,P++)i.props[P]=D[R]?z[R].replace(/&\f/g,G[T]):G[T]+" "+z[R]}}},YR=function(i){if(i.type==="decl"){var v=i.value;v.charCodeAt(0)===108&&v.charCodeAt(2)===98&&(i.return="",i.value="")}};function fS(i,v){switch((function(b,S){return 45^Ct(b,0)?(((S<<2^Ct(b,0))<<2^Ct(b,1))<<2^Ct(b,2))<<2^Ct(b,3):0})(i,v)){case 5103:return et+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return et+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return et+i+iS+i+At+i+i;case 6828:case 4268:return et+i+At+i+i;case 6165:return et+i+At+"flex-"+i+i;case 5187:return et+i+Je(i,/(\w+).+(:[^]+)/,et+"box-$1$2"+At+"flex-$1$2")+i;case 5443:return et+i+At+"flex-item-"+Je(i,/flex-|-self/,"")+i;case 4675:return et+i+At+"flex-line-pack"+Je(i,/align-content|flex-|-self/,"")+i;case 5548:return et+i+At+Je(i,"shrink","negative")+i;case 5292:return et+i+At+Je(i,"basis","preferred-size")+i;case 6060:return et+"box-"+Je(i,"-grow","")+et+i+At+Je(i,"grow","positive")+i;case 4554:return et+Je(i,/([^-])(transform)/g,"$1"+et+"$2")+i;case 6187:return Je(Je(Je(i,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),i,"")+i;case 5495:case 3959:return Je(i,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return Je(Je(i,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+At+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+i+i;case 4095:case 3583:case 4068:case 2532:return Je(i,/(.+)-inline(.+)/,et+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(bn(i)-1-v>6)switch(Ct(i,v+1)){case 109:if(Ct(i,v+4)!==45)break;case 102:return Je(i,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+iS+(Ct(i,v+3)==108?"$3":"$2-$3"))+i;case 115:return~Rp(i,"stretch")?fS(Je(i,"stretch","fill-available"),v)+i:i}break;case 4949:if(Ct(i,v+1)!==115)break;case 6444:switch(Ct(i,bn(i)-3-(~Rp(i,"!important")&&10))){case 107:return Je(i,":",":"+et)+i;case 101:return Je(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(Ct(i,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+At+"$2box$3")+i}break;case 5936:switch(Ct(i,v+11)){case 114:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return et+i+At+i+i}return i}var ZR=[function(i,v,b,S){if(i.length>-1&&!i.return)switch(i.type){case Bp:i.return=fS(i.value,i.length);break;case sS:return Qr([Xo(i,{value:Je(i.value,"@","@"+et)})],S);case Fp:if(i.length)return(function(D,z){return D.map(z).join("")})(i.props,(function(D){switch((function(z,G){return(z=/(::plac\w+|:read-\w+)/.exec(z))?z[0]:z})(D)){case":read-only":case":read-write":return Qr([Xo(i,{props:[Je(D,/:(read-\w+)/,":-moz-$1")]})],S);case"::placeholder":return Qr([Xo(i,{props:[Je(D,/:(plac\w+)/,":"+et+"input-$1")]}),Xo(i,{props:[Je(D,/:(plac\w+)/,":-moz-$1")]}),Xo(i,{props:[Je(D,/:(plac\w+)/,At+"input-$1")]})],S)}return""}))}}],XR=function(i){var v=i.key;if(v==="css"){var b=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(b,(function(ie){ie.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(ie),ie.setAttribute("data-s",""))}))}var S,D,z=i.stylisPlugins||ZR,G={},R=[];S=i.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+v+' "]'),(function(ie){for(var ae=ie.getAttribute("data-emotion").split(" "),ce=1;ce<ae.length;ce++)G[ae[ce]]=!0;R.push(ie)}));var P,T,te,oe,U=[VR,(T=function(ie){P.insert(ie)},function(ie){ie.root||(ie=ie.return)&&T(ie)})],J=(te=[WR,YR].concat(z,U),oe=Dp(te),function(ie,ae,ce,fe){for(var ve="",he=0;he<oe;he++)ve+=te[he](ie,ae,ce,fe)||"";return ve});D=function(ie,ae,ce,fe){P=ce,Qr(UR(ie?ie+"{"+ae.styles+"}":ae.styles),J),fe&&(Y.inserted[ae.name]=!0)};var Y={key:v,sheet:new RR({key:v,container:S,nonce:i.nonce,speedy:i.speedy,prepend:i.prepend,insertionPoint:i.insertionPoint}),nonce:i.nonce,inserted:G,registered:{},insert:D};return Y.sheet.hydrate(R),Y},dS=function(i,v,b){var S=i.key+"-"+v.name;b===!1&&i.registered[S]===void 0&&(i.registered[S]=v.styles)},QR={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function JR(i){var v=Object.create(null);return function(b){return v[b]===void 0&&(v[b]=i(b)),v[b]}}var e5=/[A-Z]|^ms/g,t5=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hS=function(i){return i.charCodeAt(1)===45},pS=function(i){return i!=null&&typeof i!="boolean"},zp=JR((function(i){return hS(i)?i:i.replace(e5,"-$&").toLowerCase()})),vS=function(i,v){switch(i){case"animation":case"animationName":if(typeof v=="string")return v.replace(t5,(function(b,S,D){return wn={name:S,styles:D,next:wn},S}))}return QR[i]===1||hS(i)||typeof v!="number"||v===0?v:v+"px"};function ei(i,v,b){if(b==null)return"";if(b.__emotion_styles!==void 0)return b;switch(typeof b){case"boolean":return"";case"object":if(b.anim===1)return wn={name:b.name,styles:b.styles,next:wn},b.name;if(b.styles!==void 0){var S=b.next;if(S!==void 0)for(;S!==void 0;)wn={name:S.name,styles:S.styles,next:wn},S=S.next;return b.styles+";"}return(function(G,R,P){var T="";if(Array.isArray(P))for(var te=0;te<P.length;te++)T+=ei(G,R,P[te])+";";else for(var oe in P){var U=P[oe];if(typeof U!="object")pS(U)&&(T+=zp(oe)+":"+vS(oe,U)+";");else if(!Array.isArray(U)||typeof U[0]!="string"||R!=null){var J=ei(G,R,U);switch(oe){case"animation":case"animationName":T+=zp(oe)+":"+J+";";break;default:T+=oe+"{"+J+"}"}}else for(var Y=0;Y<U.length;Y++)pS(U[Y])&&(T+=zp(oe)+":"+vS(oe,U[Y])+";")}return T})(i,v,b);case"function":if(i!==void 0){var D=wn,z=b(i);return wn=D,ei(i,v,z)}}return b}var wn,gS=/label:\s*([^\s;\n{]+)\s*(;|$)/g,yS=function(i,v,b){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var S=!0,D="";wn=void 0;var z=i[0];z==null||z.raw===void 0?(S=!1,D+=ei(b,v,z)):D+=z[0];for(var G=1;G<i.length;G++)D+=ei(b,v,i[G]),S&&(D+=z[G]);gS.lastIndex=0;for(var R,P="";(R=gS.exec(D))!==null;)P+="-"+R[1];var T=(function(te){for(var oe,U=0,J=0,Y=te.length;Y>=4;++J,Y-=4)oe=1540483477*(65535&(oe=255&te.charCodeAt(J)|(255&te.charCodeAt(++J))<<8|(255&te.charCodeAt(++J))<<16|(255&te.charCodeAt(++J))<<24))+(59797*(oe>>>16)<<16),U=1540483477*(65535&(oe^=oe>>>24))+(59797*(oe>>>16)<<16)^1540483477*(65535&U)+(59797*(U>>>16)<<16);switch(Y){case 3:U^=(255&te.charCodeAt(J+2))<<16;case 2:U^=(255&te.charCodeAt(J+1))<<8;case 1:U=1540483477*(65535&(U^=255&te.charCodeAt(J)))+(59797*(U>>>16)<<16)}return(((U=1540483477*(65535&(U^=U>>>13))+(59797*(U>>>16)<<16))^U>>>15)>>>0).toString(36)})(D)+P;return{name:T,styles:D,next:wn}},mS=!!a.useInsertionEffect&&a.useInsertionEffect,n5=mS||function(i){return i()},Hp=(mS||a.useLayoutEffect,{}.hasOwnProperty),bS=a.createContext(typeof HTMLElement<"u"?XR({key:"css"}):null);bS.Provider;var r5=function(i){return(0,a.forwardRef)((function(v,b){var S=(0,a.useContext)(bS);return i(v,S,b)}))},o5=a.createContext({}),$p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",i5=function(i){var v=i.cache,b=i.serialized,S=i.isStringTag;return dS(v,b,S),n5((function(){return(function(D,z,G){dS(D,z,G);var R=D.key+"-"+z.name;if(D.inserted[z.name]===void 0){var P=z;do D.insert(z===P?"."+R:"",P,D.sheet,!0),P=P.next;while(P!==void 0)}})(v,b,S)})),null},a5=r5((function(i,v,b){var S=i.css;typeof S=="string"&&v.registered[S]!==void 0&&(S=v.registered[S]);var D=i[$p],z=[S],G="";typeof i.className=="string"?G=(function(te,oe,U){var J="";return U.split(" ").forEach((function(Y){te[Y]!==void 0?oe.push(te[Y]+";"):J+=Y+" "})),J})(v.registered,z,i.className):i.className!=null&&(G=i.className+" ");var R=yS(z,void 0,a.useContext(o5));G+=v.key+"-"+R.name;var P={};for(var T in i)Hp.call(i,T)&&T!=="css"&&T!==$p&&(P[T]=i[T]);return P.ref=b,P.className=G,a.createElement(a.Fragment,null,a.createElement(i5,{cache:v,serialized:R,isStringTag:typeof D=="string"}),a.createElement(D,P))})),s5=a5,He=(l(679),function(i,v){var b=arguments;if(v==null||!Hp.call(v,"css"))return a.createElement.apply(void 0,b);var S=b.length,D=new Array(S);D[0]=s5,D[1]=(function(G,R){var P={};for(var T in R)Hp.call(R,T)&&(P[T]=R[T]);return P[$p]=G,P})(i,v);for(var z=2;z<S;z++)D[z]=b[z];return a.createElement.apply(null,D)});function Vp(){for(var i=arguments.length,v=new Array(i),b=0;b<i;b++)v[b]=arguments[b];return yS(v)}function Ln(i,v){return(function(b){if(Array.isArray(b))return b})(i)||(function(b,S){var D=b==null?null:typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(D!=null){var z,G,R,P,T=[],te=!0,oe=!1;try{if(R=(D=D.call(b)).next,S===0){if(Object(D)!==D)return;te=!1}else for(;!(te=(z=R.call(D)).done)&&(T.push(z.value),T.length!==S);te=!0);}catch(U){oe=!0,G=U}finally{try{if(!te&&D.return!=null&&(P=D.return(),Object(P)!==P))return}finally{if(oe)throw G}}return T}})(i,v)||eS(i,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function On(i,v){if(i==null)return{};var b,S,D=tE(i,v);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(i);for(S=0;S<z.length;S++)b=z[S],v.indexOf(b)>=0||Object.prototype.propertyIsEnumerable.call(i,b)&&(D[b]=i[b])}return D}const l5=Math.min,u5=Math.max,za=Math.round,Ha=Math.floor,Up=i=>({x:i,y:i});function _S(i){return OS(i)?(i.nodeName||"").toLowerCase():"#document"}function Un(i){var v;return(i==null||(v=i.ownerDocument)==null?void 0:v.defaultView)||window}function wS(i){var v;return(v=(OS(i)?i.ownerDocument:i.document)||window.document)==null?void 0:v.documentElement}function OS(i){return i instanceof Node||i instanceof Un(i).Node}function c5(i){return i instanceof Element||i instanceof Un(i).Element}function Gp(i){return i instanceof HTMLElement||i instanceof Un(i).HTMLElement}function ES(i){return typeof ShadowRoot<"u"&&(i instanceof ShadowRoot||i instanceof Un(i).ShadowRoot)}function SS(i){const{overflow:v,overflowX:b,overflowY:S,display:D}=Kp(i);return/auto|scroll|overlay|hidden|clip/.test(v+S+b)&&!["inline","contents"].includes(D)}function Kp(i){return Un(i).getComputedStyle(i)}function xS(i){const v=(function(b){if(_S(b)==="html")return b;const S=b.assignedSlot||b.parentNode||ES(b)&&b.host||wS(b);return ES(S)?S.host:S})(i);return(function(b){return["html","body","#document"].includes(_S(b))})(v)?i.ownerDocument?i.ownerDocument.body:i.body:Gp(v)&&SS(v)?v:xS(v)}function Wp(i,v){var b;v===void 0&&(v=[]);const S=xS(i),D=S===((b=i.ownerDocument)==null?void 0:b.body),z=Un(S);return D?v.concat(z,z.visualViewport||[],SS(S)?S:[]):v.concat(S,Wp(S))}function Yp(i){return c5(i)?i:i.contextElement}function kS(i){const v=Yp(i);if(!Gp(v))return Up(1);const b=v.getBoundingClientRect(),{width:S,height:D,$:z}=(function(P){const T=Kp(P);let te=parseFloat(T.width)||0,oe=parseFloat(T.height)||0;const U=Gp(P),J=U?P.offsetWidth:te,Y=U?P.offsetHeight:oe,ie=za(te)!==J||za(oe)!==Y;return ie&&(te=J,oe=Y),{width:te,height:oe,$:ie}})(v);let G=(z?za(b.width):b.width)/S,R=(z?za(b.height):b.height)/D;return G&&Number.isFinite(G)||(G=1),R&&Number.isFinite(R)||(R=1),{x:G,y:R}}function NS(i,v,b,S){v===void 0&&(v=!1);const D=i.getBoundingClientRect(),z=Yp(i);let G=Up(1);v&&(G=kS(i));const R=Up(0);let P=(D.left+R.x)/G.x,T=(D.top+R.y)/G.y,te=D.width/G.x,oe=D.height/G.y;if(z){const J=Un(z),Y=S;let ie=J.frameElement;for(;ie&&S&&Y!==J;){const ae=kS(ie),ce=ie.getBoundingClientRect(),fe=Kp(ie),ve=ce.left+(ie.clientLeft+parseFloat(fe.paddingLeft))*ae.x,he=ce.top+(ie.clientTop+parseFloat(fe.paddingTop))*ae.y;P*=ae.x,T*=ae.y,te*=ae.x,oe*=ae.y,P+=ve,T+=he,ie=Un(ie).frameElement}}return U={width:te,height:oe,x:P,y:T},{...U,top:U.y,left:U.x,right:U.x+U.width,bottom:U.y+U.height};var U}const Zp=a.useLayoutEffect;var f5=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],$a=function(){};function d5(i,v){return v?v[0]==="-"?i+v:i+"__"+v:i}function h5(i,v){for(var b=arguments.length,S=new Array(b>2?b-2:0),D=2;D<b;D++)S[D-2]=arguments[D];var z=[].concat(S);if(v&&i)for(var G in v)v.hasOwnProperty(G)&&v[G]&&z.push("".concat(d5(i,G)));return z.filter((function(R){return R})).map((function(R){return String(R).trim()})).join(" ")}var Va=function(i){return v=i,Array.isArray(v)?i.filter(Boolean):hr(i)==="object"&&i!==null?[i]:[];var v},TS=function(i){return i.className,i.clearValue,i.cx,i.getStyles,i.getClassNames,i.getValue,i.hasValue,i.isMulti,i.isRtl,i.options,i.selectOption,i.selectProps,i.setValue,i.theme,Fe({},On(i,f5))},gt=function(i,v,b){var S=i.cx,D=i.getStyles,z=i.getClassNames,G=i.className;return{css:D(v,i),className:S(b??{},z(v,i),G)}};function Ua(i){return[document.documentElement,document.body,window].indexOf(i)>-1}function CS(i){return Ua(i)?window.pageYOffset:i.scrollTop}function Ga(i,v){Ua(i)?window.scrollTo(0,v):i.scrollTop=v}function Ka(i,v){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$a,D=CS(i),z=v-D,G=0;(function R(){var P,T=z*((P=(P=G+=10)/b-1)*P*P+1)+D;Ga(i,T),G<b?window.requestAnimationFrame(R):S(i)})()}function AS(i,v){var b=i.getBoundingClientRect(),S=v.getBoundingClientRect(),D=v.offsetHeight/3;S.bottom+D>b.bottom?Ga(i,Math.min(v.offsetTop+v.clientHeight-i.offsetHeight+D,i.scrollHeight)):S.top-D<b.top&&Ga(i,Math.max(v.offsetTop-D,0))}function PS(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var IS=!1,p5={get passive(){return IS=!0}},Wa=typeof window<"u"?window:{};Wa.addEventListener&&Wa.removeEventListener&&(Wa.addEventListener("p",$a,p5),Wa.removeEventListener("p",$a,!1));var v5=IS;function g5(i){return i!=null}function ti(i,v,b){return i?v:b}var y5=["children","innerProps"],m5=["children","innerProps"],MS,Xp,Qp,qS=function(i){return i==="auto"?"bottom":i},LS=(0,a.createContext)(null),b5=function(i){var v=i.children,b=i.minMenuHeight,S=i.maxMenuHeight,D=i.menuPlacement,z=i.menuPosition,G=i.menuShouldScrollIntoView,R=i.theme,P=((0,a.useContext)(LS)||{}).setPortalPlacement,T=(0,a.useRef)(null),te=Ln((0,a.useState)(S),2),oe=te[0],U=te[1],J=Ln((0,a.useState)(null),2),Y=J[0],ie=J[1],ae=R.spacing.controlHeight;return Zp((function(){var ce=T.current;if(ce){var fe=z==="fixed",ve=(function(he){var ye=he.maxHeight,be=he.menuEl,_e=he.minHeight,Se=he.placement,Me=he.shouldScroll,Te=he.isFixedPosition,De=he.controlHeight,Le=(function(Kn){var nn=getComputedStyle(Kn),Wn=nn.position==="absolute",hv=/(auto|scroll)/;if(nn.position==="fixed")return document.documentElement;for(var ts=Kn;ts=ts.parentElement;)if(nn=getComputedStyle(ts),(!Wn||nn.position!=="static")&&hv.test(nn.overflow+nn.overflowY+nn.overflowX))return ts;return document.documentElement})(be),Re={placement:"bottom",maxHeight:ye};if(!be||!be.offsetParent)return Re;var $e,Ve=Le.getBoundingClientRect().height,Ue=be.getBoundingClientRect(),at=Ue.bottom,Qe=Ue.height,ut=Ue.top,tt=be.offsetParent.getBoundingClientRect().top,ht=Te||Ua($e=Le)?window.innerHeight:$e.clientHeight,St=CS(Le),xt=parseInt(getComputedStyle(be).marginBottom,10),Ut=parseInt(getComputedStyle(be).marginTop,10),tn=tt-Ut,rt=ht-ut,qt=tn+St,Lt=Ve-St-ut,Pt=at-ht+St+xt,zt=St+ut-Ut,Gt=160;switch(Se){case"auto":case"bottom":if(rt>=Qe)return{placement:"bottom",maxHeight:ye};if(Lt>=Qe&&!Te)return Me&&Ka(Le,Pt,Gt),{placement:"bottom",maxHeight:ye};if(!Te&&Lt>=_e||Te&&rt>=_e)return Me&&Ka(Le,Pt,Gt),{placement:"bottom",maxHeight:Te?rt-xt:Lt-xt};if(Se==="auto"||Te){var Kt=ye,vr=Te?tn:qt;return vr>=_e&&(Kt=Math.min(vr-xt-De,ye)),{placement:"top",maxHeight:Kt}}if(Se==="bottom")return Me&&Ga(Le,Pt),{placement:"bottom",maxHeight:ye};break;case"top":if(tn>=Qe)return{placement:"top",maxHeight:ye};if(qt>=Qe&&!Te)return Me&&Ka(Le,zt,Gt),{placement:"top",maxHeight:ye};if(!Te&&qt>=_e||Te&&tn>=_e){var Gn=ye;return(!Te&&qt>=_e||Te&&tn>=_e)&&(Gn=Te?tn-Ut:qt-Ut),Me&&Ka(Le,zt,Gt),{placement:"top",maxHeight:Gn}}return{placement:"bottom",maxHeight:ye};default:throw new Error('Invalid placement provided "'.concat(Se,'".'))}return Re})({maxHeight:S,menuEl:ce,minHeight:b,placement:D,shouldScroll:G&&!fe,isFixedPosition:fe,controlHeight:ae});U(ve.maxHeight),ie(ve.placement),P?.(ve.placement)}}),[S,D,z,G,b,P,ae]),v({ref:T,placerProps:Fe(Fe({},i),{},{placement:Y||qS(D),maxHeight:oe})})},RS=function(i,v){var b=i.theme,S=b.spacing.baseUnit,D=b.colors;return Fe({textAlign:"center"},v?{}:{color:D.neutral40,padding:"".concat(2*S,"px ").concat(3*S,"px")})},_5=RS,w5=RS,O5=["size"],E5=["innerProps","isRtl","size"],S5={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},DS=function(i){var v=i.size,b=On(i,O5);return He("svg",Be({height:v,width:v,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:S5},b))},Jp=function(i){return He(DS,Be({size:20},i),He("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},jS=function(i){return He(DS,Be({size:20},i),He("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},FS=function(i,v){var b=i.isFocused,S=i.theme,D=S.spacing.baseUnit,z=S.colors;return Fe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},v?{}:{color:b?z.neutral60:z.neutral20,padding:2*D,":hover":{color:b?z.neutral80:z.neutral40}})},x5=FS,k5=FS,N5=(function(){var i=Vp.apply(void 0,arguments),v="animation-"+i.name;return{name:v,styles:"@keyframes "+v+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})(MS||(Xp=[`
17
+ */var G1;function J2(){if(G1)return $d;G1=1;var e=nt.default,t=Q2();function n(h,a){return h===a&&(h!==0||1/h===1/a)||h!==h&&a!==a}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return $d.useSyncExternalStoreWithSelector=function(h,a,u,d,p){var O=s(null);if(O.current===null){var g={hasValue:!1,value:null};O.current=g}else g=O.current;O=c(function(){function y(C){if(!w){if(w=!0,E=C,C=d(C),p!==void 0&&g.hasValue){var N=g.value;if(p(N,C))return m=N}return m=C}if(N=m,r(E,C))return N;var M=d(C);return p!==void 0&&p(N,M)?N:(E=C,m=M)}var w=!1,E,m,S=u===void 0?null:u;return[function(){return y(a())},S===null?void 0:function(){return y(S())}]},[a,u,d,p]);var _=o(h,O[0],O[1]);return l(function(){g.hasValue=!0,g.value=_},[_]),f(_),_},$d}var K1;function eT(){return K1||(K1=1,zd.exports=J2()),zd.exports}var tT=eT();const nT=ts(tT),rT={},W1=e=>{let t;const n=new Set,r=(f,h)=>{const a=typeof f=="function"?f(t):f;if(!Object.is(a,t)){const u=t;t=h??typeof a!="object"?a:Object.assign({},t,a),n.forEach(d=>d(t,u))}},o=()=>t,c={setState:r,getState:o,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(rT?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,c),c},oT=e=>e?W1(e):W1,{useSyncExternalStoreWithSelector:iT}=nT;function Y1(e,t=e.getState,n){const r=iT(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return se.useDebugValue(r),r}const Z1=(e,t)=>{const n=oT(e),r=(o,s=t)=>Y1(n,o,s);return Object.assign(r,n),r},aT=(e,t)=>e?Z1(e,t):Z1;function St(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var sT={value:()=>{}};function Si(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ki(n)}function ki(e){this._=e}function lT(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ki.prototype=Si.prototype={constructor:ki,on:function(e,t){var n=this._,r=lT(e+"",n),o,s=-1,l=r.length;if(arguments.length<2){for(;++s<l;)if((o=(e=r[s]).type)&&(o=uT(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<l;)if(o=(e=r[s]).type)n[o]=X1(n[o],e.name,t);else if(t==null)for(o in n)n[o]=X1(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ki(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,s;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,o=s.length;r<o;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,s=r.length;o<s;++o)r[o].value.apply(t,n)}};function uT(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function X1(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=sT,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ud="http://www.w3.org/1999/xhtml";const Q1={svg:"http://www.w3.org/2000/svg",xhtml:Ud,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Q1.hasOwnProperty(t)?{space:Q1[t],local:e}:e}function cT(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ud&&t.documentElement.namespaceURI===Ud?t.createElement(e):t.createElementNS(n,e)}}function fT(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function J1(e){var t=Ni(e);return(t.local?fT:cT)(t)}function dT(){}function Gd(e){return e==null?dT:function(){return this.querySelector(e)}}function hT(e){typeof e!="function"&&(e=Gd(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=new Array(l),f,h,a=0;a<l;++a)(f=s[a])&&(h=e.call(f,f.__data__,a,s))&&("__data__"in f&&(h.__data__=f.__data__),c[a]=h);return new $t(r,this._parents)}function pT(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function vT(){return[]}function e_(e){return e==null?vT:function(){return this.querySelectorAll(e)}}function gT(e){return function(){return pT(e.apply(this,arguments))}}function yT(e){typeof e=="function"?e=gT(e):e=e_(e);for(var t=this._groups,n=t.length,r=[],o=[],s=0;s<n;++s)for(var l=t[s],c=l.length,f,h=0;h<c;++h)(f=l[h])&&(r.push(e.call(f,f.__data__,h,l)),o.push(f));return new $t(r,o)}function t_(e){return function(){return this.matches(e)}}function n_(e){return function(t){return t.matches(e)}}var mT=Array.prototype.find;function bT(e){return function(){return mT.call(this.children,e)}}function _T(){return this.firstElementChild}function wT(e){return this.select(e==null?_T:bT(typeof e=="function"?e:n_(e)))}var OT=Array.prototype.filter;function ET(){return Array.from(this.children)}function xT(e){return function(){return OT.call(this.children,e)}}function ST(e){return this.selectAll(e==null?ET:xT(typeof e=="function"?e:n_(e)))}function kT(e){typeof e!="function"&&(e=t_(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=[],f,h=0;h<l;++h)(f=s[h])&&e.call(f,f.__data__,h,s)&&c.push(f);return new $t(r,this._parents)}function r_(e){return new Array(e.length)}function NT(){return new $t(this._enter||this._groups.map(r_),this._parents)}function Ti(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ti.prototype={constructor:Ti,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function TT(e){return function(){return e}}function CT(e,t,n,r,o,s){for(var l=0,c,f=t.length,h=s.length;l<h;++l)(c=t[l])?(c.__data__=s[l],r[l]=c):n[l]=new Ti(e,s[l]);for(;l<f;++l)(c=t[l])&&(o[l]=c)}function AT(e,t,n,r,o,s,l){var c,f,h=new Map,a=t.length,u=s.length,d=new Array(a),p;for(c=0;c<a;++c)(f=t[c])&&(d[c]=p=l.call(f,f.__data__,c,t)+"",h.has(p)?o[c]=f:h.set(p,f));for(c=0;c<u;++c)p=l.call(e,s[c],c,s)+"",(f=h.get(p))?(r[c]=f,f.__data__=s[c],h.delete(p)):n[c]=new Ti(e,s[c]);for(c=0;c<a;++c)(f=t[c])&&h.get(d[c])===f&&(o[c]=f)}function PT(e){return e.__data__}function IT(e,t){if(!arguments.length)return Array.from(this,PT);var n=t?AT:CT,r=this._parents,o=this._groups;typeof e!="function"&&(e=TT(e));for(var s=o.length,l=new Array(s),c=new Array(s),f=new Array(s),h=0;h<s;++h){var a=r[h],u=o[h],d=u.length,p=MT(e.call(a,a&&a.__data__,h,r)),O=p.length,g=c[h]=new Array(O),_=l[h]=new Array(O),y=f[h]=new Array(d);n(a,u,g,_,y,p,t);for(var w=0,E=0,m,S;w<O;++w)if(m=g[w]){for(w>=E&&(E=w+1);!(S=_[E])&&++E<O;);m._next=S||null}}return l=new $t(l,r),l._enter=c,l._exit=f,l}function MT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qT(){return new $t(this._exit||this._groups.map(r_),this._parents)}function LT(e,t,n){var r=this.enter(),o=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?s.remove():n(s),r&&o?r.merge(o).order():o}function RT(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,s=r.length,l=Math.min(o,s),c=new Array(o),f=0;f<l;++f)for(var h=n[f],a=r[f],u=h.length,d=c[f]=new Array(u),p,O=0;O<u;++O)(p=h[O]||a[O])&&(d[O]=p);for(;f<o;++f)c[f]=n[f];return new $t(c,this._parents)}function DT(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,s=r[o],l;--o>=0;)(l=r[o])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function jT(e){e||(e=FT);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var n=this._groups,r=n.length,o=new Array(r),s=0;s<r;++s){for(var l=n[s],c=l.length,f=o[s]=new Array(c),h,a=0;a<c;++a)(h=l[a])&&(f[a]=h);f.sort(t)}return new $t(o,this._parents).order()}function FT(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function BT(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zT(){return Array.from(this)}function $T(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length;o<s;++o){var l=r[o];if(l)return l}return null}function HT(){let e=0;for(const t of this)++e;return e}function VT(){return!this.node()}function UT(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],s=0,l=o.length,c;s<l;++s)(c=o[s])&&e.call(c,c.__data__,s,o);return this}function GT(e){return function(){this.removeAttribute(e)}}function KT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function WT(e,t){return function(){this.setAttribute(e,t)}}function YT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZT(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function XT(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function QT(e,t){var n=Ni(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?KT:GT:typeof t=="function"?n.local?XT:ZT:n.local?YT:WT)(n,t))}function o_(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function JT(e){return function(){this.style.removeProperty(e)}}function eC(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function nC(e,t,n){return arguments.length>1?this.each((t==null?JT:typeof t=="function"?tC:eC)(e,t,n??"")):wr(this.node(),e)}function wr(e,t){return e.style.getPropertyValue(t)||o_(e).getComputedStyle(e,null).getPropertyValue(t)}function rC(e){return function(){delete this[e]}}function oC(e,t){return function(){this[e]=t}}function iC(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function aC(e,t){return arguments.length>1?this.each((t==null?rC:typeof t=="function"?iC:oC)(e,t)):this.node()[e]}function i_(e){return e.trim().split(/^|\s+/)}function Kd(e){return e.classList||new a_(e)}function a_(e){this._node=e,this._names=i_(e.getAttribute("class")||"")}a_.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function s_(e,t){for(var n=Kd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function l_(e,t){for(var n=Kd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function sC(e){return function(){s_(this,e)}}function lC(e){return function(){l_(this,e)}}function uC(e,t){return function(){(t.apply(this,arguments)?s_:l_)(this,e)}}function cC(e,t){var n=i_(e+"");if(arguments.length<2){for(var r=Kd(this.node()),o=-1,s=n.length;++o<s;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?uC:t?sC:lC)(n,t))}function fC(){this.textContent=""}function dC(e){return function(){this.textContent=e}}function hC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function pC(e){return arguments.length?this.each(e==null?fC:(typeof e=="function"?hC:dC)(e)):this.node().textContent}function vC(){this.innerHTML=""}function gC(e){return function(){this.innerHTML=e}}function yC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function mC(e){return arguments.length?this.each(e==null?vC:(typeof e=="function"?yC:gC)(e)):this.node().innerHTML}function bC(){this.nextSibling&&this.parentNode.appendChild(this)}function _C(){return this.each(bC)}function wC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function OC(){return this.each(wC)}function EC(e){var t=typeof e=="function"?e:J1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xC(){return null}function SC(e,t){var n=typeof e=="function"?e:J1(e),r=t==null?xC:typeof t=="function"?t:Gd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function kC(){var e=this.parentNode;e&&e.removeChild(this)}function NC(){return this.each(kC)}function TC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function CC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function AC(e){return this.select(e?CC:TC)}function PC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function IC(e){return function(t){e.call(this,t,this.__data__)}}function MC(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function qC(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,s;n<o;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function LC(e,t,n){return function(){var r=this.__on,o,s=IC(t);if(r){for(var l=0,c=r.length;l<c;++l)if((o=r[l]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=t;return}}this.addEventListener(e.type,s,n),o={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(o):this.__on=[o]}}function RC(e,t,n){var r=MC(e+""),o,s=r.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,h=c.length,a;f<h;++f)for(o=0,a=c[f];o<s;++o)if((l=r[o]).type===a.type&&l.name===a.name)return a.value}return}for(c=t?LC:qC,o=0;o<s;++o)this.each(c(r[o],t,n));return this}function u_(e,t,n){var r=o_(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function DC(e,t){return function(){return u_(this,e,t)}}function jC(e,t){return function(){return u_(this,e,t.apply(this,arguments))}}function FC(e,t){return this.each((typeof t=="function"?jC:DC)(e,t))}function*BC(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length,l;o<s;++o)(l=r[o])&&(yield l)}var c_=[null];function $t(e,t){this._groups=e,this._parents=t}function co(){return new $t([[document.documentElement]],c_)}function zC(){return this}$t.prototype=co.prototype={constructor:$t,select:hT,selectAll:yT,selectChild:wT,selectChildren:ST,filter:kT,data:IT,enter:NT,exit:qT,join:LT,merge:RT,selection:zC,order:DT,sort:jT,call:BT,nodes:zT,node:$T,size:HT,empty:VT,each:UT,attr:QT,style:nC,property:aC,classed:cC,text:pC,html:mC,raise:_C,lower:OC,append:EC,insert:SC,remove:NC,clone:AC,datum:PC,on:RC,dispatch:FC,[Symbol.iterator]:BC};function Zt(e){return typeof e=="string"?new $t([[document.querySelector(e)]],[document.documentElement]):new $t([[e]],c_)}function $C(e){let t;for(;t=e.sourceEvent;)e=t;return e}function an(e,t){if(e=$C(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const HC={passive:!1},fo={capture:!0,passive:!1};function Wd(e){e.stopImmediatePropagation()}function Or(e){e.preventDefault(),e.stopImmediatePropagation()}function f_(e){var t=e.document.documentElement,n=Zt(e).on("dragstart.drag",Or,fo);"onselectstart"in t?n.on("selectstart.drag",Or,fo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function d_(e,t){var n=e.document.documentElement,r=Zt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Or,fo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ci=e=>()=>e;function Yd(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:s,x:l,y:c,dx:f,dy:h,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:a}})}Yd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function VC(e){return!e.ctrlKey&&!e.button}function UC(){return this.parentNode}function GC(e,t){return t??{x:e.x,y:e.y}}function KC(){return navigator.maxTouchPoints||"ontouchstart"in this}function WC(){var e=VC,t=UC,n=GC,r=KC,o={},s=Si("start","drag","end"),l=0,c,f,h,a,u=0;function d(m){m.on("mousedown.drag",p).filter(r).on("touchstart.drag",_).on("touchmove.drag",y,HC).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(m,S){if(!(a||!e.call(this,m,S))){var C=E(this,t.call(this,m,S),m,S,"mouse");C&&(Zt(m.view).on("mousemove.drag",O,fo).on("mouseup.drag",g,fo),f_(m.view),Wd(m),h=!1,c=m.clientX,f=m.clientY,C("start",m))}}function O(m){if(Or(m),!h){var S=m.clientX-c,C=m.clientY-f;h=S*S+C*C>u}o.mouse("drag",m)}function g(m){Zt(m.view).on("mousemove.drag mouseup.drag",null),d_(m.view,h),Or(m),o.mouse("end",m)}function _(m,S){if(e.call(this,m,S)){var C=m.changedTouches,N=t.call(this,m,S),M=C.length,j,I;for(j=0;j<M;++j)(I=E(this,N,m,S,C[j].identifier,C[j]))&&(Wd(m),I("start",m,C[j]))}}function y(m){var S=m.changedTouches,C=S.length,N,M;for(N=0;N<C;++N)(M=o[S[N].identifier])&&(Or(m),M("drag",m,S[N]))}function w(m){var S=m.changedTouches,C=S.length,N,M;for(a&&clearTimeout(a),a=setTimeout(function(){a=null},500),N=0;N<C;++N)(M=o[S[N].identifier])&&(Wd(m),M("end",m,S[N]))}function E(m,S,C,N,M,j){var I=s.copy(),A=an(j||C,S),q,R,k;if((k=n.call(m,new Yd("beforestart",{sourceEvent:C,target:d,identifier:M,active:l,x:A[0],y:A[1],dx:0,dy:0,dispatch:I}),N))!=null)return q=k.x-A[0]||0,R=k.y-A[1]||0,function F(U,ne,ue){var K=A,W;switch(U){case"start":o[M]=F,W=l++;break;case"end":delete o[M],--l;case"drag":A=an(ue||ne,S),W=l;break}I.call(U,m,new Yd(U,{sourceEvent:ne,subject:k,target:d,identifier:M,active:W,x:A[0]+q,y:A[1]+R,dx:A[0]-K[0],dy:A[1]-K[1],dispatch:I}),N)}}return d.filter=function(m){return arguments.length?(e=typeof m=="function"?m:Ci(!!m),d):e},d.container=function(m){return arguments.length?(t=typeof m=="function"?m:Ci(m),d):t},d.subject=function(m){return arguments.length?(n=typeof m=="function"?m:Ci(m),d):n},d.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Ci(!!m),d):r},d.on=function(){var m=s.on.apply(s,arguments);return m===s?d:m},d.clickDistance=function(m){return arguments.length?(u=(m=+m)*m,d):Math.sqrt(u)},d}function Zd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function h_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ho(){}var po=.7,Ai=1/po,Er="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YC=/^#([0-9a-f]{3,8})$/,ZC=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),XC=new RegExp(`^rgb\\(${hn},${hn},${hn}\\)$`),QC=new RegExp(`^rgba\\(${Er},${Er},${Er},${vo}\\)$`),JC=new RegExp(`^rgba\\(${hn},${hn},${hn},${vo}\\)$`),eA=new RegExp(`^hsl\\(${vo},${hn},${hn}\\)$`),tA=new RegExp(`^hsla\\(${vo},${hn},${hn},${vo}\\)$`),p_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zd(ho,go,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v_,formatHex:v_,formatHex8:nA,formatHsl:rA,formatRgb:g_,toString:g_});function v_(){return this.rgb().formatHex()}function nA(){return this.rgb().formatHex8()}function rA(){return w_(this).formatHsl()}function g_(){return this.rgb().formatRgb()}function go(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=YC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?y_(t):n===3?new Dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZC.exec(e))?new Dt(t[1],t[2],t[3],1):(t=XC.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QC.exec(e))?Pi(t[1],t[2],t[3],t[4]):(t=JC.exec(e))?Pi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eA.exec(e))?__(t[1],t[2]/100,t[3]/100,1):(t=tA.exec(e))?__(t[1],t[2]/100,t[3]/100,t[4]):p_.hasOwnProperty(e)?y_(p_[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function y_(e){return new Dt(e>>16&255,e>>8&255,e&255,1)}function Pi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dt(e,t,n,r)}function oA(e){return e instanceof ho||(e=go(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function Xd(e,t,n,r){return arguments.length===1?oA(e):new Dt(e,t,n,r??1)}function Dt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Zd(Dt,Xd,h_(ho,{brighter(e){return e=e==null?Ai:Math.pow(Ai,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?po:Math.pow(po,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Qn(this.r),Qn(this.g),Qn(this.b),Ii(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:m_,formatHex:m_,formatHex8:iA,formatRgb:b_,toString:b_}));function m_(){return`#${Jn(this.r)}${Jn(this.g)}${Jn(this.b)}`}function iA(){return`#${Jn(this.r)}${Jn(this.g)}${Jn(this.b)}${Jn((isNaN(this.opacity)?1:this.opacity)*255)}`}function b_(){const e=Ii(this.opacity);return`${e===1?"rgb(":"rgba("}${Qn(this.r)}, ${Qn(this.g)}, ${Qn(this.b)}${e===1?")":`, ${e})`}`}function Ii(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jn(e){return e=Qn(e),(e<16?"0":"")+e.toString(16)}function __(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new sn(e,t,n,r)}function w_(e){if(e instanceof sn)return new sn(e.h,e.s,e.l,e.opacity);if(e instanceof ho||(e=go(e)),!e)return new sn;if(e instanceof sn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),l=NaN,c=s-o,f=(s+o)/2;return c?(t===s?l=(n-r)/c+(n<r)*6:n===s?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?s+o:2-s-o,l*=60):c=f>0&&f<1?0:l,new sn(l,c,f,e.opacity)}function aA(e,t,n,r){return arguments.length===1?w_(e):new sn(e,t,n,r??1)}function sn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Zd(sn,aA,h_(ho,{brighter(e){return e=e==null?Ai:Math.pow(Ai,e),new sn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?po:Math.pow(po,e),new sn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Dt(Qd(e>=240?e-240:e+120,o,r),Qd(e,o,r),Qd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new sn(O_(this.h),Mi(this.s),Mi(this.l),Ii(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ii(this.opacity);return`${e===1?"hsl(":"hsla("}${O_(this.h)}, ${Mi(this.s)*100}%, ${Mi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function O_(e){return e=(e||0)%360,e<0?e+360:e}function Mi(e){return Math.max(0,Math.min(1,e||0))}function Qd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const E_=e=>()=>e;function sA(e,t){return function(n){return e+n*t}}function lA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function uA(e){return(e=+e)==1?x_:function(t,n){return n-t?lA(t,n,e):E_(isNaN(t)?n:t)}}function x_(e,t){var n=t-e;return n?sA(e,n):E_(isNaN(e)?t:e)}const S_=(function e(t){var n=uA(t);function r(o,s){var l=n((o=Xd(o)).r,(s=Xd(s)).r),c=n(o.g,s.g),f=n(o.b,s.b),h=x_(o.opacity,s.opacity);return function(a){return o.r=l(a),o.g=c(a),o.b=f(a),o.opacity=h(a),o+""}}return r.gamma=e,r})(1);function Rn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Jd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eh=new RegExp(Jd.source,"g");function cA(e){return function(){return e}}function fA(e){return function(t){return e(t)+""}}function dA(e,t){var n=Jd.lastIndex=eh.lastIndex=0,r,o,s,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=Jd.exec(e))&&(o=eh.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),c[l]?c[l]+=s:c[++l]=s),(r=r[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,f.push({i:l,x:Rn(r,o)})),n=eh.lastIndex;return n<t.length&&(s=t.slice(n),c[l]?c[l]+=s:c[++l]=s),c.length<2?f[0]?fA(f[0].x):cA(t):(t=f.length,function(h){for(var a=0,u;a<t;++a)c[(u=f[a]).i]=u.x(h);return c.join("")})}var k_=180/Math.PI,th={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function N_(e,t,n,r,o,s){var l,c,f;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,f/=c),e*r<t*n&&(e=-e,t=-t,f=-f,l=-l),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*k_,skewX:Math.atan(f)*k_,scaleX:l,scaleY:c}}var qi;function hA(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?th:N_(t.a,t.b,t.c,t.d,t.e,t.f)}function pA(e){return e==null||(qi||(qi=document.createElementNS("http://www.w3.org/2000/svg","g")),qi.setAttribute("transform",e),!(e=qi.transform.baseVal.consolidate()))?th:(e=e.matrix,N_(e.a,e.b,e.c,e.d,e.e,e.f))}function T_(e,t,n,r){function o(h){return h.length?h.pop()+" ":""}function s(h,a,u,d,p,O){if(h!==u||a!==d){var g=p.push("translate(",null,t,null,n);O.push({i:g-4,x:Rn(h,u)},{i:g-2,x:Rn(a,d)})}else(u||d)&&p.push("translate("+u+t+d+n)}function l(h,a,u,d){h!==a?(h-a>180?a+=360:a-h>180&&(h+=360),d.push({i:u.push(o(u)+"rotate(",null,r)-2,x:Rn(h,a)})):a&&u.push(o(u)+"rotate("+a+r)}function c(h,a,u,d){h!==a?d.push({i:u.push(o(u)+"skewX(",null,r)-2,x:Rn(h,a)}):a&&u.push(o(u)+"skewX("+a+r)}function f(h,a,u,d,p,O){if(h!==u||a!==d){var g=p.push(o(p)+"scale(",null,",",null,")");O.push({i:g-4,x:Rn(h,u)},{i:g-2,x:Rn(a,d)})}else(u!==1||d!==1)&&p.push(o(p)+"scale("+u+","+d+")")}return function(h,a){var u=[],d=[];return h=e(h),a=e(a),s(h.translateX,h.translateY,a.translateX,a.translateY,u,d),l(h.rotate,a.rotate,u,d),c(h.skewX,a.skewX,u,d),f(h.scaleX,h.scaleY,a.scaleX,a.scaleY,u,d),h=a=null,function(p){for(var O=-1,g=d.length,_;++O<g;)u[(_=d[O]).i]=_.x(p);return u.join("")}}}var vA=T_(hA,"px, ","px)","deg)"),gA=T_(pA,", ",")",")"),yA=1e-12;function C_(e){return((e=Math.exp(e))+1/e)/2}function mA(e){return((e=Math.exp(e))-1/e)/2}function bA(e){return((e=Math.exp(2*e))-1)/(e+1)}const _A=(function e(t,n,r){function o(s,l){var c=s[0],f=s[1],h=s[2],a=l[0],u=l[1],d=l[2],p=a-c,O=u-f,g=p*p+O*O,_,y;if(g<yA)y=Math.log(d/h)/t,_=function(N){return[c+N*p,f+N*O,h*Math.exp(t*N*y)]};else{var w=Math.sqrt(g),E=(d*d-h*h+r*g)/(2*h*n*w),m=(d*d-h*h-r*g)/(2*d*n*w),S=Math.log(Math.sqrt(E*E+1)-E),C=Math.log(Math.sqrt(m*m+1)-m);y=(C-S)/t,_=function(N){var M=N*y,j=C_(S),I=h/(n*w)*(j*bA(t*M+S)-mA(S));return[c+I*p,f+I*O,h*j/C_(t*M+S)]}}return _.duration=y*1e3*t/Math.SQRT2,_}return o.rho=function(s){var l=Math.max(.001,+s),c=l*l,f=c*c;return e(l,c,f)},o})(Math.SQRT2,2,4);var xr=0,yo=0,mo=0,A_=1e3,Li,bo,Ri=0,er=0,Di=0,_o=typeof performance=="object"&&performance.now?performance:Date,P_=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function nh(){return er||(P_(wA),er=_o.now()+Di)}function wA(){er=0}function ji(){this._call=this._time=this._next=null}ji.prototype=I_.prototype={constructor:ji,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?nh():+n)+(t==null?0:+t),!this._next&&bo!==this&&(bo?bo._next=this:Li=this,bo=this),this._call=e,this._time=n,rh()},stop:function(){this._call&&(this._call=null,this._time=1/0,rh())}};function I_(e,t,n){var r=new ji;return r.restart(e,t,n),r}function OA(){nh(),++xr;for(var e=Li,t;e;)(t=er-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xr}function M_(){er=(Ri=_o.now())+Di,xr=yo=0;try{OA()}finally{xr=0,xA(),er=0}}function EA(){var e=_o.now(),t=e-Ri;t>A_&&(Di-=t,Ri=e)}function xA(){for(var e,t=Li,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Li=n);bo=e,rh(r)}function rh(e){if(!xr){yo&&(yo=clearTimeout(yo));var t=e-er;t>24?(e<1/0&&(yo=setTimeout(M_,e-_o.now()-Di)),mo&&(mo=clearInterval(mo))):(mo||(Ri=_o.now(),mo=setInterval(EA,A_)),xr=1,P_(M_))}}function q_(e,t,n){var r=new ji;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var SA=Si("start","end","cancel","interrupt"),kA=[],L_=0,R_=1,oh=2,Fi=3,D_=4,ih=5,Bi=6;function zi(e,t,n,r,o,s){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;NA(e,n,{name:t,index:r,group:o,on:SA,tween:kA,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:L_})}function ah(e,t){var n=ln(e,t);if(n.state>L_)throw new Error("too late; already scheduled");return n}function pn(e,t){var n=ln(e,t);if(n.state>Fi)throw new Error("too late; already running");return n}function ln(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function NA(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=I_(s,0,n.time);function s(h){n.state=R_,n.timer.restart(l,n.delay,n.time),n.delay<=h&&l(h-n.delay)}function l(h){var a,u,d,p;if(n.state!==R_)return f();for(a in r)if(p=r[a],p.name===n.name){if(p.state===Fi)return q_(l);p.state===D_?(p.state=Bi,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[a]):+a<t&&(p.state=Bi,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[a])}if(q_(function(){n.state===Fi&&(n.state=D_,n.timer.restart(c,n.delay,n.time),c(h))}),n.state=oh,n.on.call("start",e,e.__data__,n.index,n.group),n.state===oh){for(n.state=Fi,o=new Array(d=n.tween.length),a=0,u=-1;a<d;++a)(p=n.tween[a].value.call(e,e.__data__,n.index,n.group))&&(o[++u]=p);o.length=u+1}}function c(h){for(var a=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(f),n.state=ih,1),u=-1,d=o.length;++u<d;)o[u].call(e,a);n.state===ih&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Bi,n.timer.stop(),delete r[t];for(var h in r)return;delete e.__transition}}function $i(e,t){var n=e.__transition,r,o,s=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){s=!1;continue}o=r.state>oh&&r.state<ih,r.state=Bi,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}s&&delete e.__transition}}function TA(e){return this.each(function(){$i(this,e)})}function CA(e,t){var n,r;return function(){var o=pn(this,e),s=o.tween;if(s!==n){r=n=s;for(var l=0,c=r.length;l<c;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}o.tween=r}}function AA(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var s=pn(this,e),l=s.tween;if(l!==r){o=(r=l).slice();for(var c={name:t,value:n},f=0,h=o.length;f<h;++f)if(o[f].name===t){o[f]=c;break}f===h&&o.push(c)}s.tween=o}}function PA(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ln(this.node(),n).tween,o=0,s=r.length,l;o<s;++o)if((l=r[o]).name===e)return l.value;return null}return this.each((t==null?CA:AA)(n,e,t))}function sh(e,t,n){var r=e._id;return e.each(function(){var o=pn(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return ln(o,r).value[t]}}function j_(e,t){var n;return(typeof t=="number"?Rn:t instanceof go?S_:(n=go(t))?(t=n,S_):dA)(e,t)}function IA(e){return function(){this.removeAttribute(e)}}function MA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qA(e,t,n){var r,o=n+"",s;return function(){var l=this.getAttribute(e);return l===o?null:l===r?s:s=t(r=l,n)}}function LA(e,t,n){var r,o=n+"",s;return function(){var l=this.getAttributeNS(e.space,e.local);return l===o?null:l===r?s:s=t(r=l,n)}}function RA(e,t,n){var r,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),f=c+"",l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c)))}}function DA(e,t,n){var r,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),f=c+"",l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c)))}}function jA(e,t){var n=Ni(e),r=n==="transform"?gA:j_;return this.attrTween(e,typeof t=="function"?(n.local?DA:RA)(n,r,sh(this,"attr."+e,t)):t==null?(n.local?MA:IA)(n):(n.local?LA:qA)(n,r,t))}function FA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function BA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zA(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&BA(e,s)),n}return o._value=t,o}function $A(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&FA(e,s)),n}return o._value=t,o}function HA(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ni(e);return this.tween(n,(r.local?zA:$A)(r,t))}function VA(e,t){return function(){ah(this,e).delay=+t.apply(this,arguments)}}function UA(e,t){return t=+t,function(){ah(this,e).delay=t}}function GA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?VA:UA)(t,e)):ln(this.node(),t).delay}function KA(e,t){return function(){pn(this,e).duration=+t.apply(this,arguments)}}function WA(e,t){return t=+t,function(){pn(this,e).duration=t}}function YA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?KA:WA)(t,e)):ln(this.node(),t).duration}function ZA(e,t){if(typeof t!="function")throw new Error;return function(){pn(this,e).ease=t}}function XA(e){var t=this._id;return arguments.length?this.each(ZA(t,e)):ln(this.node(),t).ease}function QA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;pn(this,e).ease=n}}function JA(e){if(typeof e!="function")throw new Error;return this.each(QA(this._id,e))}function eP(e){typeof e!="function"&&(e=t_(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=r[o]=[],f,h=0;h<l;++h)(f=s[h])&&e.call(f,f.__data__,h,s)&&c.push(f);return new Sn(r,this._parents,this._name,this._id)}function tP(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,s=Math.min(r,o),l=new Array(r),c=0;c<s;++c)for(var f=t[c],h=n[c],a=f.length,u=l[c]=new Array(a),d,p=0;p<a;++p)(d=f[p]||h[p])&&(u[p]=d);for(;c<r;++c)l[c]=t[c];return new Sn(l,this._parents,this._name,this._id)}function nP(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function rP(e,t,n){var r,o,s=nP(t)?ah:pn;return function(){var l=s(this,e),c=l.on;c!==r&&(o=(r=c).copy()).on(t,n),l.on=o}}function oP(e,t){var n=this._id;return arguments.length<2?ln(this.node(),n).on.on(e):this.each(rP(n,e,t))}function iP(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function aP(){return this.on("end.remove",iP(this._id))}function sP(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Gd(e));for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l)for(var c=r[l],f=c.length,h=s[l]=new Array(f),a,u,d=0;d<f;++d)(a=c[d])&&(u=e.call(a,a.__data__,d,c))&&("__data__"in a&&(u.__data__=a.__data__),h[d]=u,zi(h[d],t,n,d,h,ln(a,n)));return new Sn(s,this._parents,t,n)}function lP(e){var t=this._name,n=this._id;typeof e!="function"&&(e=e_(e));for(var r=this._groups,o=r.length,s=[],l=[],c=0;c<o;++c)for(var f=r[c],h=f.length,a,u=0;u<h;++u)if(a=f[u]){for(var d=e.call(a,a.__data__,u,f),p,O=ln(a,n),g=0,_=d.length;g<_;++g)(p=d[g])&&zi(p,t,n,g,d,O);s.push(d),l.push(a)}return new Sn(s,l,t,n)}var uP=co.prototype.constructor;function cP(){return new uP(this._groups,this._parents)}function fP(e,t){var n,r,o;return function(){var s=wr(this,e),l=(this.style.removeProperty(e),wr(this,e));return s===l?null:s===n&&l===r?o:o=t(n=s,r=l)}}function F_(e){return function(){this.style.removeProperty(e)}}function dP(e,t,n){var r,o=n+"",s;return function(){var l=wr(this,e);return l===o?null:l===r?s:s=t(r=l,n)}}function hP(e,t,n){var r,o,s;return function(){var l=wr(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),wr(this,e))),l===f?null:l===r&&f===o?s:(o=f,s=t(r=l,c))}}function pP(e,t){var n,r,o,s="style."+t,l="end."+s,c;return function(){var f=pn(this,e),h=f.on,a=f.value[s]==null?c||(c=F_(t)):void 0;(h!==n||o!==a)&&(r=(n=h).copy()).on(l,o=a),f.on=r}}function vP(e,t,n){var r=(e+="")=="transform"?vA:j_;return t==null?this.styleTween(e,fP(e,r)).on("end.style."+e,F_(e)):typeof t=="function"?this.styleTween(e,hP(e,r,sh(this,"style."+e,t))).each(pP(this._id,e)):this.styleTween(e,dP(e,r,t),n).on("end.style."+e,null)}function gP(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function yP(e,t,n){var r,o;function s(){var l=t.apply(this,arguments);return l!==o&&(r=(o=l)&&gP(e,l,n)),r}return s._value=t,s}function mP(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,yP(e,t,n??""))}function bP(e){return function(){this.textContent=e}}function _P(e){return function(){var t=e(this);this.textContent=t??""}}function wP(e){return this.tween("text",typeof e=="function"?_P(sh(this,"text",e)):bP(e==null?"":e+""))}function OP(e){return function(t){this.textContent=e.call(this,t)}}function EP(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&OP(o)),t}return r._value=e,r}function xP(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,EP(e))}function SP(){for(var e=this._name,t=this._id,n=B_(),r=this._groups,o=r.length,s=0;s<o;++s)for(var l=r[s],c=l.length,f,h=0;h<c;++h)if(f=l[h]){var a=ln(f,t);zi(f,e,n,h,l,{time:a.time+a.delay+a.duration,delay:0,duration:a.duration,ease:a.ease})}return new Sn(r,this._parents,e,n)}function kP(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(s,l){var c={value:l},f={value:function(){--o===0&&s()}};n.each(function(){var h=pn(this,r),a=h.on;a!==e&&(t=(e=a).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),h.on=t}),o===0&&s()})}var NP=0;function Sn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function B_(){return++NP}var kn=co.prototype;Sn.prototype={constructor:Sn,select:sP,selectAll:lP,selectChild:kn.selectChild,selectChildren:kn.selectChildren,filter:eP,merge:tP,selection:cP,transition:SP,call:kn.call,nodes:kn.nodes,node:kn.node,size:kn.size,empty:kn.empty,each:kn.each,on:oP,attr:jA,attrTween:HA,style:vP,styleTween:mP,text:wP,textTween:xP,remove:aP,tween:PA,delay:GA,duration:YA,ease:XA,easeVarying:JA,end:kP,[Symbol.iterator]:kn[Symbol.iterator]};function TP(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var CP={time:null,delay:0,duration:250,ease:TP};function AP(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function PP(e){var t,n;e instanceof Sn?(t=e._id,e=e._name):(t=B_(),(n=CP).time=nh(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,s=0;s<o;++s)for(var l=r[s],c=l.length,f,h=0;h<c;++h)(f=l[h])&&zi(f,e,t,h,l,n||AP(f,t));return new Sn(r,this._parents,e,t)}co.prototype.interrupt=TA,co.prototype.transition=PP;const Hi=e=>()=>e;function IP(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Nn(e,t,n){this.k=e,this.x=t,this.y=n}Nn.prototype={constructor:Nn,scale:function(e){return e===1?this:new Nn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Nn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Tn=new Nn(1,0,0);Nn.prototype;function lh(e){e.stopImmediatePropagation()}function wo(e){e.preventDefault(),e.stopImmediatePropagation()}function MP(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function qP(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function z_(){return this.__zoom||Tn}function LP(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function RP(){return navigator.maxTouchPoints||"ontouchstart"in this}function DP(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function $_(){var e=MP,t=qP,n=DP,r=LP,o=RP,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=_A,h=Si("start","zoom","end"),a,u,d,p=500,O=150,g=0,_=10;function y(k){k.property("__zoom",z_).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",I).filter(o).on("touchstart.zoom",A).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(k,F,U,ne){var ue=k.selection?k.selection():k;ue.property("__zoom",z_),k!==ue?S(k,F,U,ne):ue.interrupt().each(function(){C(this,arguments).event(ne).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},y.scaleBy=function(k,F,U,ne){y.scaleTo(k,function(){var ue=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return ue*K},U,ne)},y.scaleTo=function(k,F,U,ne){y.transform(k,function(){var ue=t.apply(this,arguments),K=this.__zoom,W=U==null?m(ue):typeof U=="function"?U.apply(this,arguments):U,z=K.invert(W),Q=typeof F=="function"?F.apply(this,arguments):F;return n(E(w(K,Q),W,z),ue,l)},U,ne)},y.translateBy=function(k,F,U,ne){y.transform(k,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof U=="function"?U.apply(this,arguments):U),t.apply(this,arguments),l)},null,ne)},y.translateTo=function(k,F,U,ne,ue){y.transform(k,function(){var K=t.apply(this,arguments),W=this.__zoom,z=ne==null?m(K):typeof ne=="function"?ne.apply(this,arguments):ne;return n(Tn.translate(z[0],z[1]).scale(W.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof U=="function"?-U.apply(this,arguments):-U),K,l)},ne,ue)};function w(k,F){return F=Math.max(s[0],Math.min(s[1],F)),F===k.k?k:new Nn(F,k.x,k.y)}function E(k,F,U){var ne=F[0]-U[0]*k.k,ue=F[1]-U[1]*k.k;return ne===k.x&&ue===k.y?k:new Nn(k.k,ne,ue)}function m(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function S(k,F,U,ne){k.on("start.zoom",function(){C(this,arguments).event(ne).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(ne).end()}).tween("zoom",function(){var ue=this,K=arguments,W=C(ue,K).event(ne),z=t.apply(ue,K),Q=U==null?m(z):typeof U=="function"?U.apply(ue,K):U,re=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),Z=ue.__zoom,X=typeof F=="function"?F.apply(ue,K):F,H=f(Z.invert(Q).concat(re/Z.k),X.invert(Q).concat(re/X.k));return function(ee){if(ee===1)ee=X;else{var le=H(ee),de=re/le[2];ee=new Nn(de,Q[0]-le[0]*de,Q[1]-le[1]*de)}W.zoom(null,ee)}})}function C(k,F,U){return!U&&k.__zooming||new N(k,F)}function N(k,F){this.that=k,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,F),this.taps=0}N.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,F){return this.mouse&&k!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var F=Zt(this.that).datum();h.call(k,this.that,new IP(k,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:h}),F)}};function M(k,...F){if(!e.apply(this,arguments))return;var U=C(this,F).event(k),ne=this.__zoom,ue=Math.max(s[0],Math.min(s[1],ne.k*Math.pow(2,r.apply(this,arguments)))),K=an(k);if(U.wheel)(U.mouse[0][0]!==K[0]||U.mouse[0][1]!==K[1])&&(U.mouse[1]=ne.invert(U.mouse[0]=K)),clearTimeout(U.wheel);else{if(ne.k===ue)return;U.mouse=[K,ne.invert(K)],$i(this),U.start()}wo(k),U.wheel=setTimeout(W,O),U.zoom("mouse",n(E(w(ne,ue),U.mouse[0],U.mouse[1]),U.extent,l));function W(){U.wheel=null,U.end()}}function j(k,...F){if(d||!e.apply(this,arguments))return;var U=k.currentTarget,ne=C(this,F,!0).event(k),ue=Zt(k.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",re,!0),K=an(k,U),W=k.clientX,z=k.clientY;f_(k.view),lh(k),ne.mouse=[K,this.__zoom.invert(K)],$i(this),ne.start();function Q(Z){if(wo(Z),!ne.moved){var X=Z.clientX-W,H=Z.clientY-z;ne.moved=X*X+H*H>g}ne.event(Z).zoom("mouse",n(E(ne.that.__zoom,ne.mouse[0]=an(Z,U),ne.mouse[1]),ne.extent,l))}function re(Z){ue.on("mousemove.zoom mouseup.zoom",null),d_(Z.view,ne.moved),wo(Z),ne.event(Z).end()}}function I(k,...F){if(e.apply(this,arguments)){var U=this.__zoom,ne=an(k.changedTouches?k.changedTouches[0]:k,this),ue=U.invert(ne),K=U.k*(k.shiftKey?.5:2),W=n(E(w(U,K),ne,ue),t.apply(this,F),l);wo(k),c>0?Zt(this).transition().duration(c).call(S,W,ne,k):Zt(this).call(y.transform,W,ne,k)}}function A(k,...F){if(e.apply(this,arguments)){var U=k.touches,ne=U.length,ue=C(this,F,k.changedTouches.length===ne).event(k),K,W,z,Q;for(lh(k),W=0;W<ne;++W)z=U[W],Q=an(z,this),Q=[Q,this.__zoom.invert(Q),z.identifier],ue.touch0?!ue.touch1&&ue.touch0[2]!==Q[2]&&(ue.touch1=Q,ue.taps=0):(ue.touch0=Q,K=!0,ue.taps=1+!!a);a&&(a=clearTimeout(a)),K&&(ue.taps<2&&(u=Q[0],a=setTimeout(function(){a=null},p)),$i(this),ue.start())}}function q(k,...F){if(this.__zooming){var U=C(this,F).event(k),ne=k.changedTouches,ue=ne.length,K,W,z,Q;for(wo(k),K=0;K<ue;++K)W=ne[K],z=an(W,this),U.touch0&&U.touch0[2]===W.identifier?U.touch0[0]=z:U.touch1&&U.touch1[2]===W.identifier&&(U.touch1[0]=z);if(W=U.that.__zoom,U.touch1){var re=U.touch0[0],Z=U.touch0[1],X=U.touch1[0],H=U.touch1[1],ee=(ee=X[0]-re[0])*ee+(ee=X[1]-re[1])*ee,le=(le=H[0]-Z[0])*le+(le=H[1]-Z[1])*le;W=w(W,Math.sqrt(ee/le)),z=[(re[0]+X[0])/2,(re[1]+X[1])/2],Q=[(Z[0]+H[0])/2,(Z[1]+H[1])/2]}else if(U.touch0)z=U.touch0[0],Q=U.touch0[1];else return;U.zoom("touch",n(E(W,z,Q),U.extent,l))}}function R(k,...F){if(this.__zooming){var U=C(this,F).event(k),ne=k.changedTouches,ue=ne.length,K,W;for(lh(k),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),K=0;K<ue;++K)W=ne[K],U.touch0&&U.touch0[2]===W.identifier?delete U.touch0:U.touch1&&U.touch1[2]===W.identifier&&delete U.touch1;if(U.touch1&&!U.touch0&&(U.touch0=U.touch1,delete U.touch1),U.touch0)U.touch0[1]=this.__zoom.invert(U.touch0[0]);else if(U.end(),U.taps===2&&(W=an(W,this),Math.hypot(u[0]-W[0],u[1]-W[1])<_)){var z=Zt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:Hi(+k),y):r},y.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Hi(!!k),y):e},y.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Hi(!!k),y):o},y.extent=function(k){return arguments.length?(t=typeof k=="function"?k:Hi([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),y):t},y.scaleExtent=function(k){return arguments.length?(s[0]=+k[0],s[1]=+k[1],y):[s[0],s[1]]},y.translateExtent=function(k){return arguments.length?(l[0][0]=+k[0][0],l[1][0]=+k[1][0],l[0][1]=+k[0][1],l[1][1]=+k[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(k){return arguments.length?(n=k,y):n},y.duration=function(k){return arguments.length?(c=+k,y):c},y.interpolate=function(k){return arguments.length?(f=k,y):f},y.on=function(){var k=h.on.apply(h,arguments);return k===h?y:k},y.clickDistance=function(k){return arguments.length?(g=(k=+k)*k,y):Math.sqrt(g)},y.tapDistance=function(k){return arguments.length?(_=+k,y):_},y}const Vi=se.createContext(null),jP=Vi.Provider,Cn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},H_=Cn.error001();function st(e,t){const n=se.useContext(Vi);if(n===null)throw new Error(H_);return Y1(n,e,t)}const _t=()=>{const e=se.useContext(Vi);if(e===null)throw new Error(H_);return se.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},FP=e=>e.userSelectionActive?"none":"all";function uh({position:e,children:t,className:n,style:r,...o}){const s=st(FP),l=`${e}`.split("-");return $.jsx("div",{className:Tt(["react-flow__panel",n,...l]),style:{...r,pointerEvents:s},...o,children:t})}function BP({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:$.jsx(uh,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:$.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const zP=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:s={},labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:f,className:h,...a})=>{const u=se.useRef(null),[d,p]=se.useState({x:0,y:0,width:0,height:0}),O=Tt(["react-flow__edge-textwrapper",h]);return se.useEffect(()=>{if(u.current){const g=u.current.getBBox();p({x:g.x,y:g.y,width:g.width,height:g.height})}},[n]),typeof n>"u"||!n?null:$.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:O,visibility:d.width?"visible":"hidden",...a,children:[o&&$.jsx("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),$.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:u,style:r,children:n}),f]})};var $P=se.memo(zP);const ch=e=>({width:e.offsetWidth,height:e.offsetHeight}),Sr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),fh=(e={x:0,y:0},t)=>({x:Sr(e.x,t[0][0],t[1][0]),y:Sr(e.y,t[0][1],t[1][1])}),V_=(e,t,n)=>e<t?Sr(Math.abs(e-t),1,50)/50:e>n?-Sr(Math.abs(e-n),1,50)/50:0,U_=(e,t)=>{const n=V_(e.x,35,t.width-35)*20,r=V_(e.y,35,t.height-35)*20;return[n,r]},G_=e=>e.getRootNode?.()||window?.document,K_=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Oo=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),W_=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Y_=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),HP=(e,t)=>W_(K_(Oo(e),Oo(t))),dh=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},VP=e=>Xt(e.width)&&Xt(e.height)&&Xt(e.x)&&Xt(e.y),Xt=e=>!isNaN(e)&&isFinite(e),wt=Symbol.for("internals"),Z_=["Enter"," ","Escape"],UP=(e,t)=>{},GP=e=>"nativeEvent"in e;function hh(e){const n=(GP(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const X_=e=>"clientX"in e,Dn=(e,t)=>{const n=X_(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Ui=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Eo=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:a,markerEnd:u,markerStart:d,interactionWidth:p=20})=>$.jsxs($.Fragment,{children:[$.jsx("path",{id:e,style:a,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:u,markerStart:d}),p&&$.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),o&&Xt(n)&&Xt(r)?$.jsx($P,{x:n,y:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h}):null]});Eo.displayName="BaseEdge";function xo(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(s=>s.id===e);o&&n(r,{...o})}}function Q_({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,s=n<e?n+o:n-o,l=Math.abs(r-t)/2,c=r<t?r+l:r-l;return[s,c,o,l]}function J_({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:s,targetControlX:l,targetControlY:c}){const f=e*.125+o*.375+l*.375+n*.125,h=t*.125+s*.375+c*.375+r*.125,a=Math.abs(f-e),u=Math.abs(h-t);return[f,h,a,u]}var tr;(function(e){e.Strict="strict",e.Loose="loose"})(tr||(tr={}));var nr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(nr||(nr={}));var So;(function(e){e.Partial="partial",e.Full="full"})(So||(So={}));var vn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(vn||(vn={}));var Gi;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Gi||(Gi={}));var Ce;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ce||(Ce={}));function ew({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Ce.Left||e===Ce.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function tw({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top}){const[l,c]=ew({pos:n,x1:e,y1:t,x2:r,y2:o}),[f,h]=ew({pos:s,x1:r,y1:o,x2:e,y2:t}),[a,u,d,p]=J_({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${e},${t} C${l},${c} ${f},${h} ${r},${o}`,a,u,d,p]}const ph=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Ce.Bottom,targetPosition:s=Ce.Top,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:a,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:O,interactionWidth:g})=>{const[_,y,w]=tw({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return $.jsx(Eo,{path:_,labelX:y,labelY:w,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:a,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:O,interactionWidth:g})});ph.displayName="SimpleBezierEdge";const nw={[Ce.Left]:{x:-1,y:0},[Ce.Right]:{x:1,y:0},[Ce.Top]:{x:0,y:-1},[Ce.Bottom]:{x:0,y:1}},KP=({source:e,sourcePosition:t=Ce.Bottom,target:n})=>t===Ce.Left||t===Ce.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},rw=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function WP({source:e,sourcePosition:t=Ce.Bottom,target:n,targetPosition:r=Ce.Top,center:o,offset:s}){const l=nw[t],c=nw[r],f={x:e.x+l.x*s,y:e.y+l.y*s},h={x:n.x+c.x*s,y:n.y+c.y*s},a=KP({source:f,sourcePosition:t,target:h}),u=a.x!==0?"x":"y",d=a[u];let p=[],O,g;const _={x:0,y:0},y={x:0,y:0},[w,E,m,S]=Q_({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[u]*c[u]===-1){O=o.x||w,g=o.y||E;const N=[{x:O,y:f.y},{x:O,y:h.y}],M=[{x:f.x,y:g},{x:h.x,y:g}];l[u]===d?p=u==="x"?N:M:p=u==="x"?M:N}else{const N=[{x:f.x,y:h.y}],M=[{x:h.x,y:f.y}];if(u==="x"?p=l.x===d?M:N:p=l.y===d?N:M,t===r){const R=Math.abs(e[u]-n[u]);if(R<=s){const k=Math.min(s-1,s-R);l[u]===d?_[u]=k:y[u]=k}}if(t!==r){const R=u==="x"?"y":"x",k=l[u]===c[R],F=f[R]>h[R],U=f[R]<h[R];(l[u]===1&&(!k&&F||k&&U)||l[u]!==1&&(!k&&U||k&&F))&&(p=u==="x"?N:M)}const j={x:f.x-_.x,y:f.y-_.y},I={x:h.x-y.x,y:h.y-y.y},A=Math.max(Math.abs(j.x-p[0].x),Math.abs(I.x-p[0].x)),q=Math.max(Math.abs(j.y-p[0].y),Math.abs(I.y-p[0].y));A>=q?(O=(j.x+I.x)/2,g=p[0].y):(O=p[0].x,g=(j.y+I.y)/2)}return[[e,{x:f.x-_.x,y:f.y-_.y},...p,{x:h.x-y.x,y:h.y-y.y},n],O,g,m,S]}function YP(e,t,n,r){const o=Math.min(rw(e,t)/2,rw(t,n)/2,r),{x:s,y:l}=t;if(e.x===s&&s===n.x||e.y===l&&l===n.y)return`L${s} ${l}`;if(e.y===l){const h=e.x<n.x?-1:1,a=e.y<n.y?1:-1;return`L ${s+o*h},${l}Q ${s},${l} ${s},${l+o*a}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${l+o*f}Q ${s},${l} ${s+o*c},${l}`}function vh({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top,borderRadius:l=5,centerX:c,centerY:f,offset:h=20}){const[a,u,d,p,O]=WP({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:s,center:{x:c,y:f},offset:h});return[a.reduce((_,y,w)=>{let E="";return w>0&&w<a.length-1?E=YP(a[w-1],y,a[w+1],l):E=`${w===0?"M":"L"}${y.x} ${y.y}`,_+=E,_},""),u,d,p,O]}const Ki=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:a,sourcePosition:u=Ce.Bottom,targetPosition:d=Ce.Top,markerEnd:p,markerStart:O,pathOptions:g,interactionWidth:_})=>{const[y,w,E]=vh({sourceX:e,sourceY:t,sourcePosition:u,targetX:n,targetY:r,targetPosition:d,borderRadius:g?.borderRadius,offset:g?.offset});return $.jsx(Eo,{path:y,labelX:w,labelY:E,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:a,markerEnd:p,markerStart:O,interactionWidth:_})});Ki.displayName="SmoothStepEdge";const gh=se.memo(e=>$.jsx(Ki,{...e,pathOptions:se.useMemo(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));gh.displayName="StepEdge";function ZP({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,s,l,c]=Q_({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,s,l,c]}const yh=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:a,markerEnd:u,markerStart:d,interactionWidth:p})=>{const[O,g,_]=ZP({sourceX:e,sourceY:t,targetX:n,targetY:r});return $.jsx(Eo,{path:O,labelX:g,labelY:_,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,style:a,markerEnd:u,markerStart:d,interactionWidth:p})});yh.displayName="StraightEdge";function Wi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ow({pos:e,x1:t,y1:n,x2:r,y2:o,c:s}){switch(e){case Ce.Left:return[t-Wi(t-r,s),n];case Ce.Right:return[t+Wi(r-t,s),n];case Ce.Top:return[t,n-Wi(n-o,s)];case Ce.Bottom:return[t,n+Wi(o-n,s)]}}function iw({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:r,targetY:o,targetPosition:s=Ce.Top,curvature:l=.25}){const[c,f]=ow({pos:n,x1:e,y1:t,x2:r,y2:o,c:l}),[h,a]=ow({pos:s,x1:r,y1:o,x2:e,y2:t,c:l}),[u,d,p,O]=J_({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:h,targetControlY:a});return[`M${e},${t} C${c},${f} ${h},${a} ${r},${o}`,u,d,p,O]}const Yi=se.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Ce.Bottom,targetPosition:s=Ce.Top,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:a,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:O,pathOptions:g,interactionWidth:_})=>{const[y,w,E]=iw({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s,curvature:g?.curvature});return $.jsx(Eo,{path:y,labelX:w,labelY:E,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:a,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:O,interactionWidth:_})});Yi.displayName="BezierEdge";const mh=se.createContext(null),XP=mh.Provider;mh.Consumer;const QP=()=>se.useContext(mh),JP=e=>"id"in e&&"source"in e&&"target"in e,eI=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,bh=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,tI=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),nI=(e,t)=>{if(!e.source||!e.target)return t;let n;return JP(e)?n={...e}:n={...e,id:eI(e)},tI(n,t)?t:t.concat(n)},aw=({x:e,y:t},[n,r,o],s,[l,c])=>{const f={x:(e-n)/o,y:(t-r)/o};return s?{x:l*Math.round(f.x/l),y:c*Math.round(f.y/c)}:f},rI=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),rr=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},Zi=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:s,y:l}=rr(o,t).positionAbsolute;return K_(r,Oo({x:s,y:l,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return W_(n)},sw=(e,t,[n,r,o]=[0,0,1],s=!1,l=!1,c=[0,0])=>{const f={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},h=[];return e.forEach(a=>{const{width:u,height:d,selectable:p=!0,hidden:O=!1}=a;if(l&&!p||O)return!1;const{positionAbsolute:g}=rr(a,c),_={x:g.x,y:g.y,width:u||0,height:d||0},y=dh(f,_),w=typeof u>"u"||typeof d>"u"||u===null||d===null,E=s&&y>0,m=(u||0)*(d||0);(w||E||y>=m||a.dragging)&&h.push(a)}),h},lw=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},uw=(e,t,n,r,o,s=.1)=>{const l=t/(e.width*(1+s)),c=n/(e.height*(1+s)),f=Math.min(l,c),h=Sr(f,r,o),a=e.x+e.width/2,u=e.y+e.height/2,d=t/2-a*h,p=n/2-u*h;return[d,p,h]},or=(e,t=0)=>e.transition().duration(t);function cw(e,t,n,r){return(t[n]||[]).reduce((o,s)=>(`${e.id}-${s.id}-${n}`!==r&&o.push({id:s.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+s.x+s.width/2,y:(e.positionAbsolute?.y??0)+s.y+s.height/2}),o),[])}function oI(e,t,n,r,o,s){const{x:l,y:c}=Dn(e),h=t.elementsFromPoint(l,c).find(O=>O.classList.contains("react-flow__handle"));if(h){const O=h.getAttribute("data-nodeid");if(O){const g=_h(void 0,h),_=h.getAttribute("data-handleid"),y=s({nodeId:O,id:_,type:g});if(y)return{handle:{id:_,type:g,nodeId:O,x:n.x,y:n.y},validHandleResult:y}}}let a=[],u=1/0;if(o.forEach(O=>{const g=Math.sqrt((O.x-n.x)**2+(O.y-n.y)**2);if(g<=r){const _=s(O);g<=u&&(g<u?a=[{handle:O,validHandleResult:_}]:g===u&&a.push({handle:O,validHandleResult:_}),u=g)}}),!a.length)return{handle:null,validHandleResult:fw()};if(a.length===1)return a[0];const d=a.some(({validHandleResult:O})=>O.isValid),p=a.some(({handle:O})=>O.type==="target");return a.find(({handle:O,validHandleResult:g})=>p?O.type==="target":d?g.isValid:!0)||a[0]}const iI={source:null,target:null,sourceHandle:null,targetHandle:null},fw=()=>({handleDomNode:null,isValid:!1,connection:iI,endHandle:null});function dw(e,t,n,r,o,s,l){const c=o==="target",f=l.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),h={...fw(),handleDomNode:f};if(f){const a=_h(void 0,f),u=f.getAttribute("data-nodeid"),d=f.getAttribute("data-handleid"),p=f.classList.contains("connectable"),O=f.classList.contains("connectableend"),g={source:c?u:n,sourceHandle:c?d:r,target:c?n:u,targetHandle:c?r:d};h.connection=g,p&&O&&(t===tr.Strict?c&&a==="source"||!c&&a==="target":u!==n||d!==r)&&(h.endHandle={nodeId:u,handleId:d,type:a},h.isValid=s(g))}return h}function aI({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,s)=>{if(s[wt]){const{handleBounds:l}=s[wt];let c=[],f=[];l&&(c=cw(s,l,"source",`${t}-${n}-${r}`),f=cw(s,l,"target",`${t}-${n}-${r}`)),o.push(...c,...f)}return o},[])}function _h(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function wh(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function sI(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function hw({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:s,setState:l,isValidConnection:c,edgeUpdaterType:f,onEdgeUpdateEnd:h}){const a=G_(e.target),{connectionMode:u,domNode:d,autoPanOnConnect:p,connectionRadius:O,onConnectStart:g,panBy:_,getNodes:y,cancelConnection:w}=s();let E=0,m;const{x:S,y:C}=Dn(e),N=a?.elementFromPoint(S,C),M=_h(f,N),j=d?.getBoundingClientRect();if(!j||!M)return;let I,A=Dn(e,j),q=!1,R=null,k=!1,F=null;const U=aI({nodes:y(),nodeId:n,handleId:t,handleType:M}),ne=()=>{if(!p)return;const[W,z]=U_(A,j);_({x:W,y:z}),E=requestAnimationFrame(ne)};l({connectionPosition:A,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:M,connectionStartHandle:{nodeId:n,handleId:t,type:M},connectionEndHandle:null}),g?.(e,{nodeId:n,handleId:t,handleType:M});function ue(W){const{transform:z}=s();A=Dn(W,j);const{handle:Q,validHandleResult:re}=oI(W,a,aw(A,z,!1,[1,1]),O,U,Z=>dw(Z,u,n,t,o?"target":"source",c,a));if(m=Q,q||(ne(),q=!0),F=re.handleDomNode,R=re.connection,k=re.isValid,l({connectionPosition:m&&k?rI({x:m.x,y:m.y},z):A,connectionStatus:sI(!!m,k),connectionEndHandle:re.endHandle}),!m&&!k&&!F)return wh(I);R.source!==R.target&&F&&(wh(I),I=F,F.classList.add("connecting","react-flow__handle-connecting"),F.classList.toggle("valid",k),F.classList.toggle("react-flow__handle-valid",k))}function K(W){(m||F)&&R&&k&&r?.(R),s().onConnectEnd?.(W),f&&h?.(W),wh(I),w(),cancelAnimationFrame(E),q=!1,k=!1,R=null,F=null,a.removeEventListener("mousemove",ue),a.removeEventListener("mouseup",K),a.removeEventListener("touchmove",ue),a.removeEventListener("touchend",K)}a.addEventListener("mousemove",ue),a.addEventListener("mouseup",K),a.addEventListener("touchmove",ue),a.addEventListener("touchend",K)}const pw=()=>!0,lI=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),uI=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:s,connectionClickStartHandle:l}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||s?.nodeId===e&&s?.handleId===t&&s?.type===n,clickConnecting:l?.nodeId===e&&l?.handleId===t&&l?.type===n}},vw=se.forwardRef(({type:e="source",position:t=Ce.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:f,className:h,onMouseDown:a,onTouchStart:u,...d},p)=>{const O=l||null,g=e==="target",_=_t(),y=QP(),{connectOnClick:w,noPanClassName:E}=st(lI,St),{connecting:m,clickConnecting:S}=st(uI(y,O,e),St);y||_.getState().onError?.("010",Cn.error010());const C=j=>{const{defaultEdgeOptions:I,onConnect:A,hasDefaultEdges:q}=_.getState(),R={...I,...j};if(q){const{edges:k,setEdges:F}=_.getState();F(nI(R,k))}A?.(R),c?.(R)},N=j=>{if(!y)return;const I=X_(j);o&&(I&&j.button===0||!I)&&hw({event:j,handleId:O,nodeId:y,onConnect:C,isTarget:g,getState:_.getState,setState:_.setState,isValidConnection:n||_.getState().isValidConnection||pw}),I?a?.(j):u?.(j)},M=j=>{const{onClickConnectStart:I,onClickConnectEnd:A,connectionClickStartHandle:q,connectionMode:R,isValidConnection:k}=_.getState();if(!y||!q&&!o)return;if(!q){I?.(j,{nodeId:y,handleId:O,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:y,type:e,handleId:O}});return}const F=G_(j.target),U=n||k||pw,{connection:ne,isValid:ue}=dw({nodeId:y,id:O,type:e},R,q.nodeId,q.handleId||null,q.type,U,F);ue&&C(ne),A?.(j),_.setState({connectionClickStartHandle:null})};return $.jsx("div",{"data-handleid":O,"data-nodeid":y,"data-handlepos":t,"data-id":`${y}-${O}-${e}`,className:Tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,h,{source:!g,target:g,connectable:r,connectablestart:o,connectableend:s,connecting:S,connectionindicator:r&&(o&&!m||s&&m)}]),onMouseDown:N,onTouchStart:N,onClick:w?M:void 0,ref:p,...d,children:f})});vw.displayName="Handle";var vt=se.memo(vw);const gw=({data:e,isConnectable:t,targetPosition:n=Ce.Top,sourcePosition:r=Ce.Bottom})=>$.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:n,isConnectable:t}),e?.label,$.jsx(vt,{type:"source",position:r,isConnectable:t})]});gw.displayName="DefaultNode";var Oh=se.memo(gw);const yw=({data:e,isConnectable:t,sourcePosition:n=Ce.Bottom})=>$.jsxs($.Fragment,{children:[e?.label,$.jsx(vt,{type:"source",position:n,isConnectable:t})]});yw.displayName="InputNode";var mw=se.memo(yw);const bw=({data:e,isConnectable:t,targetPosition:n=Ce.Top})=>$.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:n,isConnectable:t}),e?.label]});bw.displayName="OutputNode";var _w=se.memo(bw);const Eh=()=>null;Eh.displayName="GroupNode";const cI=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),Xi=e=>e.id;function fI(e,t){return St(e.selectedNodes.map(Xi),t.selectedNodes.map(Xi))&&St(e.selectedEdges.map(Xi),t.selectedEdges.map(Xi))}const ww=se.memo(({onSelectionChange:e})=>{const t=_t(),{selectedNodes:n,selectedEdges:r}=st(cI,fI);return se.useEffect(()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange?.(o)},[n,r,e]),null});ww.displayName="SelectionListener";const dI=e=>!!e.onSelectionChange;function hI({onSelectionChange:e}){const t=st(dI);return e||t?$.jsx(ww,{onSelectionChange:e}):null}const pI=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function kr(e,t){se.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Xe(e,t,n){se.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const vI=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:s,onConnectEnd:l,onClickConnectStart:c,onClickConnectEnd:f,nodesDraggable:h,nodesConnectable:a,nodesFocusable:u,edgesFocusable:d,edgesUpdatable:p,elevateNodesOnSelect:O,minZoom:g,maxZoom:_,nodeExtent:y,onNodesChange:w,onEdgesChange:E,elementsSelectable:m,connectionMode:S,snapGrid:C,snapToGrid:N,translateExtent:M,connectOnClick:j,defaultEdgeOptions:I,fitView:A,fitViewOptions:q,onNodesDelete:R,onEdgesDelete:k,onNodeDrag:F,onNodeDragStart:U,onNodeDragStop:ne,onSelectionDrag:ue,onSelectionDragStart:K,onSelectionDragStop:W,noPanClassName:z,nodeOrigin:Q,rfId:re,autoPanOnConnect:Z,autoPanOnNodeDrag:X,onError:H,connectionRadius:ee,isValidConnection:le})=>{const{setNodes:de,setEdges:pe,setDefaultNodesAndEdges:Ee,setMinZoom:Ie,setMaxZoom:Pe,setTranslateExtent:Ae,setNodeExtent:Se,reset:Ge}=st(pI,St),Oe=_t();return se.useEffect(()=>{const ge=r?.map(me=>({...me,...I}));return Ee(n,ge),()=>{Ge()}},[]),Xe("defaultEdgeOptions",I,Oe.setState),Xe("connectionMode",S,Oe.setState),Xe("onConnect",o,Oe.setState),Xe("onConnectStart",s,Oe.setState),Xe("onConnectEnd",l,Oe.setState),Xe("onClickConnectStart",c,Oe.setState),Xe("onClickConnectEnd",f,Oe.setState),Xe("nodesDraggable",h,Oe.setState),Xe("nodesConnectable",a,Oe.setState),Xe("nodesFocusable",u,Oe.setState),Xe("edgesFocusable",d,Oe.setState),Xe("edgesUpdatable",p,Oe.setState),Xe("elementsSelectable",m,Oe.setState),Xe("elevateNodesOnSelect",O,Oe.setState),Xe("snapToGrid",N,Oe.setState),Xe("snapGrid",C,Oe.setState),Xe("onNodesChange",w,Oe.setState),Xe("onEdgesChange",E,Oe.setState),Xe("connectOnClick",j,Oe.setState),Xe("fitViewOnInit",A,Oe.setState),Xe("fitViewOnInitOptions",q,Oe.setState),Xe("onNodesDelete",R,Oe.setState),Xe("onEdgesDelete",k,Oe.setState),Xe("onNodeDrag",F,Oe.setState),Xe("onNodeDragStart",U,Oe.setState),Xe("onNodeDragStop",ne,Oe.setState),Xe("onSelectionDrag",ue,Oe.setState),Xe("onSelectionDragStart",K,Oe.setState),Xe("onSelectionDragStop",W,Oe.setState),Xe("noPanClassName",z,Oe.setState),Xe("nodeOrigin",Q,Oe.setState),Xe("rfId",re,Oe.setState),Xe("autoPanOnConnect",Z,Oe.setState),Xe("autoPanOnNodeDrag",X,Oe.setState),Xe("onError",H,Oe.setState),Xe("connectionRadius",ee,Oe.setState),Xe("isValidConnection",le,Oe.setState),kr(e,de),kr(t,pe),kr(g,Ie),kr(_,Pe),kr(M,Ae),kr(y,Se),null},Ow={display:"none"},gI={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ew="react-flow__node-desc",xw="react-flow__edge-desc",yI="react-flow__aria-live",mI=e=>e.ariaLiveMessage;function bI({rfId:e}){const t=st(mI);return $.jsx("div",{id:`${yI}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:gI,children:t})}function _I({rfId:e,disableKeyboardA11y:t}){return $.jsxs($.Fragment,{children:[$.jsxs("div",{id:`${Ew}-${e}`,style:Ow,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),$.jsx("div",{id:`${xw}-${e}`,style:Ow,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&$.jsx(bI,{rfId:e})]})}const wI=typeof document<"u"?document:null;var ko=(e=null,t={target:wI})=>{const[n,r]=se.useState(!1),o=se.useRef(!1),s=se.useRef(new Set([])),[l,c]=se.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(u=>typeof u=="string").map(u=>u.split("+")),a=h.reduce((u,d)=>u.concat(...d),[]);return[h,a]}return[[],[]]},[e]);return se.useEffect(()=>{if(e!==null){const f=u=>{if(o.current=u.ctrlKey||u.metaKey||u.shiftKey,!o.current&&hh(u))return!1;const d=kw(u.code,c);s.current.add(u[d]),Sw(l,s.current,!1)&&(u.preventDefault(),r(!0))},h=u=>{if(!o.current&&hh(u))return!1;const d=kw(u.code,c);Sw(l,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(u[d]),u.key==="Meta"&&s.current.clear(),o.current=!1},a=()=>{s.current.clear(),r(!1)};return t?.target?.addEventListener("keydown",f),t?.target?.addEventListener("keyup",h),window.addEventListener("blur",a),()=>{t?.target?.removeEventListener("keydown",f),t?.target?.removeEventListener("keyup",h),window.removeEventListener("blur",a)}}},[e,r]),n};function Sw(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function kw(e,t){return t.includes(e)?"code":"key"}function Nw(e,t,n,r){if(!e.parentNode)return n;const o=t.get(e.parentNode),s=rr(o,r);return Nw(o,t,{x:(n.x??0)+s.x,y:(n.y??0)+s.y,z:(o[wt]?.z??0)>(n.z??0)?o[wt]?.z??0:n.z??0},r)}function Tw(e,t,n){e.forEach(r=>{if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n?.[r.id]){const{x:o,y:s,z:l}=Nw(r,e,{...r.position,z:r[wt]?.z??0},t);r.positionAbsolute={x:o,y:s},r[wt].z=l,n?.[r.id]&&(r[wt].isParent=!0)}})}function xh(e,t,n,r){const o=new Map,s={},l=r?1e3:0;return e.forEach(c=>{const f=(Xt(c.zIndex)?c.zIndex:0)+(c.selected?l:0),h=t.get(c.id),a={width:h?.width,height:h?.height,...c,positionAbsolute:{x:c.position.x,y:c.position.y}};c.parentNode&&(a.parentNode=c.parentNode,s[c.parentNode]=!0),Object.defineProperty(a,wt,{enumerable:!1,value:{handleBounds:h?.[wt]?.handleBounds,z:f}}),o.set(c.id,a)}),Tw(o,n,s),o}function Cw(e,t={}){const{getNodes:n,width:r,height:o,minZoom:s,maxZoom:l,d3Zoom:c,d3Selection:f,fitViewOnInitDone:h,fitViewOnInit:a,nodeOrigin:u}=e(),d=t.initial&&!h&&a;if(c&&f&&(d||!t.initial)){const O=n().filter(_=>{const y=t.includeHiddenNodes?_.width&&_.height:!_.hidden;return t.nodes?.length?y&&t.nodes.some(w=>w.id===_.id):y}),g=O.every(_=>_.width&&_.height);if(O.length>0&&g){const _=Zi(O,u),[y,w,E]=uw(_,r,o,t.minZoom??s,t.maxZoom??l,t.padding??.1),m=Tn.translate(y,w).scale(E);return typeof t.duration=="number"&&t.duration>0?c.transform(or(f,t.duration),m):c.transform(f,m),!0}}return!1}function OI(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[wt]:r[wt],selected:n.selected})}),new Map(t)}function EI(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function Qi({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:s,onNodesChange:l,onEdgesChange:c,hasDefaultNodes:f,hasDefaultEdges:h}=n();e?.length&&(f&&r({nodeInternals:OI(e,o)}),l?.(e)),t?.length&&(h&&r({edges:EI(t,s)}),c?.(t))}const Nr=()=>{},xI={zoomIn:Nr,zoomOut:Nr,zoomTo:Nr,getZoom:()=>1,setViewport:Nr,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Nr,fitBounds:Nr,project:e=>e,viewportInitialized:!1},SI=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),kI=()=>{const e=_t(),{d3Zoom:t,d3Selection:n}=st(SI,St);return se.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(or(n,o?.duration),1.2),zoomOut:o=>t.scaleBy(or(n,o?.duration),1/1.2),zoomTo:(o,s)=>t.scaleTo(or(n,s?.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,s)=>{const[l,c,f]=e.getState().transform,h=Tn.translate(o.x??l,o.y??c).scale(o.zoom??f);t.transform(or(n,s?.duration),h)},getViewport:()=>{const[o,s,l]=e.getState().transform;return{x:o,y:s,zoom:l}},fitView:o=>Cw(e.getState,o),setCenter:(o,s,l)=>{const{width:c,height:f,maxZoom:h}=e.getState(),a=typeof l?.zoom<"u"?l.zoom:h,u=c/2-o*a,d=f/2-s*a,p=Tn.translate(u,d).scale(a);t.transform(or(n,l?.duration),p)},fitBounds:(o,s)=>{const{width:l,height:c,minZoom:f,maxZoom:h}=e.getState(),[a,u,d]=uw(o,l,c,f,h,s?.padding??.1),p=Tn.translate(a,u).scale(d);t.transform(or(n,s?.duration),p)},project:o=>{const{transform:s,snapToGrid:l,snapGrid:c}=e.getState();return aw(o,s,l,c)},viewportInitialized:!0}:xI,[t,n])};function Ji(){const e=kI(),t=_t(),n=se.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),r=se.useCallback(g=>t.getState().nodeInternals.get(g),[]),o=se.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(_=>({..._}))},[]),s=se.useCallback(g=>{const{edges:_=[]}=t.getState();return _.find(y=>y.id===g)},[]),l=se.useCallback(g=>{const{getNodes:_,setNodes:y,hasDefaultNodes:w,onNodesChange:E}=t.getState(),m=_(),S=typeof g=="function"?g(m):g;if(w)y(S);else if(E){const C=S.length===0?m.map(N=>({type:"remove",id:N.id})):S.map(N=>({item:N,type:"reset"}));E(C)}},[]),c=se.useCallback(g=>{const{edges:_=[],setEdges:y,hasDefaultEdges:w,onEdgesChange:E}=t.getState(),m=typeof g=="function"?g(_):g;if(w)y(m);else if(E){const S=m.length===0?_.map(C=>({type:"remove",id:C.id})):m.map(C=>({item:C,type:"reset"}));E(S)}},[]),f=se.useCallback(g=>{const _=Array.isArray(g)?g:[g],{getNodes:y,setNodes:w,hasDefaultNodes:E,onNodesChange:m}=t.getState();if(E){const C=[...y(),..._];w(C)}else if(m){const S=_.map(C=>({item:C,type:"add"}));m(S)}},[]),h=se.useCallback(g=>{const _=Array.isArray(g)?g:[g],{edges:y=[],setEdges:w,hasDefaultEdges:E,onEdgesChange:m}=t.getState();if(E)w([...y,..._]);else if(m){const S=_.map(C=>({item:C,type:"add"}));m(S)}},[]),a=se.useCallback(()=>{const{getNodes:g,edges:_=[],transform:y}=t.getState(),[w,E,m]=y;return{nodes:g().map(S=>({...S})),edges:_.map(S=>({...S})),viewport:{x:w,y:E,zoom:m}}},[]),u=se.useCallback(({nodes:g,edges:_})=>{const{nodeInternals:y,getNodes:w,edges:E,hasDefaultNodes:m,hasDefaultEdges:S,onNodesDelete:C,onEdgesDelete:N,onNodesChange:M,onEdgesChange:j}=t.getState(),I=(g||[]).map(F=>F.id),A=(_||[]).map(F=>F.id),q=w().reduce((F,U)=>{const ne=!I.includes(U.id)&&U.parentNode&&F.find(K=>K.id===U.parentNode);return(typeof U.deletable=="boolean"?U.deletable:!0)&&(I.includes(U.id)||ne)&&F.push(U),F},[]),R=E.filter(F=>typeof F.deletable=="boolean"?F.deletable:!0),k=R.filter(F=>A.includes(F.id));if(q||k){const F=lw(q,R),U=[...k,...F],ne=U.reduce((ue,K)=>(ue.includes(K.id)||ue.push(K.id),ue),[]);if((S||m)&&(S&&t.setState({edges:E.filter(ue=>!ne.includes(ue.id))}),m&&(q.forEach(ue=>{y.delete(ue.id)}),t.setState({nodeInternals:new Map(y)}))),ne.length>0&&(N?.(U),j&&j(ne.map(ue=>({id:ue,type:"remove"})))),q.length>0&&(C?.(q),M)){const ue=q.map(K=>({id:K.id,type:"remove"}));M(ue)}}},[]),d=se.useCallback(g=>{const _=VP(g),y=_?null:t.getState().nodeInternals.get(g.id);return[_?g:Y_(y),y,_]},[]),p=se.useCallback((g,_=!0,y)=>{const[w,E,m]=d(g);return w?(y||t.getState().getNodes()).filter(S=>{if(!m&&(S.id===E.id||!S.positionAbsolute))return!1;const C=Y_(S),N=dh(C,w);return _&&N>0||N>=g.width*g.height}):[]},[]),O=se.useCallback((g,_,y=!0)=>{const[w]=d(g);if(!w)return!1;const E=dh(w,_);return y&&E>0||E>=g.width*g.height},[]);return se.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:s,setNodes:l,setEdges:c,addNodes:f,addEdges:h,toObject:a,deleteElements:u,getIntersectingNodes:p,isNodeIntersecting:O}),[e,n,r,o,s,l,c,f,h,a,u,p,O])}var NI=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=_t(),{deleteElements:r}=Ji(),o=ko(e),s=ko(t);se.useEffect(()=>{if(o){const{edges:l,getNodes:c}=n.getState(),f=c().filter(a=>a.selected),h=l.filter(a=>a.selected);r({nodes:f,edges:h}),n.setState({nodesSelectionActive:!1})}},[o]),se.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])};function TI(e){const t=_t();se.useEffect(()=>{let n;const r=()=>{if(!e.current)return;const o=ch(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",Cn.error004()),t.setState({width:o.width||500,height:o.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const Sh={position:"absolute",width:"100%",height:"100%",top:0,left:0},CI=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,ea=e=>({x:e.x,y:e.y,zoom:e.k}),Tr=(e,t)=>e.target.closest(`.${t}`),Aw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Pw=e=>{const t=e.ctrlKey&&Ui()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},AI=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),PI=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:s=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:f=nr.Free,zoomOnDoubleClick:h=!0,elementsSelectable:a,panOnDrag:u=!0,defaultViewport:d,translateExtent:p,minZoom:O,maxZoom:g,zoomActivationKeyCode:_,preventScrolling:y=!0,children:w,noWheelClassName:E,noPanClassName:m})=>{const S=se.useRef(),C=_t(),N=se.useRef(!1),M=se.useRef(!1),j=se.useRef(null),I=se.useRef({x:0,y:0,zoom:0}),{d3Zoom:A,d3Selection:q,d3ZoomHandler:R,userSelectionActive:k}=st(AI,St),F=ko(_),U=se.useRef(0),ne=se.useRef(!1),ue=se.useRef();return TI(j),se.useEffect(()=>{if(j.current){const K=j.current.getBoundingClientRect(),W=$_().scaleExtent([O,g]).translateExtent(p),z=Zt(j.current).call(W),Q=Tn.translate(d.x,d.y).scale(Sr(d.zoom,O,g)),re=[[0,0],[K.width,K.height]],Z=W.constrain()(Q,re,p);W.transform(z,Z),W.wheelDelta(Pw),C.setState({d3Zoom:W,d3Selection:z,d3ZoomHandler:z.on("wheel.zoom"),transform:[Z.x,Z.y,Z.k],domNode:j.current.closest(".react-flow")})}},[]),se.useEffect(()=>{q&&A&&(l&&!F&&!k?q.on("wheel.zoom",K=>{if(Tr(K,E))return!1;K.preventDefault(),K.stopImmediatePropagation();const W=q.property("__zoom").k||1,z=Ui();if(K.ctrlKey&&s&&z){const de=an(K),pe=Pw(K),Ee=W*Math.pow(2,pe);A.scaleTo(q,Ee,de,K);return}const Q=K.deltaMode===1?20:1;let re=f===nr.Vertical?0:K.deltaX*Q,Z=f===nr.Horizontal?0:K.deltaY*Q;!z&&K.shiftKey&&f!==nr.Vertical&&(re=K.deltaY*Q,Z=0),A.translateBy(q,-(re/W)*c,-(Z/W)*c,{internal:!0});const X=ea(q.property("__zoom")),{onViewportChangeStart:H,onViewportChange:ee,onViewportChangeEnd:le}=C.getState();clearTimeout(ue.current),ne.current||(ne.current=!0,t?.(K,X),H?.(X)),ne.current&&(e?.(K,X),ee?.(X),ue.current=setTimeout(()=>{n?.(K,X),le?.(X),ne.current=!1},150))},{passive:!1}):typeof R<"u"&&q.on("wheel.zoom",function(K,W){if(!y||Tr(K,E))return null;K.preventDefault(),R.call(this,K,W)},{passive:!1}))},[k,l,f,q,A,R,F,s,y,E,t,e,n]),se.useEffect(()=>{A&&A.on("start",K=>{if(!K.sourceEvent||K.sourceEvent.internal)return null;U.current=K.sourceEvent?.button;const{onViewportChangeStart:W}=C.getState(),z=ea(K.transform);N.current=!0,I.current=z,K.sourceEvent?.type==="mousedown"&&C.setState({paneDragging:!0}),W?.(z),t?.(K.sourceEvent,z)})},[A,t]),se.useEffect(()=>{A&&(k&&!N.current?A.on("zoom",null):k||A.on("zoom",K=>{const{onViewportChange:W}=C.getState();if(C.setState({transform:[K.transform.x,K.transform.y,K.transform.k]}),M.current=!!(r&&Aw(u,U.current??0)),(e||W)&&!K.sourceEvent?.internal){const z=ea(K.transform);W?.(z),e?.(K.sourceEvent,z)}}))},[k,A,e,u,r]),se.useEffect(()=>{A&&A.on("end",K=>{if(!K.sourceEvent||K.sourceEvent.internal)return null;const{onViewportChangeEnd:W}=C.getState();if(N.current=!1,C.setState({paneDragging:!1}),r&&Aw(u,U.current??0)&&!M.current&&r(K.sourceEvent),M.current=!1,(n||W)&&CI(I.current,K.transform)){const z=ea(K.transform);I.current=z,clearTimeout(S.current),S.current=setTimeout(()=>{W?.(z),n?.(K.sourceEvent,z)},l?150:0)}})},[A,l,u,n,r]),se.useEffect(()=>{A&&A.filter(K=>{const W=F||o,z=s&&K.ctrlKey;if(K.button===1&&K.type==="mousedown"&&(Tr(K,"react-flow__node")||Tr(K,"react-flow__edge")))return!0;if(!u&&!W&&!l&&!h&&!s||k||!h&&K.type==="dblclick"||Tr(K,E)&&K.type==="wheel"||Tr(K,m)&&K.type!=="wheel"||!s&&K.ctrlKey&&K.type==="wheel"||!W&&!l&&!z&&K.type==="wheel"||!u&&(K.type==="mousedown"||K.type==="touchstart")||Array.isArray(u)&&!u.includes(K.button)&&(K.type==="mousedown"||K.type==="touchstart"))return!1;const Q=Array.isArray(u)&&u.includes(K.button)||!K.button||K.button<=1;return(!K.ctrlKey||K.type==="wheel")&&Q})},[k,A,o,s,l,h,u,a,F]),$.jsx("div",{className:"react-flow__renderer",ref:j,style:Sh,children:w})},II=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function MI(){const{userSelectionActive:e,userSelectionRect:t}=st(II,St);return e&&t?$.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Iw(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,o=t.position.y+t.height-n.height;if(r>0||o>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),o>0&&(n.style.height+=o),t.position.x<0){const s=Math.abs(t.position.x);n.position.x=n.position.x-s,n.style.width+=s,t.position.x=0}if(t.position.y<0){const s=Math.abs(t.position.y);n.position.y=n.position.y-s,n.style.height+=s,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function Mw(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,o)=>{const s=e.filter(c=>c.id===o.id);if(s.length===0)return r.push(o),r;const l={...o};for(const c of s)if(c)switch(c.type){case"select":{l.selected=c.selected;break}case"position":{typeof c.position<"u"&&(l.position=c.position),typeof c.positionAbsolute<"u"&&(l.positionAbsolute=c.positionAbsolute),typeof c.dragging<"u"&&(l.dragging=c.dragging),l.expandParent&&Iw(r,l);break}case"dimensions":{typeof c.dimensions<"u"&&(l.width=c.dimensions.width,l.height=c.dimensions.height),typeof c.updateStyle<"u"&&(l.style={...l.style||{},...c.dimensions}),typeof c.resizing=="boolean"&&(l.resizing=c.resizing),l.expandParent&&Iw(r,l);break}case"remove":return r}return r.push(l),r},n)}function qw(e,t){return Mw(e,t)}function qI(e,t){return Mw(e,t)}const jn=(e,t)=>({id:e,type:"select",selected:t});function Cr(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(jn(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(jn(r.id,!1))),n},[])}const kh=(e,t)=>n=>{n.target===t.current&&e?.(n)},LI=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Lw=se.memo(({isSelecting:e,selectionMode:t=So.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:s,onPaneContextMenu:l,onPaneScroll:c,onPaneMouseEnter:f,onPaneMouseMove:h,onPaneMouseLeave:a,children:u})=>{const d=se.useRef(null),p=_t(),O=se.useRef(0),g=se.useRef(0),_=se.useRef(),{userSelectionActive:y,elementsSelectable:w,dragging:E}=st(LI,St),m=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),O.current=0,g.current=0},S=R=>{s?.(R),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},C=R=>{if(Array.isArray(n)&&n?.includes(2)){R.preventDefault();return}l?.(R)},N=c?R=>c(R):void 0,M=R=>{const{resetSelectedElements:k,domNode:F}=p.getState();if(_.current=F?.getBoundingClientRect(),!w||!e||R.button!==0||R.target!==d.current||!_.current)return;const{x:U,y:ne}=Dn(R,_.current);k(),p.setState({userSelectionRect:{width:0,height:0,startX:U,startY:ne,x:U,y:ne}}),r?.(R)},j=R=>{const{userSelectionRect:k,nodeInternals:F,edges:U,transform:ne,onNodesChange:ue,onEdgesChange:K,nodeOrigin:W,getNodes:z}=p.getState();if(!e||!_.current||!k)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Q=Dn(R,_.current),re=k.startX??0,Z=k.startY??0,X={...k,x:Q.x<re?Q.x:re,y:Q.y<Z?Q.y:Z,width:Math.abs(Q.x-re),height:Math.abs(Q.y-Z)},H=z(),ee=sw(F,X,ne,t===So.Partial,!0,W),le=lw(ee,U).map(pe=>pe.id),de=ee.map(pe=>pe.id);if(O.current!==de.length){O.current=de.length;const pe=Cr(H,de);pe.length&&ue?.(pe)}if(g.current!==le.length){g.current=le.length;const pe=Cr(U,le);pe.length&&K?.(pe)}p.setState({userSelectionRect:X})},I=R=>{if(R.button!==0)return;const{userSelectionRect:k}=p.getState();!y&&k&&R.target===d.current&&S?.(R),p.setState({nodesSelectionActive:O.current>0}),m(),o?.(R)},A=R=>{y&&(p.setState({nodesSelectionActive:O.current>0}),o?.(R)),m()},q=w&&(e||y);return $.jsxs("div",{className:Tt(["react-flow__pane",{dragging:E,selection:e}]),onClick:q?void 0:kh(S,d),onContextMenu:kh(C,d),onWheel:kh(N,d),onMouseEnter:q?void 0:f,onMouseDown:q?M:void 0,onMouseMove:q?j:h,onMouseUp:q?I:void 0,onMouseLeave:q?A:a,ref:d,style:Sh,children:[u,$.jsx(MI,{})]})});Lw.displayName="Pane";function Rw(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Rw(n,t):!1}function Dw(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function RI(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||!Rw(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>({id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(o.positionAbsolute?.x??0),y:n.y-(o.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode,width:o.width,height:o.height}))}function DI(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function jw(e,t,n,r,o=[0,0],s){const l=DI(e,e.extent||r);let c=l;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const a=n.get(e.parentNode),{x:u,y:d}=rr(a,o).positionAbsolute;c=a&&Xt(u)&&Xt(d)&&Xt(a.width)&&Xt(a.height)?[[u+e.width*o[0],d+e.height*o[1]],[u+a.width-e.width+e.width*o[0],d+a.height-e.height+e.height*o[1]]]:c}else s?.("005",Cn.error005()),c=l;else if(e.extent&&e.parentNode){const a=n.get(e.parentNode),{x:u,y:d}=rr(a,o).positionAbsolute;c=[[e.extent[0][0]+u,e.extent[0][1]+d],[e.extent[1][0]+u,e.extent[1][1]+d]]}let f={x:0,y:0};if(e.parentNode){const a=n.get(e.parentNode);f=rr(a,o).positionAbsolute}const h=c&&c!=="parent"?fh(t,c):t;return{position:{x:h.x-f.x,y:h.y-f.y},positionAbsolute:h}}function Nh({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const Fw=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const s=Array.from(o),l=t.getBoundingClientRect(),c={x:l.width*r[0],y:l.height*r[1]};return s.map(f=>{const h=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),position:f.getAttribute("data-handlepos"),x:(h.left-l.left-c.x)/n,y:(h.top-l.top-c.y)/n,...ch(f)}})};function No(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Th({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:l,nodeInternals:c,onError:f}=t.getState(),h=c.get(e);if(!h){f?.("012",Cn.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(n||h.selected&&l)&&(s({nodes:[h]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])}function jI(){const e=_t();return se.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:s}=e.getState(),l=n.touches?n.touches[0].clientX:n.clientX,c=n.touches?n.touches[0].clientY:n.clientY,f={x:(l-r[0])/r[2],y:(c-r[1])/r[2]};return{xSnapped:s?o[0]*Math.round(f.x/o[0]):f.x,ySnapped:s?o[1]*Math.round(f.y/o[1]):f.y,...f}},[])}function Ch(e){return(t,n,r)=>e?.(t,r)}function Bw({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:s,selectNodesOnDrag:l}){const c=_t(),[f,h]=se.useState(!1),a=se.useRef([]),u=se.useRef({x:null,y:null}),d=se.useRef(0),p=se.useRef(null),O=se.useRef({x:0,y:0}),g=se.useRef(null),_=se.useRef(!1),y=jI();return se.useEffect(()=>{if(e?.current){const w=Zt(e.current),E=({x:S,y:C})=>{const{nodeInternals:N,onNodeDrag:M,onSelectionDrag:j,updateNodePositions:I,nodeExtent:A,snapGrid:q,snapToGrid:R,nodeOrigin:k,onError:F}=c.getState();u.current={x:S,y:C};let U=!1,ne={x:0,y:0,x2:0,y2:0};if(a.current.length>1&&A){const K=Zi(a.current,k);ne=Oo(K)}if(a.current=a.current.map(K=>{const W={x:S-K.distance.x,y:C-K.distance.y};R&&(W.x=q[0]*Math.round(W.x/q[0]),W.y=q[1]*Math.round(W.y/q[1]));const z=[[A[0][0],A[0][1]],[A[1][0],A[1][1]]];a.current.length>1&&A&&!K.extent&&(z[0][0]=K.positionAbsolute.x-ne.x+A[0][0],z[1][0]=K.positionAbsolute.x+(K.width??0)-ne.x2+A[1][0],z[0][1]=K.positionAbsolute.y-ne.y+A[0][1],z[1][1]=K.positionAbsolute.y+(K.height??0)-ne.y2+A[1][1]);const Q=jw(K,W,N,z,k,F);return U=U||K.position.x!==Q.position.x||K.position.y!==Q.position.y,K.position=Q.position,K.positionAbsolute=Q.positionAbsolute,K}),!U)return;I(a.current,!0,!0),h(!0);const ue=o?M:Ch(j);if(ue&&g.current){const[K,W]=Nh({nodeId:o,dragItems:a.current,nodeInternals:N});ue(g.current,K,W)}},m=()=>{if(!p.current)return;const[S,C]=U_(O.current,p.current);if(S!==0||C!==0){const{transform:N,panBy:M}=c.getState();u.current.x=(u.current.x??0)-S/N[2],u.current.y=(u.current.y??0)-C/N[2],M({x:S,y:C})&&E(u.current)}d.current=requestAnimationFrame(m)};if(t)w.on(".drag",null);else{const S=WC().on("start",C=>{const{nodeInternals:N,multiSelectionActive:M,domNode:j,nodesDraggable:I,unselectNodesAndEdges:A,onNodeDragStart:q,onSelectionDragStart:R}=c.getState(),k=o?q:Ch(R);!l&&!M&&o&&(N.get(o)?.selected||A()),o&&s&&l&&Th({id:o,store:c,nodeRef:e});const F=y(C);if(u.current=F,a.current=RI(N,I,F,o),k&&a.current){const[U,ne]=Nh({nodeId:o,dragItems:a.current,nodeInternals:N});k(C.sourceEvent,U,ne)}p.current=j?.getBoundingClientRect()||null,O.current=Dn(C.sourceEvent,p.current)}).on("drag",C=>{const N=y(C),{autoPanOnNodeDrag:M}=c.getState();!_.current&&M&&(_.current=!0,m()),(u.current.x!==N.xSnapped||u.current.y!==N.ySnapped)&&a.current&&(g.current=C.sourceEvent,O.current=Dn(C.sourceEvent,p.current),E(N))}).on("end",C=>{if(h(!1),_.current=!1,cancelAnimationFrame(d.current),a.current){const{updateNodePositions:N,nodeInternals:M,onNodeDragStop:j,onSelectionDragStop:I}=c.getState(),A=o?j:Ch(I);if(N(a.current,!1,!1),A){const[q,R]=Nh({nodeId:o,dragItems:a.current,nodeInternals:M});A(C.sourceEvent,q,R)}}}).filter(C=>{const N=C.target;return!C.button&&(!n||!Dw(N,`.${n}`,e))&&(!r||Dw(N,r,e))});return w.call(S),()=>{w.on(".drag",null)}}}},[e,t,n,r,s,c,o,l,y]),f}function zw(){const e=_t();return se.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:s,getNodes:l,snapToGrid:c,snapGrid:f,onError:h,nodesDraggable:a}=e.getState(),u=l().filter(w=>w.selected&&(w.draggable||a&&typeof w.draggable>"u")),d=c?f[0]:5,p=c?f[1]:5,O=n.isShiftPressed?4:1,g=n.x*d*O,_=n.y*p*O,y=u.map(w=>{if(w.positionAbsolute){const E={x:w.positionAbsolute.x+g,y:w.positionAbsolute.y+_};c&&(E.x=f[0]*Math.round(E.x/f[0]),E.y=f[1]*Math.round(E.y/f[1]));const{positionAbsolute:m,position:S}=jw(w,E,r,o,void 0,h);w.position=S,w.positionAbsolute=m}return w});s(y,!0,!1)},[])}const Ar={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var To=e=>{const t=({id:n,type:r,data:o,xPos:s,yPos:l,xPosOrigin:c,yPosOrigin:f,selected:h,onClick:a,onMouseEnter:u,onMouseMove:d,onMouseLeave:p,onContextMenu:O,onDoubleClick:g,style:_,className:y,isDraggable:w,isSelectable:E,isConnectable:m,isFocusable:S,selectNodesOnDrag:C,sourcePosition:N,targetPosition:M,hidden:j,resizeObserver:I,dragHandle:A,zIndex:q,isParent:R,noDragClassName:k,noPanClassName:F,initialized:U,disableKeyboardA11y:ne,ariaLabel:ue,rfId:K})=>{const W=_t(),z=se.useRef(null),Q=se.useRef(N),re=se.useRef(M),Z=se.useRef(r),X=E||w||a||u||d||p,H=zw(),ee=No(n,W.getState,u),le=No(n,W.getState,d),de=No(n,W.getState,p),pe=No(n,W.getState,O),Ee=No(n,W.getState,g),Ie=Se=>{if(E&&(!C||!w)&&Th({id:n,store:W,nodeRef:z}),a){const Ge=W.getState().nodeInternals.get(n);Ge&&a(Se,{...Ge})}},Pe=Se=>{if(!hh(Se))if(Z_.includes(Se.key)&&E){const Ge=Se.key==="Escape";Th({id:n,store:W,unselect:Ge,nodeRef:z})}else!ne&&w&&h&&Object.prototype.hasOwnProperty.call(Ar,Se.key)&&(W.setState({ariaLiveMessage:`Moved selected node ${Se.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~l}`}),H({x:Ar[Se.key].x,y:Ar[Se.key].y,isShiftPressed:Se.shiftKey}))};se.useEffect(()=>{if(z.current&&!j){const Se=z.current;return I?.observe(Se),()=>I?.unobserve(Se)}},[j]),se.useEffect(()=>{const Se=Z.current!==r,Ge=Q.current!==N,Oe=re.current!==M;z.current&&(Se||Ge||Oe)&&(Se&&(Z.current=r),Ge&&(Q.current=N),Oe&&(re.current=M),W.getState().updateNodeDimensions([{id:n,nodeElement:z.current,forceUpdate:!0}]))},[n,r,N,M]);const Ae=Bw({nodeRef:z,disabled:j||!w,noDragClassName:k,handleSelector:A,nodeId:n,isSelectable:E,selectNodesOnDrag:C});return j?null:$.jsx("div",{className:Tt(["react-flow__node",`react-flow__node-${r}`,{[F]:w},y,{selected:h,selectable:E,parent:R,dragging:Ae}]),ref:z,style:{zIndex:q,transform:`translate(${c}px,${f}px)`,pointerEvents:X?"all":"none",visibility:U?"visible":"hidden",..._},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ee,onMouseMove:le,onMouseLeave:de,onContextMenu:pe,onClick:Ie,onDoubleClick:Ee,onKeyDown:S?Pe:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":ne?void 0:`${Ew}-${K}`,"aria-label":ue,children:$.jsx(XP,{value:n,children:$.jsx(e,{id:n,data:o,type:r,xPos:s,yPos:l,selected:h,isConnectable:m,sourcePosition:N,targetPosition:M,dragging:Ae,dragHandle:A,zIndex:q})})})};return t.displayName="NodeWrapper",se.memo(t)};const FI=e=>{const t=e.getNodes().filter(n=>n.selected);return{...Zi(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function BI({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=_t(),{width:o,height:s,x:l,y:c,transformString:f,userSelectionActive:h}=st(FI,St),a=zw(),u=se.useRef(null);if(se.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Bw({nodeRef:u}),h||!o||!s)return null;const d=e?O=>{const g=r.getState().getNodes().filter(_=>_.selected);e(O,g)}:void 0,p=O=>{Object.prototype.hasOwnProperty.call(Ar,O.key)&&a({x:Ar[O.key].x,y:Ar[O.key].y,isShiftPressed:O.shiftKey})};return $.jsx("div",{className:Tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:f},children:$.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:s,top:c,left:l}})})}var zI=se.memo(BI);const $I=e=>e.nodesSelectionActive,$w=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,deleteKeyCode:c,onMove:f,onMoveStart:h,onMoveEnd:a,selectionKeyCode:u,selectionOnDrag:d,selectionMode:p,onSelectionStart:O,onSelectionEnd:g,multiSelectionKeyCode:_,panActivationKeyCode:y,zoomActivationKeyCode:w,elementsSelectable:E,zoomOnScroll:m,zoomOnPinch:S,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:I,defaultViewport:A,translateExtent:q,minZoom:R,maxZoom:k,preventScrolling:F,onSelectionContextMenu:U,noWheelClassName:ne,noPanClassName:ue,disableKeyboardA11y:K})=>{const W=st($I),z=ko(u),re=ko(y)||I,Z=z||d&&re!==!0;return NI({deleteKeyCode:c,multiSelectionKeyCode:_}),$.jsx(PI,{onMove:f,onMoveStart:h,onMoveEnd:a,onPaneContextMenu:s,elementsSelectable:E,zoomOnScroll:m,zoomOnPinch:S,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:!z&&re,defaultViewport:A,translateExtent:q,minZoom:R,maxZoom:k,zoomActivationKeyCode:w,preventScrolling:F,noWheelClassName:ne,noPanClassName:ue,children:$.jsxs(Lw,{onSelectionStart:O,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,panOnDrag:re,isSelecting:!!Z,selectionMode:p,children:[e,W&&$.jsx(zI,{onSelectionContextMenu:U,noPanClassName:ue,disableKeyboardA11y:K})]})})};$w.displayName="FlowRenderer";var HI=se.memo($w);function VI(e){return st(se.useCallback(n=>e?sw(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function UI(e){const t={input:To(e.input||mw),default:To(e.default||Oh),output:To(e.output||_w),group:To(e.group||Eh)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,s)=>(o[s]=To(e[s]||Oh),o),n);return{...t,...r}}const GI=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},KI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Hw=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:s,onError:l}=st(KI,St),c=VI(e.onlyRenderVisibleElements),f=se.useRef(),h=se.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const a=new ResizeObserver(u=>{const d=u.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));s(d)});return f.current=a,a},[]);return se.useEffect(()=>()=>{f?.current?.disconnect()},[]),$.jsx("div",{className:"react-flow__nodes",style:Sh,children:c.map(a=>{let u=a.type||"default";e.nodeTypes[u]||(l?.("003",Cn.error003(u)),u="default");const d=e.nodeTypes[u]||e.nodeTypes.default,p=!!(a.draggable||t&&typeof a.draggable>"u"),O=!!(a.selectable||o&&typeof a.selectable>"u"),g=!!(a.connectable||n&&typeof a.connectable>"u"),_=!!(a.focusable||r&&typeof a.focusable>"u"),y=e.nodeExtent?fh(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,w=y?.x??0,E=y?.y??0,m=GI({x:w,y:E,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return $.jsx(d,{id:a.id,className:a.className,style:a.style,type:u,data:a.data,sourcePosition:a.sourcePosition||Ce.Bottom,targetPosition:a.targetPosition||Ce.Top,hidden:a.hidden,xPos:w,yPos:E,xPosOrigin:m.x,yPosOrigin:m.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:p,isSelectable:O,isConnectable:g,isFocusable:_,resizeObserver:h,dragHandle:a.dragHandle,zIndex:a[wt]?.z??0,isParent:!!a[wt]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel},a.id)})})};Hw.displayName="NodeRenderer";var WI=se.memo(Hw);const YI=(e,t,n)=>n===Ce.Left?e-t:n===Ce.Right?e+t:e,ZI=(e,t,n)=>n===Ce.Top?e-t:n===Ce.Bottom?e+t:e,Vw="react-flow__edgeupdater",Uw=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:s,onMouseOut:l,type:c})=>$.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:l,className:Tt([Vw,`${Vw}-${c}`]),cx:YI(t,r,e),cy:ZI(n,r,e),r,stroke:"transparent",fill:"transparent"}),XI=()=>!0;var Pr=e=>{const t=({id:n,className:r,type:o,data:s,onClick:l,onEdgeDoubleClick:c,selected:f,animated:h,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:p,labelBgPadding:O,labelBgBorderRadius:g,style:_,source:y,target:w,sourceX:E,sourceY:m,targetX:S,targetY:C,sourcePosition:N,targetPosition:M,elementsSelectable:j,hidden:I,sourceHandleId:A,targetHandleId:q,onContextMenu:R,onMouseEnter:k,onMouseMove:F,onMouseLeave:U,edgeUpdaterRadius:ne,onEdgeUpdate:ue,onEdgeUpdateStart:K,onEdgeUpdateEnd:W,markerEnd:z,markerStart:Q,rfId:re,ariaLabel:Z,isFocusable:X,isUpdatable:H,pathOptions:ee,interactionWidth:le})=>{const de=se.useRef(null),[pe,Ee]=se.useState(!1),[Ie,Pe]=se.useState(!1),Ae=_t(),Se=se.useMemo(()=>`url(#${bh(Q,re)})`,[Q,re]),Ge=se.useMemo(()=>`url(#${bh(z,re)})`,[z,re]);if(I)return null;const Oe=We=>{const{edges:it,addSelectedEdges:Ot}=Ae.getState();if(j&&(Ae.setState({nodesSelectionActive:!1}),Ot([n])),l){const kt=it.find(Nt=>Nt.id===n);l(We,kt)}},ge=xo(n,Ae.getState,c),me=xo(n,Ae.getState,R),ke=xo(n,Ae.getState,k),Ne=xo(n,Ae.getState,F),we=xo(n,Ae.getState,U),qe=(We,it)=>{if(We.button!==0)return;const{edges:Ot,isValidConnection:kt}=Ae.getState(),Nt=it?w:y,Ft=(it?q:A)||null,gn=it?"target":"source",qo=kt||XI,Lo=it,yn=Ot.find(Pn=>Pn.id===n);Pe(!0),K?.(We,yn,gn);const Ro=Pn=>{Pe(!1),W?.(Pn,yn,gn)};hw({event:We,handleId:Ft,nodeId:Nt,onConnect:Pn=>ue?.(yn,Pn),isTarget:Lo,getState:Ae.getState,setState:Ae.setState,isValidConnection:qo,edgeUpdaterType:gn,onEdgeUpdateEnd:Ro})},je=We=>qe(We,!0),ze=We=>qe(We,!1),lt=()=>Ee(!0),pt=()=>Ee(!1),Ze=!j&&!l,It=We=>{if(Z_.includes(We.key)&&j){const{unselectNodesAndEdges:it,addSelectedEdges:Ot,edges:kt}=Ae.getState();We.key==="Escape"?(de.current?.blur(),it({edges:[kt.find(Ft=>Ft.id===n)]})):Ot([n])}};return $.jsxs("g",{className:Tt(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:f,animated:h,inactive:Ze,updating:pe}]),onClick:Oe,onDoubleClick:ge,onContextMenu:me,onMouseEnter:ke,onMouseMove:Ne,onMouseLeave:we,onKeyDown:X?It:void 0,tabIndex:X?0:void 0,role:X?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":Z===null?void 0:Z||`Edge from ${y} to ${w}`,"aria-describedby":X?`${xw}-${re}`:void 0,ref:de,children:[!Ie&&$.jsx(e,{id:n,source:y,target:w,selected:f,animated:h,label:a,labelStyle:u,labelShowBg:d,labelBgStyle:p,labelBgPadding:O,labelBgBorderRadius:g,data:s,style:_,sourceX:E,sourceY:m,targetX:S,targetY:C,sourcePosition:N,targetPosition:M,sourceHandleId:A,targetHandleId:q,markerStart:Se,markerEnd:Ge,pathOptions:ee,interactionWidth:le}),H&&$.jsxs($.Fragment,{children:[(H==="source"||H===!0)&&$.jsx(Uw,{position:N,centerX:E,centerY:m,radius:ne,onMouseDown:je,onMouseEnter:lt,onMouseOut:pt,type:"source"}),(H==="target"||H===!0)&&$.jsx(Uw,{position:M,centerX:S,centerY:C,radius:ne,onMouseDown:ze,onMouseEnter:lt,onMouseOut:pt,type:"target"})]})]})};return t.displayName="EdgeWrapper",se.memo(t)};function QI(e){const t={default:Pr(e.default||Yi),straight:Pr(e.bezier||yh),step:Pr(e.step||gh),smoothstep:Pr(e.step||Ki),simplebezier:Pr(e.simplebezier||ph)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,s)=>(o[s]=Pr(e[s]||Yi),o),n);return{...t,...r}}function Gw(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,s=n?.width||t.width,l=n?.height||t.height;switch(e){case Ce.Top:return{x:r+s/2,y:o};case Ce.Right:return{x:r+s,y:o+l/2};case Ce.Bottom:return{x:r+s/2,y:o+l};case Ce.Left:return{x:r,y:o+l/2}}}function Kw(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const JI=(e,t,n,r,o,s)=>{const l=Gw(n,e,t),c=Gw(s,r,o);return{sourceX:l.x,sourceY:l.y,targetX:c.x,targetY:c.y}};function eM({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:s,width:l,height:c,transform:f}){const h={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+s)};h.x===h.x2&&(h.x2+=1),h.y===h.y2&&(h.y2+=1);const a=Oo({x:(0-f[0])/f[2],y:(0-f[1])/f[2],width:l/f[2],height:c/f[2]}),u=Math.max(0,Math.min(a.x2,h.x2)-Math.max(a.x,h.x)),d=Math.max(0,Math.min(a.y2,h.y2)-Math.max(a.y,h.y));return Math.ceil(u*d)>0}function Ww(e){const t=e?.[wt]?.handleBounds||null,n=t&&e?.width&&e?.height&&typeof e?.positionAbsolute?.x<"u"&&typeof e?.positionAbsolute?.y<"u";return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const tM=[{level:0,isMaxLevel:!0,edges:[]}];function nM(e,t,n=!1){let r=-1;const o=e.reduce((l,c)=>{const f=Xt(c.zIndex);let h=f?c.zIndex:0;if(n){const a=t.get(c.target),u=t.get(c.source),d=c.selected||a?.selected||u?.selected,p=Math.max(u?.[wt]?.z||0,a?.[wt]?.z||0,1e3);h=(f?c.zIndex:0)+(d?p:0)}return l[h]?l[h].push(c):l[h]=[c],r=h>r?h:r,l},{}),s=Object.entries(o).map(([l,c])=>{const f=+l;return{edges:c,level:f,isMaxLevel:f===r}});return s.length===0?tM:s}function rM(e,t,n){const r=st(se.useCallback(o=>e?o.edges.filter(s=>{const l=t.get(s.source),c=t.get(s.target);return l?.width&&l?.height&&c?.width&&c?.height&&eM({sourcePos:l.positionAbsolute||{x:0,y:0},targetPos:c.positionAbsolute||{x:0,y:0},sourceWidth:l.width,sourceHeight:l.height,targetWidth:c.width,targetHeight:c.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return nM(r,t,n)}const oM=({color:e="none",strokeWidth:t=1})=>$.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),iM=({color:e="none",strokeWidth:t=1})=>$.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),Yw={[Gi.Arrow]:oM,[Gi.ArrowClosed]:iM};function aM(e){const t=_t();return se.useMemo(()=>Object.prototype.hasOwnProperty.call(Yw,e)?Yw[e]:(t.getState().onError?.("009",Cn.error009(e)),null),[e])}const sM=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const f=aM(t);return f?$.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0",children:$.jsx(f,{color:n,strokeWidth:l})}):null},lM=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,s)=>([s.markerStart,s.markerEnd].forEach(l=>{if(l&&typeof l=="object"){const c=bh(l,t);r.includes(c)||(o.push({id:c,color:l.color||e,...l}),r.push(c))}}),o),[]).sort((o,s)=>o.id.localeCompare(s.id))},Zw=({defaultColor:e,rfId:t})=>{const n=st(se.useCallback(lM({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((s,l)=>s.id!==o[l].id)));return $.jsx("defs",{children:n.map(r=>$.jsx(sM,{id:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient},r.id))})};Zw.displayName="MarkerDefinitions";var uM=se.memo(Zw);const cM=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),Xw=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:s,onEdgeUpdate:l,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:a,onEdgeClick:u,edgeUpdaterRadius:d,onEdgeDoubleClick:p,onEdgeUpdateStart:O,onEdgeUpdateEnd:g,children:_})=>{const{edgesFocusable:y,edgesUpdatable:w,elementsSelectable:E,width:m,height:S,connectionMode:C,nodeInternals:N,onError:M}=st(cM,St),j=rM(t,N,n);return m?$.jsxs($.Fragment,{children:[j.map(({level:I,edges:A,isMaxLevel:q})=>$.jsxs("svg",{style:{zIndex:I},width:m,height:S,className:"react-flow__edges react-flow__container",children:[q&&$.jsx(uM,{defaultColor:e,rfId:r}),$.jsx("g",{children:A.map(R=>{const[k,F,U]=Ww(N.get(R.source)),[ne,ue,K]=Ww(N.get(R.target));if(!U||!K)return null;let W=R.type||"default";o[W]||(M?.("011",Cn.error011(W)),W="default");const z=o[W]||o.default,Q=C===tr.Strict?ue.target:(ue.target??[]).concat(ue.source??[]),re=Kw(F.source,R.sourceHandle),Z=Kw(Q,R.targetHandle),X=re?.position||Ce.Bottom,H=Z?.position||Ce.Top,ee=!!(R.focusable||y&&typeof R.focusable>"u"),le=typeof l<"u"&&(R.updatable||w&&typeof R.updatable>"u");if(!re||!Z)return M?.("008",Cn.error008(re,R)),null;const{sourceX:de,sourceY:pe,targetX:Ee,targetY:Ie}=JI(k,re,X,ne,Z,H);return $.jsx(z,{id:R.id,className:Tt([R.className,s]),type:W,data:R.data,selected:!!R.selected,animated:!!R.animated,hidden:!!R.hidden,label:R.label,labelStyle:R.labelStyle,labelShowBg:R.labelShowBg,labelBgStyle:R.labelBgStyle,labelBgPadding:R.labelBgPadding,labelBgBorderRadius:R.labelBgBorderRadius,style:R.style,source:R.source,target:R.target,sourceHandleId:R.sourceHandle,targetHandleId:R.targetHandle,markerEnd:R.markerEnd,markerStart:R.markerStart,sourceX:de,sourceY:pe,targetX:Ee,targetY:Ie,sourcePosition:X,targetPosition:H,elementsSelectable:E,onEdgeUpdate:l,onContextMenu:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:a,onClick:u,edgeUpdaterRadius:d,onEdgeDoubleClick:p,onEdgeUpdateStart:O,onEdgeUpdateEnd:g,rfId:r,ariaLabel:R.ariaLabel,isFocusable:ee,isUpdatable:le,pathOptions:"pathOptions"in R?R.pathOptions:void 0,interactionWidth:R.interactionWidth},R.id)})})]},I)),_]}):null};Xw.displayName="EdgeRenderer";var fM=se.memo(Xw);const dM=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hM({children:e}){const t=st(dM);return $.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function pM(e){const t=Ji(),n=se.useRef(!1);se.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const vM={[Ce.Left]:Ce.Right,[Ce.Right]:Ce.Left,[Ce.Top]:Ce.Bottom,[Ce.Bottom]:Ce.Top},Qw=({nodeId:e,handleType:t,style:n,type:r=vn.Bezier,CustomComponent:o,connectionStatus:s})=>{const{fromNode:l,handleId:c,toX:f,toY:h,connectionMode:a}=st(se.useCallback(C=>({fromNode:C.nodeInternals.get(e),handleId:C.connectionHandleId,toX:(C.connectionPosition.x-C.transform[0])/C.transform[2],toY:(C.connectionPosition.y-C.transform[1])/C.transform[2],connectionMode:C.connectionMode}),[e]),St),u=l?.[wt]?.handleBounds;let d=u?.[t];if(a===tr.Loose&&(d=d||u?.[t==="source"?"target":"source"]),!l||!d)return null;const p=c?d.find(C=>C.id===c):d[0],O=p?p.x+p.width/2:(l.width??0)/2,g=p?p.y+p.height/2:l.height??0,_=(l.positionAbsolute?.x??0)+O,y=(l.positionAbsolute?.y??0)+g,w=p?.position,E=w?vM[w]:null;if(!w||!E)return null;if(o)return $.jsx(o,{connectionLineType:r,connectionLineStyle:n,fromNode:l,fromHandle:p,fromX:_,fromY:y,toX:f,toY:h,fromPosition:w,toPosition:E,connectionStatus:s});let m="";const S={sourceX:_,sourceY:y,sourcePosition:w,targetX:f,targetY:h,targetPosition:E};return r===vn.Bezier?[m]=iw(S):r===vn.Step?[m]=vh({...S,borderRadius:0}):r===vn.SmoothStep?[m]=vh(S):r===vn.SimpleBezier?[m]=tw(S):m=`M${_},${y} ${f},${h}`,$.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:n})};Qw.displayName="ConnectionLine";const gM=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function yM({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:s,nodesConnectable:l,width:c,height:f,connectionStatus:h}=st(gM,St);return!(o&&s&&c&&l)?null:$.jsx("svg",{style:e,width:c,height:f,className:"react-flow__edges react-flow__connectionline react-flow__container",children:$.jsx("g",{className:Tt(["react-flow__connection",h]),children:$.jsx(Qw,{nodeId:o,handleType:s,style:t,type:n,CustomComponent:r,connectionStatus:h})})})}function Jw(e,t){return se.useRef(null),_t(),se.useMemo(()=>t(e),[e])}const eO=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:s,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:f,onEdgeDoubleClick:h,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:p,onSelectionContextMenu:O,onSelectionStart:g,onSelectionEnd:_,connectionLineType:y,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:m,selectionKeyCode:S,selectionOnDrag:C,selectionMode:N,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:I,deleteKeyCode:A,onlyRenderVisibleElements:q,elementsSelectable:R,selectNodesOnDrag:k,defaultViewport:F,translateExtent:U,minZoom:ne,maxZoom:ue,preventScrolling:K,defaultMarkerColor:W,zoomOnScroll:z,zoomOnPinch:Q,panOnScroll:re,panOnScrollSpeed:Z,panOnScrollMode:X,zoomOnDoubleClick:H,panOnDrag:ee,onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:pe,onPaneMouseLeave:Ee,onPaneScroll:Ie,onPaneContextMenu:Pe,onEdgeUpdate:Ae,onEdgeContextMenu:Se,onEdgeMouseEnter:Ge,onEdgeMouseMove:Oe,onEdgeMouseLeave:ge,edgeUpdaterRadius:me,onEdgeUpdateStart:ke,onEdgeUpdateEnd:Ne,noDragClassName:we,noWheelClassName:qe,noPanClassName:je,elevateEdgesOnSelect:ze,disableKeyboardA11y:lt,nodeOrigin:pt,nodeExtent:Ze,rfId:It})=>{const We=Jw(e,UI),it=Jw(t,QI);return pM(s),$.jsx(HI,{onPaneClick:le,onPaneMouseEnter:de,onPaneMouseMove:pe,onPaneMouseLeave:Ee,onPaneContextMenu:Pe,onPaneScroll:Ie,deleteKeyCode:A,selectionKeyCode:S,selectionOnDrag:C,selectionMode:N,onSelectionStart:g,onSelectionEnd:_,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:I,elementsSelectable:R,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:z,zoomOnPinch:Q,zoomOnDoubleClick:H,panOnScroll:re,panOnScrollSpeed:Z,panOnScrollMode:X,panOnDrag:ee,defaultViewport:F,translateExtent:U,minZoom:ne,maxZoom:ue,onSelectionContextMenu:O,preventScrolling:K,noDragClassName:we,noWheelClassName:qe,noPanClassName:je,disableKeyboardA11y:lt,children:$.jsxs(hM,{children:[$.jsx(fM,{edgeTypes:it,onEdgeClick:c,onEdgeDoubleClick:h,onEdgeUpdate:Ae,onlyRenderVisibleElements:q,onEdgeContextMenu:Se,onEdgeMouseEnter:Ge,onEdgeMouseMove:Oe,onEdgeMouseLeave:ge,onEdgeUpdateStart:ke,onEdgeUpdateEnd:Ne,edgeUpdaterRadius:me,defaultMarkerColor:W,noPanClassName:je,elevateEdgesOnSelect:!!ze,disableKeyboardA11y:lt,rfId:It,children:$.jsx(yM,{style:w,type:y,component:E,containerStyle:m})}),$.jsx("div",{className:"react-flow__edgelabel-renderer"}),$.jsx(WI,{nodeTypes:We,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:a,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:p,selectNodesOnDrag:k,onlyRenderVisibleElements:q,noPanClassName:je,noDragClassName:we,disableKeyboardA11y:lt,nodeOrigin:pt,nodeExtent:Ze,rfId:It})]})})};eO.displayName="GraphView";var mM=se.memo(eO);const Ah=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ah,nodeExtent:Ah,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:tr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:UP,isValidConnection:void 0},bM=()=>aT((e,t)=>({...Fn,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:s}=t();e({nodeInternals:xh(n,r,o,s)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",s=typeof r<"u",l=o?xh(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:l,edges:s?r:[],hasDefaultNodes:o,hasDefaultEdges:s})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:s,fitViewOnInitDone:l,fitViewOnInitOptions:c,domNode:f,nodeOrigin:h}=t(),a=f?.querySelector(".react-flow__viewport");if(!a)return;const u=window.getComputedStyle(a),{m22:d}=new window.DOMMatrixReadOnly(u.transform),p=n.reduce((g,_)=>{const y=o.get(_.id);if(y){const w=ch(_.nodeElement);!!(w.width&&w.height&&(y.width!==w.width||y.height!==w.height||_.forceUpdate))&&(o.set(y.id,{...y,[wt]:{...y[wt],handleBounds:{source:Fw(".source",_.nodeElement,d,h),target:Fw(".target",_.nodeElement,d,h)}},...w}),g.push({id:y.id,type:"dimensions",dimensions:w}))}return g},[]);Tw(o,h);const O=l||s&&!l&&Cw(t,{initial:!0,...c});e({nodeInternals:new Map(o),fitViewOnInitDone:O}),p?.length>0&&r?.(p)},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:s}=t(),l=n.map(c=>{const f={id:c.id,type:"position",dragging:o};return r&&(f.positionAbsolute=c.positionAbsolute,f.position=c.position),f});s(l)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:s,nodeOrigin:l,getNodes:c,elevateNodesOnSelect:f}=t();if(n?.length){if(s){const h=qw(n,c()),a=xh(h,o,l,f);e({nodeInternals:a})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let l,c=null;r?l=n.map(f=>jn(f,!0)):(l=Cr(s(),n),c=Cr(o,[])),Qi({changedNodes:l,changedEdges:c,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let l,c=null;r?l=n.map(f=>jn(f,!0)):(l=Cr(o,n),c=Cr(s(),[])),Qi({changedNodes:c,changedEdges:l,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:s}=t(),l=n||s(),c=r||o,f=l.map(a=>(a.selected=!1,jn(a.id,!1))),h=c.map(a=>jn(a.id,!1));Qi({changedNodes:f,changedEdges:h,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),s=r().filter(c=>c.selected).map(c=>jn(c.id,!1)),l=n.filter(c=>c.selected).map(c=>jn(c.id,!1));Qi({changedNodes:s,changedEdges:l,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=fh(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:s,d3Zoom:l,d3Selection:c,translateExtent:f}=t();if(!l||!c||!n.x&&!n.y)return!1;const h=Tn.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),a=[[0,0],[o,s]],u=l?.constrain()(h,a,f);return l.transform(c,u),r[0]!==u.x||r[1]!==u.y||r[2]!==u.k},cancelConnection:()=>e({connectionNodeId:Fn.connectionNodeId,connectionHandleId:Fn.connectionHandleId,connectionHandleType:Fn.connectionHandleType,connectionStatus:Fn.connectionStatus,connectionStartHandle:Fn.connectionStartHandle,connectionEndHandle:Fn.connectionEndHandle}),reset:()=>e({...Fn})}),Object.is),tO=({children:e})=>{const t=se.useRef(null);return t.current||(t.current=bM()),$.jsx(jP,{value:t.current,children:e})};tO.displayName="ReactFlowProvider";const nO=({children:e})=>se.useContext(Vi)?$.jsx($.Fragment,{children:e}):$.jsx(tO,{children:e});nO.displayName="ReactFlowWrapper";const _M={input:mw,default:Oh,output:_w,group:Eh},wM={default:Yi,straight:yh,step:gh,smoothstep:Ki,simplebezier:ph},OM=[0,0],EM=[15,15],xM={x:0,y:0,zoom:1},SM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Ph=se.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:s=_M,edgeTypes:l=wM,onNodeClick:c,onEdgeClick:f,onInit:h,onMove:a,onMoveStart:u,onMoveEnd:d,onConnect:p,onConnectStart:O,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:y,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:m,onNodeContextMenu:S,onNodeDoubleClick:C,onNodeDragStart:N,onNodeDrag:M,onNodeDragStop:j,onNodesDelete:I,onEdgesDelete:A,onSelectionChange:q,onSelectionDragStart:R,onSelectionDrag:k,onSelectionDragStop:F,onSelectionContextMenu:U,onSelectionStart:ne,onSelectionEnd:ue,connectionMode:K=tr.Strict,connectionLineType:W=vn.Bezier,connectionLineStyle:z,connectionLineComponent:Q,connectionLineContainerStyle:re,deleteKeyCode:Z="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:H=!1,selectionMode:ee=So.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:de=Ui()?"Meta":"Control",zoomActivationKeyCode:pe=Ui()?"Meta":"Control",snapToGrid:Ee=!1,snapGrid:Ie=EM,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ae=!0,nodesDraggable:Se,nodesConnectable:Ge,nodesFocusable:Oe,nodeOrigin:ge=OM,edgesFocusable:me,edgesUpdatable:ke,elementsSelectable:Ne,defaultViewport:we=xM,minZoom:qe=.5,maxZoom:je=2,translateExtent:ze=Ah,preventScrolling:lt=!0,nodeExtent:pt,defaultMarkerColor:Ze="#b1b1b7",zoomOnScroll:It=!0,zoomOnPinch:We=!0,panOnScroll:it=!1,panOnScrollSpeed:Ot=.5,panOnScrollMode:kt=nr.Free,zoomOnDoubleClick:Nt=!0,panOnDrag:Ft=!0,onPaneClick:gn,onPaneMouseEnter:qo,onPaneMouseMove:Lo,onPaneMouseLeave:yn,onPaneScroll:Ro,onPaneContextMenu:Ir,children:Pn,onEdgeUpdate:fa,onEdgeContextMenu:da,onEdgeDoubleClick:Do,onEdgeMouseEnter:ha,onEdgeMouseMove:Kh,onEdgeMouseLeave:jo,onEdgeUpdateStart:Wh,onEdgeUpdateEnd:Fo,edgeUpdaterRadius:pa=10,onNodesChange:Mr,onEdgesChange:Yh,noDragClassName:Zh="nodrag",noWheelClassName:qr="nowheel",noPanClassName:va="nopan",fitView:Lr=!1,fitViewOptions:Xh,connectOnClick:Rr=!0,attributionPosition:Qh,proOptions:Dr,defaultEdgeOptions:Jh,elevateNodesOnSelect:jr=!0,elevateEdgesOnSelect:ep=!1,disableKeyboardA11y:sr=!1,autoPanOnConnect:Fr=!0,autoPanOnNodeDrag:$n=!0,connectionRadius:tp=20,isValidConnection:ga,onError:lr,style:ya,id:Hn,...Bo},np)=>{const ur=Hn||"1";return $.jsx("div",{...Bo,style:{...ya,...SM},ref:np,className:Tt(["react-flow",o]),"data-testid":"rf__wrapper",id:Hn,children:$.jsxs(nO,{children:[$.jsx(mM,{onInit:h,onMove:a,onMoveStart:u,onMoveEnd:d,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:w,onNodeMouseMove:E,onNodeMouseLeave:m,onNodeContextMenu:S,onNodeDoubleClick:C,nodeTypes:s,edgeTypes:l,connectionLineType:W,connectionLineStyle:z,connectionLineComponent:Q,connectionLineContainerStyle:re,selectionKeyCode:X,selectionOnDrag:H,selectionMode:ee,deleteKeyCode:Z,multiSelectionKeyCode:de,panActivationKeyCode:le,zoomActivationKeyCode:pe,onlyRenderVisibleElements:Pe,selectNodesOnDrag:Ae,defaultViewport:we,translateExtent:ze,minZoom:qe,maxZoom:je,preventScrolling:lt,zoomOnScroll:It,zoomOnPinch:We,zoomOnDoubleClick:Nt,panOnScroll:it,panOnScrollSpeed:Ot,panOnScrollMode:kt,panOnDrag:Ft,onPaneClick:gn,onPaneMouseEnter:qo,onPaneMouseMove:Lo,onPaneMouseLeave:yn,onPaneScroll:Ro,onPaneContextMenu:Ir,onSelectionContextMenu:U,onSelectionStart:ne,onSelectionEnd:ue,onEdgeUpdate:fa,onEdgeContextMenu:da,onEdgeDoubleClick:Do,onEdgeMouseEnter:ha,onEdgeMouseMove:Kh,onEdgeMouseLeave:jo,onEdgeUpdateStart:Wh,onEdgeUpdateEnd:Fo,edgeUpdaterRadius:pa,defaultMarkerColor:Ze,noDragClassName:Zh,noWheelClassName:qr,noPanClassName:va,elevateEdgesOnSelect:ep,rfId:ur,disableKeyboardA11y:sr,nodeOrigin:ge,nodeExtent:pt}),$.jsx(vI,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:O,onConnectEnd:g,onClickConnectStart:_,onClickConnectEnd:y,nodesDraggable:Se,nodesConnectable:Ge,nodesFocusable:Oe,edgesFocusable:me,edgesUpdatable:ke,elementsSelectable:Ne,elevateNodesOnSelect:jr,minZoom:qe,maxZoom:je,nodeExtent:pt,onNodesChange:Mr,onEdgesChange:Yh,snapToGrid:Ee,snapGrid:Ie,connectionMode:K,translateExtent:ze,connectOnClick:Rr,defaultEdgeOptions:Jh,fitView:Lr,fitViewOptions:Xh,onNodesDelete:I,onEdgesDelete:A,onNodeDragStart:N,onNodeDrag:M,onNodeDragStop:j,onSelectionDrag:k,onSelectionDragStart:R,onSelectionDragStop:F,noPanClassName:va,nodeOrigin:ge,rfId:ur,autoPanOnConnect:Fr,autoPanOnNodeDrag:$n,onError:lr,connectionRadius:tp,isValidConnection:ga}),$.jsx(hI,{onSelectionChange:q}),Pn,$.jsx(BP,{proOptions:Dr,position:Qh}),$.jsx(_I,{rfId:ur,disableKeyboardA11y:sr})]})})});Ph.displayName="ReactFlow";function rO(e){return t=>{const[n,r]=se.useState(t),o=se.useCallback(s=>r(l=>e(s,l)),[]);return[n,r,o]}}const kM=rO(qw),NM=rO(qI),oO=({id:e,x:t,y:n,width:r,height:o,style:s,color:l,strokeColor:c,strokeWidth:f,className:h,borderRadius:a,shapeRendering:u,onClick:d,selected:p})=>{const{background:O,backgroundColor:g}=s||{},_=l||O||g;return $.jsx("rect",{className:Tt(["react-flow__minimap-node",{selected:p},h]),x:t,y:n,rx:a,ry:a,width:r,height:o,fill:_,stroke:c,strokeWidth:f,shapeRendering:u,onClick:d?y=>d(y,e):void 0})};oO.displayName="MiniMapNode";var TM=se.memo(oO);const CM=e=>e.nodeOrigin,AM=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),Ih=e=>e instanceof Function?e:()=>e;function PM({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o=2,nodeComponent:s=TM,onClick:l}){const c=st(AM,St),f=st(CM),h=Ih(t),a=Ih(e),u=Ih(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return $.jsx($.Fragment,{children:c.map(p=>{const{x:O,y:g}=rr(p,f).positionAbsolute;return $.jsx(s,{x:O,y:g,width:p.width,height:p.height,style:p.style,selected:p.selected,className:u(p),color:h(p),borderRadius:r,strokeColor:a(p),strokeWidth:o,shapeRendering:d,onClick:l,id:p.id},p.id)})})}var IM=se.memo(PM);const MM=200,qM=150,LM=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?HP(Zi(t,e.nodeOrigin),n):n,rfId:e.rfId}},RM="react-flow__minimap-desc";function iO({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:l=2,nodeComponent:c,maskColor:f="rgb(240, 240, 240, 0.6)",maskStrokeColor:h="none",maskStrokeWidth:a=1,position:u="bottom-right",onClick:d,onNodeClick:p,pannable:O=!1,zoomable:g=!1,ariaLabel:_="React Flow mini map",inversePan:y=!1,zoomStep:w=10,offsetScale:E=5}){const m=_t(),S=se.useRef(null),{boundingRect:C,viewBB:N,rfId:M}=st(LM,St),j=e?.width??MM,I=e?.height??qM,A=C.width/j,q=C.height/I,R=Math.max(A,q),k=R*j,F=R*I,U=E*R,ne=C.x-(k-C.width)/2-U,ue=C.y-(F-C.height)/2-U,K=k+U*2,W=F+U*2,z=`${RM}-${M}`,Q=se.useRef(0);Q.current=R,se.useEffect(()=>{if(S.current){const X=Zt(S.current),H=de=>{const{transform:pe,d3Selection:Ee,d3Zoom:Ie}=m.getState();if(de.sourceEvent.type!=="wheel"||!Ee||!Ie)return;const Pe=-de.sourceEvent.deltaY*(de.sourceEvent.deltaMode===1?.05:de.sourceEvent.deltaMode?1:.002)*w,Ae=pe[2]*Math.pow(2,Pe);Ie.scaleTo(Ee,Ae)},ee=de=>{const{transform:pe,d3Selection:Ee,d3Zoom:Ie,translateExtent:Pe,width:Ae,height:Se}=m.getState();if(de.sourceEvent.type!=="mousemove"||!Ee||!Ie)return;const Ge=Q.current*Math.max(1,pe[2])*(y?-1:1),Oe={x:pe[0]-de.sourceEvent.movementX*Ge,y:pe[1]-de.sourceEvent.movementY*Ge},ge=[[0,0],[Ae,Se]],me=Tn.translate(Oe.x,Oe.y).scale(pe[2]),ke=Ie.constrain()(me,ge,Pe);Ie.transform(Ee,ke)},le=$_().on("zoom",O?ee:null).on("zoom.wheel",g?H:null);return X.call(le),()=>{X.on("zoom",null)}}},[O,g,y,w]);const re=d?X=>{const H=an(X);d(X,{x:H[0],y:H[1]})}:void 0,Z=p?(X,H)=>{const ee=m.getState().nodeInternals.get(H);p(X,ee)}:void 0;return $.jsx(uh,{position:u,style:e,className:Tt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:$.jsxs("svg",{width:j,height:I,viewBox:`${ne} ${ue} ${K} ${W}`,role:"img","aria-labelledby":z,ref:S,onClick:re,children:[_&&$.jsx("title",{id:z,children:_}),$.jsx(IM,{onClick:Z,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:l,nodeComponent:c}),$.jsx("path",{className:"react-flow__minimap-mask",d:`M${ne-U},${ue-U}h${K+U*2}v${W+U*2}h${-K-U*2}z
18
+ M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fill:f,fillRule:"evenodd",stroke:h,strokeWidth:a,pointerEvents:"none"})]})})}iO.displayName="MiniMap";var aO=se.memo(iO);function DM(){return $.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:$.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function jM(){return $.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:$.jsx("path",{d:"M0 0h32v4.2H0z"})})}function FM(){return $.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:$.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function BM(){return $.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:$.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function zM(){return $.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:$.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}const Co=({children:e,className:t,...n})=>$.jsx("button",{type:"button",className:Tt(["react-flow__controls-button",t]),...n,children:e});Co.displayName="ControlButton";const $M=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),sO=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:l,onFitView:c,onInteractiveChange:f,className:h,children:a,position:u="bottom-left"})=>{const d=_t(),[p,O]=se.useState(!1),{isInteractive:g,minZoomReached:_,maxZoomReached:y}=st($M,St),{zoomIn:w,zoomOut:E,fitView:m}=Ji();if(se.useEffect(()=>{O(!0)},[]),!p)return null;const S=()=>{w(),s?.()},C=()=>{E(),l?.()},N=()=>{m(o),c?.()},M=()=>{d.setState({nodesDraggable:!g,nodesConnectable:!g,elementsSelectable:!g}),f?.(!g)};return $.jsxs(uh,{className:Tt(["react-flow__controls",h]),position:u,style:e,"data-testid":"rf__controls",children:[t&&$.jsxs($.Fragment,{children:[$.jsx(Co,{onClick:S,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:y,children:$.jsx(DM,{})}),$.jsx(Co,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:_,children:$.jsx(jM,{})})]}),n&&$.jsx(Co,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view",children:$.jsx(FM,{})}),r&&$.jsx(Co,{className:"react-flow__controls-interactive",onClick:M,title:"toggle interactivity","aria-label":"toggle interactivity",children:g?$.jsx(zM,{}):$.jsx(BM,{})}),a]})};sO.displayName="Controls";var lO=se.memo(sO),un;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(un||(un={}));function HM({color:e,dimensions:t,lineWidth:n}){return $.jsx("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function VM({color:e,radius:t}){return $.jsx("circle",{cx:t,cy:t,r:t,fill:e})}const UM={[un.Dots]:"#91919a",[un.Lines]:"#eee",[un.Cross]:"#e2e2e2"},GM={[un.Dots]:1,[un.Lines]:1,[un.Cross]:6},KM=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function uO({id:e,variant:t=un.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=2,color:l,style:c,className:f}){const h=se.useRef(null),{transform:a,patternId:u}=st(KM,St),d=l||UM[t],p=r||GM[t],O=t===un.Dots,g=t===un.Cross,_=Array.isArray(n)?n:[n,n],y=[_[0]*a[2]||1,_[1]*a[2]||1],w=p*a[2],E=g?[w,w]:y,m=O?[w/s,w/s]:[E[0]/s,E[1]/s];return $.jsxs("svg",{className:Tt(["react-flow__background",f]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:h,"data-testid":"rf__background",children:[$.jsx("pattern",{id:u+e,x:a[0]%y[0],y:a[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`,children:O?$.jsx(VM,{color:d,radius:w/s}):$.jsx(HM,{dimensions:E,color:d,lineWidth:o})}),$.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${u+e})`})]})}uO.displayName="Background";var cO=se.memo(uO);function fO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fO(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Bn(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fO(e))&&(r&&(r+=" "),r+=t);return r}const Ao=e=>typeof e=="number"&&!isNaN(e),ir=e=>typeof e=="string",jt=e=>typeof e=="function",ta=e=>ir(e)||jt(e)?e:null,Mh=e=>se.isValidElement(e)||ir(e)||jt(e)||Ao(e);function WM(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function na(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(l){let{children:c,position:f,preventExitTransition:h,done:a,nodeRef:u,isIn:d}=l;const p=r?`${t}--${f}`:t,O=r?`${n}--${f}`:n,g=se.useRef(0);return se.useLayoutEffect(()=>{const _=u.current,y=p.split(" "),w=E=>{E.target===u.current&&(_.dispatchEvent(new Event("d")),_.removeEventListener("animationend",w),_.removeEventListener("animationcancel",w),g.current===0&&E.type!=="animationcancel"&&_.classList.remove(...y))};_.classList.add(...y),_.addEventListener("animationend",w),_.addEventListener("animationcancel",w)},[]),se.useEffect(()=>{const _=u.current,y=()=>{_.removeEventListener("animationend",y),o?WM(_,a,s):a()};d||(h?y():(g.current=1,_.className+=` ${O}`,_.addEventListener("animationend",y)))},[d]),nt.default.createElement(nt.default.Fragment,null,c)}}function dO(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Qt={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},ra=e=>{let{theme:t,type:n,...r}=e;return nt.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},qh={info:function(e){return nt.default.createElement(ra,{...e},nt.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return nt.default.createElement(ra,{...e},nt.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return nt.default.createElement(ra,{...e},nt.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return nt.default.createElement(ra,{...e},nt.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return nt.default.createElement("div",{className:"Toastify__spinner"})}};function YM(e){const[,t]=se.useReducer(p=>p+1,0),[n,r]=se.useState([]),o=se.useRef(null),s=se.useRef(new Map).current,l=p=>n.indexOf(p)!==-1,c=se.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:p=>s.get(p)}).current;function f(p){let{containerId:O}=p;const{limit:g}=c.props;!g||O&&c.containerId!==O||(c.count-=c.queue.length,c.queue=[])}function h(p){r(O=>p==null?[]:O.filter(g=>g!==p))}function a(){const{toastContent:p,toastProps:O,staleId:g}=c.queue.shift();d(p,O,g)}function u(p,O){let{delay:g,staleId:_,...y}=O;if(!Mh(p)||(function(q){return!o.current||c.props.enableMultiContainer&&q.containerId!==c.props.containerId||s.has(q.toastId)&&q.updateId==null})(y))return;const{toastId:w,updateId:E,data:m}=y,{props:S}=c,C=()=>h(w),N=E==null;N&&c.count++;const M={...S,style:S.toastStyle,key:c.toastKey++,...Object.fromEntries(Object.entries(y).filter(q=>{let[R,k]=q;return k!=null})),toastId:w,updateId:E,data:m,closeToast:C,isIn:!1,className:ta(y.className||S.toastClassName),bodyClassName:ta(y.bodyClassName||S.bodyClassName),progressClassName:ta(y.progressClassName||S.progressClassName),autoClose:!y.isLoading&&(j=y.autoClose,I=S.autoClose,j===!1||Ao(j)&&j>0?j:I),deleteToast(){const q=dO(s.get(w),"removed");s.delete(w),Qt.emit(4,q);const R=c.queue.length;if(c.count=w==null?c.count-c.displayedToast:c.count-1,c.count<0&&(c.count=0),R>0){const k=w==null?c.props.limit:1;if(R===1||k===1)c.displayedToast++,a();else{const F=k>R?R:k;c.displayedToast=F;for(let U=0;U<F;U++)a()}}else t()}};var j,I;M.iconOut=(function(q){let{theme:R,type:k,isLoading:F,icon:U}=q,ne=null;const ue={theme:R,type:k};return U===!1||(jt(U)?ne=U(ue):se.isValidElement(U)?ne=se.cloneElement(U,ue):ir(U)||Ao(U)?ne=U:F?ne=qh.spinner():(K=>K in qh)(k)&&(ne=qh[k](ue))),ne})(M),jt(y.onOpen)&&(M.onOpen=y.onOpen),jt(y.onClose)&&(M.onClose=y.onClose),M.closeButton=S.closeButton,y.closeButton===!1||Mh(y.closeButton)?M.closeButton=y.closeButton:y.closeButton===!0&&(M.closeButton=!Mh(S.closeButton)||S.closeButton);let A=p;se.isValidElement(p)&&!ir(p.type)?A=se.cloneElement(p,{closeToast:C,toastProps:M,data:m}):jt(p)&&(A=p({closeToast:C,toastProps:M,data:m})),S.limit&&S.limit>0&&c.count>S.limit&&N?c.queue.push({toastContent:A,toastProps:M,staleId:_}):Ao(g)?setTimeout(()=>{d(A,M,_)},g):d(A,M,_)}function d(p,O,g){const{toastId:_}=O;g&&s.delete(g);const y={content:p,props:O};s.set(_,y),r(w=>[...w,_].filter(E=>E!==g)),Qt.emit(4,dO(y,y.props.updateId==null?"added":"updated"))}return se.useEffect(()=>(c.containerId=e.containerId,Qt.cancelEmit(3).on(0,u).on(1,p=>o.current&&h(p)).on(5,f).emit(2,c),()=>{s.clear(),Qt.emit(3,c)}),[]),se.useEffect(()=>{c.props=e,c.isToastActive=l,c.displayedToast=n.length}),{getToastToRender:function(p){const O=new Map,g=Array.from(s.values());return e.newestOnTop&&g.reverse(),g.forEach(_=>{const{position:y}=_.props;O.has(y)||O.set(y,[]),O.get(y).push(_)}),Array.from(O,_=>p(_[0],_[1]))},containerRef:o,isToastActive:l}}function hO(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function pO(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function ZM(e){const[t,n]=se.useState(!1),[r,o]=se.useState(!1),s=se.useRef(null),l=se.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=se.useRef(e),{autoClose:f,pauseOnHover:h,closeToast:a,onClick:u,closeOnClick:d}=e;function p(m){if(e.draggable){m.nativeEvent.type==="touchstart"&&m.nativeEvent.preventDefault(),l.didMove=!1,document.addEventListener("mousemove",y),document.addEventListener("mouseup",w),document.addEventListener("touchmove",y),document.addEventListener("touchend",w);const S=s.current;l.canCloseOnClick=!0,l.canDrag=!0,l.boundingRect=S.getBoundingClientRect(),S.style.transition="",l.x=hO(m.nativeEvent),l.y=pO(m.nativeEvent),e.draggableDirection==="x"?(l.start=l.x,l.removalDistance=S.offsetWidth*(e.draggablePercent/100)):(l.start=l.y,l.removalDistance=S.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function O(m){if(l.boundingRect){const{top:S,bottom:C,left:N,right:M}=l.boundingRect;m.nativeEvent.type!=="touchend"&&e.pauseOnHover&&l.x>=N&&l.x<=M&&l.y>=S&&l.y<=C?_():g()}}function g(){n(!0)}function _(){n(!1)}function y(m){const S=s.current;l.canDrag&&S&&(l.didMove=!0,t&&_(),l.x=hO(m),l.y=pO(m),l.delta=e.draggableDirection==="x"?l.x-l.start:l.y-l.start,l.start!==l.x&&(l.canCloseOnClick=!1),S.style.transform=`translate${e.draggableDirection}(${l.delta}px)`,S.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function w(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",w);const m=s.current;if(l.canDrag&&l.didMove&&m){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return o(!0),void e.closeToast();m.style.transition="transform 0.2s, opacity 0.2s",m.style.transform=`translate${e.draggableDirection}(0)`,m.style.opacity="1"}}se.useEffect(()=>{c.current=e}),se.useEffect(()=>(s.current&&s.current.addEventListener("d",g,{once:!0}),jt(e.onOpen)&&e.onOpen(se.isValidElement(e.children)&&e.children.props),()=>{const m=c.current;jt(m.onClose)&&m.onClose(se.isValidElement(m.children)&&m.children.props)}),[]),se.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||_(),window.addEventListener("focus",g),window.addEventListener("blur",_)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",g),window.removeEventListener("blur",_))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:O,onTouchEnd:O};return f&&h&&(E.onMouseEnter=_,E.onMouseLeave=g),d&&(E.onClick=m=>{u&&u(m),l.canCloseOnClick&&a()}),{playToast:g,pauseToast:_,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:E}}function vO(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return nt.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},nt.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},nt.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function XM(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:l,style:c,controlledProgress:f,progress:h,rtl:a,isIn:u,theme:d}=e;const p=s||f&&h===0,O={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:p?0:1};f&&(O.transform=`scaleX(${h})`);const g=Bn("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":a}),_=jt(l)?l({rtl:a,type:o,defaultClassName:g}):Bn(g,l);return nt.default.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:_,style:O,[f&&h>=1?"onTransitionEnd":"onAnimationEnd"]:f&&h<1?null:()=>{u&&r()}})}const QM=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=ZM(e),{closeButton:s,children:l,autoClose:c,onClick:f,type:h,hideProgressBar:a,closeToast:u,transition:d,position:p,className:O,style:g,bodyClassName:_,bodyStyle:y,progressClassName:w,progressStyle:E,updateId:m,role:S,progress:C,rtl:N,toastId:M,deleteToast:j,isIn:I,isLoading:A,iconOut:q,closeOnClick:R,theme:k}=e,F=Bn("Toastify__toast",`Toastify__toast-theme--${k}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":R}),U=jt(O)?O({rtl:N,position:p,type:h,defaultClassName:F}):Bn(F,O),ne=!!C||!c,ue={closeToast:u,type:h,theme:k};let K=null;return s===!1||(K=jt(s)?s(ue):se.isValidElement(s)?se.cloneElement(s,ue):vO(ue)),nt.default.createElement(d,{isIn:I,done:j,position:p,preventExitTransition:n,nodeRef:r},nt.default.createElement("div",{id:M,onClick:f,className:U,...o,style:g,ref:r},nt.default.createElement("div",{...I&&{role:S},className:jt(_)?_({type:h}):Bn("Toastify__toast-body",_),style:y},q!=null&&nt.default.createElement("div",{className:Bn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},q),nt.default.createElement("div",null,l)),K,nt.default.createElement(XM,{...m&&!ne?{key:`pb-${m}`}:{},rtl:N,theme:k,delay:c,isRunning:t,isIn:I,closeToast:u,hide:a,type:h,style:E,className:w,controlledProgress:ne,progress:C||0})))},oa=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},JM=na(oa("bounce",!0));na(oa("slide",!0)),na(oa("zoom")),na(oa("flip"));const Lh=se.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=YM(e),{className:s,style:l,rtl:c,containerId:f}=e;function h(a){const u=Bn("Toastify__toast-container",`Toastify__toast-container--${a}`,{"Toastify__toast-container--rtl":c});return jt(s)?s({position:a,rtl:c,defaultClassName:u}):Bn(u,ta(s))}return se.useEffect(()=>{t&&(t.current=r.current)},[]),nt.default.createElement("div",{ref:r,className:"Toastify",id:f},n((a,u)=>{const d=u.length?{...l}:{...l,pointerEvents:"none"};return nt.default.createElement("div",{className:h(a),style:d,key:`container-${a}`},u.map((p,O)=>{let{content:g,props:_}=p;return nt.default.createElement(QM,{..._,isIn:o(_.toastId),style:{..._.style,"--nth":O+1,"--len":u.length},key:`toast-${_.key}`},g)}))}))});Lh.displayName="ToastContainer",Lh.defaultProps={position:"top-right",transition:JM,autoClose:5e3,closeButton:vO,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Rh,ar=new Map,Po=[],eq=1;function gO(){return""+eq++}function tq(e){return e&&(ir(e.toastId)||Ao(e.toastId))?e.toastId:gO()}function Io(e,t){return ar.size>0?Qt.emit(0,e,t):Po.push({content:e,options:t}),t.toastId}function ia(e,t){return{...t,type:t&&t.type||e,toastId:tq(t)}}function aa(e){return(t,n)=>Io(t,ia(e,n))}function Ke(e,t){return Io(e,ia("default",t))}Ke.loading=(e,t)=>Io(e,ia("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ke.promise=function(e,t,n){let r,{pending:o,error:s,success:l}=t;o&&(r=ir(o)?Ke.loading(o,n):Ke.loading(o.render,{...n,...o}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},f=(a,u,d)=>{if(u==null)return void Ke.dismiss(r);const p={type:a,...c,...n,data:d},O=ir(u)?{render:u}:u;return r?Ke.update(r,{...p,...O}):Ke(O.render,{...p,...O}),d},h=jt(e)?e():e;return h.then(a=>f("success",l,a)).catch(a=>f("error",s,a)),h},Ke.success=aa("success"),Ke.info=aa("info"),Ke.error=aa("error"),Ke.warning=aa("warning"),Ke.warn=Ke.warning,Ke.dark=(e,t)=>Io(e,ia("default",{theme:"dark",...t})),Ke.dismiss=e=>{ar.size>0?Qt.emit(1,e):Po=Po.filter(t=>e!=null&&t.options.toastId!==e)},Ke.clearWaitingQueue=function(e){return e===void 0&&(e={}),Qt.emit(5,e)},Ke.isActive=e=>{let t=!1;return ar.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},Ke.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=(function(r,o){let{containerId:s}=o;const l=ar.get(s||Rh);return l&&l.getToast(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:gO()};s.toastId!==e&&(s.staleId=e);const l=s.render||o;delete s.render,Io(l,s)}},0)},Ke.done=e=>{Ke.update(e,{progress:1})},Ke.onChange=e=>(Qt.on(4,e),()=>{Qt.off(4,e)}),Ke.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Ke.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Qt.on(2,e=>{Rh=e.containerId||e,ar.set(Rh,e),Po.forEach(t=>{Qt.emit(0,t.content,t.options)}),Po=[]}).on(3,e=>{ar.delete(e.containerId||e),ar.size===0&&Qt.off(0).off(1).off(5)});const yO=se.createContext({certificate:{},node:{},setNode:()=>{},type:"readNode",replica:{},nodesState:[],edgesState:[],nodeLayers:{previous:{nodes:[],edges:[]},current:{nodes:[],edges:[]}},setNodeLayers:()=>{}}),mO=e=>{const[t,n]=se.useState({}),[r,o]=se.useState({previous:{nodes:[],edges:[]},current:{nodes:[],edges:[]}}),s=kM([]),l=NM([]),c=se.useMemo(()=>({node:t,setNode:n,type:e.type,certificate:e.certificate,replica:e.replica,nodeLayers:r,setNodeLayers:o,nodesState:s,edgesState:l}),[t,n,e.type,e.certificate,e.replica,r,o,s,l]);return $.jsx(yO.Provider,{value:c,children:e.children})},ot=()=>se.useContext(yO);var Dh={exports:{}};/*! For license information please see main.js.LICENSE.txt */var bO;function nq(){return bO||(bO=1,(function(e,t){(function(n,r){e.exports=r(nt.default,pv.default)})(self,((n,r)=>(()=>{var o={184:(f,h)=>{var a;(function(){var u={}.hasOwnProperty;function d(){for(var p=[],O=0;O<arguments.length;O++){var g=arguments[O];if(g){var _=typeof g;if(_==="string"||_==="number")p.push(g);else if(Array.isArray(g)){if(g.length){var y=d.apply(null,g);y&&p.push(y)}}else if(_==="object"){if(g.toString!==Object.prototype.toString&&!g.toString.toString().includes("[native code]")){p.push(g.toString());continue}for(var w in g)u.call(g,w)&&g[w]&&p.push(w)}}}return p.join(" ")}f.exports?(d.default=d,f.exports=d):(a=(function(){return d}).apply(h,[]))===void 0||(f.exports=a)})()},953:(f,h,a)=>{a.d(h,{Z:()=>g});var u=a(81),d=a.n(u),p=a(645),O=a.n(p)()(d());O.push([f.id,".button-component{font-weight:500;letter-spacing:.2px}.button-component.btn{border-radius:2px;white-space:nowrap}.button-component.btn-sm{font-weight:600}.button-component.btn-primary,.button-component.btn-primary:active,.button-component.btn-primary:not(:disabled):not(.disabled):active{background:#003057;border:1px solid #001424;transition:none}.button-component.btn-primary:hover{background:#004c8a}.button-component.btn-primary:disabled{background:#557e9e;border:1px solid #517490;color:#ccc}.button-component.btn-secondary,.button-component.btn-secondary:active,.button-component.btn-secondary:not(:disabled):not(.disabled):active{background:#fff;border:1px solid #ccc;transition:none;color:#000}.button-component.btn-secondary:hover{background:#eee;border:1px solid #ccc;color:#000}.button-component.btn-secondary:disabled{background:#eee;border:1px solid #ccc;color:#666}.button-component a,.button-component a:hover,.button-component a:focus{color:inherit;text-decoration:inherit}.button-component i{margin-right:.4rem}.button-component i.no-text{margin-right:0}.button-component>button{font-weight:500;letter-spacing:.2px}.button-component>button.btn{border-radius:2px;white-space:nowrap}.button-component>button.btn-sm{font-weight:600}.button-component>button.btn-primary,.button-component>button.btn-primary:active,.button-component>button.btn-primary:not(:disabled):not(.disabled):active{background:#003057;border:1px solid #001424;transition:none}.button-component>button.btn-primary:hover{background:#004c8a}.button-component>button.btn-primary:disabled{background:#557e9e;border:1px solid #517490;color:#ccc}.button-component>button.btn-secondary,.button-component>button.btn-secondary:active,.button-component>button.btn-secondary:not(:disabled):not(.disabled):active{background:#fff;border:1px solid #ccc;transition:none;color:#000}.button-component>button.btn-secondary:hover{background:#eee;border:1px solid #ccc;color:#000}.button-component>button.btn-secondary:disabled{background:#eee;border:1px solid #ccc;color:#666}.button-component>button a,.button-component>button a:hover,.button-component>button a:focus{color:inherit;text-decoration:inherit}.button-component>button i{margin-right:.4rem}.button-component>button i.no-text{margin-right:0}",""]);const g=O},525:(f,h,a)=>{a.d(h,{Z:()=>g});var u=a(81),d=a.n(u),p=a(645),O=a.n(p)()(d());O.push([f.id,".keyval__wrapper{display:flex;font-size:13px;margin-bottom:.5rem}.keyval__label{color:#71899c}.keyval__list{list-style:none;padding:0;margin:0;flex-grow:1}.keyval__item{display:block}",""]);const g=O},318:(f,h,a)=>{a.d(h,{Z:()=>g});var u=a(81),d=a.n(u),p=a(645),O=a.n(p)()(d());O.push([f.id,".message-stripe-component{margin:1rem;padding:.75rem}.message-stripe-component.alert{color:inherit;border:none;border-radius:0;box-shadow:0 1px 2px rgba(0,0,0,.25)}.message-stripe__remove-button{background:none;border:none}.message-stripe__remove-button svg{-webkit-appearance:none}",""]);const g=O},970:(f,h,a)=>{a.d(h,{Z:()=>g});var u=a(81),d=a.n(u),p=a(645),O=a.n(p)()(d());O.push([f.id,".hise-select__wrapper .hise-select__control{border:1px solid #aaa;border-radius:0}.hise-select__wrapper.invalid .hise-select__control{border:1px solid #dc3545}",""]);const g=O},645:f=>{f.exports=function(h){var a=[];return a.toString=function(){return this.map((function(u){var d="",p=u[5]!==void 0;return u[4]&&(d+="@supports (".concat(u[4],") {")),u[2]&&(d+="@media ".concat(u[2]," {")),p&&(d+="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {")),d+=h(u),p&&(d+="}"),u[2]&&(d+="}"),u[4]&&(d+="}"),d})).join("")},a.i=function(u,d,p,O,g){typeof u=="string"&&(u=[[null,u,void 0]]);var _={};if(p)for(var y=0;y<this.length;y++){var w=this[y][0];w!=null&&(_[w]=!0)}for(var E=0;E<u.length;E++){var m=[].concat(u[E]);p&&_[m[0]]||(g!==void 0&&(m[5]===void 0||(m[1]="@layer".concat(m[5].length>0?" ".concat(m[5]):""," {").concat(m[1],"}")),m[5]=g),d&&(m[2]&&(m[1]="@media ".concat(m[2]," {").concat(m[1],"}")),m[2]=d),O&&(m[4]?(m[1]="@supports (".concat(m[4],") {").concat(m[1],"}"),m[4]=O):m[4]="".concat(O)),a.push(m))}},a}},81:f=>{f.exports=function(h){return h[1]}},679:(f,h,a)=>{var u=a(864),d={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},p={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},g={};function _(N){return u.isMemo(N)?O:g[N.$$typeof]||d}g[u.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g[u.Memo]=O;var y=Object.defineProperty,w=Object.getOwnPropertyNames,E=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,S=Object.getPrototypeOf,C=Object.prototype;f.exports=function N(M,j,I){if(typeof j!="string"){if(C){var A=S(j);A&&A!==C&&N(M,A,I)}var q=w(j);E&&(q=q.concat(E(j)));for(var R=_(M),k=_(j),F=0;F<q.length;++F){var U=q[F];if(!(p[U]||I&&I[U]||k&&k[U]||R&&R[U])){var ne=m(j,U);try{y(M,U,ne)}catch{}}}}return M}},703:(f,h,a)=>{var u=a(414);function d(){}function p(){}p.resetWarningCache=d,f.exports=function(){function O(y,w,E,m,S,C){if(C!==u){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}function g(){return O}O.isRequired=O;var _={array:O,bigint:O,bool:O,func:O,number:O,object:O,string:O,symbol:O,any:O,arrayOf:g,element:O,elementType:O,instanceOf:g,node:O,objectOf:g,oneOf:g,oneOfType:g,shape:g,exact:g,checkPropTypes:p,resetWarningCache:d};return _.PropTypes=_,_}},697:(f,h,a)=>{f.exports=a(703)()},414:f=>{f.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:(f,h)=>{var a=typeof Symbol=="function"&&Symbol.for,u=a?Symbol.for("react.element"):60103,d=a?Symbol.for("react.portal"):60106,p=a?Symbol.for("react.fragment"):60107,O=a?Symbol.for("react.strict_mode"):60108,g=a?Symbol.for("react.profiler"):60114,_=a?Symbol.for("react.provider"):60109,y=a?Symbol.for("react.context"):60110,w=a?Symbol.for("react.async_mode"):60111,E=a?Symbol.for("react.concurrent_mode"):60111,m=a?Symbol.for("react.forward_ref"):60112,S=a?Symbol.for("react.suspense"):60113,C=a?Symbol.for("react.suspense_list"):60120,N=a?Symbol.for("react.memo"):60115,M=a?Symbol.for("react.lazy"):60116,j=a?Symbol.for("react.block"):60121,I=a?Symbol.for("react.fundamental"):60117,A=a?Symbol.for("react.responder"):60118,q=a?Symbol.for("react.scope"):60119;function R(F){if(typeof F=="object"&&F!==null){var U=F.$$typeof;switch(U){case u:switch(F=F.type){case w:case E:case p:case g:case O:case S:return F;default:switch(F=F&&F.$$typeof){case y:case m:case M:case N:case _:return F;default:return U}}case d:return U}}}function k(F){return R(F)===E}h.AsyncMode=w,h.ConcurrentMode=E,h.ContextConsumer=y,h.ContextProvider=_,h.Element=u,h.ForwardRef=m,h.Fragment=p,h.Lazy=M,h.Memo=N,h.Portal=d,h.Profiler=g,h.StrictMode=O,h.Suspense=S,h.isAsyncMode=function(F){return k(F)||R(F)===w},h.isConcurrentMode=k,h.isContextConsumer=function(F){return R(F)===y},h.isContextProvider=function(F){return R(F)===_},h.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===u},h.isForwardRef=function(F){return R(F)===m},h.isFragment=function(F){return R(F)===p},h.isLazy=function(F){return R(F)===M},h.isMemo=function(F){return R(F)===N},h.isPortal=function(F){return R(F)===d},h.isProfiler=function(F){return R(F)===g},h.isStrictMode=function(F){return R(F)===O},h.isSuspense=function(F){return R(F)===S},h.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===p||F===E||F===g||F===O||F===S||F===C||typeof F=="object"&&F!==null&&(F.$$typeof===M||F.$$typeof===N||F.$$typeof===_||F.$$typeof===y||F.$$typeof===m||F.$$typeof===I||F.$$typeof===A||F.$$typeof===q||F.$$typeof===j)},h.typeOf=R},864:(f,h,a)=>{f.exports=a(921)},379:f=>{var h=[];function a(p){for(var O=-1,g=0;g<h.length;g++)if(h[g].identifier===p){O=g;break}return O}function u(p,O){for(var g={},_=[],y=0;y<p.length;y++){var w=p[y],E=O.base?w[0]+O.base:w[0],m=g[E]||0,S="".concat(E," ").concat(m);g[E]=m+1;var C=a(S),N={css:w[1],media:w[2],sourceMap:w[3],supports:w[4],layer:w[5]};if(C!==-1)h[C].references++,h[C].updater(N);else{var M=d(N,O);O.byIndex=y,h.splice(y,0,{identifier:S,updater:M,references:1})}_.push(S)}return _}function d(p,O){var g=O.domAPI(O);return g.update(p),function(_){if(_){if(_.css===p.css&&_.media===p.media&&_.sourceMap===p.sourceMap&&_.supports===p.supports&&_.layer===p.layer)return;g.update(p=_)}else g.remove()}}f.exports=function(p,O){var g=u(p=p||[],O=O||{});return function(_){_=_||[];for(var y=0;y<g.length;y++){var w=a(g[y]);h[w].references--}for(var E=u(_,O),m=0;m<g.length;m++){var S=a(g[m]);h[S].references===0&&(h[S].updater(),h.splice(S,1))}g=E}}},569:f=>{var h={};f.exports=function(a,u){var d=(function(p){if(h[p]===void 0){var O=document.querySelector(p);if(window.HTMLIFrameElement&&O instanceof window.HTMLIFrameElement)try{O=O.contentDocument.head}catch{O=null}h[p]=O}return h[p]})(a);if(!d)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");d.appendChild(u)}},216:f=>{f.exports=function(h){var a=document.createElement("style");return h.setAttributes(a,h.attributes),h.insert(a,h.options),a}},565:(f,h,a)=>{f.exports=function(u){var d=a.nc;d&&u.setAttribute("nonce",d)}},795:f=>{f.exports=function(h){if(typeof document>"u")return{update:function(){},remove:function(){}};var a=h.insertStyleElement(h);return{update:function(u){(function(d,p,O){var g="";O.supports&&(g+="@supports (".concat(O.supports,") {")),O.media&&(g+="@media ".concat(O.media," {"));var _=O.layer!==void 0;_&&(g+="@layer".concat(O.layer.length>0?" ".concat(O.layer):""," {")),g+=O.css,_&&(g+="}"),O.media&&(g+="}"),O.supports&&(g+="}");var y=O.sourceMap;y&&typeof btoa<"u"&&(g+=`
19
+ /*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(y))))," */")),p.styleTagTransform(g,d,p.options)})(a,h,u)},remove:function(){(function(u){if(u.parentNode===null)return!1;u.parentNode.removeChild(u)})(a)}}}},589:f=>{f.exports=function(h,a){if(a.styleSheet)a.styleSheet.cssText=h;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(h))}}},583:f=>{f.exports=n},732:f=>{f.exports=r}},s={};function l(f){var h=s[f];if(h!==void 0)return h.exports;var a=s[f]={id:f,exports:{}};return o[f](a,a.exports,l),a.exports}l.n=f=>{var h=f&&f.__esModule?()=>f.default:()=>f;return l.d(h,{a:h}),h},l.d=(f,h)=>{for(var a in h)l.o(h,a)&&!l.o(f,a)&&Object.defineProperty(f,a,{enumerable:!0,get:h[a]})},l.o=(f,h)=>Object.prototype.hasOwnProperty.call(f,h),l.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},l.nc=void 0;var c={};return(()=>{l.r(c),l.d(c,{Button:()=>lr,ConfirmationModal:()=>zL,HISETabs:()=>tR,KeyValPair:()=>nR,MessageStripe:()=>Ur,ResourceEditor:()=>xS});var f,h,a=l(583),u=l.n(a);function d(i){var v=i.pathname,b=v===void 0?"/":v,x=i.search,D=x===void 0?"":x,B=i.hash,G=B===void 0?"":B;return D&&D!=="?"&&(b+=D.charAt(0)==="?"?D:"?"+D),G&&G!=="#"&&(b+=G.charAt(0)==="#"?G:"#"+G),b}function p(i){var v={};if(i){var b=i.indexOf("#");b>=0&&(v.hash=i.substr(b),i=i.substr(0,b));var x=i.indexOf("?");x>=0&&(v.search=i.substr(x),i=i.substr(0,x)),i&&(v.pathname=i)}return v}function O(i,v){throw new Error(v)}(h=f||(f={})).Pop="POP",h.Push="PUSH",h.Replace="REPLACE";const g=(0,a.createContext)(null),_=(0,a.createContext)(null),y=(0,a.createContext)({outlet:null,matches:[]});function w(){return(0,a.useContext)(_)!=null}function E(){return w()||O(),(0,a.useContext)(_).location}function m(i){let{matches:v}=(0,a.useContext)(y),{pathname:b}=E(),x=JSON.stringify(v.map((D=>D.pathnameBase)));return(0,a.useMemo)((()=>S(i,JSON.parse(x),b)),[i,x,b])}function S(i,v,b){let x,D=typeof i=="string"?p(i):i,B=i===""||D.pathname===""?"/":D.pathname;if(B==null)x=b;else{let L=v.length-1;if(B.startsWith("..")){let P=B.split("/");for(;P[0]==="..";)P.shift(),L-=1;D.pathname=P.join("/")}x=L>=0?v[L]:"/"}let G=(function(L,P){P===void 0&&(P="/");let{pathname:T,search:te="",hash:oe=""}=typeof L=="string"?p(L):L;return{pathname:T?T.startsWith("/")?T:(function(J,Y){let ie=Y.replace(/\/+$/,"").split("/");return J.split("/").forEach((ae=>{ae===".."?ie.length>1&&ie.pop():ae!=="."&&ie.push(ae)})),ie.length>1?ie.join("/"):"/"})(T,P):P,search:N(te),hash:M(oe)}})(D,x);return B&&B!=="/"&&B.endsWith("/")&&!G.pathname.endsWith("/")&&(G.pathname+="/"),G}const C=i=>i.join("/").replace(/\/\/+/g,"/"),N=i=>i&&i!=="?"?i.startsWith("?")?i:"?"+i:"",M=i=>i&&i!=="#"?i.startsWith("#")?i:"#"+i:"";function j(){return j=Object.assign||function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},j.apply(this,arguments)}const I=["onClick","reloadDocument","replace","state","target","to"],A=(0,a.forwardRef)((function(i,v){let{onClick:b,reloadDocument:x,replace:D=!1,state:B,target:G,to:L}=i,P=(function(oe,V){if(oe==null)return{};var J,Y,ie={},ae=Object.keys(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],V.indexOf(J)>=0||(ie[J]=oe[J]);return ie})(i,I),T=(function(oe){w()||O();let{basename:V,navigator:J}=(0,a.useContext)(g),{hash:Y,pathname:ie,search:ae}=m(oe),ce=ie;if(V!=="/"){let fe=(function(he){return he===""||he.pathname===""?"/":typeof he=="string"?p(he).pathname:he.pathname})(oe),ve=fe!=null&&fe.endsWith("/");ce=ie==="/"?V+(ve?"/":""):C([V,ie])}return J.createHref({pathname:ce,search:ae,hash:Y})})(L),te=(function(oe,V){let{target:J,replace:Y,state:ie}=V===void 0?{}:V,ae=(function(){w()||O();let{basename:ve,navigator:he}=(0,a.useContext)(g),{matches:ye}=(0,a.useContext)(y),{pathname:be}=E(),_e=JSON.stringify(ye.map((Te=>Te.pathnameBase))),xe=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{xe.current=!0})),(0,a.useCallback)((function(Te,De){if(De===void 0&&(De={}),!xe.current)return;if(typeof Te=="number")return void he.go(Te);let Le=S(Te,JSON.parse(_e),be);ve!=="/"&&(Le.pathname=C([ve,Le.pathname])),(De.replace?he.replace:he.push)(Le,De.state)}),[ve,he,_e,be])})(),ce=E(),fe=m(oe);return(0,a.useCallback)((ve=>{if(!(ve.button!==0||J&&J!=="_self"||(function(he){return!!(he.metaKey||he.altKey||he.ctrlKey||he.shiftKey)})(ve))){ve.preventDefault();let he=!!Y||d(ce)===d(fe);ae(oe,{replace:he,state:ie})}}),[ce,ae,fe,Y,ie,J,oe])})(L,{replace:D,state:B,target:G});return(0,a.createElement)("a",j({},P,{href:T,onClick:function(oe){b&&b(oe),oe.defaultPrevented||x||te(oe)},ref:v,target:G}))}));var q,R=l(697),k=l.n(R),F=l(184),U=l.n(F);function ne(i){return ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},ne(i)}function ue(i){document.body.style.paddingRight=i>0?"".concat(i,"px"):null}function K(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q;return v?i.split(" ").map((function(b){return v[b]||b})).join(" "):i}function W(i,v){var b={};return Object.keys(i).forEach((function(x){v.indexOf(x)===-1&&(b[x]=i[x])})),b}var z={};function Q(i){z[i]||(typeof console<"u"&&console.error(i),z[i]=!0)}var re=(typeof window>"u"?"undefined":ne(window))==="object"&&window.Element||function(){},Z=k().oneOfType([k().string,k().func,function(i,v,b){if(!(i[v]instanceof re))return new Error("Invalid prop `"+v+"` supplied to `"+b+"`. Expected prop to be an instance of Element. Validation failed.")},k().shape({current:k().any})]),X=k().oneOfType([k().func,k().string,k().shape({$$typeof:k().symbol,render:k().func}),k().arrayOf(k().oneOfType([k().func,k().string,k().shape({$$typeof:k().symbol,render:k().func})]))]),H=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],ee={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},le=!(typeof window>"u"||!window.document||!window.document.createElement);function de(i){if((function(b){return!(!b||ne(b)!=="object")&&"current"in b})(i))return i.current;if((function(b){if(!(function(D){var B=ne(D);return D!=null&&(B==="object"||B==="function")})(b))return!1;var x=(function(D){return D==null?D===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(D)})(b);return x==="[object Function]"||x==="[object AsyncFunction]"||x==="[object GeneratorFunction]"||x==="[object Proxy]"})(i))return i();if(typeof i=="string"&&le){var v=document.querySelectorAll(i);if(v.length||(v=document.querySelectorAll("#".concat(i))),!v.length)throw new Error("The target '".concat(i,"' could not be identified in the dom, tip: check spelling"));return v}return i}function pe(i){return i!==null&&(Array.isArray(i)||le&&typeof i.length=="number")}var Ee=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],Ie=["className","cssModule","variant","innerRef"];function Pe(){return Pe=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Pe.apply(this,arguments)}function Ae(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function Se(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var Ge={active:k().bool,"aria-label":k().string,onClick:k().func,variant:k().oneOf(["white"]),className:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().string,k().func])};function Oe(i){var v=i.className,b=(i.cssModule,i.variant),x=i.innerRef,D=(function(G,L){if(G==null)return{};var P,T,te=(function(V,J){if(V==null)return{};var Y,ie,ae={},ce=Object.keys(V);for(ie=0;ie<ce.length;ie++)Y=ce[ie],J.indexOf(Y)>=0||(ae[Y]=V[Y]);return ae})(G,L);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(G);for(T=0;T<oe.length;T++)P=oe[T],L.indexOf(P)>=0||Object.prototype.propertyIsEnumerable.call(G,P)&&(te[P]=G[P])}return te})(i,Ie),B=K(U()(v,"btn-close",b&&"btn-close-".concat(b)));return u().createElement("button",Pe({ref:x,type:"button",className:B},(function(G){for(var L=1;L<arguments.length;L++){var P=arguments[L]!=null?arguments[L]:{};L%2?Ae(Object(P),!0).forEach((function(T){Se(G,T,P[T])})):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(P)):Ae(Object(P)).forEach((function(T){Object.defineProperty(G,T,Object.getOwnPropertyDescriptor(P,T))}))}return G})({"aria-label":"close"},D)))}Oe.propTypes=Ge;const ge=Oe;var me=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function ke(){return ke=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},ke.apply(this,arguments)}var Ne={active:k().bool,"aria-label":k().string,block:k().bool,children:k().node,className:k().string,cssModule:k().object,close:k().bool,color:k().string,disabled:k().bool,innerRef:k().oneOfType([k().object,k().func,k().string]),onClick:k().func,outline:k().bool,size:k().string,tag:X};function we(i){var v=(0,a.useCallback)((function(fe){if(!i.disabled)return i.onClick?i.onClick(fe):void 0;fe.preventDefault()}),[i.onClick,i.disabled]),b=i.active,x=i["aria-label"],D=i.block,B=i.className,G=i.close,L=i.cssModule,P=i.color,T=P===void 0?"secondary":P,te=i.outline,oe=i.size,V=i.tag,J=V===void 0?"button":V,Y=i.innerRef,ie=(function(fe,ve){if(fe==null)return{};var he,ye,be=(function(xe,Me){if(xe==null)return{};var Te,De,Le={},Re=Object.keys(xe);for(De=0;De<Re.length;De++)Te=Re[De],Me.indexOf(Te)>=0||(Le[Te]=xe[Te]);return Le})(fe,ve);if(Object.getOwnPropertySymbols){var _e=Object.getOwnPropertySymbols(fe);for(ye=0;ye<_e.length;ye++)he=_e[ye],ve.indexOf(he)>=0||Object.prototype.propertyIsEnumerable.call(fe,he)&&(be[he]=fe[he])}return be})(i,me);if(G)return u().createElement(ge,ie);var ae="btn".concat(te?"-outline":"","-").concat(T),ce=K(U()(B,"btn",ae,!!oe&&"btn-".concat(oe),!!D&&"d-block w-100",{active:b,disabled:i.disabled}),L);return ie.href&&J==="button"&&(J="a"),u().createElement(J,ke({type:J==="button"&&ie.onClick?"button":void 0},ie,{className:ce,ref:Y,onClick:v,"aria-label":x}))}we.propTypes=Ne;const qe=we;var je=a.createContext(),ze=a.createContext();function lt(i){var v=i.children,b=a.useState(null),x=b[0],D=b[1],B=a.useRef(!1);a.useEffect((function(){return function(){B.current=!0}}),[]);var G=a.useCallback((function(L){B.current||D(L)}),[]);return a.createElement(je.Provider,{value:x},a.createElement(ze.Provider,{value:G},v))}var pt=u().createContext({}),Ze=u().createContext({});function It(i){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},It(i)}var We=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"];function it(){return it=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},it.apply(this,arguments)}function Ot(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function kt(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function Nt(i,v){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},Nt(i,v)}function Ft(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function gn(i){return gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},gn(i)}var qo={a11y:k().bool,disabled:k().bool,direction:k().oneOf(["up","down","start","end","left","right"]),group:k().bool,isOpen:k().bool,nav:k().bool,active:k().bool,size:k().string,tag:X,toggle:k().func,children:k().node,className:k().string,cssModule:k().object,dropup:k().bool,inNavbar:k().bool,setActiveFromChild:k().bool,menuRole:k().oneOf(["listbox","menu"])},Lo=[ee.space,ee.enter,ee.up,ee.down,ee.end,ee.home],yn=(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&Nt(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=gn(x);if(D){var T=gn(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(It(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ft(te)})(this,L)});function G(L){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=B.call(this,L)).addEvents=P.addEvents.bind(Ft(P)),P.handleDocumentClick=P.handleDocumentClick.bind(Ft(P)),P.handleKeyDown=P.handleKeyDown.bind(Ft(P)),P.removeEvents=P.removeEvents.bind(Ft(P)),P.toggle=P.toggle.bind(Ft(P)),P.handleMenuRef=P.handleMenuRef.bind(Ft(P)),P.handleToggleRef=P.handleToggleRef.bind(Ft(P)),P.containerRef=u().createRef(),P.menuRef=u().createRef(),P.toggleRef=u().createRef(),P}return v=G,b=[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(L){this.props.isOpen!==L.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(L){this.menuRef.current=L}},{key:"handleToggleRef",value:function(L){this.toggleRef.current=L}},{key:"handleDocumentClick",value:function(L){if(!L||L.which!==3&&(L.type!=="keyup"||L.which===ee.tab)){var P=this.getContainer(),T=this.getMenu(),te=this.getToggle().contains(L.target),oe=T&&T.contains(L.target)&&T!==L.target,V=!1;P&&(V=P.classList.contains("input-group")&&P.classList.contains("dropdown")&&L.target.tagName==="INPUT"),(!(te&&!V||oe)||L.type==="keyup"&&L.which!==ee.tab)&&this.toggle(L)}}},{key:"handleKeyDown",value:function(L){var P=this,T=L.target.getAttribute("role")==="menuitem"||L.target.getAttribute("role")==="option",te=this.getMenuCtrl()===L.target,oe=ee.tab===L.which;if(!(/input|textarea/i.test(L.target.tagName)||oe&&!this.props.a11y||oe&&!T&&!te||((Lo.indexOf(L.which)!==-1||L.which>=48&&L.which<=90)&&L.preventDefault(),this.props.disabled))){if(te)if([ee.space,ee.enter,ee.up,ee.down].indexOf(L.which)>-1)this.props.isOpen||this.toggle(L),setTimeout((function(){var ve;return(ve=P.getMenuItems()[0])===null||ve===void 0?void 0:ve.focus()}));else if(this.props.isOpen&&oe){var V;L.preventDefault(),(V=this.getMenuItems()[0])===null||V===void 0||V.focus()}else this.props.isOpen&&L.which===ee.esc&&this.toggle(L);if(this.props.isOpen&&T){if([ee.tab,ee.esc].indexOf(L.which)>-1)this.toggle(L),this.getMenuCtrl().focus();else if([ee.space,ee.enter].indexOf(L.which)>-1)L.target.click(),this.getMenuCtrl().focus();else if([ee.down,ee.up].indexOf(L.which)>-1||[ee.n,ee.p].indexOf(L.which)>-1&&L.ctrlKey){var J=this.getMenuItems(),Y=J.indexOf(L.target);ee.up===L.which||ee.p===L.which&&L.ctrlKey?Y=Y!==0?Y-1:J.length-1:(ee.down===L.which||ee.n===L.which&&L.ctrlKey)&&(Y=Y===J.length-1?0:Y+1),J[Y].focus()}else if(ee.end===L.which){var ie=this.getMenuItems();ie[ie.length-1].focus()}else if(ee.home===L.which)this.getMenuItems()[0].focus();else if(L.which>=48&&L.which<=90){for(var ae=this.getMenuItems(),ce=String.fromCharCode(L.which).toLowerCase(),fe=0;fe<ae.length;fe+=1)if((ae[fe].textContent&&ae[fe].textContent[0].toLowerCase())===ce){ae[fe].focus();break}}}}}},{key:"handleProps",value:function(){this.props.isOpen?this.addEvents():this.removeEvents()}},{key:"getContextValue",value:function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:this.props.direction==="down"&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled,onMenuRef:this.handleMenuRef,onToggleRef:this.handleToggleRef,menuRole:this.props.menuRole}}},{key:"getContainer",value:function(){return this.containerRef.current}},{key:"getMenu",value:function(){return this.menuRef.current}},{key:"getToggle",value:function(){return this.toggleRef.current}},{key:"getMenuCtrl",value:function(){return this._$menuCtrl||(this._$menuCtrl=this.getToggle()),this._$menuCtrl}},{key:"getItemType",value:function(){return this.props.menuRole==="listbox"?"option":"menuitem"}},{key:"getMenuItems",value:function(){var L=this.getMenu()||this.getContainer();return[].slice.call(L.querySelectorAll('[role="'.concat(this.getItemType(),'"]')))}},{key:"addEvents",value:function(){var L=this;["click","touchstart","keyup"].forEach((function(P){return document.addEventListener(P,L.handleDocumentClick,!0)}))}},{key:"removeEvents",value:function(){var L=this;["click","touchstart","keyup"].forEach((function(P){return document.removeEventListener(P,L.handleDocumentClick,!0)}))}},{key:"toggle",value:function(L){return this.props.disabled?L&&L.preventDefault():this.props.toggle(L)}},{key:"render",value:function(){var L,P=this,T=W(this.props,["toggle","disabled","inNavbar","a11y"]),te=T.className,oe=T.cssModule,V=T.direction,J=T.isOpen,Y=T.group,ie=T.size,ae=T.nav,ce=T.setActiveFromChild,fe=T.active,ve=T.tag,he=(T.menuRole,(function(xe,Me){if(xe==null)return{};var Te,De,Le=(function(He,Ve){if(He==null)return{};var Ue,at,Qe={},ut=Object.keys(He);for(at=0;at<ut.length;at++)Ue=ut[at],Ve.indexOf(Ue)>=0||(Qe[Ue]=He[Ue]);return Qe})(xe,Me);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(xe);for(De=0;De<Re.length;De++)Te=Re[De],Me.indexOf(Te)>=0||Object.prototype.propertyIsEnumerable.call(xe,Te)&&(Le[Te]=xe[Te])}return Le})(T,We)),ye=ve||(ae?"li":"div"),be=!1;ce&&u().Children.map(this.props.children[1].props.children,(function(xe){xe&&xe.props.active&&(be=!0)}));var _e=K(U()(te,!(!ae||!fe)&&"active",!(!ce||!be)&&"active",(Ot(L={"btn-group":Y},"btn-group-".concat(ie),!!ie),Ot(L,"dropdown",!Y),Ot(L,"dropup",V==="up"),Ot(L,"dropstart",V==="start"||V==="left"),Ot(L,"dropend",V==="end"||V==="right"),Ot(L,"show",J),Ot(L,"nav-item",ae),L)),oe);return this.context.insideInputGroup?u().createElement(pt.Provider,{value:this.getContextValue()},u().createElement(lt,null,u().Children.map(this.props.children,(function(xe){return u().cloneElement(xe,{onKeyDown:P.handleKeyDown})})))):u().createElement(pt.Provider,{value:this.getContextValue()},u().createElement(lt,null,u().createElement(ye,it({},he,Ot({},typeof ye=="string"?"ref":"innerRef",this.containerRef),{onKeyDown:this.handleKeyDown,className:_e}))))}}],b&&kt(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);yn.propTypes=qo,yn.defaultProps={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},yn.contextType=Ze;const Ro=yn;function Ir(){return Ir=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Ir.apply(this,arguments)}var Pn={children:k().node};function fa(i){return u().createElement(Ro,Ir({group:!0},i))}fa.propTypes=Pn;const da=fa;function Do(i){return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},Do(i)}function ha(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function Kh(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function jo(){return jo=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},jo.apply(this,arguments)}function Wh(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function Fo(i,v){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},Fo(i,v)}function pa(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Mr(i){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Mr(i)}var Yh=["defaultOpen"];(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&Fo(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=Mr(x);if(D){var T=Mr(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(Do(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pa(te)})(this,L)});function G(L){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=B.call(this,L)).state={isOpen:L.defaultOpen||!1},P.toggle=P.toggle.bind(pa(P)),P}return v=G,(b=[{key:"toggle",value:function(){this.setState((function(L){return{isOpen:!L.isOpen}}))}},{key:"render",value:function(){return u().createElement(da,jo({isOpen:this.state.isOpen,toggle:this.toggle},W(this.props,Yh)))}}])&&Wh(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(a.Component).propTypes=(function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?ha(Object(b),!0).forEach((function(x){Kh(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):ha(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i})({defaultOpen:k().bool},da.propTypes);var Zh=l(379),qr=l.n(Zh),va=l(795),Lr=l.n(va),Xh=l(569),Rr=l.n(Xh),Qh=l(565),Dr=l.n(Qh),Jh=l(216),jr=l.n(Jh),ep=l(589),sr=l.n(ep),Fr=l(953),$n={};$n.styleTagTransform=sr(),$n.setAttributes=Dr(),$n.insert=Rr().bind(null,"head"),$n.domAPI=Lr(),$n.insertStyleElement=jr(),qr()(Fr.Z,$n),Fr.Z&&Fr.Z.locals&&Fr.Z.locals;var tp=["href","to","icon","pending","children","target","download","noText"],ga=function(i){var v=i.href,b=i.to,x=i.icon,D=i.pending,B=i.children,G=i.target,L=i.download,P=i.noText,T=(function(oe,V){if(oe==null)return{};var J,Y,ie=(function(ce,fe){if(ce==null)return{};var ve,he,ye={},be=Object.keys(ce);for(he=0;he<be.length;he++)ve=be[he],fe.indexOf(ve)>=0||(ye[ve]=ce[ve]);return ye})(oe,V);if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],V.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(oe,J)&&(ie[J]=oe[J])}return ie})(i,tp);T.className="".concat(i.className," button-component");var te=u().createElement(u().Fragment,null,D&&u().createElement("i",{className:"fas fa-spinner fa-spin"}),x&&!D&&u().createElement("i",{className:"fas ".concat(x," ").concat(P?"no-text":"")}),B);return T.disabled=T.disabled||D,b&&!T.disabled?u().createElement(A,{to:b,target:G},u().createElement(qe,T,te)):v?u().createElement("a",{href:v,target:G,download:L,rel:"noopener noreferrer"},u().createElement(qe,T,te)):u().createElement(qe,T,te)};ga.defaultProps={active:!1,"aria-label":"",block:!1,color:"secondary",disabled:!1,outline:!1,icon:"",pending:!1,className:"",to:"",href:"",target:"_self",download:!1,children:null};const lr=ga;var ya=l(732),Hn=l.n(ya);function Bo(i){return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},Bo(i)}function np(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function ur(i,v){return ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},ur(i,v)}function ma(i){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},ma(i)}var mL={children:k().node.isRequired,node:k().any},XO=(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&ur(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=ma(x);if(D){var T=ma(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(Bo(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V})(te)})(this,L)});function G(){return(function(L,P){if(!(L instanceof P))throw new TypeError("Cannot call a class as a function")})(this,G),B.apply(this,arguments)}return v=G,(b=[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return le?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Hn().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}])&&np(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);XO.propTypes=mL;const bL=XO;function QO(i,v){if(i==null)return{};var b,x,D={},B=Object.keys(i);for(x=0;x<B.length;x++)b=B[x],v.indexOf(b)>=0||(D[b]=i[b]);return D}function ba(i,v){return ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},ba(i,v)}function JO(i,v){i.prototype=Object.create(v.prototype),i.prototype.constructor=i,ba(i,v)}const eE=u().createContext(null);var zo="unmounted",cr="exited",fr="entering",Br="entered",rp="exiting",In=(function(i){function v(x,D){var B;B=i.call(this,x,D)||this;var G,L=D&&!D.isMounting?x.enter:x.appear;return B.appearStatus=null,x.in?L?(G=cr,B.appearStatus=fr):G=Br:G=x.unmountOnExit||x.mountOnEnter?zo:cr,B.state={status:G},B.nextCallback=null,B}JO(v,i),v.getDerivedStateFromProps=function(x,D){return x.in&&D.status===zo?{status:cr}:null};var b=v.prototype;return b.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},b.componentDidUpdate=function(x){var D=null;if(x!==this.props){var B=this.state.status;this.props.in?B!==fr&&B!==Br&&(D=fr):B!==fr&&B!==Br||(D=rp)}this.updateStatus(!1,D)},b.componentWillUnmount=function(){this.cancelNextCallback()},b.getTimeouts=function(){var x,D,B,G=this.props.timeout;return x=D=B=G,G!=null&&typeof G!="number"&&(x=G.exit,D=G.enter,B=G.appear!==void 0?G.appear:D),{exit:x,enter:D,appear:B}},b.updateStatus=function(x,D){if(x===void 0&&(x=!1),D!==null)if(this.cancelNextCallback(),D===fr){if(this.props.unmountOnExit||this.props.mountOnEnter){var B=this.props.nodeRef?this.props.nodeRef.current:Hn().findDOMNode(this);B&&(function(G){G.scrollTop})(B)}this.performEnter(x)}else this.performExit();else this.props.unmountOnExit&&this.state.status===cr&&this.setState({status:zo})},b.performEnter=function(x){var D=this,B=this.props.enter,G=this.context?this.context.isMounting:x,L=this.props.nodeRef?[G]:[Hn().findDOMNode(this),G],P=L[0],T=L[1],te=this.getTimeouts(),oe=G?te.appear:te.enter;x||B?(this.props.onEnter(P,T),this.safeSetState({status:fr},(function(){D.props.onEntering(P,T),D.onTransitionEnd(oe,(function(){D.safeSetState({status:Br},(function(){D.props.onEntered(P,T)}))}))}))):this.safeSetState({status:Br},(function(){D.props.onEntered(P)}))},b.performExit=function(){var x=this,D=this.props.exit,B=this.getTimeouts(),G=this.props.nodeRef?void 0:Hn().findDOMNode(this);D?(this.props.onExit(G),this.safeSetState({status:rp},(function(){x.props.onExiting(G),x.onTransitionEnd(B.exit,(function(){x.safeSetState({status:cr},(function(){x.props.onExited(G)}))}))}))):this.safeSetState({status:cr},(function(){x.props.onExited(G)}))},b.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},b.safeSetState=function(x,D){D=this.setNextCallback(D),this.setState(x,D)},b.setNextCallback=function(x){var D=this,B=!0;return this.nextCallback=function(G){B&&(B=!1,D.nextCallback=null,x(G))},this.nextCallback.cancel=function(){B=!1},this.nextCallback},b.onTransitionEnd=function(x,D){this.setNextCallback(D);var B=this.props.nodeRef?this.props.nodeRef.current:Hn().findDOMNode(this),G=x==null&&!this.props.addEndListener;if(B&&!G){if(this.props.addEndListener){var L=this.props.nodeRef?[this.nextCallback]:[B,this.nextCallback],P=L[0],T=L[1];this.props.addEndListener(P,T)}x!=null&&setTimeout(this.nextCallback,x)}else setTimeout(this.nextCallback,0)},b.render=function(){var x=this.state.status;if(x===zo)return null;var D=this.props,B=D.children,G=(D.in,D.mountOnEnter,D.unmountOnExit,D.appear,D.enter,D.exit,D.timeout,D.addEndListener,D.onEnter,D.onEntering,D.onEntered,D.onExit,D.onExiting,D.onExited,D.nodeRef,QO(D,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return u().createElement(eE.Provider,{value:null},typeof B=="function"?B(x,G):u().cloneElement(u().Children.only(B),G))},v})(u().Component);function zr(){}In.contextType=eE,In.propTypes={},In.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zr,onEntering:zr,onEntered:zr,onExit:zr,onExiting:zr,onExited:zr},In.UNMOUNTED=zo,In.EXITED=cr,In.ENTERING=fr,In.ENTERED=Br,In.EXITING=rp;const op=In;var _L=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function _a(){return _a=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},_a.apply(this,arguments)}function tE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function $o(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?tE(Object(b),!0).forEach((function(x){wL(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):tE(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function wL(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var OL=$o($o({},op.propTypes),{},{children:k().oneOfType([k().arrayOf(k().node),k().node]),tag:X,baseClass:k().string,baseClassActive:k().string,className:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().string,k().func])}),nE=$o($o({},op.defaultProps),{},{timeout:150,appear:!0,enter:!0,exit:!0,in:!0});function ip(i){var v=(0,a.useRef)(null),b=i.tag,x=b===void 0?"div":b,D=i.baseClass,B=D===void 0?"fade":D,G=i.baseClassActive,L=G===void 0?"show":G,P=i.className,T=i.cssModule,te=i.children,oe=i.innerRef,V=oe===void 0?v:oe,J=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var xe,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)xe=De[Me],_e.indexOf(xe)>=0||(Te[xe]=be[xe]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(i,_L),Y=(function(ae,ce){for(var fe,ve=Array.isArray(ce)?ce:[ce],he=ve.length,ye={};he>0;)ye[fe=ve[he-=1]]=ae[fe];return ye})($o({defaultProps:nE},J),H),ie=W(J,H);return u().createElement(op,_a({nodeRef:V},Y),(function(ae){var ce=ae==="entered",fe=K(U()(P,B,ce&&L),T);return u().createElement(x,_a({className:fe},ie,{ref:V}),te)}))}ip.propTypes=OL,ip.defaultProps=nE;const Mn=ip;function ap(i){return ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},ap(i)}function rE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function $r(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?rE(Object(b),!0).forEach((function(x){Hr(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):rE(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function Ho(){return Ho=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Ho.apply(this,arguments)}function Hr(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function EL(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function sp(i,v){return sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},sp(i,v)}function Jt(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function wa(i){return wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},wa(i)}function Oa(){}var oE=k().shape(Mn.propTypes),iE={autoFocus:k().bool,backdrop:k().oneOfType([k().bool,k().oneOf(["static"])]),backdropClassName:k().string,backdropTransition:oE,centered:k().bool,children:k().node,contentClassName:k().string,className:k().string,container:Z,cssModule:k().object,external:k().node,fade:k().bool,fullscreen:k().oneOfType([k().bool,k().oneOf(["sm","md","lg","xl"])]),innerRef:k().oneOfType([k().object,k().string,k().func]),isOpen:k().bool,keyboard:k().bool,labelledBy:k().string,modalClassName:k().string,modalTransition:oE,onClosed:k().func,onEnter:k().func,onExit:k().func,onOpened:k().func,returnFocusAfterClose:k().bool,role:k().string,scrollable:k().bool,size:k().string,toggle:k().func,trapFocus:k().bool,unmountOnClose:k().bool,wrapClassName:k().string,zIndex:k().oneOfType([k().number,k().string])},xL=Object.keys(iE),SL={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Oa,onClosed:Oa,modalTransition:{timeout:300},backdropTransition:{mountOnEnter:!0,timeout:150},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},Vo=(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&sp(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=wa(x);if(D){var T=wa(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(ap(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(te)})(this,L)});function G(L){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=B.call(this,L))._element=null,P._originalBodyPadding=null,P.getFocusableChildren=P.getFocusableChildren.bind(Jt(P)),P.handleBackdropClick=P.handleBackdropClick.bind(Jt(P)),P.handleBackdropMouseDown=P.handleBackdropMouseDown.bind(Jt(P)),P.handleEscape=P.handleEscape.bind(Jt(P)),P.handleStaticBackdropAnimation=P.handleStaticBackdropAnimation.bind(Jt(P)),P.handleTab=P.handleTab.bind(Jt(P)),P.onOpened=P.onOpened.bind(Jt(P)),P.onClosed=P.onClosed.bind(Jt(P)),P.manageFocusAfterClose=P.manageFocusAfterClose.bind(Jt(P)),P.clearBackdropAnimationTimeout=P.clearBackdropAnimationTimeout.bind(Jt(P)),P.trapFocus=P.trapFocus.bind(Jt(P)),P.state={isOpen:!1,showStaticBackdropAnimation:!1},P}return v=G,b=[{key:"componentDidMount",value:function(){var L=this.props,P=L.isOpen,T=L.autoFocus,te=L.onEnter;P&&(this.init(),this.setState({isOpen:!0}),T&&this.setFocus()),te&&te(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(L,P){if(this.props.isOpen&&!L.isOpen)return this.init(),void this.setState({isOpen:!0});this.props.autoFocus&&this.state.isOpen&&!P.isOpen&&this.setFocus(),this._element&&L.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(L){if(L.target===this._mouseDownElement){L.stopPropagation();var P=this._dialog?this._dialog.parentNode:null;if(P&&L.target===P&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;P&&L.target===P&&this.props.toggle&&this.props.toggle(L)}}},{key:"handleTab",value:function(L){if(L.which===9&&!(this.modalIndex<G.openCount-1)){var P=this.getFocusableChildren(),T=P.length;if(T!==0){for(var te=this.getFocusedChild(),oe=0,V=0;V<T;V+=1)if(P[V]===te){oe=V;break}L.shiftKey&&oe===0?(L.preventDefault(),P[T-1].focus()):L.shiftKey||oe!==T-1||(L.preventDefault(),P[0].focus())}}}},{key:"handleBackdropMouseDown",value:function(L){this._mouseDownElement=L.target}},{key:"handleEscape",value:function(L){this.props.isOpen&&L.keyCode===ee.esc&&this.props.toggle&&(this.props.keyboard?(L.preventDefault(),L.stopPropagation(),this.props.toggle(L)):this.props.backdrop==="static"&&(L.preventDefault(),L.stopPropagation(),this.handleStaticBackdropAnimation()))}},{key:"handleStaticBackdropAnimation",value:function(){var L=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout((function(){L.setState({showStaticBackdropAnimation:!1})}),100)}},{key:"onOpened",value:function(L,P){this.props.onOpened(),(this.props.modalTransition.onEntered||Oa)(L,P)}},{key:"onClosed",value:function(L){var P=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||Oa)(L),P&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}},{key:"setFocus",value:function(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}},{key:"getFocusableChildren",value:function(){return this._element.querySelectorAll(Ee.join(", "))}},{key:"getFocusedChild",value:function(){var L,P=this.getFocusableChildren();try{L=document.activeElement}catch{L=P[0]}return L}},{key:"trapFocus",value:function(L){if(this.props.trapFocus&&this._element&&!(this._dialog&&this._dialog.parentNode===L.target||this.modalIndex<G.openCount-1)){for(var P=this.getFocusableChildren(),T=0;T<P.length;T+=1)if(P[T]===L.target)return;P.length>0&&(L.preventDefault(),L.stopPropagation(),P[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}var L,P,T,te,oe;this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=pe(L=de(this.props.container))?L[0]:L,this._mountContainer.appendChild(this._element)),this._originalBodyPadding=(P=window.getComputedStyle(document.body,null),parseInt(P&&P.getPropertyValue("padding-right")||0,10)),G.openCount<1&&(G.originalBodyOverflow=window.getComputedStyle(document.body).overflow),T=(function(){var V=document.createElement("div");V.style.position="absolute",V.style.top="-9999px",V.style.width="50px",V.style.height="50px",V.style.overflow="scroll",document.body.appendChild(V);var J=V.offsetWidth-V.clientWidth;return document.body.removeChild(V),J})(),te=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],oe=te?parseInt(te.style.paddingRight||0,10):0,document.body.clientWidth<window.innerWidth&&ue(oe+T),G.openCount===0&&(document.body.className=U()(document.body.className,K("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=G.openCount,G.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var L=this.props.returnFocusAfterClose;this._triggeringElement.focus&&L&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(G.openCount<=1){var L=K("modal-open",this.props.cssModule),P=new RegExp("(^| )".concat(L,"( |$)"));document.body.className=document.body.className.replace(P," ").trim(),document.body.style.overflow=G.originalBodyOverflow}this.manageFocusAfterClose(),G.openCount=Math.max(0,G.openCount-1),ue(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var L,P=this,T=W(this.props,xL),te="modal-dialog";return u().createElement("div",Ho({},T,{className:K(U()(te,this.props.className,(L={},Hr(L,"modal-".concat(this.props.size),this.props.size),Hr(L,"".concat(te,"-centered"),this.props.centered),Hr(L,"".concat(te,"-scrollable"),this.props.scrollable),Hr(L,"modal-fullscreen",this.props.fullscreen===!0),Hr(L,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),L)),this.props.cssModule),role:"document",ref:function(oe){P._dialog=oe}}),u().createElement("div",{className:K(U()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var L=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!L)){var P=!!this._element&&!this.state.isOpen&&!L;this._element.style.display=P?"none":"block";var T=this.props,te=T.wrapClassName,oe=T.modalClassName,V=T.backdropClassName,J=T.cssModule,Y=T.isOpen,ie=T.backdrop,ae=T.role,ce=T.labelledBy,fe=T.external,ve=T.innerRef,he={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":ce,"aria-modal":!0,role:ae,tabIndex:"-1"},ye=this.props.fade,be=$r($r($r({},Mn.defaultProps),this.props.modalTransition),{},{baseClass:ye?this.props.modalTransition.baseClass:"",timeout:ye?this.props.modalTransition.timeout:0}),_e=$r($r($r({},Mn.defaultProps),this.props.backdropTransition),{},{baseClass:ye?this.props.backdropTransition.baseClass:"",timeout:ye?this.props.backdropTransition.timeout:0}),xe=ie&&(ye?u().createElement(Mn,Ho({},_e,{in:Y&&!!ie,cssModule:J,className:K(U()("modal-backdrop",V),J)})):u().createElement("div",{className:K(U()("modal-backdrop","show",V),J)}));return u().createElement(bL,{node:this._element},u().createElement("div",{className:K(te)},u().createElement(Mn,Ho({},he,be,{in:Y,onEntered:this.onOpened,onExited:this.onClosed,cssModule:J,className:K(U()("modal",oe,this.state.showStaticBackdropAnimation&&"modal-static"),J),innerRef:ve}),fe,this.renderModalDialog()),xe))}return null}}],b&&EL(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);Vo.propTypes=iE,Vo.defaultProps=SL,Vo.openCount=0,Vo.originalBodyOverflow=null;const kL=Vo;var NL=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function lp(){return lp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},lp.apply(this,arguments)}var TL={children:k().node,className:k().string,close:k().object,closeAriaLabel:k().string,cssModule:k().object,tag:X,toggle:k().func,wrapTag:X};function aE(i){var v,b=i.className,x=i.cssModule,D=i.children,B=i.toggle,G=i.tag,L=G===void 0?"h5":G,P=i.wrapTag,T=P===void 0?"div":P,te=i.closeAriaLabel,oe=te===void 0?"Close":te,V=i.close,J=(function(ie,ae){if(ie==null)return{};var ce,fe,ve=(function(ye,be){if(ye==null)return{};var _e,xe,Me={},Te=Object.keys(ye);for(xe=0;xe<Te.length;xe++)_e=Te[xe],be.indexOf(_e)>=0||(Me[_e]=ye[_e]);return Me})(ie,ae);if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(ie);for(fe=0;fe<he.length;fe++)ce=he[fe],ae.indexOf(ce)>=0||Object.prototype.propertyIsEnumerable.call(ie,ce)&&(ve[ce]=ie[ce])}return ve})(i,NL),Y=K(U()(b,"modal-header"),x);return!V&&B&&(v=u().createElement("button",{type:"button",onClick:B,className:K("btn-close",x),"aria-label":oe})),u().createElement(T,lp({},J,{className:Y}),u().createElement(L,{className:K("modal-title",x)},D),V||v)}aE.propTypes=TL;const CL=aE;var AL=["className","cssModule","tag"];function up(){return up=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},up.apply(this,arguments)}var PL={className:k().string,cssModule:k().object,tag:X};function sE(i){var v=i.className,b=i.cssModule,x=i.tag,D=x===void 0?"div":x,B=(function(L,P){if(L==null)return{};var T,te,oe=(function(J,Y){if(J==null)return{};var ie,ae,ce={},fe=Object.keys(J);for(ae=0;ae<fe.length;ae++)ie=fe[ae],Y.indexOf(ie)>=0||(ce[ie]=J[ie]);return ce})(L,P);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(L);for(te=0;te<V.length;te++)T=V[te],P.indexOf(T)>=0||Object.prototype.propertyIsEnumerable.call(L,T)&&(oe[T]=L[T])}return oe})(i,AL),G=K(U()(v,"modal-body"),b);return u().createElement(D,up({},B,{className:G}))}sE.propTypes=PL;const IL=sE;var ML=["className","cssModule","tag"];function cp(){return cp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},cp.apply(this,arguments)}var qL={className:k().string,cssModule:k().object,tag:X};function lE(i){var v=i.className,b=i.cssModule,x=i.tag,D=x===void 0?"div":x,B=(function(L,P){if(L==null)return{};var T,te,oe=(function(J,Y){if(J==null)return{};var ie,ae,ce={},fe=Object.keys(J);for(ae=0;ae<fe.length;ae++)ie=fe[ae],Y.indexOf(ie)>=0||(ce[ie]=J[ie]);return ce})(L,P);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(L);for(te=0;te<V.length;te++)T=V[te],P.indexOf(T)>=0||Object.prototype.propertyIsEnumerable.call(L,T)&&(oe[T]=L[T])}return oe})(i,ML),G=K(U()(v,"modal-footer"),b);return u().createElement(D,cp({},B,{className:G}))}lE.propTypes=qL;const LL=lE;var RL=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function fp(){return fp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},fp.apply(this,arguments)}function uE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function Uo(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?uE(Object(b),!0).forEach((function(x){DL(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):uE(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function DL(i,v,b){return v in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var jL={children:k().node,className:k().string,closeClassName:k().string,closeAriaLabel:k().string,color:k().string,cssModule:k().object,fade:k().bool,innerRef:k().oneOfType([k().object,k().string,k().func]),isOpen:k().bool,tag:X,toggle:k().func,transition:k().shape(Mn.propTypes)};function cE(i){var v=i.className,b=i.closeClassName,x=i.closeAriaLabel,D=x===void 0?"Close":x,B=i.cssModule,G=i.tag,L=G===void 0?"div":G,P=i.color,T=P===void 0?"success":P,te=i.isOpen,oe=te===void 0||te,V=i.toggle,J=i.children,Y=i.transition,ie=Y===void 0?Uo(Uo({},Mn.defaultProps),{},{unmountOnExit:!0}):Y,ae=i.fade,ce=ae===void 0||ae,fe=i.innerRef,ve=(function(_e,xe){if(_e==null)return{};var Me,Te,De=(function(Re,He){if(Re==null)return{};var Ve,Ue,at={},Qe=Object.keys(Re);for(Ue=0;Ue<Qe.length;Ue++)Ve=Qe[Ue],He.indexOf(Ve)>=0||(at[Ve]=Re[Ve]);return at})(_e,xe);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(_e);for(Te=0;Te<Le.length;Te++)Me=Le[Te],xe.indexOf(Me)>=0||Object.prototype.propertyIsEnumerable.call(_e,Me)&&(De[Me]=_e[Me])}return De})(i,RL),he=K(U()(v,"alert","alert-".concat(T),{"alert-dismissible":V}),B),ye=K(U()("btn-close",b),B),be=Uo(Uo(Uo({},Mn.defaultProps),ie),{},{baseClass:ce?ie.baseClass:"",timeout:ce?ie.timeout:0});return u().createElement(Mn,fp({},ve,be,{tag:L,className:he,in:oe,role:"alert",innerRef:fe}),V?u().createElement("button",{type:"button",className:ye,"aria-label":D,onClick:V}):null,J)}cE.propTypes=jL;const FL=cE;var Ea=l(318),Vr={};function fE(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=i[b];return x}Vr.styleTagTransform=sr(),Vr.setAttributes=Dr(),Vr.insert=Rr().bind(null,"head"),Vr.domAPI=Lr(),Vr.insertStyleElement=jr(),qr()(Ea.Z,Vr),Ea.Z&&Ea.Z.locals&&Ea.Z.locals;var dE=function(i){var v=(function(D,B){return(function(G){if(Array.isArray(G))return G})(D)||(function(G,L){var P=G==null?null:typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(P!=null){var T,te,oe,V,J=[],Y=!0,ie=!1;try{if(oe=(P=P.call(G)).next,L!==0)for(;!(Y=(T=oe.call(P)).done)&&(J.push(T.value),J.length!==L);Y=!0);}catch(ae){ie=!0,te=ae}finally{try{if(!Y&&P.return!=null&&(V=P.return(),Object(V)!==V))return}finally{if(ie)throw te}}return J}})(D,B)||(function(G,L){if(G){if(typeof G=="string")return fE(G,L);var P=Object.prototype.toString.call(G).slice(8,-1);return P==="Object"&&G.constructor&&(P=G.constructor.name),P==="Map"||P==="Set"?Array.from(G):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?fE(G,L):void 0}})(D,B)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,a.useState)(!1),2),b=v[0],x=v[1];return b?null:u().createElement(FL,{id:i.id,className:"message-stripe-component ".concat(i.classes," m-0"),color:i.color,fade:!1},i.dismissible&&u().createElement("button",{type:"button",className:"fas fa-times message-stripe__remove-button",onClick:function(){x(!0),i.onDismiss&&i.onDismiss()}}),i.icon&&u().createElement("i",{className:"fas ".concat(i.icon)}),i.title&&u().createElement("span",{className:"message-stripe__message ml-2 h5"},i.title),u().createElement("span",{className:"message-stripe__message"},i.message))};dE.defaultProps={dismissible:!0,onDismiss:function(){},icon:"",classes:"",title:""};const Ur=dE;var hE=function(i,v,b){return b?"".concat(b,": (").concat(i,") ").concat(v):"(".concat(i,") ").concat(v)},pE=function(i,v){return i.status?hE(i.status,i.message,v):i.Status?hE(i.Status,i.Message,v):v?"".concat(v,": ").concat(i):i};function dp(i){return dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},dp(i)}var BL=function(i){var v=i.error;return v?v.constructor===Array?v.map((function(b){return u().createElement(Ur,{id:"error-stripe",classes:"mx-3 my-2",color:"danger",dismissible:!1,message:pE(b)})})):["object","string"].includes(dp(v))?u().createElement(Ur,{id:"error-stripe",classes:"mx-3 my-2",color:"danger",dismissible:!1,message:pE(v)}):void 0:null},vE=function(i){return u().createElement(kL,{id:i.id,size:i.size,className:i.className,isOpen:i.isOpen,scrollable:i.scrollable,backdrop:!i.noCancel||"static",toggle:i.onClose,onClosed:function(){i.onClosed&&i.onClosed()},onOpened:function(){i.onOpen&&i.onOpen()}},i.headerContent&&u().createElement(CL,{toggle:i.onClose},i.headerContent),u().createElement(BL,{error:i.error}),i.warning&&(Array.isArray(i.warning)?i.warning.map((function(v){return u().createElement(Ur,{id:"warning-stripe",classes:"mx-3 my-2",color:"warning",dismissible:!1,message:v})})):u().createElement(Ur,{id:"warning-stripe",classes:"mx-3 my-2",color:"warning",dismissible:!1,message:i.warning})),(i.content||i.disableSubmitMessage)&&u().createElement(IL,{className:i.bodyClassName},i.content,i.disableSubmit&&i.disableSubmitMessage&&u().createElement(Ur,{id:"cm-disable-submit-message",message:i.disableSubmitMessage,color:"danger",dismissible:!1})),u().createElement(LL,null,i.customFooter?i.customFooter:u().createElement(u().Fragment,null,!i.noCancel&&u().createElement(lr,{key:"cancel-button",onClick:i.onClose},i.cancelButtonText),!i.noSubmit&&u().createElement(lr,{key:"submit-button",color:i.submitButtonColor,pending:i.pending,onClick:i.onSubmit,disabled:i.disableSubmit},i.submitButtonText))))};vE.defaultProps={scrollable:!1,pending:!1,disableSubmit:!1,noSubmit:!1,noCancel:!1,content:null,customFooter:null,bodyClassName:"",cancelButtonText:"Cancel",submitButtonText:"Submit",submitButtonColor:"primary",error:null,warning:null,className:"",disableSubmitMessage:""};const zL=vE;var $L=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function hp(){return hp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},hp.apply(this,arguments)}var HL={card:k().bool,className:k().string,cssModule:k().object,fill:k().bool,horizontal:k().oneOf(["center","end"]),justified:k().bool,navbar:k().bool,pills:k().bool,tabs:k().bool,tag:X,vertical:k().oneOfType([k().bool,k().string])};function gE(i){var v=i.className,b=i.cssModule,x=i.tabs,D=i.pills,B=i.vertical,G=B!==void 0&&B,L=i.horizontal,P=i.justified,T=i.fill,te=i.navbar,oe=i.card,V=i.tag,J=V===void 0?"ul":V,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var xe,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)xe=De[Me],_e.indexOf(xe)>=0||(Te[xe]=be[xe]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(i,$L),ie=K(U()(v,te?"navbar-nav":"nav",!!L&&"justify-content-".concat(L),(function(ae){return ae!==!1&&(ae===!0||ae==="xs"?"flex-column":"flex-".concat(ae,"-column"))})(G),{"nav-tabs":x,"card-header-tabs":oe&&x,"nav-pills":D,"card-header-pills":oe&&D,"nav-justified":P,"nav-fill":T}),b);return u().createElement(J,hp({},Y,{className:ie}))}gE.propTypes=HL;const VL=gE;var UL=["className","cssModule","active","tag"];function pp(){return pp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},pp.apply(this,arguments)}var GL={active:k().bool,className:k().string,cssModule:k().object,tag:X};function yE(i){var v=i.className,b=i.cssModule,x=i.active,D=i.tag,B=D===void 0?"li":D,G=(function(P,T){if(P==null)return{};var te,oe,V=(function(Y,ie){if(Y==null)return{};var ae,ce,fe={},ve=Object.keys(Y);for(ce=0;ce<ve.length;ce++)ae=ve[ce],ie.indexOf(ae)>=0||(fe[ae]=Y[ae]);return fe})(P,T);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(P);for(oe=0;oe<J.length;oe++)te=J[oe],T.indexOf(te)>=0||Object.prototype.propertyIsEnumerable.call(P,te)&&(V[te]=P[te])}return V})(i,UL),L=K(U()(v,"nav-item",!!x&&"active"),b);return u().createElement(B,pp({},G,{className:L}))}yE.propTypes=GL;const KL=yE;function vp(i){return vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},vp(i)}var WL=["className","cssModule","active","tag","innerRef"];function gp(){return gp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},gp.apply(this,arguments)}function YL(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function yp(i,v){return yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},yp(i,v)}function mE(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function xa(i){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},xa(i)}var ZL={active:k().bool,className:k().string,cssModule:k().object,disabled:k().bool,href:k().any,innerRef:k().oneOfType([k().object,k().func,k().string]),onClick:k().func,tag:X},bE=(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&yp(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=xa(x);if(D){var T=xa(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(vp(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mE(te)})(this,L)});function G(L){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=B.call(this,L)).onClick=P.onClick.bind(mE(P)),P}return v=G,(b=[{key:"onClick",value:function(L){this.props.disabled?L.preventDefault():(this.props.href==="#"&&L.preventDefault(),this.props.onClick&&this.props.onClick(L))}},{key:"render",value:function(){var L=this.props,P=L.className,T=L.cssModule,te=L.active,oe=L.tag,V=oe===void 0?"a":oe,J=L.innerRef,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he=(function(be,_e){if(be==null)return{};var xe,Me,Te={},De=Object.keys(be);for(Me=0;Me<De.length;Me++)xe=De[Me],_e.indexOf(xe)>=0||(Te[xe]=be[xe]);return Te})(ae,ce);if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||Object.prototype.propertyIsEnumerable.call(ae,fe)&&(he[fe]=ae[fe])}return he})(L,WL),ie=K(U()(P,"nav-link",{disabled:Y.disabled,active:te}),T);return u().createElement(V,gp({},Y,{ref:J,onClick:this.onClick,className:ie}))}}])&&YL(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);bE.propTypes=ZL;const XL=bE;var _E=u().createContext({});function mp(i){return mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},mp(i)}function bp(){return bp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},bp.apply(this,arguments)}function wE(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function _p(i,v){return _p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},_p(i,v)}function Sa(i){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Sa(i)}var OE={tag:X,activeTab:k().any,className:k().string,cssModule:k().object},EE=(function(i){(function(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),T&&_p(P,T)})(L,i);var v,b,x,D,B,G=(D=L,B=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var P,T=Sa(D);if(B){var te=Sa(this).constructor;P=Reflect.construct(T,arguments,te)}else P=T.apply(this,arguments);return(function(oe,V){if(V&&(mp(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J})(oe)})(this,P)});function L(P){var T;return(function(te,oe){if(!(te instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,L),(T=G.call(this,P)).state={activeTab:T.props.activeTab},T}return v=L,x=[{key:"getDerivedStateFromProps",value:function(P,T){return T.activeTab!==P.activeTab?{activeTab:P.activeTab}:null}}],(b=[{key:"render",value:function(){var P=this.props,T=P.className,te=P.cssModule,oe=P.tag,V=oe===void 0?"div":oe,J=W(this.props,Object.keys(OE)),Y=K(U()("tab-content",T),te);return u().createElement(_E.Provider,{value:{activeTabId:this.state.activeTab}},u().createElement(V,bp({},J,{className:Y})))}}])&&wE(v.prototype,b),x&&wE(v,x),Object.defineProperty(v,"prototype",{writable:!1}),L})(a.Component);const QL=EE;EE.propTypes=OE;var JL=["className","cssModule","tabId","tag"];function wp(){return wp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},wp.apply(this,arguments)}var eR={tag:X,className:k().string,cssModule:k().object,tabId:k().any};function xE(i){var v=i.className,b=i.cssModule,x=i.tabId,D=i.tag,B=D===void 0?"div":D,G=(function(P,T){if(P==null)return{};var te,oe,V=(function(Y,ie){if(Y==null)return{};var ae,ce,fe={},ve=Object.keys(Y);for(ce=0;ce<ve.length;ce++)ae=ve[ce],ie.indexOf(ae)>=0||(fe[ae]=Y[ae]);return fe})(P,T);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(P);for(oe=0;oe<J.length;oe++)te=J[oe],T.indexOf(te)>=0||Object.prototype.propertyIsEnumerable.call(P,te)&&(V[te]=P[te])}return V})(i,JL),L=function(P){return K(U()("tab-pane",v,{active:x===P}),b)};return u().createElement(_E.Consumer,null,(function(P){var T=P.activeTabId;return u().createElement(B,wp({},G,{className:L(T)}))}))}function SE(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=i[b];return x}xE.propTypes=eR;var kE=function(i){var v=(function(B,G){return(function(L){if(Array.isArray(L))return L})(B)||(function(L,P){var T=L==null?null:typeof Symbol<"u"&&L[Symbol.iterator]||L["@@iterator"];if(T!=null){var te,oe,V,J,Y=[],ie=!0,ae=!1;try{if(V=(T=T.call(L)).next,P!==0)for(;!(ie=(te=V.call(T)).done)&&(Y.push(te.value),Y.length!==P);ie=!0);}catch(ce){ae=!0,oe=ce}finally{try{if(!ie&&T.return!=null&&(J=T.return(),Object(J)!==J))return}finally{if(ae)throw oe}}return Y}})(B,G)||(function(L,P){if(L){if(typeof L=="string")return SE(L,P);var T=Object.prototype.toString.call(L).slice(8,-1);return T==="Object"&&L.constructor&&(T=L.constructor.name),T==="Map"||T==="Set"?Array.from(L):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?SE(L,P):void 0}})(B,G)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,a.useState)(),2),b=v[0],x=v[1];(0,a.useEffect)((function(){x(i.activeTab)}),[i.activeTab]);var D=i.tabs.filter((function(B){return!B.hideTab}));return u().createElement("div",null,u().createElement("div",{className:"container-md"},u().createElement(VL,{tabs:!0},D.map((function(B){return u().createElement(KL,{key:B.key},u().createElement(XL,{className:b===B.key?"active":"",onClick:function(){i.onChange(B.key),(function(G){b!==G&&x(G)})(B.key)}},B.label,i.enableTabClose&&u().createElement(lr,{noText:!0,color:"icon",style:{marginRight:"-0.75rem"},icon:"fas fa-times",onClick:function(G){i.onClose(B.key),G.stopPropagation()}})))})))),u().createElement(QL,{activeTab:b,className:"border-top"},D.map((function(B){return u().createElement(xE,{tabId:B.key,key:B.key},b===B.key?B.content:null)}))))};kE.defaultProps={onChange:function(){},enableTabClose:!1,onClose:function(){}};const tR=kE;var ka=l(525),Gr={};Gr.styleTagTransform=sr(),Gr.setAttributes=Dr(),Gr.insert=Rr().bind(null,"head"),Gr.domAPI=Lr(),Gr.insertStyleElement=jr(),qr()(ka.Z,Gr),ka.Z&&ka.Z.locals&&ka.Z.locals;var NE=function(i){return u().createElement("section",{className:"keyval__wrapper"},u().createElement("span",{className:"keyval__label",style:{minWidth:i.labelWidth}},i.label),u().createElement("ul",{className:"keyval__list"},i.items.map((function(v){return u().createElement("li",{key:String(v),className:"keyval__item"},v)}))))};NE.defaultProps={labelWidth:100};const nR=NE,Na=Array.isArray||function(i){return i!=null&&i.length>=0&&Object.prototype.toString.call(i)==="[object Array]"};function TE(i,v,b){return function(){if(arguments.length===0)return b();var x=arguments[arguments.length-1];if(!Na(x)){for(var D=0;D<i.length;){if(typeof x[i[D]]=="function")return x[i[D]].apply(x,Array.prototype.slice.call(arguments,0,-1));D+=1}if((function(B){return B!=null&&typeof B["@@transducer/step"]=="function"})(x))return v.apply(null,Array.prototype.slice.call(arguments,0,-1))(x)}return b.apply(this,arguments)}}const CE=function(){return this.xf["@@transducer/init"]()};function ct(i){return i!=null&&typeof i=="object"&&i["@@functional/placeholder"]===!0}function Mt(i){return function v(b){return arguments.length===0||ct(b)?v:i.apply(this,arguments)}}function en(i){return function v(b,x){switch(arguments.length){case 0:return v;case 1:return ct(b)?v:Mt((function(D){return i(b,D)}));default:return ct(b)&&ct(x)?v:ct(b)?Mt((function(D){return i(D,x)})):ct(x)?Mt((function(D){return i(b,D)})):i(b,x)}}}function AE(i){for(var v,b=[];!(v=i.next()).done;)b.push(v.value);return b}function PE(i,v,b){for(var x=0,D=b.length;x<D;){if(i(v,b[x]))return!0;x+=1}return!1}function Kr(i,v){return Object.prototype.hasOwnProperty.call(v,i)}const Op=typeof Object.is=="function"?Object.is:function(i,v){return i===v?i!==0||1/i==1/v:i!=i&&v!=v};var IE=Object.prototype.toString;const ME=(function(){return IE.call(arguments)==="[object Arguments]"?function(i){return IE.call(i)==="[object Arguments]"}:function(i){return Kr("callee",i)}})();var rR=!{toString:null}.propertyIsEnumerable("toString"),qE=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],LE=(function(){return arguments.propertyIsEnumerable("length")})(),oR=function(i,v){for(var b=0;b<i.length;){if(i[b]===v)return!0;b+=1}return!1};const RE=Mt(typeof Object.keys!="function"||LE?(function(i){if(Object(i)!==i)return[];var v,b,x=[],D=LE&&ME(i);for(v in i)!Kr(v,i)||D&&v==="length"||(x[x.length]=v);if(rR)for(b=qE.length-1;b>=0;)Kr(v=qE[b],i)&&!oR(x,v)&&(x[x.length]=v),b-=1;return x}):(function(i){return Object(i)!==i?[]:Object.keys(i)})),Ep=Mt((function(i){return i===null?"Null":i===void 0?"Undefined":Object.prototype.toString.call(i).slice(8,-1)}));function DE(i,v,b,x){var D=AE(i);function B(G,L){return xp(G,L,b.slice(),x.slice())}return!PE((function(G,L){return!PE(B,L,G)}),AE(v),D)}function xp(i,v,b,x){if(Op(i,v))return!0;var D,B,G=Ep(i);if(G!==Ep(v))return!1;if(typeof i["fantasy-land/equals"]=="function"||typeof v["fantasy-land/equals"]=="function")return typeof i["fantasy-land/equals"]=="function"&&i["fantasy-land/equals"](v)&&typeof v["fantasy-land/equals"]=="function"&&v["fantasy-land/equals"](i);if(typeof i.equals=="function"||typeof v.equals=="function")return typeof i.equals=="function"&&i.equals(v)&&typeof v.equals=="function"&&v.equals(i);switch(G){case"Arguments":case"Array":case"Object":if(typeof i.constructor=="function"&&(D=i.constructor,((B=String(D).match(/^function (\w*)/))==null?"":B[1])==="Promise"))return i===v;break;case"Boolean":case"Number":case"String":if(typeof i!=typeof v||!Op(i.valueOf(),v.valueOf()))return!1;break;case"Date":if(!Op(i.valueOf(),v.valueOf()))return!1;break;case"Error":return i.name===v.name&&i.message===v.message;case"RegExp":if(i.source!==v.source||i.global!==v.global||i.ignoreCase!==v.ignoreCase||i.multiline!==v.multiline||i.sticky!==v.sticky||i.unicode!==v.unicode)return!1}for(var L=b.length-1;L>=0;){if(b[L]===i)return x[L]===v;L-=1}switch(G){case"Map":return i.size===v.size&&DE(i.entries(),v.entries(),b.concat([i]),x.concat([v]));case"Set":return i.size===v.size&&DE(i.values(),v.values(),b.concat([i]),x.concat([v]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var P=RE(i);if(P.length!==RE(v).length)return!1;var T=b.concat([i]),te=x.concat([v]);for(L=P.length-1;L>=0;){var oe=P[L];if(!Kr(oe,v)||!xp(v[oe],i[oe],T,te))return!1;L-=1}return!0}const jE=en((function(i,v){return xp(i,v,[],[])}));function FE(i,v){switch(i){case 0:return function(){return v.apply(this,arguments)};case 1:return function(b){return v.apply(this,arguments)};case 2:return function(b,x){return v.apply(this,arguments)};case 3:return function(b,x,D){return v.apply(this,arguments)};case 4:return function(b,x,D,B){return v.apply(this,arguments)};case 5:return function(b,x,D,B,G){return v.apply(this,arguments)};case 6:return function(b,x,D,B,G,L){return v.apply(this,arguments)};case 7:return function(b,x,D,B,G,L,P){return v.apply(this,arguments)};case 8:return function(b,x,D,B,G,L,P,T){return v.apply(this,arguments)};case 9:return function(b,x,D,B,G,L,P,T,te){return v.apply(this,arguments)};case 10:return function(b,x,D,B,G,L,P,T,te,oe){return v.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function BE(i,v,b){return function(){for(var x=[],D=0,B=i,G=0;G<v.length||D<arguments.length;){var L;G<v.length&&(!ct(v[G])||D>=arguments.length)?L=v[G]:(L=arguments[D],D+=1),x[G]=L,ct(L)||(B-=1),G+=1}return B<=0?b.apply(this,x):FE(B,BE(i,x,b))}}const iR=Number.isInteger||function(i){return i<<0===i};function Sp(i){return Object.prototype.toString.call(i)==="[object String]"}const aR=en((function(i,v){var b=i<0?v.length+i:i;return Sp(v)?v.charAt(b):v[b]})),sR=en((function(i,v){if(v!=null)return iR(i)?aR(i,v):v[i]}));function lR(i){return function v(b,x,D){switch(arguments.length){case 0:return v;case 1:return ct(b)?v:en((function(B,G){return i(b,B,G)}));case 2:return ct(b)&&ct(x)?v:ct(b)?en((function(B,G){return i(B,x,G)})):ct(x)?en((function(B,G){return i(b,B,G)})):Mt((function(B){return i(b,x,B)}));default:return ct(b)&&ct(x)&&ct(D)?v:ct(b)&&ct(x)?en((function(B,G){return i(B,G,D)})):ct(b)&&ct(D)?en((function(B,G){return i(B,x,G)})):ct(x)&&ct(D)?en((function(B,G){return i(b,B,G)})):ct(b)?Mt((function(B){return i(B,x,D)})):ct(x)?Mt((function(B){return i(b,B,D)})):ct(D)?Mt((function(B){return i(b,x,B)})):i(b,x,D)}}}const uR=Mt((function(i){return!!Na(i)||!!i&&typeof i=="object"&&!Sp(i)&&(i.length===0||i.length>0&&i.hasOwnProperty(0)&&i.hasOwnProperty(i.length-1))}));var zE=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function cR(i,v,b){return function(x,D,B){if(uR(B))return i(x,D,B);if(B==null)return D;if(typeof B["fantasy-land/reduce"]=="function")return v(x,D,B,"fantasy-land/reduce");if(B[zE]!=null)return b(x,D,B[zE]());if(typeof B.next=="function")return b(x,D,B);if(typeof B.reduce=="function")return v(x,D,B,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function fR(i,v,b){for(var x=0,D=b.length;x<D;){if((v=i["@@transducer/step"](v,b[x]))&&v["@@transducer/reduced"]){v=v["@@transducer/value"];break}x+=1}return i["@@transducer/result"](v)}const dR=en((function(i,v){return FE(i.length,(function(){return i.apply(v,arguments)}))}));function hR(i,v,b){for(var x=b.next();!x.done;){if((v=i["@@transducer/step"](v,x.value))&&v["@@transducer/reduced"]){v=v["@@transducer/value"];break}x=b.next()}return i["@@transducer/result"](v)}function pR(i,v,b,x){return i["@@transducer/result"](b[x](dR(i["@@transducer/step"],i),v))}const vR=cR(fR,pR,hR);var gR=(function(){function i(v){this.f=v}return i.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},i.prototype["@@transducer/result"]=function(v){return v},i.prototype["@@transducer/step"]=function(v,b){return this.f(v,b)},i})();function Ta(i,v,b){if(b||(b=new yR),D=typeof(x=i),x==null||D!="object"&&D!="function")return i;var x,D,B,G=function(L){var P=b.get(i);if(P)return P;for(var T in b.set(i,L),i)Object.prototype.hasOwnProperty.call(i,T)&&(L[T]=v?Ta(i[T],!0,b):i[T]);return L};switch(Ep(i)){case"Object":return G(Object.create(Object.getPrototypeOf(i)));case"Array":return G([]);case"Date":return new Date(i.valueOf());case"RegExp":return B=i,new RegExp(B.source,B.flags?B.flags:(B.global?"g":"")+(B.ignoreCase?"i":"")+(B.multiline?"m":"")+(B.sticky?"y":"")+(B.unicode?"u":"")+(B.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return i.slice();default:return i}}var yR=(function(){function i(){this.map={},this.length=0}return i.prototype.set=function(v,b){const x=this.hash(v);let D=this.map[x];D||(this.map[x]=D=[]),D.push([v,b]),this.length+=1},i.prototype.hash=function(v){let b=[];for(var x in v)b.push(Object.prototype.toString.call(v[x]));return b.join()},i.prototype.get=function(v){if(this.length<=180){for(const D in this.map){const B=this.map[D];for(let G=0;G<B.length;G+=1){const L=B[G];if(L[0]===v)return L[1]}}return}const b=this.hash(v),x=this.map[b];if(x)for(let D=0;D<x.length;D+=1){const B=x[D];if(B[0]===v)return B[1]}},i})();const mR=Mt((function(i){return i!=null&&typeof i.clone=="function"?i.clone():Ta(i,!0)}));function bR(i,v){return function(){var b=arguments.length;if(b===0)return v();var x=arguments[b-1];return Na(x)||typeof x[i]!="function"?v.apply(this,arguments):x[i].apply(x,Array.prototype.slice.call(arguments,0,b-1))}}function $E(i){return i&&i["@@transducer/reduced"]?i:{"@@transducer/value":i,"@@transducer/reduced":!0}}var _R=(function(){function i(v,b,x,D){this.valueFn=v,this.valueAcc=b,this.keyFn=x,this.xf=D,this.inputs={}}return i.prototype["@@transducer/init"]=CE,i.prototype["@@transducer/result"]=function(v){var b;for(b in this.inputs)if(Kr(b,this.inputs)&&(v=this.xf["@@transducer/step"](v,this.inputs[b]))["@@transducer/reduced"]){v=v["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](v)},i.prototype["@@transducer/step"]=function(v,b){var x=this.keyFn(b);return this.inputs[x]=this.inputs[x]||[x,Ta(this.valueAcc,!1)],this.inputs[x][1]=this.valueFn(this.inputs[x][1],b),v},i})();function wR(i,v,b){return function(x){return new _R(i,v,b,x)}}const OR=BE(4,[],TE([],wR,(function(i,v,b,x){var D=new gR((function(B,G){var L=b(G),P=i(Kr(L,B)?B[L]:Ta(v,!1),G);return P&&P["@@transducer/reduced"]?$E(B):(B[L]=P,B)}));return vR(D,{},x)}))),ER=Mt((function(i){return i!=null&&typeof i["fantasy-land/empty"]=="function"?i["fantasy-land/empty"]():i!=null&&i.constructor!=null&&typeof i.constructor["fantasy-land/empty"]=="function"?i.constructor["fantasy-land/empty"]():i!=null&&typeof i.empty=="function"?i.empty():i!=null&&i.constructor!=null&&typeof i.constructor.empty=="function"?i.constructor.empty():Na(i)?[]:Sp(i)?"":(function(x){return Object.prototype.toString.call(x)==="[object Object]"})(i)?{}:ME(i)?(function(){return arguments})():(v=i,(b=Object.prototype.toString.call(v))==="[object Uint8ClampedArray]"||b==="[object Int8Array]"||b==="[object Uint8Array]"||b==="[object Int16Array]"||b==="[object Uint16Array]"||b==="[object Int32Array]"||b==="[object Uint32Array]"||b==="[object Float32Array]"||b==="[object Float64Array]"||b==="[object BigInt64Array]"||b==="[object BigUint64Array]"?i.constructor.from(""):void 0);var v,b}));var xR=(function(){function i(v,b){this.xf=b,this.f=v,this.found=!1}return i.prototype["@@transducer/init"]=CE,i.prototype["@@transducer/result"]=function(v){return this.found||(v=this.xf["@@transducer/step"](v,void 0)),this.xf["@@transducer/result"](v)},i.prototype["@@transducer/step"]=function(v,b){return this.f(b)&&(this.found=!0,v=$E(this.xf["@@transducer/step"](v,b))),v},i})();function SR(i){return function(v){return new xR(i,v)}}const Ca=en(TE(["find"],SR,(function(i,v){for(var b=0,x=v.length;b<x;){if(i(v[b]))return v[b];b+=1}}))),kR=en(bR("groupBy",OR((function(i,v){return i.push(v),i}),[]))),HE=Mt((function(i){return i!=null&&jE(i,ER(i))})),kp=Mt((function(i){return i==null})),Aa=lR((function(i,v,b){return jE(i,sR(v,b))}));var NR=["className","cssModule","color","innerRef","pill","tag"];function Np(){return Np=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Np.apply(this,arguments)}var TR={children:k().node,className:k().string,color:k().string,cssModule:k().object,innerRef:k().oneOfType([k().object,k().func,k().string]),pill:k().bool,tag:X};function VE(i){var v=i.className,b=i.cssModule,x=i.color,D=x===void 0?"secondary":x,B=i.innerRef,G=i.pill,L=G!==void 0&&G,P=i.tag,T=P===void 0?"span":P,te=(function(V,J){if(V==null)return{};var Y,ie,ae=(function(fe,ve){if(fe==null)return{};var he,ye,be={},_e=Object.keys(fe);for(ye=0;ye<_e.length;ye++)he=_e[ye],ve.indexOf(he)>=0||(be[he]=fe[he]);return be})(V,J);if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(V);for(ie=0;ie<ce.length;ie++)Y=ce[ie],J.indexOf(Y)>=0||Object.prototype.propertyIsEnumerable.call(V,Y)&&(ae[Y]=V[Y])}return ae})(i,NR),oe=K(U()(v,"badge","bg-"+D,!!L&&"rounded-pill"),b);return te.href&&T==="span"&&(T="a"),u().createElement(T,Np({},te,{className:oe,ref:B}))}VE.propTypes=TR;const UE=VE;function Tp(i){return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},Tp(i)}var CR=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Cp(){return Cp=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Cp.apply(this,arguments)}function AR(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,x.key,x)}}function Ap(i,v){return Ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,x){return b.__proto__=x,b},Ap(i,v)}function Pp(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Pa(i){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Pa(i)}var PR={children:k().node,type:k().string,size:k().oneOfType([k().number,k().string]),bsSize:k().string,valid:k().bool,invalid:k().bool,tag:X,innerRef:k().oneOfType([k().object,k().func,k().string]),plaintext:k().bool,addon:k().bool,className:k().string,cssModule:k().object},GE=(function(i){(function(L,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(P&&P.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),Object.defineProperty(L,"prototype",{writable:!1}),P&&Ap(L,P)})(G,i);var v,b,x,D,B=(x=G,D=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var L,P=Pa(x);if(D){var T=Pa(this).constructor;L=Reflect.construct(P,arguments,T)}else L=P.apply(this,arguments);return(function(te,oe){if(oe&&(Tp(oe)==="object"||typeof oe=="function"))return oe;if(oe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pp(te)})(this,L)});function G(L){var P;return(function(T,te){if(!(T instanceof te))throw new TypeError("Cannot call a class as a function")})(this,G),(P=B.call(this,L)).getRef=P.getRef.bind(Pp(P)),P.focus=P.focus.bind(Pp(P)),P}return v=G,b=[{key:"getRef",value:function(L){this.props.innerRef&&this.props.innerRef(L),this.ref=L}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var L=this.props,P=L.className,T=L.cssModule,te=L.type,oe=te===void 0?"text":te,V=L.bsSize,J=L.valid,Y=L.invalid,ie=L.tag,ae=L.addon,ce=L.plaintext,fe=L.innerRef,ve=(function(Te,De){if(Te==null)return{};var Le,Re,He=(function(Ue,at){if(Ue==null)return{};var Qe,ut,tt={},dt=Object.keys(Ue);for(ut=0;ut<dt.length;ut++)Qe=dt[ut],at.indexOf(Qe)>=0||(tt[Qe]=Ue[Qe]);return tt})(Te,De);if(Object.getOwnPropertySymbols){var Ve=Object.getOwnPropertySymbols(Te);for(Re=0;Re<Ve.length;Re++)Le=Ve[Re],De.indexOf(Le)>=0||Object.prototype.propertyIsEnumerable.call(Te,Le)&&(He[Le]=Te[Le])}return He})(L,CR),he=["switch","radio","checkbox"].indexOf(oe)>-1,ye=oe==="select",be=oe==="range",_e=ie||(ye||oe==="textarea"?oe:"input"),xe="form-control";ce?(xe="".concat(xe,"-plaintext"),_e=ie||"input"):be?xe="form-range":ye?xe="form-select":he&&(xe=ae?null:"form-check-input"),ve.size&&/\D/g.test(ve.size)&&(Q(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),V=ve.size,delete ve.size);var Me=K(U()(P,Y&&"is-invalid",J&&"is-valid",!!V&&(ye?"form-select-".concat(V):"form-control-".concat(V)),xe),T);return(_e==="input"||ie&&typeof ie=="function")&&(ve.type=oe==="switch"?"checkbox":oe),ve.children&&!ce&&oe!=="select"&&typeof _e=="string"&&_e!=="select"&&(Q('Input with a type of "'.concat(oe,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete ve.children),u().createElement(_e,Cp({},ve,{ref:fe,className:Me,"aria-invalid":Y}))}}],b&&AR(v.prototype,b),Object.defineProperty(v,"prototype",{writable:!1}),G})(u().Component);GE.propTypes=PR;const Wr=GE;var IR=["className","cssModule","valid","tooltip","tag"];function Ip(){return Ip=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Ip.apply(this,arguments)}var MR={children:k().node,tag:X,className:k().string,cssModule:k().object,valid:k().bool,tooltip:k().bool};function KE(i){var v=i.className,b=i.cssModule,x=i.valid,D=x===void 0?void 0:x,B=i.tooltip,G=i.tag,L=G===void 0?"div":G,P=(function(oe,V){if(oe==null)return{};var J,Y,ie=(function(ce,fe){if(ce==null)return{};var ve,he,ye={},be=Object.keys(ce);for(he=0;he<be.length;he++)ve=be[he],fe.indexOf(ve)>=0||(ye[ve]=ce[ve]);return ye})(oe,V);if(Object.getOwnPropertySymbols){var ae=Object.getOwnPropertySymbols(oe);for(Y=0;Y<ae.length;Y++)J=ae[Y],V.indexOf(J)>=0||Object.prototype.propertyIsEnumerable.call(oe,J)&&(ie[J]=oe[J])}return ie})(i,IR),T=B?"tooltip":"feedback",te=K(U()(v,D?"valid-".concat(T):"invalid-".concat(T)),b);return u().createElement(L,Ip({},P,{className:te}))}KE.propTypes=MR;const Go=KE;function Be(){return Be=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Be.apply(this,arguments)}function dr(i){return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},dr(i)}function WE(i){var v=(function(b,x){if(dr(b)!=="object"||b===null)return b;var D=b[Symbol.toPrimitive];if(D!==void 0){var B=D.call(b,"string");if(dr(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)})(i);return dr(v)==="symbol"?v:String(v)}function Ko(i,v,b){return(v=WE(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}function YE(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function Fe(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?YE(Object(b),!0).forEach((function(x){Ko(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):YE(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function ZE(i,v){for(var b=0;b<v.length;b++){var x=v[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(i,WE(x.key),x)}}function Ia(i){return Ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},Ia(i)}function Mp(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function qp(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=i[b];return x}function XE(i,v){if(i){if(typeof i=="string")return qp(i,v);var b=Object.prototype.toString.call(i).slice(8,-1);return b==="Object"&&i.constructor&&(b=i.constructor.name),b==="Map"||b==="Set"?Array.from(i):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?qp(i,v):void 0}}function Wo(i){return(function(v){if(Array.isArray(v))return qp(v)})(i)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(i)||XE(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var qR=(function(){function i(b){var x=this;this._insertTag=function(D){var B;B=x.tags.length===0?x.insertionPoint?x.insertionPoint.nextSibling:x.prepend?x.container.firstChild:x.before:x.tags[x.tags.length-1].nextSibling,x.container.insertBefore(D,B),x.tags.push(D)},this.isSpeedy=b.speedy===void 0||b.speedy,this.tags=[],this.ctr=0,this.nonce=b.nonce,this.key=b.key,this.container=b.container,this.prepend=b.prepend,this.insertionPoint=b.insertionPoint,this.before=null}var v=i.prototype;return v.hydrate=function(b){b.forEach(this._insertTag)},v.insert=function(b){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((function(B){var G=document.createElement("style");return G.setAttribute("data-emotion",B.key),B.nonce!==void 0&&G.setAttribute("nonce",B.nonce),G.appendChild(document.createTextNode("")),G.setAttribute("data-s",""),G})(this));var x=this.tags[this.tags.length-1];if(this.isSpeedy){var D=(function(B){if(B.sheet)return B.sheet;for(var G=0;G<document.styleSheets.length;G++)if(document.styleSheets[G].ownerNode===B)return document.styleSheets[G]})(x);try{D.insertRule(b,D.cssRules.length)}catch{}}else x.appendChild(document.createTextNode(b));this.ctr++},v.flush=function(){this.tags.forEach((function(b){return b.parentNode&&b.parentNode.removeChild(b)})),this.tags=[],this.ctr=0},i})(),LR=Math.abs,Ma=String.fromCharCode,RR=Object.assign;function QE(i){return i.trim()}function Je(i,v,b){return i.replace(v,b)}function Lp(i,v){return i.indexOf(v)}function Ct(i,v){return 0|i.charCodeAt(v)}function Yo(i,v,b){return i.slice(v,b)}function mn(i){return i.length}function Rp(i){return i.length}function qa(i,v){return v.push(i),i}var La=1,Yr=1,JE=0,Bt=0,mt=0,Zr="";function Ra(i,v,b,x,D,B,G){return{value:i,root:v,parent:b,type:x,props:D,children:B,line:La,column:Yr,length:G,return:""}}function Zo(i,v){return RR(Ra("",null,null,"",null,null,0),i,{length:-i.length},v)}function DR(){return mt=Bt>0?Ct(Zr,--Bt):0,Yr--,mt===10&&(Yr=1,La--),mt}function Ht(){return mt=Bt<JE?Ct(Zr,Bt++):0,Yr++,mt===10&&(Yr=1,La++),mt}function bn(){return Ct(Zr,Bt)}function Da(){return Bt}function Xo(i,v){return Yo(Zr,i,v)}function Qo(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ex(i){return La=Yr=1,JE=mn(Zr=i),Bt=0,[]}function tx(i){return Zr="",i}function ja(i){return QE(Xo(Bt-1,Dp(i===91?i+2:i===40?i+1:i)))}function jR(i){for(;(mt=bn())&&mt<33;)Ht();return Qo(i)>2||Qo(mt)>3?"":" "}function FR(i,v){for(;--v&&Ht()&&!(mt<48||mt>102||mt>57&&mt<65||mt>70&&mt<97););return Xo(i,Da()+(v<6&&bn()==32&&Ht()==32))}function Dp(i){for(;Ht();)switch(mt){case i:return Bt;case 34:case 39:i!==34&&i!==39&&Dp(mt);break;case 40:i===41&&Dp(i);break;case 92:Ht()}return Bt}function BR(i,v){for(;Ht()&&i+mt!==57&&(i+mt!==84||bn()!==47););return"/*"+Xo(v,Bt-1)+"*"+Ma(i===47?i:Ht())}function zR(i){for(;!Qo(bn());)Ht();return Xo(i,Bt)}var At="-ms-",nx="-moz-",et="-webkit-",rx="comm",jp="rule",Fp="decl",ox="@keyframes";function Xr(i,v){for(var b="",x=Rp(i),D=0;D<x;D++)b+=v(i[D],D,i,v)||"";return b}function $R(i,v,b,x){switch(i.type){case"@layer":if(i.children.length)break;case"@import":case Fp:return i.return=i.return||i.value;case rx:return"";case ox:return i.return=i.value+"{"+Xr(i.children,x)+"}";case jp:i.value=i.props.join(",")}return mn(b=Xr(i.children,x))?i.return=i.value+"{"+b+"}":""}function HR(i){return tx(Fa("",null,null,null,[""],i=ex(i),0,[0],i))}function Fa(i,v,b,x,D,B,G,L,P){for(var T=0,te=0,oe=G,V=0,J=0,Y=0,ie=1,ae=1,ce=1,fe=0,ve="",he=D,ye=B,be=x,_e=ve;ae;)switch(Y=fe,fe=Ht()){case 40:if(Y!=108&&Ct(_e,oe-1)==58){Lp(_e+=Je(ja(fe),"&","&\f"),"&\f")!=-1&&(ce=-1);break}case 34:case 39:case 91:_e+=ja(fe);break;case 9:case 10:case 13:case 32:_e+=jR(Y);break;case 92:_e+=FR(Da()-1,7);continue;case 47:switch(bn()){case 42:case 47:qa(VR(BR(Ht(),Da()),v,b),P);break;default:_e+="/"}break;case 123*ie:L[T++]=mn(_e)*ce;case 125*ie:case 59:case 0:switch(fe){case 0:case 125:ae=0;case 59+te:ce==-1&&(_e=Je(_e,/\f/g,"")),J>0&&mn(_e)-oe&&qa(J>32?ax(_e+";",x,b,oe-1):ax(Je(_e," ","")+";",x,b,oe-2),P);break;case 59:_e+=";";default:if(qa(be=ix(_e,v,b,T,te,D,L,ve,he=[],ye=[],oe),B),fe===123)if(te===0)Fa(_e,v,be,be,he,B,oe,L,ye);else switch(V===99&&Ct(_e,3)===110?100:V){case 100:case 108:case 109:case 115:Fa(i,be,be,x&&qa(ix(i,be,be,0,0,D,L,ve,D,he=[],oe),ye),D,ye,oe,L,x?he:ye);break;default:Fa(_e,be,be,be,[""],ye,0,L,ye)}}T=te=J=0,ie=ce=1,ve=_e="",oe=G;break;case 58:oe=1+mn(_e),J=Y;default:if(ie<1){if(fe==123)--ie;else if(fe==125&&ie++==0&&DR()==125)continue}switch(_e+=Ma(fe),fe*ie){case 38:ce=te>0?1:(_e+="\f",-1);break;case 44:L[T++]=(mn(_e)-1)*ce,ce=1;break;case 64:bn()===45&&(_e+=ja(Ht())),V=bn(),te=oe=mn(ve=_e+=zR(Da())),fe++;break;case 45:Y===45&&mn(_e)==2&&(ie=0)}}return B}function ix(i,v,b,x,D,B,G,L,P,T,te){for(var oe=D-1,V=D===0?B:[""],J=Rp(V),Y=0,ie=0,ae=0;Y<x;++Y)for(var ce=0,fe=Yo(i,oe+1,oe=LR(ie=G[Y])),ve=i;ce<J;++ce)(ve=QE(ie>0?V[ce]+" "+fe:Je(fe,/&\f/g,V[ce])))&&(P[ae++]=ve);return Ra(i,v,b,D===0?jp:L,P,T,te)}function VR(i,v,b){return Ra(i,v,b,rx,Ma(mt),Yo(i,2,-2),0)}function ax(i,v,b,x){return Ra(i,v,b,Fp,Yo(i,0,x),Yo(i,x+1,-1),x)}var UR=function(i,v,b){for(var x=0,D=0;x=D,D=bn(),x===38&&D===12&&(v[b]=1),!Qo(D);)Ht();return Xo(i,Bt)},sx=new WeakMap,GR=function(i){if(i.type==="rule"&&i.parent&&!(i.length<1)){for(var v=i.value,b=i.parent,x=i.column===b.column&&i.line===b.line;b.type!=="rule";)if(!(b=b.parent))return;if((i.props.length!==1||v.charCodeAt(0)===58||sx.get(b))&&!x){sx.set(i,!0);for(var D=[],B=(function(te,oe){return tx((function(V,J){var Y=-1,ie=44;do switch(Qo(ie)){case 0:ie===38&&bn()===12&&(J[Y]=1),V[Y]+=UR(Bt-1,J,Y);break;case 2:V[Y]+=ja(ie);break;case 4:if(ie===44){V[++Y]=bn()===58?"&\f":"",J[Y]=V[Y].length;break}default:V[Y]+=Ma(ie)}while(ie=Ht());return V})(ex(te),oe))})(v,D),G=b.props,L=0,P=0;L<B.length;L++)for(var T=0;T<G.length;T++,P++)i.props[P]=D[L]?B[L].replace(/&\f/g,G[T]):G[T]+" "+B[L]}}},KR=function(i){if(i.type==="decl"){var v=i.value;v.charCodeAt(0)===108&&v.charCodeAt(2)===98&&(i.return="",i.value="")}};function lx(i,v){switch((function(b,x){return 45^Ct(b,0)?(((x<<2^Ct(b,0))<<2^Ct(b,1))<<2^Ct(b,2))<<2^Ct(b,3):0})(i,v)){case 5103:return et+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return et+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return et+i+nx+i+At+i+i;case 6828:case 4268:return et+i+At+i+i;case 6165:return et+i+At+"flex-"+i+i;case 5187:return et+i+Je(i,/(\w+).+(:[^]+)/,et+"box-$1$2"+At+"flex-$1$2")+i;case 5443:return et+i+At+"flex-item-"+Je(i,/flex-|-self/,"")+i;case 4675:return et+i+At+"flex-line-pack"+Je(i,/align-content|flex-|-self/,"")+i;case 5548:return et+i+At+Je(i,"shrink","negative")+i;case 5292:return et+i+At+Je(i,"basis","preferred-size")+i;case 6060:return et+"box-"+Je(i,"-grow","")+et+i+At+Je(i,"grow","positive")+i;case 4554:return et+Je(i,/([^-])(transform)/g,"$1"+et+"$2")+i;case 6187:return Je(Je(Je(i,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),i,"")+i;case 5495:case 3959:return Je(i,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return Je(Je(i,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+At+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+i+i;case 4095:case 3583:case 4068:case 2532:return Je(i,/(.+)-inline(.+)/,et+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(mn(i)-1-v>6)switch(Ct(i,v+1)){case 109:if(Ct(i,v+4)!==45)break;case 102:return Je(i,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+nx+(Ct(i,v+3)==108?"$3":"$2-$3"))+i;case 115:return~Lp(i,"stretch")?lx(Je(i,"stretch","fill-available"),v)+i:i}break;case 4949:if(Ct(i,v+1)!==115)break;case 6444:switch(Ct(i,mn(i)-3-(~Lp(i,"!important")&&10))){case 107:return Je(i,":",":"+et)+i;case 101:return Je(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(Ct(i,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+At+"$2box$3")+i}break;case 5936:switch(Ct(i,v+11)){case 114:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return et+i+At+Je(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return et+i+At+i+i}return i}var WR=[function(i,v,b,x){if(i.length>-1&&!i.return)switch(i.type){case Fp:i.return=lx(i.value,i.length);break;case ox:return Xr([Zo(i,{value:Je(i.value,"@","@"+et)})],x);case jp:if(i.length)return(function(D,B){return D.map(B).join("")})(i.props,(function(D){switch((function(B,G){return(B=/(::plac\w+|:read-\w+)/.exec(B))?B[0]:B})(D)){case":read-only":case":read-write":return Xr([Zo(i,{props:[Je(D,/:(read-\w+)/,":-moz-$1")]})],x);case"::placeholder":return Xr([Zo(i,{props:[Je(D,/:(plac\w+)/,":"+et+"input-$1")]}),Zo(i,{props:[Je(D,/:(plac\w+)/,":-moz-$1")]}),Zo(i,{props:[Je(D,/:(plac\w+)/,At+"input-$1")]})],x)}return""}))}}],YR=function(i){var v=i.key;if(v==="css"){var b=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(b,(function(ie){ie.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(ie),ie.setAttribute("data-s",""))}))}var x,D,B=i.stylisPlugins||WR,G={},L=[];x=i.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+v+' "]'),(function(ie){for(var ae=ie.getAttribute("data-emotion").split(" "),ce=1;ce<ae.length;ce++)G[ae[ce]]=!0;L.push(ie)}));var P,T,te,oe,V=[$R,(T=function(ie){P.insert(ie)},function(ie){ie.root||(ie=ie.return)&&T(ie)})],J=(te=[GR,KR].concat(B,V),oe=Rp(te),function(ie,ae,ce,fe){for(var ve="",he=0;he<oe;he++)ve+=te[he](ie,ae,ce,fe)||"";return ve});D=function(ie,ae,ce,fe){P=ce,Xr(HR(ie?ie+"{"+ae.styles+"}":ae.styles),J),fe&&(Y.inserted[ae.name]=!0)};var Y={key:v,sheet:new qR({key:v,container:x,nonce:i.nonce,speedy:i.speedy,prepend:i.prepend,insertionPoint:i.insertionPoint}),nonce:i.nonce,inserted:G,registered:{},insert:D};return Y.sheet.hydrate(L),Y},ux=function(i,v,b){var x=i.key+"-"+v.name;b===!1&&i.registered[x]===void 0&&(i.registered[x]=v.styles)},ZR={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function XR(i){var v=Object.create(null);return function(b){return v[b]===void 0&&(v[b]=i(b)),v[b]}}var QR=/[A-Z]|^ms/g,JR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cx=function(i){return i.charCodeAt(1)===45},fx=function(i){return i!=null&&typeof i!="boolean"},Bp=XR((function(i){return cx(i)?i:i.replace(QR,"-$&").toLowerCase()})),dx=function(i,v){switch(i){case"animation":case"animationName":if(typeof v=="string")return v.replace(JR,(function(b,x,D){return _n={name:x,styles:D,next:_n},x}))}return ZR[i]===1||cx(i)||typeof v!="number"||v===0?v:v+"px"};function Jo(i,v,b){if(b==null)return"";if(b.__emotion_styles!==void 0)return b;switch(typeof b){case"boolean":return"";case"object":if(b.anim===1)return _n={name:b.name,styles:b.styles,next:_n},b.name;if(b.styles!==void 0){var x=b.next;if(x!==void 0)for(;x!==void 0;)_n={name:x.name,styles:x.styles,next:_n},x=x.next;return b.styles+";"}return(function(G,L,P){var T="";if(Array.isArray(P))for(var te=0;te<P.length;te++)T+=Jo(G,L,P[te])+";";else for(var oe in P){var V=P[oe];if(typeof V!="object")fx(V)&&(T+=Bp(oe)+":"+dx(oe,V)+";");else if(!Array.isArray(V)||typeof V[0]!="string"||L!=null){var J=Jo(G,L,V);switch(oe){case"animation":case"animationName":T+=Bp(oe)+":"+J+";";break;default:T+=oe+"{"+J+"}"}}else for(var Y=0;Y<V.length;Y++)fx(V[Y])&&(T+=Bp(oe)+":"+dx(oe,V[Y])+";")}return T})(i,v,b);case"function":if(i!==void 0){var D=_n,B=b(i);return _n=D,Jo(i,v,B)}}return b}var _n,hx=/label:\s*([^\s;\n{]+)\s*(;|$)/g,px=function(i,v,b){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var x=!0,D="";_n=void 0;var B=i[0];B==null||B.raw===void 0?(x=!1,D+=Jo(b,v,B)):D+=B[0];for(var G=1;G<i.length;G++)D+=Jo(b,v,i[G]),x&&(D+=B[G]);hx.lastIndex=0;for(var L,P="";(L=hx.exec(D))!==null;)P+="-"+L[1];var T=(function(te){for(var oe,V=0,J=0,Y=te.length;Y>=4;++J,Y-=4)oe=1540483477*(65535&(oe=255&te.charCodeAt(J)|(255&te.charCodeAt(++J))<<8|(255&te.charCodeAt(++J))<<16|(255&te.charCodeAt(++J))<<24))+(59797*(oe>>>16)<<16),V=1540483477*(65535&(oe^=oe>>>24))+(59797*(oe>>>16)<<16)^1540483477*(65535&V)+(59797*(V>>>16)<<16);switch(Y){case 3:V^=(255&te.charCodeAt(J+2))<<16;case 2:V^=(255&te.charCodeAt(J+1))<<8;case 1:V=1540483477*(65535&(V^=255&te.charCodeAt(J)))+(59797*(V>>>16)<<16)}return(((V=1540483477*(65535&(V^=V>>>13))+(59797*(V>>>16)<<16))^V>>>15)>>>0).toString(36)})(D)+P;return{name:T,styles:D,next:_n}},vx=!!a.useInsertionEffect&&a.useInsertionEffect,e5=vx||function(i){return i()},zp=(vx||a.useLayoutEffect,{}.hasOwnProperty),gx=a.createContext(typeof HTMLElement<"u"?YR({key:"css"}):null);gx.Provider;var t5=function(i){return(0,a.forwardRef)((function(v,b){var x=(0,a.useContext)(gx);return i(v,x,b)}))},n5=a.createContext({}),$p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",r5=function(i){var v=i.cache,b=i.serialized,x=i.isStringTag;return ux(v,b,x),e5((function(){return(function(D,B,G){ux(D,B,G);var L=D.key+"-"+B.name;if(D.inserted[B.name]===void 0){var P=B;do D.insert(B===P?"."+L:"",P,D.sheet,!0),P=P.next;while(P!==void 0)}})(v,b,x)})),null},o5=t5((function(i,v,b){var x=i.css;typeof x=="string"&&v.registered[x]!==void 0&&(x=v.registered[x]);var D=i[$p],B=[x],G="";typeof i.className=="string"?G=(function(te,oe,V){var J="";return V.split(" ").forEach((function(Y){te[Y]!==void 0?oe.push(te[Y]+";"):J+=Y+" "})),J})(v.registered,B,i.className):i.className!=null&&(G=i.className+" ");var L=px(B,void 0,a.useContext(n5));G+=v.key+"-"+L.name;var P={};for(var T in i)zp.call(i,T)&&T!=="css"&&T!==$p&&(P[T]=i[T]);return P.ref=b,P.className=G,a.createElement(a.Fragment,null,a.createElement(r5,{cache:v,serialized:L,isStringTag:typeof D=="string"}),a.createElement(D,P))})),i5=o5,$e=(l(679),function(i,v){var b=arguments;if(v==null||!zp.call(v,"css"))return a.createElement.apply(void 0,b);var x=b.length,D=new Array(x);D[0]=i5,D[1]=(function(G,L){var P={};for(var T in L)zp.call(L,T)&&(P[T]=L[T]);return P[$p]=G,P})(i,v);for(var B=2;B<x;B++)D[B]=b[B];return a.createElement.apply(null,D)});function Hp(){for(var i=arguments.length,v=new Array(i),b=0;b<i;b++)v[b]=arguments[b];return px(v)}function qn(i,v){return(function(b){if(Array.isArray(b))return b})(i)||(function(b,x){var D=b==null?null:typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(D!=null){var B,G,L,P,T=[],te=!0,oe=!1;try{if(L=(D=D.call(b)).next,x===0){if(Object(D)!==D)return;te=!1}else for(;!(te=(B=L.call(D)).done)&&(T.push(B.value),T.length!==x);te=!0);}catch(V){oe=!0,G=V}finally{try{if(!te&&D.return!=null&&(P=D.return(),Object(P)!==P))return}finally{if(oe)throw G}}return T}})(i,v)||XE(i,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function wn(i,v){if(i==null)return{};var b,x,D=QO(i,v);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(i);for(x=0;x<B.length;x++)b=B[x],v.indexOf(b)>=0||Object.prototype.propertyIsEnumerable.call(i,b)&&(D[b]=i[b])}return D}const a5=Math.min,s5=Math.max,Ba=Math.round,za=Math.floor,Vp=i=>({x:i,y:i});function yx(i){return bx(i)?(i.nodeName||"").toLowerCase():"#document"}function Vn(i){var v;return(i==null||(v=i.ownerDocument)==null?void 0:v.defaultView)||window}function mx(i){var v;return(v=(bx(i)?i.ownerDocument:i.document)||window.document)==null?void 0:v.documentElement}function bx(i){return i instanceof Node||i instanceof Vn(i).Node}function l5(i){return i instanceof Element||i instanceof Vn(i).Element}function Up(i){return i instanceof HTMLElement||i instanceof Vn(i).HTMLElement}function _x(i){return typeof ShadowRoot<"u"&&(i instanceof ShadowRoot||i instanceof Vn(i).ShadowRoot)}function wx(i){const{overflow:v,overflowX:b,overflowY:x,display:D}=Gp(i);return/auto|scroll|overlay|hidden|clip/.test(v+x+b)&&!["inline","contents"].includes(D)}function Gp(i){return Vn(i).getComputedStyle(i)}function Ox(i){const v=(function(b){if(yx(b)==="html")return b;const x=b.assignedSlot||b.parentNode||_x(b)&&b.host||mx(b);return _x(x)?x.host:x})(i);return(function(b){return["html","body","#document"].includes(yx(b))})(v)?i.ownerDocument?i.ownerDocument.body:i.body:Up(v)&&wx(v)?v:Ox(v)}function Kp(i,v){var b;v===void 0&&(v=[]);const x=Ox(i),D=x===((b=i.ownerDocument)==null?void 0:b.body),B=Vn(x);return D?v.concat(B,B.visualViewport||[],wx(x)?x:[]):v.concat(x,Kp(x))}function Wp(i){return l5(i)?i:i.contextElement}function Ex(i){const v=Wp(i);if(!Up(v))return Vp(1);const b=v.getBoundingClientRect(),{width:x,height:D,$:B}=(function(P){const T=Gp(P);let te=parseFloat(T.width)||0,oe=parseFloat(T.height)||0;const V=Up(P),J=V?P.offsetWidth:te,Y=V?P.offsetHeight:oe,ie=Ba(te)!==J||Ba(oe)!==Y;return ie&&(te=J,oe=Y),{width:te,height:oe,$:ie}})(v);let G=(B?Ba(b.width):b.width)/x,L=(B?Ba(b.height):b.height)/D;return G&&Number.isFinite(G)||(G=1),L&&Number.isFinite(L)||(L=1),{x:G,y:L}}function xx(i,v,b,x){v===void 0&&(v=!1);const D=i.getBoundingClientRect(),B=Wp(i);let G=Vp(1);v&&(G=Ex(i));const L=Vp(0);let P=(D.left+L.x)/G.x,T=(D.top+L.y)/G.y,te=D.width/G.x,oe=D.height/G.y;if(B){const J=Vn(B),Y=x;let ie=J.frameElement;for(;ie&&x&&Y!==J;){const ae=Ex(ie),ce=ie.getBoundingClientRect(),fe=Gp(ie),ve=ce.left+(ie.clientLeft+parseFloat(fe.paddingLeft))*ae.x,he=ce.top+(ie.clientTop+parseFloat(fe.paddingTop))*ae.y;P*=ae.x,T*=ae.y,te*=ae.x,oe*=ae.y,P+=ve,T+=he,ie=Vn(ie).frameElement}}return V={width:te,height:oe,x:P,y:T},{...V,top:V.y,left:V.x,right:V.x+V.width,bottom:V.y+V.height};var V}const Yp=a.useLayoutEffect;var u5=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],$a=function(){};function c5(i,v){return v?v[0]==="-"?i+v:i+"__"+v:i}function f5(i,v){for(var b=arguments.length,x=new Array(b>2?b-2:0),D=2;D<b;D++)x[D-2]=arguments[D];var B=[].concat(x);if(v&&i)for(var G in v)v.hasOwnProperty(G)&&v[G]&&B.push("".concat(c5(i,G)));return B.filter((function(L){return L})).map((function(L){return String(L).trim()})).join(" ")}var Ha=function(i){return v=i,Array.isArray(v)?i.filter(Boolean):dr(i)==="object"&&i!==null?[i]:[];var v},Sx=function(i){return i.className,i.clearValue,i.cx,i.getStyles,i.getClassNames,i.getValue,i.hasValue,i.isMulti,i.isRtl,i.options,i.selectOption,i.selectProps,i.setValue,i.theme,Fe({},wn(i,u5))},gt=function(i,v,b){var x=i.cx,D=i.getStyles,B=i.getClassNames,G=i.className;return{css:D(v,i),className:x(b??{},B(v,i),G)}};function Va(i){return[document.documentElement,document.body,window].indexOf(i)>-1}function kx(i){return Va(i)?window.pageYOffset:i.scrollTop}function Ua(i,v){Va(i)?window.scrollTo(0,v):i.scrollTop=v}function Ga(i,v){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$a,D=kx(i),B=v-D,G=0;(function L(){var P,T=B*((P=(P=G+=10)/b-1)*P*P+1)+D;Ua(i,T),G<b?window.requestAnimationFrame(L):x(i)})()}function Nx(i,v){var b=i.getBoundingClientRect(),x=v.getBoundingClientRect(),D=v.offsetHeight/3;x.bottom+D>b.bottom?Ua(i,Math.min(v.offsetTop+v.clientHeight-i.offsetHeight+D,i.scrollHeight)):x.top-D<b.top&&Ua(i,Math.max(v.offsetTop-D,0))}function Tx(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}var Cx=!1,d5={get passive(){return Cx=!0}},Ka=typeof window<"u"?window:{};Ka.addEventListener&&Ka.removeEventListener&&(Ka.addEventListener("p",$a,d5),Ka.removeEventListener("p",$a,!1));var h5=Cx;function p5(i){return i!=null}function ei(i,v,b){return i?v:b}var v5=["children","innerProps"],g5=["children","innerProps"],Ax,Zp,Xp,Px=function(i){return i==="auto"?"bottom":i},Ix=(0,a.createContext)(null),y5=function(i){var v=i.children,b=i.minMenuHeight,x=i.maxMenuHeight,D=i.menuPlacement,B=i.menuPosition,G=i.menuShouldScrollIntoView,L=i.theme,P=((0,a.useContext)(Ix)||{}).setPortalPlacement,T=(0,a.useRef)(null),te=qn((0,a.useState)(x),2),oe=te[0],V=te[1],J=qn((0,a.useState)(null),2),Y=J[0],ie=J[1],ae=L.spacing.controlHeight;return Yp((function(){var ce=T.current;if(ce){var fe=B==="fixed",ve=(function(he){var ye=he.maxHeight,be=he.menuEl,_e=he.minHeight,xe=he.placement,Me=he.shouldScroll,Te=he.isFixedPosition,De=he.controlHeight,Le=(function(Gn){var nn=getComputedStyle(Gn),Kn=nn.position==="absolute",dv=/(auto|scroll)/;if(nn.position==="fixed")return document.documentElement;for(var es=Gn;es=es.parentElement;)if(nn=getComputedStyle(es),(!Kn||nn.position!=="static")&&dv.test(nn.overflow+nn.overflowY+nn.overflowX))return es;return document.documentElement})(be),Re={placement:"bottom",maxHeight:ye};if(!be||!be.offsetParent)return Re;var He,Ve=Le.getBoundingClientRect().height,Ue=be.getBoundingClientRect(),at=Ue.bottom,Qe=Ue.height,ut=Ue.top,tt=be.offsetParent.getBoundingClientRect().top,dt=Te||Va(He=Le)?window.innerHeight:He.clientHeight,Et=kx(Le),xt=parseInt(getComputedStyle(be).marginBottom,10),Ut=parseInt(getComputedStyle(be).marginTop,10),tn=tt-Ut,rt=dt-ut,qt=tn+Et,Lt=Ve-Et-ut,Pt=at-dt+Et+xt,zt=Et+ut-Ut,Gt=160;switch(xe){case"auto":case"bottom":if(rt>=Qe)return{placement:"bottom",maxHeight:ye};if(Lt>=Qe&&!Te)return Me&&Ga(Le,Pt,Gt),{placement:"bottom",maxHeight:ye};if(!Te&&Lt>=_e||Te&&rt>=_e)return Me&&Ga(Le,Pt,Gt),{placement:"bottom",maxHeight:Te?rt-xt:Lt-xt};if(xe==="auto"||Te){var Kt=ye,pr=Te?tn:qt;return pr>=_e&&(Kt=Math.min(pr-xt-De,ye)),{placement:"top",maxHeight:Kt}}if(xe==="bottom")return Me&&Ua(Le,Pt),{placement:"bottom",maxHeight:ye};break;case"top":if(tn>=Qe)return{placement:"top",maxHeight:ye};if(qt>=Qe&&!Te)return Me&&Ga(Le,zt,Gt),{placement:"top",maxHeight:ye};if(!Te&&qt>=_e||Te&&tn>=_e){var Un=ye;return(!Te&&qt>=_e||Te&&tn>=_e)&&(Un=Te?tn-Ut:qt-Ut),Me&&Ga(Le,zt,Gt),{placement:"top",maxHeight:Un}}return{placement:"bottom",maxHeight:ye};default:throw new Error('Invalid placement provided "'.concat(xe,'".'))}return Re})({maxHeight:x,menuEl:ce,minHeight:b,placement:D,shouldScroll:G&&!fe,isFixedPosition:fe,controlHeight:ae});V(ve.maxHeight),ie(ve.placement),P?.(ve.placement)}}),[x,D,B,G,b,P,ae]),v({ref:T,placerProps:Fe(Fe({},i),{},{placement:Y||Px(D),maxHeight:oe})})},Mx=function(i,v){var b=i.theme,x=b.spacing.baseUnit,D=b.colors;return Fe({textAlign:"center"},v?{}:{color:D.neutral40,padding:"".concat(2*x,"px ").concat(3*x,"px")})},m5=Mx,b5=Mx,_5=["size"],w5=["innerProps","isRtl","size"],O5={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},qx=function(i){var v=i.size,b=wn(i,_5);return $e("svg",Be({height:v,width:v,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:O5},b))},Qp=function(i){return $e(qx,Be({size:20},i),$e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Lx=function(i){return $e(qx,Be({size:20},i),$e("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Rx=function(i,v){var b=i.isFocused,x=i.theme,D=x.spacing.baseUnit,B=x.colors;return Fe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},v?{}:{color:b?B.neutral60:B.neutral20,padding:2*D,":hover":{color:b?B.neutral80:B.neutral40}})},E5=Rx,x5=Rx,S5=(function(){var i=Hp.apply(void 0,arguments),v="animation-"+i.name;return{name:v,styles:"@keyframes "+v+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})(Ax||(Zp=[`
24
24
  0%, 80%, 100% { opacity: 0; }
25
25
  40% { opacity: 1; }
26
- `],Qp||(Qp=Xp.slice(0)),MS=Object.freeze(Object.defineProperties(Xp,{raw:{value:Object.freeze(Qp)}})))),ev=function(i){var v=i.delay,b=i.offset;return He("span",{css:Vp({animation:"".concat(N5," 1s ease-in-out ").concat(v,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:b?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},T5=["data"],C5=["innerRef","isDisabled","isHidden","inputClassName"],BS={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},A5={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Fe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},BS)},P5=function(i){return Fe({label:"input",color:"inherit",background:0,opacity:i?0:1,width:"100%"},BS)},zS=function(i){var v=i.children,b=i.innerProps;return He("div",b,v)},HS={ClearIndicator:function(i){var v=i.children,b=i.innerProps;return He("div",Be({},gt(i,"clearIndicator",{indicator:!0,"clear-indicator":!0}),b),v||He(Jp,null))},Control:function(i){var v=i.children,b=i.isDisabled,S=i.isFocused,D=i.innerRef,z=i.innerProps,G=i.menuIsOpen;return He("div",Be({ref:D},gt(i,"control",{control:!0,"control--is-disabled":b,"control--is-focused":S,"control--menu-is-open":G}),z),v)},DropdownIndicator:function(i){var v=i.children,b=i.innerProps;return He("div",Be({},gt(i,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),b),v||He(jS,null))},DownChevron:jS,CrossIcon:Jp,Group:function(i){var v=i.children,b=i.cx,S=i.getStyles,D=i.getClassNames,z=i.Heading,G=i.headingProps,R=i.innerProps,P=i.label,T=i.theme,te=i.selectProps;return He("div",Be({},gt(i,"group",{group:!0}),R),He(z,Be({},G,{selectProps:te,theme:T,getStyles:S,getClassNames:D,cx:b}),P),He("div",null,v))},GroupHeading:function(i){var v=TS(i);v.data;var b=On(v,T5);return He("div",Be({},gt(i,"groupHeading",{"group-heading":!0}),b))},IndicatorsContainer:function(i){var v=i.children,b=i.innerProps;return He("div",Be({},gt(i,"indicatorsContainer",{indicators:!0}),b),v)},IndicatorSeparator:function(i){var v=i.innerProps;return He("span",Be({},v,gt(i,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(i){var v=i.cx,b=i.value,S=TS(i),D=S.innerRef,z=S.isDisabled,G=S.isHidden,R=S.inputClassName,P=On(S,C5);return He("div",Be({},gt(i,"input",{"input-container":!0}),{"data-value":b||""}),He("input",Be({className:v({input:!0},R),ref:D,style:P5(G),disabled:z},P)))},LoadingIndicator:function(i){var v=i.innerProps,b=i.isRtl,S=i.size,D=S===void 0?4:S,z=On(i,E5);return He("div",Be({},gt(Fe(Fe({},z),{},{innerProps:v,isRtl:b,size:D}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),v),He(ev,{delay:0,offset:b}),He(ev,{delay:160,offset:!0}),He(ev,{delay:320,offset:!b}))},Menu:function(i){var v=i.children,b=i.innerRef,S=i.innerProps;return He("div",Be({},gt(i,"menu",{menu:!0}),{ref:b},S),v)},MenuList:function(i){var v=i.children,b=i.innerProps,S=i.innerRef,D=i.isMulti;return He("div",Be({},gt(i,"menuList",{"menu-list":!0,"menu-list--is-multi":D}),{ref:S},b),v)},MenuPortal:function(i){var v=i.appendTo,b=i.children,S=i.controlElement,D=i.innerProps,z=i.menuPlacement,G=i.menuPosition,R=(0,a.useRef)(null),P=(0,a.useRef)(null),T=Ln((0,a.useState)(qS(z)),2),te=T[0],oe=T[1],U=(0,a.useMemo)((function(){return{setPortalPlacement:oe}}),[]),J=Ln((0,a.useState)(null),2),Y=J[0],ie=J[1],ae=(0,a.useCallback)((function(){if(S){var he=(function(_e){var Se=_e.getBoundingClientRect();return{bottom:Se.bottom,height:Se.height,left:Se.left,right:Se.right,top:Se.top,width:Se.width}})(S),ye=G==="fixed"?0:window.pageYOffset,be=he[te]+ye;be===Y?.offset&&he.left===Y?.rect.left&&he.width===Y?.rect.width||ie({offset:be,rect:he})}}),[S,G,te,Y?.offset,Y?.rect.left,Y?.rect.width]);Zp((function(){ae()}),[ae]);var ce=(0,a.useCallback)((function(){typeof P.current=="function"&&(P.current(),P.current=null),S&&R.current&&(P.current=(function(he,ye,be,_e){_e===void 0&&(_e={});const{ancestorScroll:Se=!0,ancestorResize:Me=!0,elementResize:Te=typeof ResizeObserver=="function",layoutShift:De=typeof IntersectionObserver=="function",animationFrame:Le=!1}=_e,Re=Yp(he),$e=Se||Me?[...Re?Wp(Re):[],...Wp(ye)]:[];$e.forEach((tt=>{Se&&tt.addEventListener("scroll",be,{passive:!0}),Me&&tt.addEventListener("resize",be)}));const Ve=Re&&De?(function(tt,ht){let St,xt=null;const Ut=wS(tt);function tn(){clearTimeout(St),xt&&xt.disconnect(),xt=null}return(function rt(qt,Lt){qt===void 0&&(qt=!1),Lt===void 0&&(Lt=1),tn();const{left:Pt,top:zt,width:Gt,height:Kt}=tt.getBoundingClientRect();if(qt||ht(),!Gt||!Kt)return;const vr={rootMargin:-Ha(zt)+"px "+-Ha(Ut.clientWidth-(Pt+Gt))+"px "+-Ha(Ut.clientHeight-(zt+Kt))+"px "+-Ha(Pt)+"px",threshold:u5(0,l5(1,Lt))||1};let Gn=!0;function Kn(nn){const Wn=nn[0].intersectionRatio;if(Wn!==Lt){if(!Gn)return rt();Wn?rt(!1,Wn):St=setTimeout((()=>{rt(!1,1e-7)}),100)}Gn=!1}try{xt=new IntersectionObserver(Kn,{...vr,root:Ut.ownerDocument})}catch{xt=new IntersectionObserver(Kn,vr)}xt.observe(tt)})(!0),tn})(Re,be):null;let Ue,at=-1,Qe=null;Te&&(Qe=new ResizeObserver((tt=>{let[ht]=tt;ht&&ht.target===Re&&Qe&&(Qe.unobserve(ye),cancelAnimationFrame(at),at=requestAnimationFrame((()=>{Qe&&Qe.observe(ye)}))),be()})),Re&&!Le&&Qe.observe(Re),Qe.observe(ye));let ut=Le?NS(he):null;return Le&&(function tt(){const ht=NS(he);!ut||ht.x===ut.x&&ht.y===ut.y&&ht.width===ut.width&&ht.height===ut.height||be(),ut=ht,Ue=requestAnimationFrame(tt)})(),be(),()=>{$e.forEach((tt=>{Se&&tt.removeEventListener("scroll",be),Me&&tt.removeEventListener("resize",be)})),Ve&&Ve(),Qe&&Qe.disconnect(),Qe=null,Le&&cancelAnimationFrame(Ue)}})(S,R.current,ae,{elementResize:"ResizeObserver"in window}))}),[S,ae]);Zp((function(){ce()}),[ce]);var fe=(0,a.useCallback)((function(he){R.current=he,ce()}),[ce]);if(!v&&G!=="fixed"||!Y)return null;var ve=He("div",Be({ref:fe},gt(Fe(Fe({},i),{},{offset:Y.offset,position:G,rect:Y.rect}),"menuPortal",{"menu-portal":!0}),D),b);return He(LS.Provider,{value:U},v?(0,ma.createPortal)(ve,v):ve)},LoadingMessage:function(i){var v=i.children,b=v===void 0?"Loading...":v,S=i.innerProps,D=On(i,m5);return He("div",Be({},gt(Fe(Fe({},D),{},{children:b,innerProps:S}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),S),b)},NoOptionsMessage:function(i){var v=i.children,b=v===void 0?"No options":v,S=i.innerProps,D=On(i,y5);return He("div",Be({},gt(Fe(Fe({},D),{},{children:b,innerProps:S}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),S),b)},MultiValue:function(i){var v=i.children,b=i.components,S=i.data,D=i.innerProps,z=i.isDisabled,G=i.removeProps,R=i.selectProps,P=b.Container,T=b.Label,te=b.Remove;return He(P,{data:S,innerProps:Fe(Fe({},gt(i,"multiValue",{"multi-value":!0,"multi-value--is-disabled":z})),D),selectProps:R},He(T,{data:S,innerProps:Fe({},gt(i,"multiValueLabel",{"multi-value__label":!0})),selectProps:R},v),He(te,{data:S,innerProps:Fe(Fe({},gt(i,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(v||"option")},G),selectProps:R}))},MultiValueContainer:zS,MultiValueLabel:zS,MultiValueRemove:function(i){var v=i.children,b=i.innerProps;return He("div",Be({role:"button"},b),v||He(Jp,{size:14}))},Option:function(i){var v=i.children,b=i.isDisabled,S=i.isFocused,D=i.isSelected,z=i.innerRef,G=i.innerProps;return He("div",Be({},gt(i,"option",{option:!0,"option--is-disabled":b,"option--is-focused":S,"option--is-selected":D}),{ref:z,"aria-disabled":b},G),v)},Placeholder:function(i){var v=i.children,b=i.innerProps;return He("div",Be({},gt(i,"placeholder",{placeholder:!0}),b),v)},SelectContainer:function(i){var v=i.children,b=i.innerProps,S=i.isDisabled,D=i.isRtl;return He("div",Be({},gt(i,"container",{"--is-disabled":S,"--is-rtl":D}),b),v)},SingleValue:function(i){var v=i.children,b=i.isDisabled,S=i.innerProps;return He("div",Be({},gt(i,"singleValue",{"single-value":!0,"single-value--is-disabled":b}),S),v)},ValueContainer:function(i){var v=i.children,b=i.innerProps,S=i.isMulti,D=i.hasValue;return He("div",Be({},gt(i,"valueContainer",{"value-container":!0,"value-container--is-multi":S,"value-container--has-value":D}),b),v)}},$S=Number.isNaN||function(i){return typeof i=="number"&&i!=i};function I5(i,v){if(i.length!==v.length)return!1;for(var b=0;b<i.length;b++)if(!((S=i[b])===(D=v[b])||$S(S)&&$S(D)))return!1;var S,D;return!0}for(var M5={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},VS=function(i){return He("span",Be({css:M5},i))},q5={guidance:function(i){var v=i.isSearchable,b=i.isMulti,S=i.isDisabled,D=i.tabSelectsValue;switch(i.context){case"menu":return"Use Up and Down to choose options".concat(S?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(D?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(i["aria-label"]||"Select"," is focused ").concat(v?",type to refine list":"",", press Down to open the menu, ").concat(b?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(i){var v=i.action,b=i.label,S=b===void 0?"":b,D=i.labels,z=i.isDisabled;switch(v){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(S,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(D.length>1?"s":""," ").concat(D.join(","),", selected.");case"select-option":return"option ".concat(S,z?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(i){var v=i.context,b=i.focused,S=i.options,D=i.label,z=D===void 0?"":D,G=i.selectValue,R=i.isDisabled,P=i.isSelected,T=function(U,J){return U&&U.length?"".concat(U.indexOf(J)+1," of ").concat(U.length):""};if(v==="value"&&G)return"value ".concat(z," focused, ").concat(T(G,b),".");if(v==="menu"){var te=R?" disabled":"",oe="".concat(P?"selected":"focused").concat(te);return"option ".concat(z," ").concat(oe,", ").concat(T(S,b),".")}return""},onFilter:function(i){var v=i.inputValue,b=i.resultsMessage;return"".concat(b).concat(v?" for search term "+v:"",".")}},L5=function(i){var v=i.ariaSelection,b=i.focusedOption,S=i.focusedValue,D=i.focusableOptions,z=i.isFocused,G=i.selectValue,R=i.selectProps,P=i.id,T=R.ariaLiveMessages,te=R.getOptionLabel,oe=R.inputValue,U=R.isMulti,J=R.isOptionDisabled,Y=R.isSearchable,ie=R.menuIsOpen,ae=R.options,ce=R.screenReaderStatus,fe=R.tabSelectsValue,ve=R["aria-label"],he=R["aria-live"],ye=(0,a.useMemo)((function(){return Fe(Fe({},q5),T||{})}),[T]),be=(0,a.useMemo)((function(){var Re,$e="";if(v&&ye.onChange){var Ve=v.option,Ue=v.options,at=v.removedValue,Qe=v.removedValues,ut=v.value,tt=at||Ve||(Re=ut,Array.isArray(Re)?null:Re),ht=tt?te(tt):"",St=Ue||Qe||void 0,xt=St?St.map(te):[],Ut=Fe({isDisabled:tt&&J(tt,G),label:ht,labels:xt},v);$e=ye.onChange(Ut)}return $e}),[v,ye,J,G,te]),_e=(0,a.useMemo)((function(){var Re="",$e=b||S,Ve=!!(b&&G&&G.includes(b));if($e&&ye.onFocus){var Ue={focused:$e,label:te($e),isDisabled:J($e,G),isSelected:Ve,options:D,context:$e===b?"menu":"value",selectValue:G};Re=ye.onFocus(Ue)}return Re}),[b,S,te,J,ye,D,G]),Se=(0,a.useMemo)((function(){var Re="";if(ie&&ae.length&&ye.onFilter){var $e=ce({count:D.length});Re=ye.onFilter({inputValue:oe,resultsMessage:$e})}return Re}),[D,oe,ie,ye,ae,ce]),Me=(0,a.useMemo)((function(){var Re="";if(ye.guidance){var $e=S?"value":ie?"menu":"input";Re=ye.guidance({"aria-label":ve,context:$e,isDisabled:b&&J(b,G),isMulti:U,isSearchable:Y,tabSelectsValue:fe})}return Re}),[ve,b,S,U,J,Y,ie,ye,G,fe]),Te="".concat(_e," ").concat(Se," ").concat(Me),De=He(a.Fragment,null,He("span",{id:"aria-selection"},be),He("span",{id:"aria-context"},Te)),Le=v?.action==="initial-input-focus";return He(a.Fragment,null,He(VS,{id:P},Le&&De),He(VS,{"aria-live":he,"aria-atomic":"false","aria-relevant":"additions text"},z&&!Le&&De))},tv=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],R5=new RegExp("["+tv.map((function(i){return i.letters})).join("")+"]","g"),US={},nv=0;nv<tv.length;nv++)for(var rv=tv[nv],ov=0;ov<rv.letters.length;ov++)US[rv.letters[ov]]=rv.base;var GS=function(i){return i.replace(R5,(function(v){return US[v]}))},D5=(function(i,v){v===void 0&&(v=I5);var b=null;function S(){for(var D=[],z=0;z<arguments.length;z++)D[z]=arguments[z];if(b&&b.lastThis===this&&v(D,b.lastArgs))return b.lastResult;var G=i.apply(this,D);return b={lastResult:G,lastArgs:D,lastThis:this},G}return S.clear=function(){b=null},S})(GS),KS=function(i){return i.replace(/^\s+|\s+$/g,"")},j5=function(i){return"".concat(i.label," ").concat(i.value)},F5=["innerRef"];function B5(i){var v=i.innerRef,b=(function(S){for(var D=arguments.length,z=new Array(D>1?D-1:0),G=1;G<D;G++)z[G-1]=arguments[G];var R=Object.entries(S).filter((function(P){var T=Ln(P,1)[0];return!z.includes(T)}));return R.reduce((function(P,T){var te=Ln(T,2),oe=te[0],U=te[1];return P[oe]=U,P}),{})})(On(i,F5),"onExited","in","enter","exit","appear");return He("input",Be({ref:v},b,{css:Vp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var WS=["boxSizing","height","overflow","paddingRight","position"],YS={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ZS(i){i.preventDefault()}function XS(i){i.stopPropagation()}function QS(){var i=this.scrollTop,v=this.scrollHeight,b=i+this.offsetHeight;i===0?this.scrollTop=1:b===v&&(this.scrollTop=i-1)}function JS(){return"ontouchstart"in window||navigator.maxTouchPoints}var ex=!(typeof window>"u"||!window.document||!window.document.createElement),ni=0,Jr={capture:!1,passive:!1},z5=function(){return document.activeElement&&document.activeElement.blur()},H5={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function $5(i){var v=i.children,b=i.lockEnabled,S=i.captureEnabled,D=(function(G){var R=G.isEnabled,P=G.onBottomArrive,T=G.onBottomLeave,te=G.onTopArrive,oe=G.onTopLeave,U=(0,a.useRef)(!1),J=(0,a.useRef)(!1),Y=(0,a.useRef)(0),ie=(0,a.useRef)(null),ae=(0,a.useCallback)((function(be,_e){if(ie.current!==null){var Se=ie.current,Me=Se.scrollTop,Te=Se.scrollHeight,De=Se.clientHeight,Le=ie.current,Re=_e>0,$e=Te-De-Me,Ve=!1;$e>_e&&U.current&&(T&&T(be),U.current=!1),Re&&J.current&&(oe&&oe(be),J.current=!1),Re&&_e>$e?(P&&!U.current&&P(be),Le.scrollTop=Te,Ve=!0,U.current=!0):!Re&&-_e>Me&&(te&&!J.current&&te(be),Le.scrollTop=0,Ve=!0,J.current=!0),Ve&&(function(Ue){Ue.preventDefault(),Ue.stopPropagation()})(be)}}),[P,T,te,oe]),ce=(0,a.useCallback)((function(be){ae(be,be.deltaY)}),[ae]),fe=(0,a.useCallback)((function(be){Y.current=be.changedTouches[0].clientY}),[]),ve=(0,a.useCallback)((function(be){var _e=Y.current-be.changedTouches[0].clientY;ae(be,_e)}),[ae]),he=(0,a.useCallback)((function(be){if(be){var _e=!!v5&&{passive:!1};be.addEventListener("wheel",ce,_e),be.addEventListener("touchstart",fe,_e),be.addEventListener("touchmove",ve,_e)}}),[ve,fe,ce]),ye=(0,a.useCallback)((function(be){be&&(be.removeEventListener("wheel",ce,!1),be.removeEventListener("touchstart",fe,!1),be.removeEventListener("touchmove",ve,!1))}),[ve,fe,ce]);return(0,a.useEffect)((function(){if(R){var be=ie.current;return he(be),function(){ye(be)}}}),[R,he,ye]),function(be){ie.current=be}})({isEnabled:S===void 0||S,onBottomArrive:i.onBottomArrive,onBottomLeave:i.onBottomLeave,onTopArrive:i.onTopArrive,onTopLeave:i.onTopLeave}),z=(function(G){var R=G.isEnabled,P=G.accountForScrollbars,T=P===void 0||P,te=(0,a.useRef)({}),oe=(0,a.useRef)(null),U=(0,a.useCallback)((function(Y){if(ex){var ie=document.body,ae=ie&&ie.style;if(T&&WS.forEach((function(he){var ye=ae&&ae[he];te.current[he]=ye})),T&&ni<1){var ce=parseInt(te.current.paddingRight,10)||0,fe=document.body?document.body.clientWidth:0,ve=window.innerWidth-fe+ce||0;Object.keys(YS).forEach((function(he){var ye=YS[he];ae&&(ae[he]=ye)})),ae&&(ae.paddingRight="".concat(ve,"px"))}ie&&JS()&&(ie.addEventListener("touchmove",ZS,Jr),Y&&(Y.addEventListener("touchstart",QS,Jr),Y.addEventListener("touchmove",XS,Jr))),ni+=1}}),[T]),J=(0,a.useCallback)((function(Y){if(ex){var ie=document.body,ae=ie&&ie.style;ni=Math.max(ni-1,0),T&&ni<1&&WS.forEach((function(ce){var fe=te.current[ce];ae&&(ae[ce]=fe)})),ie&&JS()&&(ie.removeEventListener("touchmove",ZS,Jr),Y&&(Y.removeEventListener("touchstart",QS,Jr),Y.removeEventListener("touchmove",XS,Jr)))}}),[T]);return(0,a.useEffect)((function(){if(R){var Y=oe.current;return U(Y),function(){J(Y)}}}),[R,U,J]),function(Y){oe.current=Y}})({isEnabled:b});return He(a.Fragment,null,b&&He("div",{onClick:z5,css:H5}),v((function(G){D(G),z(G)})))}var V5={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},U5=function(i){var v=i.name,b=i.onFocus;return He("input",{required:!0,name:v,tabIndex:-1,"aria-hidden":"true",onFocus:b,css:V5,value:"",onChange:function(){}})},tx=function(i){return i.label},nx=function(i){return i.value},G5={clearIndicator:k5,container:function(i){var v=i.isDisabled;return{label:"container",direction:i.isRtl?"rtl":void 0,pointerEvents:v?"none":void 0,position:"relative"}},control:function(i,v){var b=i.isDisabled,S=i.isFocused,D=i.theme,z=D.colors,G=D.borderRadius;return Fe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:D.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},v?{}:{backgroundColor:b?z.neutral5:z.neutral0,borderColor:b?z.neutral10:S?z.primary:z.neutral20,borderRadius:G,borderStyle:"solid",borderWidth:1,boxShadow:S?"0 0 0 1px ".concat(z.primary):void 0,"&:hover":{borderColor:S?z.primary:z.neutral30}})},dropdownIndicator:x5,group:function(i,v){var b=i.theme.spacing;return v?{}:{paddingBottom:2*b.baseUnit,paddingTop:2*b.baseUnit}},groupHeading:function(i,v){var b=i.theme,S=b.colors,D=b.spacing;return Fe({label:"group",cursor:"default",display:"block"},v?{}:{color:S.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*D.baseUnit,paddingRight:3*D.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(i,v){var b=i.isDisabled,S=i.theme,D=S.spacing.baseUnit,z=S.colors;return Fe({label:"indicatorSeparator",alignSelf:"stretch",width:1},v?{}:{backgroundColor:b?z.neutral10:z.neutral20,marginBottom:2*D,marginTop:2*D})},input:function(i,v){var b=i.isDisabled,S=i.value,D=i.theme,z=D.spacing,G=D.colors;return Fe(Fe({visibility:b?"hidden":"visible",transform:S?"translateZ(0)":""},A5),v?{}:{margin:z.baseUnit/2,paddingBottom:z.baseUnit/2,paddingTop:z.baseUnit/2,color:G.neutral80})},loadingIndicator:function(i,v){var b=i.isFocused,S=i.size,D=i.theme,z=D.colors,G=D.spacing.baseUnit;return Fe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:S,lineHeight:1,marginRight:S,textAlign:"center",verticalAlign:"middle"},v?{}:{color:b?z.neutral60:z.neutral20,padding:2*G})},loadingMessage:w5,menu:function(i,v){var b,S=i.placement,D=i.theme,z=D.borderRadius,G=D.spacing,R=D.colors;return Fe((Wo(b={label:"menu"},(function(P){return P?{bottom:"top",top:"bottom"}[P]:"bottom"})(S),"100%"),Wo(b,"position","absolute"),Wo(b,"width","100%"),Wo(b,"zIndex",1),b),v?{}:{backgroundColor:R.neutral0,borderRadius:z,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:G.menuGutter,marginTop:G.menuGutter})},menuList:function(i,v){var b=i.maxHeight,S=i.theme.spacing.baseUnit;return Fe({maxHeight:b,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},v?{}:{paddingBottom:S,paddingTop:S})},menuPortal:function(i){var v=i.rect,b=i.offset,S=i.position;return{left:v.left,position:S,top:b,width:v.width,zIndex:1}},multiValue:function(i,v){var b=i.theme,S=b.spacing,D=b.borderRadius,z=b.colors;return Fe({label:"multiValue",display:"flex",minWidth:0},v?{}:{backgroundColor:z.neutral10,borderRadius:D/2,margin:S.baseUnit/2})},multiValueLabel:function(i,v){var b=i.theme,S=b.borderRadius,D=b.colors,z=i.cropWithEllipsis;return Fe({overflow:"hidden",textOverflow:z||z===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},v?{}:{borderRadius:S/2,color:D.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(i,v){var b=i.theme,S=b.spacing,D=b.borderRadius,z=b.colors,G=i.isFocused;return Fe({alignItems:"center",display:"flex"},v?{}:{borderRadius:D/2,backgroundColor:G?z.dangerLight:void 0,paddingLeft:S.baseUnit,paddingRight:S.baseUnit,":hover":{backgroundColor:z.dangerLight,color:z.danger}})},noOptionsMessage:_5,option:function(i,v){var b=i.isDisabled,S=i.isFocused,D=i.isSelected,z=i.theme,G=z.spacing,R=z.colors;return Fe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},v?{}:{backgroundColor:D?R.primary:S?R.primary25:"transparent",color:b?R.neutral20:D?R.neutral0:"inherit",padding:"".concat(2*G.baseUnit,"px ").concat(3*G.baseUnit,"px"),":active":{backgroundColor:b?void 0:D?R.primary:R.primary50}})},placeholder:function(i,v){var b=i.theme,S=b.spacing,D=b.colors;return Fe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},v?{}:{color:D.neutral50,marginLeft:S.baseUnit/2,marginRight:S.baseUnit/2})},singleValue:function(i,v){var b=i.isDisabled,S=i.theme,D=S.spacing,z=S.colors;return Fe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},v?{}:{color:b?z.neutral40:z.neutral80,marginLeft:D.baseUnit/2,marginRight:D.baseUnit/2})},valueContainer:function(i,v){var b=i.theme.spacing,S=i.isMulti,D=i.hasValue,z=i.selectProps.controlShouldRenderValue;return Fe({alignItems:"center",display:S&&D&&z?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},v?{}:{padding:"".concat(b.baseUnit/2,"px ").concat(2*b.baseUnit,"px")})}},iv={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},K5={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:PS(),captureMenuScroll:!PS(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(i,v){if(i.data.__isNew__)return!0;var b=Fe({ignoreCase:!0,ignoreAccents:!0,stringify:j5,trim:!0,matchFrom:"any"},void 0),S=b.ignoreCase,D=b.ignoreAccents,z=b.stringify,G=b.trim,R=b.matchFrom,P=G?KS(v):v,T=G?KS(z(i)):z(i);return S&&(P=P.toLowerCase(),T=T.toLowerCase()),D&&(P=D5(P),T=GS(T)),R==="start"?T.substr(0,P.length)===P:T.indexOf(P)>-1},formatGroupLabel:function(i){return i.label},getOptionLabel:tx,getOptionValue:nx,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(i){return!!i.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}})(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(i){var v=i.count;return"".concat(v," result").concat(v!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function rx(i,v,b,S){return{type:"option",data:v,isDisabled:lx(i,v,b),isSelected:ux(i,v,b),label:sx(i,v),value:Ya(i,v),index:S}}function ox(i,v){return i.options.map((function(b,S){if("options"in b){var D=b.options.map((function(G,R){return rx(i,G,v,R)})).filter((function(G){return ax(i,G)}));return D.length>0?{type:"group",data:b,options:D,index:S}:void 0}var z=rx(i,b,v,S);return ax(i,z)?z:void 0})).filter(g5)}function ix(i){return i.reduce((function(v,b){return b.type==="group"?v.push.apply(v,Yo(b.options.map((function(S){return S.data})))):v.push(b.data),v}),[])}function ax(i,v){var b=i.inputValue,S=b===void 0?"":b,D=v.data,z=v.isSelected,G=v.label,R=v.value;return(!fx(i)||!z)&&cx(i,{label:G,value:R,data:D},S)}var sx=function(i,v){return i.getOptionLabel(v)},Ya=function(i,v){return i.getOptionValue(v)};function lx(i,v,b){return typeof i.isOptionDisabled=="function"&&i.isOptionDisabled(v,b)}function ux(i,v,b){if(b.indexOf(v)>-1)return!0;if(typeof i.isOptionSelected=="function")return i.isOptionSelected(v,b);var S=Ya(i,v);return b.some((function(D){return Ya(i,D)===S}))}function cx(i,v,b){return!i.filterOption||i.filterOption(v,b)}var fx=function(i){var v=i.hideSelectedOptions,b=i.isMulti;return v===void 0?b:v},W5=1,av=(function(i){(function(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),T&&_a(P,T)})(R,i);var v,b,S,D,z,G=(D=R,z=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var P,T=Ma(D);if(z){var te=Ma(this).constructor;P=Reflect.construct(T,arguments,te)}else P=T.apply(this,arguments);return(function(oe,U){if(U&&(hr(U)==="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qp(oe)})(this,P)});function R(P){var T;if((function(U,J){if(!(U instanceof J))throw new TypeError("Cannot call a class as a function")})(this,R),(T=G.call(this,P)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},T.blockOptionHover=!1,T.isComposing=!1,T.commonProps=void 0,T.initialTouchX=0,T.initialTouchY=0,T.instancePrefix="",T.openAfterFocus=!1,T.scrollToFocusedOptionOnUpdate=!1,T.userIsDragging=void 0,T.controlRef=null,T.getControlRef=function(U){T.controlRef=U},T.focusedOptionRef=null,T.getFocusedOptionRef=function(U){T.focusedOptionRef=U},T.menuListRef=null,T.getMenuListRef=function(U){T.menuListRef=U},T.inputRef=null,T.getInputRef=function(U){T.inputRef=U},T.focus=T.focusInput,T.blur=T.blurInput,T.onChange=function(U,J){var Y=T.props,ie=Y.onChange,ae=Y.name;J.name=ae,T.ariaOnChange(U,J),ie(U,J)},T.setValue=function(U,J,Y){var ie=T.props,ae=ie.closeMenuOnSelect,ce=ie.isMulti,fe=ie.inputValue;T.onInputChange("",{action:"set-value",prevInputValue:fe}),ae&&(T.setState({inputIsHiddenAfterUpdate:!ce}),T.onMenuClose()),T.setState({clearFocusValueOnUpdate:!0}),T.onChange(U,{action:J,option:Y})},T.selectOption=function(U){var J=T.props,Y=J.blurInputOnSelect,ie=J.isMulti,ae=J.name,ce=T.state.selectValue,fe=ie&&T.isOptionSelected(U,ce),ve=T.isOptionDisabled(U,ce);if(fe){var he=T.getOptionValue(U);T.setValue(ce.filter((function(ye){return T.getOptionValue(ye)!==he})),"deselect-option",U)}else{if(ve)return void T.ariaOnChange(U,{action:"select-option",option:U,name:ae});ie?T.setValue([].concat(Yo(ce),[U]),"select-option",U):T.setValue(U,"select-option")}Y&&T.blurInput()},T.removeValue=function(U){var J=T.props.isMulti,Y=T.state.selectValue,ie=T.getOptionValue(U),ae=Y.filter((function(fe){return T.getOptionValue(fe)!==ie})),ce=ti(J,ae,ae[0]||null);T.onChange(ce,{action:"remove-value",removedValue:U}),T.focusInput()},T.clearValue=function(){var U=T.state.selectValue;T.onChange(ti(T.props.isMulti,[],null),{action:"clear",removedValues:U})},T.popValue=function(){var U=T.props.isMulti,J=T.state.selectValue,Y=J[J.length-1],ie=J.slice(0,J.length-1),ae=ti(U,ie,ie[0]||null);T.onChange(ae,{action:"pop-value",removedValue:Y})},T.getValue=function(){return T.state.selectValue},T.cx=function(){for(var U=arguments.length,J=new Array(U),Y=0;Y<U;Y++)J[Y]=arguments[Y];return h5.apply(void 0,[T.props.classNamePrefix].concat(J))},T.getOptionLabel=function(U){return sx(T.props,U)},T.getOptionValue=function(U){return Ya(T.props,U)},T.getStyles=function(U,J){var Y=T.props.unstyled,ie=G5[U](J,Y);ie.boxSizing="border-box";var ae=T.props.styles[U];return ae?ae(ie,J):ie},T.getClassNames=function(U,J){var Y,ie;return(Y=(ie=T.props.classNames)[U])===null||Y===void 0?void 0:Y.call(ie,J)},T.getElementId=function(U){return"".concat(T.instancePrefix,"-").concat(U)},T.getComponents=function(){return U=T.props,Fe(Fe({},HS),U.components);var U},T.buildCategorizedOptions=function(){return ox(T.props,T.state.selectValue)},T.getCategorizedOptions=function(){return T.props.menuIsOpen?T.buildCategorizedOptions():[]},T.buildFocusableOptions=function(){return ix(T.buildCategorizedOptions())},T.getFocusableOptions=function(){return T.props.menuIsOpen?T.buildFocusableOptions():[]},T.ariaOnChange=function(U,J){T.setState({ariaSelection:Fe({value:U},J)})},T.onMenuMouseDown=function(U){U.button===0&&(U.stopPropagation(),U.preventDefault(),T.focusInput())},T.onMenuMouseMove=function(U){T.blockOptionHover=!1},T.onControlMouseDown=function(U){if(!U.defaultPrevented){var J=T.props.openMenuOnClick;T.state.isFocused?T.props.menuIsOpen?U.target.tagName!=="INPUT"&&U.target.tagName!=="TEXTAREA"&&T.onMenuClose():J&&T.openMenu("first"):(J&&(T.openAfterFocus=!0),T.focusInput()),U.target.tagName!=="INPUT"&&U.target.tagName!=="TEXTAREA"&&U.preventDefault()}},T.onDropdownIndicatorMouseDown=function(U){if(!(U&&U.type==="mousedown"&&U.button!==0||T.props.isDisabled)){var J=T.props,Y=J.isMulti,ie=J.menuIsOpen;T.focusInput(),ie?(T.setState({inputIsHiddenAfterUpdate:!Y}),T.onMenuClose()):T.openMenu("first"),U.preventDefault()}},T.onClearIndicatorMouseDown=function(U){U&&U.type==="mousedown"&&U.button!==0||(T.clearValue(),U.preventDefault(),T.openAfterFocus=!1,U.type==="touchend"?T.focusInput():setTimeout((function(){return T.focusInput()})))},T.onScroll=function(U){typeof T.props.closeMenuOnScroll=="boolean"?U.target instanceof HTMLElement&&Ua(U.target)&&T.props.onMenuClose():typeof T.props.closeMenuOnScroll=="function"&&T.props.closeMenuOnScroll(U)&&T.props.onMenuClose()},T.onCompositionStart=function(){T.isComposing=!0},T.onCompositionEnd=function(){T.isComposing=!1},T.onTouchStart=function(U){var J=U.touches,Y=J&&J.item(0);Y&&(T.initialTouchX=Y.clientX,T.initialTouchY=Y.clientY,T.userIsDragging=!1)},T.onTouchMove=function(U){var J=U.touches,Y=J&&J.item(0);if(Y){var ie=Math.abs(Y.clientX-T.initialTouchX),ae=Math.abs(Y.clientY-T.initialTouchY);T.userIsDragging=ie>5||ae>5}},T.onTouchEnd=function(U){T.userIsDragging||(T.controlRef&&!T.controlRef.contains(U.target)&&T.menuListRef&&!T.menuListRef.contains(U.target)&&T.blurInput(),T.initialTouchX=0,T.initialTouchY=0)},T.onControlTouchEnd=function(U){T.userIsDragging||T.onControlMouseDown(U)},T.onClearIndicatorTouchEnd=function(U){T.userIsDragging||T.onClearIndicatorMouseDown(U)},T.onDropdownIndicatorTouchEnd=function(U){T.userIsDragging||T.onDropdownIndicatorMouseDown(U)},T.handleInputChange=function(U){var J=T.props.inputValue,Y=U.currentTarget.value;T.setState({inputIsHiddenAfterUpdate:!1}),T.onInputChange(Y,{action:"input-change",prevInputValue:J}),T.props.menuIsOpen||T.onMenuOpen()},T.onInputFocus=function(U){T.props.onFocus&&T.props.onFocus(U),T.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(T.openAfterFocus||T.props.openMenuOnFocus)&&T.openMenu("first"),T.openAfterFocus=!1},T.onInputBlur=function(U){var J=T.props.inputValue;T.menuListRef&&T.menuListRef.contains(document.activeElement)?T.inputRef.focus():(T.props.onBlur&&T.props.onBlur(U),T.onInputChange("",{action:"input-blur",prevInputValue:J}),T.onMenuClose(),T.setState({focusedValue:null,isFocused:!1}))},T.onOptionHover=function(U){T.blockOptionHover||T.state.focusedOption===U||T.setState({focusedOption:U})},T.shouldHideSelectedOptions=function(){return fx(T.props)},T.onValueInputFocus=function(U){U.preventDefault(),U.stopPropagation(),T.focus()},T.onKeyDown=function(U){var J=T.props,Y=J.isMulti,ie=J.backspaceRemovesValue,ae=J.escapeClearsValue,ce=J.inputValue,fe=J.isClearable,ve=J.isDisabled,he=J.menuIsOpen,ye=J.onKeyDown,be=J.tabSelectsValue,_e=J.openMenuOnFocus,Se=T.state,Me=Se.focusedOption,Te=Se.focusedValue,De=Se.selectValue;if(!(ve||typeof ye=="function"&&(ye(U),U.defaultPrevented))){switch(T.blockOptionHover=!0,U.key){case"ArrowLeft":if(!Y||ce)return;T.focusValue("previous");break;case"ArrowRight":if(!Y||ce)return;T.focusValue("next");break;case"Delete":case"Backspace":if(ce)return;if(Te)T.removeValue(Te);else{if(!ie)return;Y?T.popValue():fe&&T.clearValue()}break;case"Tab":if(T.isComposing||U.shiftKey||!he||!be||!Me||_e&&T.isOptionSelected(Me,De))return;T.selectOption(Me);break;case"Enter":if(U.keyCode===229)break;if(he){if(!Me||T.isComposing)return;T.selectOption(Me);break}return;case"Escape":he?(T.setState({inputIsHiddenAfterUpdate:!1}),T.onInputChange("",{action:"menu-close",prevInputValue:ce}),T.onMenuClose()):fe&&ae&&T.clearValue();break;case" ":if(ce)return;if(!he){T.openMenu("first");break}if(!Me)return;T.selectOption(Me);break;case"ArrowUp":he?T.focusOption("up"):T.openMenu("last");break;case"ArrowDown":he?T.focusOption("down"):T.openMenu("first");break;case"PageUp":if(!he)return;T.focusOption("pageup");break;case"PageDown":if(!he)return;T.focusOption("pagedown");break;case"Home":if(!he)return;T.focusOption("first");break;case"End":if(!he)return;T.focusOption("last");break;default:return}U.preventDefault()}},T.instancePrefix="react-select-"+(T.props.instanceId||++W5),T.state.selectValue=Va(P.value),P.menuIsOpen&&T.state.selectValue.length){var te=T.buildFocusableOptions(),oe=te.indexOf(T.state.selectValue[0]);T.state.focusedOption=te[oe]}return T}return v=R,b=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&AS(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(P){var T=this.props,te=T.isDisabled,oe=T.menuIsOpen,U=this.state.isFocused;(U&&!te&&P.isDisabled||U&&oe&&!P.menuIsOpen)&&this.focusInput(),U&&te&&!P.isDisabled?this.setState({isFocused:!1},this.onMenuClose):U||te||!P.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(AS(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(P,T){this.props.onInputChange(P,T)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(P){var T=this,te=this.state,oe=te.selectValue,U=te.isFocused,J=this.buildFocusableOptions(),Y=P==="first"?0:J.length-1;if(!this.props.isMulti){var ie=J.indexOf(oe[0]);ie>-1&&(Y=ie)}this.scrollToFocusedOptionOnUpdate=!(U&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:J[Y]},(function(){return T.onMenuOpen()}))}},{key:"focusValue",value:function(P){var T=this.state,te=T.selectValue,oe=T.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var U=te.indexOf(oe);oe||(U=-1);var J=te.length-1,Y=-1;if(te.length){switch(P){case"previous":Y=U===0?0:U===-1?J:U-1;break;case"next":U>-1&&U<J&&(Y=U+1)}this.setState({inputIsHidden:Y!==-1,focusedValue:te[Y]})}}}},{key:"focusOption",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",T=this.props.pageSize,te=this.state.focusedOption,oe=this.getFocusableOptions();if(oe.length){var U=0,J=oe.indexOf(te);te||(J=-1),P==="up"?U=J>0?J-1:oe.length-1:P==="down"?U=(J+1)%oe.length:P==="pageup"?(U=J-T)<0&&(U=0):P==="pagedown"?(U=J+T)>oe.length-1&&(U=oe.length-1):P==="last"&&(U=oe.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:oe[U],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(iv):Fe(Fe({},iv),this.props.theme):iv}},{key:"getCommonProps",value:function(){var P=this.clearValue,T=this.cx,te=this.getStyles,oe=this.getClassNames,U=this.getValue,J=this.selectOption,Y=this.setValue,ie=this.props,ae=ie.isMulti,ce=ie.isRtl,fe=ie.options;return{clearValue:P,cx:T,getStyles:te,getClassNames:oe,getValue:U,hasValue:this.hasValue(),isMulti:ae,isRtl:ce,options:fe,selectOption:J,selectProps:ie,setValue:Y,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var P=this.props,T=P.isClearable,te=P.isMulti;return T===void 0?te:T}},{key:"isOptionDisabled",value:function(P,T){return lx(this.props,P,T)}},{key:"isOptionSelected",value:function(P,T){return ux(this.props,P,T)}},{key:"filterOption",value:function(P,T){return cx(this.props,P,T)}},{key:"formatOptionLabel",value:function(P,T){if(typeof this.props.formatOptionLabel=="function"){var te=this.props.inputValue,oe=this.state.selectValue;return this.props.formatOptionLabel(P,{context:T,inputValue:te,selectValue:oe})}return this.getOptionLabel(P)}},{key:"formatGroupLabel",value:function(P){return this.props.formatGroupLabel(P)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var P=this.props,T=P.isDisabled,te=P.isSearchable,oe=P.inputId,U=P.inputValue,J=P.tabIndex,Y=P.form,ie=P.menuIsOpen,ae=P.required,ce=this.getComponents().Input,fe=this.state,ve=fe.inputIsHidden,he=fe.ariaSelection,ye=this.commonProps,be=oe||this.getElementId("input"),_e=Fe(Fe(Fe({"aria-autocomplete":"list","aria-expanded":ie,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":ae,role:"combobox"},ie&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!te&&{"aria-readonly":!0}),this.hasValue()?he?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return te?a.createElement(ce,Be({},ye,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:be,innerRef:this.getInputRef,isDisabled:T,isHidden:ve,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:J,form:Y,type:"text",value:U},_e)):a.createElement(B5,Be({id:be,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:$a,onFocus:this.onInputFocus,disabled:T,tabIndex:J,inputMode:"none",form:Y,value:""},_e))}},{key:"renderPlaceholderOrValue",value:function(){var P=this,T=this.getComponents(),te=T.MultiValue,oe=T.MultiValueContainer,U=T.MultiValueLabel,J=T.MultiValueRemove,Y=T.SingleValue,ie=T.Placeholder,ae=this.commonProps,ce=this.props,fe=ce.controlShouldRenderValue,ve=ce.isDisabled,he=ce.isMulti,ye=ce.inputValue,be=ce.placeholder,_e=this.state,Se=_e.selectValue,Me=_e.focusedValue,Te=_e.isFocused;if(!this.hasValue()||!fe)return ye?null:a.createElement(ie,Be({},ae,{key:"placeholder",isDisabled:ve,isFocused:Te,innerProps:{id:this.getElementId("placeholder")}}),be);if(he)return Se.map((function(Le,Re){var $e=Le===Me,Ve="".concat(P.getOptionLabel(Le),"-").concat(P.getOptionValue(Le));return a.createElement(te,Be({},ae,{components:{Container:oe,Label:U,Remove:J},isFocused:$e,isDisabled:ve,key:Ve,index:Re,removeProps:{onClick:function(){return P.removeValue(Le)},onTouchEnd:function(){return P.removeValue(Le)},onMouseDown:function(Ue){Ue.preventDefault()}},data:Le}),P.formatOptionLabel(Le,"value"))}));if(ye)return null;var De=Se[0];return a.createElement(Y,Be({},ae,{data:De,isDisabled:ve}),this.formatOptionLabel(De,"value"))}},{key:"renderClearIndicator",value:function(){var P=this.getComponents().ClearIndicator,T=this.commonProps,te=this.props,oe=te.isDisabled,U=te.isLoading,J=this.state.isFocused;if(!this.isClearable()||!P||oe||!this.hasValue()||U)return null;var Y={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(P,Be({},T,{innerProps:Y,isFocused:J}))}},{key:"renderLoadingIndicator",value:function(){var P=this.getComponents().LoadingIndicator,T=this.commonProps,te=this.props,oe=te.isDisabled,U=te.isLoading,J=this.state.isFocused;return P&&U?a.createElement(P,Be({},T,{innerProps:{"aria-hidden":"true"},isDisabled:oe,isFocused:J})):null}},{key:"renderIndicatorSeparator",value:function(){var P=this.getComponents(),T=P.DropdownIndicator,te=P.IndicatorSeparator;if(!T||!te)return null;var oe=this.commonProps,U=this.props.isDisabled,J=this.state.isFocused;return a.createElement(te,Be({},oe,{isDisabled:U,isFocused:J}))}},{key:"renderDropdownIndicator",value:function(){var P=this.getComponents().DropdownIndicator;if(!P)return null;var T=this.commonProps,te=this.props.isDisabled,oe=this.state.isFocused,U={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(P,Be({},T,{innerProps:U,isDisabled:te,isFocused:oe}))}},{key:"renderMenu",value:function(){var P=this,T=this.getComponents(),te=T.Group,oe=T.GroupHeading,U=T.Menu,J=T.MenuList,Y=T.MenuPortal,ie=T.LoadingMessage,ae=T.NoOptionsMessage,ce=T.Option,fe=this.commonProps,ve=this.state.focusedOption,he=this.props,ye=he.captureMenuScroll,be=he.inputValue,_e=he.isLoading,Se=he.loadingMessage,Me=he.minMenuHeight,Te=he.maxMenuHeight,De=he.menuIsOpen,Le=he.menuPlacement,Re=he.menuPosition,$e=he.menuPortalTarget,Ve=he.menuShouldBlockScroll,Ue=he.menuShouldScrollIntoView,at=he.noOptionsMessage,Qe=he.onMenuScrollToTop,ut=he.onMenuScrollToBottom;if(!De)return null;var tt,ht=function(rt,qt){var Lt=rt.type,Pt=rt.data,zt=rt.isDisabled,Gt=rt.isSelected,Kt=rt.label,vr=rt.value,Gn=ve===Pt,Kn=zt?void 0:function(){return P.onOptionHover(Pt)},nn=zt?void 0:function(){return P.selectOption(Pt)},Wn="".concat(P.getElementId("option"),"-").concat(qt),hv={id:Wn,onClick:nn,onMouseMove:Kn,onMouseOver:Kn,tabIndex:-1};return a.createElement(ce,Be({},fe,{innerProps:hv,data:Pt,isDisabled:zt,isSelected:Gt,key:Wn,label:Kt,type:Lt,value:vr,isFocused:Gn,innerRef:Gn?P.getFocusedOptionRef:void 0}),P.formatOptionLabel(rt.data,"menu"))};if(this.hasOptions())tt=this.getCategorizedOptions().map((function(rt){if(rt.type==="group"){var qt=rt.data,Lt=rt.options,Pt=rt.index,zt="".concat(P.getElementId("group"),"-").concat(Pt),Gt="".concat(zt,"-heading");return a.createElement(te,Be({},fe,{key:zt,data:qt,options:Lt,Heading:oe,headingProps:{id:Gt,data:rt.data},label:P.formatGroupLabel(rt.data)}),rt.options.map((function(Kt){return ht(Kt,"".concat(Pt,"-").concat(Kt.index))})))}if(rt.type==="option")return ht(rt,"".concat(rt.index))}));else if(_e){var St=Se({inputValue:be});if(St===null)return null;tt=a.createElement(ie,fe,St)}else{var xt=at({inputValue:be});if(xt===null)return null;tt=a.createElement(ae,fe,xt)}var Ut={minMenuHeight:Me,maxMenuHeight:Te,menuPlacement:Le,menuPosition:Re,menuShouldScrollIntoView:Ue},tn=a.createElement(b5,Be({},fe,Ut),(function(rt){var qt=rt.ref,Lt=rt.placerProps,Pt=Lt.placement,zt=Lt.maxHeight;return a.createElement(U,Be({},fe,Ut,{innerRef:qt,innerProps:{onMouseDown:P.onMenuMouseDown,onMouseMove:P.onMenuMouseMove,id:P.getElementId("listbox")},isLoading:_e,placement:Pt}),a.createElement($5,{captureEnabled:ye,onTopArrive:Qe,onBottomArrive:ut,lockEnabled:Ve},(function(Gt){return a.createElement(J,Be({},fe,{innerRef:function(Kt){P.getMenuListRef(Kt),Gt(Kt)},isLoading:_e,maxHeight:zt,focusedOption:ve}),tt)})))}));return $e||Re==="fixed"?a.createElement(Y,Be({},fe,{appendTo:$e,controlElement:this.controlRef,menuPlacement:Le,menuPosition:Re}),tn):tn}},{key:"renderFormField",value:function(){var P=this,T=this.props,te=T.delimiter,oe=T.isDisabled,U=T.isMulti,J=T.name,Y=T.required,ie=this.state.selectValue;if(Y&&!this.hasValue()&&!oe)return a.createElement(U5,{name:J,onFocus:this.onValueInputFocus});if(J&&!oe){if(U){if(te){var ae=ie.map((function(ve){return P.getOptionValue(ve)})).join(te);return a.createElement("input",{name:J,type:"hidden",value:ae})}var ce=ie.length>0?ie.map((function(ve,he){return a.createElement("input",{key:"i-".concat(he),name:J,type:"hidden",value:P.getOptionValue(ve)})})):a.createElement("input",{name:J,type:"hidden",value:""});return a.createElement("div",null,ce)}var fe=ie[0]?this.getOptionValue(ie[0]):"";return a.createElement("input",{name:J,type:"hidden",value:fe})}}},{key:"renderLiveRegion",value:function(){var P=this.commonProps,T=this.state,te=T.ariaSelection,oe=T.focusedOption,U=T.focusedValue,J=T.isFocused,Y=T.selectValue,ie=this.getFocusableOptions();return a.createElement(L5,Be({},P,{id:this.getElementId("live-region"),ariaSelection:te,focusedOption:oe,focusedValue:U,isFocused:J,selectValue:Y,focusableOptions:ie}))}},{key:"render",value:function(){var P=this.getComponents(),T=P.Control,te=P.IndicatorsContainer,oe=P.SelectContainer,U=P.ValueContainer,J=this.props,Y=J.className,ie=J.id,ae=J.isDisabled,ce=J.menuIsOpen,fe=this.state.isFocused,ve=this.commonProps=this.getCommonProps();return a.createElement(oe,Be({},ve,{className:Y,innerProps:{id:ie,onKeyDown:this.onKeyDown},isDisabled:ae,isFocused:fe}),this.renderLiveRegion(),a.createElement(T,Be({},ve,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:ae,isFocused:fe,menuIsOpen:ce}),a.createElement(U,Be({},ve,{isDisabled:ae}),this.renderPlaceholderOrValue(),this.renderInput()),a.createElement(te,Be({},ve,{isDisabled:ae}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],S=[{key:"getDerivedStateFromProps",value:function(P,T){var te=T.prevProps,oe=T.clearFocusValueOnUpdate,U=T.inputIsHiddenAfterUpdate,J=T.ariaSelection,Y=T.isFocused,ie=T.prevWasFocused,ae=P.options,ce=P.value,fe=P.menuIsOpen,ve=P.inputValue,he=P.isMulti,ye=Va(ce),be={};if(te&&(ce!==te.value||ae!==te.options||fe!==te.menuIsOpen||ve!==te.inputValue)){var _e=fe?(function(Re,$e){return ix(ox(Re,$e))})(P,ye):[],Se=oe?(function(Re,$e){var Ve=Re.focusedValue,Ue=Re.selectValue.indexOf(Ve);if(Ue>-1){if($e.indexOf(Ve)>-1)return Ve;if(Ue<$e.length)return $e[Ue]}return null})(T,ye):null,Me=(function(Re,$e){var Ve=Re.focusedOption;return Ve&&$e.indexOf(Ve)>-1?Ve:$e[0]})(T,_e);be={selectValue:ye,focusedOption:Me,focusedValue:Se,clearFocusValueOnUpdate:!1}}var Te=U!=null&&P!==te?{inputIsHidden:U,inputIsHiddenAfterUpdate:void 0}:{},De=J,Le=Y&&ie;return Y&&!Le&&(De={value:ti(he,ye,ye[0]||null),options:ye,action:"initial-input-focus"},Le=!ie),J?.action==="initial-input-focus"&&(De=null),Fe(Fe(Fe({},be),Te),{},{prevProps:P,ariaSelection:De,prevWasFocused:Le})}}],b&&JE(v.prototype,b),S&&JE(v,S),Object.defineProperty(v,"prototype",{writable:!1}),R})(a.Component);av.defaultProps=K5;var Y5=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function dx(i){var v=i.defaultInputValue,b=v===void 0?"":v,S=i.defaultMenuIsOpen,D=S!==void 0&&S,z=i.defaultValue,G=z===void 0?null:z,R=i.inputValue,P=i.menuIsOpen,T=i.onChange,te=i.onInputChange,oe=i.onMenuClose,U=i.onMenuOpen,J=i.value,Y=On(i,Y5),ie=Ln((0,a.useState)(R!==void 0?R:b),2),ae=ie[0],ce=ie[1],fe=Ln((0,a.useState)(P!==void 0?P:D),2),ve=fe[0],he=fe[1],ye=Ln((0,a.useState)(J!==void 0?J:G),2),be=ye[0],_e=ye[1],Se=(0,a.useCallback)((function(Ve,Ue){typeof T=="function"&&T(Ve,Ue),_e(Ve)}),[T]),Me=(0,a.useCallback)((function(Ve,Ue){var at;typeof te=="function"&&(at=te(Ve,Ue)),ce(at!==void 0?at:Ve)}),[te]),Te=(0,a.useCallback)((function(){typeof U=="function"&&U(),he(!0)}),[U]),De=(0,a.useCallback)((function(){typeof oe=="function"&&oe(),he(!1)}),[oe]),Le=R!==void 0?R:ae,Re=P!==void 0?P:ve,$e=J!==void 0?J:be;return Fe(Fe({},Y),{},{inputValue:Le,menuIsOpen:Re,onChange:Se,onInputChange:Me,onMenuClose:De,onMenuOpen:Te,value:$e})}var Z5=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],hx=function(){var i=arguments.length>1?arguments[1]:void 0,v=arguments.length>2?arguments[2]:void 0,b=String(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").toLowerCase(),S=String(v.getOptionValue(i)).toLowerCase(),D=String(v.getOptionLabel(i)).toLowerCase();return S===b||D===b},sv={formatCreateLabel:function(i){return'Create "'.concat(i,'"')},isValidNewOption:function(i,v,b,S){return!(!i||v.some((function(D){return hx(i,D,S)}))||b.some((function(D){return hx(i,D,S)})))},getNewOptionData:function(i,v){return{label:v,value:i,__isNew__:!0}}},X5=(0,a.forwardRef)((function(i,v){var b=(function(S){var D=S.allowCreateWhileLoading,z=D!==void 0&&D,G=S.createOptionPosition,R=G===void 0?"last":G,P=S.formatCreateLabel,T=P===void 0?sv.formatCreateLabel:P,te=S.isValidNewOption,oe=te===void 0?sv.isValidNewOption:te,U=S.getNewOptionData,J=U===void 0?sv.getNewOptionData:U,Y=S.onCreateOption,ie=S.options,ae=ie===void 0?[]:ie,ce=S.onChange,fe=On(S,Z5),ve=fe.getOptionValue,he=ve===void 0?nx:ve,ye=fe.getOptionLabel,be=ye===void 0?tx:ye,_e=fe.inputValue,Se=fe.isLoading,Me=fe.isMulti,Te=fe.value,De=fe.name,Le=(0,a.useMemo)((function(){return oe(_e,Va(Te),ae,{getOptionValue:he,getOptionLabel:be})?J(_e,T(_e)):void 0}),[T,J,be,he,_e,oe,ae,Te]),Re=(0,a.useMemo)((function(){return!z&&Se||!Le?ae:R==="first"?[Le].concat(Yo(ae)):[].concat(Yo(ae),[Le])}),[z,R,Se,Le,ae]),$e=(0,a.useCallback)((function(Ve,Ue){if(Ue.action!=="select-option")return ce(Ve,Ue);var at=Array.isArray(Ve)?Ve:[Ve];if(at[at.length-1]!==Le)ce(Ve,Ue);else if(Y)Y(_e);else{var Qe=J(_e,_e),ut={action:"create-option",name:De,option:Qe};ce(ti(Me,[].concat(Yo(Va(Te)),[Qe]),Qe),ut)}}),[J,_e,Me,De,Le,Y,ce,Te]);return Fe(Fe({},fe),{},{options:Re,onChange:$e})})(dx(i));return a.createElement(av,Be({ref:v},b))})),px=X5,Q5=(0,a.forwardRef)((function(i,v){var b=dx(i);return a.createElement(av,Be({ref:v},b))})),vx=Number.isNaN||function(i){return typeof i=="number"&&i!=i};function J5(i,v){if(i.length!==v.length)return!1;for(var b=0;b<i.length;b++)if(!((S=i[b])===(D=v[b])||vx(S)&&vx(D)))return!1;var S,D;return!0}const lv=function(i,v){var b;v===void 0&&(v=J5);var S,D=[],z=!1;return function(){for(var G=[],R=0;R<arguments.length;R++)G[R]=arguments[R];return z&&b===this&&v(G,D)||(S=i.apply(this,G),z=!0,b=this,D=G),S}};var gx=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function yx(i){cancelAnimationFrame(i.id)}var uv=-1;function mx(i){if(i===void 0&&(i=!1),uv===-1||i){var v=document.createElement("div"),b=v.style;b.width="50px",b.height="50px",b.overflow="scroll",document.body.appendChild(v),uv=v.offsetWidth-v.clientWidth,document.body.removeChild(v)}return uv}var ri=null;function bx(i){if(i===void 0&&(i=!1),ri===null||i){var v=document.createElement("div"),b=v.style;b.width="50px",b.height="50px",b.overflow="scroll",b.direction="rtl";var S=document.createElement("div"),D=S.style;return D.width="100px",D.height="100px",v.appendChild(S),document.body.appendChild(v),v.scrollLeft>0?ri="positive-descending":(v.scrollLeft=1,ri=v.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(v),ri}return ri}var e3=function(i,v){return i};function t3(i){var v,b=i.getItemOffset,S=i.getEstimatedTotalSize,D=i.getItemSize,z=i.getOffsetForIndexAndAlignment,G=i.getStartIndexForOffset,R=i.getStopIndexForStartIndex,P=i.initInstanceProps,T=i.validateProps;return v=(function(te){function oe(J){var Y;return(Y=te.call(this,J)||this)._instanceProps=P(Y.props,qp(Y)),Y._outerRef=void 0,Y._resetIsScrollingTimeoutId=null,Y.state={instance:qp(Y),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof Y.props.initialScrollOffset=="number"?Y.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},Y._callOnItemsRendered=void 0,Y._callOnItemsRendered=lv((function(ie,ae,ce,fe){return Y.props.onItemsRendered({overscanStartIndex:ie,overscanStopIndex:ae,visibleStartIndex:ce,visibleStopIndex:fe})})),Y._callOnScroll=void 0,Y._callOnScroll=lv((function(ie,ae,ce){return Y.props.onScroll({scrollDirection:ie,scrollOffset:ae,scrollUpdateWasRequested:ce})})),Y._getItemStyle=void 0,Y._getItemStyle=function(ie){var ae,ce=Y.props,fe=ce.direction,ve=ce.itemSize,he=ce.layout,ye=Y._getItemStyleCache(ve,he,fe);if(ye.hasOwnProperty(ie))ae=ye[ie];else{var be=b(Y.props,ie,Y._instanceProps),_e=D(Y.props,ie,Y._instanceProps),Se=fe==="horizontal"||he==="horizontal",Me=fe==="rtl",Te=Se?be:0;ye[ie]=ae={position:"absolute",left:Me?void 0:Te,right:Me?Te:void 0,top:Se?0:be,height:Se?"100%":_e,width:Se?_e:"100%"}}return ae},Y._getItemStyleCache=void 0,Y._getItemStyleCache=lv((function(ie,ae,ce){return{}})),Y._onScrollHorizontal=function(ie){var ae=ie.currentTarget,ce=ae.clientWidth,fe=ae.scrollLeft,ve=ae.scrollWidth;Y.setState((function(he){if(he.scrollOffset===fe)return null;var ye=Y.props.direction,be=fe;if(ye==="rtl")switch(bx()){case"negative":be=-fe;break;case"positive-descending":be=ve-ce-fe}return be=Math.max(0,Math.min(be,ve-ce)),{isScrolling:!0,scrollDirection:he.scrollOffset<fe?"forward":"backward",scrollOffset:be,scrollUpdateWasRequested:!1}}),Y._resetIsScrollingDebounced)},Y._onScrollVertical=function(ie){var ae=ie.currentTarget,ce=ae.clientHeight,fe=ae.scrollHeight,ve=ae.scrollTop;Y.setState((function(he){if(he.scrollOffset===ve)return null;var ye=Math.max(0,Math.min(ve,fe-ce));return{isScrolling:!0,scrollDirection:he.scrollOffset<ye?"forward":"backward",scrollOffset:ye,scrollUpdateWasRequested:!1}}),Y._resetIsScrollingDebounced)},Y._outerRefSetter=function(ie){var ae=Y.props.outerRef;Y._outerRef=ie,typeof ae=="function"?ae(ie):ae!=null&&typeof ae=="object"&&ae.hasOwnProperty("current")&&(ae.current=ie)},Y._resetIsScrollingDebounced=function(){var ie,ae,ce,fe;Y._resetIsScrollingTimeoutId!==null&&yx(Y._resetIsScrollingTimeoutId),Y._resetIsScrollingTimeoutId=(ie=Y._resetIsScrolling,ae=150,ce=gx(),fe={id:requestAnimationFrame((function ve(){gx()-ce>=ae?ie.call(null):fe.id=requestAnimationFrame(ve)}))})},Y._resetIsScrolling=function(){Y._resetIsScrollingTimeoutId=null,Y.setState({isScrolling:!1},(function(){Y._getItemStyleCache(-1,null)}))},Y}nE(oe,te),oe.getDerivedStateFromProps=function(J,Y){return n3(J,Y),T(J),null};var U=oe.prototype;return U.scrollTo=function(J){J=Math.max(0,J),this.setState((function(Y){return Y.scrollOffset===J?null:{scrollDirection:Y.scrollOffset<J?"forward":"backward",scrollOffset:J,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},U.scrollToItem=function(J,Y){Y===void 0&&(Y="auto");var ie=this.props,ae=ie.itemCount,ce=ie.layout,fe=this.state.scrollOffset;J=Math.max(0,Math.min(J,ae-1));var ve=0;if(this._outerRef){var he=this._outerRef;ve=ce==="vertical"?he.scrollWidth>he.clientWidth?mx():0:he.scrollHeight>he.clientHeight?mx():0}this.scrollTo(z(this.props,J,Y,fe,this._instanceProps,ve))},U.componentDidMount=function(){var J=this.props,Y=J.direction,ie=J.initialScrollOffset,ae=J.layout;if(typeof ie=="number"&&this._outerRef!=null){var ce=this._outerRef;Y==="horizontal"||ae==="horizontal"?ce.scrollLeft=ie:ce.scrollTop=ie}this._callPropsCallbacks()},U.componentDidUpdate=function(){var J=this.props,Y=J.direction,ie=J.layout,ae=this.state,ce=ae.scrollOffset;if(ae.scrollUpdateWasRequested&&this._outerRef!=null){var fe=this._outerRef;if(Y==="horizontal"||ie==="horizontal")if(Y==="rtl")switch(bx()){case"negative":fe.scrollLeft=-ce;break;case"positive-ascending":fe.scrollLeft=ce;break;default:var ve=fe.clientWidth,he=fe.scrollWidth;fe.scrollLeft=he-ve-ce}else fe.scrollLeft=ce;else fe.scrollTop=ce}this._callPropsCallbacks()},U.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&yx(this._resetIsScrollingTimeoutId)},U.render=function(){var J=this.props,Y=J.children,ie=J.className,ae=J.direction,ce=J.height,fe=J.innerRef,ve=J.innerElementType,he=J.innerTagName,ye=J.itemCount,be=J.itemData,_e=J.itemKey,Se=_e===void 0?e3:_e,Me=J.layout,Te=J.outerElementType,De=J.outerTagName,Le=J.style,Re=J.useIsScrolling,$e=J.width,Ve=this.state.isScrolling,Ue=ae==="horizontal"||Me==="horizontal",at=Ue?this._onScrollHorizontal:this._onScrollVertical,Qe=this._getRangeToRender(),ut=Qe[0],tt=Qe[1],ht=[];if(ye>0)for(var St=ut;St<=tt;St++)ht.push((0,a.createElement)(Y,{data:be,key:Se(St,be),index:St,isScrolling:Re?Ve:void 0,style:this._getItemStyle(St)}));var xt=S(this.props,this._instanceProps);return(0,a.createElement)(Te||De||"div",{className:ie,onScroll:at,ref:this._outerRefSetter,style:Be({position:"relative",height:ce,width:$e,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:ae},Le)},(0,a.createElement)(ve||he||"div",{children:ht,ref:fe,style:{height:Ue?"100%":xt,pointerEvents:Ve?"none":void 0,width:Ue?xt:"100%"}}))},U._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var J=this._getRangeToRender(),Y=J[0],ie=J[1],ae=J[2],ce=J[3];this._callOnItemsRendered(Y,ie,ae,ce)}if(typeof this.props.onScroll=="function"){var fe=this.state,ve=fe.scrollDirection,he=fe.scrollOffset,ye=fe.scrollUpdateWasRequested;this._callOnScroll(ve,he,ye)}},U._getRangeToRender=function(){var J=this.props,Y=J.itemCount,ie=J.overscanCount,ae=this.state,ce=ae.isScrolling,fe=ae.scrollDirection,ve=ae.scrollOffset;if(Y===0)return[0,0,0,0];var he=G(this.props,ve,this._instanceProps),ye=R(this.props,he,ve,this._instanceProps),be=ce&&fe!=="backward"?1:Math.max(1,ie),_e=ce&&fe!=="forward"?1:Math.max(1,ie);return[Math.max(0,he-be),Math.max(0,Math.min(Y-1,ye+_e)),he,ye]},oe})(a.PureComponent),v.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},v}var n3=function(i,v){i.children,i.direction,i.height,i.layout,i.innerTagName,i.outerTagName,i.width,v.instance},r3=t3({getItemOffset:function(i,v){return v*i.itemSize},getItemSize:function(i,v){return i.itemSize},getEstimatedTotalSize:function(i){var v=i.itemCount;return i.itemSize*v},getOffsetForIndexAndAlignment:function(i,v,b,S,D,z){var G=i.direction,R=i.height,P=i.itemCount,T=i.itemSize,te=i.layout,oe=i.width,U=G==="horizontal"||te==="horizontal"?oe:R,J=Math.max(0,P*T-U),Y=Math.min(J,v*T),ie=Math.max(0,v*T-U+T+z);switch(b==="smart"&&(b=S>=ie-U&&S<=Y+U?"auto":"center"),b){case"start":return Y;case"end":return ie;case"center":var ae=Math.round(ie+(Y-ie)/2);return ae<Math.ceil(U/2)?0:ae>J+Math.floor(U/2)?J:ae;default:return S>=ie&&S<=Y?S:S<ie?ie:Y}},getStartIndexForOffset:function(i,v){var b=i.itemCount,S=i.itemSize;return Math.max(0,Math.min(b-1,Math.floor(v/S)))},getStopIndexForStartIndex:function(i,v,b){var S=i.direction,D=i.height,z=i.itemCount,G=i.itemSize,R=i.layout,P=i.width,T=v*G,te=S==="horizontal"||R==="horizontal"?P:D,oe=Math.ceil((te+b-T)/G);return Math.max(0,Math.min(z-1,v+oe-1))},initInstanceProps:function(i){},validateProps:function(i){i.itemSize}});function _x(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,S=new Array(v);b<v;b++)S[b]=i[b];return S}for(var o3=[],Za=0;Za<1e4;Za+=1)o3.push({value:Za,label:"Option ".concat(Za)});const i3=function(i){var v=i.options,b=i.children,S=i.maxHeight,D=(function(G,R){return(function(P){if(Array.isArray(P))return P})(G)||(function(P,T){var te=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(te!=null){var oe,U,J,Y,ie=[],ae=!0,ce=!1;try{if(J=(te=te.call(P)).next,T!==0)for(;!(ae=(oe=J.call(te)).done)&&(ie.push(oe.value),ie.length!==T);ae=!0);}catch(fe){ce=!0,U=fe}finally{try{if(!ae&&te.return!=null&&(Y=te.return(),Object(Y)!==Y))return}finally{if(ce)throw U}}return ie}})(G,R)||(function(P,T){if(P){if(typeof P=="string")return _x(P,T);var te=Object.prototype.toString.call(P).slice(8,-1);return te==="Object"&&P.constructor&&(te=P.constructor.name),te==="Map"||te==="Set"?Array.from(P):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?_x(P,T):void 0}})(G,R)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,i.getValue)(),1)[0],z=35*v.indexOf(D);return u().createElement(r3,{height:S,itemCount:b.length,itemSize:35,initialScrollOffset:z},(function(G){var R=G.index,P=G.style;return u().createElement("div",{style:P},b[R])}))};var Xa=l(970),eo={};function oi(i){return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},oi(i)}eo.styleTagTransform=lr(),eo.setAttributes=jr(),eo.insert=Dr().bind(null,"head"),eo.domAPI=Rr(),eo.insertStyleElement=Fr(),Lr()(Xa.Z,eo),Xa.Z&&Xa.Z.locals&&Xa.Z.locals;var a3=["invalid","disabled","pending","wrapperClassName","wrapperStyle","optimizeMenuList","components"];function cv(){return cv=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},cv.apply(this,arguments)}function wx(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function pr(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?wx(Object(b),!0).forEach((function(S){s3(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):wx(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function s3(i,v,b){return(v=(function(S){var D=(function(z,G){if(oi(z)!=="object"||z===null)return z;var R=z[Symbol.toPrimitive];if(R!==void 0){var P=R.call(z,"string");if(oi(P)!=="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(z)})(S);return oi(D)==="symbol"?D:String(D)})(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var Ox=function(i){var v=i.invalid,b=i.disabled,S=i.pending,D=i.wrapperClassName,z=i.wrapperStyle,G=i.optimizeMenuList,R=i.components,P=pr(pr({},(function(te,oe){if(te==null)return{};var U,J,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he={},ye=Object.keys(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||(he[fe]=ae[fe]);return he})(te,oe);if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(te);for(J=0;J<ie.length;J++)U=ie[J],oe.indexOf(U)>=0||Object.prototype.propertyIsEnumerable.call(te,U)&&(Y[U]=te[U])}return Y})(i,a3)),{},{isLoading:S,isDisabled:b,classNamePrefix:"hise-select",styles:{menuPortal:function(te){return pr(pr({},te),{},{zIndex:9999})},menu:function(te){return pr(pr({},te),{},{zIndex:9999})}}}),T=pr({},R);return G&&(T.MenuList=i3),u().createElement("div",{className:V()("hise-select__wrapper",D,{invalid:v}),style:z},u().createElement(Q5,cv({},P,{components:T})))};Ox.defaultProps={invalid:!1,disabled:!1,pending:!1,wrapperClassName:"",wrapperStyle:{}};const Ex=Ox;function ii(i){return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},ii(i)}function Qa(){return Qa=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(i[S]=b[S])}return i},Qa.apply(this,arguments)}function to(i){return(function(v){if(Array.isArray(v))return dv(v)})(i)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(i)||Sx(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function fv(i,v){return(function(b){if(Array.isArray(b))return b})(i)||(function(b,S){var D=b==null?null:typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(D!=null){var z,G,R,P,T=[],te=!0,oe=!1;try{if(R=(D=D.call(b)).next,S!==0)for(;!(te=(z=R.call(D)).done)&&(T.push(z.value),T.length!==S);te=!0);}catch(U){oe=!0,G=U}finally{try{if(!te&&D.return!=null&&(P=D.return(),Object(P)!==P))return}finally{if(oe)throw G}}return T}})(i,v)||Sx(i,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Sx(i,v){if(i){if(typeof i=="string")return dv(i,v);var b=Object.prototype.toString.call(i).slice(8,-1);return b==="Object"&&i.constructor&&(b=i.constructor.name),b==="Map"||b==="Set"?Array.from(i):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?dv(i,v):void 0}}function dv(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,S=new Array(v);b<v;b++)S[b]=i[b];return S}function xx(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(i);v&&(S=S.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,S)}return b}function Vt(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?xx(Object(b),!0).forEach((function(S){Ja(i,S,b[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):xx(Object(b)).forEach((function(S){Object.defineProperty(i,S,Object.getOwnPropertyDescriptor(b,S))}))}return i}function Ja(i,v,b){return(v=(function(S){var D=(function(z,G){if(ii(z)!=="object"||z===null)return z;var R=z[Symbol.toPrimitive];if(R!==void 0){var P=R.call(z,"string");if(ii(P)!=="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(z)})(S);return ii(D)==="symbol"?D:String(D)})(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var l3={type:"",label:"",key:"",placeholder:"",invalid:function(){return!1},disabled:function(){return!1},options:{},disableOptionFn:function(){return!1},disableOptionText:function(){return null},pending:!1,isMulti:!1,component:null,style:{},className:"col-12",additionalInputParams:{},optimizeMenuList:!1},u3=function(i){var v=i.c,b=i.editedResource,S=i.onChange,D=i.setEntireResource;return a.createElement("div",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,v.component({value:_R(b[v.key]),initialState:Vt({},b),editedResource:b,onChange:function(z){return S(v.key,z)},setEntireResource:function(z){return D(z)}}),v.invalid(b)&&a.createElement("span",{className:"invalid-feedback d-block"},v.invalidMessage))},c3=function(i){var v=i.c,b=i.editedResource,S=i.onChange;return a.createElement("div",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement("div",{className:"text-nowrap"},Object.keys(v.options).map((function(D){return a.createElement(ur,{key:D,className:"btn-sm",color:D===b[v.key]?"primary":"secondary",onClick:function(){return S(v.key,D)},disabled:v.disabled(b)},v.options[D])}))))},es=function(i,v){if(!v.groupOptionsBy)return i;var b=TR((function(S){return S[v.groupOptionsBy]}))(i);return Object.entries(b).map((function(S){var D=fv(S,2);return{label:D[0],options:D[1]}}))},f3=function(i){var v=Vt(Vt({},i),{},{data:i.data});return a.createElement(HS.Option,v,a.createElement("div",null,i.data.label),i.data.description&&a.createElement("small",null,i.data.description))},d3=function(i){var v,b=i.c,S=i.editedResource,D=i.onChange,z={};b.advancedOptions?(v=b.advancedOptions,z.Option=f3):v=Object.keys(b.options).map((function(R){return{value:R,label:b.options[R]}}));var G=b.isMulti?a.createElement(a.Fragment,null,!b.hideAddAll&&!b.disabled(S)&&a.createElement(WE,{className:"ml-2 mb-1 btn-sm",onClick:function(){return D(b.key,v.map((function(R){return R.value})))}},"Add All"),a.createElement(Ex,{value:S[b.key]?S[b.key].map((function(R){return Aa(Pa("value",String(R)))(v)})):[],options:es(v,b),placeholder:b.placeholder,onChange:function(R){return D(b.key,(R||[]).map((function(P){return P.value})))},invalid:b.invalid(S),invalidMessage:b.invalidMessage,disabled:b.disabled(S),closeMenuOnSelect:b.closeMenuOnSelect,pending:b.pending,components:z,isMulti:!0})):a.createElement(Ex,{value:Aa(Pa("value",String(S[b.key])))(v),options:es(v,b),placeholder:b.placeholder,onChange:function(R){return D(b.key,R.value)},invalid:b.invalid(S),invalidMessage:b.invalidMessage,disabled:b.disabled(S),closeMenuOnSelect:b.closeMenuOnSelect,pending:b.pending,components:z});return a.createElement("label",{className:b.className,style:b.style,key:b.key,id:b.key},b.label,G,a.createElement(Yr,{invalid:b.invalid(S),style:{display:"none"}}),a.createElement(Ko,null,b.invalidMessage))},kx=function(i){var v,b=i.c,S=i.editedResource,D=i.onChange;v=b.advancedOptions?b.advancedOptions:Object.keys(b.options).map((function(Y){return{value:Y,label:b.options[Y]}}));var z=S[b.key],G=fv(a.useState([]),2),R=G[0],P=G[1],T=[].concat(to(v),to(R));a.useEffect((function(){if(z){var Y=T.map((function(ie){return ie.value}));if(b.isMulti)z.forEach((function(ie){Y.includes(ie)||P([].concat(to(R),[{value:ie,label:ie}]))}));else{if(Y.includes(z))return;P([].concat(to(R),[{value:z,label:z}]))}}}),[b.options]);var te,oe=function(Y){Np(Y)||GE(Y)||Np(Y.value)||GE(Y.value)||(D(b.key,Y.value),T.map((function(ie){return ie.value})).includes(Y.value)||b.invalid(Vt(Vt({},S),{},Ja({},b.key,Y.value)))||P([].concat(to(R),[{value:Y.value,label:Y.value}])))},U=function(Y){if(!Np(Y)&&Y&&typeof Y!="string"){var ie=Y.map((function(ce){return ce.value}));D(b.key,ie);var ae=T.map((function(ce){return ce.value}));ie.forEach((function(ce){ae.includes(ce)||b.invalid(Vt(Vt({},S),{},Ja({},b.key,ce)))||P([].concat(to(R),[{value:ce,label:ce}]))}))}},J=b.isMulti?a.createElement(a.Fragment,null,!b.hideAddAll&&!b.disabled(S)&&a.createElement(WE,{className:"ml-2 mb-1 btn-sm",onClick:function(){return D(b.key,v.map((function(Y){return Y.value})))}},"Add All"),a.createElement(px,{value:(z||[]).map((function(Y){return Aa(Pa("value",Y))(T)})),isMulti:b.isMulti,onChange:function(Y){return U(Y)},onInputChange:function(Y){return U(Y)},options:es(T,b),pending:b.pending,placeholder:b.placeholder})):a.createElement(px,{value:{value:z,label:(te=Aa(Pa("value",z))(T),te&&te.label?te.label:"")},onChange:function(Y){return oe(Y)},onInputChange:function(Y){return oe(Y)},options:es(T,b),pending:b.pending,isValidNewOption:function(Y,ie,ae){return!ae.find((function(ce){return ce.value===Y}))},placeholder:b.placeholder});return a.createElement("label",{className:b.className,style:b.style,form:!0,key:b.key,id:b.key},b.label,J,a.createElement(Yr,{invalid:b.invalid(S),style:{display:"none"}}),a.createElement(Ko,null,b.invalidMessage))},h3=function(i){var v=i.c,b=i.editedResource,S=i.onChange,D=usePromise(v.optionsPromise,{});return a.createElement(kx,{c:Vt(Vt({},v),{},{options:D.response}),editedResource:b,onChange:S,pending:D.loading})},p3=function(i){var v=i.c,b=i.editedResource,S=i.onChange;return a.createElement("label",{className:"".concat(v.className," ml-4"),style:v.style,key:v.key,id:v.key},a.createElement(Yr,{type:v.type,checked:b[v.key]==="true"?"true":"",onChange:function(D){return S(v.key,D.target.checked.toString())},disabled:v.disabled(b)}),v.label,a.createElement(Ko,null,v.invalidMessage))},v3=function(i){var v=i.c,b=(i.editedResource,i.onChange);return a.createElement("div",{className:"".concat(v.className),style:v.style,key:v.key,id:v.key},v.label,Object.entries(v.options).map((function(S){var D=fv(S,2),z=D[0],G=D[1];return a.createElement("label",{key:z,className:"d-block ml-4"},a.createElement(Yr,{type:"radio",value:z,name:v.key,onChange:function(R){return b(v.key,z)},defaultChecked:v.default===z?"checked":""}),G)})))},g3=function(i){var v=i.c,b=i.editedResource,S=i.onChange;return a.createElement("label",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement(Yr,{type:v.type,value:b[v.key],onChange:function(D){return S(v.key,D.target.value)},placeholder:v.placeholder,invalid:v.invalid(b),disabled:v.disabled(b)}),a.createElement(Ko,null,v.invalidMessage))},y3=function(i){var v=i.c,b=i.editedResource,S=i.onChange;return a.createElement("label",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement(Yr,Qa({type:v.type,onChange:function(D){return S(v.key,D.target.files)},invalid:v.invalid(b),disabled:v.disabled(b)},v.additionalInputParams)),a.createElement(Ko,null,v.invalidMessage))},Nx=function(i){var v=i.editedResource,b=function(D,z){i.onChange(Vt(Vt({},v),{},Ja({},D,z)))},S=i.controls.filter(Boolean).map((function(D){return(function(z,G,R,P){var T=Vt(Vt({},l3),z),te={c:T,editedResource:G,onChange:R};return T.hidden&&T.hidden(G)?null:T.type==="custom"?a.createElement(u3,Qa({},te,{setEntireResource:P})):T.type==="toggle"?a.createElement(c3,te):T.type==="select"?a.createElement(d3,te):T.type==="creatableSelect"?a.createElement(kx,te):T.type==="promiseCreatableSelect"?a.createElement(h3,te):T.type==="checkbox"?a.createElement(p3,te):T.type==="radio"?a.createElement(v3,te):T.type==="file"?a.createElement(y3,te):a.createElement(g3,te)})(D,v,b,i.onChange)}));return a.createElement("section",{className:"resource-editor-controls ".concat(i.className),style:i.style},i.viewOnlyControls&&a.createElement("ul",{className:"list-unstyled"},i.viewOnlyControls.map((function(D){return a.createElement("li",null,a.createElement("strong",{className:"mr-2"},D.key,":")," ",v[D.key])}))),S)};Nx.defaultProps={className:"row",style:{},viewOnlyControls:[]}})(),c})()))})(jh)),jh.exports}var Ye=oq();const OO=se.createContext(void 0),iq=({config:e,children:t})=>H.jsx(OO.Provider,{value:{config:e},children:t}),An=()=>{const e=se.useContext(OO);if(!e)throw new Error('useHiseConfig must be used within a HiseConfigProvider. Please wrap your component tree with <HiseConfigProvider config={{ apiRoute: "..." }}>.');return e.config},EO=async(e,t,n)=>await fetch(`${n}/collaboration/replica/copyFileReplica`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),aq=e=>{const[t,n]=se.useState(!1);return e.type!=="fileLayerNode"||!e.isNodeHover?null:H.jsx("div",{className:"position-absolute",style:{right:0},children:H.jsx("span",{className:`badge rounded-pill text-white ${t?"bg-primary":"bg-secondary"}`,style:{fontSize:"1.35rem",marginTop:"0.75rem"},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:()=>{e.toggle&&e.toggle()},children:"COPY"})})},sq=e=>{const[t,n]=se.useState(!1),r=()=>n(!t);return e.type!=="fileLayerNode"?null:H.jsxs(H.Fragment,{children:[H.jsx(Ye.Button,{id:"copy-filelayer-btn",className:"btn-sm",onClick:()=>r(),children:"Copy File Set"}),H.jsx(SO,{...e,isOpen:t,toggle:r})]})},SO=({vertexId:e,certificateId:t,refresh:n,isOpen:r,toggle:o})=>{const{apiRoute:s}=An(),[l,c]=se.useState(!1),f=async()=>{c(!0);try{await EO(e,t,s).then(async d=>{if(d.ok)n&&n(),Ke.success("Copied file into workspace.");else{const a=await d.json();Ke.error("Unable to copy file: "+a.Message)}o()})}catch(d){console.log(d)}c(!1)};return H.jsx(Ye.ConfirmationModal,{id:"copy-filelayer-modal",className:"top-25",pending:l,isOpen:r,onClose:o,headerContent:"Do you want to copy all files in this file set into your workspace?",cancelButtonText:"Close",onSubmit:()=>f()})},lq=()=>{const{node:e,setNode:t,certificate:n,type:r,nodeLayers:o,setNodeLayers:s}=ot();if(!o.previous.nodes.length)return null;const l=()=>{s({previous:{nodes:[],edges:[]},current:o.previous}),t({})};return H.jsxs("div",{className:"position-absolute ml-4 mt-3",style:{zIndex:1},children:[H.jsx(Ye.Button,{id:"layer-back-button",onClick:l,icon:"fas fa-long-arrow-alt-left",children:"Back"}),H.jsx("span",{id:"subgraph-msg",className:"ml-3 me-3 mr-3 ms-3 font-italic fst-italic fw-bold font-weight-bold",children:"Currently viewing subgraph of a file set"}),H.jsx(sq,{vertexId:e.id,certificateId:n.id,type:r,refresh:e.data?.refresh})]})},uq=(e,t)=>{const n={backgroundColor:"white",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px"};switch(e){case"FileSet":case"Visualization":n.backgroundColor="yellow";break;case"File":case"IDE":n.borderColor="lightblue",t&&(n.borderColor="orange");break;default:n.borderColor="#BBBBBB";break}return n},cq=e=>({type:"text",key:"restrictionNotes",label:"Restriction Notes - Internal",invalid:n=>n.restrictionNotes.length<1}),fq=(e,t)=>Object.keys(t).filter(r=>r!==e).reduce((r,o)=>(r[o]=t[o],r),{}),dq=(e,t,n)=>{switch(e){case"reviewNode":return uq(t,n);case"readNode":case"editNode":default:return Fh(t)}},la=(e,t,n,r,o)=>{const s=hq(e,n,r,o),l=pq(t);return NO(s,l)},hq=(e,t,n,r)=>{const o={x:0,y:0},s=[];return bt(e)||hn(e)||e.forEach(l=>{const c=l.split("/")[0],f=t&&!!t[l];s.push({id:l,position:o,type:c!=="FileLayer"?n:"fileLayerNode",data:r??{},style:dq(n,c,f)})}),s},pq=e=>Object.entries(e||{}).reduce((t,[n,r])=>[...t,...r.map(o=>({id:`${n}-${o}`,source:n,target:o,type:"smoothstep",animated:!0}))],[]),xO=250,kO=75,NO=(e,t,n="LR")=>{const r=new co.graphlib.Graph;r.setDefaultEdgeLabel(()=>({}));const o=n==="LR";return r.setGraph({nodesep:70,ranksep:110,rankdir:n}),e.forEach(s=>{r.setNode(s.id,{width:xO,height:kO})}),t.forEach(s=>{r.setEdge(s.source,s.target)}),co.layout(r),e.forEach(s=>{const l=r.node(s.id);return s.targetPosition=o?Ce.Left:Ce.Top,s.sourcePosition=o?Ce.Right:Ce.Bottom,s.position={x:l.x-xO/2,y:l.y-kO/2},s}),{nodes:e,edges:t}},Fh=e=>{const t={backgroundColor:"white",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px"};switch(e){case"FileSet":case"Visualization":t.backgroundColor="yellow";break;case"IngestReceipt":t.borderColor="#EE7733";break;case"FileLayer":case"File":t.borderColor="#33BBEE";break;case"IDE":t.borderColor="#882255";break;case"Pipeline":t.borderColor="#F283EB";break;case"Process":t.borderColor="#009988";break;case"Trace":t.borderColor="#999933";break;case"Specimen":case"Sample":case"Subject":case"Cohort":t.borderColor="#BBBBBB";break;case"Submission":t.borderColor="#285222";break;case"Certificate":case"DirectUpload":t.borderColor="#F78383";break;default:t.borderColor="#eee";break}return t},TO=(e,t,n,r)=>{const o={};if(!["Sample","Subject"].includes(e)||!n||!r)return o;const s=n[t];return s&&Object.entries(s).forEach(([l,c])=>{l==="Survey Data Scheme Key"&&(o.surveyData=r[c]),l==="EMR Scheme Key"&&(o.emrData=r[c]),l==="Lab Data Scheme Key"&&(o.labData=r[c])}),o},vq=(e,t)=>{if(!t)return e;switch(e){case"FileSet":return H.jsxs(H.Fragment,{children:["Data Set",H.jsx("br",{}),`(${t.Title})`]});case"Visualization":return H.jsxs(H.Fragment,{children:[e,H.jsx("br",{}),`(${t.Title})`]});case"IngestReceipt":return"Data Ingested";case"DirectUpload":return"Data Directly Uploaded";case"FileLayer":return"File Set";case"File":return`.${t["File Extension"]} ${e}`;case"Process":case"Subject":case"IDE":case"Trace":case"Specimen":case"Sample":case"Cohort":case"Pipeline":case"Submission":case"Certificate":default:return e}},gq=(e,t)=>{if(!t)return null;switch(e){case"Cohort":case"FileSet":case"IDE":case"IngestReceipt":case"Pipeline":case"Subject":case"Submission":case"Trace":case"Visualization":return t.Description;case"Sample":return t["Visit Name"];case"Specimen":return t["Specimen Type"];case"File":return H.jsxs(H.Fragment,{children:[t["File Type"]&&H.jsxs(H.Fragment,{children:[t["File Type"],H.jsx("br",{})]}),H.jsx("span",{className:"font-italic",children:t["File Size"]}),H.jsx("br",{}),t["File Availability"]&&H.jsx("span",{className:"badge rounded-pill bg-secondary p-1 ps-2 fs-6 text-white",children:t["File Availability"]})]});case"Process":return t.Type;case"FileLayer":default:return null}},CO=(e,t,n)=>{if(n==="false")return null;switch(e){case"Visualization":return`/collaboration/visualization/${t}`;case"IngestReceipt":return`/ingest-receipts/${t}`;case"File":return`/files/${t}`;case"Process":return`/processes/${t}`;case"Sample":return`/samples/${t}`;case"Subject":return`/subjects/${t}`;case"Cohort":return`/cohorts/${t}`;case"Pipeline":return`/pipelines/${t}`;case"Submission":return`/submissions/${t}`;case"FileLayer":default:return null}},AO=(e,t,n)=>{if(!t)return e;if(n==="demographicsData")return`${e[0].toUpperCase()}${e.split(/(?=[A-Z])/).join(" ").slice(1)}`;const r=t[e];return r&&r.friendlyName?r.friendlyName:e},PO=(e,t,n,r)=>{if(!n)return t;const o=n[e];return!o||r==="demographicsData"?t:o.units?`${t} ${o.units}`:t},IO=({entries:e,scheme:t,tab:n})=>H.jsx("table",{className:"table",children:H.jsx("tbody",{children:e.map(([r,o])=>H.jsxs("tr",{children:[H.jsx("th",{scope:"row",children:AO(r,t,n)}),H.jsx("td",{children:PO(r,o,t,n)})]},r))})}),yq=({activeEntry:e,setActiveEntry:t,emrData:n})=>H.jsx("div",{className:"text-center",children:H.jsxs("div",{className:"btn-group mb-3",children:[H.jsxs("button",{className:"btn btn-secondary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false",children:["Visit Day ",e]}),H.jsx("ul",{className:"dropdown-menu",children:n.map(r=>H.jsx("li",{children:H.jsxs("button",{type:"button",className:"dropdown-item",onClick:()=>t(r.daysSinceFirstResearchVisit),children:["Visit Day ",r.daysSinceFirstResearchVisit]})},r.daysSinceFirstResearchVisit))})]})}),mq=({emrData:e,scheme:t})=>{const[n,r]=se.useState(e[0].daysSinceFirstResearchVisit),o=Object.values(e),s=o.reduce((c,f)=>({...c,[f.daysSinceFirstResearchVisit]:f}),{}),l=Object.entries(s[n].patientData);return H.jsxs(H.Fragment,{children:[H.jsx(yq,{activeEntry:n,setActiveEntry:r,emrData:o}),H.jsx(IO,{entries:l,scheme:t,tab:"emrData"})]})},bq=({metadata:e,scheme:t,activeTab:n})=>{const r=e[n],o=t[n],s=Object.entries(r||{});return n==="emrData"?H.jsx(mq,{emrData:r,scheme:o}):H.jsx(IO,{entries:s,scheme:o,tab:n})},_q=(e,t)=>t&&e==="Sample"?`${e} (${t["Visit Name"]})`:e,wq=e=>{const t=[],n=Object.keys(e);return n.length&&n.forEach(r=>{const s=e[r];bt(s)||t.push(r)}),t},MO=(e,t)=>{const n=e[t];return!(hn(n)||bt(n)||Object.values(n).every(s=>bt(s)))},Oq=({tabs:e,activeTab:t,setActiveTab:n})=>H.jsx("ul",{className:"nav justify-content-center",children:e.map(r=>H.jsx("li",{className:"nav-item",children:H.jsx("button",{type:"button",className:`nav-link btn btn-link ${t===r&&"font-weight-bold"}`,onClick:()=>n(r),children:r.split(/(?=[A-Z])/).join(" ").toUpperCase()})},r))}),qO=({label:e,node:t})=>{const{certificate:n,setNode:r}=ot();if(!["Sample","Subject"].includes(e))return null;const{metadata:o}=n,{toggleMetadataModal:s}=t.data;return!MO(o,t.id)||!s?null:H.jsx(Ye.Button,{id:"metadata-btn",color:"link",className:"p-0",style:{lineHeight:"normal"},onClick:()=>{s(),r(t)},children:H.jsx("span",{style:{fontSize:"1.75rem"},children:"≡"})},"metadata-btn")},Bh=({isOpen:e,toggle:t})=>{const{node:n,certificate:r}=ot(),{id:o}=n,{metadata:s,schemes:l,serviceLabels:c,customLabels:f,generatedLabels:d}=r,[a,u]=se.useState({}),[h,p]=se.useState({}),[O,m]=se.useState({activeTab:"",description:"",header:"",tabs:[]});se.useEffect(()=>{if(!e||bt(s)||bt(n))return;const g=s[n.id],w=o?.split("/")[0],E=f[o]||d[o],y=_q(w,E),x=wq(g),C=TO(w,o,c,l);u(g),p(C),m(N=>({...N,activeTab:x[0],description:E,header:y,tabs:x}))},[e,n,s]);const _=g=>m(w=>({...w,activeTab:g}));return H.jsx(Ye.ConfirmationModal,{scrollable:!0,isOpen:e,onClose:t,headerContent:O.header,noSubmit:!0,cancelButtonText:"Close",content:H.jsxs(H.Fragment,{children:[H.jsx(Oq,{tabs:O.tabs,activeTab:O.activeTab,setActiveTab:_}),H.jsx("div",{className:"mt-2",children:H.jsx(bq,{metadata:a,scheme:h,activeTab:O.activeTab})})]})})},Hn=({label:e,description:t})=>{const n=gq(e,t);return!n||!Object.keys(t).length?null:H.jsx("div",{className:"node-description text-center text-break",children:n})},Pn=({label:e,description:t,link:n})=>{const r=vq(e,t);return n?H.jsx("a",{href:`#${n}`,target:"_blank",rel:"noreferrer",className:"node-label text-break flex-fill",children:e}):H.jsx("div",{className:"node-label text-break flex-fill",children:r})},ua=e=>{const{id:t}=e,{customLabels:n,generatedLabels:r}=ot().certificate,o=t.split("/")[0],s=n?.[t]||r?.[t];return H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2",style:{width:"250px"},children:[H.jsxs("div",{className:"d-flex align-items-center",children:[H.jsx(Pn,{label:o,description:s}),H.jsx(qO,{label:o,node:e})]}),H.jsx(Hn,{label:o,description:s})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},Eq=e=>e==="Pipeline"?"workspacePipelineNode":e==="IDE"?"workspaceIDENode":e==="File"?"workspaceFileNode":e==="FileLayer"?"fileLayerNode":"readNode",Sq=(e,t)=>{if(!t){const n={backgroundColor:"white",color:"#BBBBBB",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px",borderColor:"#eee"};return e==="FileLayer"?{...n,borderWidth:"6px",borderColor:"#36454F",color:"#36454F"}:n}return Fh(e)},xq=(e,t,n)=>{const r={x:0,y:0},o=[];return!e||!Object.keys(e).length||e.forEach(s=>{const l=s.split("/")[0],c=t.matches[s];o.push({id:s,position:r,type:Eq(l),data:n,style:Sq(l,c)})}),o},kq=e=>{if(!e||bt(e))return[];const t=[],n=[];return Object.entries(e).forEach(([r,o])=>{o.forEach(s=>{t.push({id:`${r}-${s}`,source:r,target:s,type:"smoothstep",animated:!0}),n.push({id:`${r}-${s}-replica`,source:`${r}-replica`,target:`${s}-replica`,type:"smoothstep",animated:!0})})}),[...t,...n]},LO=(e,t,n,r)=>{const o=xq(e,n,r),s=kq(t),{nodes:l,edges:c}=NO(o,s);return{nodes:l,edges:c}},RO=async(e,t,n)=>{const r=[];return Object.entries(t).forEach(([s,l])=>{l.includes(e)&&s.includes("File")&&!n[s]&&r.push(s)}),r},DO=async(e,t,n)=>{const r=[];for(const o of e){const s=await fetch(`${n}/collaboration/replica/copyFileReplica`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:o,certificateGuid:t,certificateType:"Public"})});r.push(s)}return Promise.all(r)},Nq=e=>{const{setNode:t,certificate:n,replica:r,nodesState:o,edgesState:s,type:l,nodeLayers:c,setNodeLayers:f}=ot(),{customLabels:d,generatedLabels:a}=n,{data:u}=e,h=e.id.split("/")[0],p=d[e.id]||a[e.id],O=n.subgraphs[e.id],[m,_]=o,[g,w]=s,[E,y]=se.useState(!1),[x,C]=se.useState(!1),N=()=>C(!x),I=(M,A)=>l==="fileLayerNode"?LO(M,O.edges,r,A):la(M,O.edges,n.restrictedAssets,l,A),j=()=>{const M=Object.keys(O.vertices),A=I(M,u);_(A.nodes),w(A.edges),f({previous:c.current,current:{nodes:A.nodes,edges:A.edges}}),t(e)};return H.jsx(H.Fragment,{children:H.jsxs("div",{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsx("div",{className:`p-2 ${E?"expand-hover":""}`,style:{width:"250px"},children:H.jsxs("div",{className:"d-flex align-items-center",onClick:j,children:[H.jsx(Pn,{label:h,description:p}),H.jsx("i",{className:"fas fa-expand-alt"})]})}),H.jsx(vt,{type:"source",position:Ce.Right}),H.jsx(aq,{vertexId:e.id,certificateId:n.id,type:l,isNodeHover:E,toggle:N}),H.jsx(SO,{vertexId:e.id,certificateId:n.id,refresh:u.refresh,isOpen:x,toggle:N})]})})},Tq=(e,t,n,r)=>{const o=V1([e],t[n]);r({...t,[n]:o})},Cq=(e,t,n,r,o)=>{n({...t,emrData:[...t?.emrData?.slice(0,o),{...r,patientData:V1([e],r.patientData)},...t?.emrData?.slice(Number(o)+1)]})};var zh=(e=>(e.labData="labData",e.surveyData="surveyData",e.demographicsData="demographicsData",e.emrData="emrData",e))(zh||{});const Aq=e=>{const t=()=>e.update({...e.currMetadata,[e.dataType]:{}});return H.jsx(Ye.Button,{className:"mt-3 mb-2 float-right",onClick:t,children:`${jO[e.dataType]}: Mask All`})},Pq=({children:e})=>H.jsxs("table",{className:"table",children:[H.jsx("thead",{children:H.jsxs("tr",{children:[H.jsx("th",{scope:"col"}),H.jsx("th",{scope:"col",children:"Variable"}),H.jsx("th",{scope:"col",children:"Value"})]})}),H.jsx("tbody",{children:e})]}),Hh=({type:e,metadata:t,setMetadata:n,emrEntry:r,emrIndex:o,ingestUiProps:s})=>{let l;s&&s.schemes?l=s.schemes:l=ot().certificate.schemes;const c=l[e],f=Object.entries(e!==zh.emrData?t[e]:r.patientData),d=u=>{e===zh.emrData?Cq(u[0],t,n,r,o):Tq(u[0],t,e,n)},a=()=>f.map(u=>H.jsxs("tr",{children:[H.jsx("td",{children:H.jsx(Ye.Button,{icon:"fas fa-times",color:"link",className:"btn-sm text-danger",noText:!0,onClick:()=>d(u)},`${u}-mask-btn`)}),H.jsx("td",{children:AO(u[0],c,e)}),H.jsx("td",{children:PO(u[0],u[1],c,e)})]},u[0]));return H.jsxs(H.Fragment,{children:[H.jsx(Aq,{dataType:e,currMetadata:t,update:n}),H.jsx(Pq,{children:a()})]})};Hh.defaultProps={emrEntry:null,emrIndex:null};const Iq=({data:e,entry:t,setEntry:n})=>H.jsx("div",{className:"text-center mt-3",children:H.jsxs("div",{className:"dropdown",children:[H.jsxs("button",{className:"btn btn-secondary dropdown-toggle",type:"button",id:"emrDropdownBtn","data-bs-toggle":"dropdown","aria-expanded":"false",children:["Visit Day"," ",t.daysSinceFirstResearchVisit]}),H.jsx("ul",{className:"dropdown-menu","aria-labelledby":"emrDropdownBtn",children:Object.entries(e).map(([r,o])=>H.jsx("li",{children:H.jsxs("button",{type:"button",className:"dropdown-item",onClick:()=>n(r),children:["Visit Day"," ",o.daysSinceFirstResearchVisit]})},r))})]})}),Mq=({type:e,metadata:t,setMetadata:n,ingestUiProps:r})=>{const o=t[e],[s,l]=se.useState(0);return!t||bt(t)||!o||bt(o)?null:H.jsxs(H.Fragment,{children:[H.jsx(Iq,{data:o,entry:o[s],setEntry:l}),H.jsx(Hh,{type:e,metadata:t,setMetadata:n,emrEntry:o[s],emrIndex:s,ingestUiProps:r})]})},jO={labData:"Lab Results",surveyData:"Survey Data",emrData:"EMR Data",demographicsData:"Demographics Data"},qq=({node:e})=>{const{certificate:t,setNode:n}=ot(),{metadata:r}=t;return MO(r,e.id)?H.jsx(Ye.Button,{id:"mask-btn",color:"link",className:"text-warning px-1 pt-0",onClick:()=>{e.data.toggleMaskModal(),n(e)},children:"MASK"},"mask-btn"):null},FO=({isOpen:e,loading:t,toggle:n,handleUpdate:r,refresh:o,ingestUiNode:s})=>{const{node:l,certificate:c}=s||ot(),{setNode:f}=ot(),{metadata:d,customLabels:a}=c,[u,h]=se.useState({}),[p,O]=se.useState("");se.useEffect(()=>{bt(d)||bt(l)||h(d[l.id])},[l,d]);const m=u?Object.keys(u):[],_=()=>{n(),f({}),O("")},g=()=>{const w={...c,metadata:{...d,[l.id]:u},customLabels:a};r(w).then(E=>{if(E.status===200){const{labelsId:y,metadataId:x}=E.data;n(),o(y,x),O("")}else O(E.data.Message)})};return H.jsx(Ye.ConfirmationModal,{id:"mask-metadata-modal",scrollable:!0,isOpen:e,onClose:n,headerContent:"Mask Node Metadata",noSubmit:!0,noCancel:!0,content:H.jsxs(H.Fragment,{children:[p&&!t&&H.jsx(Ye.MessageStripe,{message:p,color:"danger",dismissible:!1}),H.jsx(Ye.HISETabs,{activeTab:m[0],tabs:m.map(w=>{const E=w,y=hn(u[E])||bt(u[E]);return{key:w,label:jO[w]||w,hideTab:y,content:w==="emrData"?H.jsx(Mq,{type:E,metadata:u,setMetadata:h,ingestUiProps:{schemes:s?.certificate.schemes}}):H.jsx(Hh,{type:E,metadata:u,setMetadata:h,ingestUiProps:{schemes:s?.certificate.schemes}})}})})]}),customFooter:H.jsxs("div",{className:"float-right",children:[t&&H.jsx("div",{className:"spinner-grow spinner-grow-sm text-warning",role:"status"}),H.jsx(Ye.Button,{id:"cancel-btn",icon:"fas fa-times",noText:!0,className:"mx-2",onClick:_}),H.jsx(Ye.Button,{id:"ok-btn",icon:"fas fa-check",color:"primary",onClick:g,children:"Update Metadata"})]})})},Lq=(e,t)=>{if(!t)return null;switch(e){case"Cohort":case"IDE":case"IngestReceipt":case"Subject":case"Trace":return[{type:"text",key:"Description",label:"Description",invalid:n=>!n||n.length>50}];case"Sample":return Object.keys(t).map(n=>["Experiment Comments","Experiment Count","Type","Draw Date"].includes(n)?null:{type:"text",key:n,label:n,invalid:r=>!r||r.length>50});case"Specimen":return[{type:"text",key:"Specimen Type",label:"Specimen Type",invalid:n=>!n||n.length>50}];case"Process":return[{type:"text",key:"Type",label:"Description",invalid:n=>!n||n.length>50}];case"File":case"FileSet":case"Pipeline":case"Submission":case"Visualization":default:return Object.keys(t).map(n=>({type:"text",key:n,label:n,invalid:r=>!r||r.length>50}))}},Rq=({node:e})=>{const{setNode:t}=ot();return H.jsx(Ye.Button,{id:"edit-btn",color:"link",className:"text-info px-1 pt-0 ml-2",onClick:()=>{e.data.toggleEditModal(),t(e)},children:"EDIT"},"edit-btn")},BO=({isOpen:e,loading:t,toggle:n,handleUpdate:r,refresh:o,ingestUiNode:s})=>{const{node:l,certificate:c}=s||ot(),{customLabels:f,generatedLabels:d,metadata:a}=c,[u,h]=se.useState(""),[p,O]=se.useState({}),m=()=>O({});if(se.useEffect(()=>{if(!l?.id)return;const y=f[l.id]||d[l.id];y&&O(y)},[l.id]),!l?.id)return null;const _=l?.id.split("/")[0],g=y=>O(y),w=()=>{const y={...c,metadata:a,customLabels:{...f,[l.id]:p}};r(y).then(x=>{if(x.status===200){const{labelsId:C,metadataId:N}=x.data;n(),m(),o(C,N),h("")}else h(x.data.Message)})},E=()=>{n(),m(),h("")};return H.jsx(Ye.ConfirmationModal,{scrollable:!0,isOpen:e,onClose:n,headerContent:"Edit Node Label",noSubmit:!0,noCancel:!0,content:H.jsxs(H.Fragment,{children:[u&&!t&&H.jsx(Ye.MessageStripe,{message:u,color:"danger",dismissible:!1}),H.jsx(Ye.ResourceEditor,{className:"",onChange:g,editedResource:p,controls:Lq(_,p)})]}),customFooter:H.jsxs("div",{className:"float-right",children:[t&&H.jsx("div",{className:"spinner-grow spinner-grow-sm text-warning",role:"status"}),H.jsx(Ye.Button,{id:"cancel-btn",icon:"fas fa-times",className:"mx-2",noText:!0,onClick:E}),H.jsx(Ye.Button,{id:"ok-btn",icon:"fas fa-check",noText:!0,color:"primary",onClick:w})]})})},Dq=e=>{const{customLabels:t,generatedLabels:n,isExecutable:r}=ot().certificate,{id:o}=e,[s,l]=o.split("/"),c=t[o]||n[o],f=CO(s,l,r);return H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2",style:{width:"250px"},children:[H.jsxs("div",{className:"label",children:[H.jsx(Pn,{link:f,label:s,description:c}),H.jsx(Rq,{node:e}),H.jsx(qq,{node:e})]}),H.jsx(Hn,{label:s,description:c})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},jq=({node:e})=>{const{setNode:t}=ot(),{toggleReviewModal:n}=e.data,r=e.id.split("/")[0];return["File","IDE"].includes(r)?H.jsx(Ye.Button,{id:"review-node-btn",color:"link",className:"text-info px-1 pt-0 ml-2",icon:"fa-edit",noText:!0,onClick:()=>{n(),t(e)}},"review-node-btn"):null},Fq=e=>{const{certificate:t}=ot(),{id:n}=e,[r,o]=n.split("/"),s=t.customLabels[n]||t.generatedLabels[n],l=CO(r,o,t.isExecutable);return H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2",style:{width:"250px"},children:[H.jsxs("div",{className:"d-flex align-items-center",children:[H.jsx(Pn,{link:l,label:r,description:s}),H.jsx(jq,{node:e}),H.jsx(qO,{label:r,node:e})]}),H.jsx(Hn,{label:r,description:s})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},$h=e=>{const{certificate:t,replica:n}=ot(),{customLabels:r,generatedLabels:o}=t,[s,l]=se.useState(!1),c=e.id.split("/")[0],f=r[e.id]||o[e.id],d=n.matches[e.id];return H.jsxs(H.Fragment,{children:[e.modal,H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:`p-2 text-center ${s&&!d?"action-hover":""}`,style:{width:"250px"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>d?{}:e.toggle(),children:[H.jsx(Pn,{label:c,description:f}),H.jsx(Hn,{label:c,description:f})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},Bq=e=>{const{isOpen:t,toggle:n,restrictedAsset:r}=e;if(!r)return null;const o=()=>{const s={restrictionInstructions:"Instructions for Retrieval",restrictionNotes:"Restriction Notes"};return H.jsxs(H.Fragment,{children:[H.jsx("h6",{children:s.restrictionNotes}),H.jsx("p",{children:r.restrictionNotes}),H.jsx("h6",{children:s.restrictionInstructions}),H.jsx("div",{dangerouslySetInnerHTML:{__html:r.restrictionInstructions}})]})};return H.jsx(Ye.ConfirmationModal,{id:"restricted-node-notes-modal",isOpen:t,onClose:n,headerContent:"This asset has been restricted.",cancelButtonText:"Close",noSubmit:!0,content:H.jsx(o,{})})},zO=e=>{const{restrictedAsset:t}=e,{certificate:n}=ot(),{customLabels:r,generatedLabels:o}=n,[s,l]=se.useState(!1),c=()=>l(!s),f=e.id.split("/")[0],d=r[e.id]||o[e.id];return H.jsxs(H.Fragment,{children:[H.jsx(Bq,{restrictedAsset:t,isOpen:s,toggle:c}),H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{style:{width:"250px"},onClick:c,children:[H.jsxs("div",{className:"label d-flex p-1",children:[H.jsx(Pn,{label:f,description:d}),H.jsx(Ye.Button,{id:`${e.id}-restricted-btn`,className:"btn-sm text-warning btn-link",icon:"fas fa-lock",noText:!0,onClick:c})]}),H.jsx(Hn,{label:f,description:d})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},zq=e=>{const{apiRoute:t}=An(),{certificate:n}=ot(),[r,o]=se.useState(!1),[s,l]=se.useState(!1),c=()=>l(!s),f=n.restrictedAssets&&n.restrictedAssets[e.id];if(f)return H.jsx(zO,{...e,restrictedAsset:f});const d=async()=>{o(!0);try{await EO(e.id,n.id,t).then(async a=>{if(a.ok)e.data.refresh(),Ke.success("Copied file into workspace.");else{const u=await a.json();Ke.error("Unable to copy file: "+u.Message)}c()})}catch(a){console.log(a)}o(!1)};return H.jsx($h,{id:e.id,data:e.data,modal:H.jsx(Ye.ConfirmationModal,{id:"copy-file-modal",pending:r,isOpen:s,onClose:c,headerContent:"Copy this file?",cancelButtonText:"Close",onSubmit:()=>d()}),toggle:c})};var qo=(e=>(e.Completed="Completed",e.Failure="Failure",e.Running="Running",e.Processing="Processing",e.Initiated="Initiated",e))(qo||{});const Hq={Completed:"bg-success",Failure:"bg-danger text-white",Running:"bg-info text-white",Processing:"bg-info text-white",Initiated:"bg-info text-white"},$q=({pipeline:e,replicaPipelineOperation:t,refresh:n})=>{const{apiRoute:r}=An(),[o,s]=se.useState(!1),l=()=>s(!o);return hn(e)||bt(e)||e.status!==qo.Failure&&t.operationStatus!=="Errored"?null:H.jsxs(H.Fragment,{children:[H.jsx(Ye.Button,{id:`retry-${e.id}-pipeline-btn`,color:"link",onClick:()=>{l()},children:"RETRY?"}),H.jsx(Ye.ConfirmationModal,{id:`retry-${e.id}-pipeline-modal`,isOpen:o,onClose:l,headerContent:"Do you want to retry running this pipeline?",content:"Seems that the process ran into an error.",submitButtonText:"Retry",onSubmit:async()=>{fetch(`${r}/tracer/admin/pipeline/process/retry/${e.mainProcessID}`,{method:"POST",credentials:"include"}).then(async c=>{if(c.ok)Ke.success("Successfully reinitiated pipeline run."),setTimeout(()=>n(),1500);else{const f=await c.json();Ke.error("Unable to reinitiate pipeline run: "+f.Message)}}),l()}})]})},Vq=({pipeline:e,refresh:t})=>{const{apiRoute:n}=An(),{certificate:r}=ot(),[o,s]=se.useState(!1),l=()=>s(!o);return hn(e)||bt(e)||[qo.Failure,qo.Completed].includes(e.status)?null:H.jsxs(H.Fragment,{children:[H.jsx(Ye.Button,{id:`stop-${e.id}-pipeline-btn`,color:"link",onClick:l,children:"STOP?"}),H.jsx(Ye.ConfirmationModal,{id:`stop-${e.id}-pipeline-modal`,isOpen:o,onClose:l,headerContent:"Do you want to stop running this pipeline?",submitButtonText:"Stop Pipeline",onSubmit:async()=>{fetch(`${n}/collaboration/replica/stopPipelineReplica?projectGuid=${e.projectGuid}&overrideActiveRun=true`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:e.id,certificateGuid:r.id,certificateType:"Public"})}).then(async c=>{if(c.ok)t(),Ke.success("Successfully stopped this pipeline run.");else{const f=await c.json();Ke.error("Unable to stop pipeline run: "+f.Message)}}),l()}})]})},Uq=({status:e,replicaPipelineOperation:t,pipelineId:n})=>{const r=()=>{n&&window.open(`#/data-mgt/pipeline-dashboard/${n}`,"_blank")},o=t?.operationStatus=="Errored"?qo.Failure:e;return H.jsxs("section",{children:[H.jsxs("span",{className:`badge rounded-pill ${Hq[o]}`,style:{fontSize:"1.25rem"},onClick:r,children:[o," ",H.jsx("i",{className:"fa-solid fa-plus"})]}),t?.operationStatus=="Errored"&&t?.failureMessage&&H.jsx("p",{className:"mt-3",children:H.jsx("small",{children:t.failureMessage})})]})},HO=({pipeline:e,replicaPipelineOperation:t,refresh:n})=>hn(e)||bt(e)?null:H.jsxs("div",{className:"text-center",children:[H.jsx(Uq,{status:e.status,replicaPipelineOperation:t,pipelineId:e.id}),H.jsx($q,{pipeline:e,replicaPipelineOperation:t,refresh:n}),H.jsx(Vq,{pipeline:e,refresh:n})]}),Gq=e=>{const{apiRoute:t}=An(),{replica:n,certificate:r}=ot(),{customLabels:o,generatedLabels:s}=r,{refresh:l}=e.data,[c,f]=se.useState(null),d=e.id.split("/")[0],a=o[e.id]||s[e.id],u=e.id.replace("-replica",""),h=n?.matches[u],p=n.replicaOperations[h];return se.useEffect(()=>{h&&(async()=>{const m=h.replace("Pipeline/","");await fetch(`${t}/ledger/pipeline/${m}`,{method:"GET",credentials:"include"}).then(async _=>{if(_.ok){const g=await _.json();f(g)}})})()},[n,e.id,t]),H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2",style:{width:"250px"},children:[H.jsx(Pn,{label:d,description:a}),H.jsx(Hn,{label:d,description:a}),H.jsx(HO,{pipeline:c,replicaPipelineOperation:p,refresh:l})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},$O=({loading:e,isOpen:t,toggle:n,onStartPipeline:r})=>H.jsx(Ye.ConfirmationModal,{id:"run-pipeline-modal",scrollable:!0,pending:e,isOpen:t,onClose:n,headerContent:"Run this pipeline?",content:"Running this pipeline will also copy any input files that haven't been pulled into your workspace yet.",cancelButtonText:"Close",onSubmit:()=>r()}),Kq=async(e,t,n)=>await fetch(`${n}/collaboration/replica/runPipelineReplica`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),VO=async(e,t,n,r,o,s,l)=>{const c=await RO(e,n,r);await DO(c,t,l).then(async d=>d.length?d.every(a=>a.ok):!0)?await Kq(e,t,l).then(async d=>{if(d.ok)Ke.success("Started pipeline.");else{const a=await d.json();Ke.error("Unable to start pipeline: "+a.Message)}o(),s()}):(o(),Ke.error("Unable to copy some of the necessary input files."))},Wq=e=>{const{apiRoute:t}=An(),{certificate:n,replica:r}=ot(),[o,s]=se.useState(!1),[l,c]=se.useState(!1),f=()=>c(!l);if(r.matches[e.id])return H.jsx(Gq,{...e});const a=async()=>{s(!0);try{await VO(e.id,n.id,n.edges,r.matches,e.data.refresh,f,t)}catch(u){console.log(u)}s(!1)};return H.jsx($h,{id:e.id,data:e.data,modal:H.jsx($O,{loading:o,isOpen:l,toggle:f,onStartPipeline:a}),toggle:f})},Yq=e=>{const{replica:t,certificate:n}=ot(),{customLabels:r,generatedLabels:o}=n,s=e.id.split("/")[0],l=r[e.id]||o[e.id],c=e.id.replace("-replica",""),f=t?.matches[c],d=()=>{f&&window.open("#/ide-nextgen","_blank")};return H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2",style:{width:"250px"},onClick:()=>d(),children:[H.jsx(Pn,{label:s,description:l}),H.jsx(Hn,{label:s,description:l}),H.jsx("section",{className:"text-center mt-2",children:H.jsxs("span",{className:"badge bg-primary text-white",children:["IDE LIST ",H.jsx("i",{className:"fas fa-external-link-alt"})]})})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})},UO=({loading:e,isOpen:t,toggle:n,onStartIDE:r})=>H.jsx(Ye.ConfirmationModal,{id:"clone-ide-modal",className:"top-25",pending:e,isOpen:t,onClose:n,headerContent:"Do you want to clone the environment of the original IDE into your workspace?",cancelButtonText:"Close",onSubmit:()=>r()}),Zq=async(e,t,n)=>await fetch(`${n}/collaboration/replica/cloneIdeReplica`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),GO=async(e,t,n,r,o,s,l)=>{const c=await RO(e,n,r);await DO(c,t,l).then(async d=>d.length?d.every(a=>a.ok):!0)?await Zq(e,t,l).then(async d=>{if(d.ok)Ke.success("Started IDE.");else{const a=await d.json();Ke.error("Unable to start IDE: "+a.Message)}o(),s()}):(o(),Ke.error("Unable to copy some of the necessary input files."))},Xq=e=>{const{apiRoute:t}=An(),{certificate:n,replica:r}=ot(),[o,s]=se.useState(!1),[l,c]=se.useState(!1),f=()=>c(!l),d=n.restrictedAssets&&n.restrictedAssets[e.id];if(d)return H.jsx(zO,{...e,restrictedAsset:d});if(r.matches[e.id])return H.jsx(Yq,{...e});const u=async()=>{s(!0);try{await GO(e.id,n.id,n.edges,r.matches,e.data.refresh,f,t)}catch(h){console.log(h)}s(!1)};return H.jsx($h,{id:e.id,data:e.data,modal:H.jsx(UO,{loading:o,isOpen:l,toggle:f,onStartIDE:u}),toggle:f})},Vh=250,Uh=120,KO=(e,t,n="LR")=>{const r=new co.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({nodesep:70,ranksep:110,rankdir:n}),e.forEach(o=>{r.setNode(o.id,{width:Vh,height:Uh})}),t.forEach(o=>{r.setEdge(o.source,o.target)}),co.layout(r),e.forEach(o=>{const s=r.node(o.id);return o.targetPosition=n==="LR"?Ce.Right:Ce.Left,o.sourcePosition=n==="LR"?Ce.Left:Ce.Right,o.position={x:s.x-Vh/2,y:s.y-Uh/2},o}),{nodes:e,edges:t}},WO=(e,t,n,r=!0)=>{let o=[...e];return t.forEach(s=>{const l=e.find(f=>f.id===s),c=s.includes("Layer")?!n.subgraphs[s]:!1;if(!l)if(r&&c)o=o;else{const[f]=s.split("/"),d=n.customLabels?.[s]||n.generatedLabels?.[s],a={id:s,position:{x:0,y:0},type:"walkingNode",data:{description:d},style:Fh(f)};o=[...o,a]}}),o},YO=(e,t)=>{let n=[...e];return Object.entries(t||{}).forEach(o=>{const[s,l]=o;l.map(c=>{if(!e.find(d=>d.id.match(s)&&d.id.match(c))){const d={id:`${s}-${c}`,source:s,target:c,animated:!0};n=[...n,d]}})}),n},Qq=e=>{if(!e)return"";const[t,n]=e.split("/");switch(t){case"FileSet":return`/#/collaboration/filesets/${n}`;case"File":return`/#/files/${n}`;case"Visualization":return`/#/collaboration/visualizations/${n}`;case"IDE":return`/#/collaboration/ide/${n}`;case"IngestReceipt":return`/#/ingest-receipts/${n}`;case"Process":return`/#/processes/${n}`;case"Pipeline":return`/#/data-mgt/pipeline-dashboard/${n}`;case"Subject":return`/#/subjects/${n}`;case"Sample":return`/#/samples/${n}`;case"Cohort":return`/#/cohorts/${n}`;default:return""}},ZO=({id:e})=>{const{apiRoute:t}=An(),n=ea(),{node:r,setNode:o,nodesState:s,edgesState:l,certificate:c,setNodeLayers:f}=ot(),[d,a]=se.useState({label:"",description:"",isLayer:!1}),[u,h]=se.useState(!1),[p,O]=s,[m,_]=l,g=n.getNode(e);se.useEffect(()=>{const A=k=>{const F=k.match(/^(.*)Layer/);if(!F)return k;switch(F[1]){case"File":case"FileSet":case"IDE":case"Sample":case"Specimen":case"Visualization":return`${F[1]}s`;case"Process":return`${F[1]}es`;default:return"Items"}},q={description:g?.data?.description},L=e.split("/")[0];if(L.includes("Layer")){const k=Object.keys(c.subgraphs[e].vertices).length,F=A(L);a({...q,label:`${F} (${k})`,isLayer:!0})}else a({...q,label:L,isLayer:!1})},[g]);const w=async A=>{const q=A==="right"?`${t}/collaboration/neighbors?root=${e}&getDescendants=true`:`${t}/collaboration/neighbors?root=${e}&getAncestors=true`;await fetch(q,{method:"GET",credentials:"include"}).then(async L=>{if(L.ok){const k=await L.json(),{vertices:F,edges:V,customLabels:ne,generatedLabels:ue}=k,K=WO(p,F,{...c,customLabels:ne,generatedLabels:ue},!0),W=YO(m,V),B=KO(K,W);O(B.nodes),_(B.edges),f({previous:{nodes:[],edges:[]},current:{nodes:B.nodes,edges:B.edges}})}})},E=async()=>{setTimeout(()=>{const A=n.getViewport();g&&n.setCenter(g.position.x,g.position.y,{zoom:A.zoom,duration:1e3})},1e3)},y=async A=>{A.preventDefault(),await w("left"),await E()},x=async A=>{A.preventDefault(),await w("right"),await E()},C=()=>{g&&o(g)},N=()=>h(!0),I=()=>h(!1),j=()=>d.isLayer?null:H.jsxs(H.Fragment,{children:[H.jsx("a",{type:"button",target:"_blank",onClick:y,className:`${u?"visible":"invisible"} btn btn-light`,children:"BACK"}),H.jsx("a",{type:"button",target:"_blank",onClick:x,className:`${u?"visible":"invisible"} btn btn-light`,children:"NEXT"})]}),M=()=>u?"10px solid rgba(0, 0, 0, .1)":g?.id===r.id?"10px solid #1976D2":"";return H.jsxs(H.Fragment,{children:[H.jsx(vt,{type:"target",position:Ce.Left}),H.jsxs("div",{className:"p-2 d-flex align-items-center justify-content-center flex-wrap",style:{width:`${Vh}px`,minHeight:`${Uh}px`,border:M()},onMouseEnter:N,onMouseLeave:I,children:[H.jsxs("div",{className:"w-100",onClick:C,children:[H.jsx(Pn,{label:d.label,description:d.description}),H.jsx(Hn,{label:d.label,description:d.description})]}),H.jsx("div",{className:"position-absolute node-description w-100 d-flex justify-content-between align-self-end px-2",children:j()})]}),H.jsx(vt,{type:"source",position:Ce.Right})]})};new co.graphlib.Graph().setDefaultEdgeLabel(()=>({}));const Jq=({certificate:e,graph:t,children:n})=>{const{nodesState:r,edgesState:o,nodeLayers:s,setNodeLayers:l}=ot(),c=se.useMemo(()=>({readNode:ua,fileLayerNode:Nq,fileNode:ua,pipelineNode:ua,IDENode:ua,walkingNode:ZO,editNode:Dq,reviewNode:Fq,workspaceFileNode:zq,workspacePipelineNode:Wq,workspaceIDENode:Xq}),[]),[,f,d]=r,[,a,u]=o;return se.useEffect(()=>{hn(e)||bt(e)||(f(t.nodes),a(t.edges),l({previous:s.previous,current:{nodes:t.nodes,edges:t.edges}}))},[e]),H.jsxs("div",{className:"layoutflow",children:[H.jsx(lq,{}),n,H.jsxs(Ih,{nodes:s.current.nodes,edges:s.current.edges,onNodesChange:d,onEdgesChange:u,connectionLineType:gn.SmoothStep,nodeTypes:c,onlyRenderVisibleElements:!0,edgesUpdatable:!1,defaultViewport:{x:0,y:0,zoom:.6},children:[H.jsx(cO,{}),H.jsx(dO,{}),H.jsx(lO,{})]})]})},ca=({type:e,certificate:t,replica:n,graph:r,children:o})=>H.jsxs(_O,{type:e,certificate:t,replica:n,children:[H.jsx("div",{style:{height:"75vh"},children:H.jsx(Jq,{certificate:t,graph:r,children:o})}),H.jsx(Rh,{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"})]}),eL=({certificate:e})=>{const[t,n]=se.useState(!1),r=()=>n(!t),o="readNode",s={toggleMetadataModal:r},l=la(e.vertices,e.edges,e.restrictedAssets,o,s);return H.jsx(ca,{type:o,certificate:e,graph:l,children:H.jsx(Bh,{isOpen:t,toggle:r})})},tL=({certificate:e,loading:t,handleUpdate:n,refresh:r})=>{const[o,s]=se.useState(!1),l=()=>s(!o),[c,f]=se.useState(!1),d=()=>f(!c),a="editNode",u={toggleEditModal:l,toggleMaskModal:d},h=la(e.vertices,e.edges,e.restrictedAssets,a,u);return H.jsxs(ca,{type:a,certificate:e,graph:h,children:[H.jsx(BO,{isOpen:o,loading:t,toggle:l,handleUpdate:n,refresh:r}),H.jsx(FO,{isOpen:c,loading:t,toggle:d,handleUpdate:n,refresh:r})]})};var Gh,XO;function nL(){if(XO)return Gh;XO=1;var e=Du();function t(n,r){return e(n,r)}return Gh=t,Gh}var fa={exports:{}};/*!
26
+ `],Xp||(Xp=Zp.slice(0)),Ax=Object.freeze(Object.defineProperties(Zp,{raw:{value:Object.freeze(Xp)}})))),Jp=function(i){var v=i.delay,b=i.offset;return $e("span",{css:Hp({animation:"".concat(S5," 1s ease-in-out ").concat(v,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:b?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},k5=["data"],N5=["innerRef","isDisabled","isHidden","inputClassName"],Dx={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},T5={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Fe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Dx)},C5=function(i){return Fe({label:"input",color:"inherit",background:0,opacity:i?0:1,width:"100%"},Dx)},jx=function(i){var v=i.children,b=i.innerProps;return $e("div",b,v)},Fx={ClearIndicator:function(i){var v=i.children,b=i.innerProps;return $e("div",Be({},gt(i,"clearIndicator",{indicator:!0,"clear-indicator":!0}),b),v||$e(Qp,null))},Control:function(i){var v=i.children,b=i.isDisabled,x=i.isFocused,D=i.innerRef,B=i.innerProps,G=i.menuIsOpen;return $e("div",Be({ref:D},gt(i,"control",{control:!0,"control--is-disabled":b,"control--is-focused":x,"control--menu-is-open":G}),B),v)},DropdownIndicator:function(i){var v=i.children,b=i.innerProps;return $e("div",Be({},gt(i,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),b),v||$e(Lx,null))},DownChevron:Lx,CrossIcon:Qp,Group:function(i){var v=i.children,b=i.cx,x=i.getStyles,D=i.getClassNames,B=i.Heading,G=i.headingProps,L=i.innerProps,P=i.label,T=i.theme,te=i.selectProps;return $e("div",Be({},gt(i,"group",{group:!0}),L),$e(B,Be({},G,{selectProps:te,theme:T,getStyles:x,getClassNames:D,cx:b}),P),$e("div",null,v))},GroupHeading:function(i){var v=Sx(i);v.data;var b=wn(v,k5);return $e("div",Be({},gt(i,"groupHeading",{"group-heading":!0}),b))},IndicatorsContainer:function(i){var v=i.children,b=i.innerProps;return $e("div",Be({},gt(i,"indicatorsContainer",{indicators:!0}),b),v)},IndicatorSeparator:function(i){var v=i.innerProps;return $e("span",Be({},v,gt(i,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(i){var v=i.cx,b=i.value,x=Sx(i),D=x.innerRef,B=x.isDisabled,G=x.isHidden,L=x.inputClassName,P=wn(x,N5);return $e("div",Be({},gt(i,"input",{"input-container":!0}),{"data-value":b||""}),$e("input",Be({className:v({input:!0},L),ref:D,style:C5(G),disabled:B},P)))},LoadingIndicator:function(i){var v=i.innerProps,b=i.isRtl,x=i.size,D=x===void 0?4:x,B=wn(i,w5);return $e("div",Be({},gt(Fe(Fe({},B),{},{innerProps:v,isRtl:b,size:D}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),v),$e(Jp,{delay:0,offset:b}),$e(Jp,{delay:160,offset:!0}),$e(Jp,{delay:320,offset:!b}))},Menu:function(i){var v=i.children,b=i.innerRef,x=i.innerProps;return $e("div",Be({},gt(i,"menu",{menu:!0}),{ref:b},x),v)},MenuList:function(i){var v=i.children,b=i.innerProps,x=i.innerRef,D=i.isMulti;return $e("div",Be({},gt(i,"menuList",{"menu-list":!0,"menu-list--is-multi":D}),{ref:x},b),v)},MenuPortal:function(i){var v=i.appendTo,b=i.children,x=i.controlElement,D=i.innerProps,B=i.menuPlacement,G=i.menuPosition,L=(0,a.useRef)(null),P=(0,a.useRef)(null),T=qn((0,a.useState)(Px(B)),2),te=T[0],oe=T[1],V=(0,a.useMemo)((function(){return{setPortalPlacement:oe}}),[]),J=qn((0,a.useState)(null),2),Y=J[0],ie=J[1],ae=(0,a.useCallback)((function(){if(x){var he=(function(_e){var xe=_e.getBoundingClientRect();return{bottom:xe.bottom,height:xe.height,left:xe.left,right:xe.right,top:xe.top,width:xe.width}})(x),ye=G==="fixed"?0:window.pageYOffset,be=he[te]+ye;be===Y?.offset&&he.left===Y?.rect.left&&he.width===Y?.rect.width||ie({offset:be,rect:he})}}),[x,G,te,Y?.offset,Y?.rect.left,Y?.rect.width]);Yp((function(){ae()}),[ae]);var ce=(0,a.useCallback)((function(){typeof P.current=="function"&&(P.current(),P.current=null),x&&L.current&&(P.current=(function(he,ye,be,_e){_e===void 0&&(_e={});const{ancestorScroll:xe=!0,ancestorResize:Me=!0,elementResize:Te=typeof ResizeObserver=="function",layoutShift:De=typeof IntersectionObserver=="function",animationFrame:Le=!1}=_e,Re=Wp(he),He=xe||Me?[...Re?Kp(Re):[],...Kp(ye)]:[];He.forEach((tt=>{xe&&tt.addEventListener("scroll",be,{passive:!0}),Me&&tt.addEventListener("resize",be)}));const Ve=Re&&De?(function(tt,dt){let Et,xt=null;const Ut=mx(tt);function tn(){clearTimeout(Et),xt&&xt.disconnect(),xt=null}return(function rt(qt,Lt){qt===void 0&&(qt=!1),Lt===void 0&&(Lt=1),tn();const{left:Pt,top:zt,width:Gt,height:Kt}=tt.getBoundingClientRect();if(qt||dt(),!Gt||!Kt)return;const pr={rootMargin:-za(zt)+"px "+-za(Ut.clientWidth-(Pt+Gt))+"px "+-za(Ut.clientHeight-(zt+Kt))+"px "+-za(Pt)+"px",threshold:s5(0,a5(1,Lt))||1};let Un=!0;function Gn(nn){const Kn=nn[0].intersectionRatio;if(Kn!==Lt){if(!Un)return rt();Kn?rt(!1,Kn):Et=setTimeout((()=>{rt(!1,1e-7)}),100)}Un=!1}try{xt=new IntersectionObserver(Gn,{...pr,root:Ut.ownerDocument})}catch{xt=new IntersectionObserver(Gn,pr)}xt.observe(tt)})(!0),tn})(Re,be):null;let Ue,at=-1,Qe=null;Te&&(Qe=new ResizeObserver((tt=>{let[dt]=tt;dt&&dt.target===Re&&Qe&&(Qe.unobserve(ye),cancelAnimationFrame(at),at=requestAnimationFrame((()=>{Qe&&Qe.observe(ye)}))),be()})),Re&&!Le&&Qe.observe(Re),Qe.observe(ye));let ut=Le?xx(he):null;return Le&&(function tt(){const dt=xx(he);!ut||dt.x===ut.x&&dt.y===ut.y&&dt.width===ut.width&&dt.height===ut.height||be(),ut=dt,Ue=requestAnimationFrame(tt)})(),be(),()=>{He.forEach((tt=>{xe&&tt.removeEventListener("scroll",be),Me&&tt.removeEventListener("resize",be)})),Ve&&Ve(),Qe&&Qe.disconnect(),Qe=null,Le&&cancelAnimationFrame(Ue)}})(x,L.current,ae,{elementResize:"ResizeObserver"in window}))}),[x,ae]);Yp((function(){ce()}),[ce]);var fe=(0,a.useCallback)((function(he){L.current=he,ce()}),[ce]);if(!v&&G!=="fixed"||!Y)return null;var ve=$e("div",Be({ref:fe},gt(Fe(Fe({},i),{},{offset:Y.offset,position:G,rect:Y.rect}),"menuPortal",{"menu-portal":!0}),D),b);return $e(Ix.Provider,{value:V},v?(0,ya.createPortal)(ve,v):ve)},LoadingMessage:function(i){var v=i.children,b=v===void 0?"Loading...":v,x=i.innerProps,D=wn(i,g5);return $e("div",Be({},gt(Fe(Fe({},D),{},{children:b,innerProps:x}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),x),b)},NoOptionsMessage:function(i){var v=i.children,b=v===void 0?"No options":v,x=i.innerProps,D=wn(i,v5);return $e("div",Be({},gt(Fe(Fe({},D),{},{children:b,innerProps:x}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),x),b)},MultiValue:function(i){var v=i.children,b=i.components,x=i.data,D=i.innerProps,B=i.isDisabled,G=i.removeProps,L=i.selectProps,P=b.Container,T=b.Label,te=b.Remove;return $e(P,{data:x,innerProps:Fe(Fe({},gt(i,"multiValue",{"multi-value":!0,"multi-value--is-disabled":B})),D),selectProps:L},$e(T,{data:x,innerProps:Fe({},gt(i,"multiValueLabel",{"multi-value__label":!0})),selectProps:L},v),$e(te,{data:x,innerProps:Fe(Fe({},gt(i,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(v||"option")},G),selectProps:L}))},MultiValueContainer:jx,MultiValueLabel:jx,MultiValueRemove:function(i){var v=i.children,b=i.innerProps;return $e("div",Be({role:"button"},b),v||$e(Qp,{size:14}))},Option:function(i){var v=i.children,b=i.isDisabled,x=i.isFocused,D=i.isSelected,B=i.innerRef,G=i.innerProps;return $e("div",Be({},gt(i,"option",{option:!0,"option--is-disabled":b,"option--is-focused":x,"option--is-selected":D}),{ref:B,"aria-disabled":b},G),v)},Placeholder:function(i){var v=i.children,b=i.innerProps;return $e("div",Be({},gt(i,"placeholder",{placeholder:!0}),b),v)},SelectContainer:function(i){var v=i.children,b=i.innerProps,x=i.isDisabled,D=i.isRtl;return $e("div",Be({},gt(i,"container",{"--is-disabled":x,"--is-rtl":D}),b),v)},SingleValue:function(i){var v=i.children,b=i.isDisabled,x=i.innerProps;return $e("div",Be({},gt(i,"singleValue",{"single-value":!0,"single-value--is-disabled":b}),x),v)},ValueContainer:function(i){var v=i.children,b=i.innerProps,x=i.isMulti,D=i.hasValue;return $e("div",Be({},gt(i,"valueContainer",{"value-container":!0,"value-container--is-multi":x,"value-container--has-value":D}),b),v)}},Bx=Number.isNaN||function(i){return typeof i=="number"&&i!=i};function A5(i,v){if(i.length!==v.length)return!1;for(var b=0;b<i.length;b++)if(!((x=i[b])===(D=v[b])||Bx(x)&&Bx(D)))return!1;var x,D;return!0}for(var P5={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},zx=function(i){return $e("span",Be({css:P5},i))},I5={guidance:function(i){var v=i.isSearchable,b=i.isMulti,x=i.isDisabled,D=i.tabSelectsValue;switch(i.context){case"menu":return"Use Up and Down to choose options".concat(x?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(D?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(i["aria-label"]||"Select"," is focused ").concat(v?",type to refine list":"",", press Down to open the menu, ").concat(b?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(i){var v=i.action,b=i.label,x=b===void 0?"":b,D=i.labels,B=i.isDisabled;switch(v){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(x,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(D.length>1?"s":""," ").concat(D.join(","),", selected.");case"select-option":return"option ".concat(x,B?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(i){var v=i.context,b=i.focused,x=i.options,D=i.label,B=D===void 0?"":D,G=i.selectValue,L=i.isDisabled,P=i.isSelected,T=function(V,J){return V&&V.length?"".concat(V.indexOf(J)+1," of ").concat(V.length):""};if(v==="value"&&G)return"value ".concat(B," focused, ").concat(T(G,b),".");if(v==="menu"){var te=L?" disabled":"",oe="".concat(P?"selected":"focused").concat(te);return"option ".concat(B," ").concat(oe,", ").concat(T(x,b),".")}return""},onFilter:function(i){var v=i.inputValue,b=i.resultsMessage;return"".concat(b).concat(v?" for search term "+v:"",".")}},M5=function(i){var v=i.ariaSelection,b=i.focusedOption,x=i.focusedValue,D=i.focusableOptions,B=i.isFocused,G=i.selectValue,L=i.selectProps,P=i.id,T=L.ariaLiveMessages,te=L.getOptionLabel,oe=L.inputValue,V=L.isMulti,J=L.isOptionDisabled,Y=L.isSearchable,ie=L.menuIsOpen,ae=L.options,ce=L.screenReaderStatus,fe=L.tabSelectsValue,ve=L["aria-label"],he=L["aria-live"],ye=(0,a.useMemo)((function(){return Fe(Fe({},I5),T||{})}),[T]),be=(0,a.useMemo)((function(){var Re,He="";if(v&&ye.onChange){var Ve=v.option,Ue=v.options,at=v.removedValue,Qe=v.removedValues,ut=v.value,tt=at||Ve||(Re=ut,Array.isArray(Re)?null:Re),dt=tt?te(tt):"",Et=Ue||Qe||void 0,xt=Et?Et.map(te):[],Ut=Fe({isDisabled:tt&&J(tt,G),label:dt,labels:xt},v);He=ye.onChange(Ut)}return He}),[v,ye,J,G,te]),_e=(0,a.useMemo)((function(){var Re="",He=b||x,Ve=!!(b&&G&&G.includes(b));if(He&&ye.onFocus){var Ue={focused:He,label:te(He),isDisabled:J(He,G),isSelected:Ve,options:D,context:He===b?"menu":"value",selectValue:G};Re=ye.onFocus(Ue)}return Re}),[b,x,te,J,ye,D,G]),xe=(0,a.useMemo)((function(){var Re="";if(ie&&ae.length&&ye.onFilter){var He=ce({count:D.length});Re=ye.onFilter({inputValue:oe,resultsMessage:He})}return Re}),[D,oe,ie,ye,ae,ce]),Me=(0,a.useMemo)((function(){var Re="";if(ye.guidance){var He=x?"value":ie?"menu":"input";Re=ye.guidance({"aria-label":ve,context:He,isDisabled:b&&J(b,G),isMulti:V,isSearchable:Y,tabSelectsValue:fe})}return Re}),[ve,b,x,V,J,Y,ie,ye,G,fe]),Te="".concat(_e," ").concat(xe," ").concat(Me),De=$e(a.Fragment,null,$e("span",{id:"aria-selection"},be),$e("span",{id:"aria-context"},Te)),Le=v?.action==="initial-input-focus";return $e(a.Fragment,null,$e(zx,{id:P},Le&&De),$e(zx,{"aria-live":he,"aria-atomic":"false","aria-relevant":"additions text"},B&&!Le&&De))},ev=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],q5=new RegExp("["+ev.map((function(i){return i.letters})).join("")+"]","g"),$x={},tv=0;tv<ev.length;tv++)for(var nv=ev[tv],rv=0;rv<nv.letters.length;rv++)$x[nv.letters[rv]]=nv.base;var Hx=function(i){return i.replace(q5,(function(v){return $x[v]}))},L5=(function(i,v){v===void 0&&(v=A5);var b=null;function x(){for(var D=[],B=0;B<arguments.length;B++)D[B]=arguments[B];if(b&&b.lastThis===this&&v(D,b.lastArgs))return b.lastResult;var G=i.apply(this,D);return b={lastResult:G,lastArgs:D,lastThis:this},G}return x.clear=function(){b=null},x})(Hx),Vx=function(i){return i.replace(/^\s+|\s+$/g,"")},R5=function(i){return"".concat(i.label," ").concat(i.value)},D5=["innerRef"];function j5(i){var v=i.innerRef,b=(function(x){for(var D=arguments.length,B=new Array(D>1?D-1:0),G=1;G<D;G++)B[G-1]=arguments[G];var L=Object.entries(x).filter((function(P){var T=qn(P,1)[0];return!B.includes(T)}));return L.reduce((function(P,T){var te=qn(T,2),oe=te[0],V=te[1];return P[oe]=V,P}),{})})(wn(i,D5),"onExited","in","enter","exit","appear");return $e("input",Be({ref:v},b,{css:Hp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ux=["boxSizing","height","overflow","paddingRight","position"],Gx={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Kx(i){i.preventDefault()}function Wx(i){i.stopPropagation()}function Yx(){var i=this.scrollTop,v=this.scrollHeight,b=i+this.offsetHeight;i===0?this.scrollTop=1:b===v&&(this.scrollTop=i-1)}function Zx(){return"ontouchstart"in window||navigator.maxTouchPoints}var Xx=!(typeof window>"u"||!window.document||!window.document.createElement),ti=0,Qr={capture:!1,passive:!1},F5=function(){return document.activeElement&&document.activeElement.blur()},B5={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function z5(i){var v=i.children,b=i.lockEnabled,x=i.captureEnabled,D=(function(G){var L=G.isEnabled,P=G.onBottomArrive,T=G.onBottomLeave,te=G.onTopArrive,oe=G.onTopLeave,V=(0,a.useRef)(!1),J=(0,a.useRef)(!1),Y=(0,a.useRef)(0),ie=(0,a.useRef)(null),ae=(0,a.useCallback)((function(be,_e){if(ie.current!==null){var xe=ie.current,Me=xe.scrollTop,Te=xe.scrollHeight,De=xe.clientHeight,Le=ie.current,Re=_e>0,He=Te-De-Me,Ve=!1;He>_e&&V.current&&(T&&T(be),V.current=!1),Re&&J.current&&(oe&&oe(be),J.current=!1),Re&&_e>He?(P&&!V.current&&P(be),Le.scrollTop=Te,Ve=!0,V.current=!0):!Re&&-_e>Me&&(te&&!J.current&&te(be),Le.scrollTop=0,Ve=!0,J.current=!0),Ve&&(function(Ue){Ue.preventDefault(),Ue.stopPropagation()})(be)}}),[P,T,te,oe]),ce=(0,a.useCallback)((function(be){ae(be,be.deltaY)}),[ae]),fe=(0,a.useCallback)((function(be){Y.current=be.changedTouches[0].clientY}),[]),ve=(0,a.useCallback)((function(be){var _e=Y.current-be.changedTouches[0].clientY;ae(be,_e)}),[ae]),he=(0,a.useCallback)((function(be){if(be){var _e=!!h5&&{passive:!1};be.addEventListener("wheel",ce,_e),be.addEventListener("touchstart",fe,_e),be.addEventListener("touchmove",ve,_e)}}),[ve,fe,ce]),ye=(0,a.useCallback)((function(be){be&&(be.removeEventListener("wheel",ce,!1),be.removeEventListener("touchstart",fe,!1),be.removeEventListener("touchmove",ve,!1))}),[ve,fe,ce]);return(0,a.useEffect)((function(){if(L){var be=ie.current;return he(be),function(){ye(be)}}}),[L,he,ye]),function(be){ie.current=be}})({isEnabled:x===void 0||x,onBottomArrive:i.onBottomArrive,onBottomLeave:i.onBottomLeave,onTopArrive:i.onTopArrive,onTopLeave:i.onTopLeave}),B=(function(G){var L=G.isEnabled,P=G.accountForScrollbars,T=P===void 0||P,te=(0,a.useRef)({}),oe=(0,a.useRef)(null),V=(0,a.useCallback)((function(Y){if(Xx){var ie=document.body,ae=ie&&ie.style;if(T&&Ux.forEach((function(he){var ye=ae&&ae[he];te.current[he]=ye})),T&&ti<1){var ce=parseInt(te.current.paddingRight,10)||0,fe=document.body?document.body.clientWidth:0,ve=window.innerWidth-fe+ce||0;Object.keys(Gx).forEach((function(he){var ye=Gx[he];ae&&(ae[he]=ye)})),ae&&(ae.paddingRight="".concat(ve,"px"))}ie&&Zx()&&(ie.addEventListener("touchmove",Kx,Qr),Y&&(Y.addEventListener("touchstart",Yx,Qr),Y.addEventListener("touchmove",Wx,Qr))),ti+=1}}),[T]),J=(0,a.useCallback)((function(Y){if(Xx){var ie=document.body,ae=ie&&ie.style;ti=Math.max(ti-1,0),T&&ti<1&&Ux.forEach((function(ce){var fe=te.current[ce];ae&&(ae[ce]=fe)})),ie&&Zx()&&(ie.removeEventListener("touchmove",Kx,Qr),Y&&(Y.removeEventListener("touchstart",Yx,Qr),Y.removeEventListener("touchmove",Wx,Qr)))}}),[T]);return(0,a.useEffect)((function(){if(L){var Y=oe.current;return V(Y),function(){J(Y)}}}),[L,V,J]),function(Y){oe.current=Y}})({isEnabled:b});return $e(a.Fragment,null,b&&$e("div",{onClick:F5,css:B5}),v((function(G){D(G),B(G)})))}var $5={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},H5=function(i){var v=i.name,b=i.onFocus;return $e("input",{required:!0,name:v,tabIndex:-1,"aria-hidden":"true",onFocus:b,css:$5,value:"",onChange:function(){}})},Qx=function(i){return i.label},Jx=function(i){return i.value},V5={clearIndicator:x5,container:function(i){var v=i.isDisabled;return{label:"container",direction:i.isRtl?"rtl":void 0,pointerEvents:v?"none":void 0,position:"relative"}},control:function(i,v){var b=i.isDisabled,x=i.isFocused,D=i.theme,B=D.colors,G=D.borderRadius;return Fe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:D.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},v?{}:{backgroundColor:b?B.neutral5:B.neutral0,borderColor:b?B.neutral10:x?B.primary:B.neutral20,borderRadius:G,borderStyle:"solid",borderWidth:1,boxShadow:x?"0 0 0 1px ".concat(B.primary):void 0,"&:hover":{borderColor:x?B.primary:B.neutral30}})},dropdownIndicator:E5,group:function(i,v){var b=i.theme.spacing;return v?{}:{paddingBottom:2*b.baseUnit,paddingTop:2*b.baseUnit}},groupHeading:function(i,v){var b=i.theme,x=b.colors,D=b.spacing;return Fe({label:"group",cursor:"default",display:"block"},v?{}:{color:x.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*D.baseUnit,paddingRight:3*D.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(i,v){var b=i.isDisabled,x=i.theme,D=x.spacing.baseUnit,B=x.colors;return Fe({label:"indicatorSeparator",alignSelf:"stretch",width:1},v?{}:{backgroundColor:b?B.neutral10:B.neutral20,marginBottom:2*D,marginTop:2*D})},input:function(i,v){var b=i.isDisabled,x=i.value,D=i.theme,B=D.spacing,G=D.colors;return Fe(Fe({visibility:b?"hidden":"visible",transform:x?"translateZ(0)":""},T5),v?{}:{margin:B.baseUnit/2,paddingBottom:B.baseUnit/2,paddingTop:B.baseUnit/2,color:G.neutral80})},loadingIndicator:function(i,v){var b=i.isFocused,x=i.size,D=i.theme,B=D.colors,G=D.spacing.baseUnit;return Fe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:x,lineHeight:1,marginRight:x,textAlign:"center",verticalAlign:"middle"},v?{}:{color:b?B.neutral60:B.neutral20,padding:2*G})},loadingMessage:b5,menu:function(i,v){var b,x=i.placement,D=i.theme,B=D.borderRadius,G=D.spacing,L=D.colors;return Fe((Ko(b={label:"menu"},(function(P){return P?{bottom:"top",top:"bottom"}[P]:"bottom"})(x),"100%"),Ko(b,"position","absolute"),Ko(b,"width","100%"),Ko(b,"zIndex",1),b),v?{}:{backgroundColor:L.neutral0,borderRadius:B,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:G.menuGutter,marginTop:G.menuGutter})},menuList:function(i,v){var b=i.maxHeight,x=i.theme.spacing.baseUnit;return Fe({maxHeight:b,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},v?{}:{paddingBottom:x,paddingTop:x})},menuPortal:function(i){var v=i.rect,b=i.offset,x=i.position;return{left:v.left,position:x,top:b,width:v.width,zIndex:1}},multiValue:function(i,v){var b=i.theme,x=b.spacing,D=b.borderRadius,B=b.colors;return Fe({label:"multiValue",display:"flex",minWidth:0},v?{}:{backgroundColor:B.neutral10,borderRadius:D/2,margin:x.baseUnit/2})},multiValueLabel:function(i,v){var b=i.theme,x=b.borderRadius,D=b.colors,B=i.cropWithEllipsis;return Fe({overflow:"hidden",textOverflow:B||B===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},v?{}:{borderRadius:x/2,color:D.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(i,v){var b=i.theme,x=b.spacing,D=b.borderRadius,B=b.colors,G=i.isFocused;return Fe({alignItems:"center",display:"flex"},v?{}:{borderRadius:D/2,backgroundColor:G?B.dangerLight:void 0,paddingLeft:x.baseUnit,paddingRight:x.baseUnit,":hover":{backgroundColor:B.dangerLight,color:B.danger}})},noOptionsMessage:m5,option:function(i,v){var b=i.isDisabled,x=i.isFocused,D=i.isSelected,B=i.theme,G=B.spacing,L=B.colors;return Fe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},v?{}:{backgroundColor:D?L.primary:x?L.primary25:"transparent",color:b?L.neutral20:D?L.neutral0:"inherit",padding:"".concat(2*G.baseUnit,"px ").concat(3*G.baseUnit,"px"),":active":{backgroundColor:b?void 0:D?L.primary:L.primary50}})},placeholder:function(i,v){var b=i.theme,x=b.spacing,D=b.colors;return Fe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},v?{}:{color:D.neutral50,marginLeft:x.baseUnit/2,marginRight:x.baseUnit/2})},singleValue:function(i,v){var b=i.isDisabled,x=i.theme,D=x.spacing,B=x.colors;return Fe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},v?{}:{color:b?B.neutral40:B.neutral80,marginLeft:D.baseUnit/2,marginRight:D.baseUnit/2})},valueContainer:function(i,v){var b=i.theme.spacing,x=i.isMulti,D=i.hasValue,B=i.selectProps.controlShouldRenderValue;return Fe({alignItems:"center",display:x&&D&&B?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},v?{}:{padding:"".concat(b.baseUnit/2,"px ").concat(2*b.baseUnit,"px")})}},ov={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},U5={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tx(),captureMenuScroll:!Tx(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(i,v){if(i.data.__isNew__)return!0;var b=Fe({ignoreCase:!0,ignoreAccents:!0,stringify:R5,trim:!0,matchFrom:"any"},void 0),x=b.ignoreCase,D=b.ignoreAccents,B=b.stringify,G=b.trim,L=b.matchFrom,P=G?Vx(v):v,T=G?Vx(B(i)):B(i);return x&&(P=P.toLowerCase(),T=T.toLowerCase()),D&&(P=L5(P),T=Hx(T)),L==="start"?T.substr(0,P.length)===P:T.indexOf(P)>-1},formatGroupLabel:function(i){return i.label},getOptionLabel:Qx,getOptionValue:Jx,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(i){return!!i.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}})(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(i){var v=i.count;return"".concat(v," result").concat(v!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function eS(i,v,b,x){return{type:"option",data:v,isDisabled:iS(i,v,b),isSelected:aS(i,v,b),label:oS(i,v),value:Wa(i,v),index:x}}function tS(i,v){return i.options.map((function(b,x){if("options"in b){var D=b.options.map((function(G,L){return eS(i,G,v,L)})).filter((function(G){return rS(i,G)}));return D.length>0?{type:"group",data:b,options:D,index:x}:void 0}var B=eS(i,b,v,x);return rS(i,B)?B:void 0})).filter(p5)}function nS(i){return i.reduce((function(v,b){return b.type==="group"?v.push.apply(v,Wo(b.options.map((function(x){return x.data})))):v.push(b.data),v}),[])}function rS(i,v){var b=i.inputValue,x=b===void 0?"":b,D=v.data,B=v.isSelected,G=v.label,L=v.value;return(!lS(i)||!B)&&sS(i,{label:G,value:L,data:D},x)}var oS=function(i,v){return i.getOptionLabel(v)},Wa=function(i,v){return i.getOptionValue(v)};function iS(i,v,b){return typeof i.isOptionDisabled=="function"&&i.isOptionDisabled(v,b)}function aS(i,v,b){if(b.indexOf(v)>-1)return!0;if(typeof i.isOptionSelected=="function")return i.isOptionSelected(v,b);var x=Wa(i,v);return b.some((function(D){return Wa(i,D)===x}))}function sS(i,v,b){return!i.filterOption||i.filterOption(v,b)}var lS=function(i){var v=i.hideSelectedOptions,b=i.isMulti;return v===void 0?b:v},G5=1,iv=(function(i){(function(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),T&&ba(P,T)})(L,i);var v,b,x,D,B,G=(D=L,B=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})(),function(){var P,T=Ia(D);if(B){var te=Ia(this).constructor;P=Reflect.construct(T,arguments,te)}else P=T.apply(this,arguments);return(function(oe,V){if(V&&(dr(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mp(oe)})(this,P)});function L(P){var T;if((function(V,J){if(!(V instanceof J))throw new TypeError("Cannot call a class as a function")})(this,L),(T=G.call(this,P)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},T.blockOptionHover=!1,T.isComposing=!1,T.commonProps=void 0,T.initialTouchX=0,T.initialTouchY=0,T.instancePrefix="",T.openAfterFocus=!1,T.scrollToFocusedOptionOnUpdate=!1,T.userIsDragging=void 0,T.controlRef=null,T.getControlRef=function(V){T.controlRef=V},T.focusedOptionRef=null,T.getFocusedOptionRef=function(V){T.focusedOptionRef=V},T.menuListRef=null,T.getMenuListRef=function(V){T.menuListRef=V},T.inputRef=null,T.getInputRef=function(V){T.inputRef=V},T.focus=T.focusInput,T.blur=T.blurInput,T.onChange=function(V,J){var Y=T.props,ie=Y.onChange,ae=Y.name;J.name=ae,T.ariaOnChange(V,J),ie(V,J)},T.setValue=function(V,J,Y){var ie=T.props,ae=ie.closeMenuOnSelect,ce=ie.isMulti,fe=ie.inputValue;T.onInputChange("",{action:"set-value",prevInputValue:fe}),ae&&(T.setState({inputIsHiddenAfterUpdate:!ce}),T.onMenuClose()),T.setState({clearFocusValueOnUpdate:!0}),T.onChange(V,{action:J,option:Y})},T.selectOption=function(V){var J=T.props,Y=J.blurInputOnSelect,ie=J.isMulti,ae=J.name,ce=T.state.selectValue,fe=ie&&T.isOptionSelected(V,ce),ve=T.isOptionDisabled(V,ce);if(fe){var he=T.getOptionValue(V);T.setValue(ce.filter((function(ye){return T.getOptionValue(ye)!==he})),"deselect-option",V)}else{if(ve)return void T.ariaOnChange(V,{action:"select-option",option:V,name:ae});ie?T.setValue([].concat(Wo(ce),[V]),"select-option",V):T.setValue(V,"select-option")}Y&&T.blurInput()},T.removeValue=function(V){var J=T.props.isMulti,Y=T.state.selectValue,ie=T.getOptionValue(V),ae=Y.filter((function(fe){return T.getOptionValue(fe)!==ie})),ce=ei(J,ae,ae[0]||null);T.onChange(ce,{action:"remove-value",removedValue:V}),T.focusInput()},T.clearValue=function(){var V=T.state.selectValue;T.onChange(ei(T.props.isMulti,[],null),{action:"clear",removedValues:V})},T.popValue=function(){var V=T.props.isMulti,J=T.state.selectValue,Y=J[J.length-1],ie=J.slice(0,J.length-1),ae=ei(V,ie,ie[0]||null);T.onChange(ae,{action:"pop-value",removedValue:Y})},T.getValue=function(){return T.state.selectValue},T.cx=function(){for(var V=arguments.length,J=new Array(V),Y=0;Y<V;Y++)J[Y]=arguments[Y];return f5.apply(void 0,[T.props.classNamePrefix].concat(J))},T.getOptionLabel=function(V){return oS(T.props,V)},T.getOptionValue=function(V){return Wa(T.props,V)},T.getStyles=function(V,J){var Y=T.props.unstyled,ie=V5[V](J,Y);ie.boxSizing="border-box";var ae=T.props.styles[V];return ae?ae(ie,J):ie},T.getClassNames=function(V,J){var Y,ie;return(Y=(ie=T.props.classNames)[V])===null||Y===void 0?void 0:Y.call(ie,J)},T.getElementId=function(V){return"".concat(T.instancePrefix,"-").concat(V)},T.getComponents=function(){return V=T.props,Fe(Fe({},Fx),V.components);var V},T.buildCategorizedOptions=function(){return tS(T.props,T.state.selectValue)},T.getCategorizedOptions=function(){return T.props.menuIsOpen?T.buildCategorizedOptions():[]},T.buildFocusableOptions=function(){return nS(T.buildCategorizedOptions())},T.getFocusableOptions=function(){return T.props.menuIsOpen?T.buildFocusableOptions():[]},T.ariaOnChange=function(V,J){T.setState({ariaSelection:Fe({value:V},J)})},T.onMenuMouseDown=function(V){V.button===0&&(V.stopPropagation(),V.preventDefault(),T.focusInput())},T.onMenuMouseMove=function(V){T.blockOptionHover=!1},T.onControlMouseDown=function(V){if(!V.defaultPrevented){var J=T.props.openMenuOnClick;T.state.isFocused?T.props.menuIsOpen?V.target.tagName!=="INPUT"&&V.target.tagName!=="TEXTAREA"&&T.onMenuClose():J&&T.openMenu("first"):(J&&(T.openAfterFocus=!0),T.focusInput()),V.target.tagName!=="INPUT"&&V.target.tagName!=="TEXTAREA"&&V.preventDefault()}},T.onDropdownIndicatorMouseDown=function(V){if(!(V&&V.type==="mousedown"&&V.button!==0||T.props.isDisabled)){var J=T.props,Y=J.isMulti,ie=J.menuIsOpen;T.focusInput(),ie?(T.setState({inputIsHiddenAfterUpdate:!Y}),T.onMenuClose()):T.openMenu("first"),V.preventDefault()}},T.onClearIndicatorMouseDown=function(V){V&&V.type==="mousedown"&&V.button!==0||(T.clearValue(),V.preventDefault(),T.openAfterFocus=!1,V.type==="touchend"?T.focusInput():setTimeout((function(){return T.focusInput()})))},T.onScroll=function(V){typeof T.props.closeMenuOnScroll=="boolean"?V.target instanceof HTMLElement&&Va(V.target)&&T.props.onMenuClose():typeof T.props.closeMenuOnScroll=="function"&&T.props.closeMenuOnScroll(V)&&T.props.onMenuClose()},T.onCompositionStart=function(){T.isComposing=!0},T.onCompositionEnd=function(){T.isComposing=!1},T.onTouchStart=function(V){var J=V.touches,Y=J&&J.item(0);Y&&(T.initialTouchX=Y.clientX,T.initialTouchY=Y.clientY,T.userIsDragging=!1)},T.onTouchMove=function(V){var J=V.touches,Y=J&&J.item(0);if(Y){var ie=Math.abs(Y.clientX-T.initialTouchX),ae=Math.abs(Y.clientY-T.initialTouchY);T.userIsDragging=ie>5||ae>5}},T.onTouchEnd=function(V){T.userIsDragging||(T.controlRef&&!T.controlRef.contains(V.target)&&T.menuListRef&&!T.menuListRef.contains(V.target)&&T.blurInput(),T.initialTouchX=0,T.initialTouchY=0)},T.onControlTouchEnd=function(V){T.userIsDragging||T.onControlMouseDown(V)},T.onClearIndicatorTouchEnd=function(V){T.userIsDragging||T.onClearIndicatorMouseDown(V)},T.onDropdownIndicatorTouchEnd=function(V){T.userIsDragging||T.onDropdownIndicatorMouseDown(V)},T.handleInputChange=function(V){var J=T.props.inputValue,Y=V.currentTarget.value;T.setState({inputIsHiddenAfterUpdate:!1}),T.onInputChange(Y,{action:"input-change",prevInputValue:J}),T.props.menuIsOpen||T.onMenuOpen()},T.onInputFocus=function(V){T.props.onFocus&&T.props.onFocus(V),T.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(T.openAfterFocus||T.props.openMenuOnFocus)&&T.openMenu("first"),T.openAfterFocus=!1},T.onInputBlur=function(V){var J=T.props.inputValue;T.menuListRef&&T.menuListRef.contains(document.activeElement)?T.inputRef.focus():(T.props.onBlur&&T.props.onBlur(V),T.onInputChange("",{action:"input-blur",prevInputValue:J}),T.onMenuClose(),T.setState({focusedValue:null,isFocused:!1}))},T.onOptionHover=function(V){T.blockOptionHover||T.state.focusedOption===V||T.setState({focusedOption:V})},T.shouldHideSelectedOptions=function(){return lS(T.props)},T.onValueInputFocus=function(V){V.preventDefault(),V.stopPropagation(),T.focus()},T.onKeyDown=function(V){var J=T.props,Y=J.isMulti,ie=J.backspaceRemovesValue,ae=J.escapeClearsValue,ce=J.inputValue,fe=J.isClearable,ve=J.isDisabled,he=J.menuIsOpen,ye=J.onKeyDown,be=J.tabSelectsValue,_e=J.openMenuOnFocus,xe=T.state,Me=xe.focusedOption,Te=xe.focusedValue,De=xe.selectValue;if(!(ve||typeof ye=="function"&&(ye(V),V.defaultPrevented))){switch(T.blockOptionHover=!0,V.key){case"ArrowLeft":if(!Y||ce)return;T.focusValue("previous");break;case"ArrowRight":if(!Y||ce)return;T.focusValue("next");break;case"Delete":case"Backspace":if(ce)return;if(Te)T.removeValue(Te);else{if(!ie)return;Y?T.popValue():fe&&T.clearValue()}break;case"Tab":if(T.isComposing||V.shiftKey||!he||!be||!Me||_e&&T.isOptionSelected(Me,De))return;T.selectOption(Me);break;case"Enter":if(V.keyCode===229)break;if(he){if(!Me||T.isComposing)return;T.selectOption(Me);break}return;case"Escape":he?(T.setState({inputIsHiddenAfterUpdate:!1}),T.onInputChange("",{action:"menu-close",prevInputValue:ce}),T.onMenuClose()):fe&&ae&&T.clearValue();break;case" ":if(ce)return;if(!he){T.openMenu("first");break}if(!Me)return;T.selectOption(Me);break;case"ArrowUp":he?T.focusOption("up"):T.openMenu("last");break;case"ArrowDown":he?T.focusOption("down"):T.openMenu("first");break;case"PageUp":if(!he)return;T.focusOption("pageup");break;case"PageDown":if(!he)return;T.focusOption("pagedown");break;case"Home":if(!he)return;T.focusOption("first");break;case"End":if(!he)return;T.focusOption("last");break;default:return}V.preventDefault()}},T.instancePrefix="react-select-"+(T.props.instanceId||++G5),T.state.selectValue=Ha(P.value),P.menuIsOpen&&T.state.selectValue.length){var te=T.buildFocusableOptions(),oe=te.indexOf(T.state.selectValue[0]);T.state.focusedOption=te[oe]}return T}return v=L,b=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Nx(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(P){var T=this.props,te=T.isDisabled,oe=T.menuIsOpen,V=this.state.isFocused;(V&&!te&&P.isDisabled||V&&oe&&!P.menuIsOpen)&&this.focusInput(),V&&te&&!P.isDisabled?this.setState({isFocused:!1},this.onMenuClose):V||te||!P.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Nx(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(P,T){this.props.onInputChange(P,T)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(P){var T=this,te=this.state,oe=te.selectValue,V=te.isFocused,J=this.buildFocusableOptions(),Y=P==="first"?0:J.length-1;if(!this.props.isMulti){var ie=J.indexOf(oe[0]);ie>-1&&(Y=ie)}this.scrollToFocusedOptionOnUpdate=!(V&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:J[Y]},(function(){return T.onMenuOpen()}))}},{key:"focusValue",value:function(P){var T=this.state,te=T.selectValue,oe=T.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var V=te.indexOf(oe);oe||(V=-1);var J=te.length-1,Y=-1;if(te.length){switch(P){case"previous":Y=V===0?0:V===-1?J:V-1;break;case"next":V>-1&&V<J&&(Y=V+1)}this.setState({inputIsHidden:Y!==-1,focusedValue:te[Y]})}}}},{key:"focusOption",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",T=this.props.pageSize,te=this.state.focusedOption,oe=this.getFocusableOptions();if(oe.length){var V=0,J=oe.indexOf(te);te||(J=-1),P==="up"?V=J>0?J-1:oe.length-1:P==="down"?V=(J+1)%oe.length:P==="pageup"?(V=J-T)<0&&(V=0):P==="pagedown"?(V=J+T)>oe.length-1&&(V=oe.length-1):P==="last"&&(V=oe.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:oe[V],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(ov):Fe(Fe({},ov),this.props.theme):ov}},{key:"getCommonProps",value:function(){var P=this.clearValue,T=this.cx,te=this.getStyles,oe=this.getClassNames,V=this.getValue,J=this.selectOption,Y=this.setValue,ie=this.props,ae=ie.isMulti,ce=ie.isRtl,fe=ie.options;return{clearValue:P,cx:T,getStyles:te,getClassNames:oe,getValue:V,hasValue:this.hasValue(),isMulti:ae,isRtl:ce,options:fe,selectOption:J,selectProps:ie,setValue:Y,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var P=this.props,T=P.isClearable,te=P.isMulti;return T===void 0?te:T}},{key:"isOptionDisabled",value:function(P,T){return iS(this.props,P,T)}},{key:"isOptionSelected",value:function(P,T){return aS(this.props,P,T)}},{key:"filterOption",value:function(P,T){return sS(this.props,P,T)}},{key:"formatOptionLabel",value:function(P,T){if(typeof this.props.formatOptionLabel=="function"){var te=this.props.inputValue,oe=this.state.selectValue;return this.props.formatOptionLabel(P,{context:T,inputValue:te,selectValue:oe})}return this.getOptionLabel(P)}},{key:"formatGroupLabel",value:function(P){return this.props.formatGroupLabel(P)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var P=this.props,T=P.isDisabled,te=P.isSearchable,oe=P.inputId,V=P.inputValue,J=P.tabIndex,Y=P.form,ie=P.menuIsOpen,ae=P.required,ce=this.getComponents().Input,fe=this.state,ve=fe.inputIsHidden,he=fe.ariaSelection,ye=this.commonProps,be=oe||this.getElementId("input"),_e=Fe(Fe(Fe({"aria-autocomplete":"list","aria-expanded":ie,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":ae,role:"combobox"},ie&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!te&&{"aria-readonly":!0}),this.hasValue()?he?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return te?a.createElement(ce,Be({},ye,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:be,innerRef:this.getInputRef,isDisabled:T,isHidden:ve,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:J,form:Y,type:"text",value:V},_e)):a.createElement(j5,Be({id:be,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:$a,onFocus:this.onInputFocus,disabled:T,tabIndex:J,inputMode:"none",form:Y,value:""},_e))}},{key:"renderPlaceholderOrValue",value:function(){var P=this,T=this.getComponents(),te=T.MultiValue,oe=T.MultiValueContainer,V=T.MultiValueLabel,J=T.MultiValueRemove,Y=T.SingleValue,ie=T.Placeholder,ae=this.commonProps,ce=this.props,fe=ce.controlShouldRenderValue,ve=ce.isDisabled,he=ce.isMulti,ye=ce.inputValue,be=ce.placeholder,_e=this.state,xe=_e.selectValue,Me=_e.focusedValue,Te=_e.isFocused;if(!this.hasValue()||!fe)return ye?null:a.createElement(ie,Be({},ae,{key:"placeholder",isDisabled:ve,isFocused:Te,innerProps:{id:this.getElementId("placeholder")}}),be);if(he)return xe.map((function(Le,Re){var He=Le===Me,Ve="".concat(P.getOptionLabel(Le),"-").concat(P.getOptionValue(Le));return a.createElement(te,Be({},ae,{components:{Container:oe,Label:V,Remove:J},isFocused:He,isDisabled:ve,key:Ve,index:Re,removeProps:{onClick:function(){return P.removeValue(Le)},onTouchEnd:function(){return P.removeValue(Le)},onMouseDown:function(Ue){Ue.preventDefault()}},data:Le}),P.formatOptionLabel(Le,"value"))}));if(ye)return null;var De=xe[0];return a.createElement(Y,Be({},ae,{data:De,isDisabled:ve}),this.formatOptionLabel(De,"value"))}},{key:"renderClearIndicator",value:function(){var P=this.getComponents().ClearIndicator,T=this.commonProps,te=this.props,oe=te.isDisabled,V=te.isLoading,J=this.state.isFocused;if(!this.isClearable()||!P||oe||!this.hasValue()||V)return null;var Y={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(P,Be({},T,{innerProps:Y,isFocused:J}))}},{key:"renderLoadingIndicator",value:function(){var P=this.getComponents().LoadingIndicator,T=this.commonProps,te=this.props,oe=te.isDisabled,V=te.isLoading,J=this.state.isFocused;return P&&V?a.createElement(P,Be({},T,{innerProps:{"aria-hidden":"true"},isDisabled:oe,isFocused:J})):null}},{key:"renderIndicatorSeparator",value:function(){var P=this.getComponents(),T=P.DropdownIndicator,te=P.IndicatorSeparator;if(!T||!te)return null;var oe=this.commonProps,V=this.props.isDisabled,J=this.state.isFocused;return a.createElement(te,Be({},oe,{isDisabled:V,isFocused:J}))}},{key:"renderDropdownIndicator",value:function(){var P=this.getComponents().DropdownIndicator;if(!P)return null;var T=this.commonProps,te=this.props.isDisabled,oe=this.state.isFocused,V={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(P,Be({},T,{innerProps:V,isDisabled:te,isFocused:oe}))}},{key:"renderMenu",value:function(){var P=this,T=this.getComponents(),te=T.Group,oe=T.GroupHeading,V=T.Menu,J=T.MenuList,Y=T.MenuPortal,ie=T.LoadingMessage,ae=T.NoOptionsMessage,ce=T.Option,fe=this.commonProps,ve=this.state.focusedOption,he=this.props,ye=he.captureMenuScroll,be=he.inputValue,_e=he.isLoading,xe=he.loadingMessage,Me=he.minMenuHeight,Te=he.maxMenuHeight,De=he.menuIsOpen,Le=he.menuPlacement,Re=he.menuPosition,He=he.menuPortalTarget,Ve=he.menuShouldBlockScroll,Ue=he.menuShouldScrollIntoView,at=he.noOptionsMessage,Qe=he.onMenuScrollToTop,ut=he.onMenuScrollToBottom;if(!De)return null;var tt,dt=function(rt,qt){var Lt=rt.type,Pt=rt.data,zt=rt.isDisabled,Gt=rt.isSelected,Kt=rt.label,pr=rt.value,Un=ve===Pt,Gn=zt?void 0:function(){return P.onOptionHover(Pt)},nn=zt?void 0:function(){return P.selectOption(Pt)},Kn="".concat(P.getElementId("option"),"-").concat(qt),dv={id:Kn,onClick:nn,onMouseMove:Gn,onMouseOver:Gn,tabIndex:-1};return a.createElement(ce,Be({},fe,{innerProps:dv,data:Pt,isDisabled:zt,isSelected:Gt,key:Kn,label:Kt,type:Lt,value:pr,isFocused:Un,innerRef:Un?P.getFocusedOptionRef:void 0}),P.formatOptionLabel(rt.data,"menu"))};if(this.hasOptions())tt=this.getCategorizedOptions().map((function(rt){if(rt.type==="group"){var qt=rt.data,Lt=rt.options,Pt=rt.index,zt="".concat(P.getElementId("group"),"-").concat(Pt),Gt="".concat(zt,"-heading");return a.createElement(te,Be({},fe,{key:zt,data:qt,options:Lt,Heading:oe,headingProps:{id:Gt,data:rt.data},label:P.formatGroupLabel(rt.data)}),rt.options.map((function(Kt){return dt(Kt,"".concat(Pt,"-").concat(Kt.index))})))}if(rt.type==="option")return dt(rt,"".concat(rt.index))}));else if(_e){var Et=xe({inputValue:be});if(Et===null)return null;tt=a.createElement(ie,fe,Et)}else{var xt=at({inputValue:be});if(xt===null)return null;tt=a.createElement(ae,fe,xt)}var Ut={minMenuHeight:Me,maxMenuHeight:Te,menuPlacement:Le,menuPosition:Re,menuShouldScrollIntoView:Ue},tn=a.createElement(y5,Be({},fe,Ut),(function(rt){var qt=rt.ref,Lt=rt.placerProps,Pt=Lt.placement,zt=Lt.maxHeight;return a.createElement(V,Be({},fe,Ut,{innerRef:qt,innerProps:{onMouseDown:P.onMenuMouseDown,onMouseMove:P.onMenuMouseMove,id:P.getElementId("listbox")},isLoading:_e,placement:Pt}),a.createElement(z5,{captureEnabled:ye,onTopArrive:Qe,onBottomArrive:ut,lockEnabled:Ve},(function(Gt){return a.createElement(J,Be({},fe,{innerRef:function(Kt){P.getMenuListRef(Kt),Gt(Kt)},isLoading:_e,maxHeight:zt,focusedOption:ve}),tt)})))}));return He||Re==="fixed"?a.createElement(Y,Be({},fe,{appendTo:He,controlElement:this.controlRef,menuPlacement:Le,menuPosition:Re}),tn):tn}},{key:"renderFormField",value:function(){var P=this,T=this.props,te=T.delimiter,oe=T.isDisabled,V=T.isMulti,J=T.name,Y=T.required,ie=this.state.selectValue;if(Y&&!this.hasValue()&&!oe)return a.createElement(H5,{name:J,onFocus:this.onValueInputFocus});if(J&&!oe){if(V){if(te){var ae=ie.map((function(ve){return P.getOptionValue(ve)})).join(te);return a.createElement("input",{name:J,type:"hidden",value:ae})}var ce=ie.length>0?ie.map((function(ve,he){return a.createElement("input",{key:"i-".concat(he),name:J,type:"hidden",value:P.getOptionValue(ve)})})):a.createElement("input",{name:J,type:"hidden",value:""});return a.createElement("div",null,ce)}var fe=ie[0]?this.getOptionValue(ie[0]):"";return a.createElement("input",{name:J,type:"hidden",value:fe})}}},{key:"renderLiveRegion",value:function(){var P=this.commonProps,T=this.state,te=T.ariaSelection,oe=T.focusedOption,V=T.focusedValue,J=T.isFocused,Y=T.selectValue,ie=this.getFocusableOptions();return a.createElement(M5,Be({},P,{id:this.getElementId("live-region"),ariaSelection:te,focusedOption:oe,focusedValue:V,isFocused:J,selectValue:Y,focusableOptions:ie}))}},{key:"render",value:function(){var P=this.getComponents(),T=P.Control,te=P.IndicatorsContainer,oe=P.SelectContainer,V=P.ValueContainer,J=this.props,Y=J.className,ie=J.id,ae=J.isDisabled,ce=J.menuIsOpen,fe=this.state.isFocused,ve=this.commonProps=this.getCommonProps();return a.createElement(oe,Be({},ve,{className:Y,innerProps:{id:ie,onKeyDown:this.onKeyDown},isDisabled:ae,isFocused:fe}),this.renderLiveRegion(),a.createElement(T,Be({},ve,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:ae,isFocused:fe,menuIsOpen:ce}),a.createElement(V,Be({},ve,{isDisabled:ae}),this.renderPlaceholderOrValue(),this.renderInput()),a.createElement(te,Be({},ve,{isDisabled:ae}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],x=[{key:"getDerivedStateFromProps",value:function(P,T){var te=T.prevProps,oe=T.clearFocusValueOnUpdate,V=T.inputIsHiddenAfterUpdate,J=T.ariaSelection,Y=T.isFocused,ie=T.prevWasFocused,ae=P.options,ce=P.value,fe=P.menuIsOpen,ve=P.inputValue,he=P.isMulti,ye=Ha(ce),be={};if(te&&(ce!==te.value||ae!==te.options||fe!==te.menuIsOpen||ve!==te.inputValue)){var _e=fe?(function(Re,He){return nS(tS(Re,He))})(P,ye):[],xe=oe?(function(Re,He){var Ve=Re.focusedValue,Ue=Re.selectValue.indexOf(Ve);if(Ue>-1){if(He.indexOf(Ve)>-1)return Ve;if(Ue<He.length)return He[Ue]}return null})(T,ye):null,Me=(function(Re,He){var Ve=Re.focusedOption;return Ve&&He.indexOf(Ve)>-1?Ve:He[0]})(T,_e);be={selectValue:ye,focusedOption:Me,focusedValue:xe,clearFocusValueOnUpdate:!1}}var Te=V!=null&&P!==te?{inputIsHidden:V,inputIsHiddenAfterUpdate:void 0}:{},De=J,Le=Y&&ie;return Y&&!Le&&(De={value:ei(he,ye,ye[0]||null),options:ye,action:"initial-input-focus"},Le=!ie),J?.action==="initial-input-focus"&&(De=null),Fe(Fe(Fe({},be),Te),{},{prevProps:P,ariaSelection:De,prevWasFocused:Le})}}],b&&ZE(v.prototype,b),x&&ZE(v,x),Object.defineProperty(v,"prototype",{writable:!1}),L})(a.Component);iv.defaultProps=U5;var K5=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function uS(i){var v=i.defaultInputValue,b=v===void 0?"":v,x=i.defaultMenuIsOpen,D=x!==void 0&&x,B=i.defaultValue,G=B===void 0?null:B,L=i.inputValue,P=i.menuIsOpen,T=i.onChange,te=i.onInputChange,oe=i.onMenuClose,V=i.onMenuOpen,J=i.value,Y=wn(i,K5),ie=qn((0,a.useState)(L!==void 0?L:b),2),ae=ie[0],ce=ie[1],fe=qn((0,a.useState)(P!==void 0?P:D),2),ve=fe[0],he=fe[1],ye=qn((0,a.useState)(J!==void 0?J:G),2),be=ye[0],_e=ye[1],xe=(0,a.useCallback)((function(Ve,Ue){typeof T=="function"&&T(Ve,Ue),_e(Ve)}),[T]),Me=(0,a.useCallback)((function(Ve,Ue){var at;typeof te=="function"&&(at=te(Ve,Ue)),ce(at!==void 0?at:Ve)}),[te]),Te=(0,a.useCallback)((function(){typeof V=="function"&&V(),he(!0)}),[V]),De=(0,a.useCallback)((function(){typeof oe=="function"&&oe(),he(!1)}),[oe]),Le=L!==void 0?L:ae,Re=P!==void 0?P:ve,He=J!==void 0?J:be;return Fe(Fe({},Y),{},{inputValue:Le,menuIsOpen:Re,onChange:xe,onInputChange:Me,onMenuClose:De,onMenuOpen:Te,value:He})}var W5=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],cS=function(){var i=arguments.length>1?arguments[1]:void 0,v=arguments.length>2?arguments[2]:void 0,b=String(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").toLowerCase(),x=String(v.getOptionValue(i)).toLowerCase(),D=String(v.getOptionLabel(i)).toLowerCase();return x===b||D===b},av={formatCreateLabel:function(i){return'Create "'.concat(i,'"')},isValidNewOption:function(i,v,b,x){return!(!i||v.some((function(D){return cS(i,D,x)}))||b.some((function(D){return cS(i,D,x)})))},getNewOptionData:function(i,v){return{label:v,value:i,__isNew__:!0}}},Y5=(0,a.forwardRef)((function(i,v){var b=(function(x){var D=x.allowCreateWhileLoading,B=D!==void 0&&D,G=x.createOptionPosition,L=G===void 0?"last":G,P=x.formatCreateLabel,T=P===void 0?av.formatCreateLabel:P,te=x.isValidNewOption,oe=te===void 0?av.isValidNewOption:te,V=x.getNewOptionData,J=V===void 0?av.getNewOptionData:V,Y=x.onCreateOption,ie=x.options,ae=ie===void 0?[]:ie,ce=x.onChange,fe=wn(x,W5),ve=fe.getOptionValue,he=ve===void 0?Jx:ve,ye=fe.getOptionLabel,be=ye===void 0?Qx:ye,_e=fe.inputValue,xe=fe.isLoading,Me=fe.isMulti,Te=fe.value,De=fe.name,Le=(0,a.useMemo)((function(){return oe(_e,Ha(Te),ae,{getOptionValue:he,getOptionLabel:be})?J(_e,T(_e)):void 0}),[T,J,be,he,_e,oe,ae,Te]),Re=(0,a.useMemo)((function(){return!B&&xe||!Le?ae:L==="first"?[Le].concat(Wo(ae)):[].concat(Wo(ae),[Le])}),[B,L,xe,Le,ae]),He=(0,a.useCallback)((function(Ve,Ue){if(Ue.action!=="select-option")return ce(Ve,Ue);var at=Array.isArray(Ve)?Ve:[Ve];if(at[at.length-1]!==Le)ce(Ve,Ue);else if(Y)Y(_e);else{var Qe=J(_e,_e),ut={action:"create-option",name:De,option:Qe};ce(ei(Me,[].concat(Wo(Ha(Te)),[Qe]),Qe),ut)}}),[J,_e,Me,De,Le,Y,ce,Te]);return Fe(Fe({},fe),{},{options:Re,onChange:He})})(uS(i));return a.createElement(iv,Be({ref:v},b))})),fS=Y5,Z5=(0,a.forwardRef)((function(i,v){var b=uS(i);return a.createElement(iv,Be({ref:v},b))})),dS=Number.isNaN||function(i){return typeof i=="number"&&i!=i};function X5(i,v){if(i.length!==v.length)return!1;for(var b=0;b<i.length;b++)if(!((x=i[b])===(D=v[b])||dS(x)&&dS(D)))return!1;var x,D;return!0}const sv=function(i,v){var b;v===void 0&&(v=X5);var x,D=[],B=!1;return function(){for(var G=[],L=0;L<arguments.length;L++)G[L]=arguments[L];return B&&b===this&&v(G,D)||(x=i.apply(this,G),B=!0,b=this,D=G),x}};var hS=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function pS(i){cancelAnimationFrame(i.id)}var lv=-1;function vS(i){if(i===void 0&&(i=!1),lv===-1||i){var v=document.createElement("div"),b=v.style;b.width="50px",b.height="50px",b.overflow="scroll",document.body.appendChild(v),lv=v.offsetWidth-v.clientWidth,document.body.removeChild(v)}return lv}var ni=null;function gS(i){if(i===void 0&&(i=!1),ni===null||i){var v=document.createElement("div"),b=v.style;b.width="50px",b.height="50px",b.overflow="scroll",b.direction="rtl";var x=document.createElement("div"),D=x.style;return D.width="100px",D.height="100px",v.appendChild(x),document.body.appendChild(v),v.scrollLeft>0?ni="positive-descending":(v.scrollLeft=1,ni=v.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(v),ni}return ni}var Q5=function(i,v){return i};function J5(i){var v,b=i.getItemOffset,x=i.getEstimatedTotalSize,D=i.getItemSize,B=i.getOffsetForIndexAndAlignment,G=i.getStartIndexForOffset,L=i.getStopIndexForStartIndex,P=i.initInstanceProps,T=i.validateProps;return v=(function(te){function oe(J){var Y;return(Y=te.call(this,J)||this)._instanceProps=P(Y.props,Mp(Y)),Y._outerRef=void 0,Y._resetIsScrollingTimeoutId=null,Y.state={instance:Mp(Y),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof Y.props.initialScrollOffset=="number"?Y.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},Y._callOnItemsRendered=void 0,Y._callOnItemsRendered=sv((function(ie,ae,ce,fe){return Y.props.onItemsRendered({overscanStartIndex:ie,overscanStopIndex:ae,visibleStartIndex:ce,visibleStopIndex:fe})})),Y._callOnScroll=void 0,Y._callOnScroll=sv((function(ie,ae,ce){return Y.props.onScroll({scrollDirection:ie,scrollOffset:ae,scrollUpdateWasRequested:ce})})),Y._getItemStyle=void 0,Y._getItemStyle=function(ie){var ae,ce=Y.props,fe=ce.direction,ve=ce.itemSize,he=ce.layout,ye=Y._getItemStyleCache(ve,he,fe);if(ye.hasOwnProperty(ie))ae=ye[ie];else{var be=b(Y.props,ie,Y._instanceProps),_e=D(Y.props,ie,Y._instanceProps),xe=fe==="horizontal"||he==="horizontal",Me=fe==="rtl",Te=xe?be:0;ye[ie]=ae={position:"absolute",left:Me?void 0:Te,right:Me?Te:void 0,top:xe?0:be,height:xe?"100%":_e,width:xe?_e:"100%"}}return ae},Y._getItemStyleCache=void 0,Y._getItemStyleCache=sv((function(ie,ae,ce){return{}})),Y._onScrollHorizontal=function(ie){var ae=ie.currentTarget,ce=ae.clientWidth,fe=ae.scrollLeft,ve=ae.scrollWidth;Y.setState((function(he){if(he.scrollOffset===fe)return null;var ye=Y.props.direction,be=fe;if(ye==="rtl")switch(gS()){case"negative":be=-fe;break;case"positive-descending":be=ve-ce-fe}return be=Math.max(0,Math.min(be,ve-ce)),{isScrolling:!0,scrollDirection:he.scrollOffset<fe?"forward":"backward",scrollOffset:be,scrollUpdateWasRequested:!1}}),Y._resetIsScrollingDebounced)},Y._onScrollVertical=function(ie){var ae=ie.currentTarget,ce=ae.clientHeight,fe=ae.scrollHeight,ve=ae.scrollTop;Y.setState((function(he){if(he.scrollOffset===ve)return null;var ye=Math.max(0,Math.min(ve,fe-ce));return{isScrolling:!0,scrollDirection:he.scrollOffset<ye?"forward":"backward",scrollOffset:ye,scrollUpdateWasRequested:!1}}),Y._resetIsScrollingDebounced)},Y._outerRefSetter=function(ie){var ae=Y.props.outerRef;Y._outerRef=ie,typeof ae=="function"?ae(ie):ae!=null&&typeof ae=="object"&&ae.hasOwnProperty("current")&&(ae.current=ie)},Y._resetIsScrollingDebounced=function(){var ie,ae,ce,fe;Y._resetIsScrollingTimeoutId!==null&&pS(Y._resetIsScrollingTimeoutId),Y._resetIsScrollingTimeoutId=(ie=Y._resetIsScrolling,ae=150,ce=hS(),fe={id:requestAnimationFrame((function ve(){hS()-ce>=ae?ie.call(null):fe.id=requestAnimationFrame(ve)}))})},Y._resetIsScrolling=function(){Y._resetIsScrollingTimeoutId=null,Y.setState({isScrolling:!1},(function(){Y._getItemStyleCache(-1,null)}))},Y}JO(oe,te),oe.getDerivedStateFromProps=function(J,Y){return e3(J,Y),T(J),null};var V=oe.prototype;return V.scrollTo=function(J){J=Math.max(0,J),this.setState((function(Y){return Y.scrollOffset===J?null:{scrollDirection:Y.scrollOffset<J?"forward":"backward",scrollOffset:J,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},V.scrollToItem=function(J,Y){Y===void 0&&(Y="auto");var ie=this.props,ae=ie.itemCount,ce=ie.layout,fe=this.state.scrollOffset;J=Math.max(0,Math.min(J,ae-1));var ve=0;if(this._outerRef){var he=this._outerRef;ve=ce==="vertical"?he.scrollWidth>he.clientWidth?vS():0:he.scrollHeight>he.clientHeight?vS():0}this.scrollTo(B(this.props,J,Y,fe,this._instanceProps,ve))},V.componentDidMount=function(){var J=this.props,Y=J.direction,ie=J.initialScrollOffset,ae=J.layout;if(typeof ie=="number"&&this._outerRef!=null){var ce=this._outerRef;Y==="horizontal"||ae==="horizontal"?ce.scrollLeft=ie:ce.scrollTop=ie}this._callPropsCallbacks()},V.componentDidUpdate=function(){var J=this.props,Y=J.direction,ie=J.layout,ae=this.state,ce=ae.scrollOffset;if(ae.scrollUpdateWasRequested&&this._outerRef!=null){var fe=this._outerRef;if(Y==="horizontal"||ie==="horizontal")if(Y==="rtl")switch(gS()){case"negative":fe.scrollLeft=-ce;break;case"positive-ascending":fe.scrollLeft=ce;break;default:var ve=fe.clientWidth,he=fe.scrollWidth;fe.scrollLeft=he-ve-ce}else fe.scrollLeft=ce;else fe.scrollTop=ce}this._callPropsCallbacks()},V.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&pS(this._resetIsScrollingTimeoutId)},V.render=function(){var J=this.props,Y=J.children,ie=J.className,ae=J.direction,ce=J.height,fe=J.innerRef,ve=J.innerElementType,he=J.innerTagName,ye=J.itemCount,be=J.itemData,_e=J.itemKey,xe=_e===void 0?Q5:_e,Me=J.layout,Te=J.outerElementType,De=J.outerTagName,Le=J.style,Re=J.useIsScrolling,He=J.width,Ve=this.state.isScrolling,Ue=ae==="horizontal"||Me==="horizontal",at=Ue?this._onScrollHorizontal:this._onScrollVertical,Qe=this._getRangeToRender(),ut=Qe[0],tt=Qe[1],dt=[];if(ye>0)for(var Et=ut;Et<=tt;Et++)dt.push((0,a.createElement)(Y,{data:be,key:xe(Et,be),index:Et,isScrolling:Re?Ve:void 0,style:this._getItemStyle(Et)}));var xt=x(this.props,this._instanceProps);return(0,a.createElement)(Te||De||"div",{className:ie,onScroll:at,ref:this._outerRefSetter,style:Be({position:"relative",height:ce,width:He,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:ae},Le)},(0,a.createElement)(ve||he||"div",{children:dt,ref:fe,style:{height:Ue?"100%":xt,pointerEvents:Ve?"none":void 0,width:Ue?xt:"100%"}}))},V._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var J=this._getRangeToRender(),Y=J[0],ie=J[1],ae=J[2],ce=J[3];this._callOnItemsRendered(Y,ie,ae,ce)}if(typeof this.props.onScroll=="function"){var fe=this.state,ve=fe.scrollDirection,he=fe.scrollOffset,ye=fe.scrollUpdateWasRequested;this._callOnScroll(ve,he,ye)}},V._getRangeToRender=function(){var J=this.props,Y=J.itemCount,ie=J.overscanCount,ae=this.state,ce=ae.isScrolling,fe=ae.scrollDirection,ve=ae.scrollOffset;if(Y===0)return[0,0,0,0];var he=G(this.props,ve,this._instanceProps),ye=L(this.props,he,ve,this._instanceProps),be=ce&&fe!=="backward"?1:Math.max(1,ie),_e=ce&&fe!=="forward"?1:Math.max(1,ie);return[Math.max(0,he-be),Math.max(0,Math.min(Y-1,ye+_e)),he,ye]},oe})(a.PureComponent),v.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},v}var e3=function(i,v){i.children,i.direction,i.height,i.layout,i.innerTagName,i.outerTagName,i.width,v.instance},t3=J5({getItemOffset:function(i,v){return v*i.itemSize},getItemSize:function(i,v){return i.itemSize},getEstimatedTotalSize:function(i){var v=i.itemCount;return i.itemSize*v},getOffsetForIndexAndAlignment:function(i,v,b,x,D,B){var G=i.direction,L=i.height,P=i.itemCount,T=i.itemSize,te=i.layout,oe=i.width,V=G==="horizontal"||te==="horizontal"?oe:L,J=Math.max(0,P*T-V),Y=Math.min(J,v*T),ie=Math.max(0,v*T-V+T+B);switch(b==="smart"&&(b=x>=ie-V&&x<=Y+V?"auto":"center"),b){case"start":return Y;case"end":return ie;case"center":var ae=Math.round(ie+(Y-ie)/2);return ae<Math.ceil(V/2)?0:ae>J+Math.floor(V/2)?J:ae;default:return x>=ie&&x<=Y?x:x<ie?ie:Y}},getStartIndexForOffset:function(i,v){var b=i.itemCount,x=i.itemSize;return Math.max(0,Math.min(b-1,Math.floor(v/x)))},getStopIndexForStartIndex:function(i,v,b){var x=i.direction,D=i.height,B=i.itemCount,G=i.itemSize,L=i.layout,P=i.width,T=v*G,te=x==="horizontal"||L==="horizontal"?P:D,oe=Math.ceil((te+b-T)/G);return Math.max(0,Math.min(B-1,v+oe-1))},initInstanceProps:function(i){},validateProps:function(i){i.itemSize}});function yS(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=i[b];return x}for(var n3=[],Ya=0;Ya<1e4;Ya+=1)n3.push({value:Ya,label:"Option ".concat(Ya)});const r3=function(i){var v=i.options,b=i.children,x=i.maxHeight,D=(function(G,L){return(function(P){if(Array.isArray(P))return P})(G)||(function(P,T){var te=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(te!=null){var oe,V,J,Y,ie=[],ae=!0,ce=!1;try{if(J=(te=te.call(P)).next,T!==0)for(;!(ae=(oe=J.call(te)).done)&&(ie.push(oe.value),ie.length!==T);ae=!0);}catch(fe){ce=!0,V=fe}finally{try{if(!ae&&te.return!=null&&(Y=te.return(),Object(Y)!==Y))return}finally{if(ce)throw V}}return ie}})(G,L)||(function(P,T){if(P){if(typeof P=="string")return yS(P,T);var te=Object.prototype.toString.call(P).slice(8,-1);return te==="Object"&&P.constructor&&(te=P.constructor.name),te==="Map"||te==="Set"?Array.from(P):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?yS(P,T):void 0}})(G,L)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})((0,i.getValue)(),1)[0],B=35*v.indexOf(D);return u().createElement(t3,{height:x,itemCount:b.length,itemSize:35,initialScrollOffset:B},(function(G){var L=G.index,P=G.style;return u().createElement("div",{style:P},b[L])}))};var Za=l(970),Jr={};function ri(i){return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},ri(i)}Jr.styleTagTransform=sr(),Jr.setAttributes=Dr(),Jr.insert=Rr().bind(null,"head"),Jr.domAPI=Lr(),Jr.insertStyleElement=jr(),qr()(Za.Z,Jr),Za.Z&&Za.Z.locals&&Za.Z.locals;var o3=["invalid","disabled","pending","wrapperClassName","wrapperStyle","optimizeMenuList","components"];function uv(){return uv=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},uv.apply(this,arguments)}function mS(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function hr(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?mS(Object(b),!0).forEach((function(x){i3(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):mS(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function i3(i,v,b){return(v=(function(x){var D=(function(B,G){if(ri(B)!=="object"||B===null)return B;var L=B[Symbol.toPrimitive];if(L!==void 0){var P=L.call(B,"string");if(ri(P)!=="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)})(x);return ri(D)==="symbol"?D:String(D)})(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var bS=function(i){var v=i.invalid,b=i.disabled,x=i.pending,D=i.wrapperClassName,B=i.wrapperStyle,G=i.optimizeMenuList,L=i.components,P=hr(hr({},(function(te,oe){if(te==null)return{};var V,J,Y=(function(ae,ce){if(ae==null)return{};var fe,ve,he={},ye=Object.keys(ae);for(ve=0;ve<ye.length;ve++)fe=ye[ve],ce.indexOf(fe)>=0||(he[fe]=ae[fe]);return he})(te,oe);if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(te);for(J=0;J<ie.length;J++)V=ie[J],oe.indexOf(V)>=0||Object.prototype.propertyIsEnumerable.call(te,V)&&(Y[V]=te[V])}return Y})(i,o3)),{},{isLoading:x,isDisabled:b,classNamePrefix:"hise-select",styles:{menuPortal:function(te){return hr(hr({},te),{},{zIndex:9999})},menu:function(te){return hr(hr({},te),{},{zIndex:9999})}}}),T=hr({},L);return G&&(T.MenuList=r3),u().createElement("div",{className:U()("hise-select__wrapper",D,{invalid:v}),style:B},u().createElement(Z5,uv({},P,{components:T})))};bS.defaultProps={invalid:!1,disabled:!1,pending:!1,wrapperClassName:"",wrapperStyle:{}};const _S=bS;function oi(i){return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},oi(i)}function Xa(){return Xa=Object.assign?Object.assign.bind():function(i){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(i[x]=b[x])}return i},Xa.apply(this,arguments)}function eo(i){return(function(v){if(Array.isArray(v))return fv(v)})(i)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(i)||wS(i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function cv(i,v){return(function(b){if(Array.isArray(b))return b})(i)||(function(b,x){var D=b==null?null:typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(D!=null){var B,G,L,P,T=[],te=!0,oe=!1;try{if(L=(D=D.call(b)).next,x!==0)for(;!(te=(B=L.call(D)).done)&&(T.push(B.value),T.length!==x);te=!0);}catch(V){oe=!0,G=V}finally{try{if(!te&&D.return!=null&&(P=D.return(),Object(P)!==P))return}finally{if(oe)throw G}}return T}})(i,v)||wS(i,v)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function wS(i,v){if(i){if(typeof i=="string")return fv(i,v);var b=Object.prototype.toString.call(i).slice(8,-1);return b==="Object"&&i.constructor&&(b=i.constructor.name),b==="Map"||b==="Set"?Array.from(i):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?fv(i,v):void 0}}function fv(i,v){(v==null||v>i.length)&&(v=i.length);for(var b=0,x=new Array(v);b<v;b++)x[b]=i[b];return x}function OS(i,v){var b=Object.keys(i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(i);v&&(x=x.filter((function(D){return Object.getOwnPropertyDescriptor(i,D).enumerable}))),b.push.apply(b,x)}return b}function Vt(i){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?OS(Object(b),!0).forEach((function(x){Qa(i,x,b[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(b)):OS(Object(b)).forEach((function(x){Object.defineProperty(i,x,Object.getOwnPropertyDescriptor(b,x))}))}return i}function Qa(i,v,b){return(v=(function(x){var D=(function(B,G){if(oi(B)!=="object"||B===null)return B;var L=B[Symbol.toPrimitive];if(L!==void 0){var P=L.call(B,"string");if(oi(P)!=="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)})(x);return oi(D)==="symbol"?D:String(D)})(v))in i?Object.defineProperty(i,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):i[v]=b,i}var a3={type:"",label:"",key:"",placeholder:"",invalid:function(){return!1},disabled:function(){return!1},options:{},disableOptionFn:function(){return!1},disableOptionText:function(){return null},pending:!1,isMulti:!1,component:null,style:{},className:"col-12",additionalInputParams:{},optimizeMenuList:!1},s3=function(i){var v=i.c,b=i.editedResource,x=i.onChange,D=i.setEntireResource;return a.createElement("div",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,v.component({value:mR(b[v.key]),initialState:Vt({},b),editedResource:b,onChange:function(B){return x(v.key,B)},setEntireResource:function(B){return D(B)}}),v.invalid(b)&&a.createElement("span",{className:"invalid-feedback d-block"},v.invalidMessage))},l3=function(i){var v=i.c,b=i.editedResource,x=i.onChange;return a.createElement("div",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement("div",{className:"text-nowrap"},Object.keys(v.options).map((function(D){return a.createElement(lr,{key:D,className:"btn-sm",color:D===b[v.key]?"primary":"secondary",onClick:function(){return x(v.key,D)},disabled:v.disabled(b)},v.options[D])}))))},Ja=function(i,v){if(!v.groupOptionsBy)return i;var b=kR((function(x){return x[v.groupOptionsBy]}))(i);return Object.entries(b).map((function(x){var D=cv(x,2);return{label:D[0],options:D[1]}}))},u3=function(i){var v=Vt(Vt({},i),{},{data:i.data});return a.createElement(Fx.Option,v,a.createElement("div",null,i.data.label),i.data.description&&a.createElement("small",null,i.data.description))},c3=function(i){var v,b=i.c,x=i.editedResource,D=i.onChange,B={};b.advancedOptions?(v=b.advancedOptions,B.Option=u3):v=Object.keys(b.options).map((function(L){return{value:L,label:b.options[L]}}));var G=b.isMulti?a.createElement(a.Fragment,null,!b.hideAddAll&&!b.disabled(x)&&a.createElement(UE,{className:"ml-2 mb-1 btn-sm",onClick:function(){return D(b.key,v.map((function(L){return L.value})))}},"Add All"),a.createElement(_S,{value:x[b.key]?x[b.key].map((function(L){return Ca(Aa("value",String(L)))(v)})):[],options:Ja(v,b),placeholder:b.placeholder,onChange:function(L){return D(b.key,(L||[]).map((function(P){return P.value})))},invalid:b.invalid(x),invalidMessage:b.invalidMessage,disabled:b.disabled(x),closeMenuOnSelect:b.closeMenuOnSelect,pending:b.pending,components:B,isMulti:!0})):a.createElement(_S,{value:Ca(Aa("value",String(x[b.key])))(v),options:Ja(v,b),placeholder:b.placeholder,onChange:function(L){return D(b.key,L.value)},invalid:b.invalid(x),invalidMessage:b.invalidMessage,disabled:b.disabled(x),closeMenuOnSelect:b.closeMenuOnSelect,pending:b.pending,components:B});return a.createElement("label",{className:b.className,style:b.style,key:b.key,id:b.key},b.label,G,a.createElement(Wr,{invalid:b.invalid(x),style:{display:"none"}}),a.createElement(Go,null,b.invalidMessage))},ES=function(i){var v,b=i.c,x=i.editedResource,D=i.onChange;v=b.advancedOptions?b.advancedOptions:Object.keys(b.options).map((function(Y){return{value:Y,label:b.options[Y]}}));var B=x[b.key],G=cv(a.useState([]),2),L=G[0],P=G[1],T=[].concat(eo(v),eo(L));a.useEffect((function(){if(B){var Y=T.map((function(ie){return ie.value}));if(b.isMulti)B.forEach((function(ie){Y.includes(ie)||P([].concat(eo(L),[{value:ie,label:ie}]))}));else{if(Y.includes(B))return;P([].concat(eo(L),[{value:B,label:B}]))}}}),[b.options]);var te,oe=function(Y){kp(Y)||HE(Y)||kp(Y.value)||HE(Y.value)||(D(b.key,Y.value),T.map((function(ie){return ie.value})).includes(Y.value)||b.invalid(Vt(Vt({},x),{},Qa({},b.key,Y.value)))||P([].concat(eo(L),[{value:Y.value,label:Y.value}])))},V=function(Y){if(!kp(Y)&&Y&&typeof Y!="string"){var ie=Y.map((function(ce){return ce.value}));D(b.key,ie);var ae=T.map((function(ce){return ce.value}));ie.forEach((function(ce){ae.includes(ce)||b.invalid(Vt(Vt({},x),{},Qa({},b.key,ce)))||P([].concat(eo(L),[{value:ce,label:ce}]))}))}},J=b.isMulti?a.createElement(a.Fragment,null,!b.hideAddAll&&!b.disabled(x)&&a.createElement(UE,{className:"ml-2 mb-1 btn-sm",onClick:function(){return D(b.key,v.map((function(Y){return Y.value})))}},"Add All"),a.createElement(fS,{value:(B||[]).map((function(Y){return Ca(Aa("value",Y))(T)})),isMulti:b.isMulti,onChange:function(Y){return V(Y)},onInputChange:function(Y){return V(Y)},options:Ja(T,b),pending:b.pending,placeholder:b.placeholder})):a.createElement(fS,{value:{value:B,label:(te=Ca(Aa("value",B))(T),te&&te.label?te.label:"")},onChange:function(Y){return oe(Y)},onInputChange:function(Y){return oe(Y)},options:Ja(T,b),pending:b.pending,isValidNewOption:function(Y,ie,ae){return!ae.find((function(ce){return ce.value===Y}))},placeholder:b.placeholder});return a.createElement("label",{className:b.className,style:b.style,form:!0,key:b.key,id:b.key},b.label,J,a.createElement(Wr,{invalid:b.invalid(x),style:{display:"none"}}),a.createElement(Go,null,b.invalidMessage))},f3=function(i){var v=i.c,b=i.editedResource,x=i.onChange,D=usePromise(v.optionsPromise,{});return a.createElement(ES,{c:Vt(Vt({},v),{},{options:D.response}),editedResource:b,onChange:x,pending:D.loading})},d3=function(i){var v=i.c,b=i.editedResource,x=i.onChange;return a.createElement("label",{className:"".concat(v.className," ml-4"),style:v.style,key:v.key,id:v.key},a.createElement(Wr,{type:v.type,checked:b[v.key]==="true"?"true":"",onChange:function(D){return x(v.key,D.target.checked.toString())},disabled:v.disabled(b)}),v.label,a.createElement(Go,null,v.invalidMessage))},h3=function(i){var v=i.c,b=(i.editedResource,i.onChange);return a.createElement("div",{className:"".concat(v.className),style:v.style,key:v.key,id:v.key},v.label,Object.entries(v.options).map((function(x){var D=cv(x,2),B=D[0],G=D[1];return a.createElement("label",{key:B,className:"d-block ml-4"},a.createElement(Wr,{type:"radio",value:B,name:v.key,onChange:function(L){return b(v.key,B)},defaultChecked:v.default===B?"checked":""}),G)})))},p3=function(i){var v=i.c,b=i.editedResource,x=i.onChange;return a.createElement("label",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement(Wr,{type:v.type,value:b[v.key],onChange:function(D){return x(v.key,D.target.value)},placeholder:v.placeholder,invalid:v.invalid(b),disabled:v.disabled(b)}),a.createElement(Go,null,v.invalidMessage))},v3=function(i){var v=i.c,b=i.editedResource,x=i.onChange;return a.createElement("label",{className:v.className,style:v.style,key:v.key,id:v.key},v.label,a.createElement(Wr,Xa({type:v.type,onChange:function(D){return x(v.key,D.target.files)},invalid:v.invalid(b),disabled:v.disabled(b)},v.additionalInputParams)),a.createElement(Go,null,v.invalidMessage))},xS=function(i){var v=i.editedResource,b=function(D,B){i.onChange(Vt(Vt({},v),{},Qa({},D,B)))},x=i.controls.filter(Boolean).map((function(D){return(function(B,G,L,P){var T=Vt(Vt({},a3),B),te={c:T,editedResource:G,onChange:L};return T.hidden&&T.hidden(G)?null:T.type==="custom"?a.createElement(s3,Xa({},te,{setEntireResource:P})):T.type==="toggle"?a.createElement(l3,te):T.type==="select"?a.createElement(c3,te):T.type==="creatableSelect"?a.createElement(ES,te):T.type==="promiseCreatableSelect"?a.createElement(f3,te):T.type==="checkbox"?a.createElement(d3,te):T.type==="radio"?a.createElement(h3,te):T.type==="file"?a.createElement(v3,te):a.createElement(p3,te)})(D,v,b,i.onChange)}));return a.createElement("section",{className:"resource-editor-controls ".concat(i.className),style:i.style},i.viewOnlyControls&&a.createElement("ul",{className:"list-unstyled"},i.viewOnlyControls.map((function(D){return a.createElement("li",null,a.createElement("strong",{className:"mr-2"},D.key,":")," ",v[D.key])}))),x)};xS.defaultProps={className:"row",style:{},viewOnlyControls:[]}})(),c})()))})(Dh)),Dh.exports}var Ye=nq();const _O=async(e,t)=>await fetch("undefined/collaboration/replica/copyFileReplica",{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),rq=e=>{const[t,n]=se.useState(!1);return e.type!=="fileLayerNode"||!e.isNodeHover?null:$.jsx("div",{className:"position-absolute",style:{right:0},children:$.jsx("span",{className:`badge rounded-pill text-white ${t?"bg-primary":"bg-secondary"}`,style:{fontSize:"1.35rem",marginTop:"0.75rem"},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:()=>{e.toggle&&e.toggle()},children:"COPY"})})},oq=e=>{const[t,n]=se.useState(!1),r=()=>n(!t);return e.type!=="fileLayerNode"?null:$.jsxs($.Fragment,{children:[$.jsx(Ye.Button,{id:"copy-filelayer-btn",className:"btn-sm",onClick:()=>r(),children:"Copy File Set"}),$.jsx(wO,{...e,isOpen:t,toggle:r})]})},wO=({vertexId:e,certificateId:t,refresh:n,isOpen:r,toggle:o})=>{const[s,l]=se.useState(!1),c=async()=>{l(!0);try{await _O(e,t).then(async f=>{if(f.ok)n&&n(),Ke.success("Copied file into workspace.");else{const h=await f.json();Ke.error("Unable to copy file: "+h.Message)}o()})}catch(f){console.log(f)}l(!1)};return $.jsx(Ye.ConfirmationModal,{id:"copy-filelayer-modal",className:"top-25",pending:s,isOpen:r,onClose:o,headerContent:"Do you want to copy all files in this file set into your workspace?",cancelButtonText:"Close",onSubmit:()=>c()})},iq=()=>{const{node:e,setNode:t,certificate:n,type:r,nodeLayers:o,setNodeLayers:s}=ot();if(!o.previous.nodes.length)return null;const l=()=>{s({previous:{nodes:[],edges:[]},current:o.previous}),t({})};return $.jsxs("div",{className:"position-absolute ml-4 mt-3",style:{zIndex:1},children:[$.jsx(Ye.Button,{id:"layer-back-button",onClick:l,icon:"fas fa-long-arrow-alt-left",children:"Back"}),$.jsx("span",{id:"subgraph-msg",className:"ml-3 me-3 mr-3 ms-3 font-italic fst-italic fw-bold font-weight-bold",children:"Currently viewing subgraph of a file set"}),$.jsx(oq,{vertexId:e.id,certificateId:n.id,type:r,refresh:e.data?.refresh})]})},aq=(e,t)=>{const n={backgroundColor:"white",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px"};switch(e){case"FileSet":case"Visualization":n.backgroundColor="yellow";break;case"File":case"IDE":n.borderColor="lightblue",t&&(n.borderColor="orange");break;default:n.borderColor="#BBBBBB";break}return n},sq=e=>({type:"text",key:"restrictionNotes",label:"Restriction Notes - Internal",invalid:n=>n.restrictionNotes.length<1}),lq=(e,t)=>Object.keys(t).filter(r=>r!==e).reduce((r,o)=>(r[o]=t[o],r),{}),uq=(e,t,n)=>{switch(e){case"reviewNode":return aq(t,n);case"readNode":case"editNode":default:return jh(t)}},sa=(e,t,n,r,o)=>{const s=cq(e,n,r,o),l=fq(t);return xO(s,l)},cq=(e,t,n,r)=>{const o={x:0,y:0},s=[];return bt(e)||dn(e)||e.forEach(l=>{const c=l.split("/")[0],f=t&&!!t[l];s.push({id:l,position:o,type:c!=="FileLayer"?n:"fileLayerNode",data:r??{},style:uq(n,c,f)})}),s},fq=e=>Object.entries(e||{}).reduce((t,[n,r])=>[...t,...r.map(o=>({id:`${n}-${o}`,source:n,target:o,type:"smoothstep",animated:!0}))],[]),OO=250,EO=75,xO=(e,t,n="LR")=>{const r=new uo.graphlib.Graph;r.setDefaultEdgeLabel(()=>({}));const o=n==="LR";return r.setGraph({nodesep:70,ranksep:110,rankdir:n}),e.forEach(s=>{r.setNode(s.id,{width:OO,height:EO})}),t.forEach(s=>{r.setEdge(s.source,s.target)}),uo.layout(r),e.forEach(s=>{const l=r.node(s.id);return s.targetPosition=o?Ce.Left:Ce.Top,s.sourcePosition=o?Ce.Right:Ce.Bottom,s.position={x:l.x-OO/2,y:l.y-EO/2},s}),{nodes:e,edges:t}},jh=e=>{const t={backgroundColor:"white",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px"};switch(e){case"FileSet":case"Visualization":t.backgroundColor="yellow";break;case"IngestReceipt":t.borderColor="#EE7733";break;case"FileLayer":case"File":t.borderColor="#33BBEE";break;case"IDE":t.borderColor="#882255";break;case"Pipeline":t.borderColor="#F283EB";break;case"Process":t.borderColor="#009988";break;case"Trace":t.borderColor="#999933";break;case"Specimen":case"Sample":case"Subject":case"Cohort":t.borderColor="#BBBBBB";break;case"Submission":t.borderColor="#285222";break;case"DirectUpload":t.borderColor="#F78383";break;default:t.borderColor="#eee";break}return t},SO=(e,t,n,r)=>{const o={};if(!["Sample","Subject"].includes(e)||!n||!r)return o;const s=n[t];return s&&Object.entries(s).forEach(([l,c])=>{l==="Survey Data Scheme Key"&&(o.surveyData=r[c]),l==="EMR Scheme Key"&&(o.emrData=r[c]),l==="Lab Data Scheme Key"&&(o.labData=r[c])}),o},dq=(e,t)=>{if(!t)return e;switch(e){case"FileSet":return $.jsxs($.Fragment,{children:["Data Set",$.jsx("br",{}),`(${t.Title})`]});case"Visualization":return $.jsxs($.Fragment,{children:[e,$.jsx("br",{}),`(${t.Title})`]});case"IngestReceipt":return"Data Ingested";case"DirectUpload":return"Data Directly Uploaded";case"FileLayer":return"File Set";case"File":return`.${t["File Extension"]} ${e}`;case"Process":case"Subject":case"IDE":case"Trace":case"Specimen":case"Sample":case"Cohort":case"Pipeline":case"Submission":return e;default:return null}},hq=(e,t)=>{if(!t)return null;switch(e){case"Cohort":case"FileSet":case"IDE":case"IngestReceipt":case"Pipeline":case"Subject":case"Submission":case"Trace":case"Visualization":return t.Description;case"Sample":return t["Visit Name"];case"Specimen":return t["Specimen Type"];case"File":return $.jsxs($.Fragment,{children:[t["File Type"]&&$.jsxs($.Fragment,{children:[t["File Type"],$.jsx("br",{})]}),$.jsx("span",{className:"font-italic",children:t["File Size"]})]});case"Process":return t.Type;case"FileLayer":default:return null}},kO=(e,t,n)=>{if(n==="false")return null;switch(e){case"Visualization":return`/collaboration/visualization/${t}`;case"IngestReceipt":return`/ingest-receipts/${t}`;case"File":return`/files/${t}`;case"Process":return`/processes/${t}`;case"Sample":return`/samples/${t}`;case"Subject":return`/subjects/${t}`;case"Cohort":return`/cohorts/${t}`;case"Pipeline":return`/pipelines/${t}`;case"Submission":return`/submissions/${t}`;case"FileLayer":default:return null}},NO=(e,t,n)=>{if(!t)return e;if(n==="demographicsData")return`${e[0].toUpperCase()}${e.split(/(?=[A-Z])/).join(" ").slice(1)}`;const r=t[e];return r&&r.friendlyName?r.friendlyName:e},TO=(e,t,n,r)=>{if(!n)return t;const o=n[e];return!o||r==="demographicsData"?t:o.units?`${t} ${o.units}`:t},CO=({entries:e,scheme:t,tab:n})=>$.jsx("table",{className:"table",children:$.jsx("tbody",{children:e.map(([r,o])=>$.jsxs("tr",{children:[$.jsx("th",{scope:"row",children:NO(r,t,n)}),$.jsx("td",{children:TO(r,o,t,n)})]},r))})}),pq=({activeEntry:e,setActiveEntry:t,emrData:n})=>$.jsx("div",{className:"text-center",children:$.jsxs("div",{className:"btn-group mb-3",children:[$.jsxs("button",{className:"btn btn-secondary dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false",children:["Visit Day ",e]}),$.jsx("ul",{className:"dropdown-menu",children:n.map(r=>$.jsx("li",{children:$.jsxs("button",{type:"button",className:"dropdown-item",onClick:()=>t(r.daysSinceFirstResearchVisit),children:["Visit Day ",r.daysSinceFirstResearchVisit]})},r.daysSinceFirstResearchVisit))})]})}),vq=({emrData:e,scheme:t})=>{const[n,r]=se.useState(e[0].daysSinceFirstResearchVisit),o=Object.values(e),s=o.reduce((c,f)=>({...c,[f.daysSinceFirstResearchVisit]:f}),{}),l=Object.entries(s[n].patientData);return $.jsxs($.Fragment,{children:[$.jsx(pq,{activeEntry:n,setActiveEntry:r,emrData:o}),$.jsx(CO,{entries:l,scheme:t,tab:"emrData"})]})},gq=({metadata:e,scheme:t,activeTab:n})=>{const r=e[n],o=t[n],s=Object.entries(r||{});return n==="emrData"?$.jsx(vq,{emrData:r,scheme:o}):$.jsx(CO,{entries:s,scheme:o,tab:n})},yq=(e,t)=>t&&e==="Sample"?`${e} (${t["Visit Name"]})`:e,mq=e=>{const t=[],n=Object.keys(e);return n.length&&n.forEach(r=>{const s=e[r];bt(s)||t.push(r)}),t},AO=(e,t)=>{const n=e[t];return!(dn(n)||bt(n)||Object.values(n).every(s=>bt(s)))},bq=({tabs:e,activeTab:t,setActiveTab:n})=>$.jsx("ul",{className:"nav justify-content-center",children:e.map(r=>$.jsx("li",{className:"nav-item",children:$.jsx("button",{type:"button",className:`nav-link btn btn-link ${t===r&&"font-weight-bold"}`,onClick:()=>n(r),children:r.split(/(?=[A-Z])/).join(" ").toUpperCase()})},r))}),PO=({label:e,node:t})=>{const{certificate:n,setNode:r}=ot();if(!["Sample","Subject"].includes(e))return null;const{metadata:o}=n,{toggleMetadataModal:s}=t.data;return!AO(o,t.id)||!s?null:$.jsx(Ye.Button,{id:"metadata-btn",color:"link",className:"p-0",style:{lineHeight:"normal"},onClick:()=>{s(),r(t)},children:$.jsx("span",{style:{fontSize:"1.75rem"},children:"≡"})},"metadata-btn")},Fh=({isOpen:e,toggle:t})=>{const{node:n,certificate:r}=ot(),{id:o}=n,{metadata:s,schemes:l,serviceLabels:c,customLabels:f,generatedLabels:h}=r,[a,u]=se.useState({}),[d,p]=se.useState({}),[O,g]=se.useState({activeTab:"",description:"",header:"",tabs:[]});se.useEffect(()=>{if(!e||bt(s)||bt(n))return;const y=s[n.id],w=o?.split("/")[0],E=f[o]||h[o],m=yq(w,E),S=mq(y),C=SO(w,o,c,l);u(y),p(C),g(N=>({...N,activeTab:S[0],description:E,header:m,tabs:S}))},[e,n,s]);const _=y=>g(w=>({...w,activeTab:y}));return $.jsx(Ye.ConfirmationModal,{scrollable:!0,isOpen:e,onClose:t,headerContent:O.header,noSubmit:!0,cancelButtonText:"Close",content:$.jsxs($.Fragment,{children:[$.jsx(bq,{tabs:O.tabs,activeTab:O.activeTab,setActiveTab:_}),$.jsx("div",{className:"mt-2",children:$.jsx(gq,{metadata:a,scheme:d,activeTab:O.activeTab})})]})})},zn=({label:e,description:t})=>{const n=hq(e,t);return!n||!Object.keys(t).length?null:$.jsx("div",{className:"node-description text-center text-break",children:n})},An=({label:e,description:t,link:n})=>{const r=dq(e,t);return n?$.jsx("a",{href:`#${n}`,target:"_blank",rel:"noreferrer",className:"node-label text-break flex-fill",children:e}):$.jsx("div",{className:"node-label text-break flex-fill",children:r})},la=e=>{const{id:t}=e,{customLabels:n,generatedLabels:r}=ot().certificate,o=t.split("/")[0],s=n?.[t]||r?.[t];return $.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2",style:{width:"250px"},children:[$.jsxs("div",{className:"d-flex align-items-center",children:[$.jsx(An,{label:o,description:s}),$.jsx(PO,{label:o,node:e})]}),$.jsx(zn,{label:o,description:s})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},_q=e=>e==="Pipeline"?"workspacePipelineNode":e==="IDE"?"workspaceIDENode":e==="File"?"workspaceFileNode":e==="FileLayer"?"fileLayerNode":"readNode",wq=(e,t)=>{if(!t){const n={backgroundColor:"white",color:"#BBBBBB",borderRadius:"3px",borderStyle:"solid",borderWidth:"6px",borderColor:"#eee"};return e==="FileLayer"?{...n,borderWidth:"6px",borderColor:"#36454F",color:"#36454F"}:n}return jh(e)},Oq=(e,t,n)=>{const r={x:0,y:0},o=[];return!e||!Object.keys(e).length||e.forEach(s=>{const l=s.split("/")[0],c=t.matches[s];o.push({id:s,position:r,type:_q(l),data:n,style:wq(l,c)})}),o},Eq=e=>{if(!e||bt(e))return[];const t=[],n=[];return Object.entries(e).forEach(([r,o])=>{o.forEach(s=>{t.push({id:`${r}-${s}`,source:r,target:s,type:"smoothstep",animated:!0}),n.push({id:`${r}-${s}-replica`,source:`${r}-replica`,target:`${s}-replica`,type:"smoothstep",animated:!0})})}),[...t,...n]},IO=(e,t,n,r)=>{const o=Oq(e,n,r),s=Eq(t),{nodes:l,edges:c}=xO(o,s);return{nodes:l,edges:c}},MO=async(e,t,n)=>{const r=[];return Object.entries(t).forEach(([s,l])=>{l.includes(e)&&s.includes("File")&&!n[s]&&r.push(s)}),r},qO=async(e,t)=>{const n=[];for(const r of e){const o=await fetch("undefined/collaboration/replica/copyFileReplica",{method:"POST",credentials:"include",body:JSON.stringify({vertex:r,certificateGuid:t,certificateType:"Public"})});n.push(o)}return Promise.all(n)},xq=e=>{const{setNode:t,certificate:n,replica:r,nodesState:o,edgesState:s,type:l,nodeLayers:c,setNodeLayers:f}=ot(),{customLabels:h,generatedLabels:a}=n,{data:u}=e,d=e.id.split("/")[0],p=h[e.id]||a[e.id],O=n.subgraphs[e.id],[g,_]=o,[y,w]=s,[E,m]=se.useState(!1),[S,C]=se.useState(!1),N=()=>C(!S),M=(I,A)=>l==="fileLayerNode"?IO(I,O.edges,r,A):sa(I,O.edges,n.restrictedAssets,l,A),j=()=>{const I=Object.keys(O.vertices),A=M(I,u);_(A.nodes),w(A.edges),f({previous:c.current,current:{nodes:A.nodes,edges:A.edges}}),t(e)};return $.jsx($.Fragment,{children:$.jsxs("div",{onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsx("div",{className:`p-2 ${E?"expand-hover":""}`,style:{width:"250px"},children:$.jsxs("div",{className:"d-flex align-items-center",onClick:j,children:[$.jsx(An,{label:d,description:p}),$.jsx("i",{className:"fas fa-expand-alt"})]})}),$.jsx(vt,{type:"source",position:Ce.Right}),$.jsx(rq,{vertexId:e.id,certificateId:n.id,type:l,isNodeHover:E,toggle:N}),$.jsx(wO,{vertexId:e.id,certificateId:n.id,refresh:u.refresh,isOpen:S,toggle:N})]})})},Sq=(e,t,n,r)=>{const o=H1([e],t[n]);r({...t,[n]:o})},kq=(e,t,n,r,o)=>{n({...t,emrData:[...t?.emrData?.slice(0,o),{...r,patientData:H1([e],r.patientData)},...t?.emrData?.slice(Number(o)+1)]})};var Bh=(e=>(e.labData="labData",e.surveyData="surveyData",e.demographicsData="demographicsData",e.emrData="emrData",e))(Bh||{});const Nq=e=>{const t=()=>e.update({...e.currMetadata,[e.dataType]:{}});return $.jsx(Ye.Button,{className:"mt-3 mb-2 float-right",onClick:t,children:`${LO[e.dataType]}: Mask All`})},Tq=({children:e})=>$.jsxs("table",{className:"table",children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("th",{scope:"col"}),$.jsx("th",{scope:"col",children:"Variable"}),$.jsx("th",{scope:"col",children:"Value"})]})}),$.jsx("tbody",{children:e})]}),zh=({type:e,metadata:t,setMetadata:n,emrEntry:r,emrIndex:o,ingestUiProps:s})=>{let l;s&&s.schemes?l=s.schemes:l=ot().certificate.schemes;const c=l[e],f=Object.entries(e!==Bh.emrData?t[e]:r.patientData),h=u=>{e===Bh.emrData?kq(u[0],t,n,r,o):Sq(u[0],t,e,n)},a=()=>f.map(u=>$.jsxs("tr",{children:[$.jsx("td",{children:$.jsx(Ye.Button,{icon:"fas fa-times",color:"link",className:"btn-sm text-danger",noText:!0,onClick:()=>h(u)},`${u}-mask-btn`)}),$.jsx("td",{children:NO(u[0],c,e)}),$.jsx("td",{children:TO(u[0],u[1],c,e)})]},u[0]));return $.jsxs($.Fragment,{children:[$.jsx(Nq,{dataType:e,currMetadata:t,update:n}),$.jsx(Tq,{children:a()})]})};zh.defaultProps={emrEntry:null,emrIndex:null};const Cq=({data:e,entry:t,setEntry:n})=>$.jsx("div",{className:"text-center mt-3",children:$.jsxs("div",{className:"dropdown",children:[$.jsxs("button",{className:"btn btn-secondary dropdown-toggle",type:"button",id:"emrDropdownBtn","data-bs-toggle":"dropdown","aria-expanded":"false",children:["Visit Day"," ",t.daysSinceFirstResearchVisit]}),$.jsx("ul",{className:"dropdown-menu","aria-labelledby":"emrDropdownBtn",children:Object.entries(e).map(([r,o])=>$.jsx("li",{children:$.jsxs("button",{type:"button",className:"dropdown-item",onClick:()=>n(r),children:["Visit Day"," ",o.daysSinceFirstResearchVisit]})},r))})]})}),Aq=({type:e,metadata:t,setMetadata:n,ingestUiProps:r})=>{const o=t[e],[s,l]=se.useState(0);return!t||bt(t)||!o||bt(o)?null:$.jsxs($.Fragment,{children:[$.jsx(Cq,{data:o,entry:o[s],setEntry:l}),$.jsx(zh,{type:e,metadata:t,setMetadata:n,emrEntry:o[s],emrIndex:s,ingestUiProps:r})]})},LO={labData:"Lab Results",surveyData:"Survey Data",emrData:"EMR Data",demographicsData:"Demographics Data"},Pq=({node:e})=>{const{certificate:t,setNode:n}=ot(),{metadata:r}=t;return AO(r,e.id)?$.jsx(Ye.Button,{id:"mask-btn",color:"link",className:"text-warning px-1 pt-0",onClick:()=>{e.data.toggleMaskModal(),n(e)},children:"MASK"},"mask-btn"):null},RO=({isOpen:e,loading:t,toggle:n,handleUpdate:r,refresh:o,ingestUiNode:s})=>{const{node:l,certificate:c}=s||ot(),{setNode:f}=ot(),{metadata:h,customLabels:a}=c,[u,d]=se.useState({}),[p,O]=se.useState("");se.useEffect(()=>{bt(h)||bt(l)||d(h[l.id])},[l,h]);const g=u?Object.keys(u):[],_=()=>{n(),f({}),O("")},y=()=>{const w={...c,metadata:{...h,[l.id]:u},customLabels:a};r(w).then(E=>{if(E.status===200){const{labelsId:m,metadataId:S}=E.data;n(),o(m,S),O("")}else O(E.data.Message)})};return $.jsx(Ye.ConfirmationModal,{id:"mask-metadata-modal",scrollable:!0,isOpen:e,onClose:n,headerContent:"Mask Node Metadata",noSubmit:!0,noCancel:!0,content:$.jsxs($.Fragment,{children:[p&&!t&&$.jsx(Ye.MessageStripe,{message:p,color:"danger",dismissible:!1}),$.jsx(Ye.HISETabs,{activeTab:g[0],tabs:g.map(w=>{const E=w,m=dn(u[E])||bt(u[E]);return{key:w,label:LO[w]||w,hideTab:m,content:w==="emrData"?$.jsx(Aq,{type:E,metadata:u,setMetadata:d,ingestUiProps:{schemes:s?.certificate.schemes}}):$.jsx(zh,{type:E,metadata:u,setMetadata:d,ingestUiProps:{schemes:s?.certificate.schemes}})}})})]}),customFooter:$.jsxs("div",{className:"float-right",children:[t&&$.jsx("div",{className:"spinner-grow spinner-grow-sm text-warning",role:"status"}),$.jsx(Ye.Button,{id:"cancel-btn",icon:"fas fa-times",noText:!0,className:"mx-2",onClick:_}),$.jsx(Ye.Button,{id:"ok-btn",icon:"fas fa-check",color:"primary",onClick:y,children:"Update Metadata"})]})})},Iq=(e,t)=>{if(!t)return null;switch(e){case"Cohort":case"IDE":case"IngestReceipt":case"Subject":case"Trace":return[{type:"text",key:"Description",label:"Description",invalid:n=>!n||n.length>50}];case"Sample":return Object.keys(t).map(n=>["Experiment Comments","Experiment Count","Type","Draw Date"].includes(n)?null:{type:"text",key:n,label:n,invalid:r=>!r||r.length>50});case"Specimen":return[{type:"text",key:"Specimen Type",label:"Specimen Type",invalid:n=>!n||n.length>50}];case"Process":return[{type:"text",key:"Type",label:"Description",invalid:n=>!n||n.length>50}];case"File":case"FileSet":case"Pipeline":case"Submission":case"Visualization":default:return Object.keys(t).map(n=>({type:"text",key:n,label:n,invalid:r=>!r||r.length>50}))}},Mq=({node:e})=>{const{setNode:t}=ot();return $.jsx(Ye.Button,{id:"edit-btn",color:"link",className:"text-info px-1 pt-0 ml-2",onClick:()=>{e.data.toggleEditModal(),t(e)},children:"EDIT"},"edit-btn")},DO=({isOpen:e,loading:t,toggle:n,handleUpdate:r,refresh:o,ingestUiNode:s})=>{const{node:l,certificate:c}=s||ot(),{customLabels:f,generatedLabels:h,metadata:a}=c,[u,d]=se.useState(""),[p,O]=se.useState({}),g=()=>O({});if(se.useEffect(()=>{if(!l?.id)return;const m=f[l.id]||h[l.id];m&&O(m)},[l.id]),!l?.id)return null;const _=l?.id.split("/")[0],y=m=>O(m),w=()=>{const m={...c,metadata:a,customLabels:{...f,[l.id]:p}};r(m).then(S=>{if(S.status===200){const{labelsId:C,metadataId:N}=S.data;n(),g(),o(C,N),d("")}else d(S.data.Message)})},E=()=>{n(),g(),d("")};return $.jsx(Ye.ConfirmationModal,{scrollable:!0,isOpen:e,onClose:n,headerContent:"Edit Node Label",noSubmit:!0,noCancel:!0,content:$.jsxs($.Fragment,{children:[u&&!t&&$.jsx(Ye.MessageStripe,{message:u,color:"danger",dismissible:!1}),$.jsx(Ye.ResourceEditor,{className:"",onChange:y,editedResource:p,controls:Iq(_,p)})]}),customFooter:$.jsxs("div",{className:"float-right",children:[t&&$.jsx("div",{className:"spinner-grow spinner-grow-sm text-warning",role:"status"}),$.jsx(Ye.Button,{id:"cancel-btn",icon:"fas fa-times",className:"mx-2",noText:!0,onClick:E}),$.jsx(Ye.Button,{id:"ok-btn",icon:"fas fa-check",noText:!0,color:"primary",onClick:w})]})})},qq=e=>{const{customLabels:t,generatedLabels:n,isExecutable:r}=ot().certificate,{id:o}=e,[s,l]=o.split("/"),c=t[o]||n[o],f=kO(s,l,r);return $.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2",style:{width:"250px"},children:[$.jsxs("div",{className:"label",children:[$.jsx(An,{link:f,label:s,description:c}),$.jsx(Mq,{node:e}),$.jsx(Pq,{node:e})]}),$.jsx(zn,{label:s,description:c})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},Lq=({node:e})=>{const{setNode:t}=ot(),{toggleReviewModal:n}=e.data,r=e.id.split("/")[0];return["File","IDE"].includes(r)?$.jsx(Ye.Button,{id:"review-node-btn",color:"link",className:"text-info px-1 pt-0 ml-2",icon:"fa-edit",noText:!0,onClick:()=>{n(),t(e)}},"review-node-btn"):null},Rq=e=>{const{certificate:t}=ot(),{id:n}=e,[r,o]=n.split("/"),s=t.customLabels[n]||t.generatedLabels[n],l=kO(r,o,t.isExecutable);return $.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2",style:{width:"250px"},children:[$.jsxs("div",{className:"d-flex align-items-center",children:[$.jsx(An,{link:l,label:r,description:s}),$.jsx(Lq,{node:e}),$.jsx(PO,{label:r,node:e})]}),$.jsx(zn,{label:r,description:s})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},$h=e=>{const{certificate:t,replica:n}=ot(),{customLabels:r,generatedLabels:o}=t,[s,l]=se.useState(!1),c=e.id.split("/")[0],f=r[e.id]||o[e.id],h=n.matches[e.id];return $.jsxs($.Fragment,{children:[e.modal,$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:`p-2 text-center ${s&&!h?"action-hover":""}`,style:{width:"250px"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>h?{}:e.toggle(),children:[$.jsx(An,{label:c,description:f}),$.jsx(zn,{label:c,description:f})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},Dq=e=>{const{isOpen:t,toggle:n,restrictedAsset:r}=e;if(!r)return null;const o=()=>{const s={restrictionInstructions:"Instructions for Retrieval",restrictionNotes:"Restriction Notes"};return $.jsxs($.Fragment,{children:[$.jsx("h6",{children:s.restrictionNotes}),$.jsx("p",{children:r.restrictionNotes}),$.jsx("h6",{children:s.restrictionInstructions}),$.jsx("div",{dangerouslySetInnerHTML:{__html:r.restrictionInstructions}})]})};return $.jsx(Ye.ConfirmationModal,{id:"restricted-node-notes-modal",isOpen:t,onClose:n,headerContent:"This asset has been restricted.",cancelButtonText:"Close",noSubmit:!0,content:$.jsx(o,{})})},jO=e=>{const{restrictedAsset:t}=e,{certificate:n}=ot(),{customLabels:r,generatedLabels:o}=n,[s,l]=se.useState(!1),c=()=>l(!s),f=e.id.split("/")[0],h=r[e.id]||o[e.id];return $.jsxs($.Fragment,{children:[$.jsx(Dq,{restrictedAsset:t,isOpen:s,toggle:c}),$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{style:{width:"250px"},onClick:c,children:[$.jsxs("div",{className:"label d-flex p-1",children:[$.jsx(An,{label:f,description:h}),$.jsx(Ye.Button,{id:`${e.id}-restricted-btn`,className:"btn-sm text-warning btn-link",icon:"fas fa-lock",noText:!0,onClick:c})]}),$.jsx(zn,{label:f,description:h})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},jq=e=>{const{certificate:t}=ot(),[n,r]=se.useState(!1),[o,s]=se.useState(!1),l=()=>s(!o),c=t.restrictedAssets&&t.restrictedAssets[e.id];if(c)return $.jsx(jO,{...e,restrictedAsset:c});const f=async()=>{r(!0);try{await _O(e.id,t.id).then(async h=>{if(h.ok)e.data.refresh(),Ke.success("Copied file into workspace.");else{const a=await h.json();Ke.error("Unable to copy file: "+a.Message)}l()})}catch(h){console.log(h)}r(!1)};return $.jsx($h,{id:e.id,data:e.data,modal:$.jsx(Ye.ConfirmationModal,{id:"copy-file-modal",pending:n,isOpen:o,onClose:l,headerContent:"Copy this file?",cancelButtonText:"Close",onSubmit:()=>f()}),toggle:l})};var Mo=(e=>(e.Completed="Completed",e.Failure="Failure",e.Running="Running",e.Processing="Processing",e.Initiated="Initiated",e))(Mo||{});const Fq={Completed:"bg-success",Failure:"bg-danger text-white",Running:"bg-info text-white",Processing:"bg-info text-white",Initiated:"bg-info text-white"},Bq=({pipeline:e,replicaPipelineOperation:t,refresh:n})=>{const[r,o]=se.useState(!1),s=()=>o(!r);return dn(e)||bt(e)||e.status!==Mo.Failure&&t.operationStatus!=="Errored"?null:$.jsxs($.Fragment,{children:[$.jsx(Ye.Button,{id:`retry-${e.id}-pipeline-btn`,color:"link",onClick:()=>{s()},children:"RETRY?"}),$.jsx(Ye.ConfirmationModal,{id:`retry-${e.id}-pipeline-modal`,isOpen:r,onClose:s,headerContent:"Do you want to retry running this pipeline?",content:"Seems that the process ran into an error.",submitButtonText:"Retry",onSubmit:async()=>{fetch(`undefined/tracer/admin/pipeline/process/retry/${e.mainProcessID}`,{method:"POST",credentials:"include"}).then(async l=>{if(l.ok)Ke.success("Successfully reinitiated pipeline run."),setTimeout(()=>n(),1500);else{const c=await l.json();Ke.error("Unable to reinitiate pipeline run: "+c.Message)}}),s()}})]})},zq=({pipeline:e,refresh:t})=>{const{certificate:n}=ot(),[r,o]=se.useState(!1),s=()=>o(!r);return dn(e)||bt(e)||[Mo.Failure,Mo.Completed].includes(e.status)?null:$.jsxs($.Fragment,{children:[$.jsx(Ye.Button,{id:`stop-${e.id}-pipeline-btn`,color:"link",onClick:s,children:"STOP?"}),$.jsx(Ye.ConfirmationModal,{id:`stop-${e.id}-pipeline-modal`,isOpen:r,onClose:s,headerContent:"Do you want to stop running this pipeline?",submitButtonText:"Stop Pipeline",onSubmit:async()=>{fetch(`undefined/collaboration/replica/stopPipelineReplica?projectGuid=${e.projectGuid}&overrideActiveRun=true`,{method:"POST",credentials:"include",body:JSON.stringify({vertex:e.id,certificateGuid:n.id,certificateType:"Public"})}).then(async l=>{if(l.ok)t(),Ke.success("Successfully stopped this pipeline run.");else{const c=await l.json();Ke.error("Unable to stop pipeline run: "+c.Message)}}),s()}})]})},$q=({status:e,replicaPipelineOperation:t,pipelineId:n})=>{const r=()=>{n&&window.open(`#/data-mgt/pipeline-dashboard/${n}`,"_blank")},o=t?.operationStatus=="Errored"?Mo.Failure:e;return $.jsxs("section",{children:[$.jsxs("span",{className:`badge rounded-pill ${Fq[o]}`,style:{fontSize:"1.25rem"},onClick:r,children:[o," ",$.jsx("i",{className:"fa-solid fa-plus"})]}),t?.operationStatus=="Errored"&&t?.failureMessage&&$.jsx("p",{className:"mt-3",children:$.jsx("small",{children:t.failureMessage})})]})},FO=({pipeline:e,replicaPipelineOperation:t,refresh:n})=>dn(e)||bt(e)?null:$.jsxs("div",{className:"text-center",children:[$.jsx($q,{status:e.status,replicaPipelineOperation:t,pipelineId:e.id}),$.jsx(Bq,{pipeline:e,replicaPipelineOperation:t,refresh:n}),$.jsx(zq,{pipeline:e,refresh:n})]}),Hq=e=>{const{replica:t,certificate:n}=ot(),{customLabels:r,generatedLabels:o}=n,{refresh:s}=e.data,[l,c]=se.useState(null),f=e.id.split("/")[0],h=r[e.id]||o[e.id],a=e.id.replace("-replica",""),u=t?.matches[a],d=t.replicaOperations[u];return se.useEffect(()=>{u&&(async()=>{const O=u.replace("Pipeline/","");await fetch(`undefined/ledger/pipeline/${O}`,{method:"GET",credentials:"include"}).then(async g=>{if(g.ok){const _=await g.json();c(_)}})})()},[t,e.id]),$.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2",style:{width:"250px"},children:[$.jsx(An,{label:f,description:h}),$.jsx(zn,{label:f,description:h}),$.jsx(FO,{pipeline:l,replicaPipelineOperation:d,refresh:s})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},BO=({loading:e,isOpen:t,toggle:n,onStartPipeline:r})=>$.jsx(Ye.ConfirmationModal,{id:"run-pipeline-modal",scrollable:!0,pending:e,isOpen:t,onClose:n,headerContent:"Run this pipeline?",content:"Running this pipeline will also copy any input files that haven't been pulled into your workspace yet.",cancelButtonText:"Close",onSubmit:()=>r()}),Vq=async(e,t)=>await fetch("undefined/collaboration/replica/runPipelineReplica",{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),zO=async(e,t,n,r,o,s)=>{const l=await MO(e,n,r);await qO(l,t).then(async f=>f.length?f.every(h=>h.ok):!0)?await Vq(e,t).then(async f=>{if(f.ok)Ke.success("Started pipeline.");else{const h=await f.json();Ke.error("Unable to start pipeline: "+h.Message)}o(),s()}):(o(),Ke.error("Unable to copy some of the necessary input files."))},Uq=e=>{const{certificate:t,replica:n}=ot(),[r,o]=se.useState(!1),[s,l]=se.useState(!1),c=()=>l(!s);if(n.matches[e.id])return $.jsx(Hq,{...e});const h=async()=>{o(!0);try{await zO(e.id,t.id,t.edges,n.matches,e.data.refresh,c)}catch(a){console.log(a)}o(!1)};return $.jsx($h,{id:e.id,data:e.data,modal:$.jsx(BO,{loading:r,isOpen:s,toggle:c,onStartPipeline:h}),toggle:c})},Gq=e=>{const{replica:t,certificate:n}=ot(),{customLabels:r,generatedLabels:o}=n,s=e.id.split("/")[0],l=r[e.id]||o[e.id],c=e.id.replace("-replica",""),f=t?.matches[c],h=()=>{f&&window.open("#/ide-nextgen","_blank")};return $.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2",style:{width:"250px"},onClick:()=>h(),children:[$.jsx(An,{label:s,description:l}),$.jsx(zn,{label:s,description:l}),$.jsx("section",{className:"text-center mt-2",children:$.jsxs("span",{className:"badge bg-primary text-white",children:["IDE LIST ",$.jsx("i",{className:"fas fa-external-link-alt"})]})})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})},$O=({loading:e,isOpen:t,toggle:n,onStartIDE:r})=>$.jsx(Ye.ConfirmationModal,{id:"clone-ide-modal",className:"top-25",pending:e,isOpen:t,onClose:n,headerContent:"Do you want to clone the environment of the original IDE into your workspace?",cancelButtonText:"Close",onSubmit:()=>r()}),Kq=async(e,t)=>await fetch("undefined/collaboration/replica/cloneIdeReplica",{method:"POST",credentials:"include",body:JSON.stringify({vertex:e,certificateGuid:t,certificateType:"Public"})}),HO=async(e,t,n,r,o,s)=>{const l=await MO(e,n,r);await qO(l,t).then(async f=>f.length?f.every(h=>h.ok):!0)?await Kq(e,t).then(async f=>{if(f.ok)Ke.success("Started IDE.");else{const h=await f.json();Ke.error("Unable to start IDE: "+h.Message)}o(),s()}):(o(),Ke.error("Unable to copy some of the necessary input files."))},Wq=e=>{const{certificate:t,replica:n}=ot(),[r,o]=se.useState(!1),[s,l]=se.useState(!1),c=()=>l(!s),f=t.restrictedAssets&&t.restrictedAssets[e.id];if(f)return $.jsx(jO,{...e,restrictedAsset:f});if(n.matches[e.id])return $.jsx(Gq,{...e});const a=async()=>{o(!0);try{await HO(e.id,t.id,t.edges,n.matches,e.data.refresh,c)}catch(u){console.log(u)}o(!1)};return $.jsx($h,{id:e.id,data:e.data,modal:$.jsx($O,{loading:r,isOpen:s,toggle:c,onStartIDE:a}),toggle:c})},Hh=250,Vh=120,VO=(e,t,n="LR")=>{const r=new uo.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({nodesep:70,ranksep:110,rankdir:n}),e.forEach(o=>{r.setNode(o.id,{width:Hh,height:Vh})}),t.forEach(o=>{r.setEdge(o.source,o.target)}),uo.layout(r),e.forEach(o=>{const s=r.node(o.id);return o.targetPosition=n==="LR"?Ce.Right:Ce.Left,o.sourcePosition=n==="LR"?Ce.Left:Ce.Right,o.position={x:s.x-Hh/2,y:s.y-Vh/2},o}),{nodes:e,edges:t}},UO=(e,t,n,r=!0)=>{let o=[...e];return t.forEach(s=>{const l=e.find(f=>f.id===s),c=s.includes("Layer")?!n.subgraphs[s]:!1;if(!l)if(r&&c)o=o;else{const[f]=s.split("/"),h=n.customLabels?.[s]||n.generatedLabels?.[s],a={id:s,position:{x:0,y:0},type:"walkingNode",data:{description:h},style:jh(f)};o=[...o,a]}}),o},GO=(e,t)=>{let n=[...e];return Object.entries(t||{}).forEach(o=>{const[s,l]=o;l.map(c=>{if(!e.find(h=>h.id.match(s)&&h.id.match(c))){const h={id:`${s}-${c}`,source:s,target:c,animated:!0};n=[...n,h]}})}),n},Yq=e=>{if(!e)return"";const[t,n]=e.split("/");switch(t){case"FileSet":return`/#/collaboration/filesets/${n}`;case"File":return`/#/files/${n}`;case"Visualization":return`/#/collaboration/visualizations/${n}`;case"IDE":return`/#/collaboration/ide/${n}`;case"IngestReceipt":return`/#/ingest-receipts/${n}`;case"Process":return`/#/processes/${n}`;case"Pipeline":return`/#/data-mgt/pipeline-dashboard/${n}`;case"Subject":return`/#/subjects/${n}`;case"Sample":return`/#/samples/${n}`;case"Cohort":return`/#/cohorts/${n}`;default:return""}},KO=({id:e})=>{const t=Ji(),{node:n,setNode:r,nodesState:o,edgesState:s,certificate:l,setNodeLayers:c}=ot(),[f,h]=se.useState({label:"",description:"",isLayer:!1}),[a,u]=se.useState(!1),[d,p]=o,[O,g]=s,_=t.getNode(e);se.useEffect(()=>{const I=R=>{const k=R.match(/^(.*)Layer/);if(!k)return R;switch(k[1]){case"File":case"FileSet":case"IDE":case"Sample":case"Specimen":case"Visualization":return`${k[1]}s`;case"Process":return`${k[1]}es`;default:return"Items"}},A={description:_?.data?.description},q=e.split("/")[0];if(q.includes("Layer")){const R=Object.keys(l.subgraphs[e].vertices).length,k=I(q);h({...A,label:`${k} (${R})`,isLayer:!0})}else h({...A,label:q,isLayer:!1})},[_]);const y=async I=>{const A=I==="right"?`undefined/collaboration/neighbors?root=${e}&getDescendants=true`:`undefined/collaboration/neighbors?root=${e}&getAncestors=true`;await fetch(A,{method:"GET",credentials:"include"}).then(async q=>{if(q.ok){const R=await q.json(),{vertices:k,edges:F,customLabels:U,generatedLabels:ne}=R,ue=UO(d,k,{...l,customLabels:U,generatedLabels:ne},!0),K=GO(O,F),W=VO(ue,K);p(W.nodes),g(W.edges),c({previous:{nodes:[],edges:[]},current:{nodes:W.nodes,edges:W.edges}})}})},w=async()=>{setTimeout(()=>{const I=t.getViewport();_&&t.setCenter(_.position.x,_.position.y,{zoom:I.zoom,duration:1e3})},1e3)},E=async I=>{I.preventDefault(),await y("left"),await w()},m=async I=>{I.preventDefault(),await y("right"),await w()},S=()=>{_&&r(_)},C=()=>u(!0),N=()=>u(!1),M=()=>f.isLayer?null:$.jsxs($.Fragment,{children:[$.jsx("a",{type:"button",target:"_blank",onClick:E,className:`${a?"visible":"invisible"} btn btn-light`,children:"BACK"}),$.jsx("a",{type:"button",target:"_blank",onClick:m,className:`${a?"visible":"invisible"} btn btn-light`,children:"NEXT"})]}),j=()=>a?"10px solid rgba(0, 0, 0, .1)":_?.id===n.id?"10px solid #1976D2":"";return $.jsxs($.Fragment,{children:[$.jsx(vt,{type:"target",position:Ce.Left}),$.jsxs("div",{className:"p-2 d-flex align-items-center justify-content-center flex-wrap",style:{width:`${Hh}px`,minHeight:`${Vh}px`,border:j()},onMouseEnter:C,onMouseLeave:N,children:[$.jsxs("div",{className:"w-100",onClick:S,children:[$.jsx(An,{label:f.label,description:f.description}),$.jsx(zn,{label:f.label,description:f.description})]}),$.jsx("div",{className:"position-absolute node-description w-100 d-flex justify-content-between align-self-end px-2",children:M()})]}),$.jsx(vt,{type:"source",position:Ce.Right})]})};new uo.graphlib.Graph().setDefaultEdgeLabel(()=>({}));const Zq=({certificate:e,graph:t,children:n})=>{const{nodesState:r,edgesState:o,nodeLayers:s,setNodeLayers:l}=ot(),c=se.useMemo(()=>({readNode:la,fileLayerNode:xq,fileNode:la,pipelineNode:la,IDENode:la,walkingNode:KO,editNode:qq,reviewNode:Rq,workspaceFileNode:jq,workspacePipelineNode:Uq,workspaceIDENode:Wq}),[]),[,f,h]=r,[,a,u]=o;return se.useEffect(()=>{dn(e)||bt(e)||(f(t.nodes),a(t.edges),l({previous:s.previous,current:{nodes:t.nodes,edges:t.edges}}))},[e]),$.jsxs("div",{className:"layoutflow",children:[$.jsx(iq,{}),n,$.jsxs(Ph,{nodes:s.current.nodes,edges:s.current.edges,onNodesChange:h,onEdgesChange:u,connectionLineType:vn.SmoothStep,nodeTypes:c,onlyRenderVisibleElements:!0,edgesUpdatable:!1,defaultViewport:{x:0,y:0,zoom:.6},children:[$.jsx(lO,{}),$.jsx(cO,{}),$.jsx(aO,{})]})]})},ua=({type:e,certificate:t,replica:n,graph:r,children:o})=>$.jsxs(mO,{type:e,certificate:t,replica:n,children:[$.jsx("div",{style:{height:"75vh"},children:$.jsx(Zq,{certificate:t,graph:r,children:o})}),$.jsx(Lh,{position:"bottom-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"})]}),Xq=({certificate:e})=>{const[t,n]=se.useState(!1),r=()=>n(!t),o="readNode",s={toggleMetadataModal:r},l=sa(e.vertices,e.edges,e.restrictedAssets,o,s);return $.jsx(ua,{type:o,certificate:e,graph:l,children:$.jsx(Fh,{isOpen:t,toggle:r})})},Qq=({certificate:e,loading:t,handleUpdate:n,refresh:r})=>{const[o,s]=se.useState(!1),l=()=>s(!o),[c,f]=se.useState(!1),h=()=>f(!c),a="editNode",u={toggleEditModal:l,toggleMaskModal:h},d=sa(e.vertices,e.edges,e.restrictedAssets,a,u);return $.jsxs(ua,{type:a,certificate:e,graph:d,children:[$.jsx(DO,{isOpen:o,loading:t,toggle:l,handleUpdate:n,refresh:r}),$.jsx(RO,{isOpen:c,loading:t,toggle:h,handleUpdate:n,refresh:r})]})};var Uh,WO;function Jq(){if(WO)return Uh;WO=1;var e=Ru();function t(n,r){return e(n,r)}return Uh=t,Uh}var ca={exports:{}};/*!
30
30
  * Quill Editor v1.3.7
31
31
  * https://quilljs.com/
32
32
  * Copyright (c) 2014, Jason Chen
33
33
  * Copyright (c) 2013, salesforce.com
34
- */var rL=fa.exports,QO;function oL(){return QO||(QO=1,(function(e,t){(function(r,o){e.exports=o()})(typeof self<"u"?self:rL,function(){return(function(n){var r={};function o(s){if(r[s])return r[s].exports;var l=r[s]={i:s,l:!1,exports:{}};return n[s].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=n,o.c=r,o.d=function(s,l,c){o.o(s,l)||Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:c})},o.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(l,"a",l),l},o.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},o.p="",o(o.s=109)})([(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(17),l=o(18),c=o(19),f=o(45),d=o(46),a=o(47),u=o(48),h=o(49),p=o(12),O=o(32),m=o(33),_=o(31),g=o(1),w={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:s.default,Format:l.default,Leaf:c.default,Embed:u.default,Scroll:f.default,Block:a.default,Inline:d.default,Text:h.default,Attributor:{Attribute:p.default,Class:O.default,Style:m.default,Store:_.default}};r.default=w}),(function(n,r,o){var s=this&&this.__extends||(function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var E in w)w.hasOwnProperty(E)&&(g[E]=w[E])};return function(g,w){_(g,w);function E(){this.constructor=g}g.prototype=w===null?Object.create(w):(E.prototype=w.prototype,new E)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=(function(_){s(g,_);function g(w){var E=this;return w="[Parchment] "+w,E=_.call(this,w)||this,E.message=w,E.name=E.constructor.name,E}return g})(Error);r.ParchmentError=l;var c={},f={},d={},a={};r.DATA_KEY="__blot";var u;(function(_){_[_.TYPE=3]="TYPE",_[_.LEVEL=12]="LEVEL",_[_.ATTRIBUTE=13]="ATTRIBUTE",_[_.BLOT=14]="BLOT",_[_.INLINE=7]="INLINE",_[_.BLOCK=11]="BLOCK",_[_.BLOCK_BLOT=10]="BLOCK_BLOT",_[_.INLINE_BLOT=6]="INLINE_BLOT",_[_.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",_[_.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",_[_.ANY=15]="ANY"})(u=r.Scope||(r.Scope={}));function h(_,g){var w=O(_);if(w==null)throw new l("Unable to create "+_+" blot");var E=w,y=_ instanceof Node||_.nodeType===Node.TEXT_NODE?_:E.create(g);return new E(y,g)}r.create=h;function p(_,g){return g===void 0&&(g=!1),_==null?null:_[r.DATA_KEY]!=null?_[r.DATA_KEY].blot:g?p(_.parentNode,g):null}r.find=p;function O(_,g){g===void 0&&(g=u.ANY);var w;if(typeof _=="string")w=a[_]||c[_];else if(_ instanceof Text||_.nodeType===Node.TEXT_NODE)w=a.text;else if(typeof _=="number")_&u.LEVEL&u.BLOCK?w=a.block:_&u.LEVEL&u.INLINE&&(w=a.inline);else if(_ instanceof HTMLElement){var E=(_.getAttribute("class")||"").split(/\s+/);for(var y in E)if(w=f[E[y]],w)break;w=w||d[_.tagName]}return w==null?null:g&u.LEVEL&w.scope&&g&u.TYPE&w.scope?w:null}r.query=O;function m(){for(var _=[],g=0;g<arguments.length;g++)_[g]=arguments[g];if(_.length>1)return _.map(function(y){return m(y)});var w=_[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new l("Invalid definition");if(w.blotName==="abstract")throw new l("Cannot register abstract class");if(a[w.blotName||w.attrName]=w,typeof w.keyName=="string")c[w.keyName]=w;else if(w.className!=null&&(f[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(y){return y.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var E=Array.isArray(w.tagName)?w.tagName:[w.tagName];E.forEach(function(y){(d[y]==null||w.className==null)&&(d[y]=w)})}return w}r.register=m}),(function(n,r,o){var s=o(51),l=o(11),c=o(3),f=o(20),d="\0",a=function(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]};a.prototype.insert=function(u,h){var p={};return u.length===0?this:(p.insert=u,h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(p.attributes=h),this.push(p))},a.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},a.prototype.retain=function(u,h){if(u<=0)return this;var p={retain:u};return h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(p.attributes=h),this.push(p)},a.prototype.push=function(u){var h=this.ops.length,p=this.ops[h-1];if(u=c(!0,{},u),typeof p=="object"){if(typeof u.delete=="number"&&typeof p.delete=="number")return this.ops[h-1]={delete:p.delete+u.delete},this;if(typeof p.delete=="number"&&u.insert!=null&&(h-=1,p=this.ops[h-1],typeof p!="object"))return this.ops.unshift(u),this;if(l(u.attributes,p.attributes)){if(typeof u.insert=="string"&&typeof p.insert=="string")return this.ops[h-1]={insert:p.insert+u.insert},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof p.retain=="number")return this.ops[h-1]={retain:p.retain+u.retain},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this}}return h===this.ops.length?this.ops.push(u):this.ops.splice(h,0,u),this},a.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},a.prototype.filter=function(u){return this.ops.filter(u)},a.prototype.forEach=function(u){this.ops.forEach(u)},a.prototype.map=function(u){return this.ops.map(u)},a.prototype.partition=function(u){var h=[],p=[];return this.forEach(function(O){var m=u(O)?h:p;m.push(O)}),[h,p]},a.prototype.reduce=function(u,h){return this.ops.reduce(u,h)},a.prototype.changeLength=function(){return this.reduce(function(u,h){return h.insert?u+f.length(h):h.delete?u-h.delete:u},0)},a.prototype.length=function(){return this.reduce(function(u,h){return u+f.length(h)},0)},a.prototype.slice=function(u,h){u=u||0,typeof h!="number"&&(h=1/0);for(var p=[],O=f.iterator(this.ops),m=0;m<h&&O.hasNext();){var _;m<u?_=O.next(u-m):(_=O.next(h-m),p.push(_)),m+=f.length(_)}return new a(p)},a.prototype.compose=function(u){var h=f.iterator(this.ops),p=f.iterator(u.ops),O=[],m=p.peek();if(m!=null&&typeof m.retain=="number"&&m.attributes==null){for(var _=m.retain;h.peekType()==="insert"&&h.peekLength()<=_;)_-=h.peekLength(),O.push(h.next());m.retain-_>0&&p.next(m.retain-_)}for(var g=new a(O);h.hasNext()||p.hasNext();)if(p.peekType()==="insert")g.push(p.next());else if(h.peekType()==="delete")g.push(h.next());else{var w=Math.min(h.peekLength(),p.peekLength()),E=h.next(w),y=p.next(w);if(typeof y.retain=="number"){var x={};typeof E.retain=="number"?x.retain=w:x.insert=E.insert;var C=f.attributes.compose(E.attributes,y.attributes,typeof E.retain=="number");if(C&&(x.attributes=C),g.push(x),!p.hasNext()&&l(g.ops[g.ops.length-1],x)){var N=new a(h.rest());return g.concat(N).chop()}}else typeof y.delete=="number"&&typeof E.retain=="number"&&g.push(y)}return g.chop()},a.prototype.concat=function(u){var h=new a(this.ops.slice());return u.ops.length>0&&(h.push(u.ops[0]),h.ops=h.ops.concat(u.ops.slice(1))),h},a.prototype.diff=function(u,h){if(this.ops===u.ops)return new a;var p=[this,u].map(function(w){return w.map(function(E){if(E.insert!=null)return typeof E.insert=="string"?E.insert:d;var y=w===u?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),O=new a,m=s(p[0],p[1],h),_=f.iterator(this.ops),g=f.iterator(u.ops);return m.forEach(function(w){for(var E=w[1].length;E>0;){var y=0;switch(w[0]){case s.INSERT:y=Math.min(g.peekLength(),E),O.push(g.next(y));break;case s.DELETE:y=Math.min(E,_.peekLength()),_.next(y),O.delete(y);break;case s.EQUAL:y=Math.min(_.peekLength(),g.peekLength(),E);var x=_.next(y),C=g.next(y);l(x.insert,C.insert)?O.retain(y,f.attributes.diff(x.attributes,C.attributes)):O.push(C).delete(y);break}E-=y}}),O.chop()},a.prototype.eachLine=function(u,h){h=h||`
35
- `;for(var p=f.iterator(this.ops),O=new a,m=0;p.hasNext();){if(p.peekType()!=="insert")return;var _=p.peek(),g=f.length(_)-p.peekLength(),w=typeof _.insert=="string"?_.insert.indexOf(h,g)-g:-1;if(w<0)O.push(p.next());else if(w>0)O.push(p.next(w));else{if(u(O,p.next(1).attributes||{},m)===!1)return;m+=1,O=new a}}O.length()>0&&u(O,{},m)},a.prototype.transform=function(u,h){if(h=!!h,typeof u=="number")return this.transformPosition(u,h);for(var p=f.iterator(this.ops),O=f.iterator(u.ops),m=new a;p.hasNext()||O.hasNext();)if(p.peekType()==="insert"&&(h||O.peekType()!=="insert"))m.retain(f.length(p.next()));else if(O.peekType()==="insert")m.push(O.next());else{var _=Math.min(p.peekLength(),O.peekLength()),g=p.next(_),w=O.next(_);if(g.delete)continue;w.delete?m.push(w):m.retain(_,f.attributes.transform(g.attributes,w.attributes,h))}return m.chop()},a.prototype.transformPosition=function(u,h){h=!!h;for(var p=f.iterator(this.ops),O=0;p.hasNext()&&O<=u;){var m=p.peekLength(),_=p.peekType();if(p.next(),_==="delete"){u-=Math.min(m,u-O);continue}else _==="insert"&&(O<u||!h)&&(u+=m);O+=m}return u},n.exports=a}),(function(n,r){var o=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=function(p){return typeof Array.isArray=="function"?Array.isArray(p):s.call(p)==="[object Array]"},d=function(p){if(!p||s.call(p)!=="[object Object]")return!1;var O=o.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&o.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!O&&!m)return!1;var _;for(_ in p);return typeof _>"u"||o.call(p,_)},a=function(p,O){l&&O.name==="__proto__"?l(p,O.name,{enumerable:!0,configurable:!0,value:O.newValue,writable:!0}):p[O.name]=O.newValue},u=function(p,O){if(O==="__proto__")if(o.call(p,O)){if(c)return c(p,O).value}else return;return p[O]};n.exports=function h(){var p,O,m,_,g,w,E=arguments[0],y=1,x=arguments.length,C=!1;for(typeof E=="boolean"&&(C=E,E=arguments[1]||{},y=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});y<x;++y)if(p=arguments[y],p!=null)for(O in p)m=u(E,O),_=u(p,O),E!==_&&(C&&_&&(d(_)||(g=f(_)))?(g?(g=!1,w=m&&f(m)?m:[]):w=m&&d(m)?m:{},a(E,{name:O,newValue:h(C,w,_)})):typeof _<"u"&&a(E,{name:O,newValue:_}));return E}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var s=(function(){function A(q,L){for(var k=0;k<L.length;k++){var F=L[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(q,F.key,F)}}return function(q,L,k){return L&&A(q.prototype,L),k&&A(q,k),q}})(),l=function A(q,L,k){q===null&&(q=Function.prototype);var F=Object.getOwnPropertyDescriptor(q,L);if(F===void 0){var V=Object.getPrototypeOf(q);return V===null?void 0:A(V,L,k)}else{if("value"in F)return F.value;var ne=F.get;return ne===void 0?void 0:ne.call(k)}},c=o(3),f=E(c),d=o(2),a=E(d),u=o(0),h=E(u),p=o(16),O=E(p),m=o(6),_=E(m),g=o(7),w=E(g);function E(A){return A&&A.__esModule?A:{default:A}}function y(A,q){if(!(A instanceof q))throw new TypeError("Cannot call a class as a function")}function x(A,q){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:A}function C(A,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);A.prototype=Object.create(q&&q.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(A,q):A.__proto__=q)}var N=1,I=(function(A){C(q,A);function q(){return y(this,q),x(this,(q.__proto__||Object.getPrototypeOf(q)).apply(this,arguments))}return s(q,[{key:"attach",value:function(){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"attach",this).call(this),this.attributes=new h.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new a.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(k,F){var V=h.default.query(k,h.default.Scope.BLOCK_ATTRIBUTE);V!=null&&this.attributes.attribute(V,F)}},{key:"formatAt",value:function(k,F,V,ne){this.format(V,ne)}},{key:"insertAt",value:function(k,F,V){if(typeof F=="string"&&F.endsWith(`
36
- `)){var ne=h.default.create(j.blotName);this.parent.insertBefore(ne,k===0?this:this.next),ne.insertAt(0,F.slice(0,-1))}else l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,k,F,V)}}]),q})(h.default.Embed);I.scope=h.default.Scope.BLOCK_BLOT;var j=(function(A){C(q,A);function q(L){y(this,q);var k=x(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,L));return k.cache={},k}return s(q,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(h.default.Leaf).reduce(function(k,F){return F.length()===0?k:k.insert(F.value(),M(F))},new a.default).insert(`
37
- `,M(this))),this.cache.delta}},{key:"deleteAt",value:function(k,F){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"deleteAt",this).call(this,k,F),this.cache={}}},{key:"formatAt",value:function(k,F,V,ne){F<=0||(h.default.query(V,h.default.Scope.BLOCK)?k+F===this.length()&&this.format(V,ne):l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"formatAt",this).call(this,k,Math.min(F,this.length()-k-1),V,ne),this.cache={})}},{key:"insertAt",value:function(k,F,V){if(V!=null)return l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,k,F,V);if(F.length!==0){var ne=F.split(`
38
- `),ue=ne.shift();ue.length>0&&(k<this.length()-1||this.children.tail==null?l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,Math.min(k,this.length()-1),ue):this.children.tail.insertAt(this.children.tail.length(),ue),this.cache={});var K=this;ne.reduce(function(W,B){return K=K.split(W,!0),K.insertAt(0,B),B.length},k+ue.length)}}},{key:"insertBefore",value:function(k,F){var V=this.children.head;l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertBefore",this).call(this,k,F),V instanceof O.default&&V.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"length",this).call(this)+N),this.cache.length}},{key:"moveChildren",value:function(k,F){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"moveChildren",this).call(this,k,F),this.cache={}}},{key:"optimize",value:function(k){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"optimize",this).call(this,k),this.cache={}}},{key:"path",value:function(k){return l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"path",this).call(this,k,!0)}},{key:"removeChild",value:function(k){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"removeChild",this).call(this,k),this.cache={}}},{key:"split",value:function(k){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(k===0||k>=this.length()-N)){var V=this.clone();return k===0?(this.parent.insertBefore(V,this),this):(this.parent.insertBefore(V,this.next),V)}else{var ne=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"split",this).call(this,k,F);return this.cache={},ne}}}]),q})(h.default.Block);j.blotName="block",j.tagName="P",j.defaultChild="break",j.allowedChildren=[_.default,h.default.Embed,w.default];function M(A){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(q=(0,f.default)(q,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?q:M(A.parent,q)}r.bubbleFormats=M,r.BlockEmbed=I,r.default=j}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},l=(function(){function K(W,B){var Q=[],re=!0,Z=!1,X=void 0;try{for(var $=W[Symbol.iterator](),ee;!(re=(ee=$.next()).done)&&(Q.push(ee.value),!(B&&Q.length===B));re=!0);}catch(le){Z=!0,X=le}finally{try{!re&&$.return&&$.return()}finally{if(Z)throw X}}return Q}return function(W,B){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return K(W,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function K(W,B){for(var Q=0;Q<B.length;Q++){var re=B[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(W,re.key,re)}}return function(W,B,Q){return B&&K(W.prototype,B),Q&&K(W,Q),W}})();o(50);var f=o(2),d=M(f),a=o(14),u=M(a),h=o(8),p=M(h),O=o(9),m=M(O),_=o(0),g=M(_),w=o(15),E=M(w),y=o(3),x=M(y),C=o(10),N=M(C),I=o(34),j=M(I);function M(K){return K&&K.__esModule?K:{default:K}}function A(K,W,B){return W in K?Object.defineProperty(K,W,{value:B,enumerable:!0,configurable:!0,writable:!0}):K[W]=B,K}function q(K,W){if(!(K instanceof W))throw new TypeError("Cannot call a class as a function")}var L=(0,N.default)("quill"),k=(function(){c(K,null,[{key:"debug",value:function(B){B===!0&&(B="log"),N.default.level(B)}},{key:"find",value:function(B){return B.__quill||g.default.find(B)}},{key:"import",value:function(B){return this.imports[B]==null&&L.error("Cannot import "+B+". Are you sure it was registered?"),this.imports[B]}},{key:"register",value:function(B,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof B!="string"){var X=B.attrName||B.blotName;typeof X=="string"?this.register("formats/"+X,B,Q):Object.keys(B).forEach(function($){re.register($,B[$],Q)})}else this.imports[B]!=null&&!Z&&L.warn("Overwriting "+B+" with",Q),this.imports[B]=Q,(B.startsWith("blots/")||B.startsWith("formats/"))&&Q.blotName!=="abstract"?g.default.register(Q):B.startsWith("modules")&&typeof Q.register=="function"&&Q.register()}}]);function K(W){var B=this,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(q(this,K),this.options=F(W,Q),this.container=this.options.container,this.container==null)return L.error("Invalid Quill container",W);this.options.debug&&K.debug(this.options.debug);var re=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 p.default,this.scroll=g.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new u.default(this.scroll),this.selection=new E.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(p.default.events.EDITOR_CHANGE,function(X){X===p.default.events.TEXT_CHANGE&&B.root.classList.toggle("ql-blank",B.editor.isBlank())}),this.emitter.on(p.default.events.SCROLL_UPDATE,function(X,$){var ee=B.selection.lastRange,le=ee&&ee.length===0?ee.index:void 0;V.call(B,function(){return B.editor.update(null,$,le)},X)});var Z=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+re+"<p><br></p></div>");this.setContents(Z),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(K,[{key:"addContainer",value:function(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof B=="string"){var re=B;B=document.createElement("div"),B.classList.add(re)}return this.container.insertBefore(B,Q),B}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(B,Q,re){var Z=this,X=ne(B,Q,re),$=l(X,4);return B=$[0],Q=$[1],re=$[3],V.call(this,function(){return Z.editor.deleteText(B,Q)},re,B,-1*Q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(B),this.container.classList.toggle("ql-disabled",!B)}},{key:"focus",value:function(){var B=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=B,this.scrollIntoView()}},{key:"format",value:function(B,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;return V.call(this,function(){var X=re.getSelection(!0),$=new d.default;if(X==null)return $;if(g.default.query(B,g.default.Scope.BLOCK))$=re.editor.formatLine(X.index,X.length,A({},B,Q));else{if(X.length===0)return re.selection.format(B,Q),$;$=re.editor.formatText(X.index,X.length,A({},B,Q))}return re.setSelection(X,p.default.sources.SILENT),$},Z)}},{key:"formatLine",value:function(B,Q,re,Z,X){var $=this,ee=void 0,le=ne(B,Q,re,Z,X),de=l(le,4);return B=de[0],Q=de[1],ee=de[2],X=de[3],V.call(this,function(){return $.editor.formatLine(B,Q,ee)},X,B,0)}},{key:"formatText",value:function(B,Q,re,Z,X){var $=this,ee=void 0,le=ne(B,Q,re,Z,X),de=l(le,4);return B=de[0],Q=de[1],ee=de[2],X=de[3],V.call(this,function(){return $.editor.formatText(B,Q,ee)},X,B,0)}},{key:"getBounds",value:function(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=void 0;typeof B=="number"?re=this.selection.getBounds(B,Q):re=this.selection.getBounds(B.index,B.length);var Z=this.container.getBoundingClientRect();return{bottom:re.bottom-Z.top,height:re.height,left:re.left-Z.left,right:re.right-Z.left,top:re.top-Z.top,width:re.width}}},{key:"getContents",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,re=ne(B,Q),Z=l(re,2);return B=Z[0],Q=Z[1],this.editor.getContents(B,Q)}},{key:"getFormat",value:function(){var B=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 B=="number"?this.editor.getFormat(B,Q):this.editor.getFormat(B.index,B.length)}},{key:"getIndex",value:function(B){return B.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(B){return this.scroll.leaf(B)}},{key:"getLine",value:function(B){return this.scroll.line(B)}},{key:"getLines",value:function(){var B=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 B!="number"?this.scroll.lines(B.index,B.length):this.scroll.lines(B,Q)}},{key:"getModule",value:function(B){return this.theme.modules[B]}},{key:"getSelection",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return B&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,re=ne(B,Q),Z=l(re,2);return B=Z[0],Q=Z[1],this.editor.getText(B,Q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(B,Q,re){var Z=this,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:K.sources.API;return V.call(this,function(){return Z.editor.insertEmbed(B,Q,re)},X,B)}},{key:"insertText",value:function(B,Q,re,Z,X){var $=this,ee=void 0,le=ne(B,0,re,Z,X),de=l(le,4);return B=de[0],ee=de[2],X=de[3],V.call(this,function(){return $.editor.insertText(B,Q,ee)},X,B,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(B,Q,re){this.clipboard.dangerouslyPasteHTML(B,Q,re)}},{key:"removeFormat",value:function(B,Q,re){var Z=this,X=ne(B,Q,re),$=l(X,4);return B=$[0],Q=$[1],re=$[3],V.call(this,function(){return Z.editor.removeFormat(B,Q)},re,B)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(B){var Q=this,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return V.call(this,function(){B=new d.default(B);var Z=Q.getLength(),X=Q.editor.deleteText(0,Z),$=Q.editor.applyDelta(B),ee=$.ops[$.ops.length-1];ee!=null&&typeof ee.insert=="string"&&ee.insert[ee.insert.length-1]===`
39
- `&&(Q.editor.deleteText(Q.getLength()-1,1),$.delete(1));var le=X.compose($);return le},re)}},{key:"setSelection",value:function(B,Q,re){if(B==null)this.selection.setRange(null,Q||K.sources.API);else{var Z=ne(B,Q,re),X=l(Z,4);B=X[0],Q=X[1],re=X[3],this.selection.setRange(new w.Range(B,Q),re),re!==p.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API,re=new d.default().insert(B);return this.setContents(re,Q)}},{key:"update",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,Q=this.scroll.update(B);return this.selection.update(B),Q}},{key:"updateContents",value:function(B){var Q=this,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return V.call(this,function(){return B=new d.default(B),Q.editor.applyDelta(B,re)},re,!0)}}]),K})();k.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},k.events=p.default.events,k.sources=p.default.sources,k.version="1.3.7",k.imports={delta:d.default,parchment:g.default,"core/module":m.default,"core/theme":j.default};function F(K,W){if(W=(0,x.default)(!0,{container:K,modules:{clipboard:!0,keyboard:!0,history:!0}},W),!W.theme||W.theme===k.DEFAULTS.theme)W.theme=j.default;else if(W.theme=k.import("themes/"+W.theme),W.theme==null)throw new Error("Invalid theme "+W.theme+". Did you register it?");var B=(0,x.default)(!0,{},W.theme.DEFAULTS);[B,W].forEach(function(Z){Z.modules=Z.modules||{},Object.keys(Z.modules).forEach(function(X){Z.modules[X]===!0&&(Z.modules[X]={})})});var Q=Object.keys(B.modules).concat(Object.keys(W.modules)),re=Q.reduce(function(Z,X){var $=k.import("modules/"+X);return $==null?L.error("Cannot load "+X+" module. Are you sure you registered it?"):Z[X]=$.DEFAULTS||{},Z},{});return W.modules!=null&&W.modules.toolbar&&W.modules.toolbar.constructor!==Object&&(W.modules.toolbar={container:W.modules.toolbar}),W=(0,x.default)(!0,{},k.DEFAULTS,{modules:re},B,W),["bounds","container","scrollingContainer"].forEach(function(Z){typeof W[Z]=="string"&&(W[Z]=document.querySelector(W[Z]))}),W.modules=Object.keys(W.modules).reduce(function(Z,X){return W.modules[X]&&(Z[X]=W.modules[X]),Z},{}),W}function V(K,W,B,Q){if(this.options.strict&&!this.isEnabled()&&W===p.default.sources.USER)return new d.default;var re=B==null?null:this.getSelection(),Z=this.editor.delta,X=K();if(re!=null&&(B===!0&&(B=re.index),Q==null?re=ue(re,X,W):Q!==0&&(re=ue(re,B,Q,W)),this.setSelection(re,p.default.sources.SILENT)),X.length()>0){var $,ee=[p.default.events.TEXT_CHANGE,X,Z,W];if(($=this.emitter).emit.apply($,[p.default.events.EDITOR_CHANGE].concat(ee)),W!==p.default.sources.SILENT){var le;(le=this.emitter).emit.apply(le,ee)}}return X}function ne(K,W,B,Q,re){var Z={};return typeof K.index=="number"&&typeof K.length=="number"?typeof W!="number"?(re=Q,Q=B,B=W,W=K.length,K=K.index):(W=K.length,K=K.index):typeof W!="number"&&(re=Q,Q=B,B=W,W=0),(typeof B>"u"?"undefined":s(B))==="object"?(Z=B,re=Q):typeof B=="string"&&(Q!=null?Z[B]=Q:re=B),re=re||p.default.sources.API,[K,W,Z,re]}function ue(K,W,B,Q){if(K==null)return null;var re=void 0,Z=void 0;if(W instanceof d.default){var X=[K.index,K.index+K.length].map(function(de){return W.transformPosition(de,Q!==p.default.sources.USER)}),$=l(X,2);re=$[0],Z=$[1]}else{var ee=[K.index,K.index+K.length].map(function(de){return de<W||de===W&&Q===p.default.sources.USER?de:B>=0?de+B:Math.max(W,de+B)}),le=l(ee,2);re=le[0],Z=le[1]}return new w.Range(re,Z-re)}r.expandConfig=F,r.overload=ne,r.default=k}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(g,w){for(var E=0;E<w.length;E++){var y=w[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,w,E){return w&&_(g.prototype,w),E&&_(g,E),g}})(),l=function _(g,w,E){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,w);if(y===void 0){var x=Object.getPrototypeOf(g);return x===null?void 0:_(x,w,E)}else{if("value"in y)return y.value;var C=y.get;return C===void 0?void 0:C.call(E)}},c=o(7),f=u(c),d=o(0),a=u(d);function u(_){return _&&_.__esModule?_:{default:_}}function h(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function p(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function O(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var m=(function(_){O(g,_);function g(){return h(this,g),p(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"formatAt",value:function(E,y,x,C){if(g.compare(this.statics.blotName,x)<0&&a.default.query(x,a.default.Scope.BLOT)){var N=this.isolate(E,y);C&&N.wrap(x,C)}else l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"formatAt",this).call(this,E,y,x,C)}},{key:"optimize",value:function(E){if(l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,E),this.parent instanceof g&&g.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(E,y){var x=g.order.indexOf(E),C=g.order.indexOf(y);return x>=0||C>=0?x-C:E===y?0:E<y?-1:1}}]),g})(a.default.Inline);m.allowedChildren=[m,a.default.Embed,f.default],m.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function d(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function a(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var u=(function(h){a(p,h);function p(){return f(this,p),d(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default.Text);r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function w(E,y){for(var x=0;x<y.length;x++){var C=y[x];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}return function(E,y,x){return y&&w(E.prototype,y),x&&w(E,x),E}})(),l=function w(E,y,x){E===null&&(E=Function.prototype);var C=Object.getOwnPropertyDescriptor(E,y);if(C===void 0){var N=Object.getPrototypeOf(E);return N===null?void 0:w(N,y,x)}else{if("value"in C)return C.value;var I=C.get;return I===void 0?void 0:I.call(x)}},c=o(54),f=u(c),d=o(10),a=u(d);function u(w){return w&&w.__esModule?w:{default:w}}function h(w,E){if(!(w instanceof E))throw new TypeError("Cannot call a class as a function")}function p(w,E){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:w}function O(w,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);w.prototype=Object.create(E&&E.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(w,E):w.__proto__=E)}var m=(0,a.default)("quill:events"),_=["selectionchange","mousedown","mouseup","click"];_.forEach(function(w){document.addEventListener(w,function(){for(var E=arguments.length,y=Array(E),x=0;x<E;x++)y[x]=arguments[x];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(C){if(C.__quill&&C.__quill.emitter){var N;(N=C.__quill.emitter).handleDOM.apply(N,y)}})})});var g=(function(w){O(E,w);function E(){h(this,E);var y=p(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));return y.listeners={},y.on("error",m.error),y}return s(E,[{key:"emit",value:function(){m.log.apply(m,arguments),l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(x){for(var C=arguments.length,N=Array(C>1?C-1:0),I=1;I<C;I++)N[I-1]=arguments[I];(this.listeners[x.type]||[]).forEach(function(j){var M=j.node,A=j.handler;(x.target===M||M.contains(x.target))&&A.apply(void 0,[x].concat(N))})}},{key:"listenDOM",value:function(x,C,N){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push({node:C,handler:N})}}]),E})(f.default);g.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"},g.sources={API:"api",SILENT:"silent",USER:"user"},r.default=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});function s(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,c),this.quill=f,this.options=d};l.DEFAULTS={},r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=["error","warn","log","info"],l="warn";function c(d){if(s.indexOf(d)<=s.indexOf(l)){for(var a,u=arguments.length,h=Array(u>1?u-1:0),p=1;p<u;p++)h[p-1]=arguments[p];(a=console)[d].apply(a,h)}}function f(d){return s.reduce(function(a,u){return a[u]=c.bind(console,u,d),a},{})}c.level=f.level=function(d){l=d},r.default=f}),(function(n,r,o){var s=Array.prototype.slice,l=o(52),c=o(53),f=n.exports=function(h,p,O){return O||(O={}),h===p?!0:h instanceof Date&&p instanceof Date?h.getTime()===p.getTime():!h||!p||typeof h!="object"&&typeof p!="object"?O.strict?h===p:h==p:u(h,p,O)};function d(h){return h==null}function a(h){return!(!h||typeof h!="object"||typeof h.length!="number"||typeof h.copy!="function"||typeof h.slice!="function"||h.length>0&&typeof h[0]!="number")}function u(h,p,O){var m,_;if(d(h)||d(p)||h.prototype!==p.prototype)return!1;if(c(h))return c(p)?(h=s.call(h),p=s.call(p),f(h,p,O)):!1;if(a(h)){if(!a(p)||h.length!==p.length)return!1;for(m=0;m<h.length;m++)if(h[m]!==p[m])return!1;return!0}try{var g=l(h),w=l(p)}catch{return!1}if(g.length!=w.length)return!1;for(g.sort(),w.sort(),m=g.length-1;m>=0;m--)if(g[m]!=w[m])return!1;for(m=g.length-1;m>=0;m--)if(_=g[m],!f(h[_],p[_],O))return!1;return typeof h==typeof p}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(1),l=(function(){function c(f,d,a){a===void 0&&(a={}),this.attrName=f,this.keyName=d;var u=s.Scope.TYPE&s.Scope.ATTRIBUTE;a.scope!=null?this.scope=a.scope&s.Scope.LEVEL|u:this.scope=s.Scope.ATTRIBUTE,a.whitelist!=null&&(this.whitelist=a.whitelist)}return c.keys=function(f){return[].map.call(f.attributes,function(d){return d.name})},c.prototype.add=function(f,d){return this.canAdd(f,d)?(f.setAttribute(this.keyName,d),!0):!1},c.prototype.canAdd=function(f,d){var a=s.query(f,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return a==null?!1:this.whitelist==null?!0:typeof d=="string"?this.whitelist.indexOf(d.replace(/["']/g,""))>-1:this.whitelist.indexOf(d)>-1},c.prototype.remove=function(f){f.removeAttribute(this.keyName)},c.prototype.value=function(f){var d=f.getAttribute(this.keyName);return this.canAdd(f,d)&&d?d:""},c})();r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var s=(function(){function I(j,M){var A=[],q=!0,L=!1,k=void 0;try{for(var F=j[Symbol.iterator](),V;!(q=(V=F.next()).done)&&(A.push(V.value),!(M&&A.length===M));q=!0);}catch(ne){L=!0,k=ne}finally{try{!q&&F.return&&F.return()}finally{if(L)throw k}}return A}return function(j,M){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return I(j,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function I(j,M){for(var A=0;A<M.length;A++){var q=M[A];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}return function(j,M,A){return M&&I(j.prototype,M),A&&I(j,A),j}})(),c=function I(j,M,A){j===null&&(j=Function.prototype);var q=Object.getOwnPropertyDescriptor(j,M);if(q===void 0){var L=Object.getPrototypeOf(j);return L===null?void 0:I(L,M,A)}else{if("value"in q)return q.value;var k=q.get;return k===void 0?void 0:k.call(A)}},f=o(2),d=w(f),a=o(0),u=w(a),h=o(4),p=w(h),O=o(6),m=w(O),_=o(7),g=w(_);function w(I){return I&&I.__esModule?I:{default:I}}function E(I,j){if(!(I instanceof j))throw new TypeError("Cannot call a class as a function")}function y(I,j){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:I}function x(I,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);I.prototype=Object.create(j&&j.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(I,j):I.__proto__=j)}var C=(function(I){x(j,I);function j(){return E(this,j),y(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return j})(m.default);C.blotName="code",C.tagName="CODE";var N=(function(I){x(j,I);function j(){return E(this,j),y(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return l(j,[{key:"delta",value:function(){var A=this,q=this.domNode.textContent;return q.endsWith(`
34
+ */var eL=ca.exports,YO;function tL(){return YO||(YO=1,(function(e,t){(function(r,o){e.exports=o()})(typeof self<"u"?self:eL,function(){return(function(n){var r={};function o(s){if(r[s])return r[s].exports;var l=r[s]={i:s,l:!1,exports:{}};return n[s].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=n,o.c=r,o.d=function(s,l,c){o.o(s,l)||Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:c})},o.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(l,"a",l),l},o.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},o.p="",o(o.s=109)})([(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(17),l=o(18),c=o(19),f=o(45),h=o(46),a=o(47),u=o(48),d=o(49),p=o(12),O=o(32),g=o(33),_=o(31),y=o(1),w={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:s.default,Format:l.default,Leaf:c.default,Embed:u.default,Scroll:f.default,Block:a.default,Inline:h.default,Text:d.default,Attributor:{Attribute:p.default,Class:O.default,Style:g.default,Store:_.default}};r.default=w}),(function(n,r,o){var s=this&&this.__extends||(function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,w){y.__proto__=w}||function(y,w){for(var E in w)w.hasOwnProperty(E)&&(y[E]=w[E])};return function(y,w){_(y,w);function E(){this.constructor=y}y.prototype=w===null?Object.create(w):(E.prototype=w.prototype,new E)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=(function(_){s(y,_);function y(w){var E=this;return w="[Parchment] "+w,E=_.call(this,w)||this,E.message=w,E.name=E.constructor.name,E}return y})(Error);r.ParchmentError=l;var c={},f={},h={},a={};r.DATA_KEY="__blot";var u;(function(_){_[_.TYPE=3]="TYPE",_[_.LEVEL=12]="LEVEL",_[_.ATTRIBUTE=13]="ATTRIBUTE",_[_.BLOT=14]="BLOT",_[_.INLINE=7]="INLINE",_[_.BLOCK=11]="BLOCK",_[_.BLOCK_BLOT=10]="BLOCK_BLOT",_[_.INLINE_BLOT=6]="INLINE_BLOT",_[_.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",_[_.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",_[_.ANY=15]="ANY"})(u=r.Scope||(r.Scope={}));function d(_,y){var w=O(_);if(w==null)throw new l("Unable to create "+_+" blot");var E=w,m=_ instanceof Node||_.nodeType===Node.TEXT_NODE?_:E.create(y);return new E(m,y)}r.create=d;function p(_,y){return y===void 0&&(y=!1),_==null?null:_[r.DATA_KEY]!=null?_[r.DATA_KEY].blot:y?p(_.parentNode,y):null}r.find=p;function O(_,y){y===void 0&&(y=u.ANY);var w;if(typeof _=="string")w=a[_]||c[_];else if(_ instanceof Text||_.nodeType===Node.TEXT_NODE)w=a.text;else if(typeof _=="number")_&u.LEVEL&u.BLOCK?w=a.block:_&u.LEVEL&u.INLINE&&(w=a.inline);else if(_ instanceof HTMLElement){var E=(_.getAttribute("class")||"").split(/\s+/);for(var m in E)if(w=f[E[m]],w)break;w=w||h[_.tagName]}return w==null?null:y&u.LEVEL&w.scope&&y&u.TYPE&w.scope?w:null}r.query=O;function g(){for(var _=[],y=0;y<arguments.length;y++)_[y]=arguments[y];if(_.length>1)return _.map(function(m){return g(m)});var w=_[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new l("Invalid definition");if(w.blotName==="abstract")throw new l("Cannot register abstract class");if(a[w.blotName||w.attrName]=w,typeof w.keyName=="string")c[w.keyName]=w;else if(w.className!=null&&(f[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(m){return m.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var E=Array.isArray(w.tagName)?w.tagName:[w.tagName];E.forEach(function(m){(h[m]==null||w.className==null)&&(h[m]=w)})}return w}r.register=g}),(function(n,r,o){var s=o(51),l=o(11),c=o(3),f=o(20),h="\0",a=function(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]};a.prototype.insert=function(u,d){var p={};return u.length===0?this:(p.insert=u,d!=null&&typeof d=="object"&&Object.keys(d).length>0&&(p.attributes=d),this.push(p))},a.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},a.prototype.retain=function(u,d){if(u<=0)return this;var p={retain:u};return d!=null&&typeof d=="object"&&Object.keys(d).length>0&&(p.attributes=d),this.push(p)},a.prototype.push=function(u){var d=this.ops.length,p=this.ops[d-1];if(u=c(!0,{},u),typeof p=="object"){if(typeof u.delete=="number"&&typeof p.delete=="number")return this.ops[d-1]={delete:p.delete+u.delete},this;if(typeof p.delete=="number"&&u.insert!=null&&(d-=1,p=this.ops[d-1],typeof p!="object"))return this.ops.unshift(u),this;if(l(u.attributes,p.attributes)){if(typeof u.insert=="string"&&typeof p.insert=="string")return this.ops[d-1]={insert:p.insert+u.insert},typeof u.attributes=="object"&&(this.ops[d-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof p.retain=="number")return this.ops[d-1]={retain:p.retain+u.retain},typeof u.attributes=="object"&&(this.ops[d-1].attributes=u.attributes),this}}return d===this.ops.length?this.ops.push(u):this.ops.splice(d,0,u),this},a.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},a.prototype.filter=function(u){return this.ops.filter(u)},a.prototype.forEach=function(u){this.ops.forEach(u)},a.prototype.map=function(u){return this.ops.map(u)},a.prototype.partition=function(u){var d=[],p=[];return this.forEach(function(O){var g=u(O)?d:p;g.push(O)}),[d,p]},a.prototype.reduce=function(u,d){return this.ops.reduce(u,d)},a.prototype.changeLength=function(){return this.reduce(function(u,d){return d.insert?u+f.length(d):d.delete?u-d.delete:u},0)},a.prototype.length=function(){return this.reduce(function(u,d){return u+f.length(d)},0)},a.prototype.slice=function(u,d){u=u||0,typeof d!="number"&&(d=1/0);for(var p=[],O=f.iterator(this.ops),g=0;g<d&&O.hasNext();){var _;g<u?_=O.next(u-g):(_=O.next(d-g),p.push(_)),g+=f.length(_)}return new a(p)},a.prototype.compose=function(u){var d=f.iterator(this.ops),p=f.iterator(u.ops),O=[],g=p.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var _=g.retain;d.peekType()==="insert"&&d.peekLength()<=_;)_-=d.peekLength(),O.push(d.next());g.retain-_>0&&p.next(g.retain-_)}for(var y=new a(O);d.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(d.peekType()==="delete")y.push(d.next());else{var w=Math.min(d.peekLength(),p.peekLength()),E=d.next(w),m=p.next(w);if(typeof m.retain=="number"){var S={};typeof E.retain=="number"?S.retain=w:S.insert=E.insert;var C=f.attributes.compose(E.attributes,m.attributes,typeof E.retain=="number");if(C&&(S.attributes=C),y.push(S),!p.hasNext()&&l(y.ops[y.ops.length-1],S)){var N=new a(d.rest());return y.concat(N).chop()}}else typeof m.delete=="number"&&typeof E.retain=="number"&&y.push(m)}return y.chop()},a.prototype.concat=function(u){var d=new a(this.ops.slice());return u.ops.length>0&&(d.push(u.ops[0]),d.ops=d.ops.concat(u.ops.slice(1))),d},a.prototype.diff=function(u,d){if(this.ops===u.ops)return new a;var p=[this,u].map(function(w){return w.map(function(E){if(E.insert!=null)return typeof E.insert=="string"?E.insert:h;var m=w===u?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")}),O=new a,g=s(p[0],p[1],d),_=f.iterator(this.ops),y=f.iterator(u.ops);return g.forEach(function(w){for(var E=w[1].length;E>0;){var m=0;switch(w[0]){case s.INSERT:m=Math.min(y.peekLength(),E),O.push(y.next(m));break;case s.DELETE:m=Math.min(E,_.peekLength()),_.next(m),O.delete(m);break;case s.EQUAL:m=Math.min(_.peekLength(),y.peekLength(),E);var S=_.next(m),C=y.next(m);l(S.insert,C.insert)?O.retain(m,f.attributes.diff(S.attributes,C.attributes)):O.push(C).delete(m);break}E-=m}}),O.chop()},a.prototype.eachLine=function(u,d){d=d||`
35
+ `;for(var p=f.iterator(this.ops),O=new a,g=0;p.hasNext();){if(p.peekType()!=="insert")return;var _=p.peek(),y=f.length(_)-p.peekLength(),w=typeof _.insert=="string"?_.insert.indexOf(d,y)-y:-1;if(w<0)O.push(p.next());else if(w>0)O.push(p.next(w));else{if(u(O,p.next(1).attributes||{},g)===!1)return;g+=1,O=new a}}O.length()>0&&u(O,{},g)},a.prototype.transform=function(u,d){if(d=!!d,typeof u=="number")return this.transformPosition(u,d);for(var p=f.iterator(this.ops),O=f.iterator(u.ops),g=new a;p.hasNext()||O.hasNext();)if(p.peekType()==="insert"&&(d||O.peekType()!=="insert"))g.retain(f.length(p.next()));else if(O.peekType()==="insert")g.push(O.next());else{var _=Math.min(p.peekLength(),O.peekLength()),y=p.next(_),w=O.next(_);if(y.delete)continue;w.delete?g.push(w):g.retain(_,f.attributes.transform(y.attributes,w.attributes,d))}return g.chop()},a.prototype.transformPosition=function(u,d){d=!!d;for(var p=f.iterator(this.ops),O=0;p.hasNext()&&O<=u;){var g=p.peekLength(),_=p.peekType();if(p.next(),_==="delete"){u-=Math.min(g,u-O);continue}else _==="insert"&&(O<u||!d)&&(u+=g);O+=g}return u},n.exports=a}),(function(n,r){var o=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=function(p){return typeof Array.isArray=="function"?Array.isArray(p):s.call(p)==="[object Array]"},h=function(p){if(!p||s.call(p)!=="[object Object]")return!1;var O=o.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&o.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!O&&!g)return!1;var _;for(_ in p);return typeof _>"u"||o.call(p,_)},a=function(p,O){l&&O.name==="__proto__"?l(p,O.name,{enumerable:!0,configurable:!0,value:O.newValue,writable:!0}):p[O.name]=O.newValue},u=function(p,O){if(O==="__proto__")if(o.call(p,O)){if(c)return c(p,O).value}else return;return p[O]};n.exports=function d(){var p,O,g,_,y,w,E=arguments[0],m=1,S=arguments.length,C=!1;for(typeof E=="boolean"&&(C=E,E=arguments[1]||{},m=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});m<S;++m)if(p=arguments[m],p!=null)for(O in p)g=u(E,O),_=u(p,O),E!==_&&(C&&_&&(h(_)||(y=f(_)))?(y?(y=!1,w=g&&f(g)?g:[]):w=g&&h(g)?g:{},a(E,{name:O,newValue:d(C,w,_)})):typeof _<"u"&&a(E,{name:O,newValue:_}));return E}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var s=(function(){function A(q,R){for(var k=0;k<R.length;k++){var F=R[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(q,F.key,F)}}return function(q,R,k){return R&&A(q.prototype,R),k&&A(q,k),q}})(),l=function A(q,R,k){q===null&&(q=Function.prototype);var F=Object.getOwnPropertyDescriptor(q,R);if(F===void 0){var U=Object.getPrototypeOf(q);return U===null?void 0:A(U,R,k)}else{if("value"in F)return F.value;var ne=F.get;return ne===void 0?void 0:ne.call(k)}},c=o(3),f=E(c),h=o(2),a=E(h),u=o(0),d=E(u),p=o(16),O=E(p),g=o(6),_=E(g),y=o(7),w=E(y);function E(A){return A&&A.__esModule?A:{default:A}}function m(A,q){if(!(A instanceof q))throw new TypeError("Cannot call a class as a function")}function S(A,q){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:A}function C(A,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);A.prototype=Object.create(q&&q.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(A,q):A.__proto__=q)}var N=1,M=(function(A){C(q,A);function q(){return m(this,q),S(this,(q.__proto__||Object.getPrototypeOf(q)).apply(this,arguments))}return s(q,[{key:"attach",value:function(){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"attach",this).call(this),this.attributes=new d.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new a.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(k,F){var U=d.default.query(k,d.default.Scope.BLOCK_ATTRIBUTE);U!=null&&this.attributes.attribute(U,F)}},{key:"formatAt",value:function(k,F,U,ne){this.format(U,ne)}},{key:"insertAt",value:function(k,F,U){if(typeof F=="string"&&F.endsWith(`
36
+ `)){var ne=d.default.create(j.blotName);this.parent.insertBefore(ne,k===0?this:this.next),ne.insertAt(0,F.slice(0,-1))}else l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,k,F,U)}}]),q})(d.default.Embed);M.scope=d.default.Scope.BLOCK_BLOT;var j=(function(A){C(q,A);function q(R){m(this,q);var k=S(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,R));return k.cache={},k}return s(q,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(d.default.Leaf).reduce(function(k,F){return F.length()===0?k:k.insert(F.value(),I(F))},new a.default).insert(`
37
+ `,I(this))),this.cache.delta}},{key:"deleteAt",value:function(k,F){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"deleteAt",this).call(this,k,F),this.cache={}}},{key:"formatAt",value:function(k,F,U,ne){F<=0||(d.default.query(U,d.default.Scope.BLOCK)?k+F===this.length()&&this.format(U,ne):l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"formatAt",this).call(this,k,Math.min(F,this.length()-k-1),U,ne),this.cache={})}},{key:"insertAt",value:function(k,F,U){if(U!=null)return l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,k,F,U);if(F.length!==0){var ne=F.split(`
38
+ `),ue=ne.shift();ue.length>0&&(k<this.length()-1||this.children.tail==null?l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertAt",this).call(this,Math.min(k,this.length()-1),ue):this.children.tail.insertAt(this.children.tail.length(),ue),this.cache={});var K=this;ne.reduce(function(W,z){return K=K.split(W,!0),K.insertAt(0,z),z.length},k+ue.length)}}},{key:"insertBefore",value:function(k,F){var U=this.children.head;l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"insertBefore",this).call(this,k,F),U instanceof O.default&&U.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"length",this).call(this)+N),this.cache.length}},{key:"moveChildren",value:function(k,F){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"moveChildren",this).call(this,k,F),this.cache={}}},{key:"optimize",value:function(k){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"optimize",this).call(this,k),this.cache={}}},{key:"path",value:function(k){return l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"path",this).call(this,k,!0)}},{key:"removeChild",value:function(k){l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"removeChild",this).call(this,k),this.cache={}}},{key:"split",value:function(k){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(k===0||k>=this.length()-N)){var U=this.clone();return k===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var ne=l(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"split",this).call(this,k,F);return this.cache={},ne}}}]),q})(d.default.Block);j.blotName="block",j.tagName="P",j.defaultChild="break",j.allowedChildren=[_.default,d.default.Embed,w.default];function I(A){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(q=(0,f.default)(q,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?q:I(A.parent,q)}r.bubbleFormats=I,r.BlockEmbed=M,r.default=j}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},l=(function(){function K(W,z){var Q=[],re=!0,Z=!1,X=void 0;try{for(var H=W[Symbol.iterator](),ee;!(re=(ee=H.next()).done)&&(Q.push(ee.value),!(z&&Q.length===z));re=!0);}catch(le){Z=!0,X=le}finally{try{!re&&H.return&&H.return()}finally{if(Z)throw X}}return Q}return function(W,z){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return K(W,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function K(W,z){for(var Q=0;Q<z.length;Q++){var re=z[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(W,re.key,re)}}return function(W,z,Q){return z&&K(W.prototype,z),Q&&K(W,Q),W}})();o(50);var f=o(2),h=I(f),a=o(14),u=I(a),d=o(8),p=I(d),O=o(9),g=I(O),_=o(0),y=I(_),w=o(15),E=I(w),m=o(3),S=I(m),C=o(10),N=I(C),M=o(34),j=I(M);function I(K){return K&&K.__esModule?K:{default:K}}function A(K,W,z){return W in K?Object.defineProperty(K,W,{value:z,enumerable:!0,configurable:!0,writable:!0}):K[W]=z,K}function q(K,W){if(!(K instanceof W))throw new TypeError("Cannot call a class as a function")}var R=(0,N.default)("quill"),k=(function(){c(K,null,[{key:"debug",value:function(z){z===!0&&(z="log"),N.default.level(z)}},{key:"find",value:function(z){return z.__quill||y.default.find(z)}},{key:"import",value:function(z){return this.imports[z]==null&&R.error("Cannot import "+z+". Are you sure it was registered?"),this.imports[z]}},{key:"register",value:function(z,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof z!="string"){var X=z.attrName||z.blotName;typeof X=="string"?this.register("formats/"+X,z,Q):Object.keys(z).forEach(function(H){re.register(H,z[H],Q)})}else this.imports[z]!=null&&!Z&&R.warn("Overwriting "+z+" with",Q),this.imports[z]=Q,(z.startsWith("blots/")||z.startsWith("formats/"))&&Q.blotName!=="abstract"?y.default.register(Q):z.startsWith("modules")&&typeof Q.register=="function"&&Q.register()}}]);function K(W){var z=this,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(q(this,K),this.options=F(W,Q),this.container=this.options.container,this.container==null)return R.error("Invalid Quill container",W);this.options.debug&&K.debug(this.options.debug);var re=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 p.default,this.scroll=y.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new u.default(this.scroll),this.selection=new E.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(p.default.events.EDITOR_CHANGE,function(X){X===p.default.events.TEXT_CHANGE&&z.root.classList.toggle("ql-blank",z.editor.isBlank())}),this.emitter.on(p.default.events.SCROLL_UPDATE,function(X,H){var ee=z.selection.lastRange,le=ee&&ee.length===0?ee.index:void 0;U.call(z,function(){return z.editor.update(null,H,le)},X)});var Z=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+re+"<p><br></p></div>");this.setContents(Z),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(K,[{key:"addContainer",value:function(z){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof z=="string"){var re=z;z=document.createElement("div"),z.classList.add(re)}return this.container.insertBefore(z,Q),z}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(z,Q,re){var Z=this,X=ne(z,Q,re),H=l(X,4);return z=H[0],Q=H[1],re=H[3],U.call(this,function(){return Z.editor.deleteText(z,Q)},re,z,-1*Q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(z),this.container.classList.toggle("ql-disabled",!z)}},{key:"focus",value:function(){var z=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=z,this.scrollIntoView()}},{key:"format",value:function(z,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;return U.call(this,function(){var X=re.getSelection(!0),H=new h.default;if(X==null)return H;if(y.default.query(z,y.default.Scope.BLOCK))H=re.editor.formatLine(X.index,X.length,A({},z,Q));else{if(X.length===0)return re.selection.format(z,Q),H;H=re.editor.formatText(X.index,X.length,A({},z,Q))}return re.setSelection(X,p.default.sources.SILENT),H},Z)}},{key:"formatLine",value:function(z,Q,re,Z,X){var H=this,ee=void 0,le=ne(z,Q,re,Z,X),de=l(le,4);return z=de[0],Q=de[1],ee=de[2],X=de[3],U.call(this,function(){return H.editor.formatLine(z,Q,ee)},X,z,0)}},{key:"formatText",value:function(z,Q,re,Z,X){var H=this,ee=void 0,le=ne(z,Q,re,Z,X),de=l(le,4);return z=de[0],Q=de[1],ee=de[2],X=de[3],U.call(this,function(){return H.editor.formatText(z,Q,ee)},X,z,0)}},{key:"getBounds",value:function(z){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=void 0;typeof z=="number"?re=this.selection.getBounds(z,Q):re=this.selection.getBounds(z.index,z.length);var Z=this.container.getBoundingClientRect();return{bottom:re.bottom-Z.top,height:re.height,left:re.left-Z.left,right:re.right-Z.left,top:re.top-Z.top,width:re.width}}},{key:"getContents",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-z,re=ne(z,Q),Z=l(re,2);return z=Z[0],Q=Z[1],this.editor.getContents(z,Q)}},{key:"getFormat",value:function(){var z=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 z=="number"?this.editor.getFormat(z,Q):this.editor.getFormat(z.index,z.length)}},{key:"getIndex",value:function(z){return z.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(z){return this.scroll.leaf(z)}},{key:"getLine",value:function(z){return this.scroll.line(z)}},{key:"getLines",value:function(){var z=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 z!="number"?this.scroll.lines(z.index,z.length):this.scroll.lines(z,Q)}},{key:"getModule",value:function(z){return this.theme.modules[z]}},{key:"getSelection",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return z&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-z,re=ne(z,Q),Z=l(re,2);return z=Z[0],Q=Z[1],this.editor.getText(z,Q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(z,Q,re){var Z=this,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:K.sources.API;return U.call(this,function(){return Z.editor.insertEmbed(z,Q,re)},X,z)}},{key:"insertText",value:function(z,Q,re,Z,X){var H=this,ee=void 0,le=ne(z,0,re,Z,X),de=l(le,4);return z=de[0],ee=de[2],X=de[3],U.call(this,function(){return H.editor.insertText(z,Q,ee)},X,z,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(z,Q,re){this.clipboard.dangerouslyPasteHTML(z,Q,re)}},{key:"removeFormat",value:function(z,Q,re){var Z=this,X=ne(z,Q,re),H=l(X,4);return z=H[0],Q=H[1],re=H[3],U.call(this,function(){return Z.editor.removeFormat(z,Q)},re,z)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(z){var Q=this,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return U.call(this,function(){z=new h.default(z);var Z=Q.getLength(),X=Q.editor.deleteText(0,Z),H=Q.editor.applyDelta(z),ee=H.ops[H.ops.length-1];ee!=null&&typeof ee.insert=="string"&&ee.insert[ee.insert.length-1]===`
39
+ `&&(Q.editor.deleteText(Q.getLength()-1,1),H.delete(1));var le=X.compose(H);return le},re)}},{key:"setSelection",value:function(z,Q,re){if(z==null)this.selection.setRange(null,Q||K.sources.API);else{var Z=ne(z,Q,re),X=l(Z,4);z=X[0],Q=X[1],re=X[3],this.selection.setRange(new w.Range(z,Q),re),re!==p.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(z){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API,re=new h.default().insert(z);return this.setContents(re,Q)}},{key:"update",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,Q=this.scroll.update(z);return this.selection.update(z),Q}},{key:"updateContents",value:function(z){var Q=this,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return U.call(this,function(){return z=new h.default(z),Q.editor.applyDelta(z,re)},re,!0)}}]),K})();k.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},k.events=p.default.events,k.sources=p.default.sources,k.version="1.3.7",k.imports={delta:h.default,parchment:y.default,"core/module":g.default,"core/theme":j.default};function F(K,W){if(W=(0,S.default)(!0,{container:K,modules:{clipboard:!0,keyboard:!0,history:!0}},W),!W.theme||W.theme===k.DEFAULTS.theme)W.theme=j.default;else if(W.theme=k.import("themes/"+W.theme),W.theme==null)throw new Error("Invalid theme "+W.theme+". Did you register it?");var z=(0,S.default)(!0,{},W.theme.DEFAULTS);[z,W].forEach(function(Z){Z.modules=Z.modules||{},Object.keys(Z.modules).forEach(function(X){Z.modules[X]===!0&&(Z.modules[X]={})})});var Q=Object.keys(z.modules).concat(Object.keys(W.modules)),re=Q.reduce(function(Z,X){var H=k.import("modules/"+X);return H==null?R.error("Cannot load "+X+" module. Are you sure you registered it?"):Z[X]=H.DEFAULTS||{},Z},{});return W.modules!=null&&W.modules.toolbar&&W.modules.toolbar.constructor!==Object&&(W.modules.toolbar={container:W.modules.toolbar}),W=(0,S.default)(!0,{},k.DEFAULTS,{modules:re},z,W),["bounds","container","scrollingContainer"].forEach(function(Z){typeof W[Z]=="string"&&(W[Z]=document.querySelector(W[Z]))}),W.modules=Object.keys(W.modules).reduce(function(Z,X){return W.modules[X]&&(Z[X]=W.modules[X]),Z},{}),W}function U(K,W,z,Q){if(this.options.strict&&!this.isEnabled()&&W===p.default.sources.USER)return new h.default;var re=z==null?null:this.getSelection(),Z=this.editor.delta,X=K();if(re!=null&&(z===!0&&(z=re.index),Q==null?re=ue(re,X,W):Q!==0&&(re=ue(re,z,Q,W)),this.setSelection(re,p.default.sources.SILENT)),X.length()>0){var H,ee=[p.default.events.TEXT_CHANGE,X,Z,W];if((H=this.emitter).emit.apply(H,[p.default.events.EDITOR_CHANGE].concat(ee)),W!==p.default.sources.SILENT){var le;(le=this.emitter).emit.apply(le,ee)}}return X}function ne(K,W,z,Q,re){var Z={};return typeof K.index=="number"&&typeof K.length=="number"?typeof W!="number"?(re=Q,Q=z,z=W,W=K.length,K=K.index):(W=K.length,K=K.index):typeof W!="number"&&(re=Q,Q=z,z=W,W=0),(typeof z>"u"?"undefined":s(z))==="object"?(Z=z,re=Q):typeof z=="string"&&(Q!=null?Z[z]=Q:re=z),re=re||p.default.sources.API,[K,W,Z,re]}function ue(K,W,z,Q){if(K==null)return null;var re=void 0,Z=void 0;if(W instanceof h.default){var X=[K.index,K.index+K.length].map(function(de){return W.transformPosition(de,Q!==p.default.sources.USER)}),H=l(X,2);re=H[0],Z=H[1]}else{var ee=[K.index,K.index+K.length].map(function(de){return de<W||de===W&&Q===p.default.sources.USER?de:z>=0?de+z:Math.max(W,de+z)}),le=l(ee,2);re=le[0],Z=le[1]}return new w.Range(re,Z-re)}r.expandConfig=F,r.overload=ne,r.default=k}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(y,w){for(var E=0;E<w.length;E++){var m=w[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,w,E){return w&&_(y.prototype,w),E&&_(y,E),y}})(),l=function _(y,w,E){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,w);if(m===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:_(S,w,E)}else{if("value"in m)return m.value;var C=m.get;return C===void 0?void 0:C.call(E)}},c=o(7),f=u(c),h=o(0),a=u(h);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function p(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function O(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var g=(function(_){O(y,_);function y(){return d(this,y),p(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"formatAt",value:function(E,m,S,C){if(y.compare(this.statics.blotName,S)<0&&a.default.query(S,a.default.Scope.BLOT)){var N=this.isolate(E,m);C&&N.wrap(S,C)}else l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"formatAt",this).call(this,E,m,S,C)}},{key:"optimize",value:function(E){if(l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,E),this.parent instanceof y&&y.compare(this.statics.blotName,this.parent.statics.blotName)>0){var m=this.parent.isolate(this.offset(),this.length());this.moveChildren(m),m.wrap(this)}}}],[{key:"compare",value:function(E,m){var S=y.order.indexOf(E),C=y.order.indexOf(m);return S>=0||C>=0?S-C:E===m?0:E<m?-1:1}}]),y})(a.default.Inline);g.allowedChildren=[g,a.default.Embed,f.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function h(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=(function(d){a(p,d);function p(){return f(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default.Text);r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function w(E,m){for(var S=0;S<m.length;S++){var C=m[S];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}return function(E,m,S){return m&&w(E.prototype,m),S&&w(E,S),E}})(),l=function w(E,m,S){E===null&&(E=Function.prototype);var C=Object.getOwnPropertyDescriptor(E,m);if(C===void 0){var N=Object.getPrototypeOf(E);return N===null?void 0:w(N,m,S)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(S)}},c=o(54),f=u(c),h=o(10),a=u(h);function u(w){return w&&w.__esModule?w:{default:w}}function d(w,E){if(!(w instanceof E))throw new TypeError("Cannot call a class as a function")}function p(w,E){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:w}function O(w,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);w.prototype=Object.create(E&&E.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(w,E):w.__proto__=E)}var g=(0,a.default)("quill:events"),_=["selectionchange","mousedown","mouseup","click"];_.forEach(function(w){document.addEventListener(w,function(){for(var E=arguments.length,m=Array(E),S=0;S<E;S++)m[S]=arguments[S];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(C){if(C.__quill&&C.__quill.emitter){var N;(N=C.__quill.emitter).handleDOM.apply(N,m)}})})});var y=(function(w){O(E,w);function E(){d(this,E);var m=p(this,(E.__proto__||Object.getPrototypeOf(E)).call(this));return m.listeners={},m.on("error",g.error),m}return s(E,[{key:"emit",value:function(){g.log.apply(g,arguments),l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(S){for(var C=arguments.length,N=Array(C>1?C-1:0),M=1;M<C;M++)N[M-1]=arguments[M];(this.listeners[S.type]||[]).forEach(function(j){var I=j.node,A=j.handler;(S.target===I||I.contains(S.target))&&A.apply(void 0,[S].concat(N))})}},{key:"listenDOM",value:function(S,C,N){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push({node:C,handler:N})}}]),E})(f.default);y.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"},y.sources={API:"api",SILENT:"silent",USER:"user"},r.default=y}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});function s(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function c(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,c),this.quill=f,this.options=h};l.DEFAULTS={},r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=["error","warn","log","info"],l="warn";function c(h){if(s.indexOf(h)<=s.indexOf(l)){for(var a,u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];(a=console)[h].apply(a,d)}}function f(h){return s.reduce(function(a,u){return a[u]=c.bind(console,u,h),a},{})}c.level=f.level=function(h){l=h},r.default=f}),(function(n,r,o){var s=Array.prototype.slice,l=o(52),c=o(53),f=n.exports=function(d,p,O){return O||(O={}),d===p?!0:d instanceof Date&&p instanceof Date?d.getTime()===p.getTime():!d||!p||typeof d!="object"&&typeof p!="object"?O.strict?d===p:d==p:u(d,p,O)};function h(d){return d==null}function a(d){return!(!d||typeof d!="object"||typeof d.length!="number"||typeof d.copy!="function"||typeof d.slice!="function"||d.length>0&&typeof d[0]!="number")}function u(d,p,O){var g,_;if(h(d)||h(p)||d.prototype!==p.prototype)return!1;if(c(d))return c(p)?(d=s.call(d),p=s.call(p),f(d,p,O)):!1;if(a(d)){if(!a(p)||d.length!==p.length)return!1;for(g=0;g<d.length;g++)if(d[g]!==p[g])return!1;return!0}try{var y=l(d),w=l(p)}catch{return!1}if(y.length!=w.length)return!1;for(y.sort(),w.sort(),g=y.length-1;g>=0;g--)if(y[g]!=w[g])return!1;for(g=y.length-1;g>=0;g--)if(_=y[g],!f(d[_],p[_],O))return!1;return typeof d==typeof p}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(1),l=(function(){function c(f,h,a){a===void 0&&(a={}),this.attrName=f,this.keyName=h;var u=s.Scope.TYPE&s.Scope.ATTRIBUTE;a.scope!=null?this.scope=a.scope&s.Scope.LEVEL|u:this.scope=s.Scope.ATTRIBUTE,a.whitelist!=null&&(this.whitelist=a.whitelist)}return c.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},c.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},c.prototype.canAdd=function(f,h){var a=s.query(f,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return a==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},c.prototype.remove=function(f){f.removeAttribute(this.keyName)},c.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},c})();r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var s=(function(){function M(j,I){var A=[],q=!0,R=!1,k=void 0;try{for(var F=j[Symbol.iterator](),U;!(q=(U=F.next()).done)&&(A.push(U.value),!(I&&A.length===I));q=!0);}catch(ne){R=!0,k=ne}finally{try{!q&&F.return&&F.return()}finally{if(R)throw k}}return A}return function(j,I){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function M(j,I){for(var A=0;A<I.length;A++){var q=I[A];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}return function(j,I,A){return I&&M(j.prototype,I),A&&M(j,A),j}})(),c=function M(j,I,A){j===null&&(j=Function.prototype);var q=Object.getOwnPropertyDescriptor(j,I);if(q===void 0){var R=Object.getPrototypeOf(j);return R===null?void 0:M(R,I,A)}else{if("value"in q)return q.value;var k=q.get;return k===void 0?void 0:k.call(A)}},f=o(2),h=w(f),a=o(0),u=w(a),d=o(4),p=w(d),O=o(6),g=w(O),_=o(7),y=w(_);function w(M){return M&&M.__esModule?M:{default:M}}function E(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")}function m(M,j){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:M}function S(M,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);M.prototype=Object.create(j&&j.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(M,j):M.__proto__=j)}var C=(function(M){S(j,M);function j(){return E(this,j),m(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return j})(g.default);C.blotName="code",C.tagName="CODE";var N=(function(M){S(j,M);function j(){return E(this,j),m(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return l(j,[{key:"delta",value:function(){var A=this,q=this.domNode.textContent;return q.endsWith(`
40
40
  `)&&(q=q.slice(0,-1)),q.split(`
41
- `).reduce(function(L,k){return L.insert(k).insert(`
42
- `,A.formats())},new d.default)}},{key:"format",value:function(A,q){if(!(A===this.statics.blotName&&q)){var L=this.descendant(g.default,this.length()-1),k=s(L,1),F=k[0];F?.deleteAt(F.length()-1,1),c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,A,q)}}},{key:"formatAt",value:function(A,q,L,k){if(q!==0&&!(u.default.query(L,u.default.Scope.BLOCK)==null||L===this.statics.blotName&&k===this.statics.formats(this.domNode))){var F=this.newlineIndex(A);if(!(F<0||F>=A+q)){var V=this.newlineIndex(A,!0)+1,ne=F-V+1,ue=this.isolate(V,ne),K=ue.next;ue.format(L,k),K instanceof j&&K.formatAt(0,A-V+q-ne,L,k)}}}},{key:"insertAt",value:function(A,q,L){if(L==null){var k=this.descendant(g.default,A),F=s(k,2),V=F[0],ne=F[1];V.insertAt(ne,q)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
41
+ `).reduce(function(R,k){return R.insert(k).insert(`
42
+ `,A.formats())},new h.default)}},{key:"format",value:function(A,q){if(!(A===this.statics.blotName&&q)){var R=this.descendant(y.default,this.length()-1),k=s(R,1),F=k[0];F?.deleteAt(F.length()-1,1),c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,A,q)}}},{key:"formatAt",value:function(A,q,R,k){if(q!==0&&!(u.default.query(R,u.default.Scope.BLOCK)==null||R===this.statics.blotName&&k===this.statics.formats(this.domNode))){var F=this.newlineIndex(A);if(!(F<0||F>=A+q)){var U=this.newlineIndex(A,!0)+1,ne=F-U+1,ue=this.isolate(U,ne),K=ue.next;ue.format(R,k),K instanceof j&&K.formatAt(0,A-U+q-ne,R,k)}}}},{key:"insertAt",value:function(A,q,R){if(R==null){var k=this.descendant(y.default,A),F=s(k,2),U=F[0],ne=F[1];U.insertAt(ne,q)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
43
43
  `)?A:A+1}},{key:"newlineIndex",value:function(A){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(q)return this.domNode.textContent.slice(0,A).lastIndexOf(`
44
- `);var L=this.domNode.textContent.slice(A).indexOf(`
45
- `);return L>-1?A+L:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(`
44
+ `);var R=this.domNode.textContent.slice(A).indexOf(`
45
+ `);return R>-1?A+R:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(`
46
46
  `)||this.appendChild(u.default.create("text",`
47
- `)),c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"optimize",this).call(this,A);var q=this.next;q!=null&&q.prev===this&&q.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===q.statics.formats(q.domNode)&&(q.optimize(A),q.moveChildren(this),q.remove())}},{key:"replace",value:function(A){c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(q){var L=u.default.find(q);L==null?q.parentNode.removeChild(q):L instanceof u.default.Embed?L.remove():L.unwrap()})}}],[{key:"create",value:function(A){var q=c(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,A);return q.setAttribute("spellcheck",!1),q}},{key:"formats",value:function(){return!0}}]),j})(p.default);N.blotName="code-block",N.tagName="PRE",N.TAB=" ",r.Code=C,r.default=N}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},l=(function(){function K(W,B){var Q=[],re=!0,Z=!1,X=void 0;try{for(var $=W[Symbol.iterator](),ee;!(re=(ee=$.next()).done)&&(Q.push(ee.value),!(B&&Q.length===B));re=!0);}catch(le){Z=!0,X=le}finally{try{!re&&$.return&&$.return()}finally{if(Z)throw X}}return Q}return function(W,B){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return K(W,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function K(W,B){for(var Q=0;Q<B.length;Q++){var re=B[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(W,re.key,re)}}return function(W,B,Q){return B&&K(W.prototype,B),Q&&K(W,Q),W}})(),f=o(2),d=q(f),a=o(20),u=q(a),h=o(0),p=q(h),O=o(13),m=q(O),_=o(24),g=q(_),w=o(4),E=q(w),y=o(16),x=q(y),C=o(21),N=q(C),I=o(11),j=q(I),M=o(3),A=q(M);function q(K){return K&&K.__esModule?K:{default:K}}function L(K,W,B){return W in K?Object.defineProperty(K,W,{value:B,enumerable:!0,configurable:!0,writable:!0}):K[W]=B,K}function k(K,W){if(!(K instanceof W))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,V=(function(){function K(W){k(this,K),this.scroll=W,this.delta=this.getDelta()}return c(K,[{key:"applyDelta",value:function(B){var Q=this,re=!1;this.scroll.update();var Z=this.scroll.length();return this.scroll.batchStart(),B=ue(B),B.reduce(function(X,$){var ee=$.retain||$.delete||$.insert.length||1,le=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var de=$.insert;de.endsWith(`
47
+ `)),c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"optimize",this).call(this,A);var q=this.next;q!=null&&q.prev===this&&q.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===q.statics.formats(q.domNode)&&(q.optimize(A),q.moveChildren(this),q.remove())}},{key:"replace",value:function(A){c(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(q){var R=u.default.find(q);R==null?q.parentNode.removeChild(q):R instanceof u.default.Embed?R.remove():R.unwrap()})}}],[{key:"create",value:function(A){var q=c(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,A);return q.setAttribute("spellcheck",!1),q}},{key:"formats",value:function(){return!0}}]),j})(p.default);N.blotName="code-block",N.tagName="PRE",N.TAB=" ",r.Code=C,r.default=N}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},l=(function(){function K(W,z){var Q=[],re=!0,Z=!1,X=void 0;try{for(var H=W[Symbol.iterator](),ee;!(re=(ee=H.next()).done)&&(Q.push(ee.value),!(z&&Q.length===z));re=!0);}catch(le){Z=!0,X=le}finally{try{!re&&H.return&&H.return()}finally{if(Z)throw X}}return Q}return function(W,z){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return K(W,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function K(W,z){for(var Q=0;Q<z.length;Q++){var re=z[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(W,re.key,re)}}return function(W,z,Q){return z&&K(W.prototype,z),Q&&K(W,Q),W}})(),f=o(2),h=q(f),a=o(20),u=q(a),d=o(0),p=q(d),O=o(13),g=q(O),_=o(24),y=q(_),w=o(4),E=q(w),m=o(16),S=q(m),C=o(21),N=q(C),M=o(11),j=q(M),I=o(3),A=q(I);function q(K){return K&&K.__esModule?K:{default:K}}function R(K,W,z){return W in K?Object.defineProperty(K,W,{value:z,enumerable:!0,configurable:!0,writable:!0}):K[W]=z,K}function k(K,W){if(!(K instanceof W))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,U=(function(){function K(W){k(this,K),this.scroll=W,this.delta=this.getDelta()}return c(K,[{key:"applyDelta",value:function(z){var Q=this,re=!1;this.scroll.update();var Z=this.scroll.length();return this.scroll.batchStart(),z=ue(z),z.reduce(function(X,H){var ee=H.retain||H.delete||H.insert.length||1,le=H.attributes||{};if(H.insert!=null){if(typeof H.insert=="string"){var de=H.insert;de.endsWith(`
48
48
  `)&&re&&(re=!1,de=de.slice(0,-1)),X>=Z&&!de.endsWith(`
49
- `)&&(re=!0),Q.scroll.insertAt(X,de);var pe=Q.scroll.line(X),Ee=l(pe,2),Ie=Ee[0],Pe=Ee[1],Ae=(0,A.default)({},(0,w.bubbleFormats)(Ie));if(Ie instanceof E.default){var xe=Ie.descendant(p.default.Leaf,Pe),Ge=l(xe,1),Oe=Ge[0];Ae=(0,A.default)(Ae,(0,w.bubbleFormats)(Oe))}le=u.default.attributes.diff(Ae,le)||{}}else if(s($.insert)==="object"){var ge=Object.keys($.insert)[0];if(ge==null)return X;Q.scroll.insertAt(X,ge,$.insert[ge])}Z+=ee}return Object.keys(le).forEach(function(me){Q.scroll.formatAt(X,ee,me,le[me])}),X+ee},0),B.reduce(function(X,$){return typeof $.delete=="number"?(Q.scroll.deleteAt(X,$.delete),X):X+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(B)}},{key:"deleteText",value:function(B,Q){return this.scroll.deleteAt(B,Q),this.update(new d.default().retain(B).delete(Q))}},{key:"formatLine",value:function(B,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Z).forEach(function(X){if(!(re.scroll.whitelist!=null&&!re.scroll.whitelist[X])){var $=re.scroll.lines(B,Math.max(Q,1)),ee=Q;$.forEach(function(le){var de=le.length();if(!(le instanceof m.default))le.format(X,Z[X]);else{var pe=B-le.offset(re.scroll),Ee=le.newlineIndex(pe+ee)-pe+1;le.formatAt(pe,Ee,X,Z[X])}ee-=de})}}),this.scroll.optimize(),this.update(new d.default().retain(B).retain(Q,(0,N.default)(Z)))}},{key:"formatText",value:function(B,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Z).forEach(function(X){re.scroll.formatAt(B,Q,X,Z[X])}),this.update(new d.default().retain(B).retain(Q,(0,N.default)(Z)))}},{key:"getContents",value:function(B,Q){return this.delta.slice(B,B+Q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(B,Q){return B.concat(Q.delta())},new d.default)}},{key:"getFormat",value:function(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=[],Z=[];Q===0?this.scroll.path(B).forEach(function($){var ee=l($,1),le=ee[0];le instanceof E.default?re.push(le):le instanceof p.default.Leaf&&Z.push(le)}):(re=this.scroll.lines(B,Q),Z=this.scroll.descendants(p.default.Leaf,B,Q));var X=[re,Z].map(function($){if($.length===0)return{};for(var ee=(0,w.bubbleFormats)($.shift());Object.keys(ee).length>0;){var le=$.shift();if(le==null)return ee;ee=ne((0,w.bubbleFormats)(le),ee)}return ee});return A.default.apply(A.default,X)}},{key:"getText",value:function(B,Q){return this.getContents(B,Q).filter(function(re){return typeof re.insert=="string"}).map(function(re){return re.insert}).join("")}},{key:"insertEmbed",value:function(B,Q,re){return this.scroll.insertAt(B,Q,re),this.update(new d.default().retain(B).insert(L({},Q,re)))}},{key:"insertText",value:function(B,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Q=Q.replace(/\r\n/g,`
49
+ `)&&(re=!0),Q.scroll.insertAt(X,de);var pe=Q.scroll.line(X),Ee=l(pe,2),Ie=Ee[0],Pe=Ee[1],Ae=(0,A.default)({},(0,w.bubbleFormats)(Ie));if(Ie instanceof E.default){var Se=Ie.descendant(p.default.Leaf,Pe),Ge=l(Se,1),Oe=Ge[0];Ae=(0,A.default)(Ae,(0,w.bubbleFormats)(Oe))}le=u.default.attributes.diff(Ae,le)||{}}else if(s(H.insert)==="object"){var ge=Object.keys(H.insert)[0];if(ge==null)return X;Q.scroll.insertAt(X,ge,H.insert[ge])}Z+=ee}return Object.keys(le).forEach(function(me){Q.scroll.formatAt(X,ee,me,le[me])}),X+ee},0),z.reduce(function(X,H){return typeof H.delete=="number"?(Q.scroll.deleteAt(X,H.delete),X):X+(H.retain||H.insert.length||1)},0),this.scroll.batchEnd(),this.update(z)}},{key:"deleteText",value:function(z,Q){return this.scroll.deleteAt(z,Q),this.update(new h.default().retain(z).delete(Q))}},{key:"formatLine",value:function(z,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Z).forEach(function(X){if(!(re.scroll.whitelist!=null&&!re.scroll.whitelist[X])){var H=re.scroll.lines(z,Math.max(Q,1)),ee=Q;H.forEach(function(le){var de=le.length();if(!(le instanceof g.default))le.format(X,Z[X]);else{var pe=z-le.offset(re.scroll),Ee=le.newlineIndex(pe+ee)-pe+1;le.formatAt(pe,Ee,X,Z[X])}ee-=de})}}),this.scroll.optimize(),this.update(new h.default().retain(z).retain(Q,(0,N.default)(Z)))}},{key:"formatText",value:function(z,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Z).forEach(function(X){re.scroll.formatAt(z,Q,X,Z[X])}),this.update(new h.default().retain(z).retain(Q,(0,N.default)(Z)))}},{key:"getContents",value:function(z,Q){return this.delta.slice(z,z+Q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(z,Q){return z.concat(Q.delta())},new h.default)}},{key:"getFormat",value:function(z){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=[],Z=[];Q===0?this.scroll.path(z).forEach(function(H){var ee=l(H,1),le=ee[0];le instanceof E.default?re.push(le):le instanceof p.default.Leaf&&Z.push(le)}):(re=this.scroll.lines(z,Q),Z=this.scroll.descendants(p.default.Leaf,z,Q));var X=[re,Z].map(function(H){if(H.length===0)return{};for(var ee=(0,w.bubbleFormats)(H.shift());Object.keys(ee).length>0;){var le=H.shift();if(le==null)return ee;ee=ne((0,w.bubbleFormats)(le),ee)}return ee});return A.default.apply(A.default,X)}},{key:"getText",value:function(z,Q){return this.getContents(z,Q).filter(function(re){return typeof re.insert=="string"}).map(function(re){return re.insert}).join("")}},{key:"insertEmbed",value:function(z,Q,re){return this.scroll.insertAt(z,Q,re),this.update(new h.default().retain(z).insert(R({},Q,re)))}},{key:"insertText",value:function(z,Q){var re=this,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Q=Q.replace(/\r\n/g,`
50
50
  `).replace(/\r/g,`
51
- `),this.scroll.insertAt(B,Q),Object.keys(Z).forEach(function(X){re.scroll.formatAt(B,Q.length,X,Z[X])}),this.update(new d.default().retain(B).insert(Q,(0,N.default)(Z)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var B=this.scroll.children.head;return B.statics.blotName!==E.default.blotName||B.children.length>1?!1:B.children.head instanceof x.default}},{key:"removeFormat",value:function(B,Q){var re=this.getText(B,Q),Z=this.scroll.line(B+Q),X=l(Z,2),$=X[0],ee=X[1],le=0,de=new d.default;$!=null&&($ instanceof m.default?le=$.newlineIndex(ee)-ee+1:le=$.length()-ee,de=$.delta().slice(ee,ee+le-1).insert(`
52
- `));var pe=this.getContents(B,Q+le),Ee=pe.diff(new d.default().insert(re).concat(de)),Ie=new d.default().retain(B).concat(Ee);return this.applyDelta(Ie)}},{key:"update",value:function(B){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Z=this.delta;if(Q.length===1&&Q[0].type==="characterData"&&Q[0].target.data.match(F)&&p.default.find(Q[0].target)){var X=p.default.find(Q[0].target),$=(0,w.bubbleFormats)(X),ee=X.offset(this.scroll),le=Q[0].oldValue.replace(g.default.CONTENTS,""),de=new d.default().insert(le),pe=new d.default().insert(X.value()),Ee=new d.default().retain(ee).concat(de.diff(pe,re));B=Ee.reduce(function(Ie,Pe){return Pe.insert?Ie.insert(Pe.insert,$):Ie.push(Pe)},new d.default),this.delta=Z.compose(B)}else this.delta=this.getDelta(),(!B||!(0,j.default)(Z.compose(B),this.delta))&&(B=Z.diff(this.delta,re));return B}}]),K})();function ne(K,W){return Object.keys(W).reduce(function(B,Q){return K[Q]==null||(W[Q]===K[Q]?B[Q]=W[Q]:Array.isArray(W[Q])?W[Q].indexOf(K[Q])<0&&(B[Q]=W[Q].concat([K[Q]])):B[Q]=[W[Q],K[Q]]),B},{})}function ue(K){return K.reduce(function(W,B){if(B.insert===1){var Q=(0,N.default)(B.attributes);return delete Q.image,W.insert({image:B.attributes.image},Q)}if(B.attributes!=null&&(B.attributes.list===!0||B.attributes.bullet===!0)&&(B=(0,N.default)(B),B.attributes.list?B.attributes.list="ordered":(B.attributes.list="bullet",delete B.attributes.bullet)),typeof B.insert=="string"){var re=B.insert.replace(/\r\n/g,`
51
+ `),this.scroll.insertAt(z,Q),Object.keys(Z).forEach(function(X){re.scroll.formatAt(z,Q.length,X,Z[X])}),this.update(new h.default().retain(z).insert(Q,(0,N.default)(Z)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var z=this.scroll.children.head;return z.statics.blotName!==E.default.blotName||z.children.length>1?!1:z.children.head instanceof S.default}},{key:"removeFormat",value:function(z,Q){var re=this.getText(z,Q),Z=this.scroll.line(z+Q),X=l(Z,2),H=X[0],ee=X[1],le=0,de=new h.default;H!=null&&(H instanceof g.default?le=H.newlineIndex(ee)-ee+1:le=H.length()-ee,de=H.delta().slice(ee,ee+le-1).insert(`
52
+ `));var pe=this.getContents(z,Q+le),Ee=pe.diff(new h.default().insert(re).concat(de)),Ie=new h.default().retain(z).concat(Ee);return this.applyDelta(Ie)}},{key:"update",value:function(z){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Z=this.delta;if(Q.length===1&&Q[0].type==="characterData"&&Q[0].target.data.match(F)&&p.default.find(Q[0].target)){var X=p.default.find(Q[0].target),H=(0,w.bubbleFormats)(X),ee=X.offset(this.scroll),le=Q[0].oldValue.replace(y.default.CONTENTS,""),de=new h.default().insert(le),pe=new h.default().insert(X.value()),Ee=new h.default().retain(ee).concat(de.diff(pe,re));z=Ee.reduce(function(Ie,Pe){return Pe.insert?Ie.insert(Pe.insert,H):Ie.push(Pe)},new h.default),this.delta=Z.compose(z)}else this.delta=this.getDelta(),(!z||!(0,j.default)(Z.compose(z),this.delta))&&(z=Z.diff(this.delta,re));return z}}]),K})();function ne(K,W){return Object.keys(W).reduce(function(z,Q){return K[Q]==null||(W[Q]===K[Q]?z[Q]=W[Q]:Array.isArray(W[Q])?W[Q].indexOf(K[Q])<0&&(z[Q]=W[Q].concat([K[Q]])):z[Q]=[W[Q],K[Q]]),z},{})}function ue(K){return K.reduce(function(W,z){if(z.insert===1){var Q=(0,N.default)(z.attributes);return delete Q.image,W.insert({image:z.attributes.image},Q)}if(z.attributes!=null&&(z.attributes.list===!0||z.attributes.bullet===!0)&&(z=(0,N.default)(z),z.attributes.list?z.attributes.list="ordered":(z.attributes.list="bullet",delete z.attributes.bullet)),typeof z.insert=="string"){var re=z.insert.replace(/\r\n/g,`
53
53
  `).replace(/\r/g,`
54
- `);return W.insert(re,B.attributes)}return W.push(B)},new d.default)}r.default=V}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var s=(function(){function I(j,M){var A=[],q=!0,L=!1,k=void 0;try{for(var F=j[Symbol.iterator](),V;!(q=(V=F.next()).done)&&(A.push(V.value),!(M&&A.length===M));q=!0);}catch(ne){L=!0,k=ne}finally{try{!q&&F.return&&F.return()}finally{if(L)throw k}}return A}return function(j,M){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return I(j,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function I(j,M){for(var A=0;A<M.length;A++){var q=M[A];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}return function(j,M,A){return M&&I(j.prototype,M),A&&I(j,A),j}})(),c=o(0),f=g(c),d=o(21),a=g(d),u=o(11),h=g(u),p=o(8),O=g(p),m=o(10),_=g(m);function g(I){return I&&I.__esModule?I:{default:I}}function w(I){if(Array.isArray(I)){for(var j=0,M=Array(I.length);j<I.length;j++)M[j]=I[j];return M}else return Array.from(I)}function E(I,j){if(!(I instanceof j))throw new TypeError("Cannot call a class as a function")}var y=(0,_.default)("quill:selection"),x=function I(j){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;E(this,I),this.index=j,this.length=M},C=(function(){function I(j,M){var A=this;E(this,I),this.emitter=M,this.scroll=j,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.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,O.default.sources.USER),1)}),this.emitter.on(O.default.events.EDITOR_CHANGE,function(q,L){q===O.default.events.TEXT_CHANGE&&L.length()>0&&A.update(O.default.sources.SILENT)}),this.emitter.on(O.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var q=A.getNativeRange();q!=null&&q.start.node!==A.cursor.textNode&&A.emitter.once(O.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(q.start.node,q.start.offset,q.end.node,q.end.offset)}catch{}})}}),this.emitter.on(O.default.events.SCROLL_OPTIMIZE,function(q,L){if(L.range){var k=L.range,F=k.startNode,V=k.startOffset,ne=k.endNode,ue=k.endOffset;A.setNativeRange(F,V,ne,ue)}}),this.update(O.default.sources.SILENT)}return l(I,[{key:"handleComposition",value:function(){var M=this;this.root.addEventListener("compositionstart",function(){M.composing=!0}),this.root.addEventListener("compositionend",function(){if(M.composing=!1,M.cursor.parent){var A=M.cursor.restore();if(!A)return;setTimeout(function(){M.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var M=this;this.emitter.listenDOM("mousedown",document.body,function(){M.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){M.mouseDown=!1,M.update(O.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(M,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[M])){this.scroll.update();var q=this.getNativeRange();if(!(q==null||!q.native.collapsed||f.default.query(M,f.default.Scope.BLOCK))){if(q.start.node!==this.cursor.textNode){var L=f.default.find(q.start.node,!1);if(L==null)return;if(L instanceof f.default.Leaf){var k=L.split(q.start.offset);L.parent.insertBefore(this.cursor,k)}else L.insertBefore(this.cursor,q.start.node);this.cursor.attach()}this.cursor.format(M,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(M){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=this.scroll.length();M=Math.min(M,q-1),A=Math.min(M+A,q-1)-M;var L=void 0,k=this.scroll.leaf(M),F=s(k,2),V=F[0],ne=F[1];if(V==null)return null;var ue=V.position(ne,!0),K=s(ue,2);L=K[0],ne=K[1];var W=document.createRange();if(A>0){W.setStart(L,ne);var B=this.scroll.leaf(M+A),Q=s(B,2);if(V=Q[0],ne=Q[1],V==null)return null;var re=V.position(ne,!0),Z=s(re,2);return L=Z[0],ne=Z[1],W.setEnd(L,ne),W.getBoundingClientRect()}else{var X="left",$=void 0;return L instanceof Text?(ne<L.data.length?(W.setStart(L,ne),W.setEnd(L,ne+1)):(W.setStart(L,ne-1),W.setEnd(L,ne),X="right"),$=W.getBoundingClientRect()):($=V.domNode.getBoundingClientRect(),ne>0&&(X="right")),{bottom:$.top+$.height,height:$.height,left:$[X],right:$[X],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var M=document.getSelection();if(M==null||M.rangeCount<=0)return null;var A=M.getRangeAt(0);if(A==null)return null;var q=this.normalizeNative(A);return y.info("getNativeRange",q),q}},{key:"getRange",value:function(){var M=this.getNativeRange();if(M==null)return[null,null];var A=this.normalizedToRange(M);return[A,M]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(M){var A=this,q=[[M.start.node,M.start.offset]];M.native.collapsed||q.push([M.end.node,M.end.offset]);var L=q.map(function(V){var ne=s(V,2),ue=ne[0],K=ne[1],W=f.default.find(ue,!0),B=W.offset(A.scroll);return K===0?B:W instanceof f.default.Container?B+W.length():B+W.index(ue,K)}),k=Math.min(Math.max.apply(Math,w(L)),this.scroll.length()-1),F=Math.min.apply(Math,[k].concat(w(L)));return new x(F,k-F)}},{key:"normalizeNative",value:function(M){if(!N(this.root,M.startContainer)||!M.collapsed&&!N(this.root,M.endContainer))return null;var A={start:{node:M.startContainer,offset:M.startOffset},end:{node:M.endContainer,offset:M.endOffset},native:M};return[A.start,A.end].forEach(function(q){for(var L=q.node,k=q.offset;!(L instanceof Text)&&L.childNodes.length>0;)if(L.childNodes.length>k)L=L.childNodes[k],k=0;else if(L.childNodes.length===k)L=L.lastChild,k=L instanceof Text?L.data.length:L.childNodes.length+1;else break;q.node=L,q.offset=k}),A}},{key:"rangeToNative",value:function(M){var A=this,q=M.collapsed?[M.index]:[M.index,M.index+M.length],L=[],k=this.scroll.length();return q.forEach(function(F,V){F=Math.min(k-1,F);var ne=void 0,ue=A.scroll.leaf(F),K=s(ue,2),W=K[0],B=K[1],Q=W.position(B,V!==0),re=s(Q,2);ne=re[0],B=re[1],L.push(ne,B)}),L.length<2&&(L=L.concat(L)),L}},{key:"scrollIntoView",value:function(M){var A=this.lastRange;if(A!=null){var q=this.getBounds(A.index,A.length);if(q!=null){var L=this.scroll.length()-1,k=this.scroll.line(Math.min(A.index,L)),F=s(k,1),V=F[0],ne=V;if(A.length>0){var ue=this.scroll.line(Math.min(A.index+A.length,L)),K=s(ue,1);ne=K[0]}if(!(V==null||ne==null)){var W=M.getBoundingClientRect();q.top<W.top?M.scrollTop-=W.top-q.top:q.bottom>W.bottom&&(M.scrollTop+=q.bottom-W.bottom)}}}}},{key:"setNativeRange",value:function(M,A){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",M,A,q,L),!(M!=null&&(this.root.parentNode==null||M.parentNode==null||q.parentNode==null))){var F=document.getSelection();if(F!=null)if(M!=null){this.hasFocus()||this.root.focus();var V=(this.getNativeRange()||{}).native;if(V==null||k||M!==V.startContainer||A!==V.startOffset||q!==V.endContainer||L!==V.endOffset){M.tagName=="BR"&&(A=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode),q.tagName=="BR"&&(L=[].indexOf.call(q.parentNode.childNodes,q),q=q.parentNode);var ne=document.createRange();ne.setStart(M,A),ne.setEnd(q,L),F.removeAllRanges(),F.addRange(ne)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(M){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.default.sources.API;if(typeof A=="string"&&(q=A,A=!1),y.info("setRange",M),M!=null){var L=this.rangeToNative(M);this.setNativeRange.apply(this,w(L).concat([A]))}else this.setNativeRange(null);this.update(q)}},{key:"update",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O.default.sources.USER,A=this.lastRange,q=this.getRange(),L=s(q,2),k=L[0],F=L[1];if(this.lastRange=k,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,h.default)(A,this.lastRange)){var V;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var ne=[O.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(A),M];if((V=this.emitter).emit.apply(V,[O.default.events.EDITOR_CHANGE].concat(ne)),M!==O.default.sources.SILENT){var ue;(ue=this.emitter).emit.apply(ue,ne)}}}}]),I})();function N(I,j){try{j.parentNode}catch{return!1}return j instanceof Text&&(j=j.parentNode),I.contains(j)}r.Range=x,r.default=C}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(m,_){for(var g=0;g<_.length;g++){var w=_[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,_,g){return _&&O(m.prototype,_),g&&O(m,g),m}})(),l=function O(m,_,g){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,_);if(w===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:O(E,_,g)}else{if("value"in w)return w.value;var y=w.get;return y===void 0?void 0:y.call(g)}},c=o(0),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(){return a(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"insertInto",value:function(g,w){g.children.length===0?l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"insertInto",this).call(this,g,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),m})(f.default.Embed);p.blotName="break",p.tagName="BR",r.default=p}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var O in p)p.hasOwnProperty(O)&&(h[O]=p[O])};return function(h,p){u(h,p);function O(){this.constructor=h}h.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(44),c=o(30),f=o(1),d=(function(u){s(h,u);function h(p){var O=u.call(this,p)||this;return O.build(),O}return h.prototype.appendChild=function(p){this.insertBefore(p)},h.prototype.attach=function(){u.prototype.attach.call(this),this.children.forEach(function(p){p.attach()})},h.prototype.build=function(){var p=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(O){try{var m=a(O);p.insertBefore(m,p.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},h.prototype.deleteAt=function(p,O){if(p===0&&O===this.length())return this.remove();this.children.forEachAt(p,O,function(m,_,g){m.deleteAt(_,g)})},h.prototype.descendant=function(p,O){var m=this.children.find(O),_=m[0],g=m[1];return p.blotName==null&&p(_)||p.blotName!=null&&_ instanceof p?[_,g]:_ instanceof h?_.descendant(p,g):[null,-1]},h.prototype.descendants=function(p,O,m){O===void 0&&(O=0),m===void 0&&(m=Number.MAX_VALUE);var _=[],g=m;return this.children.forEachAt(O,m,function(w,E,y){(p.blotName==null&&p(w)||p.blotName!=null&&w instanceof p)&&_.push(w),w instanceof h&&(_=_.concat(w.descendants(p,E,g))),g-=y}),_},h.prototype.detach=function(){this.children.forEach(function(p){p.detach()}),u.prototype.detach.call(this)},h.prototype.formatAt=function(p,O,m,_){this.children.forEachAt(p,O,function(g,w,E){g.formatAt(w,E,m,_)})},h.prototype.insertAt=function(p,O,m){var _=this.children.find(p),g=_[0],w=_[1];if(g)g.insertAt(w,O,m);else{var E=m==null?f.create("text",O):f.create(O,m);this.appendChild(E)}},h.prototype.insertBefore=function(p,O){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(m){return p instanceof m}))throw new f.ParchmentError("Cannot insert "+p.statics.blotName+" into "+this.statics.blotName);p.insertInto(this,O)},h.prototype.length=function(){return this.children.reduce(function(p,O){return p+O.length()},0)},h.prototype.moveChildren=function(p,O){this.children.forEach(function(m){p.insertBefore(m,O)})},h.prototype.optimize=function(p){if(u.prototype.optimize.call(this,p),this.children.length===0)if(this.statics.defaultChild!=null){var O=f.create(this.statics.defaultChild);this.appendChild(O),O.optimize(p)}else this.remove()},h.prototype.path=function(p,O){O===void 0&&(O=!1);var m=this.children.find(p,O),_=m[0],g=m[1],w=[[this,p]];return _ instanceof h?w.concat(_.path(g,O)):(_!=null&&w.push([_,g]),w)},h.prototype.removeChild=function(p){this.children.remove(p)},h.prototype.replace=function(p){p instanceof h&&p.moveChildren(this),u.prototype.replace.call(this,p)},h.prototype.split=function(p,O){if(O===void 0&&(O=!1),!O){if(p===0)return this;if(p===this.length())return this.next}var m=this.clone();return this.parent.insertBefore(m,this.next),this.children.forEachAt(p,this.length(),function(_,g,w){_=_.split(g,O),m.appendChild(_)}),m},h.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},h.prototype.update=function(p,O){var m=this,_=[],g=[];p.forEach(function(w){w.target===m.domNode&&w.type==="childList"&&(_.push.apply(_,w.addedNodes),g.push.apply(g,w.removedNodes))}),g.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var E=f.find(w);E!=null&&(E.domNode.parentNode==null||E.domNode.parentNode===m.domNode)&&E.detach()}}),_.filter(function(w){return w.parentNode==m.domNode}).sort(function(w,E){return w===E?0:w.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var E=null;w.nextSibling!=null&&(E=f.find(w.nextSibling));var y=a(w);(y.next!=E||y.next==null)&&(y.parent!=null&&y.parent.removeChild(m),m.insertBefore(y,E||void 0))})},h})(c.default);function a(u){var h=f.find(u);if(h==null)try{h=f.create(u)}catch{h=f.create(f.Scope.INLINE),[].slice.call(u.childNodes).forEach(function(O){h.domNode.appendChild(O)}),u.parentNode&&u.parentNode.replaceChild(h.domNode,u),h.attach()}return h}r.default=d}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var O in p)p.hasOwnProperty(O)&&(h[O]=p[O])};return function(h,p){u(h,p);function O(){this.constructor=h}h.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12),c=o(31),f=o(17),d=o(1),a=(function(u){s(h,u);function h(p){var O=u.call(this,p)||this;return O.attributes=new c.default(O.domNode),O}return h.formats=function(p){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return p.tagName.toLowerCase()},h.prototype.format=function(p,O){var m=d.query(p);m instanceof l.default?this.attributes.attribute(m,O):O&&m!=null&&(p!==this.statics.blotName||this.formats()[p]!==O)&&this.replaceWith(p,O)},h.prototype.formats=function(){var p=this.attributes.values(),O=this.statics.formats(this.domNode);return O!=null&&(p[this.statics.blotName]=O),p},h.prototype.replaceWith=function(p,O){var m=u.prototype.replaceWith.call(this,p,O);return this.attributes.copy(m),m},h.prototype.update=function(p,O){var m=this;u.prototype.update.call(this,p,O),p.some(function(_){return _.target===m.domNode&&_.type==="attributes"})&&this.attributes.build()},h.prototype.wrap=function(p,O){var m=u.prototype.wrap.call(this,p,O);return m instanceof h&&m.statics.scope===this.statics.scope&&this.attributes.move(m),m},h})(f.default);r.default=a}),(function(n,r,o){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])};return function(a,u){d(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(30),c=o(1),f=(function(d){s(a,d);function a(){return d!==null&&d.apply(this,arguments)||this}return a.value=function(u){return!0},a.prototype.index=function(u,h){return this.domNode===u||this.domNode.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(h,1):-1},a.prototype.position=function(u,h){var p=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return u>0&&(p+=1),[this.parent.domNode,p]},a.prototype.value=function(){var u;return u={},u[this.statics.blotName]=this.statics.value(this.domNode)||!0,u},a.scope=c.Scope.INLINE_BLOT,a})(l.default);r.default=f}),(function(n,r,o){var s=o(11),l=o(3),c={attributes:{compose:function(d,a,u){typeof d!="object"&&(d={}),typeof a!="object"&&(a={});var h=l(!0,{},a);u||(h=Object.keys(h).reduce(function(O,m){return h[m]!=null&&(O[m]=h[m]),O},{}));for(var p in d)d[p]!==void 0&&a[p]===void 0&&(h[p]=d[p]);return Object.keys(h).length>0?h:void 0},diff:function(d,a){typeof d!="object"&&(d={}),typeof a!="object"&&(a={});var u=Object.keys(d).concat(Object.keys(a)).reduce(function(h,p){return s(d[p],a[p])||(h[p]=a[p]===void 0?null:a[p]),h},{});return Object.keys(u).length>0?u:void 0},transform:function(d,a,u){if(typeof d!="object")return a;if(typeof a=="object"){if(!u)return a;var h=Object.keys(a).reduce(function(p,O){return d[O]===void 0&&(p[O]=a[O]),p},{});return Object.keys(h).length>0?h:void 0}}},iterator:function(d){return new f(d)},length:function(d){return typeof d.delete=="number"?d.delete:typeof d.retain=="number"?d.retain:typeof d.insert=="string"?d.insert.length:1}};function f(d){this.ops=d,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(d){d||(d=1/0);var a=this.ops[this.index];if(a){var u=this.offset,h=c.length(a);if(d>=h-u?(d=h-u,this.index+=1,this.offset=0):this.offset+=d,typeof a.delete=="number")return{delete:d};var p={};return a.attributes&&(p.attributes=a.attributes),typeof a.retain=="number"?p.retain=d:typeof a.insert=="string"?p.insert=a.insert.substr(u,d):p.insert=a.insert,p}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},f.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"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var d=this.offset,a=this.index,u=this.next(),h=this.ops.slice(this.index);return this.offset=d,this.index=a,[u].concat(h)}else return[]},n.exports=c}),(function(n,r){var o=(function(){function s(m,_){return _!=null&&m instanceof _}var l;try{l=Map}catch{l=function(){}}var c;try{c=Set}catch{c=function(){}}var f;try{f=Promise}catch{f=function(){}}function d(m,_,g,w,E){typeof _=="object"&&(g=_.depth,w=_.prototype,E=_.includeNonEnumerable,_=_.circular);var y=[],x=[],C=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof g>"u"&&(g=1/0);function N(I,j){if(I===null)return null;if(j===0)return I;var M,A;if(typeof I!="object")return I;if(s(I,l))M=new l;else if(s(I,c))M=new c;else if(s(I,f))M=new f(function(W,B){I.then(function(Q){W(N(Q,j-1))},function(Q){B(N(Q,j-1))})});else if(d.__isArray(I))M=[];else if(d.__isRegExp(I))M=new RegExp(I.source,O(I)),I.lastIndex&&(M.lastIndex=I.lastIndex);else if(d.__isDate(I))M=new Date(I.getTime());else{if(C&&Buffer.isBuffer(I))return Buffer.allocUnsafe?M=Buffer.allocUnsafe(I.length):M=new Buffer(I.length),I.copy(M),M;s(I,Error)?M=Object.create(I):typeof w>"u"?(A=Object.getPrototypeOf(I),M=Object.create(A)):(M=Object.create(w),A=w)}if(_){var q=y.indexOf(I);if(q!=-1)return x[q];y.push(I),x.push(M)}s(I,l)&&I.forEach(function(W,B){var Q=N(B,j-1),re=N(W,j-1);M.set(Q,re)}),s(I,c)&&I.forEach(function(W){var B=N(W,j-1);M.add(B)});for(var L in I){var k;A&&(k=Object.getOwnPropertyDescriptor(A,L)),!(k&&k.set==null)&&(M[L]=N(I[L],j-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(I),L=0;L<F.length;L++){var V=F[L],ne=Object.getOwnPropertyDescriptor(I,V);ne&&!ne.enumerable&&!E||(M[V]=N(I[V],j-1),ne.enumerable||Object.defineProperty(M,V,{enumerable:!1}))}if(E)for(var ue=Object.getOwnPropertyNames(I),L=0;L<ue.length;L++){var K=ue[L],ne=Object.getOwnPropertyDescriptor(I,K);ne&&ne.enumerable||(M[K]=N(I[K],j-1),Object.defineProperty(M,K,{enumerable:!1}))}return M}return N(m,g)}d.clonePrototype=function(_){if(_===null)return null;var g=function(){};return g.prototype=_,new g};function a(m){return Object.prototype.toString.call(m)}d.__objToStr=a;function u(m){return typeof m=="object"&&a(m)==="[object Date]"}d.__isDate=u;function h(m){return typeof m=="object"&&a(m)==="[object Array]"}d.__isArray=h;function p(m){return typeof m=="object"&&a(m)==="[object RegExp]"}d.__isRegExp=p;function O(m){var _="";return m.global&&(_+="g"),m.ignoreCase&&(_+="i"),m.multiline&&(_+="m"),_}return d.__getRegExpFlags=O,d})();typeof n=="object"&&n.exports&&(n.exports=o)}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function M(A,q){var L=[],k=!0,F=!1,V=void 0;try{for(var ne=A[Symbol.iterator](),ue;!(k=(ue=ne.next()).done)&&(L.push(ue.value),!(q&&L.length===q));k=!0);}catch(K){F=!0,V=K}finally{try{!k&&ne.return&&ne.return()}finally{if(F)throw V}}return L}return function(A,q){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return M(A,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function M(A,q){for(var L=0;L<q.length;L++){var k=q[L];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(A,k.key,k)}}return function(A,q,L){return q&&M(A.prototype,q),L&&M(A,L),A}})(),c=function M(A,q,L){A===null&&(A=Function.prototype);var k=Object.getOwnPropertyDescriptor(A,q);if(k===void 0){var F=Object.getPrototypeOf(A);return F===null?void 0:M(F,q,L)}else{if("value"in k)return k.value;var V=k.get;return V===void 0?void 0:V.call(L)}},f=o(0),d=y(f),a=o(8),u=y(a),h=o(4),p=y(h),O=o(16),m=y(O),_=o(13),g=y(_),w=o(25),E=y(w);function y(M){return M&&M.__esModule?M:{default:M}}function x(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}function C(M,A){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:M}function N(M,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);M.prototype=Object.create(A&&A.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(M,A):M.__proto__=A)}function I(M){return M instanceof p.default||M instanceof h.BlockEmbed}var j=(function(M){N(A,M);function A(q,L){x(this,A);var k=C(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q));return k.emitter=L.emitter,Array.isArray(L.whitelist)&&(k.whitelist=L.whitelist.reduce(function(F,V){return F[V]=!0,F},{})),k.domNode.addEventListener("DOMNodeInserted",function(){}),k.optimize(),k.enable(),k}return l(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(L,k){var F=this.line(L),V=s(F,2),ne=V[0],ue=V[1],K=this.line(L+k),W=s(K,1),B=W[0];if(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,L,k),B!=null&&ne!==B&&ue>0){if(ne instanceof h.BlockEmbed||B instanceof h.BlockEmbed){this.optimize();return}if(ne instanceof g.default){var Q=ne.newlineIndex(ne.length(),!0);if(Q>-1&&(ne=ne.split(Q+1),ne===B)){this.optimize();return}}else if(B instanceof g.default){var re=B.newlineIndex(0);re>-1&&B.split(re+1)}var Z=B.children.head instanceof m.default?null:B.children.head;ne.moveChildren(B,Z),ne.remove()}this.optimize()}},{key:"enable",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",L)}},{key:"formatAt",value:function(L,k,F,V){this.whitelist!=null&&!this.whitelist[F]||(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,L,k,F,V),this.optimize())}},{key:"insertAt",value:function(L,k,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[k])){if(L>=this.length())if(F==null||d.default.query(k,d.default.Scope.BLOCK)==null){var V=d.default.create(this.statics.defaultChild);this.appendChild(V),F==null&&k.endsWith(`
55
- `)&&(k=k.slice(0,-1)),V.insertAt(0,k,F)}else{var ne=d.default.create(k,F);this.appendChild(ne)}else c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,L,k,F);this.optimize()}}},{key:"insertBefore",value:function(L,k){if(L.statics.scope===d.default.Scope.INLINE_BLOT){var F=d.default.create(this.statics.defaultChild);F.appendChild(L),L=F}c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,L,k)}},{key:"leaf",value:function(L){return this.path(L).pop()||[null,-1]}},{key:"line",value:function(L){return L===this.length()?this.line(L-1):this.descendant(I,L)}},{key:"lines",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function V(ne,ue,K){var W=[],B=K;return ne.children.forEachAt(ue,K,function(Q,re,Z){I(Q)?W.push(Q):Q instanceof d.default.Container&&(W=W.concat(V(Q,re,B))),B-=Z}),W};return F(this,L,k)}},{key:"optimize",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,L,k),L.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,L,k))}},{key:"path",value:function(L){return c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,L).slice(1)}},{key:"update",value:function(L){if(this.batch!==!0){var k=u.default.sources.USER;typeof L=="string"&&(k=L),Array.isArray(L)||(L=this.observer.takeRecords()),L.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,k,L),c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,L.concat([])),L.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,k,L)}}}]),A})(d.default.Scroll);j.blotName="scroll",j.className="ql-editor",j.tagName="DIV",j.defaultChild="block",j.allowedChildren=[p.default,h.BlockEmbed,E.default],r.default=j}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},l=(function(){function $(ee,le){var de=[],pe=!0,Ee=!1,Ie=void 0;try{for(var Pe=ee[Symbol.iterator](),Ae;!(pe=(Ae=Pe.next()).done)&&(de.push(Ae.value),!(le&&de.length===le));pe=!0);}catch(xe){Ee=!0,Ie=xe}finally{try{!pe&&Pe.return&&Pe.return()}finally{if(Ee)throw Ie}}return de}return function(ee,le){if(Array.isArray(ee))return ee;if(Symbol.iterator in Object(ee))return $(ee,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function $(ee,le){for(var de=0;de<le.length;de++){var pe=le[de];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ee,pe.key,pe)}}return function(ee,le,de){return le&&$(ee.prototype,le),de&&$(ee,de),ee}})(),f=o(21),d=M(f),a=o(11),u=M(a),h=o(3),p=M(h),O=o(2),m=M(O),_=o(20),g=M(_),w=o(0),E=M(w),y=o(5),x=M(y),C=o(10),N=M(C),I=o(9),j=M(I);function M($){return $&&$.__esModule?$:{default:$}}function A($,ee,le){return ee in $?Object.defineProperty($,ee,{value:le,enumerable:!0,configurable:!0,writable:!0}):$[ee]=le,$}function q($,ee){if(!($ instanceof ee))throw new TypeError("Cannot call a class as a function")}function L($,ee){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee&&(typeof ee=="object"||typeof ee=="function")?ee:$}function k($,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);$.prototype=Object.create(ee&&ee.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf($,ee):$.__proto__=ee)}var F=(0,N.default)("quill:keyboard"),V=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ne=(function($){k(ee,$),c(ee,null,[{key:"match",value:function(de,pe){return pe=X(pe),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Ee){return!!pe[Ee]!==de[Ee]&&pe[Ee]!==null})?!1:pe.key===(de.which||de.keyCode)}}]);function ee(le,de){q(this,ee);var pe=L(this,(ee.__proto__||Object.getPrototypeOf(ee)).call(this,le,de));return pe.bindings={},Object.keys(pe.options.bindings).forEach(function(Ee){Ee==="list autofill"&&le.scroll.whitelist!=null&&!le.scroll.whitelist.list||pe.options.bindings[Ee]&&pe.addBinding(pe.options.bindings[Ee])}),pe.addBinding({key:ee.keys.ENTER,shiftKey:null},Q),pe.addBinding({key:ee.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0},K),pe.addBinding({key:ee.keys.DELETE},{collapsed:!0},W)):(pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},K),pe.addBinding({key:ee.keys.DELETE},{collapsed:!0,suffix:/^.?$/},W)),pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!1},B),pe.addBinding({key:ee.keys.DELETE},{collapsed:!1},B),pe.addBinding({key:ee.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},K),pe.listen(),pe}return c(ee,[{key:"addBinding",value:function(de){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ie=X(de);if(Ie==null||Ie.key==null)return F.warn("Attempted to add invalid keyboard binding",Ie);typeof pe=="function"&&(pe={handler:pe}),typeof Ee=="function"&&(Ee={handler:Ee}),Ie=(0,p.default)(Ie,pe,Ee),this.bindings[Ie.key]=this.bindings[Ie.key]||[],this.bindings[Ie.key].push(Ie)}},{key:"listen",value:function(){var de=this;this.quill.root.addEventListener("keydown",function(pe){if(!pe.defaultPrevented){var Ee=pe.which||pe.keyCode,Ie=(de.bindings[Ee]||[]).filter(function(We){return ee.match(pe,We)});if(Ie.length!==0){var Pe=de.quill.getSelection();if(!(Pe==null||!de.quill.hasFocus())){var Ae=de.quill.getLine(Pe.index),xe=l(Ae,2),Ge=xe[0],Oe=xe[1],ge=de.quill.getLeaf(Pe.index),me=l(ge,2),ke=me[0],Ne=me[1],we=Pe.length===0?[ke,Ne]:de.quill.getLeaf(Pe.index+Pe.length),qe=l(we,2),je=qe[0],ze=qe[1],lt=ke instanceof E.default.Text?ke.value().slice(0,Ne):"",pt=je instanceof E.default.Text?je.value().slice(ze):"",Ze={collapsed:Pe.length===0,empty:Pe.length===0&&Ge.length()<=1,format:de.quill.getFormat(Pe),offset:Oe,prefix:lt,suffix:pt},It=Ie.some(function(We){if(We.collapsed!=null&&We.collapsed!==Ze.collapsed||We.empty!=null&&We.empty!==Ze.empty||We.offset!=null&&We.offset!==Ze.offset)return!1;if(Array.isArray(We.format)){if(We.format.every(function(it){return Ze.format[it]==null}))return!1}else if(s(We.format)==="object"&&!Object.keys(We.format).every(function(it){return We.format[it]===!0?Ze.format[it]!=null:We.format[it]===!1?Ze.format[it]==null:(0,u.default)(We.format[it],Ze.format[it])}))return!1;return We.prefix!=null&&!We.prefix.test(Ze.prefix)||We.suffix!=null&&!We.suffix.test(Ze.suffix)?!1:We.handler.call(de,Pe,Ze)!==!0});It&&pe.preventDefault()}}}})}}]),ee})(j.default);ne.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},ne.DEFAULTS={bindings:{bold:Z("bold"),italic:Z("italic"),underline:Z("underline"),indent:{key:ne.keys.TAB,format:["blockquote","indent","list"],handler:function(ee,le){if(le.collapsed&&le.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:ne.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(ee,le){if(le.collapsed&&le.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:ne.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(ee,le){le.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):le.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":re(!0),"outdent code-block":re(!1),"remove tab":{key:ne.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(ee){this.quill.deleteText(ee.index-1,1,x.default.sources.USER)}},tab:{key:ne.keys.TAB,handler:function(ee){this.quill.history.cutoff();var le=new m.default().retain(ee.index).delete(ee.length).insert(" ");this.quill.updateContents(le,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index+1,x.default.sources.SILENT)}},"list empty enter":{key:ne.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(ee,le){this.quill.format("list",!1,x.default.sources.USER),le.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:ne.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(ee){var le=this.quill.getLine(ee.index),de=l(le,2),pe=de[0],Ee=de[1],Ie=(0,p.default)({},pe.formats(),{list:"checked"}),Pe=new m.default().retain(ee.index).insert(`
56
- `,Ie).retain(pe.length()-Ee-1).retain(1,{list:"unchecked"});this.quill.updateContents(Pe,x.default.sources.USER),this.quill.setSelection(ee.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:ne.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(ee,le){var de=this.quill.getLine(ee.index),pe=l(de,2),Ee=pe[0],Ie=pe[1],Pe=new m.default().retain(ee.index).insert(`
57
- `,le.format).retain(Ee.length()-Ie-1).retain(1,{header:null});this.quill.updateContents(Pe,x.default.sources.USER),this.quill.setSelection(ee.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(ee,le){var de=le.prefix.length,pe=this.quill.getLine(ee.index),Ee=l(pe,2),Ie=Ee[0],Pe=Ee[1];if(Pe>de)return!0;var Ae=void 0;switch(le.prefix.trim()){case"[]":case"[ ]":Ae="unchecked";break;case"[x]":Ae="checked";break;case"-":case"*":Ae="bullet";break;default:Ae="ordered"}this.quill.insertText(ee.index," ",x.default.sources.USER),this.quill.history.cutoff();var xe=new m.default().retain(ee.index-Pe).delete(de+1).retain(Ie.length()-2-Pe).retain(1,{list:Ae});this.quill.updateContents(xe,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index-de,x.default.sources.SILENT)}},"code exit":{key:ne.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(ee){var le=this.quill.getLine(ee.index),de=l(le,2),pe=de[0],Ee=de[1],Ie=new m.default().retain(ee.index+pe.length()-Ee-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Ie,x.default.sources.USER)}},"embed left":ue(ne.keys.LEFT,!1),"embed left shift":ue(ne.keys.LEFT,!0),"embed right":ue(ne.keys.RIGHT,!1),"embed right shift":ue(ne.keys.RIGHT,!0)}};function ue($,ee){var le,de=$===ne.keys.LEFT?"prefix":"suffix";return le={key:$,shiftKey:ee,altKey:null},A(le,de,/^$/),A(le,"handler",function(Ee){var Ie=Ee.index;$===ne.keys.RIGHT&&(Ie+=Ee.length+1);var Pe=this.quill.getLeaf(Ie),Ae=l(Pe,1),xe=Ae[0];return xe instanceof E.default.Embed?($===ne.keys.LEFT?ee?this.quill.setSelection(Ee.index-1,Ee.length+1,x.default.sources.USER):this.quill.setSelection(Ee.index-1,x.default.sources.USER):ee?this.quill.setSelection(Ee.index,Ee.length+1,x.default.sources.USER):this.quill.setSelection(Ee.index+Ee.length+1,x.default.sources.USER),!1):!0}),le}function K($,ee){if(!($.index===0||this.quill.getLength()<=1)){var le=this.quill.getLine($.index),de=l(le,1),pe=de[0],Ee={};if(ee.offset===0){var Ie=this.quill.getLine($.index-1),Pe=l(Ie,1),Ae=Pe[0];if(Ae!=null&&Ae.length()>1){var xe=pe.formats(),Ge=this.quill.getFormat($.index-1,1);Ee=g.default.attributes.diff(xe,Ge)||{}}}var Oe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(ee.prefix)?2:1;this.quill.deleteText($.index-Oe,Oe,x.default.sources.USER),Object.keys(Ee).length>0&&this.quill.formatLine($.index-Oe,Oe,Ee,x.default.sources.USER),this.quill.focus()}}function W($,ee){var le=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(ee.suffix)?2:1;if(!($.index>=this.quill.getLength()-le)){var de={},pe=0,Ee=this.quill.getLine($.index),Ie=l(Ee,1),Pe=Ie[0];if(ee.offset>=Pe.length()-1){var Ae=this.quill.getLine($.index+1),xe=l(Ae,1),Ge=xe[0];if(Ge){var Oe=Pe.formats(),ge=this.quill.getFormat($.index,1);de=g.default.attributes.diff(Oe,ge)||{},pe=Ge.length()}}this.quill.deleteText($.index,le,x.default.sources.USER),Object.keys(de).length>0&&this.quill.formatLine($.index+pe-1,le,de,x.default.sources.USER)}}function B($){var ee=this.quill.getLines($),le={};if(ee.length>1){var de=ee[0].formats(),pe=ee[ee.length-1].formats();le=g.default.attributes.diff(pe,de)||{}}this.quill.deleteText($,x.default.sources.USER),Object.keys(le).length>0&&this.quill.formatLine($.index,1,le,x.default.sources.USER),this.quill.setSelection($.index,x.default.sources.SILENT),this.quill.focus()}function Q($,ee){var le=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var de=Object.keys(ee.format).reduce(function(pe,Ee){return E.default.query(Ee,E.default.Scope.BLOCK)&&!Array.isArray(ee.format[Ee])&&(pe[Ee]=ee.format[Ee]),pe},{});this.quill.insertText($.index,`
58
- `,de,x.default.sources.USER),this.quill.setSelection($.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(ee.format).forEach(function(pe){de[pe]==null&&(Array.isArray(ee.format[pe])||pe!=="link"&&le.quill.format(pe,ee.format[pe],x.default.sources.USER))})}function re($){return{key:ne.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(le){var de=E.default.query("code-block"),pe=le.index,Ee=le.length,Ie=this.quill.scroll.descendant(de,pe),Pe=l(Ie,2),Ae=Pe[0],xe=Pe[1];if(Ae!=null){var Ge=this.quill.getIndex(Ae),Oe=Ae.newlineIndex(xe,!0)+1,ge=Ae.newlineIndex(Ge+xe+Ee),me=Ae.domNode.textContent.slice(Oe,ge).split(`
59
- `);xe=0,me.forEach(function(ke,Ne){$?(Ae.insertAt(Oe+xe,de.TAB),xe+=de.TAB.length,Ne===0?pe+=de.TAB.length:Ee+=de.TAB.length):ke.startsWith(de.TAB)&&(Ae.deleteAt(Oe+xe,de.TAB.length),xe-=de.TAB.length,Ne===0?pe-=de.TAB.length:Ee-=de.TAB.length),xe+=ke.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(pe,Ee,x.default.sources.SILENT)}}}}function Z($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(le,de){this.quill.format($,!de.format[$],x.default.sources.USER)}}}function X($){if(typeof $=="string"||typeof $=="number")return X({key:$});if((typeof $>"u"?"undefined":s($))==="object"&&($=(0,d.default)($,!1)),typeof $.key=="string")if(ne.keys[$.key.toUpperCase()]!=null)$.key=ne.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[V]=$.shortKey,delete $.shortKey),$}r.default=ne,r.SHORTKEY=V}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function g(w,E){var y=[],x=!0,C=!1,N=void 0;try{for(var I=w[Symbol.iterator](),j;!(x=(j=I.next()).done)&&(y.push(j.value),!(E&&y.length===E));x=!0);}catch(M){C=!0,N=M}finally{try{!x&&I.return&&I.return()}finally{if(C)throw N}}return y}return function(w,E){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return g(w,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=function g(w,E,y){w===null&&(w=Function.prototype);var x=Object.getOwnPropertyDescriptor(w,E);if(x===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:g(C,E,y)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(y)}},c=(function(){function g(w,E){for(var y=0;y<E.length;y++){var x=E[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(w,x.key,x)}}return function(w,E,y){return E&&g(w.prototype,E),y&&g(w,y),w}})(),f=o(0),d=h(f),a=o(7),u=h(a);function h(g){return g&&g.__esModule?g:{default:g}}function p(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}function O(g,w){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:g}function m(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);g.prototype=Object.create(w&&w.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(g,w):g.__proto__=w)}var _=(function(g){m(w,g),c(w,null,[{key:"value",value:function(){}}]);function w(E,y){p(this,w);var x=O(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,E));return x.selection=y,x.textNode=document.createTextNode(w.CONTENTS),x.domNode.appendChild(x.textNode),x._length=0,x}return c(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,x){if(this._length!==0)return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,y,x);for(var C=this,N=0;C!=null&&C.statics.scope!==d.default.Scope.BLOCK_BLOT;)N+=C.offset(C.parent),C=C.parent;C!=null&&(this._length=w.CONTENTS.length,C.optimize(),C.formatAt(N,w.CONTENTS.length,y,x),this._length=0)}},{key:"index",value:function(y,x){return y===this.textNode?0:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,y,x)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,x=this.selection.getNativeRange(),C=void 0,N=void 0,I=void 0;if(x!=null&&x.start.node===y&&x.end.node===y){var j=[y,x.start.offset,x.end.offset];C=j[0],N=j[1],I=j[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var M=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof u.default?(C=this.next.domNode,this.next.insertAt(0,M),this.textNode.data=w.CONTENTS):(this.textNode.data=M,this.parent.insertBefore(d.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),N!=null){var A=[N,I].map(function(L){return Math.max(0,Math.min(C.data.length,L-1))}),q=s(A,2);return N=q[0],I=q[1],{startNode:C,startOffset:N,endNode:C,endOffset:I}}}}},{key:"update",value:function(y,x){var C=this;if(y.some(function(I){return I.type==="characterData"&&I.target===C.textNode})){var N=this.restore();N&&(x.range=N)}}},{key:"value",value:function(){return""}}]),w})(d.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",r.default=_}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=d(s),c=o(4),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(){return a(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(l.default.Container);p.allowedChildren=[f.default,c.BlockEmbed,p],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var s=(function(){function _(g,w){for(var E=0;E<w.length;E++){var y=w[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,w,E){return w&&_(g.prototype,w),E&&_(g,E),g}})(),l=function _(g,w,E){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,w);if(y===void 0){var x=Object.getPrototypeOf(g);return x===null?void 0:_(x,w,E)}else{if("value"in y)return y.value;var C=y.get;return C===void 0?void 0:C.call(E)}},c=o(0),f=d(c);function d(_){return _&&_.__esModule?_:{default:_}}function a(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function u(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function h(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var p=(function(_){h(g,_);function g(){return a(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"value",value:function(E){var y=l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,E);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(x){return("00"+parseInt(x).toString(16)).slice(-2)}).join("")):y}}]),g})(f.default.Attributor.Style),O=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),m=new p("color","color",{scope:f.default.Scope.INLINE});r.ColorAttributor=p,r.ColorClass=O,r.ColorStyle=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var s=(function(){function m(_,g){for(var w=0;w<g.length;w++){var E=g[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,w){return g&&m(_.prototype,g),w&&m(_,w),_}})(),l=function m(_,g,w){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var y=Object.getPrototypeOf(_);return y===null?void 0:m(y,g,w)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(w)}},c=o(6),f=d(c);function d(m){return m&&m.__esModule?m:{default:m}}function a(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function u(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function h(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var p=(function(m){h(_,m);function _(){return a(this,_),u(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return s(_,[{key:"format",value:function(w,E){if(w!==this.statics.blotName||!E)return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,E);E=this.constructor.sanitize(E),this.domNode.setAttribute("href",E)}}],[{key:"create",value:function(w){var E=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,w);return w=this.sanitize(w),E.setAttribute("href",w),E.setAttribute("rel","noopener noreferrer"),E.setAttribute("target","_blank"),E}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return O(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_})(f.default);p.blotName="link",p.tagName="A",p.SANITIZED_URL="about:blank",p.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function O(m,_){var g=document.createElement("a");g.href=m;var w=g.href.slice(0,g.href.indexOf(":"));return _.indexOf(w)>-1}r.default=p,r.sanitize=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},l=(function(){function _(g,w){for(var E=0;E<w.length;E++){var y=w[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,w,E){return w&&_(g.prototype,w),E&&_(g,E),g}})(),c=o(23),f=u(c),d=o(107),a=u(d);function u(_){return _&&_.__esModule?_:{default:_}}function h(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}var p=0;function O(_,g){_.setAttribute(g,_.getAttribute(g)!=="true")}var m=(function(){function _(g){var w=this;h(this,_),this.select=g,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(){w.togglePicker()}),this.label.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),E.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return l(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),O(this.label,"aria-expanded"),O(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var E=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),w.hasAttribute("value")&&y.setAttribute("data-value",w.getAttribute("value")),w.textContent&&y.setAttribute("data-label",w.textContent),y.addEventListener("click",function(){E.selectItem(y,!0)}),y.addEventListener("keydown",function(x){switch(x.keyCode){case f.default.keys.ENTER:E.selectItem(y,!0),x.preventDefault();break;case f.default.keys.ESCAPE:E.escape(),x.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=a.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,E=document.createElement("span");E.classList.add("ql-picker-options"),E.setAttribute("aria-hidden","true"),E.tabIndex="-1",E.id="ql-picker-options-"+p,p+=1,this.label.setAttribute("aria-controls",E.id),this.options=E,[].slice.call(this.select.options).forEach(function(y){var x=w.buildItem(y);E.appendChild(x),y.selected===!0&&w.selectItem(x)}),this.container.appendChild(E)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(E){w.container.setAttribute(E.name,E.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.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(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(w!==y&&(y?.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),E))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var E=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(E)}else this.selectItem(null);var y=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),_})();r.default=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=F(s),c=o(5),f=F(c),d=o(4),a=F(d),u=o(16),h=F(u),p=o(25),O=F(p),m=o(24),_=F(m),g=o(35),w=F(g),E=o(6),y=F(E),x=o(22),C=F(x),N=o(7),I=F(N),j=o(55),M=F(j),A=o(42),q=F(A),L=o(23),k=F(L);function F(V){return V&&V.__esModule?V:{default:V}}f.default.register({"blots/block":a.default,"blots/block/embed":d.BlockEmbed,"blots/break":h.default,"blots/container":O.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":y.default,"blots/scroll":C.default,"blots/text":I.default,"modules/clipboard":M.default,"modules/history":q.default,"modules/keyboard":k.default}),l.default.register(a.default,h.default,_.default,y.default,C.default,I.default),r.default=f.default}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(1),l=(function(){function c(f){this.domNode=f,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(f){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var d;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?d=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?d=document.createElement(f):d=document.createElement(this.tagName[0])):d=document.createElement(this.tagName),this.className&&d.classList.add(this.className),d},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return s.create(f)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},c.prototype.deleteAt=function(f,d){var a=this.isolate(f,d);a.remove()},c.prototype.formatAt=function(f,d,a,u){var h=this.isolate(f,d);if(s.query(a,s.Scope.BLOT)!=null&&u)h.wrap(a,u);else if(s.query(a,s.Scope.ATTRIBUTE)!=null){var p=s.create(this.statics.scope);h.wrap(p),p.format(a,u)}},c.prototype.insertAt=function(f,d,a){var u=a==null?s.create("text",d):s.create(d,a),h=this.split(f);this.parent.insertBefore(u,h)},c.prototype.insertInto=function(f,d){d===void 0&&(d=null),this.parent!=null&&this.parent.children.remove(this);var a=null;f.children.insertBefore(this,d),d!=null&&(a=d.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=a)&&f.domNode.insertBefore(this.domNode,a),this.parent=f,this.attach()},c.prototype.isolate=function(f,d){var a=this.split(f);return a.split(d),a},c.prototype.length=function(){return 1},c.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},c.prototype.optimize=function(f){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},c.prototype.replaceWith=function(f,d){var a=typeof f=="string"?s.create(f,d):f;return a.replace(this),a},c.prototype.split=function(f,d){return f===0?this:this.next},c.prototype.update=function(f,d){},c.prototype.wrap=function(f,d){var a=typeof f=="string"?s.create(f,d):f;return this.parent!=null&&this.parent.insertBefore(a,this.next),a.appendChild(this),a},c.blotName="abstract",c})();r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(12),l=o(32),c=o(33),f=o(1),d=(function(){function a(u){this.attributes={},this.domNode=u,this.build()}return a.prototype.attribute=function(u,h){h?u.add(this.domNode,h)&&(u.value(this.domNode)!=null?this.attributes[u.attrName]=u:delete this.attributes[u.attrName]):(u.remove(this.domNode),delete this.attributes[u.attrName])},a.prototype.build=function(){var u=this;this.attributes={};var h=s.default.keys(this.domNode),p=l.default.keys(this.domNode),O=c.default.keys(this.domNode);h.concat(p).concat(O).forEach(function(m){var _=f.query(m,f.Scope.ATTRIBUTE);_ instanceof s.default&&(u.attributes[_.attrName]=_)})},a.prototype.copy=function(u){var h=this;Object.keys(this.attributes).forEach(function(p){var O=h.attributes[p].value(h.domNode);u.format(p,O)})},a.prototype.move=function(u){var h=this;this.copy(u),Object.keys(this.attributes).forEach(function(p){h.attributes[p].remove(h.domNode)}),this.attributes={}},a.prototype.values=function(){var u=this;return Object.keys(this.attributes).reduce(function(h,p){return h[p]=u.attributes[p].value(u.domNode),h},{})},a})();r.default=d}),(function(n,r,o){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])};return function(a,u){d(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12);function c(d,a){var u=d.getAttribute("class")||"";return u.split(/\s+/).filter(function(h){return h.indexOf(a+"-")===0})}var f=(function(d){s(a,d);function a(){return d!==null&&d.apply(this,arguments)||this}return a.keys=function(u){return(u.getAttribute("class")||"").split(/\s+/).map(function(h){return h.split("-").slice(0,-1).join("-")})},a.prototype.add=function(u,h){return this.canAdd(u,h)?(this.remove(u),u.classList.add(this.keyName+"-"+h),!0):!1},a.prototype.remove=function(u){var h=c(u,this.keyName);h.forEach(function(p){u.classList.remove(p)}),u.classList.length===0&&u.removeAttribute("class")},a.prototype.value=function(u){var h=c(u,this.keyName)[0]||"",p=h.slice(this.keyName.length+1);return this.canAdd(u,p)?p:""},a})(l.default);r.default=f}),(function(n,r,o){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])};return function(a,u){d(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12);function c(d){var a=d.split("-"),u=a.slice(1).map(function(h){return h[0].toUpperCase()+h.slice(1)}).join("");return a[0]+u}var f=(function(d){s(a,d);function a(){return d!==null&&d.apply(this,arguments)||this}return a.keys=function(u){return(u.getAttribute("style")||"").split(";").map(function(h){var p=h.split(":");return p[0].trim()})},a.prototype.add=function(u,h){return this.canAdd(u,h)?(u.style[c(this.keyName)]=h,!0):!1},a.prototype.remove=function(u){u.style[c(this.keyName)]="",u.getAttribute("style")||u.removeAttribute("style")},a.prototype.value=function(u){var h=u.style[c(this.keyName)];return this.canAdd(u,h)?h:""},a})(l.default);r.default=f}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function f(d,a){for(var u=0;u<a.length;u++){var h=a[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}return function(d,a,u){return a&&f(d.prototype,a),u&&f(d,u),d}})();function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}var c=(function(){function f(d,a){l(this,f),this.quill=d,this.options=a,this.modules={}}return s(f,[{key:"init",value:function(){var a=this;Object.keys(this.options.modules).forEach(function(u){a.modules[u]==null&&a.addModule(u)})}},{key:"addModule",value:function(a){var u=this.quill.constructor.import("modules/"+a);return this.modules[a]=new u(this.quill,this.options.modules[a]||{}),this.modules[a]}}]),f})();c.DEFAULTS={modules:{}},c.themes={default:c},r.default=c}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function g(w,E){for(var y=0;y<E.length;y++){var x=E[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(w,x.key,x)}}return function(w,E,y){return E&&g(w.prototype,E),y&&g(w,y),w}})(),l=function g(w,E,y){w===null&&(w=Function.prototype);var x=Object.getOwnPropertyDescriptor(w,E);if(x===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:g(C,E,y)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(y)}},c=o(0),f=u(c),d=o(7),a=u(d);function u(g){return g&&g.__esModule?g:{default:g}}function h(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}function p(g,w){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:g}function O(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);g.prototype=Object.create(w&&w.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(g,w):g.__proto__=w)}var m="\uFEFF",_=(function(g){O(w,g);function w(E){h(this,w);var y=p(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,E));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(x){y.contentNode.appendChild(x)}),y.leftGuard=document.createTextNode(m),y.rightGuard=document.createTextNode(m),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return s(w,[{key:"index",value:function(y,x){return y===this.leftGuard?0:y===this.rightGuard?1:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,y,x)}},{key:"restore",value:function(y){var x=void 0,C=void 0,N=y.data.split(m).join("");if(y===this.leftGuard)if(this.prev instanceof a.default){var I=this.prev.length();this.prev.insertAt(I,N),x={startNode:this.prev.domNode,startOffset:I+N.length}}else C=document.createTextNode(N),this.parent.insertBefore(f.default.create(C),this),x={startNode:C,startOffset:N.length};else y===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,N),x={startNode:this.next.domNode,startOffset:N.length}):(C=document.createTextNode(N),this.parent.insertBefore(f.default.create(C),this.next),x={startNode:C,startOffset:N.length}));return y.data=m,x}},{key:"update",value:function(y,x){var C=this;y.forEach(function(N){if(N.type==="characterData"&&(N.target===C.leftGuard||N.target===C.rightGuard)){var I=C.restore(N.target);I&&(x.range=I)}})}}]),w})(f.default.Embed);r.default=_}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var s=o(0),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},d=new l.default.Attributor.Attribute("align","align",f),a=new l.default.Attributor.Class("align","ql-align",f),u=new l.default.Attributor.Style("align","text-align",f);r.AlignAttribute=d,r.AlignClass=a,r.AlignStyle=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var s=o(0),l=f(s),c=o(26);function f(u){return u&&u.__esModule?u:{default:u}}var d=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),a=new c.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});r.BackgroundClass=d,r.BackgroundStyle=a}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var s=o(0),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},d=new l.default.Attributor.Attribute("direction","dir",f),a=new l.default.Attributor.Class("direction","ql-direction",f),u=new l.default.Attributor.Style("direction","direction",f);r.DirectionAttribute=d,r.DirectionClass=a,r.DirectionStyle=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var s=(function(){function g(w,E){for(var y=0;y<E.length;y++){var x=E[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(w,x.key,x)}}return function(w,E,y){return E&&g(w.prototype,E),y&&g(w,y),w}})(),l=function g(w,E,y){w===null&&(w=Function.prototype);var x=Object.getOwnPropertyDescriptor(w,E);if(x===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:g(C,E,y)}else{if("value"in x)return x.value;var N=x.get;return N===void 0?void 0:N.call(y)}},c=o(0),f=d(c);function d(g){return g&&g.__esModule?g:{default:g}}function a(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}function u(g,w){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:g}function h(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);g.prototype=Object.create(w&&w.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(g,w):g.__proto__=w)}var p={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},O=new f.default.Attributor.Class("font","ql-font",p),m=(function(g){h(w,g);function w(){return a(this,w),u(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(y){return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),w})(f.default.Attributor.Style),_=new m("font","font-family",p);r.FontStyle=_,r.FontClass=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var s=o(0),l=c(s);function c(a){return a&&a.__esModule?a:{default:a}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),d=new l.default.Attributor.Style("size","font-size",{scope:l.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=f,r.SizeStyle=d}),(function(n,r,o){n.exports={align:{"":o(76),center:o(77),right:o(78),justify:o(79)},background:o(80),blockquote:o(81),bold:o(82),clean:o(83),code:o(58),"code-block":o(58),color:o(84),direction:{"":o(85),rtl:o(86)},float:{center:o(87),full:o(88),left:o(89),right:o(90)},formula:o(91),header:{1:o(92),2:o(93)},italic:o(94),image:o(95),indent:{"+1":o(96),"-1":o(97)},link:o(98),list:{ordered:o(99),bullet:o(100),check:o(101)},script:{sub:o(102),super:o(103)},strike:o(104),underline:o(105),video:o(106)}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var s=(function(){function E(y,x){for(var C=0;C<x.length;C++){var N=x[C];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,x,C){return x&&E(y.prototype,x),C&&E(y,C),y}})(),l=o(0),c=h(l),f=o(5),d=h(f),a=o(9),u=h(a);function h(E){return E&&E.__esModule?E:{default:E}}function p(E,y){if(!(E instanceof y))throw new TypeError("Cannot call a class as a function")}function O(E,y){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:E}function m(E,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);E.prototype=Object.create(y&&y.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(E,y):E.__proto__=y)}var _=(function(E){m(y,E);function y(x,C){p(this,y);var N=O(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,x,C));return N.lastRecorded=0,N.ignoreChange=!1,N.clear(),N.quill.on(d.default.events.EDITOR_CHANGE,function(I,j,M,A){I!==d.default.events.TEXT_CHANGE||N.ignoreChange||(!N.options.userOnly||A===d.default.sources.USER?N.record(j,M):N.transform(j))}),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 s(y,[{key:"change",value:function(C,N){if(this.stack[C].length!==0){var I=this.stack[C].pop();this.stack[N].push(I),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(I[C],d.default.sources.USER),this.ignoreChange=!1;var j=w(I[C]);this.quill.setSelection(j)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(C,N){if(C.ops.length!==0){this.stack.redo=[];var I=this.quill.getContents().diff(N),j=Date.now();if(this.lastRecorded+this.options.delay>j&&this.stack.undo.length>0){var M=this.stack.undo.pop();I=I.compose(M.undo),C=M.redo.compose(C)}else this.lastRecorded=j;this.stack.undo.push({redo:C,undo:I}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(C){this.stack.undo.forEach(function(N){N.undo=C.transform(N.undo,!0),N.redo=C.transform(N.redo,!0)}),this.stack.redo.forEach(function(N){N.undo=C.transform(N.undo,!0),N.redo=C.transform(N.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y})(u.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function g(E){var y=E.ops[E.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(`
60
- `):y.attributes!=null?Object.keys(y.attributes).some(function(x){return c.default.query(x,c.default.Scope.BLOCK)!=null}):!1}function w(E){var y=E.reduce(function(C,N){return C+=N.delete||0,C},0),x=E.length()-y;return g(E)&&(x-=1),x}r.default=_,r.getLastChangeIndex=w}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var s=(function(){function Q(re,Z){for(var X=0;X<Z.length;X++){var $=Z[X];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(re,$.key,$)}}return function(re,Z,X){return Z&&Q(re.prototype,Z),X&&Q(re,X),re}})(),l=function Q(re,Z,X){re===null&&(re=Function.prototype);var $=Object.getOwnPropertyDescriptor(re,Z);if($===void 0){var ee=Object.getPrototypeOf(re);return ee===null?void 0:Q(ee,Z,X)}else{if("value"in $)return $.value;var le=$.get;return le===void 0?void 0:le.call(X)}},c=o(3),f=j(c),d=o(2),a=j(d),u=o(8),h=j(u),p=o(23),O=j(p),m=o(34),_=j(m),g=o(59),w=j(g),E=o(60),y=j(E),x=o(28),C=j(x),N=o(61),I=j(N);function j(Q){return Q&&Q.__esModule?Q:{default:Q}}function M(Q,re){if(!(Q instanceof re))throw new TypeError("Cannot call a class as a function")}function A(Q,re){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:Q}function q(Q,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);Q.prototype=Object.create(re&&re.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,re):Q.__proto__=re)}var L=[!1,"center","right","justify"],k=["#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"],F=[!1,"serif","monospace"],V=["1","2","3",!1],ne=["small",!1,"large","huge"],ue=(function(Q){q(re,Q);function re(Z,X){M(this,re);var $=A(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,Z,X)),ee=function le(de){if(!document.body.contains(Z.root))return document.body.removeEventListener("click",le);$.tooltip!=null&&!$.tooltip.root.contains(de.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(pe){pe.container.contains(de.target)||pe.close()})};return Z.emitter.listenDOM("click",document.body,ee),$}return s(re,[{key:"addModule",value:function(X){var $=l(re.prototype.__proto__||Object.getPrototypeOf(re.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(X,$){X.forEach(function(ee){var le=ee.getAttribute("class")||"";le.split(/\s+/).forEach(function(de){if(de.startsWith("ql-")&&(de=de.slice(3),$[de]!=null))if(de==="direction")ee.innerHTML=$[de][""]+$[de].rtl;else if(typeof $[de]=="string")ee.innerHTML=$[de];else{var pe=ee.value||"";pe!=null&&$[de][pe]&&(ee.innerHTML=$[de][pe])}})})}},{key:"buildPickers",value:function(X,$){var ee=this;this.pickers=X.map(function(de){if(de.classList.contains("ql-align"))return de.querySelector("option")==null&&B(de,L),new y.default(de,$.align);if(de.classList.contains("ql-background")||de.classList.contains("ql-color")){var pe=de.classList.contains("ql-background")?"background":"color";return de.querySelector("option")==null&&B(de,k,pe==="background"?"#ffffff":"#000000"),new w.default(de,$[pe])}else return de.querySelector("option")==null&&(de.classList.contains("ql-font")?B(de,F):de.classList.contains("ql-header")?B(de,V):de.classList.contains("ql-size")&&B(de,ne)),new C.default(de)});var le=function(){ee.pickers.forEach(function(pe){pe.update()})};this.quill.on(h.default.events.EDITOR_CHANGE,le)}}]),re})(_.default);ue.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var re=this,Z=this.container.querySelector("input.ql-image[type=file]");Z==null&&(Z=document.createElement("input"),Z.setAttribute("type","file"),Z.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Z.classList.add("ql-image"),Z.addEventListener("change",function(){if(Z.files!=null&&Z.files[0]!=null){var X=new FileReader;X.onload=function($){var ee=re.quill.getSelection(!0);re.quill.updateContents(new a.default().retain(ee.index).delete(ee.length).insert({image:$.target.result}),h.default.sources.USER),re.quill.setSelection(ee.index+1,h.default.sources.SILENT),Z.value=""},X.readAsDataURL(Z.files[0])}}),this.container.appendChild(Z)),Z.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var K=(function(Q){q(re,Q);function re(Z,X){M(this,re);var $=A(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,Z,X));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return s(re,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function($){O.default.match($,"enter")?(X.save(),$.preventDefault()):O.default.match($,"escape")&&(X.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:X!==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-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,h.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,h.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":X=W(X);case"formula":{if(!X)break;var ee=this.quill.getSelection(!0);if(ee!=null){var le=ee.index+ee.length;this.quill.insertEmbed(le,this.root.getAttribute("data-mode"),X,h.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(le+1," ",h.default.sources.USER),this.quill.setSelection(le+2,h.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),re})(I.default);function W(Q){var re=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 re?(re[1]||"https")+"://www.youtube.com/embed/"+re[2]+"?showinfo=0":(re=Q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(re[1]||"https")+"://player.vimeo.com/video/"+re[2]+"/":Q}function B(Q,re){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;re.forEach(function(X){var $=document.createElement("option");X===Z?$.setAttribute("selected","selected"):$.setAttribute("value",X),Q.appendChild($)})}r.BaseTooltip=K,r.default=ue}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function l(){this.head=this.tail=null,this.length=0}return l.prototype.append=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},l.prototype.contains=function(c){for(var f,d=this.iterator();f=d();)if(f===c)return!0;return!1},l.prototype.insertBefore=function(c,f){c&&(c.next=f,f!=null?(c.prev=f.prev,f.prev!=null&&(f.prev.next=c),f.prev=c,f===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},l.prototype.offset=function(c){for(var f=0,d=this.head;d!=null;){if(d===c)return f;f+=d.length(),d=d.next}return-1},l.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},l.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var f=c;return c!=null&&(c=c.next),f}},l.prototype.find=function(c,f){f===void 0&&(f=!1);for(var d,a=this.iterator();d=a();){var u=d.length();if(c<u||f&&c===u&&(d.next==null||d.next.length()!==0))return[d,c];c-=u}return[null,0]},l.prototype.forEach=function(c){for(var f,d=this.iterator();f=d();)c(f)},l.prototype.forEachAt=function(c,f,d){if(!(f<=0))for(var a=this.find(c),u=a[0],h=a[1],p,O=c-h,m=this.iterator(u);(p=m())&&O<c+f;){var _=p.length();c>O?d(p,c-O,Math.min(f,O+_-c)):d(p,0,Math.min(_,c+f-O)),O+=_}},l.prototype.map=function(c){return this.reduce(function(f,d){return f.push(c(d)),f},[])},l.prototype.reduce=function(c,f){for(var d,a=this.iterator();d=a();)f=c(f,d);return f},l})();r.default=s}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var O in p)p.hasOwnProperty(O)&&(h[O]=p[O])};return function(h,p){u(h,p);function O(){this.constructor=h}h.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(17),c=o(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},d=100,a=(function(u){s(h,u);function h(p){var O=u.call(this,p)||this;return O.scroll=O,O.observer=new MutationObserver(function(m){O.update(m)}),O.observer.observe(O.domNode,f),O.attach(),O}return h.prototype.detach=function(){u.prototype.detach.call(this),this.observer.disconnect()},h.prototype.deleteAt=function(p,O){this.update(),p===0&&O===this.length()?this.children.forEach(function(m){m.remove()}):u.prototype.deleteAt.call(this,p,O)},h.prototype.formatAt=function(p,O,m,_){this.update(),u.prototype.formatAt.call(this,p,O,m,_)},h.prototype.insertAt=function(p,O,m){this.update(),u.prototype.insertAt.call(this,p,O,m)},h.prototype.optimize=function(p,O){var m=this;p===void 0&&(p=[]),O===void 0&&(O={}),u.prototype.optimize.call(this,O);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)p.push(_.pop());for(var g=function(x,C){C===void 0&&(C=!0),!(x==null||x===m)&&x.domNode.parentNode!=null&&(x.domNode[c.DATA_KEY].mutations==null&&(x.domNode[c.DATA_KEY].mutations=[]),C&&g(x.parent))},w=function(x){x.domNode[c.DATA_KEY]==null||x.domNode[c.DATA_KEY].mutations==null||(x instanceof l.default&&x.children.forEach(w),x.optimize(O))},E=p,y=0;E.length>0;y+=1){if(y>=d)throw new Error("[Parchment] Maximum optimize iterations reached");for(E.forEach(function(x){var C=c.find(x.target,!0);C!=null&&(C.domNode===x.target&&(x.type==="childList"?(g(c.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(N){var I=c.find(N,!1);g(I,!1),I instanceof l.default&&I.children.forEach(function(j){g(j,!1)})})):x.type==="attributes"&&g(C.prev)),g(C))}),this.children.forEach(w),E=[].slice.call(this.observer.takeRecords()),_=E.slice();_.length>0;)p.push(_.pop())}},h.prototype.update=function(p,O){var m=this;O===void 0&&(O={}),p=p||this.observer.takeRecords(),p.map(function(_){var g=c.find(_.target,!0);return g==null?null:g.domNode[c.DATA_KEY].mutations==null?(g.domNode[c.DATA_KEY].mutations=[_],g):(g.domNode[c.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===m||_.domNode[c.DATA_KEY]==null||_.update(_.domNode[c.DATA_KEY].mutations||[],O)}),this.domNode[c.DATA_KEY].mutations!=null&&u.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,O),this.optimize(p,O)},h.blotName="scroll",h.defaultChild="block",h.scope=c.Scope.BLOCK_BLOT,h.tagName="DIV",h})(l.default);r.default=a}),(function(n,r,o){var s=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var p in h)h.hasOwnProperty(p)&&(u[p]=h[p])};return function(u,h){a(u,h);function p(){this.constructor=u}u.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(18),c=o(1);function f(a,u){if(Object.keys(a).length!==Object.keys(u).length)return!1;for(var h in a)if(a[h]!==u[h])return!1;return!0}var d=(function(a){s(u,a);function u(){return a!==null&&a.apply(this,arguments)||this}return u.formats=function(h){if(h.tagName!==u.tagName)return a.formats.call(this,h)},u.prototype.format=function(h,p){var O=this;h===this.statics.blotName&&!p?(this.children.forEach(function(m){m instanceof l.default||(m=m.wrap(u.blotName,!0)),O.attributes.copy(m)}),this.unwrap()):a.prototype.format.call(this,h,p)},u.prototype.formatAt=function(h,p,O,m){if(this.formats()[O]!=null||c.query(O,c.Scope.ATTRIBUTE)){var _=this.isolate(h,p);_.format(O,m)}else a.prototype.formatAt.call(this,h,p,O,m)},u.prototype.optimize=function(h){a.prototype.optimize.call(this,h);var p=this.formats();if(Object.keys(p).length===0)return this.unwrap();var O=this.next;O instanceof u&&O.prev===this&&f(p,O.formats())&&(O.moveChildren(this),O.remove())},u.blotName="inline",u.scope=c.Scope.INLINE_BLOT,u.tagName="SPAN",u})(l.default);r.default=d}),(function(n,r,o){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])};return function(a,u){d(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(18),c=o(1),f=(function(d){s(a,d);function a(){return d!==null&&d.apply(this,arguments)||this}return a.formats=function(u){var h=c.query(a.blotName).tagName;if(u.tagName!==h)return d.formats.call(this,u)},a.prototype.format=function(u,h){c.query(u,c.Scope.BLOCK)!=null&&(u===this.statics.blotName&&!h?this.replaceWith(a.blotName):d.prototype.format.call(this,u,h))},a.prototype.formatAt=function(u,h,p,O){c.query(p,c.Scope.BLOCK)!=null?this.format(p,O):d.prototype.formatAt.call(this,u,h,p,O)},a.prototype.insertAt=function(u,h,p){if(p==null||c.query(h,c.Scope.INLINE)!=null)d.prototype.insertAt.call(this,u,h,p);else{var O=this.split(u),m=c.create(h,p);O.parent.insertBefore(m,O)}},a.prototype.update=function(u,h){navigator.userAgent.match(/Trident/)?this.build():d.prototype.update.call(this,u,h)},a.blotName="block",a.scope=c.Scope.BLOCK_BLOT,a.tagName="P",a})(l.default);r.default=f}),(function(n,r,o){var s=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,a){d.__proto__=a}||function(d,a){for(var u in a)a.hasOwnProperty(u)&&(d[u]=a[u])};return function(d,a){f(d,a);function u(){this.constructor=d}d.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(19),c=(function(f){s(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.formats=function(a){},d.prototype.format=function(a,u){f.prototype.formatAt.call(this,0,this.length(),a,u)},d.prototype.formatAt=function(a,u,h,p){a===0&&u===this.length()?this.format(h,p):f.prototype.formatAt.call(this,a,u,h,p)},d.prototype.formats=function(){return this.statics.formats(this.domNode)},d})(l.default);r.default=c}),(function(n,r,o){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)u.hasOwnProperty(h)&&(a[h]=u[h])};return function(a,u){d(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(19),c=o(1),f=(function(d){s(a,d);function a(u){var h=d.call(this,u)||this;return h.text=h.statics.value(h.domNode),h}return a.create=function(u){return document.createTextNode(u)},a.value=function(u){var h=u.data;return h.normalize&&(h=h.normalize()),h},a.prototype.deleteAt=function(u,h){this.domNode.data=this.text=this.text.slice(0,u)+this.text.slice(u+h)},a.prototype.index=function(u,h){return this.domNode===u?h:-1},a.prototype.insertAt=function(u,h,p){p==null?(this.text=this.text.slice(0,u)+h+this.text.slice(u),this.domNode.data=this.text):d.prototype.insertAt.call(this,u,h,p)},a.prototype.length=function(){return this.text.length},a.prototype.optimize=function(u){d.prototype.optimize.call(this,u),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof a&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},a.prototype.position=function(u,h){return[this.domNode,u]},a.prototype.split=function(u,h){if(h===void 0&&(h=!1),!h){if(u===0)return this;if(u===this.length())return this.next}var p=c.create(this.domNode.splitText(u));return this.parent.insertBefore(p,this.next),this.text=this.statics.value(this.domNode),p},a.prototype.update=function(u,h){var p=this;u.some(function(O){return O.type==="characterData"&&O.target===p.domNode})&&(this.text=this.statics.value(this.domNode))},a.prototype.value=function(){return this.text},a.blotName="text",a.scope=c.Scope.INLINE_BLOT,a})(l.default);r.default=f}),(function(n,r,o){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,f){return arguments.length>1&&!this.contains(c)==!f?f:l.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,f){return f=f||0,this.substr(f,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,f){var d=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>d.length)&&(f=d.length),f-=c.length;var a=d.indexOf(c,f);return a!==-1&&a===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var d=Object(this),a=d.length>>>0,u=arguments[1],h,p=0;p<a;p++)if(h=d[p],f.call(u,h,p,d))return h}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(n,r){var o=-1,s=1,l=0;function c(y,x,C){if(y==x)return y?[[l,y]]:[];(C<0||y.length<C)&&(C=null);var N=u(y,x),I=y.substring(0,N);y=y.substring(N),x=x.substring(N),N=h(y,x);var j=y.substring(y.length-N);y=y.substring(0,y.length-N),x=x.substring(0,x.length-N);var M=f(y,x);return I&&M.unshift([l,I]),j&&M.push([l,j]),O(M),C!=null&&(M=g(M,C)),M=w(M),M}function f(y,x){var C;if(!y)return[[s,x]];if(!x)return[[o,y]];var N=y.length>x.length?y:x,I=y.length>x.length?x:y,j=N.indexOf(I);if(j!=-1)return C=[[s,N.substring(0,j)],[l,I],[s,N.substring(j+I.length)]],y.length>x.length&&(C[0][0]=C[2][0]=o),C;if(I.length==1)return[[o,y],[s,x]];var M=p(y,x);if(M){var A=M[0],q=M[1],L=M[2],k=M[3],F=M[4],V=c(A,L),ne=c(q,k);return V.concat([[l,F]],ne)}return d(y,x)}function d(y,x){for(var C=y.length,N=x.length,I=Math.ceil((C+N)/2),j=I,M=2*I,A=new Array(M),q=new Array(M),L=0;L<M;L++)A[L]=-1,q[L]=-1;A[j+1]=0,q[j+1]=0;for(var k=C-N,F=k%2!=0,V=0,ne=0,ue=0,K=0,W=0;W<I;W++){for(var B=-W+V;B<=W-ne;B+=2){var Q=j+B,re;B==-W||B!=W&&A[Q-1]<A[Q+1]?re=A[Q+1]:re=A[Q-1]+1;for(var Z=re-B;re<C&&Z<N&&y.charAt(re)==x.charAt(Z);)re++,Z++;if(A[Q]=re,re>C)ne+=2;else if(Z>N)V+=2;else if(F){var X=j+k-B;if(X>=0&&X<M&&q[X]!=-1){var $=C-q[X];if(re>=$)return a(y,x,re,Z)}}}for(var ee=-W+ue;ee<=W-K;ee+=2){var X=j+ee,$;ee==-W||ee!=W&&q[X-1]<q[X+1]?$=q[X+1]:$=q[X-1]+1;for(var le=$-ee;$<C&&le<N&&y.charAt(C-$-1)==x.charAt(N-le-1);)$++,le++;if(q[X]=$,$>C)K+=2;else if(le>N)ue+=2;else if(!F){var Q=j+k-ee;if(Q>=0&&Q<M&&A[Q]!=-1){var re=A[Q],Z=j+re-Q;if($=C-$,re>=$)return a(y,x,re,Z)}}}}return[[o,y],[s,x]]}function a(y,x,C,N){var I=y.substring(0,C),j=x.substring(0,N),M=y.substring(C),A=x.substring(N),q=c(I,j),L=c(M,A);return q.concat(L)}function u(y,x){if(!y||!x||y.charAt(0)!=x.charAt(0))return 0;for(var C=0,N=Math.min(y.length,x.length),I=N,j=0;C<I;)y.substring(j,I)==x.substring(j,I)?(C=I,j=C):N=I,I=Math.floor((N-C)/2+C);return I}function h(y,x){if(!y||!x||y.charAt(y.length-1)!=x.charAt(x.length-1))return 0;for(var C=0,N=Math.min(y.length,x.length),I=N,j=0;C<I;)y.substring(y.length-I,y.length-j)==x.substring(x.length-I,x.length-j)?(C=I,j=C):N=I,I=Math.floor((N-C)/2+C);return I}function p(y,x){var C=y.length>x.length?y:x,N=y.length>x.length?x:y;if(C.length<4||N.length*2<C.length)return null;function I(ne,ue,K){for(var W=ne.substring(K,K+Math.floor(ne.length/4)),B=-1,Q="",re,Z,X,$;(B=ue.indexOf(W,B+1))!=-1;){var ee=u(ne.substring(K),ue.substring(B)),le=h(ne.substring(0,K),ue.substring(0,B));Q.length<le+ee&&(Q=ue.substring(B-le,B)+ue.substring(B,B+ee),re=ne.substring(0,K-le),Z=ne.substring(K+ee),X=ue.substring(0,B-le),$=ue.substring(B+ee))}return Q.length*2>=ne.length?[re,Z,X,$,Q]:null}var j=I(C,N,Math.ceil(C.length/4)),M=I(C,N,Math.ceil(C.length/2)),A;if(!j&&!M)return null;M?j?A=j[4].length>M[4].length?j:M:A=M:A=j;var q,L,k,F;y.length>x.length?(q=A[0],L=A[1],k=A[2],F=A[3]):(k=A[0],F=A[1],q=A[2],L=A[3]);var V=A[4];return[q,L,k,F,V]}function O(y){y.push([l,""]);for(var x=0,C=0,N=0,I="",j="",M;x<y.length;)switch(y[x][0]){case s:N++,j+=y[x][1],x++;break;case o:C++,I+=y[x][1],x++;break;case l:C+N>1?(C!==0&&N!==0&&(M=u(j,I),M!==0&&(x-C-N>0&&y[x-C-N-1][0]==l?y[x-C-N-1][1]+=j.substring(0,M):(y.splice(0,0,[l,j.substring(0,M)]),x++),j=j.substring(M),I=I.substring(M)),M=h(j,I),M!==0&&(y[x][1]=j.substring(j.length-M)+y[x][1],j=j.substring(0,j.length-M),I=I.substring(0,I.length-M))),C===0?y.splice(x-N,C+N,[s,j]):N===0?y.splice(x-C,C+N,[o,I]):y.splice(x-C-N,C+N,[o,I],[s,j]),x=x-C-N+(C?1:0)+(N?1:0)+1):x!==0&&y[x-1][0]==l?(y[x-1][1]+=y[x][1],y.splice(x,1)):x++,N=0,C=0,I="",j="";break}y[y.length-1][1]===""&&y.pop();var A=!1;for(x=1;x<y.length-1;)y[x-1][0]==l&&y[x+1][0]==l&&(y[x][1].substring(y[x][1].length-y[x-1][1].length)==y[x-1][1]?(y[x][1]=y[x-1][1]+y[x][1].substring(0,y[x][1].length-y[x-1][1].length),y[x+1][1]=y[x-1][1]+y[x+1][1],y.splice(x-1,1),A=!0):y[x][1].substring(0,y[x+1][1].length)==y[x+1][1]&&(y[x-1][1]+=y[x+1][1],y[x][1]=y[x][1].substring(y[x+1][1].length)+y[x+1][1],y.splice(x+1,1),A=!0)),x++;A&&O(y)}var m=c;m.INSERT=s,m.DELETE=o,m.EQUAL=l,n.exports=m;function _(y,x){if(x===0)return[l,y];for(var C=0,N=0;N<y.length;N++){var I=y[N];if(I[0]===o||I[0]===l){var j=C+I[1].length;if(x===j)return[N+1,y];if(x<j){y=y.slice();var M=x-C,A=[I[0],I[1].slice(0,M)],q=[I[0],I[1].slice(M)];return y.splice(N,1,A,q),[N+1,y]}else C=j}}throw new Error("cursor_pos is out of bounds!")}function g(y,x){var C=_(y,x),N=C[1],I=C[0],j=N[I],M=N[I+1];if(j==null)return y;if(j[0]!==l)return y;if(M!=null&&j[1]+M[1]===M[1]+j[1])return N.splice(I,2,M,j),E(N,I,2);if(M!=null&&M[1].indexOf(j[1])===0){N.splice(I,2,[M[0],j[1]],[0,j[1]]);var A=M[1].slice(j[1].length);return A.length>0&&N.splice(I+2,0,[M[0],A]),E(N,I,3)}else return y}function w(y){for(var x=!1,C=function(M){return M.charCodeAt(0)>=56320&&M.charCodeAt(0)<=57343},N=function(M){return M.charCodeAt(M.length-1)>=55296&&M.charCodeAt(M.length-1)<=56319},I=2;I<y.length;I+=1)y[I-2][0]===l&&N(y[I-2][1])&&y[I-1][0]===o&&C(y[I-1][1])&&y[I][0]===s&&C(y[I][1])&&(x=!0,y[I-1][1]=y[I-2][1].slice(-1)+y[I-1][1],y[I][1]=y[I-2][1].slice(-1)+y[I][1],y[I-2][1]=y[I-2][1].slice(0,-1));if(!x)return y;for(var j=[],I=0;I<y.length;I+=1)y[I][1].length>0&&j.push(y[I]);return j}function E(y,x,C){for(var N=x+C-1;N>=0&&N>=x-1;N--)if(N+1<y.length){var I=y[N],j=y[N+1];I[0]===j[1]&&y.splice(N,2,[I[0],I[1]+j[1]])}return y}}),(function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:o,r.shim=o;function o(s){var l=[];for(var c in s)l.push(c);return l}}),(function(n,r){var o=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";r=n.exports=o?s:l,r.supported=s;function s(c){return Object.prototype.toString.call(c)=="[object Arguments]"}r.unsupported=l;function l(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}}),(function(n,r){var o=Object.prototype.hasOwnProperty,s="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(s=!1));function c(d,a,u){this.fn=d,this.context=a,this.once=u||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var a=[],u,h;if(this._eventsCount===0)return a;for(h in u=this._events)o.call(u,h)&&a.push(s?h.slice(1):h);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(u)):a},f.prototype.listeners=function(a,u){var h=s?s+a:a,p=this._events[h];if(u)return!!p;if(!p)return[];if(p.fn)return[p.fn];for(var O=0,m=p.length,_=new Array(m);O<m;O++)_[O]=p[O].fn;return _},f.prototype.emit=function(a,u,h,p,O,m){var _=s?s+a:a;if(!this._events[_])return!1;var g=this._events[_],w=arguments.length,E,y;if(g.fn){switch(g.once&&this.removeListener(a,g.fn,void 0,!0),w){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,h),!0;case 4:return g.fn.call(g.context,u,h,p),!0;case 5:return g.fn.call(g.context,u,h,p,O),!0;case 6:return g.fn.call(g.context,u,h,p,O,m),!0}for(y=1,E=new Array(w-1);y<w;y++)E[y-1]=arguments[y];g.fn.apply(g.context,E)}else{var x=g.length,C;for(y=0;y<x;y++)switch(g[y].once&&this.removeListener(a,g[y].fn,void 0,!0),w){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,u);break;case 3:g[y].fn.call(g[y].context,u,h);break;case 4:g[y].fn.call(g[y].context,u,h,p);break;default:if(!E)for(C=1,E=new Array(w-1);C<w;C++)E[C-1]=arguments[C];g[y].fn.apply(g[y].context,E)}}return!0},f.prototype.on=function(a,u,h){var p=new c(u,h||this),O=s?s+a:a;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],p]:this._events[O].push(p):(this._events[O]=p,this._eventsCount++),this},f.prototype.once=function(a,u,h){var p=new c(u,h||this,!0),O=s?s+a:a;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],p]:this._events[O].push(p):(this._events[O]=p,this._eventsCount++),this},f.prototype.removeListener=function(a,u,h,p){var O=s?s+a:a;if(!this._events[O])return this;if(!u)return--this._eventsCount===0?this._events=new l:delete this._events[O],this;var m=this._events[O];if(m.fn)m.fn===u&&(!p||m.once)&&(!h||m.context===h)&&(--this._eventsCount===0?this._events=new l:delete this._events[O]);else{for(var _=0,g=[],w=m.length;_<w;_++)(m[_].fn!==u||p&&!m[_].once||h&&m[_].context!==h)&&g.push(m[_]);g.length?this._events[O]=g.length===1?g[0]:g:--this._eventsCount===0?this._events=new l:delete this._events[O]}return this},f.prototype.removeAllListeners=function(a){var u;return a?(u=s?s+a:a,this._events[u]&&(--this._eventsCount===0?this._events=new l:delete this._events[u])):(this._events=new l,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=s,f.EventEmitter=f,typeof n<"u"&&(n.exports=f)}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ge){return typeof ge}:function(ge){return ge&&typeof Symbol=="function"&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge},l=(function(){function ge(me,ke){var Ne=[],we=!0,qe=!1,je=void 0;try{for(var ze=me[Symbol.iterator](),lt;!(we=(lt=ze.next()).done)&&(Ne.push(lt.value),!(ke&&Ne.length===ke));we=!0);}catch(pt){qe=!0,je=pt}finally{try{!we&&ze.return&&ze.return()}finally{if(qe)throw je}}return Ne}return function(me,ke){if(Array.isArray(me))return me;if(Symbol.iterator in Object(me))return ge(me,ke);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function ge(me,ke){for(var Ne=0;Ne<ke.length;Ne++){var we=ke[Ne];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ke,Ne){return ke&&ge(me.prototype,ke),Ne&&ge(me,Ne),me}})(),f=o(3),d=q(f),a=o(2),u=q(a),h=o(0),p=q(h),O=o(5),m=q(O),_=o(10),g=q(_),w=o(9),E=q(w),y=o(36),x=o(37),C=o(13),N=q(C),I=o(26),j=o(38),M=o(39),A=o(40);function q(ge){return ge&&ge.__esModule?ge:{default:ge}}function L(ge,me,ke){return me in ge?Object.defineProperty(ge,me,{value:ke,enumerable:!0,configurable:!0,writable:!0}):ge[me]=ke,ge}function k(ge,me){if(!(ge instanceof me))throw new TypeError("Cannot call a class as a function")}function F(ge,me){if(!ge)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:ge}function V(ge,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);ge.prototype=Object.create(me&&me.prototype,{constructor:{value:ge,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(ge,me):ge.__proto__=me)}var ne=(0,g.default)("quill:clipboard"),ue="__ql-matcher",K=[[Node.TEXT_NODE,Oe],[Node.TEXT_NODE,Ae],["br",Ee],[Node.ELEMENT_NODE,Ae],[Node.ELEMENT_NODE,pe],[Node.ELEMENT_NODE,xe],[Node.ELEMENT_NODE,de],[Node.ELEMENT_NODE,Ge],["li",Pe],["b",le.bind(le,"bold")],["i",le.bind(le,"italic")],["style",Ie]],W=[y.AlignAttribute,j.DirectionAttribute].reduce(function(ge,me){return ge[me.keyName]=me,ge},{}),B=[y.AlignStyle,x.BackgroundStyle,I.ColorStyle,j.DirectionStyle,M.FontStyle,A.SizeStyle].reduce(function(ge,me){return ge[me.keyName]=me,ge},{}),Q=(function(ge){V(me,ge);function me(ke,Ne){k(this,me);var we=F(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ke,Ne));return we.quill.root.addEventListener("paste",we.onPaste.bind(we)),we.container=we.quill.addContainer("ql-clipboard"),we.container.setAttribute("contenteditable",!0),we.container.setAttribute("tabindex",-1),we.matchers=[],K.concat(we.options.matchers).forEach(function(qe){var je=l(qe,2),ze=je[0],lt=je[1];!Ne.matchVisual&&lt===xe||we.addMatcher(ze,lt)}),we}return c(me,[{key:"addMatcher",value:function(Ne,we){this.matchers.push([Ne,we])}},{key:"convert",value:function(Ne){if(typeof Ne=="string")return this.container.innerHTML=Ne.replace(/\>\r?\n +\</g,"><"),this.convert();var we=this.quill.getFormat(this.quill.selection.savedRange.index);if(we[N.default.blotName]){var qe=this.container.innerText;return this.container.innerHTML="",new u.default().insert(qe,L({},N.default.blotName,we[N.default.blotName]))}var je=this.prepareMatching(),ze=l(je,2),lt=ze[0],pt=ze[1],Ze=ee(this.container,lt,pt);return X(Ze,`
61
- `)&&Ze.ops[Ze.ops.length-1].attributes==null&&(Ze=Ze.compose(new u.default().retain(Ze.length()-1).delete(1))),ne.log("convert",this.container.innerHTML,Ze),this.container.innerHTML="",Ze}},{key:"dangerouslyPasteHTML",value:function(Ne,we){var qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;if(typeof Ne=="string")this.quill.setContents(this.convert(Ne),we),this.quill.setSelection(0,m.default.sources.SILENT);else{var je=this.convert(we);this.quill.updateContents(new u.default().retain(Ne).concat(je),qe),this.quill.setSelection(Ne+je.length(),m.default.sources.SILENT)}}},{key:"onPaste",value:function(Ne){var we=this;if(!(Ne.defaultPrevented||!this.quill.isEnabled())){var qe=this.quill.getSelection(),je=new u.default().retain(qe.index),ze=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(m.default.sources.SILENT),setTimeout(function(){je=je.concat(we.convert()).delete(qe.length),we.quill.updateContents(je,m.default.sources.USER),we.quill.setSelection(je.length()-qe.length,m.default.sources.SILENT),we.quill.scrollingContainer.scrollTop=ze,we.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Ne=this,we=[],qe=[];return this.matchers.forEach(function(je){var ze=l(je,2),lt=ze[0],pt=ze[1];switch(lt){case Node.TEXT_NODE:qe.push(pt);break;case Node.ELEMENT_NODE:we.push(pt);break;default:[].forEach.call(Ne.container.querySelectorAll(lt),function(Ze){Ze[ue]=Ze[ue]||[],Ze[ue].push(pt)});break}}),[we,qe]}}]),me})(E.default);Q.DEFAULTS={matchers:[],matchVisual:!0};function re(ge,me,ke){return(typeof me>"u"?"undefined":s(me))==="object"?Object.keys(me).reduce(function(Ne,we){return re(Ne,we,me[we])},ge):ge.reduce(function(Ne,we){return we.attributes&&we.attributes[me]?Ne.push(we):Ne.insert(we.insert,(0,d.default)({},L({},me,ke),we.attributes))},new u.default)}function Z(ge){if(ge.nodeType!==Node.ELEMENT_NODE)return{};var me="__ql-computed-style";return ge[me]||(ge[me]=window.getComputedStyle(ge))}function X(ge,me){for(var ke="",Ne=ge.ops.length-1;Ne>=0&&ke.length<me.length;--Ne){var we=ge.ops[Ne];if(typeof we.insert!="string")break;ke=we.insert+ke}return ke.slice(-1*me.length)===me}function $(ge){if(ge.childNodes.length===0)return!1;var me=Z(ge);return["block","list-item"].indexOf(me.display)>-1}function ee(ge,me,ke){return ge.nodeType===ge.TEXT_NODE?ke.reduce(function(Ne,we){return we(ge,Ne)},new u.default):ge.nodeType===ge.ELEMENT_NODE?[].reduce.call(ge.childNodes||[],function(Ne,we){var qe=ee(we,me,ke);return we.nodeType===ge.ELEMENT_NODE&&(qe=me.reduce(function(je,ze){return ze(we,je)},qe),qe=(we[ue]||[]).reduce(function(je,ze){return ze(we,je)},qe)),Ne.concat(qe)},new u.default):new u.default}function le(ge,me,ke){return re(ke,ge,!0)}function de(ge,me){var ke=p.default.Attributor.Attribute.keys(ge),Ne=p.default.Attributor.Class.keys(ge),we=p.default.Attributor.Style.keys(ge),qe={};return ke.concat(Ne).concat(we).forEach(function(je){var ze=p.default.query(je,p.default.Scope.ATTRIBUTE);ze!=null&&(qe[ze.attrName]=ze.value(ge),qe[ze.attrName])||(ze=W[je],ze!=null&&(ze.attrName===je||ze.keyName===je)&&(qe[ze.attrName]=ze.value(ge)||void 0),ze=B[je],ze!=null&&(ze.attrName===je||ze.keyName===je)&&(ze=B[je],qe[ze.attrName]=ze.value(ge)||void 0))}),Object.keys(qe).length>0&&(me=re(me,qe)),me}function pe(ge,me){var ke=p.default.query(ge);if(ke==null)return me;if(ke.prototype instanceof p.default.Embed){var Ne={},we=ke.value(ge);we!=null&&(Ne[ke.blotName]=we,me=new u.default().insert(Ne,ke.formats(ge)))}else typeof ke.formats=="function"&&(me=re(me,ke.blotName,ke.formats(ge)));return me}function Ee(ge,me){return X(me,`
54
+ `);return W.insert(re,z.attributes)}return W.push(z)},new h.default)}r.default=U}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var s=(function(){function M(j,I){var A=[],q=!0,R=!1,k=void 0;try{for(var F=j[Symbol.iterator](),U;!(q=(U=F.next()).done)&&(A.push(U.value),!(I&&A.length===I));q=!0);}catch(ne){R=!0,k=ne}finally{try{!q&&F.return&&F.return()}finally{if(R)throw k}}return A}return function(j,I){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function M(j,I){for(var A=0;A<I.length;A++){var q=I[A];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}return function(j,I,A){return I&&M(j.prototype,I),A&&M(j,A),j}})(),c=o(0),f=y(c),h=o(21),a=y(h),u=o(11),d=y(u),p=o(8),O=y(p),g=o(10),_=y(g);function y(M){return M&&M.__esModule?M:{default:M}}function w(M){if(Array.isArray(M)){for(var j=0,I=Array(M.length);j<M.length;j++)I[j]=M[j];return I}else return Array.from(M)}function E(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")}var m=(0,_.default)("quill:selection"),S=function M(j){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;E(this,M),this.index=j,this.length=I},C=(function(){function M(j,I){var A=this;E(this,M),this.emitter=I,this.scroll=j,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new S(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,O.default.sources.USER),1)}),this.emitter.on(O.default.events.EDITOR_CHANGE,function(q,R){q===O.default.events.TEXT_CHANGE&&R.length()>0&&A.update(O.default.sources.SILENT)}),this.emitter.on(O.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var q=A.getNativeRange();q!=null&&q.start.node!==A.cursor.textNode&&A.emitter.once(O.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(q.start.node,q.start.offset,q.end.node,q.end.offset)}catch{}})}}),this.emitter.on(O.default.events.SCROLL_OPTIMIZE,function(q,R){if(R.range){var k=R.range,F=k.startNode,U=k.startOffset,ne=k.endNode,ue=k.endOffset;A.setNativeRange(F,U,ne,ue)}}),this.update(O.default.sources.SILENT)}return l(M,[{key:"handleComposition",value:function(){var I=this;this.root.addEventListener("compositionstart",function(){I.composing=!0}),this.root.addEventListener("compositionend",function(){if(I.composing=!1,I.cursor.parent){var A=I.cursor.restore();if(!A)return;setTimeout(function(){I.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var I=this;this.emitter.listenDOM("mousedown",document.body,function(){I.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){I.mouseDown=!1,I.update(O.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(I,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[I])){this.scroll.update();var q=this.getNativeRange();if(!(q==null||!q.native.collapsed||f.default.query(I,f.default.Scope.BLOCK))){if(q.start.node!==this.cursor.textNode){var R=f.default.find(q.start.node,!1);if(R==null)return;if(R instanceof f.default.Leaf){var k=R.split(q.start.offset);R.parent.insertBefore(this.cursor,k)}else R.insertBefore(this.cursor,q.start.node);this.cursor.attach()}this.cursor.format(I,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q=this.scroll.length();I=Math.min(I,q-1),A=Math.min(I+A,q-1)-I;var R=void 0,k=this.scroll.leaf(I),F=s(k,2),U=F[0],ne=F[1];if(U==null)return null;var ue=U.position(ne,!0),K=s(ue,2);R=K[0],ne=K[1];var W=document.createRange();if(A>0){W.setStart(R,ne);var z=this.scroll.leaf(I+A),Q=s(z,2);if(U=Q[0],ne=Q[1],U==null)return null;var re=U.position(ne,!0),Z=s(re,2);return R=Z[0],ne=Z[1],W.setEnd(R,ne),W.getBoundingClientRect()}else{var X="left",H=void 0;return R instanceof Text?(ne<R.data.length?(W.setStart(R,ne),W.setEnd(R,ne+1)):(W.setStart(R,ne-1),W.setEnd(R,ne),X="right"),H=W.getBoundingClientRect()):(H=U.domNode.getBoundingClientRect(),ne>0&&(X="right")),{bottom:H.top+H.height,height:H.height,left:H[X],right:H[X],top:H.top,width:0}}}},{key:"getNativeRange",value:function(){var I=document.getSelection();if(I==null||I.rangeCount<=0)return null;var A=I.getRangeAt(0);if(A==null)return null;var q=this.normalizeNative(A);return m.info("getNativeRange",q),q}},{key:"getRange",value:function(){var I=this.getNativeRange();if(I==null)return[null,null];var A=this.normalizedToRange(I);return[A,I]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(I){var A=this,q=[[I.start.node,I.start.offset]];I.native.collapsed||q.push([I.end.node,I.end.offset]);var R=q.map(function(U){var ne=s(U,2),ue=ne[0],K=ne[1],W=f.default.find(ue,!0),z=W.offset(A.scroll);return K===0?z:W instanceof f.default.Container?z+W.length():z+W.index(ue,K)}),k=Math.min(Math.max.apply(Math,w(R)),this.scroll.length()-1),F=Math.min.apply(Math,[k].concat(w(R)));return new S(F,k-F)}},{key:"normalizeNative",value:function(I){if(!N(this.root,I.startContainer)||!I.collapsed&&!N(this.root,I.endContainer))return null;var A={start:{node:I.startContainer,offset:I.startOffset},end:{node:I.endContainer,offset:I.endOffset},native:I};return[A.start,A.end].forEach(function(q){for(var R=q.node,k=q.offset;!(R instanceof Text)&&R.childNodes.length>0;)if(R.childNodes.length>k)R=R.childNodes[k],k=0;else if(R.childNodes.length===k)R=R.lastChild,k=R instanceof Text?R.data.length:R.childNodes.length+1;else break;q.node=R,q.offset=k}),A}},{key:"rangeToNative",value:function(I){var A=this,q=I.collapsed?[I.index]:[I.index,I.index+I.length],R=[],k=this.scroll.length();return q.forEach(function(F,U){F=Math.min(k-1,F);var ne=void 0,ue=A.scroll.leaf(F),K=s(ue,2),W=K[0],z=K[1],Q=W.position(z,U!==0),re=s(Q,2);ne=re[0],z=re[1],R.push(ne,z)}),R.length<2&&(R=R.concat(R)),R}},{key:"scrollIntoView",value:function(I){var A=this.lastRange;if(A!=null){var q=this.getBounds(A.index,A.length);if(q!=null){var R=this.scroll.length()-1,k=this.scroll.line(Math.min(A.index,R)),F=s(k,1),U=F[0],ne=U;if(A.length>0){var ue=this.scroll.line(Math.min(A.index+A.length,R)),K=s(ue,1);ne=K[0]}if(!(U==null||ne==null)){var W=I.getBoundingClientRect();q.top<W.top?I.scrollTop-=W.top-q.top:q.bottom>W.bottom&&(I.scrollTop+=q.bottom-W.bottom)}}}}},{key:"setNativeRange",value:function(I,A){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I,R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(m.info("setNativeRange",I,A,q,R),!(I!=null&&(this.root.parentNode==null||I.parentNode==null||q.parentNode==null))){var F=document.getSelection();if(F!=null)if(I!=null){this.hasFocus()||this.root.focus();var U=(this.getNativeRange()||{}).native;if(U==null||k||I!==U.startContainer||A!==U.startOffset||q!==U.endContainer||R!==U.endOffset){I.tagName=="BR"&&(A=[].indexOf.call(I.parentNode.childNodes,I),I=I.parentNode),q.tagName=="BR"&&(R=[].indexOf.call(q.parentNode.childNodes,q),q=q.parentNode);var ne=document.createRange();ne.setStart(I,A),ne.setEnd(q,R),F.removeAllRanges(),F.addRange(ne)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.default.sources.API;if(typeof A=="string"&&(q=A,A=!1),m.info("setRange",I),I!=null){var R=this.rangeToNative(I);this.setNativeRange.apply(this,w(R).concat([A]))}else this.setNativeRange(null);this.update(q)}},{key:"update",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O.default.sources.USER,A=this.lastRange,q=this.getRange(),R=s(q,2),k=R[0],F=R[1];if(this.lastRange=k,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,d.default)(A,this.lastRange)){var U;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var ne=[O.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(A),I];if((U=this.emitter).emit.apply(U,[O.default.events.EDITOR_CHANGE].concat(ne)),I!==O.default.sources.SILENT){var ue;(ue=this.emitter).emit.apply(ue,ne)}}}}]),M})();function N(M,j){try{j.parentNode}catch{return!1}return j instanceof Text&&(j=j.parentNode),M.contains(j)}r.Range=S,r.default=C}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(g,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,_,y){return _&&O(g.prototype,_),y&&O(g,y),g}})(),l=function O(g,_,y){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,_);if(w===void 0){var E=Object.getPrototypeOf(g);return E===null?void 0:O(E,_,y)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(y)}},c=o(0),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(){return a(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"insertInto",value:function(y,w){y.children.length===0?l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,y,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g})(f.default.Embed);p.blotName="break",p.tagName="BR",r.default=p}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var O in p)p.hasOwnProperty(O)&&(d[O]=p[O])};return function(d,p){u(d,p);function O(){this.constructor=d}d.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(44),c=o(30),f=o(1),h=(function(u){s(d,u);function d(p){var O=u.call(this,p)||this;return O.build(),O}return d.prototype.appendChild=function(p){this.insertBefore(p)},d.prototype.attach=function(){u.prototype.attach.call(this),this.children.forEach(function(p){p.attach()})},d.prototype.build=function(){var p=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(O){try{var g=a(O);p.insertBefore(g,p.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},d.prototype.deleteAt=function(p,O){if(p===0&&O===this.length())return this.remove();this.children.forEachAt(p,O,function(g,_,y){g.deleteAt(_,y)})},d.prototype.descendant=function(p,O){var g=this.children.find(O),_=g[0],y=g[1];return p.blotName==null&&p(_)||p.blotName!=null&&_ instanceof p?[_,y]:_ instanceof d?_.descendant(p,y):[null,-1]},d.prototype.descendants=function(p,O,g){O===void 0&&(O=0),g===void 0&&(g=Number.MAX_VALUE);var _=[],y=g;return this.children.forEachAt(O,g,function(w,E,m){(p.blotName==null&&p(w)||p.blotName!=null&&w instanceof p)&&_.push(w),w instanceof d&&(_=_.concat(w.descendants(p,E,y))),y-=m}),_},d.prototype.detach=function(){this.children.forEach(function(p){p.detach()}),u.prototype.detach.call(this)},d.prototype.formatAt=function(p,O,g,_){this.children.forEachAt(p,O,function(y,w,E){y.formatAt(w,E,g,_)})},d.prototype.insertAt=function(p,O,g){var _=this.children.find(p),y=_[0],w=_[1];if(y)y.insertAt(w,O,g);else{var E=g==null?f.create("text",O):f.create(O,g);this.appendChild(E)}},d.prototype.insertBefore=function(p,O){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return p instanceof g}))throw new f.ParchmentError("Cannot insert "+p.statics.blotName+" into "+this.statics.blotName);p.insertInto(this,O)},d.prototype.length=function(){return this.children.reduce(function(p,O){return p+O.length()},0)},d.prototype.moveChildren=function(p,O){this.children.forEach(function(g){p.insertBefore(g,O)})},d.prototype.optimize=function(p){if(u.prototype.optimize.call(this,p),this.children.length===0)if(this.statics.defaultChild!=null){var O=f.create(this.statics.defaultChild);this.appendChild(O),O.optimize(p)}else this.remove()},d.prototype.path=function(p,O){O===void 0&&(O=!1);var g=this.children.find(p,O),_=g[0],y=g[1],w=[[this,p]];return _ instanceof d?w.concat(_.path(y,O)):(_!=null&&w.push([_,y]),w)},d.prototype.removeChild=function(p){this.children.remove(p)},d.prototype.replace=function(p){p instanceof d&&p.moveChildren(this),u.prototype.replace.call(this,p)},d.prototype.split=function(p,O){if(O===void 0&&(O=!1),!O){if(p===0)return this;if(p===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(p,this.length(),function(_,y,w){_=_.split(y,O),g.appendChild(_)}),g},d.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},d.prototype.update=function(p,O){var g=this,_=[],y=[];p.forEach(function(w){w.target===g.domNode&&w.type==="childList"&&(_.push.apply(_,w.addedNodes),y.push.apply(y,w.removedNodes))}),y.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var E=f.find(w);E!=null&&(E.domNode.parentNode==null||E.domNode.parentNode===g.domNode)&&E.detach()}}),_.filter(function(w){return w.parentNode==g.domNode}).sort(function(w,E){return w===E?0:w.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var E=null;w.nextSibling!=null&&(E=f.find(w.nextSibling));var m=a(w);(m.next!=E||m.next==null)&&(m.parent!=null&&m.parent.removeChild(g),g.insertBefore(m,E||void 0))})},d})(c.default);function a(u){var d=f.find(u);if(d==null)try{d=f.create(u)}catch{d=f.create(f.Scope.INLINE),[].slice.call(u.childNodes).forEach(function(O){d.domNode.appendChild(O)}),u.parentNode&&u.parentNode.replaceChild(d.domNode,u),d.attach()}return d}r.default=h}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var O in p)p.hasOwnProperty(O)&&(d[O]=p[O])};return function(d,p){u(d,p);function O(){this.constructor=d}d.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12),c=o(31),f=o(17),h=o(1),a=(function(u){s(d,u);function d(p){var O=u.call(this,p)||this;return O.attributes=new c.default(O.domNode),O}return d.formats=function(p){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return p.tagName.toLowerCase()},d.prototype.format=function(p,O){var g=h.query(p);g instanceof l.default?this.attributes.attribute(g,O):O&&g!=null&&(p!==this.statics.blotName||this.formats()[p]!==O)&&this.replaceWith(p,O)},d.prototype.formats=function(){var p=this.attributes.values(),O=this.statics.formats(this.domNode);return O!=null&&(p[this.statics.blotName]=O),p},d.prototype.replaceWith=function(p,O){var g=u.prototype.replaceWith.call(this,p,O);return this.attributes.copy(g),g},d.prototype.update=function(p,O){var g=this;u.prototype.update.call(this,p,O),p.some(function(_){return _.target===g.domNode&&_.type==="attributes"})&&this.attributes.build()},d.prototype.wrap=function(p,O){var g=u.prototype.wrap.call(this,p,O);return g instanceof d&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},d})(f.default);r.default=a}),(function(n,r,o){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])};return function(a,u){h(a,u);function d(){this.constructor=a}a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(30),c=o(1),f=(function(h){s(a,h);function a(){return h!==null&&h.apply(this,arguments)||this}return a.value=function(u){return!0},a.prototype.index=function(u,d){return this.domNode===u||this.domNode.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(d,1):-1},a.prototype.position=function(u,d){var p=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return u>0&&(p+=1),[this.parent.domNode,p]},a.prototype.value=function(){var u;return u={},u[this.statics.blotName]=this.statics.value(this.domNode)||!0,u},a.scope=c.Scope.INLINE_BLOT,a})(l.default);r.default=f}),(function(n,r,o){var s=o(11),l=o(3),c={attributes:{compose:function(h,a,u){typeof h!="object"&&(h={}),typeof a!="object"&&(a={});var d=l(!0,{},a);u||(d=Object.keys(d).reduce(function(O,g){return d[g]!=null&&(O[g]=d[g]),O},{}));for(var p in h)h[p]!==void 0&&a[p]===void 0&&(d[p]=h[p]);return Object.keys(d).length>0?d:void 0},diff:function(h,a){typeof h!="object"&&(h={}),typeof a!="object"&&(a={});var u=Object.keys(h).concat(Object.keys(a)).reduce(function(d,p){return s(h[p],a[p])||(d[p]=a[p]===void 0?null:a[p]),d},{});return Object.keys(u).length>0?u:void 0},transform:function(h,a,u){if(typeof h!="object")return a;if(typeof a=="object"){if(!u)return a;var d=Object.keys(a).reduce(function(p,O){return h[O]===void 0&&(p[O]=a[O]),p},{});return Object.keys(d).length>0?d:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var a=this.ops[this.index];if(a){var u=this.offset,d=c.length(a);if(h>=d-u?(h=d-u,this.index+=1,this.offset=0):this.offset+=h,typeof a.delete=="number")return{delete:h};var p={};return a.attributes&&(p.attributes=a.attributes),typeof a.retain=="number"?p.retain=h:typeof a.insert=="string"?p.insert=a.insert.substr(u,h):p.insert=a.insert,p}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},f.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"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,a=this.index,u=this.next(),d=this.ops.slice(this.index);return this.offset=h,this.index=a,[u].concat(d)}else return[]},n.exports=c}),(function(n,r){var o=(function(){function s(g,_){return _!=null&&g instanceof _}var l;try{l=Map}catch{l=function(){}}var c;try{c=Set}catch{c=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(g,_,y,w,E){typeof _=="object"&&(y=_.depth,w=_.prototype,E=_.includeNonEnumerable,_=_.circular);var m=[],S=[],C=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof y>"u"&&(y=1/0);function N(M,j){if(M===null)return null;if(j===0)return M;var I,A;if(typeof M!="object")return M;if(s(M,l))I=new l;else if(s(M,c))I=new c;else if(s(M,f))I=new f(function(W,z){M.then(function(Q){W(N(Q,j-1))},function(Q){z(N(Q,j-1))})});else if(h.__isArray(M))I=[];else if(h.__isRegExp(M))I=new RegExp(M.source,O(M)),M.lastIndex&&(I.lastIndex=M.lastIndex);else if(h.__isDate(M))I=new Date(M.getTime());else{if(C&&Buffer.isBuffer(M))return Buffer.allocUnsafe?I=Buffer.allocUnsafe(M.length):I=new Buffer(M.length),M.copy(I),I;s(M,Error)?I=Object.create(M):typeof w>"u"?(A=Object.getPrototypeOf(M),I=Object.create(A)):(I=Object.create(w),A=w)}if(_){var q=m.indexOf(M);if(q!=-1)return S[q];m.push(M),S.push(I)}s(M,l)&&M.forEach(function(W,z){var Q=N(z,j-1),re=N(W,j-1);I.set(Q,re)}),s(M,c)&&M.forEach(function(W){var z=N(W,j-1);I.add(z)});for(var R in M){var k;A&&(k=Object.getOwnPropertyDescriptor(A,R)),!(k&&k.set==null)&&(I[R]=N(M[R],j-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(M),R=0;R<F.length;R++){var U=F[R],ne=Object.getOwnPropertyDescriptor(M,U);ne&&!ne.enumerable&&!E||(I[U]=N(M[U],j-1),ne.enumerable||Object.defineProperty(I,U,{enumerable:!1}))}if(E)for(var ue=Object.getOwnPropertyNames(M),R=0;R<ue.length;R++){var K=ue[R],ne=Object.getOwnPropertyDescriptor(M,K);ne&&ne.enumerable||(I[K]=N(M[K],j-1),Object.defineProperty(I,K,{enumerable:!1}))}return I}return N(g,y)}h.clonePrototype=function(_){if(_===null)return null;var y=function(){};return y.prototype=_,new y};function a(g){return Object.prototype.toString.call(g)}h.__objToStr=a;function u(g){return typeof g=="object"&&a(g)==="[object Date]"}h.__isDate=u;function d(g){return typeof g=="object"&&a(g)==="[object Array]"}h.__isArray=d;function p(g){return typeof g=="object"&&a(g)==="[object RegExp]"}h.__isRegExp=p;function O(g){var _="";return g.global&&(_+="g"),g.ignoreCase&&(_+="i"),g.multiline&&(_+="m"),_}return h.__getRegExpFlags=O,h})();typeof n=="object"&&n.exports&&(n.exports=o)}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function I(A,q){var R=[],k=!0,F=!1,U=void 0;try{for(var ne=A[Symbol.iterator](),ue;!(k=(ue=ne.next()).done)&&(R.push(ue.value),!(q&&R.length===q));k=!0);}catch(K){F=!0,U=K}finally{try{!k&&ne.return&&ne.return()}finally{if(F)throw U}}return R}return function(A,q){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return I(A,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function I(A,q){for(var R=0;R<q.length;R++){var k=q[R];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(A,k.key,k)}}return function(A,q,R){return q&&I(A.prototype,q),R&&I(A,R),A}})(),c=function I(A,q,R){A===null&&(A=Function.prototype);var k=Object.getOwnPropertyDescriptor(A,q);if(k===void 0){var F=Object.getPrototypeOf(A);return F===null?void 0:I(F,q,R)}else{if("value"in k)return k.value;var U=k.get;return U===void 0?void 0:U.call(R)}},f=o(0),h=m(f),a=o(8),u=m(a),d=o(4),p=m(d),O=o(16),g=m(O),_=o(13),y=m(_),w=o(25),E=m(w);function m(I){return I&&I.__esModule?I:{default:I}}function S(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function C(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function N(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}function M(I){return I instanceof p.default||I instanceof d.BlockEmbed}var j=(function(I){N(A,I);function A(q,R){S(this,A);var k=C(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q));return k.emitter=R.emitter,Array.isArray(R.whitelist)&&(k.whitelist=R.whitelist.reduce(function(F,U){return F[U]=!0,F},{})),k.domNode.addEventListener("DOMNodeInserted",function(){}),k.optimize(),k.enable(),k}return l(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(R,k){var F=this.line(R),U=s(F,2),ne=U[0],ue=U[1],K=this.line(R+k),W=s(K,1),z=W[0];if(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,R,k),z!=null&&ne!==z&&ue>0){if(ne instanceof d.BlockEmbed||z instanceof d.BlockEmbed){this.optimize();return}if(ne instanceof y.default){var Q=ne.newlineIndex(ne.length(),!0);if(Q>-1&&(ne=ne.split(Q+1),ne===z)){this.optimize();return}}else if(z instanceof y.default){var re=z.newlineIndex(0);re>-1&&z.split(re+1)}var Z=z.children.head instanceof g.default?null:z.children.head;ne.moveChildren(z,Z),ne.remove()}this.optimize()}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",R)}},{key:"formatAt",value:function(R,k,F,U){this.whitelist!=null&&!this.whitelist[F]||(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,R,k,F,U),this.optimize())}},{key:"insertAt",value:function(R,k,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[k])){if(R>=this.length())if(F==null||h.default.query(k,h.default.Scope.BLOCK)==null){var U=h.default.create(this.statics.defaultChild);this.appendChild(U),F==null&&k.endsWith(`
55
+ `)&&(k=k.slice(0,-1)),U.insertAt(0,k,F)}else{var ne=h.default.create(k,F);this.appendChild(ne)}else c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,R,k,F);this.optimize()}}},{key:"insertBefore",value:function(R,k){if(R.statics.scope===h.default.Scope.INLINE_BLOT){var F=h.default.create(this.statics.defaultChild);F.appendChild(R),R=F}c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,R,k)}},{key:"leaf",value:function(R){return this.path(R).pop()||[null,-1]}},{key:"line",value:function(R){return R===this.length()?this.line(R-1):this.descendant(M,R)}},{key:"lines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function U(ne,ue,K){var W=[],z=K;return ne.children.forEachAt(ue,K,function(Q,re,Z){M(Q)?W.push(Q):Q instanceof h.default.Container&&(W=W.concat(U(Q,re,z))),z-=Z}),W};return F(this,R,k)}},{key:"optimize",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,R,k),R.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,R,k))}},{key:"path",value:function(R){return c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,R).slice(1)}},{key:"update",value:function(R){if(this.batch!==!0){var k=u.default.sources.USER;typeof R=="string"&&(k=R),Array.isArray(R)||(R=this.observer.takeRecords()),R.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,k,R),c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,R.concat([])),R.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,k,R)}}}]),A})(h.default.Scroll);j.blotName="scroll",j.className="ql-editor",j.tagName="DIV",j.defaultChild="block",j.allowedChildren=[p.default,d.BlockEmbed,E.default],r.default=j}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},l=(function(){function H(ee,le){var de=[],pe=!0,Ee=!1,Ie=void 0;try{for(var Pe=ee[Symbol.iterator](),Ae;!(pe=(Ae=Pe.next()).done)&&(de.push(Ae.value),!(le&&de.length===le));pe=!0);}catch(Se){Ee=!0,Ie=Se}finally{try{!pe&&Pe.return&&Pe.return()}finally{if(Ee)throw Ie}}return de}return function(ee,le){if(Array.isArray(ee))return ee;if(Symbol.iterator in Object(ee))return H(ee,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function H(ee,le){for(var de=0;de<le.length;de++){var pe=le[de];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ee,pe.key,pe)}}return function(ee,le,de){return le&&H(ee.prototype,le),de&&H(ee,de),ee}})(),f=o(21),h=I(f),a=o(11),u=I(a),d=o(3),p=I(d),O=o(2),g=I(O),_=o(20),y=I(_),w=o(0),E=I(w),m=o(5),S=I(m),C=o(10),N=I(C),M=o(9),j=I(M);function I(H){return H&&H.__esModule?H:{default:H}}function A(H,ee,le){return ee in H?Object.defineProperty(H,ee,{value:le,enumerable:!0,configurable:!0,writable:!0}):H[ee]=le,H}function q(H,ee){if(!(H instanceof ee))throw new TypeError("Cannot call a class as a function")}function R(H,ee){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee&&(typeof ee=="object"||typeof ee=="function")?ee:H}function k(H,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ee);H.prototype=Object.create(ee&&ee.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),ee&&(Object.setPrototypeOf?Object.setPrototypeOf(H,ee):H.__proto__=ee)}var F=(0,N.default)("quill:keyboard"),U=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",ne=(function(H){k(ee,H),c(ee,null,[{key:"match",value:function(de,pe){return pe=X(pe),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Ee){return!!pe[Ee]!==de[Ee]&&pe[Ee]!==null})?!1:pe.key===(de.which||de.keyCode)}}]);function ee(le,de){q(this,ee);var pe=R(this,(ee.__proto__||Object.getPrototypeOf(ee)).call(this,le,de));return pe.bindings={},Object.keys(pe.options.bindings).forEach(function(Ee){Ee==="list autofill"&&le.scroll.whitelist!=null&&!le.scroll.whitelist.list||pe.options.bindings[Ee]&&pe.addBinding(pe.options.bindings[Ee])}),pe.addBinding({key:ee.keys.ENTER,shiftKey:null},Q),pe.addBinding({key:ee.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0},K),pe.addBinding({key:ee.keys.DELETE},{collapsed:!0},W)):(pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},K),pe.addBinding({key:ee.keys.DELETE},{collapsed:!0,suffix:/^.?$/},W)),pe.addBinding({key:ee.keys.BACKSPACE},{collapsed:!1},z),pe.addBinding({key:ee.keys.DELETE},{collapsed:!1},z),pe.addBinding({key:ee.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},K),pe.listen(),pe}return c(ee,[{key:"addBinding",value:function(de){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ie=X(de);if(Ie==null||Ie.key==null)return F.warn("Attempted to add invalid keyboard binding",Ie);typeof pe=="function"&&(pe={handler:pe}),typeof Ee=="function"&&(Ee={handler:Ee}),Ie=(0,p.default)(Ie,pe,Ee),this.bindings[Ie.key]=this.bindings[Ie.key]||[],this.bindings[Ie.key].push(Ie)}},{key:"listen",value:function(){var de=this;this.quill.root.addEventListener("keydown",function(pe){if(!pe.defaultPrevented){var Ee=pe.which||pe.keyCode,Ie=(de.bindings[Ee]||[]).filter(function(We){return ee.match(pe,We)});if(Ie.length!==0){var Pe=de.quill.getSelection();if(!(Pe==null||!de.quill.hasFocus())){var Ae=de.quill.getLine(Pe.index),Se=l(Ae,2),Ge=Se[0],Oe=Se[1],ge=de.quill.getLeaf(Pe.index),me=l(ge,2),ke=me[0],Ne=me[1],we=Pe.length===0?[ke,Ne]:de.quill.getLeaf(Pe.index+Pe.length),qe=l(we,2),je=qe[0],ze=qe[1],lt=ke instanceof E.default.Text?ke.value().slice(0,Ne):"",pt=je instanceof E.default.Text?je.value().slice(ze):"",Ze={collapsed:Pe.length===0,empty:Pe.length===0&&Ge.length()<=1,format:de.quill.getFormat(Pe),offset:Oe,prefix:lt,suffix:pt},It=Ie.some(function(We){if(We.collapsed!=null&&We.collapsed!==Ze.collapsed||We.empty!=null&&We.empty!==Ze.empty||We.offset!=null&&We.offset!==Ze.offset)return!1;if(Array.isArray(We.format)){if(We.format.every(function(it){return Ze.format[it]==null}))return!1}else if(s(We.format)==="object"&&!Object.keys(We.format).every(function(it){return We.format[it]===!0?Ze.format[it]!=null:We.format[it]===!1?Ze.format[it]==null:(0,u.default)(We.format[it],Ze.format[it])}))return!1;return We.prefix!=null&&!We.prefix.test(Ze.prefix)||We.suffix!=null&&!We.suffix.test(Ze.suffix)?!1:We.handler.call(de,Pe,Ze)!==!0});It&&pe.preventDefault()}}}})}}]),ee})(j.default);ne.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},ne.DEFAULTS={bindings:{bold:Z("bold"),italic:Z("italic"),underline:Z("underline"),indent:{key:ne.keys.TAB,format:["blockquote","indent","list"],handler:function(ee,le){if(le.collapsed&&le.offset!==0)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:ne.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(ee,le){if(le.collapsed&&le.offset!==0)return!0;this.quill.format("indent","-1",S.default.sources.USER)}},"outdent backspace":{key:ne.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(ee,le){le.format.indent!=null?this.quill.format("indent","-1",S.default.sources.USER):le.format.list!=null&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":re(!0),"outdent code-block":re(!1),"remove tab":{key:ne.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(ee){this.quill.deleteText(ee.index-1,1,S.default.sources.USER)}},tab:{key:ne.keys.TAB,handler:function(ee){this.quill.history.cutoff();var le=new g.default().retain(ee.index).delete(ee.length).insert(" ");this.quill.updateContents(le,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index+1,S.default.sources.SILENT)}},"list empty enter":{key:ne.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(ee,le){this.quill.format("list",!1,S.default.sources.USER),le.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:ne.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(ee){var le=this.quill.getLine(ee.index),de=l(le,2),pe=de[0],Ee=de[1],Ie=(0,p.default)({},pe.formats(),{list:"checked"}),Pe=new g.default().retain(ee.index).insert(`
56
+ `,Ie).retain(pe.length()-Ee-1).retain(1,{list:"unchecked"});this.quill.updateContents(Pe,S.default.sources.USER),this.quill.setSelection(ee.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:ne.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(ee,le){var de=this.quill.getLine(ee.index),pe=l(de,2),Ee=pe[0],Ie=pe[1],Pe=new g.default().retain(ee.index).insert(`
57
+ `,le.format).retain(Ee.length()-Ie-1).retain(1,{header:null});this.quill.updateContents(Pe,S.default.sources.USER),this.quill.setSelection(ee.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(ee,le){var de=le.prefix.length,pe=this.quill.getLine(ee.index),Ee=l(pe,2),Ie=Ee[0],Pe=Ee[1];if(Pe>de)return!0;var Ae=void 0;switch(le.prefix.trim()){case"[]":case"[ ]":Ae="unchecked";break;case"[x]":Ae="checked";break;case"-":case"*":Ae="bullet";break;default:Ae="ordered"}this.quill.insertText(ee.index," ",S.default.sources.USER),this.quill.history.cutoff();var Se=new g.default().retain(ee.index-Pe).delete(de+1).retain(Ie.length()-2-Pe).retain(1,{list:Ae});this.quill.updateContents(Se,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ee.index-de,S.default.sources.SILENT)}},"code exit":{key:ne.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(ee){var le=this.quill.getLine(ee.index),de=l(le,2),pe=de[0],Ee=de[1],Ie=new g.default().retain(ee.index+pe.length()-Ee-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Ie,S.default.sources.USER)}},"embed left":ue(ne.keys.LEFT,!1),"embed left shift":ue(ne.keys.LEFT,!0),"embed right":ue(ne.keys.RIGHT,!1),"embed right shift":ue(ne.keys.RIGHT,!0)}};function ue(H,ee){var le,de=H===ne.keys.LEFT?"prefix":"suffix";return le={key:H,shiftKey:ee,altKey:null},A(le,de,/^$/),A(le,"handler",function(Ee){var Ie=Ee.index;H===ne.keys.RIGHT&&(Ie+=Ee.length+1);var Pe=this.quill.getLeaf(Ie),Ae=l(Pe,1),Se=Ae[0];return Se instanceof E.default.Embed?(H===ne.keys.LEFT?ee?this.quill.setSelection(Ee.index-1,Ee.length+1,S.default.sources.USER):this.quill.setSelection(Ee.index-1,S.default.sources.USER):ee?this.quill.setSelection(Ee.index,Ee.length+1,S.default.sources.USER):this.quill.setSelection(Ee.index+Ee.length+1,S.default.sources.USER),!1):!0}),le}function K(H,ee){if(!(H.index===0||this.quill.getLength()<=1)){var le=this.quill.getLine(H.index),de=l(le,1),pe=de[0],Ee={};if(ee.offset===0){var Ie=this.quill.getLine(H.index-1),Pe=l(Ie,1),Ae=Pe[0];if(Ae!=null&&Ae.length()>1){var Se=pe.formats(),Ge=this.quill.getFormat(H.index-1,1);Ee=y.default.attributes.diff(Se,Ge)||{}}}var Oe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(ee.prefix)?2:1;this.quill.deleteText(H.index-Oe,Oe,S.default.sources.USER),Object.keys(Ee).length>0&&this.quill.formatLine(H.index-Oe,Oe,Ee,S.default.sources.USER),this.quill.focus()}}function W(H,ee){var le=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(ee.suffix)?2:1;if(!(H.index>=this.quill.getLength()-le)){var de={},pe=0,Ee=this.quill.getLine(H.index),Ie=l(Ee,1),Pe=Ie[0];if(ee.offset>=Pe.length()-1){var Ae=this.quill.getLine(H.index+1),Se=l(Ae,1),Ge=Se[0];if(Ge){var Oe=Pe.formats(),ge=this.quill.getFormat(H.index,1);de=y.default.attributes.diff(Oe,ge)||{},pe=Ge.length()}}this.quill.deleteText(H.index,le,S.default.sources.USER),Object.keys(de).length>0&&this.quill.formatLine(H.index+pe-1,le,de,S.default.sources.USER)}}function z(H){var ee=this.quill.getLines(H),le={};if(ee.length>1){var de=ee[0].formats(),pe=ee[ee.length-1].formats();le=y.default.attributes.diff(pe,de)||{}}this.quill.deleteText(H,S.default.sources.USER),Object.keys(le).length>0&&this.quill.formatLine(H.index,1,le,S.default.sources.USER),this.quill.setSelection(H.index,S.default.sources.SILENT),this.quill.focus()}function Q(H,ee){var le=this;H.length>0&&this.quill.scroll.deleteAt(H.index,H.length);var de=Object.keys(ee.format).reduce(function(pe,Ee){return E.default.query(Ee,E.default.Scope.BLOCK)&&!Array.isArray(ee.format[Ee])&&(pe[Ee]=ee.format[Ee]),pe},{});this.quill.insertText(H.index,`
58
+ `,de,S.default.sources.USER),this.quill.setSelection(H.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(ee.format).forEach(function(pe){de[pe]==null&&(Array.isArray(ee.format[pe])||pe!=="link"&&le.quill.format(pe,ee.format[pe],S.default.sources.USER))})}function re(H){return{key:ne.keys.TAB,shiftKey:!H,format:{"code-block":!0},handler:function(le){var de=E.default.query("code-block"),pe=le.index,Ee=le.length,Ie=this.quill.scroll.descendant(de,pe),Pe=l(Ie,2),Ae=Pe[0],Se=Pe[1];if(Ae!=null){var Ge=this.quill.getIndex(Ae),Oe=Ae.newlineIndex(Se,!0)+1,ge=Ae.newlineIndex(Ge+Se+Ee),me=Ae.domNode.textContent.slice(Oe,ge).split(`
59
+ `);Se=0,me.forEach(function(ke,Ne){H?(Ae.insertAt(Oe+Se,de.TAB),Se+=de.TAB.length,Ne===0?pe+=de.TAB.length:Ee+=de.TAB.length):ke.startsWith(de.TAB)&&(Ae.deleteAt(Oe+Se,de.TAB.length),Se-=de.TAB.length,Ne===0?pe-=de.TAB.length:Ee-=de.TAB.length),Se+=ke.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(pe,Ee,S.default.sources.SILENT)}}}}function Z(H){return{key:H[0].toUpperCase(),shortKey:!0,handler:function(le,de){this.quill.format(H,!de.format[H],S.default.sources.USER)}}}function X(H){if(typeof H=="string"||typeof H=="number")return X({key:H});if((typeof H>"u"?"undefined":s(H))==="object"&&(H=(0,h.default)(H,!1)),typeof H.key=="string")if(ne.keys[H.key.toUpperCase()]!=null)H.key=ne.keys[H.key.toUpperCase()];else if(H.key.length===1)H.key=H.key.toUpperCase().charCodeAt(0);else return null;return H.shortKey&&(H[U]=H.shortKey,delete H.shortKey),H}r.default=ne,r.SHORTKEY=U}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function y(w,E){var m=[],S=!0,C=!1,N=void 0;try{for(var M=w[Symbol.iterator](),j;!(S=(j=M.next()).done)&&(m.push(j.value),!(E&&m.length===E));S=!0);}catch(I){C=!0,N=I}finally{try{!S&&M.return&&M.return()}finally{if(C)throw N}}return m}return function(w,E){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return y(w,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=function y(w,E,m){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,E);if(S===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:y(C,E,m)}else{if("value"in S)return S.value;var N=S.get;return N===void 0?void 0:N.call(m)}},c=(function(){function y(w,E){for(var m=0;m<E.length;m++){var S=E[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,E,m){return E&&y(w.prototype,E),m&&y(w,m),w}})(),f=o(0),h=d(f),a=o(7),u=d(a);function d(y){return y&&y.__esModule?y:{default:y}}function p(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function O(y,w){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:y}function g(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(y,w):y.__proto__=w)}var _=(function(y){g(w,y),c(w,null,[{key:"value",value:function(){}}]);function w(E,m){p(this,w);var S=O(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,E));return S.selection=m,S.textNode=document.createTextNode(w.CONTENTS),S.domNode.appendChild(S.textNode),S._length=0,S}return c(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(m,S){if(this._length!==0)return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,m,S);for(var C=this,N=0;C!=null&&C.statics.scope!==h.default.Scope.BLOCK_BLOT;)N+=C.offset(C.parent),C=C.parent;C!=null&&(this._length=w.CONTENTS.length,C.optimize(),C.formatAt(N,w.CONTENTS.length,m,S),this._length=0)}},{key:"index",value:function(m,S){return m===this.textNode?0:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,S)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var m=this.textNode,S=this.selection.getNativeRange(),C=void 0,N=void 0,M=void 0;if(S!=null&&S.start.node===m&&S.end.node===m){var j=[m,S.start.offset,S.end.offset];C=j[0],N=j[1],M=j[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var I=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof u.default?(C=this.next.domNode,this.next.insertAt(0,I),this.textNode.data=w.CONTENTS):(this.textNode.data=I,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),N!=null){var A=[N,M].map(function(R){return Math.max(0,Math.min(C.data.length,R-1))}),q=s(A,2);return N=q[0],M=q[1],{startNode:C,startOffset:N,endNode:C,endOffset:M}}}}},{key:"update",value:function(m,S){var C=this;if(m.some(function(M){return M.type==="characterData"&&M.target===C.textNode})){var N=this.restore();N&&(S.range=N)}}},{key:"value",value:function(){return""}}]),w})(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",r.default=_}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=h(s),c=o(4),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(){return a(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(l.default.Container);p.allowedChildren=[f.default,c.BlockEmbed,p],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var s=(function(){function _(y,w){for(var E=0;E<w.length;E++){var m=w[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,w,E){return w&&_(y.prototype,w),E&&_(y,E),y}})(),l=function _(y,w,E){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,w);if(m===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:_(S,w,E)}else{if("value"in m)return m.value;var C=m.get;return C===void 0?void 0:C.call(E)}},c=o(0),f=h(c);function h(_){return _&&_.__esModule?_:{default:_}}function a(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function u(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function d(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var p=(function(_){d(y,_);function y(){return a(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"value",value:function(E){var m=l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,E);return m.startsWith("rgb(")?(m=m.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+m.split(",").map(function(S){return("00"+parseInt(S).toString(16)).slice(-2)}).join("")):m}}]),y})(f.default.Attributor.Style),O=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),g=new p("color","color",{scope:f.default.Scope.INLINE});r.ColorAttributor=p,r.ColorClass=O,r.ColorStyle=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var s=(function(){function g(_,y){for(var w=0;w<y.length;w++){var E=y[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,y,w){return y&&g(_.prototype,y),w&&g(_,w),_}})(),l=function g(_,y,w){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,y);if(E===void 0){var m=Object.getPrototypeOf(_);return m===null?void 0:g(m,y,w)}else{if("value"in E)return E.value;var S=E.get;return S===void 0?void 0:S.call(w)}},c=o(6),f=h(c);function h(g){return g&&g.__esModule?g:{default:g}}function a(g,_){if(!(g instanceof _))throw new TypeError("Cannot call a class as a function")}function u(g,_){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:g}function d(g,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);g.prototype=Object.create(_&&_.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(g,_):g.__proto__=_)}var p=(function(g){d(_,g);function _(){return a(this,_),u(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return s(_,[{key:"format",value:function(w,E){if(w!==this.statics.blotName||!E)return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,E);E=this.constructor.sanitize(E),this.domNode.setAttribute("href",E)}}],[{key:"create",value:function(w){var E=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,w);return w=this.sanitize(w),E.setAttribute("href",w),E.setAttribute("rel","noopener noreferrer"),E.setAttribute("target","_blank"),E}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return O(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_})(f.default);p.blotName="link",p.tagName="A",p.SANITIZED_URL="about:blank",p.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function O(g,_){var y=document.createElement("a");y.href=g;var w=y.href.slice(0,y.href.indexOf(":"));return _.indexOf(w)>-1}r.default=p,r.sanitize=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},l=(function(){function _(y,w){for(var E=0;E<w.length;E++){var m=w[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,w,E){return w&&_(y.prototype,w),E&&_(y,E),y}})(),c=o(23),f=u(c),h=o(107),a=u(h);function u(_){return _&&_.__esModule?_:{default:_}}function d(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}var p=0;function O(_,y){_.setAttribute(y,_.getAttribute(y)!=="true")}var g=(function(){function _(y){var w=this;d(this,_),this.select=y,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(){w.togglePicker()}),this.label.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),E.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return l(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),O(this.label,"aria-expanded"),O(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var E=this,m=document.createElement("span");return m.tabIndex="0",m.setAttribute("role","button"),m.classList.add("ql-picker-item"),w.hasAttribute("value")&&m.setAttribute("data-value",w.getAttribute("value")),w.textContent&&m.setAttribute("data-label",w.textContent),m.addEventListener("click",function(){E.selectItem(m,!0)}),m.addEventListener("keydown",function(S){switch(S.keyCode){case f.default.keys.ENTER:E.selectItem(m,!0),S.preventDefault();break;case f.default.keys.ESCAPE:E.escape(),S.preventDefault();break}}),m}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=a.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,E=document.createElement("span");E.classList.add("ql-picker-options"),E.setAttribute("aria-hidden","true"),E.tabIndex="-1",E.id="ql-picker-options-"+p,p+=1,this.label.setAttribute("aria-controls",E.id),this.options=E,[].slice.call(this.select.options).forEach(function(m){var S=w.buildItem(m);E.appendChild(S),m.selected===!0&&w.selectItem(S)}),this.container.appendChild(E)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(E){w.container.setAttribute(E.name,E.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.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(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=this.container.querySelector(".ql-selected");if(w!==m&&(m?.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),E))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var S=document.createEvent("Event");S.initEvent("change",!0,!0),this.select.dispatchEvent(S)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var E=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(E)}else this.selectItem(null);var m=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",m)}}]),_})();r.default=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(0),l=F(s),c=o(5),f=F(c),h=o(4),a=F(h),u=o(16),d=F(u),p=o(25),O=F(p),g=o(24),_=F(g),y=o(35),w=F(y),E=o(6),m=F(E),S=o(22),C=F(S),N=o(7),M=F(N),j=o(55),I=F(j),A=o(42),q=F(A),R=o(23),k=F(R);function F(U){return U&&U.__esModule?U:{default:U}}f.default.register({"blots/block":a.default,"blots/block/embed":h.BlockEmbed,"blots/break":d.default,"blots/container":O.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":m.default,"blots/scroll":C.default,"blots/text":M.default,"modules/clipboard":I.default,"modules/history":q.default,"modules/keyboard":k.default}),l.default.register(a.default,d.default,_.default,m.default,C.default,M.default),r.default=f.default}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(1),l=(function(){function c(f){this.domNode=f,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(f){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return s.create(f)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},c.prototype.deleteAt=function(f,h){var a=this.isolate(f,h);a.remove()},c.prototype.formatAt=function(f,h,a,u){var d=this.isolate(f,h);if(s.query(a,s.Scope.BLOT)!=null&&u)d.wrap(a,u);else if(s.query(a,s.Scope.ATTRIBUTE)!=null){var p=s.create(this.statics.scope);d.wrap(p),p.format(a,u)}},c.prototype.insertAt=function(f,h,a){var u=a==null?s.create("text",h):s.create(h,a),d=this.split(f);this.parent.insertBefore(u,d)},c.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var a=null;f.children.insertBefore(this,h),h!=null&&(a=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=a)&&f.domNode.insertBefore(this.domNode,a),this.parent=f,this.attach()},c.prototype.isolate=function(f,h){var a=this.split(f);return a.split(h),a},c.prototype.length=function(){return 1},c.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},c.prototype.optimize=function(f){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},c.prototype.replaceWith=function(f,h){var a=typeof f=="string"?s.create(f,h):f;return a.replace(this),a},c.prototype.split=function(f,h){return f===0?this:this.next},c.prototype.update=function(f,h){},c.prototype.wrap=function(f,h){var a=typeof f=="string"?s.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(a,this.next),a.appendChild(this),a},c.blotName="abstract",c})();r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(12),l=o(32),c=o(33),f=o(1),h=(function(){function a(u){this.attributes={},this.domNode=u,this.build()}return a.prototype.attribute=function(u,d){d?u.add(this.domNode,d)&&(u.value(this.domNode)!=null?this.attributes[u.attrName]=u:delete this.attributes[u.attrName]):(u.remove(this.domNode),delete this.attributes[u.attrName])},a.prototype.build=function(){var u=this;this.attributes={};var d=s.default.keys(this.domNode),p=l.default.keys(this.domNode),O=c.default.keys(this.domNode);d.concat(p).concat(O).forEach(function(g){var _=f.query(g,f.Scope.ATTRIBUTE);_ instanceof s.default&&(u.attributes[_.attrName]=_)})},a.prototype.copy=function(u){var d=this;Object.keys(this.attributes).forEach(function(p){var O=d.attributes[p].value(d.domNode);u.format(p,O)})},a.prototype.move=function(u){var d=this;this.copy(u),Object.keys(this.attributes).forEach(function(p){d.attributes[p].remove(d.domNode)}),this.attributes={}},a.prototype.values=function(){var u=this;return Object.keys(this.attributes).reduce(function(d,p){return d[p]=u.attributes[p].value(u.domNode),d},{})},a})();r.default=h}),(function(n,r,o){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])};return function(a,u){h(a,u);function d(){this.constructor=a}a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12);function c(h,a){var u=h.getAttribute("class")||"";return u.split(/\s+/).filter(function(d){return d.indexOf(a+"-")===0})}var f=(function(h){s(a,h);function a(){return h!==null&&h.apply(this,arguments)||this}return a.keys=function(u){return(u.getAttribute("class")||"").split(/\s+/).map(function(d){return d.split("-").slice(0,-1).join("-")})},a.prototype.add=function(u,d){return this.canAdd(u,d)?(this.remove(u),u.classList.add(this.keyName+"-"+d),!0):!1},a.prototype.remove=function(u){var d=c(u,this.keyName);d.forEach(function(p){u.classList.remove(p)}),u.classList.length===0&&u.removeAttribute("class")},a.prototype.value=function(u){var d=c(u,this.keyName)[0]||"",p=d.slice(this.keyName.length+1);return this.canAdd(u,p)?p:""},a})(l.default);r.default=f}),(function(n,r,o){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])};return function(a,u){h(a,u);function d(){this.constructor=a}a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(12);function c(h){var a=h.split("-"),u=a.slice(1).map(function(d){return d[0].toUpperCase()+d.slice(1)}).join("");return a[0]+u}var f=(function(h){s(a,h);function a(){return h!==null&&h.apply(this,arguments)||this}return a.keys=function(u){return(u.getAttribute("style")||"").split(";").map(function(d){var p=d.split(":");return p[0].trim()})},a.prototype.add=function(u,d){return this.canAdd(u,d)?(u.style[c(this.keyName)]=d,!0):!1},a.prototype.remove=function(u){u.style[c(this.keyName)]="",u.getAttribute("style")||u.removeAttribute("style")},a.prototype.value=function(u){var d=u.style[c(this.keyName)];return this.canAdd(u,d)?d:""},a})(l.default);r.default=f}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function f(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,a,u){return a&&f(h.prototype,a),u&&f(h,u),h}})();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var c=(function(){function f(h,a){l(this,f),this.quill=h,this.options=a,this.modules={}}return s(f,[{key:"init",value:function(){var a=this;Object.keys(this.options.modules).forEach(function(u){a.modules[u]==null&&a.addModule(u)})}},{key:"addModule",value:function(a){var u=this.quill.constructor.import("modules/"+a);return this.modules[a]=new u(this.quill,this.options.modules[a]||{}),this.modules[a]}}]),f})();c.DEFAULTS={modules:{}},c.themes={default:c},r.default=c}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function y(w,E){for(var m=0;m<E.length;m++){var S=E[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,E,m){return E&&y(w.prototype,E),m&&y(w,m),w}})(),l=function y(w,E,m){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,E);if(S===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:y(C,E,m)}else{if("value"in S)return S.value;var N=S.get;return N===void 0?void 0:N.call(m)}},c=o(0),f=u(c),h=o(7),a=u(h);function u(y){return y&&y.__esModule?y:{default:y}}function d(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function p(y,w){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:y}function O(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(y,w):y.__proto__=w)}var g="\uFEFF",_=(function(y){O(w,y);function w(E){d(this,w);var m=p(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,E));return m.contentNode=document.createElement("span"),m.contentNode.setAttribute("contenteditable",!1),[].slice.call(m.domNode.childNodes).forEach(function(S){m.contentNode.appendChild(S)}),m.leftGuard=document.createTextNode(g),m.rightGuard=document.createTextNode(g),m.domNode.appendChild(m.leftGuard),m.domNode.appendChild(m.contentNode),m.domNode.appendChild(m.rightGuard),m}return s(w,[{key:"index",value:function(m,S){return m===this.leftGuard?0:m===this.rightGuard?1:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,m,S)}},{key:"restore",value:function(m){var S=void 0,C=void 0,N=m.data.split(g).join("");if(m===this.leftGuard)if(this.prev instanceof a.default){var M=this.prev.length();this.prev.insertAt(M,N),S={startNode:this.prev.domNode,startOffset:M+N.length}}else C=document.createTextNode(N),this.parent.insertBefore(f.default.create(C),this),S={startNode:C,startOffset:N.length};else m===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,N),S={startNode:this.next.domNode,startOffset:N.length}):(C=document.createTextNode(N),this.parent.insertBefore(f.default.create(C),this.next),S={startNode:C,startOffset:N.length}));return m.data=g,S}},{key:"update",value:function(m,S){var C=this;m.forEach(function(N){if(N.type==="characterData"&&(N.target===C.leftGuard||N.target===C.rightGuard)){var M=C.restore(N.target);M&&(S.range=M)}})}}]),w})(f.default.Embed);r.default=_}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var s=o(0),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new l.default.Attributor.Attribute("align","align",f),a=new l.default.Attributor.Class("align","ql-align",f),u=new l.default.Attributor.Style("align","text-align",f);r.AlignAttribute=h,r.AlignClass=a,r.AlignStyle=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var s=o(0),l=f(s),c=o(26);function f(u){return u&&u.__esModule?u:{default:u}}var h=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),a=new c.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});r.BackgroundClass=h,r.BackgroundStyle=a}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var s=o(0),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},h=new l.default.Attributor.Attribute("direction","dir",f),a=new l.default.Attributor.Class("direction","ql-direction",f),u=new l.default.Attributor.Style("direction","direction",f);r.DirectionAttribute=h,r.DirectionClass=a,r.DirectionStyle=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var s=(function(){function y(w,E){for(var m=0;m<E.length;m++){var S=E[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,E,m){return E&&y(w.prototype,E),m&&y(w,m),w}})(),l=function y(w,E,m){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,E);if(S===void 0){var C=Object.getPrototypeOf(w);return C===null?void 0:y(C,E,m)}else{if("value"in S)return S.value;var N=S.get;return N===void 0?void 0:N.call(m)}},c=o(0),f=h(c);function h(y){return y&&y.__esModule?y:{default:y}}function a(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function u(y,w){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:y}function d(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(y,w):y.__proto__=w)}var p={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},O=new f.default.Attributor.Class("font","ql-font",p),g=(function(y){d(w,y);function w(){return a(this,w),u(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(m){return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,m).replace(/["']/g,"")}}]),w})(f.default.Attributor.Style),_=new g("font","font-family",p);r.FontStyle=_,r.FontClass=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var s=o(0),l=c(s);function c(a){return a&&a.__esModule?a:{default:a}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new l.default.Attributor.Style("size","font-size",{scope:l.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=f,r.SizeStyle=h}),(function(n,r,o){n.exports={align:{"":o(76),center:o(77),right:o(78),justify:o(79)},background:o(80),blockquote:o(81),bold:o(82),clean:o(83),code:o(58),"code-block":o(58),color:o(84),direction:{"":o(85),rtl:o(86)},float:{center:o(87),full:o(88),left:o(89),right:o(90)},formula:o(91),header:{1:o(92),2:o(93)},italic:o(94),image:o(95),indent:{"+1":o(96),"-1":o(97)},link:o(98),list:{ordered:o(99),bullet:o(100),check:o(101)},script:{sub:o(102),super:o(103)},strike:o(104),underline:o(105),video:o(106)}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var s=(function(){function E(m,S){for(var C=0;C<S.length;C++){var N=S[C];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(m,N.key,N)}}return function(m,S,C){return S&&E(m.prototype,S),C&&E(m,C),m}})(),l=o(0),c=d(l),f=o(5),h=d(f),a=o(9),u=d(a);function d(E){return E&&E.__esModule?E:{default:E}}function p(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function O(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function g(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var _=(function(E){g(m,E);function m(S,C){p(this,m);var N=O(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,S,C));return N.lastRecorded=0,N.ignoreChange=!1,N.clear(),N.quill.on(h.default.events.EDITOR_CHANGE,function(M,j,I,A){M!==h.default.events.TEXT_CHANGE||N.ignoreChange||(!N.options.userOnly||A===h.default.sources.USER?N.record(j,I):N.transform(j))}),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 s(m,[{key:"change",value:function(C,N){if(this.stack[C].length!==0){var M=this.stack[C].pop();this.stack[N].push(M),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(M[C],h.default.sources.USER),this.ignoreChange=!1;var j=w(M[C]);this.quill.setSelection(j)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(C,N){if(C.ops.length!==0){this.stack.redo=[];var M=this.quill.getContents().diff(N),j=Date.now();if(this.lastRecorded+this.options.delay>j&&this.stack.undo.length>0){var I=this.stack.undo.pop();M=M.compose(I.undo),C=I.redo.compose(C)}else this.lastRecorded=j;this.stack.undo.push({redo:C,undo:M}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(C){this.stack.undo.forEach(function(N){N.undo=C.transform(N.undo,!0),N.redo=C.transform(N.redo,!0)}),this.stack.redo.forEach(function(N){N.undo=C.transform(N.undo,!0),N.redo=C.transform(N.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),m})(u.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function y(E){var m=E.ops[E.ops.length-1];return m==null?!1:m.insert!=null?typeof m.insert=="string"&&m.insert.endsWith(`
60
+ `):m.attributes!=null?Object.keys(m.attributes).some(function(S){return c.default.query(S,c.default.Scope.BLOCK)!=null}):!1}function w(E){var m=E.reduce(function(C,N){return C+=N.delete||0,C},0),S=E.length()-m;return y(E)&&(S-=1),S}r.default=_,r.getLastChangeIndex=w}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var s=(function(){function Q(re,Z){for(var X=0;X<Z.length;X++){var H=Z[X];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(re,H.key,H)}}return function(re,Z,X){return Z&&Q(re.prototype,Z),X&&Q(re,X),re}})(),l=function Q(re,Z,X){re===null&&(re=Function.prototype);var H=Object.getOwnPropertyDescriptor(re,Z);if(H===void 0){var ee=Object.getPrototypeOf(re);return ee===null?void 0:Q(ee,Z,X)}else{if("value"in H)return H.value;var le=H.get;return le===void 0?void 0:le.call(X)}},c=o(3),f=j(c),h=o(2),a=j(h),u=o(8),d=j(u),p=o(23),O=j(p),g=o(34),_=j(g),y=o(59),w=j(y),E=o(60),m=j(E),S=o(28),C=j(S),N=o(61),M=j(N);function j(Q){return Q&&Q.__esModule?Q:{default:Q}}function I(Q,re){if(!(Q instanceof re))throw new TypeError("Cannot call a class as a function")}function A(Q,re){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:Q}function q(Q,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);Q.prototype=Object.create(re&&re.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,re):Q.__proto__=re)}var R=[!1,"center","right","justify"],k=["#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"],F=[!1,"serif","monospace"],U=["1","2","3",!1],ne=["small",!1,"large","huge"],ue=(function(Q){q(re,Q);function re(Z,X){I(this,re);var H=A(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,Z,X)),ee=function le(de){if(!document.body.contains(Z.root))return document.body.removeEventListener("click",le);H.tooltip!=null&&!H.tooltip.root.contains(de.target)&&document.activeElement!==H.tooltip.textbox&&!H.quill.hasFocus()&&H.tooltip.hide(),H.pickers!=null&&H.pickers.forEach(function(pe){pe.container.contains(de.target)||pe.close()})};return Z.emitter.listenDOM("click",document.body,ee),H}return s(re,[{key:"addModule",value:function(X){var H=l(re.prototype.__proto__||Object.getPrototypeOf(re.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar(H),H}},{key:"buildButtons",value:function(X,H){X.forEach(function(ee){var le=ee.getAttribute("class")||"";le.split(/\s+/).forEach(function(de){if(de.startsWith("ql-")&&(de=de.slice(3),H[de]!=null))if(de==="direction")ee.innerHTML=H[de][""]+H[de].rtl;else if(typeof H[de]=="string")ee.innerHTML=H[de];else{var pe=ee.value||"";pe!=null&&H[de][pe]&&(ee.innerHTML=H[de][pe])}})})}},{key:"buildPickers",value:function(X,H){var ee=this;this.pickers=X.map(function(de){if(de.classList.contains("ql-align"))return de.querySelector("option")==null&&z(de,R),new m.default(de,H.align);if(de.classList.contains("ql-background")||de.classList.contains("ql-color")){var pe=de.classList.contains("ql-background")?"background":"color";return de.querySelector("option")==null&&z(de,k,pe==="background"?"#ffffff":"#000000"),new w.default(de,H[pe])}else return de.querySelector("option")==null&&(de.classList.contains("ql-font")?z(de,F):de.classList.contains("ql-header")?z(de,U):de.classList.contains("ql-size")&&z(de,ne)),new C.default(de)});var le=function(){ee.pickers.forEach(function(pe){pe.update()})};this.quill.on(d.default.events.EDITOR_CHANGE,le)}}]),re})(_.default);ue.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var re=this,Z=this.container.querySelector("input.ql-image[type=file]");Z==null&&(Z=document.createElement("input"),Z.setAttribute("type","file"),Z.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Z.classList.add("ql-image"),Z.addEventListener("change",function(){if(Z.files!=null&&Z.files[0]!=null){var X=new FileReader;X.onload=function(H){var ee=re.quill.getSelection(!0);re.quill.updateContents(new a.default().retain(ee.index).delete(ee.length).insert({image:H.target.result}),d.default.sources.USER),re.quill.setSelection(ee.index+1,d.default.sources.SILENT),Z.value=""},X.readAsDataURL(Z.files[0])}}),this.container.appendChild(Z)),Z.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var K=(function(Q){q(re,Q);function re(Z,X){I(this,re);var H=A(this,(re.__proto__||Object.getPrototypeOf(re)).call(this,Z,X));return H.textbox=H.root.querySelector('input[type="text"]'),H.listen(),H}return s(re,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function(H){O.default.match(H,"enter")?(X.save(),H.preventDefault()):O.default.match(H,"escape")&&(X.cancel(),H.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),H!=null?this.textbox.value=H:X!==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-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var H=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,d.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,d.default.sources.USER)),this.quill.root.scrollTop=H;break}case"video":X=W(X);case"formula":{if(!X)break;var ee=this.quill.getSelection(!0);if(ee!=null){var le=ee.index+ee.length;this.quill.insertEmbed(le,this.root.getAttribute("data-mode"),X,d.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(le+1," ",d.default.sources.USER),this.quill.setSelection(le+2,d.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),re})(M.default);function W(Q){var re=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 re?(re[1]||"https")+"://www.youtube.com/embed/"+re[2]+"?showinfo=0":(re=Q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(re[1]||"https")+"://player.vimeo.com/video/"+re[2]+"/":Q}function z(Q,re){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;re.forEach(function(X){var H=document.createElement("option");X===Z?H.setAttribute("selected","selected"):H.setAttribute("value",X),Q.appendChild(H)})}r.BaseTooltip=K,r.default=ue}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function l(){this.head=this.tail=null,this.length=0}return l.prototype.append=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},l.prototype.contains=function(c){for(var f,h=this.iterator();f=h();)if(f===c)return!0;return!1},l.prototype.insertBefore=function(c,f){c&&(c.next=f,f!=null?(c.prev=f.prev,f.prev!=null&&(f.prev.next=c),f.prev=c,f===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},l.prototype.offset=function(c){for(var f=0,h=this.head;h!=null;){if(h===c)return f;f+=h.length(),h=h.next}return-1},l.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},l.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var f=c;return c!=null&&(c=c.next),f}},l.prototype.find=function(c,f){f===void 0&&(f=!1);for(var h,a=this.iterator();h=a();){var u=h.length();if(c<u||f&&c===u&&(h.next==null||h.next.length()!==0))return[h,c];c-=u}return[null,0]},l.prototype.forEach=function(c){for(var f,h=this.iterator();f=h();)c(f)},l.prototype.forEachAt=function(c,f,h){if(!(f<=0))for(var a=this.find(c),u=a[0],d=a[1],p,O=c-d,g=this.iterator(u);(p=g())&&O<c+f;){var _=p.length();c>O?h(p,c-O,Math.min(f,O+_-c)):h(p,0,Math.min(_,c+f-O)),O+=_}},l.prototype.map=function(c){return this.reduce(function(f,h){return f.push(c(h)),f},[])},l.prototype.reduce=function(c,f){for(var h,a=this.iterator();h=a();)f=c(f,h);return f},l})();r.default=s}),(function(n,r,o){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var O in p)p.hasOwnProperty(O)&&(d[O]=p[O])};return function(d,p){u(d,p);function O(){this.constructor=d}d.prototype=p===null?Object.create(p):(O.prototype=p.prototype,new O)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(17),c=o(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,a=(function(u){s(d,u);function d(p){var O=u.call(this,p)||this;return O.scroll=O,O.observer=new MutationObserver(function(g){O.update(g)}),O.observer.observe(O.domNode,f),O.attach(),O}return d.prototype.detach=function(){u.prototype.detach.call(this),this.observer.disconnect()},d.prototype.deleteAt=function(p,O){this.update(),p===0&&O===this.length()?this.children.forEach(function(g){g.remove()}):u.prototype.deleteAt.call(this,p,O)},d.prototype.formatAt=function(p,O,g,_){this.update(),u.prototype.formatAt.call(this,p,O,g,_)},d.prototype.insertAt=function(p,O,g){this.update(),u.prototype.insertAt.call(this,p,O,g)},d.prototype.optimize=function(p,O){var g=this;p===void 0&&(p=[]),O===void 0&&(O={}),u.prototype.optimize.call(this,O);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)p.push(_.pop());for(var y=function(S,C){C===void 0&&(C=!0),!(S==null||S===g)&&S.domNode.parentNode!=null&&(S.domNode[c.DATA_KEY].mutations==null&&(S.domNode[c.DATA_KEY].mutations=[]),C&&y(S.parent))},w=function(S){S.domNode[c.DATA_KEY]==null||S.domNode[c.DATA_KEY].mutations==null||(S instanceof l.default&&S.children.forEach(w),S.optimize(O))},E=p,m=0;E.length>0;m+=1){if(m>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(E.forEach(function(S){var C=c.find(S.target,!0);C!=null&&(C.domNode===S.target&&(S.type==="childList"?(y(c.find(S.previousSibling,!1)),[].forEach.call(S.addedNodes,function(N){var M=c.find(N,!1);y(M,!1),M instanceof l.default&&M.children.forEach(function(j){y(j,!1)})})):S.type==="attributes"&&y(C.prev)),y(C))}),this.children.forEach(w),E=[].slice.call(this.observer.takeRecords()),_=E.slice();_.length>0;)p.push(_.pop())}},d.prototype.update=function(p,O){var g=this;O===void 0&&(O={}),p=p||this.observer.takeRecords(),p.map(function(_){var y=c.find(_.target,!0);return y==null?null:y.domNode[c.DATA_KEY].mutations==null?(y.domNode[c.DATA_KEY].mutations=[_],y):(y.domNode[c.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===g||_.domNode[c.DATA_KEY]==null||_.update(_.domNode[c.DATA_KEY].mutations||[],O)}),this.domNode[c.DATA_KEY].mutations!=null&&u.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,O),this.optimize(p,O)},d.blotName="scroll",d.defaultChild="block",d.scope=c.Scope.BLOCK_BLOT,d.tagName="DIV",d})(l.default);r.default=a}),(function(n,r,o){var s=this&&this.__extends||(function(){var a=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){a(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(18),c=o(1);function f(a,u){if(Object.keys(a).length!==Object.keys(u).length)return!1;for(var d in a)if(a[d]!==u[d])return!1;return!0}var h=(function(a){s(u,a);function u(){return a!==null&&a.apply(this,arguments)||this}return u.formats=function(d){if(d.tagName!==u.tagName)return a.formats.call(this,d)},u.prototype.format=function(d,p){var O=this;d===this.statics.blotName&&!p?(this.children.forEach(function(g){g instanceof l.default||(g=g.wrap(u.blotName,!0)),O.attributes.copy(g)}),this.unwrap()):a.prototype.format.call(this,d,p)},u.prototype.formatAt=function(d,p,O,g){if(this.formats()[O]!=null||c.query(O,c.Scope.ATTRIBUTE)){var _=this.isolate(d,p);_.format(O,g)}else a.prototype.formatAt.call(this,d,p,O,g)},u.prototype.optimize=function(d){a.prototype.optimize.call(this,d);var p=this.formats();if(Object.keys(p).length===0)return this.unwrap();var O=this.next;O instanceof u&&O.prev===this&&f(p,O.formats())&&(O.moveChildren(this),O.remove())},u.blotName="inline",u.scope=c.Scope.INLINE_BLOT,u.tagName="SPAN",u})(l.default);r.default=h}),(function(n,r,o){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])};return function(a,u){h(a,u);function d(){this.constructor=a}a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(18),c=o(1),f=(function(h){s(a,h);function a(){return h!==null&&h.apply(this,arguments)||this}return a.formats=function(u){var d=c.query(a.blotName).tagName;if(u.tagName!==d)return h.formats.call(this,u)},a.prototype.format=function(u,d){c.query(u,c.Scope.BLOCK)!=null&&(u===this.statics.blotName&&!d?this.replaceWith(a.blotName):h.prototype.format.call(this,u,d))},a.prototype.formatAt=function(u,d,p,O){c.query(p,c.Scope.BLOCK)!=null?this.format(p,O):h.prototype.formatAt.call(this,u,d,p,O)},a.prototype.insertAt=function(u,d,p){if(p==null||c.query(d,c.Scope.INLINE)!=null)h.prototype.insertAt.call(this,u,d,p);else{var O=this.split(u),g=c.create(d,p);O.parent.insertBefore(g,O)}},a.prototype.update=function(u,d){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,u,d)},a.blotName="block",a.scope=c.Scope.BLOCK_BLOT,a.tagName="P",a})(l.default);r.default=f}),(function(n,r,o){var s=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,a){h.__proto__=a}||function(h,a){for(var u in a)a.hasOwnProperty(u)&&(h[u]=a[u])};return function(h,a){f(h,a);function u(){this.constructor=h}h.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(19),c=(function(f){s(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(a){},h.prototype.format=function(a,u){f.prototype.formatAt.call(this,0,this.length(),a,u)},h.prototype.formatAt=function(a,u,d,p){a===0&&u===this.length()?this.format(d,p):f.prototype.formatAt.call(this,a,u,d,p)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h})(l.default);r.default=c}),(function(n,r,o){var s=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var d in u)u.hasOwnProperty(d)&&(a[d]=u[d])};return function(a,u){h(a,u);function d(){this.constructor=a}a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var l=o(19),c=o(1),f=(function(h){s(a,h);function a(u){var d=h.call(this,u)||this;return d.text=d.statics.value(d.domNode),d}return a.create=function(u){return document.createTextNode(u)},a.value=function(u){var d=u.data;return d.normalize&&(d=d.normalize()),d},a.prototype.deleteAt=function(u,d){this.domNode.data=this.text=this.text.slice(0,u)+this.text.slice(u+d)},a.prototype.index=function(u,d){return this.domNode===u?d:-1},a.prototype.insertAt=function(u,d,p){p==null?(this.text=this.text.slice(0,u)+d+this.text.slice(u),this.domNode.data=this.text):h.prototype.insertAt.call(this,u,d,p)},a.prototype.length=function(){return this.text.length},a.prototype.optimize=function(u){h.prototype.optimize.call(this,u),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof a&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},a.prototype.position=function(u,d){return[this.domNode,u]},a.prototype.split=function(u,d){if(d===void 0&&(d=!1),!d){if(u===0)return this;if(u===this.length())return this.next}var p=c.create(this.domNode.splitText(u));return this.parent.insertBefore(p,this.next),this.text=this.statics.value(this.domNode),p},a.prototype.update=function(u,d){var p=this;u.some(function(O){return O.type==="characterData"&&O.target===p.domNode})&&(this.text=this.statics.value(this.domNode))},a.prototype.value=function(){return this.text},a.blotName="text",a.scope=c.Scope.INLINE_BLOT,a})(l.default);r.default=f}),(function(n,r,o){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,f){return arguments.length>1&&!this.contains(c)==!f?f:l.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,f){return f=f||0,this.substr(f,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=c.length;var a=h.indexOf(c,f);return a!==-1&&a===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),a=h.length>>>0,u=arguments[1],d,p=0;p<a;p++)if(d=h[p],f.call(u,d,p,h))return d}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(n,r){var o=-1,s=1,l=0;function c(m,S,C){if(m==S)return m?[[l,m]]:[];(C<0||m.length<C)&&(C=null);var N=u(m,S),M=m.substring(0,N);m=m.substring(N),S=S.substring(N),N=d(m,S);var j=m.substring(m.length-N);m=m.substring(0,m.length-N),S=S.substring(0,S.length-N);var I=f(m,S);return M&&I.unshift([l,M]),j&&I.push([l,j]),O(I),C!=null&&(I=y(I,C)),I=w(I),I}function f(m,S){var C;if(!m)return[[s,S]];if(!S)return[[o,m]];var N=m.length>S.length?m:S,M=m.length>S.length?S:m,j=N.indexOf(M);if(j!=-1)return C=[[s,N.substring(0,j)],[l,M],[s,N.substring(j+M.length)]],m.length>S.length&&(C[0][0]=C[2][0]=o),C;if(M.length==1)return[[o,m],[s,S]];var I=p(m,S);if(I){var A=I[0],q=I[1],R=I[2],k=I[3],F=I[4],U=c(A,R),ne=c(q,k);return U.concat([[l,F]],ne)}return h(m,S)}function h(m,S){for(var C=m.length,N=S.length,M=Math.ceil((C+N)/2),j=M,I=2*M,A=new Array(I),q=new Array(I),R=0;R<I;R++)A[R]=-1,q[R]=-1;A[j+1]=0,q[j+1]=0;for(var k=C-N,F=k%2!=0,U=0,ne=0,ue=0,K=0,W=0;W<M;W++){for(var z=-W+U;z<=W-ne;z+=2){var Q=j+z,re;z==-W||z!=W&&A[Q-1]<A[Q+1]?re=A[Q+1]:re=A[Q-1]+1;for(var Z=re-z;re<C&&Z<N&&m.charAt(re)==S.charAt(Z);)re++,Z++;if(A[Q]=re,re>C)ne+=2;else if(Z>N)U+=2;else if(F){var X=j+k-z;if(X>=0&&X<I&&q[X]!=-1){var H=C-q[X];if(re>=H)return a(m,S,re,Z)}}}for(var ee=-W+ue;ee<=W-K;ee+=2){var X=j+ee,H;ee==-W||ee!=W&&q[X-1]<q[X+1]?H=q[X+1]:H=q[X-1]+1;for(var le=H-ee;H<C&&le<N&&m.charAt(C-H-1)==S.charAt(N-le-1);)H++,le++;if(q[X]=H,H>C)K+=2;else if(le>N)ue+=2;else if(!F){var Q=j+k-ee;if(Q>=0&&Q<I&&A[Q]!=-1){var re=A[Q],Z=j+re-Q;if(H=C-H,re>=H)return a(m,S,re,Z)}}}}return[[o,m],[s,S]]}function a(m,S,C,N){var M=m.substring(0,C),j=S.substring(0,N),I=m.substring(C),A=S.substring(N),q=c(M,j),R=c(I,A);return q.concat(R)}function u(m,S){if(!m||!S||m.charAt(0)!=S.charAt(0))return 0;for(var C=0,N=Math.min(m.length,S.length),M=N,j=0;C<M;)m.substring(j,M)==S.substring(j,M)?(C=M,j=C):N=M,M=Math.floor((N-C)/2+C);return M}function d(m,S){if(!m||!S||m.charAt(m.length-1)!=S.charAt(S.length-1))return 0;for(var C=0,N=Math.min(m.length,S.length),M=N,j=0;C<M;)m.substring(m.length-M,m.length-j)==S.substring(S.length-M,S.length-j)?(C=M,j=C):N=M,M=Math.floor((N-C)/2+C);return M}function p(m,S){var C=m.length>S.length?m:S,N=m.length>S.length?S:m;if(C.length<4||N.length*2<C.length)return null;function M(ne,ue,K){for(var W=ne.substring(K,K+Math.floor(ne.length/4)),z=-1,Q="",re,Z,X,H;(z=ue.indexOf(W,z+1))!=-1;){var ee=u(ne.substring(K),ue.substring(z)),le=d(ne.substring(0,K),ue.substring(0,z));Q.length<le+ee&&(Q=ue.substring(z-le,z)+ue.substring(z,z+ee),re=ne.substring(0,K-le),Z=ne.substring(K+ee),X=ue.substring(0,z-le),H=ue.substring(z+ee))}return Q.length*2>=ne.length?[re,Z,X,H,Q]:null}var j=M(C,N,Math.ceil(C.length/4)),I=M(C,N,Math.ceil(C.length/2)),A;if(!j&&!I)return null;I?j?A=j[4].length>I[4].length?j:I:A=I:A=j;var q,R,k,F;m.length>S.length?(q=A[0],R=A[1],k=A[2],F=A[3]):(k=A[0],F=A[1],q=A[2],R=A[3]);var U=A[4];return[q,R,k,F,U]}function O(m){m.push([l,""]);for(var S=0,C=0,N=0,M="",j="",I;S<m.length;)switch(m[S][0]){case s:N++,j+=m[S][1],S++;break;case o:C++,M+=m[S][1],S++;break;case l:C+N>1?(C!==0&&N!==0&&(I=u(j,M),I!==0&&(S-C-N>0&&m[S-C-N-1][0]==l?m[S-C-N-1][1]+=j.substring(0,I):(m.splice(0,0,[l,j.substring(0,I)]),S++),j=j.substring(I),M=M.substring(I)),I=d(j,M),I!==0&&(m[S][1]=j.substring(j.length-I)+m[S][1],j=j.substring(0,j.length-I),M=M.substring(0,M.length-I))),C===0?m.splice(S-N,C+N,[s,j]):N===0?m.splice(S-C,C+N,[o,M]):m.splice(S-C-N,C+N,[o,M],[s,j]),S=S-C-N+(C?1:0)+(N?1:0)+1):S!==0&&m[S-1][0]==l?(m[S-1][1]+=m[S][1],m.splice(S,1)):S++,N=0,C=0,M="",j="";break}m[m.length-1][1]===""&&m.pop();var A=!1;for(S=1;S<m.length-1;)m[S-1][0]==l&&m[S+1][0]==l&&(m[S][1].substring(m[S][1].length-m[S-1][1].length)==m[S-1][1]?(m[S][1]=m[S-1][1]+m[S][1].substring(0,m[S][1].length-m[S-1][1].length),m[S+1][1]=m[S-1][1]+m[S+1][1],m.splice(S-1,1),A=!0):m[S][1].substring(0,m[S+1][1].length)==m[S+1][1]&&(m[S-1][1]+=m[S+1][1],m[S][1]=m[S][1].substring(m[S+1][1].length)+m[S+1][1],m.splice(S+1,1),A=!0)),S++;A&&O(m)}var g=c;g.INSERT=s,g.DELETE=o,g.EQUAL=l,n.exports=g;function _(m,S){if(S===0)return[l,m];for(var C=0,N=0;N<m.length;N++){var M=m[N];if(M[0]===o||M[0]===l){var j=C+M[1].length;if(S===j)return[N+1,m];if(S<j){m=m.slice();var I=S-C,A=[M[0],M[1].slice(0,I)],q=[M[0],M[1].slice(I)];return m.splice(N,1,A,q),[N+1,m]}else C=j}}throw new Error("cursor_pos is out of bounds!")}function y(m,S){var C=_(m,S),N=C[1],M=C[0],j=N[M],I=N[M+1];if(j==null)return m;if(j[0]!==l)return m;if(I!=null&&j[1]+I[1]===I[1]+j[1])return N.splice(M,2,I,j),E(N,M,2);if(I!=null&&I[1].indexOf(j[1])===0){N.splice(M,2,[I[0],j[1]],[0,j[1]]);var A=I[1].slice(j[1].length);return A.length>0&&N.splice(M+2,0,[I[0],A]),E(N,M,3)}else return m}function w(m){for(var S=!1,C=function(I){return I.charCodeAt(0)>=56320&&I.charCodeAt(0)<=57343},N=function(I){return I.charCodeAt(I.length-1)>=55296&&I.charCodeAt(I.length-1)<=56319},M=2;M<m.length;M+=1)m[M-2][0]===l&&N(m[M-2][1])&&m[M-1][0]===o&&C(m[M-1][1])&&m[M][0]===s&&C(m[M][1])&&(S=!0,m[M-1][1]=m[M-2][1].slice(-1)+m[M-1][1],m[M][1]=m[M-2][1].slice(-1)+m[M][1],m[M-2][1]=m[M-2][1].slice(0,-1));if(!S)return m;for(var j=[],M=0;M<m.length;M+=1)m[M][1].length>0&&j.push(m[M]);return j}function E(m,S,C){for(var N=S+C-1;N>=0&&N>=S-1;N--)if(N+1<m.length){var M=m[N],j=m[N+1];M[0]===j[1]&&m.splice(N,2,[M[0],M[1]+j[1]])}return m}}),(function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:o,r.shim=o;function o(s){var l=[];for(var c in s)l.push(c);return l}}),(function(n,r){var o=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";r=n.exports=o?s:l,r.supported=s;function s(c){return Object.prototype.toString.call(c)=="[object Arguments]"}r.unsupported=l;function l(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}}),(function(n,r){var o=Object.prototype.hasOwnProperty,s="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(s=!1));function c(h,a,u){this.fn=h,this.context=a,this.once=u||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var a=[],u,d;if(this._eventsCount===0)return a;for(d in u=this._events)o.call(u,d)&&a.push(s?d.slice(1):d);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(u)):a},f.prototype.listeners=function(a,u){var d=s?s+a:a,p=this._events[d];if(u)return!!p;if(!p)return[];if(p.fn)return[p.fn];for(var O=0,g=p.length,_=new Array(g);O<g;O++)_[O]=p[O].fn;return _},f.prototype.emit=function(a,u,d,p,O,g){var _=s?s+a:a;if(!this._events[_])return!1;var y=this._events[_],w=arguments.length,E,m;if(y.fn){switch(y.once&&this.removeListener(a,y.fn,void 0,!0),w){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,d),!0;case 4:return y.fn.call(y.context,u,d,p),!0;case 5:return y.fn.call(y.context,u,d,p,O),!0;case 6:return y.fn.call(y.context,u,d,p,O,g),!0}for(m=1,E=new Array(w-1);m<w;m++)E[m-1]=arguments[m];y.fn.apply(y.context,E)}else{var S=y.length,C;for(m=0;m<S;m++)switch(y[m].once&&this.removeListener(a,y[m].fn,void 0,!0),w){case 1:y[m].fn.call(y[m].context);break;case 2:y[m].fn.call(y[m].context,u);break;case 3:y[m].fn.call(y[m].context,u,d);break;case 4:y[m].fn.call(y[m].context,u,d,p);break;default:if(!E)for(C=1,E=new Array(w-1);C<w;C++)E[C-1]=arguments[C];y[m].fn.apply(y[m].context,E)}}return!0},f.prototype.on=function(a,u,d){var p=new c(u,d||this),O=s?s+a:a;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],p]:this._events[O].push(p):(this._events[O]=p,this._eventsCount++),this},f.prototype.once=function(a,u,d){var p=new c(u,d||this,!0),O=s?s+a:a;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],p]:this._events[O].push(p):(this._events[O]=p,this._eventsCount++),this},f.prototype.removeListener=function(a,u,d,p){var O=s?s+a:a;if(!this._events[O])return this;if(!u)return--this._eventsCount===0?this._events=new l:delete this._events[O],this;var g=this._events[O];if(g.fn)g.fn===u&&(!p||g.once)&&(!d||g.context===d)&&(--this._eventsCount===0?this._events=new l:delete this._events[O]);else{for(var _=0,y=[],w=g.length;_<w;_++)(g[_].fn!==u||p&&!g[_].once||d&&g[_].context!==d)&&y.push(g[_]);y.length?this._events[O]=y.length===1?y[0]:y:--this._eventsCount===0?this._events=new l:delete this._events[O]}return this},f.prototype.removeAllListeners=function(a){var u;return a?(u=s?s+a:a,this._events[u]&&(--this._eventsCount===0?this._events=new l:delete this._events[u])):(this._events=new l,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=s,f.EventEmitter=f,typeof n<"u"&&(n.exports=f)}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ge){return typeof ge}:function(ge){return ge&&typeof Symbol=="function"&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge},l=(function(){function ge(me,ke){var Ne=[],we=!0,qe=!1,je=void 0;try{for(var ze=me[Symbol.iterator](),lt;!(we=(lt=ze.next()).done)&&(Ne.push(lt.value),!(ke&&Ne.length===ke));we=!0);}catch(pt){qe=!0,je=pt}finally{try{!we&&ze.return&&ze.return()}finally{if(qe)throw je}}return Ne}return function(me,ke){if(Array.isArray(me))return me;if(Symbol.iterator in Object(me))return ge(me,ke);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),c=(function(){function ge(me,ke){for(var Ne=0;Ne<ke.length;Ne++){var we=ke[Ne];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ke,Ne){return ke&&ge(me.prototype,ke),Ne&&ge(me,Ne),me}})(),f=o(3),h=q(f),a=o(2),u=q(a),d=o(0),p=q(d),O=o(5),g=q(O),_=o(10),y=q(_),w=o(9),E=q(w),m=o(36),S=o(37),C=o(13),N=q(C),M=o(26),j=o(38),I=o(39),A=o(40);function q(ge){return ge&&ge.__esModule?ge:{default:ge}}function R(ge,me,ke){return me in ge?Object.defineProperty(ge,me,{value:ke,enumerable:!0,configurable:!0,writable:!0}):ge[me]=ke,ge}function k(ge,me){if(!(ge instanceof me))throw new TypeError("Cannot call a class as a function")}function F(ge,me){if(!ge)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:ge}function U(ge,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);ge.prototype=Object.create(me&&me.prototype,{constructor:{value:ge,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(ge,me):ge.__proto__=me)}var ne=(0,y.default)("quill:clipboard"),ue="__ql-matcher",K=[[Node.TEXT_NODE,Oe],[Node.TEXT_NODE,Ae],["br",Ee],[Node.ELEMENT_NODE,Ae],[Node.ELEMENT_NODE,pe],[Node.ELEMENT_NODE,Se],[Node.ELEMENT_NODE,de],[Node.ELEMENT_NODE,Ge],["li",Pe],["b",le.bind(le,"bold")],["i",le.bind(le,"italic")],["style",Ie]],W=[m.AlignAttribute,j.DirectionAttribute].reduce(function(ge,me){return ge[me.keyName]=me,ge},{}),z=[m.AlignStyle,S.BackgroundStyle,M.ColorStyle,j.DirectionStyle,I.FontStyle,A.SizeStyle].reduce(function(ge,me){return ge[me.keyName]=me,ge},{}),Q=(function(ge){U(me,ge);function me(ke,Ne){k(this,me);var we=F(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ke,Ne));return we.quill.root.addEventListener("paste",we.onPaste.bind(we)),we.container=we.quill.addContainer("ql-clipboard"),we.container.setAttribute("contenteditable",!0),we.container.setAttribute("tabindex",-1),we.matchers=[],K.concat(we.options.matchers).forEach(function(qe){var je=l(qe,2),ze=je[0],lt=je[1];!Ne.matchVisual&&lt===Se||we.addMatcher(ze,lt)}),we}return c(me,[{key:"addMatcher",value:function(Ne,we){this.matchers.push([Ne,we])}},{key:"convert",value:function(Ne){if(typeof Ne=="string")return this.container.innerHTML=Ne.replace(/\>\r?\n +\</g,"><"),this.convert();var we=this.quill.getFormat(this.quill.selection.savedRange.index);if(we[N.default.blotName]){var qe=this.container.innerText;return this.container.innerHTML="",new u.default().insert(qe,R({},N.default.blotName,we[N.default.blotName]))}var je=this.prepareMatching(),ze=l(je,2),lt=ze[0],pt=ze[1],Ze=ee(this.container,lt,pt);return X(Ze,`
61
+ `)&&Ze.ops[Ze.ops.length-1].attributes==null&&(Ze=Ze.compose(new u.default().retain(Ze.length()-1).delete(1))),ne.log("convert",this.container.innerHTML,Ze),this.container.innerHTML="",Ze}},{key:"dangerouslyPasteHTML",value:function(Ne,we){var qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof Ne=="string")this.quill.setContents(this.convert(Ne),we),this.quill.setSelection(0,g.default.sources.SILENT);else{var je=this.convert(we);this.quill.updateContents(new u.default().retain(Ne).concat(je),qe),this.quill.setSelection(Ne+je.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(Ne){var we=this;if(!(Ne.defaultPrevented||!this.quill.isEnabled())){var qe=this.quill.getSelection(),je=new u.default().retain(qe.index),ze=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){je=je.concat(we.convert()).delete(qe.length),we.quill.updateContents(je,g.default.sources.USER),we.quill.setSelection(je.length()-qe.length,g.default.sources.SILENT),we.quill.scrollingContainer.scrollTop=ze,we.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Ne=this,we=[],qe=[];return this.matchers.forEach(function(je){var ze=l(je,2),lt=ze[0],pt=ze[1];switch(lt){case Node.TEXT_NODE:qe.push(pt);break;case Node.ELEMENT_NODE:we.push(pt);break;default:[].forEach.call(Ne.container.querySelectorAll(lt),function(Ze){Ze[ue]=Ze[ue]||[],Ze[ue].push(pt)});break}}),[we,qe]}}]),me})(E.default);Q.DEFAULTS={matchers:[],matchVisual:!0};function re(ge,me,ke){return(typeof me>"u"?"undefined":s(me))==="object"?Object.keys(me).reduce(function(Ne,we){return re(Ne,we,me[we])},ge):ge.reduce(function(Ne,we){return we.attributes&&we.attributes[me]?Ne.push(we):Ne.insert(we.insert,(0,h.default)({},R({},me,ke),we.attributes))},new u.default)}function Z(ge){if(ge.nodeType!==Node.ELEMENT_NODE)return{};var me="__ql-computed-style";return ge[me]||(ge[me]=window.getComputedStyle(ge))}function X(ge,me){for(var ke="",Ne=ge.ops.length-1;Ne>=0&&ke.length<me.length;--Ne){var we=ge.ops[Ne];if(typeof we.insert!="string")break;ke=we.insert+ke}return ke.slice(-1*me.length)===me}function H(ge){if(ge.childNodes.length===0)return!1;var me=Z(ge);return["block","list-item"].indexOf(me.display)>-1}function ee(ge,me,ke){return ge.nodeType===ge.TEXT_NODE?ke.reduce(function(Ne,we){return we(ge,Ne)},new u.default):ge.nodeType===ge.ELEMENT_NODE?[].reduce.call(ge.childNodes||[],function(Ne,we){var qe=ee(we,me,ke);return we.nodeType===ge.ELEMENT_NODE&&(qe=me.reduce(function(je,ze){return ze(we,je)},qe),qe=(we[ue]||[]).reduce(function(je,ze){return ze(we,je)},qe)),Ne.concat(qe)},new u.default):new u.default}function le(ge,me,ke){return re(ke,ge,!0)}function de(ge,me){var ke=p.default.Attributor.Attribute.keys(ge),Ne=p.default.Attributor.Class.keys(ge),we=p.default.Attributor.Style.keys(ge),qe={};return ke.concat(Ne).concat(we).forEach(function(je){var ze=p.default.query(je,p.default.Scope.ATTRIBUTE);ze!=null&&(qe[ze.attrName]=ze.value(ge),qe[ze.attrName])||(ze=W[je],ze!=null&&(ze.attrName===je||ze.keyName===je)&&(qe[ze.attrName]=ze.value(ge)||void 0),ze=z[je],ze!=null&&(ze.attrName===je||ze.keyName===je)&&(ze=z[je],qe[ze.attrName]=ze.value(ge)||void 0))}),Object.keys(qe).length>0&&(me=re(me,qe)),me}function pe(ge,me){var ke=p.default.query(ge);if(ke==null)return me;if(ke.prototype instanceof p.default.Embed){var Ne={},we=ke.value(ge);we!=null&&(Ne[ke.blotName]=we,me=new u.default().insert(Ne,ke.formats(ge)))}else typeof ke.formats=="function"&&(me=re(me,ke.blotName,ke.formats(ge)));return me}function Ee(ge,me){return X(me,`
62
62
  `)||me.insert(`
63
63
  `),me}function Ie(){return new u.default}function Pe(ge,me){var ke=p.default.query(ge);if(ke==null||ke.blotName!=="list-item"||!X(me,`
64
64
  `))return me;for(var Ne=-1,we=ge.parentNode;!we.classList.contains("ql-clipboard");)(p.default.query(we)||{}).blotName==="list"&&(Ne+=1),we=we.parentNode;return Ne<=0?me:me.compose(new u.default().retain(me.length()-1).retain(1,{indent:Ne}))}function Ae(ge,me){return X(me,`
65
- `)||($(ge)||me.length()>0&&ge.nextSibling&&$(ge.nextSibling))&&me.insert(`
66
- `),me}function xe(ge,me){if($(ge)&&ge.nextElementSibling!=null&&!X(me,`
65
+ `)||(H(ge)||me.length()>0&&ge.nextSibling&&H(ge.nextSibling))&&me.insert(`
66
+ `),me}function Se(ge,me){if(H(ge)&&ge.nextElementSibling!=null&&!X(me,`
67
67
 
68
68
  `)){var ke=ge.offsetHeight+parseFloat(Z(ge).marginTop)+parseFloat(Z(ge).marginBottom);ge.nextElementSibling.offsetTop>ge.offsetTop+ke*1.5&&me.insert(`
69
- `)}return me}function Ge(ge,me){var ke={},Ne=ge.style||{};return Ne.fontStyle&&Z(ge).fontStyle==="italic"&&(ke.italic=!0),Ne.fontWeight&&(Z(ge).fontWeight.startsWith("bold")||parseInt(Z(ge).fontWeight)>=700)&&(ke.bold=!0),Object.keys(ke).length>0&&(me=re(me,ke)),parseFloat(Ne.textIndent||0)>0&&(me=new u.default().insert(" ").concat(me)),me}function Oe(ge,me){var ke=ge.data;if(ge.parentNode.tagName==="O:P")return me.insert(ke.trim());if(ke.trim().length===0&&ge.parentNode.classList.contains("ql-clipboard"))return me;if(!Z(ge.parentNode).whiteSpace.startsWith("pre")){var Ne=function(qe,je){return je=je.replace(/[^\u00a0]/g,""),je.length<1&&qe?" ":je};ke=ke.replace(/\r\n/g," ").replace(/\n/g," "),ke=ke.replace(/\s\s+/g,Ne.bind(Ne,!0)),(ge.previousSibling==null&&$(ge.parentNode)||ge.previousSibling!=null&&$(ge.previousSibling))&&(ke=ke.replace(/^\s+/,Ne.bind(Ne,!1))),(ge.nextSibling==null&&$(ge.parentNode)||ge.nextSibling!=null&&$(ge.nextSibling))&&(ke=ke.replace(/\s+$/,Ne.bind(Ne,!1)))}return me.insert(ke)}r.default=Q,r.matchAttributor=de,r.matchBlot=pe,r.matchNewline=Ae,r.matchSpacing=xe,r.matchText=Oe}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(m,_){for(var g=0;g<_.length;g++){var w=_[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,_,g){return _&&O(m.prototype,_),g&&O(m,g),m}})(),l=function O(m,_,g){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,_);if(w===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:O(E,_,g)}else{if("value"in w)return w.value;var y=w.get;return y===void 0?void 0:y.call(g)}},c=o(6),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(){return a(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,[{key:"optimize",value:function(g){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,g),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),m})(f.default);p.blotName="bold",p.tagName=["STRONG","B"],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var s=(function(){function A(q,L){var k=[],F=!0,V=!1,ne=void 0;try{for(var ue=q[Symbol.iterator](),K;!(F=(K=ue.next()).done)&&(k.push(K.value),!(L&&k.length===L));F=!0);}catch(W){V=!0,ne=W}finally{try{!F&&ue.return&&ue.return()}finally{if(V)throw ne}}return k}return function(q,L){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return A(q,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function A(q,L){for(var k=0;k<L.length;k++){var F=L[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(q,F.key,F)}}return function(q,L,k){return L&&A(q.prototype,L),k&&A(q,k),q}})(),c=o(2),f=g(c),d=o(0),a=g(d),u=o(5),h=g(u),p=o(10),O=g(p),m=o(9),_=g(m);function g(A){return A&&A.__esModule?A:{default:A}}function w(A,q,L){return q in A?Object.defineProperty(A,q,{value:L,enumerable:!0,configurable:!0,writable:!0}):A[q]=L,A}function E(A,q){if(!(A instanceof q))throw new TypeError("Cannot call a class as a function")}function y(A,q){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:A}function x(A,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);A.prototype=Object.create(q&&q.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(A,q):A.__proto__=q)}var C=(0,O.default)("quill:toolbar"),N=(function(A){x(q,A);function q(L,k){E(this,q);var F=y(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,L,k));if(Array.isArray(F.options.container)){var V=document.createElement("div");j(V,F.options.container),L.container.parentNode.insertBefore(V,L.container),F.container=V}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var ne;return ne=C.error("Container required for toolbar",F.options),y(F,ne)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(ue){F.addHandler(ue,F.options.handlers[ue])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(ue){F.attach(ue)}),F.quill.on(h.default.events.EDITOR_CHANGE,function(ue,K){ue===h.default.events.SELECTION_CHANGE&&F.update(K)}),F.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){var ue=F.quill.selection.getRange(),K=s(ue,1),W=K[0];F.update(W)}),F}return l(q,[{key:"addHandler",value:function(k,F){this.handlers[k]=F}},{key:"attach",value:function(k){var F=this,V=[].find.call(k.classList,function(ue){return ue.indexOf("ql-")===0});if(V){if(V=V.slice(3),k.tagName==="BUTTON"&&k.setAttribute("type","button"),this.handlers[V]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[V]==null){C.warn("ignoring attaching to disabled format",V,k);return}if(a.default.query(V)==null){C.warn("ignoring attaching to nonexistent format",V,k);return}}var ne=k.tagName==="SELECT"?"change":"click";k.addEventListener(ne,function(ue){var K=void 0;if(k.tagName==="SELECT"){if(k.selectedIndex<0)return;var W=k.options[k.selectedIndex];W.hasAttribute("selected")?K=!1:K=W.value||!1}else k.classList.contains("ql-active")?K=!1:K=k.value||!k.hasAttribute("value"),ue.preventDefault();F.quill.focus();var B=F.quill.selection.getRange(),Q=s(B,1),re=Q[0];if(F.handlers[V]!=null)F.handlers[V].call(F,K);else if(a.default.query(V).prototype instanceof a.default.Embed){if(K=prompt("Enter "+V),!K)return;F.quill.updateContents(new f.default().retain(re.index).delete(re.length).insert(w({},V,K)),h.default.sources.USER)}else F.quill.format(V,K,h.default.sources.USER);F.update(re)}),this.controls.push([V,k])}}},{key:"update",value:function(k){var F=k==null?{}:this.quill.getFormat(k);this.controls.forEach(function(V){var ne=s(V,2),ue=ne[0],K=ne[1];if(K.tagName==="SELECT"){var W=void 0;if(k==null)W=null;else if(F[ue]==null)W=K.querySelector("option[selected]");else if(!Array.isArray(F[ue])){var B=F[ue];typeof B=="string"&&(B=B.replace(/\"/g,'\\"')),W=K.querySelector('option[value="'+B+'"]')}W==null?(K.value="",K.selectedIndex=-1):W.selected=!0}else if(k==null)K.classList.remove("ql-active");else if(K.hasAttribute("value")){var Q=F[ue]===K.getAttribute("value")||F[ue]!=null&&F[ue].toString()===K.getAttribute("value")||F[ue]==null&&!K.getAttribute("value");K.classList.toggle("ql-active",Q)}else K.classList.toggle("ql-active",F[ue]!=null)})}}]),q})(_.default);N.DEFAULTS={};function I(A,q,L){var k=document.createElement("button");k.setAttribute("type","button"),k.classList.add("ql-"+q),L!=null&&(k.value=L),A.appendChild(k)}function j(A,q){Array.isArray(q[0])||(q=[q]),q.forEach(function(L){var k=document.createElement("span");k.classList.add("ql-formats"),L.forEach(function(F){if(typeof F=="string")I(k,F);else{var V=Object.keys(F)[0],ne=F[V];Array.isArray(ne)?M(k,V,ne):I(k,V,ne)}}),A.appendChild(k)})}function M(A,q,L){var k=document.createElement("select");k.classList.add("ql-"+q),L.forEach(function(F){var V=document.createElement("option");F!==!1?V.setAttribute("value",F):V.setAttribute("selected","selected"),k.appendChild(V)}),A.appendChild(k)}N.DEFAULTS={container:null,handlers:{clean:function(){var q=this,L=this.quill.getSelection();if(L!=null)if(L.length==0){var k=this.quill.getFormat();Object.keys(k).forEach(function(F){a.default.query(F,a.default.Scope.INLINE)!=null&&q.quill.format(F,!1)})}else this.quill.removeFormat(L,h.default.sources.USER)},direction:function(q){var L=this.quill.getFormat().align;q==="rtl"&&L==null?this.quill.format("align","right",h.default.sources.USER):!q&&L==="right"&&this.quill.format("align",!1,h.default.sources.USER),this.quill.format("direction",q,h.default.sources.USER)},indent:function(q){var L=this.quill.getSelection(),k=this.quill.getFormat(L),F=parseInt(k.indent||0);if(q==="+1"||q==="-1"){var V=q==="+1"?1:-1;k.direction==="rtl"&&(V*=-1),this.quill.format("indent",F+V,h.default.sources.USER)}},link:function(q){q===!0&&(q=prompt("Enter link URL:")),this.quill.format("link",q,h.default.sources.USER)},list:function(q){var L=this.quill.getSelection(),k=this.quill.getFormat(L);q==="check"?k.list==="checked"||k.list==="unchecked"?this.quill.format("list",!1,h.default.sources.USER):this.quill.format("list","unchecked",h.default.sources.USER):this.quill.format("list",q,h.default.sources.USER)}}},r.default=N,r.addControls=j}),(function(n,r){n.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(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(m,_){for(var g=0;g<_.length;g++){var w=_[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,_,g){return _&&O(m.prototype,_),g&&O(m,g),m}})(),l=function O(m,_,g){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,_);if(w===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:O(E,_,g)}else{if("value"in w)return w.value;var y=w.get;return y===void 0?void 0:y.call(g)}},c=o(28),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(_,g){a(this,m);var w=u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,_));return w.label.innerHTML=g,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(E){E.classList.add("ql-primary")}),w}return s(m,[{key:"buildItem",value:function(g){var w=l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"buildItem",this).call(this,g);return w.style.backgroundColor=g.getAttribute("value")||"",w}},{key:"selectItem",value:function(g,w){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,g,w);var E=this.label.querySelector(".ql-color-label"),y=g&&g.getAttribute("data-value")||"";E&&(E.tagName==="line"?E.style.stroke=y:E.style.fill=y)}}]),m})(f.default);r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(m,_){for(var g=0;g<_.length;g++){var w=_[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,_,g){return _&&O(m.prototype,_),g&&O(m,g),m}})(),l=function O(m,_,g){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,_);if(w===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:O(E,_,g)}else{if("value"in w)return w.value;var y=w.get;return y===void 0?void 0:y.call(g)}},c=o(28),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(_,g){a(this,m);var w=u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(E){E.innerHTML=g[E.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(m,[{key:"selectItem",value:function(g,w){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,g,w),g=g||this.defaultItem,this.label.innerHTML=g.innerHTML}}]),m})(f.default);r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function f(d,a){for(var u=0;u<a.length;u++){var h=a[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}return function(d,a,u){return a&&f(d.prototype,a),u&&f(d,u),d}})();function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}var c=(function(){function f(d,a){var u=this;l(this,f),this.quill=d,this.boundsContainer=a||document.body,this.root=d.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){u.root.style.marginTop=-1*u.quill.root.scrollTop+"px"}),this.hide()}return s(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(a){var u=a.left+a.width/2-this.root.offsetWidth/2,h=a.bottom+this.quill.root.scrollTop;this.root.style.left=u+"px",this.root.style.top=h+"px",this.root.classList.remove("ql-flip");var p=this.boundsContainer.getBoundingClientRect(),O=this.root.getBoundingClientRect(),m=0;if(O.right>p.right&&(m=p.right-O.right,this.root.style.left=u+m+"px"),O.left<p.left&&(m=p.left-O.left,this.root.style.left=u+m+"px"),O.bottom>p.bottom){var _=O.bottom-O.top,g=a.bottom-a.top+_;this.root.style.top=h-g+"px",this.root.classList.add("ql-flip")}return m}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f})();r.default=c}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function M(A,q){var L=[],k=!0,F=!1,V=void 0;try{for(var ne=A[Symbol.iterator](),ue;!(k=(ue=ne.next()).done)&&(L.push(ue.value),!(q&&L.length===q));k=!0);}catch(K){F=!0,V=K}finally{try{!k&&ne.return&&ne.return()}finally{if(F)throw V}}return L}return function(A,q){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return M(A,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=function M(A,q,L){A===null&&(A=Function.prototype);var k=Object.getOwnPropertyDescriptor(A,q);if(k===void 0){var F=Object.getPrototypeOf(A);return F===null?void 0:M(F,q,L)}else{if("value"in k)return k.value;var V=k.get;return V===void 0?void 0:V.call(L)}},c=(function(){function M(A,q){for(var L=0;L<q.length;L++){var k=q[L];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(A,k.key,k)}}return function(A,q,L){return q&&M(A.prototype,q),L&&M(A,L),A}})(),f=o(3),d=E(f),a=o(8),u=E(a),h=o(43),p=E(h),O=o(27),m=E(O),_=o(15),g=o(41),w=E(g);function E(M){return M&&M.__esModule?M:{default:M}}function y(M,A){if(!(M instanceof A))throw new TypeError("Cannot call a class as a function")}function x(M,A){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:M}function C(M,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);M.prototype=Object.create(A&&A.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(M,A):M.__proto__=A)}var N=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],I=(function(M){C(A,M);function A(q,L){y(this,A),L.modules.toolbar!=null&&L.modules.toolbar.container==null&&(L.modules.toolbar.container=N);var k=x(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q,L));return k.quill.container.classList.add("ql-snow"),k}return c(A,[{key:"extendToolbar",value:function(L){L.container.classList.add("ql-snow"),this.buildButtons([].slice.call(L.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(L.container.querySelectorAll("select")),w.default),this.tooltip=new j(this.quill,this.options.bounds),L.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(k,F){L.handlers.link.call(L,!F.format.link)})}}]),A})(p.default);I.DEFAULTS=(0,d.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var q=this.quill.getSelection();if(q==null||q.length==0)return;var L=this.quill.getText(q);/^\S+@\S+\.\S+$/.test(L)&&L.indexOf("mailto:")!==0&&(L="mailto:"+L);var k=this.quill.theme.tooltip;k.edit("link",L)}else this.quill.format("link",!1)}}}}});var j=(function(M){C(A,M);function A(q,L){y(this,A);var k=x(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q,L));return k.preview=k.root.querySelector("a.ql-preview"),k}return c(A,[{key:"listen",value:function(){var L=this;l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(k){L.root.classList.contains("ql-editing")?L.save():L.edit("link",L.preview.textContent),k.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(k){if(L.linkRange!=null){var F=L.linkRange;L.restoreFocus(),L.quill.formatText(F,"link",!1,u.default.sources.USER),delete L.linkRange}k.preventDefault(),L.hide()}),this.quill.on(u.default.events.SELECTION_CHANGE,function(k,F,V){if(k!=null){if(k.length===0&&V===u.default.sources.USER){var ne=L.quill.scroll.descendant(m.default,k.index),ue=s(ne,2),K=ue[0],W=ue[1];if(K!=null){L.linkRange=new _.Range(k.index-W,K.length());var B=m.default.formats(K.domNode);L.preview.textContent=B,L.preview.setAttribute("href",B),L.show(),L.position(L.quill.getBounds(L.linkRange));return}}else delete L.linkRange;L.hide()}})}},{key:"show",value:function(){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A})(h.BaseTooltip);j.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(""),r.default=I}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(29),l=we(s),c=o(36),f=o(38),d=o(64),a=o(65),u=we(a),h=o(66),p=we(h),O=o(67),m=we(O),_=o(37),g=o(26),w=o(39),E=o(40),y=o(56),x=we(y),C=o(68),N=we(C),I=o(27),j=we(I),M=o(69),A=we(M),q=o(70),L=we(q),k=o(71),F=we(k),V=o(72),ne=we(V),ue=o(73),K=we(ue),W=o(13),B=we(W),Q=o(74),re=we(Q),Z=o(75),X=we(Z),$=o(57),ee=we($),le=o(41),de=we(le),pe=o(28),Ee=we(pe),Ie=o(59),Pe=we(Ie),Ae=o(60),xe=we(Ae),Ge=o(61),Oe=we(Ge),ge=o(108),me=we(ge),ke=o(62),Ne=we(ke);function we(qe){return qe&&qe.__esModule?qe:{default:qe}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":g.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":E.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":g.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":E.SizeStyle},!0),l.default.register({"formats/align":c.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":d.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":g.ColorStyle,"formats/font":w.FontClass,"formats/size":E.SizeClass,"formats/blockquote":u.default,"formats/code-block":B.default,"formats/header":p.default,"formats/list":m.default,"formats/bold":x.default,"formats/code":W.Code,"formats/italic":N.default,"formats/link":j.default,"formats/script":A.default,"formats/strike":L.default,"formats/underline":F.default,"formats/image":ne.default,"formats/video":K.default,"formats/list/item":O.ListItem,"modules/formula":re.default,"modules/syntax":X.default,"modules/toolbar":ee.default,"themes/bubble":me.default,"themes/snow":Ne.default,"ui/icons":de.default,"ui/picker":Ee.default,"ui/icon-picker":xe.default,"ui/color-picker":Pe.default,"ui/tooltip":Oe.default},!0),r.default=l.default}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var s=(function(){function m(_,g){for(var w=0;w<g.length;w++){var E=g[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,g,w){return g&&m(_.prototype,g),w&&m(_,w),_}})(),l=function m(_,g,w){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,g);if(E===void 0){var y=Object.getPrototypeOf(_);return y===null?void 0:m(y,g,w)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(w)}},c=o(0),f=d(c);function d(m){return m&&m.__esModule?m:{default:m}}function a(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function u(m,_){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:m}function h(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(m,_):m.__proto__=_)}var p=(function(m){h(_,m);function _(){return a(this,_),u(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return s(_,[{key:"add",value:function(w,E){if(E==="+1"||E==="-1"){var y=this.value(w)||0;E=E==="+1"?y+1:y-1}return E===0?(this.remove(w),!0):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,E)}},{key:"canAdd",value:function(w,E){return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,E)||l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(E))}},{key:"value",value:function(w){return parseInt(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_})(f.default.Attributor.Class),O=new p("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(4),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function d(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function a(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var u=(function(h){a(p,h);function p(){return f(this,p),d(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="blockquote",u.tagName="blockquote",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function p(O,m){for(var _=0;_<m.length;_++){var g=m[_];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(O,g.key,g)}}return function(O,m,_){return m&&p(O.prototype,m),_&&p(O,_),O}})(),l=o(4),c=f(l);function f(p){return p&&p.__esModule?p:{default:p}}function d(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function a(p,O){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:p}function u(p,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);p.prototype=Object.create(O&&O.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(p,O):p.__proto__=O)}var h=(function(p){u(O,p);function O(){return d(this,O),a(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return s(O,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),O})(c.default);h.blotName="header",h.tagName=["H1","H2","H3","H4","H5","H6"],r.default=h}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var s=(function(){function y(x,C){for(var N=0;N<C.length;N++){var I=C[N];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(x,I.key,I)}}return function(x,C,N){return C&&y(x.prototype,C),N&&y(x,N),x}})(),l=function y(x,C,N){x===null&&(x=Function.prototype);var I=Object.getOwnPropertyDescriptor(x,C);if(I===void 0){var j=Object.getPrototypeOf(x);return j===null?void 0:y(j,C,N)}else{if("value"in I)return I.value;var M=I.get;return M===void 0?void 0:M.call(N)}},c=o(0),f=p(c),d=o(4),a=p(d),u=o(25),h=p(u);function p(y){return y&&y.__esModule?y:{default:y}}function O(y,x,C){return x in y?Object.defineProperty(y,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):y[x]=C,y}function m(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function _(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function g(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var w=(function(y){g(x,y);function x(){return m(this,x),_(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,[{key:"format",value:function(N,I){N===E.blotName&&!I?this.replaceWith(f.default.create(this.statics.scope)):l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,N,I)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(N,I){return this.parent.isolate(this.offset(this.parent),this.length()),N===this.parent.statics.blotName?(this.parent.replaceWith(N,I),this):(this.parent.unwrap(),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,N,I))}}],[{key:"formats",value:function(N){return N.tagName===this.tagName?void 0:l(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,N)}}]),x})(a.default);w.blotName="list-item",w.tagName="LI";var E=(function(y){g(x,y),s(x,null,[{key:"create",value:function(N){var I=N==="ordered"?"OL":"UL",j=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return(N==="checked"||N==="unchecked")&&j.setAttribute("data-checked",N==="checked"),j}},{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(C){m(this,x);var N=_(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,C)),I=function(M){if(M.target.parentNode===C){var A=N.statics.formats(C),q=f.default.find(M.target);A==="checked"?q.format("list","unchecked"):A==="unchecked"&&q.format("list","checked")}};return C.addEventListener("touchstart",I),C.addEventListener("mousedown",I),N}return s(x,[{key:"format",value:function(N,I){this.children.length>0&&this.children.tail.format(N,I)}},{key:"formats",value:function(){return O({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(N,I){if(N instanceof w)l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,N,I);else{var j=I==null?this.length():I.offset(this),M=this.split(j);M.parent.insertBefore(N,M)}}},{key:"optimize",value:function(N){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,N);var I=this.next;I!=null&&I.prev===this&&I.statics.blotName===this.statics.blotName&&I.domNode.tagName===this.domNode.tagName&&I.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(I.moveChildren(this),I.remove())}},{key:"replace",value:function(N){if(N.statics.blotName!==this.statics.blotName){var I=f.default.create(this.statics.defaultChild);N.moveChildren(I),this.appendChild(I)}l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,N)}}]),x})(h.default);E.blotName="list",E.scope=f.default.Scope.BLOCK_BLOT,E.tagName=["OL","UL"],E.defaultChild="list-item",E.allowedChildren=[w],r.ListItem=w,r.default=E}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(56),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function d(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function a(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var u=(function(h){a(p,h);function p(){return f(this,p),d(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="italic",u.tagName=["EM","I"],r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(m,_){for(var g=0;g<_.length;g++){var w=_[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,_,g){return _&&O(m.prototype,_),g&&O(m,g),m}})(),l=function O(m,_,g){m===null&&(m=Function.prototype);var w=Object.getOwnPropertyDescriptor(m,_);if(w===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:O(E,_,g)}else{if("value"in w)return w.value;var y=w.get;return y===void 0?void 0:y.call(g)}},c=o(6),f=d(c);function d(O){return O&&O.__esModule?O:{default:O}}function a(O,m){if(!(O instanceof m))throw new TypeError("Cannot call a class as a function")}function u(O,m){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:O}function h(O,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);O.prototype=Object.create(m&&m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(O,m):O.__proto__=m)}var p=(function(O){h(m,O);function m(){return a(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(g){return g==="super"?document.createElement("sup"):g==="sub"?document.createElement("sub"):l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,g)}},{key:"formats",value:function(g){if(g.tagName==="SUB")return"sub";if(g.tagName==="SUP")return"super"}}]),m})(f.default);p.blotName="script",p.tagName=["SUB","SUP"],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(6),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function d(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function a(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var u=(function(h){a(p,h);function p(){return f(this,p),d(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="strike",u.tagName="S",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(6),l=c(s);function c(h){return h&&h.__esModule?h:{default:h}}function f(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function d(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function a(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var u=(function(h){a(p,h);function p(){return f(this,p),d(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="underline",u.tagName="U",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(g,w){for(var E=0;E<w.length;E++){var y=w[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,w,E){return w&&_(g.prototype,w),E&&_(g,E),g}})(),l=function _(g,w,E){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,w);if(y===void 0){var x=Object.getPrototypeOf(g);return x===null?void 0:_(x,w,E)}else{if("value"in y)return y.value;var C=y.get;return C===void 0?void 0:C.call(E)}},c=o(0),f=a(c),d=o(27);function a(_){return _&&_.__esModule?_:{default:_}}function u(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function h(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function p(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var O=["alt","height","width"],m=(function(_){p(g,_);function g(){return u(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"format",value:function(E,y){O.indexOf(E)>-1?y?this.domNode.setAttribute(E,y):this.domNode.removeAttribute(E):l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,E,y)}}],[{key:"create",value:function(E){var y=l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,E);return typeof E=="string"&&y.setAttribute("src",this.sanitize(E)),y}},{key:"formats",value:function(E){return O.reduce(function(y,x){return E.hasAttribute(x)&&(y[x]=E.getAttribute(x)),y},{})}},{key:"match",value:function(E){return/\.(jpe?g|gif|png)$/.test(E)||/^data:image\/.+;base64/.test(E)}},{key:"sanitize",value:function(E){return(0,d.sanitize)(E,["http","https","data"])?E:"//:0"}},{key:"value",value:function(E){return E.getAttribute("src")}}]),g})(f.default.Embed);m.blotName="image",m.tagName="IMG",r.default=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(g,w){for(var E=0;E<w.length;E++){var y=w[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,y.key,y)}}return function(g,w,E){return w&&_(g.prototype,w),E&&_(g,E),g}})(),l=function _(g,w,E){g===null&&(g=Function.prototype);var y=Object.getOwnPropertyDescriptor(g,w);if(y===void 0){var x=Object.getPrototypeOf(g);return x===null?void 0:_(x,w,E)}else{if("value"in y)return y.value;var C=y.get;return C===void 0?void 0:C.call(E)}},c=o(4),f=o(27),d=a(f);function a(_){return _&&_.__esModule?_:{default:_}}function u(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}function h(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:_}function p(_,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);_.prototype=Object.create(g&&g.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(_,g):_.__proto__=g)}var O=["height","width"],m=(function(_){p(g,_);function g(){return u(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"format",value:function(E,y){O.indexOf(E)>-1?y?this.domNode.setAttribute(E,y):this.domNode.removeAttribute(E):l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,E,y)}}],[{key:"create",value:function(E){var y=l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,E);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(E)),y}},{key:"formats",value:function(E){return O.reduce(function(y,x){return E.hasAttribute(x)&&(y[x]=E.getAttribute(x)),y},{})}},{key:"sanitize",value:function(E){return d.default.sanitize(E)}},{key:"value",value:function(E){return E.getAttribute("src")}}]),g})(c.BlockEmbed);m.blotName="video",m.className="ql-video",m.tagName="IFRAME",r.default=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var s=(function(){function E(y,x){for(var C=0;C<x.length;C++){var N=x[C];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(y,N.key,N)}}return function(y,x,C){return x&&E(y.prototype,x),C&&E(y,C),y}})(),l=function E(y,x,C){y===null&&(y=Function.prototype);var N=Object.getOwnPropertyDescriptor(y,x);if(N===void 0){var I=Object.getPrototypeOf(y);return I===null?void 0:E(I,x,C)}else{if("value"in N)return N.value;var j=N.get;return j===void 0?void 0:j.call(C)}},c=o(35),f=p(c),d=o(5),a=p(d),u=o(9),h=p(u);function p(E){return E&&E.__esModule?E:{default:E}}function O(E,y){if(!(E instanceof y))throw new TypeError("Cannot call a class as a function")}function m(E,y){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:E}function _(E,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);E.prototype=Object.create(y&&y.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(E,y):E.__proto__=y)}var g=(function(E){_(y,E);function y(){return O(this,y),m(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"create",value:function(C){var N=l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,C);return typeof C=="string"&&(window.katex.render(C,N,{throwOnError:!1,errorColor:"#f00"}),N.setAttribute("data-value",C)),N}},{key:"value",value:function(C){return C.getAttribute("data-value")}}]),y})(f.default);g.blotName="formula",g.className="ql-formula",g.tagName="SPAN";var w=(function(E){_(y,E),s(y,null,[{key:"register",value:function(){a.default.register(g,!0)}}]);function y(){O(this,y);var x=m(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return y})(h.default);r.FormulaBlot=g,r.default=w}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var s=(function(){function C(N,I){for(var j=0;j<I.length;j++){var M=I[j];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(N,M.key,M)}}return function(N,I,j){return I&&C(N.prototype,I),j&&C(N,j),N}})(),l=function C(N,I,j){N===null&&(N=Function.prototype);var M=Object.getOwnPropertyDescriptor(N,I);if(M===void 0){var A=Object.getPrototypeOf(N);return A===null?void 0:C(A,I,j)}else{if("value"in M)return M.value;var q=M.get;return q===void 0?void 0:q.call(j)}},c=o(0),f=m(c),d=o(5),a=m(d),u=o(9),h=m(u),p=o(13),O=m(p);function m(C){return C&&C.__esModule?C:{default:C}}function _(C,N){if(!(C instanceof N))throw new TypeError("Cannot call a class as a function")}function g(C,N){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:C}function w(C,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);C.prototype=Object.create(N&&N.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(C,N):C.__proto__=N)}var E=(function(C){w(N,C);function N(){return _(this,N),g(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return s(N,[{key:"replaceWith",value:function(j){this.domNode.textContent=this.domNode.textContent,this.attach(),l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replaceWith",this).call(this,j)}},{key:"highlight",value:function(j){var M=this.domNode.textContent;this.cachedText!==M&&((M.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=j(M),this.domNode.normalize(),this.attach()),this.cachedText=M)}}]),N})(O.default);E.className="ql-syntax";var y=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),x=(function(C){w(N,C),s(N,null,[{key:"register",value:function(){a.default.register(y,!0),a.default.register(E,!0)}}]);function N(I,j){_(this,N);var M=g(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,I,j));if(typeof M.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return M.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){M.highlight(),A=null},M.options.interval)}),M.highlight(),M}return s(N,[{key:"highlight",value:function(){var j=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var M=this.quill.getSelection();this.quill.scroll.descendants(E).forEach(function(A){A.highlight(j.options.highlight)}),this.quill.update(a.default.sources.SILENT),M!=null&&this.quill.setSelection(M,a.default.sources.SILENT)}}}]),N})(h.default);x.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(C){var N=window.hljs.highlightAuto(C);return N.value}})(),interval:1e3},r.CodeBlock=E,r.CodeToken=y,r.default=x}),(function(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var s=function N(I,j,M){I===null&&(I=Function.prototype);var A=Object.getOwnPropertyDescriptor(I,j);if(A===void 0){var q=Object.getPrototypeOf(I);return q===null?void 0:N(q,j,M)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(M)}},l=(function(){function N(I,j){for(var M=0;M<j.length;M++){var A=j[M];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(I,A.key,A)}}return function(I,j,M){return j&&N(I.prototype,j),M&&N(I,M),I}})(),c=o(3),f=_(c),d=o(8),a=_(d),u=o(43),h=_(u),p=o(15),O=o(41),m=_(O);function _(N){return N&&N.__esModule?N:{default:N}}function g(N,I){if(!(N instanceof I))throw new TypeError("Cannot call a class as a function")}function w(N,I){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:N}function E(N,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);N.prototype=Object.create(I&&I.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(N,I):N.__proto__=I)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=(function(N){E(I,N);function I(j,M){g(this,I),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=y);var A=w(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,j,M));return A.quill.container.classList.add("ql-bubble"),A}return l(I,[{key:"extendToolbar",value:function(M){this.tooltip=new C(this.quill,this.options.bounds),this.tooltip.root.appendChild(M.container),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),m.default)}}]),I})(h.default);x.DEFAULTS=(0,f.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){I?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var C=(function(N){E(I,N);function I(j,M){g(this,I);var A=w(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,j,M));return A.quill.on(a.default.events.EDITOR_CHANGE,function(q,L,k,F){if(q===a.default.events.SELECTION_CHANGE)if(L!=null&&L.length>0&&F===a.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var V=A.quill.getLines(L.index,L.length);if(V.length===1)A.position(A.quill.getBounds(L));else{var ne=V[V.length-1],ue=A.quill.getIndex(ne),K=Math.min(ne.length()-1,L.index+L.length-ue),W=A.quill.getBounds(new p.Range(ue,K));A.position(W)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return l(I,[{key:"listen",value:function(){var M=this;s(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){M.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!M.root.classList.contains("ql-hidden")){var A=M.quill.getSelection();A!=null&&M.position(M.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(M){var A=s(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"position",this).call(this,M),q=this.root.querySelector(".ql-tooltip-arrow");if(q.style.marginLeft="",A===0)return A;q.style.marginLeft=-1*A-q.offsetWidth/2+"px"}}]),I})(u.BaseTooltip);C.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(""),r.BubbleTooltip=C,r.default=x}),(function(n,r,o){n.exports=o(63)})]).default})})(fa)),fa.exports}var fn,JO;function iL(){if(JO)return fn;JO=1;var e=fn&&fn.__extends||(function(){var a=function(u,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,O){p.__proto__=O}||function(p,O){for(var m in O)O.hasOwnProperty(m)&&(p[m]=O[m])},a(u,h)};return function(u,h){a(u,h);function p(){this.constructor=u}u.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})(),t=fn&&fn.__assign||function(){return t=Object.assign||function(a){for(var u,h=1,p=arguments.length;h<p;h++){u=arguments[h];for(var O in u)Object.prototype.hasOwnProperty.call(u,O)&&(a[O]=u[O])}return a},t.apply(this,arguments)},n=fn&&fn.__spreadArrays||function(){for(var a=0,u=0,h=arguments.length;u<h;u++)a+=arguments[u].length;for(var p=Array(a),O=0,u=0;u<h;u++)for(var m=arguments[u],_=0,g=m.length;_<g;_++,O++)p[O]=m[_];return p},r=fn&&fn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},o=r(nt.default),s=r(vv.default),l=r(nL()),c=r(oL()),f=(function(a){e(u,a);function u(h){var p=a.call(this,h)||this;p.dirtyProps=["modules","formats","bounds","theme","children"],p.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],p.state={generation:0},p.selection=null,p.onEditorChange=function(m,_,g,w){var E,y,x,C;m==="text-change"?(y=(E=p).onEditorChangeText)===null||y===void 0||y.call(E,p.editor.root.innerHTML,_,w,p.unprivilegedEditor):m==="selection-change"&&((C=(x=p).onEditorChangeSelection)===null||C===void 0||C.call(x,_,w,p.unprivilegedEditor))};var O=p.isControlled()?h.value:h.defaultValue;return p.value=O??"",p}return u.prototype.validateProps=function(h){var p;if(o.default.Children.count(h.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(o.default.Children.count(h.children)){var O=o.default.Children.only(h.children);if(((p=O)===null||p===void 0?void 0:p.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&h.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},u.prototype.shouldComponentUpdate=function(h,p){var O=this,m;if(this.validateProps(h),!this.editor||this.state.generation!==p.generation)return!0;if("value"in h){var _=this.getEditorContents(),g=(m=h.value,m??"");this.isEqualValue(g,_)||this.setEditorContents(this.editor,g)}return h.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,h.readOnly),n(this.cleanProps,this.dirtyProps).some(function(w){return!l.default(h[w],O.props[w])})},u.prototype.shouldComponentRegenerate=function(h){var p=this;return this.dirtyProps.some(function(O){return!l.default(h[O],p.props[O])})},u.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},u.prototype.componentWillUnmount=function(){this.destroyEditor()},u.prototype.componentDidUpdate=function(h,p){var O=this;if(this.editor&&this.shouldComponentRegenerate(h)){var m=this.editor.getContents(),_=this.editor.getSelection();this.regenerationSnapshot={delta:m,selection:_},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==p.generation){var g=this.regenerationSnapshot,m=g.delta,w=g.selection;delete this.regenerationSnapshot,this.instantiateEditor();var E=this.editor;E.setContents(m),d(function(){return O.setEditorSelection(E,w)})}},u.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},u.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},u.prototype.isControlled=function(){return"value"in this.props},u.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},u.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},u.prototype.createEditor=function(h,p){var O=new c.default(h,p);return p.tabIndex!=null&&this.setEditorTabIndex(O,p.tabIndex),this.hookEditor(O),O},u.prototype.hookEditor=function(h){this.unprivilegedEditor=this.makeUnprivilegedEditor(h),h.on("editor-change",this.onEditorChange)},u.prototype.unhookEditor=function(h){h.off("editor-change",this.onEditorChange)},u.prototype.getEditorContents=function(){return this.value},u.prototype.getEditorSelection=function(){return this.selection},u.prototype.isDelta=function(h){return h&&h.ops},u.prototype.isEqualValue=function(h,p){return this.isDelta(h)&&this.isDelta(p)?l.default(h.ops,p.ops):l.default(h,p)},u.prototype.setEditorContents=function(h,p){var O=this;this.value=p;var m=this.getEditorSelection();typeof p=="string"?h.setContents(h.clipboard.convert(p)):h.setContents(p),d(function(){return O.setEditorSelection(h,m)})},u.prototype.setEditorSelection=function(h,p){if(this.selection=p,p){var O=h.getLength();p.index=Math.max(0,Math.min(p.index,O-1)),p.length=Math.max(0,Math.min(p.length,O-1-p.index)),h.setSelection(p)}},u.prototype.setEditorTabIndex=function(h,p){var O,m;!((m=(O=h)===null||O===void 0?void 0:O.scroll)===null||m===void 0)&&m.domNode&&(h.scroll.domNode.tabIndex=p)},u.prototype.setEditorReadOnly=function(h,p){p?h.disable():h.enable()},u.prototype.makeUnprivilegedEditor=function(h){var p=h;return{getHTML:function(){return p.root.innerHTML},getLength:p.getLength.bind(p),getText:p.getText.bind(p),getContents:p.getContents.bind(p),getSelection:p.getSelection.bind(p),getBounds:p.getBounds.bind(p)}},u.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var h=s.default.findDOMNode(this.editingArea);if(!h)throw new Error("Cannot find element for editing area");if(h.nodeType===3)throw new Error("Editing area cannot be a text node");return h},u.prototype.renderEditingArea=function(){var h=this,p=this.props,O=p.children,m=p.preserveWhitespace,_=this.state.generation,g={key:_,ref:function(w){h.editingArea=w}};return o.default.Children.count(O)?o.default.cloneElement(o.default.Children.only(O),g):m?o.default.createElement("pre",t({},g)):o.default.createElement("div",t({},g))},u.prototype.render=function(){var h;return o.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(h=this.props.className,h??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},u.prototype.onEditorChangeText=function(h,p,O,m){var _,g;if(this.editor){var w=this.isDelta(this.value)?m.getContents():m.getHTML();w!==this.getEditorContents()&&(this.lastDeltaChangeSet=p,this.value=w,(g=(_=this.props).onChange)===null||g===void 0||g.call(_,h,p,O,m))}},u.prototype.onEditorChangeSelection=function(h,p,O){var m,_,g,w,E,y;if(this.editor){var x=this.getEditorSelection(),C=!x&&h,N=x&&!h;l.default(h,x)||(this.selection=h,(_=(m=this.props).onChangeSelection)===null||_===void 0||_.call(m,h,p,O),C?(w=(g=this.props).onFocus)===null||w===void 0||w.call(g,h,p,O):N&&((y=(E=this.props).onBlur)===null||y===void 0||y.call(E,x,p,O)))}},u.prototype.focus=function(){this.editor&&this.editor.focus()},u.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},u.displayName="React Quill",u.Quill=c.default,u.defaultProps={theme:"snow",modules:{},readOnly:!1},u})(o.default.Component);function d(a){Promise.resolve().then(a)}return fn=f,fn}var aL=iL();const sL=ns(aL),lL=({isOpen:e,onClose:t,refresh:n,handleUpdate:r})=>{const{node:o,certificate:s}=ot(),{restrictedAssets:l}=s,c=l?l[o.id]:void 0,f={restrictionNotes:c?c.restrictionNotes:"",restrictionInstructions:c?c.restrictionInstructions:""},[d,a]=se.useState(f),[u,h]=se.useState(!1),[p,O]=se.useState(!1);se.useEffect(()=>{a(f)},[c]);const m=()=>{a(f),h(!1),t()},_=async()=>{h(!0),r({restrictedAssets:fq(o.id,l)}).then(w=>{w?.status===200?(Ke.success("Successfully removed restrictions!"),h(!1),O(!1),t(),n()):h(!1)}).catch(w=>{h(!1),Ke.error(`Request failed, ${w.toString()}`)})},g=async()=>{if(d.restrictionInstructions.length<1||d.restrictionNotes.length<1)return;h(!0);const w={[o.id]:d};r({restrictedAssets:{...l,...w}}).then(E=>{E?.status===200?(Ke.success("Asset has been successfully restricted!"),h(!1),t(),a(f),n()):(h(!1),Ke.error("Request failed..."))}).catch(E=>{h(!1),Ke.error(`Request failed, ${E.toString()}`)})};return H.jsxs(H.Fragment,{children:[H.jsx(Ye.ConfirmationModal,{id:"restrict-removal-confirmation",isOpen:p,onClose:()=>O(!1),onSubmit:_,submitButtonText:"Confirm",pending:u,headerContent:"Do you confirm the removal of restrictions for this node?"}),H.jsx(Ye.ConfirmationModal,{id:"restrict-single-node-modal",isOpen:e,onClose:t,size:"lg",headerContent:"Change Node Restrictions",noSubmit:!0,noCancel:!0,disabled:u,content:H.jsxs(H.Fragment,{children:[H.jsx(Ye.ResourceEditor,{className:"",onChange:w=>a(w),editedResource:d,controls:[cq()]}),H.jsxs("div",{className:"col-12",children:[H.jsx("label",{children:"Instructions for Retrieval - Guest Users"}),H.jsx(sL,{id:"restriction-instructions-editor",theme:"snow",value:d.restrictionInstructions,onChange:w=>{a(E=>({...E,restrictionInstructions:w}))}})]}),H.jsxs("div",{className:"float-right mt-3 d-flex flex-wrap",style:{gap:"0.5rem",padding:"0 15px"},children:[H.jsx(Ye.Button,{onClick:m,children:"Cancel"}),c&&H.jsx(Ye.Button,{color:"danger",onClick:()=>O(!0),pending:u,children:"Remove Restrictions"}),H.jsxs(Ye.Button,{color:"primary",onClick:g,pending:u,children:[c&&"Update Restrictions",!c&&"Restrict"]})]})]})})]})},uL=({certificate:e,handleUpdate:t,refresh:n})=>{const[r,o]=se.useState(!1),s=()=>o(!r),[l,c]=se.useState(!1),f=()=>c(!l),d="reviewNode",a={toggleReviewModal:s,toggleMetadataModal:f},u=la(e.vertices,e.edges,e.restrictedAssets,d,a);return H.jsxs(ca,{type:d,certificate:e,graph:u,children:[H.jsx(lL,{isOpen:r,onClose:s,refresh:n,handleUpdate:t}),H.jsx(Bh,{isOpen:l,toggle:f})]})},cL=({certificate:e,replica:t,refresh:n})=>{const[r,o]=se.useState(!1),s=()=>o(!r);if(hn(e)||bt(e)||hn(t)||bt(t))return;const l="fileLayerNode",c={refresh:n,toggleMetadataModal:s},f=LO(e.vertices,e.edges,t,c);return H.jsx(ca,{type:l,certificate:e,replica:t,graph:f,children:H.jsx(Bh,{isOpen:r,toggle:s})})},fL=({setIsLayersItemModalOpen:e})=>{const{node:t}=ot();if(!t?.id)return null;const[n,r]=t.id.split("/"),o=()=>{let s=[{key:"view-btn",label:"View Item",onClick:()=>window.open(Qq(t.id),"_blank")},{key:"copy-id-btn",label:"Copy Item ID",onClick:()=>navigator.clipboard.writeText(r)}];return n.includes("Layer")&&(s=[...s,{key:"open-layer-btn",label:"Open Layer",onClick:()=>e(!0)}]),s.map(l=>H.jsx("li",{children:H.jsx(Ye.Button,{color:"secondary",className:"w-100 my-1 btn-sm",sx:{whiteSpace:"nowrap"},onClick:l.onClick,children:l.label},l.key)}))};return H.jsx("div",{className:"position-absolute border border-secondary border-4 top-0 end-0 m-3 p-2",children:H.jsx("ul",{className:"list-unstyled mb-0 text-end",children:o()})})},dL=({isOpen:e,setIsOpen:t})=>{const{node:n,setNode:r,certificate:o,nodesState:s,edgesState:l,nodeLayers:c,setNodeLayers:f}=ot(),[,d]=s,[,a]=l,u=o.subgraphs[n.id],h=(_,g)=>_.reduce((w,E)=>E.id===n.id?[...w,{...E,id:g}]:[...w,E],[]),p=(_,g)=>_.reduce((w,E)=>{if(E.id.includes(n.id)){const y=E.source===n.id;return[...w,{id:`${E.id}-${g}`,source:y?g:E.source,target:y?E.target:g,animated:!0}]}return[...w,E]},[]),O=_=>{t(!1),r({});const g=h(c.current.nodes,_),w=p(c.current.edges,_);d(g),a(w),f({...c,current:{nodes:g,edges:w}})},m=()=>{if(!u)return null;const _=Object.keys(u.vertices);return H.jsxs(H.Fragment,{children:[H.jsx("h3",{children:"Select an item in the list from this grouping to continue tracing."}),H.jsx("ul",{children:_.map(g=>H.jsx("li",{children:H.jsx(Ye.Button,{color:"link",className:"btn-sm text-wrap",style:{textAlign:"left"},onClick:()=>O(g),children:o.generatedLabels[g].Name})}))})]})};return H.jsx(Ye.ConfirmationModal,{id:"layer-items-modal",className:"top-25",isOpen:e,onClose:()=>t(!1),cancelButtonText:"Close",noSubmit:!0,headerContent:n.id,content:m()})},hL=({certificate:e,graph:t})=>{const{nodesState:n,edgesState:r,nodeLayers:o,setNodeLayers:s}=ot(),l=se.useMemo(()=>({walkingNode:ZO}),[]),[,c,f]=n,[,d,a]=r,[u,h]=se.useState(!1);se.useEffect(()=>{hn(e)||bt(e)||(c(t.nodes),d(t.edges),s({previous:o.previous,current:{nodes:t.nodes,edges:t.edges}}))},[e]);const p=O=>{setTimeout(()=>{O.fitView(),O.zoomTo(.5,{duration:1e3})},100)};return H.jsxs("div",{style:{height:"75vh",position:"relative"},children:[H.jsx("div",{className:"layoutflow",children:H.jsxs(Ih,{nodes:o.current.nodes,edges:o.current.edges,onNodesChange:f,onEdgesChange:a,connectionLineType:gn.SmoothStep,nodeTypes:l,onlyRenderVisibleElements:!0,edgesUpdatable:!1,onInit:p,children:[H.jsx(cO,{}),H.jsx(dO,{}),H.jsx(lO,{})]})}),H.jsx(fL,{setIsLayersItemModalOpen:h}),H.jsx(dL,{setIsOpen:h,isOpen:u})]})},pL=({certificate:e})=>{const t=WO([],e.vertices,e,!1),n=YO([],e.edges),r=KO(t,n);return H.jsx(_O,{type:"walkingNode",certificate:e,children:H.jsx(hL,{certificate:e,graph:r})})},Kh=e=>e?e!=="ffffffff-ffff-ffff-ffff-ffffffffffff":!1,vL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/${e}`,gL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/labels/${e}`,yL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/metadata/${e}`,mL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/schemes/${e}`,bL=async(e,t,n=!0,r)=>{const o=await fetch(vL(e,t,n),{credentials:"include"});r&&r(o);const s=await o.json();if(o.status!==200)throw Error(s.Message);let l={...s};const{labelsId:c,metadataId:f,schemesId:d}=s;if(Kh(c)){const u=await(await fetch(gL(c,t,n),{credentials:"include"})).json();l={...l,customLabels:u.customLabels,generatedLabels:u.generatedLabels,serviceLabels:u.serviceLabels}}if(Kh(f)){const u=await(await fetch(yL(f,t,n),{credentials:"include"})).json();l={...l,metadata:u.metadata}}if(Kh(d)){const u=await(await fetch(mL(d,t,n),{credentials:"include"})).json();l={...l,schemes:u.schemes}}return l};ft.EditCertificate=tL,ft.EditNodeModal=BO,ft.HiseConfigProvider=iq,ft.IDEModal=UO,ft.MaskMetadataModal=FO,ft.PipelineModal=$O,ft.ReadCertificate=eL,ft.ReplicaPipelineInfo=HO,ft.ReviewCertificate=uL,ft.WalkingGraph=pL,ft.WorkspaceCertificate=cL,ft.getCertificateBody=bL,ft.getSchemes=TO,ft.startIDE=GO,ft.startPipeline=VO,ft.useHiseConfig=An,Object.defineProperty(ft,Symbol.toStringTag,{value:"Module"})}));
69
+ `)}return me}function Ge(ge,me){var ke={},Ne=ge.style||{};return Ne.fontStyle&&Z(ge).fontStyle==="italic"&&(ke.italic=!0),Ne.fontWeight&&(Z(ge).fontWeight.startsWith("bold")||parseInt(Z(ge).fontWeight)>=700)&&(ke.bold=!0),Object.keys(ke).length>0&&(me=re(me,ke)),parseFloat(Ne.textIndent||0)>0&&(me=new u.default().insert(" ").concat(me)),me}function Oe(ge,me){var ke=ge.data;if(ge.parentNode.tagName==="O:P")return me.insert(ke.trim());if(ke.trim().length===0&&ge.parentNode.classList.contains("ql-clipboard"))return me;if(!Z(ge.parentNode).whiteSpace.startsWith("pre")){var Ne=function(qe,je){return je=je.replace(/[^\u00a0]/g,""),je.length<1&&qe?" ":je};ke=ke.replace(/\r\n/g," ").replace(/\n/g," "),ke=ke.replace(/\s\s+/g,Ne.bind(Ne,!0)),(ge.previousSibling==null&&H(ge.parentNode)||ge.previousSibling!=null&&H(ge.previousSibling))&&(ke=ke.replace(/^\s+/,Ne.bind(Ne,!1))),(ge.nextSibling==null&&H(ge.parentNode)||ge.nextSibling!=null&&H(ge.nextSibling))&&(ke=ke.replace(/\s+$/,Ne.bind(Ne,!1)))}return me.insert(ke)}r.default=Q,r.matchAttributor=de,r.matchBlot=pe,r.matchNewline=Ae,r.matchSpacing=Se,r.matchText=Oe}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(g,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,_,y){return _&&O(g.prototype,_),y&&O(g,y),g}})(),l=function O(g,_,y){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,_);if(w===void 0){var E=Object.getPrototypeOf(g);return E===null?void 0:O(E,_,y)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(y)}},c=o(6),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(){return a(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,[{key:"optimize",value:function(y){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,y),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g})(f.default);p.blotName="bold",p.tagName=["STRONG","B"],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var s=(function(){function A(q,R){var k=[],F=!0,U=!1,ne=void 0;try{for(var ue=q[Symbol.iterator](),K;!(F=(K=ue.next()).done)&&(k.push(K.value),!(R&&k.length===R));F=!0);}catch(W){U=!0,ne=W}finally{try{!F&&ue.return&&ue.return()}finally{if(U)throw ne}}return k}return function(q,R){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return A(q,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function A(q,R){for(var k=0;k<R.length;k++){var F=R[k];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(q,F.key,F)}}return function(q,R,k){return R&&A(q.prototype,R),k&&A(q,k),q}})(),c=o(2),f=y(c),h=o(0),a=y(h),u=o(5),d=y(u),p=o(10),O=y(p),g=o(9),_=y(g);function y(A){return A&&A.__esModule?A:{default:A}}function w(A,q,R){return q in A?Object.defineProperty(A,q,{value:R,enumerable:!0,configurable:!0,writable:!0}):A[q]=R,A}function E(A,q){if(!(A instanceof q))throw new TypeError("Cannot call a class as a function")}function m(A,q){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:A}function S(A,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);A.prototype=Object.create(q&&q.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(A,q):A.__proto__=q)}var C=(0,O.default)("quill:toolbar"),N=(function(A){S(q,A);function q(R,k){E(this,q);var F=m(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,R,k));if(Array.isArray(F.options.container)){var U=document.createElement("div");j(U,F.options.container),R.container.parentNode.insertBefore(U,R.container),F.container=U}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var ne;return ne=C.error("Container required for toolbar",F.options),m(F,ne)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(ue){F.addHandler(ue,F.options.handlers[ue])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(ue){F.attach(ue)}),F.quill.on(d.default.events.EDITOR_CHANGE,function(ue,K){ue===d.default.events.SELECTION_CHANGE&&F.update(K)}),F.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){var ue=F.quill.selection.getRange(),K=s(ue,1),W=K[0];F.update(W)}),F}return l(q,[{key:"addHandler",value:function(k,F){this.handlers[k]=F}},{key:"attach",value:function(k){var F=this,U=[].find.call(k.classList,function(ue){return ue.indexOf("ql-")===0});if(U){if(U=U.slice(3),k.tagName==="BUTTON"&&k.setAttribute("type","button"),this.handlers[U]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[U]==null){C.warn("ignoring attaching to disabled format",U,k);return}if(a.default.query(U)==null){C.warn("ignoring attaching to nonexistent format",U,k);return}}var ne=k.tagName==="SELECT"?"change":"click";k.addEventListener(ne,function(ue){var K=void 0;if(k.tagName==="SELECT"){if(k.selectedIndex<0)return;var W=k.options[k.selectedIndex];W.hasAttribute("selected")?K=!1:K=W.value||!1}else k.classList.contains("ql-active")?K=!1:K=k.value||!k.hasAttribute("value"),ue.preventDefault();F.quill.focus();var z=F.quill.selection.getRange(),Q=s(z,1),re=Q[0];if(F.handlers[U]!=null)F.handlers[U].call(F,K);else if(a.default.query(U).prototype instanceof a.default.Embed){if(K=prompt("Enter "+U),!K)return;F.quill.updateContents(new f.default().retain(re.index).delete(re.length).insert(w({},U,K)),d.default.sources.USER)}else F.quill.format(U,K,d.default.sources.USER);F.update(re)}),this.controls.push([U,k])}}},{key:"update",value:function(k){var F=k==null?{}:this.quill.getFormat(k);this.controls.forEach(function(U){var ne=s(U,2),ue=ne[0],K=ne[1];if(K.tagName==="SELECT"){var W=void 0;if(k==null)W=null;else if(F[ue]==null)W=K.querySelector("option[selected]");else if(!Array.isArray(F[ue])){var z=F[ue];typeof z=="string"&&(z=z.replace(/\"/g,'\\"')),W=K.querySelector('option[value="'+z+'"]')}W==null?(K.value="",K.selectedIndex=-1):W.selected=!0}else if(k==null)K.classList.remove("ql-active");else if(K.hasAttribute("value")){var Q=F[ue]===K.getAttribute("value")||F[ue]!=null&&F[ue].toString()===K.getAttribute("value")||F[ue]==null&&!K.getAttribute("value");K.classList.toggle("ql-active",Q)}else K.classList.toggle("ql-active",F[ue]!=null)})}}]),q})(_.default);N.DEFAULTS={};function M(A,q,R){var k=document.createElement("button");k.setAttribute("type","button"),k.classList.add("ql-"+q),R!=null&&(k.value=R),A.appendChild(k)}function j(A,q){Array.isArray(q[0])||(q=[q]),q.forEach(function(R){var k=document.createElement("span");k.classList.add("ql-formats"),R.forEach(function(F){if(typeof F=="string")M(k,F);else{var U=Object.keys(F)[0],ne=F[U];Array.isArray(ne)?I(k,U,ne):M(k,U,ne)}}),A.appendChild(k)})}function I(A,q,R){var k=document.createElement("select");k.classList.add("ql-"+q),R.forEach(function(F){var U=document.createElement("option");F!==!1?U.setAttribute("value",F):U.setAttribute("selected","selected"),k.appendChild(U)}),A.appendChild(k)}N.DEFAULTS={container:null,handlers:{clean:function(){var q=this,R=this.quill.getSelection();if(R!=null)if(R.length==0){var k=this.quill.getFormat();Object.keys(k).forEach(function(F){a.default.query(F,a.default.Scope.INLINE)!=null&&q.quill.format(F,!1)})}else this.quill.removeFormat(R,d.default.sources.USER)},direction:function(q){var R=this.quill.getFormat().align;q==="rtl"&&R==null?this.quill.format("align","right",d.default.sources.USER):!q&&R==="right"&&this.quill.format("align",!1,d.default.sources.USER),this.quill.format("direction",q,d.default.sources.USER)},indent:function(q){var R=this.quill.getSelection(),k=this.quill.getFormat(R),F=parseInt(k.indent||0);if(q==="+1"||q==="-1"){var U=q==="+1"?1:-1;k.direction==="rtl"&&(U*=-1),this.quill.format("indent",F+U,d.default.sources.USER)}},link:function(q){q===!0&&(q=prompt("Enter link URL:")),this.quill.format("link",q,d.default.sources.USER)},list:function(q){var R=this.quill.getSelection(),k=this.quill.getFormat(R);q==="check"?k.list==="checked"||k.list==="unchecked"?this.quill.format("list",!1,d.default.sources.USER):this.quill.format("list","unchecked",d.default.sources.USER):this.quill.format("list",q,d.default.sources.USER)}}},r.default=N,r.addControls=j}),(function(n,r){n.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(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(g,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,_,y){return _&&O(g.prototype,_),y&&O(g,y),g}})(),l=function O(g,_,y){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,_);if(w===void 0){var E=Object.getPrototypeOf(g);return E===null?void 0:O(E,_,y)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(y)}},c=o(28),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(_,y){a(this,g);var w=u(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,_));return w.label.innerHTML=y,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(E){E.classList.add("ql-primary")}),w}return s(g,[{key:"buildItem",value:function(y){var w=l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,y);return w.style.backgroundColor=y.getAttribute("value")||"",w}},{key:"selectItem",value:function(y,w){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,y,w);var E=this.label.querySelector(".ql-color-label"),m=y&&y.getAttribute("data-value")||"";E&&(E.tagName==="line"?E.style.stroke=m:E.style.fill=m)}}]),g})(f.default);r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(g,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,_,y){return _&&O(g.prototype,_),y&&O(g,y),g}})(),l=function O(g,_,y){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,_);if(w===void 0){var E=Object.getPrototypeOf(g);return E===null?void 0:O(E,_,y)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(y)}},c=o(28),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(_,y){a(this,g);var w=u(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(E){E.innerHTML=y[E.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(g,[{key:"selectItem",value:function(y,w){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,y,w),y=y||this.defaultItem,this.label.innerHTML=y.innerHTML}}]),g})(f.default);r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function f(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,a,u){return a&&f(h.prototype,a),u&&f(h,u),h}})();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var c=(function(){function f(h,a){var u=this;l(this,f),this.quill=h,this.boundsContainer=a||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){u.root.style.marginTop=-1*u.quill.root.scrollTop+"px"}),this.hide()}return s(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(a){var u=a.left+a.width/2-this.root.offsetWidth/2,d=a.bottom+this.quill.root.scrollTop;this.root.style.left=u+"px",this.root.style.top=d+"px",this.root.classList.remove("ql-flip");var p=this.boundsContainer.getBoundingClientRect(),O=this.root.getBoundingClientRect(),g=0;if(O.right>p.right&&(g=p.right-O.right,this.root.style.left=u+g+"px"),O.left<p.left&&(g=p.left-O.left,this.root.style.left=u+g+"px"),O.bottom>p.bottom){var _=O.bottom-O.top,y=a.bottom-a.top+_;this.root.style.top=d-y+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f})();r.default=c}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function I(A,q){var R=[],k=!0,F=!1,U=void 0;try{for(var ne=A[Symbol.iterator](),ue;!(k=(ue=ne.next()).done)&&(R.push(ue.value),!(q&&R.length===q));k=!0);}catch(K){F=!0,U=K}finally{try{!k&&ne.return&&ne.return()}finally{if(F)throw U}}return R}return function(A,q){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return I(A,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=function I(A,q,R){A===null&&(A=Function.prototype);var k=Object.getOwnPropertyDescriptor(A,q);if(k===void 0){var F=Object.getPrototypeOf(A);return F===null?void 0:I(F,q,R)}else{if("value"in k)return k.value;var U=k.get;return U===void 0?void 0:U.call(R)}},c=(function(){function I(A,q){for(var R=0;R<q.length;R++){var k=q[R];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(A,k.key,k)}}return function(A,q,R){return q&&I(A.prototype,q),R&&I(A,R),A}})(),f=o(3),h=E(f),a=o(8),u=E(a),d=o(43),p=E(d),O=o(27),g=E(O),_=o(15),y=o(41),w=E(y);function E(I){return I&&I.__esModule?I:{default:I}}function m(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function S(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function C(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var N=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],M=(function(I){C(A,I);function A(q,R){m(this,A),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=N);var k=S(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q,R));return k.quill.container.classList.add("ql-snow"),k}return c(A,[{key:"extendToolbar",value:function(R){R.container.classList.add("ql-snow"),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),w.default),this.tooltip=new j(this.quill,this.options.bounds),R.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(k,F){R.handlers.link.call(R,!F.format.link)})}}]),A})(p.default);M.DEFAULTS=(0,h.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var q=this.quill.getSelection();if(q==null||q.length==0)return;var R=this.quill.getText(q);/^\S+@\S+\.\S+$/.test(R)&&R.indexOf("mailto:")!==0&&(R="mailto:"+R);var k=this.quill.theme.tooltip;k.edit("link",R)}else this.quill.format("link",!1)}}}}});var j=(function(I){C(A,I);function A(q,R){m(this,A);var k=S(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,q,R));return k.preview=k.root.querySelector("a.ql-preview"),k}return c(A,[{key:"listen",value:function(){var R=this;l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(k){R.root.classList.contains("ql-editing")?R.save():R.edit("link",R.preview.textContent),k.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(k){if(R.linkRange!=null){var F=R.linkRange;R.restoreFocus(),R.quill.formatText(F,"link",!1,u.default.sources.USER),delete R.linkRange}k.preventDefault(),R.hide()}),this.quill.on(u.default.events.SELECTION_CHANGE,function(k,F,U){if(k!=null){if(k.length===0&&U===u.default.sources.USER){var ne=R.quill.scroll.descendant(g.default,k.index),ue=s(ne,2),K=ue[0],W=ue[1];if(K!=null){R.linkRange=new _.Range(k.index-W,K.length());var z=g.default.formats(K.domNode);R.preview.textContent=z,R.preview.setAttribute("href",z),R.show(),R.position(R.quill.getBounds(R.linkRange));return}}else delete R.linkRange;R.hide()}})}},{key:"show",value:function(){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A})(d.BaseTooltip);j.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(""),r.default=M}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(29),l=we(s),c=o(36),f=o(38),h=o(64),a=o(65),u=we(a),d=o(66),p=we(d),O=o(67),g=we(O),_=o(37),y=o(26),w=o(39),E=o(40),m=o(56),S=we(m),C=o(68),N=we(C),M=o(27),j=we(M),I=o(69),A=we(I),q=o(70),R=we(q),k=o(71),F=we(k),U=o(72),ne=we(U),ue=o(73),K=we(ue),W=o(13),z=we(W),Q=o(74),re=we(Q),Z=o(75),X=we(Z),H=o(57),ee=we(H),le=o(41),de=we(le),pe=o(28),Ee=we(pe),Ie=o(59),Pe=we(Ie),Ae=o(60),Se=we(Ae),Ge=o(61),Oe=we(Ge),ge=o(108),me=we(ge),ke=o(62),Ne=we(ke);function we(qe){return qe&&qe.__esModule?qe:{default:qe}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":y.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":E.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":y.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":E.SizeStyle},!0),l.default.register({"formats/align":c.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":y.ColorStyle,"formats/font":w.FontClass,"formats/size":E.SizeClass,"formats/blockquote":u.default,"formats/code-block":z.default,"formats/header":p.default,"formats/list":g.default,"formats/bold":S.default,"formats/code":W.Code,"formats/italic":N.default,"formats/link":j.default,"formats/script":A.default,"formats/strike":R.default,"formats/underline":F.default,"formats/image":ne.default,"formats/video":K.default,"formats/list/item":O.ListItem,"modules/formula":re.default,"modules/syntax":X.default,"modules/toolbar":ee.default,"themes/bubble":me.default,"themes/snow":Ne.default,"ui/icons":de.default,"ui/picker":Ee.default,"ui/icon-picker":Se.default,"ui/color-picker":Pe.default,"ui/tooltip":Oe.default},!0),r.default=l.default}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var s=(function(){function g(_,y){for(var w=0;w<y.length;w++){var E=y[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(_,E.key,E)}}return function(_,y,w){return y&&g(_.prototype,y),w&&g(_,w),_}})(),l=function g(_,y,w){_===null&&(_=Function.prototype);var E=Object.getOwnPropertyDescriptor(_,y);if(E===void 0){var m=Object.getPrototypeOf(_);return m===null?void 0:g(m,y,w)}else{if("value"in E)return E.value;var S=E.get;return S===void 0?void 0:S.call(w)}},c=o(0),f=h(c);function h(g){return g&&g.__esModule?g:{default:g}}function a(g,_){if(!(g instanceof _))throw new TypeError("Cannot call a class as a function")}function u(g,_){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:g}function d(g,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);g.prototype=Object.create(_&&_.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(g,_):g.__proto__=_)}var p=(function(g){d(_,g);function _(){return a(this,_),u(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return s(_,[{key:"add",value:function(w,E){if(E==="+1"||E==="-1"){var m=this.value(w)||0;E=E==="+1"?m+1:m-1}return E===0?(this.remove(w),!0):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,E)}},{key:"canAdd",value:function(w,E){return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,E)||l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(E))}},{key:"value",value:function(w){return parseInt(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_})(f.default.Attributor.Class),O=new p("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=O}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(4),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function h(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=(function(d){a(p,d);function p(){return f(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="blockquote",u.tagName="blockquote",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function p(O,g){for(var _=0;_<g.length;_++){var y=g[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(O,y.key,y)}}return function(O,g,_){return g&&p(O.prototype,g),_&&p(O,_),O}})(),l=o(4),c=f(l);function f(p){return p&&p.__esModule?p:{default:p}}function h(p,O){if(!(p instanceof O))throw new TypeError("Cannot call a class as a function")}function a(p,O){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:p}function u(p,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);p.prototype=Object.create(O&&O.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(p,O):p.__proto__=O)}var d=(function(p){u(O,p);function O(){return h(this,O),a(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return s(O,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),O})(c.default);d.blotName="header",d.tagName=["H1","H2","H3","H4","H5","H6"],r.default=d}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var s=(function(){function m(S,C){for(var N=0;N<C.length;N++){var M=C[N];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(S,M.key,M)}}return function(S,C,N){return C&&m(S.prototype,C),N&&m(S,N),S}})(),l=function m(S,C,N){S===null&&(S=Function.prototype);var M=Object.getOwnPropertyDescriptor(S,C);if(M===void 0){var j=Object.getPrototypeOf(S);return j===null?void 0:m(j,C,N)}else{if("value"in M)return M.value;var I=M.get;return I===void 0?void 0:I.call(N)}},c=o(0),f=p(c),h=o(4),a=p(h),u=o(25),d=p(u);function p(m){return m&&m.__esModule?m:{default:m}}function O(m,S,C){return S in m?Object.defineProperty(m,S,{value:C,enumerable:!0,configurable:!0,writable:!0}):m[S]=C,m}function g(m,S){if(!(m instanceof S))throw new TypeError("Cannot call a class as a function")}function _(m,S){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:m}function y(m,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);m.prototype=Object.create(S&&S.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(m,S):m.__proto__=S)}var w=(function(m){y(S,m);function S(){return g(this,S),_(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,[{key:"format",value:function(N,M){N===E.blotName&&!M?this.replaceWith(f.default.create(this.statics.scope)):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,N,M)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(N,M){return this.parent.isolate(this.offset(this.parent),this.length()),N===this.parent.statics.blotName?(this.parent.replaceWith(N,M),this):(this.parent.unwrap(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,N,M))}}],[{key:"formats",value:function(N){return N.tagName===this.tagName?void 0:l(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,N)}}]),S})(a.default);w.blotName="list-item",w.tagName="LI";var E=(function(m){y(S,m),s(S,null,[{key:"create",value:function(N){var M=N==="ordered"?"OL":"UL",j=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,M);return(N==="checked"||N==="unchecked")&&j.setAttribute("data-checked",N==="checked"),j}},{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 S(C){g(this,S);var N=_(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,C)),M=function(I){if(I.target.parentNode===C){var A=N.statics.formats(C),q=f.default.find(I.target);A==="checked"?q.format("list","unchecked"):A==="unchecked"&&q.format("list","checked")}};return C.addEventListener("touchstart",M),C.addEventListener("mousedown",M),N}return s(S,[{key:"format",value:function(N,M){this.children.length>0&&this.children.tail.format(N,M)}},{key:"formats",value:function(){return O({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(N,M){if(N instanceof w)l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,N,M);else{var j=M==null?this.length():M.offset(this),I=this.split(j);I.parent.insertBefore(N,I)}}},{key:"optimize",value:function(N){l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,N);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&M.domNode.tagName===this.domNode.tagName&&M.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(M.moveChildren(this),M.remove())}},{key:"replace",value:function(N){if(N.statics.blotName!==this.statics.blotName){var M=f.default.create(this.statics.defaultChild);N.moveChildren(M),this.appendChild(M)}l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,N)}}]),S})(d.default);E.blotName="list",E.scope=f.default.Scope.BLOCK_BLOT,E.tagName=["OL","UL"],E.defaultChild="list-item",E.allowedChildren=[w],r.ListItem=w,r.default=E}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(56),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function h(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=(function(d){a(p,d);function p(){return f(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="italic",u.tagName=["EM","I"],r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function O(g,_){for(var y=0;y<_.length;y++){var w=_[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,_,y){return _&&O(g.prototype,_),y&&O(g,y),g}})(),l=function O(g,_,y){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,_);if(w===void 0){var E=Object.getPrototypeOf(g);return E===null?void 0:O(E,_,y)}else{if("value"in w)return w.value;var m=w.get;return m===void 0?void 0:m.call(y)}},c=o(6),f=h(c);function h(O){return O&&O.__esModule?O:{default:O}}function a(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function u(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function d(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var p=(function(O){d(g,O);function g(){return a(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return s(g,null,[{key:"create",value:function(y){return y==="super"?document.createElement("sup"):y==="sub"?document.createElement("sub"):l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,y)}},{key:"formats",value:function(y){if(y.tagName==="SUB")return"sub";if(y.tagName==="SUP")return"super"}}]),g})(f.default);p.blotName="script",p.tagName=["SUB","SUP"],r.default=p}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(6),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function h(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=(function(d){a(p,d);function p(){return f(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="strike",u.tagName="S",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=o(6),l=c(s);function c(d){return d&&d.__esModule?d:{default:d}}function f(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function h(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function a(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var u=(function(d){a(p,d);function p(){return f(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p})(l.default);u.blotName="underline",u.tagName="U",r.default=u}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(y,w){for(var E=0;E<w.length;E++){var m=w[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,w,E){return w&&_(y.prototype,w),E&&_(y,E),y}})(),l=function _(y,w,E){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,w);if(m===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:_(S,w,E)}else{if("value"in m)return m.value;var C=m.get;return C===void 0?void 0:C.call(E)}},c=o(0),f=a(c),h=o(27);function a(_){return _&&_.__esModule?_:{default:_}}function u(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function d(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function p(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var O=["alt","height","width"],g=(function(_){p(y,_);function y(){return u(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(E,m){O.indexOf(E)>-1?m?this.domNode.setAttribute(E,m):this.domNode.removeAttribute(E):l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,E,m)}}],[{key:"create",value:function(E){var m=l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,E);return typeof E=="string"&&m.setAttribute("src",this.sanitize(E)),m}},{key:"formats",value:function(E){return O.reduce(function(m,S){return E.hasAttribute(S)&&(m[S]=E.getAttribute(S)),m},{})}},{key:"match",value:function(E){return/\.(jpe?g|gif|png)$/.test(E)||/^data:image\/.+;base64/.test(E)}},{key:"sanitize",value:function(E){return(0,h.sanitize)(E,["http","https","data"])?E:"//:0"}},{key:"value",value:function(E){return E.getAttribute("src")}}]),y})(f.default.Embed);g.blotName="image",g.tagName="IMG",r.default=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function _(y,w){for(var E=0;E<w.length;E++){var m=w[E];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,w,E){return w&&_(y.prototype,w),E&&_(y,E),y}})(),l=function _(y,w,E){y===null&&(y=Function.prototype);var m=Object.getOwnPropertyDescriptor(y,w);if(m===void 0){var S=Object.getPrototypeOf(y);return S===null?void 0:_(S,w,E)}else{if("value"in m)return m.value;var C=m.get;return C===void 0?void 0:C.call(E)}},c=o(4),f=o(27),h=a(f);function a(_){return _&&_.__esModule?_:{default:_}}function u(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}function d(_,y){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:_}function p(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);_.prototype=Object.create(y&&y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(_,y):_.__proto__=y)}var O=["height","width"],g=(function(_){p(y,_);function y(){return u(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"format",value:function(E,m){O.indexOf(E)>-1?m?this.domNode.setAttribute(E,m):this.domNode.removeAttribute(E):l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,E,m)}}],[{key:"create",value:function(E){var m=l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,E);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(E)),m}},{key:"formats",value:function(E){return O.reduce(function(m,S){return E.hasAttribute(S)&&(m[S]=E.getAttribute(S)),m},{})}},{key:"sanitize",value:function(E){return h.default.sanitize(E)}},{key:"value",value:function(E){return E.getAttribute("src")}}]),y})(c.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",r.default=g}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var s=(function(){function E(m,S){for(var C=0;C<S.length;C++){var N=S[C];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(m,N.key,N)}}return function(m,S,C){return S&&E(m.prototype,S),C&&E(m,C),m}})(),l=function E(m,S,C){m===null&&(m=Function.prototype);var N=Object.getOwnPropertyDescriptor(m,S);if(N===void 0){var M=Object.getPrototypeOf(m);return M===null?void 0:E(M,S,C)}else{if("value"in N)return N.value;var j=N.get;return j===void 0?void 0:j.call(C)}},c=o(35),f=p(c),h=o(5),a=p(h),u=o(9),d=p(u);function p(E){return E&&E.__esModule?E:{default:E}}function O(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function g(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var y=(function(E){_(m,E);function m(){return O(this,m),g(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return s(m,null,[{key:"create",value:function(C){var N=l(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,C);return typeof C=="string"&&(window.katex.render(C,N,{throwOnError:!1,errorColor:"#f00"}),N.setAttribute("data-value",C)),N}},{key:"value",value:function(C){return C.getAttribute("data-value")}}]),m})(f.default);y.blotName="formula",y.className="ql-formula",y.tagName="SPAN";var w=(function(E){_(m,E),s(m,null,[{key:"register",value:function(){a.default.register(y,!0)}}]);function m(){O(this,m);var S=g(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return m})(d.default);r.FormulaBlot=y,r.default=w}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var s=(function(){function C(N,M){for(var j=0;j<M.length;j++){var I=M[j];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(N,I.key,I)}}return function(N,M,j){return M&&C(N.prototype,M),j&&C(N,j),N}})(),l=function C(N,M,j){N===null&&(N=Function.prototype);var I=Object.getOwnPropertyDescriptor(N,M);if(I===void 0){var A=Object.getPrototypeOf(N);return A===null?void 0:C(A,M,j)}else{if("value"in I)return I.value;var q=I.get;return q===void 0?void 0:q.call(j)}},c=o(0),f=g(c),h=o(5),a=g(h),u=o(9),d=g(u),p=o(13),O=g(p);function g(C){return C&&C.__esModule?C:{default:C}}function _(C,N){if(!(C instanceof N))throw new TypeError("Cannot call a class as a function")}function y(C,N){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:C}function w(C,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);C.prototype=Object.create(N&&N.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(C,N):C.__proto__=N)}var E=(function(C){w(N,C);function N(){return _(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return s(N,[{key:"replaceWith",value:function(j){this.domNode.textContent=this.domNode.textContent,this.attach(),l(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replaceWith",this).call(this,j)}},{key:"highlight",value:function(j){var I=this.domNode.textContent;this.cachedText!==I&&((I.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=j(I),this.domNode.normalize(),this.attach()),this.cachedText=I)}}]),N})(O.default);E.className="ql-syntax";var m=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),S=(function(C){w(N,C),s(N,null,[{key:"register",value:function(){a.default.register(m,!0),a.default.register(E,!0)}}]);function N(M,j){_(this,N);var I=y(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,M,j));if(typeof I.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return I.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){I.highlight(),A=null},I.options.interval)}),I.highlight(),I}return s(N,[{key:"highlight",value:function(){var j=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var I=this.quill.getSelection();this.quill.scroll.descendants(E).forEach(function(A){A.highlight(j.options.highlight)}),this.quill.update(a.default.sources.SILENT),I!=null&&this.quill.setSelection(I,a.default.sources.SILENT)}}}]),N})(d.default);S.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(C){var N=window.hljs.highlightAuto(C);return N.value}})(),interval:1e3},r.CodeBlock=E,r.CodeToken=m,r.default=S}),(function(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r){n.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(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var s=function N(M,j,I){M===null&&(M=Function.prototype);var A=Object.getOwnPropertyDescriptor(M,j);if(A===void 0){var q=Object.getPrototypeOf(M);return q===null?void 0:N(q,j,I)}else{if("value"in A)return A.value;var R=A.get;return R===void 0?void 0:R.call(I)}},l=(function(){function N(M,j){for(var I=0;I<j.length;I++){var A=j[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(M,A.key,A)}}return function(M,j,I){return j&&N(M.prototype,j),I&&N(M,I),M}})(),c=o(3),f=_(c),h=o(8),a=_(h),u=o(43),d=_(u),p=o(15),O=o(41),g=_(O);function _(N){return N&&N.__esModule?N:{default:N}}function y(N,M){if(!(N instanceof M))throw new TypeError("Cannot call a class as a function")}function w(N,M){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:N}function E(N,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);N.prototype=Object.create(M&&M.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(N,M):N.__proto__=M)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=(function(N){E(M,N);function M(j,I){y(this,M),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=m);var A=w(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,j,I));return A.quill.container.classList.add("ql-bubble"),A}return l(M,[{key:"extendToolbar",value:function(I){this.tooltip=new C(this.quill,this.options.bounds),this.tooltip.root.appendChild(I.container),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),g.default)}}]),M})(d.default);S.DEFAULTS=(0,f.default)(!0,{},d.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(M){M?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var C=(function(N){E(M,N);function M(j,I){y(this,M);var A=w(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,j,I));return A.quill.on(a.default.events.EDITOR_CHANGE,function(q,R,k,F){if(q===a.default.events.SELECTION_CHANGE)if(R!=null&&R.length>0&&F===a.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var U=A.quill.getLines(R.index,R.length);if(U.length===1)A.position(A.quill.getBounds(R));else{var ne=U[U.length-1],ue=A.quill.getIndex(ne),K=Math.min(ne.length()-1,R.index+R.length-ue),W=A.quill.getBounds(new p.Range(ue,K));A.position(W)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return l(M,[{key:"listen",value:function(){var I=this;s(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){I.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!I.root.classList.contains("ql-hidden")){var A=I.quill.getSelection();A!=null&&I.position(I.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(I){var A=s(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"position",this).call(this,I),q=this.root.querySelector(".ql-tooltip-arrow");if(q.style.marginLeft="",A===0)return A;q.style.marginLeft=-1*A-q.offsetWidth/2+"px"}}]),M})(u.BaseTooltip);C.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(""),r.BubbleTooltip=C,r.default=S}),(function(n,r,o){n.exports=o(63)})]).default})})(ca)),ca.exports}var cn,ZO;function nL(){if(ZO)return cn;ZO=1;var e=cn&&cn.__extends||(function(){var a=function(u,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,O){p.__proto__=O}||function(p,O){for(var g in O)O.hasOwnProperty(g)&&(p[g]=O[g])},a(u,d)};return function(u,d){a(u,d);function p(){this.constructor=u}u.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})(),t=cn&&cn.__assign||function(){return t=Object.assign||function(a){for(var u,d=1,p=arguments.length;d<p;d++){u=arguments[d];for(var O in u)Object.prototype.hasOwnProperty.call(u,O)&&(a[O]=u[O])}return a},t.apply(this,arguments)},n=cn&&cn.__spreadArrays||function(){for(var a=0,u=0,d=arguments.length;u<d;u++)a+=arguments[u].length;for(var p=Array(a),O=0,u=0;u<d;u++)for(var g=arguments[u],_=0,y=g.length;_<y;_++,O++)p[O]=g[_];return p},r=cn&&cn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},o=r(nt.default),s=r(pv.default),l=r(Jq()),c=r(tL()),f=(function(a){e(u,a);function u(d){var p=a.call(this,d)||this;p.dirtyProps=["modules","formats","bounds","theme","children"],p.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],p.state={generation:0},p.selection=null,p.onEditorChange=function(g,_,y,w){var E,m,S,C;g==="text-change"?(m=(E=p).onEditorChangeText)===null||m===void 0||m.call(E,p.editor.root.innerHTML,_,w,p.unprivilegedEditor):g==="selection-change"&&((C=(S=p).onEditorChangeSelection)===null||C===void 0||C.call(S,_,w,p.unprivilegedEditor))};var O=p.isControlled()?d.value:d.defaultValue;return p.value=O??"",p}return u.prototype.validateProps=function(d){var p;if(o.default.Children.count(d.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(o.default.Children.count(d.children)){var O=o.default.Children.only(d.children);if(((p=O)===null||p===void 0?void 0:p.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&d.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},u.prototype.shouldComponentUpdate=function(d,p){var O=this,g;if(this.validateProps(d),!this.editor||this.state.generation!==p.generation)return!0;if("value"in d){var _=this.getEditorContents(),y=(g=d.value,g??"");this.isEqualValue(y,_)||this.setEditorContents(this.editor,y)}return d.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,d.readOnly),n(this.cleanProps,this.dirtyProps).some(function(w){return!l.default(d[w],O.props[w])})},u.prototype.shouldComponentRegenerate=function(d){var p=this;return this.dirtyProps.some(function(O){return!l.default(d[O],p.props[O])})},u.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},u.prototype.componentWillUnmount=function(){this.destroyEditor()},u.prototype.componentDidUpdate=function(d,p){var O=this;if(this.editor&&this.shouldComponentRegenerate(d)){var g=this.editor.getContents(),_=this.editor.getSelection();this.regenerationSnapshot={delta:g,selection:_},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==p.generation){var y=this.regenerationSnapshot,g=y.delta,w=y.selection;delete this.regenerationSnapshot,this.instantiateEditor();var E=this.editor;E.setContents(g),h(function(){return O.setEditorSelection(E,w)})}},u.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},u.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},u.prototype.isControlled=function(){return"value"in this.props},u.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},u.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},u.prototype.createEditor=function(d,p){var O=new c.default(d,p);return p.tabIndex!=null&&this.setEditorTabIndex(O,p.tabIndex),this.hookEditor(O),O},u.prototype.hookEditor=function(d){this.unprivilegedEditor=this.makeUnprivilegedEditor(d),d.on("editor-change",this.onEditorChange)},u.prototype.unhookEditor=function(d){d.off("editor-change",this.onEditorChange)},u.prototype.getEditorContents=function(){return this.value},u.prototype.getEditorSelection=function(){return this.selection},u.prototype.isDelta=function(d){return d&&d.ops},u.prototype.isEqualValue=function(d,p){return this.isDelta(d)&&this.isDelta(p)?l.default(d.ops,p.ops):l.default(d,p)},u.prototype.setEditorContents=function(d,p){var O=this;this.value=p;var g=this.getEditorSelection();typeof p=="string"?d.setContents(d.clipboard.convert(p)):d.setContents(p),h(function(){return O.setEditorSelection(d,g)})},u.prototype.setEditorSelection=function(d,p){if(this.selection=p,p){var O=d.getLength();p.index=Math.max(0,Math.min(p.index,O-1)),p.length=Math.max(0,Math.min(p.length,O-1-p.index)),d.setSelection(p)}},u.prototype.setEditorTabIndex=function(d,p){var O,g;!((g=(O=d)===null||O===void 0?void 0:O.scroll)===null||g===void 0)&&g.domNode&&(d.scroll.domNode.tabIndex=p)},u.prototype.setEditorReadOnly=function(d,p){p?d.disable():d.enable()},u.prototype.makeUnprivilegedEditor=function(d){var p=d;return{getHTML:function(){return p.root.innerHTML},getLength:p.getLength.bind(p),getText:p.getText.bind(p),getContents:p.getContents.bind(p),getSelection:p.getSelection.bind(p),getBounds:p.getBounds.bind(p)}},u.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var d=s.default.findDOMNode(this.editingArea);if(!d)throw new Error("Cannot find element for editing area");if(d.nodeType===3)throw new Error("Editing area cannot be a text node");return d},u.prototype.renderEditingArea=function(){var d=this,p=this.props,O=p.children,g=p.preserveWhitespace,_=this.state.generation,y={key:_,ref:function(w){d.editingArea=w}};return o.default.Children.count(O)?o.default.cloneElement(o.default.Children.only(O),y):g?o.default.createElement("pre",t({},y)):o.default.createElement("div",t({},y))},u.prototype.render=function(){var d;return o.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(d=this.props.className,d??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},u.prototype.onEditorChangeText=function(d,p,O,g){var _,y;if(this.editor){var w=this.isDelta(this.value)?g.getContents():g.getHTML();w!==this.getEditorContents()&&(this.lastDeltaChangeSet=p,this.value=w,(y=(_=this.props).onChange)===null||y===void 0||y.call(_,d,p,O,g))}},u.prototype.onEditorChangeSelection=function(d,p,O){var g,_,y,w,E,m;if(this.editor){var S=this.getEditorSelection(),C=!S&&d,N=S&&!d;l.default(d,S)||(this.selection=d,(_=(g=this.props).onChangeSelection)===null||_===void 0||_.call(g,d,p,O),C?(w=(y=this.props).onFocus)===null||w===void 0||w.call(y,d,p,O):N&&((m=(E=this.props).onBlur)===null||m===void 0||m.call(E,S,p,O)))}},u.prototype.focus=function(){this.editor&&this.editor.focus()},u.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},u.displayName="React Quill",u.Quill=c.default,u.defaultProps={theme:"snow",modules:{},readOnly:!1},u})(o.default.Component);function h(a){Promise.resolve().then(a)}return cn=f,cn}var rL=nL();const oL=ts(rL),iL=({isOpen:e,onClose:t,refresh:n,handleUpdate:r})=>{const{node:o,certificate:s}=ot(),{restrictedAssets:l}=s,c=l?l[o.id]:void 0,f={restrictionNotes:c?c.restrictionNotes:"",restrictionInstructions:c?c.restrictionInstructions:""},[h,a]=se.useState(f),[u,d]=se.useState(!1),[p,O]=se.useState(!1);se.useEffect(()=>{a(f)},[c]);const g=()=>{a(f),d(!1),t()},_=async()=>{d(!0),r({restrictedAssets:lq(o.id,l)}).then(w=>{w?.status===200?(Ke.success("Successfully removed restrictions!"),d(!1),O(!1),t(),n()):d(!1)}).catch(w=>{d(!1),Ke.error(`Request failed, ${w.toString()}`)})},y=async()=>{if(h.restrictionInstructions.length<1||h.restrictionNotes.length<1)return;d(!0);const w={[o.id]:h};r({restrictedAssets:{...l,...w}}).then(E=>{E?.status===200?(Ke.success("Asset has been successfully restricted!"),d(!1),t(),a(f),n()):(d(!1),Ke.error("Request failed..."))}).catch(E=>{d(!1),Ke.error(`Request failed, ${E.toString()}`)})};return $.jsxs($.Fragment,{children:[$.jsx(Ye.ConfirmationModal,{id:"restrict-removal-confirmation",isOpen:p,onClose:()=>O(!1),onSubmit:_,submitButtonText:"Confirm",pending:u,headerContent:"Do you confirm the removal of restrictions for this node?"}),$.jsx(Ye.ConfirmationModal,{id:"restrict-single-node-modal",isOpen:e,onClose:t,size:"lg",headerContent:"Change Node Restrictions",noSubmit:!0,noCancel:!0,disabled:u,content:$.jsxs($.Fragment,{children:[$.jsx(Ye.ResourceEditor,{className:"",onChange:w=>a(w),editedResource:h,controls:[sq()]}),$.jsxs("div",{className:"col-12",children:[$.jsx("label",{children:"Instructions for Retrieval - Guest Users"}),$.jsx(oL,{id:"restriction-instructions-editor",theme:"snow",value:h.restrictionInstructions,onChange:w=>{a(E=>({...E,restrictionInstructions:w}))}})]}),$.jsxs("div",{className:"float-right mt-3 d-flex flex-wrap",style:{gap:"0.5rem",padding:"0 15px"},children:[$.jsx(Ye.Button,{onClick:g,children:"Cancel"}),c&&$.jsx(Ye.Button,{color:"danger",onClick:()=>O(!0),pending:u,children:"Remove Restrictions"}),$.jsxs(Ye.Button,{color:"primary",onClick:y,pending:u,children:[c&&"Update Restrictions",!c&&"Restrict"]})]})]})})]})},aL=({certificate:e,handleUpdate:t,refresh:n})=>{const[r,o]=se.useState(!1),s=()=>o(!r),[l,c]=se.useState(!1),f=()=>c(!l),h="reviewNode",a={toggleReviewModal:s,toggleMetadataModal:f},u=sa(e.vertices,e.edges,e.restrictedAssets,h,a);return $.jsxs(ua,{type:h,certificate:e,graph:u,children:[$.jsx(iL,{isOpen:r,onClose:s,refresh:n,handleUpdate:t}),$.jsx(Fh,{isOpen:l,toggle:f})]})},sL=({certificate:e,replica:t,refresh:n})=>{const[r,o]=se.useState(!1),s=()=>o(!r);if(dn(e)||bt(e)||dn(t)||bt(t))return;const l="fileLayerNode",c={refresh:n,toggleMetadataModal:s},f=IO(e.vertices,e.edges,t,c);return $.jsx(ua,{type:l,certificate:e,replica:t,graph:f,children:$.jsx(Fh,{isOpen:r,toggle:s})})},lL=({setIsLayersItemModalOpen:e})=>{const{node:t}=ot();if(!t?.id)return null;const[n,r]=t.id.split("/"),o=()=>{let s=[{key:"view-btn",label:"View Item",onClick:()=>window.open(Yq(t.id),"_blank")},{key:"copy-id-btn",label:"Copy Item ID",onClick:()=>navigator.clipboard.writeText(r)}];return n.includes("Layer")&&(s=[...s,{key:"open-layer-btn",label:"Open Layer",onClick:()=>e(!0)}]),s.map(l=>$.jsx("li",{children:$.jsx(Ye.Button,{color:"secondary",className:"w-100 my-1 btn-sm",sx:{whiteSpace:"nowrap"},onClick:l.onClick,children:l.label},l.key)}))};return $.jsx("div",{className:"position-absolute border border-secondary border-4 top-0 end-0 m-3 p-2",children:$.jsx("ul",{className:"list-unstyled mb-0 text-end",children:o()})})},uL=({isOpen:e,setIsOpen:t})=>{const{node:n,setNode:r,certificate:o,nodesState:s,edgesState:l,nodeLayers:c,setNodeLayers:f}=ot(),[,h]=s,[,a]=l,u=o.subgraphs[n.id],d=(_,y)=>_.reduce((w,E)=>E.id===n.id?[...w,{...E,id:y}]:[...w,E],[]),p=(_,y)=>_.reduce((w,E)=>{if(E.id.includes(n.id)){const m=E.source===n.id;return[...w,{id:`${E.id}-${y}`,source:m?y:E.source,target:m?E.target:y,animated:!0}]}return[...w,E]},[]),O=_=>{t(!1),r({});const y=d(c.current.nodes,_),w=p(c.current.edges,_);h(y),a(w),f({...c,current:{nodes:y,edges:w}})},g=()=>{if(!u)return null;const _=Object.keys(u.vertices);return $.jsxs($.Fragment,{children:[$.jsx("h3",{children:"Select an item in the list from this grouping to continue tracing."}),$.jsx("ul",{children:_.map(y=>$.jsx("li",{children:$.jsx(Ye.Button,{color:"link",className:"btn-sm text-wrap",style:{textAlign:"left"},onClick:()=>O(y),children:o.generatedLabels[y].Name})}))})]})};return $.jsx(Ye.ConfirmationModal,{id:"layer-items-modal",className:"top-25",isOpen:e,onClose:()=>t(!1),cancelButtonText:"Close",noSubmit:!0,headerContent:n.id,content:g()})},cL=({certificate:e,graph:t})=>{const{nodesState:n,edgesState:r,nodeLayers:o,setNodeLayers:s}=ot(),l=se.useMemo(()=>({walkingNode:KO}),[]),[,c,f]=n,[,h,a]=r,[u,d]=se.useState(!1);se.useEffect(()=>{dn(e)||bt(e)||(c(t.nodes),h(t.edges),s({previous:o.previous,current:{nodes:t.nodes,edges:t.edges}}))},[e]);const p=O=>{setTimeout(()=>{O.fitView(),O.zoomTo(.5,{duration:1e3})},100)};return $.jsxs("div",{style:{height:"75vh",position:"relative"},children:[$.jsx("div",{className:"layoutflow",children:$.jsxs(Ph,{nodes:o.current.nodes,edges:o.current.edges,onNodesChange:f,onEdgesChange:a,connectionLineType:vn.SmoothStep,nodeTypes:l,onlyRenderVisibleElements:!0,edgesUpdatable:!1,onInit:p,children:[$.jsx(lO,{}),$.jsx(cO,{}),$.jsx(aO,{})]})}),$.jsx(lL,{setIsLayersItemModalOpen:d}),$.jsx(uL,{setIsOpen:d,isOpen:u})]})},fL=({certificate:e})=>{const t=UO([],e.vertices,e,!1),n=GO([],e.edges),r=VO(t,n);return $.jsx(mO,{type:"walkingNode",certificate:e,children:$.jsx(cL,{certificate:e,graph:r})})},Gh=e=>e?e!=="ffffffff-ffff-ffff-ffff-ffffffffffff":!1,dL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/${e}`,hL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/labels/${e}`,pL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/metadata/${e}`,vL=(e,t,n)=>`${t}/${n?"public":"publishing"}/certificate/schemes/${e}`,gL=async(e,t,n=!0,r)=>{const o=await fetch(dL(e,t,n),{credentials:"include"});r&&r(o);const s=await o.json();if(o.status!==200)throw Error(s.Message);let l={...s};const{labelsId:c,metadataId:f,schemesId:h}=s;if(Gh(c)){const u=await(await fetch(hL(c,t,n),{credentials:"include"})).json();l={...l,customLabels:u.customLabels,generatedLabels:u.generatedLabels,serviceLabels:u.serviceLabels}}if(Gh(f)){const u=await(await fetch(pL(f,t,n),{credentials:"include"})).json();l={...l,metadata:u.metadata}}if(Gh(h)){const u=await(await fetch(vL(h,t,n),{credentials:"include"})).json();l={...l,schemes:u.schemes}}return l},yL=()=>{console.log("import.meta.env.VITE_API_ROUTE","production","undefined/collaboration/neighbors?root=&getDescendants=true")};ht.EditCertificate=Qq,ht.EditNodeModal=DO,ht.IDEModal=$O,ht.MaskMetadataModal=RO,ht.PipelineModal=BO,ht.ReadCertificate=Xq,ht.ReplicaPipelineInfo=FO,ht.ReviewCertificate=aL,ht.WalkingGraph=fL,ht.WorkspaceCertificate=sL,ht.getCertificateBody=gL,ht.getSchemes=SO,ht.startIDE=HO,ht.startPipeline=zO,ht.testComponent=yL,Object.defineProperty(ht,Symbol.toStringTag,{value:"Module"})}));